/* Full-site terminal language. Loaded after styles.css. Same IDs, new skin. */
html.shell {
  --bg: #050607;
  --bg-card: #08090b;
  --bg-elevated: #0b0d10;
  --bg-glass: #08090b;
  --border: #1c2128;
  --border-glow: transparent;
  --text: #c5cad1;
  --text-muted: #6b7280;
  --accent: #e8eaed;
  --accent-dim: #9aa3ad;
  --accent-glow: transparent;
  --accent-subtle: transparent;
  --cyan: #9aa3ad;
  --cyan-glow: transparent;
  --purple: #9aa3ad;
  --purple-glow: transparent;
  --orange: #9aa3ad;
  --orange-glow: transparent;
  --pink: #9aa3ad;
  --pink-glow: transparent;
  --amber: #9aa3ad;
  --amber-glow: transparent;
  --danger: #d97878;
  --danger-glow: transparent;
  --warning: #c4b07a;
  --radius: 0;
  --radius-sm: 0;
  --coin-btc: #9aa3ad;
  --coin-eth: #9aa3ad;
  --coin-sol-purple: #9aa3ad;
  --coin-sol-green: #9aa3ad;
  --coin-xrp: #9aa3ad;
  --coin-xrp-dark: #9aa3ad;
  --coin-doge: #9aa3ad;
  --coin-bnb: #9aa3ad;
  --coin-hype: #9aa3ad;
  height: 100%;
}

html.shell,
html.shell body {
  height: 100%;
  background: #050607 !important;
  background-image: none !important;
  color: #c5cad1;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
}

html.shell * { text-shadow: none !important; }
html.shell *:not(.buf-spin):not(.badge-dot):not(.claude-daemon-dot) {
  border-radius: 0 !important;
}

html.shell .app {
  height: 100%;
  min-height: 100%;
  max-width: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html.shell .header {
  flex: 0 0 32px;
  height: 32px;
  padding: 0 10px;
  background: #08090b;
  border-bottom: 1px solid #1c2128;
  box-shadow: none !important;
}
html.shell .logo { gap: 8px; }
html.shell .logo-icon { font-size: 12px; filter: none; color: #6b7280; }
html.shell .logo-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e8eaed;
}
html.shell .logo-sub {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b7280;
}
html.shell .user-email { font-size: 11px; font-family: inherit; color: #6b7280; }
html.shell .btn-ghost {
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.12rem 0.45rem;
  color: #9aa3ad;
}
html.shell .workspace-tabs {
  border-radius: 0 !important;
  border: 1px solid #1c2128;
  background: #0b0d10;
  box-shadow: none !important;
  padding: 1px;
}
html.shell .workspace-tab {
  min-width: 48px;
  border-radius: 0 !important;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: none !important;
}
html.shell .workspace-tab.is-active {
  background: #161a20;
  border-color: #2a313b;
  color: #e8eaed;
  box-shadow: none !important;
}

html.shell .main {
  flex: 1;
  min-height: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  overflow: hidden;
}
html.shell .section { padding: 0; height: 100%; }
html.shell .section-center {
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050607;
}
html.shell .card {
  background: #08090b;
  border: 1px solid #1c2128;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 1.1rem 1.15rem;
}
html.shell .card-title {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8b939e;
  margin-bottom: 0.85rem;
  font-weight: 600;
}
html.shell .btn-primary {
  border-radius: 0 !important;
  background: #c8cdd4;
  color: #050607;
  box-shadow: none !important;
  font-family: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
}
html.shell .btn-primary:hover { background: #e8eaed; box-shadow: none !important; }
html.shell .input {
  border-radius: 0 !important;
  background: #050607;
  border-color: #1c2128;
  font-size: 12px;
}
html.shell .link { color: #c5cad1; }

/* Home: full-viewport desk */
html.shell #section-home {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
html.shell .term-desk {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
  margin: 0 !important;
}
html.shell .term-top {
  flex: 0 0 48px;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: stretch;
  gap: 0 !important;
  border-bottom: 1px solid #1c2128;
  background: #08090b;
  min-height: 48px;
  height: 48px;
  overflow: visible;
}
html.shell .term-desk .wallet-column {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  width: auto;
  max-width: none;
  min-width: 0;
  height: 48px;
}
html.shell .wallet-dual,
html.shell .top-desk-row .wallet-dual {
  display: flex;
  flex-direction: row;
  height: 48px;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
}
html.shell .wallet-neo-demo,
html.shell .wallet-neo-real {
  border: 0 !important;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
  min-width: 0;
  flex: 1 1 auto;
}
html.shell .wallet-neo-inner {
  padding: 0 12px !important;
  gap: 12px !important;
  height: 48px !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start;
  background: transparent !important;
  border-radius: 0 !important;
  flex-wrap: nowrap;
  min-width: 0;
}
html.shell .wallet-neo-head {
  gap: 8px;
  margin: 0;
  flex: 0 0 auto;
}
html.shell .wallet-neo-mode,
html.shell .wallet-neo-badge {
  border-radius: 0 !important;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  background: transparent !important;
  border: 1px solid #1c2128 !important;
  color: #9aa3ad !important;
  white-space: nowrap;
}
html.shell .wallet-live-pulse {
  display: none !important;
}
html.shell .wallet-neo-real .wallet-live-pulse {
  display: inline-block !important;
  width: 6px;
  height: 6px;
  border-radius: 50% !important;
  background: #7dcea0;
  animation: term-live-pulse 1.6s ease-in-out infinite;
}
@keyframes term-live-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}
html.shell .wallet-neo-main {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}
html.shell .wallet-neo-stats-col {
  flex: 1 1 auto;
  min-width: 0;
}
html.shell .wallet-neo-stats {
  display: flex !important;
  gap: 22px !important;
  margin: 0 !important;
  align-items: center !important;
  flex-wrap: nowrap;
}
html.shell .wallet-neo-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 4.5rem;
}
html.shell .wallet-neo-stat-label {
  font-size: 9px !important;
  letter-spacing: 0.14em;
  color: #6b7280 !important;
  margin: 0 !important;
  line-height: 1.1;
  white-space: nowrap;
}
html.shell .wallet-neo-stat-val,
html.shell .wallet-neo-stat-val.demo-color,
html.shell .wallet-neo-stat-val.cash-color,
html.shell .wallet-neo-stat-val.real-color,
html.shell .wallet-neo-stat-val.sub {
  font-size: 16px !important;
  font-weight: 600;
  color: #e8eaed !important;
  line-height: 1.15;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
html.shell .wallet-neo-btn {
  border-radius: 0 !important;
  height: 26px;
  padding: 0 10px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent !important;
  border: 1px solid #2a313b !important;
  color: #9aa3ad !important;
  flex: 0 0 auto;
  white-space: nowrap;
}
html.shell .wallet-tf-switcher {
  width: auto;
  margin: 0;
  padding: 0 10px;
  border-left: 1px solid #1c2128;
  display: flex;
  align-items: center;
  height: 48px;
  flex: 0 0 auto;
}
html.shell .s3-switcher { margin: 0; gap: 0; }
html.shell .s3-tabs { gap: 0; }
html.shell .s3-tab,
html.shell .s3-arrow {
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: #6b7280 !important;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 0 8px;
  height: 24px;
  box-shadow: none !important;
}
html.shell .s3-tab.s3-active-5m,
html.shell .s3-tab.s3-active-15m,
html.shell .s3-tab.s3-active-1h,
html.shell .s3-tab.s3-active-4h,
html.shell .s3-tab.s3-active-1d {
  color: #e8eaed !important;
  background: #161a20 !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.shell .term-meta {
  margin-left: auto;
  padding-right: 10px;
  align-self: center;
  font-size: 10px;
  color: #6b7280;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Strategy instruments — the dashboard gauges */
html.shell .term-instruments {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #1c2128;
  background: #08090b;
}
html.shell .term-gauge-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid #1c2128;
  min-height: 56px;
}
html.shell .term-gauge {
  min-width: 0;
  padding: 8px 12px;
  border-right: 1px solid #1c2128;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
html.shell .term-gauge:last-child { border-right: 0; }
html.shell .term-gauge-k {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7280;
  white-space: nowrap;
}
html.shell .term-gauge-v,
html.shell .term-gauge .journal-metric-val {
  font-size: 15px !important;
  font-weight: 600;
  color: #e8eaed;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
html.shell .term-gauge .journal-metric-val.positive { color: #7dcea0 !important; }
html.shell .term-gauge .journal-metric-val.negative { color: #d97878 !important; }
html.shell .term-gauge .perf-sub,
html.shell .dash-gauge-row .perf-sub {
  display: none !important;
}
html.shell .term-gauge-bots {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 6px;
  margin: 0;
  border-bottom: 1px solid #1c2128;
  background: #08090b;
}
html.shell .term-gauge-bots:empty { display: none; }
html.shell .journal-mbot {
  border-radius: 0 !important;
  border: 1px solid #1c2128 !important;
  background: transparent !important;
  color: #8b939e;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none !important;
  height: 22px;
  padding: 0 8px;
  font-family: inherit;
  cursor: pointer;
}
html.shell .journal-mbot.is-on { background: #161a20 !important; color: #e8eaed; }
html.shell .term-coin-instruments {
  padding: 0;
}
html.shell .term-coin-instruments-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 10px 3px;
  border-bottom: 1px solid #14181e;
}
html.shell .term-coin-instruments-h .desk-title {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8b939e;
}
html.shell .term-stats-host,
html.shell .tf-stats-grid.term-stats-host {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 0 !important;
  background: #050607;
}
html.shell .inst-gauge,
html.shell .term-stats-host .stat-cell {
  appearance: none;
  -webkit-appearance: none;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 8px 10px !important;
  min-height: 64px;
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid #1c2128 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
html.shell .inst-gauge:last-child { border-right: 0 !important; }
html.shell .inst-gauge:hover { background: #0c0e12 !important; }
html.shell .inst-gauge-sym {
  font-size: 10px !important;
  letter-spacing: 0.14em;
  color: #8b939e !important;
  font-weight: 600;
}
html.shell .inst-gauge-pnl {
  font-size: 18px !important;
  font-weight: 600;
  line-height: 1.1;
  color: #e8eaed;
}
html.shell .inst-gauge-pnl.positive { color: #7dcea0 !important; }
html.shell .inst-gauge-pnl.negative { color: #d97878 !important; }
html.shell .inst-gauge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: 9px;
  color: #6b7280;
  letter-spacing: 0.04em;
}
html.shell .inst-gauge-meta b {
  color: #c5cad1;
  font-weight: 600;
}

/* Kill old table-only stats layout under shell */
html.shell .term-stats { display: none; }

@media (max-width: 980px) {
  html.shell .term-stats-host,
  html.shell .tf-stats-grid.term-stats-host {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  html.shell .term-gauge-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html.shell .term-gauge { min-height: 52px; }
}

/* Three columns fill remaining height */
html.shell .term-board {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  gap: 0 !important;
  border: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(0, 1.08fr);
}
html.shell .term-pane {
  border-radius: 0 !important;
  background: #050607 !important;
  border: 0 !important;
  border-right: 1px solid #1c2128 !important;
  box-shadow: none !important;
}
html.shell .term-pane:last-child { border-right: 0 !important; }
html.shell .term-pane-h {
  padding: 5px 8px 4px;
  background: #08090b;
  border-bottom: 1px solid #1c2128;
}
html.shell .term-pane-h .desk-title {
  color: #8b939e !important;
  font-size: 10px;
  letter-spacing: 0.16em;
}
html.shell .desk-select,
html.shell .desk-btn,
html.shell .btn-cancel-all,
html.shell .btn-cancel-all-confirm,
html.shell .btn-cancel-all-abort {
  border-radius: 0 !important;
  font-family: inherit;
  font-size: 10px;
  background: #08090b !important;
  border: 1px solid #1c2128 !important;
  color: #c5cad1;
  height: 22px;
  box-shadow: none !important;
}
html.shell .oo-chip {
  border-radius: 0 !important;
  background: transparent !important;
  border: 1px solid #1c2128;
  font-size: 9px;
  letter-spacing: 0.08em;
  box-shadow: none !important;
}
html.shell .term-blotter-head {
  background: #08090b;
  color: #6b7280;
}
html.shell .term-pane-body { padding: 0; }
html.shell .arb-reconcile-alert {
  color: #f0c4c4;
  background: #1a0e0e;
  border-color: #5a3030;
}
html.shell .positions-coin-toolbar {
  font-size: 10px;
  color: #6b7280;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid #1c2128;
}
html.shell .pos-asset-title {
  color: #8b939e !important;
  background: none !important;
  font-size: 10px !important;
  letter-spacing: 0.14em;
  padding: 4px 8px !important;
  border-bottom: 1px solid #14181e;
}
html.shell .pos-asset-name { font-family: inherit; color: inherit; }
html.shell .oo-board { font-size: 11px; }
html.shell .oo-strip {
  border-radius: 0 !important;
  background: transparent !important;
  border-bottom: 1px solid #14181e;
  box-shadow: none !important;
}
html.shell .desk-pill { border-radius: 0 !important; }
html.shell .desk-cancel,
html.shell .oo-keep-btn {
  border-radius: 0 !important;
  font-family: inherit;
  font-size: 10px;
}
html.shell .term-blotter .wallet-last-row:hover { background: #0c0e12; }

/* Bot rail */
html.shell #tf-blocks-container,
html.shell .term-bots {
  flex: 0 1 auto;
  max-height: 32vh;
  overflow: auto;
  border-top: 1px solid #1c2128;
  background: #08090b;
  padding: 0;
}
html.shell .tf-panel { padding: 0; }
html.shell .tf-block { margin: 0; }
html.shell .tf-block-header { display: none; }
html.shell .tf-bot-wide {
  display: block;
  padding: 0;
  margin: 0 !important;
}
html.shell .card-neo {
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
}
html.shell .card-neo-cyan,
html.shell .card-neo-amber,
html.shell .card-neo-pink,
html.shell .card-neo-purple {
  background: none !important;
}
html.shell .card-neo-inner {
  background: #08090b !important;
  border: 0 !important;
  box-shadow: none !important;
}
html.shell .card-neo-head {
  padding: 5px 10px;
  border-bottom: 1px solid #1c2128;
}
html.shell .hedge-title,
html.shell .card-neo-head .hedge-title,
html.shell .card-neo-pink .hedge-title.claude-title,
html.shell .card-neo-amber .hedge-title.arb-title,
html.shell .card-neo-purple .hedge-title,
html.shell .claude-term .hedge-title.claude-title {
  letter-spacing: 0.14em;
  font-size: 11px;
  color: #e8eaed !important;
}
html.shell .card-neo-body { padding: 8px 10px; }
html.shell .card-neo-footer {
  padding: 5px 10px;
  border-top: 1px solid #1c2128;
  background: #050607;
}
html.shell .btn-neo-run,
html.shell .btn-neo-edit,
html.shell .btn-neo-run-cyan,
html.shell .btn-neo-run-pink,
html.shell .btn-neo-run-amber,
html.shell .btn-neo-run-purple,
html.shell .btn-neo-run-cyan.running,
html.shell .btn-neo-run-pink.running,
html.shell .btn-neo-run-amber.running,
html.shell .btn-neo-run-purple.running {
  border-radius: 0 !important;
  font-family: inherit;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: none !important;
  background: transparent !important;
  border: 1px solid #2a313b !important;
  color: #c5cad1 !important;
}
html.shell .btn-neo-run.running,
html.shell .btn-neo-run-cyan.running,
html.shell .btn-neo-run-pink.running,
html.shell .btn-neo-run-amber.running,
html.shell .btn-neo-run-purple.running {
  border-color: #c5cad1 !important;
  color: #e8eaed !important;
}
html.shell .bot-switch-pills {
  background: transparent;
  border: 1px solid #1c2128;
  box-shadow: none !important;
  padding: 0;
  gap: 0;
}
html.shell .bot-switch-pill {
  border-radius: 0 !important;
  color: #6b7280;
  box-shadow: none !important;
  background: transparent !important;
}
html.shell .bot-switch-pill.is-active,
html.shell .bot-switch-pill.is-active[data-bot-tab="hedge_45_45"],
html.shell .bot-switch-pill.is-active[data-bot-tab="last_90s_90"],
html.shell .bot-switch-pill.is-active[data-bot-tab="dynamic_arb"],
html.shell .bot-switch-pill.is-active[data-bot-tab="claude_advisor"] {
  color: #e8eaed !important;
  background: #161a20 !important;
  box-shadow: none !important;
}
html.shell .card-neo-badge {
  border-radius: 0 !important;
  background: transparent !important;
  border: 1px solid #1c2128 !important;
  color: #8b939e !important;
}
html.shell .badge-running { color: #e8eaed !important; border-color: #3a424c !important; }
html.shell .neo-val-input {
  background: #050607 !important;
  border: 1px solid #1c2128 !important;
  color: #e8eaed;
  font-family: inherit;
  border-radius: 0 !important;
}
html.shell .hedge-block-label,
html.shell .hedge-ticket-side-label { color: #6b7280; letter-spacing: 0.1em; text-transform: uppercase; font-size: 9px; }
html.shell .hedge-win-btn {
  border-radius: 0 !important;
  background: transparent !important;
  border: 1px solid #1c2128 !important;
  color: #9aa3ad;
  font-family: inherit;
}

/* Stats live in .term-instruments (gauges). Don't flatten that grid. */
html.shell .tf-data-row.card,
html.shell .card-web3 { display: none !important; }
html.shell .stat-cell .pnl.positive { color: #7dcea0 !important; }
html.shell .stat-cell .pnl.negative { color: #d97878 !important; }

html.shell .term-bot-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 6px 10px;
  border-bottom: 1px solid #1c2128;
  font-size: 11px;
  color: #8b939e;
}
html.shell .term-bot-metrics b { color: #e8eaed; font-weight: 600; }
html.shell .claude-hud-mesh,
html.shell .claude-mesh,
html.shell .claude-rails { display: none !important; }
html.shell .claude-spark-wrap { display: none !important; }
html.shell .claude-daemon {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #6b7280;
  text-transform: uppercase;
}
html.shell .claude-daemon-dot {
  width: 6px;
  height: 6px;
  background: #6b7280;
  display: inline-block;
  margin-right: 6px;
}

html.shell .modal-content {
  border-radius: 0 !important;
  background: #08090b;
  border: 1px solid #1c2128;
  box-shadow: none !important;
}
html.shell .buf-spin {
  border-color: #1c2128;
  border-top-color: #c5cad1;
  border-radius: 50% !important;
}

@media (max-width: 980px) {
  html.shell .app { overflow: auto; height: auto; }
  html.shell .main { overflow: visible; }
  html.shell .term-board {
    grid-template-columns: 1fr;
    height: auto !important;
  }
  html.shell .term-pane {
    height: 42vh;
    border-right: 0 !important;
    border-bottom: 1px solid #1c2128 !important;
  }
  html.shell #tf-blocks-container,
  html.shell .term-bots { max-height: none; }
  html.shell .term-top { flex-wrap: wrap; height: auto; }
}

/* ── Dense quant dash (Maker Terminal feeling, real bot data) ── */
html.shell .term-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 0;
  padding: 0 12px;
  height: 48px;
  flex: 0 0 auto;
  border-left: 1px solid #1c2128;
}
html.shell .term-clock,
html.shell .term-ping {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #8b939e;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html.shell .term-ping.is-fast { color: #7dcea0; }
html.shell .term-ping.is-slow { color: #d97878; }
html.shell .term-ping.is-flash {
  animation: term-ping-flash 0.45s ease;
}
@keyframes term-ping-flash {
  0% { color: #e8eaed; }
  100% { color: inherit; }
}
html.shell .term-meta { margin-left: 0; padding-right: 0; }

html.shell .term-tape {
  flex: 0 0 30px;
  display: block;
  overflow: hidden;
  padding: 0;
  border-bottom: 1px solid #1c2128;
  background: #050607;
  position: relative;
}
html.shell .term-tape-track {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  white-space: nowrap;
  animation: term-tape-scroll 28s linear infinite;
  will-change: transform;
}
html.shell .term-tape:hover .term-tape-track { animation-play-state: paused; }
@keyframes term-tape-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
html.shell .term-tape-empty {
  display: inline-block;
  padding: 6px 10px;
  color: #6b7280;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
html.shell .tape-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid #1c2128;
  font-size: 10px;
  color: #c5cad1;
  flex: 0 0 auto;
}
html.shell .tape-chip .tape-side { font-weight: 600; letter-spacing: 0.06em; }
html.shell .tape-chip .tape-side.is-up { color: #7dcea0; }
html.shell .tape-chip .tape-side.is-dn { color: #d97878; }
html.shell .tape-chip .tape-pnl.positive { color: #7dcea0; }
html.shell .tape-chip .tape-pnl.negative { color: #d97878; }

html.shell .term-dash {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: minmax(140px, 1.15fr) minmax(72px, 0.55fr) minmax(160px, 1.25fr) minmax(88px, 0.7fr);
  grid-template-areas:
    "pnl hits hits"
    "pipe pipe pipe"
    "pos dir work"
    "inst inst inst";
  gap: 0;
  border: 0;
  overflow: hidden;
}
html.shell .dash-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #050607;
  border-right: 1px solid #1c2128;
  border-bottom: 1px solid #1c2128;
  overflow: hidden;
}
html.shell .dash-pnl { grid-area: pnl; }
html.shell .dash-hits { grid-area: hits; border-right: 0; }
html.shell .dash-pipe { grid-area: pipe; border-right: 0; }
html.shell .dash-pos { grid-area: pos; }
html.shell .dash-dir { grid-area: dir; }
html.shell .dash-work { grid-area: work; border-right: 0; }
html.shell .dash-inst { grid-area: inst; border-right: 0; border-bottom: 0; }

html.shell .dash-cell-h,
html.shell .dash-cell .term-pane-h {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 5px 8px 4px;
  background: #08090b;
  border-bottom: 1px solid #1c2128;
}
html.shell .dash-cell-h .desk-title,
html.shell .dash-cell .desk-title {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8b939e !important;
}
html.shell .dash-cell .term-pane-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

html.shell .dash-pnl-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.4fr);
  gap: 0;
  border-bottom: 1px solid #1c2128;
}
html.shell .dash-pnl-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
  border-right: 1px solid #1c2128;
}
html.shell .dash-pnl-big {
  font-size: clamp(22px, 3.2vh, 36px);
  font-weight: 600;
  line-height: 1.05;
  color: #e8eaed;
  font-variant-numeric: tabular-nums;
}
html.shell .dash-pnl-big.is-pos { color: #7dcea0; }
html.shell .dash-pnl-big.is-neg { color: #d97878; }
html.shell .dash-pnl-sub {
  margin-top: 6px;
  font-size: 10px;
  color: #6b7280;
  letter-spacing: 0.04em;
  line-height: 1.35;
}
html.shell .dash-equity {
  width: 100%;
  height: 100%;
  min-height: 72px;
  display: block;
  background: #050607;
}
html.shell .dash-equity path.eq-area { fill: rgba(125, 206, 160, 0.12); }
html.shell .dash-equity path.eq-line { fill: none; stroke: #7dcea0; stroke-width: 1.5; }
html.shell .dash-equity path.eq-area.is-neg { fill: rgba(217, 120, 120, 0.12); }
html.shell .dash-equity path.eq-line.is-neg { stroke: #d97878; }
html.shell .dash-gauge-row {
  flex: 0 0 auto;
  min-height: 56px;
  border-bottom: 0;
}
html.shell .dash-gauge-row .term-gauge-v,
html.shell .dash-gauge-row .journal-metric-val { font-size: 15px !important; }

html.shell .dash-pipe-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 0;
}
html.shell .pipe-col {
  padding: 8px 10px;
  border-right: 1px solid #1c2128;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
html.shell .pipe-col:last-child { border-right: 0; }
html.shell .pipe-k {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7280;
}
html.shell .pipe-v {
  font-size: 12px;
  color: #e8eaed;
  line-height: 1.35;
  word-break: break-word;
}
html.shell .dash-pipe-mesh {
  flex: 0 0 36px;
  width: 100%;
  height: 36px;
  display: block;
  border-top: 1px solid #14181e;
  background: #08090b;
}
html.shell .dash-pipe-mesh .mesh-l {
  stroke: #3a424c;
  stroke-width: 1;
  fill: none;
  opacity: 0.55;
  stroke-dasharray: 4 6;
  animation: term-mesh-flow 2.4s linear infinite;
}
html.shell .dash-pipe-mesh .mesh-n {
  fill: #c5cad1;
  animation: term-mesh-node 1.8s ease-in-out infinite;
}
html.shell .dash-pipe-mesh .mesh-n:nth-child(odd) { animation-delay: 0.3s; }
@keyframes term-mesh-flow {
  from { stroke-dashoffset: 0; opacity: 0.35; }
  50% { opacity: 0.9; }
  to { stroke-dashoffset: -40; opacity: 0.35; }
}
@keyframes term-mesh-node {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
html.shell .dash-equity path.eq-line {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: term-eq-draw 1.1s ease forwards;
}
@keyframes term-eq-draw {
  to { stroke-dashoffset: 0; }
}
html.shell .dash-dir-bar::before,
html.shell .dash-dir-bar::after,
html.shell .dash-book-fill {
  transition: width 0.45s ease;
}

html.shell .dash-dir-rows {
  padding: 8px 10px;
  border-bottom: 1px solid #1c2128;
}
html.shell .dash-dir-row {
  display: grid;
  grid-template-columns: 6.5rem 2rem 1fr;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  padding: 3px 0;
}
html.shell .dash-dir-lab { letter-spacing: 0.08em; color: #8b939e; font-weight: 600; }
html.shell .dash-dir-row.is-up .dash-dir-lab { color: #7dcea0; }
html.shell .dash-dir-row.is-dn .dash-dir-lab { color: #d97878; }
html.shell .dash-dir-bar {
  margin-top: 8px;
  height: 6px;
  background: #1c2128;
  position: relative;
}
html.shell .dash-dir-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--up, 50) * 1%);
  background: #7dcea0;
}
html.shell .dash-dir-bar::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: calc((100 - var(--up, 50)) * 1%);
  background: #d97878;
}
html.shell .dash-book { padding: 0 0 8px; flex: 1; min-height: 0; }
html.shell .dash-book-readout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  padding: 6px 10px;
  font-size: 11px;
  color: #8b939e;
}
html.shell .dash-book-readout b { color: #e8eaed; font-weight: 600; }
html.shell .dash-book-track {
  position: relative;
  height: 10px;
  margin: 4px 10px 6px;
  background: #14181e;
  border: 1px solid #1c2128;
}
html.shell .dash-book-fill {
  height: 100%;
  width: 50%;
  background: #3a424c;
  max-width: 100%;
}
html.shell .dash-book-fill.is-edge { background: #7dcea0; }
html.shell .dash-book-fill.is-tax { background: #d97878; }
html.shell .dash-book-mark {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 1px;
  background: #e8eaed;
}
html.shell .dash-book-note { display: none !important; }

html.shell .dash-inst .term-stats-host {
  flex: 1;
  min-height: 0;
}
html.shell .dash-inst .inst-gauge { min-height: 56px; padding: 6px 8px !important; }
html.shell .dash-inst .inst-gauge-pnl { font-size: 15px !important; }

html.shell #tf-blocks-container,
html.shell .term-bots {
  max-height: 18vh !important;
}

@media (max-width: 1100px) {
  html.shell .term-dash {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "pnl hits"
      "pipe pipe"
      "pos work"
      "dir dir"
      "inst inst";
    overflow: auto;
  }
  html.shell .dash-cell { min-height: 160px; }
  html.shell .dash-pipe { min-height: 100px; }
  html.shell .dash-inst { min-height: 120px; }
}

