/*
 * ================================================================
 * BLUEPRINT SITE CONTROL — SOVEREIGN ENTERPRISE DESIGN SYSTEM
 * Version: 8.0.0-Sovereign
 * Protocol: The API of Trust — Institutional Infrastructure Layer
 * © 2024-2026 Clinton Knight. All Rights Reserved.
 * ================================================================
 *
 * This is the SINGLE SOURCE OF TRUTH for all BPS core pages.
 * No page should define its own tokens. All extend from here.
 * ================================================================
 */

/* ================================================================
   1. DESIGN TOKENS — INSTITUTIONAL PALETTE
   ================================================================ */
:root {
    /* === CORE SURFACES === */
    --sov-bg-void:       #020409;
    --sov-bg-deep:       #060a14;
    --sov-bg-surface:    #0c1122;
    --sov-bg-card:       #111827;
    --sov-bg-elevated:   #192033;
    --sov-bg-hover:      #1e293b;

    /* === ACCENT PALETTE (Institutional) === */
    --sov-cyan:          #06b6d4;
    --sov-cyan-dim:      rgba(6, 182, 212, 0.15);
    --sov-cyan-glow:     rgba(6, 182, 212, 0.25);
    --sov-blue:          #3b82f6;
    --sov-blue-dim:      rgba(59, 130, 246, 0.12);
    --sov-green:         #10b981;
    --sov-green-dim:     rgba(16, 185, 129, 0.12);
    --sov-amber:         #f59e0b;
    --sov-amber-dim:     rgba(245, 158, 11, 0.12);
    --sov-red:           #ef4444;
    --sov-red-dim:       rgba(239, 68, 68, 0.12);
    --sov-purple:        #8b5cf6;
    --sov-purple-dim:    rgba(139, 92, 246, 0.12);
    --sov-gold:          #fbbf24;

    /* === TYPOGRAPHY === */
    --sov-text-primary:  #f1f5f9;
    --sov-text-secondary:#94a3b8;
    --sov-text-tertiary: #64748b;
    --sov-text-disabled: #475569;

    /* === BORDERS & GLASS === */
    --sov-border:        rgba(255, 255, 255, 0.06);
    --sov-border-active: rgba(6, 182, 212, 0.3);
    --sov-glass:         rgba(12, 17, 34, 0.75);
    --sov-glass-heavy:   rgba(6, 10, 20, 0.92);

    /* === TYPOGRAPHY FAMILIES === */
    --sov-font-display:  'Outfit', 'Inter', -apple-system, sans-serif;
    --sov-font-body:     'Inter', -apple-system, system-ui, sans-serif;
    --sov-font-mono:     'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* === SPACING SCALE (4px base) === */
    --sov-space-1:  4px;   --sov-space-2:  8px;
    --sov-space-3: 12px;   --sov-space-4: 16px;
    --sov-space-5: 20px;   --sov-space-6: 24px;
    --sov-space-8: 32px;   --sov-space-10: 40px;
    --sov-space-12: 48px;  --sov-space-16: 64px;

    /* === RADII === */
    --sov-radius-sm:  6px;
    --sov-radius-md: 10px;
    --sov-radius-lg: 14px;
    --sov-radius-xl: 20px;

    /* === LAYOUT === */
    --sov-header-h:    56px;
    --sov-nav-h:       64px;
    --sov-sidebar-w:  260px;
    --sov-max-width: 1440px;
    --sov-safe-bottom: env(safe-area-inset-bottom, 0px);

    /* === MOTION === */
    --sov-ease:       cubic-bezier(0.16, 1, 0.3, 1);
    --sov-ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
    --sov-duration:   0.25s;

    /* === SHADOWS === */
    --sov-shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
    --sov-shadow-md:  0 4px 12px rgba(0,0,0,0.4);
    --sov-shadow-lg:  0 8px 30px rgba(0,0,0,0.5);
    --sov-shadow-xl:  0 16px 50px rgba(0,0,0,0.6);

    /* === LEGACY ALIASES (backwards compatibility) === */
    --bg-primary:     var(--sov-bg-deep);
    --bg-secondary:   var(--sov-bg-surface);
    --accent-cyan:    var(--sov-cyan);
    --accent-green:   var(--sov-green);
    --accent-red:     var(--sov-red);
    --accent-gold:    var(--sov-amber);
    --accent-amber:   var(--sov-amber);
    --accent-purple:  var(--sov-purple);
    --accent-primary: var(--sov-cyan);
    --text-primary:   var(--sov-text-primary);
    --text-secondary: var(--sov-text-secondary);
    --text-muted:     var(--sov-text-secondary);
    --text-main:      var(--sov-text-primary);
    --glass-border:   var(--sov-border);
    --card-bg:        var(--sov-bg-card);
    --bg-deep:        var(--sov-bg-deep);
    --font-display:   var(--sov-font-display);
    --font-sans:      var(--sov-font-body);
    --font-mono:      var(--sov-font-mono);
    --vanguard-primary: var(--sov-cyan);
}


/* ================================================================
   2. RESET & BASE
   ================================================================ */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--sov-font-body);
    background: var(--sov-bg-void);
    color: var(--sov-text-primary);
    line-height: 1.55;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle noise texture overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
    opacity: 0.5;
}

a { color: var(--sov-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

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

::selection {
    background: var(--sov-cyan);
    color: var(--sov-bg-void);
}


/* ================================================================
   3. SOVEREIGN HEADER
   ================================================================ */
.sov-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--sov-header-h);
    background: var(--sov-glass-heavy);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid var(--sov-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sov-space-6);
    z-index: 900;
}

.sov-header__brand {
    display: flex;
    align-items: center;
    gap: var(--sov-space-3);
}

.sov-header__logo {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--sov-cyan), var(--sov-blue));
    border-radius: var(--sov-radius-sm);
    display: grid;
    place-items: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 900;
    box-shadow: 0 0 12px var(--sov-cyan-glow);
}

.sov-header__title {
    font-family: var(--sov-font-display);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    color: var(--sov-text-primary);
}

.sov-header__sub {
    font-family: var(--sov-font-mono);
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--sov-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sov-header__actions {
    display: flex;
    align-items: center;
    gap: var(--sov-space-2);
}

.sov-header__btn {
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-md);
    color: var(--sov-text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--sov-duration) var(--sov-ease);
    position: relative;
}

.sov-header__btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--sov-text-primary);
    border-color: var(--sov-border-active);
}

.sov-header__badge {
    position: absolute;
    top: -3px; right: -3px;
    min-width: 16px; height: 16px;
    background: var(--sov-red);
    color: white;
    font-size: 0.55rem;
    font-weight: 800;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--sov-bg-void);
}

/* System status indicator */
.sov-header__status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: var(--sov-green-dim);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 100px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--sov-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sov-header__status-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
    animation: sov-pulse 2.5s infinite;
}

@keyframes sov-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}


/* ================================================================
   4. SOVEREIGN BOTTOM NAVIGATION
   ================================================================ */
.sov-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--sov-nav-h);
    background: var(--sov-glass-heavy);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-top: 1px solid var(--sov-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: var(--sov-safe-bottom);
    z-index: 950;
}

.sov-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 56px;
    min-height: 48px;
    padding: 4px 8px;
    background: none;
    border: none;
    color: var(--sov-text-disabled);
    font-family: var(--sov-font-body);
    font-size: 0.55rem;
    font-weight: 700;
    cursor: pointer;
    transition: color var(--sov-duration) var(--sov-ease);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    border-radius: var(--sov-radius-sm);
}

.sov-nav__item i {
    font-size: 1.15rem;
    margin-bottom: 1px;
    transition: transform var(--sov-duration) var(--sov-ease);
}

.sov-nav__item:hover,
.sov-nav__item:focus-visible {
    color: var(--sov-text-secondary);
}

.sov-nav__item.active {
    color: var(--sov-cyan);
}

.sov-nav__item.active i {
    filter: drop-shadow(0 0 6px var(--sov-cyan-glow));
    transform: translateY(-1px);
}

@media (min-width: 1024px) {
    .sov-nav { display: none; }
}


/* ================================================================
   5. MAIN CONTENT WRAPPER
   ================================================================ */
.sov-main {
    padding: calc(var(--sov-header-h) + var(--sov-space-6)) var(--sov-space-4) calc(var(--sov-nav-h) + var(--sov-space-6));
    max-width: var(--sov-max-width);
    margin: 0 auto;
    min-height: 100dvh;
}

@media (min-width: 768px) {
    .sov-main {
        padding: calc(var(--sov-header-h) + var(--sov-space-8)) var(--sov-space-8) var(--sov-space-8);
    }
}

@media (min-width: 1280px) {
    .sov-main {
        padding: calc(var(--sov-header-h) + var(--sov-space-10)) var(--sov-space-10) var(--sov-space-10);
    }
}


/* ================================================================
   6. CARD SYSTEM — INSTITUTIONAL GRADE
   ================================================================ */
.sov-card {
    background: var(--sov-bg-card);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-lg);
    padding: var(--sov-space-5);
    margin-bottom: var(--sov-space-4);
    transition: border-color var(--sov-duration) var(--sov-ease),
                box-shadow var(--sov-duration) var(--sov-ease);
    position: relative;
}

.sov-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.sov-card--glass {
    background: var(--sov-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sov-card--interactive {
    cursor: pointer;
}

.sov-card--interactive:hover {
    border-color: var(--sov-border-active);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.06);
    transform: translateY(-1px);
}

.sov-card--interactive:active {
    transform: scale(0.995);
}

/* Card accent borders */
.sov-card--cyan    { border-left: 3px solid var(--sov-cyan); }
.sov-card--blue    { border-left: 3px solid var(--sov-blue); }
.sov-card--green   { border-left: 3px solid var(--sov-green); }
.sov-card--amber   { border-left: 3px solid var(--sov-amber); }
.sov-card--red     { border-left: 3px solid var(--sov-red); }
.sov-card--purple  { border-left: 3px solid var(--sov-purple); }

/* Card header */
.sov-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sov-space-4);
}

.sov-card__label {
    font-family: var(--sov-font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sov-text-tertiary);
}

.sov-card__title {
    font-family: var(--sov-font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--sov-text-primary);
    letter-spacing: -0.02em;
}


/* ================================================================
   7. GRID SYSTEM
   ================================================================ */
.sov-grid {
    display: grid;
    gap: var(--sov-space-4);
}

.sov-grid--2 { grid-template-columns: repeat(2, 1fr); }
.sov-grid--3 { grid-template-columns: repeat(3, 1fr); }
.sov-grid--4 { grid-template-columns: repeat(4, 1fr); }

.sov-grid--auto {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 767px) {
    .sov-grid--2, .sov-grid--3, .sov-grid--4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .sov-grid--3, .sov-grid--4 {
        grid-template-columns: 1fr;
    }
}


/* ================================================================
   8. KPI METRICS
   ================================================================ */
.sov-kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--sov-space-4);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-md);
}

.sov-kpi__label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sov-text-tertiary);
}

.sov-kpi__value {
    font-family: var(--sov-font-display);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--sov-text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.sov-kpi__delta {
    font-family: var(--sov-font-mono);
    font-size: 0.65rem;
    font-weight: 700;
}

.sov-kpi__delta--up   { color: var(--sov-green); }
.sov-kpi__delta--down { color: var(--sov-red); }
.sov-kpi__delta--flat { color: var(--sov-text-tertiary); }


/* ================================================================
   9. STATUS INDICATORS & BADGES
   ================================================================ */
.sov-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.sov-badge--cyan   { background: var(--sov-cyan-dim);   color: var(--sov-cyan);   border: 1px solid rgba(6,182,212,0.2); }
.sov-badge--green  { background: var(--sov-green-dim);  color: var(--sov-green);  border: 1px solid rgba(16,185,129,0.2); }
.sov-badge--amber  { background: var(--sov-amber-dim);  color: var(--sov-amber);  border: 1px solid rgba(245,158,11,0.2); }
.sov-badge--red    { background: var(--sov-red-dim);    color: var(--sov-red);    border: 1px solid rgba(239,68,68,0.2); }
.sov-badge--purple { background: var(--sov-purple-dim); color: var(--sov-purple); border: 1px solid rgba(139,92,246,0.2); }
.sov-badge--blue   { background: var(--sov-blue-dim);   color: var(--sov-blue);   border: 1px solid rgba(59,130,246,0.2); }

/* Pulse dot */
.sov-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.sov-dot--live {
    background: var(--sov-green);
    box-shadow: 0 0 8px var(--sov-green);
    animation: sov-pulse 2s infinite;
}

.sov-dot--warn {
    background: var(--sov-amber);
    box-shadow: 0 0 8px var(--sov-amber);
    animation: sov-pulse 1.5s infinite;
}

.sov-dot--error {
    background: var(--sov-red);
    box-shadow: 0 0 8px var(--sov-red);
}


/* ================================================================
   10. BUTTONS
   ================================================================ */
.sov-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: var(--sov-radius-md);
    border: 1px solid var(--sov-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--sov-text-secondary);
    font-family: var(--sov-font-body);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--sov-duration) var(--sov-ease);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sov-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--sov-text-primary);
    border-color: rgba(255, 255, 255, 0.12);
}

.sov-btn:active {
    transform: scale(0.97);
}

.sov-btn--primary {
    background: var(--sov-cyan-dim);
    color: var(--sov-cyan);
    border-color: rgba(6, 182, 212, 0.25);
}

.sov-btn--primary:hover {
    background: rgba(6, 182, 212, 0.2);
    box-shadow: 0 0 16px var(--sov-cyan-glow);
}

.sov-btn--danger {
    background: var(--sov-red-dim);
    color: var(--sov-red);
    border-color: rgba(239, 68, 68, 0.25);
}

.sov-btn--success {
    background: var(--sov-green-dim);
    color: var(--sov-green);
    border-color: rgba(16, 185, 129, 0.25);
}

.sov-btn--sm {
    min-height: 32px;
    padding: 4px 12px;
    font-size: 0.7rem;
}

.sov-btn--full { width: 100%; }


/* ================================================================
   11. PROGRESS BARS
   ================================================================ */
.sov-progress {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.sov-progress__bar {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--sov-cyan), var(--sov-blue));
    transition: width 0.8s var(--sov-ease-out);
}

.sov-progress__bar--green  { background: var(--sov-green); }
.sov-progress__bar--amber  { background: var(--sov-amber); }
.sov-progress__bar--red    { background: var(--sov-red); }


/* ================================================================
   12. SECTION TITLES
   ================================================================ */
.sov-section {
    margin-bottom: var(--sov-space-8);
}

.sov-section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--sov-space-4);
    padding-bottom: var(--sov-space-3);
    border-bottom: 1px solid var(--sov-border);
}

.sov-section__eyebrow {
    font-family: var(--sov-font-mono);
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--sov-cyan);
    margin-bottom: 2px;
}

.sov-section__title {
    font-family: var(--sov-font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--sov-text-primary);
    letter-spacing: -0.02em;
}


/* ================================================================
   13. PIPELINE STEPS
   ================================================================ */
.sov-pipeline {
    display: grid;
    gap: var(--sov-space-3);
}

.sov-step {
    background: var(--sov-bg-card);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-lg);
    padding: var(--sov-space-4) var(--sov-space-5);
    display: flex;
    align-items: center;
    gap: var(--sov-space-4);
    cursor: pointer;
    transition: all var(--sov-duration) var(--sov-ease);
    position: relative;
    overflow: hidden;
}

.sov-step::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--step-color, var(--sov-cyan));
    border-radius: 0 3px 3px 0;
}

.sov-step:hover {
    background: var(--sov-bg-elevated);
    border-color: rgba(255, 255, 255, 0.1);
}

.sov-step:active {
    transform: scale(0.99);
}

.sov-step__num {
    width: 36px; height: 36px;
    border-radius: var(--sov-radius-sm);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--sov-border);
    display: grid;
    place-items: center;
    font-family: var(--sov-font-mono);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--step-color, var(--sov-cyan));
    flex-shrink: 0;
}

.sov-step__info {
    flex: 1;
    min-width: 0;
}

.sov-step__title {
    font-family: var(--sov-font-display);
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--sov-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sov-step__meta {
    font-size: 0.7rem;
    color: var(--sov-text-tertiary);
}

.sov-step__count {
    font-family: var(--sov-font-mono);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--sov-text-primary);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--sov-border);
    padding: 4px 12px;
    border-radius: var(--sov-radius-sm);
    flex-shrink: 0;
}

.sov-step__actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--sov-space-2);
    margin-top: var(--sov-space-3);
    padding-top: var(--sov-space-3);
    border-top: 1px solid var(--sov-border);
}

.sov-step__action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-sm);
    color: var(--sov-text-secondary);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all var(--sov-duration) var(--sov-ease);
}

.sov-step__action:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--sov-text-primary);
    border-color: var(--sov-border-active);
}

.sov-step__action:active {
    transform: scale(0.96);
}


/* ================================================================
   14. DATA TABLE (Institutional)
   ================================================================ */
.sov-table {
    width: 100%;
    border-collapse: collapse;
}

.sov-table th {
    text-align: left;
    font-family: var(--sov-font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sov-text-tertiary);
    padding: var(--sov-space-3) var(--sov-space-4);
    border-bottom: 1px solid var(--sov-border);
}

.sov-table td {
    padding: var(--sov-space-3) var(--sov-space-4);
    border-bottom: 1px solid var(--sov-border);
    font-size: 0.82rem;
    color: var(--sov-text-secondary);
}

.sov-table tr:hover td {
    background: rgba(255,255,255,0.02);
    color: var(--sov-text-primary);
}


/* ================================================================
   15. SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.15);
}


/* ================================================================
   16. FORM ELEMENTS
   ================================================================ */
.sov-input,
.sov-select {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-md);
    color: var(--sov-text-primary);
    font-family: var(--sov-font-body);
    font-size: 0.88rem;
    transition: border-color var(--sov-duration) var(--sov-ease),
                box-shadow var(--sov-duration) var(--sov-ease);
}

.sov-input:focus,
.sov-select:focus {
    outline: none;
    border-color: var(--sov-cyan);
    box-shadow: 0 0 0 3px var(--sov-cyan-dim);
}


/* ================================================================
   17. UTILITY CLASSES
   ================================================================ */
.sov-text-mono      { font-family: var(--sov-font-mono); }
.sov-text-display   { font-family: var(--sov-font-display); }
.sov-text-sm        { font-size: 0.78rem; }
.sov-text-xs        { font-size: 0.65rem; }
.sov-text-primary   { color: var(--sov-text-primary); }
.sov-text-secondary { color: var(--sov-text-secondary); }
.sov-text-tertiary  { color: var(--sov-text-tertiary); }
.sov-text-cyan      { color: var(--sov-cyan); }
.sov-text-green     { color: var(--sov-green); }
.sov-text-amber     { color: var(--sov-amber); }
.sov-text-red       { color: var(--sov-red); }

.sov-flex       { display: flex; }
.sov-flex-col   { display: flex; flex-direction: column; }
.sov-flex-center { display: flex; align-items: center; justify-content: center; }
.sov-flex-between { display: flex; align-items: center; justify-content: space-between; }
.sov-gap-1 { gap: var(--sov-space-1); }
.sov-gap-2 { gap: var(--sov-space-2); }
.sov-gap-3 { gap: var(--sov-space-3); }
.sov-gap-4 { gap: var(--sov-space-4); }

.sov-mt-2 { margin-top: var(--sov-space-2); }
.sov-mt-4 { margin-top: var(--sov-space-4); }
.sov-mt-6 { margin-top: var(--sov-space-6); }
.sov-mb-2 { margin-bottom: var(--sov-space-2); }
.sov-mb-4 { margin-bottom: var(--sov-space-4); }
.sov-mb-6 { margin-bottom: var(--sov-space-6); }

.sov-hidden { display: none !important; }

/* Staggered fade-in animation */
.sov-animate-in {
    animation: sov-fadeUp 0.4s var(--sov-ease-out) both;
}

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

.sov-animate-in:nth-child(1) { animation-delay: 0.05s; }
.sov-animate-in:nth-child(2) { animation-delay: 0.1s; }
.sov-animate-in:nth-child(3) { animation-delay: 0.15s; }
.sov-animate-in:nth-child(4) { animation-delay: 0.2s; }
.sov-animate-in:nth-child(5) { animation-delay: 0.25s; }
.sov-animate-in:nth-child(6) { animation-delay: 0.3s; }
.sov-animate-in:nth-child(7) { animation-delay: 0.35s; }
.sov-animate-in:nth-child(8) { animation-delay: 0.4s; }


/* ================================================================
   18. MODAL SYSTEM
   ================================================================ */
.sov-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 9, 0.88);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--sov-space-4);
}

.sov-modal-overlay.active { display: flex; }

.sov-modal {
    background: var(--sov-bg-surface);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-xl);
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--sov-space-8);
    box-shadow: var(--sov-shadow-xl);
    animation: sov-modalIn 0.3s var(--sov-ease-out);
}

@keyframes sov-modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ================================================================
   19. HERO METRICS BAR (Dashboard / CEO)
   ================================================================ */
.sov-hero-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--sov-space-3);
    margin-bottom: var(--sov-space-6);
}

.sov-hero-metric {
    background: var(--sov-bg-card);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-lg);
    padding: var(--sov-space-4) var(--sov-space-5);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.sov-hero-metric::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--metric-color, var(--sov-cyan));
    opacity: 0.6;
}

.sov-hero-metric__icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.sov-hero-metric__value {
    font-family: var(--sov-font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--sov-text-primary);
    letter-spacing: -0.03em;
    line-height: 1;
}

.sov-hero-metric__label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sov-text-tertiary);
}


/* ================================================================
   20. SIDEBAR LAYOUT (Desktop Hybrid)
   ================================================================ */
.sov-layout {
    display: flex;
    min-height: 100dvh;
}

.sov-sidebar {
    width: var(--sov-sidebar-w);
    background: var(--sov-bg-surface);
    border-right: 1px solid var(--sov-border);
    padding: var(--sov-space-6) 0;
    overflow-y: auto;
    position: sticky;
    top: var(--sov-header-h);
    height: calc(100dvh - var(--sov-header-h));
    flex-shrink: 0;
    display: none;
}

@media (min-width: 1024px) {
    .sov-sidebar { display: block; }
}

.sov-sidebar__group {
    font-family: var(--sov-font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sov-text-tertiary);
    padding: var(--sov-space-4) var(--sov-space-6) var(--sov-space-2);
}

.sov-sidebar__item {
    display: flex;
    align-items: center;
    gap: var(--sov-space-3);
    padding: 9px var(--sov-space-6);
    color: var(--sov-text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--sov-duration) var(--sov-ease);
    border-left: 3px solid transparent;
}

.sov-sidebar__item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--sov-text-primary);
}

.sov-sidebar__item.active {
    color: var(--sov-cyan);
    border-left-color: var(--sov-cyan);
    background: rgba(6, 182, 212, 0.06);
}

.sov-sidebar__item i { width: 20px; text-align: center; }


/* ================================================================
   21. KANBAN PIPELINE (Horizontal Scrolling Columns)
   ================================================================ */
.sov-kanban {
    flex: 1;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--sov-space-6);
    gap: var(--sov-space-5);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.sov-kanban::-webkit-scrollbar { height: 5px; }
.sov-kanban::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }

.sov-kanban__col {
    min-width: 320px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: var(--sov-space-3);
    height: 100%;
    flex-shrink: 0;
}

.sov-kanban__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sov-space-3) var(--sov-space-4);
    background: var(--sov-bg-surface);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-md);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sov-kanban__title {
    font-family: var(--sov-font-mono);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sov-text-secondary);
}

.sov-kanban__count {
    background: var(--sov-bg-elevated);
    color: var(--sov-cyan);
    font-family: var(--sov-font-mono);
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: var(--sov-radius-sm);
}

.sov-kanban__list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--sov-space-3);
    padding-bottom: 100px;
    scrollbar-width: none;
}

.sov-kanban__list::-webkit-scrollbar { width: 0; }

.sov-kanban__card {
    background: var(--sov-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-lg);
    padding: var(--sov-space-4);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s var(--sov-ease);
}

.sov-kanban__card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 3px; height: 100%;
    background: var(--card-accent, var(--sov-cyan));
    border-radius: 0 3px 3px 0;
}

.sov-kanban__card:hover {
    transform: translateY(-3px);
    border-color: var(--sov-border-active);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.sov-kanban__card:active {
    transform: scale(0.985);
}

.sov-kanban__card-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--sov-text-primary);
    margin-bottom: var(--sov-space-2);
}

.sov-kanban__card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sov-space-2);
    font-size: 0.72rem;
    color: var(--sov-text-tertiary);
}

.sov-kanban__card-foot {
    margin-top: var(--sov-space-3);
    padding-top: var(--sov-space-3);
    border-top: 1px solid var(--sov-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sov-kanban__card-status {
    font-family: var(--sov-font-mono);
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--sov-cyan);
}

.sov-kanban__card-value {
    font-weight: 900;
    font-size: 0.85rem;
    color: var(--sov-text-primary);
}


/* ================================================================
   22. INTEL TICKER BAR (Market Intelligence)
   ================================================================ */
.sov-intel-bar {
    height: 44px;
    background: rgba(12, 17, 34, 0.5);
    border-bottom: 1px solid var(--sov-border);
    display: flex;
    align-items: center;
    gap: var(--sov-space-6);
    padding: 0 var(--sov-space-6);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.sov-intel-bar::-webkit-scrollbar { display: none; }

.sov-intel-bar__item {
    display: flex;
    align-items: center;
    gap: var(--sov-space-2);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--sov-text-tertiary);
}

.sov-intel-bar__val {
    color: var(--sov-text-primary);
    font-weight: 900;
}

.sov-intel-bar__pulse {
    width: 6px; height: 6px;
    background: var(--sov-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--sov-green);
    animation: sov-pulse 2s infinite;
}


/* ================================================================
   23. PROGRESS RING (Compliance / CEo)
   ================================================================ */
.sov-ring-container {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.sov-ring-svg {
    width: 140px;
    height: 140px;
    transform: rotate(-90deg);
}

.sov-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 8;
}

.sov-ring-fill {
    fill: none;
    stroke: var(--sov-cyan);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 408.4;
    stroke-dashoffset: 408.4;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 8px currentColor);
}

.sov-ring-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.sov-ring-value {
    font-family: var(--sov-font-mono);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--sov-text-primary);
    display: block;
    line-height: 1;
}

.sov-ring-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sov-text-tertiary);
}


/* ================================================================
   24. COMMAND MODAL (Full-height slide-over)
   ================================================================ */
.sov-slideout-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 9, 0.85);
    backdrop-filter: blur(20px);
    z-index: 5000;
    animation: sov-fadeIn 0.25s ease;
}

.sov-slideout-overlay.active { display: block; }

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

.sov-slideout {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 100%; max-width: 520px;
    background: var(--sov-bg-deep);
    border-left: 1px solid var(--sov-border-active);
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    animation: sov-slideIn 0.35s var(--sov-ease);
}

@keyframes sov-slideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.sov-slideout__head {
    padding: var(--sov-space-6);
    border-bottom: 1px solid var(--sov-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sov-slideout__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--sov-space-6);
}

.sov-slideout__section {
    background: var(--sov-bg-surface);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-lg);
    padding: var(--sov-space-5);
    margin-bottom: var(--sov-space-4);
}

.sov-slideout__label {
    font-family: var(--sov-font-mono);
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sov-text-tertiary);
    margin-bottom: var(--sov-space-3);
    display: block;
}

/* Step progress nodes */
.sov-step-nav {
    display: flex;
    gap: 4px;
    margin-bottom: var(--sov-space-6);
    overflow-x: auto;
    padding-bottom: var(--sov-space-2);
}

.sov-step-node {
    flex: 1;
    height: 40px;
    min-width: 40px;
    border-radius: var(--sov-radius-sm);
    background: var(--sov-bg-surface);
    border: 1px solid var(--sov-border);
    display: grid;
    place-items: center;
    font-family: var(--sov-font-mono);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s var(--sov-ease);
    color: var(--sov-text-tertiary);
}

.sov-step-node:hover {
    background: var(--sov-bg-elevated);
    color: var(--sov-text-primary);
}

.sov-step-node.active {
    background: var(--sov-cyan);
    color: var(--sov-bg-void);
    border-color: var(--sov-cyan);
    box-shadow: 0 0 12px var(--sov-cyan-glow);
}

.sov-step-node.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--sov-cyan);
}


/* ================================================================
   25. COMPLIANCE MODULE TILES
   ================================================================ */
.sov-module-tile {
    background: var(--sov-bg-card);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-lg);
    padding: var(--sov-space-6);
    cursor: pointer;
    transition: all 0.3s var(--sov-ease);
    position: relative;
    overflow: hidden;
}

.sov-module-tile:hover {
    transform: translateY(-4px);
    border-color: var(--sov-border-active);
    background: var(--sov-bg-elevated);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.sov-module-tile__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sov-space-4);
}

.sov-module-tile__icon {
    font-size: 1.8rem;
}

.sov-module-tile__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sov-text-disabled);
}

.sov-module-tile__dot--pass {
    background: var(--sov-green);
    box-shadow: 0 0 8px var(--sov-green);
}

.sov-module-tile__dot--warn {
    background: var(--sov-amber);
    box-shadow: 0 0 8px var(--sov-amber);
}

.sov-module-tile__title {
    font-family: var(--sov-font-display);
    font-size: 1rem;
    font-weight: 800;
    color: var(--sov-text-primary);
    margin-bottom: var(--sov-space-2);
}

.sov-module-tile__desc {
    font-size: 0.75rem;
    color: var(--sov-text-tertiary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sov-module-tile__footer {
    margin-top: var(--sov-space-5);
}

.sov-module-tile__tier {
    font-family: var(--sov-font-mono);
    font-size: 0.55rem;
    text-transform: uppercase;
    color: var(--sov-text-disabled);
    margin-bottom: var(--sov-space-2);
}


/* ================================================================
   26. AUDIT LEDGER
   ================================================================ */
.sov-audit-entry {
    display: flex;
    gap: var(--sov-space-4);
    padding: var(--sov-space-4);
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: var(--sov-radius-md);
    align-items: center;
}

.sov-audit-entry__icon {
    width: 40px; height: 40px;
    border-radius: var(--sov-radius-sm);
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sov-audit-entry__time {
    font-family: var(--sov-font-mono);
    font-size: 0.58rem;
    color: var(--sov-text-disabled);
}

.sov-audit-entry__action {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--sov-text-primary);
}

.sov-audit-entry__detail {
    font-size: 0.72rem;
    color: var(--sov-text-tertiary);
}


/* ================================================================
   27. FULL-HEIGHT APP LAYOUT (Settings / CEO)
   ================================================================ */
.sov-app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
}

/* Fix for fixed header overlapping content in flex-app context */
.sov-app .sov-header {
    position: relative;
    z-index: 1000;
}

.sov-app__body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.sov-app__sidebar {
    width: var(--sov-sidebar-w);
    background: rgba(12, 17, 34, 0.5);
    border-right: 1px solid var(--sov-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--sov-space-5) 0;
    gap: 2px;
    flex-shrink: 0;
}

.sov-app__viewport {
    flex: 1;
    overflow-y: auto;
    padding: var(--sov-space-5);
    scroll-behavior: smooth;
}

.sov-app__viewport-inner {
    max-width: 920px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .sov-app__sidebar {
        position: fixed;
        left: 0;
        top: var(--sov-header-h);
        bottom: 0;
        z-index: 900;
        transform: translateX(-100%);
        transition: transform 0.3s var(--sov-ease);
        background: var(--sov-bg-deep);
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
        width: 300px;
    }

    .sov-app__sidebar.open {
        transform: translateX(0);
    }

    .sov-app__viewport {
        padding: var(--sov-space-3);
    }
}

/* ================================================================
   9. CEO COMMAND CENTRE — INSTITUTIONAL COCKPIT
   ================================================================ */

/* --- PAGE LOADER --- */
.sov-loader {
    position: fixed; inset: 0;
    background: var(--sov-bg-void);
    z-index: 9999; pointer-events: none;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.6s var(--sov-ease-out);
}
.sov-loader.fade-out { opacity: 0; }
.sov-loader__icon {
    width: 56px; height: 56px;
    background: var(--sov-amber);
    border-radius: var(--sov-radius-md);
    display: grid; place-items: center;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
    animation: sovPulseGlow 2s infinite;
}
@keyframes sovPulseGlow {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(245,158,11,0.2); }
    50% { transform: scale(1.08); box-shadow: 0 0 50px rgba(245,158,11,0.5); }
}

/* --- TOP BAR --- */
.sov-topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--sov-header-h);
    background: var(--sov-glass-heavy);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--sov-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 var(--sov-space-4); z-index: 900;
}
.sov-topbar__left, .sov-topbar__right {
    display: flex; align-items: center; gap: var(--sov-space-2);
}
.sov-topbar__brand {
    font-family: var(--sov-font-display);
    font-size: 0.95rem; font-weight: 800;
    letter-spacing: -0.01em; text-transform: uppercase;
    background: linear-gradient(135deg, var(--sov-cyan), var(--sov-purple));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sov-topbar__btn {
    min-height: 44px; min-width: 44px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-md);
    color: var(--sov-text-primary); font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.sov-topbar__btn:active { transform: scale(0.96); opacity: 0.9; }
.sov-topbar__btn--accent {
    background: var(--sov-cyan-dim);
    color: var(--sov-cyan); border-color: rgba(6,182,212,0.3);
}
.sov-topbar__btn--danger {
    background: var(--sov-red-dim);
    color: var(--sov-red); border-color: rgba(239,68,68,0.3);
}
.sov-topbar__badge {
    position: absolute; top: 6px; right: 6px;
    background: var(--sov-red); color: white;
    font-size: 0.58rem; padding: 2px 5px; border-radius: 10px;
    display: none; font-weight: 800;
    border: 2px solid var(--sov-bg-void);
}

/* --- SYNC BADGE --- */
.sov-sync {
    position: fixed; top: calc(var(--sov-header-h) + 8px); right: var(--sov-space-4);
    background: var(--sov-green-dim);
    color: var(--sov-green); font-size: 0.68rem; font-weight: 700;
    padding: 3px 10px; border-radius: 100px;
    border: 1px solid rgba(16,185,129,0.25);
    display: flex; align-items: center; gap: 5px; z-index: 850;
}
.sov-sync--offline {
    background: var(--sov-red-dim);
    color: var(--sov-red); border-color: rgba(239,68,68,0.25);
}
.sov-sync__dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; animation: sovPulse 2s infinite;
}
@keyframes sovPulse {
    0%,100% { opacity: 1; } 50% { opacity: 0.4; }
}

/* --- SIDEBAR DRAWER --- */
.sov-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 955; opacity: 0; pointer-events: none;
    transition: opacity 0.25s;
}
.sov-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.sov-drawer {
    position: fixed;
    top: var(--sov-header-h); left: 0;
    width: 280px;
    height: calc(100vh - var(--sov-header-h));
    background: var(--sov-bg-surface);
    border-right: 1px solid var(--sov-border);
    z-index: 960;
    transform: translateX(-100%);
    transition: transform 0.3s var(--sov-ease);
    overflow-y: auto; padding: var(--sov-space-4);
}
.sov-drawer.open { transform: translateX(0); }
.sov-drawer__category {
    font-size: 0.72rem; color: var(--sov-text-secondary);
    font-weight: 800; text-transform: uppercase;
    margin: var(--sov-space-3) 0 var(--sov-space-1) 0;
    letter-spacing: 0.08em;
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; cursor: pointer; border-radius: var(--sov-radius-sm);
    transition: all 0.2s;
}
.sov-drawer__category:hover { background: rgba(255,255,255,0.05); color: white; }
.sov-drawer__section {
    max-height: 1000px; overflow: hidden;
    transition: max-height 0.4s var(--sov-ease); margin-bottom: 8px;
}
.sov-drawer__section.collapsed { max-height: 0; margin-bottom: 0; }
.sov-drawer__item {
    padding: 10px 14px; margin-bottom: 2px;
    border-radius: var(--sov-radius-sm);
    color: var(--sov-text-secondary); font-size: 0.88rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
    border-left: 3px solid transparent;
    display: flex; align-items: center; gap: 12px;
}
.sov-drawer__item:hover {
    background: rgba(255,255,255,0.06); color: white; transform: translateX(4px);
}
.sov-drawer__item.active {
    background: linear-gradient(90deg, var(--sov-cyan-dim), transparent);
    color: var(--sov-cyan); border-left-color: var(--sov-cyan); font-weight: 700;
}
.sov-drawer__icon { font-size: 1.1rem; min-width: 24px; text-align: center; }

/* --- MAIN CONTENT AREA --- */
.sov-ceo-main {
    padding: calc(var(--sov-header-h) + 16px) var(--sov-space-4) var(--sov-space-5);
    max-width: 1280px; margin: 0 auto;
    min-height: 100vh; position: relative; z-index: 1;
    padding-bottom: calc(var(--sov-nav-h) + var(--sov-safe-bottom) + 16px);
}

/* --- VIEW SECTIONS --- */
.sov-view { display: none; opacity: 0; padding: 0; will-change: transform, opacity; }
.sov-view.active {
    display: block !important;
    animation: sovViewEntrance 0.4s var(--sov-ease-out) forwards;
}
@keyframes sovViewEntrance {
    from { opacity: 0; transform: translateY(12px) scale(0.98); filter: blur(8px); }
    to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* --- VIEW HEADER --- */
.sov-view-header { margin-bottom: var(--sov-space-6); }
.sov-view-header__title {
    font-family: var(--sov-font-display);
    font-size: 1.4rem; font-weight: 800; margin: 0;
    color: var(--sov-text-primary);
    display: flex; align-items: center; gap: var(--sov-space-2);
}
.sov-view-header__sub {
    color: var(--sov-text-secondary); font-size: 0.85rem;
    letter-spacing: 0.03em; margin-top: 2px;
}

/* --- DIRECTOR SHIELD --- */
.sov-shield {
    background: linear-gradient(135deg, var(--sov-red-dim), var(--sov-bg-surface));
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--sov-radius-lg); padding: var(--sov-space-5);
    margin-bottom: var(--sov-space-4);
}
.sov-shield__title {
    font-family: var(--sov-font-display);
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--sov-red);
    display: flex; align-items: center; gap: 8px;
    margin-bottom: var(--sov-space-4);
}
.sov-shield__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sov-space-3); }
.sov-shield__cell {
    background: rgba(255,255,255,0.04); padding: var(--sov-space-4);
    border-radius: var(--sov-radius-md); text-align: center;
}
.sov-shield__label {
    font-size: 0.68rem; color: var(--sov-text-secondary);
    text-transform: uppercase; font-weight: 800; letter-spacing: 0.08em;
}
.sov-shield__value { font-size: 1.7rem; font-weight: 900; margin-top: 4px; color: var(--sov-green); }
.sov-shield__meta { font-size: 0.62rem; color: var(--sov-text-tertiary); margin-top: 2px; }
.sov-shield__warning {
    display: none; margin-top: var(--sov-space-3); padding: 10px 14px;
    background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--sov-radius-md); font-size: 0.78rem;
}
.sov-shield__warning-label { font-weight: 800; color: var(--sov-red); }

/* --- PIPELINE STEP CARDS --- */
.sov-step-stack {
    display: flex; flex-direction: column; gap: var(--sov-space-3);
    margin-top: var(--sov-space-5);
}
.sov-step {
    background: var(--sov-glass); border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-lg); padding: var(--sov-space-4);
    border-left: 4px solid var(--sov-cyan); transition: all 0.2s;
}
.sov-step:active { background: var(--sov-bg-hover); transform: scale(0.995); }
.sov-step__header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: var(--sov-space-3);
}
.sov-step__name { display: flex; align-items: center; gap: 10px; }
.sov-step__icon { font-size: 1.4rem; }
.sov-step__label {
    font-weight: 900; text-transform: uppercase;
    letter-spacing: 0.06em; font-size: 0.82rem; color: var(--sov-text-primary);
}
.sov-step__badge {
    font-size: 0.68rem; font-weight: 900;
    padding: 3px 10px; border-radius: 100px; color: #000;
}
.sov-step__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sov-space-2); }
.sov-step__btn {
    min-height: 44px; padding: 10px 12px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-md);
    color: var(--sov-text-secondary); font-size: 0.76rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.sov-step__btn:hover { background: rgba(255,255,255,0.08); color: white; border-color: rgba(255,255,255,0.12); }
.sov-step__btn:active { transform: scale(0.97); }
.sov-step__lock {
    display: none; margin-top: var(--sov-space-3); padding: 10px 14px;
    background: var(--sov-amber-dim); border: 1px solid rgba(245,158,11,0.3);
    border-radius: var(--sov-radius-md); text-align: center;
}
.sov-step__lock-text { font-weight: 800; color: var(--sov-amber); font-size: 0.78rem; }

/* --- FINANCIAL KPI GRID --- */
.sov-kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sov-space-3); }
.sov-kpi { background: rgba(255,255,255,0.04); padding: var(--sov-space-4); border-radius: var(--sov-radius-md); }
.sov-kpi__label { font-size: 0.78rem; color: var(--sov-text-secondary); }
.sov-kpi__value { font-size: 1.4rem; font-weight: 800; margin-top: 2px; }

/* --- OPERATIONS COCKPIT --- */
.sov-ops-grid {
    display: grid; grid-template-columns: 2fr 1fr; gap: var(--sov-space-5);
    margin-top: var(--sov-space-5);
}

/* --- ALERT RAILS --- */
.sov-alert-rail {
    display: none; align-items: center; justify-content: space-between;
    border-radius: var(--sov-radius-md); padding: 12px 16px;
    margin-bottom: var(--sov-space-3); font-size: 0.85rem; font-weight: 700;
}
.sov-alert-rail--danger { background: var(--sov-red-dim); border: 1px solid rgba(239,68,68,0.3); }
.sov-alert-rail--warning { background: var(--sov-amber-dim); border: 1px solid rgba(245,158,11,0.3); }

/* --- BOTTOM NAV --- */
.sov-bottomnav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--sov-nav-h);
    background: var(--sov-glass-heavy);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--sov-border);
    display: flex; justify-content: space-around; align-items: center;
    padding-bottom: var(--sov-safe-bottom); z-index: 950;
}
.sov-bottomnav__btn {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px;
    min-width: 56px; min-height: 56px; padding: 6px 4px;
    background: none; border: none;
    color: var(--sov-text-tertiary); font-size: 0.62rem; font-weight: 700;
    cursor: pointer; transition: all 0.2s; border-radius: var(--sov-radius-md);
}
.sov-bottomnav__btn i { font-size: 1.15rem; margin-bottom: 1px; }
.sov-bottomnav__btn:active { background: rgba(255,255,255,0.05); transform: scale(0.96); }
.sov-bottomnav__btn.active { color: var(--sov-cyan); text-shadow: 0 0 12px rgba(6,182,212,0.4); }

/* --- GLASS MODAL (CEO) --- */
.sov-modal {
    position: fixed; inset: 0;
    background: rgba(2,4,9,0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 2000; display: none;
    align-items: center; justify-content: center; padding: var(--sov-space-5);
}
.sov-modal.active { display: flex; }
.sov-modal__content {
    background: var(--sov-bg-surface); border: 1px solid var(--sov-border);
    border-radius: var(--sov-radius-lg); padding: var(--sov-space-6);
    max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto;
}

/* --- EMPTY STATES --- */
.sov-empty { text-align: center; color: var(--sov-text-secondary); padding: var(--sov-space-10) var(--sov-space-5); }
.sov-empty__icon { font-size: 2.4rem; margin-bottom: var(--sov-space-3); opacity: 0.5; }
.sov-empty__text { font-size: 0.88rem; }

/* --- TIMELINE --- */
.sov-timeline__item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--sov-border); }
.sov-timeline__item:last-child { border-bottom: none; }
.sov-timeline__dot {
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; font-size: 0.9rem; flex-shrink: 0;
}
.sov-timeline__dot--done   { background: var(--sov-green-dim); color: var(--sov-green); }
.sov-timeline__dot--active { background: var(--sov-cyan-dim);  color: var(--sov-cyan); }
.sov-timeline__dot--pending{ background: rgba(255,255,255,0.04); color: var(--sov-text-secondary); }
.sov-timeline__body { flex: 1; }
.sov-timeline__title { font-weight: 500; font-size: 0.88rem; }
.sov-timeline__date  { font-size: 0.73rem; color: var(--sov-text-secondary); }

/* --- PHOTO GRID --- */
.sov-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sov-photo-grid__item {
    aspect-ratio: 1; background: rgba(255,255,255,0.04);
    border-radius: var(--sov-radius-md); display: grid; place-items: center;
    font-size: 0.7rem; color: var(--sov-text-secondary);
    cursor: pointer; transition: all 0.2s; overflow: hidden; min-height: 48px;
}
.sov-photo-grid__item:active { transform: scale(0.97); }
.sov-photo-grid__item--main { grid-column: span 2; grid-row: span 2; font-size: 1rem; }

/* --- CEO FORM ELEMENTS --- */
.sov-ceo-input {
    min-height: 44px; padding: 12px 16px; font-size: 16px;
    border-radius: var(--sov-radius-md); border: 1px solid var(--sov-border);
    background: rgba(255,255,255,0.04); color: white; width: 100%; margin-bottom: 10px;
}
.sov-ceo-input:focus { outline: none; border-color: var(--sov-cyan); box-shadow: 0 0 0 3px var(--sov-cyan-dim); }
.sov-ceo-btn {
    min-height: 44px; padding: 12px 16px; border-radius: var(--sov-radius-md);
    border: none; font-weight: 700; font-size: 0.88rem;
    cursor: pointer; transition: all 0.15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
}
.sov-ceo-btn:active { transform: scale(0.96); opacity: 0.9; }
.sov-ceo-btn--primary { background: var(--sov-cyan); color: #000; }
.sov-ceo-btn--secondary { background: var(--sov-purple); color: white; }
.sov-ceo-btn--outline { background: transparent; border: 1px solid var(--sov-border); color: var(--sov-text-secondary); }
.sov-ceo-btn--success { background: var(--sov-green); color: #000; }
.sov-ceo-btn--danger { background: var(--sov-red); color: white; }
.sov-ceo-checkbox {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.88rem; padding: 8px 0; cursor: pointer; min-height: 44px;
}
.sov-ceo-checkbox input { width: 20px; height: 20px; accent-color: var(--sov-green); cursor: pointer; }

/* --- CEO RESPONSIVE --- */
@media (max-width: 768px) {
    .sov-shield__grid { grid-template-columns: repeat(2, 1fr); }
    .sov-ops-grid { grid-template-columns: 1fr; }
    .sov-photo-grid { grid-template-columns: repeat(2, 1fr); }
    .sov-ceo-main { padding-left: var(--sov-space-3); padding-right: var(--sov-space-3); }
    .sov-step__actions { grid-template-columns: 1fr; }
    .sov-topbar { padding: 0 var(--sov-space-3); }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .sov-shield__grid { grid-template-columns: repeat(2, 1fr); }
    .sov-ops-grid { grid-template-columns: 1fr; }
}
@media (min-width: 1025px) {
    .sov-photo-grid { grid-template-columns: repeat(3, 1fr); }
}
