:root {
    color-scheme: dark;
    --bg: #090d12;
    --bg-soft: #0c1219;
    --panel: #10171f;
    --panel-2: #131c25;
    --panel-hover: #17222d;
    --border: #26313d;
    --border-soft: #1c2731;
    --text: #f1f4f7;
    --muted: #8d98a6;
    --muted-2: #667280;
    --orange: #ff8a19;
    --orange-2: #ffb13b;
    --orange-soft: rgba(255, 138, 25, .12);
    --teal: #19d3b1;
    --teal-soft: rgba(25, 211, 177, .12);
    --red: #ff5145;
    --red-soft: rgba(255, 81, 69, .12);
    --shadow: 0 16px 38px rgba(0, 0, 0, .22);
    --sidebar-width: 230px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { font-size: 15px; background: var(--bg); }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 78% -20%, rgba(29, 50, 64, .30), transparent 38%),
        linear-gradient(145deg, #080c11, #0b1016 60%, #080d12);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.dashboard-shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: rgba(8, 13, 18, .95);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.brand {
    height: 86px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border-soft);
}

.brand-mark {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 138, 25, .62);
    border-radius: 12px;
    background: var(--orange-soft);
    color: var(--orange);
    font-size: 18px;
    box-shadow: 0 0 24px rgba(255, 138, 25, .09);
}

.brand-name { font-size: 1rem; font-weight: 750; letter-spacing: -.03em; white-space: nowrap; }
.sidebar-nav { display: grid; gap: 8px; padding: 24px 14px; }

.nav-item {
    position: relative;
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.nav-item i { width: 20px; color: var(--muted-2); text-align: center; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
.nav-item.is-active { color: var(--orange); border-color: rgba(255, 138, 25, .14); background: linear-gradient(90deg, rgba(255, 138, 25, .14), rgba(255, 138, 25, .035)); }
.nav-item.is-active::before { content: ""; position: absolute; left: -15px; top: 8px; width: 3px; height: 32px; border-radius: 0 4px 4px 0; background: var(--orange); box-shadow: 0 0 13px rgba(255, 138, 25, .45); }
.nav-item.is-active i { color: var(--orange); }

.sidebar-footer { margin-top: auto; padding: 20px 22px 24px; border-top: 1px solid var(--border-soft); }
.sidebar-status { display: flex; align-items: center; gap: 9px; font-size: .84rem; color: #c9d1d9; }
.sidebar-version { display: block; margin-top: 8px; color: var(--muted-2); font-size: .72rem; }

.status-dot { width: 8px; height: 8px; display: inline-block; flex: none; border-radius: 50%; }
.status-dot.is-online { background: var(--teal); box-shadow: 0 0 11px rgba(25, 211, 177, .7); }
.status-dot.is-offline { background: var(--red); box-shadow: 0 0 11px rgba(255, 81, 69, .55); }

.dashboard-main { width: calc(100% - var(--sidebar-width)); min-width: 0; margin-left: var(--sidebar-width); padding: 0 30px 26px; }

.topbar {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border-soft);
}

.eyebrow, .panel-kicker { margin: 0 0 5px; color: var(--orange); font-size: .66rem; font-weight: 750; letter-spacing: .12em; }
.topbar h1 { margin: 0; font-size: 1.52rem; line-height: 1.2; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.live-chip, .date-chip, .icon-button, .count-badge, .panel-unit {
    height: 37px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(17, 24, 32, .78);
    color: #cbd2da;
    font-size: .78rem;
}

.live-chip.is-live { color: var(--teal); border-color: rgba(25, 211, 177, .22); background: var(--teal-soft); }
.live-chip.is-stale { color: var(--red); border-color: rgba(255, 81, 69, .22); background: var(--red-soft); }
.icon-button { width: 37px; justify-content: center; padding: 0; cursor: pointer; transition: color .2s, border-color .2s, transform .2s; }
.icon-button:hover { color: var(--orange); border-color: rgba(255, 138, 25, .45); transform: rotate(20deg); }
.icon-button.is-loading i { animation: refresh-spin .8s linear infinite; }
.icon-button:disabled { cursor: wait; opacity: .7; }

.dashboard-alert { display: flex; gap: 12px; align-items: center; margin: 0 0 18px; padding: 13px 16px; border: 1px solid rgba(255, 177, 59, .3); border-radius: 9px; background: rgba(255, 177, 59, .08); color: #ffd491; }
.dashboard-view { display: none; animation: view-in .28s ease both; }
.dashboard-view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.metric-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.metric-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-grid--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.metric-card, .panel {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(18, 26, 35, .96), rgba(13, 20, 27, .98));
    box-shadow: var(--shadow);
}

.metric-card {
    min-height: 128px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr auto;
    column-gap: 15px;
    padding: 21px;
    overflow: hidden;
}

.metric-card::after { content: ""; position: absolute; inset: auto -18px -45px auto; width: 105px; height: 105px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 138, 25, .08), transparent 68%); pointer-events: none; }
.metric-icon { width: 42px; height: 42px; display: grid; place-items: center; grid-row: 1; border: 1px solid rgba(255, 138, 25, .28); border-radius: 10px; background: var(--orange-soft); color: var(--orange); }
.metric-card > div:nth-child(2) { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.metric-label { color: var(--muted); font-size: .75rem; }
.metric-card strong { overflow: hidden; color: var(--text); font-size: clamp(1.22rem, 1.7vw, 1.72rem); line-height: 1.08; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.metric-meta { grid-column: 1 / -1; align-self: end; margin-top: 14px; color: var(--muted-2); font-size: .7rem; }
.metric-card--small { min-height: 100px; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 17px; }
.metric-card--small strong { font-size: clamp(1.08rem, 1.25vw, 1.42rem); }

.content-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.content-grid--overview { grid-template-columns: minmax(0, 1.65fr) minmax(330px, .75fr); }
.content-grid--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-grid--performance-bottom { grid-template-columns: minmax(0, 1.65fr) minmax(330px, .72fr); }
.stacked-panels { display: grid; gap: 14px; grid-template-rows: 1fr 1fr; }
.panel { min-width: 0; overflow: hidden; }

.panel-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border-bottom: 1px solid var(--border-soft); }
.panel-header h2 { margin: 0; font-size: .98rem; letter-spacing: -.015em; }
.panel-header--wrap { flex-wrap: wrap; }
.panel-kicker { color: var(--muted-2); font-size: .58rem; }
.panel-unit, .count-badge { height: 28px; padding: 0 9px; color: var(--muted); font-size: .67rem; }
.text-button { border: 0; background: none; color: var(--orange); font-size: .72rem; cursor: pointer; }
.text-button i { margin-left: 5px; transition: transform .18s; }
.text-button:hover i { transform: translateX(3px); }

.segmented-control { display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 7px; background: #0a1016; }
.segmented-control button { min-width: 46px; height: 27px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: .66rem; cursor: pointer; }
.segmented-control button.is-active { background: var(--orange-soft); color: var(--orange); box-shadow: inset 0 0 0 1px rgba(255, 138, 25, .2); }
.chart-summary { display: flex; align-items: baseline; gap: 12px; padding: 16px 18px 0; }
.chart-summary strong { font-size: 1.48rem; letter-spacing: -.04em; }
.chart-summary span { font-size: .74rem; }

.canvas-wrap { position: relative; width: 100%; min-height: 250px; padding: 8px 12px 13px; }
.canvas-wrap--large { height: 336px; }
.canvas-wrap--performance { height: 330px; padding-top: 16px; }
.canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-empty { position: absolute; inset: 0; display: none; place-items: center; color: var(--muted); font-size: .8rem; pointer-events: none; }
.canvas-wrap.is-empty .chart-empty { display: grid; }

.gauge-row { min-height: 196px; display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 20px; padding: 17px 19px; }
.donut { --donut-value: 0%; position: relative; width: 142px; aspect-ratio: 1; display: grid; place-items: center; flex: none; border-radius: 50%; background: conic-gradient(var(--orange) var(--donut-value), #222c36 0); box-shadow: inset 0 0 20px rgba(0, 0, 0, .25), 0 0 26px rgba(255, 138, 25, .07); }
.donut::before { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: #10171f; box-shadow: inset 0 0 0 1px var(--border); }
.donut > div { position: relative; z-index: 1; display: flex; align-items: center; flex-direction: column; }
.donut strong { font-size: 1.45rem; letter-spacing: -.04em; }
.donut span, .donut em { color: var(--muted); font-size: .64rem; font-style: normal; text-transform: uppercase; letter-spacing: .06em; }
.donut em { margin-top: 4px; color: var(--red); text-transform: none; }
.donut--large { width: min(190px, 55%); margin: 25px auto 18px; }
.donut--large strong { color: var(--orange); font-size: 2.2rem; }
.donut--win { background: conic-gradient(var(--teal) var(--donut-value), var(--red) 0); }
.donut--win strong { color: var(--teal); }

.risk-rules { display: grid; gap: 3px; }
.risk-rules > div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); font-size: .72rem; }
.risk-rules > div:last-child { border-bottom: 0; }
.risk-rules span { color: var(--muted); }
.health-state { display: flex; align-items: center; gap: 13px; padding: 22px 20px 13px; }
.health-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border: 1px solid currentColor; border-radius: 50%; }
.health-icon.is-online { color: var(--teal); background: var(--teal-soft); }
.health-icon.is-offline { color: var(--red); background: var(--red-soft); }
.health-state > div { display: flex; flex-direction: column; gap: 5px; }
.health-state strong { font-size: .8rem; }
.health-state span { color: var(--muted); font-size: .68rem; }
.heartbeat { height: 30px; margin: 1px 20px 18px 75px; display: flex; align-items: center; background: repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(255,255,255,.025) 20px); }
.heartbeat span { width: 100%; height: 1px; background: var(--teal); box-shadow: 0 0 9px rgba(25,211,177,.45); }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; color: #dce2e8; font-size: .73rem; }
.data-table th { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--muted-2); font-size: .61rem; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { height: 56px; padding: 9px 14px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: rgba(255,255,255,.022); }
.compact-table td { height: 53px; }
.symbol-cell { display: inline-flex; align-items: center; gap: 9px; }
.symbol-cell:hover strong { color: var(--orange); }
.symbol-mark { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(255, 138, 25, .25); border-radius: 50%; background: var(--orange-soft); color: var(--orange); font-size: .65rem; font-weight: 800; }
.direction-pill, .status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 5px; font-size: .61rem; font-weight: 750; letter-spacing: .035em; }
.direction-pill.is-long { color: var(--teal); background: var(--teal-soft); border: 1px solid rgba(25,211,177,.16); }
.direction-pill.is-short { color: var(--red); background: var(--red-soft); border: 1px solid rgba(255,81,69,.16); }
.status-pill { color: #f5bb62; background: rgba(255,177,59,.1); border: 1px solid rgba(255,177,59,.13); }
.status-pill.status-2 { color: var(--teal); background: var(--teal-soft); }
.status-pill.status-7 { color: var(--red); background: var(--red-soft); }
.table-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.table-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.muted { color: var(--muted-2); }
.is-positive { color: var(--teal) !important; }
.is-warning { color: var(--orange-2) !important; }
.is-negative { color: var(--red) !important; }
.is-neutral { color: var(--muted) !important; }
.inline-empty { padding: 24px; color: var(--muted); text-align: center; }

.cockpit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; margin-bottom: 14px; }
.cockpit-main, .cockpit-side { display: grid; align-content: start; gap: 14px; min-width: 0; }
.cockpit-table { min-width: 900px; }
.table-search { width: min(220px, 100%); height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--border); border-radius: 7px; background: #0a1016; color: var(--muted-2); }
.table-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .7rem; }
.table-search input::placeholder { color: var(--muted-2); }
.distance-cell { min-width: 90px; display: grid; gap: 5px; }
.distance-cell span { height: 4px; overflow: hidden; border-radius: 99px; background: #222c35; }
.distance-cell i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--orange)); }

.large-empty { min-height: 210px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 32px; color: var(--muted); text-align: center; }
.large-empty > span { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 12px; border: 1px dashed #3a4652; border-radius: 12px; font-size: 1.2rem; }
.large-empty strong { color: #c6ced6; }
.large-empty p { margin: 7px 0 0; font-size: .72rem; }
.position-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 15px; }
.position-card { padding: 16px; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(255,255,255,.018); }
.position-card > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.position-card dl { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 16px 0; }
.position-card dl div { display: grid; gap: 5px; }
.position-card dt { color: var(--muted-2); font-size: .58rem; text-transform: uppercase; }
.position-card dd { margin: 0; font-size: .75rem; }
.position-progress { --position-progress: 50%; position: relative; height: 7px; border-radius: 99px; background: linear-gradient(90deg, rgba(255,81,69,.12) 0 50%, #222c35 50% 100%); }
.position-progress::after { content: ""; position: absolute; inset: -3px auto -3px 50%; width: 1px; background: #65717d; transform: translateX(-.5px); }
.position-progress span { position: absolute; inset-block: 0; border-radius: 99px; }
.position-progress.is-favorable span { left: 50%; right: calc(100% - var(--position-progress)); background: linear-gradient(90deg,var(--teal),var(--orange)); }
.position-progress.is-adverse span { left: var(--position-progress); right: 50%; background: linear-gradient(90deg,#a92e2e,var(--red)); }
.position-progress i { position: absolute; z-index: 1; top: 50%; left: var(--position-progress); width: 11px; height: 11px; border: 2px solid #111923; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 1px rgba(25,211,177,.35); transform: translate(-50%,-50%); }
.position-progress.is-adverse i { background: var(--red); box-shadow: 0 0 0 1px rgba(255,81,69,.4); }
.position-progress-labels { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 6px; color: var(--muted-2); font-size: .52rem; text-transform: uppercase; }
.position-progress-labels span:nth-child(2) { text-align: center; }
.position-progress-labels span:last-child { text-align: right; }
.position-card small { display: block; margin-top: 6px; color: var(--muted); }

.rule-list { margin: 0; padding: 0; list-style: none; }
.rule-list li { min-height: 49px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border-soft); font-size: .73rem; }
.rule-list i { color: var(--muted); text-align: center; }
.rule-list strong { font-size: .66rem; }
.risk-scale { display: grid; grid-template-columns: repeat(3,1fr); margin: 0 15px 18px; border-top: 1px solid var(--border-soft); }
.risk-scale > span { display: grid; gap: 5px; padding: 13px 7px 0; border-right: 1px solid var(--border-soft); text-align: center; }
.risk-scale > span:last-child { border-right: 0; }
.risk-scale small { color: var(--muted-2); font-size: .52rem; text-transform: uppercase; }
.risk-scale strong { font-size: .72rem; }

.activity-list { display: grid; }
.activity-item { min-height: 43px; display: grid; grid-template-columns: 54px 8px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 0 14px; border-bottom: 1px solid var(--border-soft); font-size: .66rem; }
.activity-item:last-child { border-bottom: 0; }
.activity-item time { color: var(--muted-2); }
.activity-item > i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.activity-item > i.is-positive { background: var(--teal); }
.activity-item > i.is-negative { background: var(--red); }
.activity-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-item b { padding: 3px 6px; border-radius: 4px; background: rgba(255,138,25,.1); color: var(--orange); font-size: .51rem; }

.lifecycle-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 16px; }
.lifecycle-step { position: relative; min-height: 100px; display: flex; align-items: flex-start; gap: 12px; padding: 18px; border: 1px solid var(--border-soft); border-right: 0; background: rgba(255,255,255,.012); }
.lifecycle-step:first-child { border-radius: 8px 0 0 8px; }
.lifecycle-step:last-child { border-right: 1px solid var(--border-soft); border-radius: 0 8px 8px 0; }
.lifecycle-step > span { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border: 1px solid var(--orange); border-radius: 50%; color: var(--orange); font-size: .68rem; }
.lifecycle-step strong { color: var(--orange); font-size: .73rem; text-transform: uppercase; }
.lifecycle-step p { margin: 7px 0 0; color: var(--muted); font-size: .65rem; }
.lifecycle-step > i { position: absolute; right: -7px; top: 45%; z-index: 2; color: var(--orange); font-size: .7rem; }

.performance-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(320px,.72fr); grid-template-areas: "line win" "breakdown r"; gap: 14px; margin-bottom: 14px; }
.performance-line { grid-area: line; }
.win-loss-panel { grid-area: win; }
.breakdown-panel { grid-area: breakdown; }
.r-panel { grid-area: r; }
.win-loss-content { min-height: 245px; display: flex; align-items: center; justify-content: space-around; gap: 22px; padding: 22px; }
.legend-list { min-width: 175px; display: grid; }
.legend-list > div { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); font-size: .68rem; }
.legend-list > div:last-child { grid-template-columns: 1fr auto; }
.legend-list i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.legend-list span { color: var(--muted); }

.breakdown-chart { height: 245px; display: grid; grid-template-columns: repeat(3,1fr); align-items: end; gap: 18px; padding: 25px 28px 22px; background: repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(255,255,255,.035) 48px); }
.breakdown-chart > div { height: 100%; display: flex; align-items: center; flex-direction: column-reverse; gap: 8px; }
.breakdown-chart i { width: min(74px,75%); min-height: 5px; display: block; background: currentColor; opacity: .82; border-radius: 3px 3px 0 0; box-shadow: 0 0 14px rgba(255,81,69,.08); }
.breakdown-chart span { color: var(--muted); font-size: .62rem; }
.breakdown-chart strong { font-size: .68rem; }

.r-bars { height: 245px; display: grid; grid-template-columns: repeat(6,1fr); align-items: end; gap: 8px; padding: 25px 18px 18px; background: repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(255,255,255,.035) 48px); }
.r-bars > div { height: 100%; display: grid; grid-template-rows: 18px 1fr 31px; align-items: end; gap: 6px; text-align: center; }
.r-bars strong { font-size: .68rem; }
.r-bars span { height: 100%; display: flex; align-items: end; justify-content: center; }
.r-bars i { width: min(38px, 80%); min-height: 2px; display: block; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--orange), #de3d35); }
.r-bars small { color: var(--muted); font-size: .51rem; line-height: 1.15; }

.performance-table { min-width: 880px; }
.symbol-results { display: grid; gap: 15px; padding: 20px; }
.symbol-results > div { display: grid; grid-template-columns: 93px minmax(80px,1fr) 90px; align-items: center; gap: 12px; }
.symbol-results > div > div { display: grid; gap: 3px; }
.symbol-results strong { font-size: .68rem; }
.symbol-results span { color: var(--muted-2); font-size: .58rem; }
.result-track { height: 5px; overflow: hidden; border-radius: 99px; background: #222c35; }
.result-track i { display: block; height: 100%; border-radius: inherit; background: currentColor; }
.symbol-results > div > strong { text-align: right; }
.analysis-callout { display: flex; gap: 13px; margin: 0 16px 16px; padding: 16px; border: 1px solid rgba(255,138,25,.28); border-radius: 8px; background: linear-gradient(135deg, rgba(255,138,25,.11), rgba(255,138,25,.025)); }
.analysis-callout > i { color: var(--orange); font-size: 1.15rem; }
.analysis-callout strong { color: #ffc16d; font-size: .73rem; }
.analysis-callout p { margin: 6px 0 0; color: var(--muted); font-size: .64rem; line-height: 1.5; }

.log-metrics { margin-bottom: 14px; }
.log-metric-button { width: 100%; border: 1px solid var(--border); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s; }
.log-metric-button:hover { transform: translateY(-2px); }
.log-metric-button--warning:hover, .log-metric-button--warning.is-active { border-color: rgba(255, 138, 25, .58); box-shadow: 0 0 0 1px rgba(255, 138, 25, .14), var(--shadow); }
.log-metric-button--error:hover, .log-metric-button--error.is-active { border-color: rgba(255, 81, 69, .58); box-shadow: 0 0 0 1px rgba(255, 81, 69, .14), var(--shadow); }
.log-metric-button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.log-connection-value { color: var(--muted); }
.log-connection-value.is-online { color: var(--teal); }
.log-connection-value.is-offline { color: var(--red); }
.log-panel { min-height: calc(100vh - 235px); }
.log-status { min-height: 30px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); font-size: .68rem; }
.log-status.is-online { color: var(--teal); border-color: rgba(25, 211, 177, .24); background: var(--teal-soft); }
.log-status.is-offline { color: var(--red); border-color: rgba(255, 81, 69, .24); background: var(--red-soft); }
.log-toolbar { min-height: 64px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border-soft); background: rgba(8, 13, 18, .35); }
.log-search { width: min(360px, 100%); height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--border); border-radius: 7px; background: #0a1016; color: var(--muted-2); }
.log-search:focus-within { border-color: rgba(255, 138, 25, .5); }
.log-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .72rem; }
.log-search input::placeholder { color: var(--muted-2); }
.log-level-filter { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 5px 4px 10px; border: 1px solid var(--border); border-radius: 7px; background: #0a1016; color: var(--muted-2); font-size: .65rem; }
.log-level-filter__label { margin-right: 2px; }
.log-level-options { display: flex; flex-wrap: wrap; gap: 4px; }
.log-level-options label { position: relative; cursor: pointer; }
.log-level-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.log-level-options span, .log-level-all { min-height: 27px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; border: 1px solid transparent; border-radius: 5px; background: rgba(255, 255, 255, .035); color: var(--muted); font-size: .62rem; cursor: pointer; transition: color .16s, background .16s, border-color .16s; }
.log-level-options input:checked + span { border-color: rgba(255, 138, 25, .25); background: var(--orange-soft); color: var(--orange-2); }
.log-level-options input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 1px; }
.log-level-all { border-color: var(--border); background: #111923; font-family: inherit; }
.log-level-all:hover, .log-level-all.is-active { border-color: rgba(255, 138, 25, .35); color: var(--orange-2); }
.log-autoscroll { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: .68rem; cursor: pointer; white-space: nowrap; }
.log-autoscroll input { accent-color: var(--orange); }
.button-secondary { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 7px; background: #111923; color: var(--muted); font-size: .68rem; cursor: pointer; }
.button-secondary:hover { color: var(--text); border-color: #3b4855; }
.log-console { height: calc(100vh - 365px); min-height: 360px; max-height: 720px; overflow: auto; padding: 10px 0; background: #080d12; font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; scrollbar-color: #34414e #0a1016; }
.log-entry { min-height: 34px; display: grid; grid-template-columns: 92px 58px minmax(0, 1fr); align-items: start; gap: 10px; padding: 7px 16px; border-left: 2px solid transparent; color: #aeb8c2; font-size: .68rem; line-height: 1.5; }
.log-entry:hover { background: rgba(255, 255, 255, .025); }
.log-entry time { padding-top: 2px; color: var(--muted-2); }
.log-entry p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.log-level { min-height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-size: .56rem; font-weight: 800; letter-spacing: .04em; }
.log-entry[data-level="INFO"] { border-left-color: var(--teal); }
.log-entry[data-level="INFO"] .log-level { color: var(--teal); border-color: rgba(25, 211, 177, .24); background: var(--teal-soft); }
.log-entry[data-level="WARN"] { border-left-color: var(--orange); }
.log-entry[data-level="WARN"] .log-level { color: var(--orange-2); border-color: rgba(255, 138, 25, .28); background: var(--orange-soft); }
.log-entry[data-level="ERROR"] { border-left-color: var(--red); background: rgba(255, 81, 69, .035); }
.log-entry[data-level="ERROR"] .log-level { color: var(--red); border-color: rgba(255, 81, 69, .3); background: var(--red-soft); }
.log-entry[data-level="TRACE"], .log-entry[data-level="DEBUG"] { color: #768391; }
.log-empty { height: 100%; min-height: 330px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--muted-2); text-align: center; }
.log-empty i { margin-bottom: 6px; color: var(--orange); font-size: 1.5rem; }
.log-empty strong { color: #bac3cc; font-family: Inter, ui-sans-serif, sans-serif; font-size: .78rem; }
.log-empty span { font-family: Inter, ui-sans-serif, sans-serif; font-size: .68rem; }

.dashboard-footer { display: flex; justify-content: space-between; gap: 20px; padding: 11px 2px 0; color: var(--muted-2); font-size: .64rem; }
.dashboard-footer b { color: var(--orange); }
.live-refresh-state { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); }
.live-refresh-state.is-error { color: var(--red); }

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

@media (max-width: 1280px) {
    :root { --sidebar-width: 86px; }
    .brand { justify-content: center; padding: 0; }
    .brand-name, .nav-item span, .sidebar-footer { display: none; }
    .sidebar-nav { padding-inline: 11px; }
    .nav-item { justify-content: center; padding: 0; }
    .nav-item.is-active::before { left: -12px; }
    .metric-grid--six { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .metric-grid--five { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .cockpit-grid { grid-template-columns: minmax(0,1fr) 320px; }
}

@media (max-width: 1050px) {
    .content-grid--overview, .cockpit-grid, .content-grid--performance-bottom { grid-template-columns: 1fr; }
    .stacked-panels { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto; }
    .performance-grid { grid-template-columns: 1fr; grid-template-areas: "line" "win" "breakdown" "r"; }
    .cockpit-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 820px) {
    :root { --sidebar-width: 0px; }
    .dashboard-shell { display: block; }
    .sidebar { inset: auto 0 0; width: 100%; height: 68px; flex-direction: row; border: 0; border-top: 1px solid var(--border); }
    .brand, .sidebar-footer { display: none; }
    .sidebar-nav { width: 100%; grid-template-columns: repeat(4,1fr); gap: 4px; padding: 7px 10px; }
    .nav-item { height: 54px; justify-content: center; flex-direction: column; gap: 4px; font-size: .58rem; }
    .nav-item span { display: block; }
    .nav-item.is-active::before { inset: auto 25% -7px; width: 50%; height: 3px; border-radius: 3px 3px 0 0; }
    .dashboard-main { width: 100%; margin: 0; padding: 0 16px 90px; }
    .topbar { min-height: 78px; margin-bottom: 15px; }
    .topbar h1 { font-size: 1.25rem; }
    .date-chip { display: none; }
    .metric-grid--four, .metric-grid--five, .content-grid--half { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .metric-card { min-height: 112px; padding: 16px; }
    .stacked-panels, .cockpit-side { grid-template-columns: 1fr; }
    .lifecycle-grid { grid-template-columns: repeat(2,1fr); gap: 8px; }
    .lifecycle-step { border-right: 1px solid var(--border-soft); border-radius: 7px !important; }
    .lifecycle-step > i { display: none; }
}

@media (max-width: 560px) {
    html { font-size: 14px; }
    .topbar-actions { gap: 6px; }
    .live-chip { padding: 0 9px; }
    .metric-grid--four, .metric-grid--five, .metric-grid--six, .content-grid--half { grid-template-columns: 1fr; }
    .metric-card { min-height: 104px; }
    .metric-card--small { min-height: 86px; }
    .panel-header { padding-inline: 14px; }
    .segmented-control button { min-width: 38px; padding-inline: 6px; }
    .gauge-row { grid-template-columns: 1fr; justify-items: center; }
    .risk-rules { width: 100%; }
    .win-loss-content { flex-direction: column; }
    .legend-list { width: 100%; }
    .lifecycle-grid, .position-list { grid-template-columns: 1fr; }
    .position-card dl { grid-template-columns: repeat(2,1fr); }
    .symbol-results > div { grid-template-columns: 80px minmax(60px,1fr); }
    .symbol-results > div > strong { grid-column: 1 / -1; text-align: left; }
    .dashboard-footer { flex-direction: column; gap: 4px; }
    .log-toolbar { align-items: stretch; flex-direction: column; }
    .log-search, .log-level-filter { width: 100%; }
    .log-level-filter { align-items: flex-start; flex-direction: column; padding: 9px; }
    .log-level-options { width: 100%; }
    .log-autoscroll { margin-left: 0; }
    .log-console { height: 55vh; min-height: 320px; }
    .log-entry { grid-template-columns: 76px 52px minmax(0, 1fr); gap: 7px; padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
