/* admin.css: the administration's own pages (task PS-04): the frame's tab row, the list of cohorts, a cohort's
   overview, people and codes, and the staff accounts. It starts from PL-08's cut-down admin-overview.css (the
   overview's cards); the rest is what only these pages draw. The staff's states (.house-state), the labelled rows
   (.house-labelled.is-compact), a region drawn as a card (.house-region), the card grid (.house-cards), the quiet
   action (.link-btn.house-quiet), the tab row (.house-tabs) and the band are in house.css; the tables (.admin-table)
   and the fields (.input, .select) are styles.css's. Every colour, type family, radius and shadow is a custom property
   of styles.css or house.css, except the printed slips' three colours, which are this file's own (S4).

   For PL-07, what is here and not in house.css: the two cards side by side (.adm-split), a card's head, meta and foot
   (.adm-card-*), the ruled list of sentences (.adm-list), the log's lines (.adm-log), "How the list is made"
   (.adm-how), the notices above the cohorts (.adm-notices), a form of labelled fields (.adm-form, .adm-field,
   .adm-check), the codes shown once (.adm-codes) and the printed code slips (.adm-slips), the people table's cells
   (.ppl-*), and the panel for one learner's change (.ppl-panel). */

/* ---- the overview's cards (PL-08's admin-overview.css) ---- */

/* Two cards side by side under the band. */
.adm-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); gap: 16px; align-items: stretch;
  margin: 22px 0 0; }
.adm-split.is-even { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
@media (max-width: 900px) {
  .adm-split, .adm-split.is-even { grid-template-columns: minmax(0, 1fr); }
}
/* A card's own heading row, with a state or a quiet action at its right. */
.adm-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px;
  margin: 0 0 6px; }
.adm-card-title { margin: 6px 0 0; }
.adm-card-meta { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-3); }
.adm-card .house-strip { margin: 20px 0 4px; }
/* A card's foot follows its content, so that a short list leaves no gap above it (the look check's small finding 3). */
.adm-card-foot { margin: 0; padding-top: 18px; font-size: 14.5px; }
/* "At a glance" alone (a trainer and a coordinator have no log) takes the row. */
.adm-split.is-even:has(> [hidden]) { grid-template-columns: minmax(0, 1fr); }
.adm-list { margin: 8px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.5; }
.adm-list > li { margin: 0; padding: 13px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.adm-list strong { color: var(--ink); font-weight: 650; }
.adm-list a { white-space: nowrap; }
.adm-log time { display: block; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.adm-log-what { display: block; font-size: 13.5px; color: var(--ink-3); }

/* "How the list is made": a quiet fold at the foot of Needs attention. */
.adm-how { margin: 18px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.adm-how summary { cursor: pointer; color: var(--ink-3); font-weight: 600; }
.adm-how summary:hover { color: var(--ink); }
.adm-how summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.adm-how p { margin: 10px 0 0; }
.adm-how ul { margin: 8px 0 0; padding-left: 1.2em; }
.adm-how li { margin: 4px 0 0; }
/* When Needs attention says nothing, its foot stands under the heading rather than at the card's foot. */
.adm-card .adm-list:empty { display: none; }
.adm-card .adm-list:empty + .adm-card-foot { margin-top: 8px; padding-top: 0; }

/* ---- the list of cohorts ---- */

.adm-notices { margin: 22px 0 0; padding: 14px 18px; list-style: none; border-radius: var(--radius-sm);
  background: var(--warn-soft); color: var(--ink); font-size: 15px; line-height: 1.5; }
.adm-notices > li + li { margin-top: 6px; }
.adm-cohorts { margin-top: 28px; }
.adm-cohort .house-card-kicker:empty { display: none; }
.adm-cohort .house-card-text + .house-card-text { margin-top: 4px; color: var(--ink-3); }

/* ---- forms: creating a cohort, a cohort's details, a staff account, learners ---- */

.adm-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; max-width: 46rem;
  margin: 18px 0 0; }
.adm-field { display: grid; align-content: start; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0;
  font-size: 14px; }
.adm-field > span, .adm-field > legend { font-weight: 650; color: var(--ink); }
.adm-field > legend { margin-bottom: 4px; padding: 0; }
.adm-field .input, .adm-field .select { width: 100%; }
.adm-field small { color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.adm-field.is-wide, .adm-choices, .adm-form > .adm-check, .adm-check-note, .adm-form > .form-error,
.adm-form-actions, .adm-form > p { grid-column: 1 / -1; }
.adm-choices > div { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.adm-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14.5px; font-weight: 500;
  color: var(--ink); cursor: pointer; }
.adm-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.adm-check-note { margin: -10px 0 0; }
.adm-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.adm-form .form-error[hidden] { display: none; }
.adm-details { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
.adm-close { margin-left: auto; }
@container house (max-width: 640px) {
  .adm-form { grid-template-columns: minmax(0, 1fr); }
  .adm-close { margin-left: 0; }
}

/* ---- the codes shown once, and the printed slips ---- */

.adm-codes { margin: 28px 0 0; padding: 22px 24px 16px; border-radius: var(--radius-sm); background: var(--warn-soft); }
.adm-codes:focus { outline: none; }
.adm-codes:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.adm-codes h2 { margin: 0; font-size: 18px; }
.adm-codes > p { margin: 8px 0 0; max-width: 44rem; font-size: 15px; line-height: 1.5; }
.adm-code-list { display: grid; gap: 6px; margin: 14px 0; padding: 0; list-style: none; }
.adm-code-list li { font-family: var(--mono); font-size: 14.5px; overflow-wrap: anywhere; user-select: all; }
.adm-slips { display: none; }
/* A slip is printed black on white whatever the screen's theme: its three colours are named here (S4). */
body.adm-printing { --adm-slip-paper: #fff; --adm-slip-ink: #000; --adm-slip-rule: #777; }
@media print {
  body.adm-printing > :not(.adm-slips) { display: none !important; }
  body.adm-printing { background: var(--adm-slip-paper); }
  body.adm-printing .adm-slips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
    background: var(--adm-slip-paper); color: var(--adm-slip-ink); }
  .adm-slip { break-inside: avoid; margin: 0; padding: 18px 20px; border: 1px dashed var(--adm-slip-rule); font: 13px/1.45 var(--sans); }
  .adm-slip-programme { margin: 0; font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
  .adm-slip-name { margin: 6px 0 10px; font-size: 17px; font-weight: 650; }
  .adm-slip dl { margin: 0; }
  .adm-slip dl > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 8px; padding: 3px 0; }
  .adm-slip dt { font-weight: 650; }
  .adm-slip dd { margin: 0; overflow-wrap: anywhere; }
  .adm-slip-code { font-family: var(--mono); font-size: 16px; font-weight: 700; letter-spacing: .06em; }
  .adm-slip-note { margin: 10px 0 0; font-size: 11.5px; }
}

/* ---- tables: the staff accounts and the people ---- */

.adm-table td { vertical-align: top; }
.adm-table .row-actions { white-space: nowrap; }
.adm-table .row-actions .link-btn { font-size: 13.5px; }
/* The status and code cells keep to one line only where the table has room for every column, its "Change" menu
   included: on a 1,024 px window they wrap (K1). */
@media (min-width: 1200px) {
  .ppl-status, .ppl-code { white-space: nowrap; }
}
@media (max-width: 860px) {
  .adm-table .row-actions { display: block; }
}
.ppl-note { display: block; max-width: 18rem; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; white-space: normal; }
.ppl-withdrawn td { color: var(--ink-3); }
.ppl-withdrawn .cell-name strong { color: var(--ink-2); }
.ppl-now { color: var(--ok); font-weight: 600; }
.ppl-staff { margin: 0; padding: 0; list-style: none; font-size: 15.5px; line-height: 1.6; }
.ppl-staff > li + li { margin-top: 6px; }

/* The menu of changes on a learner's row: "Change", a small outlined button as on every row of the administration
   (K8), that opens the row's actions, the same buttons, under it. Sized as the house's controls (30 px, 13 px). */
.ppl-menu summary { list-style: none; cursor: pointer; white-space: nowrap; height: 30px; padding: 0 12px;
  font-size: 13px; }
.ppl-menu summary::-webkit-details-marker { display: none; }
.ppl-menu summary::after { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 1px 3px 2px;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.ppl-menu[open] summary::after { margin-bottom: -2px; transform: rotate(225deg); }
.ppl-menu summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ppl-menu-list.house-controls { flex-direction: column; align-items: flex-end; gap: 6px; margin-top: 8px; }
.adm-table .row-actions .house-controls { flex-wrap: nowrap; }
@media (max-width: 860px) {
  .ppl-menu-list.house-controls { align-items: flex-start; }
  .adm-table .row-actions .house-controls { justify-content: flex-start; flex-wrap: wrap; }
}

/* The panel for one learner's change (rename, withdraw, move), above the table. */
.ppl-panel { margin: 18px 0 0; padding: 18px 22px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); }
.ppl-panel:focus { outline: none; }
.ppl-panel h3 { margin: 0; font-size: 17px; }
.ppl-panel > p { margin: 6px 0 0; max-width: 44rem; font-size: 14.5px; color: var(--ink-2); }
.ppl-panel .adm-form { margin-top: 12px; }

/* An empty box under a page's foot note stands clear of it (Messages; the look check's small finding 6). */
.house-main > .house-foot-note ~ .empty-box { margin-top: 22px; }
