/* ToMaS — MajlisKita's workspace concept with a sporty finish: slate canvas, white rounded cards,
   a stadium gradient (royal blue → cyan → turf lime), scoreboard numerals and a night-match dark mode. */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --muted-bg: #f1f5f9;
  --ink: #0b1020;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #eef2f7;
  --primary: #1d4ed8;
  --primary-ink: #ffffff;
  --accent-soft: #eff6ff;
  --accent-ink: #1e40af;
  --brand-1: #2563eb;
  --brand-2: #06b6d4;
  --brand-3: #84cc16;
  --grad: linear-gradient(90deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
  --grad-btn: linear-gradient(90deg, #2563eb, #0891b2);
  --grad-tile: linear-gradient(135deg, #2563eb, #06b6d4 60%, #84cc16);
  --green: #047857;
  --red: #e11d48;
  --amber: #b45309;
  --blue: #1d4ed8;
  --orange: #ea580c;
  --green-soft: rgb(16 185 129 / .12);
  --red-soft: rgb(244 63 94 / .12);
  --amber-soft: rgb(245 158 11 / .14);
  --blue-soft: rgb(59 130 246 / .12);
  --scoreboard: #070b18;
  --sidebar-bg: #ffffff;
  --input: #dbe1ea;
  --pitch-line: rgb(37 99 235 / .08);
  /* Older names used inside page code, mapped onto the new palette. */
  --navy: var(--primary);
  --navy-2: #1e3a8a;
  --navy-3: #2563eb;
  --gold: var(--primary);
  --gold-2: var(--brand-2);
  --gold-soft: var(--accent-soft);
  --sans: 'Instrument Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Barlow Condensed', 'Oswald', 'Arial Narrow', sans-serif;
  --serif: var(--sans);
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow: 0 1px 2px rgb(15 23 42 / .05), 0 1px 3px rgb(15 23 42 / .04);
  --shadow-md: 0 10px 30px rgb(15 23 42 / .08);
  --shadow-lg: 0 24px 60px rgb(15 23 42 / .22);
  --glow: 0 10px 24px rgb(37 99 235 / .25);
  --sidebar: 272px;
  color-scheme: light;
}
/* Night match: deep navy canvas. Follows the system setting unless the viewer picks a theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --bg: #050816; --surface: #0c1224; --surface-2: #0e1529; --muted-bg: #131a2e; --ink: #f1f5f9; --ink-2: #cbd5e1; --muted: #94a3b8; --line: rgb(255 255 255 / .09); --line-2: rgb(255 255 255 / .06); --primary: #60a5fa; --primary-ink: #0b1020; --accent-soft: rgb(59 130 246 / .16); --accent-ink: #bfdbfe; --green: #34d399; --red: #fb7185; --amber: #fbbf24; --blue: #93c5fd; --orange: #fb923c; --sidebar-bg: #080d1d; --input: rgb(255 255 255 / .14); --pitch-line: rgb(96 165 250 / .08); --navy-2: #1e3a8a; --shadow: 0 1px 2px rgb(0 0 0 / .3); --shadow-md: 0 10px 30px rgb(0 0 0 / .35); color-scheme: dark; }
}
:root[data-theme='dark'] { --bg: #050816; --surface: #0c1224; --surface-2: #0e1529; --muted-bg: #131a2e; --ink: #f1f5f9; --ink-2: #cbd5e1; --muted: #94a3b8; --line: rgb(255 255 255 / .09); --line-2: rgb(255 255 255 / .06); --primary: #60a5fa; --primary-ink: #0b1020; --accent-soft: rgb(59 130 246 / .16); --accent-ink: #bfdbfe; --green: #34d399; --red: #fb7185; --amber: #fbbf24; --blue: #93c5fd; --orange: #fb923c; --sidebar-bg: #080d1d; --input: rgb(255 255 255 / .14); --pitch-line: rgb(96 165 250 / .08); --navy-2: #1e3a8a; --shadow: 0 1px 2px rgb(0 0 0 / .3); --shadow-md: 0 10px 30px rgb(0 0 0 / .35); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  font-feature-settings: 'ss01', 'cv11';
}
::selection { background: var(--brand-1); color: #fff; }
:focus-visible { outline: 3px solid rgb(59 130 246 / .45); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; margin: 0; letter-spacing: -.015em; color: var(--ink); }
p { margin: 0; }
.ico { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: lining-nums tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.serif { font-family: var(--display); font-weight: 700; letter-spacing: .01em; }
.gold { color: var(--primary); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Pitch markings: halfway line, centre circle and spot, drawn faintly behind headers. */
.pitch-bg::after, .hero::after, .banner::after, .page-head::after {
  content: ''; position: absolute; pointer-events: none; right: -60px; top: 50%; width: 340px; height: 340px; transform: translateY(-50%);
  border: 2px solid var(--pitch-line); border-radius: 50%;
  background: radial-gradient(circle, var(--pitch-line) 0 5px, transparent 6px), linear-gradient(90deg, transparent calc(50% - 1px), var(--pitch-line) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}

/* ---------- Shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 10px auto 10px 10px; width: calc(var(--sidebar) - 20px); z-index: 40;
  display: flex; flex-direction: column;
  background: var(--sidebar-bg); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 18px 16px 14px; }
.brand:hover { color: inherit; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad-tile); color: #fff; box-shadow: var(--glow); flex: none; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-text strong { display: block; font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.brand-text small { display: block; margin-top: 5px; font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.nav-group { margin-top: 14px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .85; padding: 0 10px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px;
  height: 40px; padding: 0 12px; margin: 2px 0; border-radius: 12px; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.nav a .ico { width: 18px; height: 18px; color: var(--muted); }
.nav a:hover { background: var(--muted-bg); color: var(--ink); }
.nav a.active { background: linear-gradient(90deg, rgb(37 99 235 / .12), rgb(6 182 212 / .1)); color: var(--accent-ink); font-weight: 600; box-shadow: inset 0 0 0 1px rgb(37 99 235 / .22); }
.nav a.active .ico { color: var(--primary); }
.sidebar-foot { padding: 10px 12px 14px; }
.season-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 4px; }
.season-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-3); box-shadow: 0 0 0 3px rgb(132 204 22 / .2); }
/* Promo card at the foot of the sidebar (MajlisKita's "Plan your next majlis"). */
.promo { position: relative; overflow: hidden; border-radius: 16px; padding: 16px; margin-bottom: 10px; color: #fff; background: var(--grad-tile); box-shadow: var(--glow); }
.promo::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-55deg, rgb(255 255 255 / .09) 0 10px, transparent 10px 22px); pointer-events: none; }
.promo::after { content: ''; position: absolute; right: -24px; top: -30px; width: 96px; height: 96px; border-radius: 50%; background: rgb(255 255 255 / .18); filter: blur(14px); }
.promo strong { position: relative; display: block; font-size: 14px; padding-right: 18px; }
.promo p { position: relative; font-size: 12px; color: rgb(255 255 255 / .85); margin-top: 4px; }
.promo a { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px; border-radius: 9px; background: rgb(255 255 255 / .22); font-size: 12px; font-weight: 700; color: #fff; }
.promo a:hover { background: rgb(255 255 255 / .32); color: #fff; }
.promo-x { position: absolute; right: 6px; top: 6px; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 8px; background: transparent; color: rgb(255 255 255 / .85); cursor: pointer; }
.promo-x:hover { background: rgb(255 255 255 / .2); color: #fff; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  min-height: 68px; padding: 10px 32px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar h1 { font-size: 20px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { color: var(--primary); }
.crumbs i { font-style: normal; margin: 0 7px; opacity: .5; }
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.today { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; white-space: nowrap; padding: 0 6px; }
.today .ico { color: var(--primary); }
.menu-btn { display: none; }
.theme-btn { width: 40px; height: 40px; border-radius: 12px; }

.search { position: relative; }
.search input {
  width: 300px; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); font: inherit; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--brand-1); box-shadow: 0 0 0 4px rgb(59 130 246 / .18); }
.search-icon { position: absolute; left: 13px; top: 12px; color: var(--muted); display: flex; }
.search-results {
  display: none; position: absolute; right: 0; top: 48px; width: 380px; max-height: 70vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px;
}
.search-results.open { display: block; }
.sr-group { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); padding: 10px 10px 4px; }
.sr-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; }
.sr-item:hover { background: var(--muted-bg); color: inherit; }
.sr-item strong { display: block; font-weight: 600; font-size: 13px; }
.sr-item small { display: block; color: var(--muted); font-size: 11.5px; }
.sr-ic { display: flex; width: 24px; justify-content: center; color: var(--muted); }
.sr-empty { padding: 16px; color: var(--muted); text-align: center; }

.view { padding: 28px 32px 64px; max-width: 1480px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent;
  font: 600 13px var(--sans); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, filter .15s, transform .15s;
}
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { filter: brightness(1.08); color: #fff; }
.btn-gold { background: linear-gradient(90deg, #65a30d, #84cc16); color: #fff; box-shadow: 0 10px 24px rgb(101 163 13 / .25); }
.btn-gold:hover { filter: brightness(1.06); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--muted-bg); color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); color: #fff; }
.btn-soft-danger { background: var(--surface); border-color: var(--line); color: var(--red); }
.btn-soft-danger:hover { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--muted-bg); color: var(--ink); }
.icon-btn.danger:hover { color: var(--red); background: var(--red-soft); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Page header (MajlisKita mk-page-header) ---------- */
.page-head {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-bottom: 22px; padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow);
}
.page-head::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.page-head > * { position: relative; z-index: 1; }
.page-head h2 { font-size: 28px !important; letter-spacing: -.025em; }
.page-head p { color: var(--muted); max-width: 640px; margin-top: 6px; }
.kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--primary); font-weight: 700; margin-bottom: 6px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .grow { flex: 1; }
.input, .toolbar select, .toolbar input {
  height: 38px; padding: 0 12px; border: 1px solid var(--input); border-radius: 11px; background: var(--surface);
  font: inherit; font-size: 13px; color: var(--ink); outline: none;
}
.toolbar input[type=search] { min-width: 240px; }
.toolbar select:focus, .toolbar input:focus, .input:focus { border-color: var(--brand-1); box-shadow: 0 0 0 4px rgb(59 130 246 / .15); }
.seg { display: inline-flex; padding: 4px; background: var(--muted-bg); border: 1px solid var(--line); border-radius: 12px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button, .seg a { border: 0; background: transparent; font: 600 12.5px var(--sans); color: var(--muted); padding: 6px 13px; border-radius: 9px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow), inset 0 -2px 0 var(--brand-1); }
.seg button:not(.on):hover, .seg a:not(.on):hover { color: var(--ink); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 14px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 16px; letter-spacing: -.01em; }
.card-head .link { font-size: 12.5px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.card-body { padding: 18px 20px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* ---------- KPI (MajlisKita StatCard, icon tiles in team colours) ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { position: relative; overflow: hidden; padding: 18px 20px; transition: transform .18s, box-shadow .18s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi .label { font-size: 13px; font-weight: 500; color: var(--muted); padding-right: 46px; min-height: 36px; display: flex; align-items: center; }
.kpi .label .ico { position: absolute; right: 18px; top: 16px; width: 36px; height: 36px; padding: 9px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #2563eb, #1e40af); box-shadow: var(--shadow); }
.kpi:nth-child(5n+2) .label .ico { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.kpi:nth-child(5n+3) .label .ico { background: linear-gradient(135deg, #84cc16, #4d7c0f); }
.kpi:nth-child(5n+4) .label .ico { background: linear-gradient(135deg, #f97316, #c2410c); }
.kpi:nth-child(5n+5) .label .ico { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.kpi .value { font-family: var(--display); font-size: 42px; font-weight: 700; line-height: 1.05; margin-top: 6px; letter-spacing: .01em; font-variant-numeric: lining-nums tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Hero (dashboard) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 28px 30px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.hero h2 { font-size: 34px; letter-spacing: -.03em; }
.hero p { color: var(--muted); margin-top: 8px; max-width: 620px; }
.hero .btn-row { margin-top: 20px; position: relative; z-index: 1; }
.hero-glow { position: absolute; pointer-events: none; border-radius: 50%; filter: blur(48px); }
.hero-split { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta div { min-width: 104px; padding: 12px 16px; border-radius: 14px; background: var(--muted-bg); border: 1px solid var(--line-2); }
.hero-meta small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero-meta strong { display: block; font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.1; margin-top: 2px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table th.num, .table td.num { text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.table .pts { font-weight: 700; font-family: var(--display); font-size: 19px; }
.table tr.clickable { cursor: pointer; }
.pos { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 9px; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink-2); background: var(--muted-bg); }
.pos.p1 { background: var(--grad-tile); color: #fff; box-shadow: var(--glow); }
.pos.zone-top { box-shadow: inset 0 0 0 2px rgb(6 182 212 / .45); }
.pos.zone-bottom { box-shadow: inset 0 0 0 2px rgb(244 63 94 / .4); }
.team-cell { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.team-cell.muted { color: var(--muted); font-weight: 400; }
.table .team-cell span { white-space: nowrap; }
.person-cell { display: flex; align-items: center; gap: 11px; }
.person-cell strong { display: block; font-weight: 600; }
.person-cell small { display: block; color: var(--muted); font-size: 11.5px; }
.form-pills { display: inline-flex; gap: 3px; }
.fp { width: 21px; height: 21px; border-radius: 6px; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.fp.W { background: #16a34a; } .fp.D { background: #94a3b8; } .fp.L { background: #e11d48; }
.legend { display: flex; gap: 18px; padding: 12px 20px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Badges (ringed pills) ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: rgb(100 116 139 / .1); color: var(--ink-2); box-shadow: inset 0 0 0 1px rgb(100 116 139 / .2); }
.b-live { background: var(--red-soft); color: var(--red); box-shadow: inset 0 0 0 1px rgb(244 63 94 / .3); }
.b-scheduled, .b-upcoming { background: var(--blue-soft); color: var(--blue); box-shadow: inset 0 0 0 1px rgb(59 130 246 / .25); }
.b-completed, .b-approved, .b-active { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px rgb(16 185 129 / .25); }
.b-ongoing { background: var(--grad-btn); color: #fff; box-shadow: none; }
.b-postponed, .b-pending, .b-injured { background: var(--amber-soft); color: var(--amber); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .3); }
.b-registration { background: rgb(132 204 22 / .14); color: #4d7c0f; box-shadow: inset 0 0 0 1px rgb(132 204 22 / .35); }
:root[data-theme='dark'] .b-registration { color: #bef264; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .b-registration { color: #bef264; } }
.b-rejected, .b-suspended, .b-withdrawn { background: var(--red-soft); color: var(--red); box-shadow: inset 0 0 0 1px rgb(244 63 94 / .25); }
.b-bye, .b-draft, .b-retired { background: var(--muted-bg); color: var(--muted); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(225 29 72 / .55); } 70% { box-shadow: 0 0 0 7px rgb(225 29 72 / 0); } 100% { box-shadow: 0 0 0 0 rgb(225 29 72 / 0); } }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }

/* ---------- Crest & avatar ---------- */
.crest { flex: none; display: inline-block; filter: drop-shadow(0 1px 1.5px rgb(15 23 42 / .18)); }
.crest-tbd { display: inline-flex; align-items: center; justify-content: center; background: var(--muted-bg); color: var(--muted); clip-path: polygon(50% 0, 100% 13%, 100% 50%, 50% 100%, 0 50%, 0 13%); font-size: 11px; }
.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 30%; font-weight: 700; letter-spacing: .02em; font-family: var(--sans); }

/* ---------- Competition cards ---------- */
.comp-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.comp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: inherit; }
.comp-top { padding: 20px 20px 16px; position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, #0b1b4d, #1d4ed8 70%, #0891b2); }
.comp-top::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgb(255 255 255 / .05) 0 26px, transparent 26px 52px); }
.comp-top::after { content: ''; position: absolute; right: -46px; bottom: -70px; width: 150px; height: 150px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .16); }
.comp-top > * { position: relative; z-index: 1; }
.comp-top .kicker { color: #a5f3fc; }
.comp-top h3 { color: #fff; font-size: 19px; line-height: 1.2; padding-right: 70px; }
.comp-top .badge { position: absolute; right: 16px; top: 16px; z-index: 2; }
.comp-top .b-ongoing { background: #84cc16; color: #1a2e05; }
.comp-top .meta { font-size: 12px; color: rgb(255 255 255 / .75); margin-top: 8px; }
.comp-body { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.comp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.comp-stats small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.comp-stats strong { font-family: var(--display); font-size: 24px; font-weight: 700; }
.progress { height: 6px; background: var(--muted-bg); border-radius: 6px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--grad); border-radius: 6px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.leader { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 13px; margin-top: auto; }
.leader small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.leader .ico { color: var(--primary); }

/* ---------- Competition detail ---------- */
.banner {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 26px 28px 0; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.banner::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.banner h2 { font-size: 32px; letter-spacing: -.03em; }
.banner p.desc { color: var(--muted); max-width: 720px; margin-top: 6px; }
.pub-links { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 8px 10px 8px 14px; border-radius: 12px; background: var(--muted-bg); font-size: 12.5px; color: var(--muted); }
.pub-links .ico { color: var(--primary); }
.pub-links a:not(.btn) { color: var(--primary); font-weight: 600; word-break: break-all; }
.pub-links .btn { margin-left: auto; }
.pub-links .btn + .btn { margin-left: 0; }
.banner-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; position: relative; z-index: 1; }
.banner .hero-meta { margin-top: 20px; position: relative; z-index: 1; }
.tabs { display: flex; gap: 2px; margin-top: 18px; position: relative; z-index: 1; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line-2); margin-left: -28px; margin-right: -28px; padding: 0 20px; }
.tabs a { padding: 13px 14px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--primary); border-image: var(--grad) 1; border-bottom: 3px solid; }
.champion-ribbon { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 7px 16px 7px 10px; background: rgb(132 204 22 / .14); border: 1px solid rgb(132 204 22 / .4); border-radius: 999px; font-size: 13px; font-weight: 600; position: relative; z-index: 1; }
.champion-ribbon .ico { color: #65a30d; }

/* ---------- Fixtures ---------- */
.round-head { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); border-top: 1px solid var(--line-2); }
.round-head:first-child { border-top: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.round-head h4 { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.fixture { display: grid; grid-template-columns: 120px minmax(0, 1fr) 96px minmax(0, 1fr) 150px 92px; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.fixture:last-child { border-bottom: 0; }
.fixture:hover { background: var(--surface-2); }
.fixture .when { font-size: 12px; color: var(--muted); line-height: 1.35; }
.fixture .when strong { display: block; color: var(--ink-2); font-weight: 600; }
.fixture .home { justify-self: end; }
.fixture .home .team-cell { flex-direction: row-reverse; text-align: right; }
.score-box { justify-self: center; min-width: 80px; text-align: center; padding: 4px 10px; border-radius: 10px; font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: .04em; background: var(--muted-bg); border: 1px solid var(--line); font-variant-numeric: lining-nums tabular-nums; }
.score-box.done { background: var(--scoreboard); color: #f8fafc; border-color: var(--scoreboard); }
.score-box.live { background: var(--red-soft); color: var(--red); border-color: rgb(244 63 94 / .35); }
.score-box.pending { font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.score-sub { display: block; font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .02em; color: inherit; opacity: .7; margin-top: -2px; }
.fixture .venue { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixture .acts { justify-self: end; display: flex; gap: 4px; align-items: center; }

.mini-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.mini-match:last-child { border-bottom: 0; }
.mini-match:hover { background: var(--surface-2); color: inherit; }
.mini-match .h { display: flex; justify-content: flex-end; align-items: center; gap: 9px; text-align: right; font-weight: 600; min-width: 0; }
.mini-match .a { display: flex; align-items: center; gap: 9px; font-weight: 600; min-width: 0; }
.mini-match .h span, .mini-match .a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-match .mid { text-align: center; }
.mini-meta { grid-column: 1 / -1; display: flex; justify-content: center; gap: 10px; font-size: 11px; color: var(--muted); margin-top: -4px; }

/* ---------- Bracket ---------- */
.bracket-wrap { overflow-x: auto; padding: 24px 20px 28px; }
.bracket { display: flex; gap: 0; min-width: max-content; }
.b-round { display: flex; flex-direction: column; width: 250px; }
.b-round-title { text-align: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); font-weight: 700; margin-bottom: 14px; }
.b-round-title small { display: block; color: var(--muted); letter-spacing: .02em; text-transform: none; font-weight: 500; font-size: 11px; margin-top: 2px; }
.b-col { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.b-slot { position: relative; padding: 10px 26px; display: flex; align-items: center; flex: 1; }
.b-match { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: border-color .15s, transform .15s; position: relative; z-index: 1; }
.b-match:hover { border-color: var(--brand-1); transform: translateY(-1px); }
.b-match.live { border-color: rgb(244 63 94 / .5); box-shadow: 0 0 0 3px rgb(244 63 94 / .12); }
.b-team { display: flex; align-items: center; gap: 9px; padding: 8px 11px; font-size: 13px; }
.b-team + .b-team { border-top: 1px solid var(--line-2); }
.b-team .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-team .sc { font-family: var(--display); font-weight: 700; font-size: 18px; min-width: 18px; text-align: right; }
.b-team.win { font-weight: 700; }
.b-team.win .sc { color: var(--primary); }
.b-team.lose { color: var(--muted); }
.b-foot { font-size: 10.5px; font-weight: 500; color: var(--muted); background: var(--surface-2); padding: 4px 11px; display: flex; justify-content: space-between; border-top: 1px solid var(--line-2); }
.b-slot::after { content: ''; position: absolute; right: 0; width: 26px; border-top: 2px solid var(--line); top: 50%; }
.b-round:last-child .b-slot::after { display: none; }
.b-round:not(:first-child) .b-slot::before { content: ''; position: absolute; left: 0; width: 26px; border-top: 2px solid var(--line); top: 50%; }
.b-pair { display: flex; flex-direction: column; flex: 1; position: relative; }
.b-pair::after { content: ''; position: absolute; right: 0; top: 25%; bottom: 25%; border-right: 2px solid var(--line); }
.b-round:last-child .b-pair::after { display: none; }
.b-champion { display: flex; flex-direction: column; justify-content: center; align-items: center; padding-left: 26px; position: relative; }
.b-champion::before { content: ''; position: absolute; left: 0; width: 26px; border-top: 2px solid var(--line); top: 50%; }
.b-champion .card { width: 100%; text-align: center; padding: 22px 16px; background: linear-gradient(160deg, rgb(132 204 22 / .14), rgb(6 182 212 / .1)); border-color: rgb(132 204 22 / .4); }
.b-champion .ico { color: #65a30d; }
.b-champion h4 { font-size: 18px; margin-top: 6px; }

/* ---------- Scoreboard (LED stadium board) ---------- */
.scoreboard {
  border-radius: var(--radius-xl); padding: 26px 30px; color: #e2e8f0; margin-bottom: 22px; position: relative; overflow: hidden;
  background: radial-gradient(60% 120% at 50% 0%, rgb(37 99 235 / .35), transparent 60%), radial-gradient(40% 80% at 100% 100%, rgb(132 204 22 / .14), transparent 60%), var(--scoreboard);
  border: 1px solid rgb(255 255 255 / .08); box-shadow: var(--shadow-md);
}
.scoreboard::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.scoreboard::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgb(255 255 255 / .05) 1px, transparent 1.2px); background-size: 6px 6px; }
.scoreboard > * { position: relative; z-index: 1; }
.sb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: #94a3b8; flex-wrap: wrap; }
.sb-top a { color: #67e8f9; font-weight: 600; }
.sb-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; margin: 24px 0 8px; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.sb-team h3 { color: #fff; font-size: 22px; line-height: 1.15; }
.sb-team a:hover h3 { color: #67e8f9; }
.sb-team small { color: #94a3b8; font-size: 12px; }
.sb-score { display: flex; align-items: center; gap: 14px; padding: 6px 18px; border-radius: 18px; background: rgb(0 0 0 / .35); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
.sb-num { font-family: var(--display); font-size: 92px; font-weight: 700; line-height: 1; color: #fff; min-width: 64px; text-align: center; text-shadow: 0 0 24px rgb(96 165 250 / .55); font-variant-numeric: lining-nums tabular-nums; }
.sb-sep { font-family: var(--display); font-size: 54px; color: #84cc16; }
.sb-adj { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.sb-adj button { width: 36px; height: 32px; border-radius: 9px; border: 1px solid rgb(255 255 255 / .16); background: rgb(255 255 255 / .06); color: #e2e8f0; cursor: pointer; font: 700 12px var(--sans); }
.sb-adj button:hover { border-color: #67e8f9; color: #fff; background: rgb(6 182 212 / .2); }
.sb-status { text-align: center; margin-top: 8px; }
.sb-status .pen { display: block; color: #bef264; font-size: 13px; font-weight: 600; margin-top: 8px; }
.sb-controls { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / .08); }
.sb-controls .btn-ghost { background: rgb(255 255 255 / .06); color: #e2e8f0; border-color: rgb(255 255 255 / .16); }
.sb-controls .btn-ghost:hover { background: rgb(255 255 255 / .12); color: #fff; }

.sets-table { width: 100%; border-collapse: collapse; }
.sets-table th { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px; text-align: center; }
.sets-table th:first-child { text-align: left; }
.sets-table td { padding: 8px; text-align: center; border-top: 1px solid var(--line-2); }
.sets-table td:first-child { text-align: left; }
.sets-table input { width: 60px; height: 38px; text-align: center; border: 1px solid var(--input); border-radius: 10px; background: var(--surface); color: var(--ink); font: 700 18px var(--display); }
.sets-table input:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 4px rgb(59 130 246 / .15); }

.timeline { list-style: none; margin: 0; padding: 8px 0; }
.timeline li { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: center; padding: 7px 20px; }
.timeline li:hover { background: var(--surface-2); }
.timeline .min { text-align: center; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--primary); }
.ev { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.ev.home { justify-content: flex-end; text-align: right; }
.ev small { display: block; color: var(--muted); font-size: 11.5px; }
.ev .del { opacity: 0; }
.timeline li:hover .del { opacity: 1; }
.ev-mark { flex: none; width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; background: var(--grad-tile); color: #fff; }
.ev-mark.card-yellow { width: 14px; height: 19px; border-radius: 3px; background: #facc15; }
.ev-mark.card-red { width: 14px; height: 19px; border-radius: 3px; background: #e11d48; }
.ev-mark.card-green { width: 14px; height: 19px; border-radius: 3px; background: #16a34a; }
.ev-mark.neutral { background: var(--muted-bg); color: var(--ink-2); }
.ev-mark.og { background: var(--red-soft); color: var(--red); }

.details { display: grid; grid-template-columns: 1fr; }
.details div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.details div:last-child { border-bottom: 0; }
.details span:first-child { color: var(--muted); }
.details span:last-child { text-align: right; font-weight: 600; }

/* ---------- Profiles ---------- */
.profile-head { border-radius: var(--radius-xl); overflow: hidden; margin-bottom: 22px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.profile-band { position: relative; padding: 28px 30px; display: flex; gap: 24px; align-items: center; color: #fff; flex-wrap: wrap; }
.profile-band::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-55deg, rgb(255 255 255 / .06) 0 14px, transparent 14px 34px); }
.profile-band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgb(5 8 22 / .6), rgb(5 8 22 / .1)); }
.profile-band > * { position: relative; z-index: 1; }
.profile-band h2 { color: #fff; font-size: 36px; line-height: 1.05; letter-spacing: -.03em; }
.profile-band .kicker { color: rgb(255 255 255 / .8); }
.profile-band .sub { color: rgb(255 255 255 / .88); margin-top: 8px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.profile-band .sub span { display: inline-flex; align-items: center; gap: 6px; }
.profile-band .actions { margin-left: auto; align-self: flex-start; }
.profile-band .btn-ghost { background: rgb(255 255 255 / .14); border-color: rgb(255 255 255 / .3); color: #fff; }
.profile-band .btn-ghost:hover { background: rgb(255 255 255 / .24); color: #fff; }
.profile-band .badge { background: rgb(255 255 255 / .18); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .4); }
.profile-band .big-num { font-family: var(--display); font-size: 110px; line-height: .8; font-weight: 700; opacity: .95; text-shadow: 0 6px 30px rgb(0 0 0 / .35); }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.profile-stats div { padding: 14px 20px; border-right: 1px solid var(--line-2); }
.profile-stats div:last-child { border-right: 0; }
.profile-stats small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.profile-stats strong { font-family: var(--display); font-size: 30px; font-weight: 700; font-variant-numeric: lining-nums; }

.team-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: inherit; }
.team-card .stripe { position: absolute; left: 0; right: 0; top: 0; height: 5px; }
.team-card-top { display: flex; gap: 14px; align-items: center; }
.team-card h3 { font-size: 17px; line-height: 1.2; }
.team-card .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 12.5px; }
.team-card .facts small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.team-card .record { display: flex; gap: 6px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }

.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--surface-2); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .stat { font-family: var(--display); font-size: 24px; font-weight: 700; min-width: 34px; text-align: right; }
.rank { width: 24px; text-align: center; font-family: var(--display); font-weight: 700; color: var(--muted); font-size: 18px; }
.rank.r1 { color: var(--primary); }

.activity { list-style: none; margin: 0; padding: 6px 0; }
.activity li { display: flex; gap: 12px; padding: 10px 20px; font-size: 13px; }
.activity li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--grad-tile); margin-top: 6px; }
.activity small { display: block; color: var(--muted); font-size: 11.5px; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; }
.cal-head h3 { font-size: 20px; min-width: 190px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-dow:first-child { border-radius: var(--radius-lg) 0 0 0; }
.cal-dow:nth-child(7) { border-radius: 0 var(--radius-lg) 0 0; }
.cal-day { min-height: 116px; padding: 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .d { opacity: .4; }
.cal-day .d { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--ink-2); }
.cal-day.today .d { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; background: var(--grad-tile); color: #fff; border-radius: 10px; }
.cal-ev { display: block; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 7px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--brand-1); }
.cal-ev.done { background: var(--muted-bg); color: var(--ink-2); border-color: var(--muted); }
.cal-ev.live { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.cal-ev:hover { filter: brightness(.97); color: inherit; }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 4px; }

/* ---------- Bars ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 48px; align-items: center; gap: 12px; font-size: 12.5px; }
.bar-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; background: var(--muted-bg); border-radius: 10px; overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.bar-track span.gold { background: var(--grad); }
.bar-row .v { text-align: right; font-family: var(--display); font-size: 16px; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }

/* ---------- Forms & modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgb(5 8 22 / .55); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade .18s ease; }
.modal-wrap.closing { opacity: 0; transition: opacity .15s; }
.modal { position: relative; overflow: hidden; width: 100%; max-width: 560px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.modal::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); z-index: 1; }
.modal-wide { max-width: 780px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 14px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 20px; }
.modal-body { padding: 20px 24px; max-height: 66vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.modal-foot .spacer { flex: 1; }
.confirm-text { color: var(--ink-2); font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.span-2 { grid-column: span 2; }
.form-section { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field label i { color: var(--red); font-style: normal; }
.field small { color: var(--muted); font-size: 11.5px; }
.field input, .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--input); border-radius: 12px; background: var(--surface);
  font: inherit; font-size: 14px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.field input[type=color] { padding: 4px; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-1); box-shadow: 0 0 0 4px rgb(59 130 246 / .16); }
.field .invalid, .invalid { border-color: var(--red) !important; box-shadow: 0 0 0 4px rgb(225 29 72 / .12) !important; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand-1); }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; max-height: 240px; overflow-y: auto; background: var(--surface-2); }
.checklist .check span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 14px; background: #0b1020; color: #f1f5f9; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); border: 1px solid rgb(255 255 255 / .08); animation: fade .2s; transition: opacity .3s, transform .3s; }
.toast .ico { color: #84cc16; }
.toast.t-warn .ico { color: #fbbf24; }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 44px 24px; color: var(--muted); }
.empty .ico { color: var(--primary); }
.empty h4 { font-size: 17px; color: var(--ink); margin: 12px 0 4px; }
.empty p { max-width: 380px; margin: 0 auto 18px; }

.notice { display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgb(59 130 246 / .25); color: var(--accent-ink); font-size: 13px; margin-bottom: 18px; flex-wrap: wrap; }
.notice .ico { color: var(--primary); }
.notice strong { color: var(--ink); }
.notice > span { flex: 1; min-width: 200px; }
.notice .btn { margin-left: 0; }

/* ---------- Public club and player pages ---------- */
.pub-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.pub-brand { display: flex; align-items: center; gap: 10px; }
.pub-brand .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
.pub-brand strong { display: block; font-size: 18px; letter-spacing: -.02em; line-height: 1; }
.pub-brand small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.pub-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 28px 64px; }
.squad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding: 16px 20px 20px; }
.squad-card { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); transition: border-color .15s, transform .15s; }
.squad-card:hover { border-color: var(--brand-1); transform: translateY(-1px); color: inherit; }
.squad-card strong { display: block; font-size: 13px; font-weight: 600; }
.squad-card small { display: block; font-size: 11.5px; color: var(--muted); }
.num-badge { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-family: var(--display); font-size: 18px; font-weight: 700; }
.sponsor-pitch { border-color: rgb(132 204 22 / .45); background: linear-gradient(160deg, rgb(132 204 22 / .08), var(--surface) 60%); }
a.card.list-row { border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .pub-wrap { padding: 16px 14px 48px; } .pub-bar { padding: 10px 14px; } }

/* ---------- Plans and pricing ---------- */
.pricing-hero { text-align: center; max-width: 760px; margin: 18px auto 30px; }
.pricing-hero h1 { font-size: 40px; line-height: 1.12; letter-spacing: -.035em; margin-top: 6px; }
.pricing-hero p { color: var(--muted); font-size: 16px; margin-top: 12px; }
.price-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.price-card.featured { border: 2px solid var(--brand-1); box-shadow: var(--glow); }
.price-card h3 { font-size: 19px; }
.price-card .kicker { margin: 0; }
.price strong { display: block; font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1.05; }
.price span { display: block; font-size: 12.5px; color: var(--muted); }
.price-card ul { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; flex: 1; }
.price-card li { display: flex; gap: 8px; align-items: flex-start; }
.price-card li .ico { color: var(--brand-3); margin-top: 2px; }
.price-tag { position: absolute; top: -11px; right: 16px; padding: 3px 10px; border-radius: 999px; background: var(--grad-btn); color: #fff; font-size: 11px; font-weight: 700; }
.price-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.price-notes > div { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.price-notes .ico { color: var(--primary); flex: none; margin-top: 2px; }
.pass-chip { flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px; background: var(--grad-tile); color: #fff; font-family: var(--display); font-weight: 700; font-size: 17px; }
.ledger { flex: none; min-width: 40px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 18px; }
.ledger.plus { color: var(--green); } .ledger.minus { color: var(--muted); }
.table tr.row-focus td { background: var(--accent-soft); }
.upgrade-note { border-color: rgb(132 204 22 / .45); background: rgb(132 204 22 / .1); color: var(--ink); }
.upgrade-note .ico { color: #65a30d; }
.tpl-swatch.locked { opacity: .45; cursor: not-allowed; }
@media (max-width: 1280px) { .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .price-grid, .price-notes { grid-template-columns: 1fr; } .pricing-hero h1 { font-size: 28px; } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fixture { grid-template-columns: 100px minmax(0, 1fr) 90px minmax(0, 1fr) 72px; }
  .fixture .venue { display: none; }
}
@media (max-width: 1080px) {
  .g-main, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .search input { width: 220px; }
  .today { display: none; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-110%); transition: transform .25s ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 0; background: rgb(5 8 22 / .5); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; gap: 8px; }
  .topbar h1 { font-size: 18px; }
  .search input { width: 160px; }
  .search-results { width: min(92vw, 380px); right: -40px; }
  .view { padding: 18px 16px 48px; }
  .g-2, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .kpis, .kpis.k3, .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero, .banner, .page-head { padding: 22px 18px; }
  .banner { padding-bottom: 0; }
  .tabs { margin-left: -18px; margin-right: -18px; padding: 0 8px; }
  .hero h2, .banner h2 { font-size: 26px; }
  .page-head h2 { font-size: 24px !important; }
  .fixture { grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr); padding: 12px 14px; }
  .fixture .when { grid-column: 1 / -1; display: flex; gap: 8px; }
  .fixture .when strong { display: inline; }
  .fixture .acts { grid-column: 1 / -1; justify-self: center; }
  .fixture .team-cell span { font-size: 12.5px; }
  .sb-num { font-size: 58px; min-width: 40px; }
  .sb-team h3 { font-size: 16px; }
  .sb-score { padding: 4px 10px; gap: 8px; }
  .scoreboard { padding: 22px 14px; }
  .form-grid, .checklist { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .cal-day { min-height: 74px; padding: 4px; }
  .cal-ev { font-size: 0; padding: 0; height: 6px; border-left: 0; }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 40px; }
  .profile-band { padding: 22px; }
  .profile-band h2 { font-size: 28px; }
  .profile-band .actions { margin-left: 0; }
  .profile-band .big-num { font-size: 72px; }
}
@media (max-width: 520px) {
  .search { display: none; }
  .kpi .value { font-size: 34px; }
  .hero-meta div { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .sidebar, .topbar, .btn, .icon-btn, .tabs, .toolbar { display: none !important; }
  .main { margin: 0; }
  .view { padding: 0; }
  .card, .banner, .hero { box-shadow: none; break-inside: avoid; }
}

/* ---------- Guidelines ---------- */
.guide-roles { margin-bottom: 20px; }
.guide-intro .card-body { display: flex; gap: 16px; align-items: flex-start; }
.guide-intro .kpi-ic { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--grad); color: #fff; }
.guide-intro h3 { font-size: 18px; margin: 2px 0 6px; }
.guide-steps { list-style: none; counter-reset: step; display: grid; gap: 12px; margin: 0; padding: 0; }
.guide-steps li { counter-increment: step; position: relative; padding-left: 38px; line-height: 1.55; }
.guide-steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font: 700 14px var(--display); }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guide-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.guide-list li svg { flex-shrink: 0; margin-top: 3px; }
.guide-list.ok svg { color: var(--brand-3); }
.guide-list.no svg { color: #f43f5e; }
.guide b { font-weight: 600; color: var(--ink); }
@media print { .guide-roles { display: none; } }
@media (max-width: 520px) { .pub-bar .btn-row { flex-wrap: nowrap; gap: 6px; } .pub-brand small { display: none; } }
