/**
 * QLVT Pro V8 — Premium Design System
 * Artisan-grade UI · Glass Morphism · Depth Layering
 * @version 4.0.0
 * @date 2026-02-08
 * @author @Designer + @Frontend_Layout
 */

/* ═══════════════════════════════════════════════════════════════════════════════
   0. AMBIENT CANVAS — Subtle living background
   ═══════════════════════════════════════════════════════════════════════════════ */

.main {
    background:
        radial-gradient(ellipse 80% 60% at 10% 80%, rgba(6, 182, 212, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 20%, rgba(99, 102, 241, 0.035) 0%, transparent 55%),
        radial-gradient(ellipse 70% 70% at 50% 50%, rgba(15, 23, 42, 0) 0%, transparent 100%),
        linear-gradient(165deg, #080d1a 0%, #0c1222 30%, #0f172a 60%, #0e1525 100%);
    min-height: 100vh;
}

.app {
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   1. SIDEBAR — Premium Navigation · Frosted Glass · Depth
   ═══════════════════════════════════════════════════════════════════════════════ */

.sidebar {
    background:
        linear-gradient(180deg,
            rgba(10, 15, 30, 0.97) 0%,
            rgba(15, 22, 40, 0.95) 35%,
            rgba(12, 18, 35, 0.97) 100%);
    border-right: 1px solid rgba(99, 102, 241, 0.06);
    box-shadow:
        4px 0 32px rgba(0, 0, 0, 0.25),
        1px 0 0 rgba(148, 163, 184, 0.04);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                min-width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: var(--z-fixed, 300);
}

/* Ambient light on sidebar */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(ellipse 100% 100% at 50% -20%, rgba(34, 211, 238, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.15);
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.3);
}

/* ─── Sidebar Header ─── */
.sidebar-header {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10, 15, 30, 0.85);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-logo .icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 8px rgba(6, 182, 212, 0.3));
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.sidebar-logo h1 {
    font-size: 1.2rem;
    font-weight: 750;
    background: linear-gradient(135deg, #67e8f9 0%, #22d3ee 40%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    line-height: 1.3;
}

#sidebarUserInfo {
    font-size: 0.65rem !important;
    color: rgba(148, 163, 184, 0.6) !important;
    font-weight: 400 !important;
    margin-top: 2px !important;
    letter-spacing: 0.02em;
}

/* ─── Nav Sections ─── */
.nav-section {
    margin-bottom: 2px;
}

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(148, 163, 184, 0.55);
    padding: 20px 20px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    -webkit-user-select: none;
    user-select: none;
}

/* ─── Nav Items — The Core ─── */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 1px 10px;
    min-height: 42px;
    border-radius: 11px;
    color: rgba(203, 213, 225, 0.78);
    cursor: pointer;
    transition:
        background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.25s ease;
    text-decoration: none;
    font-size: 0.855rem;
    font-weight: 460;
    position: relative;
    overflow: hidden;
}

.nav-item .icon {
    font-size: 1.05rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item span:not(.icon):not(.badge):not(.badge-new) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hover */
.nav-item:hover {
    background: rgba(34, 211, 238, 0.06);
    color: rgba(241, 245, 249, 0.9);
    transform: translateX(2px);
}

.nav-item:hover .icon {
    transform: scale(1.12) translateY(-1px);
}

/* Active */
.nav-item.active {
    background: linear-gradient(135deg,
        rgba(6, 182, 212, 0.12) 0%,
        rgba(99, 102, 241, 0.08) 100%);
    color: #67e8f9;
    font-weight: 560;
    box-shadow:
        inset 0 0 0 1px rgba(34, 211, 238, 0.1),
        0 2px 12px rgba(6, 182, 212, 0.08);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 55%;
    background: linear-gradient(180deg, #22d3ee, #818cf8);
    border-radius: 0 6px 6px 0;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}

.nav-item.active .icon {
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.5));
    transform: scale(1.05);
}

/* Badges */
.nav-item .badge,
.nav-item .badge-new {
    font-size: 0.62rem !important;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    margin-left: auto !important;
    font-weight: 650 !important;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    line-height: 1.5;
    border: none !important;
}

/* ─── Sidebar Footer ─── */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.06);
    display: flex;
    gap: 8px;
    justify-content: center;
    background: rgba(10, 15, 30, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.sidebar-footer .btn {
    border-radius: 10px;
    padding: 9px 14px;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.08);
    color: rgba(148, 163, 184, 0.7);
    transition: all 0.2s ease;
    font-size: 1rem;
}

/* V8.3: Language toggle — more visible in sidebar footer */
.sidebar-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.sidebar-footer #languageToggle,
.sidebar-footer .sidebar-lang-btn {
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.15);
    color: #67e8f9;
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-lang-icon {
    font-size: 1.1rem;
}

.sidebar-lang-label {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-footer .btn:hover {
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   2. HEADER — Frosted Glass Top Bar
   ═══════════════════════════════════════════════════════════════════════════════ */

.header,
.content-header {
    background: rgba(10, 14, 26, 0.7);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 20;
    transition: box-shadow 0.3s ease;
}

.header-title,
#pageTitle {
    font-size: 1.15rem;
    font-weight: 650;
    color: #e2e8f0;
    letter-spacing: -0.015em;
}

/* Month Selector — Capsule */
#monthYearSelect,
.month-select,
#headerMonthSelect {
    background: rgba(30, 41, 59, 0.6);
    border: 1.5px solid rgba(148, 163, 184, 0.1);
    color: #e2e8f0;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 520;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    min-width: 180px;
    -webkit-appearance: auto;
    appearance: auto;
}

#monthYearSelect:hover,
.month-select:hover,
#headerMonthSelect:hover {
    border-color: rgba(34, 211, 238, 0.25);
    background: rgba(30, 41, 59, 0.8);
}

#monthYearSelect:focus,
.month-select:focus,
#headerMonthSelect:focus {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   3. VIEW SECTIONS — Content Canvas
   ═══════════════════════════════════════════════════════════════════════════════ */

.view-section {
    animation: viewReveal 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes viewReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
        filter: blur(4px);
    }
    60% {
        filter: blur(0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   4. CARDS — Glass Depth · Multi-Layer Shadows
   ═══════════════════════════════════════════════════════════════════════════════ */

.card {
    background: rgba(20, 28, 46, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 16px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    pointer-events: none;
}

.card:hover {
    border-color: rgba(148, 163, 184, 0.1);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.card-header {
    background: rgba(10, 14, 26, 0.3);
    border-bottom: 1px solid rgba(148, 163, 184, 0.05);
    padding: 18px 24px;
}

.card-header h3,
.card-header .card-title {
    font-size: 0.95rem;
    font-weight: 620;
    color: #e2e8f0;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 20px 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   5. STAT CARDS — KPI Dashboard Widgets
   ═══════════════════════════════════════════════════════════════════════════════ */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl, 16px);
    padding: 22px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Top glow line on hover */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 10%, rgba(34, 211, 238, 0.4) 50%, transparent 90%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

/* Ambient glow behind icon */
.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.08);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 16px 48px rgba(0, 0, 0, 0.08);
}

.stat-card:hover::before { opacity: 1; }
.stat-card:hover::after { opacity: 1; }

.stat-value {
    font-size: var(--text-xl, 1.65rem);
    font-weight: var(--font-extrabold, 750);
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    line-height: var(--leading-tight, 1.2);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: var(--text-xs, 0.78rem);
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: var(--font-semibold, 500);
    letter-spacing: var(--tracking-wide, 0.01em);
    text-transform: uppercase;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Staggered entrance */
.stat-card:nth-child(1) { animation: cardReveal 0.5s 0.05s both; }
.stat-card:nth-child(2) { animation: cardReveal 0.5s 0.1s both; }
.stat-card:nth-child(3) { animation: cardReveal 0.5s 0.15s both; }
.stat-card:nth-child(4) { animation: cardReveal 0.5s 0.2s both; }
.stat-card:nth-child(5) { animation: cardReveal 0.5s 0.25s both; }
.stat-card:nth-child(6) { animation: cardReveal 0.5s 0.3s both; }

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   6. BUTTONS — Gradient · Glow · Lift
   ═══════════════════════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 560;
    font-size: 0.855rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 0.005em;
    line-height: 1.4;
}

/* Shimmer sweep on hover */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}
.btn:hover::after {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(8, 145, 178, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.3);
}
.btn-success:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(225, 29, 72, 0.3);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.4);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.3);
}
.btn-warning:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.1);
}
.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.2);
    color: #f1f5f9;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.78rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 0.95rem;
    border-radius: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   7. TABLES — Clean · Professional · Hoverable
   ═══════════════════════════════════════════════════════════════════════════════ */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table thead th {
    background: rgba(10, 14, 26, 0.6);
    color: rgba(148, 163, 184, 0.8);
    font-weight: 620;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
    position: sticky;
    top: 0;
    z-index: 5;
    white-space: nowrap;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

table thead th:first-child { border-radius: 12px 0 0 0; }
table thead th:last-child { border-radius: 0 12px 0 0; }

table tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.03);
    font-size: 0.84rem;
    color: #cbd5e1;
    transition: background 0.15s ease, color 0.15s ease;
}

table tbody tr:hover td {
    background: rgba(34, 211, 238, 0.03);
    color: #e2e8f0;
}

table tbody tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.15);
}

table tbody tr:nth-child(even):hover td {
    background: rgba(34, 211, 238, 0.05);
}

/* Table wrapper for rounded corners */
.table-wrapper,
.table-container {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.05);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   8. FORM ELEMENTS — Clean Focus · Subtle Borders
   ═══════════════════════════════════════════════════════════════════════════════ */

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="tel"],
input[type="url"],
textarea,
select {
    background: rgba(15, 23, 42, 0.5);
    border: 1.5px solid rgba(148, 163, 184, 0.1);
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.855rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
    width: 100%;
}

input:hover,
textarea:hover,
select:hover {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.6);
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08), 0 0 16px rgba(34, 211, 238, 0.05);
    background: rgba(15, 23, 42, 0.7);
}

input::placeholder,
textarea::placeholder {
    color: rgba(148, 163, 184, 0.55);
}

input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(15, 23, 42, 0.3);
}

/* ─── Select Option Elements — Critical for dropdown readability ─── */
/* Dark mode: option elements MUST have solid backgrounds (no gradients, no rgba) */
select option,
select optgroup {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    padding: 8px 12px;
    font-weight: 450;
}

select option:checked {
    background-color: #0e7490 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 600;
}

select option:hover,
select option:focus {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

label {
    font-size: 0.82rem;
    font-weight: 530;
    color: rgba(203, 213, 225, 0.8);
    margin-bottom: 6px;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   9. MODALS — Glass Effect · Scale Animation
   ═══════════════════════════════════════════════════════════════════════════════ */

.modal-backdrop,
.modal-overlay {
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    backdrop-filter: blur(8px) saturate(120%);
}

.modal-content,
.modal-dialog {
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    animation: modalReveal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalReveal {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   10. TOASTS / NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 22px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(148, 163, 184, 0.08);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.855rem;
    font-weight: 500;
    max-width: 420px;
    color: #e2e8f0;
    pointer-events: auto;
}

.toast.success { border-left: 3px solid #10b981; }
.toast.error { border-left: 3px solid #f43f5e; }
.toast.warning { border-left: 3px solid #f59e0b; }
.toast.info { border-left: 3px solid #3b82f6; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   11. LOADING STATES — Skeleton & Spinners
   ═══════════════════════════════════════════════════════════════════════════════ */

.view-loading-placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.view-loading-placeholder .spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(148, 163, 184, 0.08);
    border-top-color: #22d3ee;
    border-radius: 50%;
    animation: spinSmooth 0.7s linear infinite;
}

@keyframes spinSmooth {
    to { transform: rotate(360deg); }
}

.skeleton,
[class*="skeleton"] {
    background: linear-gradient(90deg,
        rgba(20, 28, 46, 0.8) 0%,
        rgba(40, 52, 72, 0.6) 40%,
        rgba(60, 75, 95, 0.45) 50%,
        rgba(40, 52, 72, 0.6) 60%,
        rgba(20, 28, 46, 0.8) 100%);
    background-size: 300% 100%;
    animation: shimmerWave 2s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes shimmerWave {
    0% { background-position: 300% 0; }
    100% { background-position: -100% 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   12. SCROLLBAR — Ultra-minimal
   ═══════════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.12);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.25);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   13. BADGES & STATUS
   ═══════════════════════════════════════════════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

.badge-danger {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
}

/* Sidebar badge colors */
.badge-amber {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
}

.badge-orange {
    background: linear-gradient(135deg, #ea580c, #c2410c) !important;
    color: #ffffff !important;
}

.badge-purple {
    background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
    color: #ffffff !important;
}

.badge-indigo {
    background: linear-gradient(135deg, #4f46e5, #6d28d9) !important;
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   14. TABS — Pill Style
   ═══════════════════════════════════════════════════════════════════════════════ */

.tab-group,
.tabs {
    display: flex;
    gap: 4px;
    background: rgba(15, 23, 42, 0.4);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.05);
}

.tab-item,
.tab-btn {
    padding: 9px 18px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 530;
    color: rgba(148, 163, 184, 0.6);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-item:hover,
.tab-btn:hover {
    background: rgba(148, 163, 184, 0.06);
    color: #e2e8f0;
}

.tab-item.active,
.tab-btn.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(99, 102, 241, 0.08));
    color: #67e8f9;
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   15. EMPTY STATES
   ═══════════════════════════════════════════════════════════════════════════════ */

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: rgba(148, 163, 184, 0.65);
}

.empty-icon,
.empty-state .icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.5;
    filter: grayscale(30%);
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.75);
    margin-bottom: 8px;
}

.empty-text {
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.6);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   16. UPLOAD AREA
   ═══════════════════════════════════════════════════════════════════════════════ */

.upload-zone,
.drop-zone {
    border: 2px dashed rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.3);
    cursor: pointer;
}

.upload-zone:hover,
.drop-zone:hover {
    border-color: rgba(34, 211, 238, 0.25);
    background: rgba(34, 211, 238, 0.03);
}

.upload-zone.dragover,
.drop-zone.dragover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(34, 211, 238, 0.05);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   17. CHART CONTAINERS
   ═══════════════════════════════════════════════════════════════════════════════ */

.chart-container,
.chart-wrapper {
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.05);
    border-radius: 14px;
    padding: 20px;
    transition: border-color 0.2s ease;
}

.chart-container:hover,
.chart-wrapper:hover {
    border-color: rgba(148, 163, 184, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   18. ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.88); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(34, 211, 238, 0.2); }
    50% { box-shadow: 0 0 20px rgba(34, 211, 238, 0.4); }
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   19. FOCUS VISIBLE (ACCESSIBILITY)
   ═══════════════════════════════════════════════════════════════════════════════ */

*:focus-visible {
    outline: 2px solid rgba(34, 211, 238, 0.5);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   20. RESPONSIVE — Mobile
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 280px;
        min-width: 280px;
        z-index: 1000;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.open {
        left: 0;
        box-shadow: 0 0 80px rgba(0, 0, 0, 0.6);
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .stat-card {
        padding: 16px !important;
    }

    .stat-value {
        font-size: 1.3rem !important;
    }

    .view-section {
        padding: 16px !important;
    }

    .card-header {
        padding: 14px 16px;
    }

    .card-body {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-card {
        padding: 14px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   20b. AI CHAT WIDGET — Premium Floating Panel
   ═══════════════════════════════════════════════════════════════════════════════ */

.ai-chat-widget {
    z-index: 500;
}

.ai-chat-button {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #818cf8 100%);
    box-shadow:
        0 4px 16px rgba(8, 145, 178, 0.35),
        0 8px 32px rgba(0, 0, 0, 0.2);
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ai-chat-button:hover {
    transform: scale(1.1);
    box-shadow:
        0 6px 24px rgba(8, 145, 178, 0.45),
        0 12px 48px rgba(0, 0, 0, 0.25);
}

.ai-chat-panel {
    background: rgba(15, 20, 35, 0.95);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(34, 211, 238, 0.05);
    overflow: hidden;
}

.ai-chat-header {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 60%, #6366f1 100%);
    color: #ffffff;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: none;
}

.ai-chat-header span {
    font-weight: 600;
}

.ai-chat-controls button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 1rem;
}

.ai-chat-controls button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.ai-chat-messages {
    background: rgba(8, 13, 26, 0.85);
    padding: 16px;
}

.ai-message {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.84rem;
    line-height: 1.55;
    margin-bottom: 12px;
    max-width: 90%;
}

.ai-message.bot {
    background: rgba(20, 28, 46, 0.85);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-bottom-left-radius: 4px;
}

.ai-message.user {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.2), rgba(6, 182, 212, 0.1));
    color: #e2e8f0;
    margin-left: auto;
    border: 1px solid rgba(34, 211, 238, 0.1);
    border-bottom-right-radius: 4px;
}

.ai-chat-input {
    padding: 12px 14px;
    background: rgba(15, 20, 35, 0.9);
    border-top: 1px solid rgba(148, 163, 184, 0.06);
    display: flex;
    gap: 8px;
    align-items: center;
}

.ai-chat-input input,
.ai-chat-input .form-input {
    flex: 1;
    background: rgba(8, 13, 26, 0.6);
    border: 1.5px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    padding: 10px 14px;
    color: #e2e8f0;
    font-size: 0.84rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-chat-input input:focus,
.ai-chat-input .form-input:focus {
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}

.ai-chat-input input::placeholder {
    color: rgba(148, 163, 184, 0.55);
}

.ai-chat-input .btn-primary,
.ai-chat-input .btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.84rem;
    white-space: nowrap;
    min-width: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   21. LIGHT MODE — Full Theme Override
   ═══════════════════════════════════════════════════════════════════════════════ */

html[data-theme="light"] .main,
[data-theme="light"] .main,
body[data-theme="light"] .main,
.light-mode .main {
    background:
        radial-gradient(ellipse 80% 60% at 10% 80%, rgba(6, 182, 212, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 20%, rgba(99, 102, 241, 0.02) 0%, transparent 55%),
        linear-gradient(165deg, #f0f4f8 0%, #f8fafc 50%, #f0f4f8 100%) !important;
}

html[data-theme="light"] body,
body[data-theme="light"] {
    background: #f0f4f8 !important;
    color: #1e293b;
}

[data-theme="light"] .sidebar,
.light-mode .sidebar {
    background: linear-gradient(180deg, #fafbfd 0%, #f1f5f9 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.04);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

[data-theme="light"] .sidebar::before,
.light-mode .sidebar::before {
    display: none;
}

[data-theme="light"] .sidebar-header,
.light-mode .sidebar-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(148, 163, 184, 0.1);
}

[data-theme="light"] .nav-section-title,
.light-mode .nav-section-title {
    color: #64748b;
    font-weight: 680;
}

[data-theme="light"] .nav-item,
.light-mode .nav-item {
    color: #334155;
    font-weight: 480;
}

[data-theme="light"] .nav-item:hover,
.light-mode .nav-item:hover {
    background: rgba(8, 145, 178, 0.06);
    color: #0f172a;
}

[data-theme="light"] .nav-item.active,
.light-mode .nav-item.active {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.10), rgba(6, 182, 212, 0.05));
    color: #0e7490;
    font-weight: 560;
    box-shadow: inset 0 0 0 1px rgba(8, 145, 178, 0.10);
}

[data-theme="light"] .nav-item.active::before,
.light-mode .nav-item.active::before {
    background: linear-gradient(180deg, #0891b2, #0e7490);
    box-shadow: 0 0 8px rgba(8, 145, 178, 0.3);
}

[data-theme="light"] .sidebar-logo h1,
.light-mode .sidebar-logo h1 {
    background: linear-gradient(135deg, #0e7490, #0891b2, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .sidebar-footer,
.light-mode .sidebar-footer {
    background: rgba(255, 255, 255, 0.85);
    border-top-color: rgba(148, 163, 184, 0.1);
}

[data-theme="light"] .sidebar-footer .btn,
.light-mode .sidebar-footer .btn {
    background: rgba(100, 116, 139, 0.08);
    border: 1px solid rgba(100, 116, 139, 0.12);
    color: #475569;
}

[data-theme="light"] .sidebar-footer .btn:hover,
.light-mode .sidebar-footer .btn:hover {
    background: rgba(100, 116, 139, 0.14);
    border-color: rgba(100, 116, 139, 0.2);
    color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sidebar-footer #languageToggle,
.light-mode .sidebar-footer #languageToggle {
    background: rgba(14, 116, 144, 0.12);
    border: 1px solid rgba(14, 116, 144, 0.25);
    color: #0e7490;
    font-weight: 600;
}

[data-theme="light"] .sidebar-footer #languageToggle:hover,
.light-mode .sidebar-footer #languageToggle:hover {
    background: rgba(14, 116, 144, 0.2);
    border-color: rgba(14, 116, 144, 0.35);
    color: #0c4a6e;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 116, 144, 0.15);
}

[data-theme="light"] .header,
[data-theme="light"] .content-header,
.light-mode .header,
.light-mode .content-header {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    border-bottom-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .header-title,
[data-theme="light"] #pageTitle,
.light-mode .header-title,
.light-mode #pageTitle {
    color: #0f172a;
}

[data-theme="light"] #monthYearSelect,
[data-theme="light"] .month-select,
.light-mode #monthYearSelect,
.light-mode .month-select {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.2);
    color: #1e293b;
}

[data-theme="light"] .card,
html[data-theme="light"] .card,
.light-mode .card {
    background: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.02) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

[data-theme="light"] .card-header,
html[data-theme="light"] .card-header,
.light-mode .card-header {
    background: rgba(248, 250, 252, 0.8) !important;
    border-bottom-color: rgba(148, 163, 184, 0.08) !important;
}

[data-theme="light"] .stat-card,
.light-mode .stat-card {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .stat-value,
.light-mode .stat-value {
    color: var(--text-primary);
}

[data-theme="light"] .stat-label,
.light-mode .stat-label {
    color: var(--text-muted);
}

[data-theme="light"] table thead th,
.light-mode table thead th {
    background: #f8fafc;
    color: #475569;
    border-bottom-color: rgba(148, 163, 184, 0.12);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

[data-theme="light"] table tbody td,
.light-mode table tbody td {
    color: #334155;
    border-bottom-color: rgba(148, 163, 184, 0.06);
}

[data-theme="light"] table tbody tr:hover td,
.light-mode table tbody tr:hover td {
    background: rgba(8, 145, 178, 0.03);
}

[data-theme="light"] table tbody tr:nth-child(even) td,
.light-mode table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.6);
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] textarea,
[data-theme="light"] select,
.light-mode input[type="text"],
.light-mode input[type="number"],
.light-mode textarea,
.light-mode select {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.2);
    color: #1e293b;
}

/* Light mode option elements */
[data-theme="light"] select option,
[data-theme="light"] select optgroup,
.light-mode select option,
.light-mode select optgroup {
    background-color: #ffffff !important;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    font-weight: 450;
}

[data-theme="light"] select option:checked,
.light-mode select option:checked {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    -webkit-text-fill-color: #0369a1 !important;
    font-weight: 600;
}

[data-theme="light"] select option:hover,
[data-theme="light"] select option:focus,
.light-mode select option:hover,
.light-mode select option:focus {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

[data-theme="light"] .modal-content,
[data-theme="light"] .modal-dialog,
.light-mode .modal-content,
.light-mode .modal-dialog {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(148, 163, 184, 0.1);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .toast,
.light-mode .toast {
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    border-color: rgba(148, 163, 184, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .table-wrapper,
[data-theme="light"] .table-container,
.light-mode .table-wrapper,
.light-mode .table-container {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.08);
}

[data-theme="light"] .btn-secondary,
.light-mode .btn-secondary {
    background: rgba(148, 163, 184, 0.08);
    color: #475569;
    border-color: rgba(148, 163, 184, 0.15);
}

[data-theme="light"] .empty-state,
.light-mode .empty-state {
    color: #64748b;
}

[data-theme="light"] .empty-title,
.light-mode .empty-title {
    color: #475569;
}

[data-theme="light"] .empty-text,
.light-mode .empty-text {
    color: #64748b;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder,
.light-mode input::placeholder,
.light-mode textarea::placeholder {
    color: #94a3b8;
}

[data-theme="light"] #sidebarUserInfo,
.light-mode #sidebarUserInfo {
    color: #64748b !important;
}

[data-theme="light"] .chart-container,
[data-theme="light"] .chart-wrapper,
.light-mode .chart-container,
.light-mode .chart-wrapper {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.08);
}

[data-theme="light"] ::-webkit-scrollbar-thumb,
.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover,
.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.35);
}

/* Light mode AI Chat */
[data-theme="light"] .ai-chat-panel,
.light-mode .ai-chat-panel {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(8, 145, 178, 0.06);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}

[data-theme="light"] .ai-chat-messages,
.light-mode .ai-chat-messages {
    background: #f8fafc;
}

[data-theme="light"] .ai-message.bot,
.light-mode .ai-message.bot {
    background: #ffffff;
    color: #334155;
    border-color: rgba(148, 163, 184, 0.08);
}

[data-theme="light"] .ai-message.user,
.light-mode .ai-message.user {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.08), rgba(6, 182, 212, 0.04));
    color: #0f172a;
    border-color: rgba(8, 145, 178, 0.1);
}

[data-theme="light"] .ai-chat-input,
.light-mode .ai-chat-input {
    background: #ffffff;
    border-top-color: rgba(148, 163, 184, 0.08);
}

[data-theme="light"] .ai-chat-input input,
.light-mode .ai-chat-input input {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.15);
    color: #0f172a;
}

[data-theme="light"] .ai-chat-input input::placeholder,
.light-mode .ai-chat-input input::placeholder {
    color: #94a3b8;
}

/* Light mode skeleton */
[data-theme="light"] .skeleton,
.light-mode .skeleton,
[data-theme="light"] [class*="skeleton"],
.light-mode [class*="skeleton"] {
    background: linear-gradient(90deg,
        #f1f5f9 0%,
        #e2e8f0 40%,
        #f1f5f9 60%,
        #e2e8f0 80%,
        #f1f5f9 100%);
    background-size: 300% 100%;
}
