/* admin-room.css -- THE ADMIN CONSOLE IN THE ROOMS LANGUAGE (CPA audit R10, ruled by Tory 2026-10-27: "rooms design language, distinct
   admin accent, 'Admin' mark in the top bar so it's never mistaken for the tenant app"). LAYOUT AND LOOK ONLY, linked last in <head> by
   admin/app.js sendAdminPage on every console page (never the 404). Every colour and font is a var(--sp-*) from spach-theme.css
   (test-admin-room.js runs the two-rooms checker on this file); nothing a script reads moves.
   TWO PARTS:
   - THE BAR, on every page the console serves (body[data-admin-host]), the two tenant-app pages too: the deep teal of --sp-admin-bar,
     "Spach" and the "Admin" mark (admin-shell.js puts it there), and Sign out. The office's own bar is white; this one never is.
   - THE ROOM, on the console's own pages (body[data-admin-room], admin/public): the office -- its page grey, white cards under the office
     edge, Geist, fields and buttons 44 px, the main action black and every other button white with an edge. Colour means attention
     only: a refusal or a failure in the problem colour, a done or saved word in the ink (no green).
   ONE LOOK: no dark version, like the office. */

/* ---- the bar ---- */
body[data-admin-host] .ad-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 8px 16px;
  background: var(--sp-admin-bar); color: var(--sp-admin-bar-ink); font-family: var(--sp-font-ui); }
body[data-admin-host] .ad-brand { display: flex; align-items: center; gap: 8px; font-family: var(--sp-font-ui); font-size: 17px; font-weight: 600; color: var(--sp-admin-bar-ink); }
body[data-admin-host] .ad-dot { background: var(--sp-admin-mark); }
body[data-admin-host] .ad-mark { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--sp-radius-item);
  background: var(--sp-admin-mark); color: var(--sp-admin-mark-ink); font-family: var(--sp-font-ui); font-size: 13px; font-weight: 600; }
body[data-admin-host] .ad-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body[data-admin-host] .ad-nav[hidden] { display: none; }
body[data-admin-host] .ad-who { color: var(--sp-admin-bar-ink); font-size: 13px; }
body[data-admin-host] .ad-top .ad-btn { display: inline-flex; align-items: center; min-height: var(--sp-target); margin: 0; padding: 0 14px;
  background: transparent; color: var(--sp-admin-bar-ink); border: 1px solid var(--sp-admin-bar-edge); border-radius: var(--sp-radius);
  font-family: var(--sp-font-ui); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
body[data-admin-host] .ad-top .ad-btn:hover:not(:disabled) { border-color: var(--sp-admin-bar-ink); }
body[data-admin-host] .ad-top .ad-btn[hidden] { display: none; }
/* a bar admin-shell.js added to a page with none of its own (console.html, onboarding-admin, review-comments): their <body> is the
   tenant app's centred flex row, so the bar is fixed across the top (under the tenant drawer, z-index 60) and the page starts
   below it; it holds only the brand and Sign out, so it never wraps */
body[data-admin-host].ad-bar-added > .ad-top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 60px; flex-wrap: nowrap; }
body[data-admin-host].ad-bar-added { padding-top: 92px; }

/* ---- the room: the page, the type ---- */
body[data-admin-room] { color-scheme: light; background: var(--sp-o-page); color: var(--sp-o-ink); font-family: var(--sp-font-ui); font-size: 15px; }
body[data-admin-room] h1 { font-family: var(--sp-font-ui); font-size: 28px; font-weight: 600; letter-spacing: -0.6px; color: var(--sp-o-ink); }
body[data-admin-room] h2 { font-family: var(--sp-font-ui); font-size: 18px; font-weight: 600; color: var(--sp-o-ink); }
body[data-admin-room] :is(.ad-muted, .ad-label) { color: var(--sp-o-muted); }
body[data-admin-room] :is(.ad-mono, .ad-secret, .ad-code) { font-family: var(--sp-font-num); }
body[data-admin-room] .ad-link { color: var(--sp-o-ink); }

/* the cards, the tables, the dialog: white under the office edge */
body[data-admin-room] :is(.ad-card, .ad-dialog) { background: var(--sp-o-card); color: var(--sp-o-ink); border: 1px solid var(--sp-o-card-edge); border-radius: var(--sp-radius-card); }
body[data-admin-room] .ad-table { background: var(--sp-o-card); border: 1px solid var(--sp-o-card-edge); border-radius: var(--sp-radius-card); }
body[data-admin-room] :is(.ad-table th, .ad-table td) { border-bottom-color: var(--sp-o-row-rule); }
body[data-admin-room] .ad-table th { color: var(--sp-o-muted); }
body[data-admin-room] :is(.ad-secret, .ad-qr) { background: var(--sp-o-band); border-color: var(--sp-o-card-edge); }

/* the fields: 44 px in the office's edge */
body[data-admin-room] .ad-input { min-height: var(--sp-target); background: var(--sp-o-card); color: var(--sp-o-ink); border: 1px solid var(--sp-o-input-edge); border-radius: var(--sp-radius); font-family: var(--sp-font-ui); }
body[data-admin-room] .ad-input:focus { outline: 2px solid var(--sp-o-ink); outline-offset: 1px; }

/* the buttons: the main action black; every other white with an edge; 44 px */
body[data-admin-room] main .ad-btn { min-height: var(--sp-target); background: var(--sp-o-primary); color: var(--sp-o-primary-ink); border: 1px solid var(--sp-o-primary);
  border-radius: var(--sp-radius-seg); font-family: var(--sp-font-ui); font-weight: 500; }
body[data-admin-room] main :is(.ad-btn-small, .ad-btn-quiet, .ad-btn-dark, .nb-btn-plain, .nb-choice) { min-height: var(--sp-target); background: var(--sp-o-card);
  color: var(--sp-o-ink); border: 1px solid var(--sp-o-button-edge); border-radius: var(--sp-radius); font-family: var(--sp-font-ui); }
body[data-admin-room] main :is(.ad-btn-small, .ad-btn-quiet, .ad-btn-dark, .nb-btn-plain, .nb-choice):hover:not(:disabled) { background: var(--sp-o-page); }
body[data-admin-room] main .ad-btn-good { background: var(--sp-o-primary); color: var(--sp-o-primary-ink); border-color: var(--sp-o-primary); }
body[data-admin-room] main .ad-btn-danger { background: var(--sp-o-card); color: var(--sp-problem); border-color: var(--sp-problem); }
body[data-admin-room] main .nb-choice[aria-pressed="true"] { background: var(--sp-o-primary); color: var(--sp-o-primary-ink); border-color: var(--sp-o-primary); }

/* the words: a refusal or a failure in the problem colour; a saved or done word in the ink */
body[data-admin-room] :is(.ad-bad, .ad-msg.bad, .nb-refusals li) { color: var(--sp-problem); }
body[data-admin-room] :is(.ad-msg, .ad-msg.ok, .nb-done) { color: var(--sp-o-ink); }

/* PEOPLE'S ACTIONS STAY ON SCREEN (2026-10-27, the regression Tory found: Disable / Re-enable in the page text, nothing to click). The
   table scrolls sideways inside .ad-scroll (as wide as the page's max-width, whatever the window) and Actions is its LAST column; the
   office's Geist and 44 px buttons widened the table past that box, so the column sat beyond its right edge, reachable only by a
   sideways scrollbar at the bottom of a long table. Now the column is pinned to the box's right edge (sticky, on the card, the other
   columns slide under it) and wraps, so it is as narrow as its widest control and every control stays whole and on screen.
   test-admin-actions-browser.js. */
/* admin.css gives .ad-table overflow: hidden (its rounded corners), which makes the TABLE the scroll container a sticky cell pins to,
   and the table is as wide as its contents: nothing would pin. clip keeps the corners and makes no scroll container. */
body[data-admin-room] .ad-scroll .ad-table { overflow: clip; }
body[data-admin-room] .ad-scroll :is(td.pp-actions, #pp-table thead th:last-child) { position: sticky; right: 0; z-index: 1;
  background: var(--sp-o-card); border-left: 1px solid var(--sp-o-card-edge); }
body[data-admin-room] td.pp-actions { white-space: normal; width: 1%; }
body[data-admin-room] td.pp-actions :is(.ad-btn, .ad-link) { white-space: nowrap; display: inline-flex; align-items: center; margin: 2px 4px 2px 0; }

/* a switch pill: a quiet grey pill; on, under the ink */
body[data-admin-room] .tn-sw { background: var(--sp-o-seg); color: var(--sp-o-ink); border-color: var(--sp-o-seg); }
body[data-admin-room] .tn-sw-on { border-color: var(--sp-o-ink); }

@media (max-width: 767px) {
  body[data-admin-room] h1 { font-size: 24px; }
  body[data-admin-room] :is(.ad-card, .ad-dialog) { padding: 16px; }
}
