/* Market War Room — dark trading-desk theme */
:root {
  --bg-0: #0a0e16;      /* page background */
  --bg-1: #111824;      /* panels */
  --bg-2: #18212f;      /* raised panels */
  --bg-3: #1f2a3a;      /* hover / inputs */
  --line: #243044;
  --text: #e7edf4;
  --text-dim: #9fb0c3;
  --text-mute: #6c7b8e;
  --green: #2ecc71;
  --red: #e74c3c;
  --yellow: #f1c40f;
  --gray: #7f8c9b;
  --blue: #3aa0ff;
  --accent: #4dd0e1;
}

html, body {
  background: var(--bg-0);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  letter-spacing: 0.1px;
}

.mono, .num { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---------------- Nav ---------------- */
.mwr-nav {
  background: linear-gradient(180deg, #0d1320, #0a0e16);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.brand-mark { color: var(--accent); font-size: 1.05rem; }
.brand-text {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 0.95rem;
  background: linear-gradient(90deg, #fff, #8fd3e0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.navbar .nav-link { color: var(--text-dim); font-weight: 500; font-size: 0.92rem; }
.navbar .nav-link:hover { color: var(--text); }
.navbar .nav-link.active { color: var(--accent); }

.mwr-footer { border-top: 1px solid var(--line); margin-top: 2rem; }

/* ---------------- Panels / cards ---------------- */
.panel {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
}
.panel-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.85rem;
}

/* Stat cards */
.stat-card {
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute; right: -20px; top: -20px;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(77,208,225,0.12), transparent 70%);
}
.stat-label {
  font-size: 0.7rem; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--text-mute); font-weight: 600;
}
.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem; font-weight: 600; line-height: 1.1; margin-top: 0.35rem;
}
.stat-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.2rem; }

/* ---------------- Color semantics ---------------- */
.t-green, .bullish, .hit { color: var(--green) !important; }
.t-red, .bearish, .miss { color: var(--red) !important; }
.t-yellow, .neutral, .partial { color: var(--yellow) !important; }
.t-gray, .muted, .ungradeable, .too_early { color: var(--gray) !important; }

.badge-dir {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.5px;
  padding: 0.22rem 0.5rem; border-radius: 6px; text-transform: uppercase;
}
.badge-dir.bullish { background: rgba(46,204,113,0.14); color: var(--green); border: 1px solid rgba(46,204,113,0.3); }
.badge-dir.bearish { background: rgba(231,76,60,0.14); color: var(--red); border: 1px solid rgba(231,76,60,0.3); }
.badge-dir.neutral { background: rgba(241,196,15,0.14); color: var(--yellow); border: 1px solid rgba(241,196,15,0.3); }
.badge-dir.muted   { background: rgba(127,140,155,0.14); color: var(--gray); border: 1px solid rgba(127,140,155,0.3); }

.badge-res {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.5px;
  padding: 0.18rem 0.45rem; border-radius: 6px; text-transform: uppercase;
}
.badge-res.hit { background: rgba(46,204,113,0.16); color: var(--green); }
.badge-res.miss { background: rgba(231,76,60,0.16); color: var(--red); }
.badge-res.partial { background: rgba(241,196,15,0.16); color: var(--yellow); }
.badge-res.ungradeable, .badge-res.too_early { background: rgba(127,140,155,0.16); color: var(--gray); }

.badge-sev {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.5px;
  padding: 0.18rem 0.5rem; border-radius: 6px; text-transform: uppercase;
}
.badge-sev.critical { background: rgba(231,76,60,0.18); color: var(--red); }
.badge-sev.high { background: rgba(231,126,34,0.18); color: #e67e22; }
.badge-sev.medium { background: rgba(241,196,15,0.16); color: var(--yellow); }
.badge-sev.low { background: rgba(127,140,155,0.16); color: var(--gray); }

/* ---------------- Prediction cards ---------------- */
.pred-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gray);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  height: 100%;
}
.pred-card.bullish { border-left-color: var(--green); }
.pred-card.bearish { border-left-color: var(--red); }
.pred-card.neutral { border-left-color: var(--yellow); }
.pred-sym { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 1.05rem; }
.pred-thesis { font-size: 0.85rem; color: var(--text-dim); line-height: 1.45; }
.pred-meta { font-size: 0.72rem; color: var(--text-mute); }

/* confidence meter */
.conf-meter { height: 5px; background: var(--bg-3); border-radius: 3px; overflow: hidden; margin-top: 0.5rem; }
.conf-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--accent)); }

/* ---------------- Tables ---------------- */
.table { color: var(--text); margin-bottom: 0; }
.table > :not(caption) > * > * { background: transparent; border-color: var(--line); padding: 0.55rem 0.7rem; }
.table thead th {
  font-size: 0.68rem; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-mute); font-weight: 600; border-bottom: 1px solid var(--line);
}
.table-hover tbody tr:hover > * { background: var(--bg-2); }
.scroll-table { max-height: 520px; overflow-y: auto; }
.scroll-table thead th { position: sticky; top: 0; background: var(--bg-1); z-index: 2; }

/* ---------------- Forms ---------------- */
.form-control, .form-select {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
}
.form-control:focus, .form-select:focus {
  background: var(--bg-3); border-color: var(--accent); color: var(--text);
  box-shadow: 0 0 0 0.18rem rgba(77,208,225,0.15);
}

/* ---------------- Options briefing cards ---------------- */
.brief-card {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
}
.brief-card.no-trade { border-color: rgba(241,196,15,0.35); }
.brief-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.brief-body { padding: 1rem 1.1rem; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 0.3rem 0.8rem; font-size: 0.85rem; }
.kv dt { color: var(--text-mute); font-size: 0.78rem; }
.kv dd { margin: 0; color: var(--text); font-family: 'JetBrains Mono', monospace; }
details.raw-brief summary { cursor: pointer; color: var(--text-dim); font-size: 0.8rem; }
details.raw-brief pre {
  white-space: pre-wrap; background: var(--bg-0); border: 1px solid var(--line);
  border-radius: 8px; padding: 0.8rem; font-size: 0.78rem; color: var(--text-dim); margin-top: 0.6rem;
}

/* critique block */
.critique { background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; }
.critique summary { padding: 0.7rem 1rem; cursor: pointer; list-style: none; display: flex; gap: 0.6rem; align-items: center; }
.critique summary::-webkit-details-marker { display: none; }
.critique .c-body { padding: 0 1rem 1rem; }
.c-field { margin-top: 0.7rem; }
.c-field h6 { font-size: 0.7rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-mute); margin-bottom: 0.25rem; }
.c-field p { font-size: 0.85rem; color: var(--text-dim); margin: 0; line-height: 1.5; }
.flag-pill { display: inline-block; font-size: 0.72rem; background: var(--bg-3); color: var(--text-dim); border: 1px solid var(--line); border-radius: 20px; padding: 0.15rem 0.6rem; margin: 0.15rem 0.2rem 0 0; }

.section-head { font-size: 1.05rem; font-weight: 600; margin: 1.4rem 0 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
.section-head .count { font-size: 0.72rem; color: var(--text-mute); font-weight: 500; }

.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 340px; }

a.daylink { color: var(--accent); text-decoration: none; }
a.daylink:hover { text-decoration: underline; }

.empty { color: var(--text-mute); font-size: 0.88rem; padding: 0.8rem 0; }
