:root {
    --bg: #0d1117;
    --bg-elev: #151b24;
    --bg-soft: #1d2532;
    --text: #e7edf7;
    --text-muted: #9fb0c6;
    --line: #2a3445;
    --accent: #4ea1ff;
    --bull: #18c57f;
    --bear: #ff5d6d;
    --neutral: #8a9ab2;
}

body.app-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.app-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.app-sidebar {
    background: #0a0f16;
    border-right: 1px solid var(--line);
    padding: 20px 14px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4ea1ff, #6b7bff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.brand-text {
    font-weight: 700;
    letter-spacing: 0.3px;
}

.sidebar-link {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--text);
    background: var(--bg-soft);
}

.app-main {
    min-width: 0;
}

.app-topbar {
    border-bottom: 1px solid var(--line);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.topbar-title {
    margin: 0;
    font-size: 1.2rem;
}

.topbar-subtitle {
    margin: 4px 0 0;
    color: var(--text-muted);
}

.meta-pill {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--text-muted);
    margin-left: 6px;
}

.meta-link {
    text-decoration: none;
    display: inline-block;
}

.meta-link:hover {
    color: var(--text);
}

.app-content {
    padding: 22px;
}

.panel-card,
.metric-card {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.panel-title {
    font-size: 1rem;
    margin: 0 0 14px;
}

.table-dark {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--line);
    --bs-table-color: var(--text);
    --bs-table-hover-color: var(--text);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.03);
}

.trend-chip,
.signal-pill {
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.75rem;
    display: inline-block;
    margin: 1px 4px 1px 0;
}

.badge-bullish { background: rgba(24, 197, 127, 0.18); color: #67e6b0; }
.badge-bearish { background: rgba(255, 93, 109, 0.2); color: #ff9aa5; }
.badge-neutral { background: rgba(138, 154, 178, 0.2); color: #bdc8d8; }

.signal-breakout { background: rgba(78, 161, 255, 0.2); color: #8fc5ff; }
.signal-volume { background: rgba(255, 180, 76, 0.2); color: #ffc882; }
.signal-trend { background: rgba(24, 197, 127, 0.2); color: #72ecbb; }
.signal-momentum { background: rgba(160, 124, 255, 0.2); color: #cbb5ff; }
.signal-acceleration { background: rgba(94, 226, 222, 0.2); color: #8ef3ef; }
.signal-pullback { background: rgba(255, 222, 89, 0.18); color: #ffe28a; }
.signal-quality { background: rgba(120, 255, 168, 0.18); color: #9effc3; }

.price-large {
    font-size: 2rem;
    font-weight: 700;
}

.chart-wrap {
    width: 100%;
    height: 360px;
}

.metrics-list > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.metrics-list strong {
    color: var(--text);
}

.sticky-filter {
    position: sticky;
    top: 16px;
}

.sector-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.sector-chart-card {
    transition: border-color 120ms ease, transform 120ms ease;
}

.sector-card-link:hover .sector-chart-card {
    border-color: rgba(78, 161, 255, 0.55);
    transform: translateY(-1px);
}

.sector-mini-chart {
    width: 100%;
    height: 74px;
    margin-top: 6px;
}

@media (max-width: 991px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}
