/* ==========================================================================
   Backtest Analyzer & Trading Journal Stylesheet (analyzer.css)
   ========================================================================== */

/* 1. Reset & Variables */
:root {
    --bg-dark: #070913;          /* Deep obsidian background */
    --bg-card: #0c0f1d;          /* Slightly lighter slate for structural panels */
    --border-color: rgba(255, 255, 255, 0.05);
    --text-main: #f8fafc;        /* Clear high-contrast text */
    --text-muted: #8a99ad;       /* Cool slate gray for subtitles/labels */
    
    /* Branding Accent Tones */
    --accent: #34d399;           /* Soft institutional green */
    --accent-hover: #a7f3d0;
    --accent-glow: rgba(52, 211, 153, 0.15);
    
    /* Status Colors */
    --success: #34d399;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Typography */
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   2. App Container & Sidebar Layout (Fixed Left)
   ========================================================================== */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background: rgba(12, 15, 29, 0.85);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 0;
    backdrop-filter: blur(12px);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 100;
}
.sidebar.collapsed {
    width: 85px;
}
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-group-title,
.sidebar.collapsed .nav-text {
    display: none;
    opacity: 0;
}
.sidebar.collapsed .sidebar-brand {
    padding: 0 0 1.5rem 0;
    justify-content: center;
}
.sidebar.collapsed .nav-tab-link,
.sidebar.collapsed .back-btn {
    justify-content: center;
    padding: 0.8rem;
}
.sidebar.collapsed .nav-tab-link svg,
.sidebar.collapsed .back-btn svg {
    margin: 0;
}
.sidebar.collapsed .nav-group {
    margin-bottom: 0.5rem;
}
.sidebar.collapsed .status-indicator {
    justify-content: center;
}
.sidebar-toggle-btn {
    position: absolute;
    top: 25px;
    right: -14px;
    width: 28px;
    height: 28px;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.sidebar-toggle-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}
.sidebar.collapsed .sidebar-toggle-btn svg {
    transform: rotate(180deg);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}
.brand-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    flex-shrink: 0;
}
.brand-text h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
}
.tier-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(52, 211, 153, 0.1);
    color: var(--accent);
    border: 1px solid rgba(52, 211, 153, 0.3);
    line-height: 1;
}
.tier-badge.badge-vip { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.15); }
.tier-badge.badge-premium { color: #cbd5e1; border-color: rgba(203, 213, 225, 0.4); background: rgba(203, 213, 225, 0.15); }
.tier-badge.badge-pro { color: #34d399; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.15); }
.tier-badge.badge-standard { color: #60a5fa; border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.15); }
.tier-badge.badge-trial { color: #10b981; border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.15); }
.tier-badge.badge-free { color: #94a3b8; border-color: rgba(148, 163, 184, 0.3); background: rgba(148, 163, 184, 0.08); }
.sidebar-nav {
    flex-grow: 1;
    margin-top: 1.5rem;
    padding: 0 1rem;
    overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.nav-group { margin-bottom: 1.25rem; }
.nav-group-title {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0 1rem 0.5rem;
    opacity: 0.45;
}
.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    margin: 0;
}
.nav-tab-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.nav-tab-link:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    transform: translateX(2px);
}
.nav-tab-link.active {
    color: var(--accent);
    background: rgba(52, 211, 153, 0.08);
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: inset 2px 0 0 var(--accent);
    transform: none;
}
.sidebar-footer {
    padding: 0 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.status-dot.green {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}
/* Pulsing effect for live engine status */
.status-dot.green::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--success);
    animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}
.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}
.back-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

/* ==========================================================================
   3. Main Content Wrapper & Header
   ========================================================================== */
.main-content {
    flex-grow: 1;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.04), transparent 45%);
    position: relative;
}

/* Header section styling */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(7, 9, 19, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-title-wrapper h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.header-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Buttons Styling */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 0.55rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-outline:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-1px);
}

/* ==========================================================================
   4. Tab Views & Empty State (SaaS Pattern)
   ========================================================================== */
.tab-view-container {
    flex-grow: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.tab-panel {
    width: 100%;
    display: none;
    flex-grow: 1;
}

.tab-panel.active-panel {
    display: flex;
    flex-direction: column;
}

/* Empty State Card (Obsidian Minimalist Design) */
.empty-state-card {
    background: rgba(12, 15, 29, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 5rem 3rem;
    text-align: center;
    max-width: 580px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

.empty-state-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.01);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 15px rgba(16, 185, 129, 0.02);
}

/* Folder illustration */
.empty-state-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.4s ease;
}

.empty-state-card:hover .empty-state-illustration {
    background: var(--accent-glow);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--accent);
    transform: scale(1.05);
}

.empty-state-svg {
    stroke-width: 1.25;
}

.empty-state-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto;
}

/* Modern Glowing Primary CTA Button */
.btn-primary-import {
    background: linear-gradient(135deg, #0d261b, #06130d);
    border: 1px solid #065f46;
    color: #34d399;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.15);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary-import:hover {
    background: linear-gradient(135deg, #133827, #081c13);
    color: #a7f3d0;
    border-color: #34d399;
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.3);
    transform: translateY(-1.5px);
}

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

/* ==========================================================================
   5. Quantitative Metrics Grid (Populated Later by JS)
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: rgba(12, 15, 29, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

.metric-card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 12px rgba(16, 185, 129, 0.03);
}

.metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

/* Dynamic status alerts inside metric cards */
.metric-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    width: fit-content;
}

.metric-badge.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.metric-badge.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Chart Card Layout */
.chart-card-container {
    background: rgba(12, 15, 29, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    margin-top: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.chart-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.chart-body {
    position: relative;
    width: 100%;
    height: 340px;
}

/* Sidebar Nav Groupings */
.nav-group {
    margin-bottom: 1.25rem;
}

.nav-group-title {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0 1rem 0.5rem;
    opacity: 0.45;
}

/* Dashboard Table Styles */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.dashboard-table th {
    padding: 0.85rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-table td {
    padding: 1rem;
    font-size: 0.8rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.dashboard-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.25rem;
    }
    .sidebar-brand {
        padding-bottom: 1rem;
    }
    .sidebar-nav {
        margin-top: 1rem;
    }
    .main-content {
        height: auto;
        overflow-y: visible;
    }
    .app-header {
        padding: 1.5rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .tab-view-container {
        padding: 1.5rem 1.25rem;
    }
    .empty-state-card {
        padding: 3.5rem 1.5rem;
    }
}

/* ==========================================================================
   6. Multi-Strategy Architecture Styles
   ========================================================================== */
.strategies-workspace {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2rem;
    width: 100%;
    align-items: start;
}

.strategy-form-card {
    background: rgba(12, 15, 29, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

.strategy-form-card .form-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
}

.strategy-form-card .form-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.file-dropzone:hover {
    border-color: var(--accent) !important;
    background: rgba(16, 185, 129, 0.03) !important;
}

.file-dropzone:hover svg {
    color: var(--accent) !important;
}

.file-dropzone.dragover {
    border-color: var(--accent) !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

.strategies-grid-wrapper .grid-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
}

.strategies-grid-wrapper .grid-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.strategy-card {
    background: rgba(12, 15, 29, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.02);
    position: relative;
    cursor: pointer;
}

.strategy-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.strategy-card.active-strategy {
    border: 2.5px solid #10b981 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.25), 0 4px 15px rgba(0, 0, 0, 0.15);
}

.strategy-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.strategy-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-word;
}

.strategy-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.strategy-card-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.strategy-card-metric-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.strategy-card-metric-value {
    font-size: 0.95rem;
    font-weight: 700;
}

.strategy-select-btn {
    width: 100%;
    justify-content: center;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-main);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.strategy-card.active-strategy .strategy-select-btn {
    background: linear-gradient(135deg, #0d261b, #06130d);
    color: #34d399;
    border-color: #065f46;
}

.strategy-select-btn:hover {
    border-color: #34d399;
    background: rgba(52, 211, 153, 0.08);
    color: #34d399;
}

.strategy-card.active-strategy .strategy-select-btn:hover {
    background: linear-gradient(135deg, #133827, #081c13);
    color: #a7f3d0;
    border-color: #34d399;
}

@media (max-width: 1024px) {
    .strategies-workspace {
        grid-template-columns: 1fr;
    }
}

.strategy-delete-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.strategy-delete-btn:hover {
    color: var(--danger) !important;
    background-color: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   MYSTERIOUS VIP LIGHT THEME (FROSTED SILVER / OPAL GLASS)
   ========================================================================== */
:root.light-theme {
    /* Deep Matte Silver background to kill harsh brightness */
    --bg-dark: #e2e8f0; 
    --text-main: #1e293b; /* Slate 800 - Deep charcoal instead of stark black */
    --text-muted: #64748b; /* Slate 500 */
    --accent: #047857; /* Deep institutional emerald */
    --border-color: rgba(30, 41, 59, 0.06);
}

/* Force override the blinding white JS background */
:root.light-theme body,
:root.light-theme .app-container,
:root.light-theme .dashboard-container,
:root.light-theme .main-content {
    background-color: var(--bg-dark) !important;
    /* Soft elegant glow at the top for architectural depth */
    background-image: radial-gradient(circle at 50% -20%, rgba(255,255,255, 0.8) 0%, transparent 80%) !important;
    color: var(--text-main);
}

/* The Secret to Mystery: Translucent Privacy Glass (Heavy Blur + Dual Borders) */
:root.light-theme .dashboard-sidebar,
:root.light-theme .sidebar,
:root.light-theme .dashboard-card,
:root.light-theme .metric-card,
:root.light-theme .chart-card-container,
:root.light-theme .strategy-form-card,
:root.light-theme .strategy-card,
:root.light-theme .store-item-card,
:root.light-theme .broker-item {
    background: rgba(248, 250, 252, 0.45) !important; /* Crystal clear frosted tint */
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    /* Luxurious 3D edge effect */
    border-top: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-right: 1px solid var(--border-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.06) !important; /* Soft spread shadow */
}

/* Sidebars and Navigation Refinements */
:root.light-theme .sidebar-profile,
:root.light-theme .sidebar-brand {
    border-bottom: 1px solid rgba(30, 41, 59, 0.05) !important;
}

:root.light-theme .avatar-lg {
    border: 2px solid #ffffff !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
}

:root.light-theme .sidebar-nav a,
:root.light-theme .nav-tab-link,
:root.light-theme .exit-btn,
:root.light-theme .back-btn {
    color: #475569 !important;
    font-weight: 600;
}

:root.light-theme .sidebar-nav a:hover,
:root.light-theme .nav-tab-link:hover {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 1) !important;
    border-left: 1px solid rgba(255, 255, 255, 1) !important;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.02) !important;
    transform: translateX(2px) !important;
}

:root.light-theme .sidebar-nav a.active,
:root.light-theme .nav-tab-link.active {
    background: rgba(4, 120, 87, 0.06) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: inset 4px 0 0 var(--accent), 0 4px 15px rgba(4, 120, 87, 0.04) !important;
}

/* Headers & Text Formatting */
:root.light-theme .app-header,
:root.light-theme .dashboard-header {
    background: rgba(226, 232, 240, 0.3) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255,255,255,0.5) !important;
}

:root.light-theme .header-title-wrapper h1,
:root.light-theme .greeting h2,
:root.light-theme h3 {
    color: #0f172a !important;
}

:root.light-theme p, 
:root.light-theme .header-subtitle {
    color: #475569 !important;
}

/* Preserve Dark Terminal for Contrast and Authenticity */
:root.light-theme .terminal-container,
:root.light-theme .log-window,
:root.light-theme .execution-matrix {
    background: #0f172a !important; 
    border: 1px solid rgba(15, 23, 42, 0.2) !important;
    box-shadow: inset 0 4px 20px rgba(0,0,0,0.4), 0 10px 30px rgba(15, 23, 42, 0.08) !important;
    color: #10b981 !important; 
}

/* Toggle Buttons */
:root.light-theme .sidebar-toggle-btn {
    background: #f8fafc !important;
    border: 1px solid rgba(30, 41, 59, 0.1) !important;
    color: var(--text-muted) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

:root.light-theme .sidebar-toggle-btn:hover {
    color: var(--accent) !important;
    box-shadow: 0 4px 15px rgba(4, 120, 87, 0.15) !important;
}
