/* Market Watcher — Dashboard Theme (modern fintech, glassmorphic) */

:root {
    /* ── Core palette ── */
    --mw-green: #00e676;
    --mw-red: #ff5252;
    --mw-yellow: #ffab40;
    --mw-blue: #00d4ff;
    --mw-accent: #00d4ff;
    --mw-accent-rgb: 0, 212, 255;
    --mw-green-rgb: 0, 230, 118;
    --mw-red-rgb: 255, 82, 82;
    --mw-warm: #ff7c43;
    --mw-warm-rgb: 255, 124, 67;

    /* ── Backgrounds ── */
    --mw-bg-dark: #0b1120;
    --mw-bg-card: rgba(22, 33, 52, 0.65);
    --mw-bg-card-solid: #162134;
    --mw-bg-glass: rgba(22, 33, 52, 0.55);
    --mw-bg-row-hover: rgba(0, 212, 255, 0.06);
    --mw-bg-row-alt: rgba(255, 255, 255, 0.015);

    /* ── Borders & shadows ── */
    --mw-border: rgba(255, 255, 255, 0.06);
    --mw-border-glass: rgba(255, 255, 255, 0.08);
    --mw-shadow-card: 0 8px 32px rgba(0, 0, 0, 0.25);
    --mw-shadow-glow: 0 0 20px rgba(0, 212, 255, 0.08);

    /* ── Text ── */
    --mw-text: #e0e6ed;
    --mw-text-muted: #6b7f92;

    /* ── Radii ── */
    --mw-radius: 12px;
    --mw-radius-sm: 8px;

    /* ── Misc ── */
    --mw-disclaimer-bg: rgba(20, 20, 40, 0.8);
    --mw-disclaimer-border: rgba(60, 60, 100, 0.3);
    --mw-gradient-accent: linear-gradient(135deg, #00d4ff, #7c3aed);
}

/* Pico dark overrides */
[data-theme="dark"] {
    --pico-background-color: var(--mw-bg-dark);
    --pico-card-background-color: var(--mw-bg-card);
    --pico-card-sectioning-background-color: var(--mw-bg-card);
    --pico-primary: var(--mw-accent);
    --pico-primary-hover: #33ddff;
    --pico-color: var(--mw-text);
}

/* ── Typography ── */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
    color: var(--mw-text);
    background: var(--mw-bg-dark);
}

h1, h2, h3, h4 {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.03em;
    font-weight: 800;
}

h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h5 { margin: 0; font-size: 0.95rem; }

/* ── Glassmorphic cards ── */
article {
    background: var(--mw-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--mw-border-glass);
    border-radius: var(--mw-radius);
    box-shadow: var(--mw-shadow-card);
    padding: 0.85rem;
    margin-bottom: 0.85rem;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

article:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--mw-shadow-card), var(--mw-shadow-glow);
}

article header {
    padding: 0.45rem 0;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--mw-border-glass);
}

/* ── Global transitions ── */
a, button, .asset-row, .score-pill, .conv-badge, .zone-tag, .mood-badge {
    transition: all 0.2s ease;
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

/* ── Smooth scrolling ── */
html { scroll-behavior: smooth; }

/* ── Disclaimer Banner ── */
.disclaimer-bar {
    background: var(--mw-disclaimer-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--mw-disclaimer-border);
    padding: 0.35rem 1rem;
    text-align: center;
    font-size: 0.7rem;
    color: #a0a0b8;
    line-height: 1.5;
}

.disclaimer-bar a {
    color: var(--mw-accent);
    text-decoration: underline;
    margin-left: 0.3rem;
}

.disclaimer-bar strong {
    color: #c0c0d8;
}

/* ── Nav / Brand ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--mw-border-glass);
    padding-block: 0.35rem;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

nav a.active {
    color: var(--mw-accent);
    font-weight: 600;
    background: rgba(var(--mw-accent-rgb), 0.1);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
}

/* ── Nav links wrapper ── */
.nav-links ul { margin: 0; }

/* ── Logout button ── */
.nav-logout-btn {
    padding: 0.25rem 0.7rem;
    font-size: 0.82rem;
    border: 1px solid var(--mw-border-glass);
    border-radius: 6px;
    color: var(--mw-text-muted) !important;
    text-decoration: none;
}
.nav-logout-btn:hover {
    border-color: rgba(var(--mw-red-rgb), 0.3);
    color: var(--mw-red) !important;
    background: rgba(var(--mw-red-rgb), 0.06);
}

/* ── Disclaimer dismiss ── */
.disclaimer-dismiss {
    background: none;
    border: none;
    color: #a0a0b8;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 0.6rem;
    padding: 0 0.2rem;
    line-height: 1;
    vertical-align: middle;
}
.disclaimer-dismiss:hover { color: #fff; }

/* ── Hamburger toggle (hidden on desktop) ── */
.nav-toggle {
    display: none !important;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    margin: 0;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--mw-text-muted);
    border-radius: 1px;
    transition: all 0.2s ease;
}
.nav-toggle:hover span { background: var(--mw-text); }

.brand {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

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

.brand-text {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.03em;
    background: var(--mw-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Mood bar (glassmorphic container) ── */
.mood-bar {
    background: var(--mw-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--mw-border-glass);
    border-radius: var(--mw-radius);
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.85rem;
}

.mood-row {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.mood-divider {
    width: 1px;
    height: 1.2rem;
    background: var(--mw-border-glass);
}

.mood-item { display: flex; align-items: center; gap: 0.4rem; }
.mood-item small { color: var(--mw-text-muted); font-size: 0.75rem; }

.mood-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: var(--mw-radius-sm);
    font-weight: 700;
    font-size: 0.7rem;
}

.mood-bull { background: rgba(var(--mw-green-rgb), 0.2); color: var(--mw-green); border: 1px solid rgba(var(--mw-green-rgb), 0.3); }
.mood-bear { background: rgba(var(--mw-red-rgb), 0.2); color: var(--mw-red); border: 1px solid rgba(var(--mw-red-rgb), 0.3); }
.mood-mixed { background: rgba(255, 171, 64, 0.2); color: var(--mw-yellow); border: 1px solid rgba(255, 171, 64, 0.3); }

/* ── Alert Ticker Strip ── */
.ticker-strip {
    background: rgba(22, 33, 52, 0.4);
    border-bottom: 1px solid var(--mw-border-glass);
    padding: 0.35rem 0;
    overflow: hidden;
    position: relative;
}

.ticker-strip::before, .ticker-strip::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 2;
    pointer-events: none;
}
.ticker-strip::before { left: 0; background: linear-gradient(90deg, var(--mw-bg-dark), transparent); }
.ticker-strip::after { right: 0; background: linear-gradient(-90deg, var(--mw-bg-dark), transparent); }

.ticker-scroll {
    display: flex;
    gap: 1.5rem;
    animation: ticker 35s linear infinite;
    width: max-content;
}

.ticker-item {
    font-size: 0.7rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--mw-text-muted);
}

.ticker-sym { font-weight: 600; color: var(--mw-text); }
.ticker-buy { color: var(--mw-green); font-weight: 500; }
.ticker-sell { color: var(--mw-red); font-weight: 500; }
.ticker-level { color: var(--mw-accent); font-weight: 500; }
.ticker-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Hero Stats Bar ── */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.stat-card {
    background: var(--mw-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--mw-border-glass);
    border-radius: var(--mw-radius);
    padding: 0.75rem 0.85rem;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: var(--mw-radius) var(--mw-radius) 0 0;
}

.stat-card.mood::before { background: var(--mw-green); }
.stat-card.zones::before { background: var(--mw-warm); }
.stat-card.alerts::before { background: var(--mw-yellow); }
.stat-card.best::before { background: var(--mw-accent); }
.stat-card.watchlist::before { background: linear-gradient(90deg, var(--mw-accent), #7c3aed); }

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--mw-shadow-card), var(--mw-shadow-glow);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mw-text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--mw-text);
}

.stat-value.bull { color: var(--mw-green); }
.stat-value.bear { color: var(--mw-red); }
.stat-value.mixed { color: var(--mw-yellow); }
.stat-value.warm { color: var(--mw-warm); }
.stat-value.yellow { color: var(--mw-yellow); }
.stat-value.accent { color: var(--mw-accent); }

.stat-sub {
    font-size: 0.65rem;
    color: var(--mw-text-muted);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-sub strong {
    color: var(--mw-text);
    font-weight: 600;
}

/* ── Section headers ── */
.section-header {
    padding: 0.3rem 0;
    margin-bottom: 0.2rem;
}

.section-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    margin-bottom: 0.3rem;
}
.section-hdr-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ── Dense asset tables ── */
.overflow-auto { overflow-x: auto; }

.asset-table.dense {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 0.75rem;
    line-height: 1.3;
}

.asset-table.dense th {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mw-text-muted);
    border-bottom: 1px solid var(--mw-border-glass);
    padding: 0.35rem 0.4rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
}

.asset-table.dense td {
    padding: 0.28rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* Alternating row tints */
.asset-table.dense tbody tr:nth-child(even) {
    background: var(--mw-bg-row-alt);
}

.asset-row {
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    border-left: 2px solid transparent;
}
.asset-row:hover {
    background: var(--mw-bg-row-hover) !important;
    border-left-color: var(--mw-accent);
}

/* Column group dividers — visual separation between price, score, levels, zones */
.col-trend { border-right: 1px solid var(--mw-border); }
.col-level:last-of-type { border-right: 1px solid var(--mw-border); }

/* Column widths */
.col-sym { min-width: 40px; }
.col-mcap { min-width: 45px; text-align: right; }
.col-price { min-width: 55px; text-align: right; }
.col-score { min-width: 45px; text-align: center; }
.col-trend { min-width: 16px; text-align: center; }
.col-level { min-width: 45px; text-align: right; }
.col-zone { min-width: 45px; text-align: right; }
.col-alert { min-width: 16px; text-align: center; }

/* Monospace for numbers */
.mono { font-family: "SF Mono", "Cascadia Code", "Fira Code", monospace; font-size: 0.72rem; }
.muted { color: var(--mw-text-muted); }

/* ── Score pills (compact) ── */
.score-pill {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.7rem;
    font-family: "SF Mono", "Cascadia Code", "Fira Code", monospace;
}

.score-bull { background: rgba(var(--mw-green-rgb), 0.15); color: var(--mw-green); border: 1px solid rgba(var(--mw-green-rgb), 0.25); }
.score-bear { background: rgba(var(--mw-red-rgb), 0.15); color: var(--mw-red); border: 1px solid rgba(var(--mw-red-rgb), 0.25); }
.score-neutral { background: rgba(107,127,146,0.1); color: var(--mw-text-muted); border: 1px solid rgba(107,127,146,0.15); }

/* Value/contrarian score pill — dashed border to distinguish from momentum */
.score-value { border-style: dashed; opacity: 0.85; }

/* ── Horizon dots (compact colored circles in table) ── */
.col-hz { min-width: 20px; text-align: center; }
.col-conv { min-width: 28px; text-align: center; }

.hz-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    cursor: default;
    transition: box-shadow 0.2s ease;
}
.hz-bull { background: var(--mw-green); box-shadow: 0 0 5px rgba(var(--mw-green-rgb), 0.5); }
.hz-bear { background: var(--mw-red); box-shadow: 0 0 5px rgba(var(--mw-red-rgb), 0.5); }
.hz-neutral { background: #4a5568; }

/* ── Sparkline column ── */
.col-spark { min-width: 52px; text-align: center; }
.col-spark svg { display: block; margin: 0 auto; }

/* ── Score bars (replace horizon dots) ── */
.score-bar-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 28px;
}

.score-bar {
    width: 28px;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.score-bar-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.score-bar-fill.bull {
    left: 50%;
    background: var(--mw-green);
    box-shadow: 0 0 4px rgba(var(--mw-green-rgb), 0.4);
}

.score-bar-fill.bear {
    right: 50%;
    background: var(--mw-red);
    box-shadow: 0 0 4px rgba(var(--mw-red-rgb), 0.4);
}

.score-bar-center {
    position: absolute;
    left: 50%;
    top: -1px;
    width: 1px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
}

/* ── Conviction badge ── */
.conv-badge {
    display: inline-block;
    padding: 0.05rem 0.3rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.6rem;
    text-transform: uppercase;
}
.conv-high { background: rgba(var(--mw-green-rgb), 0.15); color: var(--mw-green); }
.conv-mixed { background: rgba(107,127,146,0.12); color: var(--mw-text-muted); }
.conv-conflicting { background: rgba(255, 171, 64, 0.15); color: var(--mw-yellow); }

/* ── Cycle zone badges ── */
.col-cycle { min-width: 36px; text-align: center; }
.cycle-badge {
    display: inline-block;
    padding: 0.05rem 0.3rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.6rem;
    text-transform: uppercase;
    cursor: help;
}
.cycle-badge.cycle-buy { background: rgba(var(--mw-green-rgb), 0.2); color: var(--mw-green); }
.cycle-badge.cycle-sell { background: rgba(var(--mw-red-rgb), 0.2); color: var(--mw-red); }
.cycle-badge.cycle-neutral { background: rgba(107,127,146,0.12); color: var(--mw-text-muted); }

/* ── Horizon bar (asset detail page) ── */
.horizon-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0 0.2rem;
    margin-top: 0.3rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--mw-border-glass);
}

.horizon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.4rem 0.65rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--mw-radius-sm);
    min-width: 80px;
    transition: border-color 0.2s, background 0.2s;
}
.horizon-card:hover {
    border-color: var(--mw-border-glass);
    background: rgba(255, 255, 255, 0.04);
}

.horizon-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.horizon-label {
    font-size: 0.7rem;
    color: var(--mw-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

/* Score visualization bar */
.horizon-score-bar {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin-top: 0.15rem;
    overflow: hidden;
}
.horizon-score-center {
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
}
.horizon-score-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.horizon-score-fill.fill-bull { background: var(--mw-green); }
.horizon-score-fill.fill-bear { background: var(--mw-red); right: auto; left: auto; }

/* ── Regime badge ── */
.regime-badge {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.7rem;
}
.regime-bull { background: rgba(var(--mw-green-rgb), 0.15); color: var(--mw-green); }
.regime-bear { background: rgba(var(--mw-red-rgb), 0.15); color: var(--mw-red); }
.regime-neutral { background: rgba(107,127,146,0.12); color: var(--mw-text-muted); }

/* ── Volatility bar (ATR percentile) ── */
.vol-bar-wrap { display: flex; align-items: center; gap: 0.4rem; }
.vol-bar {
    width: 60px; height: 6px;
    background: rgba(107,127,146,0.15);
    border-radius: 3px;
    overflow: hidden;
}
.vol-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--mw-green), var(--mw-yellow), var(--mw-red));
}
/* ── Zone distance labels ── */
.zone-dist { font-size: 0.65rem; margin-left: 0.3rem; }

/* ── Flash messages ── */
.flash-msg {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
.flash-success { background: rgba(var(--mw-green-rgb), 0.1); color: var(--mw-green); border: 1px solid rgba(var(--mw-green-rgb), 0.2); border-radius: var(--mw-radius-sm); }
.flash-error { background: rgba(var(--mw-red-rgb), 0.1); color: var(--mw-red); border: 1px solid rgba(var(--mw-red-rgb), 0.2); border-radius: var(--mw-radius-sm); }
.flash-info { background: rgba(var(--mw-accent-rgb), 0.1); color: var(--mw-accent); border: 1px solid rgba(var(--mw-accent-rgb), 0.2); border-radius: var(--mw-radius-sm); }
.flash-warning { background: rgba(255, 171, 64, 0.1); color: var(--mw-yellow); border: 1px solid rgba(255, 171, 64, 0.2); border-radius: var(--mw-radius-sm); }

/* ── Trend dot (replaces text badge) ── */
.trend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.trend-dot.trend-bull, .trend-dot.trend-strong\ buy { background: var(--mw-green); box-shadow: 0 0 6px rgba(var(--mw-green-rgb), 0.5); }
.trend-dot.trend-bear, .trend-dot.trend-strong\ sell { background: var(--mw-red); box-shadow: 0 0 6px rgba(var(--mw-red-rgb), 0.5); }
.trend-dot.trend-neutral { background: #4a5568; }

/* ── Buy/sell price colors ── */
.buy-price { color: rgba(var(--mw-green-rgb), 0.85); }
.sell-price { color: rgba(var(--mw-red-rgb), 0.85); }

/* ── Zone tags ── */
.zone-tag {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: var(--mw-radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(var(--mw-accent-rgb), 0.12);
    color: var(--mw-accent);
    margin-right: 0.15rem;
}

/* ── Asset type tags ── */
.asset-type-tag {
    display: inline-block;
    width: 1.1rem; height: 1.1rem;
    line-height: 1.1rem;
    text-align: center;
    border-radius: 4px;
    font-size: 0.55rem;
    font-weight: 700;
    margin-right: 0.2rem;
    text-transform: lowercase;
}

.asset-type-tag.stock { background: rgba(var(--mw-accent-rgb), 0.15); color: var(--mw-accent); }
.asset-type-tag.crypto { background: rgba(255, 171, 64, 0.15); color: var(--mw-yellow); }

/* ── Page subtitle ── */
.page-subtitle {
    color: var(--mw-text-muted);
    font-size: 0.82rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* ── Alert filter bar ── */
.alert-summary {
    margin-bottom: 0.5rem;
}
.alert-summary-total {
    font-size: 0.82rem;
    color: var(--mw-text-muted);
}

.alert-filter-bar {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.alert-filter {
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid var(--mw-border-glass);
    background: transparent;
    color: var(--mw-text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}
.alert-filter:hover {
    border-color: rgba(var(--mw-accent-rgb), 0.3);
    color: var(--mw-accent);
}
.alert-filter.active {
    background: rgba(var(--mw-accent-rgb), 0.12);
    color: var(--mw-accent);
    border-color: rgba(var(--mw-accent-rgb), 0.25);
    font-weight: 600;
}

/* Alert row colored borders */
.alert-row-buy { border-left: 2px solid var(--mw-green); }
.alert-row-sell { border-left: 2px solid var(--mw-red); }
.alert-row-level { border-left: 2px solid var(--mw-accent); }

/* ── Reports grid ── */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.75rem;
}
.report-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--mw-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--mw-border-glass);
    border-radius: var(--mw-radius);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.report-card:hover {
    border-color: rgba(var(--mw-accent-rgb), 0.2);
    box-shadow: var(--mw-shadow-glow);
}
.report-card-icon { font-size: 1.5rem; flex-shrink: 0; }
.report-card-info { flex: 1; min-width: 0; }
.report-card-name {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.report-card-meta {
    font-size: 0.72rem;
    color: var(--mw-text-muted);
}
.report-card-dot { margin: 0 0.3rem; }
.report-download-btn {
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(var(--mw-accent-rgb), 0.25);
    background: rgba(var(--mw-accent-rgb), 0.08);
    color: var(--mw-accent);
    border-radius: var(--mw-radius-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.report-download-btn:hover {
    background: rgba(var(--mw-accent-rgb), 0.18);
    border-color: rgba(var(--mw-accent-rgb), 0.4);
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--mw-text-muted);
    background: var(--mw-bg-glass);
    border: 1px dashed var(--mw-border-glass);
    border-radius: var(--mw-radius);
}
.empty-state p { margin-bottom: 0.3rem; font-size: 0.95rem; }
.empty-state small { font-size: 0.78rem; }

/* ── Alerts section (collapsible) ── */
.alerts-section { margin-top: 0.5rem; }
.alerts-section summary { cursor: pointer; list-style: none; }
.alerts-section summary h5 { display: inline; }

.alerts-table td {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(26,37,53,0.5);
}

.alerts-table.dense td {
    padding: 0.15rem 0.4rem;
}

/* ── Asset detail page ── */
.asset-hero {
    background: var(--mw-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--mw-border-glass);
    border-radius: var(--mw-radius);
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
    box-shadow: var(--mw-shadow-card);
}

.asset-hero-content {
    margin-top: 0.3rem;
}

.asset-hero h3 { margin-bottom: 0.15rem; font-size: 1.1rem; }

.asset-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.price-large {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: "SF Mono", "Cascadia Code", "Fira Code", monospace;
    color: var(--mw-text);
}

.back-link {
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--mw-text-muted);
    transition: color 0.15s;
}
.back-link:hover { color: var(--mw-accent); }

.refresh-btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
    cursor: pointer;
    border: 1px solid rgba(var(--mw-accent-rgb), 0.25);
    background: rgba(var(--mw-accent-rgb), 0.08);
    color: var(--mw-accent);
    border-radius: 6px;
}
.refresh-btn:hover {
    background: rgba(var(--mw-accent-rgb), 0.15);
    border-color: rgba(var(--mw-accent-rgb), 0.4);
}

/* ── Timeframe toggles ── */
.timeframe-toggles {
    display: flex;
    gap: 0.2rem;
    margin-bottom: 0.3rem;
}

.tf-btn {
    padding: 0.25rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid var(--mw-border-glass);
    background: transparent;
    color: var(--mw-text-muted);
    cursor: pointer;
    border-radius: var(--mw-radius-sm);
    transition: all 0.15s ease;
}

.tf-btn:hover { border-color: rgba(var(--mw-accent-rgb), 0.4); color: var(--mw-accent); background: rgba(var(--mw-accent-rgb), 0.06); }
.tf-btn.active { background: rgba(var(--mw-accent-rgb), 0.15); color: var(--mw-accent); border-color: rgba(var(--mw-accent-rgb), 0.3); font-weight: 600; }

/* ── Chart container ── */
.chart-container {
    position: relative;
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--mw-border-glass);
    border-radius: var(--mw-radius);
    margin-bottom: 0.85rem;
    min-height: 550px;
    overflow: hidden;
}

.chart-loading {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, var(--mw-bg-card-solid) 25%, rgba(255, 255, 255, 0.03) 50%, var(--mw-bg-card-solid) 75%);
    background-size: 200% 100%;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--mw-text-muted);
    font-size: 0.85rem;
    border-radius: var(--mw-radius);
}

.chart-loading.active {
    display: flex;
    animation: shimmer 1.8s ease-in-out infinite;
}

/* ── Levels table ── */
.levels-table { width: 100%; }
.levels-table td {
    padding: 0.25rem 0.45rem;
    font-size: 0.82rem;
}
.levels-table td:last-child {
    text-align: right;
    font-family: "SF Mono", "Cascadia Code", "Fira Code", monospace;
    font-weight: 600;
}

/* Colored left-border accents for level rows */
.level-row-key td:first-child { border-left: 2px solid var(--mw-accent); padding-left: 0.6rem; }
.level-row-buy td:first-child { border-left: 2px solid var(--mw-green); padding-left: 0.6rem; }
.level-row-sell td:first-child { border-left: 2px solid var(--mw-red); padding-left: 0.6rem; }
.level-divider td {
    padding: 0.15rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Toast notifications ── */
#toast-container {
    position: fixed;
    top: 2.5rem;
    right: 0.75rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.toast {
    background: var(--mw-bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--mw-border-glass);
    border-left: 3px solid var(--mw-accent);
    padding: 0.6rem 0.85rem;
    border-radius: var(--mw-radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    animation: slideIn 0.25s ease-out;
    max-width: 320px;
    font-size: 0.8rem;
}

.toast.alert-buy { border-left-color: var(--mw-green); }
.toast.alert-sell { border-left-color: var(--mw-red); }
.toast.alert-info { border-left-color: var(--mw-yellow); }

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

/* ── Shimmer loading animation ── */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--mw-bg-card-solid) 25%, rgba(255, 255, 255, 0.04) 50%, var(--mw-bg-card-solid) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
    border-radius: var(--mw-radius-sm);
}

/* ── Page content fade-in ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

main { animation: fadeInUp 0.3s ease-out; }

/* ── Focus-visible states ── */
:focus-visible {
    outline: 2px solid rgba(var(--mw-accent-rgb), 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Button hover lift ── */
button:not(.wl-remove-btn):not(.legend-close):not(.add-dialog-close):not(.nav-toggle):not(.disclaimer-dismiss):hover {
    transform: translateY(-1px);
}

/* ── Card hover elevation ── */
.report-card:hover,
article:hover {
    transform: translateY(-1px);
}

/* ── HTMX indicator ── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }

/* ── Footer (multi-line, professional) ── */
footer {
    border-top: 1px solid var(--mw-border-glass);
    margin-top: 2rem;
    padding: 0.85rem 0 0.6rem;
}

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

.footer-left, .footer-center, .footer-right {
    font-size: 0.7rem;
}

.footer-center {
    text-align: center;
}

.footer-right a {
    color: var(--mw-text-muted);
    text-decoration: underline;
}

.footer-legal {
    text-align: center;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.65rem;
}

.footer-sources .muted {
    font-size: 0.65rem;
}

/* ── Auth pages (login, register, forgot/reset password) ── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--mw-bg-dark);
    background-image: radial-gradient(ellipse at 50% 20%, rgba(var(--mw-accent-rgb), 0.06) 0%, transparent 60%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    background: var(--mw-bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--mw-border-glass);
    border-radius: var(--mw-radius);
    box-shadow: var(--mw-shadow-card), 0 0 40px rgba(var(--mw-accent-rgb), 0.05);
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.8rem;
}
.auth-brand .brand-icon { font-size: 2.5rem; }
.auth-brand .brand-text {
    display: block;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 0.5rem;
    background: var(--mw-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-error {
    color: var(--mw-red);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.85rem;
}

/* Auth form inputs */
.auth-page input[type="text"],
.auth-page input[type="password"],
.auth-page input[type="email"] {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--mw-border-glass);
    border-radius: var(--mw-radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-page input:focus {
    border-color: rgba(var(--mw-accent-rgb), 0.5);
    box-shadow: 0 0 0 3px rgba(var(--mw-accent-rgb), 0.1);
}

/* Auth submit button */
.auth-page button[type="submit"] {
    background: var(--mw-gradient-accent);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: var(--mw-radius-sm);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.auth-page button[type="submit"]:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ── Invite status pills ── */
.invite-status-registered {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(var(--mw-green-rgb), 0.12);
    color: var(--mw-green);
}
.invite-status-pending {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(107, 127, 146, 0.12);
    color: var(--mw-text-muted);
}

/* ── Tier badges ── */
.tier-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
}
.tier-1 {
    background: rgba(107, 127, 146, 0.12);
    color: var(--mw-text-muted);
}
.tier-2 {
    background: rgba(var(--mw-accent-rgb), 0.1);
    color: var(--mw-accent);
}
.tier-3 {
    background: rgba(255, 171, 64, 0.12);
    color: var(--mw-yellow);
}

/* ── User active/suspended status pills ── */
.status-active {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(var(--mw-green-rgb), 0.12);
    color: var(--mw-green);
}
.status-suspended {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(var(--mw-red-rgb), 0.1);
    color: var(--mw-red);
}

/* ── Admin stats bar ── */
.admin-stats-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.stat-chip {
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--mw-bg-card);
    border: 1px solid var(--mw-border-glass);
    color: var(--mw-text-muted);
}
.stat-chip.highlight {
    color: var(--mw-yellow);
    border-color: rgba(255, 171, 64, 0.25);
}

/* ── Small action buttons ── */
.btn-sm {
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    border-radius: 5px;
    cursor: pointer;
    background: var(--mw-bg-card);
    border: 1px solid var(--mw-border-glass);
    color: var(--mw-text);
}
.btn-sm:hover {
    background: rgba(var(--mw-accent-rgb), 0.08);
    border-color: rgba(var(--mw-accent-rgb), 0.25);
}
.btn-danger {
    background: rgba(var(--mw-red-rgb), 0.08);
    border-color: rgba(var(--mw-red-rgb), 0.2);
    color: var(--mw-red);
}
.btn-danger:hover {
    background: rgba(var(--mw-red-rgb), 0.16);
}

/* ── Disclaimer page ── */
.disclaimer-page {
    max-width: 800px;
    margin: 0 auto;
}

.disclaimer-page section {
    margin-bottom: 1.5rem;
}

.disclaimer-page h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--mw-accent);
}

.disclaimer-page ul {
    padding-left: 1.2rem;
}

.disclaimer-page li {
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

/* ── Last-update indicator ── */
.last-update {
    font-size: 0.65rem;
    color: var(--mw-text-muted);
    margin-left: auto;
}

.last-update .fresh { color: var(--mw-green); }
.last-update .stale { color: var(--mw-yellow); }

/* ── Data freshness badge in tables ── */
.freshness-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 2px;
}

.freshness-dot.fresh { background: var(--mw-green); }
.freshness-dot.medium { background: var(--mw-yellow); }
.freshness-dot.stale { background: var(--mw-red); }

/* ── Legend button & dialog ── */
.legend-btn {
    background: transparent;
    border: 1.5px solid var(--mw-text-muted);
    color: var(--mw-text-muted);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: border-color 0.2s, color 0.2s;
}
.legend-btn:hover {
    border-color: var(--mw-accent);
    color: var(--mw-accent);
}

.legend-dialog {
    background: var(--mw-card-bg, #1e1e2e);
    color: var(--mw-text, #cdd6f4);
    border: 1px solid var(--mw-border, #45475a);
    border-radius: 0.75rem;
    padding: 0;
    max-width: 600px;
    width: 92vw;
    max-height: 85vh;
    overflow: hidden;
    margin: auto;
    top: 5vh;
}
.legend-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
}
.legend-dialog header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--mw-border, #45475a);
    margin: 0;
}
.legend-dialog header h5 {
    margin: 0;
    font-size: 1rem;
}
.legend-close {
    background: none;
    border: none;
    color: var(--mw-text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}
.legend-close:hover { color: var(--mw-text); }

.legend-body {
    padding: 0.75rem 1rem 1rem;
    overflow-y: auto;
    max-height: calc(85vh - 3.5rem);
}
.legend-body h6 {
    margin: 0.75rem 0 0.3rem;
    font-size: 0.8rem;
    color: var(--mw-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.legend-body h6:first-child { margin-top: 0; }

.legend-note {
    font-size: 0.75rem;
    color: var(--mw-text-muted);
    background: rgba(255,255,255,0.04);
    border-left: 3px solid var(--mw-accent, #89b4fa);
    padding: 0.4rem 0.6rem;
    margin: 0.5rem 0;
    border-radius: 0.25rem;
    line-height: 1.4;
}
.legend-table {
    width: 100%;
    font-size: 0.78rem;
    border-collapse: collapse;
    margin-bottom: 0.25rem;
}
.legend-table td {
    padding: 0.2rem 0.5rem 0.2rem 0;
    vertical-align: middle;
    border: none;
}
.legend-table td:first-child {
    white-space: nowrap;
    width: 1%;
}
/* Inline freshness dots in legend need visible size */
.legend-table .freshness-dot {
    width: 8px;
    height: 8px;
    vertical-align: middle;
}
.legend-table .trend-dot {
    display: inline-block;
    vertical-align: middle;
}

/* ── Trust bar (data source badges in footer) ── */
.trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-bottom: 0.3rem;
}

.trust-label {
    font-size: 0.62rem;
    color: var(--mw-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.trust-badge {
    font-size: 0.65rem;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--mw-text-muted);
    font-weight: 500;
}

/* ── Warm accent button (for action CTAs) ── */
.btn-warm {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(var(--mw-warm-rgb), 0.3);
    background: rgba(var(--mw-warm-rgb), 0.1);
    color: var(--mw-warm);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-warm:hover {
    background: rgba(var(--mw-warm-rgb), 0.2);
    border-color: rgba(var(--mw-warm-rgb), 0.5);
    transform: translateY(-1px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .asset-header { flex-direction: column; }
    .grid { grid-template-columns: 1fr; }
    .timeframe-toggles { flex-wrap: wrap; }
    .mood-row { flex-wrap: wrap; gap: 0.5rem; }
    .disclaimer-bar { font-size: 0.6rem; padding: 0.25rem 0.5rem; }
    .footer-content { flex-direction: column; text-align: center; }
    .trust-bar { flex-wrap: wrap; gap: 0.35rem; }
    .trust-badge { font-size: 0.6rem; padding: 0.12rem 0.4rem; }

    /* Ticker: hide on phones */
    .ticker-strip { display: none; }

    /* Hero stats: 2-column on mobile */
    .hero-stats { grid-template-columns: 1fr 1fr; gap: 0.45rem; }
    .stat-card { padding: 0.55rem 0.7rem; }
    .stat-value { font-size: 1.1rem; }
    .stat-label { font-size: 0.58rem; }
    .stat-sub { font-size: 0.6rem; }

    /* Horizon cards — uniform 2×2 grid */
    .horizon-bar { display: grid; grid-template-columns: 1fr 1fr; }
    .horizon-card { min-width: unset; width: 100%; }

    /* Chart — compact height on mobile */
    .chart-container { min-height: unset; }
    #chart { height: 320px !important; }

    /* ── Mobile asset card layout ── */
    .asset-table.dense thead { display: none; }
    .asset-table.dense tbody tr.asset-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.3rem 0.35rem;
        background: var(--mw-bg-glass);
        border: 1px solid var(--mw-border-glass);
        border-radius: var(--mw-radius-sm);
        padding: 0.6rem 0.7rem;
        margin-bottom: 0.5rem;
        border-left: 2px solid transparent;
        position: relative;
    }
    .asset-table.dense tbody tr.asset-row:hover { border-left-color: var(--mw-accent); }
    .asset-table.dense td {
        border-bottom: none;
        padding: 0.1rem 0;
        font-size: 0.72rem;
    }

    /* Row 1: Asset name (cols 1-3) + Price (col 4, right-aligned) */
    .asset-table.dense td.col-sym {
        grid-column: 1 / 4;
        grid-row: 1;
        padding-bottom: 0.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .asset-table.dense td.col-price {
        grid-column: 4;
        grid-row: 1;
        text-align: right;
        font-size: 0.85rem;
        font-weight: 600;
        padding-bottom: 0.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        align-self: center;
    }

    /* Row 2: T P S C horizon score dots */
    .asset-table.dense td[data-label="T"],
    .asset-table.dense td[data-label="P"],
    .asset-table.dense td[data-label="S"],
    .asset-table.dense td[data-label="C"] {
        grid-row: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.1rem;
    }
    .asset-table.dense td[data-label="T"] { grid-column: 1; }
    .asset-table.dense td[data-label="P"] { grid-column: 2; }
    .asset-table.dense td[data-label="S"] { grid-column: 3; }
    .asset-table.dense td[data-label="C"] { grid-column: 4; }
    .asset-table.dense td.col-hz::before {
        content: attr(data-label);
        font-size: 0.55rem;
        color: var(--mw-text-muted);
        text-transform: uppercase;
    }

    /* Row 3: Support (span 2) + Resistance + Market trend */
    .asset-table.dense td[data-label="Supp"] {
        grid-column: 1 / span 2;
        grid-row: 3;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    .asset-table.dense td[data-label="Res"] {
        grid-column: 3 / span 2;
        grid-row: 3;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    .asset-table.dense td.col-trend {
        grid-column: 4;
        grid-row: 5;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .asset-table.dense td[data-label="Supp"]::before {
        content: "SUP";
        font-size: 0.55rem;
        color: var(--mw-text-muted);
    }
    .asset-table.dense td[data-label="Res"]::before {
        content: "RES";
        font-size: 0.55rem;
        color: var(--mw-text-muted);
    }

    /* Row 4: Buy1 Buy2 Buy3 + Alert icon */
    .asset-table.dense td[data-label="Buy1"] { grid-column: 1; grid-row: 4; }
    .asset-table.dense td[data-label="Buy2"] { grid-column: 2; grid-row: 4; }
    .asset-table.dense td[data-label="Buy3"] { grid-column: 3; grid-row: 4; }
    .asset-table.dense td.col-alert {
        grid-column: 4;
        grid-row: 4;
        display: grid;
        place-items: center;
    }
    .asset-table.dense td[data-label="Buy1"]::before,
    .asset-table.dense td[data-label="Buy2"]::before,
    .asset-table.dense td[data-label="Buy3"]::before {
        font-size: 0.55rem;
        color: rgba(0, 230, 118, 0.7);
        display: block;
        line-height: 1.3;
    }
    .asset-table.dense td[data-label="Buy1"]::before { content: "B1"; }
    .asset-table.dense td[data-label="Buy2"]::before { content: "B2"; }
    .asset-table.dense td[data-label="Buy3"]::before { content: "B3"; }

    /* Row 5: Sell1 Sell2 Sell3 + Remove button */
    .asset-table.dense td[data-label="Sell1"] { grid-column: 1; grid-row: 5; }
    .asset-table.dense td[data-label="Sell2"] { grid-column: 2; grid-row: 5; }
    .asset-table.dense td[data-label="Sell3"] { grid-column: 3; grid-row: 5; }
    .asset-table.dense td.col-remove {
        display: none;
    }
    .asset-table.dense td[data-label="Sell1"]::before,
    .asset-table.dense td[data-label="Sell2"]::before,
    .asset-table.dense td[data-label="Sell3"]::before {
        font-size: 0.55rem;
        color: rgba(255, 82, 82, 0.7);
        display: block;
        line-height: 1.3;
    }
    .asset-table.dense td[data-label="Sell1"]::before { content: "S1"; }
    .asset-table.dense td[data-label="Sell2"]::before { content: "S2"; }
    .asset-table.dense td[data-label="Sell3"]::before { content: "S3"; }

    /* Zone cells: flex column for label + price + proximity % */
    .asset-table.dense td.col-zone {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.72rem;
    }

    /* Show Support/Resistance (was hidden in old layout) */
    .asset-table.dense td.col-level { display: flex; }

    /* Hide: MCap, Conviction badge, and Sparkline */
    .asset-table.dense td.col-mcap,
    .asset-table.dense td.col-conv,
    .asset-table.dense td.col-spark,
    .asset-table.dense th.col-spark { display: none; }

    .wl-remove-btn { opacity: 0.6; }

    /* Hamburger nav */
    .nav-toggle { display: flex !important; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(11, 17, 32, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--mw-border-glass);
        padding: 0.5rem 1rem;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }
    .nav-links.open { display: block; }
    .nav-links ul {
        flex-direction: column;
        gap: 0.15rem;
    }
    .nav-links ul li { width: 100%; }
    .nav-links ul li a {
        display: block;
        padding: 0.5rem 0.75rem;
        border-radius: 6px;
    }
    .nav-links ul li a:hover { background: rgba(var(--mw-accent-rgb), 0.06); }
}

@media (max-width: 480px) {
    .asset-table.dense { font-size: 0.65rem; }
    .brand-text { font-size: 0.85rem; }
}

/* ---------- Asset identity (logo + name + ticker) ---------- */
.asset-id {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    min-width: 0;
}
.asset-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    flex-shrink: 0;
}
img.asset-logo {
    object-fit: contain;
}
.stock-logo {
    background: linear-gradient(135deg, #313244, #45475a);
    color: var(--mw-text-muted);
    font-size: 0.42rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.crypto-logo-text {
    background: linear-gradient(135deg, #45475a, #585b70);
    color: var(--mw-text-muted);
    font-size: 0.42rem;
    font-weight: 700;
}
.asset-name {
    font-weight: 600;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 8rem;
}
.asset-ticker {
    color: var(--mw-text-muted);
    font-size: 0.68rem;
    font-weight: 400;
}

/* ---------- Watchlist UI ---------- */
.wl-add-btn {
    background: var(--mw-warm);
    color: #1e1e2e;
    border: none;
    border-radius: 50%;
    width: 1.6rem;
    height: 1.6rem;
    font-size: 1.15rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
}
.wl-add-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(var(--mw-warm-rgb), 0.4);
}
.wl-add-btn-large {
    background: var(--mw-warm);
    color: #1e1e2e;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.wl-add-btn-large:hover {
    transform: scale(1.03);
    box-shadow: 0 0 12px rgba(var(--mw-warm-rgb), 0.3);
}
.wl-count {
    font-weight: normal;
    color: var(--mw-text-muted);
    font-size: 0.75rem;
}
.wl-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--mw-text-muted);
    border: 1px dashed var(--mw-border, #45475a);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}
.wl-empty-state p { margin-bottom: 0.75rem; }

/* Remove button */
.col-remove { width: 1.6rem; padding: 0 !important; }
.wl-remove-btn {
    background: none;
    border: none;
    color: var(--mw-text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.1rem 0.25rem;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.asset-row:hover .wl-remove-btn { opacity: 0.7; }
.wl-remove-btn:hover { color: #f38ba8; opacity: 1 !important; }
.wl-removing { opacity: 0.4; transition: opacity 0.2s, max-height 0.3s, padding 0.3s; overflow: hidden; }

/* ---------- Add asset dialog ---------- */
.add-dialog {
    background: var(--mw-card-bg, #1e1e2e);
    color: var(--mw-text, #cdd6f4);
    border: 1px solid var(--mw-border, #45475a);
    border-radius: 1rem;
    padding: 0;
    max-width: 520px;
    width: 92vw;
    max-height: 80vh;
    overflow: hidden;
    margin: auto;
    top: 8vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.add-dialog::backdrop {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
}
.add-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mw-border, #45475a);
}
.add-dialog-header h5 { margin: 0; font-size: 1.05rem; }
.add-dialog-close {
    background: none;
    border: none;
    color: var(--mw-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
    border-radius: 0.3rem;
    transition: background 0.15s;
}
.add-dialog-close:hover { background: rgba(255,255,255,0.08); color: var(--mw-text); }

.add-dialog-body {
    padding: 1rem 1.25rem 1.25rem;
    overflow-y: auto;
    max-height: calc(80vh - 4rem);
}

/* Search field with icon */
.add-dialog-search-wrap {
    position: relative;
    margin-bottom: 0.75rem;
}
.add-dialog-search {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: var(--mw-bg, #11111b);
    color: var(--mw-text, #cdd6f4);
    border: 1.5px solid var(--mw-border, #45475a);
    border-radius: 0.6rem;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.add-dialog-search:focus {
    border-color: var(--mw-accent, #89b4fa);
    box-shadow: 0 0 0 2px rgba(137, 180, 250, 0.15);
}
.add-dialog-hint {
    text-align: center;
    color: var(--mw-text-muted);
    font-size: 0.78rem;
    padding: 1.5rem 0;
}

/* Results list */
.add-dialog-results {
    max-height: 340px;
    overflow-y: auto;
}
.add-dialog-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.75rem;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(69, 71, 90, 0.4);
    color: var(--mw-text, #cdd6f4);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.12s;
}
.add-dialog-item:hover {
    background: rgba(137, 180, 250, 0.08);
}
.add-dialog-item:disabled {
    opacity: 0.5;
    cursor: default;
}
.add-dialog-item-added {
    background: rgba(166, 227, 161, 0.08) !important;
}
.add-dialog-item-logo {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}
.add-dialog-item-logo-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: 700;
    flex-shrink: 0;
}
.add-dialog-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.add-dialog-item-symbol {
    font-weight: 700;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.ac-exchange-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--mw-text-muted);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px;
    padding: 0 0.3rem;
    letter-spacing: 0.02em;
    line-height: 1.5;
}
.ac-exchange-any {
    color: var(--mw-warm, #ff7c43);
    border-color: rgba(255,124,67,0.3);
    background: rgba(255,124,67,0.08);
}
.ac-direct-entry {
    border-top: 1px dashed rgba(255,255,255,0.1);
    margin-top: 2px;
    opacity: 0.9;
}
.add-dialog-item-name {
    color: var(--mw-text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.add-dialog-item-action {
    color: var(--mw-accent, #89b4fa);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
    transition: background 0.12s;
}
.add-dialog-item:hover .add-dialog-item-action {
    background: rgba(137, 180, 250, 0.12);
}
.add-dialog-item-action.wl-added {
    color: #a6e3a1;
}
.add-dialog-no-results {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--mw-text-muted);
    font-size: 0.85rem;
}

/* ---------- Remove toast ---------- */
.wl-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background: var(--mw-card-bg, #1e1e2e);
    border: 1px solid var(--mw-border, #45475a);
    border-radius: 0.75rem;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}
.wl-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.wl-toast-btn {
    border: none;
    border-radius: 0.4rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.12s;
}
.wl-toast-btn:hover { opacity: 0.85; }
.wl-toast-yes {
    background: #f38ba8;
    color: #1e1e2e;
}
.wl-toast-no {
    background: var(--mw-border, #45475a);
    color: var(--mw-text, #cdd6f4);
}

/* ── Zone proximity indicator ── */
.zone-dist {
    font-size: 0.55rem;
    color: var(--mw-text-muted);
    display: block;
    line-height: 1.2;
    opacity: 0.75;
}
/* Buy zone proximity tint (green) */
td.col-zone.buy-price.zone-hot  { background: rgba(0, 230, 118, 0.13); border-radius: 3px; animation: zonePulseGreen 2.5s ease-in-out infinite; }
td.col-zone.buy-price.zone-warm { background: rgba(0, 230, 118, 0.06); border-radius: 3px; }
/* Sell zone proximity tint (red) */
td.col-zone.sell-price.zone-hot  { background: rgba(255, 82, 82, 0.13); border-radius: 3px; animation: zonePulseRed 2.5s ease-in-out infinite; }
td.col-zone.sell-price.zone-warm { background: rgba(255, 82, 82, 0.06); border-radius: 3px; }

@keyframes zonePulseGreen {
    0%, 100% { box-shadow: none; background: rgba(0, 230, 118, 0.08); }
    50% { box-shadow: 0 0 8px rgba(0, 230, 118, 0.2); background: rgba(0, 230, 118, 0.16); }
}

@keyframes zonePulseRed {
    0%, 100% { box-shadow: none; background: rgba(255, 82, 82, 0.08); }
    50% { box-shadow: 0 0 8px rgba(255, 82, 82, 0.2); background: rgba(255, 82, 82, 0.16); }
}

/* ── AI Chat Widget ──────────────────────────────────────────────────────── */

#chat-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    background: var(--mw-warm);
    color: white;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    border: none;
    box-shadow: 0 4px 18px rgba(255, 124, 67, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}
#chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 26px rgba(255, 124, 67, 0.6);
}

.chat-panel {
    position: fixed;
    bottom: 5.8rem;
    right: 1.5rem;
    width: 340px;
    max-height: 480px;
    background: var(--mw-bg-card-solid);
    border: 1px solid var(--mw-border-glass);
    border-radius: var(--mw-radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    display: none;
    flex-direction: column;
    z-index: 999;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.chat-panel.open { display: flex; }

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--mw-border-glass);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--mw-text);
    flex-shrink: 0;
}
.chat-header-actions {
    display: flex;
    gap: 0.3rem;
}
.chat-header-actions button {
    background: none;
    border: none;
    color: var(--mw-text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    line-height: 1;
    margin: 0;
    width: auto;
    transition: color 0.15s;
}
.chat-header-actions button:hover { color: var(--mw-text); }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

.chat-msg {
    max-width: 85%;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1.55;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.chat-msg.user {
    align-self: flex-end;
    background: rgba(var(--mw-warm-rgb), 0.18);
    color: var(--mw-text);
    border-bottom-right-radius: 3px;
}
.chat-msg.bot {
    align-self: flex-start;
    background: var(--mw-bg-glass);
    color: var(--mw-text);
    border: 1px solid var(--mw-border-glass);
    border-bottom-left-radius: 3px;
}
.chat-msg.thinking {
    color: var(--mw-text-muted);
    font-style: italic;
    border: 1px dashed var(--mw-border-glass);
}

.chat-input-row {
    display: flex;
    gap: 0.4rem;
    padding: 0.6rem;
    border-top: 1px solid var(--mw-border-glass);
    margin: 0;
    flex-shrink: 0;
}
.chat-input-row input[type="text"] {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
    margin: 0;
    height: auto;
}
.chat-input-row button[type="submit"] {
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--mw-warm);
    color: white;
    border: none;
    border-radius: var(--mw-radius-sm);
    cursor: pointer;
    margin: 0;
    width: auto;
    flex-shrink: 0;
    transition: background 0.15s;
}
.chat-input-row button[type="submit"]:hover { background: #ff9055; }
.chat-input-row button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .chat-panel {
        width: calc(100vw - 2rem);
        right: 1rem;
        left: 1rem;
        bottom: 5.5rem;
    }
    #chat-fab { bottom: 1rem; right: 1rem; }
}

/* ── Romanian Tax Information Page ──────────────────────────────────────── */

.tax-disclaimer-box {
    background: rgba(255, 171, 64, 0.07);
    border: 1px solid rgba(255, 171, 64, 0.22);
    border-left: 3px solid var(--mw-yellow);
    border-radius: var(--mw-radius-sm);
    padding: 0.85rem 1.1rem;
    font-size: 0.83rem;
    color: var(--mw-text);
    margin-bottom: 1.4rem;
    line-height: 1.65;
}

.tax-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--mw-text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.tax-verified-badge .badge-stale {
    color: var(--mw-yellow);
    font-weight: 600;
}

.tax-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 640px) { .tax-comparison-grid { grid-template-columns: 1fr; } }

.tax-broker-card {
    background: var(--mw-bg-glass);
    border: 1px solid var(--mw-border-glass);
    border-radius: var(--mw-radius-sm);
    padding: 1rem;
}
.tax-broker-card h6 { margin: 0 0 0.4rem; font-size: 0.85rem; color: var(--mw-accent); }
.tax-broker-card .rate-big {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.1;
}
.tax-broker-card.domestic .rate-big { color: var(--mw-green); }
.tax-broker-card.foreign .rate-big { color: var(--mw-yellow); }
.tax-broker-card p { font-size: 0.78rem; color: var(--mw-text-muted); margin: 0.4rem 0 0; }

.tax-platform-list { list-style: none; padding: 0; margin: 0; }

details.tax-platform-item {
    border-bottom: 1px solid var(--mw-border-glass);
    padding: 0;
}
details.tax-platform-item:last-child { border-bottom: none; }

details.tax-platform-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.65rem 0;
    list-style: none;
    font-size: 0.85rem;
    font-weight: 600;
    gap: 0.75rem;
    user-select: none;
}
details.tax-platform-item summary::-webkit-details-marker { display: none; }
details.tax-platform-item summary::before {
    content: "▶";
    font-size: 0.6rem;
    color: var(--mw-text-muted);
    margin-right: 0.5rem;
    transition: transform 0.15s;
    flex-shrink: 0;
}
details.tax-platform-item[open] summary::before { transform: rotate(90deg); }

.tax-platform-body {
    padding: 0.4rem 0 0.9rem 1.3rem;
    font-size: 0.8rem;
    color: var(--mw-text);
    line-height: 1.65;
}
.tax-platform-body ol, .tax-platform-body ul {
    padding-left: 1.2rem;
    margin: 0.4rem 0;
}
.tax-platform-body li { margin: 0.2rem 0; }

.tax-withheld-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}
.tax-withheld-badge.green {
    background: rgba(var(--mw-green-rgb), 0.13);
    color: var(--mw-green);
}
.tax-withheld-badge.red {
    background: rgba(var(--mw-red-rgb), 0.11);
    color: var(--mw-red);
}

.tax-stale-banner {
    background: rgba(255, 171, 64, 0.1);
    border: 1px solid rgba(255, 171, 64, 0.3);
    border-radius: var(--mw-radius-sm);
    padding: 0.7rem 1rem;
    font-size: 0.82rem;
    color: var(--mw-yellow);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}
