/* ============================================
   style.css - Professional Service Portal System
   Modern Dark Theme with Professional Blue Accents
   Enhanced Visibility & Contrast
   ============================================ */

/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Sticky Footer Setup */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: #0f0f12;
    color: #e8edf5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- CONTAINER ---------- */
.container {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: #14151a;
    border-bottom: 2px solid #4f8cf7;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    flex-shrink: 0;
    box-shadow: 0 2px 20px rgba(79, 140, 247, 0.08);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.logo i {
    color: #4f8cf7;
    font-size: 24px;
    background: rgba(79, 140, 247, 0.12);
    padding: 8px;
    border-radius: 10px;
}

.logo span {
    background: linear-gradient(135deg, #4f8cf7, #7cadee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    background: #1e2028;
    color: #d0d7e6;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.nav-link i {
    font-size: 14px;
    color: #6b8fc7;
}

.nav-link:hover {
    background: #2a2d38;
    color: #ffffff;
    transform: translateY(-2px);
    border-color: #4f8cf7;
    box-shadow: 0 4px 15px rgba(79, 140, 247, 0.15);
}

.nav-link:hover i {
    color: #4f8cf7;
}

.nav-link.logout {
    background: #dc3545;
    border-color: #dc3545;
}

.nav-link.logout i {
    color: white;
}

.nav-link.logout:hover {
    background: #c82333;
    border-color: #c82333;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        padding: 10px;
    }
    .nav-links {
        justify-content: center;
    }
    .nav-link {
        padding: 6px 12px;
        font-size: 12px;
    }
    .nav-link span {
        display: none;
    }
    .nav-link i {
        font-size: 16px;
    }
}

/* ============================================
   BACK BUTTON
   ============================================ */
.back-button {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1e2028;
    color: #d0d7e6;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #2a2d38;
    transition: all 0.25s ease;
}

.back-btn:hover {
    background: #4f8cf7;
    color: white;
    transform: translateX(-4px);
    border-color: #4f8cf7;
    box-shadow: 0 4px 15px rgba(79, 140, 247, 0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #14151a;
    border-top: 1px solid #252830;
    padding: 20px;
    text-align: center;
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
}

.footer-inner a {
    color: #6a7a8f;
    text-decoration: none;
    font-size: 13px;
}

.footer-inner a:hover {
    color: #4f8cf7;
}

/* ============================================
   SUBSCRIPTION TEXT
   ============================================ */
.subscription-text {
    background: #1a1c24;
    border-left: 4px solid #4f8cf7;
    padding: 14px 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-size: 15px;
    text-align: center;
    color: #c8d0de;
}

.subscription-text .days-left {
    color: #4f8cf7;
    font-weight: 700;
    font-size: 20px;
}

.subscription-text .warning {
    color: #f7b731;
    font-weight: 600;
}

/* Renew Button Inline */
.renew-btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #4f8cf7;
    color: white;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-left: 15px;
    transition: all 0.25s;
}

.renew-btn-inline:hover {
    background: #3a7ae8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 140, 247, 0.3);
}

@media (max-width: 640px) {
    .renew-btn-inline {
        display: inline-flex;
        margin-left: 8px;
        padding: 3px 10px;
        font-size: 11px;
    }
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #181b23;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid #252830;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f8cf7, #7cadee);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    border-color: #4f8cf7;
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(79, 140, 247, 0.08);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
    color: #4f8cf7;
}

.stat-card h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #8a9bb0;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
}

.stat-card.earnings .stat-value {
    color: #4f8cf7;
}

.stat-card.pending .stat-value {
    color: #f7b731;
}

.stat-card.progress .stat-value {
    color: #4fc3f7;
}

.stat-sub {
    font-size: 12px;
    color: #6a7a8f;
    margin-top: 8px;
}

.stat-sub span {
    cursor: pointer;
    color: #4f8cf7;
    font-weight: 500;
    transition: color 0.2s;
}

.stat-sub span:hover {
    color: #7cadee;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .stats-grid {
        gap: 12px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-value {
        font-size: 24px;
    }
    .stat-icon {
        font-size: 24px;
    }
}

/* ============================================
   STATUS SECTIONS
   ============================================ */
.status-section {
    background: #14161e;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 25px;
    border: 1px solid #252830;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #4f8cf7;
}

.status-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #4f8cf7;
}

.status-title i {
    font-size: 18px;
    color: #4f8cf7;
}

.status-search input {
    width: 260px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #2a2d38;
    background: #1e2028;
    color: #e8edf5;
    font-size: 14px;
    transition: all 0.25s ease;
}

.status-search input:focus {
    outline: none;
    border-color: #4f8cf7;
    box-shadow: 0 0 0 3px rgba(79, 140, 247, 0.1);
}

.status-search input::placeholder {
    color: #6a7a8f;
    font-size: 13px;
}

@media (max-width: 640px) {
    .status-section {
        padding: 16px;
    }
    .status-header {
        flex-direction: column;
        align-items: stretch;
    }
    .status-search input {
        width: 100%;
    }
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
}

.requests-table,
.completed-table,
.warranty-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 750px;
}

.requests-table th,
.requests-table td,
.completed-table th,
.completed-table td,
.warranty-table th,
.warranty-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #252830;
}

.requests-table th,
.completed-table th,
.warranty-table th {
    background: #12141b;
    color: #4f8cf7;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid #4f8cf7;
}

.requests-table tr:hover,
.completed-table tr:hover,
.warranty-table tr:hover {
    background: #1a1c26;
}

.requests-table td,
.completed-table td,
.warranty-table td {
    color: #d0d7e6;
}

@media (max-width: 768px) {
    .requests-table td,
    .completed-table td,
    .warranty-table td {
        font-size: 13px;
        padding: 10px 8px;
    }
}

/* Status Badges */
.status-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-pending {
    background: rgba(247, 183, 49, 0.15);
    color: #f7b731;
    border: 1px solid rgba(247, 183, 49, 0.25);
}

.badge-progress {
    background: rgba(79, 195, 247, 0.12);
    color: #4fc3f7;
    border: 1px solid rgba(79, 195, 247, 0.2);
}

.badge-completed {
    background: rgba(79, 140, 247, 0.12);
    color: #4f8cf7;
    border: 1px solid rgba(79, 140, 247, 0.2);
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-btn {
    padding: 6px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    color: white;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.table-btn i {
    font-size: 14px;
}

.table-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn {
    background: #25D366;
}

.whatsapp-btn:hover {
    background: #128C7E;
}

.print-btn {
    background: #6b7a8f;
}

.print-btn:hover {
    background: #5a6a7f;
}

.delete-btn {
    background: #dc3545;
}

.delete-btn:hover {
    background: #c82333;
}

.edit-btn {
    background: #4f8cf7;
}

.edit-btn:hover {
    background: #3a7ae8;
}

.inline-edit-btn {
    background: transparent;
    border: none;
    color: #4f8cf7;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 12px;
    transition: all 0.25s;
    margin-left: 5px;
}

.inline-edit-btn:hover {
    color: #7cadee;
    transform: scale(1.2);
}

.status-select {
    padding: 6px 12px;
    border-radius: 8px;
    background: #1e2028;
    color: #d0d7e6;
    border: 1px solid #2a2d38;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.status-select:hover {
    border-color: #4f8cf7;
}

.status-select:focus {
    outline: none;
    border-color: #4f8cf7;
    box-shadow: 0 0 0 3px rgba(79, 140, 247, 0.1);
}

/* ============================================
   FORMS
   ============================================ */
.form-container {
    max-width: 650px;
    margin: 0 auto;
}

.form-card {
    background: #161a24;
    border-radius: 20px;
    padding: 32px;
    border: 1px solid #252830;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
    .form-container {
        max-width: 100%;
    }
    .form-card {
        padding: 20px;
    }
}

.form-group {
    margin-bottom: 22px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #a8b8cc;
    font-size: 14px;
    letter-spacing: 0.3px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #2a2d38;
    background: #1a1c26;
    color: #e8edf5;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.25s ease;
}

input:hover, select:hover, textarea:hover {
    border-color: #3a4a5a;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4f8cf7;
    box-shadow: 0 0 0 4px rgba(79, 140, 247, 0.08);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.help-text {
    font-size: 12px;
    color: #6a7a8f;
    margin-top: 6px;
}

.help-text a {
    color: #4f8cf7;
    text-decoration: none;
    font-weight: 500;
}

.help-text a:hover {
    text-decoration: underline;
    color: #7cadee;
}

.submit-btn {
    background: #4f8cf7;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    width: 100%;
    font-size: 16px;
    margin-top: 10px;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background: #3a7ae8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 140, 247, 0.25);
}

/* Phone Check Section */
.phone-check-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.phone-check-group input {
    flex: 1;
}

.check-btn {
    background: #4f8cf7;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-btn:hover {
    background: #3a7ae8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 140, 247, 0.2);
}

.check-btn:disabled {
    background: #2a2d38;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Customer History Results */
.history-results {
    background: #1a1c26;
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
    border: 1px solid #2a2d38;
    display: none;
}

.history-results.visible {
    display: block;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #1e2028;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.history-item:hover {
    border-color: #4f8cf7;
    background: #252830;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-item .customer-name {
    color: #e8edf5;
    font-weight: 500;
}

.history-item .history-token {
    color: #6a7a8f;
    font-size: 12px;
}

.history-item .history-device {
    color: #4f8cf7;
    font-size: 12px;
}

.history-item .select-history-btn {
    background: #4f8cf7;
    color: white;
    border: none;
    padding: 4px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.history-item .select-history-btn:hover {
    background: #3a7ae8;
}

.history-not-found {
    text-align: center;
    padding: 20px;
    color: #6a7a8f;
}

.history-loading {
    text-align: center;
    padding: 20px;
    color: #4f8cf7;
}

.history-loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   SETTINGS PAGE
   ============================================ */
.settings-container {
    max-width: 700px;
    margin: 0 auto;
}

.settings-card {
    background: #161a24;
    border-radius: 20px;
    padding: 32px;
    border: 1px solid #252830;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.settings-card h3 {
    color: #4f8cf7;
    font-size: 18px;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #252830;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-card hr {
    border-color: #252830;
    margin: 25px 0;
}

.variables-box {
    background: #14161e;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #8a9bb0;
    border: 1px solid #252830;
}

.variables-box strong {
    color: #4f8cf7;
    display: block;
    margin-bottom: 8px;
}

.variables-box span {
    display: inline-block;
    background: #1a1c26;
    padding: 4px 10px;
    border-radius: 5px;
    margin: 3px;
    font-family: monospace;
    font-size: 11px;
    color: #a8b8cc;
    border: 1px solid #252830;
}

.reset-btn {
    background: #f7b731;
    color: #14151a;
    border: none;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: #e6a820;
    transform: translateY(-1px);
}

.password-section {
    background: #14161e;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #252830;
}

.password-change-btn {
    background: #4f8cf7;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    font-size: 14px;
    transition: all 0.25s;
}

.password-change-btn:hover {
    background: #3a7ae8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 140, 247, 0.2);
}

/* ============================================
   DROPDOWN MANAGER
   ============================================ */
.dropdown-manager-container {
    max-width: 1000px;
    margin: 0 auto;
}

.devices-section {
    background: #161a24;
    border-radius: 20px;
    padding: 28px;
    border: 1px solid #252830;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    color: #4f8cf7;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.add-device-btn {
    background: #4f8cf7;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
}

.add-device-btn:hover {
    background: #3a7ae8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 140, 247, 0.2);
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.device-card {
    background: #181b23;
    border-radius: 16px;
    border: 1px solid #252830;
    transition: all 0.3s;
    cursor: pointer;
}

.device-card:hover {
    border-color: #4f8cf7;
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(79, 140, 247, 0.06);
}

.device-card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #252830;
}

.device-icon {
    width: 50px;
    height: 50px;
    background: #1a1c26;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-icon i {
    font-size: 24px;
    color: #4f8cf7;
}

.device-name-large {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: #e8edf5;
}

.device-actions {
    display: flex;
    gap: 8px;
}

.device-edit-btn, .device-delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
    color: #6a7a8f;
}

.device-edit-btn:hover {
    background: rgba(79, 140, 247, 0.15);
    color: #4f8cf7;
}

.device-delete-btn:hover {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.device-card-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.problems-count {
    font-size: 12px;
    color: #6a7a8f;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-problems-btn {
    background: transparent;
    border: 1px solid #4f8cf7;
    color: #4f8cf7;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-problems-btn:hover {
    background: #4f8cf7;
    color: white;
}

.problems-list {
    max-height: 400px;
    overflow-y: auto;
}

.problem-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #14161e;
    border-radius: 10px;
    border: 1px solid #252830;
}

.problem-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #d0d7e6;
}

.problem-name i {
    font-size: 8px;
    color: #4f8cf7;
}

.problem-actions {
    display: flex;
    gap: 8px;
}

.problem-edit-btn, .problem-delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    color: #6a7a8f;
}

.problem-edit-btn:hover {
    background: rgba(79, 140, 247, 0.15);
    color: #4f8cf7;
}

.problem-delete-btn:hover {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.add-problem-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
}

.add-problem-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.loading-problems {
    text-align: center;
    padding: 40px;
    color: #6a7a8f;
}

/* ============================================
   MODALS & POPUPS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #161a24;
    margin: 5% auto;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    border: 1px solid #4f8cf7;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-large {
    max-width: 1200px !important;
    width: 95% !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: #14161e;
    border-bottom: 1px solid #252830;
    border-radius: 20px 20px 0 0;
}

.modal-header h2, .modal-header h3 {
    color: #4f8cf7;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.close {
    color: #6a7a8f;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.25s;
    line-height: 1;
}

.close:hover {
    color: #4f8cf7;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.modal-search {
    margin-bottom: 15px;
}

.modal-search input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #2a2d38;
    background: #1e2028;
    color: #e8edf5;
    font-size: 14px;
}

.modal-field {
    margin-top: 15px;
    text-align: left;
}

.modal-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #a8b8cc;
    font-size: 13px;
}

.modal-field textarea,
.modal-field input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #2a2d38;
    background: #1a1c26;
    color: #e8edf5;
    font-size: 14px;
}

.modal-field textarea:focus,
.modal-field input:focus {
    outline: none;
    border-color: #4f8cf7;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Popup Buttons */
.popup-btn-yes {
    background: #4f8cf7;
    color: white;
    border: none;
    padding: 10px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s;
}

.popup-btn-yes:hover {
    background: #3a7ae8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 140, 247, 0.2);
}

.popup-btn-no {
    background: #2a2d38;
    color: #d0d7e6;
    border: none;
    padding: 10px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s;
}

.popup-btn-no:hover {
    background: #3a3d4a;
    transform: translateY(-2px);
}

/* Renewal Popup */
.renewal-warning-popup {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
}

.renewal-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #4f8cf7;
    color: white;
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.25s;
}

.renewal-now-btn:hover {
    background: #3a7ae8;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(79, 140, 247, 0.3);
}

/* Save/Cancel Buttons */
.save-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s;
}

.save-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.cancel-btn {
    background: #2a2d38;
    color: #d0d7e6;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s;
}

.cancel-btn:hover {
    background: #3a3d4a;
}

@media (max-width: 768px) {
    .modal-large {
        max-width: 95% !important;
        margin: 10% auto !important;
    }
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
}

/* ============================================
   MESSAGES & TOAST
   ============================================ */
.error-message, .success-message {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.error-message {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.success-message {
    background: rgba(79, 140, 247, 0.12);
    color: #4f8cf7;
    border: 1px solid rgba(79, 140, 247, 0.2);
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #6a7a8f;
    font-size: 14px;
}

.empty-state i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 15px;
    display: block;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1e2028;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #28a745;
    color: white;
}

.toast-error {
    background: #dc3545;
    color: white;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #0f0f12;
}

.login-card {
    background: #161a24;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid #4f8cf7;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4f8cf7, #3a7ae8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 30px rgba(79, 140, 247, 0.25);
}

.login-icon i {
    font-size: 36px;
    color: white;
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #e8edf5;
    background: linear-gradient(135deg, #4f8cf7, #7cadee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    font-size: 14px;
    color: #6a7a8f;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6a7a8f;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border-radius: 12px;
    border: 1px solid #2a2d38;
    background: #1a1c26;
    color: #e8edf5;
    font-size: 15px;
    transition: all 0.25s;
}

.input-group input:focus {
    outline: none;
    border-color: #4f8cf7;
    box-shadow: 0 0 0 4px rgba(79, 140, 247, 0.08);
}

.login-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #4f8cf7, #3a7ae8);
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 140, 247, 0.3);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #252830;
    font-size: 12px;
    color: #6a7a8f;
}

.login-footer a {
    color: #6a7a8f;
    text-decoration: none;
}

.login-footer a:hover {
    color: #4f8cf7;
}

/* ============================================
   PAYMENT POPUP
   ============================================ */
.payment-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.96);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.payment-card {
    background: #161a24;
    border-radius: 24px;
    padding: 35px;
    text-align: center;
    max-width: 380px;
    border: 1px solid #4f8cf7;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.payment-card i {
    font-size: 56px;
    color: #4f8cf7;
    margin-bottom: 20px;
}

.payment-card h2 {
    font-size: 22px;
    margin-bottom: 12px;
    color: #e8edf5;
}

.payment-card p {
    color: #8a9bb0;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.6;
}

.payment-btn {
    background: #4f8cf7;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    font-size: 15px;
    transition: all 0.25s;
}

.payment-btn:hover {
    background: #3a7ae8;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(79, 140, 247, 0.25);
}

/* ============================================
   WARRANTY PAGE
   ============================================ */
.days-text {
    font-size: 11px;
    color: #6a7a8f;
    margin-top: 4px;
}

.days-urgent {
    color: #f7b731;
    font-weight: bold;
}

/* ============================================
   PRINT PAGE
   ============================================ */
@media print {
    body {
        background: white;
        padding: 0;
        margin: 0;
    }
    .header, .footer, .back-button, .container > .back-button {
        display: none;
    }
    .container {
        padding: 0;
        margin: 0;
    }
    .ticket {
        width: 100%;
        padding: 3mm;
    }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    .settings-container,
    .dropdown-manager-container,
    .form-container {
        max-width: 100%;
    }
    .settings-card,
    .devices-section,
    .form-card {
        padding: 20px;
    }
    .devices-grid {
        grid-template-columns: 1fr;
    }
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    .device-card-header {
        flex-wrap: wrap;
    }
    .device-card-footer {
        flex-direction: column;
        gap: 10px;
    }
    .view-problems-btn {
        width: 100%;
        justify-content: center;
    }
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        text-align: center;
    }
    .phone-check-group {
        flex-direction: column;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}