/* QUANT STRATEGY MONITOR — MIDNIGHT NAVY + LIVING MOTION */
:root {
  --bg-top: #0b1120;
  --bg-mid: #0d1426;
  --bg-bottom: #0f172a;
  --surface-frame: rgba(15, 23, 42, 0.78);
  --surface-card: rgba(15, 23, 42, 0.86);
  --surface-inset: rgba(9, 15, 29, 0.84);
  --surface-row-alt: rgba(30, 41, 59, 0.28);
  --surface-hover: rgba(34, 197, 94, 0.08);
  --border: #1e293b;
  --border-strong: #29384f;
  --border-emerald: rgba(34, 197, 94, 0.56);
  --border-cyan: rgba(56, 189, 248, 0.45);
  --border-amber: rgba(251, 191, 36, 0.45);
  --border-red: rgba(239, 68, 68, 0.52);

  --white: #f8fafc;
  --text-main: #e2e8f0;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --emerald: #22c55e;
  --emerald-bright: #4ade80;
  --emerald-bg: rgba(34, 197, 94, 0.13);
  --emerald-glow: rgba(34, 197, 94, 0.30);

  --cyan: #38bdf8;
  --cyan-bright: #7dd3fc;
  --cyan-bg: rgba(56, 189, 248, 0.13);

  --amber: #fbbf24;
  --amber-bright: #fcd34d;
  --amber-bg: rgba(251, 191, 36, 0.13);

  --violet: #a78bfa;
  --violet-bright: #c4b5fd;
  --violet-bg: rgba(167, 139, 250, 0.14);

  --red: #ef4444;
  --red-bright: #f87171;
  --red-bg: rgba(239, 68, 68, 0.15);

  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 11px;
  --radius-sm: 7px;

  --font-sans: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bottom) 100%);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Fixed Ambient Background */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.grid-veil {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(148, 163, 184, 0.09) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.65;
}
.glow {
  position: absolute;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  filter: blur(110px);
}
.glow-emerald {
  top: -260px;
  left: -180px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.14), transparent 68%);
}
.glow-cyan {
  top: -220px;
  right: -180px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12), transparent 68%);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.pos { color: var(--emerald-bright); }
.neg { color: var(--red-bright); }
.neu { color: var(--text-soft); }

/* App Shell */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 3200px;
  margin: 0 auto;
  padding: 16px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Top Command Bar */
.topbar {
  background: var(--surface-frame);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

.brand-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-badge {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: radial-gradient(circle at center, rgba(34, 197, 94, 0.25), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(34, 197, 94, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.2);
}
.brand-pulse-ring {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(74, 222, 128, 0.65);
  animation: pulseRing 2.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.brand-core {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 12px var(--emerald-bright);
}
@keyframes pulseRing {
  0% { transform: scale(0.65); opacity: 0.9; }
  100% { transform: scale(1.45); opacity: 0; }
}

.brand-copy { min-width: 0; }
.brand-copy h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}

/* Market Ticker Ribbon */
.market-ribbon {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(9, 15, 29, 0.85);
  border: 1px solid var(--border);
  font-size: 12.5px;
  white-space: nowrap;
}
.ticker-chip.ticker-gold {
  border-color: rgba(251, 191, 36, 0.38);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.08), rgba(9, 15, 29, 0.88));
}
.ticker-sym {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.ticker-chip.ticker-gold .ticker-sym { color: var(--amber); }
.ticker-price {
  color: var(--white);
  font-weight: 700;
  font-size: 13.5px;
}
.ticker-chg {
  font-weight: 700;
  font-size: 12.5px;
}

/* Topbar Right Controls */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mode-switch {
  display: inline-flex;
  background: rgba(9, 15, 29, 0.88);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.mode-btn svg { width: 14px; height: 14px; }
.mode-btn:hover { color: var(--white); }
.mode-btn.active {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--emerald-bright);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.14);
}
#btnModeQuad.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--cyan-bright);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.16);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(9, 15, 29, 0.9);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 8px var(--emerald-bright);
  animation: blinkLive 1.8s ease-in-out infinite;
}
.live-pill.offline .live-dot {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}
.live-label { color: var(--emerald-bright); letter-spacing: 0.04em; font-size: 11px; }
.live-sep { color: var(--text-dim); }
@keyframes blinkLive {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.return-capsule, .capsule-section {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--emerald-bg);
  border: 1px solid var(--border-emerald);
  color: var(--emerald-bright);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.12);
}
.return-capsule.neg-capsule, .capsule-section.neg-capsule {
  background: var(--red-bg);
  border-color: var(--border-red);
  color: var(--red-bright);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.12);
}
.capsule-section {
  padding: 9px 18px;
  border-radius: 13px;
  font-size: 15px;
}

.icon-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: rgba(9, 15, 29, 0.85);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover {
  border-color: var(--border-emerald);
  color: var(--emerald-bright);
  background: rgba(34, 197, 94, 0.09);
}
.icon-btn.active {
  border-color: var(--border-emerald);
  color: var(--emerald-bright);
  background: var(--emerald-bg);
}
.icon-btn.spinning svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Global Hero KPI Strip */
.global-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 15px 18px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 2px;
  border-radius: 2px;
  opacity: 0.75;
}
.kpi-card.kpi-white::before { background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.35), transparent); }
.kpi-card.kpi-emerald::before { background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.75), transparent); }
.kpi-card.kpi-cyan::before { background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.75), transparent); }
.kpi-card.kpi-amber::before { background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.75), transparent); }

.kpi-card.compact {
  background: rgba(11, 18, 34, 0.85);
  padding: 13px 16px;
}
.kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.kpi-value {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-card.compact .kpi-value { font-size: 26px; }
.kpi-card.kpi-emerald .kpi-value { color: var(--emerald-bright); }
.kpi-card.kpi-emerald .kpi-value.neg { color: var(--red-bright); }
.kpi-card.kpi-cyan .kpi-value { color: var(--cyan); }
.kpi-card.kpi-amber .kpi-value { color: var(--amber); }

.kpi-sub {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rolling Odometer Digits */
.odo-wrap {
  display: inline-flex;
  align-items: baseline;
  vertical-align: bottom;
}
.odo-char {
  display: inline-block;
  position: relative;
  overflow: hidden;
  height: 1.18em;
  line-height: 1.18em;
}
.odo-reel {
  display: flex;
  flex-direction: column;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.odo-digit {
  height: 1.18em;
  line-height: 1.18em;
  text-align: center;
}

/* Workspace Layout: 2-Column on Wide Desktop */
.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 365px;
  gap: 14px;
  align-items: start;
}

.primary-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Channel Selector Deck */
.channel-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.channel-card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 15px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.channel-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  background: rgba(17, 26, 48, 0.92);
}
.channel-card.active {
  border-color: var(--border-emerald);
  background: linear-gradient(180deg, rgba(16, 36, 39, 0.72), rgba(13, 21, 39, 0.94));
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25), 0 10px 28px rgba(34, 197, 94, 0.11);
}

.ch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ch-card-ident {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ch-code {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: var(--cyan-bg);
  color: var(--cyan-bright);
  border: 1px solid rgba(56, 189, 248, 0.3);
  flex-shrink: 0;
}
.ch-card-name {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-card-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.ch-ext-mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  text-decoration: none;
  transition: all 0.15s ease;
}
.ch-ext-mini:hover {
  background: rgba(56, 189, 248, 0.22);
  color: var(--white);
}

.hb-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  color: var(--emerald-bright);
  border: 1px solid rgba(34, 197, 94, 0.3);
  white-space: nowrap;
}
.hb-pill.warn {
  background: var(--amber-bg);
  color: var(--amber-bright);
  border-color: rgba(251, 191, 36, 0.32);
}
.hb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.ch-card-mid {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.ch-equity {
  font-size: 21px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}
.ch-ret-pill {
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  background: var(--emerald-bg);
  color: var(--emerald-bright);
  border: 1px solid rgba(34, 197, 94, 0.34);
  white-space: nowrap;
}
.ch-ret-pill.neg {
  background: var(--red-bg);
  color: var(--red-bright);
  border-color: rgba(239, 68, 68, 0.38);
}

.spark-canvas {
  width: 100%;
  height: 44px;
  display: block;
}

.ch-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  padding-top: 2px;
}
.ch-card-foot .cyan-val { color: var(--cyan-bright); font-weight: 700; }
.ch-card-foot .amber-val { color: var(--amber); font-weight: 700; }

/* Report & Curve Frames */
.report-frame {
  background: var(--surface-frame);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(12px);
}

.frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.frame-title-block { min-width: 0; }
.frame-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.frame-title-row h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
}
.frame-subtitle {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ext-banner-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 6px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan-bright);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.16s ease;
}
.ext-banner-pill:hover {
  background: rgba(56, 189, 248, 0.18);
  color: var(--white);
}
.ext-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.22);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}

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

/* Report Split (Ledger + Attribution/Highlights) */
.report-split {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.92fr);
  gap: 14px;
  align-items: stretch;
}

.panel-inset {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ledger-slot {
  position: relative;
  min-width: 0;
  min-height: 480px;
}
.ledger-panel {
  position: absolute;
  inset: 0;
  min-height: 0;
  overflow: hidden;
}
.ledger-panel .tab-bar,
.ledger-panel .ledger-toolbar,
.ledger-panel .ledger-footer {
  flex-shrink: 0;
}

.tab-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.tab-btn:hover { color: var(--white); background: rgba(30, 41, 59, 0.45); }
.tab-btn.active {
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--emerald-bright);
}
.tab-count {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-soft);
}
.tab-btn.active .tab-count {
  background: rgba(34, 197, 94, 0.22);
  color: var(--emerald-bright);
}

.ledger-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 220px;
  min-width: 150px;
}
.search-box.compact { flex: 1 1 130px; min-width: 110px; }
.search-box svg {
  position: absolute;
  left: 10px;
  width: 13px;
  height: 13px;
  color: var(--text-dim);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px 6px 30px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.16s ease;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box input:focus { border-color: var(--border-emerald); }

.ledger-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.ledger-body {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  border-radius: 8px;
}
.ledger-body::-webkit-scrollbar,
.closed-cards-list::-webkit-scrollbar,
.wall-tab-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.ledger-body::-webkit-scrollbar-thumb,
.closed-cards-list::-webkit-scrollbar-thumb,
.wall-tab-body::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 6px;
}

/* Ledger Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0b1222;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 11.5px;
  text-align: left;
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table thead th.num, .data-table tbody td.num { text-align: right; }
.data-table tbody td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.55);
  white-space: nowrap;
  color: var(--text-soft);
}
.data-table tbody td:first-child { color: var(--text-dim); }
.data-table tbody td.sym-cell {
  font-weight: 700;
  color: var(--white);
}
.data-table tbody td.pos {
  color: var(--emerald-bright);
  font-weight: 700;
}
.data-table tbody td.neg {
  color: var(--red-bright);
  font-weight: 700;
}
.data-table tbody td.neu {
  color: var(--text-soft);
}
.data-table tbody td.reason-cell {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}
.data-table tbody tr:nth-child(even) { background: var(--surface-row-alt); }
.data-table tbody tr:hover { background: var(--surface-hover); }
.star-mark {
  color: var(--amber);
  margin-left: 3px;
  font-size: 11px;
}
.lev-tag {
  margin-left: 5px;
  font-size: 10.5px;
  color: var(--text-dim);
  font-weight: 600;
}
.side-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.side-pill.long {
  background: var(--emerald-bg);
  color: var(--emerald-bright);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.side-pill.short {
  background: var(--red-bg);
  color: var(--red-bright);
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.reason-cell {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

/* SL->TP Progress Bar in Open Positions */
.sltp-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 145px;
}
.sltp-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.65);
  overflow: hidden;
}
.sltp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #4ade80);
}
.sltp-fill.neg { background: linear-gradient(90deg, #ef4444, #f87171); }
.sltp-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-dim);
}

/* Radar Grid (Tab 4) */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.radar-tile {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.radar-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.radar-sym-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.radar-sym { font-weight: 800; color: var(--white); font-size: 13.5px; }
.radar-pill {
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--cyan-bg);
  color: var(--cyan-bright);
}
.radar-tf { font-size: 11px; color: var(--text-dim); }
.radar-right { text-align: right; }
.radar-status {
  display: inline-block;
  font-size: 11px;
  color: var(--emerald-bright);
  font-weight: 600;
}

/* Event Feed (Tab 5) */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.event-item {
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.event-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-main);
}
.event-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.event-dot.emerald { background: var(--emerald-bright); box-shadow: 0 0 6px var(--emerald-bright); }
.event-dot.red { background: var(--red-bright); box-shadow: 0 0 6px var(--red-bright); }
.event-dot.amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.event-meta {
  padding-left: 15px;
  font-size: 11px;
  color: var(--text-dim);
}

.empty-state {
  padding: 46px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

.ledger-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(30, 41, 59, 0.7);
  font-size: 11.5px;
  color: var(--text-dim);
}

/* Right Analytics Stack */
.analytics-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}
.panel-hint {
  font-size: 11.5px;
  color: var(--text-dim);
}

.attr-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.attr-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.attr-row.is-empty {
  opacity: 0.42;
}
.attr-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}
.attr-swatch {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.attr-name {
  color: var(--text-main);
  font-weight: 600;
}
.attr-cnt {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 11.5px;
  margin-left: 5px;
}
.attr-val {
  font-weight: 800;
  font-size: 12.5px;
  white-space: nowrap;
}
.attr-val.emerald { color: var(--emerald-bright); }
.attr-val.cyan { color: var(--cyan-bright); }
.attr-val.red { color: var(--red-bright); }

.attr-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.78);
  overflow: hidden;
}
.attr-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.attr-fill.emerald { background: linear-gradient(90deg, #16a34a, #4ade80); }
.attr-fill.cyan { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.attr-fill.red { background: linear-gradient(90deg, #dc2626, #f87171); }

/* Top Winners & Highlights */
.top-winners-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.winner-tile {
  background: rgba(16, 36, 32, 0.45);
  border: 1px solid rgba(34, 197, 94, 0.36);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.winner-sym {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.winner-pnl {
  margin-top: 3px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--emerald-bright);
}

.highlights-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.highlights-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.45;
}
.hl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.hl-dot.emerald { background: var(--emerald-bright); }
.hl-dot.cyan { background: var(--cyan); }
.hl-dot.amber { background: var(--amber); }
.hl-dot.red { background: var(--red-bright); }

/* Equity Curve Canvas Section */
.curve-canvas-wrap {
  position: relative;
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 12px 8px;
}
.equity-canvas {
  width: 100%;
  height: 380px;
  display: block;
}
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: rgba(9, 15, 29, 0.96);
  border: 1px solid var(--border-emerald);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 12px;
  color: var(--text-main);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.chart-tooltip .tt-time { color: var(--text-muted); font-size: 11px; margin-bottom: 3px; }
.chart-tooltip .tt-eq { font-size: 14px; font-weight: 800; color: var(--white); }
.chart-tooltip .tt-ret { font-size: 11.5px; font-weight: 700; margin-top: 2px; }

.frame-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
  font-size: 12px;
  color: var(--text-dim);
}

/* Right CLOSED Unified Sidebar */
.closed-column-panel {
  background: var(--surface-frame);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 15px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
}
.closed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.closed-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.closed-badge {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
}
.closed-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--white);
}
.count-pill {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--cyan-bg);
  border: 1px solid rgba(56, 189, 248, 0.34);
  color: var(--cyan-bright);
  font-size: 11.5px;
  font-weight: 700;
}

.closed-filter-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.closed-filter-pills::-webkit-scrollbar { display: none; }
.cf-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(9, 15, 29, 0.78);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.cf-pill:hover { color: var(--white); border-color: var(--border-strong); }
.cf-pill.active {
  background: var(--emerald-bg);
  border-color: var(--border-emerald);
  color: var(--emerald-bright);
}

.closed-filter-row2 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.outcome-toggle {
  display: inline-flex;
  background: rgba(9, 15, 29, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}
.outcome-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.outcome-btn.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--cyan-bright);
}

.closed-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 2px 2px 4px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.7);
}

.closed-cards-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
}

.closed-card {
  position: relative;
  flex-shrink: 0;
  background: rgba(9, 15, 29, 0.88);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.closed-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}
.closed-card.win { border-color: rgba(34, 197, 94, 0.34); }
.closed-card.win::before { background: linear-gradient(90deg, #16a34a, #4ade80, #16a34a); }
.closed-card.loss { border-color: rgba(239, 68, 68, 0.36); }
.closed-card.loss::before { background: linear-gradient(90deg, #dc2626, #f87171, #dc2626); }

.cc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}
.cc-ch-pill {
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 10.5px;
  border: 1px solid transparent;
}
.cc-ch-pill.emerald { background: var(--emerald-bg); color: var(--emerald-bright); border-color: rgba(34,197,94,0.34); }
.cc-ch-pill.cyan { background: var(--cyan-bg); color: var(--cyan-bright); border-color: rgba(56,189,248,0.34); }
.cc-ch-pill.amber { background: var(--amber-bg); color: var(--amber-bright); border-color: rgba(251,191,36,0.34); }
.cc-ch-pill.violet { background: var(--violet-bg); color: var(--violet-bright); border-color: rgba(167,139,250,0.36); }
.cc-time { color: var(--text-dim); }

.cc-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.cc-sym-group {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.cc-sym {
  font-size: 16px;
  font-weight: 800;
  color: var(--white);
}
.cc-reason {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 145px;
}

.cc-pnl-box {
  border-radius: 9px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.closed-card.win .cc-pnl-box {
  background: rgba(34, 197, 94, 0.09);
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.closed-card.loss .cc-pnl-box {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.26);
}
.cc-pnl-label {
  font-size: 11px;
  color: var(--text-muted);
}
.cc-pnl-val {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
}
.cc-pnl-right {
  text-align: right;
  font-size: 12px;
}
.cc-r { font-weight: 700; }
.cc-hold { color: var(--text-dim); margin-top: 2px; font-size: 11.5px; }

.cc-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.cc-mini-box {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(30, 41, 59, 0.85);
  border-radius: 7px;
  padding: 6px 8px;
}
.cc-mini-label {
  font-size: 10.5px;
  color: var(--text-dim);
}
.cc-mini-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.closed-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(30, 41, 59, 0.75);
  font-size: 11px;
  color: var(--text-dim);
}
.closed-paging-btns { display: flex; gap: 5px; }
.mini-btn {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.88);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.mini-btn.primary {
  background: var(--cyan-bg);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--cyan-bright);
}
.mini-btn:hover { filter: brightness(1.15); }

/* ================= QUAD WALL MODE (四策略全屏) ================= */
.app-shell.wall-mode {
  height: 100vh;
  overflow: hidden;
  padding: 12px 16px 14px;
  gap: 12px;
}
.app-shell.wall-mode .topbar {
  padding: 9px 16px;
  flex-shrink: 0;
  gap: 10px;
}
@media (min-width: 1720px) {
  .app-shell.wall-mode .topbar {
    flex-wrap: nowrap;
  }
}
.app-shell.wall-mode .global-kpi-strip {
  flex-shrink: 0;
  gap: 12px;
}
.app-shell.wall-mode .global-kpi-strip .kpi-card {
  padding: 14px 18px;
}
.app-shell.wall-mode .global-kpi-strip .kpi-value {
  font-size: clamp(24px, 1.75vw, 31px);
}
.app-shell.wall-mode .workspace-layout {
  flex: 1 1 0;
  min-height: 0;
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) clamp(330px, 20.5vw, 395px);
  gap: 12px;
}
.app-shell.wall-mode .closed-column-panel {
  position: static;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.quad-wall-stage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-items: stretch;
}
.quad-wall-stage[hidden] { display: none; }

.wall-col {
  background: var(--surface-frame);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.wall-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
}
.wall-col-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.wall-col-title h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wall-ext-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--cyan-bright);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
}
.wall-ext-bar:hover { background: rgba(56, 189, 248, 0.16); color: var(--white); }

.wall-eq-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}
.wall-eq-left { min-width: 0; flex: 1 1 auto; }
.wall-eq-label { font-size: 12px; color: var(--text-muted); }
.wall-eq-val {
  font-size: clamp(20px, 1.48vw, 27px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.16;
  white-space: nowrap;
  margin-top: 2px;
}
.wall-eq-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wall-ret-box {
  padding: 6px 11px;
  border-radius: 10px;
  background: var(--emerald-bg);
  border: 1px solid var(--border-emerald);
  color: var(--emerald-bright);
  text-align: right;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.wall-ret-box.neg {
  background: var(--red-bg);
  border-color: var(--border-red);
  color: var(--red-bright);
}
.wall-ret-sub { font-size: 11.5px; font-weight: 600; opacity: 0.92; margin-top: 1px; }

.wall-mini-kpis {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.94fr) minmax(0, 0.86fr);
  gap: 6px;
  flex-shrink: 0;
}
.wall-mini-kpi {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 8px;
  min-width: 0;
}
.wall-mk-label { font-size: 11px; color: var(--text-dim); }
.wall-mk-val { font-size: clamp(12px, 0.72vw, 13.8px); letter-spacing: -0.025em; font-weight: 800; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wall-mk-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wall-chart-box {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 6px 6px 4px;
  flex-shrink: 0;
}
.wall-canvas {
  width: 100%;
  height: clamp(150px, 19.5vh, 212px);
  display: block;
}

.wall-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
}
.wall-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.wall-tab-btn {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(9, 15, 29, 0.72);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.wall-tab-btn.active {
  background: var(--emerald-bg);
  border-color: var(--border-emerald);
  color: var(--emerald-bright);
}
.wall-tabs-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.wall-tab-body {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 8px 10px;
  flex: 1 1 0;
  min-height: 82px;
  overflow-y: auto;
  font-size: 13px;
}
.wall-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.55);
}
.wall-list-row:last-child { border-bottom: none; }

.wall-winners {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  flex-shrink: 0;
}
.wall-winner-tile {
  background: rgba(16, 36, 32, 0.45);
  border: 1px solid rgba(34, 197, 94, 0.34);
  border-radius: 9px;
  padding: 8px 6px;
  text-align: center;
}
.wall-winner-tile .winner-sym { font-size: 11.5px; }
.wall-winner-tile .winner-pnl { font-size: 14px; margin-top: 2px; }

.wall-highlights {
  list-style: none;
  margin: 0;
  padding: 2px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.wall-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.42;
}
.wall-highlights .hl-dot {
  width: 6px;
  height: 6px;
  margin-top: 6px;
}

/* Responsive Breakpoints */
@media (max-width: 1380px) {
  .app-shell.wall-mode {
    height: auto;
    overflow: visible;
  }
  .workspace-layout,
  .app-shell.wall-mode .workspace-layout {
    grid-template-columns: 1fr;
    flex: none;
  }
  .quad-wall-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
  }
  .wall-col { height: auto; }
  .wall-tab-body { flex: none; min-height: 150px; max-height: 220px; }
  .closed-column-panel,
  .app-shell.wall-mode .closed-column-panel {
    position: static;
    height: auto;
    max-height: none;
  }
  .closed-cards-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 540px;
  }
}
@media (max-width: 1120px) {
  .global-kpi-strip,
  .channel-deck,
  .channel-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-split { grid-template-columns: 1fr; }
  .ledger-slot { min-height: 0; }
  .ledger-panel { position: static; min-height: 440px; }
  .ledger-body { flex: 0 1 auto; max-height: 440px; }
}
@media (max-width: 720px) {
  .app-shell { padding: 12px 12px 24px; }
  .global-kpi-strip,
  .channel-deck,
  .channel-kpi-grid,
  .quad-wall-stage,
  .closed-cards-list {
    grid-template-columns: 1fr;
  }
  .kpi-value { font-size: 23px; }
  .equity-canvas { height: 290px; }
  .radar-grid { grid-template-columns: 1fr; }
}
