/* =====================================================================
   FERWABA League Manager — interface styles
   Sits on top of the bundled Bootstrap grid/utilities (assets/css/bootstrap.css)
   ===================================================================== */

:root {
  --navy: #0E2235;          /* FERWABA wordmark navy: sidebar, ink */
  --navy-2: #163049;
  --navy-3: #22405D;
  --blue: #0A84C6;          /* Rwanda sky blue, deepened for contrast: actions */
  --blue-ink: #075E8D;
  --blue-soft: #E3F1FA;
  --orange: #E8831A;        /* basketball orange: "today" and active markers only */
  --orange-soft: #FDF0E1;
  --green: #1E8A4F;         /* wins, qualification */
  --green-soft: #E4F3EA;
  --red: #C13B2A;           /* losses, results overdue, destructive */
  --red-soft: #FBE9E6;
  --court: #F2F4F7;         /* page background */
  --surface: #FFFFFF;
  --line: #DCE2EA;
  --line-soft: #EBEFF4;
  --ink: #102233;
  --ink-2: #44566A;
  --ink-3: #6B7C8F;

  --font-body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow", "Arial Narrow", "Segoe UI", sans-serif;

  --r-panel: 10px;
  --r-control: 6px;
  --sidebar-w: 252px;
  --shadow-pop: 0 12px 32px rgba(14, 34, 53, .18);
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--court);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: .005em;
  line-height: 1.15;
  margin: 0;
}
a { color: var(--blue-ink); text-decoration: none; }
a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 3px solid rgba(10, 132, 198, .45); outline-offset: 2px; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.text-muted, .muted { color: var(--ink-3) !important; }
.small-print { font-size: 13px; color: var(--ink-3); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- App shell ---------- */
.app { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--navy); color: #C9D5E2;
  display: flex; flex-direction: column; z-index: 1040;
  transition: transform .2s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 18px; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-brand:hover { text-decoration: none; color: #fff; }
.sidebar-brand img { width: 44px; height: auto; flex: none; }
.sidebar-brand strong { display: block; font-family: var(--font-display); font-size: 19px; line-height: 1.05; letter-spacing: .01em; }
.sidebar-brand span { display: block; font-size: 12.5px; color: #8EA3B9; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 12px 20px; }
.nav-group { margin-top: 16px; }
.nav-group-title { padding: 0 10px 6px; font-size: 12.5px; font-weight: 600; color: #7690AA; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; margin: 1px 0; border-radius: var(--r-control);
  color: #C9D5E2; font-weight: 500; font-size: 15px;
}
.side-link i { font-size: 17px; width: 20px; text-align: center; color: #8EA3B9; }
.side-link:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.side-link:hover i { color: #fff; }
.side-link.active { background: var(--navy-3); color: #fff; }
.side-link.active i { color: var(--orange); }
.side-link.active::before {
  content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--orange);
}
.sidebar-account { padding: 8px 12px; border-top: 1px solid rgba(255,255,255,.07); }
.side-logout:hover { background: rgba(214,69,69,.18); color: #fff; }
.side-logout:hover i { color: #FF9B9B; }
.sidebar-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12.5px; color: #7690AA; }
.sidebar-foot img { height: 22px; opacity: .85; filter: brightness(0) invert(1); }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 28px;
  background: rgba(242, 244, 247, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .crumbs { font-size: 14px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumbs a { color: var(--ink-3); }
.topbar .crumbs b { color: var(--ink); font-weight: 600; }
.menu-btn { display: none; border: 0; background: none; font-size: 24px; color: var(--ink); padding: 4px; margin-left: -6px; }
.user-chip {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  border: 1px solid transparent; background: none; border-radius: 999px; padding: 4px 6px 4px 4px; color: var(--ink);
}
.user-chip:hover, .user-chip[aria-expanded="true"] { background: var(--surface); border-color: var(--line); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
.user-chip .who { text-align: left; line-height: 1.15; }
.user-chip .who b { display: block; font-size: 14px; font-weight: 600; }
.user-chip .who small { font-size: 12.5px; color: var(--ink-3); }
.content { flex: 1; padding: 26px 28px 40px; max-width: 1440px; width: 100%; }
.app-footer { padding: 16px 28px 22px; font-size: 13px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.app-footer a { color: var(--ink-2); }
.scrim { display: none; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-pop); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(14,34,53,.45); z-index: 1030; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px 32px; }
  .app-footer { padding: 14px 16px 20px; }
  .user-chip .who { display: none; }
}

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; margin-bottom: 22px; }
.page-head .titles { flex: 1 1 320px; min-width: 0; }
.page-head h1 { font-size: 30px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); max-width: 70ch; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.season-picker { display: flex; align-items: center; gap: 8px; }
.season-picker label { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }
.season-picker .form-select { min-width: 260px; font-weight: 600; }
@media (max-width: 575.98px) {
  .page-head h1 { font-size: 25px; }
  .season-picker, .season-picker .form-select { width: 100%; min-width: 0; }
  .season-picker label { display: none; }
}

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); margin-bottom: 20px; min-width: 0; }
.panel-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.panel-head h2 { font-size: 19px; }
.panel-head .meta { font-size: 13.5px; color: var(--ink-3); }
.panel-head .tools { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Key-figure strip: one panel, dividers between figures (not a card per number) */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figure { padding: 16px 20px; border-left: 1px solid var(--line-soft); }
.figure:first-child { border-left: 0; }
.figure .value { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.figure .label { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.figure .hint { font-size: 12.5px; color: var(--ink-3); }
.figure.alert-figure .value { color: var(--red); }
@media (max-width: 767.98px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure:nth-child(3) { border-left: 0; }
  .figure:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .figure .value { font-size: 28px; }
}

/* Season progress bar */
.progress-track { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; display: flex; }
.progress-track .done { background: var(--navy); }
.progress-track .due { background: var(--red); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }

/* ---------- Crests ---------- */
.crest { flex: none; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.crest-sm { width: 26px; height: 26px; font-size: 10.5px; }
.crest-md { width: 34px; height: 34px; font-size: 12.5px; }
.crest-lg { width: 64px; height: 64px; font-size: 22px; }
.crest-xl { width: 92px; height: 92px; font-size: 30px; }
.crest-initials {
  display: inline-grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; letter-spacing: .02em;
  color: hsl(var(--h) 45% 28%); background: hsl(var(--h) 55% 93%); border-color: hsl(var(--h) 40% 84%);
}
.team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Scoreboard strips (the signature element) ---------- */
.fixtures { list-style: none; margin: 0; padding: 0; }
.fixture {
  display: grid; grid-template-columns: 92px minmax(0,1fr) auto minmax(0,1fr) auto;
  align-items: center; gap: 14px; padding: 11px 18px; border-top: 1px solid var(--line-soft);
}
.fixture:first-child { border-top: 0; }
.fixture.linked { cursor: pointer; }
.fixture.linked:hover { background: #F7F9FB; }
.fixture .when { font-size: 13px; color: var(--ink-3); line-height: 1.25; }
.fixture .when b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.fixture .home { justify-content: flex-end; text-align: right; }
.fixture .home .team { flex-direction: row-reverse; }
.fixture .side { display: flex; min-width: 0; }
.fixture .side.won .name { color: var(--ink); }
.fixture .side.lost .name { color: var(--ink-3); font-weight: 500; }
.score {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  min-width: 96px; padding: 3px 10px; border-radius: 6px;
  background: var(--navy); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.2;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.score .sep { color: #6F87A0; margin: 0 4px; font-weight: 600; }
.score .lose { color: #9DB0C3; }
.score.vs { background: var(--court); color: var(--ink-3); font-size: 15px; font-weight: 600; border: 1px solid var(--line); }
.fixture .end { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.fixture .venue { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 767.98px) {
  .fixture { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 6px 10px; padding: 12px 14px; }
  .fixture .when { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
  .fixture .when b { display: inline; }
  .fixture .end { grid-column: 1 / -1; justify-content: flex-start; }
  .score { min-width: 76px; font-size: 18px; }
  .fixture .team { gap: 7px; }
  .fixture .team .name { white-space: normal; font-size: 14px; line-height: 1.2; }
}

/* ---------- Status chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent; line-height: 1.5;
}
.chip-final { color: var(--ink-2); border-color: var(--line); background: #fff; }
.chip-today { color: #fff; background: var(--orange); }
.chip-upcoming { color: var(--blue-ink); background: var(--blue-soft); }
.chip-pending { color: var(--red); background: var(--red-soft); }
.chip-postponed { color: #8A5A00; background: #FFF4D6; }
.chip-neutral { color: var(--ink-2); background: var(--line-soft); }
.chip-green { color: var(--green); background: var(--green-soft); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th {
  text-align: left; font-weight: 600; font-size: 13px; color: var(--ink-3);
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap;
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #F8FAFC; }
.tbl .c { text-align: center; }
.tbl .r { text-align: right; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .strong { font-weight: 700; }
.tbl tr.is-hidden { display: none; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }

/* Standings */
.standings td.pos { width: 46px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink-2); }
.standings tr.zone-q td.pos { box-shadow: inset 4px 0 0 var(--green); color: var(--green); }
.standings tr.zone-r td.pos { box-shadow: inset 4px 0 0 var(--red); color: var(--red); }
.standings td.pts { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.standings .pd-plus { color: var(--green); }
.standings .pd-minus { color: var(--red); }
.zone-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.zone-key span::before { content: ""; display: inline-block; width: 4px; height: 13px; border-radius: 2px; margin-right: 8px; vertical-align: -2px; background: var(--c); }
.compact-standings td, .compact-standings th { padding: 8px 8px; }
.compact-standings td:first-child, .compact-standings th:first-child { padding-left: 14px; }
.compact-standings .team .name { white-space: normal; line-height: 1.2; font-size: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px; line-height: 1.3;
  padding: 8px 15px; border-radius: var(--r-control); border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn i { font-size: 1.05em; }
.btn-sm { padding: 5px 10px; font-size: 13.5px; }
.btn-lg { padding: 11px 20px; font-size: 16px; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.btn-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-3); color: #fff; }
.btn-outline, .btn-secondary, .btn-light, .btn-outline-secondary, .btn-outline-primary {
  background: var(--surface); border-color: var(--line); color: var(--ink);
}
.btn-outline:hover, .btn-secondary:hover, .btn-light:hover, .btn-outline-secondary:hover, .btn-outline-primary:hover {
  background: var(--court); border-color: #C6D0DB; color: var(--ink);
}
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-soft); color: var(--ink); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #A33021; color: #fff; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-soft); color: var(--red); }
.btn-icon { padding: 6px 8px; }
.btn:disabled, .btn.disabled { opacity: .55; pointer-events: none; }
a.btn:hover { text-decoration: none; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 5px; display: block; }
.form-hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.form-control, .form-select {
  display: block; width: 100%;
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background-color: #fff; border: 1px solid #C9D3DE; border-radius: var(--r-control);
  padding: 8px 11px; line-height: 1.4; min-height: 40px;
}
.form-select { padding-right: 34px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2344566A' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 12px 10px; }
.form-select[multiple] { background-image: none; padding-right: 11px; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10,132,198,.18); outline: 0; }
.form-control::placeholder { color: #98A6B5; }
.form-control-sm { min-height: 34px; padding: 5px 9px; font-size: 14px; }
.form-control-lg { min-height: 48px; font-size: 17px; }
textarea.form-control { min-height: 84px; }
.form-check { display: flex; align-items: center; gap: 8px; padding-left: 0; }
.form-check-input { position: static; margin: 0; width: 17px; height: 17px; float: none; accent-color: var(--blue); }
.form-row-gap > * { margin-bottom: 14px; }
.score-input { width: 74px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.inline-result { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.inline-result .dash { color: var(--ink-3); font-weight: 700; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search-box .form-control { padding-left: 34px; min-width: 220px; }
.dropzone {
  border: 1.5px dashed #B7C4D2; border-radius: var(--r-panel); background: #FAFBFC;
  padding: 18px; text-align: center; color: var(--ink-2);
}
.dropzone input[type=file] { margin-top: 8px; }
.code-sample {
  background: #F6F8FA; border: 1px solid var(--line-soft); border-radius: var(--r-control);
  padding: 10px 12px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; overflow-x: auto; margin: 0;
}

/* ---------- Notices & empty states ---------- */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-control); font-size: 14.5px; margin-bottom: 16px; }
.notice i { font-size: 17px; line-height: 1.3; }
.notice-info { background: var(--blue-soft); color: #0B4F74; }
.notice-warn { background: #FFF4D6; color: #6B4700; }
.notice-error { background: var(--red-soft); color: #8E2A1D; }
.notice-success { background: var(--green-soft); color: #145F37; }
.empty { padding: 34px 20px; text-align: center; color: var(--ink-2); }
.empty i { font-size: 30px; color: #A8B6C5; display: block; margin-bottom: 8px; }
.empty h3 { font-size: 18px; margin-bottom: 4px; }
.empty p { margin: 0 auto 12px; max-width: 46ch; font-size: 14.5px; }

/* ---------- Modal / dropdown / Swal ---------- */
.modal-content { border: 0; border-radius: 12px; box-shadow: var(--shadow-pop); }
.modal-header { border-bottom: 1px solid var(--line-soft); padding: 16px 20px; }
.modal-header .modal-title { font-family: var(--font-display); font-weight: 700; font-size: 21px; }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--line-soft); padding: 12px 20px; gap: 8px; }
.modal-footer > * { margin: 0; }
.modal-backdrop.show { opacity: .5; background: var(--navy); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; font-size: 14.5px; min-width: 200px; }
.dropdown-item { border-radius: 6px; padding: 7px 10px; display: flex; gap: 9px; align-items: center; color: var(--ink); }
.dropdown-item:hover { background: var(--court); text-decoration: none; }
.dropdown-header { font-size: 13px; color: var(--ink-3); padding: 6px 10px; }
.swal2-popup { font-family: var(--font-body) !important; border-radius: 12px !important; }
.swal2-title { font-family: var(--font-display) !important; color: var(--ink) !important; }
.swal2-html-container, .swal2-content { color: var(--ink-2) !important; }

.match-preview { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; text-align: center; padding: 14px; border-radius: var(--r-panel); background: var(--court); margin-bottom: 16px; }
.match-preview .team { flex-direction: column; gap: 6px; }
.match-preview .team .name { white-space: normal; font-size: 14px; line-height: 1.2; }
.match-preview .v { font-family: var(--font-display); font-weight: 700; color: var(--ink-3); }

/* ---------- Season tabs (dashboard tournament switcher) ---------- */
.season-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 20px; scrollbar-width: thin; }
.season-tab {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; width: 250px;
  padding: 11px 14px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.season-tab:hover { border-color: #B9C6D4; text-decoration: none; color: var(--ink); }
.season-tab b { font-family: var(--font-display); font-size: 16px; line-height: 1.2; }
.season-tab small { color: var(--ink-3); font-size: 13px; }
.season-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.season-tab.active small { color: #9FB3C8; }

/* ---------- Match details hero ---------- */
.match-hero { background: var(--navy); color: #fff; border-radius: var(--r-panel); padding: 24px; margin-bottom: 20px; }
.match-hero .meta-line { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #9FB3C8; font-size: 14px; }
.match-hero .board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-top: 18px; }
.match-hero .club { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.match-hero .club .name { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.15; color: #fff; }
.match-hero .club small { color: #9FB3C8; }
.match-hero .big-score { font-family: var(--font-display); font-weight: 700; font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.match-hero .big-score .sep { color: #5D7690; margin: 0 10px; }
.match-hero .big-score .lose { color: #8EA3B9; }
.match-hero .tipoff { font-family: var(--font-display); font-size: 30px; font-weight: 700; text-align: center; }
.match-hero .tipoff small { display: block; font-family: var(--font-body); font-size: 13.5px; font-weight: 500; color: #9FB3C8; }
@media (max-width: 575.98px) {
  .match-hero { padding: 18px 14px; }
  .match-hero .big-score { font-size: 40px; }
  .match-hero .club .name { font-size: 16px; }
  .match-hero .crest-xl { width: 60px; height: 60px; font-size: 20px; }
}
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.facts > div { padding: 14px 18px; border-left: 1px solid var(--line-soft); }
.facts > div:first-child { border-left: 0; }
.facts dt { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.facts dd { margin: 2px 0 0; font-weight: 600; }

/* ---------- Knockout bracket ---------- */
.bracket { display: grid; grid-template-columns: repeat(3, minmax(230px, 1fr)); gap: 24px; overflow-x: auto; padding: 18px; }
.bracket-round h3 { font-size: 16px; color: var(--ink-2); margin-bottom: 10px; }
.bracket-round .stack { display: flex; flex-direction: column; justify-content: space-around; gap: 16px; height: calc(100% - 30px); }
.tie { border: 1px solid var(--line); border-radius: var(--r-panel); background: #fff; overflow: hidden; }
.tie-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: #FAFBFC; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-3); }
.tie-head b { color: var(--ink); font-weight: 700; }
.tie-row { display: flex; align-items: center; gap: 9px; padding: 8px 12px; }
.tie-row + .tie-row { border-top: 1px solid var(--line-soft); }
.tie-row .name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tie-row .pts { font-family: var(--font-display); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.tie-row.winner { background: var(--green-soft); }
.tie-row.loser .name, .tie-row.loser .pts { color: var(--ink-3); }
.tie-row.tbd .name { color: var(--ink-3); font-weight: 500; font-style: italic; }
.tie-foot { display: flex; gap: 6px; padding: 6px 8px; border-top: 1px solid var(--line-soft); background: #FAFBFC; }
@media (max-width: 991.98px) { .bracket { grid-template-columns: repeat(3, minmax(240px, 1fr)); } }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--surface); }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 88px); }
.auth-form .wordmark { width: 220px; height: auto; margin-bottom: 40px; }
.auth-form h1 { font-size: 34px; }
.auth-form p.lead { color: var(--ink-2); margin: 6px 0 26px; font-size: 16px; }
.auth-form form { max-width: 400px; }
.auth-form .form-control { min-height: 46px; }
.pw-field { position: relative; }
.pw-field .form-control { padding-right: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-3); padding: 8px 10px; }
.auth-art {
  position: relative; overflow: hidden; background: var(--navy); color: #fff;
  display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px; text-align: center;
}
.auth-art::before { /* full court, drawn to FIBA proportions */
  content: ""; position: absolute; inset: 28px; background: url(../images/court/court-full.svg) no-repeat center / contain;
}
.auth-art img { position: relative; z-index: 1; width: min(300px, 60%); height: auto; }
.auth-art .caption { position: relative; z-index: 1; margin-top: 28px; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: #DCE6F0; max-width: 24ch; }
.auth-foot { margin-top: 36px; font-size: 13px; color: var(--ink-3); }
@media (max-width: 899.98px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form { padding: 32px 20px; }
  .auth-form .wordmark { width: 180px; margin-bottom: 28px; }
}

/* ---------- Print ---------- */
.print-only { display: none; }
@media print {
  .sidebar, .topbar, .app-footer, .no-print, .page-head .actions, .panel-head .tools { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  .panel { border: 0; }
  .print-only { display: block; }
  body { background: #fff; }
}

/* ---------- Fixes after visual review ---------- */
.form-check .form-check-input { margin: 0; float: none; flex: none; }
.form-check { min-height: 0; margin-bottom: 0; }
.form-select.form-control-sm { padding-right: 30px; background-position: right 9px center; }
.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; }
.tbl td.nowrap, .tbl th.nowrap { white-space: nowrap; }
.match-hero .board { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
.match-hero .club .name { overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .match-hero .board { gap: 8px; } .match-hero .club small { font-size: 12px; } }
.table-wrap { position: relative; }
.fixture .team .name { overflow: hidden; }
@media (max-width: 767.98px) { .fixture .team .name { overflow-wrap: anywhere; text-overflow: clip; } }

/* ---------- Profile photo ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-row { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line-soft); }
.photo-row form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.photo-row label.btn { cursor: pointer; margin: 0; }
.photo-row #photoInput:focus-visible + * , .photo-row label.btn:focus-within { outline: 3px solid rgba(10,132,198,.45); }
.photo-frame {
  width: 88px; height: 88px; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 30px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame.is-loading { opacity: .5; }

/* ---------- Reports ---------- */
.bar-cell { display: flex; align-items: center; gap: 8px; }
.bar-cell .num { min-width: 38px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-track { flex: 1; min-width: 50px; height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; }
.form-guide { display: inline-flex; gap: 3px; }
.fg { width: 20px; height: 20px; border-radius: 4px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; font-family: var(--font-display); }
.fg-w { background: var(--green); color: #fff; }
.fg-l { background: var(--red-soft); color: var(--red); }
.attack-defence { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px 32px; }
.ad-row { display: grid; grid-template-columns: minmax(0, 170px) 1fr; gap: 12px; align-items: center; }
.ad-row .team .name { white-space: normal; font-size: 14px; line-height: 1.2; }
.ad-bars { display: grid; gap: 4px; }
.report-teams td { white-space: nowrap; }
.report-letterhead { display: none; }
@media print {
  .report-letterhead { display: flex !important; align-items: center; gap: 14px; border-bottom: 2px solid var(--navy); padding-bottom: 10px; margin-bottom: 16px; }
  .report-letterhead h2 { font-size: 22px; }
  .report-letterhead p { margin: 0; }
  .season-tabs { display: none !important; }
  .row > [class*="col-"] { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; }
  .panel { break-inside: avoid; }
  .bar-fill, .fg-w, .progress-track span, .score { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.fixture-label { list-style: none; padding: 10px 18px 0; border-top: 1px solid var(--line-soft); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.fixture-label:first-child { border-top: 0; }
.fixture-label + .fixture { border-top: 0; padding-top: 6px; }
.fixture.no-end { grid-template-columns: 78px minmax(0,1fr) auto minmax(0,1fr); }
.col-xl-6 .fixture, .col-xl-7 .fixture { gap: 10px; }
.col-xl-6 .fixture .team, .col-xl-7 .fixture .team { gap: 7px; }
@media (min-width: 1200px) {
  .col-xl-6 .fixture .team .name, .col-xl-7 .fixture .team .name { white-space: normal; line-height: 1.2; font-size: 14px; overflow-wrap: anywhere; }
}
@media (max-width: 767.98px) { .fixture.no-end { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); } }

/* ---------- Charts ---------- */
.chart { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font-body); }
.chart .ch-grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .ch-axisline { stroke: var(--line); stroke-width: 1; }
.chart .ch-ref { stroke: #9DB0C3; stroke-width: 1; }
.chart .ch-axis { fill: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .ch-label { fill: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .ch-quad { fill: #8A9BAE; font-size: 11.5px; font-weight: 600; }
.chart .ch-hero { fill: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 34px; }
.chart [data-tip] { cursor: pointer; outline: none; transition: opacity .12s; }
.chart [data-tip]:hover, .chart [data-tip]:focus { opacity: .8; }
.chart circle[data-tip]:hover, .chart circle[data-tip]:focus { stroke-width: 3; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.donut-wrap .chart { width: 190px; flex: none; }
.ch-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.ch-legend b { color: var(--ink); margin-left: 4px; font-variant-numeric: tabular-nums; }
.ch-legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.h-100-panel { height: calc(100% - 20px); }
.chart-tip {
  position: fixed; z-index: 2000; pointer-events: none; max-width: 260px;
  background: var(--navy); color: #fff; font-size: 13px; line-height: 1.35; padding: 7px 10px; border-radius: 6px;
  box-shadow: var(--shadow-pop); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.chart-tip.show { opacity: 1; transform: none; }
@media print { .chart-tip { display: none; } .chart * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- Season infographic (poster) ---------- */
.poster { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; max-width: 1100px; margin: 0 auto 24px; }
.poster-head { display: flex; align-items: center; gap: 20px; padding: 28px 32px; background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.poster-head::after { content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; border: 2px solid rgba(255,255,255,.08); }
.poster-head img { position: relative; z-index: 1; }
.poster-head h2 { color: #fff; font-size: clamp(24px, 3.2vw, 36px); line-height: 1.05; }
.poster-kicker { margin: 0 0 4px; color: var(--orange); font-weight: 600; font-size: 14px; }
.poster-sub { margin: 6px 0 0; color: #9FB3C8; }
.poster-figures { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line-soft); }
.poster-figures > div { padding: 20px 24px; border-left: 1px solid var(--line-soft); }
.poster-figures > div:first-child { border-left: 0; }
.pf-value { display: block; font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1; color: var(--navy); }
.pf-label { display: block; margin-top: 6px; color: var(--ink-2); font-size: 14px; max-width: 22ch; }
.poster-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.poster-card { padding: 22px 24px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); min-width: 0; }
.poster-card.wide { grid-column: span 2; }
.poster-card h3 { font-size: 18px; margin-bottom: 14px; }
.leaders .leader { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.leaders .leader + .leader { border-top: 1px solid var(--line-soft); }
.leaders small { display: block; color: var(--orange); font-weight: 600; }
.leaders b { display: block; font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.leaders span { color: var(--ink-2); font-size: 14px; }
.records { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.records span { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.records b { display: block; line-height: 1.25; }
.records em { font-style: normal; color: var(--ink-2); font-size: 13.5px; }
.poster-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
@media (max-width: 991.98px) {
  .poster-grid { grid-template-columns: 1fr 1fr; }
  .poster-card.wide { grid-column: span 2; }
}
@media (max-width: 640px) {
  .poster-head { padding: 20px; gap: 14px; } .poster-head img { width: 56px; }
  .poster-figures { grid-template-columns: 1fr 1fr; }
  .poster-figures > div:nth-child(3) { border-left: 0; }
  .poster-figures > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .pf-value { font-size: 32px; }
  .poster-grid { grid-template-columns: 1fr; }
  .poster-card.wide { grid-column: auto; }
}
@media print {
  .poster { border: 0; max-width: none; }
  .poster-head, .poster-head * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-letterhead:has(+ .poster), .poster ~ .report-letterhead { display: none !important; }
  .poster-card { break-inside: avoid; }
}
.poster-card.full { grid-column: 1 / -1; }
.poster-card.full .chart { max-height: 260px; }
.season-tab { width: 225px; }
@media (max-width: 991.98px) { .poster-card.full { grid-column: 1 / -1; } }
.chart-scroll { width: 100%; }
@media (max-width: 640px) {
  .chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .chart-scroll .chart { min-width: 520px; }
}

/* ---------- Infographic: fill the page on screen, one A4 page in print ---------- */
.poster { max-width: none; margin: 0 0 24px; }
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  body.printing-poster .content > *:not(.poster) { display: none !important; }
  body.printing-poster .poster { width: 1100px; zoom: var(--poster-zoom, .65); margin: 0; border: 1px solid var(--line); }
  body.printing-poster .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.printing-poster .poster-card.wide { grid-column: span 2 !important; }
  body.printing-poster .poster-card.full { grid-column: 1 / -1 !important; }
  body.printing-poster .poster-figures { grid-template-columns: repeat(4, 1fr) !important; }
  body.printing-poster .poster-figures > div { border-top: 0 !important; border-left: 1px solid var(--line-soft) !important; }
  body.printing-poster .poster-figures > div:first-child { border-left: 0 !important; }
  body.printing-poster .chart-scroll { overflow: visible !important; }
  body.printing-poster .chart-scroll .chart { min-width: 0 !important; }
}
@media print { body, .container { min-width: 0 !important; } }

/* ---------- Admin portal ---------- */
.health { list-style: none; margin: 0; padding: 0; }
.health li { display: flex; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-soft); align-items: flex-start; }
.health li:first-child { border-top: 0; }
.health li i { font-size: 18px; line-height: 1.3; flex: none; }
.health li.ok i { color: var(--green); }
.health li.fail i { color: var(--red); }
.health li.warn i { color: #C98A00; }
.health li.info i { color: var(--blue); }
.health li.ok b { font-weight: 500; color: var(--ink-2); }
.health p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-2); }
.maint { display: grid; grid-template-columns: 1fr 1fr; }
.maint > div { padding: 16px 18px; }
.maint > div + div { border-left: 1px solid var(--line-soft); }
.maint p { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 10px; }
@media (max-width: 640px) { .maint { grid-template-columns: 1fr; } .maint > div + div { border-left: 0; border-top: 1px solid var(--line-soft); } }
.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-feed li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.activity-feed li:first-child { border-top: 0; }
.activity-feed .when { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.role-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--line-soft); color: var(--ink-2); }
.role-chip.role-admin { background: var(--navy); color: #fff; }
.role-chip.role-hr, .role-chip.role-director, .role-chip.role-manager { background: var(--blue-soft); color: var(--blue-ink); }
.tbl tr.row-muted td { opacity: .6; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.setting-row:first-child { border-top: 0; padding-top: 0; }
.temp-pw { display: grid; gap: 8px; background: var(--court); border-radius: 8px; padding: 12px 14px; text-align: left; }
.temp-pw small { display: block; color: var(--ink-3); font-size: 12px; }
.temp-pw b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; color: var(--ink); word-break: break-all; }
.setup-card { border-color: var(--blue); background: var(--blue-soft); }
.setup-card .panel-body > i { font-size: 30px; color: var(--blue); }
.setup-card p { color: var(--ink-2); font-size: 14.5px; }

/* ---- Screen lock ---- */
button.side-link { width: 100%; border: 0; background: none; text-align: left; font: inherit; font-weight: 500; font-size: 15px; }
.lock-screen {
  position: fixed; inset: 0; z-index: 2000; display: none; place-items: center; padding: 16px; overflow-y: auto;
  background: rgba(14, 34, 53, .78); -webkit-backdrop-filter: blur(14px) saturate(.8); backdrop-filter: blur(14px) saturate(.8);
}
.lock-screen.show { display: grid; animation: lockIn .25s ease-out; }
@keyframes lockIn { from { opacity: 0; } to { opacity: 1; } }
body.is-locked { overflow: hidden; }
body.is-locked > .app { filter: blur(6px); }
.lock-card {
  width: 100%; max-width: 400px; background: var(--surface, #fff); border-radius: 14px; padding: 32px 28px 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35); text-align: center;
}
.lock-card .form-label { display: block; text-align: left; }
.lock-card .pw-field { margin-bottom: 16px; text-align: left; }
.lock-card .lock-error { text-align: left; margin-bottom: 14px; }
.lock-avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; overflow: hidden;
  background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 28px;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--orange);
}
.lock-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lock-card h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin: 0 0 6px; color: var(--navy); }
.lock-card h2 i { color: var(--orange); font-size: 20px; }
.lock-who { margin: 0 0 12px; display: flex; flex-direction: column; }
.lock-who b { font-size: 16px; }
.lock-who span { color: var(--muted, #6B7C8F); font-size: 14px; }
.lock-reason { font-size: 14.5px; color: var(--ink-2, #3B4B5C); background: var(--line-soft, #EEF2F6); border-radius: 8px; padding: 10px 12px; margin-bottom: 18px; text-align: left; }
.lock-foot { margin: 16px 0 0; font-size: 13px; color: var(--muted, #6B7C8F); }
.lock-page { min-height: 100vh; background: var(--navy); }
.lock-page .lock-screen { background: var(--navy); }
@media print { body.is-locked > *:not(.lock-screen) { display: none !important; } }

/* ---- Notifications (top bar) ---- */
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; background: none;
  display: grid; place-items: center; color: var(--ink-2); font-size: 20px; flex: none;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--surface); border-color: var(--line); color: var(--ink); }
.icon-btn:focus { outline: none; box-shadow: none; }
.icon-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.notif-badge {
  position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 15px; text-align: center;
  border: 2px solid var(--court); font-family: var(--font-body);
}
.notif-badge.bump { animation: notifBump .5s ease; }
@keyframes notifBump { 30% { transform: scale(1.3); } }
.notif-btn.has-new i { animation: notifRing 1s ease 1; transform-origin: 50% 10%; }
@keyframes notifRing { 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.notif-menu { width: min(400px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.notif-menu.show { display: flex; flex-direction: column; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line-soft); }
.notif-head b { font-family: var(--font-display); font-size: 18px; color: var(--ink); }
.notif-read { border: 0; background: none; color: var(--blue-ink); font-size: 13.5px; font-weight: 600; padding: 2px 4px; border-radius: 4px; }
.notif-read:hover { text-decoration: underline; }
.notif-list { max-height: min(460px, 65vh); overflow-y: auto; padding: 4px 0 6px; }
.notif-section { padding: 10px 16px 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.notif-item { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 10px 34px 10px 16px; color: var(--ink); }
a.notif-item:hover { background: var(--court); text-decoration: none; }
.notif-item.unread { background: var(--blue-soft); }
a.notif-item.unread:hover { background: #D6EAF7; }
.notif-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 16px; }
.tone-blue { background: var(--blue-soft); color: var(--blue-ink); }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-orange { background: var(--orange-soft); color: #B35F0B; }
.notif-item.unread .tone-blue { background: #fff; }
.notif-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.notif-body b { font-size: 14.5px; font-weight: 600; }
.notif-text { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.notif-body small { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.notif-dot { position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -4px; border-radius: 50%; background: var(--blue); }
.notif-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 30px 28px; color: var(--ink-3); font-size: 13.5px; }
.notif-empty i { font-size: 28px; color: var(--line); margin-bottom: 4px; }
.notif-empty b { color: var(--ink); font-size: 15px; }
.notif-foot { display: block; padding: 11px 16px; border-top: 1px solid var(--line-soft); font-size: 14px; font-weight: 600; text-align: center; color: var(--blue-ink); }
.notif-foot:hover { background: var(--court); text-decoration: none; }
.notif + .dropdown .user-chip { margin-left: 0; }
@media (max-width: 575.98px) {   /* phones: full-width panel under the top bar (the top bar is its containing block) */
  .notif { position: static; }
  .notif-menu { position: absolute !important; top: 58px !important; left: 12px !important; right: 12px !important; bottom: auto !important; width: auto; transform: none !important; margin: 0 !important; }
}

/* ---------- Basketball touches ---------- */
.ball { display: block; width: 100%; height: 100%; background: url(../images/court/ball.svg) no-repeat center / contain; }
.ball-shadow { display: block; width: 70%; height: 8px; margin: 6px auto 0; border-radius: 50%; background: rgba(14, 34, 53, .14); }
@keyframes ballBounce {
  0%, 100% { transform: translateY(0) scale(1.04, .96); animation-timing-function: cubic-bezier(.3, 0, .7, .45); }
  12% { transform: translateY(-6px) scale(1, 1); }
  50% { transform: translateY(-34px) rotate(150deg); animation-timing-function: cubic-bezier(.3, .55, .7, 1); }
}
@keyframes ballShadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.55); opacity: .45; } }

/* Sign-in: a ball bouncing on the court, under the league crest */
.auth-ball { position: relative; z-index: 1; display: block; width: 46px; margin-top: 30px; }
.auth-ball .ball { height: 46px; animation: ballBounce 1.6s infinite; }
.auth-ball .ball-shadow { background: rgba(0, 0, 0, .35); animation: ballShadow 1.6s infinite; }
.auth-art .caption { margin-top: 18px; text-shadow: 0 0 10px #0E2235, 0 0 4px #0E2235; }

/* Sidebar: half-court lines behind the lower menu */
.sidebar { background: var(--navy) url(../images/court/court-half-light.svg) no-repeat center bottom -2px / 100% auto; }

/* Page background: a faint half court in the bottom corner */
.main { background: url(../images/court/court-half-dark.svg) no-repeat right -60px bottom -24px / 460px auto; }

/* Section titles carry a small ball */
.panel-head h2 { display: flex; align-items: center; gap: 9px; }
.panel-head h2::before { content: ""; width: 15px; height: 15px; flex: none; background: url(../images/court/ball.svg) no-repeat center / contain; }

/* Empty sections: a ball bouncing gently */
.empty-ball { display: block; width: 44px; margin: 6px auto 14px; padding-top: 34px; }
.empty-ball .ball { height: 44px; animation: ballBounce 2.4s infinite; }
.empty-ball .ball-shadow { animation: ballShadow 2.4s infinite; }

/* Headline numbers styled like an arena scoreboard */
.figures.scoreboard {
  background: var(--navy); color: #fff; border-radius: calc(var(--r-panel) - 1px) calc(var(--r-panel) - 1px) 0 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1.2px); background-size: 6px 6px;
}
.figures.scoreboard:last-child { border-radius: calc(var(--r-panel) - 1px); }
.figures.scoreboard .figure { border-left-color: rgba(255,255,255,.1); }
.figures.scoreboard .value { color: #FFB45E; text-shadow: 0 0 14px rgba(232, 131, 26, .45); font-size: 38px; }
.figures.scoreboard .value .muted { color: #8EA3B9 !important; text-shadow: none; }
.figures.scoreboard .label { color: #DCE6F0; font-weight: 500; letter-spacing: .02em; }
.figures.scoreboard .hint { color: #9FB3C8; }
.figures.scoreboard .alert-figure .value, .figures.scoreboard .figure.alert-figure .value { color: #FF8A7A; text-shadow: 0 0 14px rgba(255, 90, 70, .4); }

/* Lock screen sits on the court too */
.lock-page, .lock-page .lock-screen { background: var(--navy) url(../images/court/court-full.svg) no-repeat center / auto 92%; }

@media (max-width: 991.98px) { .main { background-size: 300px auto; background-position: right -50px bottom -16px; } }
@media print {
  .main, .sidebar { background: none !important; }
  .panel-head h2::before, .empty-ball { display: none; }
  .figures.scoreboard { background: #fff !important; color: var(--ink); }
  .figures.scoreboard .value { color: var(--ink) !important; text-shadow: none; }
  .figures.scoreboard .label { color: var(--ink-2); }
}

/* Download menu (Fixtures & results) */
.download-menu { min-width: 240px; }
.download-menu .dropdown-item { display: flex; align-items: center; gap: 12px; padding: 9px 16px; }
.download-menu .dropdown-item i { font-size: 22px; flex: none; }
.download-menu .dropdown-item span { display: flex; flex-direction: column; line-height: 1.2; }
.download-menu .dropdown-item small { color: var(--ink-3); font-size: 12.5px; }
.download-menu .bi-file-earmark-excel { color: #1D6F42; }
.download-menu .bi-file-earmark-richtext { color: #C13B2A; }
.download-menu .bi-file-earmark-text { color: var(--blue-ink); }

/* 1 / 2 / 3 choice cards (Schedule builder: games per game day) */
.choice-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice-card {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--r-control, 8px); background: var(--surface); min-height: 64px;
}
.choice-card:hover { border-color: #9FB3C8; }
.choice-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-num {
  width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--court); border: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink);
}
.choice-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.choice-text b { font-size: 14.5px; font-weight: 600; }
.choice-text small { font-size: 12.5px; color: var(--ink-3); }
.choice-card:has(input:checked) { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); background: #F7F9FB; }
.choice-card:has(input:checked) .choice-num { background: var(--orange); border-color: var(--orange); color: #fff; }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.choice-card.is-disabled { cursor: not-allowed; opacity: .55; }
@media (max-width: 575.98px) { .choice-group { grid-template-columns: 1fr; } }
