/* ═══ PHONE ADMIN COMMAND POST ══════════════════════════════════════════════════════════════════
 * Styles for the #g-adm sub-app (admin-phone.js). SCOPED under #g-adm for exactly the reason
 * supervisor.css is scoped under #g-sup: all three shells (#g-app, #g-sup, #g-adm) share ONE
 * document, so an unscoped rule here would repaint the officer app.
 *
 * Tokens are declared ON #g-adm, not :root — guard.css owns the globals and stays authoritative.
 * The dark half is written at the same time as the light half (see the DARK THEME block at the
 * bottom), not retrofitted: #g-sup shipped light-only and spent a release as a bright island
 * inside a dark app, and this file exists to not repeat that.
 *
 * MOTION. guard.css does not define --t-fast/--t-med/--ease on this base (grepped: they live in
 * the platform styles.css, which this shell never loads), so the durations below are the house
 * literals — 150ms / 200ms / cubic-bezier(.2,.7,.3,1) — expressed through var() fallbacks so that
 * the day those tokens DO reach guard.css this file starts consuming them with no edit. Every
 * transition is inside @media (prefers-reduced-motion: no-preference); CSS only, no JS animation.
 *
 * TOUCH. --tap (44px, from guard.css :root) is the floor for every control here. This app is used
 * one-handed, at night, by someone who has just been woken up.
 * ============================================================================================== */
#g-adm{
  --navy:#032b49;--navy-2:#005080;--red:#e11d2a;--green:#0f9d58;--amber:#e08600;
  --line:#e4eaf1;--muted:#5f7288;--bg:#eaf0f6;--ink:#16222f;--surface:#fff;--surface-2:#eef1f6;
  --blue:#0a6bb0;--blue-bright:#1a86d0;
  --grad-primary:linear-gradient(90deg,#005080,#0a6bb0);
  --grad-head:linear-gradient(165deg,#04213a,#0a4470);
  --a-fast:var(--t-fast,150ms);
  --a-med:var(--t-med,200ms);
  --a-ease:var(--ease,cubic-bezier(.2,.7,.3,1));
  background:var(--bg);color:var(--ink);min-height:100vh;
  padding-bottom:calc(66px + env(safe-area-inset-bottom));
}
/* Catch-all icon size. An inline <svg viewBox="0 0 24 24"> with no width/height attribute has NO
   intrinsic size, so a browser resolves it to the containing block's width — measured at 375px it
   came out 320x320, five of them stacked down the More tab. Every icon in this file is authored
   that way (it is the house idiom, so `stroke:currentColor` inherits), which makes a default the
   only safe answer rather than remembering a rule per surface. Specificity is (1,0,1), so each of
   the (1,1,1) rules below — header, buttons, nav, section headings, empty states — still wins. */
#g-adm svg{width:16px;height:16px;flex:0 0 auto;vertical-align:-2px}
/* ---- header ---------------------------------------------------------------------------------- */
#g-adm .ahead{position:sticky;top:0;z-index:50;background:var(--grad-head);color:#fff;
  padding:11px 12px;display:flex;align-items:center;gap:8px}
#g-adm .ahead .attl{flex:1;min-width:0;font-family:var(--font-display,inherit);font-weight:800;font-size:16px;line-height:1.15}
#g-adm .ahead .attl small{display:block;font-weight:500;font-size:11px;opacity:.78;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#g-adm .ahb{flex:0 0 auto;min-width:var(--tap,44px);min-height:var(--tap,44px);border:none;border-radius:12px;
  background:rgba(255,255,255,.14);color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0 10px;
  font-family:inherit;font-size:12.5px;font-weight:800}
#g-adm .ahb svg{width:20px;height:20px}
@media (prefers-reduced-motion:no-preference){
  #g-adm .ahb{transition:background var(--a-fast) var(--a-ease),transform var(--a-fast) var(--a-ease)}
  #g-adm .ahb:active{transform:scale(.94);background:rgba(255,255,255,.26)}
}
/* Live pill — says the data on screen is fresh, and how fresh. */
#g-adm .alive{font-size:11px;color:var(--muted);margin:0 2px 10px;display:flex;align-items:center;gap:6px}
#g-adm .alive i{width:7px;height:7px;border-radius:50%;background:var(--green);flex:0 0 auto}
@media (prefers-reduced-motion:no-preference){
  #g-adm .alive i{animation:a-beat 2.4s ease-in-out infinite}
  @keyframes a-beat{0%,100%{opacity:1}50%{opacity:.35}}
}
/* ---- views + bottom nav ----------------------------------------------------------------------- */
#g-adm .aview{display:none;padding:13px 13px 22px}
#g-adm .aview.on{display:block}
#g-adm .anav{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;background:var(--surface);
  border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
#g-adm .anav button{flex:1;border:none;background:none;padding:8px 0 6px;font-size:10.5px;font-weight:700;
  color:#8ea0b3;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:2px;
  min-height:var(--tap,44px);position:relative;font-family:inherit}
#g-adm .anav button.on{color:var(--blue);font-weight:800}
#g-adm .anav button svg{width:21px;height:21px}
#g-adm .anav .bdg{position:absolute;top:4px;left:50%;transform:translateX(4px);background:var(--red);color:#fff;
  font-size:9px;font-weight:800;border-radius:99px;min-width:16px;height:16px;display:flex;align-items:center;
  justify-content:center;padding:0 4px}
@media (prefers-reduced-motion:no-preference){
  #g-adm .anav button{transition:color var(--a-fast) var(--a-ease)}
  #g-adm .anav button svg{transition:transform var(--a-med) var(--a-ease)}
  #g-adm .anav button.on svg{transform:translateY(-1px) scale(1.08)}
}
/* ---- section headings + empties ---------------------------------------------------------------- */
#g-adm .asec{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:17px 0 8px;
  display:flex;align-items:center;gap:7px}
#g-adm .asec:first-child{margin-top:2px}
#g-adm .asec svg{width:14px;height:14px;flex:0 0 auto}
#g-adm .aempty{background:var(--surface);border:1px dashed var(--line);border-radius:13px;padding:20px 14px;
  text-align:center;color:var(--muted);font-size:13.5px;line-height:1.55}
#g-adm .aempty svg{width:26px;height:26px;opacity:.6;vertical-align:middle}
#g-adm .ahint{font-size:12px;color:var(--muted);margin:6px 2px;line-height:1.5}
#g-adm a{color:var(--blue);text-decoration:none;font-weight:600}
/* ---- the three triage count cards --------------------------------------------------------------
   Buttons, not divs: the whole point is that each one opens the list behind it, and a tappable
   thing that is not a <button> loses the keyboard path and the focus ring for free. */
#g-adm .acards{display:flex;gap:8px}
#g-adm .acard{flex:1 1 0;min-width:0;min-height:var(--tap,44px);background:var(--surface);border:1px solid var(--line);
  border-top:3px solid #b9c1cf;border-radius:14px;padding:12px 8px 11px;text-align:center;cursor:pointer;
  font-family:inherit;color:var(--ink);display:block}
#g-adm .acard b{display:block;font-size:27px;font-weight:800;line-height:1;font-family:var(--font-mono,inherit)}
#g-adm .acard span{display:block;font-size:11px;font-weight:700;color:var(--muted);margin-top:5px;line-height:1.3}
#g-adm .acard.ok{border-top-color:var(--green)}
#g-adm .acard.ok b{color:var(--green)}
#g-adm .acard.bad{border-top-color:var(--red)}
#g-adm .acard.bad b{color:var(--red)}
#g-adm .acard.warn{border-top-color:var(--amber)}
#g-adm .acard.warn b{color:var(--amber)}
#g-adm .acard.zero b{color:var(--muted)}
#g-adm .acard.zero{border-top-color:#b9c1cf}
@media (prefers-reduced-motion:no-preference){
  #g-adm .acard{transition:transform var(--a-fast) var(--a-ease),box-shadow var(--a-fast) var(--a-ease)}
  #g-adm .acard:active{transform:scale(.97);box-shadow:0 2px 10px rgba(10,30,60,.14)}
}
/* ---- nudge cards (Connecteam idiom: one real signal, one action) -------------------------------- */
#g-adm .anudge{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);
  border-left:4px solid #b9c1cf;border-radius:13px;padding:11px 12px;margin-bottom:8px}
#g-adm .anudge .tx{flex:1;min-width:0}
#g-adm .anudge .tx b{display:block;font-size:14px;font-weight:800;line-height:1.3}
#g-adm .anudge .tx small{display:block;font-size:12px;color:var(--muted);margin-top:2px;line-height:1.4}
#g-adm .anudge.red{border-left-color:var(--red);background:#fdf3f3}
#g-adm .anudge.amber{border-left-color:var(--amber);background:#fffaf0}
#g-adm .anudge.blue{border-left-color:var(--blue)}
#g-adm .anudge.grey{border-left-color:#b9c1cf}
@media (prefers-reduced-motion:no-preference){
  #g-adm .anudge{animation:a-rise var(--a-med) var(--a-ease) both}
  @keyframes a-rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
}
/* ---- rows ---------------------------------------------------------------------------------------- */
#g-adm .arow{background:var(--surface);border:1px solid var(--line);border-left-width:4px;border-left-color:#b9c1cf;
  border-radius:13px;padding:11px 12px;margin-bottom:8px;font-size:14px}
#g-adm .arow.ok{border-left-color:var(--green)}
#g-adm .arow.bad{border-left-color:var(--red);background:#fdf3f3}
#g-adm .arow.warn{border-left-color:var(--amber);background:#fffaf0}
#g-adm .arow.grey{border-left-color:#b9c1cf}
#g-adm .arow .anm{font-weight:800;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
#g-adm .arow .anm b{flex:1;min-width:0}
#g-adm .arow .ameta{font-size:12.5px;color:var(--muted);margin-top:3px;line-height:1.45}
#g-adm .ats{font-size:11px;font-weight:700;color:var(--muted);font-family:var(--font-mono,inherit);white-space:nowrap}
#g-adm .atag{font-size:10.5px;font-weight:800;padding:2px 8px;border-radius:99px;white-space:nowrap}
#g-adm .atag.late{background:var(--red);color:#fff}
#g-adm .atag.geo{background:#fdeaea;color:#c0182a}
#g-adm .atag.brk{background:#fdf0dc;color:#a8660a}
#g-adm .atag.ot{background:#fdf0dc;color:#a8660a}
#g-adm .atag.new{background:#e4f1fb;color:#0a6bb0}
#g-adm .atag.off{background:#eef1f6;color:#5f7288}
/* ---- buttons -------------------------------------------------------------------------------------- */
#g-adm .abtn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:none;border-radius:11px;
  padding:0 14px;min-height:var(--tap,44px);font-size:13.5px;font-weight:800;cursor:pointer;font-family:inherit;
  background:var(--grad-primary);color:#fff;text-decoration:none}
#g-adm .abtn svg{width:16px;height:16px}
#g-adm .abtn.ghost{background:var(--surface-2);color:#1b2230}
#g-adm .abtn.red{background:var(--red);color:#fff}
#g-adm .abtn.green{background:var(--green);color:#fff}
#g-adm .abtn.wfull{display:flex;width:100%;margin-top:8px}
#g-adm .abtn:disabled{opacity:.5}
#g-adm .aacts{display:flex;gap:7px;margin-top:9px;flex-wrap:wrap}
#g-adm .aacts .abtn{flex:1 1 auto;padding:0 11px;font-size:13px}
@media (prefers-reduced-motion:no-preference){
  #g-adm .abtn{transition:transform var(--a-fast) var(--a-ease),filter var(--a-fast) var(--a-ease)}
  #g-adm .abtn:active{transform:scale(.96);filter:var(--press-dim,brightness(.92))}
}
/* ---- sub-panel (drill-in) header ------------------------------------------------------------------ */
#g-adm .ahd{display:flex;align-items:center;gap:9px;margin:0 0 12px}
#g-adm .aback{min-width:var(--tap,44px);min-height:var(--tap,44px);border:1px solid var(--line);border-radius:12px;
  background:var(--surface);color:var(--ink);font-family:inherit;font-size:14px;font-weight:800;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;padding:0 12px;flex:0 0 auto}
#g-adm .ahd .ahdt{flex:1;min-width:0;font-weight:800;font-size:16px;line-height:1.2}
#g-adm .ahd .ahdt small{display:block;font-weight:600;font-size:12px;color:var(--muted);margin-top:2px}
@media (prefers-reduced-motion:no-preference){
  #g-adm .aback{transition:transform var(--a-fast) var(--a-ease)}
  #g-adm .aback:active{transform:scale(.94)}
}
/* ---- segmented control (Today/Tomorrow, Staff/Officers) -------------------------------------------- */
#g-adm .aseg{display:flex;gap:6px;background:var(--surface-2);border-radius:12px;padding:4px;margin-bottom:11px}
/* The PILL is the touch target, so it carries the full --tap floor itself. An earlier draft made it
   38px and leaned on the rail's 4px padding to reach 46 — but that padding belongs to .aseg, so a
   tap landing in it hits the container and does nothing. Measured at 375x812: 38px, under the
   house floor, on the control that switches which DAY of the schedule you are covering. */
#g-adm .aseg button{flex:1;min-height:var(--tap,44px);border:none;border-radius:9px;background:transparent;color:var(--muted);
  font-family:inherit;font-size:13px;font-weight:800;cursor:pointer;padding:0 6px}
#g-adm .aseg button.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(20,30,50,.14)}
@media (prefers-reduced-motion:no-preference){
  #g-adm .aseg button{transition:background var(--a-fast) var(--a-ease),color var(--a-fast) var(--a-ease)}
}
/* ---- form fields ------------------------------------------------------------------------------------ */
#g-adm .afield{margin-bottom:11px}
#g-adm .afield label{display:block;font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase;
  letter-spacing:.04em;margin-bottom:5px}
#g-adm .afield input,#g-adm .afield select,#g-adm .afield textarea{width:100%;padding:12px;border:1px solid var(--line);
  border-radius:11px;font-size:16px;font-family:inherit;background:var(--surface);color:var(--ink);min-height:var(--tap,44px)}
#g-adm .afield textarea{min-height:110px;line-height:1.5;resize:vertical}
/* ---- the shorthand time field (.atmi, admin-phone.js) --------------------------------------------
   Owner's rule: nowhere a human picks a time is there a native <input type="time">. This is a plain
   text box that formats itself — the admin types '730p', it reads back '7:30 PM', and data-hm holds
   the 24-hour value that goes on the wire. Shaped exactly like every other .afield control so the
   Edit screen still reads as one form: same padding, same radius, the --tap floor, and 16px text
   (anything smaller and iOS zooms the whole page the moment the field takes focus).
   `.bad` is the refusal: the parser could not read what is in the box, and data-hm has been cleared,
   so the border is the standing reminder that this field has nothing to save. Both selectors are
   (1,2,0) and beat the (1,1,1) `.afield input` rule above without !important. */
#g-adm .atmi{width:100%;padding:12px;border:1px solid var(--line);border-radius:11px;font-size:16px;
  font-family:inherit;background:var(--surface);color:var(--ink);min-height:var(--tap,44px)}
#g-adm .atmi:focus{outline:none;border-color:var(--blue-bright);box-shadow:0 0 0 3px rgba(26,134,208,.18)}
#g-adm .atmi.bad{border-color:var(--red);box-shadow:0 0 0 3px rgba(225,29,42,.16)}
#g-adm .atmi:disabled{opacity:.55}
@media (prefers-reduced-motion:no-preference){
  #g-adm .atmi{transition:border-color var(--a-fast) var(--a-ease),box-shadow var(--a-fast) var(--a-ease)}
}
#g-adm .ack{display:flex;align-items:center;gap:9px;font-size:14px;min-height:var(--tap,44px);cursor:pointer;margin-bottom:6px}
#g-adm .ack input{width:20px;height:20px;accent-color:var(--blue);flex:0 0 auto}
#g-adm .asearch{width:100%;padding:12px;margin:0 0 10px;border:1px solid var(--line);border-radius:12px;font-size:16px;
  font-family:inherit;background:var(--surface);color:var(--ink);min-height:var(--tap,44px)}
/* ---- SOS card (matches Field mode's, deliberately — same event, same visual weight) ------------------ */
#g-adm .asos{border:3px solid var(--red);border-radius:14px;background:var(--surface);padding:12px;margin-bottom:10px}
#g-adm .asos .t{font-weight:800;color:#c0182a;font-size:15px;display:flex;align-items:center;gap:8px}
#g-adm .asos .t span:first-child{flex:1}
#g-adm .aresp{color:var(--green);font-weight:800;font-size:13px;margin-top:4px}
@media (prefers-reduced-motion:no-preference){
  #g-adm .asos{animation:a-pulse 1.4s ease-in-out infinite}
  @keyframes a-pulse{0%,100%{box-shadow:0 0 0 0 rgba(225,29,42,.32)}50%{box-shadow:0 0 0 8px rgba(225,29,42,0)}}
}
/* ---- cover / assign candidate rows ------------------------------------------------------------------- */
#g-adm .acand{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);
  border-left-width:4px;border-left-color:var(--green);border-radius:12px;padding:10px 11px;margin-bottom:8px}
#g-adm .acand.blocked{border-left-color:#b9c1cf;opacity:.9}
#g-adm .acand .cmain{flex:1;min-width:0}
#g-adm .acand .cnm{font-weight:800;font-size:14px}
#g-adm .acand .cmeta{font-size:12px;color:var(--muted);margin-top:2px;line-height:1.45}
#g-adm .acand .cblk{font-size:12px;color:#c0182a;margin-top:3px;line-height:1.45;font-weight:600}
#g-adm .acand .cdist{font-weight:800;color:var(--navy-ink,var(--navy));white-space:nowrap;font-size:13px;
  font-family:var(--font-mono,inherit)}
#g-adm .acand .abtn{flex:0 0 auto;padding:0 13px}
/* ---- skeletons --------------------------------------------------------------------------------------- */
#g-adm .ask{background:linear-gradient(90deg,#e6ebf2 25%,#eff3f8 37%,#e6ebf2 63%);background-size:400% 100%;
  border-radius:10px;height:14px}
#g-adm .askc{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:12px;margin-bottom:8px}
@media (prefers-reduced-motion:no-preference){
  #g-adm .ask{animation:a-sheen 1.35s ease-in-out infinite}
  @keyframes a-sheen{0%{background-position:100% 50%}100%{background-position:0 50%}}
}
/* ---- toast ------------------------------------------------------------------------------------------- */
#g-adm .atoast{position:fixed;left:50%;bottom:calc(78px + env(safe-area-inset-bottom));transform:translate(-50%,14px);
  z-index:90;background:#0d1826;color:#fff;padding:12px 17px;border-radius:12px;font-size:13.5px;font-weight:700;
  max-width:88vw;text-align:center;opacity:0;pointer-events:none;line-height:1.4}
#g-adm .atoast.on{opacity:1;transform:translate(-50%,0)}
@media (prefers-reduced-motion:no-preference){
  #g-adm .atoast{transition:opacity var(--a-med) var(--a-ease),transform var(--a-med) var(--a-ease)}
}
/* ══ DARK THEME ═══════════════════════════════════════════════════════════════════════════════════════
   guard.js sets [data-theme="dark"] on <html>. Written here at the same time as the light half so
   this app is never the bright rectangle inside a dark shell that #g-sup was for a release.
   Only tokens and the few places that name a literal light value are flipped. */
[data-theme="dark"] #g-adm{--line:#26303f;--muted:#93a3b7;--bg:#0f1520;--ink:#e6edf7;
  --surface:#161d2b;--surface-2:#232f42;--grad-head:linear-gradient(165deg,#0a1524,#123253)}
[data-theme="dark"] #g-adm a{color:#6fb2e8}
[data-theme="dark"] #g-adm .anav{background:#111826}
[data-theme="dark"] #g-adm .arow.bad,[data-theme="dark"] #g-adm .anudge.red{background:#2a1719}
[data-theme="dark"] #g-adm .arow.warn,[data-theme="dark"] #g-adm .anudge.amber{background:#2a2214}
[data-theme="dark"] #g-adm .abtn.ghost{background:#243044;color:#dbe6f5}
/* The three triage numbers are the most-read glyphs in the app, so they get measured colours rather
   than inherited ones. On the dark #161d2b card the light-theme statuses land at 4.7:1 (green),
   5.6:1 (amber) and 3.3:1 (red) — the red only just clears the 3:1 large-text floor, on the count
   that means somebody is missing from a post. These three are 7.5:1 or better. */
[data-theme="dark"] #g-adm .acard.ok b{color:#4ecb8b}
[data-theme="dark"] #g-adm .acard.warn b{color:#f0c078}
[data-theme="dark"] #g-adm .acard.bad b{color:#f0949c}
[data-theme="dark"] #g-adm .aseg button.on{background:#2c3a52;color:#eaf1fb}
[data-theme="dark"] #g-adm .atag.geo{background:#3a1c1f;color:#f0949c}
[data-theme="dark"] #g-adm .atag.brk,[data-theme="dark"] #g-adm .atag.ot{background:#3a2c14;color:#f0c078}
[data-theme="dark"] #g-adm .atag.new{background:#16273a;color:#8fc3f0}
[data-theme="dark"] #g-adm .atag.off{background:#243044;color:#b6c3d4}
[data-theme="dark"] #g-adm .asos .t{color:#f08d96}
[data-theme="dark"] #g-adm .acand .cblk{color:#f0949c}
[data-theme="dark"] #g-adm .ask{background:linear-gradient(90deg,#1c2432 25%,#26303f 37%,#1c2432 63%);background-size:400% 100%}
[data-theme="dark"] #g-adm .atoast{background:#2a3446}
