/* TUMT's own additions to the hand-back's stylesheet, which stays as handed
   back (PROVENANCE.md). Each rule says what needs it. */

/* The hidden attribute always hides: several components set display
   (.t-msg, .t-list), which would otherwise override it, and the pages show
   and hide errors, waiting lines and panels with it. */
[hidden] { display: none !important; }

/* The authenticator QR code the server renders as SVG (enroll.html,
   account security). The hand-back's .t-qr is a drawn placeholder. */
.t-qr-svg { width: 168px; height: 168px; padding: 8px; background: #fff; border-radius: 2px; }
.t-qr-svg svg { display: block; width: 100%; height: 100%; }

/* Numbered instructions inside a sign-in panel (the certificate port). */
.t-steps-list { margin: 0 0 var(--sp-4); padding-left: 1.3em; list-style: decimal; display: grid; gap: 6px; }

/* A link styled as a button that is not usable yet (the recovery codes'
   Continue until they are saved; the hand-back's pager uses the same). */
.f-btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* The bulk grids (users/_bulk_grid.html, static/js/bulk-grid.js) draw only
   the rows in view, which needs a scroll box of limited height and rows of
   one height. */
.t-main > .t-gridwrap { flex: 1 1 0; min-height: 220px; }
.t-grid .t-cell-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* A traceback or log excerpt (errors/backend_error.html, debug mode). */
.t-pre { margin: 10px 0 0; max-height: 16rem; overflow: auto; padding: 12px 14px; background: var(--surface-input); border: 1px solid var(--line-strong); border-radius: var(--radius); font: var(--w-regular) 12px/1.5 var(--font-mono); color: var(--text-muted); white-space: pre; }

/* ==== Parity with 2026-1.1.0-beta (parity14) ==============================
   What the old console did that the redesign's pages lost, put back in the
   hand-back's components. Overview, users, groups and the shared pager
   first; packages, sign-in and setup after them. */

/* -- overview, users, groups, pager -- */
/* Overview: each metric opens its page; the host's CPU, memory and disk as
   gauges (amber from 70%, red from 90%); an event's outcome in words. */
a.f-metric.t-metric-link { color: inherit; text-decoration: none; transition: background var(--dur); }
a.f-metric.t-metric-link:hover { background: var(--surface-hover); }
a.f-metric.t-metric-link:hover .f-metric-label { color: var(--accent-text); }
a.f-metric.t-metric-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.t-gauges { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: var(--sp-3); }
.t-gauges .f-metric { min-width: 0; padding: var(--sp-3); }
.t-gauges .f-metric-qual { white-space: normal; line-height: 1.3; }
.t-gauges .t-progress { margin: 2px 0 0; }
.t-progress--ok::-webkit-progress-value { background: var(--ok); }
.t-progress--ok::-moz-progress-bar { background: var(--ok); }
.t-progress--warn::-webkit-progress-value { background: var(--warn); }
.t-progress--warn::-moz-progress-bar { background: var(--warn); }
.t-outcome { margin-left: 6px; font: var(--w-regular) var(--t-xs)/1 var(--font-mono); color: var(--ok); }
.t-outcome--fault { color: var(--fault); }

/* The shared pager (partials/_t_pager.html): the page it is on, first,
   last and numbered pages, and a loading bar while the next one loads. */
.t-pager-nav { flex-wrap: wrap; align-items: center; }
.t-pager-page { align-self: center; margin-right: var(--sp-2); color: var(--text-muted); }
.t-pager-pages { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.t-pager-num { min-width: 30px; justify-content: center; }
.t-pager-num[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); pointer-events: none; }
.t-pager-gap { padding: 0 4px; color: var(--text-faint); }
.t-pager-busy { flex-basis: 100%; margin: 0; }
.t-pager-busy:indeterminate { background: linear-gradient(90deg, var(--line) 0%, var(--accent) 50%, var(--line) 100%); background-size: 200% 100%; animation: t-pager-busy 1.1s linear infinite; }
.t-pager-busy:indeterminate::-webkit-progress-bar { background: transparent; }
.t-pager-busy:indeterminate::-moz-progress-bar { background: transparent; }
@keyframes t-pager-busy { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .t-pager-busy:indeterminate { animation: none; background: var(--accent); } }

/* A long table keeps its header (and select-all) in view: the box scrolls
   and tumt.css already makes the header cells sticky. */
.t-tablewrap--sticky { max-height: max(360px, calc(100vh - 280px)); }

/* Groups: the add panel lists every match (it scrolls), with select-all and
   the count; the help on the list; a direction with no members. */
.t-addlist { max-height: 22rem; overflow-y: auto; }
.t-addlist li .t-groups { display: inline-flex; margin-left: var(--sp-2); }
.t-addbar { border-bottom: 1px solid var(--line-faint); }
.t-addhelp { margin-top: var(--sp-2); }
.t-dir-empty { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-top: var(--sp-2); }
.t-help .t-callout b { color: var(--text); font-weight: var(--w-medium); }

/* A user: what the status means; an empty profile. */
.t-status-help { margin-top: 6px; }
.t-status-help summary { font-size: var(--t-xs); }
.t-status-help p { margin-top: 6px; font-family: var(--font-sans); }
.t-status-help b { color: var(--text-2); font-weight: var(--w-medium); }
.t-profile-empty { margin-top: var(--sp-3); }

/* Create user: Select all and Clear on each lane; the password rules. */
.t-lane-tools { display: flex; gap: var(--sp-3); }
.t-lane-tools .t-linkbtn { font-size: var(--t-xs); }
.t-pw-rules { margin-top: 8px; }
.t-pw-rules .f-status { white-space: normal; }

/* The bulk grids: the errors panel beside the grid, the groups picker
   button and the new-group mark in a groups cell, keep and undo for an edit,
   the required mark, and the flash where a jump to an error lands. */
.t-main > .t-gridsplit { flex: 1 1 0; min-height: 220px; display: flex; gap: var(--sp-4); }
.t-gridsplit > .t-gridwrap { flex: 1 1 0; min-width: 0; }
.t-errpanel { flex: 0 0 20rem; contain: size; overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-3); padding: 12px 14px; border-left: 2px solid var(--fault); background: var(--surface-lift); }
.t-errpanel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.t-errpanel-title { font-size: var(--t-md); color: var(--text); }
.t-errpanel-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.t-errpanel-list ul { list-style: none; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.t-errpanel-row { font: var(--w-medium) var(--t-micro)/1 var(--font-mono); letter-spacing: var(--track-micro); text-transform: uppercase; color: var(--text-faint); }
.t-errpanel-item { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 6px 8px; border: 0; border-left: 2px solid transparent; background: transparent; text-align: left; font-size: var(--t-sm); color: var(--text-2); cursor: pointer; }
.t-errpanel-item:hover { background: var(--surface-hover); }
.t-errpanel-item[aria-current="true"] { border-left-color: var(--accent); background: var(--accent-marker); }
.t-errpanel-field { font: var(--w-medium) var(--t-xs)/1.2 var(--font-mono); color: var(--fault); }
.t-errpanel-foot { margin-top: auto; }
@media (max-width: 900px) { .t-errpanel { flex-basis: 14rem; } }
.t-errlink .f-status { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.t-req { margin-left: 3px; color: var(--fault); }
.t-grid td[data-col] { position: relative; }
.t-cellbtn { position: absolute; top: 50%; transform: translateY(-50%); display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.t-cellbtn:hover { border-color: var(--accent); color: var(--text); }
.t-cellbtn .f-ic { width: 12px; height: 12px; }
.t-cellpick { right: 4px; }
.t-cell-multi .t-cell { padding-right: 60px; }
.t-cellnew { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); padding: 1px 4px; border: 1px dashed var(--accent); border-radius: var(--radius); font: var(--w-medium) var(--t-micro)/1.2 var(--font-mono); color: var(--accent-text); cursor: help; }
.t-cellkeep { display: none; }
.t-grid td.f-cell-staged > .t-cellkeep { display: block; }
.t-cellkeep .t-cellbtn:first-child { right: 27px; }
.t-cellkeep .t-cellbtn:last-child { right: 4px; }
.t-grid td.f-cell-staged > .t-cellpick, .t-grid td.f-cell-staged > .t-cellnew { display: none; }
.t-grid td.f-cell-staged .t-cell { padding-right: 52px; }
.tumt-cell-flash { animation: tumt-cell-flash 1.2s ease-out; }
@keyframes tumt-cell-flash { 0%, 35% { background-image: linear-gradient(var(--accent-marker), var(--accent-marker)); box-shadow: inset 0 0 0 2px var(--accent); } 100% { box-shadow: inset 0 0 0 2px transparent; } }
@media (prefers-reduced-motion: reduce) { .tumt-cell-flash { animation: none; outline: 2px solid var(--accent); outline-offset: -2px; } }


/* -- packages, sign-in, setup -- */

/* Copy buttons say "Copied" for the two seconds tumt.js marks them with
   data-t-copied (recovery codes, the TOTP key, the setup token, a handover
   link). The button's own label sits in .t-copy-label. */
[data-t-copy][data-t-copied] { color: var(--ok); border-color: var(--ok); }
[data-t-copy][data-t-copied] .t-copy-label { display: none; }
[data-t-copy][data-t-copied]::after { content: "Copied"; }

/* The break-glass token in setup selects whole on a click, as the old
   token box did (step5_download.html adds the same for focus). */
.t-selectall { -webkit-user-select: all; user-select: all; cursor: text; }

/* The sign-in panel: the way this page signs in under its title, and the
   help line under the foot links (login, pending, disabled). */
.t-signin-method { margin-top: 4px; font-size: var(--t-sm); color: var(--text-muted); }
.t-signin-help { margin-top: var(--sp-3); }

/* Packages: "has package" beside a user on the build page, the notes under
   the kinds, and the help under the list. */
.t-haspkg { margin-left: 8px; font-size: var(--t-xs); vertical-align: middle; }
.t-pkg-notes { margin-top: var(--sp-4); }
.t-pkg-about { margin-top: var(--sp-5); }
.t-pkg-about .t-list { margin-bottom: var(--sp-2); }

/* Native controls and scrollbars follow the theme. Without a color-scheme,
   browsers drew light scrollbars (and date pickers) on the dark console. */
:root { color-scheme: dark; }
:root[data-theme="day"] { color-scheme: light; }

/* Scrollbars in the accent, vertical and horizontal, everywhere (Tony,
   2026-10-01: the bulk grid's was a white default bar). The thumb follows
   the Branding accent; the track is the page's sunken surface. Firefox and
   current Chrome read scrollbar-color; older WebKit the pseudo-elements. */
:root {
  --t-scroll-thumb: color-mix(in srgb, var(--accent) 65%, transparent);
  --t-scroll-track: var(--surface-sunk);
  scrollbar-color: var(--t-scroll-thumb) var(--t-scroll-track);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: var(--t-scroll-track); }
::-webkit-scrollbar-thumb { background: var(--t-scroll-thumb); border: 2px solid var(--t-scroll-track); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* A larger console (Tony, 2026-10-01: too small to read). One step up the
   hand-back's type scale; its density settings still apply on top
   ([data-density] is more specific than :root). */
:root {
  --t-micro: 11px;
  --t-xs:    12px;
  --t-sm:    13px;
  --t-base:  14px;
  --t-md:    15px;
  --t-lg:    16px;
  --t-xl:    22px;
}
/* The bulk grids' rows, with the larger text. */
.t-grid td { height: 38px; }

/* The setup wizard, centered (Tony, 2026-10-01: the forms and the flow read
   better in the middle). One column in the middle of the page: the steps and
   each page's heading centered over it, the form on a panel below. Labels
   and fields stay left-aligned inside the panel, where the eye reads them. */
.t-setup { max-width: 820px; width: 100%; margin-inline: auto; }
.t-setup > .t-steps { justify-content: center; }
.t-setup .t-pagehead { justify-content: center; text-align: center; }
.t-setup .t-pagehead-text { align-items: center; }
.t-setup .t-pagehead-text .f-prose { max-width: 62ch; }
.t-setup .t-formpage,
.t-setup > .t-section { max-width: none; padding: var(--sp-5) var(--sp-6); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.t-setup > .t-section + .t-section, .t-setup > .t-section + .t-formpage { margin-top: var(--sp-4); }
.t-setup .t-msg { justify-content: center; }
.t-setup .t-setup-nav { margin-top: var(--sp-5); }
@media (max-width: 720px) { .t-setup .t-formpage, .t-setup > .t-section { padding: var(--sp-4); } }

/* The Overview map (planning/38). Markers as WebTAK draws them: a circle in
   the team's color with the role's letters, a heading tick when moving, the
   callsign beside it; faded when stale. */
.t-map-section .t-head-tools { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.t-map-status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--text-muted); }
.t-map-layer .f-select { min-width: 190px; }
.t-map { height: 460px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface-sunk); }
.t-map-note { margin-top: var(--sp-2); }
.t-map-wrap { position: relative; }
/* The base map's note (planning/38): small, over the map's top left corner. */
.t-map-base-note { position: absolute; left: 8px; top: 8px; z-index: 2; max-width: calc(100% - 64px); margin: 0;
  padding: 3px 9px; border-radius: 999px; background: rgba(13, 16, 20, .82); color: #fff;
  font: 500 11px/1.4 var(--font-sans, system-ui); pointer-events: none; }
.t-map-base-note[data-state="unreachable"], .t-map-base-note[data-state="none"] { background: rgba(120, 72, 0, .9); }
.t-map-base-note[hidden] { display: none; }
.t-mk { position: relative; width: 22px; height: 22px; cursor: pointer; }
.t-mk-dot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 2px solid #111; box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); font: 700 9px/1 var(--font-mono); color: #111; }
.t-mk-dot--other { background: #9aa4b2; }
.t-mk-head { position: absolute; left: 50%; top: 50%; width: 2px; height: 20px; margin-left: -1px; margin-top: -20px;
  background: #111; transform-origin: 50% 100%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); }
.t-mk-label { position: absolute; left: 26px; top: 3px; white-space: nowrap; padding: 1px 5px; border-radius: 3px;
  background: rgba(13, 16, 20, .78); color: #fff; font: 600 11px/1.3 var(--font-sans, system-ui); pointer-events: none; }
.t-mk--sym { width: auto; height: auto; }
.t-mk--sym .t-mk-label { left: 100%; margin-left: 4px; }
.t-mk--stale { opacity: .45; }
.t-mk-pop { font-size: 12px; color: #111; }
.t-mk-pop dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin: 6px 0; }
.t-mk-pop dt { color: #555; }
.t-mk-pop dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 720px) { .t-map { height: 340px; } }

/* Setup step 2 with cards: a trusted CA's revocation list address, set on
   its row, and the row's fetch error. */
.t-crl-set { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-2); }
.t-crl-set .f-input { flex: 1 1 18em; min-width: 0; }
.t-crl-error { color: var(--fault); }

/* A row menu inside a table opens in the top layer, placed by tumt.js beside
   its button, because the table's wrapper scrolls and cut the menu off below
   a short list (2026-1.6.5-beta). The browser's popover defaults (system
   colors, overflow) give way to the menu's own. */
.t-menu[popover] { color: inherit; overflow: visible; }

/* Dismiss all beside Open activity in the notices panel's foot (2026-1.6.5-beta). */
.t-notice-foot-acts { display: flex; align-items: baseline; gap: var(--sp-4); }
