:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d121f;
  --bg-card: #121829;
  --border-color: #1e293b;
  --border-hover: #334155;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.2);
  --bull-green: #10b981;
  --bull-glow: rgba(16, 185, 129, 0.2);
  --bear-red: #f43f5e;
  --bear-glow: rgba(244, 63, 94, 0.2);
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Navbar */
.top-nav {
  height: 64px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 20px;
}

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

.logo-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.brand-text h1 span {
  color: var(--accent-gold);
}

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

.price-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.price-box, .spread-box {
  display: flex;
  flex-direction: column;
}

.label {
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  font-weight: 700;
}

.live-price {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 800;
  color: var(--text-primary);
  transition: color 0.1s ease, text-shadow 0.1s ease;
  display: inline-block;
  min-width: 95px;
}

.live-price.tick-up {
  color: var(--bull-green) !important;
  text-shadow: 0 0 12px var(--bull-glow);
}

.live-price.tick-down {
  color: var(--bear-red) !important;
  text-shadow: 0 0 12px var(--bear-glow);
}

.spread-box .val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-gold);
  font-weight: 600;
}

.account-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 6px 14px;
  border-radius: 8px;
}

.pill-info {
  display: flex;
  flex-direction: column;
}

.acc-title {
  font-size: 10px;
  color: var(--accent-gold);
  font-weight: 600;
}

.acc-balance {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.status-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.status-indicator .dot.online {
  background: var(--bull-green);
  box-shadow: 0 0 8px var(--bull-green);
}

/* Profiles Bar */
.profiles-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 12px 24px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.4);
}

.profile-card.active-selected {
  border-color: var(--accent-gold);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge.scalp { color: #38bdf8; }
.badge.intraday { color: #a855f7; }
.badge.swing { color: var(--accent-gold); }

.tf {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.profile-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.action-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
}

.action-tag.buy { color: var(--bull-green); }
.action-tag.sell { color: var(--bear-red); }

.score-bar-bg {
  width: 100%;
  height: 4px;
  background: #1e293b;
  border-radius: 2px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  transition: width 0.4s ease;
}

.details {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Main Grid */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 64px - 100px);
}

.chart-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  background: var(--bg-primary);
  height: 100%;
}

.chart-header {
  height: 44px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-secondary);
}

.tf-selector {
  display: flex;
  gap: 4px;
}

.tf-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.tf-btn.active {
  background: var(--accent-gold);
  color: #000;
  font-weight: 700;
}

.chart-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}

.indicator-toggles {
  display: flex;
  gap: 4px;
}

.ind-pill {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid #1e293b;
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.ind-pill span {
  font-size: 8px;
  transition: color 0.2s;
}

.ind-pill:hover {
  background: #1e293b;
  color: #e2e8f0;
}

/* Specific Active Toggle Colors */
.ind-pill.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
  color: #93c5fd;
}

.ind-pill.ind-lines.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
}

.ind-pill.ind-ema.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
  color: #60a5fa;
}

.ind-pill.ind-vwap.active {
  background: rgba(168, 85, 247, 0.18);
  border-color: #a855f7;
  color: #c084fc;
}

.ind-pill.ind-rsi.active {
  background: rgba(236, 72, 153, 0.18);
  border-color: #ec4899;
  color: #f472b6;
}

.chart-zoom-controls {
  display: flex;
  gap: 4px;
}

.chart-ctrl-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid #334155;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-ctrl-btn:hover {
  background: #334155;
  color: #fff;
}

.chart-canvas {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 380px;
  background-color: var(--bg-primary);
  position: relative;
}

/* Signals Feed Panel */
.signals-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  height: 100%;
}

.panel-header {
  height: 44px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.signal-tabs {
  display: flex;
  gap: 6px;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.tab-btn.active {
  background: #1e293b;
  border-color: #334155;
  color: #fff;
}

.panel-header h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-test {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-backtest {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--bull-green);
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-backtest:hover {
  background: var(--bull-green);
  color: #000;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 520px;
  max-width: 90vw;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.backtest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bt-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bt-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.bt-metric {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
}

.bt-metric .lbl { color: var(--text-dim); }
.bt-metric .val { font-weight: 600; color: #fff; }
.bt-metric .val.green { color: var(--bull-green); }

.bt-summary-box {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.signals-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
}

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

.signal-card.buy {
  border-left: 4px solid var(--bull-green);
}

.signal-card.sell {
  border-left: 4px solid var(--bear-red);
}

.sig-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sig-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sig-card-buy { color: var(--bull-green); }
.sig-card-sell { color: var(--bear-red); }

.sig-time {
  font-size: 11px;
  color: var(--text-dim);
}

.sig-levels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.level-row {
  display: flex;
  justify-content: space-between;
}

.level-row .lbl { color: var(--text-dim); }
.level-row .val { font-weight: 600; }
.level-row.sl .val { color: var(--bear-red); }
.level-row.tp .val { color: var(--bull-green); }
.level-row.lot .val { color: var(--accent-gold); }

.sig-reasons {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  border-top: 1px dashed var(--border-color);
  padding-top: 6px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 250px;
  gap: 10px;
  color: var(--text-dim);
}

.radar-anim {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.3; }
}

/* Educational Breakdown & Setup Rationale */
.sig-education {
  margin-top: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 11px;
}

.edu-header {
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.edu-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.4;
}

.edu-item {
  display: flex;
  flex-direction: column;
}

.edu-lbl {
  color: #94a3b8;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.edu-val {
  color: #e2e8f0;
}

/* ============================================================
   Refined Expired / Archive Section & Segmented Filter Bar
   ============================================================ */
.expired-filter-track {
  display: flex;
  background: #0f172a;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  margin: 10px 12px 6px;
  gap: 3px;
}

.exp-filter-pill {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.exp-filter-pill:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}

.exp-filter-pill.active {
  background: #1e293b;
  border-color: #334155;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.exp-filter-pill .pill-count {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-family: var(--font-mono);
}

.exp-filter-pill.active .pill-count {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.expired-cards-container {
  padding: 6px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: calc(100vh - 270px);
}

/* Expired Card Polish */
.exp-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.exp-card:hover {
  border-color: #374151;
  transform: translateY(-1px);
}

.exp-card.is-win {
  border-left: 3px solid var(--bull-green);
}

.exp-card.is-loss {
  border-left: 3px solid var(--bear-red);
}

.exp-card.is-be {
  border-left: 3px solid var(--accent-blue);
}

.exp-card.is-exp {
  border-left: 3px solid #64748b;
}

/* Header layout */
.exp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exp-profile-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.3px;
}

.exp-tag-scalp {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.exp-tag-intraday {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.exp-tag-swing {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.exp-action-badge {
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 2px 5px;
  border-radius: 4px;
}

.exp-action-badge.buy {
  background: rgba(34, 197, 94, 0.15);
  color: var(--bull-green);
}

.exp-action-badge.sell {
  background: rgba(239, 68, 68, 0.15);
  color: var(--bear-red);
}

.exp-outcome-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.exp-outcome-badge.win {
  background: rgba(34, 197, 94, 0.12);
  color: var(--bull-green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.exp-outcome-badge.loss {
  background: rgba(239, 68, 68, 0.12);
  color: var(--bear-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.exp-outcome-badge.be {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.exp-outcome-badge.expired {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Metric Rows */
.exp-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.exp-metric-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.exp-metric-cell .cell-label {
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.exp-metric-cell .cell-val {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #f1f5f9;
}

.exp-metric-cell .cell-val.tp {
  color: var(--bull-green);
}

.exp-metric-cell .cell-val.sl {
  color: var(--bear-red);
}

/* Footer & Pips strip */
.exp-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #94a3b8;
  padding-top: 2px;
}

.exp-pips-pill {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
}

.exp-pips-pill.win {
  color: var(--bull-green);
  background: rgba(34, 197, 94, 0.1);
}

.exp-pips-pill.loss {
  color: var(--bear-red);
  background: rgba(239, 68, 68, 0.1);
}

/* Post-Mortem Note */
.exp-postmortem-box {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-left: 3px solid var(--bear-red);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 10px;
  line-height: 1.4;
  color: #fca5a5;
  margin-top: 2px;
}

.exp-postmortem-box strong {
  color: #ef4444;
  display: block;
  margin-bottom: 2px;
  font-size: 9px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ==========================================================================
   Bank Otak (Memory Book: Kaidah & Ilmu + Bank Kesalahan SL)
   ========================================================================== */
.mem-rule-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-left: 3px solid #8b5cf6;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.mem-rule-card:hover {
  border-color: #334155;
  background: #111e38;
}

.mem-rule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mem-rule-cat {
  font-size: 9px;
  font-weight: 800;
  color: #a78bfa;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mem-rule-tag {
  font-size: 9px;
  font-weight: 700;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  padding: 2px 6px;
  border-radius: 4px;
}

.mem-rule-title {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mem-rule-summary {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.45;
}

.mem-rule-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

/* Mistake Cards */
.mem-mistake-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-left: 3px solid var(--bear-red);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.mem-mistake-card:hover {
  border-color: #334155;
  background: #15162a;
}

.mem-mistake-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mem-loss-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.mem-mistake-time {
  font-size: 10px;
  color: #64748b;
  font-family: var(--font-mono);
}

.mem-diagnosis-box {
  background: rgba(239, 68, 68, 0.06);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  color: #fca5a5;
  line-height: 1.4;
}

.mem-diagnosis-box strong {
  display: block;
  font-size: 9px;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.mem-lesson-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px dashed rgba(16, 185, 129, 0.25);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  color: #86efac;
  line-height: 1.4;
}

.mem-lesson-box strong {
  display: block;
  font-size: 9px;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

/* ==========================================================================
   News Radar & Tactical News Setups
   ========================================================================== */
.news-card {
  background: #0b1324;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.news-card:hover {
  border-color: #334155;
  background: #0f192e;
}

.news-card.tier-1 {
  border-left: 4px solid #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.04) 0%, #0b1324 100%);
}

.news-card.high {
  border-left: 4px solid #f97316;
}

.news-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-day-badge {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-time-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
}

.news-impact-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.news-impact-tag.super {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.news-impact-tag.high {
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.news-title-text {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
}

.news-stats-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.news-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.news-stat-item .lbl {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.news-stat-item .val {
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #f1f5f9;
}

.news-bias-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}

.news-bias-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.news-bias-pill.bull {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.news-bias-pill.bear {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.news-bias-pill.neutral {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.news-macro-box {
  background: rgba(30, 41, 59, 0.4);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.45;
  border-left: 2px solid #3b82f6;
}

.news-macro-box strong {
  color: #60a5fa;
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* Tactical Setup Container */
.news-tactical-plan {
  background: #080d1a;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: #f59e0b;
}

.news-plan-rules {
  background: rgba(245, 158, 11, 0.05);
  border: 1px dashed rgba(245, 158, 11, 0.25);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 10px;
  color: #fbbf24;
  line-height: 1.4;
}

.news-plan-rules ul {
  margin: 4px 0 0 16px;
  padding: 0;
}

.news-scenarios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.scenario-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scenario-card.buy {
  border-top: 3px solid var(--bull-green);
}

.scenario-card.sell {
  border-top: 3px solid var(--bear-red);
}

.scenario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scenario-condition {
  font-size: 9px;
  color: #94a3b8;
  line-height: 1.3;
}

.scenario-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  padding: 1px 0;
}

.scenario-row .lbl {
  color: #64748b;
  font-weight: 600;
}

.scenario-row .val {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #f1f5f9;
}

.scenario-row .val.green {
  color: var(--bull-green);
}

.scenario-row .val.red {
  color: var(--bear-red);
}

/* 5-Year Historical News Playbook Cards */
.playbook-card {
  background: #0d1527;
  border: 1px solid #1e293b;
  border-left: 4px solid #a855f7;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.playbook-card:hover {
  border-color: #384966;
  background: #111b33;
}

.playbook-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.playbook-title {
  font-size: 13px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.35;
}

.playbook-freq {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.playbook-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.playbook-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.playbook-stat-item .lbl {
  font-size: 8px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.playbook-stat-item .val {
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #f1f5f9;
}

.playbook-stat-item .val.green {
  color: #34d399;
}

.playbook-stat-item .val.amber {
  color: #fbbf24;
}

.playbook-stat-item .val.purple {
  color: #c084fc;
}

.playbook-phases {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.playbook-phase-step {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 10px;
  line-height: 1.4;
}

.playbook-phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  color: #c084fc;
  margin-bottom: 2px;
  font-size: 10px;
}

.playbook-phase-window {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
}

.playbook-rules-box {
  background: rgba(168, 85, 247, 0.05);
  border: 1px dashed rgba(168, 85, 247, 0.3);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 10px;
  color: #e9d5ff;
}

.playbook-rules-box ul {
  margin: 4px 0 0 16px;
  padding: 0;
}



