/*
 * crytra terminal — additive styles (loaded AFTER /styles.css).
 *
 * Reuses the base palette from styles.css (--bg/--panel/--line/--text/--muted)
 * and adds the terminal-only tokens + the grid/panel/toolbar/ticket/tab layout.
 * Dark, dense, responsive: collapses to a stacked single column on narrow
 * screens while keeping the chart usable.
 */

:root {
  /* Direction colors consumed by the chart engine + panels. */
  --up: #26a69a;
  --down: #ef5350;
  --up-bg: rgba(38, 166, 154, 0.14);
  --down-bg: rgba(239, 83, 80, 0.14);
  /* Dip-Ladder annotation layer tokens (consumed by js/chart/annotations.js). */
  --amber: #f5a623;
  --dip-fill: rgba(91, 140, 255, 0.07);
  --t-gap: 1px;
  --topbar-h: 48px;
  --bottom-h: 200px;
  --left-w: 232px;
  --right-w: 300px;
}

/* ---- View / grid shell -------------------------------------------------- */

/* The terminal fills the viewport and overrides the centered .view padding. */
.view.terminal {
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  gap: var(--t-gap);
  background: var(--line);
  grid-template-columns: var(--left-w) 1fr var(--right-w);
  grid-template-rows: var(--topbar-h) 1fr var(--bottom-h);
  grid-template-areas:
    "top   top    top"
    "left  center right"
    "left  bottom right";
}

.t-topbar { grid-area: top; }
.t-left { grid-area: left; }
.t-center { grid-area: center; }
.t-right { grid-area: right; }
.t-bottom { grid-area: bottom; }

.t-left,
.t-center,
.t-right,
.t-bottom { background: var(--bg); min-height: 0; min-width: 0; overflow: hidden; }

/* ---- Topbar ------------------------------------------------------------- */

.t-topbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.75rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: nowrap;
}
.t-topbar .brand { font-size: 1.05rem; }
.t-spacer { flex: 1 1 auto; min-width: 0.5rem; }

.t-select,
.t-input {
  font: inherit;
  font-size: 0.82rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.3rem 0.5rem;
}
.t-input { min-width: 9rem; }
#pair-search { min-width: 8rem; }

.last-wrap { display: inline-flex; align-items: baseline; gap: 0.4rem; }
.last-price { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.last-price.up { color: var(--up); }
.last-price.down { color: var(--down); }
.price-change { font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.price-change.up { color: var(--up); }
.price-change.down { color: var(--down); }

.wallet-addr {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

/* ---- Segmented controls + timeframe bar --------------------------------- */

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-btn {
  font: inherit;
  font-size: 0.78rem;
  background: var(--bg);
  color: var(--muted);
  border: none;
  border-radius: 0;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn.active { background: var(--primary); color: #07122e; font-weight: 600; }

.tf-bar { display: inline-flex; gap: 2px; }
.tf-bar button {
  font: inherit;
  font-size: 0.76rem;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.tf-bar button.active { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }

/* ---- Generic panel chrome ----------------------------------------------- */

.panel {
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.panel-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* ---- Left: instrument list ---------------------------------------------- */

.t-left { display: flex; }
.instrument-list { flex: 1 1 auto; }
.il-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.il-search { flex: 1 1 100%; }
.il-watch-toggle { font-size: 0.74rem; padding: 0.25rem 0.5rem; }
.il-watch-toggle.active { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
.il-list { flex: 1 1 auto; overflow-y: auto; }
.il-row {
  display: grid;
  grid-template-columns: 1.2rem 1fr auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(35, 42, 57, 0.5);
  font-size: 0.82rem;
}
.il-row:hover { background: var(--bg); }
.il-row.active { background: var(--accent-bg); }
.il-star { color: var(--muted); opacity: 0.4; }
.il-star.on { color: var(--accent); opacity: 1; }
.il-sym { font-weight: 600; }
.il-mkt { font-size: 0.66rem; text-transform: uppercase; color: var(--muted); }
.il-empty { padding: 1rem; text-align: center; font-size: 0.82rem; }

/* ---- Center: chart area ------------------------------------------------- */

.chart-area { position: relative; width: 100%; height: 100%; overflow: hidden; }
.chart-canvas,
.overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.chart-canvas { z-index: 1; }
.overlay-canvas { z-index: 2; }
/* Dip-Ladder annotation overlay: stacked ABOVE the drawing overlay, same box,
   never intercepts pointer events (read-only level lines). */
.strategy-canvas { z-index: 3; pointer-events: none; }

.chart-readout {
  position: absolute;
  top: 6px;
  left: 52px;
  z-index: 4;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  pointer-events: none;
  white-space: nowrap;
}

/* Drawing toolbar — left edge, floating above the chart. */
.draw-toolbar {
  position: absolute;
  top: 8px;
  left: 6px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
}
.dt-tools,
.dt-actions { display: flex; flex-direction: column; gap: 3px; }
.dt-divider { height: 1px; background: var(--line); margin: 2px 1px; }
.dt-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  line-height: 1;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  padding: 0;
}
.dt-btn:hover { background: var(--bg); }
.dt-btn.active { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }

/* Rotation control — top-right corner of the chart. */
.rotation {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.25rem 0.5rem;
  font-size: 0.76rem;
}
.rot-toggle { font-size: 0.74rem; padding: 0.25rem 0.55rem; }
.rot-toggle.active { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
.rot-interval { width: 4rem; }
.rot-unit { font-size: 0.72rem; }
.rot-status { font-size: 0.7rem; }

/* ---- Right: orderbook / trades / ticket --------------------------------- */

.t-right { display: flex; flex-direction: column; gap: var(--t-gap); }
.orderbook { flex: 1 1 40%; }
.trades { flex: 1 1 30%; }
.ticket { flex: 0 0 auto; }

/* Order book */
.ob-spread { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ob-side { flex: 1 1 0; overflow: hidden; display: flex; flex-direction: column; }
.ob-asks { justify-content: flex-end; }
.ob-mid {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.2rem 0;
  border-block: 1px solid var(--line);
  font-size: 0.82rem;
}
.ob-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.06rem 0.6rem;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.ob-bar { position: absolute; top: 0; bottom: 0; right: 0; z-index: 0; }
.ob-ask-row .ob-bar { background: var(--down-bg); }
.ob-bid-row .ob-bar { background: var(--up-bg); }
.ob-price,
.ob-size { position: relative; z-index: 1; }
.ob-ask-row .ob-price { color: var(--down); }
.ob-bid-row .ob-price { color: var(--up); }
.ob-size { text-align: right; color: var(--muted); }

/* Time & sales */
.ts-list { flex: 1 1 auto; overflow-y: auto; }
.ts-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  padding: 0.08rem 0.6rem;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}
.ts-time { color: var(--muted); }
.ts-price { text-align: right; }
.ts-buy .ts-price { color: var(--up); }
.ts-sell .ts-price { color: var(--down); }
.ts-size { text-align: right; color: var(--muted); }

/* Order ticket (populated by paper/live agents; base chrome here). */
.ticket { border-top: 1px solid var(--line); padding: 0.5rem 0.6rem; gap: 0.4rem; }
.ticket .ticket-side { display: flex; gap: 0.4rem; }
.ticket button.buy { background: var(--up); color: #042a26; border: none; font-weight: 600; }
.ticket button.sell { background: var(--down); color: #2a0606; border: none; font-weight: 600; }
.ticket label { font-size: 0.74rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.2rem; }

/* ---- Bottom: tab strip -------------------------------------------------- */

.t-bottom { display: flex; flex-direction: column; background: var(--panel); border-top: 1px solid var(--line); }
.tab-bar { display: flex; gap: 0; border-bottom: 1px solid var(--line); flex: 0 0 auto; overflow-x: auto; }
.tab {
  font: inherit;
  font-size: 0.78rem;
  background: transparent;
  color: var(--muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--primary); }
.tab-bodies { flex: 1 1 auto; min-height: 0; position: relative; }
.tab-body { position: absolute; inset: 0; overflow: auto; padding: 0.5rem 0.75rem; font-size: 0.8rem; }
.tab-body[hidden] { display: none; }

/* Tables inside tab bodies (positions/orders/fills) scroll horizontally. */
.tab-body table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tab-body th,
.tab-body td { text-align: right; padding: 0.25rem 0.6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tab-body th:first-child,
.tab-body td:first-child { text-align: left; }
.tab-body th { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; }

/* ---- Responsive: collapse to a stacked single column -------------------- */

@media (max-width: 960px) {
  .view.terminal {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto 360px auto auto auto;
    grid-template-areas:
      "top"
      "center"
      "right"
      "left"
      "bottom";
  }
  :root { --bottom-h: auto; }
  .t-left,
  .t-right { flex-direction: column; }
  .t-right { gap: var(--t-gap); }
  .orderbook,
  .trades { flex: 1 1 auto; min-height: 200px; }
  .il-list { max-height: 280px; }
  .t-bottom { min-height: 220px; }
}

@media (max-width: 560px) {
  .t-topbar { flex-wrap: nowrap; }
  .tf-bar button { padding: 0.25rem 0.35rem; }
  .draw-toolbar { flex-direction: row; top: auto; bottom: 8px; left: 8px; }
  .dt-tools,
  .dt-actions { flex-direction: row; }
  .dt-divider { width: 1px; height: auto; }
}

/* ==========================================================================
 * Dip-Ladder strategy panel (js/ui/strategyPanel.js → #tab-strategy)
 * Cold-phosphor instrument aesthetic: dense, monospace numerics, accent teal.
 * ========================================================================== */

.sp-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 920px;
  font-size: 0.8rem;
}

/* Header */
.sp-head { display: flex; align-items: baseline; gap: 0.6rem; }
.sp-head-title { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.sp-head-sub { color: var(--muted); font-size: 0.75rem; }

/* Sections */
.sp-section { display: flex; flex-direction: column; gap: 0.5rem; }
.sp-section-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line); padding-bottom: 0.25rem;
}

/* Params grid */
.sp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem 0.75rem;
}
.sp-field { display: flex; flex-direction: column; gap: 0.2rem; }
.sp-field.sp-full { grid-column: 1 / -1; }
.sp-label { font-size: 0.7rem; color: var(--muted); }
.sp-input, .sp-select {
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 5px; padding: 0.3rem 0.4rem; font-size: 0.8rem;
  font-variant-numeric: tabular-nums; width: 100%;
}
.sp-input:focus, .sp-select:focus { outline: none; border-color: var(--primary); }

/* Percentile chips */
.sp-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.sp-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.15rem 0.55rem; font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.sp-chip-rm { cursor: pointer; color: var(--muted); font-size: 0.7rem; }
.sp-chip-rm:hover { color: var(--down); }
.sp-chip-add {
  background: transparent; border: 1px dashed var(--line); color: var(--muted);
  border-radius: 999px; padding: 0.15rem 0.55rem; font-size: 0.72rem; cursor: pointer;
}
.sp-chip-add:hover { border-color: var(--primary); color: var(--text); }

/* Buttons */
.btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 6px; padding: 0.4rem 0.8rem; font-size: 0.8rem; cursor: pointer;
}
.btn:hover { border-color: var(--primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #07122e; border-color: var(--primary); font-weight: 600; }
.btn-ghost { background: transparent; }
.sp-btn-compute { align-self: flex-start; margin-top: 0.25rem; }
.sp-msg-err { background: var(--down) !important; color: #fff !important; border-color: var(--down) !important; }

/* Dip table */
.sp-tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.sp-dip-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sp-dip-tbl th, .sp-dip-tbl td {
  text-align: right; padding: 0.22rem 0.55rem; border-bottom: 1px solid var(--line);
  white-space: nowrap; font-size: 0.76rem;
}
.sp-dip-tbl th { color: var(--muted); font-weight: 600; font-size: 0.68rem; text-transform: uppercase; }
.sp-dip-tbl th:first-child, .sp-dip-tbl td:first-child { text-align: left; }
.sp-dip-key { color: var(--text); font-weight: 600; }
.sp-thin-flag { color: var(--amber); cursor: help; font-weight: 700; }
.sp-th-chance, .sp-th-n { color: var(--muted); }
.sp-row-primary { background: rgba(91, 140, 255, 0.10); }
.sp-row-primary .sp-dip-key { color: var(--primary); }
.sp-row-thin { opacity: 0.45; }
.sp-dep-low  { color: var(--muted); }
.sp-dep-mid  { color: var(--text); }
.sp-dep-high { color: var(--amber); font-weight: 600; }

/* Ladder preview */
.sp-ladder-wrap { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.sp-ladder-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sp-ladder-tbl th, .sp-ladder-tbl td {
  text-align: right; padding: 0.25rem 0.55rem; border-bottom: 1px solid var(--line); font-size: 0.78rem;
}
.sp-ladder-tbl th { color: var(--muted); font-weight: 600; font-size: 0.68rem; text-transform: uppercase; }
.sp-ladder-tbl th:first-child, .sp-ladder-tbl td:first-child { text-align: left; }
.sp-rung-num {
  display: inline-block; min-width: 1.4rem; text-align: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 0.25rem;
}
.sp-rung-placed { background: var(--up-bg); }
.sp-accent-text { color: var(--accent); }
.sp-ladder-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.5rem 0.6rem; background: var(--panel);
}
.sp-ladder-summary { display: flex; gap: 1rem; flex-wrap: wrap; }
.sp-sum-cell { display: flex; flex-direction: column; }
.sp-sum-k { font-size: 0.66rem; text-transform: uppercase; color: var(--muted); }
.sp-sum-v { font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.sp-btn-place { padding: 0.2rem 0.55rem; font-size: 0.72rem; }
.sp-btn-place-all { white-space: nowrap; }

/* Arm toggle + warning */
.sp-arm-warn {
  font-size: 0.76rem; color: var(--muted); line-height: 1.4;
  border-left: 3px solid var(--line); padding: 0.4rem 0.6rem;
  background: var(--panel); border-radius: 0 4px 4px 0;
}
.sp-arm-warn-on { border-left-color: var(--accent); color: var(--text); }
.sp-arm-warn-live {
  border-left-color: var(--down); color: var(--text);
  background: var(--down-bg); font-weight: 600;
}
.sp-btn-arm { align-self: flex-start; }
.sp-btn-arm-armed { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.sp-btn-arm-live { border-color: var(--down); color: var(--down); }

/* Status bar */
.sp-status-bar { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; }
.sp-stat-cell { display: flex; flex-direction: column; gap: 0.1rem; }
.sp-stat-k { font-size: 0.66rem; text-transform: uppercase; color: var(--muted); }
.sp-stat-v { font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.sp-state-badge {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
}
.sp-state-idle      { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.sp-state-watching  { background: rgba(91,140,255,0.15); color: var(--primary); }
.sp-state-laddered  { background: var(--accent-bg); color: var(--accent); }
.sp-state-in-trade  { background: var(--up-bg); color: var(--up); }
.sp-state-trailing  { background: rgba(245,166,35,0.18); color: var(--amber); }
.sp-status-msg { flex-basis: 100%; color: var(--muted); }

/* Presets */
.sp-preset-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.sp-preset-row .sp-select { width: auto; min-width: 160px; }
.sp-btn-del { color: var(--down); border-color: var(--line); }
.sp-btn-del:hover { border-color: var(--down); }

/* Honesty note */
.sp-honesty {
  display: flex; gap: 0.5rem; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 0.6rem 0.75rem; color: var(--muted); line-height: 1.5;
}
.sp-honesty-icon { color: var(--accent); font-size: 1rem; }
.sp-honesty strong { color: var(--text); }

/* Shared utility classes */
.sp-muted { color: var(--muted); }
.sp-small { font-size: 0.72rem; }
.sp-accent-text { color: var(--accent); }
.sp-small.btn, .btn.sp-small { padding: 0.25rem 0.6rem; font-size: 0.72rem; }

/* ---- Daemon control panel (server-side watcher/executor) ---------------- */
.dmn-panel {
  margin-top: 0.75rem;
  border-top: 2px solid var(--line);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.dmn-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dmn-title { font-weight: 600; color: var(--text); }
.dmn-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--muted); display: inline-block;
}
.dmn-dot-on  { background: var(--up); box-shadow: 0 0 6px var(--up); }
.dmn-dot-off { background: var(--down); }
.dmn-status-text { font-size: 0.78rem; color: var(--text); }
.dmn-pairs { margin-left: 0.25rem; }

/* Kill switch */
.dmn-kill-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.dmn-kill {
  background: var(--down-bg);
  color: var(--down);
  border: 1px solid var(--down);
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}
.dmn-kill:hover { background: var(--down); color: #fff; }
.dmn-kill-active {
  background: var(--down);
  color: #fff;
  animation: dmn-pulse 1.2s ease-in-out infinite;
}
@keyframes dmn-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

/* Sections */
.dmn-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dmn-section-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.dmn-warn {
  color: var(--amber);
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 4px;
  padding: 0.4rem 0.5rem;
  line-height: 1.4;
  margin: 0;
}
.dmn-live-lbl { display: flex; align-items: center; gap: 0.4rem; }
.dmn-live-warn { color: var(--down); font-weight: 600; }

.dmn-caps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}
.dmn-field { display: flex; flex-direction: column; gap: 0.2rem; }
.dmn-field .t-input { width: 100%; }
.dmn-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

.dmn-list { display: flex; flex-direction: column; gap: 0.3rem; }
.dmn-list-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
}
