:root {
  --bg: #0b0e14;
  --panel: #121722;
  --panel2: #171e2b;
  --line: #232c3d;
  --fg: #e6ebf5;
  --muted: #8b98ad;
  --accent: #4da3ff;
  --bull: #2fbf71;
  --bear: #e8544d;
  --warn: #f0b429;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #1b2231; padding: 1px 5px; border-radius: 4px; }

.topbar {
  display: flex; align-items: center; gap: 18px; padding: 12px 20px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 700; font-size: 16px; color: var(--fg); }
.topbar nav { display: flex; gap: 14px; flex: 1; }
.topbar nav a { color: var(--muted); font-weight: 500; }
.topbar nav a:hover { color: var(--fg); }
.topright { display: flex; align-items: center; gap: 12px; }
.badge { font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.live { color: var(--bull); border-color: #1f4a35; background: #10201a; }
.badge.closed { color: var(--muted); }
button { font: inherit; cursor: pointer; }
button.link { background: none; border: none; color: var(--accent); padding: 0; }
button[type=submit], .filters button {
  background: #1d2739; color: var(--fg); border: 1px solid var(--line); padding: 7px 13px; border-radius: 7px;
}
button[type=submit]:hover { border-color: var(--accent); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 18px 16px 60px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
h1, h2 { margin: 0 0 12px; font-size: 19px; }
h3 { margin: 22px 0 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pos { color: var(--bull); }
.neg { color: var(--bear); }
.score { font-weight: 700; color: var(--accent); }
.sym { font-weight: 600; letter-spacing: .02em; }

.scaninfo { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters input, .filters select {
  background: var(--panel2); color: var(--fg); border: 1px solid var(--line);
  border-radius: 7px; padding: 7px 10px;
}

table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th {
  text-align: left; color: var(--muted); font-weight: 500; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line); padding: 7px 8px;
}
table.grid td { padding: 7px 8px; border-bottom: 1px solid #1a2130; vertical-align: top; }
table.grid tr:hover td { background: #151c29; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }

.skewcell { min-width: 120px; }
.skewbar { position: relative; height: 8px; background: #1b2231; border-radius: 4px; }
.skew-zero { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: #3a465e; }
.skew-fill { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.skew-fill.bull { background: var(--bull); }
.skew-fill.bear { background: var(--bear); }

.kpis { display: flex; flex-wrap: wrap; gap: 18px; margin: 10px 0 4px; }
.kpi-label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

.tide { display: flex; align-items: flex-end; gap: 4px; height: 200px; margin: 12px 0 18px; }
.tide-day { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.tide-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.bar { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; }
.bar.call { background: var(--bull); }
.bar.put { background: var(--bear); }
.tide-label { text-align: center; margin-top: 4px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .topbar nav { gap: 10px; font-size: 13px; }
  table.grid { font-size: 12px; }
}

/* login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; width: 100%; max-width: 380px;
}
.login-card h1 { font-size: 22px; }
.login-card label { display: block; margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.login-card input {
  display: block; width: 100%; margin-top: 5px; padding: 10px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; color: var(--fg); font: inherit;
}
.login-card button {
  width: 100%; margin-top: 18px; padding: 11px; border-radius: 8px;
  background: var(--accent); border: none; color: #06101d; font-weight: 700;
}
.error { background: #2a1517; border: 1px solid #58272b; color: #ffb3b0; padding: 9px 11px; border-radius: 8px; margin: 12px 0; font-size: 13px; }
.foot { color: var(--muted); font-size: 11.5px; text-align: center; padding: 0 20px 30px; }