:root {
  --bg: #0f1216; --panel: #171b21; --panel2: #1d222a; --line: #2a313b; --text: #e6e9ee; --muted: #8b95a3;
  --accent: #f2b33d; --good: #3ccf8e; --bad: #ff6b6b; --warn: #f2b33d; --info: #5aa9ff;
  --radius: 10px; --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
header.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px;
  padding: 10px 20px; background: #0b0d10ee; border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand b { font-size: 18px; letter-spacing: .3px; } .brand b span { color: var(--accent); }
.brand small { color: var(--muted); font-size: 12px; }
nav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; }
nav a.on, nav a:hover { color: var(--text); background: var(--panel2); }
.status { margin-left: auto; display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); display: inline-block; margin-right: 6px; }
.dot.on { background: var(--good); box-shadow: 0 0 6px var(--good); }
main { max-width: 1400px; margin: 0 auto; padding: 20px; }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 16px; margin: 0 0 12px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px; }
.sub { color: var(--muted); margin-bottom: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; } .row > .panel { flex: 1 1 420px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 7px; font-weight: 600; cursor: pointer; }
.tabs button.on { background: var(--accent); color: #111; }
input, select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; }
button.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-weight: 600; }
button.btn:hover { border-color: var(--accent); }
.muted { color: var(--muted); } .good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.mono { font-family: var(--mono); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--panel2);
  border: 1px solid var(--line); color: var(--muted); margin: 2px 4px 2px 0; white-space: nowrap; }
.badge.warn { color: #111; background: var(--warn); border-color: var(--warn); }
.badge.bad { color: #fff; background: #b8433f; border-color: #b8433f; }
.badge.info { color: #0b1a2c; background: var(--info); border-color: var(--info); }
.badge.live { color: #fff; background: #d43c3c; border-color: #d43c3c; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .6; } }

/* slate */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer;
  transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card.flash { animation: flash 1.2s; } @keyframes flash { 0% { border-color: var(--accent); box-shadow: 0 0 0 2px #f2b33d55; } }
.card .when { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; }
.card { position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--away, var(--line)) 0 50%, var(--home, var(--line)) 50% 100%); }
.teamline { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 700; margin: 6px 0;
  padding: 5px 10px 5px 8px; border-radius: 8px; border-left: 4px solid var(--tc, var(--line));
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc, transparent) 22%, transparent), transparent 75%); }
.teamline .tl { display: flex; align-items: center; gap: 10px; }
.teamline .logo { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 1px 1px #0008); }
.teamline .nm { color: var(--muted); font-size: 12px; font-weight: 400; }
.teamline .score { font-family: var(--mono); font-size: 20px; }
.teamline .score.lost { color: var(--muted); font-weight: 400; }
.teamline .poss::after { content: "\25C0"; color: var(--accent); font-size: 11px; }
.lines { display: grid; grid-template-columns: auto 1fr 1fr; gap: 4px 12px; margin: 10px 0 6px; font-size: 13px; }
.lines .h { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.lines .v { font-family: var(--mono); } .lines .bk { color: var(--muted); font-size: 11px; margin-left: 4px; }
.move { font-size: 12px; color: var(--muted); }
.move .up { color: var(--good); } .move .down { color: var(--bad); }

/* tables */
.tbl-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: var(--radius); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl th { position: sticky; top: 0; background: var(--panel2); color: var(--muted); text-align: right; padding: 8px 10px;
  font-weight: 700; white-space: nowrap; cursor: pointer; user-select: none; border-bottom: 1px solid var(--line); }
.tbl th.txt, .tbl td.txt { text-align: left; }
.tbl th.sorted { color: var(--accent); } .tbl th.sorted.asc::after { content: " \25B2"; } .tbl th.sorted.desc::after { content: " \25BC"; }
.tbl td { padding: 7px 10px; text-align: right; border-bottom: 1px solid #20262e; font-family: var(--mono); white-space: nowrap; }
.tbl td.txt { font-family: inherit; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #222833; }
.tbl tr.sub td { background: var(--panel2); color: var(--muted); font-weight: 700; }
.hit { display: inline-block; min-width: 46px; padding: 1px 6px; border-radius: 6px; text-align: center; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* player */
.hero { display: flex; gap: 18px; align-items: center; }
.hero img { width: 96px; height: 70px; object-fit: cover; border-radius: 10px; background: var(--panel2); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tile { background: var(--panel2); border-radius: 8px; padding: 10px; }
.tile .k { color: var(--muted); font-size: 11px; text-transform: uppercase; } .tile .v { font-size: 20px; font-weight: 700; font-family: var(--mono); }
svg.chart text { fill: var(--muted); font-size: 11px; } svg.chart .axis { stroke: var(--line); }
svg.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; } svg.chart .pt { fill: var(--accent); }
svg.chart .ref { stroke: var(--info); stroke-dasharray: 4 4; }
.bars { display: flex; gap: 3px; align-items: flex-end; height: 60px; }
.bars div { flex: 1; min-width: 6px; border-radius: 3px 3px 0 0; position: relative; }
footer { color: var(--muted); font-size: 12px; text-align: center; padding: 20px; }

/* panel header with a right-side block (typical weather) */
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.typical { text-align: right; font-size: 12px; line-height: 1.5; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; }
.typical .k { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.typical .v { font-size: 16px; font-weight: 700; font-family: var(--mono); }
.typical .cold { color: var(--info); font-weight: 700; } .typical .warm { color: #ff9f5a; font-weight: 700; }

/* login + account */
.who { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.who a:hover { color: var(--text); }
.adm { position: relative; }
.adm summary { cursor: pointer; list-style: none; padding: 4px 10px; border-radius: 7px; background: var(--accent); color: #111; font-weight: 700; }
.adm summary::-webkit-details-marker { display: none; }
.adm-menu { position: absolute; right: 0; top: 32px; z-index: 20; display: grid; gap: 8px; padding: 12px; min-width: 240px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px #000a; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.login input[type=password] { width: 100%; margin-top: 6px; font-size: 16px; padding: 10px 12px; }
.btn.primary { width: 100%; background: var(--accent); color: #111; border-color: var(--accent); padding: 10px; font-size: 15px; }

/* phones */
@media (max-width: 720px) {
  header.top { flex-wrap: wrap; gap: 8px 14px; padding: 8px 12px; }
  .brand small, #jobstatus { display: none; }
  nav a { padding: 6px 9px; }
  .status { margin-left: auto; }
  .who { width: 100%; justify-content: flex-end; order: 5; }
  main { padding: 12px; }
  h1 { font-size: 19px; }
  .grid { grid-template-columns: 1fr; }
  .row > .panel { flex-basis: 100%; }
  .panel { padding: 12px; }
  .toolbar > div[style*="margin-left:auto"] { margin-left: 0 !important; }
  .tbl-wrap { max-height: none; }
  .hero { flex-direction: column; align-items: flex-start; }
}
