/* ═══════════════════════════════════════════════════════════════ */
/*  LTB Design Tokens — modern dark dashboard                     */
/*  Override Pico defaults: smaller type, denser, refined colors  */
/* ═══════════════════════════════════════════════════════════════ */

:root,
[data-theme="dark"] {
  /* — Typography — */
  --pico-font-family-sans-serif: "Inter", "Inter var", system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --pico-font-family-monospace: "JetBrains Mono", "SF Mono", Menlo,
    "Cascadia Code", Consolas, monospace;
  --pico-font-family: var(--pico-font-family-sans-serif);
  --pico-font-size: 14px;          /* was 17px — denser ops feel */
  --pico-line-height: 1.55;
  --pico-font-weight: 400;

  /* — Spacing — */
  --pico-spacing: 0.85rem;          /* tighter than default 1rem */
  --pico-block-spacing-vertical: 1rem;
  --pico-block-spacing-horizontal: 1.15rem;
  --pico-form-element-spacing-vertical: 0.5rem;
  --pico-form-element-spacing-horizontal: 0.85rem;

  /* — Border radius (smaller, less bubbly) — */
  --pico-border-radius: 0.4rem;
  --pico-rounded: 0.4rem;

  /* — Refined dark palette (slate-based) — */
  --pico-background-color: #0b1018;
  --pico-color: #d8dee9;
  --pico-muted-color: #6c7a8a;
  --pico-muted-border-color: rgba(115,130,140,0.18);

  /* Card / surface */
  --pico-card-background-color: #131b27;
  --pico-card-border-color: rgba(115,130,140,0.16);
  --pico-card-sectioning-background-color: #0f1620;
  --pico-card-box-shadow: 0 1px 2px rgba(0,0,0,0.20),
                         0 4px 12px rgba(0,0,0,0.06);

  /* Accents (cool blue primary) */
  --pico-primary: #38bdf8;
  --pico-primary-hover: #67d3fa;
  --pico-primary-focus: rgba(56,189,248,0.22);
  --pico-primary-inverse: #0b1018;

  /* Code */
  --pico-code-background-color: rgba(56,189,248,0.08);
  --pico-code-color: #93c5fd;

  /* Tables */
  --pico-table-border-color: rgba(115,130,140,0.18);
  --pico-table-row-stripped-background-color: rgba(115,130,140,0.05);

  /* Form */
  --pico-form-element-background-color: #0f1620;
  --pico-form-element-border-color: rgba(115,130,140,0.22);
  --pico-form-element-focus-color: var(--pico-primary-focus);
  --pico-form-element-active-background-color: #131b27;
}

/* — Sharper headings (a hair tighter than Pico) — */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.011em;
  line-height: 1.25;
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.35rem; margin-bottom: 0.85rem; }
h3 { font-size: 1.10rem; margin-top: 1.5rem; margin-bottom: 0.6rem; }
h4 { font-size: 0.98rem; }

hgroup > h1, hgroup > h2 { margin-bottom: 0.25rem; }
hgroup p, hgroup > :nth-child(n+2) { margin-bottom: 0; }

/* — code looks crisp — */
code, kbd, samp, pre {
  font-size: 0.88em;
  font-feature-settings: "calt" 1, "ss01" 1;
}

/* — App nav — */
.app-nav {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
  margin-bottom: 1.5rem;
}
.app-nav ul:first-child li { padding-right: 1.5rem; }
.brand {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--pico-primary);
}
.brand-subtitle {
  font-size: 0.78em;
  margin-left: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.app-nav a[aria-current="page"] {
  color: var(--pico-primary);
  font-weight: 500;
}
.nav-user { opacity: 0.7; font-size: 0.9em; }

/* — Subtle scrollbar (webkit) — */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb {
  background: rgba(115,130,140,0.3);
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(115,130,140,0.5); }
*::-webkit-scrollbar-track { background: transparent; }

/* — Articles a touch denser — */
article {
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}
article > header,
article > footer {
  margin: -1rem -1.15rem 0.85rem;
  padding: 0.7rem 1.15rem;
}
article > footer {
  margin: 0.85rem -1.15rem -1rem;
}

/* — Buttons — */
button, [role="button"], input[type="submit"] {
  font-weight: 500;
  letter-spacing: 0;
  --pico-form-element-spacing-vertical: 0.45rem;
}

/* — Footer — */
body > footer { padding-top: 1.5rem; opacity: 0.6; }

/* LTB dashboard custom styles — layered on top of Pico.css */

/* Compact tables for forensic data */
table {
  font-size: 0.92em;
}
table th, table td {
  padding: 0.4rem 0.6rem;
}

.muted {
  color: var(--pico-muted-color, #888);
}

/* Service status cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.service-card {
  margin: 0;
  padding: 1rem;
}

.service-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  border: none;
  padding: 0;
}

.service-card table {
  margin: 0;
  font-size: 0.85em;
}

.service-card table tr td:first-child {
  color: var(--pico-muted-color);
  font-size: 0.85em;
}

.service-card table tr td {
  border: none;
  padding: 0.15rem 0.3rem;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-active {
  background: #1f6b3f;
  color: #d8f5e3;
}

.badge-inactive,
.badge-failed {
  background: #6b2b2b;
  color: #f5d8d8;
}

.badge-warn {
  background: #6b5b2b;
  color: #f5e8d8;
}

/* Action badges (buy / wait / skip / sell) */
.action-buy {
  color: #34d399;
  font-weight: 600;
}

.action-skip {
  color: #94a3b8;
}

.action-sell {
  color: #fb923c;
  font-weight: 600;
}

.action-wait {
  color: #facc15;
}

/* Restart count warning */
.restart-warn {
  color: #fb923c;
  font-weight: 600;
}

/* Status-tinted card backgrounds */
.service-active {
  border-left: 4px solid #1f6b3f;
}

.service-inactive,
.service-failed {
  border-left: 4px solid #6b2b2b;
}

/* Code + pre tightening for forensic JSON dumps */
pre {
  font-size: 0.82em;
  max-height: 400px;
  overflow: auto;
  padding: 0.75rem;
}

details {
  margin-top: 0.5rem;
}

details summary {
  cursor: pointer;
  font-size: 0.9em;
}

footer {
  padding: 1.5rem 0;
  text-align: center;
}

.error {
  border-left: 4px solid #b91c1c;
  background: rgba(127, 29, 29, 0.18);
}

/* Rules subnav + module config tables */
.rules-subnav {
  display: flex;
  gap: 0;
  margin: 0 0 1rem 0;
  border-bottom: 2px solid var(--pico-muted-border-color, #2a3340);
}
.rules-subnav a {
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  color: var(--pico-muted-color, #888);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-weight: 500;
}
.rules-subnav a:hover { color: var(--pico-color, #eee); }
.rules-subnav a[aria-current="page"] {
  color: var(--pico-color, #eee);
  border-bottom-color: #34d399;
  font-weight: 600;
}

.readonly-banner {
  background: rgba(250, 204, 21, 0.08);
  border-left: 4px solid #facc15;
  padding: 0.6rem 1rem;
  margin: 0.5rem 0 1.5rem 0;
}

.env-override {
  color: #34d399;
  padding: 0.1rem 0.4rem;
  background: rgba(52, 211, 153, 0.12);
  border-radius: 3px;
}

.row-overridden {
  background: rgba(52, 211, 153, 0.04);
}

.strikethrough {
  text-decoration: line-through;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
 * Feature 1: Enriched data presentation (decision_detail) — 2026-05-17
 * ═══════════════════════════════════════════════════════════ */

/* Badges */
.badge {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 0.3em;
  font-size: 0.8em;
  font-weight: 600;
  vertical-align: middle;
}
.badge-success { background: #1f6f3d; color: #fff; }
.badge-muted   { background: #555; color: #ccc; }
.badge-warn    { background: #b87800; color: #fff; }
.badge-error   { background: #a02020; color: #fff; }
.badge-mini {
  display: inline-block;
  padding: 0 0.3em;
  font-size: 0.75em;
  border-radius: 0.25em;
  background: #2a3f5c;
  color: #c8d8ee;
  margin: 0 0.2em;
}
.badge-kol { background: #5a3f00; color: #ffd97a; }

/* Source diagnostic chips (row of small status indicators) */
.source-chips {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  margin: 0.5em 0;
}
.chip {
  display: flex;
  flex-direction: column;
  padding: 0.4em 0.7em;
  border-radius: 0.4em;
  border-left: 4px solid #555;
  min-width: 110px;
  background: #1a1f28;
}
.chip strong { font-size: 0.95em; }
.chip small  { font-size: 0.75em; color: #aab2c0; }
.chip-success { border-left-color: #2a9d4e; }
.chip-timeout { border-left-color: #d09a00; }
.chip-error   { border-left-color: #d04040; }
.chip-skipped { border-left-color: #555;    color: #888; }
.chip-cutoff  { border-left-color: #555;    color: #666; font-style: italic; }
.chip-unknown { border-left-color: #777; }

/* Tweet list (scrollable container) */
.tweet-list {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #2a3140;
  border-radius: 0.3em;
  padding: 0.4em;
  background: #14181f;
}
.tweet-row {
  padding: 0.5em 0.4em;
  border-bottom: 1px solid #232a36;
}
.tweet-row:last-child { border-bottom: none; }
.tweet-kol {
  background: #1f1a0e;
  border-left: 3px solid #ffd97a;
  padding-left: 0.6em;
}
.tweet-meta { font-size: 0.85em; margin-bottom: 0.2em; }
.tweet-text { white-space: pre-wrap; word-break: break-word; line-height: 1.4; }
.tweet-text-full {
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 0.3em;
  padding: 0.4em;
  background: #0e1218;
  border-radius: 0.3em;
}

/* Feature 2: API counter health colors */
.health-green  { color: #4ade80; font-weight: 600; }
.health-yellow { color: #fbbf24; font-weight: 600; }
.health-red    { color: #f87171; font-weight: 600; }
.health-idle   { color: #888;    font-style: italic; }

/* ═════════════════════════════════════════════════════════════ */
/* Feature 3: Runtime source toggle UI (★ rules_fetcher.html)    */
/* ═════════════════════════════════════════════════════════════ */

.source-panel {
  border: 1px solid var(--pico-card-border-color, rgba(115,130,140,0.18));
  border-radius: var(--pico-border-radius, 0.5rem);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.source-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.source-panel-meta {
  font-size: 0.85em;
}

/* Flash messages (success / error / warning) */
.flash {
  padding: 0.6rem 0.85rem;
  border-radius: 0.4rem;
  margin-bottom: 0.75rem;
  font-size: 0.95em;
  font-weight: 500;
}
.flash--ok   { background: rgba(34,197,94,0.12);  color: #22c55e; border: 1px solid rgba(34,197,94,0.35); }
.flash--err  { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.35); }
.flash--warn { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.35); }

/* Source grid: stack vertically; each row is a card */
.source-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.source-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.source-card--on  {
  background: rgba(34,197,94,0.06);
  border-color: rgba(34,197,94,0.22);
}
.source-card--off {
  background: rgba(115,130,140,0.06);
  border-color: rgba(115,130,140,0.18);
  opacity: 0.88;
}
.source-card:hover {
  background: rgba(56,189,248,0.05);
}

.source-card-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
}
.source-card-icon {
  font-size: 1.6rem;
  width: 2.2rem;
  text-align: center;
  flex: 0 0 auto;
}
.source-card-body { min-width: 0; flex: 1 1 auto; }
.source-card-title {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.15rem;
}
.source-card-title strong { font-size: 1.02em; }
.source-card-desc {
  color: var(--pico-muted-color, #888);
  line-height: 1.35;
}

.source-card-action {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
}

/* Status pills (★ ENABLED / DISABLED / REQUIRED) */
.status-pill {
  display: inline-block;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.4;
}
.status-pill--on       { background: rgba(34,197,94,0.18);  color: #22c55e; }
.status-pill--off      { background: rgba(115,130,140,0.18); color: #94a3b8; }
.status-pill--required { background: rgba(56,189,248,0.18); color: #38bdf8; }

/* Per-row toggle button */
.inline-form { display: inline; margin: 0; padding: 0; }
.btn-toggle {
  font-size: 0.85em;
  padding: 0.32rem 0.85rem;
  border-radius: 0.4rem;
  cursor: pointer;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
  width: auto;     /* override pico full-width */
  margin: 0;
}
.btn-toggle--disable {
  background: transparent;
  color: #f87171;
  border-color: rgba(248,113,113,0.4);
}
.btn-toggle--disable:hover {
  background: rgba(248,113,113,0.12);
  border-color: rgba(248,113,113,0.7);
}
.btn-toggle--enable {
  background: rgba(34,197,94,0.18);
  color: #22c55e;
  border-color: rgba(34,197,94,0.45);
}
.btn-toggle--enable:hover {
  background: rgba(34,197,94,0.28);
  border-color: rgba(34,197,94,0.75);
}

/* Audit log */
.audit-log {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(115,130,140,0.18);
}
.audit-log summary {
  cursor: pointer;
  padding: 0.3rem 0;
}
.audit-table { font-size: 0.85em; margin-top: 0.4rem; }
.audit-table th, .audit-table td { padding: 0.3rem 0.55rem; }

/* Mobile-friendly: stack the action below the main info */
@media (max-width: 600px) {
  .source-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .source-card-action { width: 100%; justify-content: flex-end; }
}

/* ═════════════════════════════════════════════════════════════ */
/* Feature 4: Filter rules pipeline flow viz + per-rule toggle  */
/* ═════════════════════════════════════════════════════════════ */

.pipeline-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1rem 0;
}

.pipeline-stage {
  border: 1px solid var(--pico-card-border-color, rgba(115,130,140,0.18));
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--pico-card-background-color, #131b27);
  position: relative;
}

.pipeline-stage--danger  { border-left: 3px solid #f87171; }
.pipeline-stage--warning { border-left: 3px solid #fbbf24; }
.pipeline-stage--info    { border-left: 3px solid #38bdf8; }
.pipeline-stage--success { border-left: 3px solid #22c55e; }

.pipeline-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.pipeline-stage-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.pipeline-stage-no {
  font-size: 0.78em;
  font-weight: 600;
  color: var(--pico-muted-color, #6c7a8a);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pipeline-stage-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.pipeline-stage-label {
  font-size: 1.05em;
}

.pipeline-stage-count {
  font-size: 0.82em;
}

.pipeline-stage-semantic {
  margin: 0 0 0.7rem 0;
  line-height: 1.5;
}

.pipeline-arrow {
  text-align: center;
  padding: 0.4rem 0;
  font-size: 0.9em;
  opacity: 0.55;
}

/* Status pill variants for stage type labels */
.status-pill--danger  { background: rgba(248,113,113,0.18); color: #f87171; }
.status-pill--warning { background: rgba(251,191,36,0.18); color: #fbbf24; }
.status-pill--info    { background: rgba(56,189,248,0.18); color: #38bdf8; }
.status-pill--success { background: rgba(34,197,94,0.18); color: #22c55e; }
.status-pill--warn    { background: rgba(251,191,36,0.18); color: #fbbf24; }
.status-pill--locked  { background: rgba(115,130,140,0.18); color: #94a3b8; }

/* Pipeline-rules: rule cards inside a stage */
.pipeline-rules {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.3rem;
}

.rule-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.4rem;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.rule-card--on {
  background: rgba(34,197,94,0.05);
  border-color: rgba(34,197,94,0.18);
}

.rule-card--off {
  background: rgba(115,130,140,0.06);
  border-color: rgba(115,130,140,0.18);
  opacity: 0.7;
}

.rule-card--dry {
  background: rgba(251,191,36,0.06);
  border-color: rgba(251,191,36,0.22);
}

.rule-card-main {
  min-width: 0;
  flex: 1 1 auto;
}

.rule-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.15rem;
}

.rule-card-id {
  font-size: 0.86em;
  font-weight: 500;
  color: var(--pico-code-color, #93c5fd);
}

.rule-card-name {
  font-weight: 500;
  margin-bottom: 0.15rem;
  font-size: 0.95em;
}

.rule-card-desc {
  color: var(--pico-muted-color, #6c7a8a);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.rule-card-meta {
  margin-top: 0.25rem;
  line-height: 1.4;
}

.rule-card-meta code {
  font-size: 0.85em;
}

.rule-card-action {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

/* Severity pills */
.severity {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.severity--critical { background: rgba(248,113,113,0.18); color: #f87171; }
.severity--high     { background: rgba(251,146,60,0.18); color: #fb923c; }
.severity--medium   { background: rgba(251,191,36,0.18); color: #fbbf24; }
.severity--low      { background: rgba(115,130,140,0.18); color: #94a3b8; }

.overridden-dot {
  color: #fbbf24;
  font-size: 0.9em;
  cursor: help;
}

/* Mobile */
@media (max-width: 600px) {
  .rule-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .rule-card-action {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ═════════════════════════════════════════════════════════════ */
/* Feature 5: Decider threshold editing                        */
/* ═════════════════════════════════════════════════════════════ */

.threshold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}

.threshold-card {
  border: 1px solid var(--pico-card-border-color, rgba(115,130,140,0.18));
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--pico-card-background-color, #131b27);
}

.threshold-card--overridden {
  border-left: 3px solid #fbbf24;
}

.threshold-card-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.threshold-card-values, .threshold-card-meta {
  margin-bottom: 0.4rem;
  line-height: 1.45;
}

.threshold-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.threshold-form input[type="number"] {
  flex: 1 1 8rem;
  min-width: 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--pico-form-element-border-color, rgba(115,130,140,0.4));
  border-radius: 0.3rem;
  background: var(--pico-form-element-background-color, #0e1620);
  color: inherit;
  font-size: 0.95em;
}

.threshold-form input[type="number"]:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}


/* ─── ★ Tokens view (2026-05-20) — 购买决策 + 购买市值背书 ─── */

/* action-killed (forgotten in original palette) */
.action-killed {
  color: #ef4444;
  font-weight: 600;
}

/* Pump percent coloring */
.pump-up   { color: #34d399; font-weight: 600; }
.pump-down { color: #fb923c; font-weight: 600; }

/* Latest capture row highlight */
.capture-latest {
  background-color: rgba(52, 211, 153, 0.08);
  border-left: 3px solid #34d399;
}

/* Reasoning row (narrator AI text) */
.reasoning-row td {
  border-top: none;
  padding-top: 0.1rem;
  padding-bottom: 0.5rem;
}

/* Cross-capture table compact */
.cross-cap-table th, .cross-cap-table td {
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}
.cross-cap-table th {
  background-color: rgba(255, 255, 255, 0.04);
  position: sticky;
  top: 0;
}

/* MC progression bar chart */
.mc-bar-wrap {
  background-color: rgba(255, 255, 255, 0.06);
  height: 18px;
  border-radius: 3px;
  width: 100%;
  min-width: 200px;
  overflow: hidden;
}
.mc-bar {
  height: 100%;
  background-color: #64748b;
  transition: width 0.2s;
}
.mc-bar-buy {
  background-color: #34d399;
}
.mc-bar-skip {
  background-color: #94a3b8;
}
.mc-bar-killed {
  background-color: #ef4444;
}

/* Badge for "最新" pin */
.badge {
  background-color: #34d399;
  color: #0f172a;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Monospace cells in tables for numerical alignment */
table .mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ── ltb-exec trading panel ── */
.pnl-pos { color: #4ade80; }
.pnl-neg { color: #f87171; }
.err-box { border-left: 3px solid #f87171; padding-left: 1rem; }
