/* ═══════════════════════════════════════════════════════
   Vista Brain — Premium Design Layer v4 — WOW Edition
   Animated gradient borders, 3D depth, ambient glows,
   glass morphism, spring animations, living UI
   ═══════════════════════════════════════════════════════ */


/* ── @property for CSS Houdini animations ──────────── */

@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@property --glow-spread {
    syntax: '<length>';
    initial-value: 0px;
    inherits: false;
}

@property --shimmer-x {
    syntax: '<percentage>';
    initial-value: -100%;
    inherits: false;
}


/* ── Typography ──────────────────────────────────────── */

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    position: relative;
}

h1, h2, h3, .brand-text, .card-value {
    font-family: 'Quicksand', 'DM Sans', sans-serif;
}


/* ═══════════════════════════════════════════════════════
   ANIMATED BACKGROUND — Aurora mesh + dot grid
   ═══════════════════════════════════════════════════════ */

#main-content {
    position: relative;
}

/* Aurora mesh gradient — slowly morphing */
#main-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 800px 600px at 15% 5%, rgba(99, 140, 255, 0.08), transparent),
        radial-gradient(ellipse 600px 500px at 85% 75%, rgba(168, 123, 255, 0.06), transparent),
        radial-gradient(ellipse 500px 400px at 55% 35%, rgba(61, 217, 160, 0.04), transparent),
        radial-gradient(ellipse 400px 300px at 75% 15%, rgba(255, 107, 157, 0.03), transparent);
    pointer-events: none;
    z-index: 0;
    animation: auroraMorph 25s ease-in-out infinite alternate;
}

@keyframes auroraMorph {
    0% {
        background:
            radial-gradient(ellipse 800px 600px at 15% 5%, rgba(99, 140, 255, 0.08), transparent),
            radial-gradient(ellipse 600px 500px at 85% 75%, rgba(168, 123, 255, 0.06), transparent),
            radial-gradient(ellipse 500px 400px at 55% 35%, rgba(61, 217, 160, 0.04), transparent),
            radial-gradient(ellipse 400px 300px at 75% 15%, rgba(255, 107, 157, 0.03), transparent);
    }
    33% {
        background:
            radial-gradient(ellipse 700px 500px at 45% 20%, rgba(168, 123, 255, 0.07), transparent),
            radial-gradient(ellipse 600px 600px at 20% 65%, rgba(99, 140, 255, 0.06), transparent),
            radial-gradient(ellipse 500px 400px at 70% 50%, rgba(255, 181, 71, 0.04), transparent),
            radial-gradient(ellipse 400px 300px at 35% 85%, rgba(61, 217, 160, 0.03), transparent);
    }
    66% {
        background:
            radial-gradient(ellipse 600px 500px at 75% 10%, rgba(61, 217, 160, 0.06), transparent),
            radial-gradient(ellipse 800px 400px at 30% 55%, rgba(255, 107, 157, 0.05), transparent),
            radial-gradient(ellipse 500px 600px at 60% 80%, rgba(99, 140, 255, 0.04), transparent),
            radial-gradient(ellipse 400px 300px at 10% 30%, rgba(168, 123, 255, 0.04), transparent);
    }
    100% {
        background:
            radial-gradient(ellipse 700px 600px at 55% 15%, rgba(168, 123, 255, 0.07), transparent),
            radial-gradient(ellipse 600px 500px at 15% 70%, rgba(99, 140, 255, 0.06), transparent),
            radial-gradient(ellipse 500px 400px at 80% 45%, rgba(61, 217, 160, 0.05), transparent),
            radial-gradient(ellipse 400px 300px at 40% 90%, rgba(255, 181, 71, 0.03), transparent);
    }
}

/* Subtle dot grid overlay */
#main-content::after {
    content: '';
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle 1px at center, rgba(99, 140, 255, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

.panel,
#topbar {
    position: relative;
    z-index: 1;
}


/* ═══════════════════════════════════════════════════════
   SIDEBAR — Frosted glass with animated glow edge
   ═══════════════════════════════════════════════════════ */

.sidebar {
    width: 250px;
    background:
        linear-gradient(180deg, rgba(6, 8, 16, 0.95) 0%, rgba(8, 11, 20, 0.97) 100%);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    border-right: none;
    box-shadow: 1px 0 0 rgba(255,255,255,0.03), 8px 0 50px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Animated gradient glow on right edge */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1.5px;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(99, 140, 255, 0.7) 0%,
        rgba(168, 123, 255, 0.4) 20%,
        rgba(61, 217, 160, 0.3) 40%,
        rgba(255, 181, 71, 0.2) 60%,
        rgba(255, 107, 157, 0.3) 80%,
        rgba(99, 140, 255, 0.5) 100%
    );
    background-size: 100% 200%;
    animation: edgeFlow 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes edgeFlow {
    0%, 100% { background-position: 0 0; opacity: 0.6; }
    50% { background-position: 0 100%; opacity: 1; }
}

/* ── Brand Area ─────────────────────────────── */

.sidebar-brand {
    padding: 20px 18px 18px;
    border-bottom: none;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: auto;
}

.sidebar-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 140, 255, 0.2), rgba(168, 123, 255, 0.1), transparent);
}

.brand-icon-wrap {
    position: relative;
    flex-shrink: 0;
}

.sidebar-brand .brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #638cff, #a87bff, #3dd9a0);
    background-size: 300% 300%;
    border-radius: 14px;
    box-shadow:
        0 4px 20px rgba(99, 140, 255, 0.4),
        0 0 30px rgba(99, 140, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: brandShift 6s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.brand-pulse-ring {
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    border: 1.5px solid rgba(99, 140, 255, 0.15);
    animation: ringPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.2; transform: scale(1); border-color: rgba(99, 140, 255, 0.15); }
    50% { opacity: 0.7; transform: scale(1.08); border-color: rgba(168, 123, 255, 0.25); }
}

@keyframes brandShift {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 4px 20px rgba(99, 140, 255, 0.4), 0 0 30px rgba(99, 140, 255, 0.15);
    }
    33% {
        background-position: 50% 100%;
        box-shadow: 0 4px 20px rgba(168, 123, 255, 0.4), 0 0 30px rgba(168, 123, 255, 0.15);
    }
    66% {
        background-position: 100% 50%;
        box-shadow: 0 4px 20px rgba(61, 217, 160, 0.4), 0 0 30px rgba(61, 217, 160, 0.15);
    }
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.sidebar-brand .brand-text {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #f0f2f8 0%, #a8b4d4 40%, #f0f2f8 60%, #d4b8ff 80%, #f0f2f8 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 8s ease-in-out infinite;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.5;
}

@keyframes textShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}


/* ── Sidebar Nav ─────────────────────────────── */

.sidebar-nav {
    padding: 12px 0 8px;
}

/* ── Nav Icon Box ─────────────────────────────── */

.nav-icon-box {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-icon-box svg {
    width: 15px;
    height: 15px;
    opacity: 0.6;
    transition: all 0.35s ease;
}

/* Color variants */
.nav-icon-box.color-green { background: rgba(61, 217, 160, 0.08); color: #3dd9a0; }
.nav-icon-box.color-blue { background: rgba(99, 140, 255, 0.08); color: #638cff; }
.nav-icon-box.color-purple { background: rgba(168, 123, 255, 0.08); color: #a87bff; }
.nav-icon-box.color-amber { background: rgba(255, 181, 71, 0.08); color: #ffb547; }
.nav-icon-box.color-pink { background: rgba(255, 107, 157, 0.08); color: #ff6b9d; }
.nav-icon-box.color-cyan { background: rgba(77, 212, 230, 0.08); color: #4dd4e6; }
.nav-icon-box.color-teal { background: rgba(14, 165, 233, 0.08); color: #38bdf8; }
.nav-icon-box.color-gradient {
    background: linear-gradient(135deg, rgba(99, 140, 255, 0.12), rgba(168, 123, 255, 0.12));
    color: #a87bff;
}

.nav-icon-box.color-green svg,
.nav-icon-box.color-blue svg,
.nav-icon-box.color-purple svg,
.nav-icon-box.color-amber svg,
.nav-icon-box.color-pink svg,
.nav-icon-box.color-teal svg,
.nav-icon-box.color-cyan svg,
.nav-icon-box.color-gradient svg {
    opacity: 1;
}


/* ── Nav Badges ─────────────────────────────── */

.nav-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: auto;
    line-height: 1.4;
}

.nav-badge.live {
    background: rgba(61, 217, 160, 0.15);
    color: #3dd9a0;
    box-shadow: 0 0 12px rgba(61, 217, 160, 0.2);
    animation: liveBadge 2s ease-in-out infinite;
}

.nav-badge.ai {
    background: linear-gradient(135deg, rgba(99, 140, 255, 0.15), rgba(168, 123, 255, 0.15));
    color: #a87bff;
    box-shadow: 0 0 10px rgba(168, 123, 255, 0.15);
}

@keyframes liveBadge {
    0%, 100% { opacity: 0.7; box-shadow: 0 0 8px rgba(61, 217, 160, 0.15); }
    50% { opacity: 1; box-shadow: 0 0 18px rgba(61, 217, 160, 0.35); }
}


/* ── Nav Count ───────────────── */

.nav-count {
    font-size: 9px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    padding: 1px 6px;
    border-radius: 5px;
    margin-left: auto;
    margin-right: 4px;
}


/* ── Nav Items — Redesigned with ambient glow ── */

.nav-item {
    margin: 2px 10px;
    padding: 0 12px;
    height: 42px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: visible;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(3px);
}

.nav-item:hover .nav-icon-box {
    transform: scale(1.12) rotate(-3deg);
    background: rgba(255, 255, 255, 0.07);
}

.nav-item:hover .nav-icon-box.color-green { background: rgba(61, 217, 160, 0.16); box-shadow: 0 0 14px rgba(61, 217, 160, 0.15); }
.nav-item:hover .nav-icon-box.color-blue { background: rgba(99, 140, 255, 0.16); box-shadow: 0 0 14px rgba(99, 140, 255, 0.15); }
.nav-item:hover .nav-icon-box.color-purple { background: rgba(168, 123, 255, 0.16); box-shadow: 0 0 14px rgba(168, 123, 255, 0.15); }
.nav-item:hover .nav-icon-box.color-amber { background: rgba(255, 181, 71, 0.16); box-shadow: 0 0 14px rgba(255, 181, 71, 0.15); }
.nav-item:hover .nav-icon-box.color-pink { background: rgba(255, 107, 157, 0.16); box-shadow: 0 0 14px rgba(255, 107, 157, 0.15); }
.nav-item:hover .nav-icon-box.color-cyan { background: rgba(77, 212, 230, 0.16); box-shadow: 0 0 14px rgba(77, 212, 230, 0.15); }
.nav-item:hover .nav-icon-box.color-teal { background: rgba(14, 165, 233, 0.16); box-shadow: 0 0 14px rgba(14, 165, 233, 0.15); }
.nav-item:hover .nav-icon-box.color-gradient { background: linear-gradient(135deg, rgba(99, 140, 255, 0.22), rgba(168, 123, 255, 0.22)); box-shadow: 0 0 16px rgba(168, 123, 255, 0.15); }

.nav-item:hover .nav-icon-box svg {
    transform: scale(1.1);
}

/* Active nav item — with ambient light spread */
.nav-item.active {
    background: linear-gradient(135deg, rgba(99, 140, 255, 0.14), rgba(99, 140, 255, 0.04));
    box-shadow:
        0 0 30px rgba(99, 140, 255, 0.08),
        0 0 60px rgba(99, 140, 255, 0.04),
        inset 0 0 0 1px rgba(99, 140, 255, 0.1);
    font-weight: 600;
}

/* Glowing accent bar on active item */
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #638cff, #a87bff, #3dd9a0);
    background-size: 100% 200%;
    box-shadow:
        0 0 12px rgba(99, 140, 255, 0.8),
        0 0 24px rgba(99, 140, 255, 0.3),
        0 0 48px rgba(99, 140, 255, 0.1);
    animation: barGlow 3s ease-in-out infinite;
}

@keyframes barGlow {
    0%, 100% {
        background-position: 0 0;
        box-shadow: 0 0 12px rgba(99, 140, 255, 0.8), 0 0 24px rgba(99, 140, 255, 0.3);
    }
    33% {
        background-position: 0 50%;
        box-shadow: 0 0 12px rgba(168, 123, 255, 0.8), 0 0 24px rgba(168, 123, 255, 0.3);
    }
    66% {
        background-position: 0 100%;
        box-shadow: 0 0 12px rgba(61, 217, 160, 0.8), 0 0 24px rgba(61, 217, 160, 0.3);
    }
}

.nav-item.active .nav-icon-box {
    background: rgba(99, 140, 255, 0.18);
    color: #638cff;
    box-shadow: 0 0 16px rgba(99, 140, 255, 0.2);
    animation: iconFloat 3s ease-in-out infinite;
}

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

.nav-item.active .nav-icon-box svg {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(99, 140, 255, 0.5));
}

.nav-item.active .nav-text {
    color: var(--text-primary);
}

/* Brain Chat nav — special styling */
.brain-chat-nav {
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 8px;
}

.brain-chat-nav.active {
    background: linear-gradient(135deg, rgba(99, 140, 255, 0.1), rgba(168, 123, 255, 0.1));
    box-shadow:
        0 0 30px rgba(168, 123, 255, 0.08),
        0 0 60px rgba(99, 140, 255, 0.04);
}

.brain-chat-nav.active .nav-icon-box {
    background: linear-gradient(135deg, rgba(99, 140, 255, 0.2), rgba(168, 123, 255, 0.2));
    color: #a87bff;
    box-shadow: 0 0 20px rgba(168, 123, 255, 0.2);
}


/* ── Group toggles ───────────── */

.nav-group-toggle {
    margin: 0 10px;
    padding: 0 12px;
    margin-top: 22px;
    height: 28px;
    font-size: 10px;
    letter-spacing: 1.8px;
    opacity: 0.4;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-group-toggle svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.nav-group-toggle .nav-text {
    font-size: 10px;
}

.nav-group-items .nav-item {
    padding-left: 14px;
    margin-left: 14px;
    font-size: 13px;
}


/* ── Section Label ─────────────────────────── */

.nav-section-label {
    margin: 0 10px;
    padding: 0 12px;
    margin-top: 22px;
    height: 28px;
    font-size: 10px;
    letter-spacing: 1.8px;
    opacity: 0.4;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}


/* ── Sidebar Footer — Glass Card ──────────── */

.sidebar-footer {
    padding: 12px 14px 14px;
    border-top: none;
    position: relative;
}

.sidebar-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 140, 255, 0.15), rgba(168, 123, 255, 0.08), transparent);
}

.sidebar-footer-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.sidebar-footer-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.ws-status-bar {
    display: flex;
    align-items: center;
    gap: 7px;
}

.ws-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s ease;
}

.ws-dot.online {
    background: var(--card-green);
    box-shadow: 0 0 8px rgba(61, 217, 160, 0.6), 0 0 16px rgba(61, 217, 160, 0.2);
    animation: wsGlow 2s ease-in-out infinite;
}

@keyframes wsGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(61, 217, 160, 0.6); }
    50% { box-shadow: 0 0 14px rgba(61, 217, 160, 1), 0 0 28px rgba(61, 217, 160, 0.4); }
}

#ws-status-label {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-version {
    opacity: 0.3;
    font-size: 10px;
}


/* ── Main content offset for wider sidebar ─── */

#main-content,
.main-content {
    margin-left: 250px;
}


/* ═══════════════════════════════════════════════════════
   TOPBAR — Frosted glass with gradient shimmer
   ═══════════════════════════════════════════════════════ */

.topbar,
#topbar {
    background: var(--topbar-bg);
    backdrop-filter: blur(30px) saturate(1.4);
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    position: relative;
}

#topbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(99, 140, 255, 0.2) 15%,
        rgba(168, 123, 255, 0.15) 35%,
        rgba(61, 217, 160, 0.1) 55%,
        rgba(255, 181, 71, 0.08) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: topbarShimmer 8s ease-in-out infinite;
}

@keyframes topbarShimmer {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

.topbar-left h1 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.panel-subtitle,
#panel-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.topbar-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.topbar-btn:hover {
    border-color: var(--accent);
    background: rgba(99, 140, 255, 0.1);
    box-shadow: 0 0 16px rgba(99, 140, 255, 0.15);
    transform: translateY(-2px) scale(1.05);
}

#date-range,
.date-filter,
select.date-filter {
    border-radius: 10px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 500;
    padding: 7px 18px;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

#date-range:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 10px rgba(99, 140, 255, 0.08);
}


/* ═══════════════════════════════════════════════════════
   KPI CARDS — Rotating gradient border + 3D depth
   The HERO effect: animated conic-gradient scanning border
   ═══════════════════════════════════════════════════════ */

.summary-card {
    --border-angle: 0deg;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px 20px;
    position: relative;
    overflow: visible;
    isolation: isolate;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

/* Animated scanning gradient border — THE WOW EFFECT */
.summary-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    padding: 2px;
    background: conic-gradient(
        from var(--border-angle),
        transparent 0%,
        transparent 20%,
        #638cff 28%,
        #a87bff 35%,
        #3dd9a0 42%,
        transparent 50%,
        transparent 100%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.summary-card:hover::before {
    opacity: 1;
    animation: borderScan 3s linear infinite;
}

@keyframes borderScan {
    to { --border-angle: 360deg; }
}

/* Outer glow on hover */
.summary-card::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 24px;
    background: conic-gradient(
        from var(--border-angle),
        transparent 0%,
        transparent 20%,
        rgba(99, 140, 255, 0.15) 30%,
        rgba(168, 123, 255, 0.1) 40%,
        transparent 50%,
        transparent 100%
    );
    filter: blur(12px);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -2;
    pointer-events: none;
}

.summary-card:hover::after {
    opacity: 1;
    animation: borderScan 3s linear infinite;
}

/* Card hover — 3D lift */
.summary-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(99, 140, 255, 0.15);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(99, 140, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Per-card border scan colors */
.summary-card:nth-child(1)::before {
    background: conic-gradient(from var(--border-angle), transparent 20%, #638cff 28%, #89b4ff 35%, #638cff 42%, transparent 50%, transparent 100%);
}
.summary-card:nth-child(2)::before {
    background: conic-gradient(from var(--border-angle), transparent 20%, #3dd9a0 28%, #6eebc0 35%, #3dd9a0 42%, transparent 50%, transparent 100%);
}
.summary-card:nth-child(3)::before {
    background: conic-gradient(from var(--border-angle), transparent 20%, #a87bff 28%, #c4a3ff 35%, #a87bff 42%, transparent 50%, transparent 100%);
}
.summary-card:nth-child(4)::before {
    background: conic-gradient(from var(--border-angle), transparent 20%, #ffb547 28%, #ffd080 35%, #ffb547 42%, transparent 50%, transparent 100%);
}

/* Per-card outer glow colors */
.summary-card:nth-child(1)::after {
    background: conic-gradient(from var(--border-angle), transparent 20%, rgba(99, 140, 255, 0.2) 30%, transparent 50%, transparent 100%);
}
.summary-card:nth-child(2)::after {
    background: conic-gradient(from var(--border-angle), transparent 20%, rgba(61, 217, 160, 0.2) 30%, transparent 50%, transparent 100%);
}
.summary-card:nth-child(3)::after {
    background: conic-gradient(from var(--border-angle), transparent 20%, rgba(168, 123, 255, 0.2) 30%, transparent 50%, transparent 100%);
}
.summary-card:nth-child(4)::after {
    background: conic-gradient(from var(--border-angle), transparent 20%, rgba(255, 181, 71, 0.2) 30%, transparent 50%, transparent 100%);
}

/* Per-card hover glow colors */
.summary-card:nth-child(1):hover { box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 30px rgba(99, 140, 255, 0.12); }
.summary-card:nth-child(2):hover { box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 30px rgba(61, 217, 160, 0.12); }
.summary-card:nth-child(3):hover { box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 30px rgba(168, 123, 255, 0.12); }
.summary-card:nth-child(4):hover { box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 30px rgba(255, 181, 71, 0.12); }

/* Card header row */
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.card-header-row .card-change {
    margin-top: 0;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(61, 217, 160, 0.08);
}

/* Card icon — floating animation */
.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Per-card icon colors */
.summary-card:nth-child(1) .card-icon { background: rgba(99, 140, 255, 0.12); color: var(--card-blue); }
.summary-card:nth-child(2) .card-icon { background: rgba(61, 217, 160, 0.12); color: var(--card-green); }
.summary-card:nth-child(3) .card-icon { background: rgba(168, 123, 255, 0.12); color: var(--card-purple); }
.summary-card:nth-child(4) .card-icon { background: rgba(255, 181, 71, 0.12); color: var(--card-amber); }

.summary-card:hover .card-icon {
    transform: scale(1.15) rotate(-5deg);
}

.summary-card:nth-child(1):hover .card-icon { box-shadow: 0 0 20px rgba(99, 140, 255, 0.25); }
.summary-card:nth-child(2):hover .card-icon { box-shadow: 0 0 20px rgba(61, 217, 160, 0.25); }
.summary-card:nth-child(3):hover .card-icon { box-shadow: 0 0 20px rgba(168, 123, 255, 0.25); }
.summary-card:nth-child(4):hover .card-icon { box-shadow: 0 0 20px rgba(255, 181, 71, 0.25); }

/* Gradient text on card values */
.summary-card:nth-child(1) .card-value { background: linear-gradient(135deg, #638cff, #89b4ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.summary-card:nth-child(2) .card-value { background: linear-gradient(135deg, #3dd9a0, #6eebc0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.summary-card:nth-child(3) .card-value { background: linear-gradient(135deg, #a87bff, #c4a3ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.summary-card:nth-child(4) .card-value { background: linear-gradient(135deg, #ffb547, #ffd080); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.card-value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 4px;
}

.card-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.card-change {
    font-size: 12px;
    font-weight: 600;
}

/* Card sparkline */
.card-sparkline {
    height: 24px;
    margin-top: 12px;
    background: linear-gradient(90deg,
        rgba(99, 140, 255, 0.04) 0%,
        rgba(99, 140, 255, 0.1) 40%,
        rgba(99, 140, 255, 0.04) 100%
    );
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

/* Shimmer animation on sparklines */
.card-sparkline::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: sparkleShimmer 2.5s ease-in-out infinite;
}

@keyframes sparkleShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.summary-card:nth-child(2) .card-sparkline {
    background: linear-gradient(90deg, rgba(61,217,160,0.04) 0%, rgba(61,217,160,0.1) 40%, rgba(61,217,160,0.04) 100%);
}
.summary-card:nth-child(3) .card-sparkline {
    background: linear-gradient(90deg, rgba(168,123,255,0.04) 0%, rgba(168,123,255,0.1) 40%, rgba(168,123,255,0.04) 100%);
}

/* Progress bar in cards */
.card-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    margin-top: 12px;
    overflow: hidden;
}

.card-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #ffb547, #ffd080, #ffb547);
    background-size: 200% 100%;
    transition: width 0.8s ease;
    box-shadow: 0 0 12px rgba(255, 181, 71, 0.4);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}


/* ── Panel Grid Layout ────────────────────────── */

.panel-grid-2 {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.panel-grid-2 .chart-block { margin-top: 0; }
.panel-grid-2 .table-section { margin-top: 0; }


/* ═══════════════════════════════════════════════════════
   CHARTS — Glass cards with depth glow
   ═══════════════════════════════════════════════════════ */

.chart-block {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient accent at top */
.chart-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--card-blue), var(--card-purple), var(--card-green));
    opacity: 0;
    transition: opacity 0.4s;
}

.chart-block::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 60%;
    background: radial-gradient(ellipse at 50% 100%, rgba(99, 140, 255, 0.05), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.chart-block:hover {
    border-color: var(--border-glow);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 20px rgba(99, 140, 255, 0.06);
    transform: translateY(-2px);
}

.chart-block:hover::before {
    opacity: 0.6;
}

.chart-block:hover::after {
    opacity: 1;
}

.chart-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.chart-container {
    height: 200px;
    position: relative;
    z-index: 1;
}

.chart-container.small {
    height: 150px;
}

.chart-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
}

.chart-box h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════
   TABLES — Fixed headers + glass rows + glow indicators
   ═══════════════════════════════════════════════════════ */

.table-section h3,
.table-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.table-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    max-height: 360px;
    overflow-y: auto;
}

/* TABLE HEADER FIX — opaque background for sticky headers */
table th,
.data-table th {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    /* CRITICAL: opaque background so content doesn't show through on scroll */
    background: var(--bg-card-solid);
    position: sticky;
    top: 0;
    z-index: 2;
}

table td,
.data-table td {
    padding: 11px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.025);
    transition: all 0.25s ease;
}

table tr {
    transition: all 0.25s ease;
}

/* Row hover with glow indicator */
table tr:hover td {
    background: rgba(99, 140, 255, 0.05);
    color: var(--text-primary);
}

table tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--accent);
}


/* ── Status badges — Neon glow ──────────────── */

.status-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.status-badge.active,
.status-badge.confirmed {
    background: rgba(61, 217, 160, 0.12);
    color: var(--card-green);
    box-shadow: 0 0 12px rgba(61, 217, 160, 0.2);
}

.status-badge.paused {
    background: rgba(255, 181, 71, 0.10);
    color: var(--card-amber);
    box-shadow: 0 0 10px rgba(255, 181, 71, 0.12);
}

.status-badge.error,
.status-badge.removed {
    background: rgba(255, 107, 107, 0.10);
    color: var(--card-red);
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.1);
}


/* ═══════════════════════════════════════════════════════
   MINI AI — Aurora animated border
   ═══════════════════════════════════════════════════════ */

.mini-ai {
    --border-angle: 0deg;
    background: var(--mini-ai-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--mini-ai-border);
    border-radius: 18px;
    padding: 18px 22px;
    margin-top: 20px;
    position: relative;
    overflow: visible;
    isolation: isolate;
}

/* Aurora border on mini AI */
.mini-ai::before {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 20px;
    padding: 1.5px;
    background: conic-gradient(
        from var(--border-angle),
        #638cff 0%,
        #a87bff 25%,
        #3dd9a0 50%,
        #ffb547 75%,
        #638cff 100%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.4;
    animation: borderScan 6s linear infinite;
    z-index: -1;
}

.mini-ai-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    gap: 8px;
    color: var(--accent);
}

.mini-ai-field {
    border-radius: 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 10px 16px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.mini-ai-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 140, 255, 0.1), 0 0 20px rgba(99, 140, 255, 0.06);
    background: rgba(12, 15, 24, 0.95);
}

.mini-ai-send {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #638cff, #a87bff);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(99, 140, 255, 0.35);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mini-ai-send:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 8px 24px rgba(99, 140, 255, 0.5);
}


/* ═══════════════════════════════════════════════════════
   ADS SUBSECTIONS — Depth cards with hover elevation
   ═══════════════════════════════════════════════════════ */

.ads-subsections {
    gap: 14px;
}

.ads-subsection {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px 22px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.ads-subsection::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--card-blue), var(--card-purple));
    opacity: 0;
    transition: opacity 0.3s;
}

.ads-subsection:hover {
    border-color: var(--border-glow);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 16px rgba(99, 140, 255, 0.06);
    transform: translateY(-4px);
}

.ads-subsection:hover::after {
    opacity: 0.6;
}

.subsection-title {
    font-size: 13px;
    font-weight: 700;
}

.ads-stat {
    padding: 4px 0;
}

.ads-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.ads-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}


/* ═══════════════════════════════════════════════════════
   ERROR BANNER
   ═══════════════════════════════════════════════════════ */

.error-banner {
    background: rgba(255, 107, 107, 0.06);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.08);
}


/* ═══════════════════════════════════════════════════════
   SCROLLBAR — Gradient thumb
   ═══════════════════════════════════════════════════════ */

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(99, 140, 255, 0.15), rgba(168, 123, 255, 0.12));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(99, 140, 255, 0.3), rgba(168, 123, 255, 0.25));
}


/* ═══════════════════════════════════════════════════════
   CHANGE INDICATORS — Glow text
   ═══════════════════════════════════════════════════════ */

.change.positive,
.card-change.positive {
    color: var(--success);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(61, 217, 160, 0.25);
}

.card-header-row .card-change.positive {
    background: rgba(61, 217, 160, 0.1);
    text-shadow: none;
}

.change.negative,
.card-change.negative {
    color: var(--danger);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.25);
}

.card-header-row .card-change.negative {
    background: rgba(255, 107, 107, 0.1);
    text-shadow: none;
}

.change.neutral {
    color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════
   CARDS GRID
   ═══════════════════════════════════════════════════════ */

.cards-grid {
    gap: 16px;
}


/* ═══════════════════════════════════════════════════════
   SECTION BLOCKS
   ═══════════════════════════════════════════════════════ */

.section-block {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
}


/* ═══════════════════════════════════════════════════════
   BRAIN CHAT — Premium container
   ═══════════════════════════════════════════════════════ */

.brain-chat-container {
    border-radius: 18px;
    overflow: hidden;
}

.chat-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

.model-btn {
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.model-btn.active {
    background: var(--accent-light);
    box-shadow: 0 0 16px rgba(99, 140, 255, 0.2);
}

.model-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, #638cff, #a87bff);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(99, 140, 255, 0.4);
}

.chat-send-btn {
    background: linear-gradient(135deg, #638cff, #a87bff);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(99, 140, 255, 0.35);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-send-btn:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 8px 24px rgba(99, 140, 255, 0.5);
}

#chat-input {
    border-radius: 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    font-family: 'DM Sans', sans-serif;
    transition: all 0.3s ease;
}

#chat-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 140, 255, 0.1), 0 0 24px rgba(99, 140, 255, 0.05);
}


/* ═══════════════════════════════════════════════════════
   MODULE TOOLBAR — Gradient buttons with glow
   ═══════════════════════════════════════════════════════ */

.module-toolbar .btn {
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary {
    background: linear-gradient(135deg, #638cff, #5078e8);
    border: none;
    box-shadow: 0 4px 16px rgba(99, 140, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #a87bff, #638cff);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(99, 140, 255, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span,
.btn-primary i {
    position: relative;
    z-index: 1;
}


/* ═══════════════════════════════════════════════════════
   REELS TABS
   ═══════════════════════════════════════════════════════ */

.reels-tab {
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.reels-tab.active {
    background: var(--accent-light);
    box-shadow: inset 0 -2px 0 var(--accent), 0 0 12px rgba(99, 140, 255, 0.1);
}


/* ═══════════════════════════════════════════════════════
   LOADING SKELETON — Shimmer
   ═══════════════════════════════════════════════════════ */

.skeleton {
    background: linear-gradient(90deg,
        var(--bg-elevated) 25%,
        rgba(99, 140, 255, 0.1) 50%,
        var(--bg-elevated) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite ease-in-out;
    border-radius: 10px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* ═══════════════════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════════════════ */

::selection {
    background: rgba(99, 140, 255, 0.3);
    color: var(--text-primary);
}


/* ═══════════════════════════════════════════════════════
   ANIMATIONS — Spring entrance + float + pulse
   ═══════════════════════════════════════════════════════ */

@keyframes springIn {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    60% { opacity: 1; transform: translateY(-4px) scale(1.01); }
    80% { transform: translateY(2px) scale(0.995); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes scaleIn {
    0% { opacity: 0; transform: scale(0.9); }
    60% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
    0% { opacity: 0; transform: translateX(-12px); }
    100% { opacity: 1; transform: translateX(0); }
}

.panel {
    animation: springIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.summary-card {
    animation: springIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.chart-block,
.chart-box,
.ads-subsection {
    animation: springIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.table-wrapper {
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.15s;
}

.mini-ai {
    animation: springIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.2s;
}

/* Staggered card entrance */
.summary-card:nth-child(1) { animation-delay: 0s; }
.summary-card:nth-child(2) { animation-delay: 0.08s; }
.summary-card:nth-child(3) { animation-delay: 0.16s; }
.summary-card:nth-child(4) { animation-delay: 0.24s; }


/* ═══════════════════════════════════════════════════════
   QUICK PROMPTS
   ═══════════════════════════════════════════════════════ */

.quick-prompt {
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quick-prompt:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(99, 140, 255, 0.15);
}


/* ═══════════════════════════════════════════════════════
   LIGHT THEME ADJUSTMENTS
   ═══════════════════════════════════════════════════════ */

:root[data-theme="light"] .summary-card:nth-child(1) .card-value { background: linear-gradient(135deg, #2a50c0, #3b64d9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
:root[data-theme="light"] .summary-card:nth-child(2) .card-value { background: linear-gradient(135deg, #047857, #059669); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
:root[data-theme="light"] .summary-card:nth-child(3) .card-value { background: linear-gradient(135deg, #6d28d9, #7c3aed); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
:root[data-theme="light"] .summary-card:nth-child(4) .card-value { background: linear-gradient(135deg, #b45309, #d97706); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

:root[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, rgba(234, 236, 244, 0.95) 0%, rgba(234, 236, 244, 0.98) 100%);
}

:root[data-theme="light"] .sidebar-brand .brand-text {
    background: linear-gradient(135deg, #1a1f36 0%, #5c6280 40%, #1a1f36 60%, #7c3aed 80%, #1a1f36 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

:root[data-theme="light"] .nav-icon-box {
    background: rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .nav-icon-box.color-green { background: rgba(5, 150, 105, 0.08); color: #059669; }
:root[data-theme="light"] .nav-icon-box.color-blue { background: rgba(59, 100, 217, 0.08); color: #3b64d9; }
:root[data-theme="light"] .nav-icon-box.color-purple { background: rgba(124, 58, 237, 0.08); color: #7c3aed; }
:root[data-theme="light"] .nav-icon-box.color-amber { background: rgba(217, 119, 6, 0.08); color: #d97706; }
:root[data-theme="light"] .nav-icon-box.color-pink { background: rgba(219, 39, 119, 0.08); color: #db2777; }
:root[data-theme="light"] .nav-icon-box.color-cyan { background: rgba(8, 145, 178, 0.08); color: #0891b2; }

:root[data-theme="light"] .nav-badge.live {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

:root[data-theme="light"] .nav-badge.ai {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

:root[data-theme="light"] .sidebar-footer-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .change.positive { text-shadow: none; }
:root[data-theme="light"] .change.negative { text-shadow: none; }

:root[data-theme="light"] .card-header-row .card-change.positive {
    background: rgba(5, 150, 105, 0.08);
}

:root[data-theme="light"] .card-header-row .card-change.negative {
    background: rgba(220, 38, 38, 0.08);
}

:root[data-theme="light"] #main-content::before {
    left: 250px;
    background:
        radial-gradient(ellipse 800px 600px at 15% 5%, rgba(59, 100, 217, 0.05), transparent),
        radial-gradient(ellipse 600px 500px at 85% 75%, rgba(124, 58, 237, 0.04), transparent),
        radial-gradient(ellipse 500px 400px at 55% 35%, rgba(5, 150, 105, 0.03), transparent);
}

:root[data-theme="light"] #main-content::after {
    left: 250px;
    background-image:
        radial-gradient(circle 1px at center, rgba(59, 100, 217, 0.05) 1px, transparent 1px);
    opacity: 0.4;
}

/* Light theme — table header fix */
:root[data-theme="light"] table th,
:root[data-theme="light"] .data-table th {
    background: var(--bg-card-solid);
}

:root[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(59, 100, 217, 0.12), rgba(124, 58, 237, 0.1));
}

:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(59, 100, 217, 0.25), rgba(124, 58, 237, 0.2));
}

/* Light theme cards — rotating border colors */
:root[data-theme="light"] .summary-card:nth-child(1)::before {
    background: conic-gradient(from var(--border-angle), transparent 20%, #3b64d9 28%, #5078e8 35%, #3b64d9 42%, transparent 50%, transparent 100%);
}
:root[data-theme="light"] .summary-card:nth-child(2)::before {
    background: conic-gradient(from var(--border-angle), transparent 20%, #059669 28%, #34d399 35%, #059669 42%, transparent 50%, transparent 100%);
}
:root[data-theme="light"] .summary-card:nth-child(3)::before {
    background: conic-gradient(from var(--border-angle), transparent 20%, #7c3aed 28%, #a78bfa 35%, #7c3aed 42%, transparent 50%, transparent 100%);
}
:root[data-theme="light"] .summary-card:nth-child(4)::before {
    background: conic-gradient(from var(--border-angle), transparent 20%, #d97706 28%, #fbbf24 35%, #d97706 42%, transparent 50%, transparent 100%);
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sidebar {
        width: 250px;
        transform: translateX(-260px);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    #main-content,
    .main-content {
        margin-left: 0;
    }

    #main-content::before,
    #main-content::after {
        left: 0;
    }

    .panel-grid-2 {
        grid-template-columns: 1fr;
    }

    /* Disable 3D tilt on mobile */
    .summary-card:hover {
        transform: translateY(-4px);
    }
}
