/* ═══════════════════════════════════════════════════════════════════════
   OMNISCOPE AI — Global Intelligence Terminal Theme v2
   Scrollable layout, bigger panels, readable text
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --bg-primary:    #080b12;
    --bg-panel:      #0d1117;
    --bg-header:     #161b22;
    --bg-hover:      #1c2333;
    --bg-input:      #0d1117;

    --border:        #1e2537;
    --border-light:  #30363d;
    --border-active: #58a6ff;

    --text-primary:  #e6edf3;
    --text-secondary:#8b949e;
    --text-muted:    #484f58;
    --text-link:     #58a6ff;

    --green:         #3fb950;
    --green-dim:     rgba(63,185,80,0.15);
    --red:           #f85149;
    --red-dim:       rgba(248,81,73,0.15);
    --yellow:        #d29922;
    --yellow-dim:    rgba(210,153,34,0.15);
    --blue:          #58a6ff;
    --blue-dim:      rgba(88,166,255,0.12);
    --purple:        #bc8cff;

    --font-mono:     'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --gap:           8px;
    --radius:        8px;
    --pad:           14px;
}

/* ── Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ── HEADER ──────────────────────────────────────────────────────────── */
#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    flex-shrink: 0;
}

.header-left { display: flex; align-items: center; gap: 14px; }
.header-right { display: flex; align-items: center; gap: 12px; }

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}
.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px rgba(88,166,255,0.5));
    animation: logo-breathe 3s ease-in-out infinite;
}
.logo-svg {
    width: 32px;
    height: 32px;
}
@keyframes logo-breathe {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(88,166,255,0.4)); }
    50%      { filter: drop-shadow(0 0 14px rgba(88,166,255,0.7)); }
}
@keyframes logo-pulse {
    0%, 100% { text-shadow: 0 0 10px rgba(88,166,255,0.5), 0 0 20px rgba(88,166,255,0.2); }
    50%      { text-shadow: 0 0 16px rgba(88,166,255,0.8), 0 0 32px rgba(88,166,255,0.4); }
}
.logo-text {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 17px;
    color: var(--text-primary);
    letter-spacing: 2.5px;
    background: linear-gradient(135deg, #e6edf3 0%, #58a6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-version {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #58a6ff;
    background: rgba(88,166,255,0.12);
    border: 1px solid rgba(88,166,255,0.25);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 1px;
}

.header-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.live-badge {
    color: var(--green);
    background: var(--green-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}
#model-badge {
    color: var(--purple);
    background: rgba(188,140,255,0.12);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(63,185,80,0.7); }
    50% { opacity: 0.8; box-shadow: 0 0 0 5px rgba(63,185,80,0); }
}

.header-benchmarks {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    justify-content: center;
    overflow: hidden;
}
.benchmark-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 12px;
    white-space: nowrap;
}
.benchmark-name { color: var(--text-secondary); font-weight: 500; }
.benchmark-price { color: var(--text-primary); font-weight: 600; }
.benchmark-change {
    font-weight: 600;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 3px;
}
.benchmark-change.up { color: var(--green); background: var(--green-dim); }
.benchmark-change.down { color: var(--red); background: var(--red-dim); }

/* ── HEADER SELECT DROPDOWNS ──────────────────────────────────────────── */
.header-select {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    max-width: 130px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M0 2l4 4 4-4' fill='%238b949e'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 18px;
}
.header-select:hover {
    border-color: var(--blue);
    color: var(--text-primary);
}
.header-select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px var(--blue-dim);
}
.header-select option {
    background: var(--bg-panel);
    color: var(--text-primary);
}

.header-clock {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-refresh {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 5px;
    transition: all 0.2s;
    line-height: 1;
}
.btn-refresh:hover {
    color: var(--blue);
    border-color: var(--blue);
    background: var(--blue-dim);
}
.btn-refresh.spinning { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── TICKER TAPE ─────────────────────────────────────────────────────── */
.ticker-tape-wrap {
    height: 42px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
    overflow: hidden;
    flex-shrink: 0;
}

/* ── BREAKING NEWS BAR ───────────────────────────────────────────────── */
.breaking-bar {
    display: flex;
    align-items: center;
    height: 32px;
    background: var(--red-dim);
    border-bottom: 1px solid rgba(248,81,73,0.3);
    overflow: hidden;
    flex-shrink: 0;
}
.breaking-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--red);
    padding: 3px 14px;
    letter-spacing: 1.5px;
    flex-shrink: 0;
}
.breaking-track { flex: 1; overflow: hidden; position: relative; }
.breaking-content {
    display: flex;
    gap: 50px;
    white-space: nowrap;
    animation: scroll-left 40s linear infinite;
    font-size: 13px;
    color: var(--text-primary);
    padding-left: 100%;
}
.breaking-content .breaking-item { flex-shrink: 0; }
.breaking-content .breaking-item::before {
    content: '●';
    color: var(--red);
    margin-right: 10px;
}
@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/* ── SCROLLABLE DASHBOARD ────────────────────────────────────────────── */
.dashboard-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--gap);
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

/* ── DASHBOARD ROWS ──────────────────────────────────────────────────── */
.dash-row {
    display: grid;
    gap: var(--gap);
    min-height: 0;
}

/* Row 1: News (2fr) | Signals (1fr) | Sentiment (1fr)  — tall */
.row-hero {
    grid-template-columns: 2fr 1fr 1fr;
    height: 520px;
}

/* Row 2A: Shares | Crypto | Forex — equal columns */
.row-assets-1 {
    grid-template-columns: 1fr 1fr 1fr;
    height: 440px;
}

/* Row 2B: Indices | Commodities | Technicals — equal columns */
.row-assets-2 {
    grid-template-columns: 1fr 1fr 1fr;
    height: 420px;
}

/* Row 2C: All Markets (unified) | Chart — 1:1.5 */
.row-unified {
    grid-template-columns: 1fr 1.5fr;
    height: 480px;
}

/* Asset panel count badge in header */
.panel-shares .badge.count,
.panel-crypto .badge.count,
.panel-forex .badge.count,
.panel-indices .badge.count,
.panel-commodities .badge.count,
.panel-allmarkets .badge.count {
    font-size: 10px;
}

/* All-markets grouped section headers */
.allmarkets-section {
    padding: 6px 12px 2px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-mono);
    border-bottom: 1px solid var(--border);
    background: rgba(88, 166, 255, 0.04);
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Row 3: Movers | Keywords | Alerts — shorter */
.row-stats {
    grid-template-columns: 1fr 1fr 1fr;
    height: 360px;
}

/* Row 4: AI Trade Calls | Paper Portfolio | Trade History */
.row-trading {
    grid-template-columns: 1fr 1fr 1fr;
    height: 480px;
}

/* Row 4B: Strategy Backtester */
.row-backtest {
    grid-template-columns: 320px 1fr;
    height: 580px;
}

/* Row 5: Real Estate — 2 columns */
.row-realestate {
    grid-template-columns: 1.8fr 1fr;
    height: 520px;
}

/* Row 5B: Shortage Predictions — 2 columns */
.row-shortage {
    grid-template-columns: 1.6fr 1fr;
    height: 520px;
}

/* Row 5C: Newspaper Highlights — full width */
.row-newspapers {
    grid-template-columns: 1fr;
    height: 480px;
}

/* Row 6: Live TV — full width */
.row-tv {
    grid-template-columns: 1fr;
    height: 500px;
}

/* Row 7: Calendar | Accuracy | Heatmap — medium */
.row-bottom {
    grid-template-columns: 1fr 1fr 1.5fr;
    height: 420px;
}

/* ── PANEL BASE ──────────────────────────────────────────────────────── */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.panel-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    padding: 8px 14px;
    flex-shrink: 0;
}
.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-header h3 {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.panel-badges { display: flex; gap: 5px; }
.badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.badge.live { color: var(--green); background: var(--green-dim); }
.badge.ai { color: var(--purple); background: rgba(188,140,255,0.12); }
.badge.hot { color: var(--yellow); background: var(--yellow-dim); }
.badge.count { color: var(--blue); background: var(--blue-dim); }
.badge.new { color: var(--green); background: var(--green-dim); }
.badge.breaking { color: #fff; background: var(--red); animation: flash 1s ease-in-out 3; }
@keyframes flash { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Panel tabs */
.panel-tabs {
    display: flex;
    gap: 3px;
    margin-top: 6px;
}
.tab {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.3px;
}
.tab:hover { color: var(--text-secondary); background: var(--bg-hover); }
.tab.active { color: var(--blue); background: var(--blue-dim); }

/* Panel body */
.panel-body {
    flex: 1;
    padding: var(--pad);
    overflow: hidden;
    min-height: 0;
}
.panel-body.scrollable { overflow-y: auto; }
.panel-body.tv-body { padding: 0; }

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}

/* ── NEWS ITEMS ──────────────────────────────────────────────────────── */
.news-item {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.news-item:hover { background: var(--bg-hover); }
.news-item:last-child { border-bottom: none; }
.news-item.breaking {
    background: var(--red-dim);
    border-left: 3px solid var(--red);
}

.news-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.news-sentiment-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}
.news-sentiment-dot.bullish { background: var(--green); }
.news-sentiment-dot.bearish { background: var(--red); }
.news-sentiment-dot.neutral { background: var(--text-muted); }

.news-title {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    font-size: 12px;
}
.news-source { color: var(--blue); font-weight: 500; }
.news-time { color: var(--text-muted); }
.news-time.fresh { color: var(--green); font-weight: 600; }
.news-time.recent { color: var(--yellow); }

.news-keywords {
    display: flex;
    gap: 4px;
    margin-top: 5px;
    flex-wrap: wrap;
}
.news-keyword {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--blue);
    background: var(--blue-dim);
    padding: 1px 6px;
    border-radius: 3px;
}

/* ── SIGNAL CARDS ────────────────────────────────────────────────────── */
.signal-card {
    padding: 12px 14px;
    border-left: 4px solid var(--blue);
    margin-bottom: 8px;
    border-radius: 6px;
    background: var(--bg-header);
    transition: background 0.15s;
}
.signal-card:hover { background: var(--bg-hover); }
.signal-card.critical { border-left-color: var(--red); }
.signal-card.high { border-left-color: var(--yellow); }
.signal-card.medium { border-left-color: var(--blue); }
.signal-card.low { border-left-color: var(--text-muted); }

.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.signal-direction {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.signal-direction.bullish { color: var(--green); background: var(--green-dim); }
.signal-direction.bearish { color: var(--red); background: var(--red-dim); }

.signal-confidence {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
}
.signal-confidence.high { color: var(--green); }
.signal-confidence.medium { color: var(--yellow); }
.signal-confidence.low { color: var(--text-muted); }

.signal-headline {
    font-size: 13px;
    color: var(--text-primary);
    margin-top: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.signal-assets {
    display: flex;
    gap: 5px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.signal-asset {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--yellow);
    background: var(--yellow-dim);
    padding: 1px 6px;
    border-radius: 3px;
}
.signal-meta {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ── SENTIMENT GAUGE ─────────────────────────────────────────────────── */
.sentiment-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
    height: 100%;
}
.sentiment-gauge {
    position: relative;
    width: 200px;
    height: 100px;
    margin-bottom: 12px;
}
.gauge-bg {
    width: 200px;
    height: 100px;
}
.sentiment-value {
    font-family: var(--font-mono);
    font-size: 42px;
    font-weight: 700;
    text-align: center;
}
.sentiment-label {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 4px;
}
.sentiment-breakdown {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    width: 100%;
}
.sentiment-stat { text-align: center; }
.sentiment-stat-value {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
}
.sentiment-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 3px;
}
.sentiment-bar {
    width: 80%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
    display: flex;
}
.sentiment-bar-bull { background: var(--green); height: 100%; transition: width 0.6s; }
.sentiment-bar-neut { background: var(--text-muted); height: 100%; transition: width 0.6s; }
.sentiment-bar-bear { background: var(--red); height: 100%; transition: width 0.6s; }

/* ── PRICE ROWS ──────────────────────────────────────────────────────── */
.price-row {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 13px;
    transition: background 0.15s;
}
.price-row:hover { background: var(--bg-hover); }
.price-row:last-child { border-bottom: none; }

.price-symbol {
    width: 90px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}
.price-name {
    flex: 1;
    color: var(--text-secondary);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 10px;
}
.price-value {
    width: 100px;
    text-align: right;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}
.price-change {
    width: 80px;
    text-align: right;
    font-weight: 600;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
}
.price-change.up { color: var(--green); background: var(--green-dim); }
.price-change.down { color: var(--red); background: var(--red-dim); }
.price-change.flat { color: var(--text-muted); }

/* ── MOVERS ──────────────────────────────────────────────────────────── */
.mover-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 13px;
}
.mover-row:last-child { border-bottom: none; }
.mover-rank {
    color: var(--text-muted);
    font-size: 11px;
    width: 18px;
    text-align: center;
}
.mover-symbol {
    width: 80px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}
.mover-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.mover-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.mover-bar.up { background: var(--green); }
.mover-bar.down { background: var(--red); }
.mover-pct {
    width: 70px;
    text-align: right;
    font-weight: 600;
    font-size: 13px;
}

/* ── KEYWORDS ────────────────────────────────────────────────────────── */
.keyword-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}
.keyword-row:last-child { border-bottom: none; }
.keyword-name {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-primary);
    width: 120px;
    font-weight: 500;
}
.keyword-bar-wrap {
    flex: 1;
    height: 7px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.keyword-bar {
    height: 100%;
    background: var(--blue);
    border-radius: 4px;
    transition: width 0.5s;
}
.keyword-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    width: 30px;
    text-align: right;
    font-weight: 600;
}

/* ── ALERTS ───────────────────────────────────────────────────────────── */
.alert-item {
    padding: 10px 12px;
    border-left: 4px solid var(--blue);
    margin-bottom: 8px;
    border-radius: 6px;
    background: var(--bg-header);
}
.alert-item.critical { border-left-color: var(--red); background: var(--red-dim); }
.alert-item.high { border-left-color: var(--yellow); }
.alert-item.medium { border-left-color: var(--blue); }
.alert-item.low { border-left-color: var(--text-muted); }

.alert-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.alert-msg {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
}
.alert-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* ── ACCURACY STATS ──────────────────────────────────────────────────── */
.accuracy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 8px 0;
}
.accuracy-card {
    background: var(--bg-header);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
}
.accuracy-value {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 700;
}
.accuracy-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

/* ── TV CONTAINER ────────────────────────────────────────────────────── */
.tv-container {
    width: 100%;
    height: 100%;
    position: relative;
}
.tv-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── FOOTER STATUS BAR ───────────────────────────────────────────────── */
#footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 28px;
    padding: 0 16px;
    background: var(--bg-header);
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.footer-left, .footer-center, .footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-center { gap: 10px; }
.footer-item b { color: var(--text-secondary); font-weight: 600; }
.footer-sep { color: var(--border); }

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .row-hero,
    .row-assets-1,
    .row-assets-2,
    .row-unified,
    .row-stats,
    .row-trading,
    .row-realestate,
    .row-shortage,
    .row-newspapers,
    .row-bottom {
        grid-template-columns: 1fr 1fr;
        height: auto;
    }
    .row-tv {
        height: 400px;
    }
    .row-hero .panel-news { grid-column: 1 / -1; min-height: 400px; }
    .row-unified .panel-chart { grid-column: 1 / -1; min-height: 400px; }
    .row-bottom .panel-heatmap { grid-column: 1 / -1; min-height: 350px; }
    .header-benchmarks { display: none; }
}

@media (max-width: 768px) {
    .row-hero,
    .row-assets-1,
    .row-assets-2,
    .row-unified,
    .row-stats,
    .row-trading,
    .row-bottom {
        grid-template-columns: 1fr;
    }
    .row-tv { height: 300px; }
    .row-hero .panel-news { grid-column: auto; }
    .row-unified .panel-chart { grid-column: auto; }
    .row-bottom .panel-heatmap { grid-column: auto; }
    .panel { min-height: 300px; }
    .toast-container { left: 8px; right: 8px; max-width: none; }
}

/* ── UTILITY ─────────────────────────────────────────────────────────── */
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-blue { color: var(--blue); }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); }

/* Panel update flash */
.panel-updated .panel-header {
    animation: panel-flash 0.5s ease;
}
@keyframes panel-flash {
    0% { background: var(--bg-header); }
    50% { background: var(--blue-dim); }
    100% { background: var(--bg-header); }
}

/* ── TRADE RECOMMENDATION CARDS ──────────────────────────────────────── */
.trade-card {
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: var(--bg-header);
    border-left: 4px solid var(--blue);
    transition: background 0.15s;
}
.trade-card:hover { background: var(--bg-hover); }
.trade-card.buy { border-left-color: var(--green); }
.trade-card.sell { border-left-color: var(--red); }

.trade-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.trade-action-badge {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 4px;
    letter-spacing: 1px;
}
.trade-action-badge.buy {
    color: #fff;
    background: var(--green);
}
.trade-action-badge.sell {
    color: #fff;
    background: var(--red);
}
.trade-symbol {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.trade-confidence {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
}

.trade-levels {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
}
.trade-level {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.trade-level-label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.trade-level-value {
    font-weight: 600;
    color: var(--text-primary);
}
.trade-level-value.tp { color: var(--green); }
.trade-level-value.sl { color: var(--red); }

.trade-reasoning {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.trade-headline {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}
.trade-meta {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-muted);
}
.trade-executed {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
}
.trade-executed.yes {
    color: var(--green);
    background: var(--green-dim);
}
.trade-executed.no {
    color: var(--text-muted);
    background: var(--bg-hover);
}

/* ── PAPER PORTFOLIO STATS ───────────────────────────────────────────── */
.portfolio-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.portfolio-stat-card {
    background: var(--bg-header);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    text-align: center;
}
.portfolio-stat-value {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
}
.portfolio-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}
.portfolio-big-stat {
    grid-column: 1 / -1;
    background: var(--bg-header);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px;
    text-align: center;
}
.portfolio-big-value {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
}
.portfolio-big-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 2px;
}

/* ── OPEN POSITIONS ──────────────────────────────────────────────────── */
.position-row {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
}
.position-row:last-child { border-bottom: none; }
.position-dir {
    width: 20px;
    font-weight: 700;
    font-size: 14px;
}
.position-dir.long { color: var(--green); }
.position-dir.short { color: var(--red); }
.position-sym {
    width: 80px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}
.position-pnl {
    width: 80px;
    text-align: right;
    font-weight: 600;
    font-size: 12px;
}

/* ── TRADE HISTORY ROWS ──────────────────────────────────────────────── */
.history-row {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
    gap: 8px;
}
.history-row:last-child { border-bottom: none; }
.history-result {
    font-size: 14px;
    width: 20px;
    text-align: center;
}
.history-symbol {
    width: 80px;
    font-weight: 600;
    color: var(--text-primary);
}
.history-prices {
    flex: 1;
    color: var(--text-secondary);
    font-size: 11px;
}
.history-pnl {
    width: 80px;
    text-align: right;
    font-weight: 600;
}

/* ── LIVE TV ─────────────────────────────────────────────────────────── */
.tv-iframe-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}
.tv-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── TOAST NOTIFICATIONS ─────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 52px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 380px;
}
.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    animation: toast-in 0.4s ease;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.3s;
}
.toast.buy { border-left: 4px solid var(--green); }
.toast.sell { border-left: 4px solid var(--red); }
.toast.fade-out { opacity: 0; }

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.toast-action {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 4px;
}
.toast-action.buy { color: #fff; background: var(--green); }
.toast-action.sell { color: #fff; background: var(--red); }
.toast-symbol {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.toast-confidence {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
}
.toast-body {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.toast-levels {
    display: flex;
    gap: 14px;
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
}

@keyframes toast-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ── RESPONSIVE ADDITIONS ────────────────────────────────────────────── */

/* ── SUB-TABS (Stock Market Region) ──────────────────────────────────── */
.panel-tabs.sub-tabs {
    margin-top: 0;
    gap: 2px;
    padding: 2px 8px 4px;
    border-top: 1px solid var(--border);
}
.panel-tabs.sub-tabs .tab.sub {
    font-size: 10px;
    padding: 2px 6px;
    letter-spacing: 0.5px;
    min-height: 22px;
}
.panel-tabs.sub-tabs .tab.sub.active {
    background: var(--accent-blue);
    color: white;
}

/* ── TECHNICAL ANALYSIS PANEL ────────────────────────────────────────── */
.tech-card {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.15s;
}
.tech-card:hover {
    background: var(--bg-hover);
}
.tech-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tech-card-symbol {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 80px;
}
.tech-card-name {
    color: var(--text-secondary);
    font-size: 11px;
    flex: 1;
    margin-left: 8px;
}
.tech-overall {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tech-overall.strong_buy { color: #00ff88; background: rgba(0,255,136,0.15); }
.tech-overall.buy { color: var(--green); background: rgba(76,175,80,0.15); }
.tech-overall.neutral { color: var(--text-muted); background: rgba(128,128,128,0.1); }
.tech-overall.sell { color: var(--red); background: rgba(244,67,54,0.15); }
.tech-overall.strong_sell { color: #ff4444; background: rgba(255,68,68,0.15); }

.tech-indicators {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}
.tech-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3px 4px;
    border-radius: 3px;
    background: rgba(255,255,255,0.02);
}
.tech-indicator-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tech-indicator-value {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
}
.tech-score-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
    position: relative;
}
.tech-score-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

/* ── REAL ESTATE PANEL ───────────────────────────────────────────────── */
.re-hotspot-card {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.re-hotspot-card:hover {
    background: var(--bg-hover);
}
.re-hotspot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.re-hotspot-location {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.re-hotspot-change {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: #00ff88;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(0,255,136,0.12);
}
.re-hotspot-area {
    font-size: 11px;
    color: var(--accent-blue);
    margin-bottom: 4px;
}
.re-hotspot-reason {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 4px;
}
.re-hotspot-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.re-hotspot-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-mono);
}
.re-hotspot-tag.confidence {
    color: var(--yellow);
    background: var(--yellow-dim);
}
.re-hotspot-tag.risk-low {
    color: var(--green);
    background: rgba(76,175,80,0.15);
}
.re-hotspot-tag.risk-medium {
    color: var(--yellow);
    background: var(--yellow-dim);
}
.re-hotspot-tag.risk-high {
    color: var(--red);
    background: rgba(244,67,54,0.15);
}
.re-hotspot-tag.timeframe {
    color: var(--text-muted);
    background: rgba(128,128,128,0.1);
}
.re-hotspot-tag.price {
    color: var(--text-secondary);
    background: rgba(128,128,128,0.1);
}

/* REIT card */
.reit-row {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    gap: 8px;
}
.reit-symbol {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-blue);
    min-width: 60px;
}
.reit-name {
    flex: 1;
    font-size: 11px;
    color: var(--text-secondary);
}
.reit-price {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 60px;
    text-align: right;
}
.reit-change {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

/* RE News items */
.re-news-item {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.re-news-item:hover {
    background: var(--bg-hover);
}
.re-news-title {
    font-size: 11px;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
}
.re-news-source {
    font-size: 10px;
    color: var(--text-muted);
}

/* ── SHORTAGE PREDICTION CARDS ───────────────────────────────────────── */
.shortage-card {
    padding: 12px 14px;
    border-left: 4px solid var(--yellow);
    margin-bottom: 8px;
    border-radius: 6px;
    background: var(--bg-header);
    transition: background 0.15s;
}
.shortage-card:hover { background: var(--bg-hover); }
.shortage-card.critical { border-left-color: var(--red); }
.shortage-card.high { border-left-color: #ff6b35; }
.shortage-card.medium { border-left-color: var(--yellow); }
.shortage-card.low { border-left-color: var(--text-muted); }

.shortage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.shortage-product {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.shortage-icon { font-size: 18px; }
.shortage-severity {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.shortage-severity.critical { color: #fff; background: var(--red); }
.shortage-severity.high { color: #fff; background: #ff6b35; }
.shortage-severity.medium { color: var(--yellow); background: var(--yellow-dim); }
.shortage-severity.low { color: var(--text-muted); background: rgba(128,128,128,0.1); }

.shortage-signal {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 4px;
}
.shortage-prediction {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0;
    font-family: var(--font-mono);
    font-size: 12px;
}
.shortage-price-trend {
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
}
.shortage-price-trend.up {
    color: var(--red);
    background: var(--red-dim);
}
.shortage-price-trend.down {
    color: var(--green);
    background: var(--green-dim);
}
.shortage-confidence {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
}
.shortage-confidence.high { color: var(--green); }
.shortage-confidence.medium { color: var(--yellow); }
.shortage-confidence.low { color: var(--text-muted); }

.shortage-timeframe {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.shortage-reasoning {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 4px 0;
}
.shortage-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.shortage-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-mono);
}
.shortage-tag.catalyst {
    color: var(--yellow);
    background: var(--yellow-dim);
}
.shortage-tag.stock {
    color: var(--blue);
    background: var(--blue-dim);
}
.shortage-tag.region {
    color: var(--purple);
    background: rgba(188,140,255,0.12);
}
.shortage-rec {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}
.shortage-rec.stock { color: var(--green); background: var(--green-dim); }
.shortage-rec.sell { color: var(--red); background: var(--red-dim); }
.shortage-rec.watch { color: var(--yellow); background: var(--yellow-dim); }
.shortage-rec.avoid { color: var(--red); background: var(--red-dim); }

/* ── SUPPLY CHAIN MAP V2 ──────────────────────────────────────────── */
.world-map-svg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    background: #0d1117;
    border-radius: 6px;
}
.world-map-svg .scm-svg {
    width: 100%;
    height: 100%;
}
.world-map-svg .land-px {
    transition: fill 0.3s, opacity 0.3s;
}
.world-map-svg:hover .land-px {
    fill: rgba(88,166,255,0.28);
}

/* Stats bar — top-right overlay */
.scm-stats-bar {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(13,17,23,0.88);
    border: 1px solid rgba(88,166,255,0.12);
    border-radius: 6px;
    padding: 6px 12px;
    backdrop-filter: blur(8px);
    z-index: 2;
}
.scm-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}
.scm-stat-val {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}
.scm-stat-lbl {
    font-family: var(--font-mono);
    font-size: 7px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.scm-stat-divider {
    width: 1px;
    height: 24px;
    background: rgba(88,166,255,0.15);
}

/* Legend — bottom-left overlay */
.scm-legend {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(13,17,23,0.88);
    border: 1px solid rgba(88,166,255,0.12);
    border-radius: 6px;
    padding: 8px 12px;
    backdrop-filter: blur(8px);
    z-index: 2;
}
.scm-legend-title {
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
    color: #58a6ff;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}
.scm-legend-items {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
}
.scm-li {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 8px;
    color: var(--text-muted);
}
.scm-ld {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 4px currentColor;
}
.scm-legend-sub {
    font-family: var(--font-mono);
    font-size: 7px;
    color: rgba(88,166,255,0.35);
    margin-top: 2px;
}

/* Marker hover effects */
.shortage-markers g {
    cursor: pointer;
    transition: transform 0.2s;
}
.shortage-markers g:hover {
    transform: scale(1.2);
}

/* Scan line effect */
.scm-svg rect[rx="1"] {
    pointer-events: none;
}

/* Flow arcs hover */
.flow-arcs path:hover {
    stroke-opacity: 0.7 !important;
    stroke-width: 2 !important;
}

/* ── NEWSPAPER HIGHLIGHTS ────────────────────────────────────────────── */
.newspaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 10px;
    padding: 6px 0;
}
.newspaper-card {
    padding: 0;
    border-radius: 8px;
    background: var(--bg-header);
    border-left: 4px solid var(--blue);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
}
.newspaper-card:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.newspaper-card:hover .np-masthead {
    background: rgba(255,255,255,0.04);
}

/* Masthead — newspaper brand header with logo */
.np-masthead {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.015);
    transition: background 0.2s;
}
.np-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255,255,255,0.9);
    padding: 2px;
}
.np-logo-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}
.np-masthead-name {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.newspaper-region {
    font-size: 9px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(128,128,128,0.12);
    flex-shrink: 0;
}
.newspaper-title {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 10px 14px 6px;
    font-weight: 500;
}

/* Footer with time + sentiment + keywords */
.np-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 14px 8px;
    gap: 8px;
}
.np-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.np-time-badge {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(128,128,128,0.08);
}
.np-time-badge.fresh {
    color: var(--green);
    background: var(--green-dim);
    font-weight: 600;
}
.np-time-badge.recent {
    color: var(--yellow);
    background: var(--yellow-dim);
}
.np-sent-badge {
    font-size: 9px;
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}
.np-sent-bull {
    color: var(--green);
    background: var(--green-dim);
}
.np-sent-bear {
    color: var(--red);
    background: var(--red-dim);
}
.np-sent-neut {
    color: var(--text-muted);
    background: rgba(128,128,128,0.08);
}
.np-keywords {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.np-keyword {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--blue);
    background: var(--blue-dim);
    padding: 1px 5px;
    border-radius: 3px;
}

.newspaper-time {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.newspaper-sentiment-bar {
    height: 3px;
    border-radius: 0;
    margin-top: 0;
    background: var(--border);
    overflow: hidden;
}
.newspaper-sentiment-fill {
    height: 100%;
    border-radius: 0;
    transition: width 0.3s;
}

/* ── SCROLLABLE TV TABS ──────────────────────────────────────────────── */
.tv-tabs-scroll {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}
.tv-tabs-scroll::-webkit-scrollbar {
    height: 3px;
}
.tv-tabs-scroll::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

/* ── RESPONSIVE UPDATES ─────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .row-shortage {
        grid-template-columns: 1fr;
        height: auto;
    }
    .row-newspapers {
        height: auto;
        min-height: 400px;
    }
    .newspaper-grid {
        grid-template-columns: 1fr 1fr;
    }
    .header-select {
        max-width: 90px;
        font-size: 10px;
    }
}
@media (max-width: 768px) {
    .row-shortage {
        grid-template-columns: 1fr;
    }
    .newspaper-grid {
        grid-template-columns: 1fr;
    }
    .header-select {
        display: none;
    }
}

/* ── STRATEGY BACKTESTER ─────────────────────────────────────────────── */
.bt-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    height: 100%;
}
.bt-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.bt-form-row label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    white-space: nowrap;
    min-width: 90px;
}
.bt-input {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 5px 8px;
    outline: none;
    transition: border-color 0.2s;
    max-width: 130px;
}
.bt-input:focus {
    border-color: var(--blue);
}
.bt-run-btn {
    margin-top: 8px;
    padding: 10px;
    background: linear-gradient(135deg, #1f6feb 0%, #58a6ff 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}
.bt-run-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(31,111,235,0.4);
}
.bt-run-btn:active { transform: translateY(0); }
.bt-run-btn.running {
    background: linear-gradient(135deg, #d29922 0%, #e3b341 100%);
    pointer-events: none;
    animation: btn-pulse 1.5s ease-in-out infinite;
}
@keyframes btn-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.bt-status {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
    min-height: 14px;
}

/* Results panel */
.bt-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 12px;
    padding: 20px;
}
.bt-empty-icon { font-size: 40px; opacity: 0.6; }
.bt-empty-title {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}
.bt-empty-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}
.bt-math-preview {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 20px;
    margin-top: 10px;
}
.bt-math-line {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 2;
}
.bt-math-line .text-green { color: var(--green); font-weight: 700; }
.bt-math-line .text-red { color: var(--red); font-weight: 700; }

/* Stats grid */
.bt-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px;
}
.bt-stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    transition: border-color 0.2s;
}
.bt-stat-card:hover { border-color: var(--blue); }
.bt-stat-card.highlight { border-color: var(--blue); background: rgba(88,166,255,0.04); }
.bt-stat-card.win { border-left: 3px solid var(--green); }
.bt-stat-card.loss { border-left: 3px solid var(--red); }
.bt-stat-val {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.bt-stat-val.green { color: var(--green); }
.bt-stat-val.red { color: var(--red); }
.bt-stat-val.blue { color: #58a6ff; }
.bt-stat-lbl {
    font-family: var(--font-mono);
    font-size: 8px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 4px;
    text-transform: uppercase;
}

/* Equity curve */
.bt-equity-section {
    padding: 8px;
}
.bt-equity-title {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.bt-equity-chart {
    width: 100%;
    height: 100px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.bt-equity-chart svg {
    width: 100%;
    height: 100%;
}

/* Trade log */
.bt-trade-log {
    padding: 0 8px 8px;
}
.bt-trade-log-title {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-transform: uppercase;
    padding-top: 6px;
}
.bt-trade-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 10px;
}
.bt-trade-table th {
    background: var(--bg-panel);
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 6px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
}
.bt-trade-table td {
    padding: 4px 6px;
    border-bottom: 1px solid rgba(48,54,61,0.3);
    color: var(--text-secondary);
    white-space: nowrap;
}
.bt-trade-table tr:hover td { background: var(--bg-hover); }
.bt-trade-table .tp { color: var(--green); font-weight: 600; }
.bt-trade-table .sl { color: var(--red); font-weight: 600; }

/* Verdict banner */
.bt-verdict {
    margin: 8px;
    padding: 12px 16px;
    border-radius: 6px;
    font-family: var(--font-mono);
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}
.bt-verdict.profitable {
    background: rgba(63,185,80,0.08);
    border: 1px solid rgba(63,185,80,0.3);
    color: var(--green);
}
.bt-verdict.unprofitable {
    background: rgba(248,81,73,0.08);
    border: 1px solid rgba(248,81,73,0.3);
    color: var(--red);
}

/* ═══ PIPELINE LOADING OVERLAY ═══ */
.pipeline-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(1, 4, 9, 0.92);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.pipeline-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.pipeline-loader {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}
.pipeline-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 20px rgba(88, 166, 255, 0.4));
}
.pipeline-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #58a6ff, #79c0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}
.pipeline-status {
    color: #8b949e;
    font-size: 14px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}
.pipeline-progress {
    width: 100%;
    height: 3px;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}
.pipeline-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #58a6ff, #79c0ff, #58a6ff);
    background-size: 200% 100%;
    border-radius: 2px;
    transition: width 1s ease;
    animation: pipeline-shimmer 2s infinite linear;
}
@keyframes pipeline-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.pipeline-substatus {
    color: #484f58;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}


/* ═══ USER BUTTON ═══ */
.btn-user {
    display: flex; align-items: center; gap: 6px;
    background: rgba(88,166,255,.1); border: 1px solid rgba(88,166,255,.3);
    color: #c9d1d9; border-radius: 6px; padding: 4px 12px; cursor: pointer;
    font-family: 'JetBrains Mono', monospace; font-size: 12px; transition: all .2s;
}
.btn-user:hover { background: rgba(88,166,255,.2); border-color: #58a6ff; }
.btn-user .user-icon { font-size: 14px; }
.btn-user .user-name { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-user.logged-in { border-color: #3fb950; background: rgba(63,185,80,.12); }
.btn-user.logged-in .user-icon { color: #3fb950; }

/* ═══ MODALS ═══ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    background: #0d1117; border: 1px solid #30363d; border-radius: 12px;
    padding: 28px; width: 420px; max-width: 92vw; max-height: 85vh;
    overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal-close {
    position: absolute; top: 12px; right: 16px; background: none; border: none;
    color: #8b949e; font-size: 24px; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: #f85149; }
.modal-title {
    color: #58a6ff; font-family: 'JetBrains Mono', monospace; font-size: 15px;
    margin: 0 0 16px 0; font-weight: 600; letter-spacing: 0.5px;
}
.modal-subtitle { color: #8b949e; font-size: 12px; margin: -10px 0 14px 0; }

/* Auth Modal */
.auth-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 1px solid #21262d; }
.auth-tab {
    flex: 1; padding: 10px; background: none; border: none; border-bottom: 2px solid transparent;
    color: #8b949e; font-family: 'JetBrains Mono', monospace; font-size: 13px;
    cursor: pointer; letter-spacing: 1px; transition: all .2s;
}
.auth-tab:hover { color: #c9d1d9; }
.auth-tab.active { color: #58a6ff; border-bottom-color: #58a6ff; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field label {
    display: block; color: #8b949e; font-size: 11px; margin-bottom: 4px;
    font-family: 'JetBrains Mono', monospace; letter-spacing: 0.5px;
}
.auth-field input {
    width: 100%; padding: 10px 12px; background: #161b22; border: 1px solid #30363d;
    border-radius: 6px; color: #c9d1d9; font-size: 14px; font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}
.auth-field input:focus { border-color: #58a6ff; outline: none; }
.auth-error { color: #f85149; font-size: 12px; min-height: 16px; }
.auth-submit {
    width: 100%; padding: 11px; background: linear-gradient(135deg, #238636, #2ea043);
    border: none; border-radius: 6px; color: #fff; font-size: 13px; cursor: pointer;
    font-family: 'JetBrains Mono', monospace; font-weight: 600; letter-spacing: 1px;
    transition: all .2s;
}
.auth-submit:hover { background: linear-gradient(135deg, #2ea043, #3fb950); transform: translateY(-1px); }
.auth-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.logout-btn { background: linear-gradient(135deg, #b62324, #da3633); margin-top: 10px; }
.logout-btn:hover { background: linear-gradient(135deg, #da3633, #f85149); }

/* Profile */
.auth-profile { text-align: center; }
.profile-avatar { font-size: 48px; margin-bottom: 10px; }
.profile-info { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.profile-username { color: #58a6ff; font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 600; }
.profile-email { color: #8b949e; font-size: 12px; }
.profile-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.btn-profile-action {
    width: 100%; padding: 10px 14px; background: #161b22; border: 1px solid #30363d;
    border-radius: 6px; color: #c9d1d9; font-size: 13px; cursor: pointer; text-align: left;
    font-family: 'JetBrains Mono', monospace; transition: all .15s;
}
.btn-profile-action:hover { border-color: #58a6ff; background: #1c2333; }

/* Watchlist Modal */
.watchlist-modal { width: 500px; }
.watchlist-search-wrap { position: relative; margin-bottom: 14px; }
.watchlist-search {
    width: 100%; padding: 10px 12px; background: #161b22; border: 1px solid #30363d;
    border-radius: 6px; color: #c9d1d9; font-size: 13px; box-sizing: border-box;
    font-family: 'JetBrains Mono', monospace;
}
.watchlist-search:focus { border-color: #58a6ff; outline: none; }
.watchlist-search-results {
    position: absolute; top: 100%; left: 0; right: 0; background: #161b22;
    border: 1px solid #30363d; border-radius: 0 0 6px 6px; max-height: 200px;
    overflow-y: auto; z-index: 10; display: none;
}
.wl-search-item {
    padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between;
    font-size: 12px; color: #c9d1d9; border-bottom: 1px solid #21262d;
    font-family: 'JetBrains Mono', monospace;
}
.wl-search-item:hover { background: #1c2333; }
.wl-search-item .sym { color: #58a6ff; font-weight: 600; }
.wl-search-item .name { color: #8b949e; font-size: 11px; }
.watchlist-items { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.wl-item {
    display: flex; justify-content: space-between; align-items: center; padding: 8px 12px;
    background: #161b22; border: 1px solid #21262d; border-radius: 6px;
}
.wl-item-sym { color: #58a6ff; font-weight: 600; font-size: 13px; font-family: 'JetBrains Mono', monospace; }
.wl-item-name { color: #8b949e; font-size: 11px; margin-left: 8px; }
.wl-item-remove {
    background: none; border: none; color: #f85149; cursor: pointer; font-size: 16px;
    padding: 2px 6px; border-radius: 4px;
}
.wl-item-remove:hover { background: rgba(248,81,73,.15); }
.watchlist-actions { margin-top: 14px; }
.empty-msg { color: #484f58; font-size: 12px; text-align: center; padding: 20px; font-style: italic; }

/* Alerts Modal */
.alerts-modal { width: 520px; }
.alert-create-form {
    display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap;
}
.alert-input {
    padding: 8px 10px; background: #161b22; border: 1px solid #30363d;
    border-radius: 6px; color: #c9d1d9; font-size: 13px; font-family: 'JetBrains Mono', monospace;
    flex: 1; min-width: 80px;
}
.alert-input:focus { border-color: #58a6ff; outline: none; }
.alert-select {
    padding: 8px 10px; background: #161b22; border: 1px solid #30363d;
    border-radius: 6px; color: #c9d1d9; font-size: 12px; font-family: 'JetBrains Mono', monospace;
}
.btn-add-alert {
    padding: 8px 14px; background: #238636; border: none; border-radius: 6px;
    color: #fff; font-size: 13px; cursor: pointer; font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}
.btn-add-alert:hover { background: #2ea043; }
.alert-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.alert-item {
    display: flex; justify-content: space-between; align-items: center; padding: 10px 12px;
    background: #161b22; border: 1px solid #21262d; border-radius: 6px;
}
.alert-item.triggered { border-color: #f0883e; background: rgba(240,136,62,.08); }
.alert-item-info { display: flex; flex-direction: column; gap: 2px; }
.alert-item-sym { color: #58a6ff; font-weight: 600; font-size: 13px; font-family: 'JetBrains Mono', monospace; }
.alert-item-cond { color: #8b949e; font-size: 11px; }
.alert-item-actions { display: flex; gap: 6px; }
.alert-item-actions button {
    background: none; border: 1px solid #30363d; color: #8b949e; padding: 4px 8px;
    border-radius: 4px; cursor: pointer; font-size: 12px;
}
.alert-item-actions button:hover { border-color: #58a6ff; color: #c9d1d9; }
.alert-item-actions .btn-del:hover { border-color: #f85149; color: #f85149; }

/* Layout Modal */
.layout-modal { width: 450px; }
.layout-panel-list { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; margin-bottom: 14px; }
.layout-panel-item {
    display: flex; justify-content: space-between; align-items: center; padding: 10px 12px;
    background: #161b22; border: 1px solid #21262d; border-radius: 6px;
}
.layout-panel-item label {
    color: #c9d1d9; font-size: 13px; font-family: 'JetBrains Mono', monospace; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
}
.layout-panel-item input[type="checkbox"] {
    accent-color: #58a6ff; width: 16px; height: 16px; cursor: pointer;
}

/* Saved Backtests Modal */
.backtests-modal { width: 500px; }
.saved-bt-list { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; }
.saved-bt-item {
    display: flex; justify-content: space-between; align-items: center; padding: 12px;
    background: #161b22; border: 1px solid #21262d; border-radius: 6px; cursor: pointer;
    transition: all .15s;
}
.saved-bt-item:hover { border-color: #58a6ff; background: #1c2333; }
.saved-bt-name { color: #58a6ff; font-weight: 600; font-size: 13px; font-family: 'JetBrains Mono', monospace; }
.saved-bt-date { color: #484f58; font-size: 11px; }
.saved-bt-config { color: #8b949e; font-size: 11px; margin-top: 2px; }
.saved-bt-actions button {
    background: none; border: 1px solid #30363d; color: #8b949e; padding: 4px 8px;
    border-radius: 4px; cursor: pointer; font-size: 12px;
}
.saved-bt-actions button:hover { border-color: #f85149; color: #f85149; }

/* Watchlist Panel (in dashboard) */
.watchlist-panel-badge {
    background: rgba(88,166,255,.12); color: #58a6ff; padding: 2px 8px;
    border-radius: 4px; font-size: 11px; font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════════════
   LANDING PAGE — Auth Gate
   ═══════════════════════════════════════════════════════════════════════ */

.landing-page {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #050810;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Animated Background */
.landing-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.landing-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(88,166,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88,166,255,.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.landing-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    animation: glowPulse 8s ease-in-out infinite;
}

.landing-glow-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #1f6feb 0%, transparent 70%);
    top: -200px; left: -100px;
    animation-delay: 0s;
}

.landing-glow-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #58a6ff 0%, transparent 70%);
    top: 40%; right: -150px;
    animation-delay: 3s;
    opacity: 0.2;
}

.landing-glow-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #bc8cff 0%, transparent 70%);
    bottom: -100px; left: 30%;
    animation-delay: 5s;
    opacity: 0.15;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(1.1); }
}

/* Content */
.landing-content {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 32px 40px;
}

/* Hero */
.landing-hero {
    text-align: center;
    margin-bottom: 60px;
}

.landing-logo-wrap {
    display: inline-block;
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
    animation: logoFloat 4s ease-in-out infinite;
}

.landing-logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(88,166,255,0.4));
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.landing-title {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.landing-title-main {
    font-family: var(--font-mono);
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 6px;
    background: linear-gradient(135deg, #fff 0%, #58a6ff 50%, #bc8cff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-title-ai {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 600;
    color: #58a6ff;
    background: rgba(88,166,255,.12);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(88,166,255,.25);
}

.landing-tagline {
    font-family: var(--font-mono);
    font-size: 16px;
    color: #8b949e;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.landing-subtitle {
    font-size: 18px;
    color: #8b949e;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Features Grid */
.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.landing-feature {
    background: rgba(13,17,23,.8);
    border: 1px solid #1e2537;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.landing-feature:hover {
    border-color: #58a6ff;
    background: rgba(13,17,23,.95);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(88,166,255,.1);
}

.lf-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: rgba(88,166,255,.06);
    border: 1px solid rgba(88,166,255,.12);
    border-radius: 10px;
}

.lf-title {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: #e6edf3;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.lf-desc {
    font-size: 13px;
    color: #8b949e;
    line-height: 1.5;
}

/* Stats Bar */
.landing-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 56px;
    padding: 28px;
    background: rgba(13,17,23,.6);
    border: 1px solid #1e2537;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.landing-stat {
    text-align: center;
}

.ls-number {
    display: block;
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #58a6ff, #bc8cff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.ls-label {
    font-size: 12px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Auth Section */
.landing-auth {
    max-width: 440px;
    margin: 0 auto 48px;
    text-align: center;
}

.landing-auth-title {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    color: #e6edf3;
    margin-bottom: 24px;
}

.landing-auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    background: rgba(13,17,23,.8);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #1e2537;
}

.la-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #8b949e;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.la-tab.active {
    background: rgba(88,166,255,.12);
    color: #58a6ff;
}

.la-tab:hover:not(.active) {
    background: rgba(255,255,255,.03);
    color: #e6edf3;
}

.landing-auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.landing-auth-form input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(13,17,23,.8);
    border: 1px solid #1e2537;
    border-radius: 8px;
    color: #e6edf3;
    font-family: var(--font-sans);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.landing-auth-form input:focus {
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88,166,255,.1);
}

.landing-auth-form input::placeholder {
    color: #484f58;
}

.landing-auth-error {
    color: #f85149;
    font-size: 13px;
    min-height: 18px;
    text-align: left;
}

.landing-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1f6feb, #58a6ff);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.landing-auth-btn:hover {
    background: linear-gradient(135deg, #58a6ff, #79c0ff);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(88,166,255,.3);
}

.landing-auth-btn:active {
    transform: translateY(0);
}

.lab-icon {
    font-size: 18px;
    transition: transform 0.3s;
}

.landing-auth-btn:hover .lab-icon {
    transform: translateX(4px);
}

.landing-free-note {
    margin-top: 16px;
    font-size: 13px;
    color: #484f58;
}

/* Footer */
.landing-footer {
    text-align: center;
    padding: 24px 0;
    font-size: 12px;
    color: #484f58;
    border-top: 1px solid #1e2537;
}

.landing-footer span {
    color: #8b949e;
}

/* Landing page mobile responsiveness */
@media (max-width: 768px) {
    .landing-content {
        padding: 40px 16px 24px;
    }
    .landing-title-main {
        font-size: 28px;
        letter-spacing: 3px;
    }
    .landing-title-ai {
        font-size: 14px;
    }
    .landing-tagline {
        font-size: 12px;
        letter-spacing: 2px;
    }
    .landing-subtitle {
        font-size: 15px;
    }
    .landing-features {
        grid-template-columns: 1fr;
    }
    .landing-stats {
        gap: 20px;
    }
    .ls-number {
        font-size: 24px;
    }
    .landing-logo-wrap {
        width: 72px;
        height: 72px;
    }
}

/* Landing page hidden state */
.landing-page.landing-hidden {
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

