:root {
  color-scheme: dark;
  --bg: #07100f;
  --bg-soft: #0a1513;
  --panel: rgba(15, 28, 26, 0.84);
  --panel-strong: #10201d;
  --line: rgba(168, 207, 196, 0.12);
  --line-strong: rgba(168, 207, 196, 0.2);
  --text: #eef7f3;
  --muted: #8da49d;
  --faint: #60736e;
  --positive: #46e6b0;
  --positive-soft: rgba(70, 230, 176, 0.12);
  --negative: #ff6e7f;
  --negative-soft: rgba(255, 110, 127, 0.12);
  --warning: #f8c85a;
  --warning-soft: rgba(248, 200, 90, 0.12);
  --blue: #72a7ff;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% -5%, rgba(45, 154, 122, 0.13), transparent 34%),
    radial-gradient(circle at 92% 16%, rgba(54, 114, 104, 0.09), transparent 30%),
    linear-gradient(180deg, #07100f 0%, #081311 48%, #07100f 100%);
}

button, input, select { font: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.08;
  pointer-events: none;
}

.ambient-one { top: 12%; left: -220px; background: var(--positive); }
.ambient-two { right: -250px; bottom: 8%; background: #287f78; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - 1420px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 15, 0.78);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(70, 230, 176, 0.28);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(70, 230, 176, 0.16), rgba(70, 230, 176, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-mark svg { width: 26px; fill: none; stroke: var(--positive); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: 0.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.mode-badge, .readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.09em;
}

.mode-badge { color: var(--warning); background: var(--warning-soft); border-color: rgba(248, 200, 90, 0.2); }
.readonly-badge { color: var(--muted); background: rgba(255, 255, 255, 0.025); letter-spacing: 0.02em; font-weight: 600; }
.readonly-badge span { color: var(--positive); font-size: 8px; }

.shell { width: min(1420px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 30px; }

.status-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.eyebrow { margin: 0 0 9px; color: #76a69a; font-size: 10px; font-weight: 800; letter-spacing: 0.17em; }
.status-title-row { display: flex; gap: 13px; align-items: center; }
.status-title-row h1 { margin: 0; font-size: clamp(28px, 4vw, 45px); letter-spacing: -0.045em; line-height: 1.02; }
.hero-copy { max-width: 720px; margin: 12px 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.65; }

.status-orb {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 3px solid rgba(70, 230, 176, 0.18);
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 6px rgba(70, 230, 176, 0.07), 0 0 24px rgba(70, 230, 176, 0.45);
}

.status-orb.is-loading { animation: pulse 1.4s infinite; }
.status-orb.is-attention { background: var(--warning); box-shadow: 0 0 0 6px rgba(248, 200, 90, 0.07), 0 0 24px rgba(248, 200, 90, 0.38); }
.status-orb.is-negative { background: var(--negative); box-shadow: 0 0 0 6px rgba(255, 110, 127, 0.07), 0 0 24px rgba(255, 110, 127, 0.38); }
.status-orb.is-muted { background: var(--faint); box-shadow: 0 0 0 6px rgba(96, 115, 110, 0.07); }

.update-block { display: grid; justify-items: end; gap: 3px; min-width: 190px; }
.update-block span { color: var(--faint); font-size: 10px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.update-block strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.update-block small { color: var(--muted); font-size: 11px; }

.notice {
  margin: -8px 0 24px;
  padding: 13px 16px;
  border: 1px solid rgba(248, 200, 90, 0.22);
  border-radius: 13px;
  color: #eadcae;
  background: var(--warning-soft);
  font-size: 12px;
}

.operator-guide {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(480px, 1.65fr);
  gap: 22px 34px;
  margin: -8px 0 15px;
  padding: 22px 24px 18px;
  border-color: rgba(114, 167, 255, 0.2);
  background: linear-gradient(135deg, rgba(19, 40, 47, 0.92), rgba(11, 27, 26, 0.88));
}
.operator-guide-main h2 { margin: 0; max-width: 600px; font-size: clamp(18px, 2vw, 25px); letter-spacing: -0.03em; line-height: 1.18; }
.operator-guide-main p:last-child { max-width: 620px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.guide-steps li { min-height: 78px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(4, 15, 14, 0.34); }
.guide-steps strong, .guide-steps span { display: block; }
.guide-steps strong { color: #d7eee5; font-size: 11px; }
.guide-steps span { margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.guide-legend { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; padding-top: 13px; border-top: 1px solid var(--line); color: var(--faint); font-size: 10px; line-height: 1.45; }
.guide-legend strong { color: #b7cae8; }
.guide-bullet { display: grid; flex: 0 0 auto; width: 17px; height: 17px; place-items: center; border-radius: 50%; font-size: 10px; font-weight: 800; }
.guide-bullet.is-safe { color: var(--positive); background: var(--positive-soft); }

.is-hidden { display: none !important; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 15px; }
.metric-card, .panel, .activity-strip {
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(18, 34, 31, 0.9), rgba(10, 22, 20, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.metric-card { min-height: 154px; padding: 21px 22px; border-radius: 18px; }
.metric-primary { border-color: rgba(70, 230, 176, 0.2); background: linear-gradient(145deg, rgba(32, 66, 56, 0.9), rgba(13, 28, 25, 0.92)); }
.metric-heading { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.metric-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: var(--positive); background: var(--positive-soft); font-weight: 800; }
.metric-icon.subtle { color: #8bb5aa; background: rgba(139, 181, 170, 0.08); }
.metric-value { display: block; margin-top: 21px; font-size: clamp(25px, 2.6vw, 35px); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.metric-value.positive { color: var(--positive); }
.metric-value.negative { color: var(--negative); }
.metric-value.fee { color: #ebc872; }
.metric-card p { margin: 7px 0 0; color: var(--faint); font-size: 11px; line-height: 1.45; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(330px, 0.85fr); gap: 15px; margin-bottom: 15px; }
.panel { border-radius: var(--radius); padding: 24px; overflow: hidden; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.panel-heading.compact { margin-bottom: 17px; }
.panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -0.025em; }
.panel-note, .chart-summary span { color: var(--faint); font-size: 10px; }
.chart-summary { display: grid; gap: 4px; justify-items: end; }
.chart-summary strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.chart-summary strong.positive { color: var(--positive); }
.chart-summary strong.negative { color: var(--negative); }

.chart-wrap { min-height: 272px; border-radius: 15px; background: linear-gradient(180deg, rgba(7, 16, 15, 0.42), rgba(7, 16, 15, 0.1)); }
#pnlChart { display: block; width: 100%; height: 272px; overflow: visible; }
.chart-line { fill: none; stroke: var(--positive); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 7px 10px rgba(70, 230, 176, 0.2)); }
.chart-line.negative { stroke: var(--negative); filter: drop-shadow(0 7px 10px rgba(255, 110, 127, 0.18)); }
.chart-area { fill: url(#chartFillPositive); }
.chart-area.negative { fill: url(#chartFillNegative); }
#chartGrid line { stroke: rgba(168, 207, 196, 0.08); stroke-width: 1; }
#chartGrid text, #chartEmpty { fill: var(--faint); font-family: inherit; font-size: 10px; }
#chartPoints circle { fill: var(--panel-strong); stroke: var(--positive); stroke-width: 2; }
#chartPoints circle.negative { stroke: var(--negative); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: inline-flex; gap: 7px; align-items: center; }
.chart-legend b { color: var(--text); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.legend-dot.positive { background: var(--positive); }
.legend-dot.negative { background: var(--negative); }

.health-score { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, 0.025); font-size: 10px; font-weight: 700; }
.health-list { display: grid; gap: 5px; }
.health-row { display: grid; grid-template-columns: 10px 1fr; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.health-row:last-child { border-bottom: 0; }
.health-row strong, .health-row small { display: block; }
.health-row strong { font-size: 12px; }
.health-row small { margin-top: 4px; color: var(--faint); font-size: 10px; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 4px rgba(96, 115, 110, 0.08); }
.health-dot.good { background: var(--positive); box-shadow: 0 0 0 4px rgba(70, 230, 176, 0.08); }
.health-dot.warning { background: var(--warning); box-shadow: 0 0 0 4px rgba(248, 200, 90, 0.08); }
.health-dot.bad { background: var(--negative); box-shadow: 0 0 0 4px rgba(255, 110, 127, 0.08); }
.strategy-box { display: grid; gap: 5px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(7, 16, 15, 0.36); }
.strategy-box span, .strategy-box small { color: var(--faint); font-size: 10px; }
.strategy-box strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.market-series { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.series-chip { display: inline-flex; gap: 5px; align-items: center; padding: 6px 8px; border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, 0.035); font-size: 9px; }
.series-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--positive); }
.series-chip.unsafe::before { background: var(--warning); }

.activity-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 15px; border-radius: 18px; }
.activity-strip > div { padding: 18px 22px; border-right: 1px solid var(--line); }
.activity-strip > div:last-child { border-right: 0; }
.activity-strip span, .activity-strip small { display: block; color: var(--faint); font-size: 10px; }
.activity-strip strong { display: block; margin: 5px 0 3px; font-size: 24px; font-variant-numeric: tabular-nums; }

.demo-panel { margin-bottom: 15px; border-color: rgba(248, 200, 90, 0.18); }
.reconciliation-badge { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(255, 255, 255, 0.025); font-size: 9px; font-weight: 750; }
.reconciliation-badge.complete { color: var(--positive); border-color: rgba(70, 230, 176, 0.2); background: var(--positive-soft); }
.reconciliation-badge.attention { color: var(--warning); border-color: rgba(248, 200, 90, 0.22); background: var(--warning-soft); }
.demo-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 16, 15, 0.3); }
.demo-summary > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.demo-summary > div:last-child { border-right: 0; }
.demo-summary span, .demo-summary strong { display: block; }
.demo-summary span { color: var(--faint); font-size: 9px; }
.demo-summary strong { margin-top: 5px; font-size: 14px; font-variant-numeric: tabular-nums; }
.demo-summary strong.positive { color: var(--positive); }
.demo-summary strong.negative { color: var(--negative); }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.75fr); gap: 24px; }
.demo-grid h3 { margin: 0 0 12px; color: var(--muted); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.demo-position-list { display: grid; gap: 7px; margin-bottom: 22px; }
.demo-position-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(7, 16, 15, 0.26); }
.demo-position-item span { color: var(--text); font-size: 10px; font-weight: 750; }
.demo-position-item strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.demo-position-item small { grid-column: 1 / -1; color: var(--faint); font-size: 8px; }
.demo-issues { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.demo-issues li { padding: 9px 11px; border-left: 2px solid var(--warning); border-radius: 7px; color: #eadcae; background: var(--warning-soft); font-size: 9px; }
.demo-issues li.complete { border-left-color: var(--positive); color: #afe2d2; background: var(--positive-soft); }
.empty-state.compact { margin: 0; padding: 14px 8px; }

.positions-panel { margin-bottom: 15px; }
.symbol-panel, .operations-panel { margin-bottom: 15px; }
.operations-panel .table-wrap { max-height: 430px; overflow: auto; border-radius: 12px; }
.operations-panel thead th { position: sticky; top: 0; z-index: 1; background: #10241f; }
.operation-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.operation-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, 0.035); font: inherit; font-size: 9px; font-weight: 750; cursor: pointer; }
.filter-button:hover, .filter-button:focus-visible { color: var(--text); border-color: var(--line-strong); outline: none; }
.filter-button.is-active { color: #07100f; border-color: var(--positive); background: var(--positive); }
.trade-summary-notice { max-width: 650px; margin: 0; color: #c9ddcf; font-size: 9px; line-height: 1.45; text-align: right; }
.trade-summary-notice.is-neutral { color: var(--faint); }
.symbol-panel .value-positive, .operations-panel .value-positive { color: var(--positive); }
.symbol-panel .value-negative, .operations-panel .value-negative { color: var(--negative); }
.fee-cell { color: #ebc872; }
.muted-cell { color: var(--faint); }
.action-cell { color: var(--blue); }
.operation-row { cursor: pointer; transition: background 140ms ease, transform 140ms ease; }
.operation-row:hover, .operation-row:focus-visible { outline: none; background: rgba(70, 230, 176, 0.07); }
.operation-row:focus-visible { box-shadow: inset 0 0 0 2px rgba(114, 167, 255, 0.6); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--faint); font-size: 9px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
td { color: #bfd0cb; font-size: 11px; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
.asset-cell { display: inline-flex; gap: 9px; align-items: center; color: var(--text); font-weight: 700; }
.asset-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--positive); background: var(--positive-soft); font-size: 9px; }
.side-pill { display: inline-flex; padding: 5px 8px; border-radius: 7px; color: var(--muted); background: rgba(255, 255, 255, 0.04); font-size: 9px; font-weight: 750; }
.side-pill.long { color: var(--positive); background: var(--positive-soft); }
.side-pill.short { color: var(--negative); background: var(--negative-soft); }
.value-positive { color: var(--positive); }
.value-negative { color: var(--negative); }
.empty-cell { padding: 28px; color: var(--faint); text-align: center !important; }

.lower-grid { grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.85fr); }
.decision-list { display: grid; gap: 9px; }
.decision-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 16, 15, 0.26); }
.decision-symbol { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; color: #acd4c9; background: rgba(121, 178, 163, 0.09); font-size: 10px; font-weight: 800; }
.decision-main { min-width: 0; }
.decision-title { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.decision-title strong { font-size: 11px; }
.action-pill { padding: 4px 6px; border-radius: 6px; color: var(--blue); background: rgba(114, 167, 255, 0.1); font-size: 8px; font-weight: 800; }
.action-pill.exit { color: var(--warning); background: var(--warning-soft); }
.action-pill.block { color: var(--muted); background: rgba(255, 255, 255, 0.04); }
.decision-reason { overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.decision-evidence { margin-top: 5px; color: var(--faint); font-size: 8px; }
.decision-meta { display: grid; justify-items: end; gap: 5px; }
.decision-meta time { color: var(--faint); font-size: 9px; }
.order-state { font-size: 8px; font-weight: 700; color: var(--muted); }

.timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.timeline-item { position: relative; display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; min-height: 58px; padding: 4px 0 14px; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; top: 14px; bottom: -1px; left: 4px; width: 1px; background: var(--line-strong); }
.timeline-marker { z-index: 1; width: 9px; height: 9px; margin-top: 3px; border: 2px solid var(--panel-strong); border-radius: 50%; background: var(--faint); }
.timeline-marker.positive { background: var(--positive); }
.timeline-marker.warning { background: var(--warning); }
.timeline-marker.negative { background: var(--negative); }
.timeline-marker.info { background: var(--blue); }
.timeline-content strong, .timeline-content small { display: block; }
.timeline-content strong { font-size: 10px; }
.timeline-content small { overflow: hidden; max-width: 360px; margin-top: 4px; color: var(--faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-item time { color: var(--faint); font-size: 8px; white-space: nowrap; }
.empty-state { padding: 28px 12px; color: var(--faint); font-size: 11px; text-align: center; }

.validation-note { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 24px; padding: 15px 17px; border: 1px solid rgba(114, 167, 255, 0.13); border-radius: 14px; background: rgba(114, 167, 255, 0.045); }
.validation-note > span { display: grid; flex: 0 0 auto; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: var(--blue); background: rgba(114, 167, 255, 0.1); font-size: 11px; font-weight: 800; }
.validation-note p { margin: 1px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.validation-note strong { color: #b7cae8; }

.operation-dialog {
  width: min(1060px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  color: var(--text);
  background: #0b1916;
  box-shadow: 0 28px 110px rgba(0, 0, 0, 0.56);
}
.operation-dialog::backdrop { background: rgba(1, 7, 6, 0.78); backdrop-filter: blur(5px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-heading h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.dialog-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(255, 255, 255, 0.04); font-size: 22px; line-height: 1; cursor: pointer; }
.dialog-close:hover, .dialog-close:focus-visible { color: var(--text); border-color: var(--line-strong); outline: none; }
.dialog-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 20px 0 12px; }
.dialog-summary-item, .evidence-item { display: grid; gap: 5px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(7, 16, 15, 0.42); }
.dialog-summary-item span, .evidence-item span { color: var(--faint); font-size: 9px; }
.dialog-summary-item strong, .evidence-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.operation-chart-wrap { min-height: 330px; border: 1px solid var(--line); border-radius: 16px; background: rgba(7, 16, 15, 0.45); }
#operationChart { display: block; width: 100%; height: 330px; }
#operationChartGrid line { stroke: rgba(168, 207, 196, 0.09); stroke-width: 1; }
#operationChartEmpty { fill: var(--faint); font-family: inherit; font-size: 12px; }
#operationCandleLayer line { stroke-width: 1; }
#operationCandleLayer rect { stroke-width: 1; }
#operationCandleLayer .candle-up { stroke: var(--positive); fill: rgba(70, 230, 176, 0.42); }
#operationCandleLayer .candle-down { stroke: var(--negative); fill: rgba(255, 110, 127, 0.42); }
.operation-ema { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.operation-ema.fast { stroke: #f8c85a; }
.operation-ema.slow { stroke: #72a7ff; }
.operation-entry-line { display: none; stroke: rgba(248, 200, 90, 0.8); stroke-dasharray: 4 4; stroke-width: 1.2; }
.operation-entry-line.is-visible { display: block; }
.dialog-evidence-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.dialog-footnote { margin-top: 14px; color: var(--faint); font-size: 10px; line-height: 1.5; }

footer { display: flex; justify-content: space-between; gap: 20px; width: min(1420px, calc(100% - 48px)); margin: 0 auto; padding: 18px 0 30px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9px; }

@keyframes pulse { 0%, 100% { opacity: 0.55; transform: scale(0.88); } 50% { opacity: 1; transform: scale(1); } }

@media (max-width: 980px) {
  .operator-guide { grid-template-columns: 1fr; }
  .guide-steps { grid-template-columns: 1fr; }
  .guide-legend { grid-column: auto; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid, .lower-grid { grid-template-columns: 1fr; }
  .health-panel { min-height: auto; }
  .demo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { min-height: 68px; padding: 10px 16px; }
  .brand small, .readonly-badge { display: none; }
  .shell, footer { width: min(100% - 28px, 1420px); }
  .shell { padding-top: 28px; }
  .status-hero { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .hero-copy { margin-left: 27px; }
  .update-block { justify-items: start; margin-left: 27px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 132px; padding: 17px; }
  .metric-value { margin-top: 16px; font-size: 23px; }
  .panel { padding: 18px; border-radius: 18px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .operation-toolbar { align-items: flex-start; flex-direction: column; }
  .trade-summary-notice { text-align: left; }
  .chart-summary { justify-items: start; }
  .activity-strip { grid-template-columns: 1fr 1fr; }
  .activity-strip > div { border-bottom: 1px solid var(--line); }
  .activity-strip > div:nth-child(2) { border-right: 0; }
  .activity-strip > div:nth-child(3), .activity-strip > div:nth-child(4) { border-bottom: 0; }
  .decision-card { grid-template-columns: 40px minmax(0, 1fr); }
  .demo-summary { grid-template-columns: 1fr 1fr; }
  .dialog-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-evidence-grid { grid-template-columns: 1fr 1fr; }
  .demo-summary > div:nth-child(2) { border-right: 0; }
  .demo-summary > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .decision-meta { grid-column: 2; justify-items: start; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  footer { flex-direction: column; }
}

@media (max-width: 430px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 120px; }
  .activity-strip { grid-template-columns: 1fr; }
  .activity-strip > div { border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .activity-strip > div:last-child { border-bottom: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
