/* -----------------------------------------------------
   Global Application Theme
   ----------------------------------------------------- */
:root {
    --bg-primary: #0b1221;
    --bg-secondary: rgba(15, 23, 42, 0.78);
    --bg-elevated: rgba(15, 23, 42, 0.88);
    --bg-hover: rgba(62, 84, 118, 0.45);
    --text-primary: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-cyan: #22d3ee;
    --accent-emerald: #34d399;
    --border-soft: rgba(148, 163, 184, 0.18);
    --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.4);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body{
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    background:
        radial-gradient(120% 120% at 10% 20%, rgba(34, 211, 238, 0.22), transparent),
        radial-gradient(80% 100% at 90% 10%, rgba(129, 140, 248, 0.2), transparent),
        radial-gradient(80% 120% at 50% 0%, rgba(15, 118, 110, 0.25), transparent),
        var(--bg-primary) !important;
    background-attachment: fixed;
    color: var(--text-primary) !important;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.55), rgba(17, 24, 39, 0.85));
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: opacity 0.2s ease, color 0.2s ease;
}

a:hover {
    opacity: 0.85;
}

.app-shell {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(1.5rem, 2vw + 1rem, 3rem) clamp(1.25rem, 2vw, 2.5rem) 5rem;
}

.app-shell > * + * {
    margin-top: clamp(1.5rem, 2vw, 2.75rem);
}

.glass-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: clamp(1.5rem, 1.5vw + 1rem, 2.25rem);
}

.glass-card--minimal {
    background: rgba(15, 23, 42, 0.6);
}

.section-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
}

.input-control,
.select-control,
.textarea-control {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 0.65rem 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.2);
}

.input-control:focus,
.select-control:focus,
.textarea-control:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

.textarea-control {
    min-height: 110px;
    resize: vertical;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.brand-title {
    color: #e2e8f0;
    transition: color 0.2s ease;
}

.brand-subtitle {
    color: rgba(148, 163, 184, 0.82);
    transition: color 0.2s ease;
}

.pill-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pill-option:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.pill-option.is-active {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent-cyan);
    box-shadow: 0 8px 18px rgba(34, 211, 238, 0.18);
}

.text-primary {
    color: var(--text-primary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.panel-heading h2 {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 600;
    color: var(--text-primary);
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent-cyan);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    border: 1px solid rgba(34, 211, 238, 0.35);
}

.bg-white,
.bg-gray-50,
.bg-gray-100,
.bg-gray-200 {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-soft) !important;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.text-gray-900,
.text-gray-800,
.text-gray-700,
.text-gray-600 {
    color: var(--text-primary) !important;
}

.text-gray-500,
.text-gray-400 {
    color: var(--text-muted) !important;
}

.border,
.border-gray-100,
.border-gray-200,
.border-gray-300 {
    border-color: var(--border-soft) !important;
}

.table,
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

table thead {
    background: rgba(15, 23, 42, 0.9);
}

table thead th {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

table tbody tr {
    transition: background 0.2s ease, transform 0.1s ease;
}

table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.35);
}

table tbody tr:hover {
    background: rgba(34, 211, 238, 0.08);
    transform: translateY(-1px);
}

table td {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

input,
select,
textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.68);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.22);
}

button,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.85), rgba(59, 130, 246, 0.9));
    color: #0f172a;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.4rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.2s ease, opacity 0.18s ease;
    box-shadow: 0 12px 24px rgba(34, 211, 238, 0.24);
}

button:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.3);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: var(--radius-sm);
    background: rgba(248, 113, 113, 0.2);
    color: rgba(248, 113, 113, 0.95);
    border: 1px solid rgba(248, 113, 113, 0.45);
    padding: 0.45rem 0.9rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.35);
    color: rgba(254, 226, 226, 0.95);
}

.btn-danger:active {
    transform: translateY(1px);
}

.metric-card {
    display: grid;
    gap: 0.85rem;
    padding: clamp(1.1rem, 1.2vw, 1.6rem);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.5);
}

.metric-card .label {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.metric-card .value {
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.05;
    max-width: 100%;
    white-space: normal;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.35);
}

.badge--danger {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.4);
}

.badge--success {
    background: rgba(74, 222, 128, 0.15);
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.4);
}

.badge--warning {
    background: rgba(250, 204, 21, 0.18);
    color: #fde68a;
    border-color: rgba(250, 204, 21, 0.45);
}

.badge--info {
    background: rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, 0.45);
}

.grid-auto-fit {
    display: grid;
    gap: clamp(1rem, 1.2vw, 1.8rem);
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card-scroll {
    overflow: auto;
    border-radius: var(--radius-md);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.7);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.65), rgba(14, 165, 233, 0.5));
    border-radius: 999px;
}

/* =====================================================
   SPLIT PANEL LOGIN - EVALLISH BPO
   ===================================================== */

.split-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1a2332 0%, #0f172a 100%);
}

.split-login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    height: auto;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Split Panels */
.split-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    overflow-y: auto;
}

/* Brand Panel (Left) */
.brand-panel {
    background: linear-gradient(135deg, #4A90E2 0%, #5B9BD5 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
}

.brand-panel::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    border-radius: 50%;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 400px;
}

.panel-logo {
    width: 100px;
    height: auto;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
    animation: fadeInDown 0.8s ease-out 0.3s both;
}

.panel-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
    margin: 0 0 2.5rem;
    animation: fadeInDown 0.8s ease-out 0.4s both;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeInLeft 0.6s ease-out both;
}

.feature-item:nth-child(1) { animation-delay: 0.5s; }
.feature-item:nth-child(2) { animation-delay: 0.6s; }
.feature-item:nth-child(3) { animation-delay: 0.7s; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item i {
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Form Panel (Right) */
.form-panel {
    background: #f8fafc;
}

.form-content {
    width: 100%;
    max-width: 400px;
    animation: fadeInRight 0.8s ease-out 0.3s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4A90E2, #5B9BD5);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
}

.form-icon i {
    font-size: 1.75rem;
    color: #ffffff;
}

.form-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.form-welcome {
    display: inline-block;
    color: #4A90E2;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.form-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0.5rem 0 0.625rem;
}

.form-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* Form Error */
.form-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.form-error i {
    font-size: 1rem;
}

/* Split Form */
.split-form {
    margin-bottom: 1.25rem;
}

.form-field-split {
    margin-bottom: 1rem;
}

.form-field-split label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
}

.form-field-split input {
    width: 100%;
    padding: 0.8rem 0.95rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #1e293b;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-field-split input::placeholder {
    color: #94a3b8;
}

.form-field-split input:hover {
    border-color: #cbd5e1;
}

.form-field-split input:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Submit Button */
.split-submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #4A90E2 0%, #5B9BD5 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
    margin-top: 0.5rem;
}

.split-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.4);
}

.split-submit-btn:active {
    transform: translateY(0);
}

/* Forgot Link */
.split-forgot-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #4A90E2;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
}

.split-forgot-link:hover {
    color: #5B9BD5;
    background: rgba(74, 144, 226, 0.08);
}

/* Theme Switch Inline */
.theme-switch-inline {
    margin-top: 1.25rem;
    text-align: center;
}

.theme-btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-btn-inline:hover {
    border-color: #4A90E2;
    color: #4A90E2;
}

/* Footer Text */
.form-footer-text {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.form-footer-text p {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 968px) {
    .split-login-wrapper {
        flex-direction: column;
        height: auto;
        max-width: 500px;
    }
    
    .brand-panel {
        padding: 2.5rem 2rem;
    }
    
    .panel-title {
        font-size: 2rem;
    }
    
    .features-list {
        gap: 1rem;
    }
    
    .feature-item {
        font-size: 0.9rem;
    }
    
    .form-panel {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 640px) {
    .split-login-container {
        padding: 1rem;
    }
    
    .brand-panel,
    .form-panel {
        padding: 2rem 1.5rem;
    }
    
    .panel-logo {
        width: 100px;
    }
    
    .panel-title {
        font-size: 1.75rem;
    }
    
    .form-icon {
        width: 60px;
        height: 60px;
    }
    
    .form-icon i {
        font-size: 1.75rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
}

form .form-group {
    display: grid;
    gap: 0.4rem;
}

.input-icon {
    position: relative;
}

.input-icon .input-control {
    padding-right: 2.5rem;
}

.input-icon .input-icon__element {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

form .form-group + .form-group {
    margin-top: 1rem;
}

.status-banner {
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.status-banner.error {
    background: rgba(248, 113, 113, 0.2);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #fecaca;
}

.status-banner.success {
    background: rgba(74, 222, 128, 0.18);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #bbf7d0;
}

.fade-in {
    animation: fadeIn 0.45s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-panel {
    position: relative;
    height: 320px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-lg);
    padding: 1.2rem;
}

.pill-switch {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.pill-switch button {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.pill-switch button.is-active {
    background: rgba(34, 211, 238, 0.2);
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.35);
}

.agent-shell {
    max-width: 1100px;
}

.text-balance {
    text-wrap: balance;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: clamp(2rem, 3vw, 2.75rem);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
    box-shadow: var(--shadow-lg);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(34, 211, 238, 0.25), transparent 55%),
        radial-gradient(110% 140% at 100% 0%, rgba(59, 130, 246, 0.28), transparent 50%);
    opacity: 0.75;
    pointer-events: none;
}

.page-hero-content {
    position: relative;
    display: grid;
    gap: 1.4rem;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.page-hero p {
    margin: 0;
    max-width: 38rem;
    color: rgba(226, 232, 240, 0.75);
    font-size: 0.98rem;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-meta .chip {
    background: rgba(226, 232, 240, 0.16);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.responsive-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.responsive-scroll::-webkit-scrollbar {
    height: 8px;
}

.responsive-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.38);
    border-radius: 999px;
}

.responsive-scroll table {
    min-width: 720px;
}

@media (max-width: 640px) {
    .responsive-scroll table {
        min-width: 560px;
    }
}

.mobile-nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.65);
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-nav-toggle:hover {
    background: rgba(34, 211, 238, 0.18);
    border-color: rgba(34, 211, 238, 0.4);
    color: #22d3ee;
}

.main-nav {
    transition: all 0.2s ease-in-out;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-button {
    width: auto;
}

.nav-dropdown.is-open [data-nav-dropdown-icon] {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    display: none;
    flex-direction: column;
    min-width: 220px;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 18px 35px rgba(8, 47, 73, 0.35);
    backdrop-filter: blur(12px);
    z-index: 20;
}

.nav-dropdown.is-open .nav-dropdown-menu {
    display: flex;
}

.nav-dropdown-menu .nav-dropdown-link + .nav-dropdown-link {
    margin-top: 0.35rem;
}

@media (max-width: 1024px) {
    .panel-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .panel-heading > * + * {
        margin-top: 0.75rem;
    }

    .panel-heading .chip,
    .panel-heading .btn-primary,
    .panel-heading .btn-secondary {
        align-self: flex-start;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-button {
        width: 100%;
        justify-content: center;
    }

    .nav-dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0.35rem;
        box-shadow: none;
        border: 1px solid rgba(148, 163, 184, 0.28);
        background: rgba(15, 23, 42, 0.88);
    }
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
}

.data-table thead th {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.92);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.32), rgba(13, 148, 136, 0.28));
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.45);
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.data-table tbody td {
    font-size: 0.92rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.table-actions .btn-primary,
.table-actions .btn-secondary {
    min-width: 9rem;
}

.dt-button-hidden {
    display: none !important;
}

.agent-dashboard,
.agent-records {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-hero {
    position: relative;
    padding: clamp(1.75rem, 2vw + 1.25rem, 2.5rem);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.08));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 0% 0%, rgba(14, 165, 233, 0.22), transparent);
    opacity: 0.6;
    pointer-events: none;
}

.dashboard-hero .hero-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.hero-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-metric {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.hero-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    text-align: center;
}

.hero-progress .progress-circle {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: conic-gradient(#22d3ee var(--progress, 0%), rgba(148, 163, 184, 0.25) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #e0f2fe;
}

.hero-progress .progress-circle::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.hero-progress .progress-circle span {
    position: relative;
    z-index: 1;
}

.hero-range-filter {
    margin-top: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.hero-range-filter label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hero-range-filter .input-control {
    width: 180px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.metric-card {
    position: relative;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    overflow: visible;
}

.metric-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--metric-start, rgba(59, 130, 246, 0.35)) 0%, var(--metric-end, rgba(13, 148, 136, 0.32)) 100%);
    opacity: 0.45;
    z-index: -1;
}

.metric-card .metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(241, 245, 249, 0.92);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.35);
}

.metric-card .metric-label {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.72);
    margin-bottom: 0.4rem;
}

.metric-card .metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f8fafc;
}

.metric-card .metric-sub {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.6);
    margin-top: 0.3rem;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.chart-card canvas {
    width: 100%;
    max-width: 360px;
}

.chart-card.is-empty canvas {
    opacity: 0.18;
}

.chart-empty {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

.timeline-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 6px;
    width: 2px;
    background: rgba(148, 163, 184, 0.25);
}

.timeline-item {
    position: relative;
    padding-left: 0.75rem;
}

.timeline-dot {
    position: absolute;
    top: 0.3rem;
    left: -1.05rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--dot-color, #38BDF8);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.timeline-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-title i {
    font-size: 0.75rem;
    opacity: 0.75;
}

.timeline-time {
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.6);
    margin-top: 0.2rem;
}

.timeline-empty {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.table-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.table-card header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.table-card header span {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.custom-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-lg);
}

.custom-table thead th {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.85);
    background: linear-gradient(135deg, rgba(214, 226, 255, 0.85), rgba(191, 219, 254, 0.75));
}

.custom-table tbody td {
    font-size: 0.92rem;
    color: var(--text-primary);
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.custom-table tbody tr:hover {
    background: rgba(34, 211, 238, 0.08);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.35);
}

body.theme-dark .data-table thead th {
    color: rgba(226, 232, 240, 0.92);
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.55), rgba(8, 145, 178, 0.5));
}

body.theme-light .data-table thead th {
    color: rgba(15, 23, 42, 0.82);
    background: linear-gradient(135deg, rgba(191, 219, 254, 0.75), rgba(125, 211, 252, 0.65));
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    text-shadow: none;
}

body.theme-dark .custom-table thead th {
    color: rgba(226, 232, 240, 0.9);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.5), rgba(6, 148, 162, 0.45));
}

@media (max-width: 768px) {
    .app-shell {
        padding: 1.5rem 1.25rem 4rem;
    }

    .glass-card {
        padding: 1.25rem;
    }

    table th,
    table td {
        padding: 0.75rem;
    }

    .metric-card {
        padding: 1rem;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        width: 100%;
        justify-content: center;
    }

    .page-hero {
        padding: 1.75rem;
    }

    .page-hero-content {
        gap: 1.1rem;
    }

    .main-nav {
        display: none !important;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(148, 163, 184, 0.18);
    }

    .main-nav[data-open="true"] {
        display: flex !important;
    }

    .main-nav > * {
        width: 100%;
    }

    .main-nav a,
    .main-nav button {
        justify-content: center;
        width: 100%;
    }

    .main-nav form {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .table-actions {
        flex-direction: column;
    }
}
body.theme-dark {
    --bg-primary: #0b1221;
    --bg-secondary: rgba(15, 23, 42, 0.82);
    --bg-elevated: rgba(15, 23, 42, 0.9);
    --bg-hover: rgba(62, 84, 118, 0.45);
    --text-primary: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-cyan: #22d3ee;
    --accent-emerald: #34d399;
    --border-soft: rgba(148, 163, 184, 0.18);
    --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.4);
}

body.theme-light {
    --bg-primary: #f8fafc;
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-elevated: rgba(255, 255, 255, 0.98);
    --bg-hover: rgba(226, 232, 240, 0.7);
    --text-primary: #1f2937;
    --text-muted: #4b5563;
    --accent-cyan: #0ea5e9;
    --accent-emerald: #10b981;
    --border-soft: rgba(148, 163, 184, 0.28);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
}

body.theme-light {
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.65), rgba(241, 245, 249, 0.9)) !important;
    color: var(--text-primary) !important;
}

body.theme-light::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(226, 232, 240, 0.75));
}

body.theme-light a {
    color: #2563eb;
}

body.theme-light a:hover {
    opacity: 0.9;
}

body.theme-light .glass-card {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

body.theme-light .section-card {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

body.theme-light .bg-white,
body.theme-light .bg-gray-50,
body.theme-light .bg-gray-100,
body.theme-light .bg-gray-200 {
    background: rgba(255, 255, 255, 0.98) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

body.theme-light table {
    background: rgba(255, 255, 255, 0.98);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

body.theme-light table thead {
    background: rgba(248, 250, 252, 0.9);
}

body.theme-light table tbody tr:nth-child(even) {
    background: rgba(241, 245, 249, 0.65);
}

body.theme-light table tbody tr:hover {
    background: rgba(191, 219, 254, 0.4);
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea {
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}

body.theme-light .metric-card {
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

body.theme-light .input-control,
body.theme-light .select-control,
body.theme-light .textarea-control {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

body.theme-light .input-control:focus,
body.theme-light .select-control:focus,
body.theme-light .textarea-control:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

body.theme-light .badge {
    background: rgba(14, 165, 233, 0.12);
    color: #0e7490;
    border-color: rgba(14, 165, 233, 0.35);
}
body.theme-light .badge--danger {
    background: rgba(248, 113, 113, 0.18);
    color: #b91c1c;
    border-color: rgba(248, 113, 113, 0.35);
}
body.theme-light .badge--success {
    background: rgba(34, 197, 94, 0.18);
    color: #047857;
    border-color: rgba(34, 197, 94, 0.35);
}
body.theme-light .badge--warning {
    background: rgba(250, 204, 21, 0.2);
    color: #b45309;
    border-color: rgba(250, 204, 21, 0.4);
}
body.theme-light .badge--info {
    background: rgba(59, 130, 246, 0.18);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.35);
}

.page-hero .chip {
    color: rgba(226, 232, 240, 0.92);
    background: rgba(148, 163, 184, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.32);
}

body.theme-light .page-hero .chip {
    color: rgba(241, 245, 249, 0.98);
    background: rgba(15, 23, 42, 0.35);
    border-color: rgba(148, 163, 184, 0.45);
}

body.theme-light .brand-title {
    color: #1f2937;
}

body.theme-light .brand-subtitle {
    color: #475569;
}

body.theme-light .btn-secondary {
    background: rgba(226, 232, 240, 0.9);
    color: #1f2937;
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

body.theme-light .btn-danger {
    background: rgba(248, 113, 113, 0.12);
    color: #b91c1c;
    border-color: rgba(248, 113, 113, 0.35);
    box-shadow: 0 8px 18px rgba(248, 113, 113, 0.18);
}

body.theme-light .app-shell {
    padding-bottom: 4rem;
}

body.theme-light .login-card h2,
body.theme-light .panel-heading h2 {
    color: var(--text-primary);
}

body.theme-light .status-banner.error {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.35);
    color: #991b1b;
}

body.theme-light .status-banner.success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #065f46;
}

.site-footer .footer-title {
    color: #f1f5f9;
}

.site-footer .footer-text,
.site-footer .footer-links a,
.site-footer .footer-text-muted {
    color: rgba(203, 213, 225, 0.85);
}

.site-footer .footer-links a:hover {
    color: var(--accent-cyan);
}

body.theme-light .site-footer {
    background: rgba(248, 250, 252, 0.92);
    border-color: rgba(203, 213, 225, 0.6);
}

body.theme-light .site-footer .footer-title {
    color: #1f2937;
}

body.theme-light .site-footer .footer-text,
body.theme-light .site-footer .footer-links a,
body.theme-light .site-footer .footer-text-muted {
    color: #475569;
}

body.theme-light .site-footer .footer-links a:hover {
    color: #2563eb;
}


.manage-users-table th {
    white-space: nowrap;
}

.manage-users-table td {
    vertical-align: middle;
}

.manage-users-table input.input-control,
.manage-users-table select.select-control {
    min-width: 110px;
    width: 100%;
}

.manage-users-table .input-control,
.manage-users-table .select-control {
    text-align: center;
}

.manage-users-table .text-primary,
.manage-users-table .text-muted {
    text-align: left;
}

.manage-users-table td:first-child,
.manage-users-table td:nth-child(2) {
    min-width: 160px;
}

.manage-users-table td:last-child {
    min-width: 120px;
}

.unauthorized-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.78));
    padding: 2rem;
}

.unauthorized-card {
    width: min(420px, 100%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    text-align: center;
}

.unauthorized-card h1 {
    margin-bottom: 1rem;
    font-size: 1.75rem;
    color: var(--text-primary);
}

.unauthorized-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

body.theme-light .unauthorized-page {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.65));
}

body.theme-light .unauthorized-card {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(203, 213, 225, 0.5);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.12);
}

body.theme-light .dashboard-hero {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(34, 211, 238, 0.18));
    border-color: rgba(148, 163, 184, 0.3);
}

body.theme-light .dashboard-hero::after {
    background: radial-gradient(140% 120% at 0% 0%, rgba(56, 189, 248, 0.35), transparent);
    opacity: 0.5;
}

body.theme-light .hero-metric {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(203, 213, 225, 0.6);
    color: #1e293b;
}

body.theme-light .hero-progress .progress-circle {
    background: conic-gradient(#0ea5e9 var(--progress, 0%), rgba(203, 213, 225, 0.45) 0);
    color: #0f172a;
}

body.theme-light .hero-progress .progress-circle::after {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(148, 163, 184, 0.4);
}

body.theme-light .hero-range-filter label {
    color: #475569;
}

body.theme-light .metric-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(148, 163, 184, 0.28);
    color: #0f172a;
}

body.theme-light .metric-card::before {
    opacity: 0.55;
}

body.theme-light .metric-card .metric-icon {
    background: rgba(15, 23, 42, 0.08);
    color: #1f2937;
}

body.theme-light .metric-card .metric-label {
    color: rgba(71, 85, 105, 0.85);
}

body.theme-light .metric-card .metric-sub {
    color: rgba(71, 85, 105, 0.8);
}

body.theme-light .glass-card.timeline-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(148, 163, 184, 0.3);
}

body.theme-light .timeline::before {
    background: rgba(148, 163, 184, 0.35);
}

body.theme-light .timeline-title {
    color: #1f2937;
}

body.theme-light .timeline-time {
    color: rgba(71, 85, 105, 0.8);
}

body.theme-light .timeline-empty {
    color: rgba(71, 85, 105, 0.75);
}

body.theme-light .chart-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(148, 163, 184, 0.3);
}

body.theme-light .chart-empty {
    color: rgba(71, 85, 105, 0.75);
}

body.theme-light .table-card header span {
    color: rgba(71, 85, 105, 0.75);
}

body.theme-light .timeline-dot {
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25);
}
body.theme-light .metric-card .metric-value {
    color: #0f172a;
    opacity: 1;
}

body.theme-light .metric-card .metric-icon {
    background: rgba(15, 23, 42, 0.08);
    color: #1f2937;
    box-shadow: 0 10px 15px rgba(15, 23, 42, 0.08);
}

body.theme-light .metric-card .metric-label,
body.theme-light .metric-card .metric-sub {
    color: rgba(71, 85, 105, 0.8);
}

body.theme-light .hero-progress .progress-circle {
    color: #0f172a;
}

body.theme-light .hero-progress .progress-circle span {
    opacity: 1;
}

body.theme-light .hero-metric {
    color: #1f2937;
}

body.theme-light .hero-metric .text-muted {
    color: rgba(71, 85, 105, 0.75);
}

/* ===== LIGHT MODE COMPREHENSIVE FIXES ===== */

/* Text colors for light mode */
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4,
body.theme-light h5,
body.theme-light h6 {
    color: #1f2937 !important;
}

body.theme-light p {
    color: #374151;
}

/* Tailwind text utilities override for light mode */
body.theme-light .text-white {
    color: #1f2937 !important;
}

body.theme-light .text-slate-300,
body.theme-light .text-slate-400 {
    color: #64748b !important;
}

body.theme-light .text-slate-500 {
    color: #475569 !important;
}

body.theme-light .text-slate-600,
body.theme-light .text-slate-700 {
    color: #334155 !important;
}

body.theme-light .text-slate-800,
body.theme-light .text-slate-900 {
    color: #1e293b !important;
}

/* Background colors for light mode */
body.theme-light .bg-slate-800,
body.theme-light .bg-slate-900 {
    background: rgba(248, 250, 252, 0.95) !important;
    color: #1f2937 !important;
}

body.theme-light .bg-slate-700 {
    background: rgba(241, 245, 249, 0.95) !important;
    color: #1f2937 !important;
}

body.theme-light .bg-slate-800\/50 {
    background: rgba(248, 250, 252, 0.9) !important;
    color: #1f2937 !important;
}

/* Border colors for light mode */
body.theme-light .border-slate-700,
body.theme-light .border-slate-800 {
    border-color: rgba(203, 213, 225, 0.5) !important;
}

/* Pills and options */
body.theme-light .pill-option {
    background: rgba(248, 250, 252, 0.95);
    color: #1f2937;
    border-color: rgba(148, 163, 184, 0.4);
}

body.theme-light .pill-option:hover {
    background: rgba(226, 232, 240, 0.9);
}

body.theme-light .pill-option.is-active {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.4);
}

/* Chips */
body.theme-light .chip {
    background: rgba(226, 232, 240, 0.8);
    color: #475569;
    border-color: rgba(148, 163, 184, 0.4);
}

/* Page hero */
body.theme-light .page-hero {
    background: linear-gradient(145deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.9));
    border-color: rgba(203, 213, 225, 0.5);
}

body.theme-light .page-hero h1 {
    color: #0f172a !important;
}

body.theme-light .page-hero p {
    color: rgba(71, 85, 105, 0.9);
}

/* Login card */
body.theme-light .login-card {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(203, 213, 225, 0.5);
}

/* Mobile nav toggle */
body.theme-light .mobile-nav-toggle {
    background: rgba(248, 250, 252, 0.95);
    color: #1f2937;
    border-color: rgba(148, 163, 184, 0.4);
}

body.theme-light .mobile-nav-toggle:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
}

/* Navigation dropdown */
body.theme-light .nav-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(203, 213, 225, 0.5);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.15);
}

body.theme-light .nav-dropdown-link {
    color: #1f2937;
}

body.theme-light .nav-dropdown-link:hover {
    background: rgba(226, 232, 240, 0.8);
    color: #0f172a;
}

/* Form labels */
body.theme-light .form-label {
    color: #475569;
}

/* Scrollbar for light mode */
body.theme-light ::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.9);
}

body.theme-light ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.6), rgba(37, 99, 235, 0.5));
}

/* Chart panel */
body.theme-light .chart-panel {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(203, 213, 225, 0.4);
}

/* Data table */
body.theme-light .data-table {
    background: rgba(255, 255, 255, 0.98);
    color: #1f2937;
}

body.theme-light .data-table tbody td {
    color: #1f2937;
}

/* -----------------------------------------------------
   Status Banner Styles
   ----------------------------------------------------- */
.status-banner {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.925rem;
    line-height: 1.5;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.status-banner.success {
    background: rgba(34, 211, 142, 0.15);
    border-color: rgba(34, 211, 142, 0.35);
    color: #6ee7b7;
}

.status-banner.error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.status-banner.warning {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fcd34d;
}

.status-banner {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Light mode adjustments */
body.theme-light .status-banner.success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    color: #15803d;
}

body.theme-light .status-banner.error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #b91c1c;
}

body.theme-light .status-banner.warning {
    background: rgba(251, 146, 60, 0.12);
    border-color: rgba(251, 146, 60, 0.3);
    color: #c2410c;
}

/* Custom table */
body.theme-light .custom-table tbody td {
    color: #1f2937;
}

/* Status badge */
body.theme-light .status-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.4);
}

/* Tag pill */
body.theme-light .tag-pill {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.4);
}

/* Pill switch */
body.theme-light .pill-switch {
    background: rgba(226, 232, 240, 0.8);
    border-color: rgba(148, 163, 184, 0.4);
}

body.theme-light .pill-switch button {
    color: #475569;
}

body.theme-light .pill-switch button.is-active {
    background: rgba(59, 130, 246, 0.2);
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.4);
}

/* Input placeholders */
body.theme-light input::placeholder,
body.theme-light textarea::placeholder {
    color: rgba(107, 114, 128, 0.6);
}

/* Specific color classes for light mode */
body.theme-light .text-cyan-400,
body.theme-light .text-cyan-300 {
    color: #0e7490 !important;
}

body.theme-light .text-blue-400,
body.theme-light .text-blue-300 {
    color: #1e40af !important;
}

body.theme-light .text-green-400,
body.theme-light .text-green-300 {
    color: #047857 !important;
}

body.theme-light .text-purple-400,
body.theme-light .text-purple-300 {
    color: #6b21a8 !important;
}

body.theme-light .text-yellow-400,
body.theme-light .text-yellow-300 {
    color: #b45309 !important;
}

body.theme-light .text-red-400,
body.theme-light .text-red-300 {
    color: #b91c1c !important;
}

body.theme-light .text-pink-400,
body.theme-light .text-pink-300 {
    color: #be185d !important;
}

body.theme-light .text-indigo-400,
body.theme-light .text-indigo-300 {
    color: #4338ca !important;
}

body.theme-light .text-orange-400,
body.theme-light .text-orange-300 {
    color: #c2410c !important;
}

/* Background gradient fixes */
body.theme-light .bg-blue-500\/20,
body.theme-light .bg-blue-500\/10 {
    background: rgba(59, 130, 246, 0.15) !important;
}

body.theme-light .bg-green-500\/20,
body.theme-light .bg-green-500\/10 {
    background: rgba(34, 197, 94, 0.15) !important;
}

body.theme-light .bg-purple-500\/20,
body.theme-light .bg-purple-500\/10 {
    background: rgba(168, 85, 247, 0.15) !important;
}

body.theme-light .bg-yellow-500\/20,
body.theme-light .bg-yellow-500\/10 {
    background: rgba(234, 179, 8, 0.15) !important;
}

body.theme-light .bg-red-500\/20,
body.theme-light .bg-red-500\/10 {
    background: rgba(239, 68, 68, 0.15) !important;
}

body.theme-light .bg-cyan-500\/20,
body.theme-light .bg-cyan-500\/10 {
    background: rgba(6, 182, 212, 0.15) !important;
}

/* Ensure all icons are visible */
body.theme-light i.fas,
body.theme-light i.far,
body.theme-light i.fab {
    opacity: 0.85;
}

/* Header adjustments */
body.theme-light header {
    background: linear-gradient(to right, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.95)) !important;
    border-color: rgba(203, 213, 225, 0.5) !important;
}

/* Ensure proper contrast for all text elements */
body.theme-light .glass-card *:not(i):not(.badge):not(.chip):not(.btn-primary):not(.btn-secondary):not(.btn-danger) {
    color: inherit;
}

body.theme-light .section-card *:not(i):not(.badge):not(.chip):not(.btn-primary):not(.btn-secondary):not(.btn-danger) {
    color: inherit;
}

/* CRITICAL: Force all white text to dark in light mode */
body.theme-light *:not(.btn-primary):not(.btn-primary *) {
    color: #1f2937 !important;
}

body.theme-light .text-white,
body.theme-light .text-slate-100,
body.theme-light .text-slate-200 {
    color: #1f2937 !important;
}

/* Buttons redesign for better visibility */
body.theme-light .btn-primary,
body.theme-light button.btn-primary,
body.theme-light a.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
    font-weight: 600 !important;
}

body.theme-light .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4) !important;
}

body.theme-light .btn-secondary,
body.theme-light button.btn-secondary,
body.theme-light a.btn-secondary {
    background: #f1f5f9 !important;
    color: #1f2937 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
    font-weight: 600 !important;
}

body.theme-light .btn-secondary:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    transform: translateY(-1px);
}

body.theme-light .btn-danger,
body.theme-light button.btn-danger,
body.theme-light a.btn-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15) !important;
    font-weight: 600 !important;
}

body.theme-light .btn-danger:hover {
    background: #fecaca !important;
    color: #7f1d1d !important;
    transform: translateY(-1px);
}

/* Card text fixes */
body.theme-light .glass-card,
body.theme-light .section-card,
body.theme-light .metric-card {
    color: #1f2937 !important;
}

body.theme-light .glass-card h1,
body.theme-light .glass-card h2,
body.theme-light .glass-card h3,
body.theme-light .glass-card h4,
body.theme-light .glass-card p,
body.theme-light .glass-card span,
body.theme-light .glass-card div {
    color: #1f2937 !important;
}

body.theme-light .section-card h1,
body.theme-light .section-card h2,
body.theme-light .section-card h3,
body.theme-light .section-card h4,
body.theme-light .section-card p,
body.theme-light .section-card span,
body.theme-light .section-card div {
    color: #1f2937 !important;
}

/* Input and select visibility */
body.theme-light input,
body.theme-light select,
body.theme-light textarea {
    color: #1f2937 !important;
    background: #ffffff !important;
}

/* Labels must be visible */
body.theme-light label {
    color: #374151 !important;
}

/* All paragraph and span text */
body.theme-light p,
body.theme-light span:not(.badge):not(.chip) {
    color: #374151 !important;
}

/* Specific overrides for problematic elements */
body.theme-light .text-slate-300,
body.theme-light .text-slate-400,
body.theme-light .text-gray-300,
body.theme-light .text-gray-400 {
    color: #64748b !important;
}

/* Navigation items */
body.theme-light nav a,
body.theme-light nav button {
    color: #1f2937 !important;
}

body.theme-light nav a:hover,
body.theme-light nav button:hover {
    color: #0f172a !important;
}

/* Ensure badges and status elements are visible */
body.theme-light .badge {
    color: #1e40af !important;
    background: rgba(59, 130, 246, 0.15) !important;
}

body.theme-light .badge.bg-green-500,
body.theme-light .bg-green-500 {
    background: #dcfce7 !important;
    color: #166534 !important;
}

body.theme-light .badge.bg-red-500,
body.theme-light .bg-red-500 {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

body.theme-light .badge.bg-yellow-500,
body.theme-light .bg-yellow-500 {
    background: #fef3c7 !important;
    color: #92400e !important;
}

body.theme-light .badge.bg-blue-500,
body.theme-light .bg-blue-500 {
    background: #dbeafe !important;
    color: #1e40af !important;
}
/ *   C a c h e   B u s t e r   * / 
 
 

/* ==============================================
   Theme Toggle Button
   ============================================== */
.theme-toggle-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A90E2 0%, #5B9BD5 100%);
    border: none;
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.4),
                0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    overflow: hidden;
}

.theme-toggle-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 32px rgba(74, 144, 226, 0.5),
                0 6px 12px rgba(0, 0, 0, 0.3);
}

.theme-toggle-btn:hover::before {
    opacity: 1;
}

.theme-toggle-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4),
                0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn i {
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover i {
    transform: rotate(20deg);
}

/* Light mode styles for toggle button */
body.theme-light .theme-toggle-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4),
                0 4px 8px rgba(0, 0, 0, 0.15);
}

body.theme-light .theme-toggle-btn:hover {
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5),
                0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .theme-toggle-btn {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}
