:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-secondary: #101418;
  --panel: rgba(21, 27, 34, 0.86);
  --panel-soft: rgba(16, 20, 24, 0.86);
  --field-bg: rgba(4, 9, 18, 0.88);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(77, 163, 255, 0.22);
  --text: #f4f7fb;
  --muted: #a1a1aa;
  --brand: #4da3ff;
  --brand-strong: #76b8ff;
  --accent: #4da3ff;
  --accent-2: #22c55e;
  --positive: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.58);
  --glass: rgba(255, 255, 255, 0.035);
  --glow: 0 0 38px rgba(77, 163, 255, 0.18);
  --body-bg:
    radial-gradient(circle at 22% -10%, rgba(77, 163, 255, 0.16), transparent 30%),
    radial-gradient(circle at 92% 2%, rgba(34, 197, 94, 0.08), transparent 28%),
    linear-gradient(180deg, #101418 0%, var(--bg) 58%, #070a0e 100%);
  --body-grid:
    linear-gradient(rgba(77, 163, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 163, 255, 0.022) 1px, transparent 1px);
  --body-scanline: rgba(77, 163, 255, 0.018);
  --topbar-bg: linear-gradient(180deg, rgba(5, 8, 18, 0.96), rgba(5, 8, 18, 0.70) 78%, transparent);
  --sidebar-bg:
    radial-gradient(circle at 50% 0%, rgba(77, 163, 255, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(16, 20, 24, 0.98) 0%, rgba(7, 10, 14, 0.98) 100%);
  --login-bg:
    radial-gradient(circle at 18% 12%, rgba(77, 163, 255, 0.22), transparent 31%),
    radial-gradient(circle at 84% 18%, rgba(34, 197, 94, 0.07), transparent 30%),
    radial-gradient(circle at 52% 78%, rgba(118, 184, 255, 0.10), transparent 36%),
    linear-gradient(135deg, #070a0f 0%, #101418 48%, #05070b 100%);
  --login-panel-bg:
    linear-gradient(180deg, rgba(21, 27, 34, 0.88), rgba(10, 14, 20, 0.94)),
    rgba(11, 15, 20, 0.88);
  --chip-active-text: #06111f;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* High-fidelity terminal command center for 今日研究台. */
.app-shell.view-strategy {
  --terminal-bg: #020812;
  --terminal-panel: rgba(5, 20, 34, 0.94);
  --terminal-panel-strong: rgba(7, 28, 48, 0.98);
  --terminal-line: rgba(78, 156, 232, 0.30);
  --terminal-line-soft: rgba(78, 156, 232, 0.16);
  --terminal-text: #d9e7ff;
  --terminal-muted: #8292ad;
  --terminal-green: #35d07f;
  --terminal-blue: #4f9bff;
  --terminal-yellow: #f4b12a;
  --terminal-red: #ff4d62;
  --terminal-cyan: #38d9d6;
  --terminal-purple: #8b5cf6;
  background:
    radial-gradient(circle at 50% -12%, rgba(56, 217, 214, 0.10), transparent 30%),
    linear-gradient(180deg, #061424 0%, var(--terminal-bg) 48%, #01040a 100%);
  color: var(--terminal-text);
  grid-template-columns: 72px minmax(0, 1fr);
}

.app-shell.view-strategy .sidebar {
  background:
    linear-gradient(180deg, rgba(5, 16, 28, 0.98), rgba(1, 6, 13, 0.98)),
    #020812;
  border-right-color: rgba(78, 156, 232, 0.22);
  padding: 14px 10px;
}

.app-shell.view-strategy .brand-lockup {
  justify-content: center;
  margin-bottom: 18px;
}

.app-shell.view-strategy .brand-copy,
.app-shell.view-strategy .nav-label {
  display: none;
}

.app-shell.view-strategy .brand-mark {
  width: 42px;
  height: 42px;
}

.app-shell.view-strategy .sidebar-toggle {
  display: none;
}

.app-shell.view-strategy .nav {
  justify-items: center;
  gap: 9px;
}

.app-shell.view-strategy .nav button {
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 10px;
}

.app-shell.view-strategy .content {
  min-width: 0;
  padding: 14px;
  background:
    linear-gradient(rgba(78, 156, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 156, 232, 0.028) 1px, transparent 1px),
    var(--terminal-bg);
  background-size: 32px 32px;
}

.app-shell.view-strategy .topbar {
  margin: -2px 0 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--terminal-line-soft);
  border-radius: 8px;
  background: rgba(3, 13, 24, 0.86);
  box-shadow: 0 0 0 1px rgba(41, 117, 191, 0.06), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.app-shell.view-strategy .topbar-context span,
.app-shell.view-strategy .topbar-context em,
.app-shell.view-strategy .data-refresh-chip,
.app-shell.view-strategy .account-chip {
  color: var(--terminal-muted);
}

.app-shell.view-strategy .topbar-title-line #viewTitle {
  color: var(--terminal-text);
}

.app-shell.view-strategy .risk-disclaimer {
  display: none;
}

.terminal-command-center {
  display: grid;
  gap: 10px;
  color: var(--terminal-text);
  font-family: Inter, "PingFang SC", system-ui, sans-serif;
}

.terminal-header,
.terminal-panel,
.terminal-target-panel,
.terminal-chart-panel,
.terminal-event-panel,
.terminal-log-panel,
.command-alternatives {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--terminal-line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(13, 45, 76, 0.82), rgba(4, 17, 31, 0.96)),
    var(--terminal-panel);
  box-shadow:
    inset 0 0 0 1px rgba(120, 200, 255, 0.035),
    0 0 24px rgba(20, 103, 177, 0.16);
}

.terminal-header::before,
.terminal-panel::before,
.terminal-target-panel::before,
.terminal-chart-panel::before,
.terminal-event-panel::before,
.terminal-log-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(80, 180, 255, 0.10), transparent 38%, rgba(53, 208, 127, 0.05)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 18%);
  opacity: 0.8;
}

.terminal-header > *,
.terminal-panel > *,
.terminal-target-panel > *,
.terminal-chart-panel > *,
.terminal-event-panel > *,
.terminal-log-panel > *,
.command-alternatives > * {
  position: relative;
  z-index: 1;
}

.terminal-header {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(360px, 1.25fr) minmax(170px, 0.55fr) minmax(240px, 0.9fr);
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 8px 14px;
}

.terminal-brand {
  color: #edf6ff;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-shadow: 0 0 16px rgba(106, 167, 255, 0.35);
  white-space: nowrap;
}

.terminal-header-status,
.terminal-header-right,
.terminal-stage-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  min-width: 0;
}

.terminal-header-status span,
.terminal-header-right span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.terminal-header strong,
.terminal-panel strong,
.terminal-target-row strong,
.operation-target-head strong {
  color: var(--terminal-text);
}

.terminal-header .positive,
.terminal-panel .positive,
.terminal-target-row .positive,
.operation-target-head .positive,
.operation-metrics .positive {
  color: var(--terminal-green);
}

.terminal-header .warning,
.terminal-panel .warning,
.terminal-target-row .warning,
.operation-target-head .warning,
.operation-metrics .warning {
  color: var(--terminal-yellow);
}

.terminal-header .danger,
.terminal-panel .danger,
.terminal-target-row .danger,
.operation-target-head .danger,
.operation-metrics .danger {
  color: var(--terminal-red);
}

.terminal-stage-switch {
  justify-content: center;
}

.terminal-stage-switch button,
.terminal-chart-toolbar button,
.event-filter-tabs span {
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(78, 156, 232, 0.18);
  border-radius: 4px;
  background: rgba(2, 13, 26, 0.55);
  color: var(--terminal-muted);
  box-shadow: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 650;
  transform: none;
}

.terminal-stage-switch button.active,
.terminal-chart-toolbar button.active,
.event-filter-tabs span.active {
  border-color: rgba(78, 156, 232, 0.55);
  background: linear-gradient(180deg, rgba(21, 85, 150, 0.86), rgba(14, 48, 91, 0.9));
  color: #e8f4ff;
}

.terminal-header-message {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--terminal-muted);
  font-size: 12px;
  line-height: 1.35;
}

.command-intel-grid {
  display: grid;
  grid-template-columns: 1.02fr 1.16fr 0.94fr 1.02fr 1.1fr;
  gap: 8px;
}

.terminal-panel {
  min-height: 196px;
  padding: 12px;
}

.terminal-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  margin-bottom: 10px;
}

.terminal-panel-head h3 {
  margin: 0;
  color: var(--terminal-text);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.terminal-panel-head span {
  display: block;
  margin-top: 3px;
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 11px;
}

.terminal-panel-tool {
  display: grid;
  width: 24px;
  height: 24px;
  min-height: 24px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(78, 156, 232, 0.16);
  border-radius: 4px;
  background: rgba(4, 22, 40, 0.58);
  color: var(--terminal-muted);
}

.terminal-panel-tool .icon {
  margin: 0;
}

.terminal-gauge {
  position: relative;
  display: grid;
  width: 174px;
  height: 112px;
  margin: 8px auto 6px;
  place-items: center;
}

.terminal-gauge-arc {
  position: absolute;
  inset: 0;
  border-radius: 180px 180px 16px 16px;
  background:
    radial-gradient(circle at 50% 96%, var(--terminal-panel) 0 44%, transparent 45%),
    conic-gradient(from 250deg, var(--terminal-green) 0 25%, #e1e23c 25% 53%, var(--terminal-yellow) 53% 72%, #ff7a32 72% 86%, var(--terminal-red) 86% 100%);
  clip-path: inset(0 0 37% 0);
  opacity: 0.96;
}

.terminal-gauge::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 2px;
  left: 50%;
  bottom: 44px;
  border-radius: 999px;
  background: #d9e7ff;
  transform-origin: 0 50%;
  transform: rotate(calc(-168deg + (var(--risk-score) * 1.36deg)));
  box-shadow: 0 0 12px rgba(217, 231, 255, 0.58);
}

.terminal-gauge strong {
  z-index: 1;
  margin-top: 34px;
  color: var(--terminal-yellow);
  font-family: var(--mono);
  font-size: 40px;
  line-height: 1;
}

.terminal-gauge span {
  z-index: 1;
  margin-top: -14px;
  color: var(--terminal-yellow);
  font-size: 14px;
}

.terminal-micro-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--terminal-line-soft);
}

.terminal-micro-stats div {
  min-width: 0;
  padding: 8px 6px 0;
  border-right: 1px solid var(--terminal-line-soft);
}

.terminal-micro-stats div:last-child {
  border-right: 0;
}

.terminal-micro-stats span,
.terminal-micro-stats em {
  display: block;
  color: var(--terminal-muted);
  font-size: 11px;
  font-style: normal;
}

.terminal-micro-stats strong {
  display: inline-block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 15px;
}

.terminal-micro-stats em {
  display: inline;
  margin-left: 4px;
  color: var(--terminal-red);
}

.data-health-table {
  display: grid;
  gap: 5px;
}

.data-health-row {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) 56px 52px 60px minmax(72px, 0.85fr);
  gap: 8px;
  align-items: center;
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 11px;
}

.data-health-row.head {
  color: #a7b8d6;
  border-bottom: 1px solid var(--terminal-line-soft);
  padding-bottom: 6px;
}

.data-health-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-health-row i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.data-health-row b {
  display: inline-block;
  width: calc(var(--bar) * 0.72);
  max-width: 72px;
  height: 7px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--terminal-green);
  box-shadow: 0 0 8px rgba(53, 208, 127, 0.45);
}

.data-health-row em {
  color: var(--terminal-text);
  font-style: normal;
}

.funnel-stack {
  display: grid;
  gap: 7px;
  padding-top: 4px;
}

.funnel-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  min-height: 30px;
  width: var(--funnel);
  margin-inline: auto;
  padding: 0 10px;
  border: 1px solid rgba(56, 217, 214, 0.18);
  background: linear-gradient(90deg, rgba(24, 101, 136, 0.64), rgba(36, 180, 118, 0.46));
  clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%);
  color: #d8f7ff;
  font-family: var(--mono);
  font-size: 12px;
}

.funnel-step strong {
  text-align: right;
}

.theme-heatmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  min-height: 134px;
}

.theme-heatmap div {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(53, 208, 127, calc(var(--heat) / 160));
}

.theme-heatmap div.danger {
  background: rgba(255, 77, 98, calc(var(--heat) / 170));
}

.theme-heatmap strong,
.theme-heatmap span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-heatmap strong {
  color: var(--terminal-text);
  font-size: 13px;
}

.theme-heatmap span {
  margin-top: 4px;
  color: var(--terminal-green);
  font-family: var(--mono);
  font-size: 12px;
}

.theme-heatmap .danger span {
  color: var(--terminal-red);
}

.heat-scale {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 10px;
}

.heat-scale i {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--terminal-red), rgba(255, 255, 255, 0.18), var(--terminal-green));
}

.action-donut-wrap {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 138px;
}

.action-donut {
  display: grid;
  width: 138px;
  height: 138px;
  place-items: center;
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(79, 155, 255, 0.18);
}

.action-donut::after {
  content: "";
  position: absolute;
}

.action-donut strong,
.action-donut span {
  grid-area: 1 / 1;
  z-index: 1;
}

.action-donut strong {
  margin-top: -14px;
  font-family: var(--mono);
  font-size: 30px;
}

.action-donut span {
  margin-top: 34px;
  color: var(--terminal-muted);
  font-size: 12px;
}

.action-donut {
  position: relative;
}

.action-donut::before {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: inherit;
  background: var(--terminal-panel);
}

.action-legend {
  display: grid;
  gap: 9px;
}

.action-legend span {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  color: var(--terminal-muted);
  font-size: 12px;
}

.action-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.action-legend .positive { color: var(--terminal-green); }
.action-legend .blue { color: var(--terminal-blue); }
.action-legend .warning { color: var(--terminal-yellow); }
.action-legend .purple { color: var(--terminal-purple); }
.action-legend .cyan { color: var(--terminal-cyan); }

.command-ops-grid {
  display: grid;
  grid-template-columns: minmax(310px, 0.76fr) minmax(0, 1.72fr) minmax(320px, 0.86fr);
  grid-template-areas:
    "targets chart control"
    "events events logs";
  gap: 8px;
  align-items: stretch;
}

.terminal-target-panel {
  grid-area: targets;
  min-height: 500px;
  padding: 12px;
}

.terminal-chart-panel {
  grid-area: chart;
  min-height: 500px;
  padding: 10px;
}

.terminal-right-rail {
  grid-area: control;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.terminal-event-panel {
  grid-area: events;
  min-height: 218px;
  padding: 12px;
}

.terminal-log-panel {
  grid-area: logs;
  min-height: 218px;
}

.terminal-target-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  margin-bottom: 8px;
}

.terminal-target-toolbar label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--terminal-line-soft);
  border-radius: 4px;
  background: rgba(2, 12, 22, 0.66);
  color: var(--terminal-muted);
}

.terminal-target-toolbar input {
  height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--terminal-text);
  box-shadow: none;
}

.terminal-filter-button {
  display: grid;
  min-height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--terminal-line-soft);
  border-radius: 4px;
  background: rgba(2, 12, 22, 0.66);
  color: var(--terminal-muted);
}

.terminal-target-panel .command-filter-panel {
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.terminal-target-panel .command-filter-panel .section-head {
  display: none;
}

.terminal-target-panel .command-filter-group {
  margin-top: 7px;
}

.terminal-target-panel .command-filter-buttons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.terminal-target-panel .command-filter-buttons button {
  min-height: 28px;
  padding: 4px 7px;
  border-color: var(--terminal-line-soft);
  border-radius: 4px;
  background: rgba(3, 17, 30, 0.72);
  color: var(--terminal-muted);
  font-size: 11px;
}

.terminal-target-panel .command-filter-buttons button.active {
  background: rgba(31, 107, 188, 0.48);
  color: #e7f2ff;
}

.terminal-target-head-row,
.terminal-target-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 74px 66px 58px 62px;
  gap: 8px;
  align-items: center;
}

.terminal-target-head-row {
  padding: 9px 6px;
  border-bottom: 1px solid var(--terminal-line-soft);
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 11px;
}

.terminal-target-list {
  display: grid;
  max-height: 312px;
  overflow: auto;
}

.terminal-target-row {
  width: 100%;
  min-height: 58px;
  padding: 8px 6px;
  border: 0;
  border-bottom: 1px solid var(--terminal-line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--terminal-text);
  box-shadow: none;
  text-align: left;
  transform: none;
}

.terminal-target-row.active,
.terminal-target-row:hover {
  background: linear-gradient(90deg, rgba(32, 147, 208, 0.23), rgba(3, 24, 42, 0.12));
}

.terminal-target-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
}

.terminal-target-row span:first-child strong,
.terminal-target-row span:first-child em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-target-row span:first-child em {
  color: var(--terminal-muted);
  font-style: normal;
}

.signal-ring {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle, var(--terminal-panel) 55%, transparent 56%),
    conic-gradient(currentColor calc(var(--signal) * 1%), rgba(255, 255, 255, 0.10) 0);
  color: var(--terminal-green);
  font-family: var(--mono);
  font-weight: 850;
}

.signal-ring.warning { color: var(--terminal-yellow); }
.signal-ring.danger { color: var(--terminal-red); }
.signal-ring.neutral { color: var(--terminal-blue); }
.signal-ring.big {
  width: 76px;
  height: 76px;
  font-size: 22px;
}

.terminal-status {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 11px;
}

.terminal-empty,
.terminal-chart-empty,
.operation-empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  color: var(--terminal-muted);
  border: 1px dashed var(--terminal-line-soft);
  border-radius: 4px;
  background: rgba(2, 12, 22, 0.50);
}

.terminal-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--terminal-line-soft);
}

.terminal-chart-toolbar span {
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 12px;
}

.terminal-quote-strip,
.terminal-chart-plan {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  padding: 6px 8px;
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 12px;
}

.terminal-quote-strip strong {
  color: var(--terminal-red);
}

.terminal-chart-stage {
  overflow: hidden;
  border: 1px solid var(--terminal-line-soft);
  border-radius: 4px;
  background:
    linear-gradient(rgba(78, 156, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 156, 232, 0.026) 1px, transparent 1px),
    rgba(1, 12, 22, 0.88);
  background-size: 34px 34px;
}

.terminal-chart-stage .command-kline-chart {
  height: 340px;
}

.terminal-research-drawer {
  margin-top: 8px;
  border: 1px solid var(--terminal-line-soft);
  border-radius: 4px;
  background: rgba(2, 12, 22, 0.60);
}

.terminal-research-drawer summary {
  cursor: pointer;
  padding: 10px;
  color: var(--terminal-text);
  font-weight: 700;
}

.terminal-research-grid,
.terminal-execution-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.terminal-research-grid .command-research-block,
.terminal-execution-strip div {
  border-color: var(--terminal-line-soft);
  border-radius: 4px;
  background: rgba(7, 28, 48, 0.72);
}

.operation-console-panel {
  min-height: 500px;
}

.operation-target-head {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 8px 0 14px;
}

.operation-target-head h3 {
  margin: 0 0 8px;
  color: var(--terminal-text);
  font-size: 20px;
}

.operation-target-head h3 em {
  color: var(--terminal-muted);
  font-size: 14px;
  font-style: normal;
}

.operation-target-head span,
.operation-metrics span,
.operation-metrics strong,
.quick-command {
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 12px;
}

.operation-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.operation-metrics div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--terminal-line-soft);
}

.operation-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--terminal-text);
  font-size: 16px;
}

.operation-actions {
  display: grid;
  gap: 8px;
}

.terminal-action {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--terminal-line-soft);
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(9, 39, 70, 0.92), rgba(3, 18, 34, 0.82));
  color: var(--terminal-text);
  box-shadow: none;
  transform: none;
}

.terminal-action:hover {
  border-color: rgba(78, 156, 232, 0.56);
  background: linear-gradient(90deg, rgba(18, 74, 126, 0.95), rgba(5, 27, 49, 0.88));
}

.quick-command {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--terminal-line-soft);
}

.event-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.terminal-event-table {
  display: grid;
  gap: 0;
}

.terminal-event-row {
  display: grid;
  grid-template-columns: 78px 88px 130px minmax(0, 1fr) 94px 118px;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid var(--terminal-line-soft);
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 12px;
}

.terminal-event-row.head {
  color: #a7b8d6;
}

.terminal-event-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-event-row .rating {
  color: var(--terminal-red);
  letter-spacing: 0.08em;
}

.system-log-panel {
  padding: 12px;
}

.system-log-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.system-log-list p {
  margin: 0;
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
}

.system-log-more {
  justify-self: end;
  margin-top: 12px;
  padding: 6px 0;
  color: var(--terminal-blue);
  background: transparent;
  box-shadow: none;
}

.command-alternatives {
  margin-top: 8px;
  padding: 0;
}

.app-shell.view-strategy .command-alternatives {
  border-color: var(--terminal-line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(13, 45, 76, 0.82), rgba(4, 17, 31, 0.96)),
    var(--terminal-panel);
  box-shadow:
    inset 0 0 0 1px rgba(120, 200, 255, 0.035),
    0 0 24px rgba(20, 103, 177, 0.16);
}

.app-shell.view-strategy .command-alternatives summary {
  color: var(--terminal-text);
}

.app-shell.view-strategy .command-alt-list article {
  border-color: var(--terminal-line-soft);
  border-radius: 4px;
  background: rgba(2, 12, 22, 0.60);
}

@media (max-width: 1180px) {
  .terminal-header,
  .command-intel-grid,
  .command-ops-grid {
    grid-template-columns: 1fr;
  }

  .command-ops-grid {
    grid-template-areas:
      "targets"
      "chart"
      "control"
      "events"
      "logs";
  }

  .terminal-target-panel,
  .terminal-chart-panel,
  .terminal-right-rail,
  .terminal-event-panel,
  .terminal-log-panel {
    min-height: 0;
  }

  .terminal-target-list {
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  .app-shell.view-strategy .content {
    padding: 8px;
  }

  .terminal-header,
  .terminal-panel,
  .terminal-target-panel,
  .terminal-chart-panel,
  .terminal-event-panel,
  .terminal-log-panel {
    border-radius: 6px;
  }

  .terminal-brand {
    font-size: 18px;
  }

  .terminal-header-status,
  .terminal-header-right {
    gap: 7px;
  }

  .terminal-micro-stats,
  .action-donut-wrap,
  .terminal-research-grid,
  .terminal-execution-strip,
  .operation-metrics {
    grid-template-columns: 1fr;
  }

  .terminal-target-head-row {
    display: none;
  }

  .terminal-target-row {
    grid-template-columns: minmax(0, 1fr) 48px 58px;
  }

  .terminal-target-row > span:nth-child(4),
  .terminal-target-row > span:nth-child(5) {
    display: none;
  }

  .terminal-event-row {
    grid-template-columns: 64px 78px minmax(0, 1fr);
  }

  .terminal-event-row span:nth-child(3),
  .terminal-event-row span:nth-child(5),
  .terminal-event-row span:nth-child(6) {
    display: none;
  }
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-secondary: #eaf0f7;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: rgba(247, 250, 253, 0.92);
  --field-bg: rgba(255, 255, 255, 0.96);
  --surface: rgba(15, 23, 42, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(15, 23, 42, 0.10);
  --line-strong: rgba(37, 99, 235, 0.20);
  --text: #101827;
  --muted: #667085;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --accent: #2563eb;
  --accent-2: #059669;
  --positive: #059669;
  --warning: #b45309;
  --danger: #dc2626;
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
  --glass: rgba(255, 255, 255, 0.76);
  --glow: 0 0 0 rgba(37, 99, 235, 0);
  --body-bg:
    radial-gradient(circle at 16% -8%, rgba(37, 99, 235, 0.10), transparent 34%),
    radial-gradient(circle at 92% 4%, rgba(5, 150, 105, 0.07), transparent 28%),
    linear-gradient(180deg, #f9fbff 0%, var(--bg) 58%, #edf2f8 100%);
  --body-grid:
    linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  --body-scanline: rgba(37, 99, 235, 0.012);
  --topbar-bg: linear-gradient(180deg, rgba(249, 251, 255, 0.96), rgba(249, 251, 255, 0.74) 78%, transparent);
  --sidebar-bg:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(235, 241, 249, 0.98) 100%);
  --login-bg:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.12), transparent 31%),
    radial-gradient(circle at 84% 18%, rgba(5, 150, 105, 0.08), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #eef4fb 52%, #e6edf6 100%);
  --login-panel-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 251, 0.94)),
    rgba(255, 255, 255, 0.90);
  --chip-active-text: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--body-bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: var(--body-grid);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--body-scanline) 50%,
    transparent 100%
  );
  background-size: 100% 12px;
  opacity: 0.24;
}

::selection {
  color: #06111f;
  background: rgba(118, 184, 255, 0.88);
}

* {
  scrollbar-color: rgba(77, 163, 255, 0.34) rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(77, 163, 255, 0.36);
  background-clip: padding-box;
}

@keyframes loginGridDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 0 108px, 108px 0;
  }
}

@keyframes loginHaloSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loginFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, -18px, 0) rotate(5deg);
  }
}

@keyframes beamSweep {
  0%,
  100% {
    opacity: 0.24;
    transform: translateX(-6%) rotate(-8deg);
  }
  50% {
    opacity: 0.72;
    transform: translateX(6%) rotate(-8deg);
  }
}

@keyframes logoSweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes logoPulse {
  0% {
    opacity: 0.65;
    transform: scale(0.55);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

button,
input,
textarea,
select {
  font: inherit;
}

hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

button {
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #2f8cff, #4da3ff);
  color: #f8fbff;
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 650;
  transition:
    background 140ms ease,
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease),
    opacity 140ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button:hover {
  background: linear-gradient(135deg, #4da3ff, #76b8ff);
  box-shadow: 0 12px 34px rgba(77, 163, 255, 0.18);
  transform: translateY(-1px);
}

button.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

button:disabled,
button.is-busy {
  cursor: wait;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

button.is-busy {
  position: relative;
  overflow: hidden;
}

button.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 35%, rgba(255, 255, 255, 0.18) 48%, transparent 62% 100%);
  transform: translateX(-100%);
  animation: busySweep 1.2s var(--ease) infinite;
}

@keyframes busySweep {
  to {
    transform: translateX(100%);
  }
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(77, 163, 255, 0.9);
  outline-offset: 3px;
}

button.compact {
  padding: 7px 10px;
  font-size: 12px;
}

button.danger {
  background: var(--danger);
}

button.danger.ghost {
  color: #ffb5c8;
  border-color: rgba(255, 80, 120, 0.28);
  background: rgba(255, 80, 120, 0.08);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--field-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(77, 163, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.10);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-shell {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--login-bg);
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  inset: -18%;
  pointer-events: none;
}

.login-shell::before {
  background-image:
    linear-gradient(rgba(77, 163, 255, 0.044) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 163, 255, 0.038) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(700px) rotateX(62deg) translateY(12%);
  transform-origin: 50% 85%;
  animation: loginGridDrift 12s linear infinite;
}

.login-shell::after {
  background:
    conic-gradient(from 90deg at 50% 50%, transparent 0deg, rgba(77, 163, 255, 0.14) 72deg, transparent 128deg, rgba(34, 197, 94, 0.055) 212deg, transparent 300deg),
    radial-gradient(circle at center, transparent 0 27%, rgba(77, 163, 255, 0.075) 28%, transparent 31%);
  filter: blur(2px);
  opacity: 0.52;
  animation: loginHaloSpin 24s linear infinite;
}

.login-orbit {
  position: absolute;
  width: min(72vw, 740px);
  aspect-ratio: 1;
  border: 1px solid rgba(77, 163, 255, 0.13);
  border-radius: 50%;
  box-shadow:
    inset 0 0 70px rgba(77, 163, 255, 0.07),
    0 0 120px rgba(77, 163, 255, 0.10);
  animation: loginFloat 8s ease-in-out infinite;
}

.login-orbit i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-strong);
  box-shadow: 0 0 22px rgba(77, 163, 255, 0.64);
}

.login-orbit i:nth-child(1) {
  top: 16%;
  left: 70%;
}

.login-orbit i:nth-child(2) {
  right: 10%;
  bottom: 29%;
  background: var(--accent-2);
}

.login-orbit i:nth-child(3) {
  left: 15%;
  bottom: 18%;
  background: var(--accent);
}

.login-grid-beam {
  position: absolute;
  width: 150%;
  height: 160px;
  top: 54%;
  left: -25%;
  transform: rotate(-8deg);
  background: linear-gradient(90deg, transparent, rgba(77, 163, 255, 0.16), rgba(34, 197, 94, 0.055), transparent);
  filter: blur(18px);
  animation: beamSweep 7s ease-in-out infinite;
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  background: var(--login-panel-bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow:
    0 32px 110px rgba(0, 0, 0, 0.66),
    0 0 80px rgba(77, 163, 255, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 32px;
  backdrop-filter: blur(24px);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.66), transparent 34%, rgba(34, 197, 94, 0.26));
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.login-panel h1 {
  margin: 0 0 8px;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
}

.login-panel p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.profile-form {
  display: grid;
  gap: 18px;
}

.mode-template-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.mode-template-main h3 {
  margin: 6px 0 6px;
  font-size: 20px;
}

.mode-template-main p {
  margin: 0;
  line-height: 1.55;
}

.mode-template-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mode-template-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
}

.mode-template-side {
  display: grid;
  gap: 12px;
}

.mode-template-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mode-template-metrics span {
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.mode-template-metrics em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.mode-template-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 13px;
}

.profile-group {
  display: grid;
  gap: 14px;
}

.profile-group + .profile-group {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.profile-group-head h2 {
  margin: 0 0 5px;
}

.profile-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}

.profile-field strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 14px;
}

.profile-field p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.switch-line {
  justify-self: end;
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 30px;
}

.switch-line input {
  position: absolute;
  opacity: 0;
}

.switch-line span {
  width: 52px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  transition: border-color 160ms ease, background 160ms ease;
}

.switch-line span::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}

.switch-line input:checked + span {
  border-color: rgba(77, 163, 255, 0.62);
  background: rgba(77, 163, 255, 0.20);
}

.switch-line input:checked + span::after {
  transform: translateX(22px);
  background: var(--accent-2);
}

.chip-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chip-checks label {
  display: inline-flex;
}

.chip-checks input {
  display: none;
}

.chip-checks span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
}

.chip-checks input:checked + span {
  color: var(--chip-active-text);
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  font-weight: 900;
}

.advanced-profile {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 14px;
  background: var(--panel-soft);
}

.advanced-profile summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
}

.advanced-profile summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.advanced-profile .profile-group {
  margin-top: 18px;
}

.profile-actions {
  position: sticky;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 9px;
}

.checkline input {
  width: auto;
}

.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 200ms var(--ease);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 88px minmax(0, 1fr);
}

.sidebar {
  background: var(--sidebar-bg);
  color: var(--text);
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  backdrop-filter: blur(20px);
  transition:
    padding 200ms var(--ease),
    border-color 200ms ease;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  min-height: 44px;
}

.brand-lockup p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.brand-copy {
  min-width: 0;
  transition:
    opacity 180ms var(--ease),
    transform 180ms var(--ease),
    width 180ms var(--ease);
}

.sidebar-toggle {
  margin-left: auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: none;
}

.sidebar-toggle:hover {
  color: var(--text);
  background: rgba(77, 163, 255, 0.09);
}

.sidebar-collapsed .sidebar {
  padding: 24px 16px;
}

.sidebar-collapsed .brand-lockup {
  justify-content: center;
  width: 100%;
  margin-bottom: 26px;
  gap: 0;
}

.sidebar-collapsed .brand-copy {
  width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  overflow: hidden;
}

.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  left: 24px;
  top: 86px;
  width: 40px;
  height: 40px;
  opacity: 0;
  transform: translateY(-6px);
}

.sidebar-collapsed .sidebar:hover .sidebar-toggle,
.sidebar-collapsed .sidebar:focus-within .sidebar-toggle {
  opacity: 1;
  transform: translateY(0);
}

.signal-logo {
  position: relative;
  flex: 0 0 auto;
  isolation: isolate;
  display: grid;
  width: 42px;
  height: 42px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 13px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(77, 163, 255, 0.24), transparent 44%),
    radial-gradient(circle at 72% 76%, rgba(34, 197, 94, 0.12), transparent 34%),
    linear-gradient(145deg, #1a2028 0%, #0b0f14 62%, #05070b 100%);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(77, 163, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.signal-logo::before {
  content: "";
  position: absolute;
  inset: -45%;
  background: conic-gradient(from 180deg, transparent, rgba(77, 163, 255, 0.34), transparent 32%);
  animation: logoSweep 5.2s linear infinite;
}

.signal-logo-scan,
.signal-logo-pulse {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.signal-logo-scan {
  inset: 7px;
  border-radius: 10px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 8px 8px;
  box-shadow: inset 0 0 18px rgba(77, 163, 255, 0.08);
}

.signal-logo-glyph {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.14))
    drop-shadow(0 0 10px rgba(77, 163, 255, 0.22));
}

.signal-logo-glyph path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signal-logo-ring {
  fill: none;
  stroke: rgba(118, 184, 255, 0.30);
  stroke-width: 1.6;
}

.signal-logo-ring.ring-b {
  stroke: rgba(255, 255, 255, 0.22);
}

.signal-logo-orbit {
  stroke: rgba(255, 255, 255, 0.44);
  stroke-width: 1.7;
}

.signal-logo-wave {
  stroke: #76b8ff;
  stroke-width: 3.1;
}

.signal-logo-ping {
  stroke: rgba(34, 197, 94, 0.62);
  stroke-width: 1.5;
}

.signal-logo-pulse {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(77, 163, 255, 0.30);
  border-radius: 999px;
  animation: logoPulse 2.4s ease-out infinite;
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  box-shadow:
    0 20px 60px rgba(77, 163, 255, 0.22),
    0 0 70px rgba(34, 197, 94, 0.10);
}

.sidebar-collapsed .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.sidebar-collapsed .brand-mark .signal-logo-glyph {
  width: 31px;
  height: 31px;
}

.brand {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  background: transparent;
  color: var(--muted);
  text-align: left;
  border: 1px solid transparent;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms var(--ease);
}

.nav button:hover {
  transform: translateX(1px);
}

.nav-label {
  min-width: 0;
  white-space: nowrap;
  transition:
    opacity 160ms var(--ease),
    width 160ms var(--ease),
    transform 160ms var(--ease);
}

.nav button.active,
.nav button:hover {
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(77, 163, 255, 0.13), var(--surface));
  border-color: var(--line-strong);
  box-shadow: inset 3px 0 0 var(--brand);
}

.sidebar-collapsed .nav {
  justify-items: center;
  gap: 12px;
}

.sidebar-collapsed .nav button {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  justify-content: center;
  padding: 0;
  border-radius: 14px;
}

.sidebar-collapsed .nav button:hover {
  transform: translateY(-1px);
}

.sidebar-collapsed .nav-label {
  width: 0;
  opacity: 0;
  transform: translateX(-4px);
  overflow: hidden;
}

.sidebar-collapsed .nav button.active,
.sidebar-collapsed .nav button:hover {
  box-shadow:
    0 10px 28px rgba(77, 163, 255, 0.08),
    inset 0 0 0 1px rgba(77, 163, 255, 0.24);
}

.nav button.nav-more,
.mobile-more-backdrop,
.mobile-more-sheet {
  display: none;
}

.content {
  padding: 30px;
  width: 100%;
  max-width: none;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 8px 0 14px;
  background: var(--topbar-bg);
  backdrop-filter: blur(18px);
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(26px, 2vw, 32px);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
}

.metric strong,
.hero-stats strong,
.mission-stack strong,
.side-metrics strong,
.module-stats strong,
.review-kpi strong,
.forecast-row strong,
.forecast-item strong,
.score-meter strong,
.agent-chip strong,
.detail strong,
.decision-strip strong,
.execution-plan strong,
.layer-row strong {
  font-family: var(--mono);
  letter-spacing: -0.01em;
}

.icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  vertical-align: -2px;
}

.eyebrow .icon,
.tag .icon,
button .icon,
h2 .icon,
h3 .icon,
summary .icon {
  margin-right: 6px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 30px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.theme-toggle button {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
}

.theme-toggle button:hover {
  color: var(--text);
  background: var(--surface);
  box-shadow: none;
  transform: none;
}

.theme-toggle button.active {
  color: var(--chip-active-text);
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.account-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  white-space: nowrap;
}

.view-frame {
  animation: viewIn 180ms ease both;
}

.risk-disclaimer {
  margin: 18px 0 4px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  line-height: 1.7;
}

@keyframes viewIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.strategy-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 16px;
  align-items: start;
}

.strategy-main,
.strategy-aside {
  display: grid;
  gap: 16px;
}

.strategy-aside {
  position: sticky;
  top: 92px;
}

.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition:
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease),
    transform 180ms var(--ease),
    background 180ms ease;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(77, 163, 255, 0.075), transparent 32%),
    linear-gradient(315deg, rgba(255, 255, 255, 0.032), transparent 28%);
  opacity: 0.48;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.loading-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 220px;
}

.load-progress {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  max-width: 360px;
}

.load-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.load-progress-head strong {
  color: var(--brand-strong);
  font-size: 13px;
}

.load-progress-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(77, 163, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.load-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4da3ff, #76b8ff);
  box-shadow: 0 0 18px rgba(77, 163, 255, 0.24);
  transition: width 420ms ease;
}

.skeleton-grid {
  display: grid;
  gap: 12px;
}

.skeleton {
  min-height: 58px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.10), rgba(255,255,255,0.04)),
    var(--panel-soft);
  background-size: 220% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton.wide {
  min-height: 92px;
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  width: 100%;
  min-height: 220px;
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  animation: cardRise 220ms var(--ease) both;
}

.focus-list > .empty-state,
.pick-list > .empty-state {
  grid-column: 1 / -1;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state p {
  max-width: 520px;
  color: var(--muted);
}

.empty-orb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(118, 184, 255, 0.95), rgba(77, 163, 255, 0.88) 46%, rgba(21, 27, 34, 0.25) 48%),
    linear-gradient(135deg, rgba(77, 163, 255, 0.9), rgba(118, 184, 255, 0.72));
  box-shadow: 0 18px 40px rgba(77, 163, 255, 0.18);
}

.hero-panel {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 12px;
  padding: 18px;
  color: white;
  background:
    radial-gradient(circle at 92% 12%, rgba(77, 163, 255, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(77, 163, 255, 0.12), rgba(255, 255, 255, 0.026)),
    rgba(16, 20, 24, 0.94);
  border: 1px solid rgba(77, 163, 255, 0.20);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-panel::after,
.trade-cockpit::after {
  content: "";
  position: absolute;
  inset: auto -20% 0 -20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(77, 163, 255, 0.64), transparent);
  animation: scanLine 3.2s ease-in-out infinite;
}

@keyframes scanLine {
  0%, 100% { transform: translateX(-22%); opacity: 0.3; }
  50% { transform: translateX(22%); opacity: 0.9; }
}

.trade-cockpit {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 12px;
  padding: 20px;
  color: white;
  background:
    linear-gradient(180deg, rgba(21, 27, 34, 0.92), rgba(11, 15, 20, 0.96)),
    rgba(16, 20, 24, 0.96);
  border: 1px solid rgba(126, 151, 185, 0.22);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.trade-cockpit h2 {
  margin: 6px 0;
  max-width: 760px;
  font-size: 28px;
  line-height: 1.16;
  letter-spacing: 0;
}

.trade-cockpit p {
  max-width: 760px;
  margin: 0;
  color: #b9c9df;
  line-height: 1.65;
}

.mode-strip,
.mode-plan-strip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(77, 163, 255, 0.22);
  border-radius: 999px;
  color: #d8e9ff;
  background: rgba(77, 163, 255, 0.08);
  font-size: 12px;
}

.mode-strip span,
.mode-plan-strip span {
  display: inline-flex;
  align-items: center;
  color: var(--brand-strong);
  font-weight: 800;
}

.mode-strip strong,
.mode-plan-strip strong {
  color: #e9fbff;
  font-size: 12px;
}

.mode-strip em,
.mode-plan-strip em {
  color: var(--muted);
  font-style: normal;
}

.mode-plan-strip {
  justify-content: space-between;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.mode-plan-strip.standalone {
  margin: 10px 0;
}

.cockpit-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mission-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  gap: 10px;
  min-width: 290px;
}

.mission-stack div {
  position: relative;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.mission-stack .icon {
  color: var(--brand-strong);
  margin-bottom: 10px;
}

.mission-stack span,
.mission-stack em {
  display: block;
  color: #9fb2c8;
  font-size: 12px;
  font-style: normal;
}

.mission-stack strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 28px;
}

.focus-panel {
  padding: 16px;
}

.focus-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.focus-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 158px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  overflow: hidden;
  animation: cardRise 240ms ease both;
}

.focus-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), transparent 42%);
  opacity: 0.35;
}

.focus-card.positive {
  border-color: rgba(54, 242, 160, 0.32);
}

.focus-card.warning {
  border-color: rgba(255, 209, 102, 0.28);
}

.focus-card.danger {
  border-color: rgba(255, 92, 122, 0.28);
}

.focus-rank {
  color: rgba(231, 238, 252, 0.34);
  font-size: 22px;
  font-weight: 800;
}

.focus-card h3 {
  margin: 4px 0 6px;
  font-size: 18px;
}

.focus-card strong {
  color: var(--text);
}

.focus-card p,
.focus-price em {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.focus-price {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.focus-price span {
  font-size: 20px;
  font-weight: 800;
}

.hero-panel h2 {
  margin: 8px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.hero-panel p {
  max-width: 680px;
  margin: 0;
  color: #b9c9df;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 10px;
  min-width: 240px;
}

.hero-stats div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.052);
  box-shadow: inset 0 0 22px rgba(77, 163, 255, 0.055);
}

.hero-stats span,
.eyebrow {
  display: block;
  color: #8ba1b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stats span {
  color: #bfd0df;
}

.hero-stats strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 28px;
}

.flow-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.flow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.023);
  opacity: 0.72;
}

.flow-step i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #06111f;
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.96), rgba(118, 184, 255, 0.9));
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}

.flow-step strong,
.flow-step span {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-step strong {
  color: var(--text);
  font-size: 12px;
}

.flow-step span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.flow-step.active {
  opacity: 1;
  border-color: rgba(77, 163, 255, 0.36);
  box-shadow: 0 0 0 1px rgba(77, 163, 255, 0.06), 0 12px 30px rgba(77, 163, 255, 0.09);
}

.flow-step.done {
  opacity: 0.9;
}

.flow-step.warning i {
  background: linear-gradient(135deg, #f8bd55, #ffd66e);
}

.flow-step.danger i {
  background: linear-gradient(135deg, #ff5f82, #ff9db4);
}

.flow-step.muted i {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

.agent-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.agent-chip {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 9px;
  background: rgba(4, 10, 22, 0.48);
}

.agent-chip span,
.agent-chip em {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-chip strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-chip.positive {
  border-color: rgba(54, 242, 160, 0.24);
  background: rgba(54, 242, 160, 0.045);
}

.agent-chip.warning {
  border-color: rgba(255, 209, 102, 0.22);
  background: rgba(255, 209, 102, 0.04);
}

.agent-chip.danger {
  border-color: rgba(255, 92, 122, 0.22);
  background: rgba(255, 92, 122, 0.04);
}

@media (hover: hover) and (pointer: fine) {
  .panel:hover,
  .focus-card:hover,
  .radar-item:hover,
  .review-subpanel:hover,
  .intel-group:hover,
  .intel-card:hover,
  .sector-hot-row:hover,
  .tushare-module:hover,
  .mini-panel:hover {
    border-color: rgba(77, 163, 255, 0.22);
    box-shadow:
      0 18px 46px rgba(0, 0, 0, 0.34),
      0 0 28px rgba(77, 163, 255, 0.08);
    transform: translateY(-2px);
  }

  .hero-panel:hover,
  .trade-cockpit:hover {
    border-color: rgba(77, 163, 255, 0.30);
    box-shadow:
      0 28px 92px rgba(0, 0, 0, 0.50),
      0 0 36px rgba(77, 163, 255, 0.10);
  }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0 0 4px;
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-6 {
  grid-column: span 6;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.metric {
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.metric strong {
  font-size: 30px;
  text-shadow: 0 0 20px rgba(77, 163, 255, 0.13);
}

.metric::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 163, 255, 0.20), transparent 68%);
  filter: blur(1px);
}

.data-radar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.radar-item {
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(8, 14, 27, 0.78);
}

.radar-item,
.review-subpanel,
.intel-card,
.sector-hot-row,
.tushare-module,
.mini-panel,
.side-metrics div,
.detail,
.forecast-item,
.execution-plan div,
.execution-why div,
.score-meter {
  transition:
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease),
    transform 180ms var(--ease),
    background 180ms ease;
}

.radar-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.radar-item strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.radar-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.radar-item.positive {
  border-color: rgba(54, 242, 160, 0.30);
}

.radar-item.warning {
  border-color: rgba(255, 209, 102, 0.32);
}

.radar-item.danger {
  border-color: rgba(255, 92, 122, 0.34);
}

.data-radar.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-radar.compact .radar-item {
  min-height: 86px;
}

.data-radar.compact .radar-item strong {
  font-size: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  background: var(--panel-soft);
  color: var(--text);
  white-space: nowrap;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.tag.positive {
  background: rgba(54, 242, 160, 0.13);
  color: var(--positive);
  box-shadow: 0 0 18px rgba(54, 242, 160, 0.08);
}

.tag.warning {
  background: rgba(255, 209, 102, 0.14);
  color: var(--warning);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.08);
}

.tag.danger {
  background: rgba(255, 92, 122, 0.13);
  color: var(--danger);
  box-shadow: 0 0 18px rgba(255, 92, 122, 0.08);
}

.tag.attack {
  background: rgba(77, 163, 255, 0.14);
  color: var(--brand-strong);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.segmented button {
  width: auto;
  min-height: 36px;
  padding: 8px 12px;
  background: var(--panel-soft);
  color: var(--muted);
  border: 1px solid transparent;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.segmented button.active {
  color: #07111f;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-color: transparent;
  box-shadow: 0 0 26px rgba(77, 163, 255, 0.16);
}

.stage-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.primary-stage-panel {
  position: sticky;
  top: 86px;
  z-index: 2;
  background: rgba(13, 20, 36, 0.92);
  backdrop-filter: blur(16px);
}

.stage-tabs {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  width: max-content;
  min-width: max-content;
  flex: 0 0 auto;
  gap: 4px;
}

.stage-tabs button {
  min-width: 136px;
  white-space: nowrap;
}

.stage-note {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  text-align: right;
}

.toast {
  position: fixed;
  right: 22px;
  top: 92px;
  bottom: auto;
  z-index: 20;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 18, 31, 0.92);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 200ms var(--ease),
    transform 200ms var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.positive {
  border-color: rgba(54, 242, 160, 0.38);
}

.toast.warning {
  border-color: rgba(245, 158, 11, 0.42);
}

.toast.danger {
  border-color: rgba(255, 92, 122, 0.46);
}

.ai-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.46),
    0 0 40px rgba(77, 163, 255, 0.18);
}

.ai-fab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #06111f;
}

.ai-assistant {
  position: fixed;
  right: 22px;
  bottom: 82px;
  z-index: 29;
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
  width: min(680px, calc(100vw - 44px));
  max-height: min(820px, calc(100vh - 112px));
  border: 1px solid rgba(77, 163, 255, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(12, 21, 39, 0.94), rgba(5, 9, 19, 0.96)),
    rgba(5, 9, 19, 0.96);
  box-shadow: var(--shadow), 0 0 70px rgba(77, 163, 255, 0.12);
  backdrop-filter: blur(24px);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.ai-assistant.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-head,
.ai-input {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-head strong {
  display: block;
  font-size: 18px;
}

.ai-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.ai-quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.ai-quick button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}

.ai-quick::-webkit-scrollbar {
  display: none;
}

.ai-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 320px;
  overflow: auto;
  padding: 16px 18px;
  overscroll-behavior: contain;
}

.ai-message {
  display: grid;
  gap: 6px;
}

.ai-message > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-message > div {
  width: fit-content;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 14px;
  line-height: 1.58;
}

.ai-message.user {
  justify-items: end;
}

.ai-message.user > div {
  color: #06111f;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  font-weight: 750;
}

.ai-message .markdown h2,
.ai-message .markdown h3,
.ai-message p {
  margin-top: 0;
}

.ai-message .markdown h2,
.ai-message .markdown h3 {
  font-size: 15px;
}

.ai-message .markdown ul,
.ai-message .markdown ol {
  padding-left: 18px;
}

.ai-message .markdown li {
  margin: 4px 0;
}

.ai-thinking {
  display: grid;
  grid-template-columns: repeat(4, 18px) minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(77, 163, 255, 0.12);
  border-radius: 14px;
  background: rgba(77, 163, 255, 0.045);
  color: var(--muted);
  font-size: 12px;
}

.ai-thinking span {
  display: block;
  width: 18px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(118, 184, 255, 0.88), rgba(77, 163, 255, 0.42));
  transform-origin: 50% 100%;
  animation: aiWave 1.1s var(--ease) infinite;
}

.ai-thinking span:nth-child(2) {
  animation-delay: 90ms;
}

.ai-thinking span:nth-child(3) {
  animation-delay: 180ms;
}

.ai-thinking span:nth-child(4) {
  animation-delay: 270ms;
}

.ai-thinking em {
  min-width: 0;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes aiWave {
  0%,
  100% {
    opacity: 0.46;
    transform: scaleY(0.42);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.typing-cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  border-radius: 999px;
  background: var(--brand-strong);
  animation: cursorBlink 0.8s steps(2, start) infinite;
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

.ai-input {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.ai-input textarea {
  min-height: 92px;
  max-height: 168px;
  font-size: 14px;
  line-height: 1.5;
}

.ai-input button[type="submit"] {
  min-height: 46px;
}

.ai-search-toggle {
  display: inline-flex;
  width: fit-content;
  color: var(--muted);
}

.pick-list,
.user-list,
.signal-list {
  display: grid;
  gap: 12px;
}

.signal-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
  margin: 14px 0;
}

.pick-card,
.user-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018)),
    var(--panel);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
  animation: cardRise 220ms ease both;
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pick-card.etf-card {
  border-color: rgba(77, 163, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(77, 163, 255, 0.07), rgba(255, 255, 255, 0.014)),
    var(--panel);
}

.pick-card.action-positive {
  border-color: rgba(54, 242, 160, 0.26);
}

.pick-card.action-warning {
  border-color: rgba(255, 209, 102, 0.24);
}

.pick-card.action-danger {
  opacity: 0.82;
}

.pick-card:hover,
.user-row:hover {
  border-color: rgba(77, 163, 255, 0.34);
  box-shadow: 0 18px 42px rgba(77, 163, 255, 0.10);
  transform: translateY(-1px);
}

.pick-head,
.user-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.pick-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.pick-tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pick-head h3,
.user-head h3 {
  margin: 0;
}

.pick-head .muted {
  margin-top: 3px;
  font-size: 12px;
}

.details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.decision-strip {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.8fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.026);
}

.pick-summary-strip {
  grid-template-columns: 0.65fr 1.15fr 1fr 0.9fr;
  padding: 10px 12px;
}

.decision-strip.compact {
  grid-template-columns: 1.4fr 0.8fr;
  margin-top: 10px;
}

.decision-strip.hold-policy-strip {
  grid-template-columns: 0.8fr 0.7fr 1.5fr;
}

.expectancy-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.024);
}

.trust-strip {
  display: grid;
  grid-template-columns: 0.85fr 1.25fr 1.35fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(77, 163, 255, 0.16);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(77, 163, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.018);
}

.trust-strip span,
.trust-strip em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.trust-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.pick-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pick-analysis-grid div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.024);
}

.pick-analysis-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.pick-analysis-grid strong {
  display: -webkit-box;
  margin-top: 4px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pick-analysis-copy {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.pick-analysis-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.trade-execution-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(77, 163, 255, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(77, 163, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.018);
}

.trade-execution-panel.positive {
  border-color: rgba(54, 242, 160, 0.24);
}

.trade-execution-panel.warning {
  border-color: rgba(255, 209, 102, 0.24);
}

.trade-execution-panel.danger {
  border-color: rgba(255, 92, 122, 0.24);
}

.execution-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  align-items: stretch;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.execution-command > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(77, 163, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(5, 11, 24, 0.42);
}

.execution-command span,
.execution-plan span,
.execution-brief span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.execution-command strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1.05;
}

.execution-command p {
  margin: 7px 0 0;
  color: #c4d4e9;
  line-height: 1.5;
}

.execution-score {
  display: grid;
  align-content: center;
}

.execution-score strong {
  font-family: var(--mono);
  font-size: 34px;
}

.execution-score em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.execution-verdict {
  display: grid;
  grid-template-columns: 120px 0.5fr 1.6fr;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.execution-verdict span,
.execution-plan span,
.execution-why span {
  color: var(--muted);
  font-size: 11px;
}

.execution-verdict span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-strong);
  font-weight: 800;
}

.execution-verdict strong {
  font-size: 25px;
  line-height: 1.05;
}

.execution-verdict p {
  margin: 0;
  color: #c4d4e9;
  line-height: 1.5;
}

.execution-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.execution-plan div,
.execution-why div,
.execution-brief section {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 8px;
  background: rgba(5, 11, 24, 0.46);
}

.execution-plan strong,
.execution-plan em,
.execution-why strong {
  display: block;
}

.execution-plan strong {
  margin-top: 4px;
  font-size: 18px;
}

.execution-plan em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.execution-why {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 8px;
}

.execution-why strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.execution-brief {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 8px;
}

.execution-brief p {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
  white-space: normal;
  overflow: visible;
}

.execution-brief .danger-note {
  border-color: rgba(255, 209, 102, 0.16);
}

.visual-deck {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 10px;
}

.execution-visuals {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 10px;
}

.score-meter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.score-meter {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.022);
}

.score-meter div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.score-meter span {
  color: var(--muted);
  font-size: 11px;
}

.score-meter strong {
  font-size: 15px;
}

.score-meter i,
.forecast-track {
  position: relative;
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.score-meter i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--meter);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  box-shadow: 0 0 16px rgba(77, 163, 255, 0.24);
}

.score-meter.warning i::before {
  background: linear-gradient(90deg, #f8bd55, #ffd66e);
}

.score-meter.danger i::before {
  background: linear-gradient(90deg, #ff5f82, #ff9db4);
}

.forecast-chart {
  display: grid;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(77, 163, 255, 0.05), rgba(255, 255, 255, 0.018));
}

.forecast-row {
  display: grid;
  grid-template-columns: 32px minmax(120px, 1fr) 108px 44px;
  align-items: center;
  gap: 7px;
}

.forecast-row span,
.forecast-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.forecast-row span {
  font-weight: 850;
}

.forecast-row strong {
  font-size: 11px;
  text-align: right;
}

.forecast-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(77, 163, 255, 0.95), rgba(118, 184, 255, 0.96));
  box-shadow: 0 0 14px rgba(77, 163, 255, 0.22);
}

.compact-signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
  min-width: 0;
  overflow: hidden;
}

.compact-signal-list .tag {
  max-width: 100%;
  padding: 4px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
  font-size: 10px;
}

.nested-more {
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  padding-top: 6px;
}

.nested-more[open] {
  display: grid;
  gap: 8px;
}

details {
  transition:
    border-color 180ms var(--ease),
    background 180ms ease,
    box-shadow 180ms var(--ease);
}

details[open] {
  border-color: rgba(77, 163, 255, 0.18);
}

details summary {
  transition:
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms var(--ease);
}

details summary:hover {
  color: var(--brand-strong);
}

details[open] > summary {
  color: var(--brand-strong);
}

.position-watch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.position-watch span {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.position-live-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.position-live-strip .muted {
  font-size: 12px;
}

.layer-stack {
  display: grid;
  gap: 8px;
}

.layer-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.026);
}

.layer-row div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.layer-row span,
.layer-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.layer-row strong {
  color: var(--text);
}

.layer-row.attack {
  border-color: rgba(54, 242, 160, 0.22);
}

.layer-row.etf {
  border-color: rgba(77, 163, 255, 0.22);
}

.layer-row.avoid {
  border-color: rgba(255, 92, 122, 0.18);
}

.decision-strip.positive {
  background: rgba(54, 242, 160, 0.055);
  border-color: rgba(54, 242, 160, 0.22);
}

.decision-strip.warning {
  background: rgba(255, 209, 102, 0.045);
  border-color: rgba(255, 209, 102, 0.20);
}

.decision-strip.danger {
  background: rgba(255, 92, 122, 0.045);
  border-color: rgba(255, 92, 122, 0.20);
}

.decision-strip span,
.decision-strip em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.decision-strip strong {
  display: block;
  margin: 4px 0;
  font-size: 19px;
}

.pick-summary-strip strong {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 1.22;
}

.pick-one-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: #c4d4e9;
  font-size: 13px;
  line-height: 1.5;
}

.pick-one-line span {
  flex: 1 1 280px;
  min-width: 0;
}

.pick-one-line em {
  display: inline-flex;
  border: 1px solid rgba(77, 163, 255, 0.18);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--brand-strong);
  font-size: 11px;
  font-style: normal;
  background: rgba(77, 163, 255, 0.055);
}

.source-pill {
  width: auto;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #06111f;
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.96), rgba(118, 184, 255, 0.92));
  border: 0;
  box-shadow: 0 0 20px rgba(77, 163, 255, 0.12);
  font-size: 11px;
  white-space: nowrap;
}

.pick-more,
.score-more {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

.pick-more summary,
.score-more summary {
  list-style: none;
  width: fit-content;
  color: var(--brand-strong);
  font-size: 12px;
}

.pick-more summary::-webkit-details-marker,
.score-more summary::-webkit-details-marker {
  display: none;
}

.pick-more summary::after,
.score-more summary::after {
  content: " +";
}

.pick-more[open] summary::after,
.score-more[open] summary::after {
  content: " -";
}

.pick-more[open],
.score-more[open] {
  display: grid;
  gap: 10px;
  animation: detailReveal 220ms var(--ease) both;
}

@keyframes detailReveal {
  from {
    opacity: 0.72;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.explain-box {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.explain-box summary,
details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

.detail {
  background: var(--panel-soft);
  border-radius: 6px;
  padding: 10px;
}

.detail span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail strong {
  display: block;
  margin-top: 4px;
}

.forecast-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.forecast-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(77, 163, 255, 0.08), rgba(255, 255, 255, 0.025));
}

.forecast-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.forecast-item strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.forecast-item em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.review-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.review-kpi {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.review-kpi span,
.review-kpi em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.review-kpi strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.review-kpi.neutral strong {
  color: var(--muted);
  font-size: 22px;
}

.review-tabs {
  margin: 14px 0;
}

.review-decision-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid rgba(77, 163, 255, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(77, 163, 255, 0.10), rgba(11, 18, 32, 0.76)),
    rgba(11, 18, 32, 0.7);
}

.review-decision-panel.positive {
  border-color: rgba(54, 242, 160, 0.26);
  background:
    linear-gradient(135deg, rgba(54, 242, 160, 0.09), rgba(11, 18, 32, 0.76)),
    rgba(11, 18, 32, 0.7);
}

.review-decision-panel.warning {
  border-color: rgba(255, 209, 102, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.10), rgba(11, 18, 32, 0.76)),
    rgba(11, 18, 32, 0.7);
}

.review-decision-panel h3 {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: 18px;
}

.review-decision-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.decision-facts {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 520px;
}

.review-section-stack {
  display: grid;
  gap: 14px;
}

.review-subpanel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.review-subpanel h2 {
  margin: 0;
}

.missed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.missed-category-grid,
.learning-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.missed-category-card,
.learning-rule-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px;
  background: rgba(9, 15, 28, 0.72);
}

.missed-category-card.positive {
  border-color: rgba(54, 242, 160, 0.24);
}

.missed-category-card span,
.missed-category-card em,
.learning-rule-card p {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.5;
}

.missed-category-card strong {
  display: block;
  margin: 4px 0;
  color: var(--text);
  font-size: 1.1rem;
}

.rule-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.rule-head strong {
  color: var(--text);
  line-height: 1.35;
}

.learning-rule-card p {
  margin: 10px 0;
}

.missed-card {
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.10), rgba(15, 23, 42, 0.72)),
    rgba(8, 13, 26, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.missed-card.covered {
  border-color: rgba(34, 197, 94, 0.34);
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.10), rgba(15, 23, 42, 0.72)),
    rgba(8, 13, 26, 0.78);
}

.missed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.missed-head strong {
  color: var(--text);
  font-size: 1.05rem;
}

.missed-return {
  margin: 14px 0 8px;
  color: #fbbf24;
  font-size: 1.85rem;
  font-weight: 900;
}

.missed-card.covered .missed-return {
  color: var(--accent-2);
}

.missed-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.learning-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.learning-strip div {
  border: 1px solid rgba(61, 132, 255, 0.28);
  border-radius: 14px;
  padding: 12px;
  background: rgba(12, 20, 38, 0.74);
}

.learning-strip span,
.learning-strip em {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.learning-strip strong {
  display: block;
  margin: 5px 0;
  color: var(--text);
  font-size: 1rem;
}

.mini-panel {
  padding: 14px;
}

.mini-panel h3 {
  margin: 0 0 10px;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.mini-row span {
  color: var(--muted);
}

.mini-row strong {
  text-align: right;
}

.assistant-panel {
  background: rgba(255, 255, 255, 0.018);
}

.assistant-panel > details > summary {
  list-style: none;
}

.assistant-panel > details > summary::-webkit-details-marker {
  display: none;
}

.assistant-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.intelligence-list {
  display: grid;
  gap: 12px;
}

.intelligence-tabs {
  margin: 12px 0 14px;
}

.intel-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 320px;
}

.date-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.date-filter span {
  display: inline-block;
  min-width: 24px;
  white-space: nowrap;
}

.date-filter select {
  min-width: 132px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(8, 14, 27, 0.78);
}

.intel-searchbar {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.intel-search-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 14, 27, 0.76);
}

.intel-search-input svg {
  width: 16px;
  height: 16px;
  color: var(--brand-strong);
  flex: 0 0 auto;
}

.intel-search-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.intel-search-input input::placeholder {
  color: rgba(166, 184, 209, 0.72);
}

.intel-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intel-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(12, 22, 41, 0.72);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.intel-filter select {
  max-width: 118px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.intel-result-line {
  color: var(--muted);
  font-size: 12px;
}

.intel-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.014)),
    rgba(8, 14, 27, 0.72);
  transition: border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.intel-group.is-focused {
  border-color: rgba(77, 163, 255, 0.56);
  box-shadow: 0 0 36px rgba(77, 163, 255, 0.10);
}

.intel-group.is-dimmed {
  opacity: 0.35;
}

.intel-group-head,
.intel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.intel-group-head h3 {
  margin: 0 0 3px;
}

.intel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.intel-tags span {
  padding: 4px 8px;
  border: 1px solid rgba(77, 163, 255, 0.16);
  border-radius: 999px;
  color: var(--brand-strong);
  background: rgba(77, 163, 255, 0.045);
  font-size: 11px;
}

.intel-tags.small span {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.026);
}

.intel-tags.hot-stocks span,
.hot-stocks span {
  border-color: rgba(34, 197, 94, 0.24);
  color: #97ffd5;
  background: rgba(34, 197, 94, 0.055);
}

.intel-news-list {
  display: grid;
  gap: 8px;
}

.sector-card {
  border-color: rgba(34, 197, 94, 0.2);
}

.sector-hot-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.sector-hot-row strong {
  color: #dfeeff;
  font-size: 13px;
}

.compact-source-list {
  margin-top: 8px;
}

.intel-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.market-intel-card {
  display: block;
  padding: 0;
  overflow: hidden;
}

.market-intel-card details {
  display: block;
}

.market-intel-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.market-intel-card summary::-webkit-details-marker {
  display: none;
}

.market-intel-card summary:hover {
  background: rgba(77, 163, 255, 0.035);
}

.intel-card.positive {
  border-color: rgba(54, 242, 160, 0.22);
}

.intel-card.danger {
  border-color: rgba(255, 92, 122, 0.24);
}

.intel-card h4 {
  margin: 8px 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.intel-quick-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.intel-quick-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.intel-quick-meta svg {
  width: 13px;
  height: 13px;
  color: var(--brand-strong);
  flex: 0 0 auto;
}

.intel-expanded {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.intel-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.intel-two-col > div {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.intel-two-col strong {
  color: #dfeeff;
  font-size: 12px;
}

.intel-card-actions {
  display: flex;
  justify-content: flex-end;
}

.intel-card-actions a {
  color: #06111f;
  padding: 7px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  font-weight: 800;
  font-size: 12px;
}

.intel-card-actions em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.intel-card p {
  margin: 0;
  color: #b7c6dc;
  font-size: 13px;
  line-height: 1.55;
}

.intel-card-side {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.intel-card-side a {
  color: #06111f;
  padding: 6px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  font-weight: 800;
}

.intel-card-side em {
  font-style: normal;
  color: var(--muted);
}

.intel-reason {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 9px 10px;
  border: 1px solid rgba(77, 163, 255, 0.14);
  border-radius: 8px;
  background: rgba(77, 163, 255, 0.035);
}

.intel-reason strong {
  color: var(--brand-strong);
  font-size: 11px;
}

.intel-reason span,
.intel-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.intel-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.tushare-module-list {
  display: grid;
  gap: 10px;
}

.tushare-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.024);
}

.module-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.module-title h3 {
  margin: 0;
  font-size: 16px;
}

.tushare-module p {
  margin: 5px 0 0;
  color: #b7c6dc;
  font-size: 13px;
  line-height: 1.45;
}

.module-stats {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  text-align: right;
}

.module-stats strong {
  color: var(--text);
  font-size: 22px;
}

.module-stats span,
.module-stats em {
  font-size: 12px;
  font-style: normal;
}

.side-panel {
  padding: 16px;
}

.side-panel h3 {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
}

.side-metrics {
  display: grid;
  gap: 10px;
}

.side-metrics div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.side-metrics span,
.side-metrics em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.side-metrics strong {
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-box {
  margin: 0;
  line-height: 1.7;
  color: var(--text);
}

.report-card {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 14, 27, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.report-card.hidden {
  display: none;
}

.report-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.report-card-head h3 {
  margin: 3px 0 0;
}

.markdown {
  padding: 16px;
}

.markdown.collapsed {
  max-height: 360px;
  overflow: hidden;
  position: relative;
}

.markdown.collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 76px;
  background: linear-gradient(180deg, rgba(13, 20, 36, 0), var(--panel) 76%);
}

.markdown h2,
.markdown h3,
.markdown h4 {
  margin: 14px 0 8px;
  letter-spacing: 0;
}

.markdown h2:first-child,
.markdown h3:first-child {
  margin-top: 0;
}

.markdown p {
  margin: 8px 0;
}

.markdown ul {
  margin: 8px 0;
  padding-left: 20px;
}

.markdown li {
  margin: 5px 0;
}

.markdown blockquote {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--brand);
  background: var(--panel-soft);
  color: var(--muted);
}

.markdown code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(0, 194, 255, 0.10);
}

.report-box:empty {
  display: none;
}

.error {
  color: var(--danger);
  min-height: 20px;
}

@media (max-width: 1180px) {
  .strategy-workbench {
    grid-template-columns: 1fr;
  }

  .strategy-aside {
    position: static;
  }
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  body {
    font-size: 14px;
    background:
      radial-gradient(circle at 50% 0%, rgba(77, 163, 255, 0.16), transparent 34%),
      linear-gradient(180deg, #101418 0%, #070a0e 100%);
  }

  button {
    padding: 8px 11px;
    border-radius: 6px;
    font-size: 13px;
  }

  button.compact {
    padding: 6px 9px;
    font-size: 12px;
  }

  input,
  select {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .mode-template-panel {
    grid-template-columns: 1fr;
  }

  label {
    gap: 5px;
    font-size: 12px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-bottom: 78px;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 2;
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
    height: auto;
  }

  .sidebar-toggle {
    display: none;
  }

  .brand-lockup {
    display: none;
  }

  .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .nav button {
    min-height: 39px;
    padding: 7px 4px;
    justify-content: center;
    text-align: center;
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .sidebar-collapsed .nav {
    gap: 4px;
  }

  .sidebar-collapsed .nav button {
    padding: 7px 4px;
  }

  .sidebar-collapsed .nav-label {
    width: auto;
    opacity: 1;
    transform: none;
    overflow: visible;
  }

  .nav .nav-secondary {
    display: none;
  }

  .nav button.nav-more {
    display: flex;
  }

  .nav button.active,
  .nav button:hover {
    box-shadow: inset 0 3px 0 rgba(77, 163, 255, 0.92);
  }

  .mobile-more-backdrop {
    display: block;
  }

  .mobile-more-sheet {
    display: grid;
  }

  .content {
    padding: 14px 10px 8px;
  }

  .topbar {
    display: grid;
    align-items: start;
    gap: 8px;
    margin-bottom: 14px;
    position: relative;
    padding-top: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .topbar h1 {
    font-size: 20px;
    line-height: 1.18;
  }

  .topbar .muted {
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .topbar-actions {
    justify-content: flex-start;
    gap: 6px;
  }

  .account-chip {
    display: none;
  }

  .ai-fab {
    right: 14px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    min-height: 42px;
  }

  .ai-assistant {
    left: 10px;
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(760px, calc(100dvh - 96px));
    grid-template-rows: auto auto minmax(220px, 1fr) auto;
    border-radius: 18px 18px 14px 14px;
  }

  .ai-head,
  .ai-input {
    padding: 11px 12px;
  }

  .ai-head strong {
    font-size: 15px;
  }

  .ai-head span {
    font-size: 11px;
  }

  .ai-quick {
    padding: 8px 12px;
    gap: 6px;
  }

  .ai-quick button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 11px;
  }

  .ai-messages {
    min-height: 240px;
    padding: 11px 12px;
    gap: 9px;
  }

  .ai-message > div {
    padding: 10px 11px;
    font-size: 13px;
    line-height: 1.52;
    border-radius: 13px;
  }

  .ai-input {
    gap: 8px;
  }

  .ai-input textarea {
    min-height: 68px;
    max-height: 120px;
    padding: 9px 10px;
    font-size: 13px;
  }

  .ai-input button[type="submit"] {
    min-height: 40px;
  }

  .hero-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 12px;
    padding: 14px;
  }

  .trade-cockpit {
    display: grid;
    gap: 14px;
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 10px;
  }

  .trade-cockpit h2 {
    font-size: 20px;
    line-height: 1.18;
  }

  .trade-cockpit p {
    font-size: 12px;
    line-height: 1.55;
  }

  .mode-strip,
  .mode-plan-strip {
    display: flex;
    border-radius: 10px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .cockpit-status {
    margin-top: 12px;
  }

  .mission-stack {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mission-stack div {
    min-height: 88px;
    padding: 11px;
  }

  .mission-stack strong {
    font-size: 22px;
  }

  .focus-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .focus-card {
    min-height: 0;
    padding: 12px;
    border-radius: 9px;
  }

  .focus-card h3 {
    font-size: 16px;
  }

  .focus-rank {
    font-size: 18px;
  }

  .loading-panel {
    grid-template-columns: 1fr;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    gap: 5px;
    margin: 12px 0;
    padding: 3px;
  }

  .segmented::-webkit-scrollbar {
    display: none;
  }

  .segmented button {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .stage-panel {
    display: grid;
    gap: 10px;
  }

  .stage-tabs {
    width: max-content;
    max-width: 100%;
    grid-template-columns: repeat(2, max-content);
  }

  .stage-tabs button {
    min-width: 122px;
  }

  .primary-stage-panel {
    top: 0;
    z-index: 5;
    padding: 8px;
    margin-inline: -2px;
  }

  .stage-note {
    justify-content: flex-start;
    text-align: left;
  }

  .toast {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: calc(76px + env(safe-area-inset-bottom));
    padding: 10px 12px;
    font-size: 13px;
  }

  .hero-panel h2 {
    margin: 6px 0;
    font-size: 21px;
    line-height: 1.18;
  }

  .hero-panel p {
    font-size: 13px;
    line-height: 1.55;
  }

  .hero-stats {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-stats div {
    padding: 10px;
  }

  .hero-stats strong {
    font-size: 21px;
  }

  .hero-stats span,
  .eyebrow {
    font-size: 10px;
  }

  .section-head {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
  }

  .section-head h2 {
    font-size: 18px;
  }

  .span-3,
  .span-4,
  .span-6,
  .span-8 {
    grid-column: span 12;
  }

  .grid {
    gap: 10px;
  }

  .strategy-workbench {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .strategy-main {
    gap: 10px;
  }

  .strategy-aside {
    position: static;
    gap: 10px;
  }

  .strategy-aside .side-panel:not(.assistant-panel) {
    display: none;
  }

  .panel,
  .pick-card,
  .user-row {
    padding: 10px;
    border-radius: 7px;
  }

  .strategy-aside .assistant-panel {
    display: none;
  }

  .pick-head,
  .user-head {
    display: grid;
    gap: 8px;
  }

  .pick-badges {
    justify-content: flex-start;
    gap: 5px;
  }

  .pick-head h3,
  .user-head h3 {
    font-size: 16px;
    line-height: 1.25;
  }

  .pick-list,
  .user-list,
  .signal-list {
    gap: 8px;
  }

  .tag {
    padding: 4px 8px;
    font-size: 11px;
  }

  .details,
  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .review-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .review-kpi {
    min-height: 90px;
    padding: 10px;
  }

  .review-kpi strong {
    font-size: 24px;
  }

  .review-decision-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .decision-facts {
    justify-content: flex-start;
    max-width: none;
  }

  .missed-category-grid,
  .learning-rule-grid {
    grid-template-columns: 1fr;
  }

  .pick-card > .details .detail:nth-child(n+5) {
    display: none;
  }

  .decision-strip {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 9px;
  }

  .pick-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pick-summary-strip strong {
    font-size: 15px;
  }

  .pick-one-line {
    gap: 5px;
    font-size: 12px;
  }

  .pick-one-line span {
    flex-basis: 100%;
  }

  .source-pill {
    min-height: 26px;
    padding: 4px 7px;
  }

  .pick-more,
  .score-more {
    padding-top: 6px;
  }

  .trust-strip {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .trust-strip strong {
    font-size: 12px;
  }

  .pick-analysis-grid {
    grid-template-columns: 1fr;
  }

  .trade-execution-panel {
    padding: 10px;
  }

  .execution-command,
  .execution-verdict,
  .execution-plan,
  .execution-brief,
  .execution-why,
  .visual-deck,
  .execution-visuals {
    grid-template-columns: 1fr;
  }

  .execution-command strong {
    font-size: 23px;
  }

  .execution-verdict {
    align-items: start;
    gap: 6px;
  }

  .execution-verdict strong {
    font-size: 22px;
  }

  .score-meter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-row {
    grid-template-columns: 32px minmax(78px, 1fr) 86px;
  }

  .forecast-row em {
    display: none;
  }

  .position-watch span {
    width: 100%;
    font-size: 11px;
  }

  .decision-strip strong {
    font-size: 17px;
  }

  .pick-card > p:not(.muted) {
    font-size: 13px;
    line-height: 1.55;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .detail {
    padding: 8px;
  }

  .detail span,
  .forecast-item span,
  .forecast-item em {
    font-size: 11px;
  }

  .forecast-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .forecast-item {
    padding: 8px;
  }

  .intel-group {
    padding: 10px;
    border-radius: 8px;
  }

  .intel-toolbar {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .date-filter {
    width: 100%;
    justify-content: space-between;
  }

  .date-filter select {
    flex: 1;
    min-width: 0;
  }

  .intel-searchbar {
    padding: 10px;
  }

  .intel-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .intel-group-head,
  .intel-title-row {
    display: grid;
    gap: 7px;
  }

  .intel-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .market-intel-card {
    padding: 0;
  }

  .market-intel-card summary,
  .intel-two-col,
  .intel-quick-meta {
    grid-template-columns: 1fr;
  }

  .market-intel-card summary {
    padding: 10px;
  }

  .intel-expanded {
    padding: 0 10px 10px;
  }

  .intel-card h4 {
    font-size: 14px;
  }

  .intel-card p,
  .intel-reason span,
  .intel-empty {
    font-size: 12px;
  }

  .intel-card-side {
    justify-items: start;
    text-align: left;
  }

  .tushare-module {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .tushare-module-list {
    grid-template-columns: 1fr;
  }

  .module-stats {
    justify-items: start;
    text-align: left;
  }

  .forecast-item strong {
    font-size: 13px;
  }

  .track-position-form {
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }

  .explain-box {
    margin-top: 10px;
    padding: 10px;
  }

  .mini-panel {
    padding: 12px;
  }

  .mini-row {
    padding: 7px 0;
    gap: 8px;
  }

  .report-card {
    margin: 10px 0;
  }

  .report-card-head {
    display: grid;
    gap: 8px;
    padding: 11px 12px;
  }

  .markdown {
    padding: 12px;
    font-size: 13px;
    line-height: 1.62;
  }

  .markdown.collapsed {
    max-height: 280px;
  }

  .empty-state {
    min-height: 170px;
    padding: 20px;
  }

  .signal-list {
    grid-template-columns: 1fr;
  }

  .data-radar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .radar-item {
    min-height: 118px;
    padding: 10px;
  }

  .radar-item strong {
    font-size: 18px;
  }
}

@media (max-width: 420px), (hover: none) and (pointer: coarse) and (max-device-width: 480px) {
  .content {
    padding-inline: 8px;
  }

  .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav button {
    font-size: 9.5px;
  }

  .details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-strip {
    grid-template-columns: 1fr;
  }

  .data-radar {
    grid-template-columns: 1fr;
  }

  .profile-field-grid {
    grid-template-columns: 1fr;
  }

  .mode-template-panel {
    grid-template-columns: 1fr;
  }

  .mode-template-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-field {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .profile-actions {
    flex-wrap: wrap;
    position: static;
  }
}

.is-touch-device .app-shell {
  grid-template-columns: 1fr;
  padding-bottom: 78px;
}

.is-touch-device .app-shell.sidebar-collapsed {
  grid-template-columns: 1fr;
}

.is-touch-device .sidebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  z-index: 12;
  height: auto;
  padding: 7px 8px max(7px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  border-right: 0;
}

.is-touch-device .brand-lockup {
  display: none;
}

.is-touch-device .sidebar-toggle {
  display: none;
}

.is-touch-device .nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.is-touch-device .nav button {
  min-height: 39px;
  justify-content: center;
  padding: 7px 4px;
  text-align: center;
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
}

.is-touch-device .sidebar-collapsed .nav {
  gap: 4px;
}

.is-touch-device .sidebar-collapsed .nav button {
  padding: 7px 4px;
}

.is-touch-device .sidebar-collapsed .nav-label {
  width: auto;
  opacity: 1;
  transform: none;
  overflow: visible;
}

.is-touch-device .nav button.active,
.is-touch-device .nav button:hover {
  box-shadow: inset 0 3px 0 rgba(77, 163, 255, 0.92);
}

.is-touch-device .nav .nav-secondary {
  display: none;
}

.is-touch-device .nav button.nav-more {
  display: flex;
}

.is-touch-device .mobile-more-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(1, 6, 14, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.is-touch-device .mobile-more-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.is-touch-device .mobile-more-sheet {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(68px + env(safe-area-inset-bottom));
  z-index: 21;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(77, 163, 255, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(13, 23, 43, 0.98), rgba(4, 9, 19, 0.98));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(20px);
  transition: transform 180ms ease, opacity 180ms ease;
}

.is-touch-device .mobile-more-sheet.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-more-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-more-head strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.mobile-more-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mobile-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-more-grid button {
  justify-content: flex-start;
  min-height: 48px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.18);
}

.mobile-more-grid button.active {
  border-color: rgba(77, 163, 255, 0.52);
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.18), rgba(255, 255, 255, 0.035));
}

.is-touch-device .content {
  padding: 14px 10px 8px;
}

.is-touch-device .topbar {
  display: grid;
  gap: 8px;
  position: relative;
  margin-bottom: 14px;
  padding-top: 0;
  background: transparent;
  backdrop-filter: none;
}

.is-touch-device .topbar h1 {
  font-size: 20px;
  line-height: 1.18;
}

.is-touch-device .topbar .muted {
  font-size: 12px;
  line-height: 1.45;
}

.is-touch-device .topbar-actions {
  justify-content: flex-start;
}

.is-touch-device .account-chip {
  display: none;
}

.is-touch-device .ai-fab {
  right: 14px;
  bottom: calc(86px + env(safe-area-inset-bottom));
}

.is-touch-device .ai-assistant {
  left: 10px;
  right: 10px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  width: auto;
  max-height: min(760px, calc(100dvh - 96px));
  grid-template-rows: auto auto minmax(220px, 1fr) auto;
  border-radius: 18px 18px 14px 14px;
}

.is-touch-device .ai-head,
.is-touch-device .ai-input {
  padding: 11px 12px;
}

.is-touch-device .ai-head strong {
  font-size: 15px;
}

.is-touch-device .ai-head span {
  font-size: 11px;
}

.is-touch-device .ai-quick {
  padding: 8px 12px;
  gap: 6px;
}

.is-touch-device .ai-quick button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.is-touch-device .ai-messages {
  min-height: 240px;
  padding: 11px 12px;
  gap: 9px;
}

.is-touch-device .ai-message > div {
  padding: 10px 11px;
  font-size: 13px;
  line-height: 1.52;
  border-radius: 13px;
}

.is-touch-device .ai-input {
  gap: 8px;
}

.is-touch-device .ai-input textarea {
  min-height: 68px;
  max-height: 120px;
  padding: 9px 10px;
  font-size: 13px;
}

.is-touch-device .ai-input button[type="submit"] {
  min-height: 40px;
}

.is-touch-device .profile-field-grid {
  grid-template-columns: 1fr;
}

.is-touch-device .mode-template-panel {
  grid-template-columns: 1fr;
}

.is-touch-device .mode-template-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.is-touch-device .profile-field {
  grid-template-columns: 1fr;
  min-height: auto;
  padding: 12px;
}

.is-touch-device .profile-actions {
  position: static;
  flex-direction: column;
  align-items: stretch;
}

.is-touch-device .chip-checks {
  justify-content: flex-start;
}

/* Compact product layout pass */
.content {
  padding: 22px 24px;
}

.topbar {
  margin-bottom: 14px;
  padding: 6px 0 10px;
}

.topbar h1 {
  font-size: 24px;
}

.topbar .muted {
  font-size: 13px;
}

.grid,
.strategy-workbench,
.strategy-main,
.strategy-aside {
  gap: 12px;
}

.panel {
  border-radius: 10px;
  padding: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.hero-panel {
  gap: 16px;
  margin-bottom: 4px;
  padding: 14px 16px;
  min-height: 0;
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
}

.hero-panel h2 {
  margin: 2px 0 6px;
  font-size: 22px;
  line-height: 1.18;
}

.hero-panel p {
  max-width: 760px;
  font-size: 13px;
  line-height: 1.55;
}

.hero-stats {
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  min-width: min(520px, 42vw);
  gap: 8px;
}

.hero-stats div {
  min-height: 72px;
  padding: 10px 11px;
  border-radius: 8px;
}

.hero-stats strong {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1;
}

.trade-cockpit {
  gap: 16px;
  margin-bottom: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
}

.trade-cockpit h2 {
  margin: 4px 0;
  max-width: 860px;
  font-size: 22px;
  line-height: 1.15;
}

.trade-cockpit p {
  max-width: 820px;
  font-size: 13px;
  line-height: 1.55;
}

.mode-strip,
.mode-plan-strip {
  padding: 5px 9px;
  gap: 6px;
}

.cockpit-status {
  margin-top: 8px;
  gap: 6px;
}

.mission-stack {
  min-width: 220px;
  gap: 8px;
}

.mission-stack div {
  min-height: 68px;
  padding: 9px;
}

.mission-stack .icon {
  margin-bottom: 6px;
}

.mission-stack strong {
  margin: 4px 0 1px;
  font-size: 20px;
}

.primary-stage-panel {
  top: 74px;
}

.stage-panel {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
}

.stage-tabs {
  display: flex;
  grid-template-columns: none;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  flex: 1 0 340px;
}

.stage-tabs button {
  min-width: 112px;
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.stage-note {
  min-width: 0;
  gap: 6px;
  flex: 1 1 320px;
}

.stage-note .tag {
  display: none;
}

.stage-note .muted {
  font-size: 12px;
}

.focus-panel,
.picks-panel,
.side-panel {
  padding: 13px;
}

.focus-list {
  gap: 8px;
}

.focus-card {
  min-height: 128px;
  padding: 12px;
}

.focus-card h3 {
  font-size: 16px;
}

.focus-price span {
  font-size: 17px;
}

.section-head {
  gap: 12px;
  margin-bottom: 9px;
}

.section-head h2,
.panel > h2,
.review-subpanel h2 {
  font-size: 18px;
  line-height: 1.25;
}

.section-head p,
.panel > p,
.review-subpanel p {
  font-size: 13px;
}

.metric {
  gap: 6px;
  min-height: 88px;
}

.metric strong {
  font-size: 24px;
}

.metric::after {
  width: 34px;
  height: 34px;
}

.pick-list,
.user-list,
.signal-list,
.intelligence-list {
  gap: 8px;
}

.pick-card,
.user-row {
  gap: 8px;
  padding: 10px 11px;
  border-radius: 10px;
}

.pick-head,
.user-head,
.intel-group-head,
.intel-title-row {
  gap: 8px;
}

.pick-head h3,
.user-head h3,
.intel-group-head h3 {
  font-size: 16px;
  line-height: 1.25;
}

.pick-head .muted,
.user-head .muted {
  font-size: 11px;
}

.details {
  gap: 8px;
}

.detail {
  padding: 8px;
}

.detail span,
.decision-strip span,
.decision-strip em,
.trust-strip span,
.trust-strip em {
  font-size: 10px;
}

.detail strong {
  font-size: 13px;
}

.decision-strip,
.trust-strip {
  padding: 9px;
  gap: 8px;
}

.pick-analysis-grid {
  gap: 7px;
}

.pick-analysis-grid div {
  padding: 8px;
}

.trade-execution-panel,
.forecast-chart,
.score-meter {
  border-radius: 8px;
}

.execution-verdict strong {
  font-size: 22px;
}

.execution-plan strong {
  font-size: 16px;
}

.decision-strip strong {
  font-size: 16px;
}

.pick-summary-strip strong {
  font-size: 14px;
}

.pick-one-line {
  font-size: 12px;
}

.review-kpis {
  gap: 8px;
  margin: 10px 0;
}

.review-kpi {
  min-height: 76px;
  padding: 10px;
  border-radius: 10px;
}

.review-kpi strong {
  font-size: 23px;
}

.review-section-stack,
.review-subpanel {
  gap: 10px;
}

.review-subpanel {
  padding: 11px;
}

.missed-grid {
  margin-top: 12px;
}

.missed-card {
  border-radius: 12px;
  padding: 12px;
}

.missed-return {
  margin: 8px 0 6px;
  font-size: 1.45rem;
}

.learning-strip {
  margin-top: 12px;
  gap: 8px;
}

.learning-strip div {
  border-radius: 10px;
  padding: 10px;
}

.intel-toolbar {
  min-width: 0;
  gap: 8px;
}

.intel-searchbar {
  gap: 8px;
  margin: 8px 0 10px;
  padding: 10px;
}

.intel-search-input {
  height: 38px;
  border-radius: 10px;
}

.intel-group {
  gap: 8px;
  padding: 11px;
  border-radius: 10px;
}

.intel-card,
.market-intel-card summary {
  gap: 10px;
  padding: 10px;
}

.intel-card h4 {
  margin: 6px 0 4px;
  font-size: 14px;
}

.intel-reason {
  margin: 7px 0;
  padding: 8px;
}

.sector-hot-row,
.intel-two-col > div {
  padding: 8px;
}

.tushare-module {
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 10px;
  padding: 10px;
}

.tushare-module-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-title h3 {
  font-size: 14px;
}

.tushare-module p {
  font-size: 12px;
}

.module-stats strong {
  font-size: 18px;
}

.data-radar {
  gap: 8px;
}

.data-radar.compact .radar-item,
.radar-item {
  min-height: 72px;
  padding: 10px;
  border-radius: 8px;
}

.radar-item strong,
.data-radar.compact .radar-item strong {
  margin-top: 5px;
  font-size: 17px;
}

.side-metrics {
  gap: 8px;
}

.side-metrics div {
  padding: 8px;
}

.side-metrics strong {
  font-size: 16px;
}

.admin-sync-panel .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-sync-panel .checkline,
.admin-sync-panel button[type="submit"],
.admin-sync-panel #syncSettingsStatus {
  grid-column: span 2;
}

.admin-create-panel .form-grid,
.admin-create-panel > .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-create-panel #createUserForm label:nth-child(3),
.admin-create-panel #createUserForm button,
.admin-create-panel #createUserForm .error,
.admin-create-panel #syncStatus {
  grid-column: span 2;
}

.admin-users-panel .user-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admin-users-panel .user-row .actions {
  justify-content: flex-end;
}

.admin-users-panel .user-head {
  align-items: center;
}

.admin-users-panel .user-row button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}

.admin-overrides-panel .user-row {
  padding: 9px 10px;
}

@media (max-width: 980px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(92px, 1fr));
    min-width: 240px;
  }
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .content,
  .is-touch-device .content {
    padding: 12px 9px 8px;
  }

  .topbar,
  .is-touch-device .topbar {
    margin-bottom: 10px;
  }

  .hero-panel,
  .trade-cockpit {
    gap: 10px;
    padding: 11px;
    margin-bottom: 2px;
  }

  .hero-panel h2,
  .trade-cockpit h2 {
    font-size: 18px;
    line-height: 1.18;
  }

  .hero-panel p,
  .trade-cockpit p {
    font-size: 12px;
    line-height: 1.45;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .hero-stats div {
    min-height: 58px;
    padding: 8px;
  }

  .hero-stats strong {
    font-size: 18px;
  }

  .mission-stack div {
    min-height: 66px;
    padding: 9px;
  }

  .mission-stack strong {
    font-size: 18px;
  }

  .stage-panel {
    gap: 8px;
    padding: 8px;
  }

  .stage-tabs {
    width: 100%;
    flex: 0 1 auto;
  }

  .stage-tabs button {
    min-width: 104px;
  }

  .stage-note {
    min-width: 0;
  }

  .focus-card {
    min-height: 0;
  }

  .admin-sync-panel .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-create-panel .form-grid,
  .admin-create-panel > .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-sync-panel .checkline,
  .admin-sync-panel button[type="submit"],
  .admin-sync-panel #syncSettingsStatus,
  .admin-create-panel #createUserForm label:nth-child(3),
  .admin-create-panel #createUserForm button,
  .admin-create-panel #createUserForm .error,
  .admin-create-panel #syncStatus {
    grid-column: span 1;
  }

  .admin-users-panel .user-row {
    grid-template-columns: 1fr;
  }
}

/* SignalX AI-native layout pass */
.topbar {
  justify-content: flex-end;
  min-height: 42px;
  margin-bottom: 8px;
  padding: 4px 0 8px;
  background: var(--topbar-bg);
}

.topbar-context {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.account-chip {
  border-color: rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.025);
}

.panel,
.user-row,
.detail,
.mini-panel,
.review-subpanel,
.tushare-module,
.radar-item,
.profile-field,
.focus-card {
  border-color: rgba(255, 255, 255, 0.045);
}

.panel {
  background:
    linear-gradient(180deg, rgba(21, 27, 34, 0.78), rgba(16, 20, 24, 0.72)),
    rgba(11, 15, 20, 0.74);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.ai-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 6px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 14%, rgba(77, 163, 255, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(21, 27, 34, 0.86), rgba(11, 15, 20, 0.92));
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  animation: cardRise 220ms var(--ease) both;
}

.ai-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 45%, rgba(77, 163, 255, 0.08), transparent 58% 100%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 100% 8px;
  opacity: 0.7;
}

.ai-hero.positive {
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32), 0 0 44px rgba(34, 197, 94, 0.08);
}

.ai-hero.warning,
.ai-hero.danger {
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32), 0 0 44px rgba(245, 158, 11, 0.08);
}

.ai-hero-core,
.ai-hero-metrics {
  position: relative;
  z-index: 1;
}

.ai-hero-core {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.ai-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  color: #91a8c4;
  letter-spacing: 0.14em;
}

.ai-hero h2 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.12;
  letter-spacing: 0;
}

.ai-hero p {
  max-width: 860px;
  margin: 0;
  color: #b8c6d8;
  font-size: 14px;
  line-height: 1.62;
}

.ai-hero-action {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(77, 163, 255, 0.18);
  border-radius: 999px;
  color: #dcecff;
  background: rgba(77, 163, 255, 0.08);
  font-size: 12px;
  font-weight: 750;
}

.ai-hero-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.ai-hero-status .tag {
  border-color: rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.035);
}

.ai-hero-status .tag strong {
  font-family: var(--mono);
  color: #f5f9ff;
}

.ai-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
  align-content: center;
}

.ai-hero-metric {
  min-height: 92px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 22px rgba(77, 163, 255, 0.045);
}

.ai-hero-metric.positive {
  border-color: rgba(34, 197, 94, 0.18);
}

.ai-hero-metric.warning {
  border-color: rgba(245, 158, 11, 0.18);
}

.ai-hero-metric span,
.ai-hero-metric em {
  display: block;
  color: #91a4bb;
  font-size: 12px;
  font-style: normal;
}

.ai-hero-metric strong {
  display: block;
  margin: 8px 0 4px;
  color: #f8fbff;
  font-family: var(--mono);
  font-size: 28px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.ai-lab-panel {
  padding: 16px;
}

.ai-lab-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ai-lab-grid div {
  min-height: 96px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.032);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.ai-lab-grid span,
.ai-lab-grid em {
  display: block;
  color: #91a4bb;
  font-size: 12px;
  font-style: normal;
}

.ai-lab-grid strong {
  display: block;
  margin: 8px 0 4px;
  color: #f4f8ff;
  font-size: 18px;
  line-height: 1.25;
}

.primary-stage-panel {
  z-index: 12;
  border-color: rgba(255, 255, 255, 0.045);
  background:
    linear-gradient(180deg, rgba(16, 20, 24, 0.94), rgba(11, 15, 20, 0.9)),
    rgba(11, 15, 20, 0.92);
}

@media (max-width: 1180px) {
  .ai-hero {
    grid-template-columns: 1fr;
  }

  .ai-hero-metrics,
  .ai-lab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .topbar,
  .is-touch-device .topbar {
    min-height: 0;
    margin-bottom: 6px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .topbar-actions,
  .is-touch-device .topbar-actions {
    justify-content: flex-start;
  }

  .mobile-more-backdrop,
  .is-touch-device .mobile-more-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(1, 6, 14, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .mobile-more-backdrop.show,
  .is-touch-device .mobile-more-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-more-sheet,
  .is-touch-device .mobile-more-sheet {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    z-index: 21;
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(77, 163, 255, 0.18);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(13, 23, 43, 0.98), rgba(4, 9, 19, 0.98));
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(20px);
    transition: transform 180ms var(--ease), opacity 180ms var(--ease);
  }

  .mobile-more-sheet.show,
  .is-touch-device .mobile-more-sheet.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .ai-hero {
    gap: 12px;
    padding: 14px;
    border-radius: 17px;
  }

  .ai-hero h2 {
    font-size: 21px;
  }

  .ai-hero p {
    font-size: 12px;
    line-height: 1.52;
  }

  .ai-hero-action {
    width: 100%;
    border-radius: 12px;
  }

  .ai-hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ai-hero-metric {
    min-height: 72px;
    padding: 10px;
    border-radius: 13px;
  }

  .ai-hero-metric strong {
    font-size: 20px;
  }

  .ai-hero-metric span,
  .ai-hero-metric em {
    font-size: 11px;
  }

  .primary-stage-panel {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 0 -9px 8px;
    padding: 7px 9px;
    border-radius: 0 0 15px 15px;
    border-left: 0;
    border-right: 0;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  }

  .primary-stage-panel .stage-note {
    font-size: 11px;
  }

  .primary-stage-panel .stage-note .tag {
    display: none;
  }

  .ai-lab-grid {
    grid-template-columns: 1fr;
  }
}

[data-theme="light"] .panel,
[data-theme="light"] .primary-stage-panel,
[data-theme="light"] .focus-card,
[data-theme="light"] .pick-card,
[data-theme="light"] .user-row,
[data-theme="light"] .detail,
[data-theme="light"] .mini-panel,
[data-theme="light"] .review-subpanel,
[data-theme="light"] .radar-item,
[data-theme="light"] .profile-field,
[data-theme="light"] .side-metrics div,
[data-theme="light"] .ai-hero,
[data-theme="light"] .mission-stack div,
[data-theme="light"] .hero-stats div,
[data-theme="light"] .flow-step,
[data-theme="light"] .agent-chip,
[data-theme="light"] .decision-strip,
[data-theme="light"] .trust-strip,
[data-theme="light"] .pick-analysis-grid div,
[data-theme="light"] .pick-analysis-copy,
[data-theme="light"] .trade-execution-panel,
[data-theme="light"] .execution-command > div,
[data-theme="light"] .execution-plan div,
[data-theme="light"] .execution-why div,
[data-theme="light"] .execution-brief section,
[data-theme="light"] .score-meter,
[data-theme="light"] .forecast-chart,
[data-theme="light"] .layer-row,
[data-theme="light"] .missed-category-card,
[data-theme="light"] .learning-rule-card,
[data-theme="light"] .report-card,
[data-theme="light"] .mobile-more-grid button {
  border-color: var(--line);
  background: var(--panel-soft);
}

[data-theme="light"] .panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 250, 253, 0.78)),
    var(--panel);
  box-shadow: var(--shadow);
}

[data-theme="light"] .panel::before,
[data-theme="light"] .focus-card::after,
[data-theme="light"] .ai-hero::before {
  opacity: 0.18;
}

[data-theme="light"] .pick-card.etf-card,
[data-theme="light"] .ai-hero {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(255, 255, 255, 0.72)),
    var(--panel);
}

[data-theme="light"] .account-chip {
  border-color: var(--line);
  background: var(--surface);
}

[data-theme="light"] .date-filter select,
[data-theme="light"] .intel-search-input {
  background: var(--field-bg);
}

[data-theme="light"] .mobile-more-sheet,
[data-theme="light"].is-touch-device .mobile-more-sheet {
  border-color: var(--line-strong);
  background: var(--panel);
  box-shadow: var(--shadow);
}

[data-theme="light"] .hero-stats span,
[data-theme="light"] .hero-stats strong,
[data-theme="light"] .mission-stack span,
[data-theme="light"] .mission-stack em,
[data-theme="light"] .execution-verdict p {
  color: var(--text);
}

[data-theme="light"] .eyebrow {
  color: var(--brand-strong);
}

/* Design system pass based on the supplied color and typography specs. */
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fa;
  --bg-secondary: #f2f3f5;
  --panel: #ffffff;
  --panel-soft: #f7f8fa;
  --field-bg: #ffffff;
  --surface: #f2f3f5;
  --surface-strong: #ffffff;
  --line: #e5e6eb;
  --line-strong: #c9cdd4;
  --text: #1d2129;
  --muted: #86909c;
  --text-secondary: #4e5969;
  --brand: #325eb1;
  --brand-strong: #264785;
  --accent: #325eb1;
  --accent-2: #00b42a;
  --positive: #00b42a;
  --positive-soft: #e8ffea;
  --warning: #ff7d00;
  --warning-soft: #fff7e8;
  --danger: #f53f3f;
  --danger-soft: #ffece8;
  --shadow: 0 4px 12px rgba(19, 70, 165, 0.06);
  --glass: #ffffff;
  --glow: none;
  --body-bg: #f7f8fa;
  --body-grid: none;
  --body-scanline: transparent;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --sidebar-bg: #ffffff;
  --login-bg: #f7f8fa;
  --login-panel-bg: #ffffff;
  --chip-active-text: #ffffff;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111827;
  --bg-secondary: #1d2129;
  --panel: #1d2129;
  --panel-soft: #252b36;
  --field-bg: #111827;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: #252b36;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --muted: #c9cdd4;
  --text-secondary: #e5e6eb;
  --brand: #325eb1;
  --brand-strong: #5b7fd6;
  --accent: #325eb1;
  --accent-2: #00b42a;
  --positive: #7be188;
  --positive-soft: rgba(0, 180, 42, 0.14);
  --warning: #ff7d00;
  --warning-soft: rgba(255, 125, 0, 0.14);
  --danger: #f53f3f;
  --danger-soft: rgba(245, 63, 63, 0.14);
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.20);
  --body-bg: #111827;
  --topbar-bg: rgba(17, 24, 39, 0.96);
  --sidebar-bg: #111827;
  --login-bg: #111827;
  --login-panel-bg: #1d2129;
}

body {
  background: var(--body-bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Roboto", Arial, sans-serif;
  font-size: 15px;
  text-rendering: optimizeLegibility;
}

body::before,
body::after,
.login-shell::before,
.login-shell::after,
.login-orbit,
.login-grid-beam,
.panel::before,
.hero-panel::after,
.trade-cockpit::after,
.signal-logo::before,
.signal-logo-pulse {
  display: none;
}

::selection {
  color: #ffffff;
  background: #325eb1;
}

button {
  min-height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #15284b, #325eb1);
  color: #ffffff;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 400;
  box-shadow: none;
}

button:hover {
  background: linear-gradient(135deg, #11203b, #264785);
  box-shadow: none;
  transform: none;
}

button.secondary,
.sidebar-toggle,
.theme-toggle,
.account-chip {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-secondary);
  box-shadow: none;
}

[data-theme="dark"] button.secondary,
[data-theme="dark"] .sidebar-toggle,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .account-chip {
  background: var(--surface-strong);
}

button.compact {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

input,
textarea,
select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--text);
  padding: 8px 12px;
  box-shadow: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #325eb1;
  box-shadow: 0 0 0 3px rgba(19, 70, 165, 0.08);
}

label {
  color: var(--text-secondary);
  font-size: 13px;
}

.login-shell {
  min-height: 100vh;
  background: var(--login-bg);
}

.login-panel {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--login-panel-bg);
  box-shadow: var(--shadow);
}

.login-panel::before {
  display: none;
}

.login-panel h1 {
  font-size: 32px;
  line-height: 1.12;
  font-weight: 600;
}

.login-panel p {
  color: var(--text-secondary);
  font-size: 15px;
}

.app-shell {
  background: var(--bg);
}

.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  color: var(--text);
  box-shadow: none;
}

.brand {
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
}

.brand-lockup p {
  color: var(--muted);
}

.signal-logo {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #15284b, #325eb1);
  box-shadow: none;
}

.signal-logo-scan {
  background-image: none;
  box-shadow: none;
}

.signal-logo-ring,
.signal-logo-ring.ring-b,
.signal-logo-orbit,
.signal-logo-ping {
  stroke: rgba(255, 255, 255, 0.52);
}

.signal-logo-wave {
  stroke: #ffffff;
}

.nav {
  gap: 4px;
}

.nav button {
  min-height: 40px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 400;
  padding: 0 12px;
}

.nav button.active,
.nav button:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #11203b, #264785);
  box-shadow: none;
}

.content {
  padding: 24px 32px 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  justify-content: space-between;
  min-height: 72px;
  margin: -24px -32px 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
}

.topbar-context {
  position: static;
  display: grid;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.topbar-context .context-dot {
  display: none;
}

.topbar-context span:not(.context-dot) {
  color: var(--text);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
}

.topbar-context em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.topbar-actions {
  gap: 8px;
}

.theme-toggle {
  min-height: 32px;
  border-radius: 8px;
  padding: 2px;
}

.theme-toggle button {
  min-height: 26px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
}

.theme-toggle button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #15284b, #325eb1);
}

.panel,
.primary-stage-panel,
.focus-card,
.pick-card,
.user-row,
.detail,
.mini-panel,
.review-subpanel,
.radar-item,
.profile-field,
.side-metrics div,
.mission-stack div,
.hero-stats div,
.flow-step,
.agent-chip,
.decision-strip,
.trust-strip,
.pick-analysis-grid div,
.pick-analysis-copy,
.trade-execution-panel,
.execution-command > div,
.execution-plan div,
.execution-why div,
.execution-brief section,
.score-meter,
.forecast-chart,
.layer-row,
.missed-category-card,
.learning-rule-card,
.report-card,
.intel-card,
.market-intel-card summary,
.tushare-module,
.mobile-more-grid button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel,
[data-theme="light"] .panel,
[data-theme="light"] .primary-stage-panel {
  background: var(--panel);
}

.section-head h2,
.panel > h2,
.review-subpanel h2 {
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 500;
}

.section-head p,
.panel > p,
.review-subpanel p,
.muted {
  color: var(--muted);
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.metric strong,
.hero-stats strong,
.mission-stack strong,
.side-metrics strong,
.module-stats strong,
.review-kpi strong,
.forecast-row strong,
.forecast-item strong,
.score-meter strong,
.agent-chip strong,
.detail strong,
.decision-strip strong,
.execution-plan strong,
.layer-row strong {
  font-family: Roboto, "PingFang SC", sans-serif;
  letter-spacing: 0;
}

.tag {
  min-height: 24px;
  border: 0;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-secondary);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 400;
  box-shadow: none;
}

.tag.positive,
.tag.attack {
  background: var(--positive-soft);
  color: var(--positive);
  box-shadow: none;
}

.tag.warning {
  background: var(--warning-soft);
  color: var(--warning);
  box-shadow: none;
}

.tag.danger {
  background: var(--danger-soft);
  color: var(--danger);
  box-shadow: none;
}

.segmented {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 3px;
}

.segmented button {
  min-height: 32px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
}

.segmented button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #15284b, #325eb1);
  box-shadow: none;
}

.primary-stage-panel {
  top: 72px;
}

.stage-note .tag {
  display: inline-flex;
}

.pick-card,
.focus-card,
.intel-card,
.tushare-module,
.user-row {
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.pick-card:hover,
.focus-card:hover,
.intel-card:hover,
.tushare-module:hover,
.user-row:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 18px rgba(19, 70, 165, 0.08);
  transform: none;
}

.detail,
.decision-strip,
.trust-strip,
.pick-analysis-grid div,
.pick-analysis-copy,
.trade-execution-panel,
.execution-command > div,
.execution-plan div,
.execution-why div,
.execution-brief section,
.score-meter,
.forecast-chart,
.layer-row {
  background: var(--panel-soft);
  box-shadow: none;
}

.load-progress-track,
.score-meter i,
.forecast-track {
  background: var(--line);
}

.load-progress-track i,
.score-meter i::before,
.forecast-track i {
  background: linear-gradient(90deg, #15284b, #325eb1);
  box-shadow: none;
}

.toast,
.ai-assistant {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(19, 70, 165, 0.12);
}

.ai-fab {
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #15284b, #325eb1);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(19, 70, 165, 0.18);
}

.ai-head,
.ai-quick,
.ai-input {
  border-color: var(--line);
}

.ai-message > span {
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

.ai-message > div {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--text);
}

.ai-message.user > div {
  color: #ffffff;
  background: linear-gradient(135deg, #15284b, #325eb1);
}

.ai-thinking {
  border-color: var(--line);
  background: var(--panel-soft);
}

.ai-thinking span {
  background: #325eb1;
}

.risk-disclaimer {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

/* Light theme contrast audit: neutralize dark-theme leftovers and keep icons inheriting readable text colors. */
[data-theme="light"] .hero-panel,
[data-theme="light"] .trade-cockpit,
[data-theme="light"] .ai-hero {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

[data-theme="light"] .trade-cockpit p,
[data-theme="light"] .ai-hero p,
[data-theme="light"] .ai-hero .eyebrow,
[data-theme="light"] .ai-hero-metric span,
[data-theme="light"] .ai-hero-metric em,
[data-theme="light"] .ai-lab-grid span,
[data-theme="light"] .ai-lab-grid em,
[data-theme="light"] .missed-category-card span,
[data-theme="light"] .missed-category-card em,
[data-theme="light"] .learning-rule-card p {
  color: var(--muted);
}

[data-theme="light"] .mode-strip,
[data-theme="light"] .mode-plan-strip,
[data-theme="light"] .ai-hero-action,
[data-theme="light"] .source-pill,
[data-theme="light"] .intel-tags span,
[data-theme="light"] .intel-tags.small span {
  border-color: rgba(19, 70, 165, 0.12);
  background: rgba(19, 70, 165, 0.08);
  color: var(--brand-strong);
}

[data-theme="light"] .mode-strip strong,
[data-theme="light"] .mode-plan-strip strong,
[data-theme="light"] .ai-hero-status .tag strong,
[data-theme="light"] .ai-hero-metric strong,
[data-theme="light"] .ai-lab-grid strong,
[data-theme="light"] .missed-category-card strong,
[data-theme="light"] .learning-strip strong,
[data-theme="light"] .rule-head strong,
[data-theme="light"] .missed-head strong,
[data-theme="light"] .intel-card h3,
[data-theme="light"] .market-intel-card h3,
[data-theme="light"] .mobile-more-grid button span,
[data-theme="light"] .profile-field strong,
[data-theme="light"] .user-row h3,
[data-theme="light"] .module-title strong,
[data-theme="light"] .radar-item strong,
[data-theme="light"] .mini-row strong {
  color: var(--text);
}

[data-theme="light"] .review-subpanel,
[data-theme="light"] .assistant-panel,
[data-theme="light"] .intel-searchbar,
[data-theme="light"] .intel-group,
[data-theme="light"] .intel-filter,
[data-theme="light"] .intel-search-input,
[data-theme="light"] .date-filter select,
[data-theme="light"] .missed-category-card,
[data-theme="light"] .learning-rule-card,
[data-theme="light"] .missed-card,
[data-theme="light"] .missed-card.covered,
[data-theme="light"] .learning-strip div,
[data-theme="light"] .ai-hero-metric,
[data-theme="light"] .ai-lab-grid div,
[data-theme="light"] .empty-state,
[data-theme="light"] .mobile-more-sheet,
[data-theme="light"] .mobile-more-grid button,
[data-theme="light"] .profile-group,
[data-theme="light"] .explain-box,
[data-theme="light"] .admin-create-panel .error,
[data-theme="light"] .toast {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

[data-theme="light"] .date-filter,
[data-theme="light"] .intel-filter,
[data-theme="light"] .intel-result-line,
[data-theme="light"] .intel-search-input input::placeholder,
[data-theme="light"] .learning-strip span,
[data-theme="light"] .learning-strip em,
[data-theme="light"] .missed-card p,
[data-theme="light"] .mobile-more-head p,
[data-theme="light"] .stage-note,
[data-theme="light"] .stage-note .muted,
[data-theme="light"] .module-title span,
[data-theme="light"] .user-head .muted {
  color: var(--muted);
}

[data-theme="light"] .date-filter select,
[data-theme="light"] .intel-filter select,
[data-theme="light"] .intel-search-input input,
[data-theme="light"] .mobile-more-sheet h3 {
  color: var(--text);
}

[data-theme="light"] .intel-search-input svg,
[data-theme="light"] .intel-quick-meta svg,
[data-theme="light"] .icon,
[data-theme="light"] button.secondary .icon,
[data-theme="light"] .account-chip .icon,
[data-theme="light"] .tag .icon {
  color: currentColor;
  stroke: currentColor;
}

[data-theme="light"] .ai-hero::before,
[data-theme="light"] .mobile-more-backdrop {
  display: none;
}

[data-theme="light"] .missed-return {
  color: var(--warning);
}

[data-theme="light"] .missed-card.covered .missed-return {
  color: var(--positive);
}

[data-theme="light"] .flow-step i,
[data-theme="light"] .source-pill.active,
[data-theme="light"] .mobile-more-grid button.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #15284b, #325eb1);
}

[data-theme="light"] .flow-step.done i,
[data-theme="light"] .flow-step.active i {
  color: #ffffff;
}

[data-theme="light"] button.secondary:hover,
[data-theme="light"] .theme-toggle button:hover,
[data-theme="light"] .account-chip:hover,
[data-theme="light"] .mobile-more-grid button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

[data-theme="light"] .nav button:hover,
[data-theme="light"] .nav button.active,
[data-theme="light"] .theme-toggle button.active,
[data-theme="light"] .segmented button.active,
[data-theme="light"] .ai-message.user > div {
  color: #ffffff;
}

/* Product polish pass: login split layout, stronger light contrast, mobile focus, and non-refreshing AI drawer. */
[data-theme="light"] {
  --muted: #4e5969;
  --text-secondary: #3f4a59;
  --text-tertiary: #86909c;
  --line: #dde3ea;
  --line-strong: #b8c2d0;
  --shadow: 0 6px 18px rgba(19, 70, 165, 0.07);
}

.login-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.72fr);
  align-items: stretch;
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(21, 40, 75, 0.06), transparent 34%),
    var(--login-bg);
}

.login-visual {
  position: relative;
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 100vh;
  padding: clamp(40px, 7vw, 88px);
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 24% 24%, rgba(55, 127, 255, 0.28), transparent 26%),
    linear-gradient(135deg, #15284b 0%, #203b72 48%, #325eb1 100%);
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent 92%);
}

.login-visual-copy,
.market-card,
.login-signal-grid {
  position: relative;
  z-index: 1;
}

.login-visual-copy {
  max-width: 620px;
}

.login-visual-copy span {
  display: inline-flex;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-visual-copy h2 {
  margin: 0;
  max-width: 560px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.03;
  font-weight: 600;
}

.login-visual-copy p {
  max-width: 520px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.7;
}

.market-card {
  width: min(620px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.market-card-head,
.login-signal-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.market-card-head span,
.login-signal-grid span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.market-card-head strong,
.login-signal-grid strong {
  color: #ffffff;
  font-family: Roboto, "PingFang SC", sans-serif;
  font-size: 22px;
}

.kline-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 12px;
  height: 180px;
  margin-top: 26px;
  padding: 0 6px;
}

.kline-stage i {
  position: relative;
  display: block;
  width: 100%;
  height: var(--h);
  border-radius: 7px;
  background: linear-gradient(180deg, #37fffb, #16fff3);
  box-shadow: 0 0 22px rgba(22, 255, 243, 0.22);
  animation: candleRise 2.8s ease-in-out infinite;
  animation-delay: var(--d);
}

.kline-stage i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -26px;
  bottom: -22px;
  width: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.45;
  transform: translateX(-50%);
}

.kline-stage i.down {
  color: #ffb2b2;
  background: linear-gradient(180deg, #ff9f9f, #ff6f6f);
  box-shadow: 0 0 22px rgba(255, 111, 111, 0.20);
}

.market-line {
  width: 100%;
  height: 96px;
  margin-top: -46px;
  overflow: visible;
}

.market-line path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: lineDraw 3.4s ease-in-out infinite;
}

.login-signal-grid {
  width: min(620px, 100%);
}

.login-signal-grid div {
  flex: 1 1 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.login-signal-grid span,
.login-signal-grid strong {
  display: block;
}

.login-panel {
  align-self: center;
  justify-self: center;
  width: min(420px, calc(100% - 44px));
  border-radius: 18px;
}

.login-panel .form-grid {
  gap: 16px;
}

@keyframes candleRise {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.82;
  }
  50% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

@keyframes lineDraw {
  0% {
    stroke-dashoffset: 520;
    opacity: 0.4;
  }
  48%,
  72% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -520;
    opacity: 0.4;
  }
}

[data-theme="light"] body,
[data-theme="light"] .muted,
[data-theme="light"] .section-head p,
[data-theme="light"] .panel > p,
[data-theme="light"] .review-subpanel p,
[data-theme="light"] .topbar-context em,
[data-theme="light"] .ai-head span,
[data-theme="light"] .ai-message > span,
[data-theme="light"] .ai-search-toggle,
[data-theme="light"] .risk-disclaimer {
  color: var(--muted);
}

[data-theme="light"] .eyebrow,
[data-theme="light"] label,
[data-theme="light"] .tag,
[data-theme="light"] button.secondary,
[data-theme="light"] .theme-toggle button,
[data-theme="light"] .nav button,
[data-theme="light"] .account-chip {
  color: var(--text-secondary);
}

.icon,
button .icon,
.tag .icon,
summary .icon,
h2 .icon,
h3 .icon {
  color: currentColor;
  stroke: currentColor;
}

.ai-assistant {
  will-change: transform, opacity;
}

.ai-fab.active {
  color: #ffffff;
}

@media (max-width: 920px) {
  .login-split {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    padding: 18px;
    background: var(--login-bg);
  }

  .login-visual {
    min-height: auto;
    padding: 24px;
    border-radius: 22px;
  }

  .login-visual-copy h2 {
    font-size: 30px;
  }

  .login-visual-copy p {
    font-size: 14px;
  }

  .market-card {
    padding: 16px;
  }

  .kline-stage {
    height: 118px;
    gap: 8px;
  }

  .login-signal-grid {
    display: none;
  }

  .login-panel {
    width: 100%;
    margin-top: 12px;
  }
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  body {
    background: var(--body-bg);
  }

  .content,
  .is-touch-device .content {
    padding: 0 10px calc(86px + env(safe-area-inset-bottom));
  }

  .topbar,
  .is-touch-device .topbar {
    position: sticky;
    top: 0;
    z-index: 24;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 56px;
    margin: 0 -10px 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--topbar-bg);
    backdrop-filter: blur(14px);
  }

  .topbar-context {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar-context span:not(.context-dot) {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--text);
    font-size: 17px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-context em {
    display: none;
  }

  .topbar-actions,
  .is-touch-device .topbar-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 4px;
  }

  .topbar-actions .account-chip,
  .topbar-actions #refreshButton,
  .topbar-actions #logoutButton {
    display: none;
  }

  .theme-toggle {
    max-width: 152px;
    min-height: 30px;
    flex-shrink: 0;
  }

  .theme-toggle button {
    min-height: 24px;
    padding: 0 7px;
    font-size: 11px;
  }

  .ai-hero {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 12px;
  }

  .ai-hero .eyebrow,
  .ai-hero-action,
  .ai-hero-status,
  .ai-hero-metrics {
    display: none;
  }

  .ai-hero h2 {
    font-size: 18px;
    line-height: 1.22;
  }

  .ai-hero p {
    display: none;
  }

  .primary-stage-panel,
  .is-touch-device .primary-stage-panel {
    position: sticky !important;
    top: 56px !important;
    z-index: 23;
    display: block;
    margin: 0 -10px 10px;
    padding: 8px 10px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    background: var(--panel);
    box-shadow: 0 8px 18px rgba(19, 70, 165, 0.10);
    backdrop-filter: blur(14px);
  }

  .primary-stage-panel .stage-note {
    display: none;
  }

  .stage-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(86px, 1fr);
    grid-template-columns: none;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  .stage-tabs button {
    min-width: 0;
    width: 100%;
  }

  .focus-panel .section-head p,
  .picks-panel .section-head p,
  .mode-plan-strip {
    display: none;
  }

  .pick-one-line {
    gap: 6px;
  }

  .pick-one-line span {
    flex-basis: 100%;
  }

  .ai-fab,
  .is-touch-device .ai-fab {
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
  }

  .ai-assistant,
  .is-touch-device .ai-assistant {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: calc(100dvh - 56px);
    grid-template-rows: auto minmax(220px, 1fr) auto;
    border-radius: 18px 18px 0 0;
    transform: translateY(26px);
  }

  .ai-assistant.open,
  .is-touch-device .ai-assistant.open {
    transform: translateY(0);
  }

  .ai-quick,
  .is-touch-device .ai-quick {
    display: none;
  }

  .ai-messages,
  .is-touch-device .ai-messages {
    min-height: 220px;
    padding: 12px;
  }

  .ai-input,
  .is-touch-device .ai-input {
    padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  }
}

/* Recommendation card information architecture */
.pick-advisor {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(19, 70, 165, 0.045), rgba(255, 255, 255, 0.02)),
    var(--panel-soft);
}

.pick-advisor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.pick-advisor-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 600;
}

.pick-advisor-head strong {
  color: var(--text);
  font-size: 14px;
}

.pick-advisor p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.78;
}

.trade-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.trade-plan-grid div,
.invalidate-box,
.evidence-grid div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.trade-plan-grid span,
.trade-plan-grid em,
.invalidate-box span,
.evidence-grid span,
.evidence-grid em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.trade-plan-grid strong,
.evidence-grid strong {
  display: block;
  margin: 5px 0 2px;
  color: var(--text);
  font-family: Roboto, "PingFang SC", sans-serif;
  font-size: 19px;
  line-height: 1.15;
}

.invalidate-box {
  display: grid;
  gap: 5px;
  border-color: rgba(255, 125, 0, 0.24);
  background: var(--warning-soft);
}

.invalidate-box p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}

.pick-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.track-trigger {
  width: auto;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  border: 1px solid rgba(77, 163, 255, 0.55);
  background: linear-gradient(135deg, #15284b, #325eb1);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.12);
  font-size: 12px;
  white-space: nowrap;
}

.track-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 17, 31, 0.58);
  backdrop-filter: blur(10px);
  animation: overlayFade 140ms ease both;
}

.track-modal {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  animation: modalRise 180ms var(--ease) both;
}

.track-modal-head,
.track-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.track-modal-head span {
  color: var(--muted);
  font-size: 12px;
}

.track-modal-head h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

.track-modal-head em {
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
}

.track-modal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.track-modal-summary div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.track-modal-summary span,
.track-modal-form label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.track-modal-summary strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
}

.track-modal-form {
  display: grid;
  gap: 14px;
}

.track-modal-form input[name="amount"] {
  margin-top: 7px;
}

.track-modal-form label.checkline {
  position: relative;
  display: block;
  min-height: 20px;
  padding-left: 26px;
  color: var(--text-secondary, var(--muted));
  font-size: 12px;
  line-height: 1.45;
}

.track-modal-form label.checkline input[type="checkbox"] {
  position: absolute;
  left: 0;
  top: 1px;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--text-tertiary, var(--muted));
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.track-modal-form label.checkline input[type="checkbox"]:checked {
  border-color: var(--brand);
  background: var(--brand);
}

.track-modal-form label.checkline input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.track-modal-form label.checkline span {
  display: block;
  min-width: 0;
}

.track-modal-actions {
  justify-content: flex-end;
}

.copy-modal {
  width: min(560px, 100%);
}

.copy-modal textarea {
  width: 100%;
  min-height: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--field-bg);
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

body.modal-open {
  overflow: hidden;
}

@keyframes overlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalRise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.track-inline {
  position: relative;
  z-index: 2;
}

.track-inline summary,
.model-evidence summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.track-inline summary::-webkit-details-marker,
.model-evidence summary::-webkit-details-marker {
  display: none;
}

.track-inline summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-secondary);
  background: var(--panel);
  font-size: 12px;
}

.track-inline[open] summary {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #15284b, #325eb1);
}

.compact-track {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(19, 70, 165, 0.14);
}

.compact-track label {
  gap: 5px;
}

.compact-track input {
  min-height: 34px;
}

.compact-track button {
  align-self: end;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.model-evidence {
  display: grid;
  gap: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.model-evidence summary {
  width: fit-content;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
}

.model-evidence summary::after {
  content: " +";
}

.model-evidence[open] summary::after {
  content: " -";
}

.model-evidence[open] {
  animation: detailReveal 180ms var(--ease) both;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.compact-evidence {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.evidence-visual-grid,
.evidence-factor-strip {
  display: grid;
  gap: 6px;
}

.evidence-visual-grid.primary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.evidence-visual-grid.secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.evidence-factor-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.evidence-viz-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel-soft) 76%, transparent);
}

.evidence-viz-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.evidence-viz-card span,
.evidence-viz-card em {
  min-width: 0;
  color: var(--text-secondary, var(--muted));
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
}

.evidence-viz-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.12;
  text-align: right;
  white-space: nowrap;
}

.viz-meter,
.viz-flow,
.viz-split {
  position: relative;
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.viz-meter::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--meter);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}

.evidence-viz-card.warning .viz-meter::before,
.viz-meter.warning::before {
  background: linear-gradient(90deg, #f8bd55, #ffd66e);
}

.evidence-viz-card.danger .viz-meter::before {
  background: linear-gradient(90deg, #ff5f82, #ff9db4);
}

.viz-flow::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: color-mix(in srgb, var(--text) 24%, transparent);
}

.viz-flow b,
.viz-split b,
.viz-split em {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
}

.viz-flow b {
  background: linear-gradient(90deg, #37d6b6, var(--brand-strong));
}

.evidence-viz-card.flow.danger .viz-flow b {
  background: linear-gradient(90deg, #ff9b6a, #ff5f82);
}

.viz-split b {
  left: 0;
  background: linear-gradient(90deg, #37d6b6, #86e8dd);
}

.viz-split em {
  right: 0;
  background: linear-gradient(90deg, #ff9b6a, #ff5f82);
}

.evidence-viz-card.duo {
  gap: 4px;
}

.evidence-viz-card.duo p {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  margin: 0;
}

.evidence-viz-card.duo p span {
  font-size: 10px;
}

.evidence-factor-strip .evidence-viz-card {
  padding: 6px 8px;
  gap: 4px;
}

.evidence-factor-strip .evidence-viz-card em {
  display: none;
}

.evidence-mixed-grid {
  display: grid;
  gap: 6px;
}

.evidence-mixed-grid.top {
  grid-template-columns: 0.78fr 0.78fr 1.18fr 1fr;
}

.evidence-mixed-grid.bottom {
  grid-template-columns: 0.9fr 0.86fr 0.82fr 1fr;
}

.evidence-chart-card {
  --chart: var(--brand-strong);
  --chart-soft: color-mix(in srgb, var(--chart) 16%, transparent);
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel-soft) 76%, transparent);
}

.evidence-chart-card.positive {
  --chart: #37d6b6;
}

.evidence-chart-card.warning {
  --chart: #f8bd55;
}

.evidence-chart-card.danger {
  --chart: #ff6b86;
}

.chart-head,
.evidence-chart-card > div:first-child:not(.ring-chart):not(.bar-chart):not(.dot-matrix) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.evidence-chart-card span,
.evidence-chart-card em,
.evidence-chart-card small {
  min-width: 0;
  color: var(--text-secondary, var(--muted));
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
}

.evidence-chart-card strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.12;
  text-align: right;
  white-space: nowrap;
}

.evidence-chart-card.ring {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.ring-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background:
    conic-gradient(var(--chart) var(--angle), color-mix(in srgb, var(--text) 10%, transparent) 0);
}

.ring-chart::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: var(--panel-soft);
}

.ring-chart b {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 13px;
  line-height: 1;
}

.rr-axis,
.viz-flow,
.stack-chart {
  position: relative;
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.rr-axis::before,
.viz-flow::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 2;
  width: 1px;
  background: color-mix(in srgb, var(--text) 28%, transparent);
}

.rr-axis b,
.rr-axis em,
.viz-flow b {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
}

.rr-axis b {
  right: 50%;
  width: var(--loss);
  background: linear-gradient(90deg, #ff9b6a, #ff5f82);
}

.rr-axis em {
  left: 50%;
  width: var(--gain);
  background: linear-gradient(90deg, #37d6b6, var(--brand-strong));
}

.rr-labels {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.bar-chart {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 12px;
  height: 42px;
}

.bar-chart i {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: center;
  width: 28px;
  height: 100%;
  font-style: normal;
}

.bar-chart i b {
  position: absolute;
  bottom: 13px;
  width: 16px;
  height: var(--bar);
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--brand-strong), var(--brand));
}

.bar-chart i.warning b {
  background: linear-gradient(180deg, #ffd66e, #f8bd55);
}

.bar-chart i span {
  position: relative;
  z-index: 1;
  align-self: end;
}

.stack-chart {
  display: flex;
}

.stack-chart b,
.stack-chart em {
  position: static;
  display: block;
  height: 100%;
}

.stack-chart b {
  background: linear-gradient(90deg, #37d6b6, #86e8dd);
}

.stack-chart em {
  background: linear-gradient(90deg, #ff9b6a, #ff5f82);
}

.dot-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  align-items: center;
}

.dot-matrix i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.dot-matrix i.active {
  background: #37d6b6;
}

.dot-matrix i.danger {
  background: #ff6b86;
}

.radar {
  gap: 3px;
}

.radar-chart {
  width: 100%;
  height: 54px;
}

.radar-grid {
  fill: color-mix(in srgb, var(--brand) 6%, transparent);
  stroke: color-mix(in srgb, var(--text) 18%, transparent);
  stroke-width: 1;
}

.radar-grid.inner {
  fill: none;
  opacity: 0.7;
}

.radar-axis {
  stroke: color-mix(in srgb, var(--text) 14%, transparent);
  stroke-width: 1;
}

.radar-data {
  fill: color-mix(in srgb, var(--brand-strong) 30%, transparent);
  stroke: var(--brand-strong);
  stroke-width: 2;
}

[data-theme="light"] .pick-advisor,
[data-theme="light"] .trade-plan-grid div,
[data-theme="light"] .evidence-grid div,
[data-theme="light"] .evidence-viz-card,
[data-theme="light"] .evidence-chart-card,
[data-theme="light"] .track-modal,
[data-theme="light"] .track-modal-summary div {
  background: #ffffff;
}

[data-theme="light"] .pick-advisor p,
[data-theme="light"] .invalidate-box p {
  color: #1d2129;
}

[data-theme="light"] .track-trigger {
  color: #ffffff;
  border-color: rgba(50, 94, 177, 0.45);
  background: linear-gradient(135deg, #15284b, #325eb1);
}

[data-theme="light"] .track-modal-backdrop {
  background: rgba(21, 40, 75, 0.28);
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .pick-advisor {
    padding: 11px;
    gap: 8px;
  }

  .pick-advisor p {
    font-size: 13px;
    line-height: 1.68;
  }

  .trade-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .trade-plan-grid div,
  .invalidate-box,
  .evidence-grid div {
    padding: 9px;
  }

  .trade-plan-grid strong,
  .evidence-grid strong {
    font-size: 16px;
  }

  .compact-track {
    left: 0;
    right: auto;
    grid-template-columns: 1fr;
  }

  .track-modal-backdrop {
    align-items: end;
    place-items: end center;
    padding: 12px;
  }

  .track-modal {
    width: 100%;
    max-height: min(86vh, 680px);
    overflow: auto;
    border-radius: 18px 18px 12px 12px;
  }

  .track-modal-summary {
    grid-template-columns: 1fr;
  }

  .track-modal-head h3 {
    font-size: 20px;
  }

  .evidence-grid,
  .compact-evidence {
    grid-template-columns: 1fr;
  }
}

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

/* Command center redesign for 今日研究台. */
.command-center-shell {
  display: grid;
  gap: 14px;
}

.command-statusbar,
.command-stage-panel,
.command-filter-panel,
.command-target-panel,
.command-control-section,
.command-alternatives {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--panel);
  box-shadow: var(--shadow);
}

.command-statusbar::before,
.command-target-panel::before,
.command-control-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(77, 163, 255, 0.11), transparent 42%),
    linear-gradient(180deg, rgba(34, 197, 94, 0.035), transparent 56%);
  opacity: 0.75;
}

.command-statusbar > *,
.command-stage-panel > *,
.command-filter-panel > *,
.command-target-panel > *,
.command-control-section > *,
.command-alternatives > * {
  position: relative;
  z-index: 1;
}

.command-statusbar {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.8fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
}

.command-title h2,
.command-target-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.command-title p,
.command-target-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.command-status-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.command-status-cell {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
}

.command-status-cell span,
.command-status-cell em,
.command-chart-footer span,
.command-chart-footer em,
.command-execution-strip span,
.command-execution-strip em,
.command-control-metrics span,
.command-control-metrics em,
.command-data-stack span,
.command-data-stack em,
.command-research-block span,
.command-condition-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.command-status-cell strong {
  display: block;
  margin: 4px 0 3px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.05;
}

.command-status-cell.positive strong,
.command-control-metrics strong.positive {
  color: var(--positive);
}

.command-status-cell.warning strong,
.command-control-metrics strong.warning {
  color: var(--warning);
}

.command-status-cell.danger strong,
.command-control-metrics strong.danger {
  color: var(--danger);
}

.command-stage-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.55fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}

.command-stage-panel .stage-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  flex: none;
}

.command-stage-panel .stage-tabs button {
  min-width: 0;
}

.command-stage-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.market-command-center {
  display: grid;
  grid-template-columns: minmax(270px, 0.7fr) minmax(0, 1.65fr) minmax(280px, 0.82fr);
  gap: 14px;
  align-items: start;
}

.command-roster,
.command-control {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.command-theater {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.command-filter-panel,
.command-target-panel,
.command-control-section,
.command-alternatives {
  padding: 14px;
}

.command-filter-group {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.command-filter-group > span {
  color: var(--muted);
  font-size: 12px;
}

.command-filter-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.command-filter-buttons button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
  font-size: 12px;
  font-weight: 500;
  transform: none;
}

.command-filter-buttons button em {
  color: var(--muted);
  font-style: normal;
}

.command-filter-buttons button.active {
  border-color: rgba(77, 163, 255, 0.42);
  background: rgba(77, 163, 255, 0.14);
  color: var(--brand-strong);
}

.target-roster-list {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-height: calc(100vh - 365px);
  overflow: auto;
  padding-right: 2px;
}

.target-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(72px, 0.42fr) 46px;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.024);
  color: var(--text);
  box-shadow: none;
  text-align: left;
  transform: none;
}

.target-row:hover,
.target-row.active {
  border-color: rgba(77, 163, 255, 0.42);
  background: rgba(77, 163, 255, 0.10);
  box-shadow: 0 12px 32px rgba(77, 163, 255, 0.10);
}

.target-row-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.target-row-main,
.target-row-signal,
.target-row-score {
  min-width: 0;
}

.target-row-main strong,
.target-row-main small,
.target-row-signal em,
.target-row-signal b,
.target-row-score strong,
.target-row-score small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-row-main strong {
  color: var(--text);
  font-size: 14px;
}

.target-row-main strong em {
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
}

.target-row-main small,
.target-row-score small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.target-row-signal {
  text-align: right;
}

.target-row-signal em {
  color: var(--brand-strong);
  font-size: 12px;
  font-style: normal;
}

.target-row-signal b {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.target-row-signal b.positive {
  color: var(--positive);
}

.target-row-signal b.warning {
  color: var(--warning);
}

.target-row-signal b.danger {
  color: var(--danger);
}

.target-row-score {
  text-align: right;
}

.target-row-score strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 18px;
}

.command-target-panel {
  display: grid;
  gap: 13px;
}

.command-target-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.command-target-head h2 em {
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
}

.command-target-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 320px;
}

.command-chart-stage {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(4, 9, 18, 0.60);
}

.command-chart-wrap {
  color: var(--brand);
}

.command-chart-wrap.positive {
  color: var(--positive);
}

.command-chart-wrap.warning {
  color: var(--warning);
}

.command-chart-wrap.danger {
  color: var(--danger);
}

.command-kline-chart {
  display: block;
  width: 100%;
  height: 330px;
}

.command-chart-bg {
  fill: rgba(255, 255, 255, 0.01);
}

.command-chart-grid line {
  stroke: rgba(255, 255, 255, 0.075);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.command-candles line {
  stroke: currentColor;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.command-candles rect {
  fill: currentColor;
  opacity: 0.88;
}

.command-candles .down {
  color: var(--danger);
}

.command-candles .up {
  color: var(--positive);
}

.command-candles .volume {
  opacity: 0.26;
}

.command-vwap-line {
  fill: none;
  stroke: var(--brand-strong);
  stroke-width: 1.8;
  stroke-dasharray: 5 4;
  opacity: 0.82;
  vector-effect: non-scaling-stroke;
}

.command-plan-line line {
  stroke-width: 1.2;
  stroke-dasharray: 7 5;
  opacity: 0.82;
  vector-effect: non-scaling-stroke;
}

.command-plan-line text {
  fill: var(--muted);
  font-size: 12px;
}

.command-plan-line.entry line {
  stroke: var(--brand-strong);
}

.command-plan-line.take line {
  stroke: var(--positive);
}

.command-plan-line.stop line {
  stroke: var(--danger);
}

.command-chart-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.026);
}

.command-chart-footer strong {
  color: var(--text);
  font-family: var(--mono);
}

.command-chart-footer strong.positive {
  color: var(--positive);
}

.command-chart-footer strong.danger {
  color: var(--danger);
}

.command-chart-empty,
.command-main-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  color: var(--muted);
}

.command-chart-empty {
  min-height: 330px;
  gap: 8px;
  border: 1px dashed var(--line);
  background: var(--surface);
}

.command-execution-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.command-execution-strip div,
.command-control-metrics div,
.command-data-stack article,
.command-research-block,
.command-condition-grid div,
.command-alt-list article {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
}

.command-execution-strip strong,
.command-control-metrics strong,
.command-data-stack strong {
  display: block;
  margin: 4px 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
}

.command-research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.command-research-block p,
.command-condition-grid p,
.command-alt-list p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.58;
}

.command-detail-drawer,
.command-alternatives {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.022);
}

.command-detail-drawer summary,
.command-alternatives summary {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  padding: 12px;
  color: var(--text);
  font-weight: 650;
}

.command-detail-drawer > :not(summary) {
  margin: 0 12px 12px;
}

.command-condition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.command-control-section {
  display: grid;
  gap: 12px;
}

.command-control-section h3 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

.command-control-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.command-control-actions button {
  justify-content: center;
}

.command-control-metrics,
.command-data-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.command-data-stack article.positive strong {
  color: var(--positive);
}

.command-data-stack article.warning strong {
  color: var(--warning);
}

.command-data-stack article.danger strong {
  color: var(--danger);
}

.layer-stack.compact {
  gap: 7px;
}

.command-event-stream {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.command-alt-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

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

.command-alt-list strong em,
.command-alt-list span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

[data-theme="light"] .command-statusbar,
[data-theme="light"] .command-stage-panel,
[data-theme="light"] .command-filter-panel,
[data-theme="light"] .command-target-panel,
[data-theme="light"] .command-control-section,
[data-theme="light"] .command-alternatives {
  background: rgba(255, 255, 255, 0.94);
}

[data-theme="light"] .command-chart-stage {
  background: rgba(247, 250, 253, 0.92);
}

[data-theme="light"] .command-chart-grid line {
  stroke: rgba(15, 23, 42, 0.09);
}

@media (max-width: 1240px) {
  .command-statusbar,
  .command-stage-panel,
  .market-command-center {
    grid-template-columns: 1fr;
  }

  .command-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .command-roster,
  .command-control {
    position: static;
  }

  .target-roster-list {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .command-status-grid,
  .command-execution-strip,
  .command-research-grid,
  .command-condition-grid,
  .command-control-metrics,
  .command-data-stack {
    grid-template-columns: 1fr;
  }

  .command-target-head {
    display: grid;
  }

  .command-target-badges,
  .command-stage-meta {
    justify-content: flex-start;
  }

  .target-row {
    grid-template-columns: 28px minmax(0, 1fr) 50px;
  }

  .target-row-signal {
    display: none;
  }

  .command-kline-chart,
  .command-chart-empty {
    height: 260px;
    min-height: 260px;
  }
}

/* Commercial QA pass: remove leftover density, improve H5 scanability, and harden light-theme contrast. */
.primary-stage-panel {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.primary-stage-panel .stage-tabs {
  flex: 0 0 auto;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  padding: 3px;
}

.primary-stage-panel .stage-tabs button {
  min-width: 96px;
  min-height: 30px;
  padding: 0 12px;
}

.primary-stage-panel .stage-note {
  min-width: 0;
  justify-content: flex-end;
  flex: 1 1 auto;
}

.focus-card {
  min-height: 116px;
}

.focus-rank {
  color: color-mix(in srgb, var(--text) 26%, transparent);
}

.focus-card p,
.focus-price em,
.pick-head .muted,
.pick-advisor p,
.trade-plan-grid em,
.invalidate-box p,
.model-evidence summary,
.evidence-grid em {
  color: var(--text-secondary, var(--muted));
}

[data-theme="light"] .focus-rank {
  color: #c9cdd4;
}

[data-theme="light"] .focus-card p,
[data-theme="light"] .focus-price em,
[data-theme="light"] .pick-head .muted,
[data-theme="light"] .pick-advisor p,
[data-theme="light"] .trade-plan-grid em,
[data-theme="light"] .invalidate-box p,
[data-theme="light"] .model-evidence summary,
[data-theme="light"] .evidence-grid em,
[data-theme="light"] .forecast-row span,
[data-theme="light"] .forecast-row em,
[data-theme="light"] .detail span,
[data-theme="light"] .decision-strip span,
[data-theme="light"] .decision-strip em,
[data-theme="light"] .score-meter span {
  color: #3f4a59;
}

[data-theme="light"] .focus-card strong,
[data-theme="light"] .focus-card h3,
[data-theme="light"] .focus-price span,
[data-theme="light"] .pick-head h3,
[data-theme="light"] .pick-advisor-head strong,
[data-theme="light"] .trade-plan-grid strong,
[data-theme="light"] .invalidate-box span,
[data-theme="light"] .evidence-grid strong,
[data-theme="light"] .forecast-row strong,
[data-theme="light"] .detail strong,
[data-theme="light"] .decision-strip strong,
[data-theme="light"] .score-meter strong {
  color: #1d2129;
}

[data-theme="light"] .stage-tabs button:not(.active) {
  color: #3f4a59;
}

[data-theme="light"] .primary-stage-panel,
[data-theme="light"] .stage-tabs,
[data-theme="light"] .focus-card,
[data-theme="light"] .pick-card,
[data-theme="light"] .pick-advisor,
[data-theme="light"] .trade-plan-grid div,
[data-theme="light"] .invalidate-box,
[data-theme="light"] .model-evidence,
[data-theme="light"] .evidence-grid div,
[data-theme="light"] .evidence-viz-card {
  border-color: #d9dce3;
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .primary-stage-panel,
  .is-touch-device .primary-stage-panel {
    top: 54px !important;
    display: grid;
    grid-template-columns: 1fr;
    margin: 0 -10px 8px;
    padding: 6px 10px;
  }

  .primary-stage-panel .stage-tabs,
  .is-touch-device .primary-stage-panel .stage-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    padding: 3px;
    overflow: visible;
  }

  .primary-stage-panel .stage-tabs button,
  .is-touch-device .primary-stage-panel .stage-tabs button {
    min-width: 0;
    min-height: 30px;
    padding: 0 6px;
    font-size: 12px;
  }

  .focus-panel,
  .picks-panel,
  .side-panel {
    padding: 10px;
  }

  .focus-list {
    gap: 7px;
  }

  .focus-card {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 0;
    padding: 10px;
  }

  .focus-rank {
    align-self: center;
    font-size: 17px;
  }

  .focus-card strong {
    font-size: 13px;
  }

  .focus-card h3 {
    margin: 1px 0 0;
    font-size: 15px;
  }

  .focus-card p {
    display: none;
  }

  .focus-price {
    grid-column: 3;
    align-self: center;
    padding-top: 0;
    border-top: 0;
    text-align: right;
  }

  .focus-price span {
    font-size: 14px;
    white-space: nowrap;
  }

  .focus-price em {
    display: none;
  }

  .pick-card,
  .user-row {
    padding: 9px;
    gap: 7px;
  }

  .pick-badges .tag:nth-child(2) {
    display: none;
  }

  .pick-advisor {
    padding: 9px;
    gap: 6px;
  }

  .pick-advisor-head {
    gap: 6px;
  }

  .pick-advisor-head span {
    font-size: 11px;
  }

  .pick-advisor-head strong {
    font-size: 15px;
  }

  .pick-advisor p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
  }

  .pick-advisor p:nth-of-type(n+2) {
    display: none;
  }

  .trade-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .trade-plan-grid div,
  .invalidate-box,
  .evidence-grid div {
    padding: 8px;
  }

  .trade-plan-grid span,
  .evidence-grid span {
    font-size: 10px;
  }

  .trade-plan-grid strong,
  .evidence-grid strong {
    font-size: 14px;
  }

  .trade-plan-grid em {
    display: none;
  }

  .invalidate-box {
    gap: 3px;
  }

  .invalidate-box p {
    font-size: 12px;
    line-height: 1.45;
  }

  .pick-action-row {
    gap: 6px;
  }

  .source-pill,
  .track-inline summary,
  .model-evidence summary {
    min-height: 26px;
    font-size: 11px;
  }

  .model-evidence {
    padding-top: 6px;
    gap: 7px;
  }
}

/* Commercial polish pass: tighter control bars, higher light-theme contrast, denser H5 cards. */
.primary-stage-panel {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  gap: 0;
  border-radius: 13px;
}

.primary-stage-panel .stage-note {
  display: none;
}

.primary-stage-panel .stage-tabs {
  width: auto;
  margin: 0;
  border-radius: 11px;
}

.primary-stage-panel .stage-tabs button {
  min-width: 108px;
  min-height: 34px;
  padding: 0 14px;
}

.focus-panel .section-head p,
.picks-panel .section-head p {
  display: none;
}

.focus-card {
  min-height: 124px;
  padding: 12px;
}

.focus-rank {
  color: color-mix(in srgb, var(--text) 38%, transparent);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.focus-card p {
  max-width: 32ch;
}

.pick-advisor {
  padding: 12px;
}

.pick-advisor p {
  line-height: 1.58;
}

.trade-plan-grid div,
.invalidate-box,
.evidence-grid div,
.score-meter {
  background: color-mix(in srgb, var(--panel-soft) 78%, transparent);
}

[data-theme="light"] {
  --text: #0b1220;
  --muted: #344054;
  --line: rgba(15, 23, 42, 0.14);
  --line-strong: rgba(37, 99, 235, 0.26);
}

[data-theme="light"] .muted,
[data-theme="light"] .section-head p,
[data-theme="light"] .panel > p,
[data-theme="light"] .pick-card > p,
[data-theme="light"] .pick-card > p:not(.muted),
[data-theme="light"] .pick-advisor p,
[data-theme="light"] .trade-plan-grid em,
[data-theme="light"] .invalidate-box p,
[data-theme="light"] .model-evidence summary,
[data-theme="light"] .score-meter span,
[data-theme="light"] .forecast-row span,
[data-theme="light"] .forecast-row em,
[data-theme="light"] .focus-card p,
[data-theme="light"] .focus-price em,
[data-theme="light"] .tag,
[data-theme="light"] .stage-tabs button:not(.active) {
  color: #263344;
}

[data-theme="light"] .focus-rank {
  color: #9aa4b2;
  opacity: 1;
}

[data-theme="light"] .focus-card,
[data-theme="light"] .pick-card,
[data-theme="light"] .pick-advisor,
[data-theme="light"] .trade-plan-grid div,
[data-theme="light"] .invalidate-box,
[data-theme="light"] .model-evidence,
[data-theme="light"] .score-meter,
[data-theme="light"] .evidence-viz-card,
[data-theme="light"] .evidence-chart-card,
[data-theme="light"] .forecast-chart {
  background: #ffffff;
  border-color: #cfd7e3;
}

[data-theme="light"] .pick-card.action-warning,
[data-theme="light"] .focus-card.warning {
  border-color: #d9b65f;
}

[data-theme="light"] .pick-card.action-positive,
[data-theme="light"] .focus-card.positive {
  border-color: #65b88b;
}

[data-theme="light"] .primary-stage-panel {
  background: rgba(255, 255, 255, 0.94);
  border-color: #d5dbe6;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .stage-tabs {
  background: #f2f5f9;
}

[data-theme="light"] .focus-card h3,
[data-theme="light"] .focus-card strong,
[data-theme="light"] .focus-price span,
[data-theme="light"] .pick-head h3,
[data-theme="light"] .pick-advisor-head strong,
[data-theme="light"] .trade-plan-grid strong,
[data-theme="light"] .invalidate-box span,
[data-theme="light"] .model-evidence strong,
[data-theme="light"] .score-meter strong {
  color: #0b1220;
}

@media (max-width: 1180px) {
  .primary-stage-panel {
    width: 100%;
  }

  .primary-stage-panel .stage-tabs {
    width: fit-content;
  }
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .content,
  .is-touch-device .content {
    padding-inline: 8px;
  }

  .ai-hero {
    margin-bottom: 7px;
    padding: 10px 11px;
  }

  .ai-hero h2 {
    font-size: 17px;
  }

  .strategy-main,
  .pick-list,
  .focus-list {
    gap: 8px;
  }

  .primary-stage-panel,
  .is-touch-device .primary-stage-panel {
    top: 0 !important;
    z-index: 32;
    width: auto;
    margin: 0 -8px 8px;
    padding: 6px 8px;
    border-radius: 0;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  }

  .primary-stage-panel .stage-tabs,
  .is-touch-device .primary-stage-panel .stage-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 3px;
    padding: 3px;
  }

  .primary-stage-panel .stage-tabs button,
  .is-touch-device .primary-stage-panel .stage-tabs button {
    min-height: 31px;
    min-width: 0;
    padding: 0 6px;
    border-radius: 8px;
    font-size: 12px;
  }

  .focus-panel,
  .picks-panel,
  .side-panel,
  .panel {
    padding: 9px;
  }

  .focus-card {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    min-height: 0;
    padding: 8px 9px;
    border-radius: 10px;
  }

  .focus-rank {
    font-size: 16px;
  }

  .focus-card strong {
    font-size: 12px;
  }

  .focus-card h3 {
    font-size: 14px;
  }

  .focus-price span {
    font-size: 13px;
  }

  .pick-card,
  .user-row {
    padding: 8px;
    gap: 6px;
    border-radius: 10px;
  }

  .pick-head h3,
  .user-head h3 {
    font-size: 15px;
  }

  .pick-head .muted {
    font-size: 11px;
  }

  .pick-badges {
    gap: 4px;
  }

  .pick-badges .tag {
    padding: 3px 7px;
    font-size: 10px;
  }

  .pick-advisor {
    padding: 8px;
    border-radius: 9px;
  }

  .pick-advisor-head {
    min-height: 0;
  }

  .pick-advisor p {
    display: -webkit-box;
    font-size: 12px;
    line-height: 1.45;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .trade-plan-grid {
    gap: 5px;
  }

  .trade-plan-grid div {
    padding: 7px;
    border-radius: 8px;
  }

  .trade-plan-grid strong {
    font-size: 13px;
  }

  .invalidate-box {
    padding: 7px;
  }

  .invalidate-box p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .pick-action-row {
    margin-top: -1px;
  }

  .model-evidence {
    padding-top: 4px;
  }

  .model-evidence[open] {
    gap: 6px;
  }

  .evidence-grid,
  .score-meter-grid,
  .evidence-visual-grid,
  .evidence-factor-strip,
  .evidence-mixed-grid {
    gap: 5px;
  }

  .evidence-visual-grid.primary,
  .evidence-factor-strip,
  .evidence-mixed-grid.top,
  .evidence-mixed-grid.bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evidence-visual-grid.secondary {
    grid-template-columns: 1fr;
  }

  .evidence-grid div,
  .score-meter,
  .evidence-viz-card,
  .evidence-chart-card {
    padding: 7px;
    border-radius: 8px;
  }

  .radar-chart {
    height: 50px;
  }

  .forecast-row {
    grid-template-columns: 28px minmax(64px, 1fr) 92px;
    gap: 6px;
  }

  .risk-disclaimer {
    margin: 8px 0 0;
    padding: 7px 9px;
    font-size: 10px;
    line-height: 1.45;
  }
}

/* Stripe-inspired full-screen login refresh. */
.login-stripe {
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(22px, 4vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 12%, rgba(77, 163, 255, 0.18), transparent 32%),
    radial-gradient(circle at 86% 14%, rgba(34, 197, 94, 0.10), transparent 30%),
    linear-gradient(90deg, rgba(77, 163, 255, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(77, 163, 255, 0.024) 1px, transparent 1px),
    linear-gradient(135deg, #080d15 0%, #101827 48%, #05080e 100%);
  background-size: auto, auto, 56px 56px, 56px 56px, auto;
  color: #f4f7fb;
}

.login-stripe::before,
.login-stripe::after {
  display: none;
}

.login-ribbon-field,
.login-particle-field,
.login-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-ribbon-field {
  z-index: -4;
  overflow: hidden;
  filter: saturate(1.18);
}

.login-ribbon {
  position: absolute;
  display: block;
  width: min(72vw, 980px);
  height: min(120vh, 1080px);
  border-radius: 48% 52% 45% 55% / 32% 44% 56% 68%;
  opacity: 0.86;
  transform-origin: 50% 50%;
  animation: ribbonFlow 18s var(--ease) infinite alternate;
  will-change: transform;
}

.ribbon-a {
  top: -36vh;
  right: -4vw;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0) 8%, rgba(118, 184, 255, 0.34) 20%, rgba(77, 163, 255, 0.66) 38%, rgba(20, 184, 166, 0.52) 58%, rgba(255, 255, 255, 0) 86%);
  opacity: 0.68;
  filter: blur(22px);
  transform: rotate(-35deg) translate3d(0, 0, 0) scale(1.04);
}

.ribbon-b {
  top: -18vh;
  right: -12vw;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0) 12%, rgba(34, 197, 94, 0.46) 28%, rgba(45, 212, 191, 0.58) 45%, rgba(77, 163, 255, 0.42) 66%, rgba(255, 255, 255, 0) 88%);
  opacity: 0.54;
  mix-blend-mode: screen;
  filter: blur(20px);
  transform: rotate(-23deg) translate3d(0, 0, 0);
  animation-duration: 21s;
}

.ribbon-c {
  right: -18vw;
  bottom: -40vh;
  background:
    linear-gradient(94deg, rgba(255, 255, 255, 0) 10%, rgba(14, 165, 233, 0.42) 30%, rgba(37, 99, 235, 0.54) 52%, rgba(34, 197, 94, 0.36) 72%, rgba(255, 255, 255, 0) 90%);
  opacity: 0.46;
  filter: blur(24px);
  transform: rotate(15deg) translate3d(0, 0, 0) scale(1.1);
  animation-duration: 24s;
}

.ribbon-d {
  top: 12vh;
  left: -36vw;
  width: min(62vw, 820px);
  height: min(94vh, 820px);
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0) 14%, rgba(118, 184, 255, 0.26) 34%, rgba(34, 197, 94, 0.16) 56%, rgba(255, 255, 255, 0) 78%);
  opacity: 0.34;
  filter: blur(18px);
  transform: rotate(-31deg);
  animation-duration: 26s;
}

.ribbon-e {
  right: 20vw;
  bottom: -54vh;
  width: min(38vw, 540px);
  background:
    linear-gradient(92deg, rgba(255, 255, 255, 0) 16%, rgba(0, 210, 255, 0.24) 38%, rgba(77, 163, 255, 0.36) 58%, rgba(255, 255, 255, 0) 82%);
  opacity: 0.42;
  filter: blur(18px);
  transform: rotate(8deg);
  animation-duration: 20s;
}

.ribbon-f {
  top: -62vh;
  left: 30vw;
  width: min(42vw, 580px);
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 15%, rgba(34, 197, 94, 0.18) 34%, rgba(118, 184, 255, 0.22) 56%, rgba(255, 255, 255, 0) 78%);
  opacity: 0.34;
  filter: blur(18px);
  transform: rotate(-19deg);
  animation-duration: 23s;
}

.login-noise {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 18%, rgba(77, 163, 255, 0.10), rgba(77, 163, 255, 0.02) 30%, transparent 58%),
    linear-gradient(90deg, rgba(5, 8, 18, 0.36), transparent 24%, transparent 76%, rgba(5, 8, 18, 0.28)),
    linear-gradient(180deg, rgba(5, 8, 18, 0.20), transparent 22%, transparent 78%, rgba(5, 8, 18, 0.54));
}

.login-particle-field {
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(77, 163, 255, 0.10), transparent 42%),
    radial-gradient(ellipse at 50% 88%, rgba(34, 197, 94, 0.06), transparent 36%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.login-particle-field i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 999px;
  opacity: var(--o);
  background: rgba(245, 250, 255, 0.98);
  box-shadow:
    0 0 calc(var(--s) * 2.6) rgba(255, 255, 255, 0.86),
    0 0 calc(var(--s) * 7) rgba(77, 163, 255, 0.42);
  animation: particleDrift var(--dur) ease-in-out infinite alternate;
  animation-delay: var(--delay);
  will-change: transform, opacity;
}

.login-particle-field i:nth-child(3n) {
  background: rgba(118, 184, 255, 0.95);
}

.login-particle-field i:nth-child(5n) {
  background: rgba(173, 255, 220, 0.92);
}

.login-particle-field i:nth-child(7n) {
  filter: blur(1px);
  transform: scale(1.7);
}

.login-particle-field i:nth-child(n + 36):nth-child(-n + 72) {
  top: calc(58% + (var(--s) * 3));
  opacity: calc(var(--o) * 0.72);
}

.login-horizon {
  position: absolute;
  left: -8%;
  right: -8%;
  top: 63%;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(118, 184, 255, 0.14), rgba(245, 250, 255, 0.42), rgba(34, 197, 94, 0.16), transparent);
  box-shadow:
    0 -18px 44px rgba(77, 163, 255, 0.08),
    0 0 38px rgba(118, 184, 255, 0.22),
    0 28px 70px rgba(34, 197, 94, 0.08);
  animation: horizonPulse 6.5s ease-in-out infinite;
}

.login-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 0 clamp(22px, 7vw, 96px);
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.login-topbar strong {
  color: #f8fbff;
  font-size: 20px;
  font-weight: 900;
}

.login-topbar span {
  color: rgba(211, 225, 245, 0.66);
  font-size: 12px;
}

.login-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 500px) minmax(360px, 440px);
  align-items: center;
  gap: clamp(34px, 8vw, 120px);
  width: min(1120px, 100%);
  margin-top: 42px;
}

.login-copy {
  max-width: 500px;
}

.login-copy span {
  display: block;
  margin-bottom: 12px;
  color: #76b8ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-copy h2 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.02;
  font-weight: 850;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 420px;
  margin: 22px 0 0;
  color: rgba(211, 225, 245, 0.72);
  font-size: 17px;
  line-height: 1.72;
}

.login-stripe .login-panel {
  align-self: center;
  justify-self: center;
  width: min(440px, 100%);
  padding: 36px 40px 40px;
  border: 1px solid rgba(77, 163, 255, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(21, 27, 34, 0.48), rgba(10, 14, 20, 0.58)),
    rgba(5, 10, 18, 0.48);
  color: #f4f7fb;
  box-shadow:
    0 28px 78px rgba(0, 0, 0, 0.38),
    0 0 72px rgba(77, 163, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(28px) saturate(1.28);
}

.login-stripe .login-panel::before {
  display: none;
}

.login-stripe .login-brand {
  gap: 14px;
  margin-bottom: 18px;
}

.login-stripe .login-logo {
  width: 52px;
  height: 52px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #4da3ff 58%, #22c55e);
  box-shadow: 0 14px 34px rgba(77, 163, 255, 0.22);
}

.login-stripe .eyebrow {
  color: rgba(211, 225, 245, 0.62);
  font-size: 12px;
  letter-spacing: 0;
}

.login-stripe .login-panel h1 {
  margin: 3px 0 0;
  color: #f8fbff;
  font-size: 28px;
  line-height: 1.14;
  font-weight: 850;
}

.login-stripe .login-panel p {
  margin: 0 0 24px;
  color: rgba(211, 225, 245, 0.68);
  font-size: 14px;
  line-height: 1.65;
}

.login-stripe .form-grid {
  gap: 16px;
}

.login-stripe label {
  color: rgba(211, 225, 245, 0.72);
  font-size: 13px;
  font-weight: 650;
}

.login-stripe input {
  height: 44px;
  border-color: rgba(77, 163, 255, 0.18);
  border-radius: 6px;
  background: rgba(4, 9, 18, 0.86);
  color: #f8fbff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.24);
}

.login-stripe input:focus {
  border-color: #76b8ff;
  box-shadow:
    0 0 0 3px rgba(77, 163, 255, 0.20),
    inset 0 1px 2px rgba(0, 0, 0, 0.24);
}

.login-stripe button[type="submit"] {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #4da3ff 62%, #22c55e);
  box-shadow: 0 12px 28px rgba(77, 163, 255, 0.24);
}

.login-footnote {
  position: absolute;
  left: clamp(22px, 7vw, 96px);
  right: clamp(22px, 7vw, 96px);
  bottom: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 620px;
  color: rgba(211, 225, 245, 0.58);
  font-size: 12px;
  line-height: 1.6;
}

.login-footnote span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@keyframes ribbonFlow {
  0% {
    transform: rotate(var(--r, -24deg)) translate3d(-2%, -1%, 0) scale(1);
  }
  100% {
    transform: rotate(calc(var(--r, -24deg) + 8deg)) translate3d(5%, 3%, 0) scale(1.06);
  }
}

@keyframes particleDrift {
  0% {
    opacity: calc(var(--o) * 0.42);
    transform: translate3d(0, 18px, 0) scale(0.72);
  }
  45% {
    opacity: var(--o);
  }
  100% {
    opacity: calc(var(--o) * 0.82);
    transform: translate3d(var(--dx), -34px, 0) scale(1.18);
  }
}

@keyframes horizonPulse {
  0%,
  100% {
    opacity: 0.36;
    transform: translateY(0) scaleX(0.92);
  }
  50% {
    opacity: 0.72;
    transform: translateY(-2px) scaleX(1);
  }
}

.ribbon-a { --r: -35deg; }
.ribbon-b { --r: -23deg; }
.ribbon-c { --r: 15deg; }
.ribbon-d { --r: -31deg; }
.ribbon-e { --r: 8deg; }
.ribbon-f { --r: -19deg; }

@media (prefers-reduced-motion: reduce) {
  .login-ribbon,
  .login-particle-field i,
  .login-horizon {
    animation: none;
  }
}

@media (max-width: 980px) {
  .login-stage {
    grid-template-columns: 1fr;
    gap: 26px;
    width: min(520px, 100%);
    margin-top: 70px;
    margin-bottom: 70px;
  }

  .login-copy {
    text-align: center;
  }

  .login-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .login-footnote {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .login-stripe {
    padding: 18px;
    background-size: 100% 100%, 100% 42px;
  }

  .login-topbar {
    min-height: 58px;
    padding: 0 18px;
  }

  .login-topbar span {
    display: none;
  }

  .login-stage {
    margin-top: 66px;
    margin-bottom: 78px;
  }

  .login-copy h2 {
    font-size: 34px;
  }

  .login-copy p {
    font-size: 14px;
    line-height: 1.6;
  }

  .login-stripe .login-panel {
    padding: 26px 22px;
    border-radius: 10px;
  }

  .login-footnote {
    left: 18px;
    right: 18px;
    bottom: 16px;
    flex-wrap: wrap;
  }
}

/* Header theme control: keep display mode as one compact icon action. */
.topbar-actions .theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-secondary);
  background: var(--panel);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.topbar-actions .theme-toggle .icon {
  width: 17px;
  height: 17px;
}

.topbar-actions .theme-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-strong);
  box-shadow: none;
  transform: none;
}

.topbar-actions .theme-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(50, 94, 177, 0.18);
}

[data-theme="dark"] .topbar-actions .theme-toggle {
  background: var(--surface-strong);
}

[data-theme="light"] .topbar-actions .theme-toggle {
  color: var(--brand-strong);
  background: #ffffff;
}

/* Product QA pass: icon alignment, date controls, mobile density and sheet behavior. */
.sidebar-toggle,
.topbar-actions .theme-toggle,
.icon-button {
  display: inline-grid;
  place-items: center;
  line-height: 0;
}

.sidebar-toggle .icon,
.topbar-actions .theme-toggle .icon,
.icon-button .icon {
  margin: 0;
}

.sidebar-collapsed .sidebar-toggle {
  left: 50%;
  transform: translate(-50%, -6px);
}

.sidebar-collapsed .sidebar:hover .sidebar-toggle,
.sidebar-collapsed .sidebar:focus-within .sidebar-toggle {
  transform: translate(-50%, 0);
}

.sidebar-collapsed .nav button {
  display: flex;
  place-items: center;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 0;
}

.sidebar-collapsed .nav button .icon {
  display: block;
  justify-self: center;
  align-self: center;
  margin: 0 !important;
  transform: none;
  vertical-align: middle;
}

.topbar-title-line {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

#refreshButton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#refreshButton .icon {
  margin: 0;
}

.data-refresh-chip {
  display: inline;
  min-height: 0;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text-secondary);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.date-filter input[type="date"] {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel);
  font: inherit;
  font-size: 13px;
}

[data-theme="light"] .date-filter input[type="date"] {
  color: #0b1220;
  border-color: #d9dce3;
  background: #ffffff;
}

.insight-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
  font-size: 12px;
  line-height: 1.65;
}

.insight-bar .icon {
  width: 14px;
  height: 14px;
  margin: 3px 0 0;
  color: var(--brand-strong);
}

[data-theme="light"] .insight-bar {
  color: #344054;
  border-color: #d9dce3;
  background: #f7f9fc;
}

.ai-backdrop {
  display: none;
}

.pick-advisor {
  display: block;
}

.pick-advisor-head {
  list-style: none;
  cursor: pointer;
}

.pick-advisor-head::-webkit-details-marker {
  display: none;
}

.pick-advisor-head::after {
  content: "展开";
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pick-advisor[open] .pick-advisor-head::after {
  content: "收起";
}

.pick-advisor-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.advisor-loading {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.advisor-loading span {
  color: var(--text);
  font-weight: 700;
}

.advisor-loading i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(83, 145, 255, 0.28), transparent),
    color-mix(in srgb, var(--panel-soft) 76%, var(--line));
  background-size: 220% 100%;
  animation: advisor-loading-shimmer 1.2s linear infinite;
}

.advisor-loading i:nth-child(3) {
  width: 86%;
}

.advisor-loading i:nth-child(4) {
  width: 62%;
}

.advisor-error {
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

@keyframes advisor-loading-shimmer {
  from {
    background-position: 220% 0;
  }

  to {
    background-position: -220% 0;
  }
}

.pick-advisor:not([open]) .pick-advisor-body {
  display: none;
}

[data-theme="light"] .review-decision-panel,
[data-theme="light"] .review-decision-panel.positive,
[data-theme="light"] .review-decision-panel.warning {
  color: #0b1220;
  border-color: #d9dce3;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .review-decision-panel.positive {
  border-left: 3px solid #00a429;
}

[data-theme="light"] .review-decision-panel.warning {
  border-left: 3px solid #ff7d00;
}

[data-theme="light"] .review-decision-panel p {
  color: #344054;
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .topbar-actions .account-chip,
  .topbar-actions #logoutButton {
    display: none;
  }

  .topbar-actions #refreshButton,
  .is-touch-device .topbar-actions #refreshButton {
    display: inline-grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 999px;
  }

  #refreshButton .button-label {
    display: none;
  }

  .data-refresh-chip {
    flex: 0 0 auto;
    max-width: none;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
  }

  .topbar-context .topbar-title-line,
  .is-touch-device .topbar-context .topbar-title-line {
    display: flex !important;
    align-items: baseline;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
  }

  .topbar-context .topbar-title-line #viewTitle,
  .is-touch-device .topbar-context .topbar-title-line #viewTitle {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions .theme-toggle {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    min-height: 34px;
  }

  .ai-backdrop {
    position: fixed;
    inset: 0;
    z-index: 28;
    display: block;
    background: rgba(6, 17, 31, 0.34);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
  }

  .ai-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }

  body.ai-sheet-open {
    overflow: hidden;
  }

  .ai-assistant,
  .is-touch-device .ai-assistant {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 29;
    width: 100%;
    height: 66dvh;
    max-height: 66dvh;
    border-radius: 20px 20px 0 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    transform: translateY(calc(100% + 18px));
  }

  .ai-assistant.open,
  .is-touch-device .ai-assistant.open {
    transform: translateY(0);
  }

  .ai-head {
    padding: 12px 14px;
  }

  .ai-messages,
  .is-touch-device .ai-messages {
    min-height: 0;
  }

  .ai-hero:not([data-ai-hero-module="strategy"]):not([data-ai-hero-module="intelligence"]) {
    display: none;
  }

  .insight-bar {
    margin-bottom: 8px;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.55;
  }

  .intel-toolbar,
  .is-touch-device .intel-toolbar {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
  }

  .date-filter,
  .is-touch-device .date-filter {
    width: auto;
    min-width: 0;
    justify-content: flex-start;
  }

  .date-filter input[type="date"] {
    width: 148px;
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .pick-advisor p,
  .pick-advisor p:nth-of-type(n+2) {
    display: block;
    overflow: visible;
    -webkit-line-clamp: initial;
    -webkit-box-orient: initial;
  }

  .pick-advisor:not([open]) .pick-advisor-body {
    display: none;
  }

  .pick-advisor-body {
    gap: 7px;
    margin-top: 7px;
  }

  .pick-advisor-head::after {
    font-size: 11px;
  }

  .grid {
    gap: 8px;
  }

  .panel.span-4.metric,
  .panel.span-3.metric,
  .metric {
    min-height: 0;
    padding: 9px;
  }

  .metric strong,
  .review-kpi strong {
    font-size: 20px;
  }

  .review-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .review-kpi,
  .ai-lab-grid div,
  .detail,
  .radar-item,
  .tushare-module {
    min-height: 0;
    padding: 8px;
    border-radius: 9px;
  }

  .details,
  .ai-lab-grid,
  .data-radar.compact {
    gap: 6px;
  }

  .ai-lab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tushare-module {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .user-head {
    gap: 8px;
  }

  .position-watch {
    gap: 5px;
  }

  .position-watch span {
    padding: 5px 7px;
    font-size: 10px;
  }

  .track-modal .icon-button {
    width: 40px;
    min-height: 40px;
  }
}

.data-confidence-strip {
  display: grid;
  gap: 12px;
  border-left: 4px solid var(--line-strong);
}

.data-confidence-strip.positive {
  border-left-color: #37d6b6;
}

.data-confidence-strip.warning {
  border-left-color: #ffd166;
}

.data-confidence-strip.danger {
  border-left-color: #ff6b86;
}

.data-confidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.data-confidence-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.2;
}

.data-confidence-strip p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.data-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--panel-soft);
  font-family: Roboto, "PingFang SC", sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.data-grade.positive {
  color: #37d6b6;
  border-color: rgba(55, 214, 182, 0.35);
  background: rgba(55, 214, 182, 0.10);
}

.data-grade.warning {
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.10);
}

.data-grade.danger {
  color: #ff6b86;
  border-color: rgba(255, 107, 134, 0.35);
  background: rgba(255, 107, 134, 0.10);
}

.data-module-strip,
.evidence-meta,
.conflict-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.recommendation-distribution {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.recommendation-distribution button {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 68px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-soft);
}

.recommendation-distribution button.active,
.recommendation-distribution button:hover {
  border-color: rgba(77, 163, 255, 0.45);
  background: color-mix(in srgb, var(--brand) 12%, var(--panel-soft));
}

.recommendation-distribution span {
  color: var(--muted);
  font-size: 12px;
}

.recommendation-distribution strong {
  font-family: Roboto, "PingFang SC", sans-serif;
  font-size: 24px;
  line-height: 1;
}

.pick-card.recommendation-executable {
  border-color: rgba(55, 214, 182, 0.30);
}

.pick-card.recommendation-probe {
  border-color: rgba(255, 209, 102, 0.34);
}

.pick-card.recommendation-conditional {
  border-color: rgba(255, 209, 102, 0.30);
}

.pick-card.recommendation-avoid {
  border-color: rgba(255, 107, 134, 0.30);
  opacity: 0.84;
}

.zero-candidate-report {
  border-color: rgba(255, 209, 102, 0.24);
}

.zero-candidate-report .explain-box {
  margin-top: 14px;
}

.recommendation-why-grid,
.condition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.recommendation-why-grid div,
.condition-grid div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.recommendation-why-grid span,
.condition-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.recommendation-why-grid p,
.condition-grid p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.62;
}

.condition-grid p + p {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.conflict-strip {
  padding: 10px 12px;
  border: 1px solid rgba(255, 209, 102, 0.24);
  border-radius: 8px;
  background: rgba(255, 209, 102, 0.08);
}

.track-modal-warning {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.track-modal-warning.warning {
  border-color: rgba(255, 209, 102, 0.34);
  background: rgba(255, 209, 102, 0.09);
}

.track-modal-warning.positive {
  border-color: rgba(55, 214, 182, 0.30);
  background: rgba(55, 214, 182, 0.08);
}

.track-modal-warning strong {
  color: var(--text);
  font-size: 14px;
}

.track-modal-warning p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.tag.neutral {
  color: var(--muted);
  border-color: var(--line);
  background: var(--panel-soft);
}

[data-theme="light"] .data-confidence-strip p,
[data-theme="light"] .recommendation-why-grid p,
[data-theme="light"] .condition-grid p,
[data-theme="light"] .track-modal-warning strong {
  color: #1d2129;
}

[data-theme="light"] .recommendation-distribution button,
[data-theme="light"] .recommendation-why-grid div,
[data-theme="light"] .condition-grid div,
[data-theme="light"] .track-modal-warning,
[data-theme="light"] .data-grade {
  background: #ffffff;
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  body {
    overflow-x: hidden;
  }

  .topbar,
  .is-touch-device .topbar {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .data-confidence-head {
    align-items: flex-start;
  }

  .recommendation-distribution,
  .recommendation-why-grid,
  .condition-grid {
    grid-template-columns: 1fr;
  }

  .recommendation-distribution {
    gap: 8px;
  }

  .recommendation-distribution button {
    min-height: 56px;
    padding: 10px;
  }

  #strategyFilters.segmented {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    overflow: visible;
    gap: 6px;
  }

  #strategyFilters.segmented button {
    width: 100%;
    min-width: 0;
    padding: 7px 4px;
    gap: 4px;
    white-space: nowrap;
  }
}

/* Stock analysis */
.stock-analysis-page {
  align-items: start;
}

.stock-search-panel {
  overflow: visible;
  z-index: 8;
}

.stock-search-box {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.stock-search-box label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
}

.stock-search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.stock-search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 108px;
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stock-search-suggestions:empty {
  display: none;
}

.stock-suggestion,
.stock-shortcut {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  width: 100%;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.stock-suggestion span,
.stock-shortcut span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-suggestion em,
.stock-shortcut em,
.stock-suggestion small,
.stock-shortcut small {
  color: var(--muted);
  font-style: normal;
}

.stock-suggestion strong {
  align-self: center;
  color: var(--brand);
  font-size: 12px;
}

.stock-suggestion-empty,
.stock-shortcut-empty,
.stock-empty-copy {
  color: var(--muted);
}

.stock-empty-copy {
  margin: 14px 0 0;
  max-width: 760px;
}

.stock-shortcut-list {
  display: grid;
  gap: 8px;
}

.stock-shortcut small {
  grid-column: 1 / -1;
}

.stock-header-panel {
  padding: 18px;
}

.stock-header-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.stock-header-main h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}

.stock-header-main h2 span {
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
}

.stock-header-main p {
  margin: 0;
  color: var(--muted);
}

.stock-market-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--warning);
}

.stock-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.stock-analysis-main,
.stock-action-rail {
  display: grid;
  gap: 16px;
}

.stock-action-rail {
  position: sticky;
  top: 96px;
}

.stock-conclusion-panel p {
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.75;
}

.stock-score-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.stock-score-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.stock-score-card span,
.stock-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stock-score-card strong {
  display: block;
  margin: 6px 0 9px;
  font-size: 24px;
}

.stock-score-card i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface);
}

.stock-score-card b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.stock-score-card.positive b {
  background: var(--positive);
}

.stock-score-card.warning b {
  background: var(--warning);
}

.stock-score-card.danger b {
  background: var(--danger);
}

.market-signal-strip {
  display: grid;
  grid-template-columns: minmax(118px, 0.72fr) minmax(160px, 1.25fr) minmax(140px, 0.95fr) minmax(160px, 1.05fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
}

.market-signal-summary,
.market-signal-meta {
  min-width: 0;
}

.market-signal-summary span,
.market-signal-summary em,
.intraday-state-box span,
.event-radar-bar span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.market-signal-summary strong {
  display: block;
  margin: 3px 0;
  font-size: 22px;
  line-height: 1.05;
}

.market-signal-meta {
  display: grid;
  gap: 6px;
}

.market-signal-meta span,
.stock-market-checks span {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font-size: 12px;
}

.market-signal-chart,
.stock-chart-large {
  min-width: 0;
  width: 100%;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 54px;
  overflow: visible;
}

.stock-chart-large .chart-svg {
  height: 220px;
}

.chart-area {
  fill: rgba(77, 163, 255, 0.13);
}

.chart-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.chart-svg.positive .chart-line {
  stroke: var(--positive);
}

.chart-svg.warning .chart-line {
  stroke: var(--warning);
}

.chart-svg.danger .chart-line {
  stroke: var(--danger);
}

.chart-plan-line {
  stroke-width: 1;
  stroke-dasharray: 4 3;
  opacity: 0.72;
  vector-effect: non-scaling-stroke;
}

.chart-plan-line.entry {
  stroke: var(--brand);
}

.chart-plan-line.take {
  stroke: var(--positive);
}

.chart-plan-line.stop {
  stroke: var(--danger);
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
}

.stock-market-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 16px;
  align-items: stretch;
}

.stock-market-chart,
.stock-market-side {
  min-width: 0;
}

.stock-market-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.stock-market-chart-head h2 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 4px 0 0;
  letter-spacing: 0;
}

.stock-market-price {
  text-align: right;
}

.stock-market-price strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.stock-market-price span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.stock-market-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.stock-market-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.intraday-state-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.intraday-state-box strong {
  display: block;
  margin: 4px 0 8px;
  font-size: 30px;
  line-height: 1;
}

.intraday-state-box.positive strong {
  color: var(--positive);
}

.intraday-state-box.warning strong {
  color: var(--warning);
}

.intraday-state-box.danger strong {
  color: var(--danger);
}

.intraday-state-box p {
  margin: 0;
  color: var(--text);
  line-height: 1.56;
}

.event-radar {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.event-radar.compact {
  padding: 0;
  border: 0;
  background: transparent;
}

.event-radar-bars {
  display: grid;
  gap: 7px;
}

.event-radar-bar {
  display: grid;
  grid-template-columns: 34px minmax(48px, 1fr) 30px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.event-radar-bar i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface);
}

.event-radar-bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.event-radar-bar.positive b {
  background: var(--positive);
}

.event-radar-bar.warning b {
  background: var(--warning);
}

.event-radar-bar.danger b {
  background: var(--danger);
}

.event-radar-bar strong {
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

.policy-highlight-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.stock-reason-grid,
.stock-tab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stock-reason-list {
  min-height: 180px;
}

.stock-reason-list h3,
.stock-tab-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.stock-reason-list p,
.stock-tab-section p {
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.62;
}

.stock-reason-list p::before,
.stock-tab-section > p::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--brand);
  vertical-align: 2px;
}

.stock-tab-panel {
  min-height: 400px;
}

.stock-tabs {
  margin-bottom: 14px;
  overflow-x: auto;
}

.stock-tab-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.stock-tab-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stock-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stock-metric-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stock-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stock-metric strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 6px;
  font-size: 17px;
}

.stock-metric em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.stock-action-button {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.stock-pool-status {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.stock-pool-status strong {
  display: block;
  margin-bottom: 6px;
}

.stock-pool-status p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.stock-check-list {
  display: grid;
  gap: 8px;
}

.stock-check-list span {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
}

.stock-evidence-list {
  display: grid;
  gap: 10px;
}

.stock-risk-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stock-risk-item strong {
  display: block;
  margin-bottom: 6px;
}

.stock-risk-item p {
  margin: 0;
  color: var(--muted);
}

.track-modal-form textarea,
.track-modal-form select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--field-bg);
  padding: 10px 12px;
  resize: vertical;
}

[data-theme="light"] .stock-search-box label,
[data-theme="light"] .stock-search-suggestions,
[data-theme="light"] .stock-suggestion,
[data-theme="light"] .stock-shortcut,
[data-theme="light"] .stock-score-card,
[data-theme="light"] .stock-tab-section,
[data-theme="light"] .stock-metric,
[data-theme="light"] .stock-pool-status,
[data-theme="light"] .stock-check-list span,
[data-theme="light"] .stock-risk-item,
[data-theme="light"] .market-signal-strip,
[data-theme="light"] .intraday-state-box,
[data-theme="light"] .event-radar,
[data-theme="light"] .market-signal-meta span,
[data-theme="light"] .stock-market-checks span {
  background: var(--panel-soft);
}

@media (max-width: 1180px) {
  .stock-score-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stock-analysis-layout {
    grid-template-columns: 1fr;
  }

  .stock-market-panel {
    grid-template-columns: 1fr;
  }

  .market-signal-strip {
    grid-template-columns: minmax(120px, 0.7fr) minmax(160px, 1.2fr) minmax(160px, 1fr);
  }

  .market-signal-strip .event-radar {
    grid-column: 1 / -1;
  }

  .stock-action-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .stock-search-box {
    grid-template-columns: 1fr;
  }

  .stock-search-suggestions {
    right: 0;
  }

  .stock-header-main {
    display: grid;
  }

  .stock-score-grid,
  .stock-reason-grid,
  .stock-tab-grid,
  .stock-metric-grid,
  .stock-metric-grid.compact,
  .stock-action-rail,
  .market-signal-strip {
    grid-template-columns: 1fr;
  }

  .stock-chart-large .chart-svg {
    height: 150px;
  }

  .stock-market-chart-head {
    display: grid;
  }

  .stock-market-price {
    text-align: left;
  }

  .stock-conclusion-panel p {
    font-size: 15px;
  }

  .stock-tabs {
    display: flex;
  }

  .stock-tabs button {
    flex: 0 0 auto;
  }
}

/* H5 navigation and AI drawer fixes. */
.app-shell.view-stockAnalysis .ai-fab,
.app-shell.view-stockAnalysis .ai-assistant {
  right: 22px;
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .nav,
  .is-touch-device .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav button,
  .is-touch-device .nav button {
    flex-direction: column;
    gap: 3px;
    min-height: 48px;
    padding: 6px 2px 5px;
    line-height: 1;
    white-space: normal;
  }

  .nav button .icon,
  .is-touch-device .nav button .icon {
    width: 20px;
    height: 20px;
    margin: 0;
  }

  .nav-label,
  .is-touch-device .nav-label,
  .sidebar-collapsed .nav-label,
  .is-touch-device .sidebar-collapsed .nav-label {
    display: block;
    width: auto;
    max-width: 100%;
    opacity: 1;
    overflow: visible;
    color: inherit;
    font-size: 0;
    line-height: 1;
    transform: none;
  }

  .nav-label::after {
    content: attr(data-mobile-label);
    display: block;
    overflow: hidden;
    max-width: 100%;
    color: inherit;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions #logoutButton,
  .is-touch-device .topbar-actions #logoutButton {
    display: inline-grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 999px;
  }

  #logoutButton .button-label {
    display: none;
  }

  #logoutButton .icon {
    margin: 0;
  }

  .ai-fab.active,
  .is-touch-device .ai-fab.active {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.92);
  }

  .app-shell.view-stockAnalysis .ai-fab,
  .app-shell.view-stockAnalysis .ai-assistant {
    right: 0;
  }
}

/* Final strategy command-center overrides: keep the cockpit visual above legacy command styles. */
.app-shell.view-strategy {
  grid-template-columns: 72px minmax(0, 1fr);
}

.app-shell.view-strategy .sidebar {
  padding: 14px 10px;
}

.app-shell.view-strategy .brand-lockup {
  justify-content: center;
  margin-bottom: 18px;
}

.app-shell.view-strategy .brand-copy,
.app-shell.view-strategy .nav-label,
.app-shell.view-strategy .sidebar-toggle {
  display: none;
}

.app-shell.view-strategy .nav {
  justify-items: center;
  gap: 9px;
}

.app-shell.view-strategy .nav button {
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 10px;
}

.app-shell.view-strategy .topbar {
  min-height: 44px;
  margin: -2px 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--terminal-line-soft);
  border-radius: 8px;
  background: rgba(3, 13, 24, 0.86);
}

.app-shell.view-strategy .command-alternatives {
  border-color: var(--terminal-line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(13, 45, 76, 0.82), rgba(4, 17, 31, 0.96)),
    var(--terminal-panel);
  box-shadow:
    inset 0 0 0 1px rgba(120, 200, 255, 0.035),
    0 0 24px rgba(20, 103, 177, 0.16);
}

.app-shell.view-strategy .command-alternatives summary,
.app-shell.view-strategy .command-alt-list strong,
.app-shell.view-strategy .command-alt-list p {
  color: var(--terminal-text);
}

.app-shell.view-strategy .command-alt-list article {
  border-color: var(--terminal-line-soft);
  border-radius: 4px;
  background: rgba(2, 12, 22, 0.60);
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .app-shell.view-strategy,
  .app-shell.view-strategy.sidebar-collapsed {
    grid-template-columns: 1fr;
    padding-bottom: 78px;
  }

  .app-shell.view-strategy .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 12;
    height: auto;
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .app-shell.view-strategy .brand-lockup,
  .app-shell.view-strategy .brand-copy,
  .app-shell.view-strategy .sidebar-toggle {
    display: none;
  }

  .app-shell.view-strategy .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-items: stretch;
    gap: 4px;
  }

  .app-shell.view-strategy .nav button {
    flex-direction: column;
    gap: 3px;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 48px;
    padding: 6px 2px 5px;
    border-radius: 8px;
    line-height: 1;
    white-space: normal;
  }

  .app-shell.view-strategy .nav-label {
    display: block;
    width: auto;
    max-width: 100%;
    opacity: 1;
    overflow: visible;
    color: inherit;
    font-size: 0;
    line-height: 1;
    transform: none;
  }

  .app-shell.view-strategy .nav-label::after {
    content: attr(data-mobile-label);
    display: block;
    overflow: hidden;
    max-width: 100%;
    color: inherit;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Light theme compatibility for the strategy command center. */
[data-theme="light"] .app-shell.view-strategy {
  --terminal-bg: #edf4fb;
  --terminal-panel: rgba(255, 255, 255, 0.94);
  --terminal-panel-strong: rgba(248, 252, 255, 0.98);
  --terminal-line: rgba(37, 99, 145, 0.22);
  --terminal-line-soft: rgba(37, 99, 145, 0.13);
  --terminal-text: #102033;
  --terminal-muted: #5f7086;
  --terminal-green: #12875a;
  --terminal-blue: #2563eb;
  --terminal-yellow: #b7791f;
  --terminal-red: #dc3545;
  --terminal-cyan: #0891b2;
  --terminal-purple: #7c3aed;
  background:
    radial-gradient(circle at 50% -12%, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, var(--terminal-bg) 58%, #e5edf6 100%);
  color: var(--terminal-text);
}

[data-theme="light"] .app-shell.view-strategy .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(234, 242, 250, 0.98)),
    #f8fbff;
  border-right-color: rgba(37, 99, 145, 0.16);
}

[data-theme="light"] .app-shell.view-strategy .content {
  background:
    linear-gradient(rgba(37, 99, 145, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 145, 0.035) 1px, transparent 1px),
    var(--terminal-bg);
  background-size: 32px 32px;
}

[data-theme="light"] .app-shell.view-strategy .topbar {
  border-color: var(--terminal-line-soft);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .app-shell.view-strategy .topbar-context span,
[data-theme="light"] .app-shell.view-strategy .topbar-context em,
[data-theme="light"] .app-shell.view-strategy .data-refresh-chip,
[data-theme="light"] .app-shell.view-strategy .account-chip {
  color: var(--terminal-muted);
}

[data-theme="light"] .app-shell.view-strategy .topbar-title-line #viewTitle,
[data-theme="light"] .terminal-brand,
[data-theme="light"] .terminal-panel-head h3,
[data-theme="light"] .operation-target-head h3,
[data-theme="light"] .terminal-research-drawer summary {
  color: var(--terminal-text);
}

[data-theme="light"] .terminal-brand {
  text-shadow: 0 0 12px rgba(37, 99, 235, 0.18);
}

[data-theme="light"] .terminal-header,
[data-theme="light"] .terminal-panel,
[data-theme="light"] .terminal-target-panel,
[data-theme="light"] .terminal-chart-panel,
[data-theme="light"] .terminal-event-panel,
[data-theme="light"] .terminal-log-panel,
[data-theme="light"] .app-shell.view-strategy .command-alternatives {
  border-color: var(--terminal-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 253, 0.94)),
    var(--terminal-panel);
  box-shadow:
    inset 0 0 0 1px rgba(37, 99, 145, 0.025),
    0 12px 34px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .terminal-header::before,
[data-theme="light"] .terminal-panel::before,
[data-theme="light"] .terminal-target-panel::before,
[data-theme="light"] .terminal-chart-panel::before,
[data-theme="light"] .terminal-event-panel::before,
[data-theme="light"] .terminal-log-panel::before {
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent 42%, rgba(18, 135, 90, 0.045)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.60), transparent 22%);
  opacity: 0.72;
}

[data-theme="light"] .terminal-header-status span,
[data-theme="light"] .terminal-header-right span,
[data-theme="light"] .terminal-panel-head span,
[data-theme="light"] .terminal-header-message,
[data-theme="light"] .terminal-micro-stats span,
[data-theme="light"] .terminal-micro-stats em,
[data-theme="light"] .data-health-row,
[data-theme="light"] .heat-scale,
[data-theme="light"] .action-legend span,
[data-theme="light"] .terminal-target-head-row,
[data-theme="light"] .terminal-target-row span:first-child em,
[data-theme="light"] .terminal-chart-toolbar span,
[data-theme="light"] .terminal-quote-strip,
[data-theme="light"] .terminal-chart-plan,
[data-theme="light"] .operation-target-head span,
[data-theme="light"] .operation-metrics span,
[data-theme="light"] .operation-metrics strong,
[data-theme="light"] .quick-command,
[data-theme="light"] .terminal-event-row,
[data-theme="light"] .system-log-list p,
[data-theme="light"] .system-log-more {
  color: var(--terminal-muted);
}

[data-theme="light"] .terminal-header strong,
[data-theme="light"] .terminal-panel strong,
[data-theme="light"] .terminal-target-row strong,
[data-theme="light"] .operation-target-head strong,
[data-theme="light"] .operation-metrics strong,
[data-theme="light"] .data-health-row em,
[data-theme="light"] .command-alt-list strong,
[data-theme="light"] .command-alt-list p {
  color: var(--terminal-text);
}

[data-theme="light"] .terminal-stage-switch button,
[data-theme="light"] .terminal-chart-toolbar button,
[data-theme="light"] .event-filter-tabs span,
[data-theme="light"] .terminal-target-toolbar label,
[data-theme="light"] .terminal-filter-button,
[data-theme="light"] .terminal-target-panel .command-filter-buttons button {
  border-color: var(--terminal-line-soft);
  background: rgba(255, 255, 255, 0.78);
  color: var(--terminal-muted);
}

[data-theme="light"] .terminal-stage-switch button.active,
[data-theme="light"] .terminal-chart-toolbar button.active,
[data-theme="light"] .event-filter-tabs span.active,
[data-theme="light"] .terminal-target-panel .command-filter-buttons button.active {
  border-color: rgba(37, 99, 235, 0.34);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.92));
  color: #ffffff;
}

[data-theme="light"] .terminal-panel-tool {
  border-color: var(--terminal-line-soft);
  background: rgba(255, 255, 255, 0.78);
  color: var(--terminal-muted);
}

[data-theme="light"] .terminal-gauge-arc {
  background:
    radial-gradient(circle at 50% 96%, var(--terminal-panel) 0 44%, transparent 45%),
    conic-gradient(from 250deg, var(--terminal-green) 0 25%, #d6d942 25% 53%, var(--terminal-yellow) 53% 72%, #f97316 72% 86%, var(--terminal-red) 86% 100%);
}

[data-theme="light"] .terminal-gauge::after {
  background: #334155;
  box-shadow: 0 0 10px rgba(15, 23, 42, 0.20);
}

[data-theme="light"] .funnel-step {
  border-color: rgba(8, 145, 178, 0.22);
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.18), rgba(18, 135, 90, 0.16));
  color: #123047;
}

[data-theme="light"] .theme-heatmap div {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(18, 135, 90, calc(var(--heat) / 230));
}

[data-theme="light"] .theme-heatmap div.danger {
  background: rgba(220, 53, 69, calc(var(--heat) / 235));
}

[data-theme="light"] .heat-scale i {
  background: linear-gradient(90deg, var(--terminal-red), rgba(15, 23, 42, 0.14), var(--terminal-green));
}

[data-theme="light"] .action-donut::before,
[data-theme="light"] .signal-ring {
  background:
    radial-gradient(circle, var(--terminal-panel) 55%, transparent 56%),
    conic-gradient(currentColor calc(var(--signal) * 1%), rgba(15, 23, 42, 0.09) 0);
}

[data-theme="light"] .action-donut::before {
  background: var(--terminal-panel);
}

[data-theme="light"] .terminal-target-toolbar input {
  color: var(--terminal-text);
}

[data-theme="light"] .terminal-target-row {
  border-bottom-color: var(--terminal-line-soft);
  color: var(--terminal-text);
}

[data-theme="light"] .terminal-target-row.active,
[data-theme="light"] .terminal-target-row:hover {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.11), rgba(255, 255, 255, 0.42));
}

[data-theme="light"] .terminal-empty,
[data-theme="light"] .terminal-chart-empty,
[data-theme="light"] .operation-empty,
[data-theme="light"] .terminal-research-drawer,
[data-theme="light"] .terminal-research-grid .command-research-block,
[data-theme="light"] .terminal-execution-strip div,
[data-theme="light"] .command-alt-list article {
  border-color: var(--terminal-line-soft);
  background: rgba(255, 255, 255, 0.66);
  color: var(--terminal-muted);
}

[data-theme="light"] .terminal-chart-stage {
  border-color: var(--terminal-line-soft);
  background:
    linear-gradient(rgba(37, 99, 145, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 145, 0.035) 1px, transparent 1px),
    rgba(248, 252, 255, 0.86);
}

[data-theme="light"] .terminal-action {
  border-color: var(--terminal-line-soft);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(237, 244, 251, 0.82));
  color: var(--terminal-text);
}

[data-theme="light"] .terminal-action:hover {
  border-color: rgba(37, 99, 235, 0.34);
  background: linear-gradient(90deg, rgba(219, 234, 254, 0.95), rgba(248, 252, 255, 0.88));
}

[data-theme="light"] .terminal-event-row.head,
[data-theme="light"] .data-health-row.head {
  color: #38516d;
  border-bottom-color: var(--terminal-line-soft);
}

[data-theme="light"] .quick-command,
[data-theme="light"] .terminal-chart-toolbar,
[data-theme="light"] .terminal-micro-stats,
[data-theme="light"] .operation-metrics div,
[data-theme="light"] .terminal-event-row {
  border-color: var(--terminal-line-soft);
}

/* Strategy command center chart and typography polish. */
.app-shell.view-strategy {
  --strategy-font: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --strategy-display-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", "PingFang SC", sans-serif;
  --mono: var(--strategy-font);
  --terminal-green: #30d158;
  --terminal-blue: #0a84ff;
  --terminal-yellow: #ffd60a;
  --terminal-red: #ff453a;
  font-family: var(--strategy-font);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.app-shell.view-strategy .terminal-command-center,
.app-shell.view-strategy .terminal-header,
.app-shell.view-strategy .terminal-panel,
.app-shell.view-strategy .terminal-target-panel,
.app-shell.view-strategy .terminal-chart-panel,
.app-shell.view-strategy .terminal-event-panel,
.app-shell.view-strategy .terminal-log-panel,
.app-shell.view-strategy .command-alternatives {
  font-family: var(--strategy-font);
  letter-spacing: 0;
}

.app-shell.view-strategy .terminal-brand {
  font-family: var(--strategy-display-font);
  font-size: clamp(20px, 1.5vw, 28px);
  font-weight: 760;
  letter-spacing: 0;
}

.app-shell.view-strategy .terminal-header strong,
.app-shell.view-strategy .terminal-panel strong,
.app-shell.view-strategy .terminal-target-row strong,
.app-shell.view-strategy .terminal-chart-footer strong,
.app-shell.view-strategy .operation-target-head strong,
.app-shell.view-strategy .operation-metrics strong {
  font-family: var(--strategy-font);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.terminal-chart-toolbar {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 10px;
}

.terminal-chart-toolbar > span {
  margin-left: 0;
  color: var(--terminal-muted);
  font-family: var(--strategy-font);
  font-size: 12px;
  letter-spacing: 0;
}

.terminal-period-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  align-items: center;
  padding: 3px;
  border: 1px solid rgba(142, 142, 147, 0.16);
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.terminal-period-switch button,
.terminal-chart-toolbar .terminal-period-switch button {
  display: grid;
  min-width: 76px;
  min-height: 34px;
  gap: 1px;
  place-items: center;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--terminal-muted);
  box-shadow: none;
  font-family: var(--strategy-font);
  transform: none;
}

.terminal-period-switch button strong {
  color: inherit;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.05;
}

.terminal-period-switch button em {
  color: color-mix(in srgb, currentColor 58%, transparent);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.05;
}

.terminal-period-switch button.active,
.terminal-chart-toolbar .terminal-period-switch button.active {
  background: rgba(10, 132, 255, 0.90);
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(10, 132, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.terminal-chart-stage {
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.010)),
    rgba(1, 12, 22, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 -1px 0 rgba(255, 255, 255, 0.018);
}

.terminal-chart-stage .command-kline-chart,
.command-kline-chart {
  height: 360px;
}

.command-chart-bg {
  fill: transparent;
}

.command-chart-grid line {
  stroke: rgba(255, 255, 255, 0.055);
  stroke-width: 1;
}

.command-close-area {
  fill: url(#commandChartFill);
  opacity: 0.74;
}

.command-close-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.96;
}

.command-candles line {
  stroke: currentColor;
  stroke-width: 1;
  opacity: 0.52;
}

.command-candles rect {
  fill: currentColor;
  opacity: 0.52;
}

.command-candles .volume {
  opacity: 0.13;
}

.command-vwap-line {
  stroke: rgba(255, 214, 10, 0.72);
  stroke-width: 1.35;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
  opacity: 0.58;
}

.command-plan-line line {
  stroke-width: 1;
  stroke-dasharray: 4 7;
  opacity: 0.46;
}

.command-plan-line text,
.command-y-labels text {
  fill: var(--terminal-muted);
  font-family: var(--strategy-font);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0;
  opacity: 0.82;
}

.command-y-labels text {
  text-anchor: start;
}

.command-chart-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(142, 142, 147, 0.12);
  background: rgba(255, 255, 255, 0.018);
  color: var(--terminal-muted);
  font-family: var(--strategy-font);
  font-size: 12px;
  letter-spacing: 0;
}

.command-chart-footer strong {
  font-size: 13px;
}

.command-chart-footer em {
  color: color-mix(in srgb, var(--terminal-muted) 72%, transparent);
  font-style: normal;
}

.terminal-chart-empty,
.command-chart-empty {
  gap: 8px;
  min-height: 360px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.008)),
    rgba(1, 12, 22, 0.72);
  text-align: center;
}

.terminal-chart-empty svg,
.command-chart-empty svg {
  width: 24px;
  height: 24px;
  color: var(--terminal-blue);
  opacity: 0.78;
}

.terminal-chart-empty strong,
.command-chart-empty strong {
  display: block;
  color: var(--terminal-text);
  font-size: 14px;
  font-weight: 720;
}

.terminal-chart-empty span,
.command-chart-empty span {
  max-width: 280px;
  color: var(--terminal-muted);
  font-size: 12px;
  line-height: 1.45;
}

[data-theme="light"] .app-shell.view-strategy {
  --terminal-green: #34c759;
  --terminal-blue: #007aff;
  --terminal-yellow: #ff9f0a;
  --terminal-red: #ff3b30;
}

[data-theme="light"] .terminal-period-switch {
  border-color: rgba(60, 60, 67, 0.12);
  background: rgba(118, 118, 128, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

[data-theme="light"] .terminal-period-switch button {
  color: #5f7086;
}

[data-theme="light"] .terminal-period-switch button.active,
[data-theme="light"] .terminal-chart-toolbar .terminal-period-switch button.active {
  background: #007aff;
  color: #ffffff;
  box-shadow:
    0 10px 22px rgba(0, 122, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

[data-theme="light"] .terminal-chart-stage {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 249, 252, 0.76)),
    rgba(248, 250, 252, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 24px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .command-chart-grid line {
  stroke: rgba(60, 60, 67, 0.075);
}

[data-theme="light"] .command-candles line {
  opacity: 0.58;
}

[data-theme="light"] .command-candles rect {
  opacity: 0.56;
}

[data-theme="light"] .command-candles .volume {
  opacity: 0.15;
}

[data-theme="light"] .command-vwap-line {
  stroke: rgba(255, 159, 10, 0.76);
}

[data-theme="light"] .command-chart-footer {
  border-top-color: rgba(60, 60, 67, 0.10);
  background: rgba(255, 255, 255, 0.52);
}

[data-theme="light"] .terminal-chart-empty,
[data-theme="light"] .command-chart-empty {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 249, 252, 0.62)),
    rgba(248, 250, 252, 0.86);
}

/* Product QA repair pass for 今日研究台: real controls, actionable empty states, and stable mobile navigation. */
.terminal-panel-head {
  align-items: center;
}

.terminal-panel-head > div {
  min-width: 0;
}

.terminal-panel-head h3,
.terminal-panel-head span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-filter-button.active {
  border-color: rgba(10, 132, 255, 0.58);
  background: rgba(10, 132, 255, 0.18);
  color: var(--terminal-blue);
}

.terminal-filter-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.terminal-zero-state,
.terminal-mini-empty,
.terminal-empty-action,
.terminal-event-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  min-height: 164px;
  padding: 18px;
  border: 1px dashed var(--terminal-line-soft);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.008)),
    rgba(2, 12, 22, 0.52);
  color: var(--terminal-muted);
  text-align: center;
}

.terminal-zero-state strong,
.terminal-mini-empty strong,
.terminal-empty-action strong {
  color: var(--terminal-text);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.25;
}

.terminal-zero-state p,
.terminal-zero-state span,
.terminal-mini-empty span,
.terminal-empty-action span {
  max-width: 360px;
  margin: 0;
  color: var(--terminal-muted);
  font-size: 12px;
  line-height: 1.5;
}

.terminal-zero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.terminal-zero-actions.compact {
  margin-top: 8px;
}

.terminal-zero-actions button,
.terminal-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(10, 132, 255, 0.34);
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.12);
  color: var(--terminal-text);
  box-shadow: none;
  font-family: var(--strategy-font);
  font-size: 12px;
  font-weight: 720;
  transform: none;
}

.terminal-zero-actions button:hover,
.terminal-inline-action:hover {
  border-color: rgba(10, 132, 255, 0.62);
  background: rgba(10, 132, 255, 0.20);
  color: #ffffff;
}

.terminal-empty-action {
  min-height: 148px;
}

.terminal-mini-empty {
  min-height: 166px;
}

.empty-action-distribution {
  min-height: 196px;
}

.terminal-chart-empty.terminal-decision-empty {
  padding: 24px;
}

.terminal-event-empty {
  min-height: 58px;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: rgba(2, 12, 22, 0.36);
  font-family: var(--strategy-font);
  font-size: 12px;
}

.event-filter-tabs {
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.event-filter-tabs::-webkit-scrollbar {
  display: none;
}

.event-filter-tabs button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(78, 156, 232, 0.18);
  border-radius: 999px;
  background: rgba(2, 13, 26, 0.55);
  color: var(--terminal-muted);
  box-shadow: none;
  font-family: var(--strategy-font);
  font-size: 12px;
  font-weight: 680;
  line-height: 1;
  transform: none;
}

.event-filter-tabs button.active {
  border-color: rgba(10, 132, 255, 0.58);
  background: rgba(10, 132, 255, 0.20);
  color: var(--terminal-text);
}

.event-filter-tabs button:focus-visible,
.terminal-filter-button:focus-visible,
.terminal-zero-actions button:focus-visible,
.terminal-inline-action:focus-visible,
.system-log-more:focus-visible {
  outline: 2px solid rgba(10, 132, 255, 0.64);
  outline-offset: 2px;
}

.system-log-more {
  min-height: 30px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--terminal-blue);
  font-family: var(--strategy-font);
  font-size: 12px;
  font-weight: 720;
  box-shadow: none;
}

.system-log-more:hover {
  color: var(--terminal-text);
}

.data-health-table,
.terminal-event-table {
  min-width: 0;
}

.terminal-target-toolbar label {
  min-width: 0;
}

.app-shell.view-strategy .mobile-more-sheet {
  max-height: min(540px, calc(100dvh - 116px));
  overflow: auto;
}

[data-theme="light"] .terminal-filter-button.active {
  border-color: rgba(0, 122, 255, 0.34);
  background: rgba(0, 122, 255, 0.10);
  color: #007aff;
}

[data-theme="light"] .terminal-zero-state,
[data-theme="light"] .terminal-mini-empty,
[data-theme="light"] .terminal-empty-action,
[data-theme="light"] .terminal-event-empty {
  border-color: var(--terminal-line-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 249, 252, 0.62)),
    rgba(248, 250, 252, 0.82);
  color: var(--terminal-muted);
}

[data-theme="light"] .terminal-zero-state strong,
[data-theme="light"] .terminal-mini-empty strong,
[data-theme="light"] .terminal-empty-action strong {
  color: var(--terminal-text);
}

[data-theme="light"] .terminal-zero-actions button,
[data-theme="light"] .terminal-inline-action {
  border-color: rgba(0, 122, 255, 0.22);
  background: rgba(0, 122, 255, 0.08);
  color: var(--terminal-text);
}

[data-theme="light"] .terminal-zero-actions button:hover,
[data-theme="light"] .terminal-inline-action:hover {
  border-color: rgba(0, 122, 255, 0.38);
  background: rgba(0, 122, 255, 0.14);
  color: #0051c7;
}

[data-theme="light"] .event-filter-tabs button {
  border-color: var(--terminal-line-soft);
  background: rgba(255, 255, 255, 0.78);
  color: var(--terminal-muted);
}

[data-theme="light"] .event-filter-tabs button.active {
  border-color: rgba(0, 122, 255, 0.34);
  background: rgba(0, 122, 255, 0.10);
  color: #0051c7;
}

[data-theme="light"] .system-log-more {
  color: #0066d6;
}

@media (max-width: 1180px) {
  .app-shell.view-strategy .terminal-header {
    grid-template-columns: 1fr;
  }

  .app-shell.view-strategy .terminal-stage-switch {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .app-shell.view-strategy .terminal-header-status,
  .app-shell.view-strategy .terminal-header-right {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .app-shell.view-strategy,
  .app-shell.view-strategy.sidebar-collapsed {
    grid-template-columns: 1fr;
    padding-bottom: 88px;
  }

  .app-shell.view-strategy .sidebar {
    z-index: 30;
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    border-top-color: var(--terminal-line-soft);
    backdrop-filter: blur(18px);
  }

  .app-shell.view-strategy .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-items: stretch;
    gap: 4px;
  }

  .app-shell.view-strategy .nav .nav-secondary {
    display: none !important;
  }

  .app-shell.view-strategy .nav button.nav-more {
    display: flex !important;
  }

  .app-shell.view-strategy .nav button {
    width: auto;
    min-width: 0;
    min-height: 50px;
    height: auto;
    padding: 6px 2px 5px;
  }

  .app-shell.view-strategy .content {
    padding: 10px 8px 14px;
  }

  .app-shell.view-strategy .topbar {
    margin: 0 0 8px;
  }

  .app-shell.view-strategy .terminal-command-center {
    gap: 8px;
  }

  .app-shell.view-strategy .command-intel-grid,
  .app-shell.view-strategy .command-ops-grid,
  .terminal-research-grid,
  .terminal-execution-strip {
    grid-template-columns: 1fr;
  }

  .app-shell.view-strategy .terminal-brand {
    white-space: normal;
  }

  .app-shell.view-strategy .terminal-header {
    min-height: 0;
    padding: 10px;
  }

  .app-shell.view-strategy .terminal-header-status,
  .app-shell.view-strategy .terminal-header-right,
  .app-shell.view-strategy .terminal-stage-switch {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .app-shell.view-strategy .terminal-panel,
  .app-shell.view-strategy .terminal-target-panel,
  .app-shell.view-strategy .terminal-chart-panel,
  .app-shell.view-strategy .terminal-event-panel,
  .app-shell.view-strategy .terminal-log-panel,
  .operation-console-panel {
    min-height: 0;
  }

  .terminal-panel {
    padding: 10px;
  }

  .terminal-target-toolbar {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .terminal-target-head-row {
    display: none;
  }

  .terminal-target-row {
    grid-template-columns: minmax(94px, 1fr) 44px 58px 54px;
    gap: 6px;
  }

  .terminal-target-row > span:nth-child(5) {
    display: none;
  }

  .signal-ring {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .terminal-micro-stats,
  .operation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-heatmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-donut-wrap {
    grid-template-columns: 1fr;
  }

  .terminal-chart-toolbar {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .terminal-period-switch {
    width: 100%;
  }

  .terminal-period-switch button,
  .terminal-chart-toolbar .terminal-period-switch button {
    min-width: 0;
    flex: 1 1 0;
  }

  .terminal-chart-stage .command-kline-chart,
  .command-kline-chart,
  .terminal-chart-empty,
  .command-chart-empty {
    min-height: 260px;
    height: 260px;
  }

  .terminal-chart-empty.terminal-decision-empty {
    height: auto;
    min-height: 240px;
  }

  .terminal-event-row {
    grid-template-columns: 64px 74px minmax(0, 1fr);
    gap: 8px;
  }

  .terminal-event-row span:nth-child(3),
  .terminal-event-row span:nth-child(5),
  .terminal-event-row span:nth-child(6) {
    display: none;
  }

  .terminal-zero-state,
  .terminal-mini-empty,
  .terminal-empty-action {
    min-height: 140px;
    padding: 16px 12px;
  }

  .terminal-zero-actions button,
  .terminal-inline-action {
    flex: 1 1 132px;
  }

  .app-shell.view-strategy .mobile-more-backdrop {
    z-index: 31;
  }

  .app-shell.view-strategy .mobile-more-sheet {
    z-index: 32;
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .app-shell.view-strategy .ai-fab {
    z-index: 29;
    bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .app-shell.view-strategy .toast,
  .toast {
    bottom: calc(152px + env(safe-area-inset-bottom));
  }
}

.is-touch-device .app-shell.view-strategy,
.is-touch-device .app-shell.view-strategy.sidebar-collapsed {
  grid-template-columns: 1fr;
  padding-bottom: 88px;
}

.is-touch-device .app-shell.view-strategy .sidebar {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  height: auto;
  padding: 7px 8px max(7px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--terminal-line-soft);
  border-right: 0;
  backdrop-filter: blur(18px);
}

.is-touch-device .app-shell.view-strategy .brand-lockup,
.is-touch-device .app-shell.view-strategy .brand-copy,
.is-touch-device .app-shell.view-strategy .sidebar-toggle {
  display: none;
}

.is-touch-device .app-shell.view-strategy .nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-items: stretch;
  gap: 4px;
}

.is-touch-device .app-shell.view-strategy .nav .nav-secondary {
  display: none !important;
}

.is-touch-device .app-shell.view-strategy .nav button.nav-more {
  display: flex !important;
}

.is-touch-device .app-shell.view-strategy .nav button {
  flex-direction: column;
  gap: 3px;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 50px;
  padding: 6px 2px 5px;
}

.is-touch-device .app-shell.view-strategy .nav-label {
  display: block;
  width: auto;
  max-width: 100%;
  opacity: 1;
  overflow: visible;
  color: inherit;
  font-size: 0;
  line-height: 1;
  transform: none;
}

.is-touch-device .app-shell.view-strategy .nav-label::after {
  content: attr(data-mobile-label);
  display: block;
  overflow: hidden;
  max-width: 100%;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Consumer stock-app polish pass: keep functionality, soften the product surface. */
[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-secondary: #eef2f6;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --field-bg: #ffffff;
  --surface: #f2f4f7;
  --surface-strong: #ffffff;
  --line: rgba(29, 33, 41, 0.10);
  --line-strong: rgba(50, 94, 177, 0.22);
  --text: #1d2129;
  --muted: #6b7280;
  --brand: #325eb1;
  --brand-strong: #264785;
  --accent: #325eb1;
  --accent-2: #0fc6c2;
  --positive: #00a429;
  --warning: #ff7d00;
  --danger: #f53f3f;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
  --body-bg: #f6f7f9;
  --body-grid: none;
  --body-scanline: transparent;
  --topbar-bg: rgba(246, 247, 249, 0.88);
  --sidebar-bg: #ffffff;
  --login-bg:
    radial-gradient(circle at 16% 12%, rgba(50, 94, 177, 0.10), transparent 28%),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f6 100%);
  --login-panel-bg: #ffffff;
}

body::before,
body::after {
  opacity: 0;
}

button {
  border-radius: 10px;
  background: linear-gradient(135deg, #325eb1, #4886ff);
  box-shadow: none;
}

button:hover {
  background: linear-gradient(135deg, #264785, #325eb1);
  box-shadow: 0 10px 22px rgba(50, 94, 177, 0.16);
}

button.secondary {
  background: var(--field-bg);
  border-color: var(--line);
  box-shadow: none;
}

input,
textarea,
select {
  border-radius: 10px;
  box-shadow: none;
}

.login-stripe {
  background: var(--login-bg);
}

.login-ribbon-field,
.login-particle-field,
.login-noise,
.login-stripe::before,
.login-stripe::after {
  opacity: 0.18;
}

.login-stage {
  gap: clamp(34px, 7vw, 92px);
}

.login-copy span,
.login-stripe .eyebrow {
  color: #325eb1;
  letter-spacing: 0.08em;
}

.login-copy h2 {
  max-width: 8em;
  color: #101827;
  font-size: clamp(42px, 6.8vw, 76px);
  font-weight: 760;
  line-height: 1.03;
}

.login-copy p {
  max-width: 420px;
  color: #475467;
  font-size: 17px;
  line-height: 1.75;
}

.login-stripe .login-panel {
  border-radius: 22px;
  border-color: rgba(29, 33, 41, 0.10);
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
}

.login-stripe .login-panel::before {
  display: none;
}

.login-stripe input {
  min-height: 46px;
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #1d2129;
}

.login-stripe button[type="submit"] {
  min-height: 46px;
  border-radius: 12px;
}

.app-shell {
  background: #f6f7f9;
}

[data-theme="light"] .sidebar {
  border-right-color: rgba(29, 33, 41, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.035);
}

[data-theme="light"] .topbar {
  border: 1px solid rgba(29, 33, 41, 0.08);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
  backdrop-filter: blur(18px);
}

[data-theme="light"] .nav button {
  color: #4b5563;
}

[data-theme="light"] .nav button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #15284b, #325eb1);
  box-shadow: 0 10px 22px rgba(50, 94, 177, 0.18);
}

[data-theme="light"] .content {
  background: #f6f7f9;
}

[data-theme="light"] .panel,
[data-theme="light"] .metric,
[data-theme="light"] .detail,
[data-theme="light"] .user-row,
[data-theme="light"] .pick-card,
[data-theme="light"] .review-decision-panel {
  border-color: rgba(29, 33, 41, 0.10);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.app-shell.view-strategy {
  --terminal-bg: #f6f7f9;
  --terminal-panel: #ffffff;
  --terminal-panel-strong: #ffffff;
  --terminal-line: rgba(29, 33, 41, 0.10);
  --terminal-line-soft: rgba(29, 33, 41, 0.075);
  --terminal-text: #1d2129;
  --terminal-muted: #6b7280;
  --terminal-green: #00a429;
  --terminal-blue: #325eb1;
  --terminal-yellow: #ff7d00;
  --terminal-red: #f53f3f;
  --terminal-cyan: #0fc6c2;
  --terminal-purple: #8b5cf6;
  background: #f6f7f9;
  color: var(--terminal-text);
}

.app-shell.view-strategy .content {
  background: #f6f7f9;
}

.app-shell.view-strategy .sidebar {
  background: rgba(255, 255, 255, 0.94);
  border-right-color: rgba(29, 33, 41, 0.08);
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.035);
}

.app-shell.view-strategy .topbar {
  border-color: rgba(29, 33, 41, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.terminal-command-center {
  gap: 12px;
  color: #1d2129;
}

.terminal-header,
.terminal-panel,
.terminal-target-panel,
.terminal-chart-panel,
.terminal-event-panel,
.terminal-log-panel,
.app-shell.view-strategy .command-alternatives {
  border: 1px solid rgba(29, 33, 41, 0.10);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.terminal-header::before,
.terminal-panel::before,
.terminal-target-panel::before,
.terminal-chart-panel::before,
.terminal-event-panel::before,
.terminal-log-panel::before {
  display: none;
}

.terminal-header {
  grid-template-columns: minmax(150px, 0.56fr) minmax(0, 1fr) auto minmax(170px, 0.72fr);
  min-height: 0;
  padding: 12px 14px;
}

.terminal-brand {
  color: #1d2129;
  font-size: 22px;
  font-weight: 760;
  letter-spacing: 0;
  text-shadow: none;
}

.terminal-header-status,
.terminal-header-right {
  gap: 6px;
}

.terminal-header-status span,
.terminal-header-right span {
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(29, 33, 41, 0.08);
  border-radius: 999px;
  color: #6b7280;
  background: #f7f9fc;
  font-family: var(--strategy-font);
  font-size: 11px;
}

.terminal-header-message {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.55;
}

.terminal-stage-switch {
  justify-content: center;
  gap: 14px;
}

.terminal-stage-switch button {
  position: relative;
  min-height: 32px;
  padding: 5px 2px 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6b7280;
  font-family: var(--strategy-font);
  font-size: 13px;
  font-weight: 650;
}

.terminal-stage-switch button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: transparent;
  transform: translateX(-50%);
}

.terminal-stage-switch button.active {
  color: #325eb1;
  background: transparent;
  box-shadow: none;
}

.terminal-stage-switch button.active::after {
  background: #325eb1;
}

.command-intel-grid {
  grid-template-columns: 0.92fr 1.08fr 0.88fr 1fr 0.9fr;
  gap: 10px;
}

.terminal-panel {
  min-height: 158px;
  padding: 12px;
}

.terminal-panel-head {
  margin-bottom: 9px;
}

.terminal-panel-head h3 {
  color: #1d2129;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: 0;
}

.terminal-panel-head span {
  color: #6b7280;
  font-family: var(--strategy-font);
  font-size: 11px;
}

.terminal-gauge {
  width: 146px;
  height: 90px;
  margin: 0 auto 6px;
}

.terminal-gauge strong {
  margin-top: 28px;
  color: #1d2129;
  font-size: 34px;
}

.terminal-gauge span {
  color: #ff7d00;
  font-size: 12px;
}

.terminal-gauge::after {
  width: 58px;
  background: #475467;
  box-shadow: none;
}

.terminal-gauge-arc {
  opacity: 0.86;
}

.terminal-micro-stats {
  border-top-color: rgba(29, 33, 41, 0.08);
}

.terminal-micro-stats div {
  border-right-color: rgba(29, 33, 41, 0.08);
}

.terminal-micro-stats span,
.terminal-micro-stats em,
.data-health-row,
.terminal-target-head-row,
.terminal-event-row,
.system-log-list p,
.terminal-chart-toolbar span,
.terminal-quote-strip,
.terminal-chart-plan,
.quick-command {
  color: #6b7280;
  font-family: var(--strategy-font);
}

.terminal-micro-stats strong,
.data-health-row em {
  color: #1d2129;
  font-family: var(--strategy-font);
}

.data-health-table {
  gap: 4px;
}

.data-health-row {
  grid-template-columns: minmax(70px, 1fr) 54px 44px 54px minmax(56px, 0.8fr);
  font-size: 11px;
}

.data-health-row.head,
.terminal-event-row.head {
  color: #667085;
  border-bottom-color: rgba(29, 33, 41, 0.08);
}

.data-health-row i {
  box-shadow: none;
}

.data-health-row b {
  height: 5px;
  background: #325eb1;
  box-shadow: none;
}

.funnel-stack {
  gap: 6px;
}

.funnel-step {
  min-height: 27px;
  border-color: rgba(50, 94, 177, 0.12);
  background: #eef4ff;
  color: #1d2129;
  clip-path: none;
  border-radius: 8px;
  font-family: var(--strategy-font);
}

.theme-heatmap {
  gap: 5px;
  min-height: 116px;
}

.theme-heatmap div {
  border-color: rgba(29, 33, 41, 0.07);
  border-radius: 8px;
  background: rgba(0, 164, 41, calc(var(--heat) / 260));
}

.theme-heatmap div.danger {
  background: rgba(245, 63, 63, calc(var(--heat) / 260));
}

.theme-heatmap strong {
  color: #1d2129;
  font-size: 12px;
}

.theme-heatmap span {
  color: #00a429;
  font-family: var(--strategy-font);
}

.theme-heatmap .danger span {
  color: #f53f3f;
}

.action-donut-wrap {
  grid-template-columns: 108px minmax(0, 1fr);
  min-height: 116px;
}

.action-donut {
  width: 104px;
  height: 104px;
  box-shadow: none;
}

.action-donut::before {
  inset: 25px;
  background: #ffffff;
}

.action-donut strong {
  color: #1d2129;
  font-size: 23px;
}

.action-legend {
  gap: 7px;
}

.command-ops-grid {
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.72fr) minmax(300px, 0.82fr);
  gap: 10px;
}

.terminal-target-panel,
.terminal-chart-panel,
.operation-console-panel {
  min-height: 478px;
}

.terminal-target-panel,
.terminal-chart-panel,
.terminal-event-panel,
.terminal-log-panel {
  padding: 12px;
}

.terminal-target-toolbar label,
.terminal-filter-button {
  height: 36px;
  border-color: rgba(29, 33, 41, 0.10);
  border-radius: 10px;
  background: #f7f9fc;
}

.terminal-target-toolbar input {
  color: #1d2129;
}

.terminal-target-list {
  gap: 4px;
  max-height: 338px;
}

.terminal-target-row {
  min-height: 56px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #1d2129;
  font-family: var(--strategy-font);
}

.terminal-target-row:hover,
.terminal-target-row.active {
  border-color: rgba(50, 94, 177, 0.22);
  background: #eef4ff;
  box-shadow: none;
}

.terminal-target-row.active {
  box-shadow: inset 3px 0 0 #325eb1;
}

.terminal-target-row > span {
  font-family: var(--strategy-font);
}

.terminal-target-row span:first-child strong {
  color: #1d2129;
  font-size: 14px;
  font-weight: 720;
}

.terminal-target-row span:first-child em {
  color: #8a94a6;
  font-size: 11px;
}

.signal-ring {
  width: 36px;
  height: 36px;
  background:
    radial-gradient(circle, #ffffff 55%, transparent 56%),
    conic-gradient(currentColor calc(var(--signal) * 1%), rgba(29, 33, 41, 0.08) 0);
  box-shadow: none;
  font-family: var(--strategy-font);
  font-size: 12px;
}

.terminal-status {
  border: 0;
  border-radius: 999px;
  background: #f2f4f7;
  font-family: var(--strategy-font);
}

.terminal-chart-toolbar {
  padding: 0 0 10px;
  border-bottom-color: rgba(29, 33, 41, 0.08);
}

.terminal-period-switch {
  border-color: rgba(29, 33, 41, 0.08);
  background: #f2f4f7;
}

.terminal-period-switch button.active,
.terminal-chart-toolbar .terminal-period-switch button.active {
  background: #ffffff;
  color: #325eb1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.terminal-quote-strip,
.terminal-chart-plan {
  padding: 6px 2px;
  font-size: 12px;
}

.terminal-quote-strip strong {
  color: #1d2129;
}

.terminal-chart-stage {
  border-color: rgba(29, 33, 41, 0.08);
  border-radius: 12px;
  background: #ffffff;
}

.command-chart-bg {
  fill: #ffffff;
}

.command-chart-grid line {
  stroke: rgba(60, 60, 67, 0.07);
}

.command-candles rect,
.command-candles line {
  opacity: 0.72;
}

.command-candles .down {
  color: #00a429;
}

.command-candles .up {
  color: #f53f3f;
}

.command-vwap-line {
  stroke: #ffb020;
  opacity: 0.72;
}

.command-chart-footer {
  border-top-color: rgba(29, 33, 41, 0.08);
  background: #ffffff;
}

.terminal-research-drawer {
  border-color: rgba(29, 33, 41, 0.08);
  border-radius: 12px;
  background: #f7f9fc;
}

.terminal-research-drawer summary {
  color: #1d2129;
  font-size: 13px;
}

.terminal-research-grid .command-research-block,
.terminal-execution-strip div,
.operation-metrics div,
.command-alt-list article {
  border-color: rgba(29, 33, 41, 0.08);
  border-radius: 10px;
  background: #ffffff;
}

.operation-console-panel {
  display: grid;
  align-content: start;
}

.operation-target-head {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
}

.signal-ring.big {
  width: 58px;
  height: 58px;
  font-size: 18px;
}

.operation-target-head h3 {
  color: #1d2129;
  font-size: 18px;
}

.operation-actions {
  gap: 7px;
}

.terminal-action,
.terminal-zero-actions button,
.terminal-inline-action {
  min-height: 38px;
  border-color: rgba(29, 33, 41, 0.10);
  border-radius: 10px;
  background: #ffffff;
  color: #1d2129;
  box-shadow: none;
  font-family: var(--strategy-font);
}

.terminal-action:hover,
.terminal-zero-actions button:hover,
.terminal-inline-action:hover {
  border-color: rgba(50, 94, 177, 0.24);
  background: #eef4ff;
  color: #264785;
  box-shadow: none;
}

.operation-actions .terminal-action:nth-child(2) {
  border-color: transparent;
  background: #325eb1;
  color: #ffffff;
}

.quick-command {
  border-top-color: rgba(29, 33, 41, 0.08);
}

.terminal-empty,
.terminal-chart-empty,
.operation-empty,
.terminal-zero-state,
.terminal-mini-empty,
.terminal-empty-action,
.terminal-event-empty {
  border-color: rgba(29, 33, 41, 0.08);
  border-radius: 12px;
  background: #f7f9fc;
  color: #6b7280;
}

.terminal-chart-empty {
  min-height: 300px;
}

.terminal-event-row {
  border-bottom-color: rgba(29, 33, 41, 0.08);
  font-family: var(--strategy-font);
}

.event-filter-tabs {
  gap: 6px;
}

.event-filter-tabs button {
  min-height: 30px;
  border-color: rgba(29, 33, 41, 0.08);
  border-radius: 999px;
  background: #f7f9fc;
  color: #6b7280;
  font-family: var(--strategy-font);
}

.event-filter-tabs button.active {
  border-color: rgba(50, 94, 177, 0.20);
  background: #eef4ff;
  color: #325eb1;
}

.system-log-list {
  gap: 7px;
}

.system-log-list p {
  font-size: 11px;
  line-height: 1.45;
}

.ai-fab {
  min-width: 68px;
  min-height: 44px;
  border-radius: 999px;
  background: #325eb1;
  box-shadow: 0 12px 26px rgba(50, 94, 177, 0.24);
}

.ai-assistant {
  border-color: rgba(29, 33, 41, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
}

.ai-head,
.ai-input {
  border-color: rgba(29, 33, 41, 0.08);
}

.track-modal {
  border-radius: 22px;
  border-color: rgba(29, 33, 41, 0.12);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.track-modal-summary div,
.track-modal-warning {
  border-color: rgba(29, 33, 41, 0.10);
  border-radius: 14px;
  background: #f7f9fc;
}

@media (max-width: 1180px) {
  .terminal-header {
    grid-template-columns: 1fr;
  }

  .command-intel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .app-shell.view-strategy .content,
  .is-touch-device .app-shell.view-strategy .content {
    padding: 8px;
    background: #f6f7f9;
  }

  .app-shell.view-strategy .topbar {
    margin-bottom: 8px;
    border-radius: 13px;
  }

  .terminal-command-center {
    gap: 8px;
  }

  .terminal-header {
    gap: 9px;
    padding: 10px;
  }

  .terminal-brand {
    font-size: 18px;
  }

  .terminal-header-status {
    display: none;
  }

  .terminal-stage-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
    border-radius: 999px;
    background: #eef2f6;
  }

  .terminal-stage-switch button {
    min-height: 32px;
    border-radius: 999px;
    padding: 0 8px;
  }

  .terminal-stage-switch button::after {
    display: none;
  }

  .terminal-stage-switch button.active {
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  }

  .terminal-header-right {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .command-intel-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  .command-intel-grid > .terminal-panel {
    flex: 0 0 78%;
    min-height: 146px;
    scroll-snap-align: start;
  }

  .terminal-panel,
  .terminal-target-panel,
  .terminal-chart-panel,
  .terminal-event-panel,
  .terminal-log-panel {
    padding: 9px;
    border-radius: 12px;
  }

  .terminal-panel-head h3 {
    font-size: 14px;
  }

  .terminal-target-panel,
  .terminal-chart-panel,
  .operation-console-panel {
    min-height: 0;
  }

  .terminal-target-row {
    grid-template-columns: minmax(0, 1fr) 42px 58px 56px;
    min-height: 52px;
    padding: 7px;
  }

  .terminal-target-row > span:nth-child(5) {
    display: none;
  }

  .signal-ring {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .terminal-chart-stage .command-kline-chart,
  .command-kline-chart,
  .terminal-chart-empty,
  .command-chart-empty {
    height: 250px;
    min-height: 250px;
  }

  .operation-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-action {
    justify-content: center;
    min-height: 36px;
    padding: 8px;
    font-size: 12px;
  }

  .terminal-event-row {
    grid-template-columns: 58px 68px minmax(0, 1fr);
    min-height: 32px;
    font-size: 11px;
  }

  .app-shell.view-strategy .sidebar,
  .is-touch-device .app-shell.view-strategy .sidebar {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }

  .app-shell.view-strategy .nav button,
  .is-touch-device .app-shell.view-strategy .nav button {
    border-radius: 14px;
  }

  .ai-fab {
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    min-width: 58px;
  }

  .ai-assistant,
  .is-touch-device .ai-assistant {
    border-radius: 22px 22px 0 0;
    background: rgba(255, 255, 255, 0.98);
  }
}

/* Final fit pass for the refreshed research desk. */
.data-health-panel {
  overflow: hidden;
}

.data-health-row {
  grid-template-columns: minmax(0, 1fr) 42px 38px 44px minmax(42px, 0.58fr);
  gap: 4px;
  min-height: 23px;
  padding: 2px 0;
  font-size: 10px;
}

.data-health-row.head {
  font-size: 10px;
}

.data-health-row span {
  min-width: 0;
}

.data-health-row span:first-child,
.data-health-row.head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-health-row span:nth-child(2) {
  gap: 3px;
}

.data-health-row span:nth-child(5) {
  display: grid;
  grid-template-columns: minmax(14px, 1fr) auto;
  align-items: center;
  gap: 4px;
}

.data-health-row b {
  width: min(var(--bar), 32px);
  max-width: 32px;
}

[data-theme="dark"] .app-shell.view-strategy {
  --terminal-bg: #111827;
  --terminal-panel: #1f242d;
  --terminal-panel-strong: #252b36;
  --terminal-line: rgba(255, 255, 255, 0.12);
  --terminal-line-soft: rgba(255, 255, 255, 0.08);
  --terminal-text: #f4f7fb;
  --terminal-muted: #aeb7c8;
  background: #111827;
  color: #f4f7fb;
}

[data-theme="dark"] .app-shell.view-strategy .content {
  background: #111827;
}

[data-theme="dark"] .app-shell.view-strategy .sidebar {
  border-right-color: rgba(255, 255, 255, 0.10);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 8px 0 28px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .app-shell.view-strategy .topbar,
[data-theme="dark"] .app-shell.view-strategy .terminal-header,
[data-theme="dark"] .app-shell.view-strategy .terminal-panel,
[data-theme="dark"] .app-shell.view-strategy .terminal-target-panel,
[data-theme="dark"] .app-shell.view-strategy .terminal-chart-panel,
[data-theme="dark"] .app-shell.view-strategy .terminal-event-panel,
[data-theme="dark"] .app-shell.view-strategy .terminal-log-panel,
[data-theme="dark"] .app-shell.view-strategy .command-alternatives,
[data-theme="dark"] .app-shell.view-strategy .ai-assistant {
  border-color: rgba(255, 255, 255, 0.12);
  background: #1f242d;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .app-shell.view-strategy .terminal-command-center,
[data-theme="dark"] .app-shell.view-strategy .terminal-brand,
[data-theme="dark"] .app-shell.view-strategy .terminal-panel-head h3,
[data-theme="dark"] .app-shell.view-strategy .terminal-gauge strong,
[data-theme="dark"] .app-shell.view-strategy .terminal-target-row,
[data-theme="dark"] .app-shell.view-strategy .terminal-target-row span:first-child strong,
[data-theme="dark"] .app-shell.view-strategy .terminal-quote-strip strong,
[data-theme="dark"] .app-shell.view-strategy .operation-target-head h3,
[data-theme="dark"] .app-shell.view-strategy .data-health-row em,
[data-theme="dark"] .app-shell.view-strategy .theme-heatmap strong {
  color: #f4f7fb;
}

[data-theme="dark"] .app-shell.view-strategy .terminal-header-message,
[data-theme="dark"] .app-shell.view-strategy .terminal-header-status span,
[data-theme="dark"] .app-shell.view-strategy .terminal-header-right span,
[data-theme="dark"] .app-shell.view-strategy .terminal-panel-head span,
[data-theme="dark"] .app-shell.view-strategy .terminal-micro-stats span,
[data-theme="dark"] .app-shell.view-strategy .data-health-row,
[data-theme="dark"] .app-shell.view-strategy .terminal-target-head-row,
[data-theme="dark"] .app-shell.view-strategy .terminal-event-row,
[data-theme="dark"] .app-shell.view-strategy .system-log-list p,
[data-theme="dark"] .app-shell.view-strategy .terminal-chart-toolbar span,
[data-theme="dark"] .app-shell.view-strategy .terminal-quote-strip,
[data-theme="dark"] .app-shell.view-strategy .terminal-chart-plan,
[data-theme="dark"] .app-shell.view-strategy .quick-command {
  color: #aeb7c8;
}

[data-theme="dark"] .app-shell.view-strategy .terminal-header-status span,
[data-theme="dark"] .app-shell.view-strategy .terminal-header-right span,
[data-theme="dark"] .app-shell.view-strategy .terminal-target-toolbar label,
[data-theme="dark"] .app-shell.view-strategy .terminal-filter-button,
[data-theme="dark"] .app-shell.view-strategy .terminal-period-switch,
[data-theme="dark"] .app-shell.view-strategy .terminal-research-drawer,
[data-theme="dark"] .app-shell.view-strategy .terminal-empty,
[data-theme="dark"] .app-shell.view-strategy .terminal-chart-empty,
[data-theme="dark"] .app-shell.view-strategy .operation-empty,
[data-theme="dark"] .app-shell.view-strategy .terminal-zero-state,
[data-theme="dark"] .app-shell.view-strategy .terminal-mini-empty,
[data-theme="dark"] .app-shell.view-strategy .terminal-empty-action,
[data-theme="dark"] .app-shell.view-strategy .terminal-event-empty,
[data-theme="dark"] .app-shell.view-strategy .track-modal-summary div,
[data-theme="dark"] .app-shell.view-strategy .track-modal-warning {
  border-color: rgba(255, 255, 255, 0.10);
  background: #252b36;
}

[data-theme="dark"] .app-shell.view-strategy .terminal-stage-switch button.active,
[data-theme="dark"] .app-shell.view-strategy .terminal-period-switch button.active,
[data-theme="dark"] .app-shell.view-strategy .terminal-chart-toolbar .terminal-period-switch button.active {
  background: #293143;
  color: #7db5ff;
}

[data-theme="dark"] .app-shell.view-strategy .terminal-action,
[data-theme="dark"] .app-shell.view-strategy .terminal-zero-actions button,
[data-theme="dark"] .app-shell.view-strategy .terminal-inline-action,
[data-theme="dark"] .app-shell.view-strategy .terminal-chart-stage,
[data-theme="dark"] .app-shell.view-strategy .terminal-chart-footer,
[data-theme="dark"] .app-shell.view-strategy .terminal-research-grid .command-research-block,
[data-theme="dark"] .app-shell.view-strategy .terminal-execution-strip div,
[data-theme="dark"] .app-shell.view-strategy .operation-metrics div,
[data-theme="dark"] .app-shell.view-strategy .command-alt-list article {
  border-color: rgba(255, 255, 255, 0.10);
  background: #252b36;
  color: #f4f7fb;
}

[data-theme="dark"] .app-shell.view-strategy .command-chart-bg,
[data-theme="dark"] .app-shell.view-strategy .action-donut::before {
  fill: #1f242d;
  background: #1f242d;
}

[data-theme="dark"] .app-shell.view-strategy .terminal-target-row:hover,
[data-theme="dark"] .app-shell.view-strategy .terminal-target-row.active,
[data-theme="dark"] .app-shell.view-strategy .event-filter-tabs button.active {
  border-color: rgba(77, 163, 255, 0.32);
  background: rgba(50, 94, 177, 0.22);
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .data-health-row {
    grid-template-columns: minmax(76px, 1fr) 44px 38px 44px minmax(42px, 0.6fr);
  }

  .data-health-row.head {
    display: none;
  }

  [data-theme="dark"] .app-shell.view-strategy .content,
  .is-touch-device[data-theme="dark"] .app-shell.view-strategy .content {
    background: #111827;
  }

  [data-theme="dark"] .app-shell.view-strategy .terminal-stage-switch {
    background: #252b36;
  }

  [data-theme="dark"] .app-shell.view-strategy .ai-assistant,
  .is-touch-device[data-theme="dark"] .ai-assistant {
    background: rgba(31, 36, 45, 0.98);
  }
}
