/* ═══════════════════════════════════════════════════════════
   RECLAIM CAPITAL — Found Money Dashboard
   McKinsey-Grade · Billionaire Quality · Zero BS
   REFINED CONTRAST UPDATE v6.1
   ═══════════════════════════════════════════════════════════ */

:root {
    /* Core Palette */
    --bg-primary: #050508;
    --bg-secondary: #0a0a0f;
    --bg-tertiary: #0f0f16;
    --bg-card: rgba(12, 12, 20, 0.9);
    
    /* Glass - Hardened for readability */
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-glow: rgba(212, 175, 55, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    
    /* Gold System */
    --gold-primary: #e6c253; /* Brightened for contrast */
    --gold-light: #fff0a5;
    --gold-dark: #b88e14;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --gold-subtle: rgba(212, 175, 55, 0.15);
    
    /* Accent */
    --accent-cyan: #33e1ff;
    --accent-emerald: #00ffaa;
    --accent-rose: #ff6b81;
    --accent-violet: #a29bfe;
    
    /* Text - CRITICAL CONTRAST FIX */
    --text-primary: #ffffff;
    --text-secondary: #d1d1d6; /* Increased brightness from 0.65 to solid grey */
    --text-tertiary: #a1a1aa;  /* Increased brightness from 0.4 to 0.6 equivalent */
    --text-gold: #e6c253;
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══ RESET & BASE ═══ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ═══ AMBIENT GLOW EFFECTS ═══ */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

.ambient-glow--1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: ambientFloat 20s ease-in-out infinite;
}

.ambient-glow--2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
    bottom: 20%;
    left: -150px;
    animation: ambientFloat 25s ease-in-out infinite reverse;
}

.ambient-glow--3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.04) 0%, transparent 70%);
    top: 50%;
    right: 10%;
    animation: ambientFloat 30s ease-in-out infinite;
}

@keyframes ambientFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(20px, 20px) scale(1.02); }
}

/* ═══ NAVIGATION ═══ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-2xl);
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid var(--glass-border);
}

.nav__brand {
    display: flex;
    align-items: center;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav__logo-icon {
    color: var(--gold-primary);
    font-size: 1.2rem;
    text-shadow: 0 0 12px var(--gold-glow);
}

.nav__logo-text {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.nav__logo-dot {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--gold-primary);
}

.nav__links {
    display: flex;
    gap: var(--space-xl);
}

.nav__link {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    position: relative;
}

.nav__link:hover,
.nav__link--active {
    color: var(--text-primary);
}

.nav__link--active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-primary);
    border-radius: 1px;
    box-shadow: 0 0 12px var(--gold-glow);
}

.nav__status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulse 2s ease-in-out infinite;
}

.nav__status-text {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent-emerald);
}

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

/* ═══ HEADER TICKER ═══ */
.header {
    text-align: center;
    padding: var(--space-3xl) var(--space-2xl) var(--space-2xl);
    position: relative;
    z-index: 1;
}

.header__ticker-wrapper {
    margin-bottom: var(--space-lg);
}

.header__ticker-label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--gold-primary);
    text-transform: uppercase;
    margin-bottom: var(--space-md);
    text-shadow: 0 0 20px var(--gold-glow);
}

.header__ticker-value {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, #ffffff 0%, #e6c253 50%, #ffffff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerGold 4s ease-in-out infinite;
    text-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

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

.header__ticker-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    font-size: 0.95rem;
}

.header__ticker-change {
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(0, 255, 170, 0.15);
    border: 1px solid rgba(0, 255, 170, 0.3);
}

.header__ticker-change.positive {
    color: var(--accent-emerald);
}

.header__ticker-period {
    color: var(--text-secondary);
    font-weight: 500;
}

.header__subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* ═══ KPI STRIP ═══ */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    padding: 0 var(--space-2xl) var(--space-2xl);
    position: relative;
    z-index: 1;
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
    opacity: 0.5;
    transition: opacity var(--transition-smooth);
}

.kpi-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

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

.kpi-card__label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.kpi-card__value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.kpi-card__trend {
    font-size: 0.85rem;
    font-weight: 600;
}

.kpi-card__trend.positive { color: var(--accent-emerald); }
.kpi-card__trend.negative { color: var(--accent-rose); }

/* ═══ DASHBOARD GRID ═══ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    padding: 0 var(--space-2xl) var(--space-2xl);
    position: relative;
    z-index: 1;
}

/* ═══ PANEL (GLASSMORPHIC CARD) ═══ */
.panel {
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(1.1);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-smooth);
    position: relative;
}

.panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), transparent 40%, transparent 60%, rgba(51, 225, 255, 0.15));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity var(--transition-smooth);
}

.panel:hover::before {
    opacity: 1;
}

.panel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(212, 175, 55, 0.05);
}

.panel--wide {
    grid-column: span 2;
}

.panel--full {
    grid-column: 1 / -1;
}

.panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl) var(--space-lg) var(--space-md);
}

.panel__title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.panel__title-icon {
    font-size: 1.2rem;
}

.panel__controls {
    display: flex;
    gap: var(--space-sm);
}

.panel__btn {
    padding: 6px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.panel__btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.panel__btn--active {
    background: var(--gold-subtle);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.panel__badge {
    font-size: 0.8rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 107, 129, 0.15);
    border: 1px solid rgba(255, 107, 129, 0.4);
    color: var(--accent-rose);
    letter-spacing: 0.5px;
}

.panel__body {
    padding: 0 var(--space-lg) var(--space-lg);
    min-height: 200px;
    position: relative;
}

.panel__body--chart-sm {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel__body--table {
    padding: 0;
    overflow-x: auto;
}

.panel__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-lg);
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.4);
}

.panel__footer-stat {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.panel__footer-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.panel__footer-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.panel__footer-value.gold {
    color: var(--gold-primary);
    text-shadow: 0 0 10px var(--gold-glow);
}

.panel__footer-value.negative {
    color: var(--accent-rose);
}

/* ═══ FINDINGS TABLE ═══ */
.findings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem; /* Increased size */
}

.findings-table thead {
    background: rgba(0, 0, 0, 0.5);
}

.findings-table th {
    padding: var(--space-lg);
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--glass-border);
}

.findings-table td {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary); /* Full white for readability */
}

.findings-table tbody tr {
    transition: background var(--transition-fast);
}

.findings-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.findings-table .severity-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.severity-badge--critical {
    background: rgba(255, 107, 129, 0.2);
    color: #ff8e9a;
    border: 1px solid rgba(255, 107, 129, 0.5);
}

.severity-badge--high {
    background: rgba(255, 165, 0, 0.15);
    color: #ffb84d;
    border: 1px solid rgba(255, 165, 0, 0.4);
}

.severity-badge--medium {
    background: rgba(51, 225, 255, 0.15);
    color: #8cefff;
    border: 1px solid rgba(51, 225, 255, 0.4);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-badge--active {
    background: rgba(0, 255, 170, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(0, 255, 170, 0.4);
}

.status-badge--pending {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-primary);
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.status-badge--escalated {
    background: rgba(162, 155, 254, 0.15);
    color: var(--accent-violet);
    border: 1px solid rgba(162, 155, 254, 0.4);
}

.impact-value {
    font-weight: 800;
    color: var(--gold-primary);
}

/* ═══ CTA SECTION ═══ */
.cta-section {
    padding: var(--space-3xl) var(--space-2xl);
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xl);
}

.cta-section__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cta-section__subtitle {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-xl);
}

.cta-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 64px;
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.08) 100%);
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(212, 175, 55, 0.2),
        inset 0 0 30px rgba(212, 175, 55, 0.1);
    border-color: var(--gold-light);
}

.cta-button:hover::before {
    opacity: 0.2;
}

.cta-button:active {
    transform: translateY(-2px);
}

.cta-button__icon {
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
}

.cta-button__text {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #fff; /* Max contrast */
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.cta-button:hover .cta-button__text {
    color: var(--gold-light);
    text-shadow: 0 0 20px var(--gold-glow);
}

.cta-button__subtext {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 1.5px;
    position: relative;
    z-index: 1;
}

.cta-section__stats {
    display: flex;
    gap: var(--space-3xl);
    background: rgba(0,0,0,0.3);
    padding: var(--space-xl) var(--space-3xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
}

.cta-stat__value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.cta-stat__label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold-primary);
    text-transform: uppercase;
}

/* ═══ FOOTER ═══ */
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl) var(--space-2xl);
    border-top: 2px solid var(--glass-border);
    background: #050508;
    position: relative;
    z-index: 1;
}

.footer__left, .footer__right {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.footer__brand {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--gold-primary);
}

.footer__sub, .footer__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
}

.footer__link:hover {
    color: var(--text-primary);
}

.footer__divider {
    color: var(--glass-border);
    font-size: 1rem;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .panel--wide {
        grid-column: span 1;
    }
    .nav__links {
        display: none;
    }
    .cta-section__stats {
        flex-direction: column;
        gap: var(--space-lg);
        padding: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .header__ticker-value {
        font-size: 2.8rem;
    }
    .nav {
        padding: var(--space-md);
    }
    .dashboard-grid,
    .kpi-strip,
    .cta-section {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    .footer {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* ═══ SELECTION ═══ */
::selection {
    background: var(--gold-primary);
    color: #000;
}
