:root {
  color-scheme: light;
  --ink: #16181d;
  --muted: #5b616b;
  --canvas: #f4f4f2;
  --line: #e4e4e0;
  --red: #a61e2e;
  --pale-red: #fbeced;
  --green: #206046;
  --pale-green: #e7f3eb;
  --amber: #805410;
  --pale-amber: #fbf0dc;
  --paper: #fff;
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #c44958; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: Archivo, Inter, system-ui, sans-serif; line-height: 1.16; }
h1 { font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -.035em; margin: 4px 0 7px; }
h2 { font-size: 20px; letter-spacing: -.02em; margin: 0; }
h3 { font-size: 16px; margin: 0; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
.skip-link { background: #fff; padding: 10px; position: fixed; left: 12px; top: -100px; z-index: 5; }
.skip-link:focus { top: 12px; }
.shell { display: grid; grid-template-columns: 240px minmax(0,1fr); min-height: 100vh; }
.side { background: var(--ink); color: #fff; padding: 22px 14px; }
.identity { display: flex; align-items: center; gap: 10px; margin: 0 7px 24px; text-decoration: none; }
.identity strong { display: block; font-size: 16px; }
.identity small { display: block; color: #b9bdc6; }
.monogram { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; flex: none; background: var(--red); color: #fff; font-weight: 800; }
.side nav { display: grid; gap: 16px; }
.nav-title { display: block; color: #b9bdc6; padding: 0 10px 5px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.nav-link { min-height: 39px; border-radius: 8px; display: flex; align-items: center; padding: 7px 11px; color: #d9dbe0; text-decoration: none; }
.nav-link:hover, .nav-link[aria-current] { background: #30343c; color: #fff; }
.nav-link[aria-current] { box-shadow: inset 3px 0 var(--red); font-weight: 700; }
.workspace { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px clamp(15px,3vw,32px); background: #fff; border-bottom: 1px solid var(--line); }
.topbar .actions { gap: 8px; }
.mobile-nav { display: none; }
main.content { max-width: 1420px; margin: auto; padding: 25px clamp(15px,3vw,32px) 42px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.page-head p { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.button, .actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: 8px; border: 1px solid #cfd1cc; background: #fff; color: var(--ink); font-weight: 650; text-decoration: none; text-align: center; }
.button:hover, .actions button:hover { background: #f0f0ee; }
.button.primary, .actions button.primary { border-color: var(--red); background: var(--red); color: #fff; }
.button.primary:hover, .actions button.primary:hover { background: #881926; }
.button.small, .topbar select { min-height: 36px; padding: 6px 9px; font-size: 13px; }
.panel, .metric, .access-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: clamp(15px,2vw,22px); min-width: 0; }
.access-card { width: min(calc(100% - 28px),445px); margin: 12vh auto; }
.access-card form { display: grid; gap: 11px; }
.access-card .monogram { margin-bottom: 15px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-head a { font-weight: 650; }
.stack { display: grid; gap: 16px; }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,155px),1fr)); gap: 12px; margin: 0 0 18px; }
.metric { display: grid; gap: 2px; text-decoration: none; }
.metric:hover { border-color: #c9a4a9; }
.metric strong { font-size: 30px; letter-spacing: -.035em; line-height: 1.2; }
.metric span { color: var(--muted); }
.row-list { display: grid; }
.record { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #efefec; min-width: 0; }
.record > div { min-width: 0; overflow-wrap: anywhere; }
.record strong, .record small { display: block; }
.record .actions { flex: none; }
.record-link { display: block; text-decoration: none; }
.record-link:hover strong { text-decoration: underline; }
.filters { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
label { display: grid; gap: 4px; font-weight: 650; }
input, select, textarea { min-width: 0; max-width: 100%; min-height: 44px; border: 1px solid #cfd1cc; border-radius: 8px; background: #fff; color: var(--ink); padding: 8px 10px; }
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"] { min-height: 0; accent-color: var(--red); }
.check { display: flex; align-items: center; gap: 8px; }
.filters label { font-size: 13px; flex: 1 1 160px; }
.list-detail { display: grid; grid-template-columns: minmax(230px,1fr) minmax(0,1.65fr); gap: 16px; align-items: start; }
.record-list { padding: 0; overflow: hidden; }
.record-list .record { padding: 12px 16px; }
.record-list .record:first-child { border-top: 0; }
.record-list .record:has([aria-current]) { background: #fbf0f1; box-shadow: inset 3px 0 var(--red); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 10px; }
th { background: #f7f7f5; font-size: 12px; color: var(--muted); white-space: nowrap; }
td { overflow-wrap: anywhere; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #efefec; color: #414750; font-size: 12px; font-weight: 650; }
.status.good { color: var(--green); background: var(--pale-green); }
.status.warn { color: var(--amber); background: var(--pale-amber); }
.status.bad { color: #941c2a; background: var(--pale-red); }
.empty { color: var(--muted); padding: 12px 0; margin: 0; }
.form-grid { display: grid; gap: 13px; }
.form-grid .actions { margin-top: 5px; }
.preview-note { color: #69450d; background: var(--pale-amber); border: 1px solid #ead6b2; border-radius: 8px; padding: 9px 12px; margin-bottom: 16px; }
.desk-head, .coach-head { background: var(--ink); color: #fff; padding: 18px 20px; border-radius: 12px; }
.desk-head small, .coach-head small, .desk-head p { color: #d9dbe0; }
.desk-head .status { background: #30343c; color: #fff; }
.coach-actions .button { flex: 1 1 140px; }
.foot { margin-top: 25px; color: var(--muted); font-size: 12px; }
.score { font-variant-numeric: tabular-nums; font-weight: 750; }
#toast { position: fixed; right: 15px; bottom: 15px; z-index: 5; max-width: min(calc(100vw - 30px),440px); }
#toast:not(:empty) { background: var(--ink); color: #fff; border-radius: 9px; padding: 11px 14px; }
@media (max-width: 1040px) { .grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .side { display: none; }
  .mobile-nav { display: block; min-width: 130px; }
  .list-detail { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .topbar { align-items: start; }
  .topbar > .actions { width: 100%; }
  .topbar > .actions > * { flex: 1; }
  .record { align-items: start; flex-wrap: wrap; }
  .content .page-head .actions { width: 100%; }
  .coach-actions .primary { flex-basis: 100%; }
  .table-scroll td, .table-scroll th { min-width: 78px; }
}
@media print {
  .shell { display: block; } .side, .topbar, .actions, .filters, .foot, #toast { display: none !important; }
  body { background: #fff; } .panel { break-inside: avoid; }
}
