/* League, registration and admin pages. Builds on styles.css tokens. */

.nav-links a[aria-current="page"] { color: var(--yellow); }

.page-head { position: relative; overflow: hidden; padding: clamp(48px, 6vw, 80px) var(--pad-x) clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line-dark); }
.page-head .display { font-size: clamp(72px, 11vw, 160px); line-height: 0.84; }
.page-head .lede { margin: 24px 0 0; max-width: 560px; color: var(--on-dark-soft); }
.page-head::after { content: "5"; position: absolute; right: -0.08em; bottom: -0.34em; font-size: clamp(260px, 34vw, 520px); line-height: 1; font-weight: 900; font-stretch: 62%; color: var(--yellow); pointer-events: none; }
.page-head > * { position: relative; z-index: 1; }

/* Division tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 40px; border-bottom: 2px solid var(--black); }
.tab { min-height: 48px; padding: 0 20px; border: 0; background: transparent; color: var(--black); font: 800 17px var(--font); font-stretch: 75%; letter-spacing: 0.05em; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--black); color: var(--yellow); }
.tab:hover:not([aria-selected="true"]) { background: var(--concrete); }

.league-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 4vw, 64px); }
.block { margin-bottom: clamp(48px, 5vw, 72px); }
.block-title { margin: 0 0 18px; font-size: clamp(32px, 3.4vw, 48px); font-weight: 900; font-stretch: 62%; line-height: 0.9; }
.muted { color: var(--ink-mute); }
.empty { margin: 0; padding: 20px 0; border-top: 2px solid var(--black); color: var(--ink-soft); }

/* Data tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.data th { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--black); font-size: 14px; font-weight: 800; font-stretch: 75%; letter-spacing: 0.05em; white-space: nowrap; }
.data td { padding: 12px 8px; border-bottom: 1px solid var(--line-light); vertical-align: middle; }
.data .num { text-align: right; width: 1%; white-space: nowrap; }
.data .pos { width: 1%; font-weight: 900; font-stretch: 62%; font-size: 20px; }
.data .team { font-weight: 700; }
.data .pts { font-weight: 900; }
.data tbody tr:first-child .pos { color: var(--black); background: var(--yellow); text-align: center; }

/* Fixtures and results */
.match-day { margin: 0 0 6px; padding-top: 16px; font-size: 14px; font-weight: 800; font-stretch: 75%; letter-spacing: 0.05em; }
.match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-light); }
.match:first-of-type { border-top: 2px solid var(--black); }
.match .home { text-align: right; font-weight: 700; }
.match .away { font-weight: 700; }
.match .mid { min-width: 84px; text-align: center; font-weight: 900; font-stretch: 62%; font-size: 24px; }
.match .mid.time { font-size: 16px; font-weight: 700; font-stretch: 100%; color: var(--ink-soft); }
.match .meta { grid-column: 1 / -1; text-align: center; font-size: 13px; color: var(--ink-mute); }
.tag { display: inline-block; padding: 2px 8px; border: 1px solid var(--black); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }

.preseason { max-width: 640px; }
.preseason p { margin: 0 0 28px; font-size: 19px; color: var(--ink-soft); }

/* Forms shared by registration and admin */
.stack { display: flex; flex-direction: column; gap: 22px; }
.notice { margin: 0; padding: 14px 16px; border-left: 4px solid var(--black); background: var(--white); font-weight: 600; }
.notice.error { border-color: #B3261E; color: #B3261E; }
.notice.ok { border-color: #1B6E3A; color: #1B6E3A; }
.fee { font-size: 15px; color: var(--ink-mute); }

/* Admin */
.admin-body { background: var(--concrete); color: var(--black); }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px var(--pad-x); background: var(--black); color: var(--white); }
.admin-bar .who { font-size: 14px; color: var(--on-dark-mute); }
.admin-main { padding: 32px var(--pad-x) 80px; }
.admin-login { max-width: 420px; margin: 8vh auto; padding: 32px; background: var(--white); border: 2px solid var(--black); }
.admin-login h1 { margin: 0 0 20px; font-size: 56px; }
.panel { background: var(--white); border: 1px solid var(--line-light); padding: clamp(18px, 2.4vw, 28px); margin-bottom: 24px; }
.panel h2 { margin: 0 0 16px; font-size: 32px; font-weight: 900; font-stretch: 62%; line-height: 1; }
.panel h3 { margin: 18px 0 10px; font-size: 18px; font-weight: 800; }
.inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline .field { flex: 1 1 160px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-ghost { background: transparent; border-color: var(--black); color: var(--black); }
.btn-ghost:hover { background: var(--black); color: var(--white); }
.btn-danger { background: transparent; border-color: #B3261E; color: #B3261E; }
.btn-danger:hover { background: #B3261E; color: var(--white); }
.data .actions { white-space: nowrap; text-align: right; }
.data .actions .btn + .btn { margin-left: 6px; }
.data input.input, .data select.input { min-height: 40px; }
.score-input { width: 64px; text-align: center; }
.row-list { display: flex; flex-direction: column; gap: 8px; }
.row-item { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 8px; align-items: center; }
.result-editor { margin-top: 12px; padding: 18px; border: 2px solid var(--black); background: var(--white); }
.result-editor .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 12px 18px; background: var(--black); color: var(--yellow); font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.toast.error { color: #FFFFFF; background: #B3261E; }
.pill { display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }
.pill.pending { background: var(--yellow); color: var(--black); }
.pill.approved { background: #1B6E3A; color: var(--white); }
.pill.rejected { background: #4A4742; color: var(--white); }
.pill.paid { border: 1px solid var(--black); }

@media (max-width: 960px) {
  .league-grid { grid-template-columns: 1fr; }
  .result-editor .cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .data { font-size: 15px; }
  .data .hide-sm { display: none; }
  .admin-main .data td, .admin-main .data th { padding: 10px 6px; }
}

@media (max-width: 760px) {
  .nav-links a:not(.btn) { display: inline; font-size: 15px; }
  .nav-links { gap: 18px; }
  .page-head .lede { max-width: 62%; }
  .page-head::after { font-size: 300px; right: -0.12em; bottom: -0.38em; }
}
.result-type { flex: 0 0 auto !important; }
