/* beredskaQet — live statistik-sider (2026-10-20, DC)
   Selvstændig CSS til stats.html / rangliste.html / events.html.
   Ingen build-step. Farver matcher portalen (#0a0c10 / #ffd236). */

:root {
  --bg: #0a0c10;
  --panel: #12151c;
  --panel-2: #171b24;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e9e7e2;
  --muted: #9aa0ab;
  --gold: #ffd236;
  --gold-dim: rgba(255, 210, 54, .14);
  --green: #4ade80;
  --red: #ef4444;
  --radius: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(900px 420px at 15% -10%, rgba(255, 210, 54, .07), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }

.wrap { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 12, 16, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}
header.site img.logo { height: 30px; width: auto; display: block; }
nav.main { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
nav.main a {
  padding: 7px 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
nav.main a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
nav.main a.active { color: #12151c; background: var(--gold); }

/* ---------- hero ---------- */
.hero { padding: 36px 0 18px; }
.hero h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--muted); max-width: 720px; }
.hero .meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, .12);
}
.dot.off { background: var(--red); box-shadow: 0 0 0 4px rgba(239, 68, 68, .12); }

/* ---------- KPI cards ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 22px 0 26px;
}
.kpi {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.kpi .label { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.kpi .value { font-size: 28px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 3px; }

/* ---------- panel ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.panel .head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.panel .head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.panel .head .spacer { margin-left: auto; }

/* ---------- controls ---------- */
input[type="search"], select {
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  min-width: 190px;
}
input[type="search"]:focus, select:focus { border-color: var(--gold); }
input::placeholder { color: #6b7280; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: right;
  padding: 11px 14px;
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
thead th:first-child, thead th:nth-child(2) { text-align: left; }
thead th:hover { color: var(--text); }
tbody td {
  padding: 11px 14px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
tbody td:first-child, tbody td:nth-child(2) { text-align: left; }
tbody tr:hover { background: rgba(255, 255, 255, .03); }
tbody tr:last-child td { border-bottom: 0; }

.player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 28px;
  display: grid; place-items: center;
  background: var(--gold-dim); color: var(--gold);
  font-weight: 700; font-size: 13px;
}
.player .name { overflow: hidden; text-overflow: ellipsis; }

.rank {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-weight: 700; font-size: 12.5px; color: var(--muted);
}
.rank.r1 { background: linear-gradient(180deg, #ffe680, #d4a017); color: #201a05; border: 0; }
.rank.r2 { background: linear-gradient(180deg, #e8ecf2, #a8b0bd); color: #1a1d22; border: 0; }
.rank.r3 { background: linear-gradient(180deg, #e2a878, #a86b3c); color: #241408; border: 0; }

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong);
  color: var(--muted);
}
.pill.win { color: var(--green); border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .08); }
.pill.loss { color: var(--red); border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .08); }

.bar { position: relative; height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; min-width: 90px; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #d4a017, var(--gold)); border-radius: 999px; }

/* ---------- podium ---------- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.podium .card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.podium .card.first { border-color: rgba(255, 210, 54, .45); box-shadow: 0 8px 30px rgba(255, 210, 54, .07); }
.podium .place { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.podium .who { font-size: 18px; font-weight: 700; margin: 8px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .score { font-size: 26px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.podium .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- match cards ---------- */
.matches { display: grid; gap: 12px; margin-top: 22px; }
.match {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}
.match .top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.match .teams { display: grid; gap: 6px; }
.match .team { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.match .team .s { margin-left: auto; font-variant-numeric: tabular-nums; }
.match .team.win .s { color: var(--gold); }
.match .team.lose { color: var(--muted); font-weight: 500; }
.match .side { text-align: right; color: var(--muted); font-size: 12.5px; }
.match .side .map { color: var(--text); font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }

/* ---------- states ---------- */
.state {
  padding: 46px 22px;
  text-align: center;
  color: var(--muted);
}
.state strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.state.error strong { color: var(--red); }

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding: 22px 0 40px;
  color: #6b7280;
  font-size: 12.5px;
}

@media (max-width: 760px) {
  header.site .inner { gap: 12px; }
  nav.main { width: 100%; margin-left: 0; overflow-x: auto; }
  .podium { grid-template-columns: 1fr; }
  .match { grid-template-columns: 1fr; }
  .match .side { text-align: left; }
  thead th, tbody td { padding: 10px 10px; }
}
