:root {
  --bg-base: #070a12;
  --bg-surface: #0d1322;
  --bg-elevated: #131c31;
  --bg-card: rgba(16, 24, 42, 0.85);
  --bg-glass: rgba(19, 28, 49, 0.75);
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-highlight: rgba(56, 189, 248, 0.35);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --bull-green: #10b981;
  --bull-green-bg: rgba(16, 185, 129, 0.14);
  --bull-green-border: rgba(16, 185, 129, 0.4);
  --bear-red: #f43f5e;
  --bear-red-bg: rgba(244, 63, 94, 0.14);
  --bear-red-border: rgba(244, 63, 94, 0.4);
  --warn-amber: #f59e0b;
  --warn-amber-bg: rgba(245, 158, 11, 0.14);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.08), transparent 32%),
    radial-gradient(circle at 88% 12%, rgba(99, 102, 241, 0.08), transparent 35%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Top Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(7, 10, 18, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Main Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(99, 102, 241, 0.22));
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.nav-count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
}

/* Account Summary Strip in Header */
.account-strip {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-switcher {
  display: flex;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.btn-account-toggle {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-account-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-account-toggle.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--bull-green);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.btn-account-toggle.active.paper {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--bull-green);
  display: inline-block;
  box-shadow: 0 0 8px var(--bull-green);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.account-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.account-metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.account-metric-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

/* Asset Bar */
.asset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.asset-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.asset-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
  margin-left: 6px;
}

.asset-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.asset-pill:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.asset-pill.active {
  background: rgba(56, 189, 248, 0.16);
  color: #fff;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.asset-pill .tag {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-ticker-input {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  width: 130px;
  font-family: var(--font-mono);
}

.select-control {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
}

/* Workspace Layout */
.workspace {
  max-width: 1640px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.main-grid {
  display: block;
}

@media (max-width: 1240px) {
  .main-grid {
    display: block;
  }
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Hero Top Recommendation Banner */
.hero-pattern {
  background: linear-gradient(135deg, rgba(16, 24, 42, 0.96), rgba(19, 32, 58, 0.92));
  border: 1px solid var(--border-highlight);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1.1fr 1fr;
  gap: 18px;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-slot-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 12px;
}

.direction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 12px;
  font-family: var(--font-mono);
}

.direction-pill.LONG {
  background: var(--bull-green-bg);
  color: var(--bull-green);
  border: 1px solid var(--bull-green-border);
}

.direction-pill.SHORT {
  background: var(--bear-red-bg);
  color: var(--bear-red);
  border: 1px solid var(--bear-red-border);
}

.direction-pill.dynamic,
.direction-pill.DYNAMIC {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 11px;
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.45);
}

.stat-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-box {
  background: rgba(7, 10, 18, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.stat-box-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.stat-box-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}

.stat-box-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Price & Liquidation Safety Ladder */
.price-ladder {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(7, 10, 18, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.ladder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.ladder-row.tp-stretch {
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid #34d399;
}

.ladder-row.tp-opt {
  background: rgba(16, 185, 129, 0.18);
  border-left: 3px solid var(--bull-green);
  font-weight: 700;
}

.ladder-row.entry {
  background: rgba(56, 189, 248, 0.15);
  border-left: 3px solid var(--accent-cyan);
  font-weight: 700;
}

.ladder-row.sl {
  background: rgba(245, 158, 11, 0.14);
  border-left: 3px solid var(--warn-amber);
}

.ladder-row.liq {
  background: rgba(244, 63, 94, 0.12);
  border-left: 3px solid var(--bear-red);
}

/* 7x24 Heatmap Matrix */
.heatmap-wrapper {
  overflow-x: auto;
}

.heatmap-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  min-width: 780px;
}

.heatmap-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 4px 2px;
  text-align: center;
}

.heatmap-table td.day-label {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
  padding-right: 8px;
  white-space: nowrap;
  width: 82px;
}

.hm-cell {
  height: 36px;
  border-radius: 5px;
  text-align: center;
  vertical-align: middle;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  border: 1px solid transparent;
  user-select: none;
}

.hm-cell:hover {
  transform: scale(1.12);
  z-index: 5;
  border-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.hm-cell.selected {
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

/* Pattern Cards Grid */
.patterns-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}

.pattern-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.pattern-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.pattern-card.selected {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.07);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.16);
}

.pattern-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pattern-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(7, 10, 18, 0.45);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.mini-metric-label {
  font-size: 10px;
  color: var(--text-muted);
}

.mini-metric-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

/* Sticky Execution Ticket Sidebar */
.execution-panel {
  position: sticky;
  top: 76px;
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.leverage-slider {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* Safety Status Banner */
.safety-banner {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin: 12px 0;
  font-size: 12px;
  border: 1px solid transparent;
}

.safety-banner.SAFE {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.safety-banner.WARNING {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fcd34d;
}

.safety-banner.DANGER {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fda4af;
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-bull {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-bear {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
}

.btn-block {
  width: 100%;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  font-size: 11px;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
}

/* Historical Occurrence Mini Bars */
.occ-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 90px;
  padding: 12px 8px;
  background: rgba(7, 10, 18, 0.55);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.occ-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
}

.occ-bar {
  width: 100%;
  max-width: 28px;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height 0.2s ease;
}

.occ-bar.win {
  background: var(--bull-green);
}

.occ-bar.loss {
  background: var(--bear-red);
}

/* Broker Guide Cards */
.broker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #131c31;
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 13px;
  max-width: 380px;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bot Diagnostics & 24h Candle Inspector */
.bot-diag-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.bot-diag-kpi {
  background: rgba(13, 19, 34, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bot-diag-kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.bot-diag-kpi-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.bot-diag-kpi-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.active-coin-tab {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: var(--accent-cyan) !important;
  color: #fff !important;
  font-weight: 700 !important;
}

.coin-chg-pill {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 4px;
}

.coin-chg-pill.bull {
  background: var(--bull-green-bg);
  color: var(--bull-green);
  border: 1px solid var(--bull-green-border);
}

.coin-chg-pill.bear {
  background: var(--bear-red-bg);
  color: var(--bear-red);
  border: 1px solid var(--bear-red-border);
}

.coin-chg-pill.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.donchian-channel-meter {
  position: relative;
  background: rgba(15, 23, 42, 0.8);
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 0 10px;
  overflow: hidden;
  margin: 8px 0;
}

.donchian-track {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.18) 0%, rgba(56, 189, 248, 0.15) 50%, rgba(16, 185, 129, 0.18) 100%);
  width: 100%;
}

.donchian-needle {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 4px;
  background: var(--accent-cyan);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--accent-cyan);
  transform: translateX(-50%);
  transition: left 0.3s ease;
  z-index: 2;
}

.engine-pills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.engine-pill {
  background: rgba(13, 19, 34, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.engine-pill-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.engine-pill-name {
  font-weight: 600;
  color: var(--text-primary);
}

.engine-pill-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.engine-pill-badge.bull {
  background: var(--bull-green-bg);
  color: var(--bull-green);
  border: 1px solid var(--bull-green-border);
}

.engine-pill-badge.bear {
  background: var(--bear-red-bg);
  color: var(--bear-red);
  border: 1px solid var(--bear-red-border);
}

.engine-pill-badge.neutral {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

.engine-pill-reason {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- ORDER TRIGGER FORECAST & PROBABILITY SECTION --- */
.portfolio-forecast-ribbon {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.countdown-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.countdown-digits {
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 14px;
  letter-spacing: 0.05em;
}

.prob-horizon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.prob-horizon-card {
  background: rgba(13, 19, 34, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.prob-horizon-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.prob-horizon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prob-horizon-val {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.prob-progress-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.prob-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.prob-dir-split {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.trigger-radar-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.trigger-radar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.trigger-barrier-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.trigger-barrier-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trigger-barrier-box.nearest {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.04);
}

.trigger-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.checklist-item {
  background: rgba(13, 19, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
}

.checklist-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.checklist-badge.met {
  background: var(--bull-green-bg);
  color: var(--bull-green);
  border: 1px solid var(--bull-green-border);
}

.checklist-badge.pending {
  background: var(--warn-amber-bg);
  color: var(--warn-amber);
  border: 1px solid var(--warn-amber-border);
}

.checklist-badge.blocked {
  background: var(--bear-red-bg);
  color: var(--bear-red);
  border: 1px solid var(--bear-red-border);
}
