/* Arena SMS — chic, formal visual language: ivory paper, midnight navy, antique gold. */
:root {
  --ink: #161b26;
  --ink-2: #3a4150;
  --muted: #747b89;
  --line: #e5e0d5;
  --line-2: #efebe3;
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --navy: #0e1a2f;
  --navy-2: #16253f;
  --navy-3: #22355a;
  --gold: #a8834a;
  --gold-2: #c6a46a;
  --gold-soft: #f4ede0;
  --green: #2f6b4f;
  --green-soft: #e7f0ea;
  --red: #9b2c2c;
  --red-soft: #f7e8e8;
  --amber: #9a6512;
  --amber-soft: #f8eedc;
  --blue: #2b4c7e;
  --blue-soft: #e7edf6;
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(14, 26, 47, .04), 0 6px 20px rgba(14, 26, 47, .05);
  --shadow-lg: 0 24px 60px rgba(14, 26, 47, .22);
  --sidebar: 264px;
}

* { 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;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: .005em; 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(--serif); }
.gold { color: var(--gold); }

/* ---------- Shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  display: flex; flex-direction: column;
  background: var(--navy);
  background-image: radial-gradient(120% 60% at 0% 0%, rgba(198, 164, 106, .10), transparent 60%);
  color: #c9cfdb; border-right: 1px solid rgba(198, 164, 106, .18);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 26px 24px 22px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand:hover { color: inherit; }
.brand-mark { width: 38px; height: 44px; color: var(--gold-2); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text strong { display: block; font-family: var(--serif); font-size: 25px; font-weight: 600; color: #f6f1e7; line-height: 1; letter-spacing: .02em; }
.brand-text small { display: block; margin-top: 5px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); }
.nav { flex: 1; overflow-y: auto; padding: 14px 14px 20px; scrollbar-width: thin; scrollbar-color: rgba(198, 164, 106, .25) transparent; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(198, 164, 106, .25); border-radius: 6px; }
.nav-group { margin-top: 14px; }
.nav-label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #6f7a90; padding: 0 12px 7px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin: 1px 0; border-radius: 8px; font-size: 13.5px; color: #c3cad8;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(198, 164, 106, .16), rgba(198, 164, 106, .03)); color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-2); }
.nav a.active .ico { color: var(--gold-2); }
.sidebar-foot { padding: 16px 24px 22px; border-top: 1px solid rgba(255, 255, 255, .06); }
.season-pill { display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); border: 1px solid rgba(198, 164, 106, .4); border-radius: 30px; padding: 5px 12px; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  padding: 18px 40px; background: rgba(245, 243, 238, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar h1 { font-size: 30px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.crumbs a:hover { color: var(--gold); }
.crumbs i { font-style: normal; margin: 0 8px; color: var(--line); }
.topbar-tools { display: flex; align-items: center; gap: 18px; }
.today { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.today .ico { color: var(--gold); }
.menu-btn { display: none; }

.search { position: relative; }
.search input {
  width: 300px; height: 38px; padding: 0 14px 0 36px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); font: inherit; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(198, 164, 106, .18); }
.search-icon { position: absolute; left: 13px; top: 11px; color: var(--muted); display: flex; }
.search-results {
  display: none; position: absolute; right: 0; top: 46px; width: 380px; max-height: 70vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px;
}
.search-results.open { display: block; }
.sr-group { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); padding: 10px 10px 4px; }
.sr-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; }
.sr-item:hover { background: var(--surface-2); color: inherit; }
.sr-item strong { display: block; font-weight: 500; 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: 32px 40px 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: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
  font: 500 13px var(--sans); letter-spacing: .01em; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-primary { background: var(--navy); color: #f6f1e7; }
.btn-primary:hover { background: var(--navy-3); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #94723e; color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--gold-2); color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #812424; color: #fff; }
.btn-soft-danger { background: var(--surface); border-color: var(--line); color: var(--red); }
.btn-soft-danger:hover { border-color: var(--red); color: var(--red); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.icon-btn.danger:hover { color: var(--red); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { color: var(--muted); max-width: 640px; }
.kicker { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .grow { flex: 1; }
.input, .toolbar select, .toolbar input {
  height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; 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 { border-color: var(--gold-2); }
.seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.seg button, .seg a { border: 0; background: transparent; font: 500 12.5px var(--sans); color: var(--muted); padding: 6px 14px; border-radius: 6px; cursor: pointer; }
.seg .on { background: var(--navy); color: #f6f1e7; }
.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); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 21px; }
.card-head .link { font-size: 12px; color: var(--gold); display: inline-flex; align-items: center; gap: 4px; }
.card-body { padding: 18px 22px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 22px; }
.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: 22px; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin-bottom: 26px; }
.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi .label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .label .ico { color: var(--gold); }
.kpi .value { font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1.1; margin-top: 8px; font-variant-numeric: lining-nums tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 14px; padding: 34px 38px; margin-bottom: 26px;
  background: var(--navy); color: #e7e2d7;
  background-image: radial-gradient(90% 140% at 100% 0%, rgba(198, 164, 106, .22), transparent 55%), linear-gradient(135deg, #0e1a2f, #182a48);
  border: 1px solid rgba(198, 164, 106, .25);
}
.hero::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 300px; height: 300px; border: 1px solid rgba(198, 164, 106, .2); border-radius: 50%; }
.hero::before { content: ''; position: absolute; right: 30px; bottom: -120px; width: 300px; height: 300px; border: 1px solid rgba(198, 164, 106, .12); border-radius: 50%; }
.hero h2 { font-size: 40px; color: #faf6ee; font-weight: 600; }
.hero .kicker { color: var(--gold-2); }
.hero p { color: #aeb6c6; margin-top: 6px; max-width: 620px; }
.hero .btn-row { margin-top: 22px; position: relative; z-index: 1; }
.hero .btn-ghost { background: transparent; color: #e7e2d7; border-color: rgba(231, 226, 215, .3); }
.hero .btn-ghost:hover { border-color: var(--gold-2); color: #fff; }
.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: 30px; flex-wrap: wrap; }
.hero-meta div { min-width: 90px; }
.hero-meta small { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #8590a6; }
.hero-meta strong { display: block; font-family: var(--serif); font-size: 22px; color: #faf6ee; font-weight: 600; margin-top: 2px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 12px 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: #fcfbf8; }
.table th.num, .table td.num { text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.table .pts { font-weight: 700; font-family: var(--serif); font-size: 17px; }
.table tr.clickable { cursor: pointer; }
.pos { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 600; font-size: 12px; color: var(--ink-2); }
.pos.p1 { background: var(--gold); color: #fff; }
.pos.zone-top { box-shadow: inset 0 0 0 1.5px var(--gold-2); }
.pos.zone-bottom { box-shadow: inset 0 0 0 1.5px #d9a5a5; }
.team-cell { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.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: 500; }
.person-cell small { display: block; color: var(--muted); font-size: 11.5px; }
.form-pills { display: inline-flex; gap: 3px; }
.fp { width: 20px; height: 20px; border-radius: 4px; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.fp.W { background: var(--green); } .fp.D { background: #a7a197; } .fp.L { background: var(--red); }
.legend { display: flex; gap: 18px; padding: 12px 22px; 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: 50%; margin-right: 6px; vertical-align: -1px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 30px; font-size: 11px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.b-live { background: var(--red-soft); color: var(--red); }
.b-scheduled, .b-upcoming { background: var(--blue-soft); color: var(--blue); }
.b-completed, .b-approved, .b-active { background: var(--green-soft); color: var(--green); }
.b-ongoing { background: var(--navy); color: #f0e6d2; }
.b-postponed, .b-pending, .b-injured { background: var(--amber-soft); color: var(--amber); }
.b-registration { background: var(--gold-soft); color: #7d5f2f; }
.b-rejected, .b-suspended, .b-withdrawn { background: var(--red-soft); color: var(--red); }
.b-bye, .b-draft, .b-retired { background: var(--line-2); 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 rgba(155, 44, 44, .55); } 70% { box-shadow: 0 0 0 7px rgba(155, 44, 44, 0); } 100% { box-shadow: 0 0 0 0 rgba(155, 44, 44, 0); } }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); padding: 3px 10px; border: 1px solid var(--line); border-radius: 30px; background: var(--surface); }

/* ---------- Crest & avatar ---------- */
.crest { flex: none; display: inline-block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .12)); }
.crest-tbd { display: inline-flex; align-items: center; justify-content: center; background: var(--line-2); 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: 50%; font-weight: 600; 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(-2px); box-shadow: 0 12px 34px rgba(14, 26, 47, .1); color: inherit; }
.comp-top { padding: 22px 22px 18px; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #e7e2d7; position: relative; overflow: hidden; }
.comp-top::after { content: ''; position: absolute; right: -50px; top: -50px; width: 160px; height: 160px; border-radius: 50%; border: 1px solid rgba(198, 164, 106, .25); }
.comp-top .kicker { color: var(--gold-2); }
.comp-top h3 { color: #faf6ee; font-size: 24px; line-height: 1.15; }
.comp-top .badge { position: absolute; right: 18px; top: 18px; z-index: 1; }
.comp-top .meta { font-size: 12px; color: #9aa5ba; margin-top: 8px; }
.comp-body { padding: 18px 22px 20px; 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: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.comp-stats strong { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.progress { height: 5px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 5px; }
.progress-label { display: flex; justify-content: space-between; font-size: 11.5px; 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: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Competition detail ---------- */
.banner {
  border-radius: 14px; padding: 30px 34px 0; margin-bottom: 24px; color: #e7e2d7; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0e1a2f, #1c2f50); border: 1px solid rgba(198, 164, 106, .25);
}
.banner::after { content: ''; position: absolute; right: 60px; top: -120px; width: 340px; height: 340px; border-radius: 50%; border: 1px solid rgba(198, 164, 106, .18); }
.banner h2 { color: #faf6ee; font-size: 38px; }
.banner .kicker { color: var(--gold-2); }
.banner p.desc { color: #a9b2c3; max-width: 720px; margin-top: 6px; }
.banner-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; position: relative; z-index: 1; }
.banner .btn-ghost { background: rgba(255, 255, 255, .04); color: #e7e2d7; border-color: rgba(231, 226, 215, .25); }
.banner .btn-ghost:hover { border-color: var(--gold-2); color: #fff; }
.banner .hero-meta { margin-top: 22px; position: relative; z-index: 1; }
.tabs { display: flex; gap: 4px; margin-top: 24px; position: relative; z-index: 1; overflow-x: auto; }
.tabs a { padding: 12px 16px; font-size: 13px; color: #9aa5ba; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: #fff; }
.tabs a.on { color: #fff; border-color: var(--gold-2); }
.champion-ribbon { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 8px 16px 8px 10px; background: rgba(198, 164, 106, .14); border: 1px solid rgba(198, 164, 106, .4); border-radius: 30px; color: #f3e6c9; font-size: 13px; position: relative; z-index: 1; }
.champion-ribbon .ico { color: var(--gold-2); }

/* ---------- Fixtures ---------- */
.round-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 22px; 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; }
.round-head h4 { font-size: 18px; }
.fixture { display: grid; grid-template-columns: 120px minmax(0, 1fr) 96px minmax(0, 1fr) 150px 92px; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line-2); }
.fixture:last-child { border-bottom: 0; }
.fixture:hover { background: #fcfbf8; }
.fixture .when { font-size: 12px; color: var(--muted); line-height: 1.35; }
.fixture .when strong { display: block; color: var(--ink-2); font-weight: 500; }
.fixture .home { justify-self: end; }
.fixture .home .team-cell { flex-direction: row-reverse; text-align: right; }
.score-box { justify-self: center; min-width: 78px; text-align: center; padding: 5px 10px; border-radius: 7px; font-family: var(--serif); font-size: 19px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: lining-nums tabular-nums; }
.score-box.done { background: var(--navy); color: #f6f1e7; border-color: var(--navy); }
.score-box.live { background: var(--red-soft); color: var(--red); border-color: #e9c6c6; }
.score-box.pending { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--muted); }
.score-sub { display: block; font-family: var(--sans); font-size: 10px; font-weight: 500; letter-spacing: .02em; color: var(--muted); 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; }

/* Compact match list (dashboard) */
.mini-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 13px 22px; border-bottom: 1px solid var(--line-2); }
.mini-match:last-child { border-bottom: 0; }
.mini-match:hover { background: #fcfbf8; color: inherit; }
.mini-match .h { display: flex; justify-content: flex-end; align-items: center; gap: 9px; text-align: right; font-weight: 500; min-width: 0; }
.mini-match .a { display: flex; align-items: center; gap: 9px; font-weight: 500; 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: 26px 22px 30px; }
.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: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 14px; }
.b-round-title small { display: block; color: var(--muted); letter-spacing: .04em; text-transform: none; font-weight: 400; 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: 9px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: border-color .15s; position: relative; z-index: 1; }
.b-match:hover { border-color: var(--gold-2); }
.b-match.live { border-color: #e2b3b3; }
.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(--serif); font-weight: 700; font-size: 16px; min-width: 18px; text-align: right; }
.b-team.win { font-weight: 600; }
.b-team.win .sc { color: var(--gold); }
.b-team.lose { color: var(--muted); }
.b-foot { font-size: 10.5px; 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: 1px solid #cfc6b4; 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: 1px solid #cfc6b4; 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: 1px solid #cfc6b4; }
.b-round:last-child .b-pair::after { display: none; }
.b-champion { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 230px; padding-left: 26px; position: relative; }
.b-champion::before { content: ''; position: absolute; left: 0; width: 26px; border-top: 1px solid #cfc6b4; top: 50%; }
.b-champion .card { width: 100%; text-align: center; padding: 22px 16px; background: linear-gradient(160deg, #fffdf8, var(--gold-soft)); border-color: #e3d2b0; }
.b-champion .ico { color: var(--gold); }
.b-champion h4 { font-size: 22px; margin-top: 6px; }

/* ---------- Scoreboard ---------- */
.scoreboard {
  border-radius: 16px; padding: 30px 34px; color: #e7e2d7; margin-bottom: 24px; position: relative; overflow: hidden;
  background: radial-gradient(70% 120% at 50% 0%, rgba(198, 164, 106, .18), transparent 60%), linear-gradient(160deg, #0e1a2f, #1a2c4b);
  border: 1px solid rgba(198, 164, 106, .3);
}
.sb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: #9aa5ba; flex-wrap: wrap; }
.sb-top a { color: var(--gold-2); }
.sb-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; margin: 26px 0 10px; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.sb-team h3 { color: #faf6ee; font-size: 26px; line-height: 1.1; }
.sb-team a:hover h3 { color: var(--gold-2); }
.sb-team small { color: #8d98ad; font-size: 12px; }
.sb-score { display: flex; align-items: center; gap: 18px; }
.sb-num { font-family: var(--serif); font-size: 86px; font-weight: 600; line-height: 1; color: #fff; min-width: 70px; text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.sb-sep { font-family: var(--serif); font-size: 50px; color: var(--gold-2); }
.sb-adj { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.sb-adj button { width: 34px; height: 30px; border-radius: 7px; border: 1px solid rgba(231, 226, 215, .25); background: rgba(255, 255, 255, .04); color: #e7e2d7; cursor: pointer; font: 600 12px var(--sans); }
.sb-adj button:hover { border-color: var(--gold-2); color: #fff; background: rgba(198, 164, 106, .15); }
.sb-status { text-align: center; margin-top: 6px; }
.sb-status .pen { display: block; color: var(--gold-2); font-size: 13px; margin-top: 8px; }
.sb-controls { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sb-controls .btn-ghost { background: rgba(255, 255, 255, .04); color: #e7e2d7; border-color: rgba(231, 226, 215, .25); }
.sb-controls .btn-ghost:hover { border-color: var(--gold-2); color: #fff; }

.sets-table { width: 100%; border-collapse: collapse; }
.sets-table th { font-size: 10.5px; letter-spacing: .14em; 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: 58px; height: 34px; text-align: center; border: 1px solid var(--line); border-radius: 7px; font: 600 15px var(--sans); }
.sets-table input:focus { outline: none; border-color: var(--gold-2); }

.timeline { list-style: none; margin: 0; padding: 8px 0; }
.timeline li { display: grid; grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); align-items: center; padding: 7px 22px; }
.timeline li:hover { background: #fcfbf8; }
.timeline .min { text-align: center; font-family: var(--serif); font-weight: 700; font-size: 16px; color: var(--gold); }
.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: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; background: var(--navy); color: var(--gold-2); }
.ev-mark.card-yellow { width: 13px; height: 18px; border-radius: 2px; background: #e9be2b; }
.ev-mark.card-red { width: 13px; height: 18px; border-radius: 2px; background: #c0392b; }
.ev-mark.card-green { width: 13px; height: 18px; border-radius: 2px; background: #2e8b57; }
.ev-mark.neutral { background: var(--line-2); 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 dt, .details span:first-child { color: var(--muted); }
.details span:last-child { text-align: right; font-weight: 500; }

/* ---------- Profiles ---------- */
.profile-head { border-radius: 14px; overflow: hidden; margin-bottom: 24px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.profile-band { position: relative; padding: 30px 34px; display: flex; gap: 26px; align-items: center; color: #fff; flex-wrap: wrap; }
.profile-band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10, 16, 28, .55), rgba(10, 16, 28, .1)); }
.profile-band > * { position: relative; z-index: 1; }
.profile-band h2 { color: #fff; font-size: 40px; line-height: 1.05; }
.profile-band .kicker { color: rgba(255, 255, 255, .78); }
.profile-band .sub { color: rgba(255, 255, 255, .85); margin-top: 6px; 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: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
.profile-band .btn-ghost:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.profile-band .big-num { font-family: var(--serif); font-size: 90px; line-height: .8; font-weight: 700; opacity: .9; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); border-top: 1px solid var(--line); }
.profile-stats div { padding: 16px 22px; border-right: 1px solid var(--line-2); }
.profile-stats div:last-child { border-right: 0; }
.profile-stats small { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.profile-stats strong { font-family: var(--serif); font-size: 28px; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }

.team-card { padding: 22px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.team-card:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(14, 26, 47, .1); color: inherit; }
.team-card .stripe { position: absolute; left: 0; right: 0; top: 0; height: 4px; }
.team-card-top { display: flex; gap: 14px; align-items: center; }
.team-card h3 { font-size: 22px; line-height: 1.15; }
.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: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.team-card .record { display: flex; gap: 6px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .stat { font-family: var(--serif); font-size: 22px; font-weight: 700; min-width: 34px; text-align: right; }
.rank { width: 22px; text-align: center; font-family: var(--serif); font-weight: 700; color: var(--muted); font-size: 16px; }
.rank.r1 { color: var(--gold); }

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

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 12px; }
.cal-head h3 { font-size: 26px; min-width: 210px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-day { min-height: 118px; 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: #fbfaf7; }
.cal-day.out .d { color: #c4beb2; }
.cal-day .d { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--ink-2); }
.cal-day.today .d { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; background: var(--navy); color: var(--gold-2); border-radius: 50%; }
.cal-ev { display: block; font-size: 11px; padding: 3px 7px; border-radius: 5px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--blue); }
.cal-ev.done { background: var(--line-2); color: var(--ink-2); border-color: #b8b0a0; }
.cal-ev.live { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.cal-ev:hover { filter: brightness(.96); 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: 9px; background: var(--line-2); border-radius: 9px; overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--navy-3), var(--navy)); }
.bar-track span.gold { background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.bar-row .v { text-align: right; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }

/* ---------- Forms & modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(10, 16, 28, .5); backdrop-filter: blur(3px); 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 { width: 100%; max-width: 560px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.modal-wide { max-width: 780px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 26px 16px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 26px; }
.modal-body { padding: 22px 26px; max-height: 66vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.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: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; padding-top: 8px; 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: 12px; font-weight: 500; 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: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  font: inherit; font-size: 13.5px; 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(--gold-2); box-shadow: 0 0 0 3px rgba(198, 164, 106, .16); }
.field .invalid, .invalid { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(155, 44, 44, .1) !important; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--navy); }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; 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 18px; border-radius: 10px; background: var(--navy); color: #f0e9da; font-size: 13px; box-shadow: var(--shadow-lg); border-left: 3px solid var(--gold-2); animation: fade .2s; transition: opacity .3s, transform .3s; }
.toast .ico { color: var(--gold-2); }
.toast.t-warn { border-left-color: #e2a33a; }
.toast.out { opacity: 0; transform: translateY(6px); }

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

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 10px; background: var(--gold-soft); border: 1px solid #e8d8b8; color: #6f5428; font-size: 13px; margin-bottom: 20px; }
.notice .ico { color: var(--gold); margin-top: 2px; }
.notice strong { color: #5a431e; }
.notice .btn { margin-left: auto; }

/* ---------- 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: 1fr; }
  .search input { width: 220px; }
  .today { display: none; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(10, 16, 28, .45); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 14px 16px; gap: 10px; }
  .topbar h1 { font-size: 24px; }
  .search input { width: 160px; }
  .search-results { width: min(92vw, 380px); right: -40px; }
  .view { padding: 20px 16px 48px; }
  .g-2, .g-4 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero, .banner { padding: 24px 22px; }
  .banner { padding-bottom: 0; }
  .hero h2, .banner h2 { font-size: 30px; }
  .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: 56px; min-width: 44px; }
  .sb-team h3 { font-size: 18px; }
  .scoreboard { padding: 22px 16px; }
  .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: 30px; }
  .profile-band .actions { margin-left: 0; }
}
@media (max-width: 520px) {
  .search { display: none; }
  .kpi .value { font-size: 30px; }
}

@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; }
  .banner, .scoreboard { background: #fff !important; color: #000; border: 1px solid #ccc; }
  .banner h2 { color: #000; }
}
