/* ==========================================================================
   Labour Life practice system: admin.css. Owner: core (M0).
   The Admin page, Users, Settings and the Audit trail (SPEC 7.3, 7.4).
   Every class here starts with adm-. Nothing restates a class of the files
   before it. Tokens only, no raw colours. Phone first.

     .adm-user                    a name with its initials, in the users table
     .adm-choice (__o __t)        a group of radio buttons with one line of help each
     .adm-cos (__list __row __n)  the assigned companies of a user
     .adm-rights, .adm-about      the two rights, the read-only lines of the user dialog
     .adm-link                    the invite or reset link with its Copy button
     .adm-set (__card __h __lead __notes)   the Settings tabs
     .adm-env (__t)               the .env lines to paste
     .adm-queue, .adm-meter (--drive, __go), .adm-kinds     mail queue, storage meter (and its Google Drive line and link), storage table
     .adm-cst (__row __n __t)     the companies that use the most storage, under the meter (27 Oct 2026)
     .adm-dict (__r __w __by __x) the card "Dictionary" on the Practice tab: the words of the spell check (28 Oct 2026)
     .adm-efold (__box __notes)   the card "Default folders for employees" on the Practice tab (13 Nov 2026)
     .adm-gd (__fine __email __id __head __mark __logo __ht __tl __title __lead __chip(--connected --copying
       --attention --stopped) __note __cta __go __gl __cues __h __cl __cue __ci __ct __acct __av __an __ae
       __space __st __bar __fill __copying __progress __held __tree __fl __fr __fn __s __more __dl __form
       __folder __copy __url __plist __probs __p __pn __end __tm __g)   the tab "Google Drive", in Google's look
     .adm-gd-sheet (__body __logo __lead __steps __held)   its sheet before Google's page
     .adm-audit-tools, .adm-filters (__user __chip __end __toggle __n, .is-open)
     .adm-when (__who), .adm-who, .adm-what, .adm-chg (__s __t __old)
   ========================================================================== */

/* ---------- Users ---------- */

.adm-user { display: inline-flex; align-items: center; gap: var(--s3); min-width: 0; max-width: 100%; }
.adm-user__n { min-width: 0; overflow-wrap: break-word; font-weight: 600; }
/* The long headings (May download, May manage workflows, Last sign-in) may wrap, so the table fits a laptop. */
.tbl th.adm-col-wrap { white-space: normal; }

/* Radio buttons with their words. The whole row is the touch target. */
.adm-choice { gap: 0; }
.adm-choice > legend { margin-bottom: var(--s1); }
.adm-choice__o {
  display: flex; align-items: flex-start; gap: var(--s3);
  min-height: var(--tap); padding: var(--s2) 0; cursor: pointer;
}
.adm-choice__o input {
  flex: none; width: 22px; height: 22px; margin: 1px 0 0;
  accent-color: var(--ink);
}
.adm-choice__o input[disabled] { cursor: default; }
.adm-choice__o:has(input[disabled]) { cursor: default; color: var(--ink-soft); }
.adm-choice__t { min-width: 0; font-weight: 600; }
.adm-choice__t small {
  display: block; font-weight: 400; font-size: var(--fs-sm); line-height: var(--lh-snug); color: var(--ink-mute);
}
.adm-choice > .field__err { margin-top: var(--s1); }

/* The assigned companies: a well under "Only assigned companies". */
.adm-cos {
  gap: var(--s2); margin: var(--s2) 0 0; padding: var(--s3);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg);
}
.adm-cos__list { display: grid; }
.adm-cos__row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  min-height: var(--tap); padding: var(--s1) 0; border-bottom: 1px solid var(--line);
}
.adm-cos__row:last-child { border-bottom: 0; }
.adm-cos__n { min-width: 0; overflow-wrap: anywhere; }

.adm-rights { display: grid; gap: var(--s1); margin-bottom: var(--s4); }
.adm-userform > .check { margin-bottom: var(--s2); }
.adm-about { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line-strong); font-size: var(--fs-sm); }

.adm-link { display: grid; gap: var(--s4); }
.adm-link > .field { margin-bottom: 0; }
/* 16px like every input: it takes focus, and iOS zooms under that. */
.adm-link .input { font-family: var(--font-mono); }

/* ---------- Settings ---------- */

.adm-set { display: grid; gap: var(--s5); min-width: 0; }
.adm-set > * { min-width: 0; }
.adm-set__h { font-size: var(--fs-h3); margin-bottom: var(--s3); }
.adm-set__lead { margin-bottom: var(--s4); }
.adm-set__card > .note { margin-bottom: var(--s4); }
.adm-set__card > .btns { margin-top: var(--s2); }
/* The card "Dictionary" (28 Oct 2026): the words added in the email writer, each with Remove. */
.adm-dict { display: grid; }
.adm-dict__r { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--line); }
.adm-dict__r:first-child { border-top: 0; }
.adm-dict__w { font-weight: 600; overflow-wrap: anywhere; }
.adm-dict__by { flex: 1 1 12rem; min-width: 0; }
.adm-dict__x { margin-left: auto; }
/* The card "Default folders for employees" (13 Nov 2026, decision 492): one folder path per line.
   16px like every input (iOS zooms under that); a long path wraps and never widens the card. */
.adm-efold__box { font-family: var(--font-mono); line-height: 1.6; min-height: 12rem; resize: vertical; overflow-wrap: anywhere; }
.adm-efold__notes { display: grid; gap: var(--s2); margin-bottom: var(--s3); }
.adm-efold__notes > .note { margin: 0; }
.adm-set__card > .check { margin: calc(var(--s3) * -1) 0 var(--s4); }
.adm-set__notes { display: grid; gap: var(--s3); }
/* The card "Pictures in emails" (decision 476): the two lines stand right under the switch. */
.adm-set__card > .switch + .adm-set__notes { margin: var(--s2) 0 var(--s3); }
.adm-set__card > .switch + .adm-set__notes > .note { margin: 0; }

.adm-env { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
.adm-env > .note { margin: 0; }
.adm-env__t { font-family: var(--font-mono); white-space: pre; overflow-x: auto; }

.adm-queue { display: grid; gap: var(--s3); }

.adm-meter { display: grid; gap: var(--s2); margin-bottom: var(--s5); }
.adm-meter__t { font-size: var(--fs-lg); font-weight: 600; }
.adm-meter .progress { height: 12px; }

.adm-kinds { margin-bottom: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; }
.adm-kinds__k { font-weight: 600; }

/* The companies that use the most storage (27 Oct 2026, components/company-storage.js):
   one row each, the name, "3.2 GB of 20 GB (16.0%)" and a bar, amber from 90%. */
.adm-cst { display: grid; gap: var(--s4); }
.adm-cst__row { display: grid; gap: var(--s1); min-width: 0; }
.adm-cst__n { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.adm-cst__t { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--fs-sm); color: var(--ink-soft); }
.adm-cst .progress.is-warn .progress__bar { background: var(--warning); }

/* The Google Drive line of the meter (15 Oct 2026): under the server's, a little quieter. */
.adm-meter--drive { padding-top: var(--s4); border-top: 1px solid var(--line); }
.adm-meter--drive > .note { margin: 0 0 var(--s2); }
.adm-meter--drive .adm-meter__t { font-size: var(--fs-body); }

/* ---------- Settings, Google Drive (15 Oct 2026, components/drive-panel.js) ----------
   Its own tab since 15 Oct 2026, late, in Google's look: Google's greys,
   blue, green, amber and red (tokens.css --gd-*), the system font, 8px
   cards, 4px buttons and pill chips. ONLY inside .adm-gd (the card) and
   .adm-gd-sheet (the sheet before Google's page); the rest of the app keeps
   Labour Life's red. Everything in the card is a row of one grid, so the
   parts that come and go (notes, the question, the problems) keep the same
   spacing. Light always: in night mode the card and its sheet keep the day
   values of the tokens (tokens.css, the selectors before :root), so the tab
   stays Google's white card on the dark page (decision 494). */

.adm-gd {
  display: grid; gap: var(--s5);
  border: 1px solid var(--gd-line); border-radius: var(--gd-r-card); box-shadow: none;
  font-family: var(--gd-font); color: var(--gd-ink-3);
}
.adm-gd > * { min-width: 0; margin: 0; }
/* .adm-set__card > .note and > .btns (further up, 0,2,0) would add their
   margins again to the result message, the notes, the question and the
   Disconnect row: the grid gap alone spaces the rows (review of 15 Oct 2026, late). */
.adm-gd > .note, .adm-gd > .btns { margin: 0; }
.adm-gd h2, .adm-gd h3 { font-family: var(--gd-font); letter-spacing: 0; text-transform: none; color: var(--gd-ink); }
.adm-gd :focus-visible { outline: 2px solid var(--gd-blue); outline-offset: 2px; }
.adm-gd .link, .adm-gd a.link { color: var(--gd-blue); }
.adm-gd .link:hover, .adm-gd a.link:hover { color: var(--gd-blue-active); }
.adm-gd .fine { color: var(--gd-ink-2); }
.adm-gd__fine { font-size: var(--fs-sm); line-height: var(--lh-body); color: var(--gd-ink-2); }
.adm-gd__email, .adm-gd__id { overflow-wrap: anywhere; }

/* Buttons: Google blue for the one main action, white with a grey border and blue words for the rest.
   On the hover and pressed washes the words turn the darker blue (5.7 and 5.0
   on the wash; Google blue there is only 3.9 and 3.5), and Disconnect keeps
   its red words on a red wash (4.9). */
.adm-gd .btn, .adm-gd-sheet .btn {
  border-radius: var(--gd-r-btn); border-color: var(--gd-line); background: var(--surface); color: var(--gd-blue);
  font: 500 var(--fs-body)/1.2 var(--gd-font); letter-spacing: .01em;
}
.adm-gd .btn:hover, .adm-gd-sheet .btn:hover { background: var(--gd-blue-wash); border-color: var(--gd-blue-line); color: var(--gd-blue-active); }
.adm-gd .btn:active, .adm-gd-sheet .btn:active { background: var(--gd-blue-line); color: var(--gd-blue-active); }
.adm-gd .btn--primary, .adm-gd-sheet .btn--primary { background: var(--gd-blue); border-color: var(--gd-blue); color: var(--gd-on-blue); }
.adm-gd .btn--primary:hover, .adm-gd-sheet .btn--primary:hover { background: var(--gd-blue-hover); border-color: var(--gd-blue-hover); color: var(--gd-on-blue); box-shadow: var(--gd-shadow); }
.adm-gd .btn--primary:active, .adm-gd-sheet .btn--primary:active { background: var(--gd-blue-active); border-color: var(--gd-blue-active); color: var(--gd-on-blue); }
.adm-gd .btn--danger { color: var(--gd-red-ink); }
.adm-gd .btn--danger:hover { background: var(--gd-red-wash); border-color: var(--gd-red-line); color: var(--gd-red-ink); }
.adm-gd .btn--danger:active { background: var(--gd-red-wash); border-color: var(--gd-red); color: var(--gd-red-ink); }
.adm-gd-sheet .btn--ghost { border-color: transparent; background: transparent; }
.adm-gd-sheet .btn--ghost:hover { background: var(--gd-blue-wash); border-color: transparent; }
.adm-gd .btn[disabled], .adm-gd-sheet .btn[disabled] { background: var(--gd-grey); border-color: var(--gd-line); color: var(--gd-ink-2); }

/* Notes in Google's washes. */
.adm-gd .note { border-radius: var(--gd-r-card); font-family: var(--gd-font); }
.adm-gd .note--info { background: var(--gd-blue-wash); border-color: var(--gd-blue-line); color: var(--gd-blue-ink); }
.adm-gd .note--ok { background: var(--gd-green-wash); border-color: var(--gd-green-line); color: var(--gd-green-ink); }
.adm-gd .note--warn { background: var(--gd-amber-wash); border-color: var(--gd-amber-line); color: var(--gd-amber-ink); }
.adm-gd .note--err { background: var(--gd-red-wash); border-color: var(--gd-red-line); color: var(--gd-red-ink); }

/* Fields keep the app's form parts, in Google's shapes. The edge of a text
   box is Google's outlined-field grey (3.68 on white; WCAG 1.4.11 asks 3),
   never the card grey, and darker when the computer asks for more contrast. */
.adm-gd .input { border-radius: var(--gd-r-btn); border-color: var(--gd-field-line); font-family: var(--gd-font); color: var(--gd-ink); }
.adm-gd .input:hover { border-color: var(--gd-ink-2); }
.adm-gd .input:focus, .adm-gd .input:focus-visible { border-color: var(--gd-blue); box-shadow: 0 0 0 1px var(--gd-blue); }
.adm-gd .field > label, .adm-gd .field__label { color: var(--gd-ink); font-weight: 500; }

/* The header: the logo, "Google Drive" with its chip, the lead. On a phone
   the lead takes the whole width under them; from 560px it sits under the
   title, beside the logo. */
.adm-gd__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s3); align-items: center; }
.adm-gd__mark {
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 1px solid var(--gd-line); border-radius: var(--gd-r-card); background: var(--surface);
}
.adm-gd__logo { display: block; }
.adm-gd__ht { display: contents; }
.adm-gd__tl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); min-width: 0; }
.adm-gd__title { font-size: 1.375rem; font-weight: 400; line-height: 1.3; }
.adm-gd__lead { grid-column: 1 / -1; margin: 0; color: var(--gd-ink-2); font-size: var(--fs-sm); line-height: var(--lh-body); }
@media (min-width: 560px) {
  .adm-gd__head { align-items: start; row-gap: var(--s1); }
  .adm-gd__mark { grid-row: span 2; }
  .adm-gd__lead { grid-column: 2; }
}

/* The status chip: a pill with a small icon and its word (the colour is never the only sign). */
.adm-gd__chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 12px 2px 8px;
  border: 1px solid var(--gd-line); border-radius: var(--r-pill);
  background: var(--gd-grey); color: var(--gd-ink-2);
  font: 500 var(--fs-sm)/1.2 var(--gd-font); white-space: nowrap;
}
.adm-gd__chip svg { flex: none; }
.adm-gd__chip--connected { background: var(--gd-green-wash); border-color: var(--gd-green-line); color: var(--gd-green-ink); }
.adm-gd__chip--connected svg { color: var(--gd-green); }
.adm-gd__chip--copying { background: var(--gd-blue-wash); border-color: var(--gd-blue-line); color: var(--gd-blue-ink); }
.adm-gd__chip--copying svg { color: var(--gd-blue); }
.adm-gd__chip--attention { background: var(--gd-amber-wash); border-color: var(--gd-amber-line); color: var(--gd-amber-ink); }
.adm-gd__chip--attention svg { color: var(--gd-amber); }
.adm-gd__chip--stopped { background: var(--gd-red-wash); border-color: var(--gd-red-line); color: var(--gd-red-ink); }
.adm-gd__chip--stopped svg { color: var(--gd-red); }

/* A note with its own buttons: the broken token, the different account. */
.adm-gd__note { display: grid; gap: var(--s2); }
.adm-gd__note > * { margin: 0; }
.adm-gd__note .btns { margin-top: var(--s1); }

/* Connect Google Drive: the logo on a white square inside the blue button, like Google's own. */
.adm-gd__cta { display: grid; gap: var(--s2); }
.adm-gd__cta > * { margin: 0; }
.adm-gd__go { max-width: 100%; padding-left: 5px; gap: var(--s3); }
.adm-gd__gl { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 2px; background: var(--surface); flex: none; }
.adm-gd__go:not(.btn--primary) .adm-gd__gl { width: 32px; height: 32px; }

/* The four safe cues. */
.adm-gd__cues { display: grid; gap: var(--s3); padding: var(--s4); border-radius: var(--gd-r-card); background: var(--gd-wash); }
.adm-gd__h { font-size: var(--fs-body); font-weight: 500; line-height: 1.4; }
.adm-gd__cl { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.adm-gd__cue { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s3); align-items: start; }
.adm-gd__ci {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-pill);
  background: var(--gd-blue-wash); color: var(--gd-blue);
}
.adm-gd__ct { display: grid; gap: 2px; padding-top: 5px; font-size: var(--fs-sm); line-height: var(--lh-body); color: var(--gd-ink-3); overflow-wrap: break-word; }
.adm-gd__ct small { color: var(--gd-ink-2); font-size: var(--fs-sm); }

/* The account: a round avatar with the first letter on Google blue, the address, the day. */
.adm-gd__acct { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s3); align-items: center; }
.adm-gd__av {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-pill);
  background: var(--gd-blue); color: var(--gd-on-blue); font: 500 1.375rem/1 var(--gd-font); user-select: none;
}
.adm-gd__an { display: grid; gap: 2px; min-width: 0; }
.adm-gd__an > p { margin: 0; }
.adm-gd__ae { color: var(--gd-ink); font-weight: 500; overflow-wrap: anywhere; }

/* The space in Drive and the copy progress: a blue bar on a grey track. */
.adm-gd__space { display: grid; gap: var(--s2); }
.adm-gd__space > p { margin: 0; }
.adm-gd__st { display: flex; align-items: center; gap: var(--s2); color: var(--gd-ink); font-weight: 500; }
.adm-gd__st svg { flex: none; color: var(--gd-ink-2); }
.adm-gd__bar { display: block; width: 100%; height: 6px; border-radius: var(--r-pill); background: var(--gd-track); overflow: hidden; }
.adm-gd__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--gd-blue); transition: width var(--dur-2) var(--ease-out); }
.adm-gd__bar.is-warn .adm-gd__fill { background: var(--gd-amber-bar); }
.adm-gd__bar.is-err .adm-gd__fill { background: var(--gd-red); }
.adm-gd__bar.is-done .adm-gd__fill { background: var(--gd-green); }

.adm-gd__copying { display: grid; gap: var(--s3); }
.adm-gd__copying > * { margin: 0; }
.adm-gd__progress { color: var(--gd-ink); font-size: var(--fs-lg); font-weight: 500; }

/* R5 has not allowed copying: a calm note, no error colour. */
.adm-gd__held {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--s3); align-items: start;
  padding: var(--s3) var(--s4); border: 1px solid var(--gd-line); border-radius: var(--gd-r-card);
  background: var(--gd-wash); color: var(--gd-ink-3); font-size: var(--fs-sm); line-height: var(--lh-body);
}
.adm-gd__held svg { margin-top: 1px; color: var(--gd-blue); }
.adm-gd__held p { margin: 0; }

/* The folder preview, indented like Drive's own folder list, with grey folder icons. */
.adm-gd__tree { display: grid; gap: var(--s2); }
.adm-gd__tree > p { margin: 0; }
.adm-gd__fl, .adm-gd__fl ul { margin: 0; padding: 0; list-style: none; }
.adm-gd__fl { padding: var(--s2) var(--s3); border: 1px solid var(--gd-line); border-radius: var(--gd-r-card); }
.adm-gd__fl ul { margin-left: 9px; padding-left: 13px; border-left: 1px solid var(--gd-line); }
.adm-gd__fr { display: flex; align-items: center; gap: var(--s3); min-height: 36px; padding: var(--s1) 0; color: var(--gd-ink); font-size: var(--fs-sm); }
.adm-gd__fr svg { flex: none; color: var(--gd-folder); }
.adm-gd__fn { min-width: 0; overflow-wrap: anywhere; }

/* "Google Cloud settings (R5)": folded, the whole summary row is the touch target.
   It stays a list item, so the browser keeps its open and closed triangle
   (display: flex would remove it); the padding gives the 44px row. */
.adm-gd__s {
  display: list-item; min-height: var(--tap); box-sizing: border-box;
  padding: calc((var(--tap) - 1.5em) / 2) 0;
  line-height: 1.5;
  color: var(--gd-blue); font-weight: 500; cursor: pointer;
}
.adm-gd__s:hover { color: var(--gd-blue-active); }
.adm-gd__more { border-top: 1px solid var(--gd-line); padding-top: var(--s2); }
.adm-gd__more[open] > .adm-gd__s { margin-bottom: var(--s3); }
.adm-gd__more > .fine { margin-top: var(--s2); }
.adm-gd__dl { margin-bottom: var(--s4); }

.adm-gd__form > .note { margin-bottom: var(--s4); }
.adm-gd__form > .check { margin: calc(var(--s3) * -1) 0 var(--s3); }
.adm-gd__folder > .field { margin-bottom: var(--s3); }

/* The redirect address with its Copy button: one column on a phone, side by side from 560px. */
.adm-gd__copy { display: grid; gap: var(--s2); min-width: 0; }
.adm-gd__url { min-width: 0; font-family: var(--font-mono); font-size: var(--fs-sm); }
@media (min-width: 560px) {
  .adm-gd__copy { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

/* What could not be copied: a plain list, one problem a row. */
.adm-gd__plist { display: grid; gap: var(--s2); }
.adm-gd__probs { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--gd-line); border-radius: var(--gd-r-card); }
.adm-gd__p { display: grid; gap: var(--s1); padding: var(--s3); border-top: 1px solid var(--gd-line); overflow-wrap: anywhere; }
.adm-gd__p:first-child { border-top: 0; }
.adm-gd__p > * { margin: 0; }
.adm-gd__pn { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); font-weight: 500; color: var(--gd-ink); }
.adm-gd__pn > .fine { font-weight: 400; }
.adm-gd__end { padding-top: var(--s1); }
.adm-gd__tm { color: var(--gd-ink-2); font-size: .75rem; line-height: 1.4; }

/* The sheet before Google's page (components/modal.js, className adm-gd-sheet). */
.adm-gd-sheet { font-family: var(--gd-font); color: var(--gd-ink-3); border-radius: var(--gd-r-card) var(--gd-r-card) 0 0; }
.adm-gd-sheet .modal__head h2 { font-family: var(--gd-font); font-weight: 400; font-size: 1.375rem; letter-spacing: 0; text-transform: none; color: var(--gd-ink); }
.adm-gd-sheet :focus-visible { outline: 2px solid var(--gd-blue); outline-offset: 2px; }
.adm-gd-sheet__body { display: grid; gap: var(--s3); }
.adm-gd-sheet__body > * { margin: 0; }
.adm-gd-sheet__logo { display: grid; place-items: center; padding: var(--s2) 0; }
.adm-gd-sheet__lead { color: var(--gd-ink); font-weight: 500; }
.adm-gd-sheet__steps { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; counter-reset: gds; }
.adm-gd-sheet__steps > li {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s3); align-items: start;
  counter-increment: gds; font-size: var(--fs-sm); line-height: var(--lh-body);
}
.adm-gd-sheet__steps > li::before {
  content: counter(gds); display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-pill);
  background: var(--gd-blue-wash); color: var(--gd-blue-ink); font: 500 var(--fs-sm)/1 var(--gd-font);
}
.adm-gd-sheet__held {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--s3); align-items: start;
  padding: var(--s3); border-radius: var(--gd-r-card); background: var(--gd-wash); color: var(--gd-ink-3);
  font-size: var(--fs-sm); line-height: var(--lh-body);
}
.adm-gd-sheet__held svg { margin-top: 1px; color: var(--gd-blue); }
@media (min-width: 560px) {
  .adm-gd-sheet { border-radius: var(--gd-r-card); }
}

@media (pointer: coarse) {
  /* The links of a problem row (the document and the company), and the link
     from the Storage tab to the Google Drive tab: 44px on touch. */
  .adm-gd__p .link, .adm-meter__go { display: inline-flex; align-items: center; min-height: var(--tap); }
}
@media (forced-colors: active) {
  .adm-gd__chip, .adm-gd__fl, .adm-gd__held, .adm-gd__bar { border: 1px solid CanvasText; }
  .adm-gd__fill { background: Highlight; forced-color-adjust: none; }
}

/* ---------- Audit trail ---------- */

.adm-audit-tools { display: grid; gap: var(--s3); }
.adm-filters__toggle { justify-self: start; }
.adm-filters__n {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--ink); color: var(--surface);
  font-size: var(--fs-label); font-weight: 600; line-height: 1;
}

/* Folded on a phone, open from 720px. */
.adm-filters {
  display: none; gap: 0 var(--s4);
  padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-soft);
}
.adm-filters.is-open { display: grid; }
.adm-filters > *, .adm-filters__user > .field { min-width: 0; }
.adm-filters__user { display: grid; align-content: start; }
.adm-filters__user > .field:has(+ .adm-filters__chip:not([hidden])) { margin-bottom: var(--s2); }
.adm-filters__chip { justify-self: start; margin-bottom: var(--s4); }
.adm-filters__end { display: flex; align-items: center; justify-content: flex-end; min-height: var(--tap); }

@media (min-width: 520px) {
  .adm-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-filters__end { grid-column: 1 / -1; }
}
@media (min-width: 720px) {
  .adm-filters__toggle { display: none; }
  .adm-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); align-items: start; }
  /* Level with the controls, under the row of labels. */
  .adm-filters__end { grid-column: auto; justify-content: flex-start; margin-top: calc(var(--fs-sm) * 1.5 + var(--s1)); }
}

.adm-when { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s3); }
.adm-when__who { color: var(--ink-soft); font-weight: 400; font-size: var(--fs-body); }
.adm-who { display: inline-flex; align-items: center; gap: var(--s2); min-width: 0; }
.adm-who__none { color: var(--ink-soft); cursor: pointer; min-height: var(--control-h-sm); }
.adm-what { display: grid; gap: var(--s1); min-width: 0; overflow-wrap: break-word; }
.adm-cell-what { min-width: 16rem; }

/* The old and new values of one entry, behind "Show changes". */
.adm-chg__s {
  display: inline-flex; align-items: center; min-height: var(--control-h-sm);
  color: var(--link); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.adm-chg__s:hover { color: var(--link-hover); }
.adm-chg__t { width: 100%; margin-top: var(--s1); table-layout: fixed; font-size: var(--fs-sm); }
.adm-chg__t th, .adm-chg__t td {
  padding: var(--s1) var(--s2) var(--s1) 0; border: 0; border-top: 1px solid var(--line);
  background: transparent; vertical-align: top; overflow-wrap: anywhere; text-align: left;
  font: inherit; letter-spacing: 0; text-transform: none; white-space: normal; color: var(--ink);
}
.adm-chg__t th { color: var(--ink-mute); font-weight: 600; }
.adm-chg__t td.adm-chg__old { color: var(--ink-mute); }

@media (pointer: coarse) {
  .adm-chg__s, .adm-who__none { min-height: var(--tap); }
  /* The two links of a trail entry: the summary and the company. */
  .adm-what > .link, .tbl td > a.link { display: inline-flex; align-items: center; min-height: var(--tap); }
}

@media (min-width: 720px) {
  /* A real table: when and who have their own columns. */
  .adm-when__who { display: none; }
  /* "This is easier on a computer" is for phones only. */
  .adm-phone-hint { display: none; }
}
@media (max-width: 719px) {
  /* A card: the summary takes the whole second line, without its column label. */
  .tbl--collapse td.adm-cell-what[data-k] { display: block; min-width: 0; }
  .tbl--collapse td.adm-cell-what[data-k]::before { display: none; }
  /* The nested table of changes stays a table inside the card. */
  .tbl--collapse .adm-chg__t { display: table; }
  .tbl--collapse .adm-chg__t thead { position: static; display: table-header-group; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal; }
  .tbl--collapse .adm-chg__t tbody { display: table-row-group; }
  .tbl--collapse .adm-chg__t tr { display: table-row; position: static; padding: 0; border: 0; }
  .tbl--collapse .adm-chg__t th, .tbl--collapse .adm-chg__t td { display: table-cell; padding: var(--s1) var(--s2) var(--s1) 0; border-top: 1px solid var(--line); }
}

@media (forced-colors: active) {
  .adm-cos, .adm-filters, .adm-gd__probs { border: 1px solid CanvasText; }
  .adm-filters__n { background: Highlight; color: HighlightText; forced-color-adjust: none; }
}

@media print {
  .adm-audit-tools { display: none !important; }
}
