/* provider.css v2.7 (2026-12-02, Joseph: the dark theme, last block) v2.6 (2026-12-02, Joseph: the menu Actions) v2.5 (2026-12-02, Joseph "go A and B": the top bar like CirPax, the client card with the photo, blue labels and darker values, tabs, the message list) v2.2 (2026-12-02, Joseph: the Users page) v2.1 (2026-12-02, Joseph: choose password, link and forgot password panes of the sign-in page) v2.0 (2026-12-02, Joseph: the authorized-use warning above the form) v1.9 (2026-12-02, Joseph: the user's initials and menu, the sign-out question, the idle warning) v1.8 (2026-12-02, Joseph: the sign-in page looks like the CirPax sign-in, last block) v1.7 (2026-11-25, Joseph: phone layout, one PHONE block; tablet and desktop unchanged) v1.6 (2026-11-25, Joseph: the Cirpax logo on the top bar and the sign-in page, copied from core) v1.5 (2026-11-25, Joseph: the Messages box as wide as the grid above it) v1.4 (2026-11-25, Joseph: "improve the visuals of the Cirpax Provider Portal to match the theme and the style of the Cirpax core
   with the Orbit Classic Light"). The values are COPIED from Cirpax core (orbit-classic-light.css, orbit-layout.css, grid-tools.css,
   screen-standards.css and the App Settings layout_font_*): the provider site never loads a core file (it may run on another server).
   Every colour and size is a variable in the :root block below, in one place; the rules under it only use the variables.
   v1.3 (2026-11-25: messages, attendance totals) v1.0 (2026-11-24, Cirpax provider site v1). */
:root{
  color-scheme:light;
  /* Orbit Classic Light colours (orbit-classic-light.css) */
  --page:#eef1f5;            /* the soft cool-gray page */
  --surface:#f8f9fb;         /* boxes */
  --inset:#fbfcfd;           /* fields */
  --raised:#e6ebf1;          /* grid heads, the button bar */
  --border:#c3ccd6;          /* fields, buttons */
  --line-strong:#b3becb;     /* box and grid outlines */
  --line:#d6dde5;            /* grid lines */
  --bar-edge:#d0d8e1;        /* the button bar's edge */
  --text:#2f3b48;
  --strong:#1b2530;
  --label:#115ea3;           /* v2.5: labels blue, as in the boxes of CirPax */
  --muted:#5b6876;
  --faint:#66727f;
  --accent:#0f6cbd;          /* Fluent / Outlook blue: the top bar, accents */
  --accent-ink:#115ea3;      /* box titles */
  --accent-edge:#0c5aa0;
  --hover:#e4edf7;           /* grid row under the mouse */
  --selected:#d6e5f6;
  --button:#ffffff;
  --button-hover:#eef3f9;
  --green:#237a45;--green-line:#9fcdb0;   /* Save */
  --red:#b4232f;--red-line:#e3a9af;       /* Delete / Decline */
  --blue:#0f6cbd;--blue-line:#a8c8ea;     /* Recall / secondary actions */
  --good:#286746;--good-bg:#e8f4ec;--good-border:#9ac9ab;
  --bad:#a03444;--bad-bg:#fce9eb;--bad-border:#e1acb4;
  --warm:#805917;--warm-bg:#fff4df;--warm-border:#d9b87b;
  --on-accent:#ffffff;--on-accent-soft:#ffffffd9;--on-accent-hover:#ffffff26;
  /* fonts (App Settings layout_font_*): Segoe UI */
  --font-family:'Segoe UI',Arial,sans-serif;
  --font-small:12px;--font-body:13px;--font-box-title:14px;--font-popup-title:15px;--font-screen-title:17px;--font-product:18px;--font-page-title:20px;
  /* sizes (screen standards) */
  --label-w:170px;--field-h:28px;--button-h:28px;--pager-h:26px;--grid-row-h:32px;--row-gap:4px;--box-gap:14px;
  --radius-field:4px;--radius-button:6px;--radius-grid:6px;--radius-box:8px;--header-h:46px;
  /* phones (v1.7): the one breakpoint is 700px (CSS cannot put a variable in a @media rule: it is written once, in the PHONE block) */
  --phone-tap-h:44px;          /* buttons and pager buttons on a phone (finger size) */
  --phone-field-h:40px;        /* fields on a phone */
  --phone-gutter:10px;         /* page sides on a phone */
  --phone-card-gap:8px;        /* between referral cards */
  /* one referral (v2.5) */
  --font-fact:14px;            /* labels and values of a record */
  --photo-w:132px;--photo-h:150px;--photo-w-phone:84px;--photo-h-phone:100px;
  --card-label-w:110px;
  --msgs-h:360px;              /* the message list scrolls inside this height */
  --brand-box:#ffffff1f;--brand-line:#ffffff40;--brand-sep:#ffffff59;--figure:#8ea2b6;--figure-top:#dbe4ee;--figure-bottom:#c4d1de;
  --top-bg:var(--accent);--top-edge:var(--accent-edge);--avatar-bg:#d9e7ec;--avatar-hover:#ffffff;--shadow:#1b354c33;--shadow-menu:#1b354c40;--backdrop:#1b25304d;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--page);color:var(--strong);font:var(--font-body)/1.45 var(--font-family)}

/* the top bar: Outlook blue, the product name */
header.top{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:14px;height:var(--header-h);padding:0 16px;background:var(--top-bg);
  border-bottom:1px solid var(--top-edge);color:var(--on-accent)}
header.top .brand{font-size:var(--font-product);font-weight:600;color:var(--on-accent);letter-spacing:.2px;white-space:nowrap}
header.top .avatar{margin-left:auto}
/* v2.5: the logo in its box, a thin line, the title; the bar keeps its height and width (Joseph) */
.brand-box{display:inline-flex;align-items:center;padding:3px 11px;border:1px solid var(--brand-line);border-radius:6px;background:var(--brand-box)}
.brand-title{margin-left:14px;padding:3px 0 3px 14px;border-left:1px solid var(--brand-sep);font-size:var(--font-body);font-weight:400;letter-spacing:1px;color:var(--on-accent-soft)}
header.top button{background:transparent;border-color:#ffffff73;color:var(--on-accent)}
header.top button:hover{background:var(--on-accent-hover);border-color:var(--on-accent);color:var(--on-accent)}

main{padding:var(--box-gap) 16px;max-width:1500px}
h1{font-size:var(--font-page-title);font-weight:400;margin:0 0 10px;color:var(--accent)}
h1.inbar{font-size:var(--font-screen-title);font-weight:400;margin:0;color:var(--accent)}
dialog h1{font-size:var(--font-popup-title);font-weight:600;color:var(--strong);margin:0 0 12px}

/* the sticky top button bar */
.bar{position:sticky;top:var(--header-h);z-index:4;display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-height:44px;padding:6px 12px;
  background:var(--raised);border:1px solid var(--bar-edge);border-radius:var(--radius-button);margin-bottom:var(--box-gap)}
.bar .spacer{flex:1}
.bar.plain{position:static;border:0;margin:0;padding:0;min-height:0;background:transparent}

/* buttons: white, gray edge, 6px corners; Save green, Delete red, Recall blue (core screen standards) */
button{height:var(--button-h);min-height:var(--button-h);padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;
  border:1px solid var(--border);border-radius:var(--radius-button);background:var(--button);color:var(--strong);font:400 var(--font-body) var(--font-family);
  line-height:1;cursor:pointer;transition:border-color .12s,color .12s}
button:hover:not(:disabled){border-color:var(--accent);color:var(--accent);background:var(--button-hover)}
button.primary{color:var(--green);border-color:var(--green-line);font-weight:600}
button.primary:hover:not(:disabled){color:var(--green);border-color:var(--green);background:var(--button-hover)}
button.danger{color:var(--red);border-color:var(--red-line)}
button.danger:hover:not(:disabled){color:var(--red);border-color:var(--red)}
button.blue{color:var(--blue);border-color:var(--blue-line)}
button.blue:hover:not(:disabled){color:var(--blue);border-color:var(--blue)}
button:disabled{opacity:.45;cursor:default}
button.link{border:0;background:none;color:var(--accent-ink);padding:0;height:auto;min-height:0;text-decoration:underline;font-weight:400}
button.link:hover{background:none;color:var(--accent)}

/* fields: 28px, 4px corners */
input,select,textarea{height:var(--field-h);padding:0 8px;border:1px solid var(--border);border-radius:var(--radius-field);background:var(--inset);color:var(--strong);
  font:var(--font-body) var(--font-family);min-width:0}
textarea{height:auto;min-height:64px;padding:6px 8px;resize:vertical}
input:focus,select:focus,textarea:focus,button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}

/* boxes: 1px outline, 8px corners, 14px apart, title in the accent ink */
fieldset.box{border:1px solid var(--line-strong);border-radius:var(--radius-box);background:color-mix(in srgb,var(--surface) 60%,transparent);
  padding:10px 18px 14px;margin:0 0 var(--box-gap);min-width:0}
fieldset.box legend{margin-left:-6px;padding:0 8px;color:var(--accent-ink);font-size:var(--font-box-title);font-weight:600}
.rows{display:grid;gap:var(--row-gap)}
.row{display:grid;grid-template-columns:var(--label-w) minmax(0,360px);column-gap:10px;align-items:center;min-height:var(--field-h)}
.row>label,.row>.label{color:var(--label);text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row>.value{color:var(--strong);overflow-wrap:anywhere;font-weight:600}
.row>.value .note{font-weight:400}
.row.wide{grid-template-columns:var(--label-w) minmax(0,1fr)}
.cols{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,560px),1fr));column-gap:var(--box-gap)}
.req::after{content:" *";color:var(--red)}
label.req{font-weight:600}
.error{color:var(--red);min-height:18px;margin:4px 0}
.error:empty{min-height:0;margin:0}
.note{color:var(--muted)}
.signin{max-width:620px;margin:60px auto}

/* grids: 32px rows, gray head, zebra rows, hover, 6px corners */
.tablewrap{overflow-x:auto;border:1px solid var(--line-strong);border-radius:var(--radius-grid);background:var(--surface)}
.grid{width:100%;border-collapse:collapse;background:var(--surface)}
.grid th{height:var(--grid-row-h);text-align:left;font-weight:600;color:var(--strong);background:var(--raised);padding:0 10px;white-space:nowrap;
  box-shadow:inset 0 -1px 0 var(--line-strong);border-right:1px solid var(--line)}
.grid td{height:var(--grid-row-h);padding:4px 10px;border-top:1px solid var(--line);border-right:1px solid var(--line);vertical-align:middle}
.grid :is(th,td):last-child{border-right:0}
.grid tbody tr:first-child td{border-top:0}
.grid tbody tr:nth-child(even) td{background:color-mix(in srgb,var(--surface) 70%,var(--raised))}
.grid tbody tr[data-ref]{cursor:pointer}
.grid tbody tr[data-ref]:hover td,.grid tbody tr[data-ref]:focus td{background:var(--hover)}

/* the pager: First / Previous / Next / Last, 26px, small text */
.pager{display:flex;align-items:center;gap:6px;justify-content:flex-end;margin:6px 0 2px;color:var(--muted);font-size:var(--font-small)}
.pager span{padding:0 6px;white-space:nowrap}
.pager button{height:var(--pager-h);min-height:var(--pager-h);padding:0 10px;font-size:var(--font-small)}

/* status pills */
.pill{display:inline-block;padding:1px 8px;border-radius:10px;border:1px solid var(--border);font-size:var(--font-small);line-height:1.5;white-space:nowrap}
.pill.New{color:var(--warm);background:var(--warm-bg);border-color:var(--warm-border)}
.pill.Accepted,.pill.Enrolled{color:var(--good);background:var(--good-bg);border-color:var(--good-border)}
.pill.Declined{color:var(--bad);background:var(--bad-bg);border-color:var(--bad-border)}
.pill.Closed{color:var(--muted);background:var(--raised);border-color:var(--border)}

/* pop-ups */
dialog{border:1px solid var(--line-strong);border-radius:var(--radius-box);background:var(--surface);color:var(--strong);padding:16px 18px;max-width:640px;width:calc(100% - 32px);
  box-shadow:0 8px 28px var(--shadow)}
dialog::backdrop{background:var(--backdrop)}
dialog .bar.plain{margin-top:6px}

.hidden{display:none!important}
/* phones: see the one PHONE block at the end of this file */

/* one referral (v2.5): the client card, the tabs, the messages */
.card{display:grid;grid-template-columns:var(--photo-w) minmax(0,1fr) minmax(0,1fr);gap:6px 22px;align-items:start;padding:16px 18px;margin:0 0 var(--box-gap);border:1px solid var(--line-strong);border-radius:var(--radius-box);background:var(--surface)}
.photo{width:var(--photo-w);height:var(--photo-h);display:grid;place-items:end center;overflow:hidden;border:1px solid var(--line-strong);border-radius:var(--radius-box);background:linear-gradient(var(--figure-top),var(--figure-bottom))}
.photo img{width:100%;height:100%;object-fit:cover;object-position:50% 20%}
.photo svg{width:79%;fill:var(--figure);display:block}
:is(.card,.panel) .row{font-size:var(--font-fact)}
.card .row{--label-w:var(--card-label-w);grid-template-columns:var(--label-w) minmax(0,1fr);column-gap:12px;min-height:29px}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line-strong);overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.tabs button{flex:none;height:40px;min-height:40px;padding:0 16px;border:0;border-bottom:3px solid transparent;border-radius:0;background:none;color:var(--text);font-size:var(--font-fact)}
.tabs button:hover:not(:disabled){border-color:var(--line-strong);background:none}
.tabs button[aria-selected=true],.tabs button[aria-selected=true]:hover{border-color:var(--accent);color:var(--accent);font-weight:600}
.tabs button:focus-visible{outline-offset:-3px}
.tabs em{font-style:normal;font-weight:400;font-size:11px;line-height:1.6;padding:0 7px;border-radius:10px;background:var(--raised);color:var(--text)}
.panel{margin-top:var(--box-gap);padding:14px 18px;border:1px solid var(--line-strong);border-radius:var(--radius-box);background:var(--surface);outline:0}
#pane-info{padding:0;border:0;background:none}
#pane-info .cols{display:block;columns:2 440px;column-gap:var(--box-gap)}
#pane-info .cols .box{break-inside:avoid}
#pane-info .cols+.box{margin-top:var(--box-gap)}
#pane-info .row{--label-w:150px;grid-template-columns:var(--label-w) minmax(0,1fr);min-height:27px}
.longtext{font-size:var(--font-fact);white-space:pre-wrap;overflow-wrap:anywhere;max-width:100ch}
.row.wide>.value{font-weight:400;white-space:pre-wrap}
.hist .row{grid-template-columns:140px minmax(0,1fr);border-bottom:1px solid var(--line)}
.hist .row:last-child{border-bottom:0}
.bar.plain.more{margin-top:12px}
.msgform{display:grid;gap:6px}                       /* v1.5: as wide as the grids above (Joseph) */
.msgform textarea{width:100%;font-size:var(--font-fact)}
.msgs{display:grid;gap:8px;align-content:start;margin-top:12px;padding:12px 6px 2px 0;border-top:1px solid var(--line);max-height:var(--msgs-h);overflow-y:auto;overscroll-behavior:contain}
.msg{justify-self:start;max-width:68%;border:1px solid var(--line);border-radius:10px;padding:7px 12px;background:var(--button)}
.msg.mine{justify-self:end;background:var(--selected);border-color:var(--blue-line)}
.msg .meta{color:var(--muted);font-size:var(--font-small)}
.msg .text{color:var(--strong);font-size:var(--font-fact);white-space:pre-wrap;overflow-wrap:anywhere}
.totals{display:flex;flex-wrap:wrap;gap:6px 18px;margin:0 0 8px;color:var(--strong)}
.totals b{font-weight:600}
/* v1.6 the Cirpax mark (the same drawing as core's top bar and sign-in: ring in the text colour, teal dots), as core sizes it (.95em) */
.cirpax-mark{width:.95em;height:.95em;vertical-align:-.13em;margin-right:7px;flex:none}
header.top .brand{display:inline-flex;align-items:center}
.signin-brand{display:flex;align-items:center;font-size:var(--font-product);font-weight:600;color:var(--accent);margin:0 0 18px}
.signin-brand .cirpax-mark{width:1.6em;height:1.6em;vertical-align:middle;margin-right:10px}

/* the user's initials, their card and the two small windows (v1.9; sizes and layout of core's user menu) */
header.top .avatar{flex:none;width:32px;height:32px;min-height:32px;padding:0;border:0;border-radius:50%;background:var(--avatar-bg);color:var(--accent-edge);font-size:12px;font-weight:600}
header.top .avatar:hover{background:var(--avatar-hover);color:var(--accent-edge)}
header.top .avatar:focus-visible{outline:2px solid var(--on-accent);outline-offset:2px}
#userMenu{inset:calc(var(--header-h) + 5px) 16px auto auto;margin:0;width:300px;max-width:calc(100vw - 20px);padding:0;border:1px solid var(--line-strong);border-radius:9px;
  background:var(--surface);color:var(--text);box-shadow:0 12px 40px var(--shadow-menu)}
.um-head{display:flex;gap:12px;align-items:center;padding:16px;border-bottom:1px solid var(--line)}
.um-initials{flex:none;width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--accent);border-radius:50%;background:var(--selected);color:var(--accent);font-weight:600}
.um-head strong{display:block;font-size:14px;color:var(--strong);overflow-wrap:anywhere}
.um-head small{display:block;font-size:12px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
.um-items{padding:7px}
.um-items button{width:100%;height:40px;justify-content:flex-start;border-color:transparent;background:transparent;padding:0 12px}
.um-items button:hover:not(:disabled){border-color:transparent;background:var(--selected);color:var(--strong)}
.um-items button:is(.um-out,.danger),.um-items button:is(.um-out,.danger):hover:not(:disabled){color:var(--red)}
.um-items #orgOpen:not(.hidden)+.um-out{margin-top:6px;border-radius:0;border-top-color:var(--line)}
#outDlg,#idleDlg{max-width:430px}
/* Organization Info (v2.3): the code large, then label and value */
#orgDlg{max-width:520px}
.org-code{display:grid;gap:2px;padding:10px 14px;margin:0 0 12px;border:1px solid var(--blue-line);border-radius:var(--radius-box);background:var(--selected)}
.org-code span{color:var(--label)}
.org-code strong{min-height:36px;font-size:28px;line-height:36px;font-weight:600;color:var(--accent-ink);overflow-wrap:anywhere}
#orgRows .row{--label-w:120px}
#orgRows .none{color:var(--muted)}
#orgNote{margin:12px 0 4px}
#outDlg p,#idleDlg p{margin:0 0 10px}
.idle-count{font-variant-numeric:tabular-nums}

/* Users (v2.2): the list, and one line per action in a user's window */
.users-text{margin:0 0 10px}
.done{margin:0 0 10px;padding:8px 12px;border:1px solid var(--good-border);border-radius:var(--radius-button);background:var(--good-bg);color:var(--good)}
.grid tbody tr[data-user]{cursor:pointer}
.grid tbody tr[data-user]:hover td,.grid tbody tr[data-user]:focus td{background:var(--hover)}
.pill.Active{color:var(--good);background:var(--good-bg);border-color:var(--good-border)}
.pill.Invited,.pill.EmailComing,.pill.LinkExpired{color:var(--warm);background:var(--warm-bg);border-color:var(--warm-border)}
.pill.Locked,.pill.Disabled{color:var(--bad);background:var(--bad-bg);border-color:var(--bad-border)}
.acts{display:grid;gap:8px;margin:12px 0 4px}
.act{display:grid;grid-template-columns:170px minmax(0,1fr);gap:12px;align-items:center}
.act span{color:var(--muted)}
#askDlg{max-width:460px}
#askDlg p{margin:0 0 10px}

/* the menu Actions of a referral (v2.6): the look of the user menu, under its button (provider.js sets top and left) */
#actMenu{position:fixed;inset:auto;margin:0;width:220px;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface);color:var(--text);box-shadow:0 12px 40px var(--shadow-menu)}
#actMenu .danger{margin-top:6px;border-radius:0;border-top-color:var(--line)}
.chev{width:10px;height:7px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* reports (v2.4): the reason of the greyed buttons, a report under its history line */
.acts-why{margin:0 0 var(--box-gap)}
.acts-why:empty{display:none}
.hist-more{display:block;color:var(--text);white-space:pre-line;font-weight:400}
.row:has(.hist-more){align-items:start;padding:4px 0}
#attList .grid td:first-child{white-space:nowrap}
#progTotals{margin:0}

/* ==== PHONE (v1.7, Joseph "yes" 3:37 PM): screens up to 700px wide. Tablet and desktop are not touched. ==== */
@media (max-width:700px){
  main{padding:var(--phone-card-gap) var(--phone-gutter)}
  /* top bar: logo + name, the initials on the right (v1.9); it scrolls away, the button bar stays */
  header.top{position:static;height:auto;padding:6px var(--phone-gutter)}
  header.top .avatar{width:40px;height:40px;min-height:40px}
  .brand{min-width:0}
  .brand-title{margin-left:10px;padding-left:10px;font-size:11px;letter-spacing:.3px;line-height:1.25;white-space:normal}
  #userMenu{top:54px;right:var(--phone-gutter)}
  /* the sticky button bar: one line at the top of the screen; what does not fit scrolls sideways inside the bar */
  .bar{top:0;flex-wrap:nowrap;overflow-x:auto;gap:6px;padding:6px 8px;min-height:0;border-radius:0;margin-left:calc(-1 * var(--phone-gutter));margin-right:calc(-1 * var(--phone-gutter))}
  .bar>*{flex:none}
  .bar h1.inbar{flex:none;max-width:45vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .bar .spacer{flex:1 0 4px}
  .bar input[type=search]{flex:1 1 120px;min-width:100px}
  .bar.plain{overflow:visible;flex-wrap:wrap;margin:0}
  /* a referral: on a phone all buttons are in view, two in a row, and scroll away with the page (v2.4) */
  #detailView>.bar{position:static;display:grid;grid-template-columns:1fr 1fr;overflow:visible}
  #detailView>.bar h1.inbar{max-width:none;align-self:center}
  #detailView>.bar .spacer{display:none}
  /* finger-size buttons and fields */
  button{height:var(--phone-tap-h);min-height:var(--phone-tap-h)}
  .pager button{height:var(--phone-tap-h);min-height:var(--phone-tap-h);padding:0 12px}
  button.link{height:auto;min-height:0}
  input,select{height:var(--phone-field-h)}
  /* labels above their fields, everywhere (also the wide rows: Note, Information) */
  .row,.row.wide{grid-template-columns:1fr;row-gap:2px}
  .row>label,.row>.label{text-align:left;white-space:normal}
  .signin{margin:24px auto}
  /* pop-ups: the whole width, labels above fields, Save / Cancel always on screen at the bottom */
  dialog{width:100%;max-width:none;max-height:calc(100dvh - 16px);margin:auto 0 8px;padding:12px var(--phone-gutter) 0;border-radius:var(--radius-box) var(--radius-box) 0 0;overflow-y:auto}
  dialog textarea{width:100%}
  dialog .bar.plain{position:sticky;bottom:0;margin:8px calc(-1 * var(--phone-gutter)) 0;padding:8px var(--phone-gutter);background:var(--surface);border-top:1px solid var(--line);flex-wrap:nowrap}
  dialog .bar.plain button{flex:1 1 0}
  /* Referrals list: one card per referral (name, status, program, dates, officer) instead of a sideways grid */
  :is(#listView,#usersView) .tablewrap{border:0;background:transparent;overflow:visible}
  :is(#listView,#usersView) .grid,:is(#listView,#usersView) .grid tbody,:is(#listView,#usersView) .grid tr,:is(#listView,#usersView) .grid td{display:block;width:auto}
  :is(#listView,#usersView) .grid{background:transparent}
  :is(#listView,#usersView) .grid thead{display:none}
  :is(#listView,#usersView) .grid tbody tr{position:relative;margin:0 0 var(--phone-card-gap);padding:8px 12px;border:1px solid var(--line-strong);border-radius:var(--radius-box);background:var(--surface)}
  :is(#listView,#usersView) .grid tbody tr:nth-child(even) td,:is(#listView,#usersView) .grid tbody tr td{background:transparent}
  :is(#listView,#usersView) .grid tbody tr[tabindex]:hover,:is(#listView,#usersView) .grid tbody tr[tabindex]:focus{background:var(--hover)}
  :is(#listView,#usersView) .grid td{height:auto;padding:1px 0;border:0;color:var(--text)}
  :is(#listView,#usersView) .grid td[data-label]::before{content:attr(data-label) ": ";color:var(--muted)}
  :is(#listView,#usersView) .grid td.card-title{font-size:var(--font-box-title);padding-right:96px}
  :is(#listView,#usersView) .grid td.card-title::before,:is(#listView,#usersView) .grid td.card-status::before{content:none}
  :is(#listView,#usersView) .grid td.card-status{position:absolute;top:8px;right:12px}
  :is(#listView,#usersView) .grid td[colspan]{padding:8px 0}
  #usersOpen{display:none}
  .act{grid-template-columns:1fr;gap:2px}
  #userRows td{overflow-wrap:anywhere}
  /* one referral (v2.5): photo and name side by side, the rest below; the tabs scroll sideways */
  .card{grid-template-columns:var(--photo-w-phone) minmax(0,1fr);gap:2px 12px;padding:12px}
  .photo{width:var(--photo-w-phone);height:var(--photo-h-phone)}
  .card .row{grid-template-columns:var(--label-w) minmax(0,1fr);min-height:26px}
  .card .row>.label{text-align:right}
  .card .facts:nth-child(2) .row{--label-w:56px}
  .card .facts:last-child{grid-column:1/-1}
  .card .facts:last-child .row{--label-w:84px}
  .tabs button{height:var(--phone-tap-h);min-height:var(--phone-tap-h);padding:0 10px}
  .panel{padding:12px;margin-top:var(--phone-gutter)}
  #pane-info .cols+.box{margin-top:0}
  #pane-info .row{--label-w:116px;min-height:26px}
  #pane-info .row>.label{text-align:right}
  .hist .row{grid-template-columns:92px minmax(0,1fr);padding:6px 0}
  .hist .row>.label{font-size:var(--font-small)}
  .msg{max-width:88%}
  .msgform .bar.plain{flex-wrap:wrap}
  /* the other grids (Attendance) keep their columns and scroll inside their frame */
  .tablewrap{-webkit-overflow-scrolling:touch}
}

/* ==== SIGN-IN PAGE (v1.8, Joseph 2026-12-02): the look of the core sign-in (values copied from core login.css). Every rule starts with .login or
   needs the sign-in page to be on screen, so no other page changes. ==== */
:root{
  --login-dark:#07131e;--login-dark-2:#0a1d30;--login-glow:#123f59;--login-ink:#edf9ff;--login-line:#61d5eb40;--login-line-2:#70dbeb80;
  --login-text:#163047;--login-muted:#5f7688;--login-link:#267495;--login-field:#c6d6e1;--login-go-a:#175c86;--login-go-b:#167c99;
  --login-panel-a:#fff;--login-panel-b:#f1f6fa;--login-input:#fff;--login-input-ink:#193a52;--login-readonly:#eef3f7;--login-card:#fff;--login-card-edge:#cfdde7;--login-line-3:#d7e3ec;
  --login-done-bg:#eef8f2;--login-done-edge:#a9d3bd;--login-done-ink:#17593a;
}
body:has(#signInView:not(.hidden)) header.top{display:none}
body:has(#signInView:not(.hidden)) main{max-width:none;padding:0}
.login{min-height:100vh;display:grid;grid-template-columns:1.08fr 1fr;color:var(--login-text)}
.login-story{position:relative;overflow:hidden;display:flex;flex-direction:column;padding:38px 48px;color:var(--login-ink);
  background:radial-gradient(ellipse at 50% 46%,var(--login-glow) 0,transparent 60%),linear-gradient(140deg,var(--login-dark-2),var(--login-dark))}
.login-story::before{content:"";position:absolute;inset:0;pointer-events:none;background-size:44px 44px;
  background-image:linear-gradient(#60cee207 1px,transparent 1px),linear-gradient(90deg,#60cee207 1px,transparent 1px)}
.login-brand{position:relative;display:flex;align-items:center;gap:13px;font-size:20px;font-weight:500;letter-spacing:-.4px}
.login-mark{display:inline-flex;align-items:center;border:1px solid #5db5cf;background:#123d52;border-radius:7px;padding:5px 10px;font-size:27px;font-weight:600;letter-spacing:-1px;color:#a8eff4}
.login-mark .cirpax-mark{width:.85em;height:.85em;margin-right:8px}
.login-agency{position:relative;margin:auto;max-width:560px;text-align:center;padding:24px 0}
.login-orbits{position:relative;width:340px;height:340px;margin:0 auto 26px}
.login-orbits .orbit{position:absolute;left:50%;top:50%;border:1px solid var(--login-line);border-radius:50%;transform:translate(-50%,-50%)}
.login-orbits .one{width:252px;height:252px;border-style:dashed;animation:loginSpin 65s linear infinite}
.login-orbits .two{width:336px;height:336px;border-color:var(--login-line-2);transform:translate(-50%,-50%) rotateX(58deg) rotate(-25deg)}
.login-orbits .three{width:336px;height:336px;border-color:var(--login-line-2);transform:translate(-50%,-50%) rotateY(58deg) rotate(25deg)}
.login-seal{position:absolute;left:50%;top:50%;width:176px;height:176px;transform:translate(-50%,-50%);display:grid;place-items:center;border-radius:50%;overflow:hidden;
  border:1px solid #77dce9;background:#11364b;color:#b1f5f5;box-shadow:0 0 70px #48cbe62b}
.login-seal .cirpax-mark{width:84px;height:84px;margin:0}
.login-seal.has-logo{background:#fff}
.login-seal.has-logo .cirpax-mark{display:none}
.login-seal img{max-width:128px;max-height:128px}
.login-agency h1{margin:0;font-size:clamp(28px,2.9vw,44px);line-height:1.18;font-weight:500;letter-spacing:-1.2px;color:var(--login-ink);text-wrap:balance}
.login-panel{display:flex;padding:34px 42px;background:radial-gradient(ellipse at 50% 40%,var(--login-panel-a),var(--login-panel-b))}
.login-form{width:100%;max-width:365px;margin:auto}
.login-form h2{margin:0 0 28px;font-size:33px;line-height:1.2;font-weight:600;letter-spacing:-1px;color:var(--login-text)}
.login-where{display:none}
.login-form label{display:block;margin:0 0 9px;font-size:12px;font-weight:600;color:var(--login-text)}
.login-form input{width:100%;height:46px;padding:0 13px;border:1px solid var(--login-field);border-radius:6px;background:var(--login-input);color:var(--login-input-ink);font-size:14px}
.login-form input:focus,.login button:focus-visible{outline:3px solid #2f9ed0;outline-offset:2px}
.login-pair{display:flex;align-items:baseline;justify-content:space-between;margin-top:22px}
button.login-link{height:auto;min-height:0;padding:4px 0;border:0;background:none;color:var(--login-link);font-size:12px}
button.login-link:hover:not(:disabled){background:none;color:var(--login-link);text-decoration:underline}
.login-form .error{margin:10px 0 0;font-size:13px}
button.login-go{width:100%;height:48px;margin-top:21px;padding:0 18px;justify-content:space-between;border:1px solid #18688e;background:linear-gradient(100deg,var(--login-go-a),var(--login-go-b));
  color:#fff;font-size:14px;font-weight:600;box-shadow:0 4px 15px #1d739522}
button.login-go:hover:not(:disabled){border-color:#18688e;background:linear-gradient(100deg,var(--login-go-a),var(--login-go-b));color:#fff;filter:brightness(1.12)}
.login-note{margin:22px 0 0;font-size:12px;line-height:1.6;color:var(--login-muted)}
.login-form .login-gap{margin-top:20px}
.login-form input[readonly]{background:var(--login-readonly);color:var(--login-muted)}
.login-hint{margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--login-muted)}
.login-text{margin:0 0 20px;font-size:14px;line-height:1.6;color:var(--login-text)}
.login-done{margin:0 0 24px;padding:12px 14px;border:1px solid var(--login-done-edge);border-radius:6px;background:var(--login-done-bg);font-size:13px;line-height:1.6;color:var(--login-done-ink)}
button.login-back{display:block;margin:18px 0 0}
.login-warning{margin:0 0 30px;padding:12px 14px;border:1px solid var(--login-card-edge);border-radius:6px;background:var(--login-card);font-size:12px;line-height:1.6;color:var(--login-text)}
@keyframes loginSpin{to{transform:translate(-50%,-50%) rotate(360deg)}}
@media (max-height:640px){.login-orbits{width:250px;height:250px;margin-bottom:16px}.login-orbits .one{width:186px;height:186px}.login-orbits .two,.login-orbits .three{width:246px;height:246px}
  .login-seal{width:132px;height:132px}.login-seal img{max-width:96px;max-height:96px}.login-seal .cirpax-mark{width:64px;height:64px}}
@media (max-width:700px){   /* phones: the dark band keeps the product name; the county's logo and name sit over the form */
  .login{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .login-story{padding:16px 22px}
  .login-agency{display:none}
  .login-brand{font-size:17px}
  .login-mark{font-size:22px}
  .login-panel{padding:26px 22px}
  .login-form{margin:0 auto}
  .login-where{display:flex;align-items:center;gap:14px;margin:0 0 26px;padding:0 0 20px;border-bottom:1px solid var(--login-line-3)}
  .login-where img{width:64px;height:64px;object-fit:contain;flex:none;mix-blend-mode:multiply}   /* a logo saved on white blends into the page */
  .login-where strong{font-size:19px;line-height:1.25;font-weight:600}
  .login-form input{font-size:16px}          /* 16px: a phone does not zoom into the field */
  button.login-link{min-height:32px}
  button.login-go{height:48px;min-height:48px}
}
@media (prefers-reduced-motion:reduce){.login-orbits .one{animation:none}}

/* ==== DARK THEME (v2.7, Joseph 2026-12-02): the button in the top bar and on the sign-in page (theme.js) sets data-theme. Only the colours change. The values
   are COPIED from the dark theme of CirPax, Orbit Classic (orbit-classic.css); the right half of the sign-in page has its own, to go with the dark left half. ==== */
:root[data-theme=dark]{
  color-scheme:dark;
  --page:#08090b;--surface:#0d0e11;--inset:#0a0b0d;--raised:#1a1c20;--border:#37393e;--line-strong:#45474d;--line:#303238;--bar-edge:#303238;
  --text:#d8d9d5;--strong:#f0f0ec;--label:#b7bac2;--muted:#9c9da2;--faint:#8b8c91;
  --accent:#d9b68d;--accent-ink:#e4c7a3;--accent-edge:#e4c7a3;--hover:#15191e;--selected:#232a31;--button:#111317;--button-hover:#1a1d22;
  --green:#8fd19e;--green-line:#2f5238;--red:#ef8f8f;--red-line:#5a3134;--blue:#8fc1f0;--blue-line:#2c4766;
  --good:#9ed0b2;--good-bg:#13271e;--good-border:#3e6f50;--bad:#e7a4ab;--bad-bg:#2f181b;--bad-border:#77464c;--warm:#e6c995;--warm-bg:#282116;--warm-border:#75613c;
  --top-bg:#08090b;--top-edge:#37393e;--on-accent:#f0f0ec;--on-accent-soft:#d8d9d5;--avatar-bg:#232a31;--avatar-hover:#2f3841;
  --figure:#7d828a;--figure-top:#232a31;--figure-bottom:#1a1c20;
  --shadow:#00000099;--shadow-menu:#000000b3;--backdrop:#000000a6;
  --login-text:#e8ecef;--login-muted:#a3b0ba;--login-link:#7cc3df;--login-field:#3d4a54;--login-panel-a:#12171c;--login-panel-b:#0b0e11;
  --login-input:#0a0c0f;--login-input-ink:#f0f0ec;--login-readonly:#171c21;--login-card:#12171c;--login-card-edge:#34414b;--login-line-3:#2b353d;
  --login-done-bg:#13271e;--login-done-edge:#3e6f50;--login-done-ink:#9ed0b2;
}
:root[data-theme=dark] button:disabled{opacity:.6}   /* greyed, but the red and green words stay readable on black */
/* the button: the moon goes to dark, the sun goes back */
header.top .theme-btn{margin-left:auto;flex:none}
header.top .theme-btn+.avatar{margin-left:0}
.theme-btn{width:32px;height:32px;min-height:32px;padding:0;border-radius:50%}
.theme-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
:root:not([data-theme=dark]) .theme-btn .sun,:root[data-theme=dark] .theme-btn .moon{display:none}
header.top .theme-btn:focus-visible{outline:2px solid var(--on-accent);outline-offset:2px}
.login{position:relative}
.login>.theme-btn{position:absolute;top:18px;right:22px;z-index:1;background:transparent;border-color:var(--login-field);color:var(--login-muted)}
.login>.theme-btn:hover:not(:disabled){background:transparent;border-color:var(--login-link);color:var(--login-link)}
@media (max-width:700px){
  .theme-btn{width:40px;height:40px;min-height:40px}
  header.top{gap:8px}
  .login>.theme-btn{top:12px;right:16px;border-color:var(--login-line-2);color:var(--login-ink)}   /* on the dark band */
  .login>.theme-btn:hover:not(:disabled){border-color:var(--login-ink);color:var(--login-ink)}
  :root[data-theme=dark] .login-where img{mix-blend-mode:normal;background:#fff;border-radius:8px;padding:3px}
}

/* ==== 2026-12-04 (Joseph "go"): the sign-in pane as the core sign-in (login.css v1.5): warning on top, "Welcome back.", one line, Show in the password box */
.login-form{max-width:420px}
.login-warning{margin:0 0 18px;padding:10px 14px;line-height:1.5}
#signInPane h2{margin:0 0 4px;font-size:27px}
.login-intro{margin:0 0 18px;font-size:13px;line-height:1.5;color:var(--login-muted)}
#signInPane label{margin-bottom:6px}
#signInPane .login-pair{margin-top:14px}
#signInPane .login-go{margin-top:16px}
#signInPane input{font-family:inherit}#signInPane input::placeholder{color:#93a3b0;opacity:1}
.login-pass{position:relative}
.login-form .login-pass input{padding-right:63px}
.login-pass input::-ms-reveal{display:none}
button.login-show{position:absolute;right:7px;top:50%;transform:translateY(-50%);padding:4px 8px}
@media (min-width:701px){#signInPane input{height:42px}#signInPane .login-go{height:44px;min-height:44px}}
