:root {
    --primary-color: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, #fff 100%);
    min-height: 100vh;
    color: var(--gray-800);
}

/* Container Styles */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Info Cards */
.info-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.info-card-title {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card-title i {
    color: var(--primary-color);
}

.info-card-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

/* Badges */
.expiry-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.stats-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, var(--warning-color), #D97706);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.location-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.location-tag {
    padding: 0.25rem 0.625rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.location-tag:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-modern {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.btn-primary-modern:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-secondary-modern {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-secondary-modern:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    transform: translateY(-2px);
    color: var(--gray-700);
}

.btn-warning-modern {
    background: linear-gradient(135deg, #F97316, #EA580C);
    color: white;
}

.btn-warning-modern:hover {
    background: linear-gradient(135deg, #EA580C, #C2410C);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Calendar Styles */
.calendar-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    overflow-x: auto;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

.calendar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-title i {
    color: var(--primary-color);
}

.legend-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.legend-sample {
    width: 20px;
    height: 20px;
    border: 2px dashed var(--danger-color);
    border-radius: 4px;
    position: relative;
}

.modern-calendar {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.modern-calendar thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.modern-calendar thead th {
    color: white;
    font-weight: 600;
    padding: 0.75rem;
    text-align: center;
    border: none;
    font-size: 0.9rem;
}

.modern-calendar tbody td {
    padding: 0;
    border: 1px solid var(--gray-100);
    background: white;
    vertical-align: top;
    transition: all 0.2s ease;
}

.modern-calendar tbody td:hover:not(.past-date) {
    background: var(--gray-50);
}

.calendar-cell {
    padding: 0.5rem;
    min-height: auto;
    display: flex;
    flex-direction: column;
}

.calendar-date {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
    font-size: 0.85rem;
}

.past-date {
    background: var(--gray-50) !important;
    opacity: 0.6;
}

.past-date .calendar-date {
    color: var(--gray-400);
}

.shifts-container {
    flex: 1;
    margin-bottom: 0.375rem;
}

/* Shift Cards */
.shift-card {
    padding: 0.375rem 0.5rem;
    background: linear-gradient(135deg, var(--gray-50), white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.shift-card:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow);
}

.shift-card strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.125rem;
    font-size: 0.75rem;
}

.shift-time {
    color: var(--gray-600);
    font-size: 0.7rem;
}

.shift-card.extended-midnight {
    border: 2px dashed var(--danger-color);
    background: linear-gradient(135deg, #FEF2F2, white);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.extended-shift-info {
    font-size: 0.65rem;
    color: var(--danger-color);
    margin-top: 0.125rem;
    font-style: italic;
}

.specific-location-badge {
    display: inline-block;
    padding: 0.125rem 0.25rem;
    background: var(--primary-light);
    color: white;
    border-radius: 4px;
    font-size: 0.65rem;
    margin-left: 0.25rem;
}

.cell-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: auto;
}

.btn-cell {
    flex: 1;
    padding: 0.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cell-edit {
    background: var(--primary-color);
    color: white;
}

.btn-cell-edit:hover {
    background: var(--primary-dark);
}

.btn-cell-rest {
    background: var(--danger-color);
    color: white;
}

.btn-cell-rest:hover {
    background: #DC2626;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 1.25rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.125rem;
}

.modal-header .btn-close {
    color: white;
    opacity: 0.8;
}

.modal-body {
    padding: 1.5rem;
    background: var(--gray-50);
}

.modal-footer {
    border: none;
    padding: 1.25rem;
    background: white;
}

/* Form Styles */
.form-section {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--gray-200);
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid var(--gray-100);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
    font-size: 0.8rem;
}

.form-control, .form-select {
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--gray-300);
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Shift Config Styles */
.shift-config-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.875rem;
    transition: all 0.2s ease;
}

.shift-config-card:hover {
    box-shadow: var(--shadow);
}

.shift-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.875rem;
}

.shift-config-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.75rem;
}

.btn-remove-config {
    padding: 0.25rem 0.625rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-config:hover {
    background: #DC2626;
}

/* Alert Styles */
.alert-modern {
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success-modern {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    color: #065F46;
}

.alert-danger-modern {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    color: #991B1B;
}

/* Location Usage Styles */
.location-option-disable {
    background: var(--gray-100) !important;
    color: var(--gray-400) !important;
    text-decoration: line-through;
}

.location-usage-info {
    font-size: 0.7rem;
    margin-left: 0.375rem;
    color: var(--gray-500);
}

.location-usage-limit {
    color: var(--danger-color);
}

.location-currently-selected {
    color: var(--secondary-color);
}

.location-usage-warning {
    color: #fd7e14;
    font-weight: bold;
}

.location-usage-high {
    color: #dc3545;
    font-weight: bold;
}

.location-option-over-limit {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* Warning Modal Styles */
.warning-modal .modal-content {
    border: 2px solid var(--warning-color);
}

.warning-modal .modal-header {
    background: linear-gradient(135deg, var(--warning-color), #D97706);
    color: white;
}

.warning-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background: #FEF3C7;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
    margin-bottom: 1rem;
}

.warning-periods {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    margin-bottom: 1rem;
}

.warning-period-item {
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Admin Specific Styles */
.disabled-account {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.disabled-account .email {
    text-decoration: line-through;
    color: #6c757d;
}

.watch-config {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.875rem;
    transition: all 0.2s ease;
}

.watch-config:hover {
    box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
/* === Admin Page Dark Mode === */
.email-check-ok { color: #3fb950 !important; }
.email-check-warn { color: #f85149 !important; }

.stats-card { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important; }

.filter-section { background: #161b22 !important; border: 1px solid #30363d !important; }

.accounts-table-wrapper { background: #0d1117 !important; }
.accounts-table { background: #0d1117 !important; }
.accounts-table tbody tr { background: #0d1117 !important; color: #c9d1d9 !important; }
.accounts-table tbody tr:hover { background-color: #21262d !important; }
.accounts-table thead th { background: #161b22 !important; color: #c9d1d9 !important; box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.6) !important; }
.accounts-table td { border-color: #30363d !important; color: #c9d1d9 !important; }
.accounts-table td a { color: #58a6ff !important; }

.section-toggle:hover { background-color: #21262d !important; }

.card { background: #161b22 !important; border-color: #30363d !important; color: #c9d1d9 !important; }
.card-header { background: #21262d !important; border-color: #30363d !important; color: #c9d1d9 !important; }
.card-header h4 { color: #c9d1d9 !important; }
.card-header h4 small { color: #8b949e !important; }
.card-body { background: #161b22 !important; color: #c9d1d9 !important; }
.card-body h5 { color: #c9d1d9 !important; }

.watch-config { background: #21262d !important; border-color: #30363d !important; color: #c9d1d9 !important; }
.watch-config h6 { color: #c9d1d9 !important; }

.location-checkbox-item { border-color: #30363d !important; color: #c9d1d9 !important; }
.location-checkbox-item:hover { background-color: #21262d !important; }
.location-checkbox-item label { color: #c9d1d9 !important; }
.location-search-box { background: #161b22 !important; }
.location-search-box input { background: #0d1117 !important; color: #c9d1d9 !important; border-color: #30363d !important; }

.location-usage-full { color: #f85149 !important; }
.location-usage-warning { color: #d29922 !important; }
.location-usage-ok { color: #3fb950 !important; }

.pricing-cell .price-weekly { color: #58a6ff !important; }
.pricing-cell .price-monthly { color: #3fb950 !important; }
.pricing-cell .price-restriction { color: #f85149 !important; }

.compact-form .form-control,
.compact-form .form-select { background: #0d1117 !important; color: #c9d1d9 !important; border-color: #30363d !important; }

.disabled-account { background-color: #0d1117 !important; opacity: 0.6; }
.disabled-account .email { color: #484f58 !important; }

.pagination .page-link { background: #21262d !important; color: #c9d1d9 !important; border-color: #30363d !important; }
.pagination .page-link:hover { background: #30363d !important; color: #ffffff !important; }
.pagination .page-item.active .page-link { background: #1f6feb !important; border-color: #1f6feb !important; color: #ffffff !important; }
.pagination .page-item.disabled .page-link { background: #161b22 !important; color: #484f58 !important; border-color: #30363d !important; }

#editLocationsModal .modal-body { background: #161b22 !important; }
#editLocationsModal .text-muted { color: #8b949e !important; }
#editLocationsModal #location_checkboxes_container { border-color: #30363d !important; background: #0d1117 !important; }

.container-fluid { color: #c9d1d9 !important; }

.app-toggle-btn.bg-success { background-color: #238636 !important; }
.app-toggle-btn.bg-secondary { background-color: #30363d !important; color: #8b949e !important; }
.app-toggle-btn.bg-warning { background-color: #9e6a03 !important; }

.edit-locations-btn { color: #c9d1d9 !important; border-color: #484f58 !important; }
.edit-locations-btn:hover { background: #30363d !important; color: #ffffff !important; }

.selected-count-badge { background-color: #1f6feb !important; }

.location-option-over-limit { background-color: #2d1117 !important; color: #f85149 !important; }
}

/* Multi-select highlight: keep selected options clearly visible even when the <select> is blurred.
   Works in Chrome / Edge / Firefox on desktop. (Safari ignores option background-color.) */
select.ms-highlight-multiselect option:checked,
select.ms-highlight-multiselect option:checked:focus,
select.ms-highlight-multiselect option:checked:hover {
    background-color: #0d6efd !important;
    background-image: linear-gradient(0deg, #0d6efd 0%, #0a58ca 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: inset 4px 0 0 0 #ffc107;
}

select.ms-highlight-multiselect:focus option:checked {
    background-color: #0a58ca !important;
    background-image: linear-gradient(0deg, #0a58ca 0%, #084298 100%) !important;
    box-shadow: inset 4px 0 0 0 #ffc107, inset 0 0 0 2px rgba(255,255,255,0.3);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-container {
        padding: 0.75rem;
    }
    
    .info-cards-row {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .modern-calendar {
        font-size: 0.7rem;
    }
    
    .calendar-cell {
        min-height: auto;
        padding: 0.375rem;
    }
    
    .shift-card {
        font-size: 0.65rem;
        padding: 0.25rem 0.375rem;
    }
    
    .btn-cell {
        font-size: 0.65rem;
        padding: 0.2rem;
    }
    
    .btn-modern {
        width: 100%;
        justify-content: center;
        margin: 0.25rem 0;
    }
}

/* Error Page Styles */
.error-container {
    max-width: 600px;
    width: 100%;
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    text-align: center;
}

.error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1.5rem;
}

.error-icon.expired {
    background: linear-gradient(135deg, var(--warning-color), #D97706);
}

.error-icon.disable {
    background: linear-gradient(135deg, var(--danger-color), #DC2626);
}

.error-icon.password-error {
    background: linear-gradient(135deg, #F97316, #EA580C);
}

.error-icon.not-found {
    background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
}

.error-icon.system {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.error-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.error-details {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.ban-info {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--warning-color);
    text-align: left;
}

.ban-info-item {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.ban-info-item:last-child {
    margin-bottom: 0;
}

.password-form {
    background: linear-gradient(135deg, #EBF8FF, #DBEAFE);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #BFDBFE;
}

.password-form .form-label {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
    display: block;
    text-align: left;
}

.password-form .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.password-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.contact-info {
    background: linear-gradient(135deg, #EBF8FF, #DBEAFE);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid #BFDBFE;
}

.contact-info h6 {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.contact-link:hover {
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.expired-date {
    font-weight: 600;
    color: var(--danger-color);
}

.success-message {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    color: #065F46;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #10B981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-alert {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    color: #991B1B;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--danger-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Cancel Control Panel Styles */
.cancel-panel-section {
    margin-top: 0.5rem;
}

.cancel-panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cancel-panel-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cancel-panel-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.cancel-panel-label i {
    color: #667eea;
}

.cancel-panel-status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-cancel-panel {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.25);
}

.btn-cancel-panel:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
}

.btn-cancel-panel:active {
    transform: translateY(-1px);
}

/* Cancel Panel Confirmation Modal */
.cancel-panel-modal-content {
    border: 2px solid #dc3545;
    border-radius: 16px;
    overflow: hidden;
}

.cancel-panel-modal-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.cancel-panel-modal-header .modal-title {
    font-weight: 700;
    font-size: 1.15rem;
}

.cancel-panel-modal-icon {
    text-align: center;
    margin-bottom: 1.25rem;
}

.cancel-panel-modal-icon i {
    font-size: 3.5rem;
    color: #dc3545;
    opacity: 0.8;
}

.cancel-panel-modal-message {
    text-align: center;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: 1.25rem;
    padding: 0 1rem;
}

.cancel-panel-modal-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fef9e7 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    text-align: center;
    color: #856404;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.cancel-panel-modal-warning i {
    color: #e67e00;
}

.btn-cancel-panel-confirm {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
}

.btn-cancel-panel-confirm:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.btn-cancel-panel-confirm:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cancel-panel-modal-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
}

.cancel-panel-status-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cancel-panel-status-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 576px) {
    .cancel-panel-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-cancel-panel {
        width: 100%;
        justify-content: center;
    }
}

/* ================================================
   Error Page Extended Styles
   ================================================ */

.delayed-extension-info {
    background: linear-gradient(135deg, #fff3cd 0%, #fef9e7 100%);
    border: 1px solid #f0ad4e;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.delayed-extension-info .delayed-extension-icon {
    text-align: center;
    margin-bottom: 1rem;
}

.delayed-extension-info .delayed-extension-icon i {
    font-size: 2.5rem;
    color: #f0ad4e;
    animation: pulse-scale 2s infinite;
}

@keyframes pulse-scale {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.delayed-extension-info .delayed-extension-title {
    color: #856404;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.1rem;
}

.delayed-extension-info .delayed-extension-message {
    color: #856404;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.delayed-extension-info .delayed-extension-details {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 1rem;
}

.delayed-extension-info .detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #6c5014;
    font-size: 0.9rem;
}

.delayed-extension-info .detail-item:last-child {
    margin-bottom: 0;
}

.delayed-extension-info .detail-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
    color: #f0ad4e;
}

/* Expired edit section */
.expired-edit-section {
    background: linear-gradient(135deg, #fff3e0 0%, #fef9e7 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.expired-edit-header {
    background: linear-gradient(135deg, #ff9800 0%, #ffa726 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
}

.expired-edit-body {
    padding: 1.25rem;
}

.expired-edit-group {
    margin-bottom: 1.25rem;
}

.expired-edit-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.expired-edit-label i {
    color: #ff9800;
    margin-right: 0.4rem;
}

.expired-locations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.expired-locations-summary {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.expired-locations-current {
    font-size: 0.95rem;
    color: #212529;
    word-break: break-word;
    line-height: 1.5;
}

.expired-location-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
}

.expired-location-item:hover {
    border-color: #ff9800;
}

.expired-location-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
    font-size: 0.9rem;
}

.expired-location-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.expired-app-toggle {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem;
}

.expired-app-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
    font-size: 0.9rem;
}

.expired-app-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.expired-edit-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #ffcc02;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #e65100;
    line-height: 1.4;
}

.expired-edit-warning i {
    color: #ff9800;
    margin-right: 0.3rem;
}

.expired-edit-actions {
    margin-top: 1rem;
    text-align: center;
}

.expired-save-status {
    text-align: center;
    margin-top: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.expired-save-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.expired-save-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Expired Payment Flow Styles */
.expired-payment-flow {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.ep-section-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ep-section-body {
    padding: 1.25rem;
    background: white;
}

.ep-period-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ep-period-btn {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 160px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.ep-period-btn:hover {
    border-color: #28a745;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.ep-period-btn-highlight {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

.ep-period-label {
    font-size: 1rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 0.25rem;
}

.ep-period-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #28a745;
}

.ep-period-days {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.15rem;
}

.ep-reason-text {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #dc3545;
}

.ep-reason-text i {
    margin-right: 0.3rem;
}

.ep-selected-badges {
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ep-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.ep-badge-green {
    background: #28a745;
}

.ep-badge-blue {
    background: #007bff;
}

.ep-badge-info {
    background: #17a2b8;
}

.ep-method-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.ep-method-btn {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.ep-method-btn:hover {
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ep-method-icon {
    font-size: 1.5rem;
}

.ep-method-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #343a40;
}

.ep-method-btn:hover .ep-method-name {
    color: #007bff;
}

.ep-back-link {
    text-align: center;
    margin-top: 1rem;
}

.ep-back-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    transition: color 0.2s;
}

.ep-back-btn:hover {
    color: #343a40;
}

.ep-back-btn i {
    margin-right: 0.3rem;
}

.ep-payment-info {
    text-align: center;
    margin-bottom: 1rem;
}

.ep-payment-info img {
    max-width: 260px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ep-payment-info .ep-fps-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #90caf9;
    border-radius: 12px;
    padding: 1.25rem;
    display: inline-block;
}

.ep-payment-info .ep-fps-id {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1565c0;
    letter-spacing: 2px;
    cursor: pointer;
}

.ep-payment-info .ep-amount-display {
    margin-top: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    color: #343a40;
}

.ep-upload-title {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.ep-upload-title i {
    color: #28a745;
    margin-right: 0.4rem;
}

.ep-upload-desc {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.ep-file-input {
    margin-bottom: 0.75rem;
}

.ep-file-input small {
    display: block;
    margin-top: 0.3rem;
}

.ep-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 480px) {
    .ep-period-buttons {
        flex-direction: column;
        align-items: center;
    }
    .ep-period-btn {
        width: 100%;
        max-width: 220px;
    }
    .ep-method-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .ep-method-btn {
        padding: 0.75rem 0.5rem;
    }
    .ep-method-icon {
        font-size: 1.25rem;
    }
    .ep-method-name {
        font-size: 0.8rem;
    }
    .ep-action-row {
        flex-direction: column;
    }
}

/* ================================================
   Main Page Layout
   ================================================ */

.page-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
    overflow-x: hidden;
    width: 100%;
}

.page-container {
    max-width: 1600px;
    width: 100%;
    overflow-x: hidden;
}

.top-info-section {
    margin-bottom: 1.5rem;
    width: 100%;
}

.info-cards-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 0;
}

.expiry-date-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.renewal-button-container {
    flex-shrink: 0;
}

.btn-renewal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
    cursor: pointer;
}

.btn-renewal:hover {
    background: linear-gradient(135deg, #218838 0%, #1fa188 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-renewal:active {
    transform: translateY(0);
}

.btn-renewal i {
    font-size: 0.9rem;
}

/* [2026-12-05] Plan upgrade / downgrade button in the expiry card */
.btn-renewal.btn-plan-change {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
    margin-top: 0.35rem;
}

.btn-renewal.btn-plan-change:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #520dc2 100%);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.plan-change-card {
    transition: all 0.25s ease;
    background: #fff;
}

.plan-change-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* [2026-12-05] Plan-change payment method buttons — match the renewal (.rp-) style */
#planChangeModal .pc-method-btn {
    border-radius: 12px;
    transition: all 0.3s ease;
    border-width: 2px;
}

#planChangeModal .pc-method-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    border-color: #007bff;
    color: #007bff;
}

#planChangeModal .pc-method-btn.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.35);
}

#planChangeModal .pc-method-btn.active:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
    color: #ffffff;
    transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
    #planChangeModal .pc-method-btn {
        background: #21262d !important;
        color: #c9d1d9 !important;
        border-color: #484f58 !important;
    }

    #planChangeModal .pc-method-btn:hover {
        border-color: #58a6ff !important;
        color: #58a6ff !important;
        background: #161b22 !important;
    }

    #planChangeModal .pc-method-btn.active,
    #planChangeModal .pc-method-btn.active:hover {
        background: #1f6feb !important;
        border-color: #1f6feb !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(31, 111, 235, 0.4);
    }
}

/* ========== [2026-12-05] Plan Change Modal — light / dark tokens ========== */
#planChangeModal {
    --pc-cur-bg:          #e7f1ff;
    --pc-cur-border:      #b6d4fe;
    --pc-cur-label:       #084298;
    --pc-cur-text:        #084298;
    --pc-summary-bg:      #f8f9fa;
    --pc-note-up-bg:      #d1e7dd;
    --pc-note-up-text:    #0a3622;
    --pc-note-down-bg:    #fff3cd;
    --pc-note-down-text:  #842029;
    --pc-card-title:      #212529;
    --pc-muted:           #6c757d;
    --pc-muted-strong:    #495057;
    --pc-divider:         #dee2e6;
    --pc-danger:          #dc3545;
    --pc-danger-text:     #dc3545;
    --pc-card-bg:         #ffffff;
}

#planChangeModal .modal-content {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-divider);
}

#planChangeModal .modal-header,
#planChangeModal .modal-footer {
    border-color: var(--pc-divider);
}

#planChangeModal .plan-change-card {
    background: var(--pc-card-bg);
}

@media (prefers-color-scheme: dark) {
    #planChangeModal {
        --pc-cur-bg:          #16283d;
        --pc-cur-border:      #2d5b8a;
        --pc-cur-label:       #79b8ff;
        --pc-cur-text:        #9ecbff;
        --pc-summary-bg:      #161b22;
        --pc-note-up-bg:      #0f2e1e;
        --pc-note-up-text:    #7ee2a8;
        --pc-note-down-bg:    #3a2a10;
        --pc-note-down-text:  #ffd07a;
        --pc-card-title:      #e6edf3;
        --pc-muted:           #8b949e;
        --pc-muted-strong:    #adbac7;
        --pc-divider:         #30363d;
        --pc-danger:          #f85149;
        --pc-danger-text:     #ff7b72;
        --pc-card-bg:         #161b22;
    }

    #planChangeModal .modal-content {
        background: #0d1117;
        color: #c9d1d9;
    }

    #planChangeModal .modal-header,
    #planChangeModal .modal-footer {
        border-color: #30363d;
    }

    #planChangeModal .btn-close {
        filter: invert(1) grayscale(100%) brightness(180%);
    }

    #planChangeModal .plan-change-card {
        background: #161b22;
    }

    #planChangeModal input[type="file"].form-control,
    #planChangeModal input[type="datetime-local"].form-control {
        background: #0d1117;
        border-color: #30363d;
        color: #c9d1d9;
    }

    #planChangeModal input[type="file"].form-control::file-selector-button {
        background: #21262d;
        color: #c9d1d9;
        border-color: #30363d;
    }

    #planChangeModal .form-label,
    #planChangeModal .form-text,
    #planChangeModal .form-text small {
        color: #8b949e;
    }

    /* Payment method buttons keep enough contrast on dark */
    #planChangeModal .pc-method-btn.btn-outline-primary {
        color: #79b8ff;
        border-color: #2d5b8a;
    }

    #planChangeModal .pc-method-btn.btn-outline-primary:hover,
    #planChangeModal .pc-method-btn.btn-primary {
        background: #1f6feb;
        border-color: #1f6feb;
        color: #ffffff;
    }

    #planChangeModal .btn-link.text-muted {
        color: #8b949e !important;
    }

    #planChangeModal .alert-success {
        background: #0f2e1e;
        border-color: #1a7f37;
        color: #7ee2a8;
    }

    #planChangeModal .alert-danger {
        background: #3d1418;
        border-color: #f85149;
        color: #ffb3ad;
    }

    #planChangeModal hr {
        border-color: #30363d;
        opacity: 1;
    }
}


.renewal-price-display {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}

.renewal-price-item {
    font-size: 0.7rem;
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
}

.renewal-price-monthly {
    color: #155724;
    background: #d4edda;
}

/* Stats grid */
.stats-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0.5rem 0.25rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stats-item-week {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.stats-item-month {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.stats-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stats-item-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.15rem;
}

.stats-item-header i {
    font-size: 0.75rem;
}

.stats-item-week .stats-item-header i {
    color: #1976d2;
}

.stats-item-month .stats-item-header i {
    color: #388e3c;
}

.stats-item-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stats-item-week .stats-item-number {
    color: #1565c0;
}

.stats-item-month .stats-item-number {
    color: #2e7d32;
}

.stats-item-label {
    font-size: 0.65rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-divider {
    width: 1px;
    height: 2.5rem;
    background: linear-gradient(180deg, transparent, #dee2e6, transparent);
    flex-shrink: 0;
}

/* Expiry warning */
.expiry-warning {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%) !important;
    color: white !important;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Main Content Layout */
.main-content-section {
    display: flex;
    gap: 1.5rem;
}

.main-content {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Sidebar */
.sidebar-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header i {
    font-size: 1.25rem;
}

.sidebar-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.sidebar-content {
    padding: 0.875rem;
    overflow-y: auto;
    flex: 1;
}

/* Settings Analysis */
.analysis-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.score-circle.score-excellent {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.score-circle.score-good {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.score-circle.score-average {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.score-circle.score-poor {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.score-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.analysis-toggle {
    text-align: center;
    margin-bottom: 1rem;
}

.btn-toggle-details {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle-details:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #343a40;
    transform: translateY(-1px);
}

.btn-toggle-details i {
    transition: transform 0.2s ease;
}

.btn-toggle-details.expanded i {
    transform: rotate(180deg);
}

.analysis-details-container {
    overflow: hidden;
    transition: all 0.3s ease;
}

.analysis-details {
    margin-bottom: 1rem;
}

.analysis-item {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.analysis-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.analysis-item:last-child {
    margin-bottom: 0;
}

.analysis-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.analysis-category {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
}

.analysis-item .analysis-score {
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: white;
    display: inline-block;
    margin: 0;
    background: none;
}

.analysis-item .analysis-score.score-perfect {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.analysis-item .analysis-score.score-partial {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.analysis-item .analysis-score.score-zero {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

.analysis-item-details {
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.4;
}

.improvement-suggestions {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.suggestions-title {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestions-title i {
    color: #ffc107;
}

.suggestions-list {
    margin: 0;
    padding-left: 1.2rem;
    color: #495057;
}

.suggestions-list li {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.suggestions-list li:last-child {
    margin-bottom: 0;
}

/* History */
.history-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 0.65rem 0;
    margin-bottom: 0.65rem;
}

.history-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.history-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.history-time i {
    color: #28a745;
}

.history-details {
    margin-left: 1.2rem;
}

.history-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.history-date i {
    color: #007bff;
}

.history-shift {
    margin-bottom: 0.4rem;
}

.history-shift:last-child {
    margin-bottom: 0;
}

.shift-time-range {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #495057;
    margin-bottom: 0.2rem;
}

.shift-time-range i {
    color: #ffc107;
    font-size: 0.75rem;
}

.shift-status {
    margin-left: 1rem;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
    background-color: #f8f9fa;
    color: #495057;
}

.status-badge.exchange {
    background-color: #e3f2fd;
    color: #1565c0;
}

.status-badge.regular {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.empty-history {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #6c757d;
}

.empty-history i {
    font-size: 2rem;
    color: #dee2e6;
    margin-bottom: 0.75rem;
    display: block;
}

.empty-history p {
    margin: 0;
    font-size: 0.85rem;
}

/* Delayed extension banner (main page) */
.delayed-extension-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #fef9e7 100%);
    border: 2px solid #f0ad4e;
    border-radius: 12px;
    margin: 1.5rem 0;
    padding: 0;
    box-shadow: 0 4px 12px rgba(240, 173, 78, 0.2);
    overflow: hidden;
}

.delayed-extension-banner .delayed-extension-content {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1.5rem;
}

.delayed-extension-banner .delayed-extension-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: #f0ad4e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(240, 173, 78, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(240, 173, 78, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(240, 173, 78, 0); }
}

.delayed-extension-banner .delayed-extension-text {
    flex: 1;
}

.delayed-extension-banner .delayed-extension-title {
    color: #856404;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.delayed-extension-banner .delayed-extension-message {
    color: #6c5014;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.4;
}

.delayed-extension-banner .delayed-extension-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.delayed-extension-banner .detail-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: #6c5014;
    font-size: 0.85rem;
    white-space: nowrap;
}

.delayed-extension-banner .detail-item i {
    margin-right: 0.5rem;
    color: #f0ad4e;
    width: 16px;
    text-align: center;
}

/* Calendar header overrides */
.modern-calendar thead th {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%) !important;
    color: #ffffff !important;
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.calendar-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calendar-header-right {
    flex-shrink: 0;
}

.calendar-title {
    color: var(--gray-800);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-title i {
    color: var(--primary-color);
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.legend-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #495057;
    user-select: none;
    white-space: nowrap;
}

.legend-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Location Tabs */
.location-tabs {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #dee2e6;
}

.location-tabs .nav-link {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 0;
}

.location-tabs .nav-link:hover {
    background: rgba(0, 123, 255, 0.05);
    color: #007bff;
    border-bottom-color: rgba(0, 123, 255, 0.3);
}

.location-tabs .nav-link.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-bottom-color: #007bff;
}

.location-tabs .nav-link i {
    margin-right: 0.5rem;
}

.location-tab-content {
    margin-top: 1rem;
}

/* Schedule table */
.schedule-info {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.matched-shift-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.matched-shift-indicator {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #fd7e14 0%, #ff9500 100%);
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #e67e00;
}

.schedule-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.schedule-table {
    margin: 0;
    width: 100%;
    min-width: 700px;
    background: white;
}

.schedule-day-header {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    color: white;
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    white-space: nowrap;
}

.schedule-day-cell {
    padding: 0.75rem 0.5rem;
    vertical-align: top;
    border: 1px solid #dee2e6;
    width: 14.28%;
    max-width: 150px;
    position: relative;
}

.day-shifts {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.shift-time-item {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1565c0;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
}

.shift-time-item:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #e1bee7 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.2);
}

.shift-time-item.matched-shift {
    background: linear-gradient(135deg, #fd7e14 0%, #ff9500 100%);
    border-color: #e67e00;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(253, 126, 20, 0.3);
}

.shift-time-item.matched-shift:hover {
    background: linear-gradient(135deg, #e67e00 0%, #cc6d00 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(253, 126, 20, 0.4);
}

.matched-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    color: #fff;
    background: #28a745;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid white;
}

.no-shifts {
    text-align: center;
    padding: 1rem 0.5rem;
}

.no-shifts .text-muted {
    font-size: 0.85rem;
    font-style: italic;
}

/* btn-info-modern */
.btn-info-modern {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-info-modern:hover {
    background: linear-gradient(135deg, #138496 0%, #1fa188 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.btn-info-modern:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.2);
}

/* Expiry reminder modal */
.expiry-reminder-modal {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.expiry-reminder-modal .modal-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa726 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
    padding: 1.5rem;
}

.expiry-reminder-content {
    padding: 1rem;
    text-align: center;
}

.reminder-icon {
    margin-bottom: 1.5rem;
}

.reminder-icon i {
    font-size: 4rem;
    color: #ff6b6b;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.reminder-message h6 {
    color: #2c3e50;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.reminder-text {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.renewal-info-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
}

.renewal-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.renewal-info-header i {
    color: #007bff;
    font-size: 1.25rem;
}

.renewal-info-header h6 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.renewal-info-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: white;
    border-left: 4px solid #28a745;
}

.info-item.warning-item {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.info-item.urgent-item {
    border-left-color: #dc3545;
    background: #fdf2f2;
}

.info-item i {
    color: #28a745;
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.info-item.warning-item i {
    color: #ffc107;
}

.info-item.urgent-item i {
    color: #dc3545;
}

.info-item span {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Q&A Section */
.qna-section {
    margin-top: 3rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e3e6ea;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.qna-header {
    margin-bottom: 2rem;
    text-align: center;
}

.qna-title {
    color: #343a40;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.qna-title i {
    color: #007bff;
    font-size: 1.5rem;
}

.qna-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.qna-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.qna-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.qna-question {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qna-question i {
    font-size: 1.25rem;
    color: #ffc107;
    flex-shrink: 0;
}

.qna-answer {
    padding: 1.5rem;
}

.qna-answer p {
    color: #495057;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
}

.qna-example {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.qna-example-title {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qna-example-title i {
    color: #ffc107;
}

.qna-example-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.example-period {
    background: white;
    border: 2px solid #2196f3;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 140px;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.1);
}

.period-name {
    color: #1976d2;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.period-time {
    color: #495057;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
}

.qna-note {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 0.75rem;
    color: #856404;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.qna-note i {
    color: #ffc107;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* Telegram verification */
.telegram-setup-steps {
    padding: 1rem 0;
}

.telegram-steps-list {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.telegram-steps-list li {
    margin-bottom: 0.5rem;
    color: #495057;
}

.verification-code-container {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.verification-code-display {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: bold;
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    border: 2px dashed #2196f3;
    color: #1976d2;
}

.chat-id-status-container {
    margin-top: 1.5rem;
}

.chat-id-status {
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 1rem;
}

.chat-id-status.checking {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.chat-id-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.chat-id-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.telegram-chat-id-container {
    position: relative;
}

/* Control Panel button styles */
.btn-control-panel-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
    cursor: pointer;
}

.btn-control-panel-open:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4199 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-control-panel-open:active {
    transform: translateY(-1px);
}

.btn-control-panel-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-control-panel-info:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-control-panel-info:active {
    transform: translateY(-1px);
}

/* Control Panel Modal */
.cp-modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.cp-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 0;
    padding: 1.75rem 1.5rem;
    position: relative;
}

.cp-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #667eea, #764ba2);
}

.cp-modal-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cp-modal-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.cp-modal-header .modal-title {
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0;
}

.cp-modal-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

.cp-modal-body {
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
}

.cp-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.cp-feature-card {
    background: white;
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cp-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #c5cae9;
}

.cp-feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: white;
}

.cp-icon-location {
    background: linear-gradient(135deg, #2196F3 0%, #00BCD4 100%);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.cp-icon-redispatch {
    background: linear-gradient(135deg, #FF9800 0%, #F44336 100%);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.cp-icon-auto {
    background: linear-gradient(135deg, #4CAF50 0%, #009688 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.cp-icon-reveal {
    background: linear-gradient(135deg, #9C27B0 0%, #673AB7 100%);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.cp-feature-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.cp-feature-desc {
    color: #5f6b7a;
    font-size: 0.85rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    flex: 1;
}

.cp-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.cp-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cp-tag i { font-size: 0.7rem; }
.cp-tag-blue { background: #e3f2fd; color: #1565c0; }
.cp-tag-green { background: #e8f5e9; color: #2e7d32; }
.cp-tag-orange { background: #fff3e0; color: #e65100; }
.cp-tag-purple { background: #f3e5f5; color: #7b1fa2; }
.cp-tag-teal { background: #e0f2f1; color: #00695c; }
.cp-tag-red { background: #fce4ec; color: #c62828; }

.cp-cta-section {
    background: linear-gradient(135deg, #f5f7ff 0%, #ede7f6 100%);
    border: 2px solid #d1c4e9;
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: center;
}

.cp-cta-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    animation: cp-pulse 2s ease-in-out infinite;
}

@keyframes cp-pulse {
    0% { transform: scale(1); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35); }
    50% { transform: scale(1.06); box-shadow: 0 8px 28px rgba(102, 126, 234, 0.5); }
    100% { transform: scale(1); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35); }
}

.cp-cta-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.cp-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* CP Pricing */
.cp-pricing-section { margin-bottom: 1.5rem; }

.cp-pricing-card {
    background: white;
    border: 2px solid #d1c4e9;
    border-radius: 12px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
}

.cp-pricing-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cp-pricing-header i { font-size: 1rem; }

.cp-pricing-body { padding: 1.25rem; }

.cp-pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
}

.cp-pricing-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
}

.cp-pricing-label i {
    color: #667eea;
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
}

.cp-pricing-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
}

.cp-pricing-unit {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
}

.cp-pricing-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #d1c4e9, transparent);
    margin: 0.5rem 0;
}

.cp-pricing-highlight {
    background: linear-gradient(135deg, #f5f0ff 0%, #ede7f6 100%);
    border-radius: 8px;
    padding: 0.75rem 0.75rem !important;
    margin: 0.25rem -0.25rem;
}

.cp-pricing-value-highlight {
    font-size: 1.4rem;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cp-pricing-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    font-size: 0.78rem;
    color: #6c757d;
    line-height: 1.4;
}

.cp-pricing-note i {
    color: #667eea;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.cp-modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    justify-content: center;
}

.cp-pay-method-btn {
    transition: all 0.3s ease;
}

.cp-pay-method-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    border-color: #667eea !important;
    color: #667eea !important;
}

/* Renewal Payment Modal */
.rp-period-btn {
    border-radius: 12px;
    transition: all 0.3s ease;
    border-width: 2px;
}

.rp-period-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.rp-method-btn {
    border-radius: 12px;
    transition: all 0.3s ease;
    border-width: 2px;
}

.rp-method-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    border-color: #007bff;
    color: #007bff;
}

.rp-payment-qr {
    max-width: 280px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rp-fps-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #90caf9;
    border-radius: 12px;
    padding: 1.5rem;
    display: inline-block;
}

/* Daily Score Badge */
.daily-score-badge {
    display: none;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    margin-left: 0.25rem;
    vertical-align: middle;
    line-height: 1;
    letter-spacing: 0.3px;
}

.show-daily-scores .daily-score-badge {
    display: inline-block;
}

.daily-score-badge.ds-excellent {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.daily-score-badge.ds-good {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
    color: white;
}

.daily-score-badge.ds-average {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #333;
}

.daily-score-badge.ds-poor {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
}

.daily-score-badge.ds-zero {
    background: #6c757d;
    color: white;
}

/* ================================================
   Responsive Overrides
   ================================================ */

@media (max-width: 1200px) {
	.main-content-section { flex-direction: column; }
	.sidebar { width: 100%; order: -1; flex-direction: row; gap: 1rem; }
	.sidebar-card { flex: 1; min-height: 300px; }
	.sidebar-content { max-height: 250px; }
	.info-cards-row { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .calendar-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .calendar-header-right { width: 100%; }
    .action-buttons { width: 100%; justify-content: flex-start; }
    .qna-example-periods { justify-content: center; }
}

@media (max-width: 768px) {
	.page-wrapper { padding: 0.5rem; }
	.top-info-section { margin-bottom: 1rem; }
	.info-cards-row { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .expiry-date-container { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .delayed-extension-banner .delayed-extension-content { flex-direction: column; text-align: center; gap: 1rem; }
    .delayed-extension-banner .delayed-extension-details { justify-content: center; flex-direction: column; gap: 0.5rem; }
    .delayed-extension-banner .detail-item { justify-content: center; }
    .verification-code-display { font-size: 1.2rem; }
    .main-content-section { gap: 1rem; overflow-x: hidden; }
    .calendar-section { padding: 0.75rem; border-radius: 12px; }
    .sidebar { flex-direction: column; }
    .sidebar-card { min-height: 200px; }
    .sidebar-content { max-height: 150px; }
    .action-buttons { flex-direction: column; gap: 0.5rem; }
    .action-buttons button, .action-buttons form { width: 100%; }
    .action-buttons form button { width: 100%; }
    .qna-section { margin-top: 2rem; padding: 1.5rem; }
    .qna-title { font-size: 1.5rem; }
    .qna-question { padding: 1rem; font-size: 1rem; }
    .qna-answer { padding: 1rem; }
    .qna-example-periods { flex-direction: column; align-items: center; }
    .example-period { width: 100%; max-width: 200px; }
    .renewal-info-content { gap: 0.75rem; }
    .info-item { padding: 0.5rem; font-size: 0.8rem; }
    .reminder-message h6 { font-size: 1.1rem; }
    .expiry-reminder-modal .modal-footer { flex-direction: column; gap: 0.5rem; }
    .expiry-reminder-modal .modal-footer .btn-modern { width: 100%; }
    .analysis-score { flex-direction: column; gap: 0.5rem; }
    .score-circle { width: 60px; height: 60px; }
    .score-number { font-size: 1.2rem; }
    .analysis-item-header { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .schedule-table { min-width: 500px; font-size: 0.8rem; }
    .schedule-day-header { padding: 0.5rem 0.25rem; font-size: 0.8rem; }
    .schedule-day-cell { padding: 0.5rem 0.25rem; }
    .shift-time-item { font-size: 0.7rem; padding: 0.3rem 0.4rem; }
    .location-tabs .nav-link { padding: 0.5rem 1rem; font-size: 0.85rem; }
    .stats-item-number { font-size: 1.25rem; }
    .stats-item { padding: 0.4rem 0.2rem; }
    .stats-divider { height: 2rem; }
    .cp-features-grid { grid-template-columns: 1fr; }
    .cp-modal-header-inner { flex-direction: column; text-align: center; }
    .cp-modal-body { padding: 1.5rem 1rem; }
    .cp-cta-buttons { flex-direction: column; align-items: center; }
    .cp-cta-buttons .btn-modern { width: 100%; max-width: 280px; }
    .cp-feature-card { padding: 1.25rem; }
    .cp-modal-header { padding: 1.25rem 1rem; }
    .cp-modal-header .modal-title { font-size: 1.2rem; }
    .cp-modal-subtitle { font-size: 0.8rem; }
}

@media (max-width: 480px) {
	.info-cards-row { grid-template-columns: 1fr; gap: 0.5rem; }
    .calendar-section { padding: 0.5rem; }
    .qna-title { flex-direction: column; gap: 0.5rem; font-size: 1.25rem; }
    .qna-question { flex-direction: column; text-align: center; gap: 0.5rem; }
    .btn-renewal { font-size: 0.75rem; padding: 0.3rem 0.6rem; }
    .expiry-date-container { text-align: center; }
    .sidebar { flex-direction: column; }
    .score-circle { width: 50px; height: 50px; }
    .score-number { font-size: 1rem; }
    .score-label { font-size: 0.7rem; }
    .analysis-item { padding: 0.5rem; }
    .analysis-category, .analysis-item-details { font-size: 0.75rem; }
    .suggestions-list li { font-size: 0.75rem; }
    .schedule-table { min-width: 400px; }
    .schedule-day-header { font-size: 0.7rem; padding: 0.4rem 0.2rem; }
    .shift-time-item { font-size: 0.65rem; padding: 0.25rem 0.3rem; }
    .location-tabs .nav-link { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
    .location-tabs .nav-link i { display: none; }
    .stats-item-number { font-size: 1.1rem; }
    .stats-item-header i { font-size: 0.65rem; }
    .stats-item-label { font-size: 0.6rem; }
    .legend-row { gap: 0.75rem; }
    .legend-checkbox-label { font-size: 0.75rem; }
    .cp-feature-tags { flex-direction: column; }
    .cp-tag { justify-content: center; }
    .cp-cta-section { padding: 1.5rem 1rem; }
}

/* ================================================
   Admin Page Styles
   ================================================ */

.email-check-msg {
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.email-check-ok {
    color: #198754;
}

.email-check-warn {
    color: #dc3545;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading-spinner.show {
    display: block;
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-card.stats-card-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stats-card.stats-card-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stats-card .stats-country-tag {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.75;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.stats-card.stats-card-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stats-card h3 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: bold;
}

.stats-card p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

/* Admin textarea placeholder helper */
.admin-order-import-textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
    font-size: 0.85rem;
}

/* Admin VIP result table wrapper */
.admin-vip-result-table {
    font-size: 0.85rem;
}

.filter-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.pagination-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.accounts-table-wrapper {
    overflow-x: auto;
}

.accounts-table {
    min-width: 1200px;
}

.accounts-table tbody tr {
    transition: background-color 0.2s;
}

.accounts-table tbody tr:hover {
    background-color: #f8f9fa;
}

.accounts-table thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4);
}

.section-toggle {
    cursor: pointer;
    user-select: none;
}

.section-toggle:hover {
    background-color: #f8f9fa;
}

.section-content {
    display: none;
}

.section-content.show {
    display: block;
}

.compact-form .form-control,
.compact-form .form-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.compact-form .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.pricing-cell {
    font-size: 0.85rem;
    white-space: nowrap;
}

.pricing-cell .price-weekly {
    color: #0d6efd;
}

.pricing-cell .price-monthly {
    color: #198754;
}

.pricing-cell .price-restriction {
    color: #dc3545;
    font-size: 0.75rem;
}

.edit-locations-btn {
    padding: 0.1rem 0.3rem;
    font-size: 0.75rem;
    vertical-align: middle;
    cursor: pointer;
}

.location-checkbox-item {
    padding-top: 0.35rem;
    padding-right: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.15s;
}

.location-checkbox-item:hover {
    background-color: #e9ecef;
}

.location-checkbox-item.d-none {
    display: none !important;
}

.location-usage-badge {
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.location-usage-full {
    color: #dc3545;
    font-weight: bold;
}

.location-usage-warning {
    color: #fd7e14;
}

.location-usage-ok {
    color: #198754;
}

.location-search-box {
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
    padding-bottom: 0.5rem;
}

.selected-count-badge {
    font-size: 0.85rem;
}

.app-toggle-btn {
    transition: all 0.2s ease;
}

.app-toggle-btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* ================================================
   DARK MODE
   ================================================ */

@media (prefers-color-scheme: dark) {
    /* === Base === */
    body {
        background: #0d1117 !important;
        color: #c9d1d9 !important;
    }
    body[style*="display: flex"] {
        background: #0d1117 !important;
    }
    .page-wrapper {
        background: #0d1117 !important;
    }
    hr {
        border-color: #30363d !important;
        opacity: 1 !important;
    }
    p { color: #c9d1d9; }
    h5, h6 { color: #c9d1d9; }
    label { color: #c9d1d9; }
    .text-muted, small.text-muted { color: #8b949e !important; }
    .text-dark { color: #c9d1d9 !important; }

    /* === Info Cards === */
    .info-card {
        background: #161b22 !important;
        border-color: #30363d !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
    }
    .info-card-title { color: #8b949e !important; }
    .info-card-value { color: #e6edf3 !important; }

    /* === Badges - KEEP COLORFUL === */
    .expiry-badge {
        background: linear-gradient(135deg, #238636 0%, #1a7f37 100%) !important;
        color: #ffffff !important;
    }
    .expiry-badge.expiry-warning {
        background: linear-gradient(135deg, #da3633 0%, #b86e00 100%) !important;
        color: white !important;
    }
    .location-tag {
        background: linear-gradient(135deg, #1f6feb 0%, #388bfd 100%) !important;
        color: #ffffff !important;
        border-color: #388bfd !important;
    }
    .location-tag:hover {
        background: linear-gradient(135deg, #388bfd 0%, #58a6ff 100%) !important;
    }
    .stats-badge {
        background: linear-gradient(135deg, #9e6a03 0%, #b86e00 100%) !important;
        color: #ffffff !important;
    }
    .specific-location-badge {
        background: #1f6feb !important;
        color: #ffffff !important;
    }
    .renewal-price-item {
        background: #21262d !important;
        color: #c9d1d9 !important;
    }
    .renewal-price-monthly {
        background: #1a3a1a !important;
        color: #3fb950 !important;
    }

    /* === Stats === */
    .stats-item-week {
        background: linear-gradient(135deg, #0d1b2a 0%, #1b2838 100%) !important;
    }
    .stats-item-month {
        background: linear-gradient(135deg, #0d1f0d 0%, #1a2e1a 100%) !important;
    }
    .stats-item-week .stats-item-number { color: #58a6ff !important; }
    .stats-item-month .stats-item-number { color: #3fb950 !important; }
    .stats-item-label { color: #8b949e !important; }
    .stats-divider { background: linear-gradient(180deg, transparent, #30363d, transparent) !important; }

    /* === Calendar === */
    .calendar-section {
        background: #161b22 !important;
        border-color: #30363d !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
    }
    .calendar-title { color: #c9d1d9 !important; }
    .legend-box { background: #21262d !important; color: #c9d1d9 !important; }
    .legend-box span { color: #c9d1d9 !important; }
    .legend-checkbox-label { color: #c9d1d9 !important; }
    .modern-calendar { background: #161b22 !important; }
    .modern-calendar thead th {
        background: linear-gradient(135deg, #21262d 0%, #30363d 100%) !important;
        color: #c9d1d9 !important;
    }
    .modern-calendar td {
        background: #161b22 !important;
        color: #c9d1d9 !important;
        border-color: #30363d !important;
    }
    .modern-calendar td.past-date { background: #0d1117 !important; }
    .calendar-cell, .calendar-date { color: #c9d1d9 !important; }
    .shift-card {
        background: #21262d !important;
        color: #c9d1d9 !important;
        border-color: #30363d !important;
    }
    .shift-card strong { color: #58a6ff !important; }
    .shift-card .shift-time { color: #8b949e !important; }
    .shift-card.extended-midnight { border-color: #da3633 !important; }
    .extended-shift-info { color: #f85149 !important; }
    .btn-cell-edit {
        background: #1f6feb !important;
        color: #ffffff !important;
        border-color: #1f6feb !important;
    }
    .btn-cell-edit:hover {
        background: #388bfd !important;
        border-color: #388bfd !important;
    }
    .btn-cell-rest {
        background: #9e6a03 !important;
        color: #ffffff !important;
        border-color: #9e6a03 !important;
    }
    .btn-cell-rest:hover {
        background: #bb8009 !important;
        border-color: #bb8009 !important;
    }

    /* === Sidebar === */
    .sidebar-card {
        background: #161b22 !important;
        border-color: #30363d !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
    }
    .sidebar-content { background: #161b22 !important; }
    .history-item { border-color: #21262d !important; }
    .history-time { color: #8b949e !important; }
    .history-date { color: #c9d1d9 !important; }
    .shift-time-range { color: #c9d1d9 !important; }
    .status-badge { background: #21262d !important; color: #c9d1d9 !important; }
    .status-badge.exchange { background: #0d2137 !important; color: #58a6ff !important; }
    .empty-history { color: #484f58 !important; }
    .empty-history i { color: #30363d !important; }

    /* === Analysis === */
    .analysis-score { background: #21262d !important; }
    .analysis-item { background: #21262d !important; border-color: #30363d !important; }
    .analysis-category { color: #c9d1d9 !important; }
    .analysis-item-details { color: #8b949e !important; }
    .improvement-suggestions { background: #161b22 !important; border-color: #30363d !important; }
    .suggestions-title { color: #58a6ff !important; }
    .suggestions-list li { color: #c9d1d9 !important; }
    .btn-toggle-details { background: #21262d !important; border-color: #30363d !important; color: #c9d1d9 !important; }
    .btn-toggle-details:hover { background: #30363d !important; }
    .score-fraction { color: #8b949e !important; }
    .daily-score-badge.ds-average { color: #1a1a1a !important; }

    /* === Alerts === */
    .alert-modern.alert-success-modern { background: #0d2818 !important; border-color: #238636 !important; color: #3fb950 !important; }
    .alert-modern.alert-danger-modern { background: #2d1117 !important; border-color: #da3633 !important; color: #f85149 !important; }
    .alert { background: #21262d !important; color: #c9d1d9 !important; border-color: #30363d !important; }
    .alert-warning { background: #2d2200 !important; border-color: #d29922 !important; color: #e3b341 !important; }
    .alert-success { background: #0d2818 !important; border-color: #238636 !important; color: #3fb950 !important; }
    .alert-danger { background: #2d1117 !important; border-color: #da3633 !important; color: #f85149 !important; }
    .alert-info { background: #0d1b2a !important; border-color: #1f6feb !important; color: #58a6ff !important; }

    /* === Modals === */
    .modal-content { background: #161b22 !important; color: #c9d1d9 !important; border-color: #30363d !important; }
    .modal-header { border-color: #30363d !important; }
    .modal-footer { border-color: #30363d !important; background: #161b22 !important; }
    .modal-title { color: #c9d1d9 !important; }
    .modal-body { background: #161b22 !important; color: #c9d1d9 !important; }
    .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

    /* === Forms === */
    .form-control, .form-select { background: #0d1117 !important; color: #c9d1d9 !important; border-color: #30363d !important; }
    .form-control:focus, .form-select:focus { background: #0d1117 !important; color: #c9d1d9 !important; border-color: #58a6ff !important; box-shadow: 0 0 0 0.25rem rgba(88, 166, 255, 0.25) !important; }
    .form-control:disabled, .form-select:disabled { background: #161b22 !important; color: #484f58 !important; border-color: #21262d !important; }
    .form-control::placeholder { color: #484f58 !important; }
    .form-label { color: #c9d1d9 !important; }
    .form-check-label { color: #c9d1d9 !important; }
    .form-text, .form-text small { color: #8b949e !important; }
    .form-select option { background: #0d1117 !important; color: #c9d1d9 !important; }
    .shift-config-card { background: #21262d !important; border-color: #30363d !important; }
    .shift-config-header { border-color: #30363d !important; }
    .shift-config-number { background: #1f6feb !important; color: #ffffff !important; }
    .form-section { background: #21262d !important; border-color: #30363d !important; }
    .form-section-title { color: #c9d1d9 !important; border-color: #30363d !important; }
    .input-group .btn-outline-secondary { color: #8b949e !important; border-color: #30363d !important; background: #161b22 !important; }
    .input-group .btn-outline-secondary:hover { background: #30363d !important; color: #c9d1d9 !important; }
    .d-flex .form-check-label { color: #c9d1d9 !important; }
    .location-option-disable { color: #484f58 !important; }

    /* === Bootstrap Buttons === */
    .btn-primary { background-color: #1f6feb !important; border-color: #1f6feb !important; color: #ffffff !important; }
    .btn-primary:hover { background-color: #388bfd !important; border-color: #388bfd !important; }
    .btn-success { background-color: #238636 !important; border-color: #238636 !important; color: #ffffff !important; }
    .btn-success:hover { background-color: #2ea043 !important; border-color: #2ea043 !important; }
    .btn-success:disabled { background-color: #1a5c28 !important; border-color: #1a5c28 !important; color: #8b949e !important; opacity: 0.7 !important; }
    .btn-warning { background-color: #9e6a03 !important; border-color: #9e6a03 !important; color: #ffffff !important; }
    .btn-warning:hover { background-color: #bb8009 !important; border-color: #bb8009 !important; }
    .btn-secondary { background-color: #30363d !important; border-color: #484f58 !important; color: #c9d1d9 !important; }
    .btn-secondary:hover { background-color: #484f58 !important; border-color: #6e7681 !important; color: #ffffff !important; }
    .btn-danger { background-color: #da3633 !important; border-color: #da3633 !important; color: #ffffff !important; }
    .btn-danger:hover { background-color: #f85149 !important; border-color: #f85149 !important; }
    .btn-info { background-color: #1f6feb !important; border-color: #1f6feb !important; color: #ffffff !important; }
    .btn-outline-secondary { color: #c9d1d9 !important; border-color: #484f58 !important; background: transparent !important; }
    .btn-outline-secondary:hover { background: #30363d !important; color: #ffffff !important; border-color: #6e7681 !important; }
    .btn-outline-primary { color: #58a6ff !important; border-color: #1f6feb !important; background: transparent !important; }
    .btn-outline-primary:hover { background: #1f6feb !important; color: #ffffff !important; }
    .btn-outline-success { color: #3fb950 !important; border-color: #238636 !important; background: transparent !important; }
    .btn-outline-success:hover { background: #238636 !important; color: #ffffff !important; }
    .btn-outline-danger { color: #f85149 !important; border-color: #da3633 !important; background: transparent !important; }
    .btn-outline-danger:hover { background: #da3633 !important; color: #ffffff !important; }
    .btn-link { color: #58a6ff !important; }
    .btn-link:hover { color: #79c0ff !important; }
    .btn-link.text-muted, .btn-sm.btn-link.text-muted { color: #8b949e !important; }
    .btn-link.text-muted:hover, .btn-sm.btn-link.text-muted:hover { color: #c9d1d9 !important; }

    /* === Badges === */
    .badge.bg-primary { background-color: #1f6feb !important; color: #ffffff !important; }
    .badge.bg-success { background-color: #238636 !important; color: #ffffff !important; }
    .badge.bg-info { background-color: #1f6feb !important; color: #ffffff !important; }
    .badge.bg-warning { background-color: #9e6a03 !important; color: #ffffff !important; }
    .badge.bg-danger { background-color: #da3633 !important; color: #ffffff !important; }
    .badge.bg-secondary { background-color: #30363d !important; color: #c9d1d9 !important; }

    /* === btn-modern === */
    .btn-modern.btn-primary-modern { box-shadow: 0 2px 4px rgba(31, 111, 235, 0.3) !important; }
    .btn-modern.btn-secondary-modern { background: linear-gradient(135deg, #21262d 0%, #30363d 100%) !important; color: #c9d1d9 !important; border: 1px solid #484f58 !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important; }
    .btn-modern.btn-secondary-modern:hover { background: linear-gradient(135deg, #30363d 0%, #484f58 100%) !important; color: #ffffff !important; border-color: #6e7681 !important; }
    .btn-modern.btn-info-modern { box-shadow: 0 2px 4px rgba(31, 111, 235, 0.3) !important; }
    .btn-remove-config { background: #da3633 !important; color: #ffffff !important; border-color: #da3633 !important; }
    .btn-remove-config:hover { background: #f85149 !important; color: #ffffff !important; border-color: #f85149 !important; }

    /* === Q&A === */
    .qna-section { background: #161b22 !important; border-color: #30363d !important; }
    .qna-title { color: #c9d1d9 !important; }
    .qna-item { background: #21262d !important; border-color: #30363d !important; }
    .qna-question { background: linear-gradient(135deg, #21262d 0%, #30363d 100%) !important; }
    .qna-answer { background: #161b22 !important; }
    .qna-answer p { color: #c9d1d9 !important; }
    .qna-example { background: #0d1117 !important; border-color: #30363d !important; }
    .qna-example-title { color: #58a6ff !important; }
    .qna-note { background: rgba(210, 153, 34, 0.1) !important; border-color: #d29922 !important; color: #e3b341 !important; }
    .example-period { background: #161b22 !important; border-color: #1f6feb !important; }
    .period-name { color: #58a6ff !important; }
    .period-time { color: #c9d1d9 !important; }

    /* === Schedule Modal === */
    .schedule-info { background: #21262d !important; border-color: #30363d !important; }
    .schedule-info p { color: #8b949e !important; }
    .schedule-table { background: #161b22 !important; }
    .schedule-day-header { background: linear-gradient(135deg, #21262d 0%, #30363d 100%) !important; color: #c9d1d9 !important; }
    .schedule-day-cell { background: #161b22 !important; border-color: #30363d !important; }
    .shift-time-item { background: #21262d !important; border-color: #30363d !important; color: #58a6ff !important; }
    .shift-time-item:hover { background: #30363d !important; }
    .shift-time-item.matched-shift { background: linear-gradient(135deg, #9e5a06 0%, #b86e00 100%) !important; border-color: #d29922 !important; color: white !important; }
    .shift-time-item.matched-shift:hover { background: linear-gradient(135deg, #b86e00 0%, #d29922 100%) !important; }
    .no-shifts .text-muted { color: #484f58 !important; }

    /* === Tabs === */
    .location-tabs { border-color: #30363d !important; }
    .location-tabs .nav-link { color: #8b949e !important; }
    .location-tabs .nav-link:hover { background: rgba(88, 166, 255, 0.1) !important; color: #58a6ff !important; }
    .location-tabs .nav-link.active { background: linear-gradient(135deg, #1f6feb 0%, #388bfd 100%) !important; color: white !important; }
    .nav-tabs { border-color: #30363d !important; }

    /* === Tables === */
    .table { --bs-table-bg: #161b22; --bs-table-color: #c9d1d9; }
    .table-bordered > :not(caption) > * > * { border-color: #30363d !important; }

    /* === Control Panel Modal === */
    .cp-modal-body { background: #161b22 !important; }
    .cp-feature-card { background: #21262d !important; border-color: #30363d !important; }
    .cp-feature-card:hover { border-color: #484f58 !important; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important; }
    .cp-feature-title { color: #c9d1d9 !important; }
    .cp-feature-desc { color: #8b949e !important; }
    .cp-cta-section { background: #21262d !important; border-color: #30363d !important; }
    .cp-cta-title { color: #c9d1d9 !important; }
    .cp-pricing-card { background: #161b22 !important; border-color: #30363d !important; }
    .cp-pricing-body { background: #161b22 !important; }
    .cp-pricing-label { color: #c9d1d9 !important; }
    .cp-pricing-value { color: #c9d1d9 !important; }
    .cp-pricing-note { background: #0d1117 !important; color: #8b949e !important; border-color: #30363d !important; }
    .cp-pricing-highlight { background: #21262d !important; }
    .cp-pricing-divider { background: linear-gradient(90deg, transparent, #30363d, transparent) !important; }
    .cp-tag-blue { background: #0d2137 !important; color: #58a6ff !important; }
    .cp-tag-green { background: #0d2818 !important; color: #3fb950 !important; }
    .cp-tag-orange { background: #2d1a00 !important; color: #d29922 !important; }
    .cp-tag-purple { background: #271339 !important; color: #bc8cff !important; }
    .cp-tag-teal { background: #0a2e2a !important; color: #39d2c0 !important; }
    .cp-tag-red { background: #2d1117 !important; color: #f85149 !important; }
    .cp-pay-method-btn { background: #21262d !important; color: #c9d1d9 !important; border-color: #484f58 !important; }
    .cp-pay-method-btn:hover { border-color: #58a6ff !important; color: #58a6ff !important; background: #161b22 !important; }
    .cp-modal-footer { background: #161b22 !important; }
    #cp_payment_flow h6 { color: #c9d1d9 !important; }
    #cp_payment_flow p { color: #8b949e !important; }
    #cp_payment_info { color: #c9d1d9 !important; }
    #cp_payment_info h6 { color: #c9d1d9 !important; }
    #cp_step_success h6 { color: #3fb950 !important; }
    #cp_step_success p { color: #8b949e !important; }
    .cp-cta-section > div[style*="border-top"] { border-color: #30363d !important; }
    .cp-cta-section > div[style*="border-top"] p { color: #8b949e !important; }

    /* === Renewal Payment Modal === */
    #renewalPaymentModal .modal-body { background: #161b22 !important; }
    #renewalPaymentModal .modal-header { background: linear-gradient(135deg, #238636 0%, #1a7f37 100%) !important; }
    .rp-period-btn { background: #21262d !important; color: #c9d1d9 !important; border-color: #484f58 !important; }
    .rp-period-btn:hover { border-color: #58a6ff !important; background: #161b22 !important; }
    .rp-method-btn { background: #21262d !important; color: #c9d1d9 !important; border-color: #484f58 !important; }
    .rp-method-btn:hover { border-color: #58a6ff !important; color: #58a6ff !important; background: #161b22 !important; }
    .rp-fps-box { background: #21262d !important; border-color: #30363d !important; }
    #rp_payment_info { color: #c9d1d9 !important; }
    #rp_payment_info h6 { color: #c9d1d9 !important; }
    #rp_step_details h6 { color: #c9d1d9 !important; }
    #rp_step_details hr { border-color: #30363d !important; }
    #rp_step_success h5 { color: #3fb950 !important; }
    #rp_step_success p { color: #8b949e !important; }

    /* === Location Change Modal === */
    #locationChangeModal .modal-body { background: #161b22 !important; }
    #locationChangeModal .location-change-warning { background: #2d2200 !important; border-color: #d29922 !important; }
    #locationChangeModal .location-change-warning p { color: #e3b341 !important; }

    /* === Warning Modal === */
    .warning-text { color: #c9d1d9 !important; }
    .warning-period-item { color: #c9d1d9 !important; }
    .warning-periods h6 { color: #c9d1d9 !important; }

    /* === Apply Defaults Modal === */
    #applyDefaultsModal .modal-body p { color: #c9d1d9 !important; }

    /* === Telegram Verification === */
    .telegram-setup-steps, .telegram-setup-steps h6 { color: #c9d1d9 !important; }
    .telegram-steps-list { background: #21262d !important; color: #c9d1d9 !important; }
    .telegram-steps-list li { color: #c9d1d9 !important; }
    .verification-code-container { background: #0d2137 !important; border-color: #1f6feb !important; }
    .verification-code-container .form-label { color: #c9d1d9 !important; }
    .verification-code-display { background: #0d1117 !important; border-color: #1f6feb !important; color: #58a6ff !important; }
    .chat-id-status.checking { background: #2d2200 !important; border-color: #d29922 !important; color: #e3b341 !important; }
    .chat-id-status.success { background: #0d2818 !important; border-color: #238636 !important; color: #3fb950 !important; }
    .chat-id-status.error { background: #2d1117 !important; border-color: #da3633 !important; color: #f85149 !important; }

    /* === Cancel Panel === */
    .cancel-panel-modal-content { background: #161b22 !important; }
    .cancel-panel-modal-message { color: #c9d1d9 !important; }
    .cancel-panel-modal-warning { background: #2d2200 !important; border-color: #d29922 !important; color: #e3b341 !important; }
    .cancel-panel-modal-icon i { color: #8b949e !important; }
    .cancel-panel-section { color: #c9d1d9 !important; }
    .cancel-panel-label { color: #c9d1d9 !important; }
    .cancel-panel-status-badge { background: #0d2818 !important; color: #3fb950 !important; }
    .cancel-panel-row { border-color: #30363d !important; }
    .btn-cancel-panel { background: #2d1117 !important; border-color: #da3633 !important; color: #f85149 !important; }
    .btn-cancel-panel:hover { background: #da3633 !important; color: #ffffff !important; }
    .btn-cancel-panel-confirm { background: #da3633 !important; color: #ffffff !important; }
    .btn-cancel-panel-confirm:hover { background: #f85149 !important; }
    .cancel-panel-status-success { background: #0d2818 !important; color: #3fb950 !important; border: 1px solid #238636 !important; }
    .cancel-panel-status-error { background: #2d1117 !important; color: #f85149 !important; border: 1px solid #da3633 !important; }
    .btn-control-panel-info { background: #21262d !important; color: #c9d1d9 !important; border-color: #484f58 !important; }
    .btn-control-panel-info:hover { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; color: white !important; border-color: transparent !important; }
    .btn-control-panel-open { box-shadow: 0 3px 8px rgba(102, 126, 234, 0.2) !important; }

    /* === Delayed Extension Banner === */
    .delayed-extension-banner { background: #21262d !important; border-color: #d29922 !important; }
    .delayed-extension-banner .delayed-extension-icon { background: #d29922 !important; }
    .delayed-extension-banner .delayed-extension-title { color: #e3b341 !important; }
    .delayed-extension-banner .delayed-extension-message,
    .delayed-extension-banner .delayed-extension-message strong { color: #c9d1d9 !important; }
    .delayed-extension-banner .delayed-extension-details .detail-item { background: rgba(255, 255, 255, 0.05) !important; color: #c9d1d9 !important; }

    /* === Expiry Reminder Modal === */
    .expiry-reminder-content { color: #c9d1d9 !important; }
    .reminder-icon i { color: #f85149 !important; }
    .reminder-message h6 { color: #c9d1d9 !important; }
    .reminder-text { color: #8b949e !important; }
    .renewal-info-box { background: #21262d !important; border-color: #30363d !important; }
    .renewal-info-header { border-color: #30363d !important; }
    .renewal-info-header h6 { color: #c9d1d9 !important; }
    .info-item { background: #161b22 !important; color: #c9d1d9 !important; }
    .info-item span { color: #c9d1d9 !important; }
    .info-item.warning-item { background: #2d2200 !important; }
    .info-item.urgent-item { background: #2d1117 !important; }

    /* === Error Page === */
    .error-container { background: #161b22 !important; border-color: #30363d !important; color: #c9d1d9 !important; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important; }
    .error-title { color: #c9d1d9 !important; }
    .error-message { color: #8b949e !important; }
    .expired-date { color: #f85149 !important; }
    .ban-info { background: #21262d !important; border-color: #30363d !important; }
    .ban-info-item { color: #c9d1d9 !important; }
    .contact-info { background: #21262d !important; border-color: #30363d !important; }
    .contact-info h6 { color: #c9d1d9 !important; }
    .contact-link { background: #161b22 !important; color: #c9d1d9 !important; border-color: #30363d !important; }
    .contact-link:hover { background: #21262d !important; border-color: #484f58 !important; }
    .password-form { background: #21262d !important; border-color: #30363d !important; }
    .password-form .form-control { background: #0d1117 !important; color: #c9d1d9 !important; border-color: #30363d !important; }
    .password-form .form-label { color: #c9d1d9 !important; }
    .password-form .btn-modern { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important; }
    .success-message { background: #0d2818 !important; border-color: #238636 !important; color: #3fb950 !important; }
    .error-alert { background: #2d1117 !important; border-color: #da3633 !important; color: #f85149 !important; }
    .error-icon { opacity: 0.85; }
    .error-icon.system { background: #21262d !important; color: #8b949e !important; }
    .error-icon.not-found { background: #2d2200 !important; color: #e3b341 !important; }
    .error-icon.expired { background: #2d1117 !important; color: #f85149 !important; }
    .error-icon.password-error { background: #2d1117 !important; color: #f0883e !important; }
    .error-icon.disable { background: #2d1117 !important; color: #da3633 !important; }
    .mt-4 .btn-modern { border: 1px solid #484f58 !important; }

    /* === Expired Edit Section (Error Page) === */
    .expired-edit-section { background: #21262d !important; border-color: #d29922 !important; }
    .expired-edit-header { background: linear-gradient(135deg, #9e6a03 0%, #b86e00 100%) !important; }
    .expired-edit-body { background: #161b22 !important; }
    .expired-edit-label { color: #c9d1d9 !important; }
    .expired-edit-label i { color: #d29922 !important; }
    .expired-location-item { background: #0d1117 !important; border-color: #30363d !important; }
    .expired-location-item:hover { border-color: #d29922 !important; }
    .expired-location-label span { color: #c9d1d9 !important; }
    .expired-locations-summary { background: #0d1117 !important; border-color: #30363d !important; }
    .expired-locations-current { color: #c9d1d9 !important; }
    .expired-app-toggle { background: #0d1117 !important; border-color: #30363d !important; }
    .expired-app-label span { color: #c9d1d9 !important; }
    .expired-edit-warning { background: rgba(210, 153, 34, 0.1) !important; border-color: #d29922 !important; color: #e3b341 !important; }
    .expired-edit-warning i { color: #d29922 !important; }
    .expired-save-status.success { background: #0d2818 !important; border-color: #238636 !important; color: #3fb950 !important; }
    .expired-save-status.error { background: #2d1117 !important; border-color: #da3633 !important; color: #f85149 !important; }

    /* === Expired Payment Flow (Error Page) === */
    .expired-payment-flow { border-color: #238636 !important; box-shadow: 0 4px 12px rgba(35, 134, 54, 0.15) !important; }
    .ep-section-header { background: linear-gradient(135deg, #238636 0%, #1a7f37 100%) !important; }
    .ep-section-body { background: #161b22 !important; }
    .ep-period-btn { background: #21262d !important; color: #c9d1d9 !important; border-color: #484f58 !important; }
    .ep-period-btn:hover { border-color: #238636 !important; background: #161b22 !important; }
    .ep-period-btn-highlight { background: #0d1f0d !important; border-color: #238636 !important; }
    .ep-period-label { color: #c9d1d9 !important; }
    .ep-period-price { color: #3fb950 !important; }
    .ep-period-days { color: #8b949e !important; }
    .ep-reason-text { color: #f85149 !important; }
    .ep-badge { color: #ffffff !important; }
    .ep-badge-green { background: #238636 !important; }
    .ep-badge-blue { background: #1f6feb !important; }
    .ep-badge-info { background: #1f6feb !important; }
    .ep-method-btn { background: #21262d !important; border-color: #484f58 !important; }
    .ep-method-btn:hover { border-color: #58a6ff !important; background: #161b22 !important; }
    .ep-method-name { color: #c9d1d9 !important; }
    .ep-method-btn:hover .ep-method-name { color: #58a6ff !important; }
    .ep-back-btn { color: #8b949e !important; }
    .ep-back-btn:hover { color: #c9d1d9 !important; }
    .ep-upload-title { color: #c9d1d9 !important; }
    .ep-upload-title i { color: #3fb950 !important; }
    .ep-upload-desc { color: #8b949e !important; }
    .ep-payment-info { color: #c9d1d9 !important; }
    .ep-payment-info h6 { color: #c9d1d9 !important; }
    .ep-payment-info .ep-fps-box { background: #21262d !important; border-color: #30363d !important; }
    .ep-payment-info .ep-fps-id { color: #58a6ff !important; }
    .ep-payment-info .ep-amount-display { color: #c9d1d9 !important; }
    .ep-file-input .form-control { background: #0d1117 !important; color: #c9d1d9 !important; border-color: #30363d !important; }
    #ep_image_preview img, #rp_image_preview img, #cp_image_preview img { border-color: #30363d !important; }
    #ep_step_success { color: #c9d1d9 !important; }
    #ep_step_success h5 { color: #3fb950 !important; }
    #ep_step_success p { color: #8b949e !important; }

    /* === Delayed Extension Info (Error Page) === */
    .delayed-extension-info { background: #21262d !important; border-color: #d29922 !important; }
    .delayed-extension-info .delayed-extension-icon i { color: #d29922 !important; }
    .delayed-extension-info .delayed-extension-title { color: #e3b341 !important; }
    .delayed-extension-info .delayed-extension-message { color: #c9d1d9 !important; }
    .delayed-extension-info .delayed-extension-details { background: rgba(255, 255, 255, 0.05) !important; }
    .delayed-extension-info .detail-item { color: #c9d1d9 !important; }
    .delayed-extension-info .detail-item i { color: #d29922 !important; }

    /* === Inline Style Overrides === */
    div[style*="background: #f8f9fa"], div[style*="background:#f8f9fa"] { background: #21262d !important; }
    div[style*="background: white"], div[style*="background:white"],
    div[style*="background: #ffffff"], div[style*="background:#ffffff"],
    div[style*="background: #fff"], div[style*="background:#fff"] { background: #161b22 !important; }
    div[style*="color: #343a40"], div[style*="color:#343a40"],
    span[style*="color: #343a40"], span[style*="color:#343a40"] { color: #c9d1d9 !important; }
    div[style*="color: #495057"], div[style*="color:#495057"] { color: #c9d1d9 !important; }
    span[style*="color: #6c757d"], span[style*="color:#6c757d"],
    div[style*="color: #6c757d"], div[style*="color:#6c757d"] { color: #8b949e !important; }
    div[style*="color: #155724"], h5[style*="color: #155724"], h6[style*="color: #155724"] { color: #3fb950 !important; }
    div[style*="color: #1565c0"] { color: #58a6ff !important; }

    /* Scrollbar */
    ::-webkit-scrollbar { background: #0d1117; }
    ::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
    ::-webkit-scrollbar-thumb:hover { background: #484f58; }
}

/* ================================================
   Login / Email Input Page Styles
   (Merged from user_styles.css, scoped to .login-body)
   ================================================ */

body.login-body {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #333 !important;
    min-height: 100vh;
}

body.login-body .container {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 420px;
    width: 90%;
    margin: 0;
}

body.login-body .logo {
    font-size: 3em;
    margin-bottom: 20px;
}

body.login-body h1 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 1.5em;
}

body.login-body .subtitle {
    color: #764ba2;
    margin-bottom: 30px;
    font-size: 0.95em;
    font-weight: 500;
}

body.login-body .input-group {
    margin-bottom: 20px;
    text-align: left;
}

body.login-body .input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
    line-height: 1.4;
}

body.login-body .input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
    color: #333;
}

body.login-body .input-group input:focus {
    outline: none;
    border-color: #667eea;
}

body.login-body .btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.login-body .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

body.login-body .help-text {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* ================================================
   Info Cards Flex Layout Override
   (Merged from user_styles.css - supports 5 or 6 columns)
   ================================================ */

.info-cards-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
}

.info-cards-row.info-cards-5 .info-card {
    flex: 1 1 calc(20% - 1rem) !important;
    min-width: 0 !important;
    max-width: none !important;
}

.info-cards-row.info-cards-6 .info-card {
    flex: 1 1 calc(16.666% - 1rem) !important;
    min-width: 0 !important;
    max-width: none !important;
}

@media (max-width: 1400px) {
    .info-cards-row .info-card {
        flex: 1 1 calc(33.333% - 1rem) !important;
    }
}

@media (max-width: 768px) {
    .info-cards-row .info-card {
        flex: 1 1 calc(50% - 1rem) !important;
        min-width: 0 !important;
    }
    .info-cards-row.info-cards-5 .info-card,
    .info-cards-row.info-cards-6 .info-card {
        flex: 1 1 calc(50% - 1rem) !important;
    }
}

@media (max-width: 480px) {
    .info-cards-row .info-card {
        flex: 1 1 100% !important;
    }
    .info-cards-row.info-cards-5 .info-card,
    .info-cards-row.info-cards-6 .info-card {
        flex: 1 1 100% !important;
    }
}

/* ================================================
   Cancel VIP Section
   (Merged from user_styles.css)
   ================================================ */

.cancel-vip-section {
    margin-top: 1rem;
}

.cancel-vip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: linear-gradient(135deg, #fff8e1 0%, #ffe0b2 100%);
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 0.875rem 1rem;
}

.cancel-vip-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cancel-vip-label {
    font-weight: 600;
    color: #856404;
}

.cancel-vip-status-badge {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.btn-cancel-vip {
    background: white;
    color: #ff9800;
    border: 2px solid #ff9800;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-vip:hover {
    background: #ff9800;
    color: white;
}

.btn-cancel-vip-confirm {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel-vip-confirm:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
}

/* ================================================
   Control Panel - Hotspot Feature Icon
   ================================================ */

.cp-icon-hotspot {
    background: linear-gradient(135deg, #FF5722 0%, #FF9800 100%);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

/* Dark mode for login page */
@media (prefers-color-scheme: dark) {
    body.login-body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: #333 !important;
    }
    body.login-body .container {
        background: white !important;
    }
    body.login-body .input-group input {
        background: white !important;
        color: #333 !important;
        border-color: #ddd !important;
    }
}

/* ================================================
   Earnings & Score Modal
   ================================================ */

#earningsScoreModal .modal-dialog {
    max-width: 900px;
}

.es-modal-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.es-modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.es-modal-body {
    padding: 0 !important;
    background: white;
}

/* Main Tabs (Score / Earnings) */
.es-main-tabs {
    border-bottom: 2px solid #dee2e6;
    margin: 0;
    padding: 0 1rem;
    background: #f8f9fa;
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
}

.es-main-tabs .nav-item {
    flex: 1;
    margin-bottom: -2px;
}

.es-main-tabs .nav-link {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-radius: 0;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 1rem;
    cursor: pointer;
}

.es-main-tabs .nav-link:hover {
    color: #f5576c;
    background: rgba(245, 87, 108, 0.05);
}

.es-main-tabs .nav-link.active {
    color: #f5576c;
    background: white;
    border-bottom-color: #f5576c;
}

.es-tab-content {
    padding: 1.5rem;
    background: white;
    min-height: 400px;
}

/* Score Cards */
.score-record-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.score-record-header {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px dashed #dee2e6;
}

.score-record-period {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.score-record-rank {
    font-weight: 600;
    color: #495057;
}

.score-section {
    margin-top: 0.75rem;
}

.score-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.5rem;
}

.score-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
}

.score-name {
    color: #495057;
    font-weight: 500;
}

.score-value {
    color: #212529;
    font-weight: 600;
}

.score-weighted-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
}

.score-weighted-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
}

.score-progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.score-progress-fill {
    height: 100%;
    transition: width 0.5s;
    border-radius: 4px;
}

.progress-excellent { background: linear-gradient(90deg, #28a745, #20c997); }
.progress-good { background: linear-gradient(90deg, #17a2b8, #4dabf7); }
.progress-average { background: linear-gradient(90deg, #ffc107, #ff9800); }
.progress-poor { background: linear-gradient(90deg, #dc3545, #e83e8c); }

.score-completion {
    font-size: 0.78rem;
    color: #6c757d;
    text-align: right;
}

.empty-score-data {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #adb5bd;
}

.empty-score-data i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Score Navigation */
.score-record-header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.score-header-center {
    flex: 1;
    text-align: center;
}

.score-header-center .score-record-period {
    margin-bottom: 0.25rem;
}

.score-header-center .score-record-rank {
    font-weight: 600;
}

.score-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.score-nav-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.score-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.score-pages-wrapper {
    position: relative;
}

.score-page {
    animation: scorePageFadeIn 0.25s ease;
}

@keyframes scorePageFadeIn {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Live Score Card */
.live-score-card {
    border-left: 3px solid #17a2b8;
}

.live-score-meta {
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.live-score-meta-item {
    font-size: 0.82rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.live-score-meta-item i {
    width: 16px;
    text-align: center;
    margin-right: 0.3rem;
}

.live-score-updated {
    font-size: 0.78rem;
    color: #adb5bd;
    text-align: right;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px dashed #e9ecef;
}

/* Earnings Cards */
.earnings-month-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.earnings-month-card.current-month {
    border-left: 4px solid #28a745;
}

.earnings-month-card.last-month {
    border-left: 4px solid #6c757d;
}

.earnings-month-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.earnings-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.6rem;
}

.earnings-stat-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.7rem 0.5rem;
    text-align: center;
}

.earnings-stat-label {
    font-size: 0.72rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.earnings-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #212529;
}

.earnings-stat-value .stat-unit {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6c757d;
    margin-left: 0.15rem;
}

.earnings-empty {
    text-align: center;
    padding: 1rem;
    color: #adb5bd;
    font-size: 0.85rem;
}

.earnings-empty-large {
    padding: 2.5rem 1rem;
}

.earnings-empty-large i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.earnings-empty-large p {
    margin: 0;
}

/* Comparison Section */
.comparison-section {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.comparison-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed #dee2e6;
}

.comparison-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.6rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.4rem;
    font-size: 0.86rem;
}

.comparison-row.highlight-better {
    background: linear-gradient(90deg, #d4edda, #f8f9fa);
    border-left: 3px solid #28a745;
}

.comparison-row.highlight-worse {
    background: linear-gradient(90deg, #fff3cd, #f8f9fa);
    border-left: 3px solid #ffc107;
}

.comparison-label {
    color: #495057;
    font-weight: 500;
}

.comparison-value {
    color: #212529;
    font-weight: 700;
}

.comparison-diff {
    font-size: 0.78rem;
    margin-left: 0.4rem;
}

.diff-positive { color: #28a745; }
.diff-negative { color: #dc3545; }

/* App Promo Card */
.app-promo-card {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.app-promo-title {
    font-weight: 700;
    color: #e65100;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.app-promo-subtitle {
    font-size: 0.82rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.app-promo-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin: 0.75rem 0;
}

.app-promo-side {
    background: white;
    border-radius: 8px;
    padding: 0.7rem;
    text-align: center;
}

.app-promo-side.with-app {
    border: 2px solid #28a745;
}

.app-promo-side.without-app {
    border: 2px solid #adb5bd;
    opacity: 0.85;
}

.app-promo-side-label {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.with-app .app-promo-side-label {
    color: #155724;
}

.without-app .app-promo-side-label {
    color: #6c757d;
}

.app-promo-side-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #212529;
}

.app-promo-side-sub {
    font-size: 0.72rem;
    color: #6c757d;
    margin-top: 0.2rem;
}

.app-promo-advantage {
    text-align: center;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    margin-top: 0.5rem;
    color: #e65100;
    font-size: 0.95rem;
}

.app-promo-advantage .advantage-highlight {
    color: #28a745;
}

.app-promo-cta {
    text-align: center;
    margin-top: 0.75rem;
}

.app-promo-cta-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
    transition: all 0.2s;
}

.app-promo-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(255, 152, 0, 0.4);
}

.app-promo-already {
    text-align: center;
    padding: 0.5rem;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
}

@media (max-width: 768px) {
    #earningsScoreModal .modal-dialog {
        max-width: 100%;
        margin: 0.5rem;
    }
    .es-tab-content {
        padding: 1rem;
    }
    .es-main-tabs .nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    .earnings-stats-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.4rem;
    }
    .earnings-stat-value {
        font-size: 0.9rem;
    }
    .app-promo-comparison {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode for Earnings & Score Modal */
@media (prefers-color-scheme: dark) {
    .es-modal-body {
        background: #0d1117 !important;
    }
    .es-main-tabs {
        background: #161b22 !important;
        border-color: #30363d !important;
    }
    .es-main-tabs .nav-link {
        color: #8b949e !important;
    }
    .es-main-tabs .nav-link:hover {
        color: #f85149 !important;
        background: rgba(248, 81, 73, 0.1) !important;
    }
    .es-main-tabs .nav-link.active {
        background: #0d1117 !important;
        color: #f85149 !important;
        border-bottom-color: #f85149 !important;
    }
    .es-tab-content {
        background: #0d1117 !important;
    }

    /* Score cards dark mode */
    .score-record-card {
        background: #161b22 !important;
        border-color: #30363d !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    }
    .score-record-header { border-color: #30363d !important; }
    .score-record-period { color: #8b949e !important; }
    .score-record-rank { color: #c9d1d9 !important; }
    .score-section-title { color: #c9d1d9 !important; }
    .score-item {
        background: #21262d !important;
    }
    .score-name { color: #c9d1d9 !important; }
    .score-value { color: #e6edf3 !important; }
    .score-weighted-item {
        background: #21262d !important;
    }
    .score-progress-bar {
        background: #30363d !important;
    }
    .score-completion { color: #8b949e !important; }
    .empty-score-data { color: #484f58 !important; }
    .empty-score-data i { color: #30363d !important; }

    /* Score navigation dark mode */
    .score-nav-btn {
        background: #21262d !important;
        border-color: #30363d !important;
        color: #c9d1d9 !important;
    }
    .score-nav-btn:hover:not(:disabled) {
        background: #30363d !important;
        border-color: #484f58 !important;
        color: #e6edf3 !important;
    }
    .score-header-center .score-record-period { color: #8b949e !important; }
    .score-header-center .score-record-rank { color: #c9d1d9 !important; }
    .live-score-card { border-left-color: #1f6feb !important; }
    .live-score-meta-item { color: #8b949e !important; }
    .live-score-updated { color: #484f58 !important; border-top-color: #30363d !important; }

    /* Earnings cards dark mode */
    .earnings-month-card {
        background: #161b22 !important;
        border-color: #30363d !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    }
    .earnings-month-card.current-month { border-left-color: #3fb950 !important; }
    .earnings-month-card.last-month { border-left-color: #6c757d !important; }
    .earnings-month-title { color: #c9d1d9 !important; }
    .earnings-stat-box { background: #21262d !important; }
    .earnings-stat-label { color: #8b949e !important; }
    .earnings-stat-value { color: #e6edf3 !important; }
    .earnings-stat-value .stat-unit { color: #8b949e !important; }
    .earnings-empty { color: #484f58 !important; }
    .earnings-empty-large p { color: #8b949e !important; }

    /* Comparison dark mode */
    .comparison-section {
        background: #161b22 !important;
        border-color: #30363d !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    }
    .comparison-title {
        color: #c9d1d9 !important;
        border-color: #30363d !important;
    }
    .comparison-row {
        background: #21262d !important;
    }
    .comparison-row.highlight-better {
        background: linear-gradient(90deg, rgba(35, 134, 54, 0.25), #21262d) !important;
        border-left-color: #3fb950 !important;
    }
    .comparison-row.highlight-worse {
        background: linear-gradient(90deg, rgba(210, 153, 34, 0.25), #21262d) !important;
        border-left-color: #d29922 !important;
    }
    .comparison-label { color: #c9d1d9 !important; }
    .comparison-value { color: #e6edf3 !important; }
    .diff-positive { color: #3fb950 !important; }
    .diff-negative { color: #f85149 !important; }

    /* App Promo dark mode */
    .app-promo-card {
        background: linear-gradient(135deg, #2d1f0a 0%, #3d2810 100%) !important;
        border-color: #d29922 !important;
    }
    .app-promo-title { color: #e3b341 !important; }
    .app-promo-subtitle { color: #8b949e !important; }
    .app-promo-side {
        background: #161b22 !important;
    }
    .app-promo-side.with-app {
        border-color: #3fb950 !important;
    }
    .app-promo-side.without-app {
        border-color: #484f58 !important;
    }
    .with-app .app-promo-side-label { color: #3fb950 !important; }
    .without-app .app-promo-side-label { color: #8b949e !important; }
    .app-promo-side-value { color: #e6edf3 !important; }
    .app-promo-side-sub { color: #8b949e !important; }
    .app-promo-advantage {
        background: #161b22 !important;
        color: #e3b341 !important;
    }
    .app-promo-advantage .advantage-highlight { color: #3fb950 !important; }
    .app-promo-already {
        background: rgba(35, 134, 54, 0.2) !important;
        color: #3fb950 !important;
    }
}

/* ========== Order Styles (scoped to .order-page body class) ========== */

body.order-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0.5rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.order-page .card {
    max-width: 520px;
    background: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,.2);
}

.order-page .ic { font-size: 4rem; color: #dc3545; margin-bottom: 1rem; }
.order-page h1 { font-size: 1.4rem; margin-bottom: 1rem; color: #2c3e50; }
.order-page p { color: #6c757d; line-height: 1.8; }
.order-page .countdown { color: #0d6efd; font-weight: 700; font-size: 1.2rem; }
.order-page .btn-back { background: #667eea; color: #fff; padding: .8rem 2rem; border-radius: 8px; text-decoration: none; display: inline-block; margin-top: 1rem; font-weight: 600; }
.order-page .btn-go { background: linear-gradient(135deg, #4facfe, #00f2fe); color: #fff; padding: .8rem 2rem; border-radius: 8px; text-decoration: none; display: inline-block; margin-top: 1rem; font-weight: 600; border: none; font-size: 1rem; cursor: pointer; }
.order-page .btn-go:hover { opacity: 0.9; color: #fff; }

.order-page .page-wrap { max-width: 700px; margin: 0 auto; }
.order-page .header {
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.order-page .header h1 { font-size: 1.4rem; font-weight: 700; color: #2c3e50; margin: 0 0 0.25rem; }
.order-page .header p { color: #6c757d; margin: 0; font-size: 0.9rem; }

.order-page .status-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,.2);
    margin-bottom: 1rem;
}
.order-page .status-icon { font-size: 4rem; color: #ffc107; margin-bottom: 1rem; }
.order-page .status-title { font-size: 1.4rem; font-weight: 700; color: #2c3e50; margin-bottom: 0.5rem; }
.order-page .status-desc { color: #6c757d; line-height: 1.8; margin-bottom: 1.5rem; }

.order-page .order-card {
    background: #fff;
    padding: 1.5rem;
    margin-top: 1px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.order-page .section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #495057;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.order-page .section-title i { color: #667eea; }

.order-page .order-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f1f3f5;
    gap: 1rem;
    flex-wrap: wrap;
}
.order-page .order-item:last-child { border-bottom: none; }
.order-page .order-label {
    color: #6c757d;
    font-size: 0.9rem;
    min-width: 100px;
    font-weight: 500;
}
.order-page .order-value {
    color: #212529;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
    flex: 1;
}
.order-page .order-value.highlight { color: #dc3545; font-size: 1.1rem; }
.order-page .order-value.password { font-family: monospace; background: #fff3cd; padding: 2px 8px; border-radius: 4px; font-size: 0.9rem; }

.order-page .order-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: left;
    margin-bottom: 1rem;
}
.order-page .order-summary .item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}
.order-page .order-summary .item:last-child { border-bottom: none; }
.order-page .order-summary .label { color: #6c757d; }
.order-page .order-summary .value { color: #212529; font-weight: 600; }

.order-page .contact-section { margin-top: 1.5rem; }
.order-page .contact-section p { color: #6c757d; font-size: 0.9rem; }
.order-page .contact-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 0.75rem; }
.order-page .contact-btns a {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}
.order-page .wa-btn { background: #25d366; }
.order-page .tg-btn { background: #0088cc; }

.order-page .pay-methods {
    background: #fff;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.order-page .pay-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}
.order-page .pay-card.primary {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}
.order-page .pay-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
}
.order-page .pay-content { text-align: center; }
.order-page .pay-qr-img {
    max-width: 220px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.order-page .fps-box {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px dashed #90caf9;
    border-radius: 12px;
    padding: 1.25rem;
    display: inline-block;
    min-width: 250px;
}
.order-page .fps-label { font-size: 0.85rem; color: #666; margin-bottom: 4px; }
.order-page .fps-id {
    font-size: 2rem;
    font-weight: 800;
    color: #1565c0;
    letter-spacing: 3px;
    cursor: pointer;
    margin-bottom: 0.5rem;
}
.order-page .amount-display {
    margin-top: 0.75rem;
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
}

.order-page .upload-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
}
.order-page #preview_img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    margin-top: 1rem;
}
.order-page .btn-submit {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.order-page .btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.order-page .btn-submit:not(:disabled):hover { transform: translateY(-2px); }

.order-page .success-box {
    text-align: center;
    padding: 2rem 1rem;
}
.order-page .success-box i {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .order-page .order-label { min-width: 80px; font-size: 0.85rem; }
    .order-page .order-value { font-size: 0.9rem; }
    .order-page .fps-id { font-size: 1.5rem; letter-spacing: 2px; }
    .order-page .header h1 { font-size: 1.2rem; }
}

/* ========== Order Page Dark Mode / 訂單頁暗黑模式 ========== */
@media (prefers-color-scheme: dark) {
    /* Order page body */
    .order-page .order-card {
        background: #1e293b !important;
        border-color: #334155 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    }

    .order-page .status-card {
        background: #1e293b !important;
        border-color: #334155 !important;
    }

    .order-page .pay-methods {
        background: #0f172a !important;
        border-color: #334155 !important;
    }

    .order-page .pay-methods h4 { color: #e2e8f0 !important; }
    .order-page .pay-methods p { color: #94a3b8 !important; }

    .order-page .upload-card {
        background: #1e293b !important;
        border-color: #334155 !important;
    }

    .order-page .upload-card h4 { color: #e2e8f0 !important; }

    .order-page .fps-box {
        background: #0f172a !important;
        border-color: #475569 !important;
    }

    .order-page .fps-box p { color: #94a3b8 !important; }

    .order-page .password {
        background: #0f172a !important;
        border-color: #475569 !important;
        color: #e2e8f0 !important;
    }

    .order-page .order-card h3 { color: #e2e8f0 !important; }
    .order-page .order-card p { color: #94a3b8 !important; }
    .order-page .order-card .price { color: #a78bfa !important; }

    .order-page .btn-submit {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    }

    .order-page .btn-submit:hover {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    }

    .order-page input[type="file"].form-control {
        background: #0f172a !important;
        border-color: #475569 !important;
        color: #e2e8f0 !important;
    }
}

/* ========== User Page Dark Mode Fixes / 用戶頁暗黑模式補充 ========== */
@media (prefers-color-scheme: dark) {
    .page-header {
        background: #161b22 !important;
        border-color: #30363d !important;
    }

    .page-header h1, .page-header h2, .page-header h3 { color: #e6edf3 !important; }

    .tab-content {
        background: #0d1117 !important;
        color: #c9d1d9 !important;
    }

    .btn-cancel-vip {
        background: #21262d !important;
        color: #ff9800 !important;
        border-color: #ff9800 !important;
    }

    .btn-cancel-vip:hover {
        background: #ff9800 !important;
        color: #0d1117 !important;
    }

    /* Ensure all white backgrounds in cards are dark */
    .ep-file-input, .ban-file-input, .rp-file-input {
        background: #0d1117 !important;
        border-color: #30363d !important;
    }

    /* Payment time inputs */
    input[type="datetime-local"].form-control {
        background: #0d1117 !important;
        border-color: #30363d !important;
        color: #c9d1d9 !important;
    }
}
/* ── Expiry Re-activation Discount styles ── */
.ep-discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff4d4d, #ff8800);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 4px;
    letter-spacing: 0.03em;
    animation: ep-pulse 1.6s ease-in-out infinite;
}
@keyframes ep-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,77,77,0.4); }
    50%       { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(255,77,77,0); }
}
.ep-original-price {
    color: #999;
    font-size: 0.85em;
    text-decoration: line-through;
    margin-right: 4px;
}
.ep-discounted-price {
    color: #ff4d4d;
    font-weight: 800;
    font-size: 1.1em;
}
.ep-badge-red { background: #ffe0e0; color: #c0392b; }
.ep-badge-strikethrough { text-decoration: line-through; opacity: 0.75; }
.ep-badge-discount {
    background: linear-gradient(135deg, #ff4d4d, #ff8800);
    color: #fff;
    font-weight: 700;
    animation: ep-pulse 1.6s ease-in-out infinite;
}
