/* Branding follows americanfootball.org.au: AFA green #2A4230, AFA gold #FFB900,
   light grey #F7F7F7. Their licensed fonts (Mono45 Headline, Neue Montreal) are
   approximated with Martian Mono (condensed) and Inter from Google Fonts. */
:root {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --surface-2: #f7f8f7;
  --border: #e3e6e3;
  --text: #111511;
  --muted: #575757;
  --navy: #2a4230;      /* AFA green (kept the old variable name) */
  --navy-2: #36553e;
  --gold: #ffb900;      /* AFA gold */
  --gold-hover: #e6a700;
  --accent: #2a4230;
  --accent-hover: #1e3124;
  --accent-soft: #e7eee8;
  --display: "Martian Mono", "Inter", system-ui, sans-serif;
  --danger: #c0392b;
  --danger-soft: #fbeae8;
  --elite: #1f7a4d;
  --good: #2d6cdf;
  --avg: #c98a12;
  --low: #c0392b;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 31, 51, .06), 0 2px 8px rgba(15, 31, 51, .05);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1, h2 { font-family: var(--display); font-stretch: 75%; text-transform: uppercase; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Top bar */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-logo { display: flex; align-items: center; height: 56px; }
.brand-logo img { height: 56px; width: auto; display: block; }
.brand-name {
  font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 14px; line-height: 1.15;
  text-transform: uppercase; color: #fff; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .25); max-width: 190px;
}
.brand-mark {
  display: grid; place-items: center; min-width: 40px; height: 32px; padding: 0 6px; border-radius: 8px;
  background: var(--accent); font-size: 12.5px; letter-spacing: .04em;
}
.nav { display: flex; gap: 4px; align-items: center; overflow-x: auto; }
/* Nav mirrors the AFA site: condensed mono caps, active item on a gold block */
.nav a, .nav button {
  color: #fff; padding: 10px 12px; border-radius: 0; font-family: var(--display); font-stretch: 75%;
  font-weight: 500; font-size: 14px; text-transform: uppercase; letter-spacing: .02em;
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav a:hover, .nav button:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--gold); color: var(--navy); font-weight: 700; }

.mode-banner {
  background: #fff7e0; color: #7a5a00; border-bottom: 1px solid #f0e0a8;
  text-align: center; font-size: 13px; padding: 6px 16px;
}

.container { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; outline: none; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }

/* Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; margin-bottom: 6px; display: inline-block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: #c9cfca; text-decoration: none; }
/* Primary actions use the AFA gold button style from their site */
.btn-primary { background: var(--gold); border-color: var(--gold); color: #111; font-weight: 700; }
.btn-primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: #f0c4be; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px 18px; }
.stat { border-top: 4px solid var(--gold); }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat-value { font-family: var(--display); font-stretch: 75%; font-size: 30px; font-weight: 800; margin-top: 2px; color: var(--navy); }

/* Toolbar / forms */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, .rate button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
textarea { resize: vertical; min-height: 70px; }
.toolbar input, .toolbar select { width: auto; }
label.field { display: block; }
label.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.req { color: var(--danger); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td.num { font-variant-numeric: tabular-nums; }
.jersey { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Badges & chips */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; background: #eef1f4; color: var(--muted);
}
.badge.elite { background: #e2f2ea; color: var(--elite); }
.badge.good { background: #e6eefc; color: var(--good); }
.badge.avg { background: #fcf2dc; color: #9a6a0c; }
.badge.low { background: var(--danger-soft); color: var(--low); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #eef1f4; font-size: 12px; font-weight: 600; color: var(--muted); }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip-toggle { cursor: pointer; user-select: none; border: 1px solid var(--border); background: var(--surface); padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.chip-toggle input { display: none; }
.chip-toggle:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.chip-alt { background: transparent; border: 1px solid var(--border); }
.chip-extra { border-style: dashed; }

/* Position chips with the score assessed at that position underneath */
.pos-scores { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.pos-score { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 30px; }
.pos-val { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; color: var(--muted); }
.pos-val.elite { color: var(--elite); }
.pos-val.good { color: var(--good); }
.pos-val.avg { color: #9a6a0c; }
.pos-val.low { color: var(--low); }
.pos-val.none { color: #b8c1ca; font-weight: 600; }
.span-2 { grid-column: span 2; }

/* Selection status */
.status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.status-applicant { background: #eef1f4; color: var(--muted); }
.status-shortlisted { background: #e6eefc; color: var(--good); }
.status-selected { background: #e2f2ea; color: var(--elite); }
.status-not-selected { background: var(--danger-soft); color: var(--low); }
.status-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-top: 6px; }
.seg button {
  border: 0; border-right: 1px solid var(--border); background: var(--surface); padding: 8px 14px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--surface-2); color: var(--text); }
.seg button.on { color: #fff; }
.seg button.on-applicant { background: var(--muted); }
.seg button.on-shortlisted { background: var(--good); }
.seg button.on-selected { background: var(--elite); }
.seg button.on-not-selected { background: var(--low); }
.eligs { display: flex; gap: 6px; flex-wrap: wrap; }
.elig { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #eef1f4; color: var(--muted); }
.elig-yes { background: #e2f2ea; color: var(--elite); }
.elig-no { background: var(--danger-soft); color: var(--low); }

/* Profile details */
.details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 20px; margin: 0; }
.details dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.details dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.details-1 { grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }

/* Roster views */
.view-bar { background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.view-pick { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.view-pick select { width: auto; min-width: 200px; font-weight: 600; }
.filter-bar .toolbar select, .filter-bar .toolbar input { font-size: 13.5px; padding: 7px 9px; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 15; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow);
  padding: 8px; display: grid; gap: 2px;
}
.menu-panel label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.menu-panel label:hover { background: var(--surface-2); }
.elig-mini { display: inline-flex; gap: 3px; }
.elig-mini i {
  font-style: normal; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px;
  font-size: 12px; font-weight: 700; background: #eef1f4; color: var(--muted);
}
.elig-mini i.y { background: #e2f2ea; color: var(--elite); }
.elig-mini i.n { background: var(--danger-soft); color: var(--low); }

/* Layout toggle */
.seg-sm { margin-top: 0; }
.seg-sm button { padding: 6px 12px; font-size: 13px; }
.seg button.on-layout { background: var(--navy); }

/* Kanban board */
.board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 12px; padding: 16px; overflow-x: auto; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.board-col { background: #eaeef2; border-radius: 10px; display: flex; flex-direction: column; min-height: 220px; border: 2px solid transparent; transition: border-color .12s, background .12s; }
.board-col.drop-over { border-color: var(--accent); background: var(--accent-soft); }
.board-col header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 6px; }
.board-col.board-applicant header { border-top: 3px solid var(--muted); border-radius: 8px 8px 0 0; }
.board-col.board-shortlisted header { border-top: 3px solid var(--good); border-radius: 8px 8px 0 0; }
.board-col.board-selected header { border-top: 3px solid var(--elite); border-radius: 8px 8px 0 0; }
.board-col.board-not-selected header { border-top: 3px solid var(--low); border-radius: 8px 8px 0 0; }
.board-cards { display: grid; gap: 8px; padding: 6px 8px 10px; align-content: start; flex: 1; }
/* Integrations (per-program keys) */
.integ-form { display: grid; gap: 14px; }
.integ-form fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 14px; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 16px; }
.integ-form legend { padding: 0 6px; font-weight: 700; font-size: 13px; color: var(--navy); }
.integ-form .field > span:first-child { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.integ-form .status { font-size: 10.5px; }

/* Intakes */
.intake-banner { background: #fff4d1; border-bottom: 1px solid #f0d98a; color: #6b5200; padding: 8px 16px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 14px; }
.intake-banner[hidden] { display: none; }
.intake-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.intake-pick select { padding: 6px 8px; }
.prev-intake { border-top: 1px solid var(--border); padding: 12px 0; }
.prev-intake:first-of-type { border-top: 0; }

/* Branding page */
.brand-color { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; }
.brand-color input[type="color"] { width: 56px; height: 56px; padding: 0; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: none; }
.brand-hex { width: 110px; margin-top: 4px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; padding: 4px 8px; }
.brand-preview { display: grid; grid-template-columns: 170px 1fr; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; min-height: 200px; }
.bp-side { color: #fff; padding: 12px 0; display: grid; align-content: start; gap: 4px; }
.bp-side img { height: 40px; width: auto; margin: 0 12px 4px; object-fit: contain; justify-self: start; }
.bp-name { font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 11px; text-transform: uppercase; margin: 0 12px 8px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.25); }
.bp-item { font-family: var(--display); font-stretch: 75%; font-size: 11.5px; text-transform: uppercase; padding: 6px 12px; }
.bp-item.on { font-weight: 800; }
.bp-main { background: var(--bg); padding: 14px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.bp-h { width: 100%; font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 18px; }
.bp-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; font-weight: 800; font-size: 12px; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding: 16px; }
.logo-slot { display: grid; gap: 4px; align-content: start; }
.logo-preview { height: 96px; border-radius: 10px; background: var(--navy); display: grid; place-items: center; padding: 10px; margin-bottom: 6px; }
.logo-preview img { max-height: 76px; max-width: 100%; object-fit: contain; }
.logo-preview.logo-square img { max-height: 70px; max-width: 70px; }
.new-site-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
@media (max-width: 700px) { .brand-preview { grid-template-columns: 1fr; } }

/* Users sub-menu in the sidebar (Program Coaches / Club Coaches / Player Reps / Administrators) */
.nav-sub { display: none; }
.users-tabs a.ptab { text-decoration: none; }
/* Player Reps */
.rep-head { flex-wrap: wrap; gap: 10px; }
.rep-table tr.rep-none td, .rep-table tr.rep-off td { color: var(--muted); }
.rep-table tr.rep-none td:nth-child(2) a, .rep-table tr.rep-none td:nth-child(3) { opacity: .6; }
.rep-table tr.rep-none { background: repeating-linear-gradient(135deg, transparent, transparent 8px, rgba(0,0,0,.015) 8px, rgba(0,0,0,.015) 16px); }
.invite-email-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.invite-email-row .field { flex: 1 1 260px; }
.users-subhead { margin: 24px 0 10px; }
@media screen and (min-width: 901px) {
  .nav-sub { display: grid; gap: 1px; margin: 2px 0 6px; }
  .nav .nav-sub-link { padding: 7px 20px 7px 48px; font-size: 12.5px; color: rgba(255, 255, 255, .72); text-transform: none; letter-spacing: 0;
    font-family: Inter, system-ui, sans-serif; font-stretch: normal; font-weight: 500; }
  .nav .nav-sub-link:hover { color: #fff; }
  .nav .nav-sub-link.on { color: var(--gold); font-weight: 700; box-shadow: inset 3px 0 0 var(--gold); }
  .nav-collapsed .nav-sub { display: none; }
}

/* Tabs on the player page */
.ptabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 16px; border-bottom: 2px solid var(--border); }
.ptab { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 10px 9px; cursor: pointer;
  font-family: var(--display); font-stretch: 75%; font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
.ptab:hover { color: var(--text); }
.ptab.on { color: var(--navy); border-bottom-color: var(--gold); font-weight: 800; }
.ptab-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--surface-2); font-size: 11px; color: var(--text); }
.ptab-narrow { max-width: 760px; }
@media print { .ptab-panel[hidden] { display: block !important; } }

/* Development version of the report card (players not selected) and meeting requests */
.limited-note { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fff8e1; border-color: #f0d98a; font-size: 14px; }
.meeting-card { max-width: 820px; margin: 16px auto 0; }
.meeting-card summary.btn { list-style: none; display: inline-flex; }
.meeting-card summary.btn::-webkit-details-marker { display: none; }
.meeting-form-wrap[open] summary.btn { display: none; }
.meeting-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.meeting-rows { display: grid; }
.meeting-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--border); }
.meeting-row.is-done { opacity: .7; }
.meeting-msg { margin: 4px 0; font-size: 14px; white-space: normal; }
.meetings-inline .meeting-row { padding: 10px 0; }

/* Coach agreement: tick boxes on sign-up, editor on the Coaches page */
.agree-fields { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 14px; margin: 4px 0 0; display: grid; gap: 10px; }
.agree-fields legend { padding: 0 6px; font-weight: 700; font-size: 13px; color: var(--navy); }
.agree-intro { font-size: 13.5px; color: #333; max-height: 220px; overflow: auto; }
.agree-item { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 14px; cursor: pointer;
  padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.agree-item input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--navy); }
.agree-item:has(input:checked) { background: #e7eee8; }
.login.login-wide { max-width: 620px; }
.agree-editor { display: grid; gap: 12px; }
.agree-list { display: grid; gap: 8px; }
.agree-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; }
.agree-row .idx { color: var(--muted); font-weight: 700; font-size: 13px; padding-top: 8px; text-align: right; }
.agree-row textarea { width: 100%; }
.agree-save { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.agree-ok { color: var(--elite); font-weight: 700; }
.agree-no { color: var(--low); font-weight: 700; }

/* Email notifications card (Coaches page) */
.email-setup { background: #fff8e1; border-bottom: 1px solid var(--border); }
.email-switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 18px; }
.email-switch { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; cursor: pointer; }
.email-switch input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--navy); }
.email-switch > span { display: grid; gap: 2px; }
.email-log summary { cursor: pointer; font-weight: 600; border-top: 1px solid var(--border); }

/* WWCC + AFA membership fields on sign-up forms */
.cred-fields { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 14px; margin: 4px 0 0; display: grid; gap: 12px; }
.cred-fields legend { padding: 0 6px; font-weight: 700; font-size: 13px; color: var(--navy); }
.cred-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* Junior / Senior tag on board cards */
.year-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.year-senior { background: var(--navy); color: var(--gold); }
.year-junior { background: #fff4d1; color: #7a5a00; border: 1px solid #f0d98a; }

/* Scouting board: Compare */
.scard-cmp { flex: none; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 13px; line-height: 1; cursor: pointer; padding: 0; margin-left: auto; }
.scard-cmp:hover { border-color: var(--navy); color: var(--navy); }
.scard-cmp.on { background: var(--navy); border-color: var(--navy); color: var(--gold); }
.scard-cmp + .scard-color-btn { margin-left: 6px; }
.cmp-controls .toolbar { align-items: flex-end; }
.cmp-table { min-width: 100%; }
.cmp-table th, .cmp-table td { padding: 7px 10px; vertical-align: middle; }
.cmp-table tbody th { text-align: left; font-weight: 600; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.cmp-table thead th { vertical-align: bottom; min-width: 140px; }
.cmp-table thead th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 2; min-width: 170px; }
.cmp-head { display: grid; justify-items: center; gap: 6px; text-align: center; position: relative; }
.cmp-head .player-num { width: 52px; height: 52px; font-size: 18px; }
.cmp-head .dc-x { position: absolute; top: -4px; right: -4px; font-size: 16px; }
.cmp-table td { text-align: center; }
.cmp-table td.cmp-best { background: #fff4d1; font-weight: 800; box-shadow: inset 0 0 0 1px #f0d98a; }
.cmp-table tr.cmp-section th { background: var(--surface-2); font-family: var(--display); font-stretch: 75%; text-transform: uppercase; font-size: 12.5px; color: var(--navy); }
.cmp-table tr.cmp-overall td { font-size: 16px; }

/* Scouting board card colours */
:root { --sc-green: #2e8b57; --sc-gold: #e0a800; --sc-blue: #2b6cb0; --sc-red: #d64545; --sc-purple: #7b4fc9; --sc-grey: #8a96a3; }
.sw-green { --sw: var(--sc-green); } .sw-gold { --sw: var(--sc-gold); } .sw-blue { --sw: var(--sc-blue); }
.sw-red { --sw: var(--sc-red); } .sw-purple { --sw: var(--sc-purple); } .sw-grey { --sw: var(--sc-grey); }
.scard.scolor-green { --sc: var(--sc-green); } .scard.scolor-gold { --sc: var(--sc-gold); } .scard.scolor-blue { --sc: var(--sc-blue); }
.scard.scolor-red { --sc: var(--sc-red); } .scard.scolor-purple { --sc: var(--sc-purple); } .scard.scolor-grey { --sc: var(--sc-grey); }
.scard[class*="scolor-"] { border-left: 6px solid var(--sc); background: color-mix(in srgb, var(--sc) 9%, var(--surface)); }
.scard-color-btn { margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 2px dashed #b8c1ca; background: var(--sw, transparent); }
.scard-color-btn[class*="sw-"] { border: 2px solid #fff; box-shadow: 0 0 0 1px #c9d2db; }
.scard-color-btn:hover { box-shadow: 0 0 0 2px var(--navy); }
.scout-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.key-item { display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px 2px 2px; border-radius: 999px; }
.key-item.on { background: var(--surface-2); box-shadow: 0 0 0 1px var(--navy); }
.key-swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #c9d2db; background: var(--sw); cursor: pointer; padding: 0; }
.key-swatch.on { box-shadow: 0 0 0 2px var(--navy); }
.key-swatch.sw-none { background: #fff; color: var(--muted); font-size: 11px; line-height: 1; }
.key-label { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); border-bottom: 1px dashed transparent; }
.key-label:hover { border-bottom-color: var(--muted); }
.key-pencil { font-size: 11px; color: var(--muted); }
.demo-card-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.demo-card-row > div { flex: 1 1 320px; }
.ask-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(15, 31, 51, .45); display: grid; place-items: center; padding: 16px; }
.ask-box { width: min(440px, 100%); }
.key-input { width: 150px; padding: 3px 8px; font-size: 13px; border: 1px solid var(--navy); border-radius: 6px; }
.scout-picker { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 10px 28px rgba(15, 31, 51, .2); min-width: 210px; }
.picker-swatches { display: flex; gap: 8px; }
.picker-swatches .key-swatch { width: 26px; height: 26px; }
.picker-names { display: grid; gap: 2px; margin-top: 8px; }
.picker-names:empty { display: none; }
.picker-names .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--sw); margin-right: 6px; }
@media print { .scard[class*="scolor-"] { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Scouting board */
.scout-board { border-radius: 0 0 var(--radius) var(--radius); }
.scout-unplaced { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); min-height: 90px; border: 2px solid transparent; }
.scout-unplaced.drop-over { border-color: var(--accent); background: var(--accent-soft); }
/* Keep cards inside their column whatever the content (long names, the Move to… menu) */
.board-cards { grid-template-columns: minmax(0, 1fr); }
.board-col, .kcard, .kcard-top, .kcard-actions { min-width: 0; }
.kcard-top a, .kcard-meta { overflow-wrap: anywhere; }
.kcard-actions .kmove { flex: 1 1 0; min-width: 0; width: 100%; text-overflow: ellipsis; }
.scard .kcard-top { align-items: center; }
/* Where a dragged card will land */
.kcard.drop-before { box-shadow: 0 -4px 0 -1px var(--accent); }
.board-cards.drop-end::after { content: ''; display: block; height: 4px; border-radius: 2px; background: var(--accent); }
.board-col header .scout-col-tools { display: flex; align-items: center; gap: 8px; }
.scout-sort { border: 0; background: none; padding: 0; font-size: 12px; font-weight: 600; color: var(--accent); cursor: pointer; }
.scout-sort:hover { text-decoration: underline; }
.scard-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.scard-rank { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 13px; color: var(--muted); }
.scard .pos-val { flex: none; font-size: 15px; }
.scard .status { font-size: 11px; }
.board-empty { border: 2px dashed #cfd6dd; border-radius: 8px; padding: 18px 8px; text-align: center; color: var(--muted); font-size: 13px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(15, 31, 51, .06); cursor: grab; display: grid; gap: 7px; }
.kcard:hover { border-color: #c9d2db; }
.kcard.dragging { opacity: .45; }
.kcard-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kcard-top a { color: var(--text); }
.kcard-meta { font-size: 12.5px; color: var(--muted); }
.kcard-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kflag { font-size: 12px; font-weight: 700; color: var(--low); }
.kvideo { color: var(--accent); margin-left: auto; font-size: 14px; }
.kvideo:hover { text-decoration: none; }
.kcard-actions { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--border); padding-top: 8px; }
.kmove { width: auto; flex: 1; font-size: 12.5px; padding: 5px 6px; }

/* Depth chart */
.depth-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.depth-pool { position: sticky; top: 92px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
.depth-pool .card-pad { overflow-y: auto; }
.depth-pool.drop-over { outline: 2px dashed var(--low); outline-offset: -2px; }
.pool-list { display: grid; gap: 8px; }
.pool-player { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--surface); cursor: grab; display: grid; gap: 6px; }
.pool-player:hover { border-color: #c9d2db; }
.pool-player.placed { background: var(--surface-2); }
.pool-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13.5px; }
.depth-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; align-items: start; }
.formation-wrap { overflow-x: auto; }
.formation { display: grid; grid-template-columns: repeat(7, minmax(80px, 1fr)); gap: 8px; min-width: 600px; }
.depth-table { max-width: 460px; }
.slot { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px; min-height: 92px; display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, background .12s; }
.slot.drop-over { border-color: var(--accent); background: var(--accent-soft); }
.slot-label { font-family: var(--display); font-stretch: 75%; font-size: 12px; font-weight: 800; text-align: center; color: #fff; background: var(--navy); border-radius: 5px; padding: 2px 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.slot-label > span:first-child { flex: 1; text-align: center; }
/* Picked / Roster # at each position */
.slot-roster { display: inline-flex; align-items: center; gap: 1px; font-family: Inter, system-ui, sans-serif; font-stretch: normal; font-size: 11px; font-weight: 700;
  padding: 0 2px 0 6px; border-radius: 999px; background: #fcf2dc; color: #9a6a0c; }
.slot-roster.ok { background: #e2f2ea; color: var(--elite); }
.slot-roster.over { background: var(--danger-soft); color: var(--low); }
.slot-roster input { width: 2.2em; padding: 0 2px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; -moz-appearance: textfield; }
.slot-roster input::-webkit-inner-spin-button, .slot-roster input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.slot-roster input:focus { outline: 1px solid var(--navy); border-radius: 4px; background: #fff; }
.slot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; counter-reset: depth; flex: 1; }
.dc-player { counter-increment: depth; display: flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1.25; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 3px 4px; cursor: grab; }
.dc-player::before { content: counter(depth); font-weight: 800; color: var(--muted); font-size: 10.5px; min-width: 9px; }
.dc-player a { color: var(--text); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dc-player.dragging, .pool-player.dragging { opacity: .45; }
.dc-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.dc-x:hover { color: var(--danger); }
.sdot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.sdot.s-shortlisted { background: var(--good); }
.sdot.s-selected { background: var(--elite); }
.sdot.s-not-selected { background: var(--low); }
.slot-add { font-size: 11.5px; padding: 3px 4px; color: var(--muted); }
.depth-table { font-size: 13.5px; }
.depth-table th, .depth-table td { padding: 7px 8px; }
.depth-table input { width: 58px; padding: 4px 6px; font-size: 13.5px; }
.depth-table tr.total td { font-weight: 800; border-top: 2px solid var(--border); }
.pick { font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.pick.ok { background: #e2f2ea; color: var(--elite); }
.pick.under { background: #fcf2dc; color: #9a6a0c; }
.pick.over { background: var(--danger-soft); color: var(--low); }
.team-total { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
/* "As of" date at the bottom of each position */
.slot-asof { margin-top: auto; padding-top: 2px; font-size: 9.5px; color: var(--muted); text-align: right; letter-spacing: .01em; }
/* Printing the depth chart is blocked: the page prints only a notice */
.print-blocked { display: none; }
@media print {
  .depth-layout { display: none !important; }
  .print-blocked { display: block !important; margin-top: 40px; font-size: 18px; font-weight: 700; text-align: center; }
  body.no-print-depth .page-head { display: none !important; }
}

/* Offense and Defense Pos Group tables side by side at the bottom */
.depth-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 16px; }
.depth-table-wrap h3 { margin: 0 0 6px; font-family: var(--display); font-stretch: 75%; text-transform: uppercase; color: var(--navy); }
.depth-table-wrap .depth-table { max-width: none; width: 100%; }
.depth-summary .team-total { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 760px) { .depth-tables { grid-template-columns: 1fr; } }
@media print { .depth-tables { grid-template-columns: repeat(2, minmax(0, 1fr)); } .depth-summary { break-inside: avoid; } }
@media (max-width: 1100px) {
  .depth-layout { grid-template-columns: 1fr; }
  .depth-pool { position: static; max-height: none; }
  .depth-body { grid-template-columns: 1fr; }
}
@media print {
  .depth-layout, .depth-body { grid-template-columns: 1fr; }
  .slot-add, .dc-x { display: none !important; }
  .formation { min-width: 0; }
  .depth-layout { page: depth; } /* depth chart prints landscape; other pages portrait */
}
@page depth { size: A4 landscape; }

/* Player profile sections */
.profile-sections { display: grid; gap: 18px; }
.profile-section h3 {
  font-family: var(--display); font-stretch: 75%; text-transform: uppercase; font-size: 13px; color: var(--navy);
  border-bottom: 2px solid var(--gold); padding-bottom: 4px; margin-bottom: 10px; display: inline-block;
}

/* Accounts */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 42px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 30px;
  display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { background: var(--surface-2); color: var(--navy); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Hide Edge's built-in reveal button so there's only one eye */
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }
.notice { background: var(--accent-soft); color: var(--navy); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.nav-account { border: 1px solid rgba(255, 255, 255, .35) !important; margin-left: 6px; }
.add-coach { display: grid; grid-template-columns: 1.2fr 1.4fr 140px auto; gap: 12px; align-items: end; }
.cred-box { border-left: 4px solid var(--gold); margin-bottom: 16px; }
.invite-card { border-top: 4px solid var(--gold); }
.invite-form { display: grid; grid-template-columns: 120px 1.3fr 130px 1.3fr auto; gap: 12px; align-items: end; }
.new-invite { margin-top: 14px; background: #fff8e1; border: 1px solid #f3dc9a; border-radius: 8px; padding: 12px 14px; }
.invite-link-row { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-link-row input { flex: 1; min-width: 240px; font-family: var(--display); font-stretch: 75%; font-size: 13px; background: #fff; }
.invite-table tr.just-made td { background: #fffbea; }
@media (max-width: 900px) { .invite-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .invite-form { grid-template-columns: 1fr; } }
.temp-pw { font-family: var(--display); font-size: 16px; font-weight: 700; background: #fff8e1; padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; }
tr.inactive td { color: var(--muted); }
tr.inactive b { text-decoration: line-through; }
@media (max-width: 760px) { .add-coach { grid-template-columns: 1fr; } }

/* Leadership */
.leader-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: var(--navy);
  font-size: 11.5px; font-weight: 800; white-space: nowrap;
}
.leadership-card { border-left: 4px solid var(--gold); }
.lead-qa { display: grid; gap: 16px; }
.lead-q { font-weight: 700; margin-bottom: 2px; }
.lead-qa .notes-block { margin-top: 6px; }

/* Empty */
.empty { text-align: center; padding: 48px 20px; }
.empty h2 { margin-bottom: 6px; }
.empty p { margin: 0 auto 18px; max-width: 460px; color: var(--muted); }

/* Player header */
.player-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.player-num {
  width: 72px; height: 72px; border-radius: 14px; background: var(--navy); color: var(--gold);
  display: grid; place-items: center; font-family: var(--display); font-stretch: 75%; font-size: 28px; font-weight: 800; flex-shrink: 0;
}
.player-photo { position: relative; width: 96px; height: 96px; overflow: hidden; padding: 0; color: #fff; }
.player-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.player-photo .photo-num {
  position: absolute; right: 4px; bottom: 4px; background: rgba(15, 31, 51, .85); color: #fff;
  font-size: 12px; font-weight: 800; padding: 1px 6px; border-radius: 6px;
}
.player-photo .fallback-num { display: none; }
.photo-note { margin-top: 8px; max-width: 640px; font-size: 12.5px; color: #8a5a00; background: #fff6dc; border: 1px solid #f1dc9c; border-radius: 6px; padding: 6px 10px; }
.player-photo.photo-failed { width: 72px; height: 72px; }
.player-photo.photo-failed .fallback-num { display: block; }
.player-photo.photo-failed .photo-num { display: none; }
.player-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 4px; }
.player-meta b { color: var(--text); font-weight: 600; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Score bars */
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.bar-label { font-size: 14px; font-weight: 600; }
.bar-val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: #edf0f3; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.bar > i.good { background: var(--good); }
.bar > i.avg { background: var(--avg); }
.bar > i.low { background: var(--low); }

.big-score { display: flex; align-items: baseline; gap: 6px; }
.big-score strong { font-family: var(--display); font-stretch: 75%; font-size: 44px; font-weight: 800; line-height: 1; color: var(--navy); }
.big-score span { color: var(--muted); font-weight: 600; }

/* Evaluate */
.eval-layout { display: grid; grid-template-columns: 1fr 330px; gap: 20px; align-items: start; }
.eval-side { position: sticky; top: 88px; }
.cat-card .card-head { background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.crit { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.crit:last-of-type { border-bottom: 0; }
.crit-label { font-weight: 600; }
.crit-hint { font-size: 13px; color: var(--muted); }
.rate { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.rate button {
  width: 40px; height: 38px; border: 0; border-right: 1px solid var(--border); background: var(--surface);
  font: inherit; font-weight: 700; cursor: pointer; color: var(--muted);
}
.rate button:last-child { border-right: 0; }
.rate button:hover { background: var(--surface-2); color: var(--text); }
.rate button.on { background: var(--accent); color: #fff; }
.rate.many button { width: 32px; }
.cat-notes { padding: 12px 20px 16px; border-top: 1px solid var(--border); }
/* Highlights video on the evaluation page */
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card.pinned { position: sticky; top: 76px; z-index: 10; box-shadow: 0 8px 24px rgba(15, 31, 51, .18); }
.video-card.pinned .video-frame { max-height: 42vh; aspect-ratio: auto; height: min(42vh, calc((100vw - 32px) * 9 / 16)); }
.video-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.crit-comment { grid-column: 1 / -1; margin-top: -4px; }
.crit-comment textarea { min-height: 54px; }
.link-btn {
  background: none; border: 0; padding: 2px 0; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent); cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.progress { height: 6px; border-radius: 99px; background: #edf0f3; overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 100%; background: var(--accent); }
.scale-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.scale-legend b { color: var(--text); }
.scale-legend > span[title] { cursor: help; }
.scale-desc { flex-basis: 100%; }
.scale-desc summary { cursor: pointer; font-weight: 600; color: var(--accent); width: max-content; }
.scale-desc dl { display: grid; gap: 8px; margin: 8px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.scale-desc dt { color: var(--text); font-weight: 600; }
.scale-desc dd { margin: 2px 0 0; color: #333; line-height: 1.45; }

/* Template builder */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tpl-card { display: flex; flex-direction: column; }
.tpl-card .card-pad { flex: 1; }
.tpl-card footer { display: flex; gap: 6px; padding: 12px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.builder-cat { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.builder-cat-head { display: grid; grid-template-columns: 1fr 110px auto; gap: 10px; align-items: end; padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.builder-crit { display: grid; grid-template-columns: 24px 1fr 1fr auto; gap: 8px; align-items: center; padding: 8px 16px; }
.builder-crit .idx { color: var(--muted); font-size: 13px; font-weight: 700; text-align: right; }
.builder-crit .player-hint { grid-column: 2 / 4; margin-top: -2px; font-size: 13px; background: var(--surface-2); }
.builder-foot { padding: 10px 16px 14px; }
.icon-btns { display: flex; gap: 2px; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 6px; background: none; cursor: pointer; color: var(--muted); font-size: 15px; }
.icon-btn:hover { background: #eef1f4; color: var(--text); }
.icon-btn.del:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; }

/* Login */
.login { max-width: 400px; margin: 60px auto; }
.error { color: var(--danger); font-size: 14px; margin-top: 8px; }

/* Trend chart */
.trend svg { width: 100%; height: auto; display: block; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

/* Report */
.report-scores td:last-child { text-align: right; vertical-align: top; }
.report-scores td:first-child { white-space: normal; }
.crit-note {
  margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 6px 6px 0; font-size: 14px; white-space: pre-wrap;
}
.notes-block { white-space: pre-wrap; background: var(--surface-2); border-radius: 8px; padding: 12px 14px; font-size: 14px; }

@media (max-width: 900px) {
  .eval-layout { grid-template-columns: 1fr; }
  .eval-side { position: static; order: -1; }
  .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .details { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: 22px; }
  .grid-2, .grid-3, .grid-4, .details { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .view-pick, .view-pick select { width: 100%; }
  .menu-panel { left: 0; right: auto; }
  .crit { grid-template-columns: 1fr; }
  .builder-cat-head { grid-template-columns: 1fr 90px; }
  .builder-cat-head .icon-btns { grid-column: 1 / -1; justify-content: flex-end; }
  .builder-crit { grid-template-columns: 1fr auto; }
  .builder-crit .idx { display: none; }
  .builder-crit input:nth-of-type(2), .builder-crit .player-hint { grid-column: 1; }
  .brand-name { display: none; }
  .toolbar input, .toolbar select { width: 100%; }
}

/* ---------- development summary ---------- */
.dev-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; }
.dev-col h3 {
  font-family: var(--display); font-stretch: 75%; text-transform: uppercase; font-size: 13px; margin-bottom: 8px;
  padding-bottom: 4px; border-bottom: 2px solid var(--border); display: inline-block;
}
.dev-strengths h3 { border-color: var(--elite); color: var(--elite); }
.dev-workons h3 { border-color: var(--gold); color: var(--navy); }
.dev-col ul, .dev-col ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.dev-col li { font-size: 14px; }
.dev-strengths li::marker { content: '✓  '; color: var(--elite); font-weight: 800; }
.dev-focus, .dev-coach { font-size: 13px; margin-top: 3px; color: #333; }
.dev-focus span, .dev-coach span { font-weight: 700; color: var(--navy); }
.dev-coach { color: var(--muted); }
@media (max-width: 760px) { .dev-grid { grid-template-columns: 1fr; } }

/* ---------- coach panel ---------- */
.panel-n { font-size: 9px; font-weight: 700; color: var(--muted); margin-left: 1px; }
.coach-scores { display: flex; gap: 6px; flex-wrap: wrap; }
.coach-score { font-size: 13px; color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.coach-score:hover { text-decoration: none; border-color: var(--accent); }
.coach-score b.elite { color: var(--elite); } .coach-score b.good { color: var(--good); }
.coach-score b.avg { color: #9a6a0c; } .coach-score b.low { color: var(--low); }
.coach-list { display: grid; gap: 6px; margin-top: 14px; }
.coach-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.coach-row:hover { text-decoration: none; border-color: var(--accent); }
.panel-table td, .panel-table th { white-space: nowrap; }
.panel-table .skill-cell { white-space: normal; min-width: 220px; }
.panel-table .num { text-align: center; }
.panel-table .avg-col { background: #fffbea; font-weight: 700; }
.panel-table tr.cat-row td { background: var(--surface-2); font-weight: 700; font-family: var(--display); font-stretch: 75%; text-transform: uppercase; font-size: 12.5px; }
.panel-table tr.cat-row td.avg-col { background: #fff3c4; }
.panel-table tr.total-row td { border-top: 2px solid var(--border); }
.panel-table tr.differ td { background: #fff5f3; }
.panel-table tr.differ td.avg-col { background: #ffeede; }
.differ-flag { color: var(--low); font-weight: 800; }
.panel-comments { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: grid; gap: 2px; }
.pv { font-weight: 800; font-variant-numeric: tabular-nums; }
.pv.elite { color: var(--elite); } .pv.good { color: var(--good); } .pv.avg { color: #9a6a0c; } .pv.low { color: var(--low); }
.redo-note { margin-bottom: 16px; border-left: 4px solid var(--gold); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.edit-note { align-self: center; max-width: 220px; }

/* ---------- club coaches ---------- */
.club-progress { margin-bottom: 16px; max-width: 520px; }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.club-player { display: grid; gap: 8px; align-content: start; border-top: 4px solid var(--gold); }
.club-done { font-size: 13px; font-weight: 700; color: var(--elite); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.club-todo { font-size: 13px; color: var(--muted); }
.club-form { max-width: 860px; }
.know-card { border-left: 4px solid var(--gold); }
.club-submit { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; bottom: 12px; box-shadow: 0 6px 20px rgba(15, 31, 51, .15); }
.club-submit b { font-family: var(--display); font-stretch: 75%; font-size: 22px; color: var(--navy); }
.club-card { border-left: 4px solid var(--good); }
.club-report-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); }
.club-report-row:first-of-type { border-top: 0; padding-top: 0; }
.club-report-score { display: grid; gap: 6px; justify-items: end; align-content: start; }
.know-quote { margin-top: 6px; font-size: 14px; white-space: pre-wrap; border-left: 3px solid var(--border); padding-left: 10px; color: #333; }
.club-tag { background: var(--good); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700; }
.club-admin td.wrap { white-space: normal; min-width: 180px; }
.club-reg-link { padding-top: 8px; border-top: 1px solid var(--border); }

/* ---------- sharing report cards with players ---------- */
.share-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-left: 4px solid var(--muted); }
.share-bar.is-shared { border-left-color: var(--elite); background: #f3faf6; }
.player-card-bar { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.player-card-bar .field { min-width: 260px; }
.access-card { border-left: 4px solid var(--navy); }
.pa-login { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13.5px; }
.pa-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pa-form input { width: 260px; padding: 6px 9px; font-size: 13.5px; }
.shared-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }

/* ---------- approvals ---------- */
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 800; }
.nav a.active .nav-badge { background: var(--navy); color: var(--gold); }
.approval-card { max-width: 820px; margin-left: auto; margin-right: auto; border-top: 4px solid var(--gold); }
.steps { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; counter-reset: step; flex-wrap: wrap; }
.steps li { flex: 1; min-width: 120px; position: relative; padding: 8px 8px 8px 34px; font-size: 13px; font-weight: 600; color: var(--muted); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #eef1f4; color: var(--muted); font-weight: 800; font-size: 12px; }
.steps li.done { color: var(--elite); }
.steps li.done::before { content: '✓'; background: var(--elite); color: #fff; }
.steps li.current { color: var(--navy); }
.steps li.current::before { background: var(--gold); color: var(--navy); }
.approval-actions { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.history { margin-top: 14px; font-size: 13.5px; }
.history summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.history ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }

/* ---------- rankings ---------- */
/* One graph per score: coloured bar = player's score, shaded band = group's lowest–highest, gold dot = player */
.sg-line { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.sg-track { position: relative; width: 110px; height: 10px; border-radius: 99px; background: #edf0f3; flex: none; }
.sg-band { position: absolute; top: -3px; bottom: -3px; border-radius: 4px; background: rgba(42, 66, 48, .16);
  border-left: 2px solid rgba(42, 66, 48, .45); border-right: 2px solid rgba(42, 66, 48, .45); }
.sg-fill { position: absolute; left: 0; top: 2px; bottom: 2px; border-radius: 99px; background: var(--elite); }
.sg-fill.good { background: var(--good); } .sg-fill.avg { background: var(--avg); } .sg-fill.low { background: var(--low); }
.sg-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--navy); box-sizing: border-box; }
.sg-text { font-variant-numeric: tabular-nums; }
.sg-group { font-size: 11.5px; color: var(--muted); }
.rc-rank { margin-top: 8px; font-size: 13px; }
.rc-overall .rc-rank .sg-line { flex-direction: column; gap: 4px; }

/* ---------- announcement date ---------- */
.announce-card { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; border-left: 4px solid var(--muted); }
.announce-card.is-scheduled { border-left-color: var(--gold); background: #fffbea; }
.ann-when { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 22px; color: var(--navy); margin: 2px 0; }
.ann-when.small-when { font-size: 16px; }
.ann-waiting { margin-top: 8px; font-size: 13.5px; font-weight: 600; }
.ann-form { display: grid; gap: 8px; }
.ann-form input { width: 240px; }
.announce-wait { max-width: 820px; margin: 0 auto 16px; border-left: 4px solid var(--gold); }

/* ---------- selection announcement ---------- */
.announce { flex-basis: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; padding-top: 12px; border-top: 1px solid var(--border); }
.announce-toggle { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 14px; }
.announce textarea { min-height: 44px; }
.selected-banner { max-width: 820px; margin: 0 auto 16px; padding: 18px 22px; border-radius: 12px; background: var(--navy); color: #fff; border-bottom: 5px solid var(--gold); box-shadow: var(--shadow); }
.sb-title { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 22px; color: var(--gold); text-transform: uppercase; margin-bottom: 4px; }

/* ---------- evaluator lock ---------- */
input.locked { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

/* ---------- timestamped video notes ---------- */
.vnote-composer {
  display: grid; grid-template-columns: auto minmax(120px, 190px) 1fr auto; gap: 8px; align-items: center;
  padding: 10px 12px; border-top: 1px solid var(--border); background: #fffbea;
}
.video-card.pinned .vnote-composer { border-radius: 0 0 var(--radius) var(--radius); }
.vnote-time-wrap { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.vnote-sync { border: 0; background: none; cursor: pointer; padding: 0 4px 0 8px; font-size: 15px; }
.vnote-time-wrap input { border: 0; width: 64px; padding: 7px 8px 7px 2px; font-family: var(--display); font-stretch: 75%; font-weight: 700; }
.vnote-time-wrap input:focus { outline: none; }
.vnote-composer select, .vnote-composer #vnote-text { padding: 7px 9px; font-size: 13.5px; }
.vnotes-list { display: grid; }
.vnote-row { display: grid; grid-template-columns: 70px minmax(120px, 200px) 1fr 32px; gap: 8px; align-items: center; padding: 8px 20px; border-bottom: 1px solid var(--border); }
.vnote-row input, .vnote-row select { padding: 6px 8px; font-size: 13.5px; }
.vtime {
  font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 13px; color: var(--navy);
  background: var(--gold); border: 0; border-radius: 6px; padding: 4px 8px; cursor: pointer; text-align: center; text-decoration: none;
}
.vtime:hover { text-decoration: none; filter: brightness(.95); }
#vnotes-all { font-size: 13.5px; background: var(--surface-2); }
/* Video notes nested under a skill */
.crit-vnotes { grid-column: 1 / -1; margin-top: -4px; background: #fffbea; border: 1px solid #f3e3a6; border-radius: 8px; padding: 6px 10px; }
.crit-vnotes-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8a6a00; margin-bottom: 4px; }
.skill-vnotes { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.crit-vnotes .skill-vnotes { margin: 0; }
.skill-vnotes li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; font-size: 13.5px; }
.skill-vnotes .vtime { font-size: 12px; padding: 2px 6px; }
.vnote-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px; padding: 0 2px; }
.vnote-x:hover { color: var(--danger); }
.rc-skill .skill-vnotes li { font-size: 12.5px; color: #333; }
.vnote-report { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vnote-report li { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: baseline; font-size: 14px; }
.vskill { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 640px) {
  .vnote-composer { grid-template-columns: auto 1fr; }
  .vnote-composer #vnote-text { grid-column: 1 / -1; }
  .vnote-row { grid-template-columns: 64px 1fr 32px; }
  .vnote-row input { grid-column: 1 / -1; }
}

/* ---------- player report card ---------- */
.rc-toolbar { max-width: 820px; margin: 0 auto 16px; }
.rc-controls-row { display: grid; grid-template-columns: 220px 1fr auto; gap: 16px; align-items: end; }
.rc-actions { display: grid; gap: 6px; justify-items: end; text-align: right; max-width: 200px; }
.report-card {
  max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow); -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rc-head { display: flex; align-items: center; gap: 18px; background: var(--navy); color: #fff; padding: 16px 24px; border-bottom: 5px solid var(--gold); }
.rc-head img { height: 58px; width: auto; }
.rc-title { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 24px; text-transform: uppercase; color: var(--gold); line-height: 1.1; }
.rc-sub { font-size: 13px; opacity: .9; margin-top: 2px; }
.rc-player { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.rc-who h1 { font-size: 26px; }
.rc-assessed { font-size: 13.5px; margin-top: 6px; color: var(--muted); }
.rc-assessed b { color: var(--text); }
.rc-overall { text-align: center; min-width: 130px; }
.rc-overall-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.rc-progress { font-size: 12px; font-weight: 700; margin-top: 6px; }
.rc-progress.up { color: var(--elite); }
.rc-progress.down { color: var(--low); }
.rc-section { padding: 16px 24px; border-bottom: 1px solid var(--border); break-inside: avoid; }
.rc-section > h2 { font-size: 15px; margin-bottom: 12px; color: var(--navy); }
.rc-legend { margin-top: 10px; }
.rc-cat { margin-bottom: 10px; break-inside: avoid; }
.rc-cat h3 { font-size: 13px; margin: 0 0 4px; }
.rc-cat table { width: 100%; }
.rc-cat td { padding: 5px 0; border-bottom: 1px dashed var(--border); white-space: normal; vertical-align: top; font-size: 13.5px; }
.rc-skill { padding-right: 12px !important; }
.rc-score { width: 330px; white-space: nowrap !important; }
.rc-lookfor { font-size: 12.5px; color: #333; margin-top: 2px; font-weight: 400; line-height: 1.4; }
/* "What we look for": hidden until the arrow next to the skill name is clicked */
details.lookfor > summary { cursor: pointer; list-style: none; display: inline; }
details.lookfor > summary::-webkit-details-marker { display: none; }
details.lookfor > summary::after { content: '▸'; display: inline-block; margin-left: 6px; color: var(--muted); font-size: 11px; transition: transform .15s; }
details.lookfor[open] > summary::after { transform: rotate(90deg); }
details.lookfor > summary:hover::after { color: var(--navy); }
@media print { details.lookfor > summary::after { display: none; } }
.rc-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-style: italic; }
.rc-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 24px; font-size: 11.5px; color: var(--muted); background: var(--surface-2); }
@media (max-width: 760px) {
  .rc-controls-row { grid-template-columns: 1fr; }
  .rc-actions { justify-items: start; text-align: left; }
  .rc-player { grid-template-columns: auto 1fr; }
  .rc-overall { grid-column: 1 / -1; text-align: left; }
  .rc-score { width: auto; }
}
@page card { size: A4 portrait; margin: 10mm; }

@media print {
  .topbar, .mode-banner, .no-print, .toast { display: none !important; }
  body { background: #fff; }
  .container { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  .report-card { page: card; max-width: none; border: 0; border-radius: 0; box-shadow: none; }
  .report-card .rc-section { padding: 10px 16px; }
  .report-card a { color: inherit; text-decoration: none; }
}

/* Desktop: the menu is a sidebar down the left-hand side (phones keep the top bar).
   Kept at the end of the file so it overrides the top-bar styles above. */
@media screen and (min-width: 901px) {
  :root { --sidebar: 232px; }
  body { padding-left: var(--sidebar); }
  .topbar { position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar); overflow-y: auto; }
  .topbar-inner {
    height: 100%; max-width: none; padding: 20px 0 16px;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 22px;
  }
  .brand { flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 20px; }
  .brand-logo, .brand-logo img { height: 64px; }
  .brand-name { padding: 10px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .25); max-width: none; width: 100%; }
  .nav { flex-direction: column; align-items: stretch; gap: 2px; overflow: visible; flex: 1; }
  .nav a, .nav button { display: flex; align-items: center; padding: 11px 20px; text-align: left; }
  .nav-account { margin: auto 16px 0 !important; justify-content: center; }
  .nav-badge { margin-left: auto; }
  .eval-side { top: 16px; }
  .depth-pool { top: 16px; max-height: calc(100vh - 32px); }
  .video-card.pinned { top: 8px; }

  /* Collapse button at the foot of the sidebar */
  .nav-collapse {
    display: flex; align-items: center; gap: 10px; margin: 0 16px; padding: 8px 10px;
    background: none; border: 0; border-radius: 6px; color: rgba(255, 255, 255, .65); cursor: pointer;
    font-family: var(--display); font-stretch: 75%; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  }
  .nav-collapse:hover { background: var(--navy-2); color: #fff; }
  .nav-collapse svg { width: 18px; height: 18px; flex: none; transition: transform .2s; }

  /* Collapsed: icons only */
  html.nav-collapsed { --sidebar: 72px; }
  .nav-collapsed .nav-label, .nav-collapsed .brand-name { display: none; }
  .nav-collapsed .brand { padding: 0; align-items: center; }
  /* Collapsed: the shield logo replaces the wide AFA logo */
  .nav-collapsed .brand-logo { height: 52px; }
  .nav-collapsed .brand-logo img { display: none; }
  .nav-collapsed .brand-logo img.brand-shield { display: block; height: 52px; width: 52px; object-fit: contain; }
  .nav-collapsed .nav a { justify-content: center; padding: 12px 0; position: relative; gap: 0; }
  .nav-collapsed .nav-account { margin: auto 12px 0 !important; padding: 10px 0 !important; }
  .nav-collapsed .nav-badge { position: absolute; top: 4px; right: 12px; min-width: 16px; height: 16px; padding: 0 4px; margin: 0; font-size: 10px; }
  .nav-collapsed .nav-collapse { justify-content: center; margin: 0 12px; }
  .nav-collapsed .nav-collapse svg { transform: rotate(180deg); }
}
/* Menu icons (all sizes); the collapse button is desktop-only */
.nav a { display: inline-flex; align-items: center; gap: 10px; }
.nav-ico svg { width: 18px; height: 18px; display: block; flex: none; }
.brand-logo img.brand-shield { display: none; }
@media not screen and (min-width: 901px) { .nav-collapse { display: none; } }
