/* ================================================================
   SUBSIDIARY TRACKER — Premium Data Intelligence Design System
   Violet + Mint dark theme (Linear/Raycast-inspired) 2026
   Palette: #7c5cfc violet, #00d4aa mint, #ff6b6b coral, #fbbf24 amber
   ================================================================ */

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0c0d12;
    --bg-deep: #06070a;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-solid: #13141a;
    --surface2: rgba(255, 255, 255, 0.06);
    --surface2-solid: #1a1b23;
    --border: rgba(255, 255, 255, 0.06);
    --border-solid: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(124, 92, 252, 0.15);
    --text: #e8eaed;
    --text-dim: rgba(232, 234, 237, 0.6);
    --text-muted: rgba(232, 234, 237, 0.35);
    --primary: #7c5cfc;
    --primary-hover: #9b82fd;
    --primary-glow: rgba(124, 92, 252, 0.25);
    --purple: #7c5cfc;
    --purple-glow: rgba(124, 92, 252, 0.25);
    --accent: #fbbf24;
    --accent-glow: rgba(251, 191, 36, 0.25);
    --gradient: linear-gradient(135deg, #7c5cfc, #00d4aa);
    --gradient-accent: linear-gradient(135deg, #fbbf24, #ff6b6b);
    --gradient-cool: linear-gradient(135deg, #7c5cfc 0%, #5b8def 50%, #00d4aa 100%);
    --gradient-warm: linear-gradient(135deg, #fbbf24, #ff6b6b, #e84393);
    --green: #00d4aa;
    --yellow: #fbbf24;
    --red: #ff6b6b;
    --blue: #60a5fa;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(124, 92, 252, 0.15);
    --transition-fast: 0.15s ease;
    --transition: 0.25s ease;
    --transition-slow: 0.4s ease;
}

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font);
    background: var(--bg);
    background-image: radial-gradient(ellipse at 50% 50%, #0c0d12 0%, #06070a 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 92, 252, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 92, 252, 0.5);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 92, 252, 0.3) var(--bg-deep);
}

/* ================================================================
   1. AURORA / MESH GRADIENT BACKGROUND
   Animated gradient blobs like Stripe's homepage
   ================================================================ */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: var(--bg);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(124, 92, 252, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 10%, rgba(0, 212, 170, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at 50% 80%, rgba(124, 92, 252, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 90% 70%, rgba(251, 191, 36, 0.06) 0%, transparent 50%);
    animation: auroraShift 20s ease-in-out infinite alternate;
    pointer-events: none;
    will-change: transform, opacity;
}

@keyframes auroraShift {
    0% {
        opacity: 0.5;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.35;
        transform: scale(1.05) rotate(1deg);
    }
    100% {
        opacity: 0.5;
        transform: scale(1) rotate(0deg);
    }
}

/* ================================================================
   9. FLOATING PARTICLES — CSS only
   ================================================================ */

.particle-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle-bg::before,
.particle-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: particleFloat 25s linear infinite;
}

.particle-bg::before {
    width: 4px;
    height: 4px;
    background: rgba(124, 92, 252, 0.3);
    top: 20%;
    left: 15%;
    box-shadow:
        60vw 10vh 0 0 rgba(0, 212, 170, 0.2),
        20vw 60vh 0 1px rgba(124, 92, 252, 0.15),
        80vw 30vh 0 0 rgba(251, 191, 36, 0.15),
        40vw 80vh 0 1px rgba(0, 212, 170, 0.12),
        10vw 45vh 0 0 rgba(124, 92, 252, 0.2),
        70vw 70vh 0 0 rgba(0, 212, 170, 0.15),
        90vw 50vh 0 1px rgba(124, 92, 252, 0.1),
        30vw 25vh 0 0 rgba(251, 191, 36, 0.12),
        55vw 90vh 0 0 rgba(124, 92, 252, 0.18),
        85vw 15vh 0 1px rgba(0, 212, 170, 0.1);
}

.particle-bg::after {
    width: 3px;
    height: 3px;
    background: rgba(0, 212, 170, 0.25);
    top: 60%;
    left: 70%;
    box-shadow:
        -50vw -20vh 0 0 rgba(124, 92, 252, 0.15),
        -30vw 20vh 0 1px rgba(0, 212, 170, 0.12),
        20vw -30vh 0 0 rgba(251, 191, 36, 0.1),
        -10vw 40vh 0 0 rgba(124, 92, 252, 0.2),
        10vw -10vh 0 1px rgba(0, 212, 170, 0.15),
        -40vw 10vh 0 0 rgba(124, 92, 252, 0.12),
        25vw 25vh 0 0 rgba(251, 191, 36, 0.08);
    animation-delay: -12s;
    animation-duration: 30s;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-5px, -30px) rotate(180deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* ================================================================
   12. SMOOTH FROSTED GLASS NAVBAR
   ================================================================ */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 64px;
    background: rgba(6, 7, 10, 0.75);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    border-bottom: 1px solid rgba(124, 92, 252, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    will-change: transform, backdrop-filter;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 92, 252, 0.3), rgba(0, 212, 170, 0.3), transparent);
    opacity: 0.6;
}

.navbar.scrolled {
    background: rgba(6, 7, 10, 0.92);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-bottom-color: rgba(124, 92, 252, 0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.logo {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 2px 12px rgba(124, 92, 252, 0.35);
    transition: transform var(--transition), box-shadow var(--transition);
}

.logo:hover {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 0 4px 20px rgba(124, 92, 252, 0.5);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links > a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    position: relative;
}

.nav-links > a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.nav-links > a.active {
    color: var(--primary);
    background: rgba(124, 92, 252, 0.08);
    font-weight: 600;
}

.nav-links > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--gradient);
    border-radius: 1px;
    transition: transform var(--transition);
}

.nav-links > a:hover::after,
.nav-links > a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* === 15. Mobile Hamburger Menu === */

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    gap: 5px;
    padding: 0;
    z-index: 110;
    transition: border-color var(--transition);
}

.nav-toggle:hover {
    border-color: var(--primary);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--primary);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--primary);
}

.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(6, 7, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.mobile-nav.open {
    display: flex;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.mobile-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
}

.mobile-nav a:hover {
    color: var(--primary);
    background: rgba(124, 92, 252, 0.08);
}

/* ================================================================
   MAIN CONTENT CONTAINER
   ================================================================ */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

/* ================================================================
   5. SMOOTH PAGE TRANSITIONS + STAGGERED CHILDREN
   ================================================================ */

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.page-transition {
    animation: pageEnter 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#app > * {
    animation: pageEnter 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stagger-in > * {
    opacity: 0;
    animation: floatIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stagger-in > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-in > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-in > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-in > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-in > *:nth-child(10) { animation-delay: 0.5s; }
.stagger-in > *:nth-child(11) { animation-delay: 0.55s; }
.stagger-in > *:nth-child(12) { animation-delay: 0.6s; }

/* ================================================================
   4. SCROLL REVEAL ANIMATIONS
   ================================================================ */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   UTILITY ANIMATION CLASSES
   ================================================================ */

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

.float-in {
    animation: floatIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.slide-in-right {
    animation: slideInRight 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ================================================================
   TEXT GRADIENT
   ================================================================ */

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================================================
   STATS CARDS
   ================================================================ */

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

.stat-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 92, 252, 0.3), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: rgba(124, 92, 252, 0.2);
}

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

.stat-card .label {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.stat-card .value.green { color: var(--green); }
.stat-card .value.yellow { color: var(--yellow); }
.stat-card .value.blue { color: var(--blue); }
.stat-card .value.primary { color: var(--primary); }

.stat-card .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Gradient top accent cards */
.stat-card.gradient-card {
    position: relative;
    overflow: hidden;
    border-top: none;
}

.stat-card.gradient-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.grad-sky::after { background: linear-gradient(90deg, #7c5cfc, #9b82fd); }
.stat-card.grad-blue::after { background: linear-gradient(90deg, #7c5cfc, #00d4aa); }
.stat-card.grad-green::after { background: linear-gradient(90deg, #00d4aa, #00b894); }
.stat-card.grad-amber::after { background: linear-gradient(90deg, #fbbf24, #ff6b6b); }
.stat-card.grad-indigo::after { background: linear-gradient(90deg, #7c5cfc, #a78bfa); }

/* ================================================================
   11. NUMBER COUNTER GLOW
   ================================================================ */

.counter-glow {
    text-shadow:
        0 0 10px rgba(124, 92, 252, 0.5),
        0 0 30px rgba(124, 92, 252, 0.2),
        0 0 60px rgba(124, 92, 252, 0.1);
}

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

.count-animated {
    animation: countFadeIn 0.4s ease-out;
}

/* ================================================================
   SECTION HEADERS
   ================================================================ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ================================================================
   2. GLASSMORPHISM CARDS
   ================================================================ */

.glass-card {
    background: rgba(12, 13, 18, 0.7);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.glass-card:hover {
    border-color: rgba(124, 92, 252, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(124, 92, 252, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ================================================================
   6. HOVER 3D TILT EFFECT
   ================================================================ */

.glow-card {
    position: relative;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.glow-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(
        from var(--glow-angle, 0deg),
        transparent 40%,
        rgba(124, 92, 252, 0.4) 50%,
        rgba(0, 212, 170, 0.4) 55%,
        transparent 65%
    );
    -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.25s ease;
    pointer-events: none;
}

.glow-card:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
    box-shadow:
        var(--shadow-lg),
        0 0 40px rgba(124, 92, 252, 0.1);
}

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

/* ================================================================
   3. ANIMATED GRADIENT BORDERS
   ================================================================ */

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

@keyframes glowRotate {
    to {
        --glow-angle: 360deg;
    }
}

.animated-border {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(
        from var(--glow-angle, 0deg),
        #7c5cfc,
        #00d4aa,
        #fbbf24,
        #ff6b6b,
        #00d4aa,
        #7c5cfc
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: glowRotate 4s linear infinite;
}

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

/* ================================================================
   13. PREMIUM DATA TABLES
   ================================================================ */

.table-container {
    background: rgba(12, 13, 18, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

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

thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

thead th {
    padding: 1rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(232, 234, 237, 0.5);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(124, 92, 252, 0.15);
    text-align: left;
    white-space: nowrap;
    user-select: none;
}

thead th:first-child {
    padding-left: 1.5rem;
}

thead th:last-child {
    padding-right: 1.5rem;
}

/* Subtle violet gradient line under header */
thead tr::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 92, 252, 0.3), rgba(0, 212, 170, 0.2), transparent);
}

tbody tr {
    transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

tbody td {
    padding: 0.9rem 1.25rem;
    font-size: 0.875rem;
    color: #e8eaed;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

tbody td:first-child {
    padding-left: 1.5rem;
}

tbody td:last-child {
    padding-right: 1.5rem;
}

/* Zebra striping — very subtle */
tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

/* Row hover — violet glow with left accent */
tbody tr:hover {
    background: rgba(124, 92, 252, 0.06);
}

tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 #7c5cfc;
}

/* Clickable row cursor */
tbody tr.clickable {
    cursor: pointer;
}

tbody tr.clickable:active {
    transform: scale(0.995);
    background: rgba(124, 92, 252, 0.1);
}

/* Last row no border */
tbody tr:last-child td {
    border-bottom: none;
}

/* Row entrance animation */
.table-row-animate {
    animation: tableRowSlide 350ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* Company name styling in tables */
td .company-name, td strong {
    font-weight: 600;
    color: #e8eaed;
}

/* Mono/code styling for CIK, IDs */
.cik-mono, td code {
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: rgba(232, 234, 237, 0.5);
    letter-spacing: 0.02em;
}

/* Rank circles for top items */
.rank-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(232, 234, 237, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-1 {
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.25), rgba(124, 92, 252, 0.1));
    color: #7c5cfc;
    border-color: rgba(124, 92, 252, 0.3);
    box-shadow: 0 0 12px rgba(124, 92, 252, 0.2);
}

.rank-2 {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(0, 212, 170, 0.08));
    color: #00d4aa;
    border-color: rgba(0, 212, 170, 0.25);
    box-shadow: 0 0 10px rgba(0, 212, 170, 0.15);
}

.rank-3 {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.08));
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.15);
}

/* Sub count bar visualization */
.sub-count-cell {
    position: relative;
}

.sub-count-bar-bg {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    right: 0;
    border-radius: 4px;
    overflow: hidden;
}

.sub-count-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(124, 92, 252, 0.12), rgba(0, 212, 170, 0.06));
    transition: width 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sub-count {
    position: relative;
    z-index: 1;
    font-variant-numeric: tabular-nums;
}

/* Empty state */
tbody tr.table-empty td {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(232, 234, 237, 0.35);
    font-style: italic;
}

/* Table scroll container for wide tables */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll::-webkit-scrollbar {
    height: 4px;
}

.table-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: rgba(124, 92, 252, 0.3);
    border-radius: 2px;
}

/* ================================================================
   SEARCH BOX
   ================================================================ */

.search-box {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.85rem 1.25rem;
    background: var(--surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.1), 0 0 20px rgba(124, 92, 252, 0.05);
    background: rgba(12, 13, 18, 0.9);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* ================================================================
   BUTTONS
   ================================================================ */

.btn {
    padding: 0.65rem 1.3rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-position 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--gradient);
    background-size: 200% 100%;
    color: white;
    border: none;
    box-shadow: 0 2px 12px rgba(124, 92, 252, 0.3);
}

.btn-primary:hover {
    background-position: 100% 0;
    box-shadow: 0 4px 20px rgba(124, 92, 252, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(124, 92, 252, 0.05);
    box-shadow: 0 0 20px rgba(124, 92, 252, 0.08);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

/* 7. MAGNETIC BUTTON with glow */

.btn-glow {
    background: var(--gradient);
    background-size: 200% 100%;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background-position 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(124, 92, 252, 0.3);
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-glow:hover {
    background-position: 100% 0;
    box-shadow:
        0 6px 25px rgba(124, 92, 252, 0.4),
        0 0 40px rgba(124, 92, 252, 0.15),
        0 0 80px rgba(0, 212, 170, 0.1);
    transform: translateY(-2px);
}

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

.btn-glow:active {
    transform: translateY(0) scale(0.98);
}

/* ================================================================
   8. RIPPLE CLICK EFFECT
   ================================================================ */

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.btn .ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: ripple 0.6s ease-out forwards;
    pointer-events: none;
}

/* ================================================================
   BADGES
   ================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    animation: badgeAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.badge-high, .badge-active {
    background: rgba(0, 212, 170, 0.12);
    color: #00d4aa;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.badge-medium {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.badge-low {
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.badge-enriched {
    background: rgba(124, 92, 252, 0.12);
    color: #7c5cfc;
    border: 1px solid rgba(124, 92, 252, 0.2);
}

/* Filter pills for table filtering */
.filter-pill {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 200ms ease;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: rgba(124, 92, 252, 0.4);
    color: var(--text);
    background: rgba(124, 92, 252, 0.06);
}

.filter-pill.active {
    background: rgba(124, 92, 252, 0.15);
    border-color: rgba(124, 92, 252, 0.4);
    color: #7c5cfc;
    box-shadow: 0 0 10px rgba(124, 92, 252, 0.15);
}

.table-filters {
    padding: 0.6rem 0;
}

.table-filters select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237c5cfc' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    padding-right: 2rem !important;
}

/* Badge scale-in animation */
@keyframes badgeAppear {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ================================================================
   PAGINATION
   ================================================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
}

.pagination button {
    padding: 0.45rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font);
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination button:hover {
    border-color: var(--primary);
    background: rgba(124, 92, 252, 0.06);
    box-shadow: 0 0 15px rgba(124, 92, 252, 0.08);
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination .page-info {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ================================================================
   COMPANY DETAIL
   ================================================================ */

.company-header {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.company-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0.7;
}

.company-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.company-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.back-link {
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition), gap var(--transition);
}

.back-link:hover {
    color: var(--primary-hover);
    gap: 0.6rem;
}

/* ================================================================
   CHART CONTAINER
   ================================================================ */

.chart-container {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow var(--transition);
}

.chart-container:hover {
    box-shadow: var(--shadow-md);
}

.chart-container canvas {
    max-height: 400px;
}

.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ================================================================
   AGENTIC SEARCH PANEL
   ================================================================ */

.search-panel {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.search-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    transition: background var(--transition), transform var(--transition-fast);
}

.search-step:hover {
    background: rgba(255, 255, 255, 0.07);
}

.step-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: background 0.25s ease,
                color 0.25s ease,
                box-shadow 0.25s ease;
}

.step-running .step-indicator {
    background: rgba(251, 191, 36, 0.15);
    color: var(--yellow);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
    animation: stepPulse 1.5s ease-in-out infinite;
}

@keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
}

.step-done .step-indicator {
    background: rgba(0, 212, 170, 0.15);
    color: var(--green);
}

.step-pending .step-indicator {
    background: var(--border);
    color: var(--text-muted);
}

.step-content {
    flex: 1;
}

.step-content .step-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.step-content .step-detail {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

/* ================================================================
   AI RESULT CARD
   ================================================================ */

.ai-result {
    background: rgba(124, 92, 252, 0.04);
    border: 1px solid rgba(124, 92, 252, 0.25);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.ai-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
}

.ai-result h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.result-item .result-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-item .result-value {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ================================================================
   LOADING & SPINNER
   ================================================================ */

.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--text-dim);
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary);
    border-right: 3px solid rgba(124, 92, 252, 0.4);
    border-bottom: 3px solid rgba(0, 212, 170, 0.15);
    border-left: 3px solid rgba(124, 92, 252, 0.4);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 8px rgba(124, 92, 252, 0.3));
}

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

/* 14. SKELETON LOADING — Improved shimmer */

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

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 37%,
        rgba(255, 255, 255, 0.04) 63%
    );
    background-size: 1200px 100%;
    animation: shimmer 1.8s ease-in-out infinite;
    border-radius: var(--radius);
}

.skeleton-text {
    height: 0.9rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
}

.skeleton-title {
    height: 1.4rem;
    width: 60%;
    margin-bottom: 0.75rem;
    border-radius: 6px;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius);
}

/* ================================================================
   TABS
   ================================================================ */

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tab {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dim);
    border-bottom: 2px solid transparent;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
}

.tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ================================================================
   EMPTY STATE
   ================================================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}

.empty-state .icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ================================================================
   10. TYPEWRITER CURSOR
   ================================================================ */

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

.typewriter-cursor::after {
    content: '|';
    display: inline-block;
    color: var(--primary);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    font-weight: 300;
}

/* ================================================================
   HERO SECTION (Landing / Product)
   ================================================================ */

.hero-section {
    text-align: center;
    padding: 4rem 2rem 3rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(124, 92, 252, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 60% at 20% 80%, rgba(0, 212, 170, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 80% 60%, rgba(251, 191, 36, 0.05) 0%, transparent 50%),
        var(--surface);
    border: 1px solid var(--border);
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* ================================================================
   DASHBOARD HERO
   ================================================================ */

.dashboard-hero {
    text-align: center;
    padding: 2.5rem 1.5rem 2rem;
    margin-bottom: 2rem;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(124, 92, 252, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 80% 80%, rgba(0, 212, 170, 0.06) 0%, transparent 50%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-stat {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    letter-spacing: -0.03em;
}

.hero-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto;
}

.hero-freshness {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 212, 170, 0.06);
    border: 1px solid rgba(0, 212, 170, 0.15);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--green);
}

.hero-freshness .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: freshPulse 2s ease-in-out infinite;
}

@keyframes freshPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.4);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 0 4px rgba(0, 212, 170, 0);
    }
}

/* ================================================================
   FEATURE GRID (Landing / Product Features)
   ================================================================ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-grid .feature-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.feature-grid .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(124, 92, 252, 0.2);
}

.feature-grid .feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: rgba(124, 92, 252, 0.08);
}

.feature-grid .feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-grid .feature-card p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ================================================================
   PRICING CARDS
   ================================================================ */

.pricing-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    position: relative;
}

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

.pricing-card.featured {
    border-color: rgba(124, 92, 252, 0.3);
    box-shadow: 0 0 40px rgba(124, 92, 252, 0.08);
}

.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 1rem 0;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-dim);
}

/* ================================================================
   QUICK ACTIONS BAR
   ================================================================ */

.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-btn:hover {
    border-color: var(--primary);
    background: rgba(124, 92, 252, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 92, 252, 0.12);
}

.quick-action-btn .qa-icon {
    font-size: 1.05rem;
}

/* ================================================================
   TECH STACK PAGE
   ================================================================ */

.techstack-page {
    max-width: 1000px;
    margin: 0 auto;
}

.tech-hero {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
}

.tech-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: var(--gradient-cool);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tech-subtitle {
    color: var(--text-dim);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tech-subtitle strong {
    color: var(--text);
}

.tech-section {
    margin-bottom: 2.5rem;
}

.tech-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Architecture Diagram */
.arch-diagram {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.arch-layer {
    margin-bottom: 0.25rem;
}

.arch-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.arch-items {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.arch-box {
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    flex: 1;
    min-width: 150px;
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition);
}

.arch-box:hover {
    transform: translateY(-2px);
}

.arch-frontend {
    background: rgba(124, 92, 252, 0.1);
    color: #b4a5fd;
    border: 1px solid rgba(124, 92, 252, 0.2);
}

.arch-api {
    background: rgba(124, 92, 252, 0.1);
    color: #9b82fd;
    border: 1px solid rgba(124, 92, 252, 0.2);
}

.arch-ai {
    background: rgba(251, 191, 36, 0.1);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.arch-data {
    background: rgba(0, 212, 170, 0.1);
    color: #00d4aa;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.arch-arrow {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    padding: 0.25rem 0;
}

/* Tech Grid */
.tech-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tech-category {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.tech-cat-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.tech-cat-header h3 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.tech-cat-header p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.tech-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.tech-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transition: background var(--transition);
}

.tech-item:hover {
    background: rgba(124, 92, 252, 0.03);
}

.tech-item:nth-child(even) {
    border-right: none;
}

.tech-item:nth-last-child(-n+2) {
    border-bottom: none;
}

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

.tech-item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.tech-item-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.skill-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color var(--transition),
                box-shadow var(--transition);
}

.skill-card:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 92, 252, 0.3);
    box-shadow: var(--shadow-md);
}

.skill-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.skill-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-tag {
    padding: 0.2rem 0.55rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-dim);
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* How It Works */
.how-it-works {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.how-step {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    transition: background var(--transition);
}

.how-step:hover {
    background: rgba(124, 92, 252, 0.02);
}

.how-step:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.how-step:last-child {
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.how-number {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(124, 92, 252, 0.25);
}

.how-content h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.how-content p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ================================================================
   STATUS & ACTIONS PAGE
   ================================================================ */

.status-page {
    max-width: 1000px;
    margin: 0 auto;
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comp-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color var(--transition), box-shadow var(--transition), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.comp-healthy {
    border-left: 3px solid var(--green);
}

.comp-warning {
    border-left: 3px solid var(--yellow);
}

.comp-error {
    border-left: 3px solid var(--red);
}

.comp-unknown {
    border-left: 3px solid var(--text-dim);
}

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

.comp-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.comp-file {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.15rem 0.4rem;
    background: rgba(124, 92, 252, 0.06);
    border-radius: 4px;
    transition: background var(--transition-fast);
}

.comp-file:hover {
    background: rgba(124, 92, 252, 0.15);
}

.comp-detail {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.comp-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comp-metric {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.comp-metric strong {
    color: var(--text);
}

.comp-metric-label {
    text-transform: capitalize;
}

.comp-hint {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.comp-hint code {
    font-size: 0.75rem;
    color: var(--yellow);
    word-break: break-all;
    font-family: var(--font-mono);
}

.comp-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.comp-action-result {
    margin-top: 0.5rem;
}

.action-success {
    font-size: 0.8rem;
    color: var(--green);
    padding: 0.5rem 0.75rem;
    background: rgba(0, 212, 170, 0.06);
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 170, 0.15);
}

.action-error {
    font-size: 0.8rem;
    color: var(--red);
    padding: 0.5rem 0.75rem;
    background: rgba(255, 107, 107, 0.06);
    border-radius: 6px;
    border: 1px solid rgba(255, 107, 107, 0.15);
}

/* ================================================================
   FILE MAP / CODE NAVIGATOR
   ================================================================ */

.filemap-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filemap-section {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.filemap-header {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}

.filemap-files {
    display: flex;
    flex-direction: column;
}

.filemap-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background var(--transition-fast), padding-left var(--transition-fast);
}

.filemap-row:last-child {
    border-bottom: none;
}

.filemap-row:hover {
    background: rgba(124, 92, 252, 0.03);
    padding-left: 1.5rem;
}

.filemap-icon {
    flex-shrink: 0;
}

.file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 20px;
    border-radius: 3px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.file-py { background: rgba(124, 92, 252, 0.12); color: var(--blue); }
.file-js { background: rgba(251, 191, 36, 0.12); color: var(--yellow); }
.file-css { background: rgba(124, 92, 252, 0.12); color: var(--primary); }
.file-html { background: rgba(255, 107, 107, 0.12); color: var(--red); }
.file-db { background: rgba(0, 212, 170, 0.12); color: var(--green); }
.file-txt { background: rgba(138, 144, 165, 0.12); color: var(--text-dim); }

.filemap-info {
    flex: 1;
    min-width: 0;
}

.filemap-path {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text);
    font-weight: 500;
}

.filemap-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}

/* ================================================================
   FILE PATH MODAL
   ================================================================ */

.filepath-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 7, 10, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: modalBackdropIn 0.3s ease both;
}

/* 17. MODAL BACKDROP — Blur + darken */

@keyframes modalBackdropIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

@keyframes modalContentIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.filepath-content {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    min-width: 500px;
    max-width: 90vw;
    animation: modalContentIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
    box-shadow: var(--shadow-lg);
}

.filepath-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 600;
}

.filepath-close {
    cursor: pointer;
    color: var(--text-dim);
    font-size: 1.1rem;
    padding: 0.25rem;
    transition: color var(--transition-fast);
}

.filepath-close:hover {
    color: var(--text);
}

.filepath-path {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.filepath-path code {
    flex: 1;
    font-size: 0.75rem;
    color: var(--green);
    word-break: break-all;
    font-family: var(--font-mono);
}

.filepath-relative {
    padding: 0.5rem 0.75rem;
}

/* ================================================================
   16. TOOLTIP ANIMATIONS — Fade + scale in
   ================================================================ */

@keyframes tooltipIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.92);
    background: var(--surface2-solid);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow-md);
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* ================================================================
   ANALYTICS PAGE
   ================================================================ */

.analytics-page {
    max-width: 1200px;
    margin: 0 auto;
}

.churn-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.churn-bar {
    height: 8px;
    background: linear-gradient(90deg, var(--yellow), var(--red));
    border-radius: 4px;
    min-width: 2px;
    max-width: 120px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: left;
}

/* ================================================================
   18. PROGRESS BAR ANIMATIONS
   ================================================================ */

@keyframes progressFill {
    from {
        width: 0%;
    }
}

@keyframes progressShine {
    from {
        background-position: -200% 0;
    }
    to {
        background-position: 200% 0;
    }
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: progressFill 1s cubic-bezier(0.16, 1, 0.3, 1) both,
               progressShine 2s ease-in-out infinite;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    background-size: 200% 100%;
    animation: progressShine 2s ease-in-out infinite;
}

/* ================================================================
   COMPARE PAGE
   ================================================================ */

.compare-page {
    max-width: 1200px;
    margin: 0 auto;
}

.compare-search {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.compare-search input {
    flex: 1;
    padding: 0.85rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.compare-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.1);
}

.compare-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.compare-result-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.compare-result-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.compare-result-card.selected {
    border-color: var(--green);
    background: rgba(0, 212, 170, 0.04);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.08);
}

.compare-result-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.compare-result-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.compare-selected {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.compare-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.compare-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    text-transform: capitalize;
    transition: border-color var(--transition-fast);
}

.compare-chip:hover {
    border-color: var(--primary);
}

.compare-chip-remove {
    cursor: pointer;
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1;
    transition: color var(--transition-fast);
}

.compare-chip-remove:hover {
    color: var(--red);
}

.compare-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.compare-stat-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow var(--transition);
}

.compare-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.compare-stat-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.compare-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.compare-stat-row span {
    color: var(--text-dim);
}

/* ================================================================
   NETWORK PAGE
   ================================================================ */

.network-page {
    max-width: 1200px;
    margin: 0 auto;
}

.network-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.network-options select {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
    font-family: var(--font);
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition);
}

.network-options select:focus {
    border-color: var(--primary);
}

.network-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.network-header h3 {
    text-transform: capitalize;
}

.network-legend {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.network-canvas-wrap {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.network-canvas-wrap canvas {
    width: 100%;
    display: block;
}

.network-tooltip {
    position: fixed;
    background: var(--surface2-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 0.8rem;
    z-index: 1000;
    pointer-events: none;
    max-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: tooltipIn 0.2s ease both;
}

.network-list {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.network-list-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.network-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background var(--transition-fast);
}

.network-list-item:hover {
    background: rgba(124, 92, 252, 0.05);
}

.network-list-name {
    flex: 1;
    text-transform: capitalize;
}

/* ================================================================
   20. FOOTER — Gradient top border, modern layout
   ================================================================ */

.site-footer {
    margin-top: 4rem;
    padding: 2.5rem 2rem 2rem;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--primary),
        var(--purple),
        var(--accent),
        var(--purple),
        var(--primary),
        transparent
    );
    opacity: 0.6;
}

.footer-content p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.footer-content p:first-child {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.footer-meta {
    font-size: 0.75rem !important;
}

.footer-meta strong {
    color: var(--primary);
    font-weight: 600;
}

/* ================================================================
   ACCESSIBILITY — Focus Styles
   ================================================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ================================================================
   SKIP LINK (Screen Readers)
   ================================================================ */

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 10000;
    font-size: 0.85rem;
    border-radius: 0 0 6px 0;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 0;
}

/* ================================================================
   RESPONSIVE — 1200px
   ================================================================ */

@media (max-width: 1200px) {
    main {
        max-width: 960px;
        padding: 1.5rem;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ================================================================
   RESPONSIVE — 992px
   ================================================================ */

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .compare-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

/* ================================================================
   RESPONSIVE — 768px
   ================================================================ */

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .navbar {
        padding: 0 1rem;
    }

    main {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .company-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tech-items {
        grid-template-columns: 1fr;
    }

    .tech-item {
        border-right: none;
    }

    .tech-item:last-child {
        border-bottom: none;
    }

    .tech-hero h1 {
        font-size: 1.5rem;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .arch-items {
        flex-direction: column;
    }

    .compare-stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding: 3rem 1.5rem 2rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section p {
        font-size: 0.95rem;
    }

    .dashboard-hero {
        padding: 1.5rem 1rem;
    }

    .hero-stat {
        font-size: 2.2rem;
    }

    .hero-label {
        font-size: 1rem;
    }

    .quick-actions {
        flex-direction: column;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .filepath-content {
        min-width: auto;
        margin: 1rem;
    }

    .compare-search {
        flex-direction: column;
    }

    .search-box {
        flex-direction: column;
    }

    .network-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .pricing-card {
        padding: 2rem 1.5rem;
    }

    .pricing-card .price {
        font-size: 2.5rem;
    }
}

/* ================================================================
   RESPONSIVE — 480px
   ================================================================ */

@media (max-width: 480px) {
    .navbar {
        padding: 0 0.75rem;
        height: 56px;
    }

    .logo {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .nav-brand {
        font-size: 1rem;
    }

    main {
        padding: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .value {
        font-size: 1.6rem;
    }

    .hero-stat {
        font-size: 1.8rem;
    }

    .hero-label {
        font-size: 0.9rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section p {
        font-size: 0.88rem;
    }

    .section-header h2 {
        font-size: 1.1rem;
    }

    .table-container {
        border-radius: 12px;
    }

    thead th, tbody td {
        padding: 0.7rem 0.75rem;
        font-size: 0.8rem;
    }

    thead th:first-child, tbody td:first-child { padding-left: 1rem; }
    thead th:last-child, tbody td:last-child { padding-right: 1rem; }

    .company-header {
        padding: 1.25rem;
    }

    .company-header h1 {
        font-size: 1.3rem;
    }

    .chart-container {
        padding: 1rem;
    }

    .search-panel {
        padding: 1rem;
    }

    .btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }

    .btn-glow {
        padding: 0.6rem 1.2rem;
        font-size: 0.88rem;
    }

    .compare-result-card {
        padding: 0.85rem;
    }

    .comp-card {
        padding: 1rem;
    }

    .mobile-nav a {
        font-size: 1.2rem;
    }

    .pricing-card {
        padding: 1.5rem 1rem;
    }

    .pricing-card .price {
        font-size: 2rem;
    }
}

/* ================================================================
   REDUCED MOTION — Accessibility
   ================================================================ */

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

    body::after {
        animation: none;
    }

    .particle-bg::before,
    .particle-bg::after {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .stagger-in > * {
        opacity: 1;
        animation: none;
    }
}

/* ================================================================
   SELECTION HIGHLIGHT
   ================================================================ */

::selection {
    background: rgba(124, 92, 252, 0.35);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(124, 92, 252, 0.35);
    color: #ffffff;
}

/* ================================================================
   PLACEHOLDER COLOR (global)
   ================================================================ */

::placeholder {
    color: var(--text-muted);
}

::-moz-placeholder {
    color: var(--text-muted);
}

/* ================================================================
   PRINT STYLES
   ================================================================ */

@media print {
    body::before,
    body::after,
    .particle-bg,
    .navbar,
    .site-footer {
        display: none;
    }

    body {
        background: white;
        color: #111;
    }

    .stat-card,
    .glass-card,
    .glow-card,
    .chart-container,
    .table-container,
    .company-header {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
        backdrop-filter: none;
    }
}

/* ============================================================
   DASHBOARD-SPECIFIC STYLES
   ============================================================ */

/* Animated Mesh Background */
.dashboard-mesh-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: meshFloat 20s ease-in-out infinite;
    will-change: transform;
}

.mesh-orb-1 {
    width: 400px; height: 400px;
    background: var(--primary);
    top: -10%; left: -5%;
    animation-delay: 0s;
}

.mesh-orb-2 {
    width: 350px; height: 350px;
    background: #00d4aa;
    top: 20%; right: -10%;
    animation-delay: -7s;
}

.mesh-orb-3 {
    width: 300px; height: 300px;
    background: #ff6b6b;
    bottom: -5%; left: 30%;
    animation-delay: -14s;
}

@keyframes meshFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Hero Stat */
.hero-stat-wrapper {
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.hero-stat-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 0.25rem;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-dim);
    text-align: center;
    max-width: 540px;
    margin: 0.75rem auto;
    min-height: 1.5em;
    position: relative;
    z-index: 1;
}

/* Command Palette Search Bar */
.dashboard-search {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.command-search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(18, 19, 24, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: text;
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.command-search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(124, 92, 252, 0.15);
}

.command-search-bar .search-icon {
    color: var(--text-dim);
    flex-shrink: 0;
}

.command-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
}

.command-search-bar input::placeholder {
    color: var(--text-dim);
}

.search-kbd {
    padding: 0.2rem 0.5rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: inherit;
    white-space: nowrap;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.25rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-card:hover {
    border-color: var(--primary);
    background: rgba(124, 92, 252, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 92, 252, 0.12);
}

.qa-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(124, 92, 252, 0.08);
    color: var(--primary);
}

.qa-label {
    font-weight: 500;
    text-align: center;
}

/* Stat Cards — Dashboard Enhanced */
.stat-icon-wrap {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.stat-sky { color: #7c5cfc; }
.stat-primary { color: #7c5cfc; }
.stat-green { color: #00d4aa; }
.stat-amber { color: #fbbf24; }
.stat-indigo { color: #9b82fd; }

.card-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chart Header with Toggle */
.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.chart-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.chart-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    cursor: pointer;
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Rank & table utilities now unified in Premium Data Tables section (section 13) */

.rank-default {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(232, 234, 237, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.company-name {
    font-weight: 600;
}

/* Dashboard Table Section */
.dashboard-table-section {
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .command-search-bar {
        padding: 0.6rem 1rem;
    }
    .search-kbd {
        display: none;
    }
}

/* ================================================================
   AUTH PAGES
   ================================================================ */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.auth-card {
    background: var(--surface, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

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

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-dim, rgba(232, 234, 237, 0.6));
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim, rgba(232, 234, 237, 0.6));
}

.form-group input {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    background: var(--surface-2, rgba(255,255,255,0.06));
    color: var(--text, #e8eaed);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary, #7c5cfc);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.15);
}

.btn-full {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-danger {
    background: var(--red, #ff6b6b);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    background: var(--surface-2, rgba(255,255,255,0.08));
    color: var(--text, #e8eaed);
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    cursor: pointer;
}

.btn-sm:hover {
    background: var(--surface, rgba(255,255,255,0.12));
}

.auth-error {
    color: var(--red, #ff6b6b);
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-dim, rgba(232, 234, 237, 0.6));
}

.auth-footer a {
    color: var(--primary, #7c5cfc);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ================================================================
   PRICING PAGE
   ================================================================ */

.pricing-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.pricing-card {
    background: var(--surface, rgba(255,255,255,0.04));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-card.featured {
    border-color: var(--primary, #7c5cfc);
    box-shadow: 0 0 30px rgba(124, 92, 252, 0.15);
}

.pricing-card .plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pricing-card .plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.pricing-card .plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-dim, rgba(232, 234, 237, 0.6));
}

.pricing-card .plan-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.pricing-card .plan-features li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--text-dim, rgba(232, 234, 237, 0.6));
}

.pricing-card .plan-features li::before {
    content: "\2713 ";
    color: var(--green, #00d4aa);
    font-weight: 700;
    margin-right: 0.5rem;
}

.pricing-card .plan-features li.disabled {
    opacity: 0.4;
}

.pricing-card .plan-features li.disabled::before {
    content: "\2717 ";
    color: var(--red, #ff6b6b);
}

/* ============================================================
   GSAP Animation Enhancements (2026)
   ============================================================ */

/* Magnetic button hover glow */
.btn-magnetic {
    position: relative;
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-magnetic:hover {
    box-shadow: 0 0 25px rgba(124, 92, 252, 0.4), 0 0 50px rgba(124, 92, 252, 0.15);
}

/* Animated gradient border for featured cards */
.glow-border {
    position: relative;
    border: none !important;
}
.glow-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #7c5cfc, #00d4aa, #fbbf24, #7c5cfc);
    background-size: 300% 300%;
    animation: borderGlow 4s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Smooth clip-path text reveal */
.clip-reveal {
    clip-path: inset(0 100% 0 0);
}
.clip-reveal.revealed {
    clip-path: inset(0 0% 0 0);
    transition: clip-path 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Pulse glow for live indicators */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 212, 170, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 212, 170, 0.6), 0 0 40px rgba(0, 212, 170, 0.2); }
}

/* Smooth backdrop blur transition */
.blur-in {
    animation: blurIn 0.6s ease-out forwards;
}
@keyframes blurIn {
    from { backdrop-filter: blur(0px); opacity: 0; }
    to { backdrop-filter: blur(12px); opacity: 1; }
}

/* Number counter glow on complete */
.counter-done {
    text-shadow: 0 0 20px rgba(124, 92, 252, 0.5);
    transition: text-shadow 0.3s ease;
}

/* Smooth chart container reveal */
.chart-reveal {
    opacity: 0;
    transform: scale(0.95);
}
.chart-reveal.visible {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Enhanced card hover with depth */
.depth-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.depth-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(124, 92, 252, 0.1);
}

/* Liquid glass morphism variant */
.liquid-glass {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 24px rgba(0, 0, 0, 0.2);
}

/* ================================================================
   TIMELINE PLAYER PAGE
   ================================================================ */

.timeline-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.timeline-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.timeline-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.timeline-subtitle {
    color: var(--text-dim);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* --- Stats Bar --- */

.timeline-stats-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.timeline-stat {
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.timeline-stat-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    font-family: var(--font-mono);
    letter-spacing: -0.5px;
}

.timeline-stat:first-child .timeline-stat-value {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
}

/* --- Chart Container --- */

.timeline-chart-wrap {
    position: relative;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    height: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.timeline-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.timeline-playhead {
    display: none; /* playhead is drawn on canvas via Chart.js plugin */
}

/* --- Player Controls --- */

.timeline-player-controls {
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 2.5rem;
}

.timeline-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Play Button */

.play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: rgba(124, 92, 252, 0.1);
    color: var(--primary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-btn:hover {
    background: rgba(124, 92, 252, 0.2);
    box-shadow: 0 0 20px rgba(124, 92, 252, 0.3);
    transform: scale(1.05);
}

.play-btn.playing {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(251, 191, 36, 0.1);
    animation: none;
}

.play-btn.playing:hover {
    background: rgba(251, 191, 36, 0.2);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.play-btn.paused,
.play-btn:not(.playing) {
    animation: playPulse 2s ease-in-out infinite;
}

@keyframes playPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124, 92, 252, 0.3); }
    50%      { box-shadow: 0 0 20px 6px rgba(124, 92, 252, 0.15); }
}

/* Step & Reset Buttons */

.step-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-btn:hover {
    color: var(--text);
    border-color: var(--primary);
    background: rgba(124, 92, 252, 0.08);
}

/* Scrubber Row */

.timeline-scrubber-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timeline-scrubber-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    font-family: var(--font-mono);
    min-width: 40px;
    text-align: center;
}

.timeline-scrubber {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--surface2);
    border: 1px solid var(--border);
    outline: none;
    cursor: pointer;
}

.timeline-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(124, 92, 252, 0.4), 0 2px 8px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.15);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.timeline-scrubber::-webkit-slider-thumb:hover {
    box-shadow: 0 0 18px rgba(124, 92, 252, 0.6), 0 2px 12px rgba(0,0,0,0.4);
    transform: scale(1.15);
}

.timeline-scrubber::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(124, 92, 252, 0.4), 0 2px 8px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.15);
}

/* Speed Buttons */

.timeline-speed-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.speed-btn {
    padding: 0.35rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.speed-btn:hover {
    color: var(--text);
    border-color: var(--primary);
}

.speed-btn.active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 12px rgba(124, 92, 252, 0.3);
}

/* Year Display */

.timeline-year-display {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 900;
    font-family: var(--font-mono);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    line-height: 1;
    user-select: none;
    text-shadow: none;
}

/* --- Snapshot Cards --- */

.timeline-snapshots {
    margin-top: 0;
}

.timeline-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.timeline-snapshot-card {
    padding: 1.25rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-snapshot-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(124, 92, 252, 0.3);
}

.timeline-snapshot-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(124, 92, 252, 0.15), var(--shadow-md);
    background: rgba(124, 92, 252, 0.05);
}

.snapshot-year {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.snapshot-year.current {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.snapshot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.snapshot-row:last-child {
    border-bottom: none;
}

.snapshot-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.snapshot-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-mono);
}

.snapshot-val.positive {
    color: var(--green);
}

.snapshot-val.negative {
    color: var(--red);
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .timeline-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .timeline-stats-bar .timeline-stat:last-child {
        grid-column: span 2;
    }
    .timeline-stat-value {
        font-size: 1.2rem;
    }
    .timeline-title {
        font-size: 1.5rem;
    }
    .timeline-chart-wrap {
        height: 260px;
    }
    .timeline-player-controls {
        padding: 1rem 1.25rem;
    }
    .timeline-year-display {
        font-size: 2.5rem;
    }
    .play-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    .timeline-snapshot-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .timeline-stats-bar {
        grid-template-columns: 1fr;
    }
    .timeline-stats-bar .timeline-stat:last-child {
        grid-column: span 1;
    }
    .timeline-snapshot-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   COMMAND PALETTE (⌘K)
   ================================================================ */

/* --- Navbar shortcut hint button --- */
.nav-shortcut-hint {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.nav-shortcut-hint:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(124, 92, 252, 0.4);
}
.nav-shortcut-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-dim, rgba(232, 234, 237, 0.6));
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    line-height: 1.3;
}
@media (max-width: 768px) {
    .nav-shortcut-hint { display: none; }
}

/* --- Overlay backdrop --- */
.cmd-palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: min(18vh, 160px);
    background: rgba(4, 5, 8, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.cmd-palette-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- Modal card --- */
.cmd-palette-modal {
    width: 100%;
    max-width: 560px;
    margin: 0 16px;
    background: linear-gradient(
        165deg,
        rgba(12, 13, 18, 0.95) 0%,
        rgba(6, 7, 10, 0.98) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(124, 92, 252, 0.08),
        0 24px 80px rgba(0, 0, 0, 0.55),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transform: scale(0.96) translateY(-8px);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.cmd-palette-overlay.active .cmd-palette-modal {
    transform: scale(1) translateY(0);
}

/* --- Search input area --- */
.cmd-palette-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cmd-palette-search-icon {
    font-size: 1.1rem;
    color: var(--text-dim, rgba(232, 234, 237, 0.6));
    flex-shrink: 0;
}
.cmd-palette-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text, #e8eaed);
    caret-color: var(--primary, #7c5cfc);
}
.cmd-palette-input::placeholder {
    color: var(--text-muted, rgba(232, 234, 237, 0.35));
}
.cmd-palette-esc-hint {
    padding: 3px 7px;
    font-family: inherit;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, rgba(232, 234, 237, 0.35));
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    flex-shrink: 0;
}

/* --- Results area --- */
.cmd-palette-results {
    max-height: 360px;
    overflow-y: auto;
    padding: 6px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.cmd-palette-results::-webkit-scrollbar {
    width: 5px;
}
.cmd-palette-results::-webkit-scrollbar-track {
    background: transparent;
}
.cmd-palette-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

/* --- Category labels --- */
.cmd-palette-category {
    padding: 10px 18px 5px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, rgba(232, 234, 237, 0.35));
}

/* --- Result items --- */
.cmd-palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    margin: 0 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s ease;
}
.cmd-palette-item:hover,
.cmd-palette-item.selected {
    background: rgba(124, 92, 252, 0.1);
}
.cmd-palette-item.selected {
    background: rgba(124, 92, 252, 0.15);
}
.cmd-palette-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    color: var(--primary, #7c5cfc);
    background: rgba(124, 92, 252, 0.08);
    border: 1px solid rgba(124, 92, 252, 0.12);
    border-radius: 8px;
    flex-shrink: 0;
}
.cmd-palette-item.selected .cmd-palette-item-icon {
    background: rgba(124, 92, 252, 0.15);
    border-color: rgba(124, 92, 252, 0.25);
}
.cmd-palette-item-label {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text, #e8eaed);
}
.cmd-palette-shortcut {
    padding: 3px 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted, rgba(232, 234, 237, 0.35));
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 5px;
}

/* --- Empty state --- */
.cmd-palette-empty {
    padding: 32px 18px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-dim, rgba(232, 234, 237, 0.6));
}

/* --- Footer --- */
.cmd-palette-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.6875rem;
    color: var(--text-muted, rgba(232, 234, 237, 0.35));
}
.cmd-palette-footer kbd {
    display: inline-block;
    padding: 2px 5px;
    font-family: inherit;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-dim, rgba(232, 234, 237, 0.6));
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin-right: 3px;
}

/* ================================================================
   3D Network Graph — Palantir-style Intelligence Visualization
   ================================================================ */

.network-3d-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: #06070a;
    border: 1px solid rgba(124, 92, 252, 0.12);
    box-shadow:
        0 0 40px rgba(0, 0, 0, 0.5),
        inset 0 0 60px rgba(6, 7, 10, 0.8),
        0 0 80px rgba(124, 92, 252, 0.05);
    overflow: hidden;
    border-radius: 14px;
}

.network-3d-container #network3dGraph {
    width: 100%;
    height: 100%;
}

.network-3d-container canvas {
    display: block;
    outline: none;
}

/* 3D graph tooltip (rendered by 3d-force-graph as HTML overlay) */
.network-3d-tooltip {
    font-family: var(--font);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text);
    padding: 0.6rem 0.8rem;
    background: rgba(6, 7, 10, 0.95);
    border: 1px solid rgba(124, 92, 252, 0.25);
    border-radius: 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 92, 252, 0.1);
    max-width: 280px;
    pointer-events: none;
}

.network-3d-tooltip strong {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.network-3d-tooltip span {
    color: var(--text-dim);
    font-size: 0.75rem;
}

/* Loading state for 3D container */
.network-3d-container .loading-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(6, 7, 10, 0.9);
    z-index: 10;
}

/* Scan-line decoration edges */
.network-3d-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 92, 252, 0.4), transparent);
    z-index: 2;
    pointer-events: none;
}

.network-3d-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 92, 252, 0.2), transparent);
    z-index: 2;
    pointer-events: none;
}

/* Responsive 3D graph */
@media (max-width: 768px) {
    .network-3d-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .network-3d-container {
        height: 320px;
    }
}

/* ================================================================
   DASHBOARD POLISH — Premium Layout Enhancements
   ================================================================ */

/* --- Hero Gradient Text Enhancement --- */
.hero-stat-gradient {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7c5cfc 0%, #5b8def 40%, #00d4aa 70%, #00d4aa 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroGradientShift 6s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(124, 92, 252, 0.2));
}

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

/* --- Hero Subtitle Enhancement --- */
.hero-subtitle-enhanced {
    font-size: 1rem;
    color: var(--text-dim);
    text-align: center;
    max-width: 560px;
    margin: 0.75rem auto;
    min-height: 1.5em;
    position: relative;
    z-index: 1;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* --- Live Pulse Dot --- */
.pulse-dot-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    position: relative;
    animation: livePulse 2s ease-in-out infinite;
}

.pulse-dot-live::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 212, 170, 0.4);
    animation: livePulseRing 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.85); }
}

@keyframes livePulseRing {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.8); opacity: 0; }
}

.freshness-label {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.freshness-sep {
    opacity: 0.4;
}

/* --- Featured Stat Cards (top 2) --- */
.stats-grid-featured {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.stat-card-featured {
    padding: 1.75rem 2rem;
    position: relative;
    overflow: hidden;
}

.stat-card-featured .stat-card-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-card-featured .stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-card-featured .stat-value {
    font-size: 2.5rem;
}

.stat-icon-wrap-lg {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(var(--card-color), 0.08);
    flex-shrink: 0;
}

.stat-icon-wrap-lg svg {
    width: 28px;
    height: 28px;
}

/* --- Secondary Stat Cards (bottom 4) --- */
.stats-grid-secondary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

/* --- Sparkline Trend Indicators --- */
.sparkline-wrap {
    position: absolute;
    bottom: 12px;
    right: 16px;
    width: 60px;
    height: 24px;
    opacity: 0.6;
    pointer-events: none;
}

.sparkline-wrap-sm {
    bottom: 10px;
    right: 12px;
    width: 50px;
    height: 20px;
}

.sparkline-svg {
    width: 100%;
    height: 100%;
}

/* --- Accent Border Bottom on Stat Cards --- */
.stat-card-accent-border {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 0 0 var(--radius) var(--radius);
    pointer-events: none;
}

/* --- Quick Action Card v2 --- */
.quick-action-card-v2 {
    position: relative;
    overflow: hidden;
}

.qa-icon-wrap-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.1), rgba(124, 92, 252, 0.08));
    color: var(--primary);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-card-v2:hover .qa-icon-wrap-v2 {
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.2), rgba(124, 92, 252, 0.15));
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(124, 92, 252, 0.2);
}

.quick-action-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(124, 92, 252, 0.12);
}

/* --- Charts Section Header --- */
.charts-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 0 0.25rem;
}

.section-header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-header-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* --- Charts Extra Padding --- */
.chart-container-padded {
    padding: 2rem;
}

.charts-row-padded {
    gap: 1.25rem;
}

/* Table v2 classes — now mapped to unified premium table styles */
.table-row-v2 {
    position: relative;
    transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.table-row-even {
    background: rgba(255, 255, 255, 0.015);
}

.table-row-odd {
    background: rgba(255, 255, 255, 0.03);
}

.table-row-v2:hover {
    background: rgba(124, 92, 252, 0.06);
}

/* --- Dashboard Footer Stats --- */
.dashboard-footer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    background: rgba(12, 13, 18, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.footer-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(124, 92, 252, 0.08);
    color: var(--primary);
}

.footer-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

.footer-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* --- Dashboard Polish Responsive --- */
@media (max-width: 1024px) {
    .stats-grid-secondary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid-featured {
        grid-template-columns: 1fr;
    }
    .stats-grid-secondary {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-stat-gradient {
        font-size: 2.5rem;
    }
    .stat-card-featured .stat-value {
        font-size: 2rem;
    }
    .dashboard-footer-stats {
        grid-template-columns: 1fr;
    }
    .charts-section-header {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid-secondary {
        grid-template-columns: 1fr;
    }
    .stat-card-featured .stat-card-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ================================================================
   POLISH — Mesh Gradient, Milestones, Network Enhancements
   ================================================================ */

/* --- Animated Mesh Gradient Background for Page Headers --- */
.page-mesh-bg {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.page-mesh-bg::before,
.page-mesh-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
    animation: meshFloat 8s ease-in-out infinite alternate;
}

.page-mesh-bg::before {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.4), transparent 70%);
    top: -80px;
    left: -60px;
    animation-duration: 8s;
}

.page-mesh-bg::after {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.35), transparent 70%);
    bottom: -60px;
    right: -40px;
    animation-duration: 10s;
    animation-delay: -3s;
}

@keyframes meshFloat {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(20px, -15px) scale(1.08); }
    100% { transform: translate(-10px, 10px) scale(0.95); }
}

/* --- Skeleton Pulse Animation --- */
@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.8; }
}

/* --- Timeline Stat Icons --- */
.timeline-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.35rem;
    opacity: 0.7;
    transition: opacity 0.25s ease,
                transform 0.25s ease;
}

.timeline-stat:hover .timeline-stat-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* --- Timeline Milestones Row --- */
.timeline-milestones {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.timeline-milestones-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.timeline-milestones-badges {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.milestone-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
}

.milestone-badge:hover {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.45);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.15);
}

.milestone-badge-year {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.85rem;
}

.milestone-badge-rate {
    color: var(--green);
    font-weight: 600;
    font-size: 0.78rem;
}

/* --- Snapshot Mini Bar --- */
.snapshot-mini-bar-wrap {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin: 0.5rem 0 0.6rem;
    overflow: hidden;
}

.snapshot-mini-bar {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--purple));
    transition: width 0.4s ease;
    min-width: 4%;
}

.timeline-snapshot-card.active .snapshot-mini-bar {
    background: linear-gradient(90deg, var(--accent), #f97316);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

/* --- Network Hero Section --- */
.network-hero {
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
}

/* --- Network Search Results Grid --- */
.network-search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.network-search-card {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(124, 92, 252, 0.1);
    position: relative;
    overflow: hidden;
}

.network-search-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.04), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.network-search-card:hover {
    border-color: rgba(124, 92, 252, 0.4);
    box-shadow: 0 0 20px rgba(124, 92, 252, 0.15);
    transform: translateY(-2px);
}

.network-search-card:hover::before {
    opacity: 1;
}

.network-search-card-name {
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.network-search-card-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    align-items: center;
    position: relative;
    z-index: 1;
}

.network-search-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: rgba(124, 92, 252, 0.12);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 600;
}

/* --- Network Legend Bar --- */
.network-legend-bar {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
}

.network-legend-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
}

.network-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.network-legend-text {
    color: var(--text-dim);
}

.network-legend-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 0.35rem;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
}

.network-legend-showing {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: auto;
}

/* --- Network Subsidiary Filter Input --- */
.network-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.network-filter-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text);
    outline: none;
    width: 180px;
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font);
}

.network-filter-input::placeholder {
    color: var(--text-muted);
}

.network-filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.1);
}

/* --- Network Cross-Company Finder Polish --- */
.network-cross-finder-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.network-cross-finder-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 212, 170, 0.12);
    color: var(--purple);
    flex-shrink: 0;
}

/* --- Responsive for Polish --- */
@media (max-width: 768px) {
    .network-hero {
        padding: 1.25rem 1rem 1rem;
    }
    .network-list-header {
        flex-direction: column;
        align-items: stretch;
    }
    .network-filter-input {
        width: 100%;
    }
    .timeline-milestones {
        flex-direction: column;
        align-items: flex-start;
    }
    .network-search-results-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   PERFORMANCE — Containment for heavy sections
   ================================================================ */

.charts-row, .dashboard-table-section, .network-3d-container {
    contain: layout style;
}

/* ================================================================
   GPU-ACCELERATED PAGE TRANSITIONS
   ================================================================ */

#app {
    will-change: auto;
}

#app.page-exit {
    opacity: 0;
    transform: translateY(-8px) scale(0.995);
    transition: opacity 120ms ease-out, transform 120ms ease-out;
    pointer-events: none;
}

#app.page-enter {
    animation: pageEnter 250ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ================================================================
   STAGGER-IN / FLOAT-IN — Lightweight (GSAP-compatible)
   ================================================================ */

.stagger-in > .float-in {
    animation: floatIn 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
