/* Joker AI — US Stock Price Alert Report (EN) — Dark Theme */
:root {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: #334155;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  padding: 16px;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 720px; margin: 0 auto; }
header.topbar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 14px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.metarow { display: contents; }
.mlabel { color: var(--muted); font-size: 11.5px; }
.mval { font-weight: 600; color: var(--text); font-size: 13px; }
.regimebar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.regtitle {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--accent);
  margin-right: 8px;
  text-transform: uppercase;
}
.regitem { display: flex; flex-direction: column; gap: 2px; min-width: 92px; }
.regname { font-size: 11px; color: var(--muted); }
.regval { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.regsub { font-size: 11.5px; color: var(--muted); }
.regcall { margin-left: auto; font-size: 13px; font-weight: 800; }
.regnote { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.reg-ON { color: var(--success); }
.reg-Neutral { color: var(--warning); }
.reg-OFF { color: var(--danger); }
section.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
section.card h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td { padding: 8px 6px; border-bottom: 1px solid #26344a; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.sym { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.price { font-variant-numeric: tabular-nums; font-weight: 600; }
.chg { font-variant-numeric: tabular-nums; }
.chg.up { color: var(--success); }
.chg.down { color: var(--danger); }
.chgp.up { color: var(--success); }
.chgp.down { color: var(--danger); }
.kpirow { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.kpi { flex: 1; min-width: 135px; background: #0b1220; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.klabel { font-size: 11px; color: var(--muted); }
.kval { font-size: 15px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kval.down { color: var(--danger); }
.kval.up { color: var(--success); }
.kpinote { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kpinote strong { color: var(--text); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.badge.calm { background: #334155; color: #94a3b8; }
.badge.watch { background: var(--warning); color: #0f172a; }
.badge.review { background: var(--danger); color: #ffffff; }
.badge.urgent {
  background: #ff1a1a;
  color: #ffffff;
  animation: pulse 1.6s infinite;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
}
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.rsi {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.rsi.na { color: var(--muted); }
.rsi.oversold { color: var(--success); }
.rsi.overbought { color: var(--danger); }
.rsi.neutral { color: var(--warning); }
.volsig { color: var(--warning); font-weight: 700; font-size: 12px; }
.rwrap { width: 80px; height: 8px; background: #334155; border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; }
.rbar { height: 100%; background: linear-gradient(90deg, var(--success), var(--warning), var(--danger)); border-radius: 4px; }
.rpos { font-size: 11.5px; color: var(--muted); vertical-align: middle; margin-left: 6px; font-variant-numeric: tabular-nums; }
.action {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
}
.action.buy { background: var(--success); color: #fff; }
.action.sell { background: var(--danger); color: #fff; }
.action.add { background: var(--accent); color: #fff; }
.action.hold { background: #334155; color: #cbd5e1; }
.action.avoid { background: var(--danger); color: #fff; }
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 8px;
  margin-right: 6px;
}
.chip-cnbc { background: #16324f; color: #bbdef7; }
.chip-yahoo { background: #334155; color: #cbd5e1; }
.chip-invopedia { background: #43341f; color: #fde68a; }
.chip-schwab { background: #1e3a5f; color: #bfdbfe; }
.news-item { border-bottom: 1px solid #26344a; padding: 8px 0; font-size: 13.5px; }
.news-item:last-child { border-bottom: none; }
.news-title { font-weight: 700; color: var(--text); margin-bottom: 2px; }
.news-summary { font-size: 12.5px; color: var(--muted); }
.news-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.none-msg { color: var(--muted); font-size: 13px; padding: 8px 0; font-style: italic; }
.yt-item { border-bottom: 1px solid #26344a; padding: 8px 0; font-size: 13.5px; }
.yt-item:last-child { border-bottom: none; }
.yt-title { font-weight: 700; color: var(--text); margin-bottom: 2px; }
.yt-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.yt-takeaway { font-size: 12.5px; color: var(--muted); }
.sig-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sig-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sig-table td { padding: 8px 6px; border-bottom: 1px solid #26344a; vertical-align: middle; }
.conf { font-size: 11.5px; font-weight: 700; }
.conf.high { color: var(--success); }
.conf.med { color: var(--warning); }
.conf.low { color: var(--muted); }
.sector-row { display:flex; justify-content:space-between; font-size:13px; padding:3px 0; }
.sector-up { color: var(--success); font-variant-numeric: tabular-nums; }
footer {
  margin-top: 18px;
  padding: 12px;
  font-size: 11.5px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  text-align: center;
}
.disclaimer {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid #26344a;
  padding-top: 8px;
}
@media (max-width: 480px) {
  body { font-size: 14px; padding: 12px; }
  .meta { grid-template-columns: 1fr; gap: 4px; }
  .regimebar { gap: 6px; padding: 8px 10px; }
  .regitem { min-width: 76px; }
  .regval { font-size: 13px; }
  .regcall { font-size: 11.5px; }
  .kpi { min-width: unset; flex: 1 1 45%; }
  table { font-size: 12px; }
  th, td { padding: 6px 4px; }
  .rwrap { width: 64px; }
}