/* AOIT — staff side. Tokens first; phone-first layout. The colours are the
   Mendip App's (its style.css :root), so AOIT inside the App frame reads as
   part of it (David 2026-10-08). The ☰ menu: menu.css; messages: msg.css. */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: local("Poppins Regular"), local("Poppins-Regular"), url("../fonts/Poppins-Regular.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: local("Poppins SemiBold"), local("Poppins-SemiBold"), url("../fonts/Poppins-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 900; font-style: normal; font-display: swap; src: local("Poppins Black"), local("Poppins-Black"), url("../fonts/Poppins-Black.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --line: #dde1e7;
  --brand: #005e85;
  --brand-dark: #004669;
  --brand-light: #e8f4fd;
  --brand-ink: #ffffff;
  --accent: #005e85;
  --warn-bg: #fff4dd;
  --warn-line: #f0c46a;
  --note-bg: #e8f4fd;
  --radius: 12px;
  --header-h: 60px;
  --team-a: #2f6fdb;
  --team-b: #1f9a62;
  --team-c: #d9822b;
  --team-d: #8a4fc7;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.45rem; margin: 0 0 2px; }
h2 { font-size: 1.05rem; margin: 0; }
h3.sub { font-size: .9rem; margin: 14px 0 8px; color: var(--muted); font-weight: 600; }
code { background: #eef1f4; padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

/* ── Header: the Mendip App's (style.css .app-header, home-v2.css) ──────── */
.app-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: var(--brand); box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 1rem; }
html.desktop .header-inner { padding: 0 24px; gap: 18px; }
.header-logo { display: flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; min-width: 0; }
.logo-img { display: block; height: 34px; width: auto; }
html.desktop .logo-img { height: 40px; }
.logo-text { font-family: var(--v2-font); font-weight: 900; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.logo-sub { display: none; font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .8; }
html.desktop .logo-sub { display: inline; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.header-user { color: rgba(255,255,255,.85); font-size: .85rem; display: none; white-space: nowrap; }
@media (min-width: 700px) { .header-user { display: block; } }

/* The message bubble, one tap from every page (app.css .hdr-msg) */
.hdr-msg {
  position: relative; display: inline-flex; align-items: center; color: #fff; text-decoration: none;
  line-height: 1; padding: .3rem .15rem; margin-right: .35rem; -webkit-tap-highlight-color: transparent;
}
.hdr-msg__ico { display: block; }
.hdr-msg__badge {
  position: absolute; top: -3px; right: -8px; background: #d33; color: #fff; font-style: normal;
  font-size: .62rem; font-weight: 700; border-radius: 999px; min-width: 1.05rem; text-align: center;
  padding: .08rem .2rem; border: 2px solid var(--brand);
}
html:not(.desktop) .hdr-msg {
  width: 42px; height: 42px; border-radius: 10px; background: rgba(255,255,255,.12);
  display: inline-grid; place-items: center; padding: 0; margin-right: 8px;
}
html:not(.desktop) .hdr-msg__badge { top: -4px; right: -6px; }
html.desktop .hdr-msg { display: none; }   /* the Messages tab carries the count */

/* Desktop tabs: the App rail's item look, laid along the bar */
.hdr-tabs { display: none; }
html.desktop .hdr-tabs { display: flex; gap: 4px; }
.hdr-tab {
  display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,.82); text-decoration: none;
  font-family: var(--v2-font); font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 10px;
}
.hdr-tab:hover { background: rgba(255,255,255,.10); color: #fff; }
.hdr-tab.is-on { background: rgba(255,255,255,.18); color: #fff; }
.hdr-tab__n {
  font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #d33; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* Inside the Mendip App frame: a slim white strip with the tabs and ☰ — the
   App's shell shows who you are and owns sign-out. */
body.embedded { --header-h: 46px; }
body.embedded .app-header { background: #fff; box-shadow: none; border-bottom: 1px solid var(--v2-line); }
body.embedded .header-inner { padding: 0 10px; }
body.embedded .header-logo, body.embedded .header-user, body.embedded .hdr-msg,
body.embedded .hv2-out, body.embedded .hv2-out-form { display: none; }
body.embedded .hdr-tabs { display: flex; gap: .2rem; }
body.embedded .hdr-tab { color: var(--v2-muted); font-size: .86rem; font-weight: 500; padding: .45rem .85rem; border-radius: 8px; min-height: 34px; }
body.embedded .hdr-tab:hover { background: var(--v2-page); color: var(--v2-ink); }
body.embedded .hdr-tab.is-on { background: var(--v2-wash); color: var(--brand); font-weight: 600; }
body.embedded .hdr-tab__n { background: var(--brand); }
html body.embedded .hdr-menu__btn { color: var(--v2-ink); background: var(--v2-wash); width: 36px; height: 36px; border-radius: 10px;
  display: inline-grid; place-items: center; padding: 0; font-size: 1.05rem; }   /* html: outranks menu.css's phone rule */

/* ── Page ───────────────────────────────────────────────────────────────── */
main { max-width: 1280px; margin: 0 auto; padding: 16px 16px 80px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 24px; margin: 4px 0 14px; }
.head .small { max-width: 420px; margin: 0; }
.crumb { margin: 0 0 6px; font-size: .9rem; }
.crumb a { text-decoration: none; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.note { background: var(--note-bg); border: 1px solid #c9dfe6; border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.note.warn { background: var(--warn-bg); border-color: var(--warn-line); }

.count { font-size: .85rem; font-weight: 600; background: #eef1f4; border-radius: 99px; padding: 2px 10px; }
.count.over { background: #fde2e1; color: #a1281f; }

.btn {
  display: inline-block; border: 0; border-radius: 9px; padding: 9px 16px; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600; text-decoration: none;
}
.btn:hover { filter: brightness(1.1); }
.btn.block { display: block; width: 100%; text-align: center; margin-top: 14px; }
.btn-soft { background: var(--note-bg); color: var(--brand); }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: .85rem; padding: 4px; }

select, input {
  font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 8px; background: #fff; max-width: 100%;
}
.field { display: grid; gap: 4px; margin-top: 10px; }
.field > span { font-size: .85rem; color: var(--muted); }
.field input, .field select, .field textarea { padding: 9px 10px; }
textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 8px; width: 100%; resize: vertical; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── Board ──────────────────────────────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 0; }
.trainee {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 7px 0; border-top: 1px solid var(--line);
}
.trainee:first-child { border-top: 0; }
.trainee .name { font-weight: 500; text-decoration: none; color: var(--ink); min-width: 0; display: flex; align-items: center; gap: 8px; }
.trainee .name > span:not(.form-due) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* "form" = medical & emergency details still to fill in */
.form-due { flex: none; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #8a5a00; background: #fff6e0; border: 1px solid #f0d9a0; border-radius: 99px; padding: 0 6px; }
a.name:hover { color: var(--accent); text-decoration: underline; }
.trainee select { flex: none; font-size: .85rem; padding: 4px 6px; }
.trainee.moved { animation: flash 0.9s ease-out; }
@keyframes flash { from { background: #fff3c4; } to { background: transparent; } }
.empty { margin: 4px 0 0; font-size: .9rem; }

.unalloc .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 24px; }
.unalloc .trainee:nth-child(-n+4) { border-top: 0; }

.teams { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px)  { .teams { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .teams { grid-template-columns: repeat(4, 1fr); } }
.teams .panel { margin: 0; border-top: 4px solid var(--team, var(--line)); }
.prog-link { display: inline-block; margin: -2px 0 8px; text-decoration: none; }

.team-a { --team: var(--team-a); }
.team-b { --team: var(--team-b); }
.team-c { --team: var(--team-c); }
.team-d { --team: var(--team-d); }
.team .panel-head h2 { color: var(--team); }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; border-radius: 99px; padding: 1px 9px; background: #eef1f4; color: var(--ink); }
.badge[class*="team-"] { background: var(--team); color: #fff; }

/* ── Profile ────────────────────────────────────────────────────────────── */
.profile-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .profile-grid { grid-template-columns: 1fr 1.3fr; align-items: start; } }
.profile-grid .panel { margin: 0; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 10px; }
.details dt { color: var(--muted); font-size: .9rem; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.day { border-top: 1px solid var(--line); padding: 8px 0; }
.day-date { font-weight: 600; margin-bottom: 2px; }
.sess { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; font-size: .9rem; padding: 2px 0; }
.sess .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.sess .i { font-weight: 600; font-size: .8rem; }
.day-note { background: #fffbe6; border-radius: 6px; padding: 3px 8px; margin-top: 4px; font-size: .85rem; }
.history { margin-top: 12px; }
.history summary { cursor: pointer; color: var(--muted); }
.history ul { padding-left: 18px; }

.profile-who { display: flex; align-items: center; gap: 14px; }

/* ── A trainee's profile (trainee.php) — the Mendip App's look ──────────── */
body.tp-page { background: var(--v2-page); }
body.tp-page main { max-width: 1180px; font-family: var(--v2-font); color: var(--v2-ink); }
.tp-back { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--brand); text-decoration: none; margin: 0 0 12px -4px; }
.tp-back:hover { text-decoration: underline; }
.tp-hero {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--v2-line); border-top: 4px solid var(--team, var(--brand)); border-radius: 16px; padding: 18px 20px;
}
.tp-ava.msg-ava { width: 72px; height: 72px; flex-basis: 72px; font-size: 1.4rem; }
.tp-hero__who { flex: 1 1 220px; min-width: 0; }
.tp-hero h1 { margin: 0; font-weight: 900; font-size: 24px; line-height: 1.15; letter-spacing: -.01em; }
.tp-hero__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; color: var(--v2-muted); font-size: 14px; }
.tp-team { font-size: 12px; font-weight: 600; color: #fff; background: var(--team, var(--brand)); border-radius: 99px; padding: 2px 10px; }
.tp-team--none { background: var(--v2-wash); color: var(--v2-muted); }
.tp-hero__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-btn {
  display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--v2-font); padding: 10px 14px; border-radius: 10px;
  background: var(--brand); color: #fff; text-decoration: none; border: 0; cursor: pointer;
}
.tp-btn--soft { background: var(--v2-wash); color: var(--brand); }
.tp-btn:hover { filter: brightness(1.05); text-decoration: none; }
@media (max-width: 600px) {
  .tp-hero { padding: 16px; gap: 12px; }
  .tp-ava.msg-ava { width: 56px; height: 56px; flex-basis: 56px; }
  .tp-hero__who { flex-basis: calc(100% - 72px); }
  .tp-hero h1 { font-size: 21px; }
  .tp-hero__acts { width: 100%; }
  .tp-hero__acts .tp-btn { flex: 1 1 auto; justify-content: center; font-size: 13.5px; padding: 10px; }
}

/* At a glance: four boxes — two a row on a phone */
.tp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.tp-fact {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; text-decoration: none; color: var(--v2-ink);
  background: #fff; border: 1px solid var(--v2-line); border-radius: 12px;
}
.tp-fact svg { flex: none; }
.tp-fact > span { display: flex; flex-direction: column; line-height: 1.3; color: var(--v2-muted); }
.tp-fact strong { color: var(--v2-ink); font-weight: 600; font-size: 13.5px; }
.tp-fact--ok svg { color: #1e7d43; }
.tp-fact--todo { background: #fff6e0; border-color: #f0d9a0; }
.tp-fact--todo svg { color: #8a5a00; }
.tp-fact--quiet svg { color: var(--v2-muted); }
a.tp-fact:hover { border-color: var(--brand); }
.tp-note { font-size: 13px; color: #6b4f00; margin: -4px 0 12px; }
.tp-alert { background: #fff6e0; border: 1px solid #f0d9a0; color: #6b4f00; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }

/* Cards */
.tp-grid { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .tp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }
.tp-col { display: grid; gap: 12px; min-width: 0; }
.tp-card { background: #fff; border: 1px solid var(--v2-line); border-radius: 16px; padding: 16px 18px; min-width: 0; scroll-margin-top: calc(var(--header-h) + 12px); }
.tp-card__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.tp-card__title { margin: 0 0 6px; font-weight: 900; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); }
.tp-card__head .tp-card__title { margin: 0; }
.tp-hint { font-size: 13px; color: var(--v2-muted); margin: 4px 0 10px; }
.tp-hint--foot { margin: 12px 0 0; font-size: 12px; }
.tp-pill { font-size: 12px; font-weight: 600; border-radius: 99px; padding: 2px 10px; }
.tp-pill--ok { background: #e3f1e6; color: #1d5b33; }
.tp-pill--todo { background: #fdeceb; color: #a1271c; }
.tp-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--v2-line); }
.tp-card__title + .tp-row { border-top: 0; }
.tp-row__ic { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--v2-wash); color: var(--brand); display: grid; place-items: center; }
.tp-row__body { min-width: 0; display: flex; flex-direction: column; padding-top: 1px; }
.tp-row__v { font-weight: 600; color: var(--v2-ink); text-decoration: none; overflow-wrap: anywhere; }
a.tp-row__v:hover { color: var(--brand); text-decoration: underline; }
.tp-row__v--addr { font-weight: 500; line-height: 1.45; }
.tp-row__sub { font-size: 12px; color: var(--v2-muted); }
/* Known as (task 1963): beside the legal name, and the admin's change form. */
.tp-aka { font-size: .55em; font-weight: 500; color: var(--v2-muted); white-space: nowrap; }
.tp-aka-edit { margin-top: 6px; }
.tp-aka-edit summary { cursor: pointer; font-size: 13px; color: var(--brand); }
.tp-aka-f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.tp-aka-f input[type=text] { flex: 1 1 140px; min-width: 0; padding: 7px 10px; border: 1px solid var(--v2-line, #dfe2ea); border-radius: 8px; font: inherit; }
.tp-teampick select {
  font: 600 13px var(--v2-font); color: var(--brand); background-color: var(--v2-wash); border: 0; border-radius: 99px;
  padding: 6px 12px; cursor: pointer;
}
.tp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp-day { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--v2-line); }
.tp-card__head + .tp-day { border-top: 0; }
.tp-day__d { flex: none; width: 44px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.tp-day__d span { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--v2-muted); }
.tp-day__d strong { font-size: 20px; font-weight: 900; color: var(--v2-ink); }
.tp-day__body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.tp-day__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-day__tags span { font-size: 11.5px; font-weight: 600; color: var(--brand-dark); background: var(--brand-light); border-radius: 6px; padding: 1px 8px; }
.tp-day .tp-hint { margin: 0; }
.tp-sess { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.tp-sess__t { color: var(--v2-muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 1px; }
.tp-sess__b strong { font-weight: 600; }
.tp-sess__b small { display: block; font-size: 12.5px; color: var(--v2-muted); }
/* Meet times (task 1751): programme.php, and the team card on a trainee's page. */
.pg-sess--meet .tp-sess__t { color: var(--brand); font-weight: 600; }
.pg-meet { display: block; font-size: 13px; font-weight: 600; color: var(--brand); }
.pg-nudge { display: block; margin-top: 4px; font-size: 12.5px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 4px 8px; }
.pg-today { background: var(--note-bg); border-radius: 10px; }
.pg-edit { margin-top: 6px; }
.pg-edit summary { cursor: pointer; font-size: 13px; color: var(--brand); }
.pg-f { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin-top: 8px; }
.pg-f label { display: grid; gap: 3px; font-size: 12.5px; font-weight: 600; }
.pg-f label small { font-weight: 400; color: var(--v2-muted); }
.pg-f input { padding: 7px 9px; border: 1px solid var(--v2-line); border-radius: 8px; font: inherit; font-weight: 400; }
.pg-f__where { flex: 1 1 160px; min-width: 0; }
.pg-f__acts { display: flex; gap: 6px; }
.pg-f .tp-hint { flex-basis: 100%; margin: 0; }
.tp-more { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 13px; color: var(--brand); text-decoration: none; }
.tp-more:hover { text-decoration: underline; }
.tp-log { display: flex; gap: 12px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--v2-line); }
.tp-card__title + .tp-log { border-top: 0; }
.tp-log__when { flex: 0 0 92px; color: var(--v2-muted); font-variant-numeric: tabular-nums; }
.tp-log__what { min-width: 0; overflow-wrap: anywhere; }
.tp-log__what em { font-style: normal; color: var(--v2-muted); }
.tp-card--health .hc-line, .tp-card--health .hc-none { border-color: var(--v2-line); }
.tp-card--health > .tp-btn { margin-top: 2px; }
body.embedded.tp-page main { padding-top: 12px; }
.tp-pill--wait { background: #fff6e0; color: #8a5a00; }

/* ── The register (register.php, registers.php, the board) ──────────────── */
.team-reg { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -2px 0 10px; }
.team-reg__btn { padding: 7px 12px; font-size: 13px; }
.team-reg__last { font-size: 12.5px; color: var(--muted); }
.team-reg__last.is-warn { color: #a1271c; font-weight: 600; }
body.reg-page main { max-width: 760px; padding-bottom: 120px; }
.reg-hero { padding: 16px 18px; }
.reg-now { font-size: 13px; font-weight: 600; color: var(--brand-dark); background: var(--brand-light); border-radius: 8px; padding: 2px 8px; }
.reg-now[hidden] { display: none; }
.reg-offline { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px;
  background: #fff6e0; border: 1px solid #f0d9a0; color: #6b4f00; font-size: 13.5px; }
.reg-offline[hidden] { display: none; }
.reg-form .tp-card { margin-bottom: 12px; }
.reg-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.reg-chip { position: relative; cursor: pointer; }
.reg-chip input { position: absolute; opacity: 0; pointer-events: none; }
.reg-chip span { display: inline-block; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--v2-line); background: #fff;
  font: 600 13.5px/1.2 var(--v2-font); color: var(--v2-ink); }
.reg-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.reg-chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.reg-chip--sm span { padding: 6px 10px; font-size: 12.5px; }
.reg-chip--alert input:checked + span { background: #a1271c; border-color: #a1271c; }
.reg-other { display: block; width: 100%; box-sizing: border-box; margin-top: 10px; font: inherit; font-size: 16px;
  padding: 10px 12px; border: 1px solid var(--v2-line); border-radius: 10px; }
.reg-other[hidden] { display: none; }
.reg-row { border-top: 1px solid var(--v2-line); padding: 10px 0; }
.tp-card__head + .reg-row { border-top: 0; }
.reg-row__top { display: flex; align-items: center; gap: 10px; }
.reg-row__name { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.reg-yn { display: flex; gap: 6px; flex: none; }
.reg-yn__b { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  font: 600 13.5px var(--v2-font); border: 1px solid var(--v2-line); background: #fff; color: var(--v2-muted); -webkit-tap-highlight-color: transparent; }
.reg-yn__b svg { display: none; }
.reg-row.is-in .reg-yn__b--in { background: #1e7d43; border-color: #1e7d43; color: #fff; }
.reg-row.is-in .reg-yn__b--in svg { display: inline; }
.reg-row.is-out .reg-yn__b--out { background: #a1271c; border-color: #a1271c; color: #fff; }
.reg-row.is-in { background: linear-gradient(90deg, #e3f1e6 0 4px, transparent 4px); }
.reg-row.is-out { background: linear-gradient(90deg, #fdeceb 0 4px, transparent 4px); }
.reg-row.is-in .reg-row__top, .reg-row.is-out .reg-row__top, .reg-row.is-out .reg-why { padding-left: 10px; }
.reg-why { margin-top: 8px; display: grid; gap: 8px; }
.reg-why[hidden] { display: none; }
.reg-why__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.reg-note { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--v2-line); border-radius: 10px; width: 100%; box-sizing: border-box; }
@media (max-width: 460px) {
  .reg-row__top { flex-wrap: wrap; }
  .reg-yn { width: 100%; }
  .reg-yn__b { flex: 1; justify-content: center; }
}
.reg-bar {
  position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; margin: 0 -4px 16px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border: 1px solid var(--v2-line);
  border-radius: 14px; box-shadow: 0 -4px 16px rgba(0, 54, 76, .08);
}
.reg-bar__msg { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--v2-muted); }
.reg-bar .tp-btn[disabled] { opacity: .45; cursor: not-allowed; }
.reg-today .reg-taken { border-top: 1px solid var(--v2-line); padding: 10px 0; }
.reg-today .tp-card__title + div:empty + .reg-taken, .reg-today .tp-card__title + .reg-taken { border-top: 0; }
.reg-taken__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reg-taken .tp-hint { margin: 2px 0 4px; }
.reg-taken--waiting { background: #fffbf0; border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.reg-out { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0 6px 10px;
  border-left: 3px solid #a1271c; margin: 6px 0; font-size: 14px; }
.reg-out small { display: block; color: var(--v2-muted); font-size: 12px; }
.reg-out--late { border-left-color: #8a5a00; }
.reg-arrive { padding: 7px 12px; font-size: 13px; }
.reg-arrive__body { display: grid; gap: 12px; padding: 4px 16px 14px; }
.reg-arrive__t { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }
.reg-arrive__t input { font: inherit; font-size: 18px; padding: 6px 10px; border: 1px solid var(--v2-line); border-radius: 10px; }
.reg-days { display: grid; gap: 12px; }
.reg-line { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-top: 1px solid var(--v2-line); }
.tp-card__head + .reg-line { border-top: 0; }
.reg-line__t { flex: 0 0 46px; font-weight: 700; font-variant-numeric: tabular-nums; }
.reg-line__b { flex: 1; min-width: 0; }
.reg-line__b small { display: block; color: var(--v2-muted); font-size: 12.5px; }
.reg-sub { margin: 14px 0 6px; font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #a1271c; }
.reg-person { padding: 6px 0; border-top: 1px solid var(--v2-line); display: grid; gap: 2px; }
.reg-person a { color: var(--v2-ink); text-decoration: none; }
.reg-period { display: block; font-size: 13px; color: #6b4f00; }
.reg-period.is-open { color: #a1271c; font-weight: 600; }
.reg-allhere { color: #1d5b33; }
/* Waiting registers on this phone — every staff page (assets/js/outbox.js) */
.ob-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 250;
  background: var(--brand); color: #fff; font: 600 13px var(--v2-font); padding: 9px 16px; border-radius: 99px; box-shadow: 0 6px 18px rgba(0, 54, 76, .25);
  max-width: calc(100% - 32px); text-align: center; }
.ob-pill--warn { background: #a1271c; }
.ob-pill[hidden] { display: none; }
body.reg-page .ob-pill { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
body.reg-page .beta-pill { display: none; }   /* it would sit on Save */

/* ── Medical & emergency (trainee.php panel, health.php) ────────────────── */
.hc { display: grid; gap: 0; }
.hc-k { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hc-ec { padding: 0 0 8px; }
.hc-ec__p { margin-top: 2px; overflow-wrap: anywhere; }
.hc-line { display: grid; gap: 1px; padding: 7px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.hc-line--alert .hc-k { color: #a1271c; }
.hc-line--alert { background: linear-gradient(90deg, #fdeceb 0 4px, transparent 4px); padding-left: 10px; }
.hc-none { margin: 4px 0 0; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); padding-top: 7px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; }
.seg a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; padding: 6px 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.seg a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.hc-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .hc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .hc-grid { grid-template-columns: repeat(3, 1fr); } }
.hc-card { margin: 0; border-top: 4px solid var(--team, var(--line)); }
.hc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hc-head__t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hc-head__t a { text-decoration: none; color: var(--ink); }
.print-only { display: none; }
@media print {
  .app-header, .beta-pill, .no-print, .crumb { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  main { padding: 0; max-width: none; }
  .print-only { display: block; }
  .hc-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hc-card { break-inside: avoid; border: 1px solid #999; border-top-width: 4px; }
  .hc-line--alert { background: none; padding-left: 0; }
  a { color: inherit; text-decoration: none; }
}

/* ── Login ──────────────────────────────────────────────────────────────── */
.login-box { max-width: 380px; margin: 40px auto; }
.login-box h2 { font-size: 1.2rem; margin-bottom: 4px; }

/* ── Beta pill ──────────────────────────────────────────────────────────── */
.beta-pill {
  position: fixed; right: 12px; bottom: 12px; z-index: 20;
  background: var(--panel); border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 12px; font-size: .8rem; box-shadow: 0 4px 14px rgba(20,30,40,.1);
}
.beta-pill span:first-child { font-weight: 700; color: var(--team-c); text-transform: uppercase; letter-spacing: .04em; }
.beta-pill .sep { margin: 0 6px; color: var(--muted); }
.beta-pill a { text-decoration: none; }

/* Messages admin + checkbox rows */
.check { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.report { border-top: 1px solid var(--line); padding: 10px 0; }
.report:first-of-type { border-top: 0; }
.report blockquote { margin: 6px 0; padding: 8px 12px; background: var(--note-bg); border-radius: 8px; }
.report-handle { display: flex; gap: 8px; flex-wrap: wrap; }
.report-handle input { flex: 1; min-width: 180px; }
.reg-out--failed { border-left-color: var(--v2-muted); color: var(--v2-muted); }

/* ── Sign-ups (invites.php, 2026-11-02) ─────────────────────────────────── */
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-ghost { background: var(--note-bg); color: var(--brand); }
.btn[disabled] { opacity: .5; cursor: default; filter: none; }
.su-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 0 0 14px; }
.su-stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; }
.su-stats strong { font-size: 1.8rem; line-height: 1; color: var(--brand); }
.su-stats strong small { font-size: 1rem; color: var(--muted); }
.su-stats span { font-size: .8rem; color: var(--muted); }
.su-go { display: grid; gap: 8px; }
.su-all { font-size: 1.05rem; padding: 14px 20px; justify-self: start; }
.su-progress { margin: 0; font-weight: 600; color: var(--brand); }
.su-test summary { cursor: pointer; color: var(--brand); font-size: .9rem; }
.su-test p { margin: 6px 0; }
.table-wrap { overflow-x: auto; }
.su-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.su-table th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.su-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.su-table tr:last-child td { border-bottom: 0; }
.su-table a { color: inherit; font-weight: 600; text-decoration: none; }
.su-c { text-align: center; }
.su-act { text-align: right; white-space: nowrap; }
.su-yes { color: #1d7a3e; font-weight: 700; }
.su-no { color: #c3cad3; }
.su-warn { color: #a1281f; font-weight: 600; }
.su-pill { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--note-bg); color: var(--brand); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.su-pill--ok { background: #e3f1e6; color: #1d5b33; }
.su-pill--go { background: #fff4dd; color: #6b4e00; }
.su-pill--warn { background: #fde2e1; color: #a1281f; }
.su-pill--none { background: #f0f2f5; color: var(--muted); }
@media (max-width: 640px) { .su-stats { grid-template-columns: repeat(2, 1fr); } }

/* The "send a link" sheet (views/send_link.php, js/send-link.js, 2026-11-11) —
   on the messenger's .msg-sheet, like the register's Arrived sheet. */
.sl-body { display: grid; gap: 12px; padding: 4px 16px 14px; font-size: 14.5px; color: var(--v2-ink); }
.sl-what { margin: 0; color: var(--v2-muted); font-size: 13.5px; line-height: 1.45; }
.sl-fs { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
.sl-fs legend { font-size: 13px; font-weight: 600; color: var(--v2-muted); padding: 0; margin-bottom: 4px; }
.sl-opt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border: 1px solid var(--v2-line); border-radius: 10px; cursor: pointer; }
.sl-opt input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.sl-opt span { display: grid; gap: 2px; min-width: 0; }
.sl-opt b { font-weight: 600; overflow-wrap: anywhere; }
.sl-opt small { font-size: 12px; color: var(--v2-muted); }
.sl-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }
.sl-opt--none { color: var(--v2-muted); }
.sl-none { margin: 0; font-size: 13.5px; color: var(--v2-muted); }
.sl-err { margin: 0; color: #a1281f; font-weight: 600; font-size: 13.5px; }
.sl-err[hidden] { display: none; }
.sl-done { margin: 0; line-height: 1.45; }
.sl-done b { color: #1f7a4d; }
.sl-send, .sl-body [data-sl-done] { justify-content: center; }
.sl-foot { margin: 0; font-size: 12.5px; color: var(--v2-muted); }

/* Course feedback (course-feedback.php) */
.cfb-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cfb-acts form { margin: 0; }

/* ── Session write-ups (log.php, logs.php, 2026-11-02) ────────────────────── */
.hdr-todo { margin-right: 4px; }
.lg-head { align-items: center; }
.lg-head h1 .tp-team { font-size: 13px; vertical-align: middle; margin-left: 6px; }
.lg-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-slot.is-flagged { border-color: #e2b4af; }
.lg-slot__title { font-size: 1.05rem; }
.lg-form { display: grid; gap: 12px; margin-top: 8px; }
.lg-field { display: grid; gap: 4px; }
.lg-field > span { font-size: 13px; font-weight: 600; color: var(--v2-muted); }
.lg-field textarea { font-size: 16px; padding: 9px 10px; border-radius: 10px; }
.lg-sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: -4px; }
.lg-chip { font: inherit; font-size: 13px; padding: 6px 11px; border-radius: 99px; border: 1px dashed var(--brand); background: #fff; color: var(--brand); cursor: pointer; }
.lg-chip:hover { background: var(--brand-light); }
.lg-fs { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.lg-fs legend { font-size: 13px; font-weight: 600; color: var(--v2-muted); padding: 0; margin-bottom: 2px; }
.lg-flag { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.lg-flag input { width: 18px; height: 18px; margin-top: 2px; }
.lg-flag small { color: var(--v2-muted); }
.lg-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lg-list { margin: 6px 0; padding-left: 22px; display: grid; gap: 4px; }
.lg-list--sm { font-size: 13px; }
.lg-wx { margin: 6px 0; font-size: 13.5px; color: var(--brand); font-weight: 600; }
.lg-notes { margin: 6px 0; padding: 8px 12px; background: var(--note-bg); border-radius: 8px; font-size: 14.5px; }
.lg-notes--sm { font-size: 13px; }
.lg-take { margin-top: 8px; }
.lg-take > summary { list-style: none; display: inline-flex; cursor: pointer; }
.lg-take > summary::-webkit-details-marker { display: none; }
.lg-take[open] > summary { display: none; }
.lg-hist { margin-top: 10px; font-size: 13px; }
.lg-hist summary { cursor: pointer; color: var(--v2-muted); }
.lg-hist__v { margin: 8px 0 0; padding-left: 10px; border-left: 3px solid var(--v2-line); }
.lg-todo { border-color: #f0d9a0; }
.lg-flagged { border-color: #e2b4af; }
.lg-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--v2-line); color: inherit; text-decoration: none; }
.tp-card__title + .lg-row, .tp-hint + .lg-row, .tp-card__head + .lg-row { border-top: 0; }
.lg-row:hover { text-decoration: none; }
.lg-row__t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lg-row__t strong { font-weight: 600; font-size: 14.5px; }
.lg-row__t strong i { font-style: normal; color: #a1271c; font-weight: 500; }
.lg-row__t small { font-size: 12.5px; color: var(--v2-muted); }
.lg-row__d { flex: none; width: 44px; display: grid; text-align: center; line-height: 1.1; }
.lg-row__d span { font-size: 11px; color: var(--v2-muted); text-transform: uppercase; }
.lg-row__d strong { font-size: 14px; }
.lg-row > .ic:last-child { color: var(--v2-muted); flex: none; }
