:root {
  --navy: #12235f;
  --navy-2: #2a3b80;
  --ink: #1b1f2a;
  --muted: #667085;
  --line: #e3e6ee;
  --bg: #f5f6fa;
  --card: #ffffff;
  --g1: #1d4ed8;
  --g2: #7c3aed;
  --g3: #0f9f6e;
  --g4: #d97706;
  --danger: #c0392b;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--navy-2); }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: .75rem 0 .35rem; }
main { max-width: 1440px; margin: 0 auto; padding: 20px 16px 60px; }
main.wide { max-width: none; }
.muted { color: var(--muted); }
.tiny { font-size: .78rem; }
.strong { font-weight: 600; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.private { color: var(--danger); font-weight: 600; }
.crumbs { margin: 0 0 .25rem; font-size: .85rem; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 20px; padding: 8px 16px; background: var(--navy); color: #fff; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .06em; }
.brand img { background: #fff; border-radius: 50%; }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a { color: #dfe5ff; text-decoration: none; padding: 6px 12px; border-radius: 6px; }
.topbar nav a.on, .topbar nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.who { display: flex; align-items: center; gap: 8px; font-size: .85rem; margin: 0; }
.who .role { background: rgba(255,255,255,.18); border-radius: 99px; padding: 1px 8px; text-transform: capitalize; }
.who .link { color: #fff; }

/* controls */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { border: 1px solid #cdd2de; border-radius: 7px; padding: 7px 9px; background: #fff; max-width: 100%; }
textarea { width: 100%; resize: vertical; }
button { border: 1px solid #cdd2de; background: #fff; border-radius: 7px; padding: 7px 14px; cursor: pointer; }
button:hover { border-color: var(--navy-2); }
button.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
button.primary:hover { background: var(--navy-2); }
a.button { display: inline-block; border: 1px solid #cdd2de; background: #fff; border-radius: 7px; padding: 7px 14px; text-decoration: none; color: inherit; }
a.button.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
a.button.primary:hover { background: var(--navy-2); }
.inline-label { flex-direction: column; gap: 0; font-weight: 400; }
button.small { padding: 4px 10px; font-size: .85rem; }
button.link { border: 0; background: none; padding: 0; color: var(--navy-2); text-decoration: underline; font-size: inherit; }
button.link.danger { color: var(--danger); }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.row label { flex-direction: row; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
form.inline { display: inline; margin: 0; }
.flash { background: #eef6ff; border: 1px solid #c7defa; padding: 10px 14px; border-radius: var(--radius); }
.error { color: var(--danger); font-weight: 600; }

/* layout bits */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
details.panel > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--navy); border-color: var(--navy); font-weight: 600; }

/* badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: #eef0f5; color: #475069; }
.badge.g1 { background: #e3ebff; color: var(--g1); }
.badge.g2 { background: #efe6ff; color: var(--g2); }
.badge.g3 { background: #ddf6ec; color: var(--g3); }
.badge.g4 { background: #fdf0d9; color: #a85b00; }
.badge.perf { background: #e9ecf8; color: var(--navy-2); }
.badge.dev { background: #e9f6ef; color: #237a52; }
.badge.none { background: #f1f1f1; color: #888; }
.status { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: .78rem; background: #f0f1f4; white-space: nowrap; }
.s-ready-to-generate { background: #fff4d6; }
.s-generated { background: #e3ebff; }
.s-shared-with-player { background: #ddf6ec; color: #136c48; }
.s-n-a { color: #999; }

/* groups */
.group-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 800px) { .group-cards { grid-template-columns: repeat(2, 1fr); } }
.group-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid; border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: inherit; }
.group-card.g1 { border-top-color: var(--g1); } .group-card.g2 { border-top-color: var(--g2); }
.group-card.g3 { border-top-color: var(--g3); } .group-card.g4 { border-top-color: var(--g4); }
.group-card.on { box-shadow: 0 0 0 2px var(--navy-2); }
.gc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: .9rem; }
.gc-count { font-size: 1.8rem; font-weight: 700; }
.gc-coaches { font-size: .8rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.chip { padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: inherit; font-size: .85rem; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips .count { margin-left: auto; }
.chips .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.new-camp summary { cursor: pointer; color: var(--navy-2); font-weight: 600; }
.new-camp form { margin-top: 10px; }
.table-scroll { overflow-x: auto; }
table.data.db td { vertical-align: middle; }
table.data input.cell, table.data select.cell { border-color: transparent; background: transparent; padding: 4px 6px; }
table.data input.cell:hover, table.data select.cell:hover { border-color: #cdd2de; }
table.data input.cell:focus { border-color: var(--navy-2); background: #fff; outline: none; }
table.data input[type=email].cell { min-width: 210px; }
table.data input[type=url].cell { min-width: 170px; }
.folder-cell { white-space: nowrap; }
input.attendance { display: block; margin-top: 2px; width: 140px; color: var(--muted); }
.profile-actions .spacer { flex: 1; }
.profile-actions button { margin-left: 0; }
a.button.google { display: inline-flex; align-items: center; gap: 10px; justify-content: center; width: 100%; padding: 10px 14px; font-weight: 600; margin: 8px 0; }
.dev-login { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.status-ok { color: #136c48; font-weight: 600; }

/* tables */
table.data { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: #f8f9fc; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
table.data.compact th, table.data.compact td { padding: 6px 10px; }
.history { white-space: nowrap; }
.hist { display: inline-flex; flex-direction: column; align-items: flex-start; margin-right: 8px; opacity: .8; }
.hist.on { opacity: 1; }
.notes-cell { min-width: 240px; max-width: 420px; }
.latest-note { display: flex; flex-direction: column; margin-bottom: 4px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quick-note summary { cursor: pointer; color: var(--navy-2); font-size: .82rem; }
.quick-note form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; align-items: flex-start; }
@media (max-width: 700px) {
  table.data thead { display: none; }
  table.data tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.data td, table.data th { display: block; border: 0; padding: 4px 12px; }
  .notes-cell { max-width: none; }
  .history { white-space: normal; }
}

/* notes */
.note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; align-items: flex-start; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; margin-bottom: 10px; }
.notes form.inline { margin-left: 8px; }
.notes p { margin: 0 0 2px; white-space: pre-wrap; }
.note-group h3 { color: var(--muted); }
.current { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.field-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: .9rem; }
dt { color: var(--muted); }
dd { margin: 0; }
dd.long { grid-column: 1 / -1; white-space: pre-wrap; background: #fafbfd; padding: 6px 8px; border-radius: 6px; }

/* camps */
.camp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.camp-card { text-decoration: none; color: inherit; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; }
.bulk { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 16px; }
table.grid { border-collapse: separate; border-spacing: 0; font-size: .85rem; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); border-right: 1px solid #f0f1f5; padding: 4px 6px; vertical-align: top; }
table.grid thead th { position: sticky; top: 0; background: #f8f9fc; z-index: 2; text-align: left; font-weight: 600; min-width: 80px; }
table.grid .sticky { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 160px; text-align: left; }
table.grid thead .sticky { z-index: 3; background: #f8f9fc; }
table.grid input, table.grid select, table.grid textarea { padding: 4px 6px; border-color: transparent; background: transparent; }
table.grid input:hover, table.grid textarea:hover, table.grid select:hover { border-color: #cdd2de; }
table.grid input:focus, table.grid textarea:focus { border-color: var(--navy-2); background: #fff; outline: none; }
table.grid .wide-col { min-width: 260px; }
table.grid textarea { min-width: 250px; }
table.grid .computed { color: #344; background: #eef3fb; font-weight: 600; }
table.grid thead th.computed { background: #e3ebf8; }
table.grid td.long { min-width: 260px; max-width: 360px; white-space: pre-wrap; }
table.grid .actions { white-space: nowrap; }
.saving { background: #fff9e0 !important; }
.saved { background: #e3f8ec !important; }
.failed { background: #fde8e6 !important; border-color: var(--danger) !important; }

/* login */
.login { max-width: 380px; margin: 8vh auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; text-align: center; }
.login form { text-align: left; }
.login input { width: 100%; }

/* profile: mirrors the Google Doc template */
.profile-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; max-width: 816px; margin: 0 auto 12px; }

.profile { background: #fff; max-width: 816px; margin: 0 auto; padding: 48px 56px; box-shadow: 0 2px 14px rgba(0,0,0,.08); font-family: Arial, Helvetica, sans-serif; color: #000; }
.p-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.p-head > div { flex: 1; }
.p-head h1 { font-size: 2.1rem; font-weight: 400; margin: 0; }
.p-head p { margin: 2px 0; }
.p-sub { font-size: 1.3rem; }
.p-head hr { border: 0; border-top: 1px solid #999; margin: 12px 0 0; }
.p-logo { width: 130px; height: auto; }
.profile h2 { font-size: 1.25rem; margin: 28px 0 10px; }
.profile h3 { font-size: 1rem; margin: 14px 0 4px; }
.p-text { white-space: pre-wrap; margin: 0 0 10px; }
table.pt { width: 100%; border-collapse: collapse; text-align: center; font-size: .9rem; }
table.pt.narrow { width: 50%; }
table.pt th, table.pt td { border: 2px solid #fff; padding: 6px 4px; }
table.pt thead th { background: #002060; color: #fff; font-weight: 400; font-size: 1rem; }
table.pt thead tr.sub th { font-size: .8rem; }
table.pt tbody td { background: #f2f2f2; }
table.pt tr.strong td { font-weight: 700; }
table.testing tbody th { text-align: right; font-weight: 400; padding-right: 10px; background: #f2f2f2; font-size: .85rem; }
table.testing tr.personal th { font-weight: 700; }
table.testing tr.bench td, table.testing tr.bench th { background: #d9d9d9; }
table.testing tr.b-best td, table.testing tr.b-best th { background: #b3ff66; }
table.testing tr.b-team1 td, table.testing tr.b-team1 th { background: #ffff00; }
table.testing tr.b-perf td, table.testing tr.b-perf th { background: #cfe2f3; }
table.testing tr.b-yours td, table.testing tr.b-yours th { background: #bfbfbf; }
.profile + .profile { margin-top: 24px; }
@media (max-width: 700px) {
  .profile { padding: 20px 16px; }
  .p-logo { width: 72px; }
  .p-head h1 { font-size: 1.5rem; }
  table.pt { font-size: .75rem; }
  table.pt.narrow { width: 100%; }
}

@media print {
  @page { size: letter; margin: 0.5in; }
  body { background: #fff; }
  .no-print, .topbar, .flash { display: none !important; }
  main { padding: 0; max-width: none; }
  .profile { box-shadow: none; padding: 0; max-width: none; }
  .profile + .profile { break-before: page; }
  table.pt th, table.pt td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
button.danger-outline { color: var(--danger); border-color: #e7b4ae; }

/* player photos */
.player-head { align-items: center; justify-content: flex-start; }
.player-head .grow, .task-head .grow { flex: 1; }
.player-photo img, .player-photo.none { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; display: block; }
.player-photo.none, .task-photo.none { display: grid; place-items: center; background: #e9ecf8; color: var(--navy-2); font-weight: 700; font-size: 1.3rem; }

/* attendance */
th.att-col, td.att-col { white-space: nowrap; }
select.att { min-width: 110px; }
.att-yes { color: #136c48; }
.att-no { color: var(--danger); }
.att-maybe { color: #a85b00; }
.att-pill { font-size: .8rem; font-weight: 600; }
.import-panel summary { cursor: pointer; color: var(--navy-2); font-weight: 600; }
.import-panel form { margin: 10px 0; }
.wide-input { min-width: 320px; flex: 1; }
tr.imp-close td { background: #fff9e8; }
tr.imp-new td { background: #fdeeee; }

/* my tasks */
.task-summary { margin-bottom: 14px; color: var(--muted); }
.task-summary .big { font-size: 1.6rem; font-weight: 700; color: var(--ink); }
.task-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
@media (max-width: 700px) { .task-list { grid-template-columns: 1fr; } }
.task-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.task-head h3 { margin: 0 0 4px; font-size: 1.05rem; }
.task-section { margin-bottom: 22px; }
.role-help { margin: 8px 0 0; padding-left: 18px; }
.task-photo, .task-photo.none { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; font-size: 1rem; }
.checklist { list-style: none; padding: 0; margin: 8px 0; }
.checklist li { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.checklist .box { width: 18px; height: 18px; border: 2px solid #b9c0d4; border-radius: 4px; display: grid; place-items: center; font-size: .75rem; color: #fff; }
.checklist li.done { color: var(--muted); text-decoration: line-through; }
.checklist li.done .box { background: #1f9d6b; border-color: #1f9d6b; }
.task-field { margin: 8px 0; font-weight: 600; }
.staff-note { background: #fff6e5; padding: 6px 8px; border-radius: 6px; }
.done-list li { margin: 4px 0; }
.lock { font-size: .8rem; }
button:disabled { opacity: .45; cursor: not-allowed; }
.aka { margin-top: 4px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.inactive-panel summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.inactive-panel tr td { opacity: .8; }

/* evaluations */
.eval-form { margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fbfcfe; }
.eval-form summary { cursor: pointer; font-weight: 600; }
.eval-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 6px; }
.eval-grid fieldset { border: 0; padding: 0; margin: 0; }
.eval-grid legend { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 4px; }
.eval-grid label { flex-direction: row; justify-content: space-between; align-items: center; font-weight: 400; font-size: .85rem; gap: 6px; margin-bottom: 3px; }
.eval-grid select { width: 64px; padding: 3px 4px; font-size: .85rem; text-align: center; }
.eval-grid select.legacy { border-color: #e0b44b; background: #fff8e6; }
.eval-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.eval-host { margin-top: 12px; }
.eval-table th.sec, .eval-overview th.sec { text-align: center; background: #eef1f8; }
.eval-table td.center, .eval-table th.center, .eval-overview .center { text-align: center; }
.eval-table .avg-row td { font-weight: 700; background: #f3f6fb; }
.eval-overview .player-row th, .eval-overview .player-row td { background: #f3f6fb; border-top: 2px solid var(--line); }
.eval-overview .coach-row th { font-weight: 400; padding-left: 16px; }
.eval-overview td.missing { color: var(--danger); font-weight: 600; }

/* score guide tooltip */
.scale-tip { position: relative; display: inline-block; color: var(--navy-2); cursor: help; font-weight: 600; white-space: nowrap; outline: none; }
.scale-tip-box { display: none; position: absolute; z-index: 20; left: 0; top: calc(100% + 6px); min-width: 230px; padding: 8px 10px; background: #1b1f2a; color: #fff; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18); font-weight: 400; font-size: .8rem; line-height: 1.5; white-space: normal; text-align: left; }
.scale-tip-box span { display: block; }
.scale-tip:hover .scale-tip-box, .scale-tip:focus .scale-tip-box, .scale-tip:focus-within .scale-tip-box { display: block; }
.trial-switch select { font-size: .85rem; padding: 3px 6px; margin-bottom: 4px; }
.checklist li.manual label { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; font-size: inherit; }
.checklist li.manual input { width: 18px; height: 18px; margin: 0; accent-color: #1f9d6b; }
.checklist li.manual input:disabled + * , .checklist li.manual input:disabled { cursor: not-allowed; }

/* profile endurance chart */
.p-chart { margin: 4px 0 0; }
.p-chart svg { width: 100%; height: auto; display: block; }
.p-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .82rem; margin-top: 4px; }
.p-legend i { display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; }

/* profile template editor */
.tpl-layout { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .tpl-layout { grid-template-columns: 1fr; } }
.tpl-editor { display: flex; flex-direction: column; gap: 10px; }
.tpl-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tpl-row { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.tpl-row.off { opacity: .55; }
.tpl-row p { margin: 2px 0 6px; }
.tpl-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tpl-on { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
.tpl-move { display: flex; gap: 4px; }
.tpl-field { font-weight: 600; font-size: .82rem; margin-top: 4px; }
.tpl-field input, .tpl-field textarea { width: 100%; font-weight: 400; }
.tpl-bench { border: 0; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.tpl-bench label { flex-direction: row; gap: 4px; font-weight: 400; }
.tpl-preview { position: sticky; top: 10px; }
.tpl-frame { width: 100%; height: 82vh; border: 1px solid var(--line); border-radius: 10px; background: #f5f6fa; margin-top: 8px; }
.preview-pad { padding: 16px; }
.eval-box { border-left: 4px solid var(--navy-2); }
.eval-box h3 { margin-top: 0; font-size: 1.05rem; }
.eval-box > p { margin: 0 0 8px; }
.profile h3.p-subhead { font-size: 1.02rem; margin: 18px 0 8px; color: #1b1f2a; }
.tpl-row.is-sub { margin-left: 22px; border-left: 3px solid var(--line); }
.tpl-sub { gap: 6px; font-weight: 400; margin-bottom: 2px; }
.requests { border-left: 4px solid #e0a020; }
.email-cell input { display: block; }
table.data input.cell.alt { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* evaluation table: tabs, frozen Coach + Overall, final score */
.eval-tabs { display: flex; gap: 4px; margin: 6px 0; }
.eval-tabs button { padding: 4px 12px; font-size: .82rem; border-radius: 99px; }
.eval-tabs button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.eval-table .fz { position: sticky; background: #fff; z-index: 1; }
.eval-table thead .fz { background: #f8f9fc; z-index: 2; }
.eval-table .fz1 { left: 0; min-width: 150px; }
.eval-table .fz2 { left: 150px; min-width: 70px; border-right: 2px solid var(--line); }
.eval-table .avg-row .fz { background: #f3f6fb; }
.eval-table td.override { background: #fff6e0; }
.eval-table td select { padding: 2px 4px; font-size: .82rem; }
/* photo pop-up */
#lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; }
#lightbox::backdrop { background: rgba(10, 12, 20, .75); }
#lightbox img { display: block; max-width: 92vw; max-height: 88vh; border-radius: 10px; }
#lightbox .lb-close { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); color: #fff; border: 0; font-size: 1.4rem; line-height: 1; padding: 4px 10px; border-radius: 99px; }
/* locked fields */
[data-lockable] textarea[readonly] { background: #f6f7fa; color: var(--ink); }
main { max-width: 1440px; }
.inline-edit { display: inline-block; margin-left: 8px; }
.inline-edit summary { display: inline; cursor: pointer; color: var(--navy-2); text-decoration: underline; }
.inline-edit[open] { display: block; margin: 6px 0; }
.inline-edit form { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-top: 4px; }

/* player page */
.details-edit { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: flex-end; margin: 4px 0; }
.details-edit label { font-weight: 400; color: var(--muted); }
.details-edit input { min-width: 200px; }
.trial-panel .compare { margin: 10px 0 14px; }
.trial-panel .compare h3 { margin: 0 0 6px; }
.trial-panel .compare textarea { width: 100%; }
td.cmp-better { color: #136c48; }
td.cmp-worse { color: var(--danger); }
td.cmp-better-bg { background: #eaf8f0; }
td.cmp-worse-bg { background: #fdeeee; }

/* analytics */
.bars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 24px; margin-top: 14px; }
.bars h4 { margin: 0 0 6px; font-size: .9rem; }
.bar-row { display: grid; grid-template-columns: 62px 1fr 48px; align-items: center; gap: 6px; font-size: .8rem; margin: 3px 0; }
.bar-track { background: #f1f3f8; border-radius: 4px; height: 12px; overflow: hidden; }
.bar { display: block; height: 100%; border-radius: 4px; }
.bar-val { text-align: right; font-weight: 600; }
.standouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 24px; }
.standouts h4 { margin: 0 0 4px; font-size: .9rem; }
.standouts ol { margin: 0; padding-left: 18px; font-size: .85rem; }
td.ai-comment { min-width: 280px; max-width: 420px; color: #39404f; }
.camp-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 24px; }
.camp-groups ul { margin: 0; padding-left: 18px; }
.att-sum { background: #f1f3f8; padding: 4px 10px; border-radius: 99px; }

/* sortable tables */
table[data-sortable] thead th:not([data-nosort]) { cursor: pointer; user-select: none; }
table[data-sortable] thead th:not([data-nosort]):hover { background: #eef1f8; }
table[data-sortable] thead th[data-sorted="asc"]::after { content: " ▲"; font-size: .7em; }
table[data-sortable] thead th[data-sorted="desc"]::after { content: " ▼"; font-size: .7em; }

button.xs { padding: 2px 8px; font-size: .75rem; white-space: nowrap; }
button[hidden] { display: none; }

/* My tasks, on the right of the header */
.tasks-link { color: #dfe5ff; text-decoration: none; padding: 6px 12px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }
.tasks-link.on, .tasks-link:hover { background: rgba(255,255,255,.14); color: #fff; }
.tasks-link .count { background: #f59e0b; color: #1b1f2a; border-radius: 99px; min-width: 20px; padding: 0 6px; font-size: .75rem; font-weight: 700; text-align: center; line-height: 20px; }
.tasks-link .count.zero { background: rgba(255,255,255,.18); color: #dfe5ff; }

/* view as coach */
.view-as select { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: 4px 8px; font-size: .85rem; }
.view-as option { color: #1b1f2a; }
.viewing-as { background: #fff4d6; border-bottom: 1px solid #f0d38a; margin: 0; padding: 8px 16px; font-size: .9rem; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.viewing-as form { margin: 0; }
form.inline { display: inline; }

/* Evaluations page: big tabs on the same row as the group filter */
.eval-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.big-tabs { display: flex; gap: 6px; }
.big-tabs a { padding: 12px 20px; font-size: 1.05rem; font-weight: 600; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.big-tabs a:hover { color: var(--navy); }
.big-tabs a.on { color: var(--navy); border-color: var(--navy); }
select.trial-switch { margin-bottom: 4px; }

/* status colours */
.s-incomplete { background: #fff4d6; color: #8a5a00; }
.s-complete { background: #e3ebff; color: #1d4ed8; }
.s-shared { background: #ddf6ec; color: #136c48; }
select.status-select { border-radius: 6px; font-weight: 600; }
.group-card.unassigned { border-top-color: #9aa1ad; }
.group-cards { grid-template-columns: repeat(4, 1fr); }
.folder-cell .button.small { display: inline-block; padding: 3px 10px; font-size: .8rem; white-space: nowrap; }
.folder-edit summary { cursor: pointer; color: var(--muted); margin-top: 4px; }
.folder-edit[open] summary { margin-bottom: 4px; }
button.link:disabled { color: #a3a8b3; text-decoration: none; cursor: not-allowed; }

/* top bar: keep everything on one centred line */
.topbar { align-items: center; }
.topbar nav, .topbar .tasks-link, .topbar .view-as, .topbar .who { align-self: center; }
.topbar .view-as { margin: 0; display: flex; align-items: center; }
.topbar .view-as select { height: 32px; }
.topbar .tasks-link { height: 32px; box-sizing: border-box; }

/* player page header card */
.player-card { display: flex; gap: 20px; align-items: flex-start; }
.player-card .player-photo { flex: none; }
.player-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.player-title h1 { margin: 0 6px 0 0; }
.chip-static { background: #f1f3f8; border-radius: 99px; padding: 2px 10px; font-size: .8rem; color: var(--muted); }
.player-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.player-facts > div { min-width: 0; }
.player-facts .wide { grid-column: 1 / -1; }
.player-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 3px; }
.player-facts dd { margin: 0; overflow-wrap: anywhere; }
.player-facts input, .player-facts select { width: 100%; box-sizing: border-box; min-width: 0; }
@media (max-width: 900px) { .player-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .player-card { flex-direction: column; } }

/* collapsible note groups on the player page */
details.note-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
details.note-group > summary::before { content: '▸'; color: var(--muted); }
details.note-group[open] > summary::before { content: '▾'; }
details.note-group > summary::-webkit-details-marker { display: none; }
details.note-group > summary h3 { margin: 0; font-size: 1rem; }

/* evaluation section tabs: look like real tabs */
.eval-tabs { display: flex; gap: 2px; margin: 10px 0 0; border-bottom: 2px solid var(--line); }
.eval-tabs button { padding: 8px 18px; font-size: .9rem; font-weight: 600; border: 1px solid var(--line); border-bottom: none; border-radius: 8px 8px 0 0; background: #f1f3f8; color: var(--muted); margin-bottom: -2px; }
.eval-tabs button:hover { color: var(--navy); background: #e8ecf5; }
.eval-tabs button.on { background: #fff; color: var(--navy); border-color: var(--line); border-top: 3px solid var(--navy); border-bottom: 2px solid #fff; }
/* comparison table numbers centred */
.compare td.center, .compare th.center, table.data td.center, table.data th.center { text-align: center; }
