/* Kalshi Screener — combined design tokens + screener styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,300..700,0..1,-50..200');

:root {
  /* Brand (Kalshi Identity V1.0) — marketing / accent only */
  --brand-green:          #00DD94;
  --brand-green-light:    #CEFFEF;
  --brand-green-deep:     #01201A;

  /* Product colors — WCAG AA, USE IN UI */
  --product-green:        #00AA70;
  --product-blue:         #0098FE;
  --product-purple:       #8F5BFF;
  --product-red:          #FF0026;
  --product-orange:       #F36900;

  /* Dark surfaces — neutral slate (the green-tint app shell didn't read well) */
  --bg-app:               #0A0C0F;
  --bg-panel:             #0E1116;
  --bg-elev:              #14181F;
  --bg-raised:            rgba(255,255,255,0.025);
  --bg-raised-strong:     rgba(255,255,255,0.06);

  --fg-primary:           rgba(255,255,255,0.94);
  --fg-secondary:         rgba(255,255,255,0.62);
  --fg-tertiary:          rgba(255,255,255,0.34);

  --border-subtle:        rgba(255,255,255,0.07);
  --border-medium:        rgba(255,255,255,0.16);

  /* Trade semantics — product palette */
  --yes:                  #00AA70;
  --yes-bright:           #00DD94;
  --yes-tint:             rgba(0,170,112,0.14);
  --yes-tint-strong:      rgba(0,170,112,0.28);
  --no:                   #FF0026;
  --no-tint:              rgba(255,0,38,0.14);
  --no-tint-strong:       rgba(255,0,38,0.26);

  /* Accents (aliases for legacy code paths) */
  --accent-purple:        var(--product-purple);
  --accent-orange:        var(--product-orange);
  --accent-blue:          var(--product-blue);

  /* Type — Kalshi Sans not web-available; use a clean geometric sans fallback */
  --font-body:            'Inter', 'Kalshi Sans', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-mono:            'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

.theme-light {
  --bg-app:        #F6F7F8;
  --bg-panel:      #FFFFFF;
  --bg-raised:     rgba(0,0,0,0.025);
  --bg-raised-strong: rgba(0,0,0,0.05);
  --fg-primary:    rgba(0,0,0,0.92);
  --fg-secondary:  rgba(0,0,0,0.55);
  --fg-tertiary:   rgba(0,0,0,0.32);
  --border-subtle: rgba(0,0,0,0.07);
  --border-medium: rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--bg-app);
  color: var(--fg-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.003em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tabular, .num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
button { font-family: inherit; }
input { font-family: inherit; }

.scroll { overflow: auto; scrollbar-width: thin; }
.scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
.scroll::-webkit-scrollbar-track { background: transparent; }
.theme-light .scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); }

.btn-ghost {
  background: transparent; border: 0; color: var(--fg-secondary);
  cursor: pointer; padding: 4px 6px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 4px;
}
.btn-ghost:hover { background: var(--bg-raised-strong); color: var(--fg-primary); }

/* Material Symbols sizing helper */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  vertical-align: middle;
  line-height: 1;
}

/* Live dot */
@keyframes livepulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}
.live-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--accent-orange);
  display: inline-block; animation: livepulse 1.2s ease-in-out infinite;
}

/* Live toggle in the filter strip */
.live-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-raised);
  color: var(--fg-secondary);
  font-size: 13px; font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.live-toggle:hover { color: var(--fg-primary); border-color: var(--border-medium); }
.live-toggle.on {
  color: var(--no);
  border-color: var(--no);
  background: var(--no-tint);
}

/* Live "game in progress" dot — for the Markets table LIVE column */
@keyframes livehalo {
  0%   { box-shadow: 0 0 0 0 rgba(255,0,38,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(255,0,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,0,38,0); }
}
.live-pulse-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 999px;
  background: var(--no); /* product red */
  animation: livehalo 1.6s ease-out infinite;
  flex-shrink: 0;
}

/* Row flash on new events */
@keyframes flashup {
  0% { background: rgba(0,221,148,0.32); }
  100% { background: transparent; }
}
@keyframes flashdown {
  0% { background: rgba(255,77,106,0.32); }
  100% { background: transparent; }
}
.flash-up { animation: flashup 600ms ease-out 1; }
.flash-down { animation: flashdown 600ms ease-out 1; }

/* Cell flash on bid/size change — subtle, doesn't take over the row */
@keyframes cellpulse-up {
  0% { background-color: rgba(0,170,112,0.30); }
  100% { background-color: transparent; }
}
@keyframes cellpulse-down {
  0% { background-color: rgba(255,0,38,0.26); }
  100% { background-color: transparent; }
}
.cell-pulse-up { animation: cellpulse-up 700ms ease-out 1; border-radius: 3px; }
.cell-pulse-down { animation: cellpulse-down 700ms ease-out 1; border-radius: 3px; }

/* Number input — no spinner */
input.no-spin::-webkit-outer-spin-button,
input.no-spin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.no-spin { -moz-appearance: textfield; }

/* Layout shell */
.shell { display: flex; flex-direction: column; height: 100%; }
.shell-header {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  min-height: 64px;
}
.shell-body {
  display: flex; flex: 1; min-height: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  color: var(--fg-primary);
}
.brand-mark {
  color: var(--brand-green);
  flex-shrink: 0;
  animation: sonarpulse 2.4s ease-in-out infinite;
}
@keyframes sonarpulse {
  0%, 100% { opacity: 0.95; }
  50%      { opacity: 0.65; }
}
.brand-word {
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -0.035em;
  color: var(--fg-primary);
  line-height: 1;
}
.brand-product {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--brand-green);
  line-height: 1;
  /* Optical alignment — the small-cap weight reads heavier than the bold wordmark
     at its midline, so nudge down a hair for a true visual center */
  margin-top: 1px;
  margin-left: 2px;
}
/* Cobra glyph — uses the PNG's alpha channel as a stencil, paints with the
   brand mint. Change `background-color` to retint without re-exporting the asset. */
.brand-cobra {
  display: inline-block;
  width: 32px;
  height: 32px;
  margin-left: 5px;
  background-color: #28cc95;
  -webkit-mask: url('cobra.png') no-repeat center / contain;
          mask: url('cobra.png') no-repeat center / contain;
  flex-shrink: 0;
  /* Subtle breath, like a real coiled cobra */
  animation: sonarpulse 3s ease-in-out infinite;
}

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  background: var(--bg-raised); border: 1px solid var(--border-subtle);
  font-size: 11px; font-weight: 500;
  color: var(--fg-secondary);
  letter-spacing: -0.005em;
}
.status-pill.live { color: var(--brand-green); border-color: rgba(0,221,148,0.22); background: var(--yes-tint); }
.status-pill.disconnected { color: var(--no); }

/* Search row above the table, top-left */
.search-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px 0;
  background: var(--bg-panel);
}
.screener-search {
  position: relative;
  display: inline-flex; align-items: center;
  height: 44px; width: 440px; max-width: 55%;
  padding: 0 14px 0 44px;
  border-radius: 10px;
  border: 1px solid var(--border-medium);
  background: var(--bg-elev);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 1px 2px rgba(0,0,0,0.25);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.screener-search:hover {
  border-color: rgba(255,255,255,0.22);
  background: var(--bg-raised-strong);
}
.screener-search:focus-within {
  border-color: var(--brand-green);
  background: var(--bg-elev);
  box-shadow: 0 0 0 3px rgba(0,221,148,0.18);
}
.screener-search .icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--fg-secondary); pointer-events: none;
  display: inline-flex;
}
.screener-search:focus-within .icon { color: var(--brand-green); }
.screener-search input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  color: var(--fg-primary);
  font-size: 15px; font-weight: 500;
  letter-spacing: -0.005em;
}
.screener-search input::placeholder {
  color: var(--fg-secondary);
  font-weight: 500;
}
.screener-search .clear-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  color: var(--fg-tertiary); cursor: pointer;
  padding: 2px; border-radius: 4px;
}
.screener-search .clear-btn:hover { color: var(--fg-primary); background: var(--bg-raised-strong); }
.screener-search .kbd {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  color: var(--fg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-raised-strong);
  border: 1px solid var(--border-subtle);
  margin-left: 6px;
}

/* Typeable NumPill */
.num-pill {
  display: inline-flex; align-items: center;
  height: 36px; gap: 5px;
  padding: 0 7px 0 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: var(--bg-raised);
  transition: border-color 140ms ease;
}
.num-pill.active { border-color: var(--product-blue); }
.num-pill:focus-within {
  border-color: var(--brand-green);
  background: var(--bg-elev);
}
.num-pill-label {
  font-size: 13px; color: var(--fg-tertiary); font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  margin-right: 4px;
}
.num-pill-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 26px;
  border: 0; border-radius: 5px;
  background: transparent; color: var(--fg-secondary);
  cursor: pointer;
}
.num-pill-step:hover { background: var(--bg-raised-strong); color: var(--fg-primary); }
.num-pill-input {
  width: 66px; height: 26px;
  border: 0; outline: none; padding: 0;
  background: transparent; color: var(--fg-primary);
  font-size: 14px; font-weight: 700;
  text-align: center;
  letter-spacing: -0.01em;
}
.num-pill-input::placeholder { color: var(--fg-tertiary); font-weight: 500; }
.num-pill-affix {
  font-size: 13px; color: var(--fg-tertiary); font-weight: 600;
}

/* Pulse banner */
.pulse-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
}
.pulse-bar .label {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-purple); font-weight: 700; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.pulse-bar .summary {
  flex: 1; min-width: 0;
  color: var(--fg-primary);
  font-size: 12px; line-height: 16px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pulse-bar .summary.empty { color: var(--fg-tertiary); }
.pulse-bar .meta { color: var(--fg-tertiary); font-size: 11px; }
.pulse-bar .btn-pulse {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(123,97,255,0.10);
  border: 1px solid rgba(123,97,255,0.30);
  color: var(--accent-purple);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
}
.pulse-bar .btn-pulse:hover { background: rgba(123,97,255,0.18); }
.pulse-bar .btn-pulse:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─────────────────────────────────────────────────────────────────
   Tab nav — underlined pills, mint accent
   ───────────────────────────────────────────────────────────────── */
.tab-nav {
  display: inline-flex; gap: 4px;
  align-self: stretch;
  align-items: flex-end;
  margin-bottom: -12px; /* fuses bottom border with header border for an underline effect */
}
.tab-nav .tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 0; background: transparent;
  color: var(--fg-secondary);
  font-size: 13px; font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: color 140ms ease;
}
.tab-nav .tab:hover { color: var(--fg-primary); }
.tab-nav .tab.active { color: var(--fg-primary); }
.tab-nav .tab::after {
  content: '';
  position: absolute;
  left: 10px; right: 10px; bottom: 0;
  height: 2px; border-radius: 2px 2px 0 0;
  background: var(--brand-green);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tab-nav .tab.active::after { transform: scaleX(1); }
.tab-nav .tab .tab-count {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  color: var(--fg-tertiary);
  padding: 1px 5px; border-radius: 3px;
  background: var(--bg-raised-strong);
}
.tab-nav .tab.active .tab-count {
  color: var(--brand-green);
  background: var(--yes-tint);
}

/* Row hover */
.tape-row, .agg-row {
  transition: background 100ms ease;
}
.tape-row:hover, .agg-row:hover {
  background: rgba(255,255,255,0.035);
}
/* subtle alternating tone for scanability — only on aggregates */
.agg-row:nth-child(even) { background: rgba(255,255,255,0.012); }
.agg-row:nth-child(even):hover { background: rgba(255,255,255,0.045); }

/* Virtualized rendering via browser-native viewport culling.
   Off-screen rows aren't painted; intrinsic-size reserves space so scroll height
   stays accurate. Critical for the 5k+ row "full universe" view. */
.agg-row {
  content-visibility: auto;
  contain-intrinsic-size: auto 32px;
}

/* Aggregates meta strip — terse, scannable */
.agg-meta {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--fg-tertiary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
.agg-meta b { color: var(--fg-primary); font-weight: 700; }
.agg-meta-of { color: var(--fg-tertiary); margin-left: 2px; }
.agg-meta-dot { opacity: 0.35; }
.agg-meta .dot-y, .agg-meta .dot-b {
  display: inline-block; width: 6px; height: 6px; border-radius: 999px;
  margin-right: 5px; vertical-align: middle;
}
.agg-meta .dot-y { background: var(--product-green); }
.agg-meta .dot-b { background: var(--product-blue); }

/* Copy-to-clipboard button */
.copy-btn { border-radius: 3px; transition: background 120ms, color 120ms; }
.copy-btn:hover { background: var(--bg-raised-strong); color: var(--fg-primary) !important; }
.ticker-cell:hover .copy-btn { color: var(--fg-secondary); }

/* Copyable ticker cell — entire cell is the click target */
.ticker-cell.copyable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  cursor: copy;
  padding: 4px 6px;
  margin: -4px -6px;
  border-radius: 5px;
  transition: background 100ms ease;
  user-select: none;
}
.ticker-cell.copyable:hover {
  background: rgba(255,255,255,0.06);
}
.ticker-cell.copyable .ticker-text {
  color: var(--fg-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticker-cell.copyable:hover .ticker-text {
  color: var(--fg-primary);
}

/* Resizable header cells */
.agg-th {
  position: relative;
  display: flex; align-items: center;
  overflow: hidden;
  white-space: nowrap;
  padding-right: 8px;
}
.agg-th > span:first-child {
  flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.col-resize-handle {
  position: absolute;
  right: -5px; top: -8px; bottom: -8px;
  width: 12px;
  cursor: col-resize;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.col-resize-grip {
  width: 2px; height: 14px;
  background: transparent;
  border-radius: 1px;
  transition: background 120ms;
}
.col-resize-handle:hover .col-resize-grip,
.col-resize-handle:active .col-resize-grip {
  background: var(--accent-blue);
}

/* Buy / Sell pill CTAs on aggregates rows */
.btn-trade {
  height: 22px; padding: 0 10px; border-radius: 4px;
  font-size: 11px; font-weight: 700; cursor: pointer; border: 0;
  letter-spacing: 0.3px;
}
.btn-trade.btn-yes { background: var(--yes-tint); color: var(--brand-green); }
.btn-trade.btn-yes:hover { background: rgba(10,194,133,0.22); }
.btn-trade.btn-no { background: var(--no-tint); color: var(--no); }
.btn-trade.btn-no:hover { background: rgba(227,24,57,0.22); }

/* ─────────────────────────────────────────────────────────────────
   Trade modal — orderbook + order panel
   ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.modal-shell {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.modal-header {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-chart {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elev);
  padding: 0;
}
.modal-chart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--fg-secondary); text-transform: uppercase;
}
.modal-chart-meta {
  font-size: 10px; font-weight: 500; letter-spacing: 0.3px;
  color: var(--fg-tertiary); text-transform: none;
}
.candle-chart {
  padding: 0 12px 8px;
}
.candle-empty {
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

/* PriceLineChart + scrubber */
.price-chart-wrap {
  position: relative;
  padding: 0 0 6px;
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.price-chart {
  cursor: crosshair;
  display: block;
  /* No CSS width — we explicitly set SVG width={pixels} so the viewBox-less SVG
     doesn't get stretched. useLayoutEffect measures the wrap on mount. */
}
/* Axis text — native body sans, no SVG stretching artifacts */
.chart-axis-label {
  fill: var(--fg-tertiary);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.chart-tip {
  position: absolute;
  top: 4px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 10px;
  background: rgba(0,0,0,0.72);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  z-index: 4;
}
.chart-tip-time {
  font-size: 10px; font-weight: 600;
  color: var(--fg-tertiary);
  font-family: var(--font-mono);
}
.chart-tip-px {
  font-size: 13px; font-weight: 700;
}
.modal-body {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 0; flex: 1;
}

/* Order book pane (left) */
.ob-pane {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  min-height: 0;
}
.ob-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--fg-secondary); text-transform: uppercase;
}
.ob-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--accent-orange);
}
.ob-view-toggle {
  display: inline-flex; gap: 2px;
  padding: 2px; border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-raised);
}
.ob-view {
  height: 20px; padding: 0 9px; border-radius: 3px; border: 0;
  background: transparent; color: var(--fg-secondary);
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  cursor: pointer; text-transform: uppercase;
}
.ob-view:hover { color: var(--fg-primary); }
.ob-view.active.yes { background: var(--yes-tint); color: var(--brand-green); }
.ob-view.active.no  { background: var(--no-tint);  color: var(--no); }
.ob-cols {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  padding: 4px 14px 6px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--fg-tertiary); text-transform: uppercase;
}
.ob-cols span:nth-child(2), .ob-cols span:nth-child(3) { text-align: right; }
.ob-section { padding: 2px 0; }
.ob-row {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  padding: 3px 14px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ob-row .ob-cell { text-align: right; color: var(--fg-primary); }
.ob-row .ob-cell.muted { color: var(--fg-tertiary); }
.ob-row .ob-price { font-weight: 700; }
.ob-row .ob-price.ask { color: var(--no); }
.ob-row .ob-price.bid { color: var(--brand-green); }
.depth-bar {
  position: absolute; top: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.depth-bar.ask-bar { background: rgba(255,77,106,0.08); }
.depth-bar.bid-bar { background: rgba(10,194,133,0.10); }
.ob-empty { padding: 12px 14px; color: var(--fg-tertiary); font-size: 11px; text-align: center; }
.ob-mid {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 6px 14px;
  background: var(--bg-raised);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Order panel pane (right) */
.op-pane {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
  min-height: 0; overflow-y: auto;
}
.op-side-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.op-side {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  height: 40px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--border-subtle);
  background: var(--bg-raised); color: var(--fg-secondary);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.op-side:hover { color: var(--fg-primary); }
.op-side .op-side-px {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--fg-tertiary);
}
.op-side.active.yes {
  background: var(--yes-tint); color: var(--brand-green);
  border-color: var(--brand-green);
}
.op-side.active.no {
  background: var(--no-tint); color: var(--no);
  border-color: var(--no);
}
.op-side.active .op-side-px { color: currentColor; opacity: 0.7; }

.op-type-toggle {
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 3px; gap: 3px;
  border: 1px solid var(--border-subtle); border-radius: 6px;
  background: var(--bg-raised);
}
.op-type {
  height: 26px; border: 0; border-radius: 4px;
  background: transparent; color: var(--fg-secondary);
  font-size: 11px; font-weight: 600; cursor: pointer;
}
.op-type.active {
  background: var(--bg-raised-strong); color: var(--fg-primary);
}

.op-field { display: flex; flex-direction: column; gap: 6px; }
.op-field label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--fg-tertiary); text-transform: uppercase;
}
.op-field input {
  height: 36px; padding: 0 12px;
  border: 1px solid var(--border-subtle); border-radius: 6px;
  background: var(--bg-raised); color: var(--fg-primary);
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
  outline: none;
}
.op-field input:focus { border-color: var(--brand-green); }
.op-quick { display: flex; gap: 6px; }
.op-quick button {
  height: 22px; padding: 0 8px; border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: transparent; color: var(--fg-secondary);
  font-size: 11px; font-weight: 600; cursor: pointer;
}
.op-quick button:hover { background: var(--bg-raised-strong); color: var(--fg-primary); }

.op-summary {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle); border-radius: 8px;
  background: var(--bg-raised);
}
.op-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--fg-secondary);
}

.op-cta {
  height: 44px; border-radius: 8px; border: 0;
  font-size: 14px; font-weight: 700; cursor: pointer;
  color: #0A0C0F; opacity: 0.6;
}
.op-cta.yes { background: var(--brand-green); }
.op-cta.no { background: var(--no); color: #fff; }
.op-cta:disabled { cursor: not-allowed; }

.op-disclaimer {
  margin: 0; font-size: 10px; color: var(--fg-tertiary); line-height: 14px;
}
