:root {
  color-scheme: dark;
  --bg: #0b070d;
  --surface: #140f18;
  --surface-2: #1d1422;
  --sidebar-bg: #09060c;
  --active-bg: #27132a;
  --active-text: #f7d8ff;
  --table-head: #100b15;
  --hover-bg: #211128;
  --kbd-bg: #120d18;
  --tag-bg: #170f1d;
  --positive-bg: #09271f;
  --positive-border: #19a876;
  --negative-bg: #2d0b13;
  --negative-border: #ca315a;
  --warning-bg: #2b1f0a;
  --warning-border: #bf8b21;
  --text: #f5edf6;
  --muted: #bdaec4;
  --faint: #7e6d86;
  --border: #3b2842;
  --border-soft: #2a1c31;
  --blue: #54d7ff;
  --green: #41ffb4;
  --red: #ff386d;
  --amber: #ffd166;
  --magenta: #ff35a7;
  --violet: #8f5cff;
  --chart-grid: rgba(84, 215, 255, 0.13);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.45), 0 0 36px rgba(255, 53, 167, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060408;
  --surface: #110c16;
  --surface-2: #1a1020;
  --sidebar-bg: #08050b;
  --active-bg: #2a1230;
  --active-text: #ffe1fa;
  --table-head: #0d0911;
  --hover-bg: #24102b;
  --kbd-bg: #120c17;
  --tag-bg: #170d1e;
  --positive-bg: #062820;
  --positive-border: #27d596;
  --negative-bg: #330915;
  --negative-border: #ff386d;
  --warning-bg: #302207;
  --warning-border: #ffd166;
  --text: #fff4fb;
  --muted: #cbb7d2;
  --faint: #86718f;
  --border: #44294b;
  --border-soft: #2d1b34;
  --blue: #54d7ff;
  --green: #41ffb4;
  --red: #ff386d;
  --amber: #ffd166;
  --magenta: #ff35a7;
  --violet: #9b6cff;
  --chart-grid: rgba(84, 215, 255, 0.15);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.55), 0 0 42px rgba(255, 53, 167, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 22% 0%, rgba(255, 53, 167, 0.12), transparent 28%),
    radial-gradient(circle at 85% 8%, rgba(84, 215, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #120913 0%, var(--bg) 34%, #050307 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.035) 0, rgba(255,255,255,.035) 1px, transparent 1px, transparent 4px),
    linear-gradient(90deg, transparent, rgba(84, 215, 255, .035), transparent);
  mix-blend-mode: screen;
  opacity: .32;
  animation: scan-drift 7s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  background:
    conic-gradient(from 120deg at 50% 50%, transparent 0 18%, rgba(65, 255, 180, .055) 21%, transparent 24% 58%, rgba(255, 53, 167, .045) 62%, transparent 66% 100%),
    radial-gradient(circle at var(--ghost-x, 18%) var(--ghost-y, 26%), rgba(84, 215, 255, .11), transparent 19%),
    radial-gradient(circle at 82% 78%, rgba(255, 53, 167, .09), transparent 22%);
  filter: blur(10px);
  opacity: .56;
  animation: signal-haunt 18s ease-in-out infinite alternate;
}

@keyframes scan-drift {
  0% { transform: translateY(0); }
  100% { transform: translateY(8px); }
}

@keyframes signal-haunt {
  0% { transform: translate3d(-1.5%, -1%, 0) rotate(-1deg); --ghost-x: 18%; --ghost-y: 26%; }
  45% { transform: translate3d(1%, .5%, 0) rotate(.8deg); --ghost-x: 52%; --ghost-y: 18%; }
  100% { transform: translate3d(1.8%, -1.5%, 0) rotate(1.4deg); --ghost-x: 78%; --ghost-y: 42%; }
}

@keyframes phosphor-pulse {
  0%, 100% { opacity: .9; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.22); }
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  position: relative;
  z-index: 1;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 53, 167, .05), transparent 34%),
    var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 860;
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(255, 53, 167, .32);
}

.brand span:last-child {
  display: grid;
  gap: 2px;
}

.brand small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .12em;
}

.brand-mark {
  width: 34px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--green);
  background:
    linear-gradient(135deg, rgba(255, 53, 167, .22), rgba(84, 215, 255, .12)),
    #09040d;
  border: 1px solid rgba(255, 53, 167, .55);
  font-weight: 800;
  font-size: 12px;
  box-shadow: inset 0 0 12px rgba(65, 255, 180, .12), 0 0 18px rgba(255, 53, 167, .22);
}

.nav,
.watchlists,
.sidebar-footer {
  display: grid;
  gap: 4px;
}

.nav-item,
.watchlists button,
.sidebar-footer button,
.sidebar-footer span {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  min-height: 36px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 14px;
  text-decoration: none;
}

.nav-item small {
  color: var(--faint);
  font-size: 11px;
}

.nav-item.active,
.nav-item:hover,
.watchlists button:hover,
.sidebar-footer button:hover {
  background: var(--active-bg);
  color: var(--active-text);
  box-shadow: inset 2px 0 0 var(--magenta), 0 0 16px rgba(255, 53, 167, .09);
}

.watchlists {
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}

.watchlists p {
  margin: 0 10px 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}

.broadcast-clock {
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.025) 0, rgba(255,255,255,.025) 1px, transparent 1px, transparent 4px),
    var(--table-head);
  padding: 10px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
}

.broadcast-clock strong {
  color: var(--text);
  font-size: 15px;
  letter-spacing: .12em;
}

.broadcast-clock em {
  color: var(--green);
  font-style: normal;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.sidebar-actions .search-trigger {
  width: 100%;
  min-height: 34px;
  background: #0b0710;
}

.sidebar-actions .primary-action,
.sidebar-actions .theme-toggle {
  justify-content: center;
}

.workspace {
  padding: 8px 12px 28px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topbar {
  order: 0;
  min-height: 0;
  display: none;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(84, 215, 255, .18);
}

.topbar p,
.panel-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-trigger {
  width: min(430px, 34vw);
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px 0 13px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
}

kbd {
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  color: var(--muted);
  background: var(--kbd-bg);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 12px;
}

.primary-action,
.theme-toggle,
.ghost,
.segmented button,
.tabs button,
select,
dialog button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 7px;
  min-height: 34px;
  padding: 0 11px;
  color: var(--text);
  font-size: 13px;
}

.primary-action {
  background: linear-gradient(135deg, var(--magenta), #7d2cff);
  border-color: rgba(255, 53, 167, .74);
  color: #fff7fb;
  box-shadow: 0 0 18px rgba(255, 53, 167, .22);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.theme-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--blue);
}

.ghost {
  color: var(--blue);
  border-color: transparent;
  background: transparent;
  padding: 0 2px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-height: 28px;
}

.inline-link,
.asset-cell,
.news-item button,
.event-row button,
.command-result button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.inline-link {
  color: var(--blue);
  font-weight: 650;
}

.tabs {
  order: 1;
  margin-top: 0;
  display: none;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  white-space: nowrap;
}

.tabs button.selected {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.metric-strip {
  order: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
  margin: 0;
}

.metric-strip article,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.metric-strip article::before,
.panel::before,
.overlay-section::before,
.overlay-card::before,
.command-feature-card::before {
  content: "REC";
  position: absolute;
  top: 8px;
  right: 9px;
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  opacity: .42;
  pointer-events: none;
}

.metric-strip article {
  padding: 9px 12px 7px;
  display: grid;
  gap: 4px;
  min-height: 72px;
}

.metric-strip span {
  color: var(--muted);
  font-size: 12px;
}

.metric-strip strong {
  font-size: 18px;
  color: var(--green);
  text-shadow: 0 0 13px rgba(65, 255, 180, .2);
}

.metric-strip em,
.delta,
.tag {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.sparkline {
  width: 100%;
  height: 28px;
  align-self: end;
}

.gauge {
  position: relative;
  width: 100%;
  height: 28px;
  align-self: end;
  border-bottom: 7px solid var(--border-soft);
  border-radius: 0 0 80px 80px;
  overflow: hidden;
}

.gauge::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 7px;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
}

.gauge span {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 38px;
  transform-origin: bottom center;
  background: var(--text);
}

.positive {
  color: var(--green) !important;
}

.negative {
  color: var(--red) !important;
}

.warning {
  color: var(--amber) !important;
}

.terminal-grid {
  order: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(330px, 0.84fr);
  gap: 8px;
  align-items: start;
}

.market-grid,
.lower-tables {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.market-grid {
  order: 30;
}

.lower-tables {
  order: 31;
}

.view-panel {
  order: 32;
}

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

.lower-tables {
  grid-template-columns: 1.25fr 0.9fr 0.9fr 0.9fr;
}

.command-center {
  margin-top: 0;
  order: 20;
}

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

.command-feature-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--table-head);
  color: var(--text);
  padding: 12px;
  min-height: 118px;
  display: grid;
  gap: 10px;
  align-content: start;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.command-feature-card:hover,
.sector-row:hover,
.funding-row:hover,
.prediction-row:hover,
.intelligence-row:hover {
  border-color: var(--blue);
  background: var(--hover-bg);
}

.command-feature-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.command-feature-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.ops-grid {
  border-top: 1px solid var(--border-soft);
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 0.9fr 1.2fr 1.1fr;
  gap: 12px;
}

.ops-panel {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  min-width: 0;
}

.mini-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.mini-heading h3 {
  margin: 0;
  font-size: 13px;
}

.mini-heading span {
  color: var(--muted);
  font-size: 12px;
}

.sector-board,
.funding-board,
.prediction-board,
.intelligence-board,
.prediction-modal-list {
  display: grid;
  gap: 8px;
}

.sector-row,
.funding-row,
.prediction-row,
.intelligence-row,
.prediction-modal-row {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--table-head);
  color: var(--text);
  padding: 9px;
  text-align: left;
}

.sector-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  align-items: center;
}

.sector-row div {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 999px;
  background: var(--border-soft);
  overflow: hidden;
}

.sector-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.sector-row span,
.funding-row span,
.prediction-row strong,
.intelligence-row strong,
.prediction-modal-row strong {
  font-size: 12px;
}

.funding-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 9px;
}

.funding-row em,
.intelligence-row em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.prediction-row,
.prediction-modal-row {
  display: grid;
  gap: 7px;
}

.prediction-row span,
.prediction-modal-row span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

.prediction-row b,
.prediction-modal-row b {
  color: var(--text);
  font-weight: 700;
}

.prediction-row em,
.prediction-modal-row em {
  font-style: normal;
}

.intelligence-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.panel {
  min-width: 0;
}

.panel-heading {
  padding: 10px 12px 9px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.panel-heading h2 {
  font-size: 15px;
  line-height: 1.2;
}

.panel-heading.tight {
  padding: 10px 12px 9px;
}

.segmented {
  display: flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
}

.segmented button {
  border: 0;
  background: transparent;
  min-height: 28px;
  padding: 0 9px;
  color: var(--muted);
}

.segmented button.selected {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.chart-wrap {
  position: relative;
  padding: 8px 10px 10px;
  min-height: 456px;
}

.tradingview-widget-container {
  width: 100%;
  height: 456px !important;
  min-height: 456px;
}

.tradingview-widget-container__widget {
  width: 100%;
  height: 100% !important;
}

.tradingview-widget-container iframe {
  width: 100% !important;
  height: 100% !important;
  border-radius: 6px;
}

.tradingview-widget-container.is-hidden {
  display: none;
}

#marketChart {
  width: 100%;
  height: 320px;
  display: none;
}

#marketChart.is-visible {
  display: block;
}

.chart-intel {
  border-top: 1px solid var(--border-soft);
  padding: 8px 10px 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.chart-intel article {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 53, 167, .045), transparent 54%),
    var(--table-head);
  padding: 11px;
  min-height: 64px;
  box-shadow: inset 0 0 18px rgba(84, 215, 255, .035);
}

.ai-tape-panel {
  min-height: 594px;
}

.ai-tape-body {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.rec-light {
  color: var(--red);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-shadow: 0 0 12px rgba(255, 56, 109, .55);
}

.direction-card {
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(65, 255, 180, .08), transparent 60%),
    var(--table-head);
  padding: 13px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.direction-card span {
  grid-column: 1 / -1;
  color: var(--blue);
  font-size: 11px;
  letter-spacing: .08em;
}

.direction-card strong {
  font-size: 26px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.direction-card b {
  align-self: end;
  font-size: 30px;
  color: var(--text);
  font-weight: 500;
}

.probability-map {
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--table-head);
  padding: 11px;
  display: grid;
  gap: 10px;
}

.audit-strip {
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 53, 167, .12), transparent 58%),
    var(--table-head);
  padding: 9px 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
}

.audit-strip span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.audit-strip strong {
  justify-self: end;
  font-size: 12px;
  text-transform: uppercase;
}

.audit-strip em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.audit-strip.positive {
  border-color: rgba(65, 255, 180, .34);
}

.audit-strip.warning {
  border-color: rgba(255, 207, 92, .38);
}

.audit-strip.negative {
  border-color: rgba(255, 119, 105, .48);
}

.probability-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
}

.probability-row span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.probability-row strong {
  font-size: 12px;
}

.probability-row i {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 999px;
  background: #1a141d;
  overflow: hidden;
}

.probability-row em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}

.key-level-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ai-insight.compact {
  font-size: 12px;
}

.panel-footer-button {
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  min-height: 34px;
  padding: 0 12px;
  background: var(--table-head);
  color: var(--text);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
}

.broadcast-grid {
  order: 4;
  display: grid;
  grid-template-columns: minmax(240px, .82fr) minmax(280px, 1fr) minmax(280px, .95fr) minmax(240px, .72fr);
  gap: 8px;
}

.setup-scanner,
.broadcast-grid .news-table,
.broadcast-grid .event-list {
  display: grid;
}

.scanner-row {
  border: 0;
  border-top: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text);
  min-height: 34px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 1fr 44px 58px 64px;
  gap: 8px;
  align-items: center;
  text-align: left;
  font-size: 12px;
}

.scanner-row:first-child {
  border-top: 0;
  background: rgba(65, 255, 180, .08);
}

.scanner-row em,
.scanner-row b {
  font-style: normal;
  font-size: 11px;
}

.broadcast-grid .panel-footer-button {
  margin: 10px 12px 12px;
  width: calc(100% - 24px);
}

.broadcast-grid table {
  font-size: 12px;
}

.broadcast-grid th,
.broadcast-grid td {
  padding: 8px 10px;
}

.chart-intel .ta-broadcast-card {
  border-color: rgba(255, 53, 167, .55);
}

.chart-intel strong,
.section-head h3,
.overlay-section h3 {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.chart-intel span,
.section-head p {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: var(--table-head);
}

tr:hover td {
  background: var(--hover-bg);
}

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

.asset-cell div {
  display: grid;
  gap: 2px;
}

.asset-cell div span,
.event-row span,
.news-item span,
.command-result span,
.view-card span {
  color: var(--muted);
  font-size: 12px;
}

.coin-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
  background: #26364f;
  overflow: hidden;
}

.coin-dot img {
  width: 100%;
  height: 100%;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  border: 1px solid var(--border-soft);
  background: var(--tag-bg);
  text-transform: capitalize;
  box-shadow: inset 0 0 12px rgba(255,255,255,.025);
}

.tag.positive {
  border-color: var(--positive-border);
  background: var(--positive-bg);
}

.tag.negative {
  border-color: var(--negative-border);
  background: var(--negative-bg);
}

.tag.warning {
  border-color: var(--warning-border);
  background: var(--warning-bg);
}

.news-table,
.event-list {
  display: grid;
}

.news-item,
.event-row {
  padding: 10px 14px;
  border-top: 1px solid var(--border-soft);
}

.news-item:first-child,
.event-row:first-child {
  border-top: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
}

.news-item button,
.event-row button {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.news-item button:hover,
.event-row button:hover,
.asset-cell:hover strong,
.command-result button:hover {
  color: var(--blue);
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.event-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.view-panel {
  margin-top: 14px;
  padding: 16px;
}

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

.view-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px;
  background: var(--table-head);
}

.view-card strong {
  display: block;
  font-size: 13px;
}

.view-card span {
  display: block;
  margin-top: 6px;
  line-height: 1.4;
}

dialog {
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0;
  width: min(680px, calc(100vw - 28px));
  background: var(--surface);
  color: var(--text);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.detail-overlay {
  width: min(1080px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: hidden;
}

.detail-overlay::backdrop {
  background: rgba(8, 13, 22, 0.58);
  backdrop-filter: blur(5px);
}

.overlay-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(820px, calc(100vh - 32px));
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--table-head);
}

.overlay-brand {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.overlay-header h2 {
  font-size: 22px;
  line-height: 1.15;
}

.overlay-header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.overlay-body {
  padding: 18px 20px 22px;
  overflow: auto;
}

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

.overlay-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 13px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.overlay-card strong {
  display: block;
  font-size: 13px;
}

.overlay-card span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.overlay-loading {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--table-head);
  color: var(--muted);
  padding: 18px;
}

.overlay-pro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  gap: 14px;
  align-items: start;
}

.overlay-section {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(84, 215, 255, .035), transparent 40%),
    var(--surface);
  padding: 14px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.overlay-chart-card,
.ai-panel {
  grid-column: span 1;
}

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

.analysis-chart {
  width: 100%;
  height: 390px;
  display: block;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.025) 1px, transparent 1px, transparent 5px),
    var(--table-head);
  box-shadow: inset 0 0 34px rgba(65, 255, 180, .035);
}

.chart-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chart-caption span {
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--table-head);
  color: var(--muted);
  font-size: 11px;
  padding: 5px 7px;
}

.signal-stack,
.signal-list,
.insight-list,
.mini-metrics {
  display: grid;
  gap: 10px;
}

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

.setup-grid {
  display: grid;
  gap: 9px;
}

.setup-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--table-head);
  min-height: 72px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.setup-card strong,
.setup-card span {
  display: block;
}

.setup-card strong {
  font-size: 12px;
}

.setup-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.setup-card b {
  font-size: 20px;
  line-height: 1;
  text-shadow: 0 0 14px currentColor;
}

.setup-card i {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: var(--border-soft);
  overflow: hidden;
}

.setup-card em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--magenta), var(--blue), var(--green));
}

.signal-row {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--table-head);
  min-height: 58px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.signal-row strong,
.calendar-preview-item strong,
.calendar-agenda strong {
  display: block;
  font-size: 13px;
}

.signal-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.signal-row em,
.calendar-preview-item em,
.calendar-agenda em {
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}

.ai-insight {
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  background: var(--table-head);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 11px;
}

.calendar-preview {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calendar-preview-item,
.calendar-agenda button {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--table-head);
  color: var(--text);
  padding: 11px;
  text-align: left;
}

.calendar-preview-item span,
.calendar-agenda span {
  color: var(--muted);
  font-size: 11px;
}

.calendar-open {
  margin: 0 14px 14px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 14px;
  align-items: start;
}

.calendar-months {
  display: grid;
  gap: 14px;
}

.calendar-month {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
  padding: 11px;
}

.calendar-weekdays,
.calendar-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays {
  margin-bottom: 6px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.calendar-day {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--table-head);
  min-height: 86px;
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.calendar-day strong {
  font-size: 12px;
}

.calendar-day button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  text-align: left;
  font-size: 11px;
  line-height: 1.25;
}

.calendar-day.has-event {
  border-color: var(--blue);
}

.muted-day {
  opacity: .45;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--amber);
}

.dot.positive {
  background: var(--green);
}

.dot.negative {
  background: var(--red);
}

.calendar-agenda {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
}

.command-dialog form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.command-dialog input,
.alert-form input,
.alert-form select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  min-height: 38px;
  padding: 0 11px;
  background: var(--surface);
  color: var(--text);
}

.command-results {
  max-height: 420px;
  overflow: auto;
}

.command-result {
  padding: 12px 14px;
  border-top: 1px solid var(--border-soft);
}

.command-result:first-child {
  border-top: 0;
}

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

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

.alert-form menu {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 1280px) {
  .terminal-grid,
  .market-grid,
  .lower-tables,
  .overlay-pro-grid,
  .calendar-layout,
  .ops-grid,
  .broadcast-grid {
    grid-template-columns: 1fr;
  }

  .chart-intel,
  .command-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .watchlists {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .watchlists p {
    grid-column: 1 / -1;
  }

  .sidebar-footer {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 10px 12px 8px;
    gap: 8px;
  }

  .brand {
    font-size: 14px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .broadcast-clock {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 3px 10px;
    padding: 8px 9px;
    font-size: 9px;
  }

  .broadcast-clock strong {
    font-size: 12px;
    text-align: right;
  }

  .broadcast-clock em {
    grid-column: 1 / -1;
  }

  .sidebar-actions {
    grid-template-columns: .75fr 1.15fr .9fr;
    gap: 6px;
  }

  .sidebar-actions .search-trigger,
  .sidebar-actions .primary-action,
  .sidebar-actions .theme-toggle {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 9px;
    gap: 10px;
    font-size: 12px;
  }

  .watchlists,
  .sidebar-footer {
    display: none;
  }

  .workspace {
    padding: 8px 10px 20px;
    gap: 7px;
  }

  .metric-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 2px;
  }

  .metric-strip article {
    flex: 0 0 204px;
    scroll-snap-align: start;
  }

  .view-grid,
  .overlay-grid,
  .mini-metrics,
  .calendar-preview,
  .chart-intel,
  .command-feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overlay-header {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-chart {
    height: 270px;
  }

  .calendar-weekdays {
    display: none;
  }

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

  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    overflow-x: auto;
  }

  .nav {
    grid-template-columns: 1fr 1fr;
  }

  .watchlists {
    grid-template-columns: 1fr 1fr;
  }

  h1 {
    font-size: 21px;
  }

  .tradingview-widget-container {
    height: 330px !important;
    min-height: 330px;
  }

  .chart-wrap {
    min-height: 330px;
  }

  #marketChart {
    height: 330px;
  }

  .chart-intel {
    gap: 7px;
  }

  .chart-intel article {
    min-height: 58px;
    padding: 9px;
  }

  .ai-tape-panel {
    min-height: auto;
  }

  .scanner-row {
    grid-template-columns: 1fr 36px 48px;
  }

  .scanner-row b {
    display: none;
  }
}

@media (max-width: 520px) {
  .metric-strip,
  .view-grid,
  .overlay-grid,
  .mini-metrics,
  .calendar-preview,
  .chart-intel,
  .calendar-board,
    .command-feature-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-actions .search-trigger {
    grid-column: 1 / -1;
    order: 3;
  }

  .signal-row,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .signal-row em {
    white-space: normal;
  }
}

/* Accepted preview fidelity lock: keep the NotFunTV console in the concept layout. */
.app-shell {
  width: 1680px;
  min-width: 1680px;
  min-height: 900px;
  grid-template-columns: 220px minmax(0, 1fr);
  background: #030405;
}

.sidebar {
  position: sticky;
  height: 900px;
  padding: 18px 16px;
  gap: 15px;
  border-right-color: #24272a;
}

.brand {
  align-items: flex-start;
  gap: 10px;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 29px;
  letter-spacing: 0;
  line-height: .95;
  color: #e7f0ea;
  text-shadow: 0 0 9px rgba(84, 215, 255, .45), 2px 0 rgba(255, 53, 167, .28);
}

.brand small {
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .16em;
  color: #a4c7bd;
}

.brand-mark {
  display: none;
}

.broadcast-clock {
  padding: 14px 13px;
  border-color: #25292d;
  background: #080a0c;
  font-family: "Courier New", ui-monospace, monospace;
}

.sidebar-actions {
  display: none;
}

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

.nav-item {
  min-height: 40px;
  border-radius: 3px;
  padding: 0 12px;
  justify-content: flex-start;
  gap: 12px;
  font-family: "Courier New", ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
}

.nav-item::before {
  content: "□";
  width: 16px;
  color: #bcd4cf;
}

.nav-item small {
  margin-left: auto;
}

.nav-item.active {
  color: #d9ffe7;
  background: linear-gradient(90deg, rgba(65, 255, 180, .20), rgba(65, 255, 180, .07));
  box-shadow: inset 3px 0 0 var(--green);
}

.terminal-card {
  margin-top: auto;
  padding: 13px;
  border: 1px solid #24292d;
  border-radius: 5px;
  background: #07090b;
  font-family: "Courier New", ui-monospace, monospace;
  color: #9fb9b5;
}

.terminal-card p {
  margin: 0 0 9px;
  font-size: 12px;
  color: var(--blue);
}

.terminal-card span,
.terminal-card strong {
  display: block;
  font-size: 11px;
  line-height: 1.7;
}

.terminal-card strong {
  color: var(--green);
}

.sidebar-footer {
  margin-top: 0;
  display: grid;
  gap: 10px;
  border-top-color: #24292d;
  font-family: "Courier New", ui-monospace, monospace;
}

.sidebar-footer button,
.sidebar-footer span {
  min-height: 22px;
  padding: 0;
  border-radius: 0;
  color: var(--green);
  font-size: 11px;
}

.workspace {
  padding: 9px;
  gap: 9px;
}

.topbar,
.tabs {
  display: none !important;
}

.metric-strip {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 1fr 1fr 1fr 1fr 1.1fr .9fr;
  gap: 7px;
  overflow: visible;
}

.metric-strip article {
  min-height: 70px;
  padding: 12px 14px 8px;
  border-radius: 3px;
  background: #07090b;
  box-shadow: none;
  border-color: #25292d;
}

.metric-strip article::before {
  display: none;
}

.metric-strip span,
.metric-strip em,
.panel-heading p,
.chart-intel span,
.section-head p {
  font-family: "Courier New", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.metric-strip span {
  font-size: 9px;
}

.metric-strip strong {
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 17px;
  letter-spacing: .02em;
}

.sparkline {
  height: 18px;
}

.system-status-card {
  grid-template-columns: 1fr 38px;
  align-items: center;
}

.system-status-card strong {
  font-size: 12px;
  color: var(--green);
  text-transform: uppercase;
}

.system-status-card i {
  grid-row: 1 / 4;
  grid-column: 2;
  width: 31px;
  height: 24px;
  border: 1px solid #5c725f;
  border-radius: 2px;
  background:
    radial-gradient(circle at 50% 42%, rgba(65,255,180,.7), transparent 28%),
    linear-gradient(#313834, #0b0e0d);
  box-shadow: 0 0 11px rgba(65,255,180,.34);
}

.terminal-grid {
  grid-template-columns: minmax(0, 1.78fr) minmax(500px, .95fr);
  gap: 9px;
}

.panel,
.metric-strip article {
  border-radius: 4px;
}

.panel {
  background: #060809;
  border-color: #24292d;
  box-shadow: none;
}

.panel-heading {
  min-height: 40px;
  padding: 8px 11px;
  border-bottom-color: #24292d;
}

.panel-heading h2 {
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.segmented {
  border-radius: 2px;
  background: #090b0d;
  border-color: #24292d;
}

.segmented button {
  min-height: 26px;
  border-radius: 2px;
  font-family: "Courier New", ui-monospace, monospace;
  text-transform: uppercase;
  color: #b2bbb8;
}

.segmented button.selected {
  background: #14181a;
  color: #8ee8ff;
}

.ticker-picker {
  display: grid;
  grid-template-columns: 178px 104px 78px;
  gap: 7px;
  align-items: end;
  font-family: "Courier New", ui-monospace, monospace;
}

.ticker-picker label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ticker-picker span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ticker-picker select,
.ticker-picker input,
.ticker-go {
  width: 100%;
  min-height: 27px;
  border: 1px solid #24292d;
  border-radius: 2px;
  background: #090b0d;
  color: #d8e5e1;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  padding: 0 8px;
  outline: none;
}

.ticker-picker select:focus,
.ticker-picker input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(84, 215, 255, .22), 0 0 12px rgba(84, 215, 255, .12);
}

.ticker-go {
  color: var(--green);
  cursor: pointer;
  box-shadow: inset 0 0 12px rgba(65, 255, 180, .08);
}

.ticker-go:hover {
  border-color: var(--green);
  animation: phosphor-pulse 1.4s ease-in-out infinite;
}

.chart-wrap {
  min-height: 500px;
  padding: 0 8px 8px;
}

.tradingview-widget-container {
  height: 500px !important;
  min-height: 500px;
}

.chart-intel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 8px 10px 10px;
  gap: 7px;
}

.chart-intel article {
  min-height: 64px;
  border-radius: 3px;
  background: #080b0d;
  border-color: #24292d;
}

.concept-setup-modal {
  position: fixed;
  right: 82px;
  bottom: 54px;
  z-index: 40;
  width: 460px;
  height: 338px;
  min-width: 360px;
  min-height: 260px;
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 30px minmax(0, 1fr);
  border: 1px solid rgba(162, 183, 184, .45);
  border-radius: 6px;
  background: rgba(8, 10, 12, .94);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .56), 0 0 20px rgba(84, 215, 255, .12);
  backdrop-filter: blur(8px);
  font-family: "Courier New", ui-monospace, monospace;
  user-select: none;
  touch-action: none;
  overflow: hidden;
}

.concept-setup-modal header {
  height: 30px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #24292d;
  color: #8ee8ff;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  cursor: grab;
}

.concept-setup-modal.is-dragging header {
  cursor: grabbing;
}

.concept-setup-modal.is-resizing {
  box-shadow: 0 18px 42px rgba(0, 0, 0, .68), 0 0 22px rgba(65, 255, 180, .16);
}

.setup-window-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.setup-window-controls b {
  color: var(--red);
}

.setup-window-controls button {
  width: 20px;
  height: 20px;
  min-height: 20px;
  border: 1px solid #30383b;
  border-radius: 2px;
  background: #090b0d;
  color: var(--blue);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  display: grid;
  place-items: center;
}

.setup-window-controls button:hover {
  color: var(--green);
  border-color: var(--green);
}

.setup-window-body {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  min-height: 0;
}

.concept-setup-modal.is-minimized {
  width: 292px;
  height: 30px;
  min-height: 30px;
}

.concept-setup-modal.is-minimized .setup-window-body {
  display: none;
}

.concept-setup-modal.is-minimized #setupMinimizeButton {
  display: none;
}

.concept-setup-modal:not(.is-minimized) #setupRestoreButton {
  display: none;
}

.modal-chart {
  padding: 12px 10px;
  border-right: 1px solid #24292d;
  min-height: 0;
  display: grid;
}

.modal-chart canvas {
  width: 100%;
  height: 100%;
  min-height: 190px;
}

.modal-data {
  padding: 12px 10px;
  display: grid;
  gap: 9px;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.modal-data small {
  color: #d8e5e1;
}

.modal-data dl {
  margin: 0;
  display: grid;
  gap: 6px;
}

.modal-data div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  text-transform: uppercase;
}

.modal-data dt {
  color: #8fa09c;
}

.modal-data dd {
  margin: 0;
  color: var(--green);
  text-align: right;
  max-width: min(220px, 52%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  min-height: 22px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(65, 255, 180, .55) 50%, transparent 52%),
    linear-gradient(135deg, transparent 0 66%, rgba(142, 232, 255, .45) 68%, transparent 70%);
  cursor: nwse-resize;
  opacity: .88;
  padding: 0;
}

.setup-resize-handle:hover {
  opacity: 1;
}

.concept-setup-modal.is-minimized .setup-resize-handle {
  display: none;
}

.nav-page-grid {
  align-items: stretch;
}

.overlay-row-list,
.quick-action-grid {
  display: grid;
  gap: 8px;
}

.overlay-row-button,
.quick-action-grid button {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  background: #07090b;
  color: var(--text);
  min-height: 44px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  text-align: left;
  font-family: "Courier New", ui-monospace, monospace;
}

.overlay-row-button:hover,
.quick-action-grid button:hover {
  border-color: var(--blue);
  background: #0b1012;
}

.overlay-row-button strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 12px;
}

.overlay-row-button span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.overlay-row-button em {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
}

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

.quick-action-grid button {
  display: block;
  min-height: 38px;
  text-align: center;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--blue);
}

.overlay-table-section {
  grid-row: span 2;
}

.trade-room-mini {
  padding: 9px 10px 10px;
}

.trade-plan-card {
  display: grid;
  gap: 9px;
  font-family: "Courier New", ui-monospace, monospace;
}

.trade-plan-card.compact {
  gap: 7px;
}

.trade-plan-hero {
  border: 1px solid rgba(65, 255, 180, .35);
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(65, 255, 180, .12), transparent 62%),
    #07090b;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  box-shadow: inset 0 0 18px rgba(65, 255, 180, .05);
}

.trade-plan-hero span {
  grid-column: 1 / -1;
  color: var(--blue);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.trade-plan-hero strong {
  color: var(--green);
  font-size: 18px;
  line-height: 1.1;
  text-transform: uppercase;
}

.trade-plan-hero b {
  align-self: end;
  color: var(--text);
  font-size: 24px;
  font-weight: 500;
}

.trade-plan-levels {
  display: grid;
  gap: 6px;
}

.trade-plan-card.compact .trade-plan-levels .signal-row:nth-child(n+6) {
  display: none;
}

.trade-plan-card.compact .trade-plan-levels {
  gap: 5px;
}

.trade-plan-card.compact .trade-plan-levels .signal-row {
  min-height: 44px;
  padding: 7px 8px;
}

.trade-plan-card.compact .trade-plan-levels .signal-row strong,
.trade-plan-card.compact .trade-plan-levels .signal-row em {
  font-size: 11px;
}

.trade-plan-card.compact .trade-plan-levels .signal-row span {
  font-size: 10px;
}

.no-trade-box {
  border: 1px solid rgba(255, 209, 102, .28);
  border-radius: 4px;
  background: rgba(255, 209, 102, .045);
  padding: 8px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.no-trade-box strong {
  color: var(--amber);
  text-transform: uppercase;
  font-size: 11px;
}

.trade-plan-card.compact .no-trade-box span:nth-of-type(n+2) {
  display: none;
}

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

.trade-plan-actions .panel-footer-button {
  min-height: 28px;
  padding: 0 6px;
  text-align: center;
  font-size: 9px;
}

.source-chip {
  display: inline-block;
  margin-top: 6px;
  color: var(--blue);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ai-tape-panel {
  min-height: 596px;
}

.ai-tape-body {
  padding: 10px;
}

.direction-card,
.probability-map,
.key-level-grid .signal-row,
.ai-insight.compact {
  border-radius: 3px;
}

.direction-card strong {
  color: var(--green);
  font-family: "Courier New", ui-monospace, monospace;
}

.broadcast-grid {
  grid-template-columns: .98fr .82fr 1.05fr .96fr .86fr;
  gap: 9px;
}

.broadcast-grid .panel {
  min-height: 292px;
  max-height: 306px;
}

.broadcast-grid .news-table,
.broadcast-grid .event-list,
.broadcast-grid .table-wrap {
  max-height: 220px;
  overflow: hidden;
}

.command-center,
.market-grid,
.lower-tables,
.view-panel {
  display: none;
}

@media (max-width: 1680px) {
  body {
    overflow-x: hidden;
  }
}

@media (max-width: 1440px) {
  .app-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    width: 1680px;
    min-width: 1680px;
    zoom: .855;
  }

  .sidebar {
    position: sticky;
    height: 900px;
    border-right: 1px solid #24272a;
    border-bottom: 0;
  }

  .terminal-grid {
    grid-template-columns: minmax(0, 1.78fr) minmax(500px, .95fr);
  }

  .broadcast-grid {
    grid-template-columns: .98fr .82fr 1.05fr .96fr .86fr;
  }
}

@media (max-width: 900px) {
  .app-shell {
    zoom: .535;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    zoom: .452;
  }

  .sidebar {
    position: sticky;
    height: 900px;
    padding: 18px 16px;
    gap: 15px;
  }

  .nav {
    display: grid;
    gap: 6px;
    overflow: visible;
    padding-bottom: 0;
  }

  .watchlists,
  .sidebar-footer {
    display: grid;
  }

  .metric-strip {
    display: grid;
    overflow: visible;
  }

  .metric-strip article {
    flex: initial;
  }

  .tradingview-widget-container {
    height: 500px !important;
    min-height: 500px;
  }

  .chart-wrap {
    min-height: 500px;
  }
}

@media (max-width: 650px) {
  body {
    background: #030405;
  }

  .app-shell {
    zoom: .386;
    min-height: 2500px;
  }
}

@media (max-width: 540px) {
  .app-shell {
    zoom: .321;
    min-height: 2820px;
  }
}
