/* ============================================================
   AEGIS v1.0 – Sovereign Design System
   Glassmorphism | OLED Black | Monospace Data
   ============================================================ */
:root {
    --bg-deep: #0C0F13;
    --bg-void: #0C0F13;
    --glass-bg: rgba(20, 24, 32, 0.82);
    --glass-border: rgba(184, 150, 106, 0.12);
    --primary-cyan: #B8966A;
    --neon-blue: rgba(184,150,106,0.28);
    --warning-orange: #B8966A;
    --risk-orange: #B8966A;
    --text-white: #EAE6DF;
    --text-dim: #6b7280;
    --success-green: #5ea888;
    --danger-red: #b87070;
    --hold-grey: #6b7280;
    --glow-cyan: 0 0 10px rgba(184, 150, 106, 0.22);
}

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

/* BASE BODY */
body {
    background: var(--bg-deep);
    background-attachment: fixed;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

/* DASHBOARD BODY OVERRIDES */
body.dashboard-body {
    overflow-x: hidden;
    overflow-y: auto;
    height: 100vh;
    padding-top: 0;
    /* Remove top padding since we hide the top nav */
}

/* Hide landing page nav elements on the dashboard to prevent clutter/duplicates */
body.dashboard-body .brand-logo,
body.dashboard-body .glass-nav {
    display: none !important;
}

/* DASHBOARD LAYOUT – GRID */
.dashboard-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Premium Dashboard UI Overrides */
.glass-panel {
    background: var(--glass-bg, rgba(15, 23, 42, 0.6));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.hud-glow {
    text-shadow: 0 0 8px rgba(184, 150, 106, 0.4);
}

.alpha-glow {
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.4);
}

.status-dot {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px currentColor;
}

.countdown-display {
    margin: 1rem auto;
    max-width: 980px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(184, 150, 106, 0.28);
    border-radius: 1rem;
    background: rgba(8, 6, 3, 0.92);
    color: #e2e8f0;
    font-size: 0.95rem;
    text-align: center;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(184,150,106,0.06);
}

.access-expired-card {
    max-width: 980px;
    margin: 1.5rem auto;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    text-align: center;
    color: #f8fafc;
}

/* ============================================================
   TIER-SPECIFIC GLOWS & STYLING
   ============================================================ */
.glow-basic {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.glow-intermediate {
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
    border-color: var(--primary-cyan);
}

.glow-pro {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
}

.price-card.tier-pro.featured {
    transform: scale(1.05);
    z-index: 10;
    position: relative;
    border: 2px solid #ffd700;
    background: linear-gradient(180deg, rgba(20,20,20,0.9) 0%, rgba(10,10,10,0.95) 100%);
}

.price-card.tier-pro.featured:hover {
    transform: scale(1.08);
}

.price-card.hover-interactive:not(.tier-pro) {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.price-card.hover-interactive:not(.tier-pro):hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 242, 255, 0.2);
}

/* ============================================================
   PROGRESS BARS & ZONE TRACKING
   ============================================================ */
.confluence-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.confluence-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--success-green));
    border-radius: 3px;
}

.zone-progression {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.zone-node {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: 0.3s ease;
}

.zone-node.active {
    background: var(--primary-cyan);
    box-shadow: 0 0 8px var(--primary-cyan);
}

.zone-line {
    flex-grow: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    transition: 0.3s ease;
}

.zone-line.active {
    background: var(--primary-cyan);
}

.access-expired-card h2 {
    margin-bottom: 0.75rem;
    font-size: 1.75rem;
    letter-spacing: 0.03em;
}

.access-expired-card p {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.access-expired-card .expired-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.access-expired-card .expired-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    padding: 0.85rem 1.2rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.access-expired-card .expired-actions a:hover {
    background: rgba(255, 255, 255, 0.12);
}



/* SIDEBAR – FLEX COLUMN WITH SPACE BETWEEN */
.sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* height + padding handled by Tailwind utilities on the element */
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    margin-bottom: 1.5rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.version-badge {
    font-size: 0.65rem;
    color: var(--primary-cyan);
    background: rgba(0, 242, 255, 0.15);
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.5rem;
}

/* USER STATS – SCROLLABLE, TAKES AVAILABLE SPACE */
.user-stats {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
    flex: 1;
    overflow-y: auto;
    max-height: 40vh;
}

.stat-item {
    margin-bottom: 1rem;
}

.stat-item .label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}

.sidebar-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0.8rem;
    width: 100%;
    color: white;
    font-weight: 500;
    transition: 0.2s;
}

.sidebar-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 2px rgba(0, 242, 255, 0.2);
}

#suggested-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-cyan);
    text-shadow: 0 0 4px rgba(0, 242, 255, 0.3);
}

.alpha-toggle {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--primary-cyan);
    border-radius: 40px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    display: inline-block;
    width: auto;
}

.alpha-toggle.active {
    background: var(--success-green);
    border-color: var(--success-green);
    color: #000;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* SIDE NAV – ALWAYS AT BOTTOM */
.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    /* ensures logout stays at bottom */
    padding-top: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem;
    border-radius: 14px;
    color: var(--text-dim);
    text-decoration: none;
    transition: 0.2s;
    font-weight: 500;
}

.nav-item i {
    width: 24px;
    font-size: 1.2rem;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(0, 242, 255, 0.1);
    color: var(--primary-cyan);
}

/* LOGOUT BUTTON SPECIAL HOVER */
#logoutBtn {
    transition: transform 0.1s ease, background 0.2s;
}

#logoutBtn:hover {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

#logoutBtn:active {
    transform: scale(0.98);
}

/* MAIN CONTENT – SCROLLABLE */
.main-content {
    height: 100%;
    overflow-y: auto;
    padding: 1.8rem 2rem;
    padding-bottom: 80px;
}

/* CONNECTION STATUS */
.connection-status {
    position: fixed;
    top: 1rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.75rem;
    border: 1px solid var(--glass-border);
}

.ws-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ff5252;
    transition: 0.2s;
}

.ws-dot.connected {
    background-color: #00e676;
    box-shadow: 0 0 6px #00e676;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(0, 230, 118, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
    }
}

.trial-countdown,
.info-note {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
}

.trial-countdown {
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid rgba(0, 242, 255, 0.18);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font-weight: 600;
}

.info-note {
    max-width: 320px;
    margin: 0.5rem auto 1rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.75);
}

/* SIGNAL GRID */
.signal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.signal-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--neon-blue);
    padding: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.signal-card:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 8px 20px rgba(0, 242, 255, 0.1);
}

.signal-card.bullish {
    border-color: var(--success-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

.signal-card.bearish {
    border-color: var(--danger-red);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.1);
}

.signal-card.hold {
    border-color: var(--hold-grey);
    box-shadow: 0 0 15px rgba(107, 114, 128, 0.1);
}

.signal-card.neutral {
    opacity: 0.75;
    filter: grayscale(0.2);
    border-color: rgba(107, 114, 128, 0.4);
}

.signal-card.neutral:hover {
    opacity: 1;
    filter: none;
}

/* No Signals Available Message */
.no-signals {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    text-align: center;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.no-signals::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%, rgba(0, 242, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.no-signals i {
    font-size: 4rem;
    color: var(--primary-cyan);
    margin-bottom: 1.5rem;
    opacity: 0.8;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.3));
    animation: pulse 2s ease-in-out infinite;
}

.no-signals p {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

/* ===== Directional Room Nav Count Badges ===== */
.nav-dir-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}

.nav-dir-count.buy {
    background: rgba(74, 222, 128, 0.18);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.35);
}

.nav-dir-count.sell {
    background: rgba(248, 113, 113, 0.18);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.upgrade-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-cyan), var(--neon-blue));
    color: var(--bg-deep);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
    border: 1px solid rgba(0, 242, 255, 0.5);
}

.upgrade-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.4);
    background: linear-gradient(135deg, var(--neon-blue), var(--primary-cyan));
}

.upgrade-link i {
    font-size: 0.9rem;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

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

.symbol {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin: 0.4rem 0;
}

.signal-tag {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
}

.signal-strong {
    background: var(--risk-orange);
    color: #000;
}

.signal-buy {
    background: var(--primary-cyan);
    color: #000;
}

.signal-hold {
    background: var(--hold-grey);
    color: #fff;
}

.signal-avoid {
    background: var(--danger-red);
    color: #fff;
}

.delta-up {
    color: var(--success-green);
}

.delta-down {
    color: var(--danger-red);
}

/* Signal Card Price Styles */
.price-container {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
}

/* Fix for Market Token Cards overflowing on small screens */
#market-token-cards > div {
    min-width: 0;
}
#market-token-cards span.live-price, 
#market-token-cards span[id^="market-card-signal-"],
#market-token-cards .text-\[10px\] {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
}
#market-token-cards .flex {
    min-width: 0;
}

.price-up {
    color: #26a69a;
}

.price-up::after {
    content: ' ▲';
    font-size: 0.8em;
}

.price-down {
    color: #ef5350;
}

.price-down::after {
    content: ' ▼';
    font-size: 0.8em;
}

/* Brief background flash when a price ticks — fades out in 400 ms */
@keyframes price-flash-up {
    0%   { background: rgba(38, 166, 154, 0.30); border-radius: 3px; }
    100% { background: transparent; }
}
@keyframes price-flash-down {
    0%   { background: rgba(239, 83, 80, 0.30); border-radius: 3px; }
    100% { background: transparent; }
}
.price-flash-up {
    animation: price-flash-up 0.4s ease-out forwards;
    padding: 0 3px;
    border-radius: 3px;
}
.price-flash-down {
    animation: price-flash-down 0.4s ease-out forwards;
    padding: 0 3px;
    border-radius: 3px;
}

/* WS status dot brightens for 200 ms when a data packet arrives */
@keyframes data-received-pulse {
    0%   { opacity: 1; transform: scale(1.5); }
    100% { opacity: 1; transform: scale(1); }
}
.data-received {
    animation: data-received-pulse 0.2s ease-out forwards;
}

.sl-tp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-dim);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    display: flex;
    justify-content: space-between;
}

/* TRADE EXECUTION COCKPIT */
.sim-panel {
    margin-top: 2rem;
    background: rgba(18, 22, 35, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.sim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
}

.sim-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .sim-grid {
        grid-template-columns: 1fr;
    }
}

.sim-left,
.sim-right {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 1.2rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}

.input-group input,
.input-group select {
    width: 100%;
    background: #11141f;
    border: 1px solid #2c3e5c;
    border-radius: 12px;
    padding: 0.6rem;
    color: white;
    font-family: 'JetBrains Mono', monospace;
}

.input-group input[type="range"] {
    padding: 0;
    height: 4px;
    background: #2c3e5c;
    -webkit-appearance: none;
    appearance: none;
}

.input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-cyan);
    cursor: pointer;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.metric-value {
    font-weight: 600;
    color: var(--primary-cyan);
}

.risk-gauge {
    margin: 1rem 0;
    height: 6px;
    background: #2c3e5c;
    border-radius: 3px;
    overflow: hidden;
}

.risk-gauge-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, lime, orange, red);
}

.direction-badge.long {
    background: var(--success-green);
    color: #000;
}

.direction-badge.short {
    background: var(--danger-red);
    color: #fff;
}

.btn-execute {
    width: 100%;
    background: linear-gradient(95deg, var(--primary-cyan), #00a1b0);
    color: #000;
    font-weight: 800;
    padding: 0.8rem;
    border: none;
    border-radius: 40px;
    margin-top: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-execute.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #3a3f5e;
    color: #aaa;
}

/* ACTIVE EXECUTIONS TABLE */
.ledger-section {
    margin-top: 2rem;
    background: rgba(18, 22, 35, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    overflow-x: auto;
}

.ledger-header {
    padding: 1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.trades-table th,
.trades-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'JetBrains Mono', monospace;
}

.trades-table th {
    color: var(--primary-cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pnl-positive {
    color: var(--success-green);
}

.pnl-negative {
    color: var(--danger-red);
}

.close-trade-btn {
    background: rgba(255, 0, 85, 0.2);
    border: 1px solid var(--danger-red);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    cursor: pointer;
    color: white;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.modal[style*="display: flex"] {
    display: flex !important;
}

.modal-card {
    background: rgba(15, 17, 21, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    position: relative;
}

.modal-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-white);
}

.modal-card p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.modal-card ul {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0 auto 2rem;
    display: inline-block;
}

.modal-card ul li {
    margin-bottom: 0.8rem;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-card ul li::before {
    content: '✓';
    color: var(--primary-cyan);
    font-weight: bold;
}

.pricing-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pricing-options button {
    width: 100%;
    font-size: 1rem;
}

.btn-secondary {
    background: transparent;
    color: var(--text-dim);
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: 0.2s;
    text-decoration: underline;
}

.btn-secondary:hover {
    color: var(--text-white);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: 0.2s;
}

.close-modal:hover {
    color: var(--primary-cyan);
}

/* SCROLLBAR — brand gold */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #14110b;
}

::-webkit-scrollbar-thumb {
    background: #B8966A;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #C9A87A;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #B8966A #14110b;
}

[data-theme="light"] ::-webkit-scrollbar-track { background: #e2e6ee; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #a07030; }
[data-theme="light"] * { scrollbar-color: #a07030 #e2e6ee; }

/* ============================================
   PRICING PAGE & EXTERNAL STYLES
   ============================================ */
.pricing-hero {
    padding: 120px 6% 80px;
    min-height: 100vh;
    background: radial-gradient(circle at 30% 10%, rgba(0, 242, 255, 0.03), transparent);
}

@media (max-width: 768px) {
    .pricing-hero {
        padding: 30px 4% 60px;
        min-height: auto;
    }
    .pricing-hero .pricing-header {
        text-align: center;
    }
    .price-card.tier-pro.featured {
        transform: scale(1);
    }
    .price-card.tier-pro.featured:hover {
        transform: scale(1);
    }
    .price-card {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
    .pricing-grid,
    .pricing-grid.floating-cards {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ── Disclosure/policy two-column layout ── */
.disclosure-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 1300px;
    margin: 120px auto 2rem;
    padding: 0 2rem;
}

@media (max-width: 900px) {
    .disclosure-layout {
        flex-direction: column;
        margin: 90px auto 2rem;
        padding: 0 1rem;
    }
    .disclosure-sidebar {
        position: static;
        width: 100%;
    }
}

/* Pricing grid & cards */
.pricing-grid,
.pricing-grid.floating-cards {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.price-card {
    background: rgba(15, 17, 21, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    padding: 1.6rem;
    min-width: 260px;
    max-width: 360px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.price-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.price-card .price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-cyan);
    margin: 0.4rem 0;
}

.price-card .card-desc {
    color: var(--text-dim);
    margin-bottom: 0.8rem;
}

.features-list {
    list-style: none;
    padding-left: 0;
    margin: 0.6rem 0 0;
    color: var(--text-dim);
}

.features-list li {
    margin-bottom: 0.6rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.btn-outline {
    display: inline-block;
    padding: 0.8rem 1.2rem;
    margin-top: 1rem;
    border-radius: 28px;
    background: transparent;
    text-decoration: none;
    color: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
    text-align: center;
}

.btn-outline:hover {
    background: rgba(0, 242, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

.btn-pro {
    display: inline-block;
    padding: 0.8rem 1.2rem;
    margin-top: 1rem;
    border-radius: 28px;
    background: linear-gradient(95deg, var(--primary-cyan), #00a1b0);
    color: #000;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: 0.2s;
}

.btn-pro:hover {
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
    transform: translateY(-1px);
}

.trial-card .badge-trial {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: rgba(0, 242, 255, 0.08);
    color: var(--primary-cyan);
    border-radius: 18px;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.price-card.featured {
    border: 1px solid var(--primary-cyan);
    box-shadow: 0 12px 40px rgba(0, 242, 255, 0.06);
    transform: translateY(-6px);
}

.guidance-teaser {
    margin-top: 2rem;
    color: var(--text-dim);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* COMMAND CENTER – Logo & Glass Nav (unchanged) */
.brand-logo {
    position: fixed;
    top: 1.5rem;
    left: 2rem;
    z-index: 1001;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.2);
}

.brand-logo span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-cyan);
    background: none;
    -webkit-text-fill-color: var(--primary-cyan);
}

.glass-nav {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 320px;
    max-width: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.6rem 1.8rem;
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(16px);
    border-radius: 80px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

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

.nav-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0.2rem;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-cyan);
    text-shadow: 0 0 6px rgba(0, 242, 255, 0.5);
}

.nav-links a.active {
    color: var(--primary-cyan);
    border-bottom: 2px solid var(--primary-cyan);
}

@media (max-width: 768px) {
    .brand-logo {
        top: 1rem;
        left: 1rem;
        font-size: 1.2rem;
    }

    .glass-nav {
        top: 1rem;
        width: calc(100% - 2rem);
        padding: 0.5rem 1rem;
        border-radius: 40px;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.7rem;
    }

    .glass-nav::-webkit-scrollbar {
        display: none;
    }
}

/* FIXED HEADER (for landing page) */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
    z-index: 1000;
}

.fixed-header .logo {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links-centered {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--dim);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-cyan);
}

.portal-btn {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--primary-cyan);
    border-radius: 40px;
    padding: 0.4rem 1.2rem;
    color: var(--primary-cyan);
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.portal-btn.terminal-btn {
    background: rgba(0, 242, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

body:not(.dashboard-body) {
    padding-top: 80px;
}

/* FEATURE SECTIONS (Landing page) */
.feature-section {
    padding: 80px 6%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-section.alt {
    background: rgba(0, 242, 255, 0.02);
}

.feature-container {
    max-width: 900px;
    margin: 0 auto;
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-cyan);
    margin-bottom: 1rem;
}

.feature-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--dim);
}

.feature-stats i {
    margin-right: 6px;
    color: var(--success-green);
}

/* PLANS SECTION */
.plans-section {
    padding: 80px 6%;
    background: radial-gradient(circle at 30% 10%, rgba(0, 242, 255, 0.02), transparent);
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff, var(--primary-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.plans-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.plan-card {
    background: rgba(15, 17, 21, 0.75);
    backdrop-filter: blur(16px);
    border-radius: 28px;
    padding: 2rem 1.5rem;
    flex: 1;
    min-width: 260px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    transition: all 0.3s ease;
    position: relative;
}

.plan-card.featured {
    border: 1px solid var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.15);
    transform: scale(1.02);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--risk-orange);
    color: #000;
    padding: 4px 16px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 800;
}

.plan-card h3 {
    font-size: 1.6rem;
    margin: 1rem 0 0.5rem;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    margin: 1rem 0;
}

.plan-price span {
    font-size: 0.9rem;
    color: var(--dim);
    font-weight: 400;
}

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

.plan-card li {
    margin: 12px 0;
    color: var(--dim);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.plan-card li i {
    color: var(--success-green);
    width: 20px;
}

@media (max-width: 768px) {
    .plans-grid {
        flex-direction: column;
        align-items: center;
    }

    .plan-card.featured {
        transform: scale(1);
    }
}

/* HERO SECTION (Landing) */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.08) 0%, transparent 70%);
    animation: heroPulse 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes heroPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
    background: rgba(10, 10, 12, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 48px;
    padding: 3rem 2rem;
    border: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.badge-58 {
    display: inline-block;
    background: rgba(0, 242, 255, 0.15);
    padding: 0.3rem 1rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--primary-cyan);
    margin-bottom: 1.5rem;
}

.gradient-text {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, var(--primary-cyan) 60%, #00a1b0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--dim);
    max-width: 650px;
    margin: 0 auto 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.8rem 1.5rem;
    border-radius: 24px;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-cyan);
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--dim);
}

.hero-cta {
    margin-top: 1.5rem;
}

.btn-primary-glow {
    background: linear-gradient(95deg, var(--primary-cyan), #00a1b0);
    border: none;
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 60px;
    color: #000;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

.btn-primary-glow:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
}

.hero-footnote {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--dim);
}

@media (max-width: 768px) {
    .hero-content {
        padding: 2rem 1.5rem;
    }

    .gradient-text {
        font-size: 2.2rem;
    }

    .hero-stat {
        padding: 0.5rem 1rem;
        min-width: 90px;
    }

    .stat-number {
        font-size: 1.3rem;
    }
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-links {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--dim);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-cyan);
}

.footer-links .separator {
    color: var(--dim);
    margin: 0 0.5rem;
    font-size: 0.7rem;
}

.footer-proprietor {
    font-size: 0.75rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.footer p {
    font-size: 0.75rem;
    color: var(--dim);
    margin: 0;
}

/* ============================================================
   AUTH MODAL – AEGIS Design System
   ============================================================ */
.auth-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    z-index: 5000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 1rem;
}

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

.auth-modal-container {
    background: var(--ae-raised, #141820);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid rgba(184, 150, 106, 0.18);
    padding: 2rem 1.5rem;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: 1px solid var(--ae-border, rgba(255,255,255,0.08));
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ae-text-3, #6b7280);
    font-size: 1rem;
    transition: 0.2s;
    z-index: 10;
}

.auth-modal-close:hover {
    border-color: var(--ae-border-bright, rgba(255,255,255,0.18));
    color: var(--ae-text-1, #EAE6DF);
    transform: rotate(90deg);
}

.auth-step {
    animation: fadeIn 0.3s ease;
}

.auth-step.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.auth-logo {
    font-family: var(--ae-font-serif, 'DM Serif Display', serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ae-gold, #B8966A);
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.auth-header h2 {
    font-family: var(--ae-font-serif, 'DM Serif Display', serif);
    font-size: 1.65rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--ae-text-1, #EAE6DF);
}

.auth-header p {
    font-size: 0.88rem;
    color: var(--ae-text-2, #9ca3af);
}

.auth-back-btn {
    background: none;
    border: none;
    color: var(--ae-gold, #B8966A);
    font-size: 1.1rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: 0.2s;
}

.auth-back-btn:hover {
    transform: translateX(-3px);
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-btn-primary {
    background: var(--ae-gold, #B8966A);
    color: var(--ae-base, #0C0F13);
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn-primary:hover {
    background: #c9a87c;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(184, 150, 106, 0.35);
}

.auth-btn-secondary {
    background: rgba(184, 150, 106, 0.08);
    color: var(--ae-gold, #B8966A);
    border: 1px solid rgba(184, 150, 106, 0.25);
    padding: 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn-secondary:hover {
    background: rgba(184, 150, 106, 0.14);
    border-color: var(--ae-gold, #B8966A);
}

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

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

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: var(--ae-text-2, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-group input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ae-border, rgba(255,255,255,0.08));
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--ae-text-1, #EAE6DF);
    font-size: 0.95rem;
    transition: 0.2s;
}

.form-group input::placeholder {
    color: var(--ae-text-4, rgba(255, 255, 255, 0.3));
}

.form-group input:focus {
    outline: none;
    border-color: var(--ae-gold, #B8966A);
    background: rgba(184, 150, 106, 0.05);
    box-shadow: 0 0 0 3px rgba(184, 150, 106, 0.1);
}

.form-group small {
    font-size: 0.75rem;
    color: var(--ae-text-3, #6b7280);
    margin-top: 0.3rem;
}

.error-msg {
    font-size: 0.75rem;
    color: var(--ae-sell, #7A4040);
    margin-top: 0.3rem;
    display: none;
}

.error-msg:not(:empty) {
    display: block;
}

.auth-error,
.auth-success {
    font-size: 0.85rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.auth-error:not(:empty) {
    display: block;
    background: rgba(122, 64, 64, 0.15);
    color: #c47a7a;
    border: 1px solid rgba(122, 64, 64, 0.35);
}

.auth-success:not(:empty) {
    display: block;
    background: rgba(74, 124, 104, 0.15);
    color: #7abda0;
    border: 1px solid rgba(74, 124, 104, 0.35);
}

.auth-divider {
    text-align: center;
    color: var(--ae-text-3, #6b7280);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    margin: 1rem 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--ae-border, rgba(255, 255, 255, 0.07));
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-link-btn {
    background: none;
    border: none;
    color: var(--ae-gold, #B8966A);
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    transition: 0.2s;
    padding: 0.5rem 0;
}

.auth-link-btn:hover {
    opacity: 0.8;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--ae-border, rgba(255, 255, 255, 0.07));
}

.auth-footer p {
    font-size: 0.8rem;
    color: var(--ae-text-3, #6b7280);
}

.phone-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.country-code {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ae-border, rgba(255,255,255,0.08));
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    color: var(--ae-text-2, #9ca3af);
}

.phone-input-group input {
    flex: 1;
}

.auth-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 15, 19, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 6000;
}

.auth-loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(184, 150, 106, 0.18);
    border-top-color: var(--ae-gold, #B8966A);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.auth-loading-overlay p {
    margin-top: 1rem;
    color: var(--ae-gold, #B8966A);
    font-weight: 500;
    font-size: 0.88rem;
}

/* ============================================================
   SIGNIN/SIGNUP UI ENHANCEMENTS
   ============================================================ */
.auth-btn-social {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ae-text-1, #EAE6DF);
    border: 1px solid var(--ae-border, rgba(255,255,255,0.1));
    padding: 0.9rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.92rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.auth-btn-social:hover {
    background: rgba(184, 150, 106, 0.08);
    border-color: rgba(184, 150, 106, 0.28);
    transform: translateY(-1px);
}

.auth-link {
    color: var(--ae-gold, #B8966A);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.auth-link:hover {
    opacity: 0.75;
    text-decoration: underline;
}

.auth-security-badge {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ae-border, rgba(255, 255, 255, 0.07));
    text-align: center;
    font-size: 0.72rem;
    color: var(--ae-text-4, rgba(255, 255, 255, 0.35));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.form-group.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.form-group.checkbox input[type="checkbox"] {
    width: auto;
    height: auto;
    margin: 0;
    cursor: pointer;
    accent-color: var(--ae-gold, #B8966A);
}

.form-group.checkbox label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

.otp-box:focus {
    border-color: var(--ae-gold, #B8966A) !important;
    box-shadow: 0 0 0 3px rgba(184, 150, 106, 0.15) !important;
}

.otp-box:not(:placeholder-shown) {
    border-color: rgba(184, 150, 106, 0.45);
    color: var(--ae-gold, #B8966A);
}

/* ============================================================
   RESPONSIVE AUTH MODAL
   ============================================================ */
@media (max-width: 768px) {
    .fixed-header {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .fixed-header .logo {
        font-size: 1rem;
        flex: 1;
    }

    .nav-links-centered {
        display: none;
    }

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

    .dashboard-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .sidebar {
        /* Slide-in panel — grid layout removed; Tailwind handles mobile responsiveness */
        display: flex;
        flex-direction: column;
        height: 100dvh;
        max-height: none;
        padding: 0;
        border-right: none;
    }

    .sidebar-header {
        display: none;
    }

    .user-stats {
        display: none;
    }

    .side-nav {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        margin-top: 0;
        padding-top: 0;
    }

    .nav-item {
        padding: 0.5rem 0.3rem;
        font-size: 0.65rem;
        flex-direction: column;
        gap: 0.3rem;
        text-align: center;
    }

    .nav-item i {
        width: auto;
        font-size: 1rem;
    }

    .main-content {
        padding: 1rem 0.75rem;
        padding-bottom: 60px;
    }

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

    .signal-card {
        padding: 0.75rem;
    }

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

    .hero-content {
        padding: 1.5rem 1rem;
        border-radius: 24px;
    }

    .gradient-text {
        font-size: 1.8rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .feature-section,
    .plans-section {
        padding: 40px 4%;
    }

    .auth-modal-container {
        max-width: calc(100% - 2rem);
        padding: 1.5rem 1rem;
        border-radius: 24px;
    }

    .auth-header h2 {
        font-size: 1.3rem;
    }

    .auth-modal-close {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ULTRA-MOBILE – SMALL PHONES (320px - 480px) */
@media (max-width: 480px) {
    .fixed-header {
        padding: 0.4rem 0.5rem;
    }

    .fixed-header .logo {
        font-size: 0.9rem;
    }

    .sidebar {
        /* Slide-in panel — grid overrides removed */
        grid-template-columns: none;
        padding: 0;
        max-height: none;
    }

    .nav-item {
        padding: 0.3rem 0.2rem;
        font-size: 0.55rem;
        gap: 0.2rem;
    }

    .nav-item i {
        font-size: 0.9rem;
    }

    .main-content {
        padding: 0.75rem 0.5rem;
    }

    .signal-card {
        padding: 0.6rem;
        border-radius: 16px;
    }

    .symbol {
        font-size: 0.85rem;
    }

    .gradient-text {
        font-size: 1.4rem;
    }

    .stat-number {
        font-size: 1rem;
    }

    .feature-section,
    .plans-section {
        padding: 30px 3%;
    }

    .auth-modal-container {
        padding: 1rem 0.75rem;
        border-radius: 20px;
    }

    .auth-btn-primary,
    .auth-btn-secondary {
        padding: 0.85rem;
        font-size: 0.9rem;
    }

    .form-group label {
        font-size: 0.75rem;
    }

    .form-group input {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

/* TABLET – LANDSCAPE (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 200px 1fr;
    }

    .sidebar {
        padding: 1.2rem 0.8rem;
    }

    .nav-item {
        padding: 0.6rem;
        font-size: 0.75rem;
    }

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

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

    .main-content {
        padding: 1.5rem;
    }
}

/* MODAL-OPEN STATE */
body.modal-open {
    overflow: hidden;
}

/* MATH PAGE */
.static-container.math-article {
    max-width: 1000px;
    margin: 6rem auto 3rem;
    padding: 2rem;
}

.math-block {
    background: rgba(15, 17, 21, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 28px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.math-block:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 12px 28px -8px rgba(0, 242, 255, 0.15);
    transform: translateY(-2px);
}

.math-block h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-cyan);
    border-left: 3px solid var(--primary-cyan);
    padding-left: 1rem;
}

.math-legend {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}

.math-legend li {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-dim);
    border-left: 2px solid var(--primary-cyan);
}

.danger-text {
    color: var(--danger-red);
    font-weight: 700;
    background: rgba(255, 0, 85, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .static-container.math-article {
        margin-top: 5rem;
        padding: 1rem;
    }

    .math-block {
        padding: 1.2rem;
    }
}

/* Signal History Table */
.signal-history-table th,
.signal-history-table td {
    padding: 12px;
    text-align: left;
}

.signal-history-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Paper Trading Styles */
.paper-trade-active {
    border-color: var(--primary-cyan) !important;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3) !important;
}

.paper-trade-pnl-positive {
    color: var(--success-green);
}

.paper-trade-pnl-negative {
    color: var(--danger-red);
}

/* Mobile Optimizations */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .alpha-modal,
    .confirmation-modal,
    #paperTradeModal {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }

    .tf-btn {
        min-height: 44px;
        padding: 8px 12px;
    }

    .nav-room {
        min-height: 60px;
        padding: 16px;
    }
}

/* Touch targets for mobile */
@media (max-width: 768px) {

    button,
    .nav-room,
    .tf-btn,
    .signal-card {
        min-height: 44px;
    }

    .signal-card {
        padding: 20px;
    }
}

/* ── Cockpit / Signal cockpit mobile fixes ── */

/* Signal card: prevent the card itself overflowing its grid cell */
.signal-card {
    min-width: 0;
    box-sizing: border-box;
    width: 100%;
}

/* Signal header: allow wrapping on narrow screens so the right badges
   don't push the card wider than the viewport */
@media (max-width: 640px) {
    .signal-header {
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    /* Left group (symbol + direction badge) stays left, takes available space */
    .signal-header > div:first-child {
        flex: 1 1 auto;
        min-width: 0;
    }
    /* Right group (Logic btn + price + BUY/SELL badge) shrinks if needed */
    .signal-header > div:last-child {
        flex-shrink: 1;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    /* Hide the live-price display on very narrow phones to save space */
    .signal-header .price-container {
        display: none;
    }
    /* Entry / SL / TP row (col-span-2 price row): stack vertically on mobile
       so long crypto prices like BTC don't overflow the card width */
    .signal-meta [class*="col-span-2"] {
        flex-direction: column;
        gap: 0.2rem;
        align-items: flex-start;
    }
}

/* Room header controls row: wrap strategy-matchmaker + timeframe-selector
   so they don't push past the viewport edge on phones */
@media (max-width: 768px) {
    /* The inner flex container holding the select + timeframe buttons */
    .room-header-row > div:last-child,
    .room-header-row > .flex {
        flex-wrap: wrap;
        width: 100%;
        gap: 0.5rem;
    }
    /* Strategy matchmaker select: full width on mobile */
    #strategy-matchmaker {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }
    /* Timeframe selector: scrollable, full width on mobile */
    #timeframe-selector {
        flex: 1 1 100%;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Flow-strip guide steps: 2 per row on mobile (min-width is already 140px so this works) */
    .flow-step-title {
        white-space: normal;
    }
}

.disclosure-sidebar {
    background: rgba(15, 17, 21, 0.75);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 242, 255, 0.15);
}

.disclosure-sidebar h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--primary-cyan);
}

.disclosure-sidebar ul {
    list-style: none;
    padding: 0;
}

.disclosure-sidebar li {
    margin-bottom: 0.8rem;
}

.disclosure-sidebar a {
    color: var(--dim);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.disclosure-sidebar a:hover {
    color: var(--primary-cyan);
}

/* ============================================
   SOVEREIGN AUTH MODAL – Glass-Unit, Terminal Feel
   ============================================ */

/* Modal container – OLED black, glass, gradient border */
.modal-card {
    max-width: 520px;
    width: 90%;
    padding: 2rem;
    background: #050505;
    backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
}

.modal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.3), rgba(0, 242, 255, 0), rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.modal-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background: radial-gradient(ellipse at center, rgba(0, 242, 255, 0.4) 0%, transparent 80%);
    pointer-events: none;
}

/* Tabs – thicker 3px active line with cyan shadow */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.auth-tab {
    background: none;
    border: none;
    padding: 0.6rem 1.2rem;
    color: var(--dim, #94a3b8);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border 0.2s;
}

.auth-tab.active {
    color: var(--primary-cyan, #00f2ff);
    border-bottom: 3px solid var(--primary-cyan, #00f2ff);
    text-shadow: 0 0 4px rgba(0, 242, 255, 0.2);
}

/* Panels */
.auth-panel {
    display: none;
    margin: 1.2rem 0;
}

.auth-panel.active {
    display: block;
}

/* Social Providers – glass border, cyan glow on hover */
.auth-provider-btn {
    width: 100%;
    padding: 0.8rem;
    margin: 0.6rem 0;
    border-radius: 48px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-provider-btn i {
    font-size: 1.1rem;
}

.auth-provider-btn:hover {
    border-color: var(--primary-cyan, #00f2ff);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.2);
    background: rgba(0, 242, 255, 0.05);
    transform: translateY(-1px);
}

.auth-provider-btn.google:hover,
.auth-provider-btn.microsoft:hover,
.auth-provider-btn.apple:hover {
    background: rgba(0, 242, 255, 0.05);
    border-color: var(--primary-cyan, #00f2ff);
}

/* Form inputs – terminal monospace, 12px radius */
.auth-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: white;
    margin: 0.6rem 0;
    font-size: 0.95rem;
    font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-cyan, #00f2ff);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 0 3px rgba(0, 242, 255, 0.1);
}

/* Primary action button – Cyan Glow with outer glow on hover */
.auth-submit-btn {
    width: 100%;
    background: var(--primary-cyan, #00f2ff);
    border: none;
    padding: 0.8rem;
    border-radius: 48px;
    font-weight: 800;
    font-size: 1rem;
    color: #050505;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-submit-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.01);
    box-shadow: 0 0 16px var(--primary-cyan, #00f2ff);
}

.auth-secondary-btn {
    width: 100%;
    background: rgba(44, 60, 92, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem;
    border-radius: 48px;
    font-weight: 600;
    color: white;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-secondary-btn:hover {
    background: #2c3e5c;
    border-color: rgba(0, 242, 255, 0.3);
}

/* Link / switch text */
.auth-switch {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
}

.auth-switch a {
    color: var(--primary-cyan, #00f2ff);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

/* Email sub-tabs – 3px underline */
.email-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.email-tab {
    background: none;
    border: none;
    color: var(--dim, #94a3b8);
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.email-tab.active {
    color: var(--primary-cyan, #00f2ff);
    border-bottom: 3px solid var(--primary-cyan, #00f2ff);
    text-shadow: 0 0 4px rgba(0, 242, 255, 0.2);
}

.email-mode {
    display: none;
}

.email-mode.active {
    display: block;
}

/* ========== PHONE TAB – PROFESSIONAL LAYOUT ========== */
.phone-step {
    display: flex;
    flex-direction: column;
}

.phone-input-wrapper {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    width: 100%;
}

.phone-country {
    flex: 0 0 100px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.8rem;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.phone-country:focus {
    outline: none;
    border-color: var(--primary-cyan, #00f2ff);
}

#phoneNumber {
    flex: 1;
}

#sendOtpBtn {
    width: 100%;
    margin-top: 0.8rem;
}

#backPhoneBtn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Error & info messages */
.error-message {
    color: #ff5252;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    text-align: center;
}

.info-note {
    font-size: 0.75rem;
    color: var(--dim);
    margin-top: 0.8rem;
    text-align: center;
}

.terms-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 1rem 0;
    font-size: 0.7rem;
    color: var(--dim);
}

.terms-check input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.terms-check a {
    color: var(--primary-cyan);
    text-decoration: none;
}

/* Security badge – small, uppercase, security-first */
.security-badge {
    margin-top: 1.8rem;
    text-align: center;
    font-size: 0.65rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.security-badge i {
    font-size: 0.7rem;
    color: var(--primary-cyan);
}

/* Responsive */
@media (max-width: 768px) {
    .phone-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .phone-country {
        flex: auto;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .auth-tabs {
        justify-content: center;
    }

    .auth-tab {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .modal-card {
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* LISTED SIGNALS SIDEBAR */
.sidebar-signal-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-signal-btn:hover:not(:disabled) {
    background: rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.3);
    color: var(--text-white);
    transform: translateX(2px);
}

.sidebar-signal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.sidebar-signal-btn .status {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-signal-btn .status.active {
    background: rgba(0, 242, 255, 0.2);
    color: var(--primary-cyan);
}

.sidebar-signal-btn .status.expired {
    background: rgba(255, 0, 85, 0.2);
    color: var(--danger-red);
}

/* CUSTOM SCROLLBAR FOR SIDEBAR LIST */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(184, 150, 106, 0.45);
    border-radius: 4px;
}

/* ============================================================
   MOBILE RESPONSIVE OVERRIDES
   ============================================================ */

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    color: var(--text-white);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    body.dashboard-body {
        overflow-y: auto;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Touch Optimization */
    .nav-item,
    .alpha-toggle,
    .sidebar-input {
        min-height: 44px;
        padding: 0.8rem 1.2rem;
        display: flex;
        align-items: center;
    }
    
    .alpha-toggle {
        justify-content: center;
    }
}

/* ============================================================
   CONFLUENCE SCORECARD
   ============================================================ */
.confluence-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.confluence-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, #00f2ff, #0055ff);
    border-radius: 2px;
    transition: width 0.5s ease-out;
}

.slide-down-container {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
}

.slide-down-container.open {
    grid-template-rows: 1fr;
}

.slide-down-content {
    overflow: hidden;
}

.premium-lock-blur {
    position: relative;
}

.premium-lock-blur::after {
    content: "PRO FEATURE LOCKED";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ffd700;
    font-size: 1.2rem;
    z-index: 10;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.premium-lock-blur.locked::after {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================================
   SOVEREIGN DETAIL MODAL & WIN-RATE BADGES
   ============================================================ */

.win-rate-badge {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
}

.win-rate-badge.win-rate-high {
    color: #00ff88;
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.2);
}

.win-rate-badge.win-rate-medium {
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
}

#tokenDetailModal .modal-card {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 242, 255, 0.1);
    max-width: 500px;
    width: 90%;
    padding: 1.5rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.tier-locked-overlay {
    position: relative;
}

.tier-locked-overlay::after {
    content: "PRO ACCESS REQUIRED";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ff8c00;
    font-size: 1.2rem;
    z-index: 10;
    border-radius: inherit;
    pointer-events: auto;
}

/* ============================================================
   FEATURE PANELS (fp-confluence, fp-zones, fp-expectancy, etc.)
   ============================================================ */

/* Top-level panel wrappers — always full-screen overlays */
#fp-confluence,
#fp-zones,
#fp-expectancy,
#fp-shap,
#fp-api {
    display: none;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 400;
    background: #050505;
    overflow: hidden;
}

/* ID+class compound selector (specificity 1-1-0) beats the ID-only rule above (1-0-0),
   allowing Tailwind's .flex class to correctly override display:none when panels are shown */
#fp-confluence.flex,
#fp-zones.flex,
#fp-expectancy.flex,
#fp-shap.flex,
#fp-api.flex {
    display: flex;
}

/* Body scroll containers — must never receive 'hidden' */
#fp-confluence-body,
#fp-zones-body,
#fp-expectancy-body,
#fp-shap-body,
#fp-api-body {
    flex: 1 1 0%;
    overflow-y: auto;
    display: block !important;   /* override any stale Tailwind hidden */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 150, 106, 0.4) transparent;
}

#fp-confluence-body::-webkit-scrollbar,
#fp-zones-body::-webkit-scrollbar,
#fp-expectancy-body::-webkit-scrollbar,
#fp-shap-body::-webkit-scrollbar,
#fp-api-body::-webkit-scrollbar {
    width: 4px;
}

#fp-confluence-body::-webkit-scrollbar-track,
#fp-zones-body::-webkit-scrollbar-track,
#fp-expectancy-body::-webkit-scrollbar-track,
#fp-shap-body::-webkit-scrollbar-track,
#fp-api-body::-webkit-scrollbar-track {
    background: transparent;
}

#fp-confluence-body::-webkit-scrollbar-thumb,
#fp-zones-body::-webkit-scrollbar-thumb,
#fp-expectancy-body::-webkit-scrollbar-thumb,
#fp-shap-body::-webkit-scrollbar-thumb,
#fp-api-body::-webkit-scrollbar-thumb {
    background: rgba(184, 150, 106, 0.4);
    border-radius: 2px;
}

/* Zone tracking — animated glowing price dot */
@keyframes fp-zone-pulse {
    0%, 100% { box-shadow: 0 0 8px 2px rgba(52, 211, 153, 0.8); }
    50%       { box-shadow: 0 0 18px 6px rgba(52, 211, 153, 0.5); }
}

#fp-zone-dot {
    animation: fp-zone-pulse 2s ease-in-out infinite;
    transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Confluence progress bars — smooth fill transition */
.fp-progress-bar {
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* SHAP bars */
.fp-shap-bar {
    transition: width 0.6s ease-out;
}

/* Probability conviction meter segments */
.fp-prob-segment {
    transition: width 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Entry anchor glow line */
.fp-entry-line {
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.8), 0 0 2px rgba(0, 242, 255, 1);
}

/* Scrollbar for sd-feature-nav quick-nav */
#sd-feature-nav {
    scrollbar-width: none;
}
#sd-feature-nav::-webkit-scrollbar {
    display: none;
}

/* ============================================================
   NAV UPGRADE v2 — Professional buttons + mobile hamburger
   ============================================================ */

/* Hamburger toggle */
.nav-hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.nav-hamburger-btn:hover {
    background: rgba(0,242,255,0.1);
    border-color: rgba(0,242,255,0.35);
    color: #00f2ff;
}

/* Auth nav buttons */
.nav-btn-login {
    background: rgba(0,242,255,0.08);
    border: 1px solid rgba(0,242,255,0.35);
    border-radius: 40px;
    padding: 0.45rem 1.1rem;
    color: #00f2ff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    min-height: 36px;
    text-decoration: none;
}
.nav-btn-login:hover {
    background: rgba(0,242,255,0.16);
    border-color: rgba(0,242,255,0.65);
    box-shadow: 0 0 14px rgba(0,242,255,0.22);
}

.nav-btn-cta {
    background: linear-gradient(135deg, #00f2ff, #0099aa);
    border: none;
    border-radius: 40px;
    padding: 0.45rem 1.25rem;
    color: #020e10;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 0 14px rgba(0,242,255,0.18);
    min-height: 36px;
    text-decoration: none;
}
.nav-btn-cta:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 26px rgba(0,242,255,0.38);
    transform: translateY(-1px);
}

.nav-btn-dashboard {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 40px;
    padding: 0.45rem 1.1rem;
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    min-height: 36px;
}
.nav-btn-dashboard:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(0,242,255,0.28);
}

.nav-btn-signout {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 40px;
    padding: 0.45rem 1.1rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    min-height: 36px;
}
.nav-btn-signout:hover {
    background: rgba(255,0,85,0.08);
    border-color: rgba(255,0,85,0.32);
    color: #ff6688;
}

/* Mobile drawer */
.nav-mobile-drawer {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(5,5,5,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0,242,255,0.1);
    z-index: 999;
    padding: 0.75rem 1rem 1.25rem;
    flex-direction: column;
    gap: 0.15rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
}
.nav-mobile-drawer.open {
    display: flex;
}
.nav-mobile-link {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.15s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    background: transparent;
    border: none;
}
.nav-mobile-link:hover, .nav-mobile-link.mobile-active {
    background: rgba(0,242,255,0.07);
    color: #00f2ff;
}
.nav-mobile-auth {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.nav-mobile-auth .nav-btn-login,
.nav-mobile-auth .nav-btn-cta,
.nav-mobile-auth .nav-btn-dashboard,
.nav-mobile-auth .nav-btn-signout {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
    padding: 0.75rem;
    font-size: 0.9rem;
    min-height: 46px;
}

/* Hide desktop auth group + links on small screens; show hamburger */
@media (max-width: 768px) {
    .nav-hamburger-btn { display: flex; }
    .nav-auth-desktop { display: none !important; }
    .nav-links-centered { display: none !important; }
}

/* Tablet: tighten spacing */
@media (min-width: 769px) and (max-width: 1023px) {
    .fixed-header { padding: 0.65rem 1.25rem; }
    .nav-links-centered { gap: 1.25rem; }
    .nav-btn-login, .nav-btn-cta, .nav-btn-dashboard, .nav-btn-signout {
        padding: 0.4rem 0.9rem;
        font-size: 0.78rem;
    }
}

/* Touch targets: ensure all interactive items ≥44px on mobile */
@media (max-width: 768px) {
    .nav-mobile-link { min-height: 44px; }
    .nav-hamburger-btn { min-height: 44px; min-width: 44px; }
}

/* Subscription expired — fully hides background content so signals never bleed
   through the full-screen overlay. pointer-events:none prevents interaction. */
#dashboard-main-content.sub-expired {
    pointer-events: none;
    opacity: 0;
    user-select: none;
}

/* ============================================================
   SCREEN MODE THEMES
   ============================================================ */

/* Dark (OLED black) — inherits :root defaults */
[data-theme="dark"] {
    color-scheme: dark;
}

/* Grey (mid-tone — between dark and light) */
[data-theme="grey"] {
    color-scheme: dark;
    --bg-deep:    #2a2d35;
    --bg-void:    #32363f;
    --glass-bg:   rgba(48, 52, 64, 0.90);
    --glass-border: rgba(0, 242, 255, 0.12);
    --text-white: #dde2ea;
    --text-dim:   #8a96a8;

    /* aegis-redesign tokens shifted to mid-grey surfaces */
    --ae-void:          #22252d;
    --ae-base:          #2a2d35;
    --ae-surface:       #32363f;
    --ae-raised:        #3b3f4a;
    --ae-overlay:       #454a56;
    --ae-border-dim:    rgba(255,255,255,0.05);
    --ae-border:        rgba(255,255,255,0.09);
    --ae-border-mid:    rgba(255,255,255,0.14);
    --ae-border-bright: rgba(255,255,255,0.22);
    --ae-text-1:  #dde2ea;
    --ae-text-2:  #8a96a8;
    --ae-text-3:  #5e6878;
    --ae-text-4:  #3e4656;
}

[data-theme="grey"] body,
[data-theme="grey"] body.dashboard-body {
    background: var(--bg-deep) !important;
    background-image: radial-gradient(circle at 15% 30%, rgba(0, 242, 255, 0.03) 0%, var(--bg-void) 100%) !important;
    background-attachment: fixed;
}

/* Override Tailwind's hardcoded bg-deep / bg-void colors for grey theme */
[data-theme="grey"] .bg-deep,
[data-theme="grey"] .bg-deep\/95  { background-color: #2a2d35 !important; }
[data-theme="grey"] .bg-void,
[data-theme="grey"] .bg-void\/90,
[data-theme="grey"] .bg-void\/95  { background-color: #32363f !important; }

/* Light */
[data-theme="light"] {
    color-scheme: light;
    --bg-deep: #eef2f7;
    --bg-void: #dde4ee;
    --glass-bg: rgba(255, 255, 255, 0.74);
    --glass-border: rgba(0, 160, 190, 0.28);
    --text-white: #0f172a;
    --text-dim: #4a5568;
    --primary-cyan: #0099bb;
    --neon-blue: #0099bb;
    --glow-cyan: 0 0 12px rgba(0, 153, 187, 0.22);
    --success-green: #007a44;
    --danger-red: #cc0033;
    --hold-grey: #64748b;

    /* aegis-redesign.css surface tokens */
    --ae-void:           #eef2f7;
    --ae-base:           #e8edf4;
    --ae-surface:        #dde4ee;
    --ae-raised:         #f4f6fa;
    --ae-overlay:        #ffffff;
    --ae-border-dim:     rgba(0,0,0,0.05);
    --ae-border:         rgba(0,0,0,0.09);
    --ae-border-mid:     rgba(0,0,0,0.14);
    --ae-border-bright:  rgba(0,0,0,0.22);
    --ae-text-1:         #0f172a;
    --ae-text-2:         #475569;
    --ae-text-3:         #64748b;
    --ae-text-4:         #94a3b8;
    --ae-gold:           #a07030;
    --ae-gold-dim:       rgba(160,112,48,0.10);
    --ae-gold-mid:       rgba(160,112,48,0.22);
}

[data-theme="light"] body,
[data-theme="light"] body.dashboard-body {
    background: var(--bg-deep) !important;
    background-image: radial-gradient(circle at 15% 30%, rgba(0, 153, 187, 0.07) 0%, var(--bg-void) 100%) !important;
    background-attachment: fixed;
    color: var(--text-white);
}

/* Override Tailwind's hardcoded bg-deep / bg-void colors for light theme */
[data-theme="light"] .bg-deep,
[data-theme="light"] .bg-deep\/95  { background-color: #eef2f7 !important; }
[data-theme="light"] .bg-void,
[data-theme="light"] .bg-void\/90,
[data-theme="light"] .bg-void\/95  { background-color: #dde4ee !important; }

/* Header */
[data-theme="light"] header.glass-panel {
    background: rgba(238, 242, 247, 0.92) !important;
    border-bottom-color: rgba(0, 153, 187, 0.2) !important;
}

/* Sidebar Tailwind bg-deep/95 override */
[data-theme="light"] aside.sidebar,
[data-theme="light"] .bg-deep\/95 {
    background-color: rgba(238, 242, 247, 0.95) !important;
}

/* Panel overlays — all bg-black/* variants */
[data-theme="light"] .bg-black\/20,
[data-theme="light"] .bg-black\/30,
[data-theme="light"] .bg-black\/40,
[data-theme="light"] .bg-black\/50,
[data-theme="light"] .bg-black\/60,
[data-theme="light"] .bg-black\/80,
[data-theme="light"] .bg-black\/95 {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* White transparency backgrounds → subtle ink tint */
[data-theme="light"] .bg-white\/5  { background-color: rgba(0, 0, 0, 0.03) !important; }
[data-theme="light"] .bg-white\/10 { background-color: rgba(0, 0, 0, 0.06) !important; }
[data-theme="light"] .bg-white\/20 { background-color: rgba(0, 0, 0, 0.10) !important; }

/* bg-void variants */
[data-theme="light"] .bg-void\/95,
[data-theme="light"] .bg-void\/90,
[data-theme="light"] .bg-void { background-color: var(--bg-void) !important; }

/* Hardcoded dark gray backgrounds */
[data-theme="light"] .bg-gray-700,
[data-theme="light"] .bg-gray-800,
[data-theme="light"] .bg-gray-900,
[data-theme="light"] .bg-slate-800,
[data-theme="light"] .bg-slate-900 { background-color: rgba(0, 0, 0, 0.06) !important; }

[data-theme="light"] .bg-gray-500 { background-color: rgba(0, 0, 0, 0.10) !important; }

/* Arbitrary dark hex backgrounds */
[data-theme="light"] .bg-\[\#050505\],
[data-theme="light"] .bg-\[\#0d1117\],
[data-theme="light"] .bg-\[\#0a0e14\],
[data-theme="light"] .bg-\[\#0c1018\] { background-color: rgba(0, 0, 0, 0.04) !important; }

/* Borders */
[data-theme="light"] .border-white\/5  { border-color: rgba(0, 0, 0, 0.07) !important; }
[data-theme="light"] .border-white\/10 { border-color: rgba(0, 0, 0, 0.10) !important; }
[data-theme="light"] .border-white\/20 { border-color: rgba(0, 0, 0, 0.16) !important; }
[data-theme="light"] .border-gray-500,
[data-theme="light"] .border-gray-700,
[data-theme="light"] .border-gray-800  { border-color: rgba(0, 0, 0, 0.14) !important; }

/* Tailwind text overrides */
[data-theme="light"] .text-white       { color: #0f172a !important; }
[data-theme="light"] .text-gray-200    { color: #1e293b !important; }
[data-theme="light"] .text-gray-300    { color: #334155 !important; }
[data-theme="light"] .text-gray-400    { color: #4a5568 !important; }
[data-theme="light"] .text-gray-500    { color: #64748b !important; }
[data-theme="light"] .text-gray-600    { color: #64748b !important; }

/* Glass panel cards — use light surface */
[data-theme="light"] .glass-panel {
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(0, 153, 187, 0.18) !important;
}

/* Table rows and dividers */
[data-theme="light"] .divide-white\/5 > * + * { border-color: rgba(0, 0, 0, 0.07) !important; }

/* Input fields inside panels */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.14) !important;
    color: #0f172a !important;
}

/* Logo gradient stays legible */
[data-theme="light"] .logo {
    background: linear-gradient(135deg, #0f172a, var(--primary-cyan));
    -webkit-background-clip: text;
    background-clip: text;
}

/* Sidebar inputs */
[data-theme="light"] .sidebar-input {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.14);
    color: #0f172a;
}

/* Screen mode button token */
[data-theme="light"] .user-stats {
    background: rgba(255, 255, 255, 0.45);
}

/* Connection status pill */
[data-theme="light"] .connection-status {
    background: rgba(238, 242, 247, 0.8);
}

/* ── Deep-golden accents (light theme) ─────────────────────────
   Elements that stayed black in light mode are restyled as deep
   golden surfaces (cream text on rich gold) or deep golden text:
   token search bar, signal-card symbol/price, AI confidence bar,
   confluence bars, macro + S/R telemetry strips, Guardian FAB,
   and the onboarding (login) modal. */

/* Token search bar */
[data-theme="light"] .token-search-inner {
    background: linear-gradient(135deg, #7a591b 0%, #8f6a22 100%) !important;
    border-color: rgba(122, 89, 27, 0.55) !important;
}
[data-theme="light"] .token-search-inner input { color: #f6ecd4 !important; }
[data-theme="light"] .token-search-inner input::placeholder { color: rgba(246, 236, 212, 0.55); }
[data-theme="light"] .token-search-icon { color: rgba(246, 236, 212, 0.75); }
[data-theme="light"] .token-search-inner:focus-within {
    border-color: #b8966a;
    box-shadow: 0 0 0 3px rgba(160, 112, 48, 0.15), 0 0 18px rgba(160, 112, 48, 0.12);
}
[data-theme="light"] .token-search-inner:focus-within .token-search-icon { color: #f6ecd4; }
[data-theme="light"] #token-search-clear { color: rgba(246, 236, 212, 0.7); }

/* Signal-card token name + live price */
[data-theme="light"] .signal-card .signal-symbol { color: #7a5518 !important; }
[data-theme="light"] .signal-card .price-container .live-price { color: #7a5518 !important; }

/* AI confidence bar + label */
[data-theme="light"] .signal-card .signal-confidence { color: #7a5518; }
[data-theme="light"] .signal-card .confidence-bar {
    background: rgba(122, 85, 24, 0.18) !important;
}
[data-theme="light"] .signal-card .confidence-fill {
    background: linear-gradient(90deg, #8f6a22, #7a5518) !important;
}

/* Confluence scorecard bars (Logic dropdown) */
[data-theme="light"] .confluence-bar { background: rgba(122, 85, 24, 0.15); }
[data-theme="light"] .confluence-bar .fill {
    background: linear-gradient(90deg, #b8966a, #7a5518);
}

/* Macro regime strip + S/R telemetry box (dark slate → deep gold) */
[data-theme="light"] .signal-card .bg-slate-900\/80,
[data-theme="light"] .signal-card .bg-slate-950\/70 {
    background: linear-gradient(135deg, #7a591b 0%, #8f6a22 100%) !important;
    border-color: rgba(122, 89, 27, 0.5) !important;
    color: #f6ecd4 !important;
}
[data-theme="light"] .signal-card .bg-slate-900\/80 .text-slate-200,
[data-theme="light"] .signal-card .bg-slate-950\/70 .text-slate-400 { color: #f6ecd4 !important; }
[data-theme="light"] .signal-card .bg-slate-950\/70 .text-slate-500 { color: rgba(246, 236, 212, 0.7) !important; }

/* Guardian FAB */
[data-theme="light"] #guardian-fab {
    background: linear-gradient(135deg, #7a591b 0%, #8f6a22 100%);
    border-color: rgba(122, 89, 27, 0.6);
    color: #f6ecd4;
    box-shadow: 0 4px 24px rgba(122, 89, 27, 0.35), 0 0 0 1px rgba(184, 150, 106, 0.15);
}
[data-theme="light"] #guardian-fab:hover {
    border-color: rgba(184, 150, 106, 0.8);
    box-shadow: 0 4px 28px rgba(122, 89, 27, 0.45), 0 0 18px rgba(160, 112, 48, 0.3);
}
[data-theme="light"] #guardian-fab .gfab-dot {
    background: #f6ecd4;
    box-shadow: 0 0 6px rgba(246, 236, 212, 0.9);
}

/* ── Signal-details modal + fullscreen feature panels ──────────
   These overlays are dark-designed (bg-black/80 backdrop, bg-[#050505]
   fullscreen panels). The generic bg-black softening rules above made
   them nearly TRANSPARENT in light mode — the page bled through and
   the analytics (Confluence / Zones / Expectancy / SHAP) were
   unreadable. Give them solid light surfaces and a real dim backdrop. */
[data-theme="light"] #token-details-modal {
    background: rgba(15, 23, 42, 0.45) !important;
}
[data-theme="light"] #signalDetailsModal {
    background: #f4f6fa !important;
    border-color: rgba(0, 153, 187, 0.35) !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25) !important;
}
[data-theme="light"] #signalDetailsModal .bg-black\/40,
[data-theme="light"] #signalDetailsModal .bg-black\/20 {
    background-color: rgba(15, 23, 42, 0.05) !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
}
[data-theme="light"] #fp-confluence,
[data-theme="light"] #fp-zones,
[data-theme="light"] #fp-expectancy,
[data-theme="light"] #fp-shap,
[data-theme="light"] #fp-api {
    background-color: #eef2f7 !important;
}
[data-theme="light"] #fp-confluence .bg-black\/40,
[data-theme="light"] #fp-zones .bg-black\/40,
[data-theme="light"] #fp-expectancy .bg-black\/40,
[data-theme="light"] #fp-shap .bg-black\/40,
[data-theme="light"] #fp-api .bg-black\/40 {
    background-color: rgba(15, 23, 42, 0.05) !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
}
/* Readable status text inside the light panels */
[data-theme="light"] #signalDetailsModal .text-gray-300,
[data-theme="light"] #fp-confluence .text-gray-300,
[data-theme="light"] #fp-zones .text-gray-300,
[data-theme="light"] #fp-expectancy .text-gray-300,
[data-theme="light"] #fp-shap .text-gray-300,
[data-theme="light"] #fp-api .text-gray-300 { color: #334155 !important; }

/* Onboarding / login modal */
[data-theme="light"] #loginModal .modal-card {
    background: linear-gradient(160deg, #6e4f16 0%, #8a651f 100%);
    border-color: rgba(184, 150, 106, 0.45);
}
[data-theme="light"] #loginModal .modal-card h3 { color: #f6ecd4; }
[data-theme="light"] #loginModal .modal-card p,
[data-theme="light"] #loginModal .modal-card label,
[data-theme="light"] #loginModal .info-note { color: rgba(246, 236, 212, 0.75); }
[data-theme="light"] #loginModal .auth-input,
[data-theme="light"] #loginModal .otp-digit {
    background: rgba(0, 0, 0, 0.28) !important;
    border-color: rgba(246, 236, 212, 0.28) !important;
    color: #f6ecd4 !important;
}
[data-theme="light"] #loginModal .auth-input::placeholder { color: rgba(246, 236, 212, 0.5); }
[data-theme="light"] #loginModal .close-modal { color: rgba(246, 236, 212, 0.7) !important; }

/* ── Screen Mode Button Widget ────────────────────────────── */
.screen-mode-btn {
    cursor: pointer;
    border: none;
    background: transparent;
}

.screen-mode-btn--active {
    background: rgba(0, 242, 255, 0.14);
    color: var(--primary-cyan) !important;
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.18);
    border-radius: 6px;
}

/* ============================================================
   S&R PROXIMITY ALERT TOASTS
   ============================================================ */
#sr-alert-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 320px;
}

.sr-toast-item {
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    opacity: 1;
    transition: opacity 0.4s ease;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    animation: srToastIn 0.3s ease;
}

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

.sr-toast-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.sr-toast-detail {
    font-size: 0.7rem;
    color: #64748b;
    padding-left: 1.4rem;
}

/* ============================================================
   AEGIS ONBOARDING WIZARD
   Custom scrollbar + slide-transition animation classes.
   ob-exit-left / ob-exit-right / ob-enter-left / ob-enter-right
   are applied transiently by the wizard JS controller.
   ============================================================ */

/* Scrollbar inside the step-3 content area */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(22, 26, 32, 0.4);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.2);
    border-radius: 2px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 211, 153, 0.4);
}

/* Slide animation helpers — use !important to beat Tailwind
   translate-x-* utilities that may still be in the class list
   during the brief transition window. */
.ob-exit-left {
    transform: translateX(-100%) !important;
    opacity: 0 !important;
    pointer-events: none;
}
.ob-exit-right {
    transform: translateX(100%) !important;
    opacity: 0 !important;
    pointer-events: none;
}
.ob-enter-left {
    transform: translateX(-100%) !important;
    opacity: 0 !important;
}
.ob-enter-right {
    transform: translateX(100%) !important;
    opacity: 0 !important;
}

/* ── TOKEN SEARCH BAR ───────────────────────────────────────── */
.token-search-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 0 2px;
}

/* Background/border live on the wrapper so Tailwind preflight can't reset them */
.token-search-inner {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(6, 14, 26, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.token-search-inner:focus-within {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px rgba(0, 242, 255, 0.07), 0 0 18px rgba(0, 242, 255, 0.10);
}

.token-search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-dim);
    font-size: 13px;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s;
}

.token-search-inner:focus-within .token-search-icon {
    color: var(--primary-cyan);
}

/* Input is transparent — wrapper provides the visual box */
.token-search-inner input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 12px;
    padding: 10px 40px 10px 40px;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.03em;
    outline: none !important;
    min-height: 42px;
}

.token-search-inner input::placeholder {
    color: rgba(148, 163, 184, 0.40);
    font-size: 12px;
    letter-spacing: 0.04em;
}

#token-search-clear {
    position: absolute;
    right: 11px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 5px;
    font-size: 11px;
    line-height: 1;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

#token-search-clear:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.token-search-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    min-width: 72px;
    text-align: right;
    transition: color 0.2s;
}

.token-search-count.has-query {
    color: var(--primary-cyan);
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
}

