/* ========================================
   BQTS 3.0 - Grafana-Inspired Data Dashboard
   Single-page tournament monitoring system
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Canvas & Surface */
    --bg-canvas: #111217;
    --bg-surface: #181b1f;
    --bg-surface-2: #1f2229;
    --bg-surface-3: #2a2e37;

    /* Text */
    --text-primary: #e0e0e0;
    --text-secondary: #8e8e8e;
    --text-muted: #6b6b6b;

    /* Data colors */
    --green: #73bf69;
    --red: #f2495c;
    --blue: #5c9cf5;
    --yellow: #fade2a;
    --orange: #ff9830;
    --purple: #b877d9;
    --cyan: #56c0d8;

    /* Border */
    --border: #2a2e37;
    --border-hover: #3d4150;

    /* Functional */
    --panel-bg: var(--bg-surface);
    --panel-border: var(--border);
    --panel-header-bg: var(--bg-surface-2);

    /* Transitions */
    --transition-fast: 0.12s ease;
    --transition-normal: 0.2s ease;
}

/* ========================================
   Reset & Base
   ======================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 14px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-canvas);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.mono, .data {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

/* ========================================
   TopBar (36px)
   ======================================== */

.topbar {
    height: 36px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    font-size: 12px;
}

.topbar-logo {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    margin-right: 8px;
}

.topbar-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.topbar-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.topbar-dot.online { background: var(--green); }
.topbar-dot.offline { background: var(--red); }
.topbar-dot.warning { background: var(--yellow); }

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-regime {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.topbar-regime.trending_up { background: rgba(115,191,105,0.15); color: var(--green); }
.topbar-regime.trending_down { background: rgba(242,73,92,0.15); color: var(--red); }
.topbar-regime.ranging { background: rgba(107,107,107,0.2); color: var(--text-secondary); }
.topbar-regime.volatile { background: rgba(255,152,48,0.15); color: var(--orange); }
.topbar-regime.unknown { background: rgba(107,107,107,0.15); color: var(--text-muted); }

.topbar-tier {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.topbar-tier.t0 { background: rgba(107,107,107,0.2); color: var(--text-secondary); }
.topbar-tier.t1 { background: rgba(92,156,245,0.15); color: var(--blue); }
.topbar-tier.t2 { background: rgba(184,119,217,0.15); color: var(--purple); }

/* ========================================
   TabBar (36px)
   ======================================== */

.tabbar {
    height: 36px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    padding: 0 16px;
    position: sticky;
    top: 36px;
    z-index: 99;
}

.tab {
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    text-decoration: none;
    user-select: none;
    white-space: nowrap;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--blue);
}

.tab-icon {
    font-size: 14px;
    line-height: 1;
}

.tab-spacer {
    flex: 1;
}

/* ========================================
   Content Area
   ======================================== */

.content {
    padding: 12px 16px;
    min-height: calc(100vh - 72px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   Panel (Grafana Widget)
   ======================================== */

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 32px;
    background: var(--panel-header-bg);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.panel-header-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-body {
    padding: 12px;
}

.panel-body.no-padding {
    padding: 0;
}

/* ========================================
   Grid Layout
   ======================================== */

.grid {
    display: grid;
    gap: 12px;
}

.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.grid-60-40 { grid-template-columns: 3fr 2fr; }
.grid-50-50 { grid-template-columns: 1fr 1fr; }

@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4,
    .grid-60-40, .grid-50-50 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Stat KPI Card
   ======================================== */

.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.kpi {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 12px 14px;
}

.kpi-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.kpi-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.kpi-value.positive { color: var(--green); }
.kpi-value.negative { color: var(--red); }

.kpi-delta {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

.kpi-delta.positive { color: var(--green); }
.kpi-delta.negative { color: var(--red); }

/* ========================================
   Data Table
   ======================================== */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    text-align: left;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface-2);
    white-space: nowrap;
    cursor: default;
    user-select: none;
}

.data-table th.sortable {
    cursor: pointer;
}

.data-table th.sortable:hover {
    color: var(--blue);
}

.data-table td {
    padding: 5px 10px;
    border-bottom: 1px solid rgba(42,46,55,0.6);
    vertical-align: middle;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .text-right {
    text-align: right;
}

.data-table .text-center {
    text-align: center;
}

/* ========================================
   Badge
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-pro { background: rgba(92,156,245,0.15); color: var(--blue); }
.badge-alpha { background: rgba(115,191,105,0.15); color: var(--green); }
.badge-swing { background: rgba(255,152,48,0.15); color: var(--orange); }

.badge-t0 { background: rgba(107,107,107,0.2); color: var(--text-secondary); }
.badge-t1 { background: rgba(92,156,245,0.15); color: var(--blue); }
.badge-t2 { background: rgba(184,119,217,0.15); color: var(--purple); }

.badge-live { background: rgba(115,191,105,0.2); color: var(--green); border: 1px solid rgba(115,191,105,0.3); }
.badge-off { background: rgba(107,107,107,0.2); color: var(--text-muted); }

/* ========================================
   Button
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface-2);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-green {
    background: rgba(115,191,105,0.15);
    border-color: rgba(115,191,105,0.3);
    color: var(--green);
}

.btn-green:hover {
    background: rgba(115,191,105,0.25);
}

.btn-red {
    background: rgba(242,73,92,0.15);
    border-color: rgba(242,73,92,0.3);
    color: var(--red);
}

.btn-red:hover {
    background: rgba(242,73,92,0.25);
}

.btn-blue {
    background: rgba(92,156,245,0.15);
    border-color: rgba(92,156,245,0.3);
    color: var(--blue);
}

.btn-blue:hover {
    background: rgba(92,156,245,0.25);
}

.btn-sm {
    padding: 3px 10px;
    font-size: 11px;
}

/* ========================================
   Direction (LONG/SHORT)
   ======================================== */

.side-long { color: var(--green); font-weight: 600; }
.side-short { color: var(--red); font-weight: 600; }

.pnl-positive { color: var(--green); font-weight: 600; }
.pnl-negative { color: var(--red); font-weight: 600; }
.pnl-neutral { color: var(--text-muted); }

/* ========================================
   Rank Medals
   ======================================== */

.rank-medal {
    display: inline-flex;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.rank-medal.gold { background: rgba(250,222,42,0.15); color: var(--yellow); }
.rank-medal.silver { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.rank-medal.bronze { background: rgba(205,127,50,0.15); color: #cd7f32; }

/* ========================================
   Variant Link
   ======================================== */

.variant-link {
    color: var(--blue);
    cursor: pointer;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.variant-link:hover {
    text-decoration: underline;
}

/* ========================================
   Filter Bar
   ======================================== */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-surface-2);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    font-size: 12px;
}

.filter-bar select,
.filter-bar input {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 3px 8px;
    font-size: 12px;
    font-family: inherit;
    outline: none;
}

.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--blue);
}

.filter-bar label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 8px;
}

.pagination button {
    padding: 3px 8px;
    border-radius: 3px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
}

.pagination button:hover {
    background: var(--bg-surface-3);
    color: var(--text-primary);
}

.pagination button.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

/* ========================================
   Distance Bars (TP/SL)
   ======================================== */

.dist-bar-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
}

.dist-bar {
    width: 40px;
    height: 4px;
    background: var(--bg-surface-3);
    border-radius: 2px;
    overflow: hidden;
}

.dist-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

.dist-bar-fill.tp { background: var(--green); }
.dist-bar-fill.sl { background: var(--red); }

/* ========================================
   TP Status
   ======================================== */

.tp-hit { color: var(--green); }
.tp-pending { color: var(--text-muted); }

/* ========================================
   Exit Reason
   ======================================== */

.exit-tp { color: var(--green); font-weight: 600; }
.exit-sl { color: var(--red); font-weight: 600; }
.exit-timeout { color: var(--text-muted); }
.exit-trail { color: var(--orange); font-weight: 600; }

/* ========================================
   Engine Badges
   ======================================== */

.engine-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.engine-badge.pro { background: rgba(92,156,245,0.15); color: var(--blue); }
.engine-badge.alpha { background: rgba(115,191,105,0.15); color: var(--green); }
.engine-badge.swing { background: rgba(255,152,48,0.15); color: var(--orange); }

/* ========================================
   Tier Badges
   ======================================== */

.tier-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.tier-badge.t0 { background: rgba(107,107,107,0.2); color: var(--text-secondary); }
.tier-badge.t1 { background: rgba(92,156,245,0.15); color: var(--blue); }
.tier-badge.t2 { background: rgba(184,119,217,0.15); color: var(--purple); }

/* ========================================
   Live Status Hero
   ======================================== */

.live-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    margin-bottom: 12px;
}

.live-hero.trading-active {
    border-color: rgba(115,191,105,0.3);
}

.live-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
}

.live-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.live-status-dot.on {
    background: var(--green);
    box-shadow: 0 0 6px rgba(115,191,105,0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}

.live-status-dot.off {
    background: var(--text-muted);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.live-hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
}

.live-hero-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-hero-actions {
    display: flex;
    gap: 6px;
}

/* ========================================
   Toggle Switch
   ======================================== */

.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.toggle-label {
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.toggle-label.selected {
    color: var(--text-primary);
}

.toggle {
    position: relative;
    width: 36px;
    height: 18px;
    cursor: pointer;
    display: inline-block;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-surface-3);
    border: 1px solid var(--border);
    border-radius: 9px;
    transition: background var(--transition-normal), border-color var(--transition-normal);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 1px;
    bottom: 1px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: transform var(--transition-normal), background var(--transition-normal);
}

.toggle input:checked + .toggle-slider {
    background: rgba(92,156,245,0.2);
    border-color: rgba(92,156,245,0.4);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(18px);
    background: var(--blue);
}

/* ========================================
   Slide Panel (Right Drawer)
   ======================================== */

.slide-panel-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
}

.slide-panel-overlay.active {
    display: block;
}

.slide-panel {
    position: fixed;
    top: 0;
    right: -560px;
    width: 560px;
    height: 100%;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    z-index: 201;
    overflow-y: auto;
    transition: right 0.25s ease;
}

.slide-panel.active {
    right: 0;
}

.slide-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface-2);
    position: sticky;
    top: 0;
    z-index: 1;
}

.slide-panel-header h3 {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.slide-panel-close {
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 4px;
    line-height: 1;
}

.slide-panel-close:hover {
    color: var(--text-primary);
}

.slide-panel-body {
    padding: 12px 16px;
}

/* ========================================
   Genome Grid
   ======================================== */

.genome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.genome-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    background: var(--bg-surface-2);
    border-radius: 2px;
    font-size: 11px;
}

.genome-item .key { color: var(--text-muted); }
.genome-item .val {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

/* ========================================
   Charts
   ======================================== */

.chart-container {
    position: relative;
    height: 220px;
}

.chart-container.small {
    height: 160px;
}

.chart-container.large {
    height: 300px;
}

/* ========================================
   Forms (Settings tab)
   ======================================== */

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 6px 10px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    border-color: var(--blue);
}

.form-input::placeholder {
    color: var(--text-muted);
}

input[type="checkbox"].form-checkbox {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    position: relative;
    vertical-align: middle;
}

input[type="checkbox"].form-checkbox:checked {
    background: var(--blue);
    border-color: var(--blue);
}

input[type="checkbox"].form-checkbox:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
}

/* ========================================
   Empty State
   ======================================== */

.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-surface-3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ========================================
   Utility Classes
   ======================================== */

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.text-yellow { color: var(--yellow); }
.text-orange { color: var(--orange); }
.text-purple { color: var(--purple); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

.w-full { width: 100%; }

.overflow-x-auto { overflow-x: auto; }

.section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

/* ========================================
   Promotion Pipeline
   ======================================== */

.pipeline {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pipeline-step {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    background: var(--bg-surface-2);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

.pipeline-step.active {
    background: rgba(92,156,245,0.15);
    color: var(--blue);
}

.pipeline-step.completed {
    background: rgba(115,191,105,0.15);
    color: var(--green);
}

.pipeline-arrow {
    color: var(--text-muted);
    font-size: 10px;
}

/* ========================================
   Heatmap Cell (Analytics)
   ======================================== */

.heatmap-cell {
    padding: 4px 6px;
    text-align: center;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    border-radius: 2px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .topbar {
        flex-wrap: wrap;
        height: auto;
        padding: 6px 12px;
    }

    .tabbar {
        overflow-x: auto;
        top: auto;
    }

    .tab {
        padding: 0 10px;
        font-size: 11px;
    }

    .content {
        padding: 8px 10px;
    }

    .kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .slide-panel {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .kpi-row {
        grid-template-columns: 1fr;
    }
}
