/* ===== shell.css part 1 — was ui/index.html inline <style> at line 31 ===== */
    :root {
      --navy: #0a0f1e;
      --navy2: #0f172a;
      --navy3: #1e293b;
      --blue: #3b82f6;
      --blue-soft: rgba(59,130,246,0.12);
      --green: #22c55e;
      --orange: #f97316;
      --red: #ef4444;
      --amber: #f59e0b;
      --bg1: #f7f9fc;
      --bg2: #eef2f8;
      --card2: #ffffff;
      --border: #e2e8f0;
      --text: #0f172a;
      --faint: #94a3b8;
      --btn: #0f172a;
      --btn2: #1e293b;
      --accent: #334155;
      --accent2: #1f2937;
      --accentSoft: rgba(51, 65, 85, 0.12);
      --shadow: none;
      --radius2: 12px;
      --maxw: 1040px;
      --font: "IBM Plex Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    html,
    body {
      height: 100%;
      font-family: "IBM Plex Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    body {
      margin: 0;
      color: var(--text);
      background: var(--bg);
    }

    /* Top-of-page progress bar — shown during Cognito redirects + token exchange so
       users get visible feedback that something is happening on slow networks. */
    .globalProgressBar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      width: 0%;
      z-index: 99999;
      background: linear-gradient(to right, #3b82f6, #60a5fa, #93c5fd);
      box-shadow: 0 0 8px rgba(59, 130, 246, 0.55);
      opacity: 0;
      pointer-events: none;
      transition: width 0.3s ease, opacity 0.2s ease;
    }
    .globalProgressBar.active { opacity: 1; }

    .topbar {
      min-height: 60px;
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      background: var(--navy);
      border-bottom: none;
      box-shadow: none;
      padding: 0 28px;
      gap: 12px;
      position: sticky;
      top: 0;
      z-index: 20;
    }

    .navLeft {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    /* Topbar logo */
    .topbarLogo {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .topbarLogoMark {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      overflow: hidden;
      background: #000;
    }
    .topbarLogoMark img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }
    .topbarLogoText {
      display: flex;
      flex-direction: column;
      line-height: 1.1;
    }
    /* GeoCrest, by DGMTS (2026-10-24; board GeoCrest): the wordmark is Plus Jakarta Sans
       ExtraBold, "Geo" in #8fb4e6 on the navy bar; "by DGMTS" stays in the page's own type. */
    .topbarLogoName {
      font-family: "Plus Jakarta Sans", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
      font-size: 15px;
      font-weight: 800;
      color: #fff;
      letter-spacing: -0.2px;
    }
    .topbarLogoName .geoCrestNameGeo { color: #8fb4e6; }
    .topbarLogoSub {
      font-size: 11.5px;
      color: rgba(191,219,254,0.95);
      letter-spacing: 0;
      font-weight: 500;
    }

    /* Topbar center nav tabs */
    /* Topbar user info (right side) */
    .topbarUserInfo {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .topbarUserInfo.hidden { display: none !important; }
    .topbarPill {
      padding: 5px 13px;
      border-radius: 99px;
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
      letter-spacing: 0.1px;
    }
    .topbarPillOk {
      background: rgba(34,197,94,0.2);
      color: #4ade80;
    }
    .topbarPillRole {
      background: rgba(59,130,246,0.2);
      color: #93c5fd;
    }
    .topbarAvatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--blue);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 600;
      color: #fff;
      flex-shrink: 0;
    }

    @media (max-width: 700px) {
      /* The name on a phone (fresh check, 2026-10-05): the name stays, as in the
         Supervisor's bar; only "by DGMTS" goes. */
      .topbarLogoSub { display: none; }
      .topbarPill { display: none; }
    }

    .navTitleWrap {
      text-align: center;
      justify-self: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }
    .mainNav {
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 12px 14px;
    }

    .mainNav button {
      width: 100%;
      text-align: left;
      border: none;
      background: transparent;
      color: rgba(255,255,255,0.92);
      padding: 11px 14px;
      border-radius: 10px;
      font-size: 15px;
      cursor: pointer;
      font-weight: 600;
      transition: all 0.15s ease;
      display: flex;
      align-items: center;
      gap: 12px;
      letter-spacing: 0.1px;
    }
    .mainNav button .sdot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: currentColor;
      opacity: 0.4;
      flex-shrink: 0;
    }
    .mainNav button.active .sdot {
      opacity: 1;
      background: #3b82f6;
    }

    .mainNav button:hover {
      background: rgba(255,255,255,0.08);
      color: #fff;
      transform: none;
    }

    .mainNav button:active {
      transform: none;
    }

    .mainNav button.active {
      background: rgba(59,130,246,0.2);
      border-color: transparent;
      color: #fff;
      box-shadow: 0 0 0 1px rgba(59,130,246,0.35) inset;
      font-weight: 600;
    }



    .navRight {
      display: flex;
      align-items: center;
      gap: 8px;
      justify-self: end;
    }

    .profileMenu {
      position: relative;
    }

    .profileButton {
      border: none;
      background: transparent;
      color: rgba(255,255,255,0.6);
      padding: 0;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      box-shadow: none !important;
    }

    .profileButton:hover {
      background: transparent;
      color: #fff;
    }

    .topbarRoleLabel {
      font-size: 13px;
      font-weight: 500;
      color: rgba(255,255,255,0.85);
    }

    .profileDropdown {
      position: absolute;
      right: 0;
      top: calc(100% + 6px);
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px;
      min-width: 220px;
      box-shadow: var(--shadow);
      z-index: 10;
      color: var(--text);
    }

    .profileRow {
      font-size: 12px;
      color: var(--text);
      margin-bottom: 6px;
      overflow-wrap: anywhere;
    }

    .wrap {
      max-width: var(--maxw);
      margin: 38px auto 60px;
      padding: 0 16px;
    }

    /* Full-width pages: remove max-width constraint. (Was a nine-member list:
       the other pages in it were deleted 2026-08-16, and the body.pageIs*
       classes were never set by any JS — CSS waiting for code that never
       came. Purged 2026-08-18.) */
    .wrap:has(> #pageMyTasks) {
      max-width: none;
      margin: 0;
      padding: 0;
    }

    /* ⚠️ THESE PAGES USED TO DEFAULT TO `opacity: 0` AND FADE IN. That is a
       FAIL-INVISIBLE default, and it produced a blank screen with the nav
       still highlighted and nothing in the console — Talha hit it clicking
       "The lab".
       Two separate mechanisms had to cooperate for a page to become visible:
       a requestAnimationFrame callback, and then a CSS transition. NEITHER
       runs while the tab is not painting (backgrounded, bfcache restore,
       mid-switch), so the page stayed at opacity 0 indefinitely. Measured on
       the live page: `.isVisible` present, specificity correct, computed
       opacity still 0 four hundred milliseconds later.
       A 200ms entrance fade is not worth a class of bug where the whole app
       renders blank. Pages are now visible by default and the entrance
       animation is gone; `.isVisible` is kept because setActivePage and a few
       other rules still toggle it, but nothing depends on it to be SEEN.
       If an entrance animation ever comes back, it must degrade to visible —
       never to invisible. */
    #pageSettings {
      opacity: 1;
    }


    #pageSettings.isVisible {
      opacity: 1;
      transform: translateY(0);
    }

    .appShell {
      display: block;
      min-height: calc(100vh - 64px);
    }

    /* My Tasks (technician landing) */
    .mtPage {
      width: 100%;
      padding: 28px 32px 36px;
      box-sizing: border-box;
      background: #f1f5f9;
      min-height: calc(100vh - var(--topbarH, 64px));
      display: flex;
      flex-direction: column;
      gap: 18px;
      color: #0f172a;
    }
    @media (max-width: 900px) {
      .mtPage { padding: 18px 14px 28px; }
    }
    .mtHeader { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
    .mtTitle { font-size: 24px; font-weight: 700; color: #0f172a; letter-spacing: -0.3px; }
    .mtSub { font-size: 13px; color: #64748b; margin-top: 4px; }




    .sideNav {
      background: var(--navy);
      border-right: none;
      box-shadow: none;
      min-height: calc(100vh - 60px);
      position: fixed;
      top: 60px;
      left: 0;
      width: 220px;
      transform: translateX(0);
      transition: transform 0.2s ease;
      z-index: 30;
    }


    /* Friendly portal-load error card (replaces the stretched .statusBox).
       Use !important on the centering margin because the markup ships with an
       inline `margin: 14px 16px` (left over from the .statusBox era) that we
       can't easily strip from every render path. */
    .portalErrorCard {
      max-width: 460px;
      margin: 80px auto !important;
      padding: 36px 40px;
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 16px;
      box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
      text-align: center;
    }
    .portalErrorIcon {
      width: 56px;
      height: 56px;
      margin: 0 auto 18px;
      border-radius: 50%;
      background: #fef3c7;
      color: #b45309;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      font-weight: 600;
    }
    .portalErrorTitle {
      font-size: 18px;
      font-weight: 600;
      color: #0f172a;
      margin-bottom: 8px;
      letter-spacing: -0.2px;
    }
    .portalErrorBody {
      font-size: 14px;
      color: #64748b;
      line-height: 1.55;
      margin-bottom: 22px;
    }
    .portalErrorBtn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 11px 22px;
      background: #0f172a;
      color: #fff;
      border: none;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s ease;
    }
    .portalErrorBtn:hover { background: #1e293b; }

    .portalErrorActions {
      display: flex;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;
    }
    .portalErrorBtnSecondary {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 11px 20px;
      background: #fff;
      color: #0f172a;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    .portalErrorBtnSecondary:hover { background: #f8fafc; border-color: #cbd5e1; }
    .mainContent {
      width: calc(100% - 220px);
      margin-left: 220px;
      padding: 16px 0;
      overflow-x: hidden;
      box-sizing: border-box;
    }
    .hamburgerBtn {
      display: none;
      border: none;
      background: rgba(255,255,255,0.1);
      color: #fff;
      padding: 6px 10px;
      border-radius: 8px;
      font-size: 16px;
      cursor: pointer;
    }

    .hamburgerBtn:hover {
      background: rgba(255,255,255,0.18);
      color: #fff;
    }

    .sideNav.open {
      transform: translateX(0);
    }

    .sideNavOverlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.35);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
      z-index: 25;
    }

    .sideNavOverlay.show {
      opacity: 1;
      pointer-events: auto;
    }

    @media (max-width: 900px) {
      .appShell {
        grid-template-columns: 1fr;
      }
      .mainContent {
        padding: 12px 0;
        width: 100%;
        margin-left: 0;
      }
      .sideNav {
        transform: translateX(-110%);
      }
      .sideNav.open {
        transform: translateX(0);
      }
      .hamburgerBtn {
        display: inline-flex;
      }
    }

    body.signedOut .navTitleWrap { display: none; }
    body.signedOut .topbar { display: none; }
    body.signedOut .navLeft { display: none; }
    body.signedOut .navRight { display: none; }


    .card {
      background: var(--card);
      border: 0.5px solid var(--border);
      border-radius: 16px;
      box-shadow: none;
      padding: 24px 26px;
      backdrop-filter: none;
    }

    .card+.card {
      margin-top: 16px;
    }

    /* ===== How People Get In (boards approved by Talha, 2026-11-12;
       docs/how-people-get-in-spec.md) =====
       Sign In, Make Your Own Password, Forgot Password, Type the Code, The
       First Password Ran Out and You're Signed Out share one card
       (#authCard[data-step]); Your Apps, An App Not on Your Account and Change
       Password are the shell's signed-in pages (#pageGeoCrest). The same for
       everyone, whatever theme this computer chose. Nothing depends on
       animation to be visible.
       The tokens are defined here, not in palette.css: palette.css is compiled
       into every role's bundle, and these pages are the shell's alone. The
       Geotech pale-blue frame and navy follow the design guide (section 9);
       every other value is the boards' own. */
    .signedOutHero,
    .gcPage {
      --inPage: #ffffff;
      --inOnNavy: #ffffff;
      --inNavy: #1b2b43;
      --inNavyDeep: #12203a;
      --inBar: #eef3fa;
      --inBarLine: #dde5f0;
      --inBarSoft: #46566b;
      --inInk: #14181f;
      --inInk2: #3a414c;
      --inGrey: #6b7280;
      --inGreyOnSurface: #5f6672;
      --inIcon: #8a919c;
      --inLine: #eceef2;
      --inSurface: #f4f5f7;
      --inSurfaceHover: #eceef2;
      --inSurfaceOn: #f3f6fb;
      --inField: #dfe3e9;
      --inCardLine: #e6ebf2;
      --inTileLine: #e4eaf3;
      --inChipLine: #e1e7f0;
      --inWhoLine: #e3e7ee;
      --inWhoSoft: #e8eef7;
      --inLink: #2f5fa8;
      --inFocusHalo: rgb(47 95 168 / 12%);
      --inTick: #0a8f62;
      --inTickSoft: #e2f6ee;
      --inOff: #b6bcc5;
      --inOffSoft: #f1f2f5;
      --inSun: #e2631f;
      --inSunSoft: #fff1e3;
      --inOut: #c0392b;
      --inOutSoft: #fdeeec;
      --inWashTop: #eef3fa;
      --inWashMid: #f6f9fd;
      --inGlowBlue: rgb(72 123 184 / 22%);
      --inGlowGold: rgb(242 181 58 / 24%);
      --inShadow: rgb(27 43 67 / 12%);
      --inBtnShadow: rgb(27 43 67 / 22%);
      --inMenuShadow: rgb(16 24 40 / 20%);
      --inLift: rgb(16 24 40 / 8%);
      font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
      color: var(--inInk);
      -webkit-font-smoothing: antialiased;
    }
    .signedOutHero {
      position: fixed;
      inset: 0;
      z-index: 40;
      overflow-y: auto;
      background: var(--inPage);
    }
    body.signedIn .signedOutHero { display: none; }
    body.signedOut .signedOutHero { display: block; }
    .signedOutHero[hidden] { display: none; }
    body.signedOut .appShell { display: none; }
    body.signedOut #sideNavOverlay { display: none; }
    body.signedOut #sideNav { display: none; }

    .authPage {
      position: relative;
      isolation: isolate;
      min-height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 96px 16px 40px;
      box-sizing: border-box;
    }
    /* The soft pale-blue wash with two faint brand glows, as the boards draw it. */
    .authWash {
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: 520px;
      z-index: -1;
      overflow: hidden;
      pointer-events: none;
      background: linear-gradient(180deg, var(--inWashTop) 0%, var(--inWashMid) 55%, var(--inPage) 100%); /* design-ok: the approved boards' sign-in wash */
    }
    .authWash::before,
    .authWash::after { content: ""; position: absolute; border-radius: 50%; }
    .authWash::before { width: 720px; height: 720px; left: calc(50% - 600px); top: -360px; background: radial-gradient(closest-side, var(--inGlowBlue), transparent); } /* design-ok: the boards' blue glow */
    .authWash::after { width: 600px; height: 600px; left: calc(50% - 40px); top: -260px; background: radial-gradient(closest-side, var(--inGlowGold), transparent); } /* design-ok: the boards' gold glow */

    .authCard {
      position: relative;
      width: 460px;
      max-width: 100%;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      background: var(--inPage);
      border-radius: 30px;
      box-shadow: 0 24px 60px var(--inShadow), 0 0 0 1px var(--inCardLine);
      padding: 40px 40px 34px;
    }
    .authBrand { display: flex; flex-direction: column; align-items: center; text-align: center; }
    .authMarkTile {
      width: 76px;
      height: 76px;
      border-radius: 22px;
      background: var(--inPage);
      display: grid;
      place-items: center;
      box-shadow: 0 10px 30px var(--inShadow), 0 0 0 1px var(--inTileLine);
    }
    .authMark { width: 40px; height: 40px; display: block; }
    .authCard[data-step="signIn"] .authMark,
    .authCard[data-step="signedOut"] .authMark { width: 46px; height: 46px; }
    .authProductName {
      margin-top: 14px;
      color: var(--inNavy);
      font-family: "Plus Jakarta Sans", "Geist", sans-serif; /* design-ok: the wordmark */
      font-size: 22px;
      font-weight: 800; /* design-ok: the wordmark */
      letter-spacing: -0.01em;
      line-height: 1.2;
    }
    .authNoteIcon {
      display: none;
      align-self: center;
      width: 76px;
      height: 76px;
      border-radius: 24px;
      place-items: center;
      background: var(--inSunSoft);
      color: var(--inSun);
    }
    .authHead { margin-top: 22px; display: flex; flex-direction: column; align-items: center; text-align: center; }
    .authTitle {
      margin: 0;
      white-space: pre-line;
      font-size: 30px;
      font-weight: 600;
      letter-spacing: -0.03em;
      line-height: 1.12;
      color: var(--inInk);
    }
    .authLead { margin: 6px 0 0; font-size: 15.5px; line-height: 1.4; color: var(--inGrey); }
    .authLead[hidden] { display: none; }
    .authOpening {
      margin-top: 14px;
      height: 40px;
      box-sizing: border-box;
      padding: 0 14px 0 6px;
      border-radius: 999px;
      background: var(--inPage);
      box-shadow: inset 0 0 0 1px var(--inChipLine);
      display: inline-flex;
      align-items: center;
      gap: 9px;
      font-size: 14px;
      font-weight: 600;
      color: var(--inNavy);
    }
    .authOpening[hidden] { display: none; }
    .authOpeningTile {
      width: 28px;
      height: 28px;
      border-radius: 9px;
      display: grid;
      place-items: center;
      background: var(--appSoft, var(--inSurface));
      color: var(--appInk, var(--inNavy));
    }
    .authOpeningTile svg { display: block; }

    .authFields { border: 0; margin: 26px 0 0; padding: 0; min-inline-size: 0; display: grid; gap: 14px; }
    .authField { display: grid; gap: 7px; margin: 0; }
    .authField[hidden] { display: none; }
    .authField.is-quiet { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
    .authField label { display: block; margin: 0; font-size: 13.5px; font-weight: 600; color: var(--inInk2); }
    /* The outline is a real border, so the field inside never paints over it (an autofilled field painted its own colour
       across an outline drawn as an inset shadow: Talha, November 13). */
    .authBox {
      height: 56px;
      box-sizing: border-box;
      border-radius: 15px;
      border: 1.5px solid var(--inField);
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 12.5px 0 14.5px;
      background: var(--inPage);
    }
    .authBox:focus-within { border-color: var(--inLink); box-shadow: 0 0 0 0.5px var(--inLink), 0 0 0 4px var(--inFocusHalo); }
    .authBoxIcon { flex: none; display: block; color: var(--inIcon); }
    .signedOutHero .authBox input,
    .gcPage .authBox input {
      flex: 1;
      min-width: 0;
      width: auto;
      height: 100%;
      margin: 0;
      padding: 0;
      border: 0;
      border-radius: 0;
      outline: none;
      background: transparent;
      color: var(--inInk);
      font: inherit;
      font-size: 16.5px;
    }
    .signedOutHero .authBox input:read-only { color: var(--inInk2); }
    /* An autofilled box keeps its own colour: a browser paints the input itself, which is narrower than its rounded box
       (the icon on the left, Show on the right), so its fill showed as a block inside the box (Talha, November 13). */
    .signedOutHero .authBox input:-webkit-autofill,
    .signedOutHero .authBox input:-webkit-autofill:hover,
    .signedOutHero .authBox input:-webkit-autofill:focus,
    .gcPage .authBox input:-webkit-autofill,
    .gcPage .authBox input:-webkit-autofill:hover,
    .gcPage .authBox input:-webkit-autofill:focus {
      -webkit-box-shadow: 0 0 0 1000px var(--inPage) inset;
      box-shadow: 0 0 0 1000px var(--inPage) inset;
      -webkit-text-fill-color: var(--inInk);
      caret-color: var(--inInk);
      transition: background-color 9999s ease-out 0s;
    }
    .signedOutHero .authBox input:autofill,
    .gcPage .authBox input:autofill {
      box-shadow: 0 0 0 1000px var(--inPage) inset;
      filter: none;
    }
    .authShow {
      margin-left: auto;
      flex: none;
      display: flex;
      align-items: center;
      gap: 6px;
      min-height: 40px;
      padding: 0 4px;
      border: 0;
      border-radius: 9px;
      background: transparent;
      color: var(--inInk2);
      font: inherit;
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
    }
    .authShow:hover { color: var(--inInk); background: transparent; }
    .authShow:focus-visible { outline: 2px solid var(--inLink); outline-offset: 2px; }
    .authShow svg { color: var(--inIcon); }

    /* The six code boxes are one real field (autofill and paste work); the boxes show its digits. */
    .authCode { position: relative; display: block; height: 62px; }
    .signedOutHero .authCode input {
      position: absolute;
      inset: 0;
      z-index: 1;
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      border: 0;
      opacity: 0;
      font-size: 16px;
      cursor: text;
    }
    .authCodeBoxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 100%; }
    .authCodeBoxes span {
      border-radius: 15px;
      box-shadow: inset 0 0 0 1.5px var(--inField);
      display: grid;
      place-items: center;
      font-size: 28px;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: var(--inInk);
    }
    .authCode:focus-within .authCodeBoxes span.is-now { box-shadow: inset 0 0 0 2px var(--inLink), 0 0 0 4px var(--inFocusHalo); }

    .authRules { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
    .authRules[hidden] { display: none; }
    .authRule { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--inInk2); }
    .authRule i {
      flex: none;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: var(--inOffSoft);
      color: var(--inOff);
    }
    .authRule.is-met i { background: var(--inTickSoft); color: var(--inTick); }
    .authRule svg { display: block; }
    .srOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

    .authActions { display: grid; gap: 10px; margin-top: 8px; }
    .authBtnPrimary {
      width: 100%;
      height: 58px;
      box-sizing: border-box;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      padding: 0 20px;
      border: 0;
      border-radius: 17px;
      background: var(--inNavy);
      color: var(--inOnNavy);
      box-shadow: 0 10px 24px var(--inBtnShadow);
      font: inherit;
      font-size: 17.5px;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
    }
    .authBtnPrimary:hover { background: var(--inNavyDeep); color: var(--inOnNavy); }
    .authBtnPrimary:focus-visible { outline: 2px solid var(--inLink); outline-offset: 3px; }
    .authBtnPrimary:disabled,
    .authBtnPrimary:disabled:hover {
      opacity: 1;
      border: 0;
      background: var(--inOffSoft);
      color: var(--inGrey);
      box-shadow: none;
      cursor: default;
    }
    /* The button's picture follows its words (credentials.js sets data-icon): an
       arrow after them, or a letter before them. auth.js writes only the words. */
    .authBtnPrimary .authBtnArrow,
    .authBtnPrimary .authBtnMail { display: none; flex: none; }
    .authBtnPrimary[data-icon="arrow"] .authBtnArrow,
    .authBtnPrimary[data-icon="mail"] .authBtnMail { display: block; }
    .authLink {
      display: block;
      justify-self: center;
      min-height: 36px;
      padding: 6px 10px;
      border: 0;
      border-radius: 9px;
      background: transparent;
      color: var(--inLink);
      font: inherit;
      font-size: 14.5px;
      font-weight: 600;
      text-align: center;
      cursor: pointer;
    }
    .authLink:hover { background: transparent; color: var(--inNavy); }
    .authLink:focus-visible { outline: 2px solid var(--inLink); outline-offset: 2px; }
    .authLink[hidden] { display: none; }
    .authLink:disabled { opacity: 0.6; background: transparent; border: 0; color: var(--inGrey); cursor: default; }
    .authCenter { margin: 0; text-align: center; font-size: 14.5px; color: var(--inGrey); }
    .authCenter[hidden] { display: none; }

    .authStatus {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin: 14px 0 0;
      min-width: 0;
      font-size: 14px;
      line-height: 1.45;
      text-align: center;
      color: var(--inGrey);
      /* An unbroken token from the sign-in page must wrap, not run off the card. */
      overflow-wrap: anywhere;
    }
    .authStatus[hidden] { display: none; }
    /* Busy messages get a small spinner; errors a danger dot; plain notices no icon at all. */
    .authStatus.isBusy::before {
      content: "";
      flex: none;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      border: 2px solid var(--inLine);
      border-top-color: var(--inGrey);
      animation: authSpin 0.8s linear infinite;
    }
    .authStatus.isError { color: var(--danger); }
    .authStatus.isError::before {
      content: "";
      flex: none;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--danger);
    }
    @keyframes authSpin { to { transform: rotate(360deg); } }
    @media (prefers-reduced-motion: reduce) {
      .authStatus.isBusy::before { animation: none; }
    }
    .authAside { margin: 20px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--inGrey); text-align: center; }
    .authAside[hidden] { display: none; }
    .authAside .authLink { display: inline; min-height: 0; padding: 4px; font-size: 13.5px; }
    .authFoot { margin: 22px 0 0; text-align: center; font-size: 13.5px; color: var(--inGrey); }
    /* Legacy signed-in block inside the card: the shell still holds its
       element handles, so it stays in the DOM and is never displayed. */
    .authSignedInBlock { display: none; }

    /* The First Password Ran Out: the clock instead of the mark. */
    .authCard[data-step="expired"] .authBrand { display: none; }
    .authCard[data-step="expired"] .authNoteIcon { display: grid; }
    .authCard[data-step="expired"] .authHead { margin-top: 22px; }
    .authCard[data-step="expired"] .authFields,
    .authCard[data-step="signedOut"] .authFields { margin-top: 30px; }

    /* You're Signed Out is the first card at its own address (/#signed-out/<app>; Talha, November 13, 2026: no flash
       of another screen first). first-step.js marks the page before anything is drawn; until the shell draws its first
       step the card shows the GeoCrest mark and name only, never the Sign In form's words, fields or links. The mark
       comes off at that first step, once the page has been read, or after 3 s, so the card always ends up on show. It
       applies only while the card is still the page's own Sign In: no step looks different. */
    html.authFirstStepWait .authCard[data-step="signIn"] > :not(.authBrand),
    html.authFirstStepWait .authCard[data-step="signIn"] ~ * { display: none; }

    /* A phone: the whole page, the wash behind the mark, the main button at
       the foot where the board puts it. */
    @media (max-width: 559px) {
      .authPage { padding: 0; align-items: stretch; }
      .authWash { height: 330px; }
      .authWash::before { width: 360px; height: 360px; left: -120px; top: -150px; }
      .authWash::after { width: 300px; height: 300px; left: auto; right: -110px; top: -60px; }
      .authCard {
        width: 100%;
        min-height: 100vh;
        min-height: 100svh;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        padding: 64px 24px 28px;
      }
      .authHead { margin-top: 26px; }
      .authCard[data-step="signIn"] .authHead { margin-top: 30px; }
      .authCard[data-step="signedOut"] .authHead { margin-top: 34px; }
      .authCard[data-step="expired"] { padding-top: 80px; }
      .authCard[data-step="signIn"],
      .authCard[data-step="requestReset"] { min-height: 0; }
      /* Make Your Own Password, Type the Code and the two notes keep their main
         button at the foot of the screen, where the boards draw it. The card
         keeps room for it, so on a short screen it follows the fields instead
         of covering them. */
      .authCard[data-step="expired"] { padding-bottom: 112px; }
      .authCard[data-step="signedOut"] { padding-bottom: 146px; }
      .authCard[data-step="newPassword"] { padding-bottom: 160px; }
      .authCard[data-step="confirmReset"] { padding-bottom: 206px; }
      .authCard[data-step="newPassword"] .authActions,
      .authCard[data-step="confirmReset"] .authActions,
      .authCard[data-step="expired"] .authActions,
      .authCard[data-step="signedOut"] .authActions { position: absolute; left: 24px; right: 24px; bottom: 28px; margin: 0; }
      .signedOutHero[data-step="requestReset"] .authFoot,
      .signedOutHero[data-step="newPassword"] .authAside,
      .signedOutHero[data-step="newPassword"] .authFoot,
      .signedOutHero[data-step="confirmReset"] .authAside,
      .signedOutHero[data-step="confirmReset"] .authFoot,
      .signedOutHero[data-step="expired"] .authAside,
      .signedOutHero[data-step="expired"] .authFoot,
      .signedOutHero[data-step="signedOut"] .authAside,
      .signedOutHero[data-step="signedOut"] .authFoot { display: none; }
      .authAside { margin: 8px 24px 0; }
      .authFoot { margin: auto 0 0; padding: 18px 0 28px; font-size: 14.5px; }
    }

    /* ===== The shell's signed-in pages: Your Apps, An App Not on Your Account,
       Change Password, and the account menu (boards S-Apps, S-AppsPhone,
       S-NoAccess, S-Account). ===== */
    .gcPage {
      position: fixed;
      inset: 0;
      z-index: 40;
      overflow-y: auto;
      background: var(--inPage);
    }
    .gcPage[hidden],
    .gcPage main[hidden],
    .gcPage [hidden] { display: none !important; }
    .gcBar {
      position: sticky;
      top: 0;
      z-index: 3;
      height: 60px;
      box-sizing: border-box;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 32px;
      background: var(--inBar);
      border-bottom: 1px solid var(--inBarLine);
    }
    .gcBrand {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--inNavy);
      font-family: "Plus Jakarta Sans", "Geist", sans-serif; /* design-ok: the wordmark */
      font-size: 17px;
      font-weight: 800; /* design-ok: the wordmark */
      letter-spacing: -0.01em;
    }
    .gcBrand img { display: block; }
    .gcBarRight { margin-left: auto; display: flex; align-items: center; gap: 10px; }
    .gcAvatar {
      width: 34px;
      height: 34px;
      padding: 0;
      border: 0;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: var(--inNavy);
      color: var(--inOnNavy);
      font: inherit;
      font-size: 12.5px;
      font-weight: 600;
      cursor: pointer;
    }
    .gcAvatar:hover { background: var(--inNavyDeep); color: var(--inOnNavy); }
    .gcAvatar:focus-visible { outline: 2px solid var(--inLink); outline-offset: 3px; }

    .gcMenu {
      position: absolute;
      top: 72px;
      right: 24px;
      z-index: 5;
      width: 360px;
      max-width: calc(100vw - 24px);
      box-sizing: border-box;
      border-radius: 22px;
      background: var(--inPage);
      box-shadow: 0 24px 60px var(--inMenuShadow), 0 0 0 1px var(--inCardLine);
      padding: 10px;
    }
    .gcMe { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--inLine); margin-bottom: 6px; }
    .gcMeAvatar { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--inNavy); color: var(--inOnNavy); display: grid; place-items: center; font-size: 15px; font-weight: 600; }
    .gcMeWho { min-width: 0; }
    .gcMeWho b { display: block; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
    .gcMeWho small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--inGrey); overflow-wrap: anywhere; }
    .gcRoleChip { margin-left: auto; flex: none; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--inBar); color: var(--inNavy); font-size: 12px; font-weight: 600; display: flex; align-items: center; }
    .gcMenuItems { display: grid; }
    .gcMenuRow {
      width: 100%;
      height: 50px;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 10px;
      border: 0;
      border-radius: 15px;
      background: transparent;
      color: var(--inInk);
      font: inherit;
      font-size: 15.5px;
      font-weight: 600;
      text-align: left;
      cursor: pointer;
    }
    .gcMenuRow:hover,
    .gcMenuRow:focus { background: var(--inSurfaceOn); color: var(--inInk); outline: none; }
    .gcMenuRow:focus-visible { outline: 2px solid var(--inLink); outline-offset: -2px; }
    .gcMenuIcon { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--inSurface); color: var(--inInk2); }
    .gcMenuRow.is-out { color: var(--inOut); }
    .gcMenuRow.is-out .gcMenuIcon { background: var(--inOutSoft); color: var(--inOut); }

    /* Your Apps (S-Apps): the greeting, then one card per app. */
    .gcAppsBody { max-width: 1120px; margin: 0 auto; padding: 92px 24px 80px; box-sizing: content-box; }
    .gcHi { margin: 0; text-align: center; font-size: 44px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; color: var(--inInk); }
    .gcDate { margin: 8px 0 0; text-align: center; font-size: 16px; color: var(--inGrey); }
    .gcAppList { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-top: 52px; }
    .gcApp {
      position: relative;
      width: calc((100% - 48px) / 3);
      min-width: 280px;
      min-height: 286px;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      padding: 28px 28px 26px;
      border-radius: 28px;
      background: var(--inSurface);
      color: var(--inInk);
      text-decoration: none;
      transition: background-color 0.15s ease;
    }
    /* Four apps sit in one row (Supervisors and the Owner, with Lab Requests: the One Way In canvas, November 16). */
    @media (min-width: 1100px) {
      .gcAppList:has(> .gcApp:nth-child(4)) .gcApp { width: calc((100% - 72px) / 4); min-width: 230px; }
    }
    /* Between a phone and a laptop, four cards sit two by two, never three and one (slice 1 check, Low 5). */
    @media (min-width: 641px) and (max-width: 1099px) {
      .gcAppList:has(> .gcApp:nth-child(4)) .gcApp { width: calc((100% - 24px) / 2); min-width: 0; }
    }
    /* Five cards (the Front Door joins a Supervisor's and the Owner's apps: canvas "Drop-Offs and Requests", board
       W-Apps-Front-Door, November 16): one row on a wide screen, as drawn; three and two below it, never four and one. */
    @media (min-width: 1300px) {
      .gcAppsBody:has(.gcApp:nth-child(5)) { max-width: 1336px; }
      .gcAppList:has(> .gcApp:nth-child(5)) .gcApp { width: calc((100% - 96px) / 5); min-width: 0; }
    }
    @media (min-width: 641px) and (max-width: 1299px) {
      .gcAppList:has(> .gcApp:nth-child(5)) .gcApp { width: calc((100% - 48px) / 3); min-width: 0; }
    }
    .gcApp:hover { background: var(--inSurfaceHover); }
    .gcApp:focus-visible { outline: 2px solid var(--inLink); outline-offset: 3px; }
    .gcAppIcon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--appSoft); color: var(--appInk); }
    .gcAppIcon svg { display: block; }
    .gcAppName { margin-top: 26px; font-size: 25px; font-weight: 600; letter-spacing: -0.02em; }
    .gcAppLine { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--inGreyOnSurface); }
    .gcAppFoot { margin-top: auto; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .gcAppCount { height: 32px; padding: 0 12px; border-radius: 999px; background: var(--inPage); display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--inInk2); }
    .gcAppCount i { width: 8px; height: 8px; border-radius: 50%; background: var(--appInk); }
    .gcAppGo { margin-left: auto; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--inPage); display: grid; place-items: center; color: var(--inInk); }
    .gcAppGo svg { display: block; }
    .gcAppsWait { margin: 52px 0 0; text-align: center; font-size: 15px; color: var(--inGrey); }

    /* An App Not on Your Account (S-NoAccess) and Change Password: one centred column. */
    .gcNote { width: 560px; max-width: calc(100% - 48px); margin: 120px auto 60px; display: flex; flex-direction: column; align-items: center; text-align: center; }
    .gcNoteTile { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: var(--appSoft, var(--inBar)); color: var(--appInk, var(--inNavy)); }
    .gcNoteTile svg { display: block; }
    .gcNoteTitle { margin: 22px 0 0; font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; color: var(--inInk); }
    .gcNoteLine { margin: 10px 0 0; max-width: 440px; font-size: 16.5px; line-height: 1.4; color: var(--inGrey); }
    .gcWho { width: 440px; max-width: 100%; box-sizing: border-box; margin-top: 28px; border-radius: 22px; box-shadow: inset 0 0 0 1.5px var(--inWhoLine); padding: 16px; display: flex; align-items: center; gap: 14px; text-align: left; }
    .gcWhoAvatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--inWhoSoft); color: var(--inNavy); }
    .gcWho b { display: block; font-size: 17px; font-weight: 600; }
    .gcWho small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--inGrey); }
    .gcPair { display: flex; gap: 10px; margin-top: 26px; }
    .gcBtn {
      height: 58px;
      box-sizing: border-box;
      border: 0;
      font: inherit;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      padding: 0 26px;
      border-radius: 17px;
      background: var(--inNavy);
      color: var(--inOnNavy);
      box-shadow: 0 10px 24px var(--inBtnShadow);
      font-size: 17.5px;
      font-weight: 600;
      text-decoration: none;
    }
    .gcBtn:hover { background: var(--inNavyDeep); color: var(--inOnNavy); }
    .gcBtn:focus-visible { outline: 2px solid var(--inLink); outline-offset: 3px; }
    .gcBtn svg { display: block; }
    .gcChange .gcNoteTile.is-account { background: var(--inBar); color: var(--inNavy); }
    .gcForm { width: 440px; max-width: 100%; text-align: left; }
    .gcForm .authFields { margin-top: 28px; }
    .gcQuiet { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
    .gcDone { width: 440px; max-width: 100%; display: grid; gap: 22px; margin-top: 4px; }
    .gcDone .gcNoteLine { margin: 6px auto 0; }
    .gcChange .authStatus { max-width: 440px; margin: 2px 0 0; justify-content: flex-start; text-align: left; }
    .gcChangeSignOut { justify-self: start; padding-left: 0; }

    @media (max-width: 640px) {
      .gcBar { height: 58px; padding: 0 14px 0 16px; }
      .gcBrand { gap: 9px; }
      .gcBrand img { width: 24px; height: 24px; }
      .gcAvatar { width: 32px; height: 32px; font-size: 12px; }
      .gcMenu { top: 66px; right: 12px; }
      .gcAppsBody { padding: 26px 16px 40px; }
      .gcHi { padding: 0 4px; text-align: left; font-size: 28px; letter-spacing: -0.03em; }
      .gcDate { padding: 0 4px; text-align: left; margin-top: 3px; font-size: 14.5px; }
      .gcAppList { display: grid; gap: 12px; margin-top: 18px; }
      .gcApp {
        width: auto;
        min-width: 0;
        min-height: 0;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 4px 14px;
        align-items: center;
        padding: 18px;
        border-radius: 24px;
      }
      .gcAppIcon { grid-row: span 2; width: 56px; height: 56px; border-radius: 17px; }
      .gcAppIcon svg { width: 28px; height: 28px; }
      .gcAppName { margin: 0; align-self: end; font-size: 19px; }
      .gcAppLine { margin: 0; align-self: start; font-size: 13.5px; }
      .gcAppFoot { display: contents; }
      .gcAppGo { grid-column: 3; grid-row: 1 / span 2; width: 40px; height: 40px; box-shadow: 0 1px 2px var(--inLift); }
      .gcAppGo svg { width: 18px; height: 18px; }
      .gcAppCount { grid-column: 2 / span 2; grid-row: 3; justify-self: start; margin-top: 8px; height: 30px; padding: 0 11px; font-size: 12.5px; }
      .gcAppCount i { width: 7px; height: 7px; }
      .gcNote { margin-top: 64px; }
      .gcNoteTitle { font-size: 28px; }
      .gcNoteLine { font-size: 15.5px; }
      .gcPair { width: 100%; flex-direction: column; }
      .gcBtn { width: 100%; }
    }

    .row {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .col {
      flex: 1 1 260px;
      min-width: 240px;
    }

    .col2 {
      flex: 1 1 520px;
      min-width: 320px;
    }

    .label {
      font-size: 11px;
      color: var(--faint);
      text-transform: uppercase;
      letter-spacing: 0.6px;
      font-weight: 500;
      margin-bottom: 5px;
    }

    button,
    input,
    select,
    textarea,
    table {
      font-family: inherit;
    }

    input,
    textarea,
    select {
      width: 100%;
      box-sizing: border-box;
      border-radius: 10px;
      border: 0.5px solid var(--border);
      background: #f8fafc;
      color: var(--text);
      font-weight: 400;
      padding: 10px 14px;
      font-size: 14px;
      outline: none;
      font-family: inherit;
    }

    input:focus,
    textarea:focus,
    select:focus {
      border-color: var(--blue);
      background: #fff;
    }

    input::placeholder,
    textarea::placeholder {
      color: var(--muted);
    }

    body.themeLight input,
    body.themeLight textarea,
    body.themeLight select {
      background: #f3f4f6;
      color: #111827;
      border: 1px solid rgba(17, 24, 39, 0.18);
    }

    textarea {
      min-height: 120px;
      resize: vertical;
    }

    .btnRow {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    /* ⚠️ THE BUG THIS SPLIT EXISTS TO KILL — read before merging it back.
       This used to be ONE rule painting every <button> navy, including its
       colours. `button:hover` scores (0,1,1), which OUTRANKS a bare component
       class at (0,1,0) — so any palette component built as a <button> looked
       right at rest and flipped to near-black the moment it was hovered or
       focused. Talha reported it twice: first on The lab's stage cards, then
       on Client submissions' filter cards, where the selected card went dark
       navy with dark text and became unreadable.
       Fixing `.labStage` alone fixed a symptom. A sweep then found FIVE more
       (.idStat, .tdTab, .backToLab, .rd-btn-refresh) — the class of bug, not
       the instance.
       STRUCTURE stays at normal specificity so no button loses its padding or
       radius. COLOUR drops into :where(), which contributes ZERO — so any
       component class beats it unconditionally, at rest and on hover, without
       depending on stylesheet order.
       Safe because it was MEASURED, not assumed: across all seven screens,
       39 visible buttons, ZERO were relying on this rule for their background.
       Re-run that check before widening it again. */
    button,
    .btn,
    a.btn {
      border: none;
      border-radius: 10px;
      padding: 10px 22px;
      cursor: pointer;
      font-weight: 500;
      box-shadow: none;
      text-decoration: none;
      font-size: 13px;
      font-family: inherit;
    }

    :where(button, .btn, a.btn) {
      color: #ffffff;
      background: var(--navy2);
    }

    :where(button:hover, .btn:hover, a.btn:hover) {
      background: var(--navy3);
    }

    button.secondary{
      background: #f8fafc;
      border: 0.5px solid var(--border);
      color: var(--text);
      box-shadow: none;
    }

    button.secondary:hover{
      background: var(--border);
    }
    button.danger {
      background: #b91c1c;
      border: 1px solid #991b1b;
      color: #ffffff;
    }

    button.danger:hover {
      background: #991b1b;
    }

    button:disabled {
      opacity: 0.75;
      background: #e5e7eb;
      border: 1px solid #d1d5db;
      color: #111827;
      cursor: not-allowed;
    }
    .pill {
      font-size: 12px;
      padding: 4px 12px;
      border-radius: 99px;
      background: rgba(148, 163, 184, 0.18);
      border: none;
      color: #1f2937;
      font-weight: 500;
      white-space: nowrap;
    }

    .pill.ok {
      background: rgba(34, 197, 94, 0.2);
      border-color: transparent;
      color: #4ade80;
    }

    .pill.warn {
      background: rgba(245, 158, 11, 0.15);
      border-color: transparent;
      color: #92400e;
    }

    .statusBox {
      margin-top: 12px;
      background: #eff6ff;
      border: 0.5px solid #bfdbfe;
      border-radius: 10px;
      padding: 12px 16px;
      font-size: 13px;
      color: #1e40af;
      overflow-wrap: anywhere;
      white-space: pre-wrap;
      min-height: 40px;
    }
    .authUserRoleRow {
      display: none;
    }

    .note {
      margin-top: 10px;
      font-size: 12px;
      color: var(--muted);
      line-height: 1.35;
    }
    .hidden {
      display: none !important;
    }

    body.themeDark {
      --bg1: #0f172a;
      --bg2: #111827;
      --card: #111827;
      --card2: #0f172a;
      --text: #e5e7eb;
      --muted: #94a3b8;
      --border: rgba(148, 163, 184, 0.2);
      color: var(--text);
    }

    body.themeDark .card,
    body.themeDark .card *{
      color: var(--text);
    }

    body.themeDark .label,
    body.themeDark .sub,
    body.themeDark .note {
      color: rgba(226, 232, 240, 0.78);
    }

    body.themeDark input,
    body.themeDark select,
    body.themeDark textarea {
      background: rgba(15, 23, 42, 0.55);
      color: var(--text);
      border-color: rgba(148, 163, 184, 0.22);
    }

    body.themeDark input::placeholder,
    body.themeDark textarea::placeholder {
      color: rgba(226, 232, 240, 0.55);
    }

    body.themeDark .statusBox {
      background: rgba(148, 163, 184, 0.08);
      border-color: rgba(148, 163, 184, 0.18);
      color: var(--text);
    }

    body.themeDark .mainNav button:hover {
      background: rgba(255,255,255,0.05);
    }

    body.themeDark .card {
      box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    }

    body.themeDark .label {
      color: var(--muted);
    }

    body.themeDark .topbar {
      background: var(--navy);
      border-color: transparent;
    }

    body.themeDark .sideNav {
      background: var(--navy);
      border-color: transparent;
    }

    body.themeDark .profileDropdown {
      background: var(--card);
      border-color: var(--border);
      color: var(--text);
    }

    body.themeDark .mainNav button {
      color: rgba(255,255,255,0.45);
    }


    body.themeDark.signedOut #authCard,
    body.themeDark .signedOutHero #authCard {
      background: #fff;
      border: 1px solid #e2e8f0;
      box-shadow: 0 8px 40px rgba(15, 23, 42, 0.12);
      color: #0f172a;
    }

    body.themeDark.signedOut #authCard .authAppName,
    body.themeDark.signedOut #authCard .label,
    body.themeDark.signedOut #authCard .h,
    body.themeDark.signedOut #authCard .sub,
    body.themeDark.signedOut #authCard .note {
      color: #0f172a;
    }

    body.themeDark.signedOut #authCard input,
    body.themeDark.signedOut #authCard select,
    body.themeDark.signedOut #authCard textarea {
      background: rgba(255, 255, 255, 0.78);
      color: #0f172a;
      border: 1px solid rgba(17, 24, 39, 0.18);
    }

    body.themeDark.signedOut #authCard input::placeholder,
    body.themeDark.signedOut #authCard textarea::placeholder {
      color: rgba(15, 23, 42, 0.55);
    }

    body.themeDark.signedOut #authLogPill {
      background: rgba(245, 158, 11, 0.16);
      border: 1px solid rgba(245, 158, 11, 0.28);
      color: rgba(120, 53, 15, 1);
    }

    body.themeDark.signedOut #authCard .label,
    body.themeDark.signedOut #authCard .sub,
    body.themeDark.signedOut #authCard .note {
      color: #0f172a;
    }

    body.themeDark button.secondary,
    body.themeDark .btn.secondary{
      background: rgba(15, 23, 42, 0.55);
      color: rgba(226, 232, 240, 0.95);
      border: 1px solid rgba(148, 163, 184, 0.22);
    }

    body.themeDark button.secondary:hover{
      background: rgba(148, 163, 184, 0.10);
    }

    /* ===== Client Pending (self-registered, awaiting approval) ===== */
    #pageClientPending { display: none; }
    .cpPendingWrap {
      max-width: 760px;
      margin: 0 auto;
      padding: 24px 20px 60px;
      display: flex;
      flex-direction: column;
      gap: 18px;
    }
    .cpPendingHero {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 22px 24px;
      background: #0f172a;
      color: #fff;
      border-radius: 16px;
    }
    .cpPendingLogo { width: 52px; height: 52px; border-radius: 10px; background: #000; padding: 4px; }
    .cpPendingTitle { font-size: 20px; font-weight: 700; letter-spacing: -0.2px; }
    .cpPendingSub { font-size: 13.5px; color: rgba(255,255,255,0.65); margin-top: 4px; }
    .cpPendingSignOut {
      margin-left: auto;
      padding: 8px 14px;
      border-radius: 9px;
      border: 1px solid rgba(255,255,255,0.18);
      background: transparent;
      color: rgba(255,255,255,0.85);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
    }
    .cpPendingSignOut:hover { background: rgba(255,255,255,0.08); }

    .cpPendingStatus { padding: 14px 18px; border-radius: 12px; font-size: 13.5px; }
    .cpPendingStatusOk { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
    .cpPendingStatusErr { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
    .cpPendingStatusTitle { font-weight: 700; margin-bottom: 4px; }
    .cpPendingStatusBody { font-weight: 500; line-height: 1.5; }

    .cpPendingCard {
      background: #fff;
      border: 1px solid rgba(17,24,39,.08);
      border-radius: 14px;
      padding: 22px 24px;
      box-shadow: 0 1px 2px rgba(15,23,42,.04);
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .cpPendingCardTitle {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 1.1px;
      text-transform: uppercase;
      color: rgba(15,23,42,.55);
    }
    .cpPendingGrid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    @media (max-width: 700px) { .cpPendingGrid { grid-template-columns: 1fr; } }
    .cpPendingField { display: flex; flex-direction: column; gap: 6px; }
    .cpPendingLabel { font-size: 12.5px; font-weight: 600; color: #334155; }
    .cpPendingReq { color: #ef4444; }
    .cpPendingField input,
    .cpPendingField textarea {
      border: 1px solid rgba(17,24,39,.14);
      border-radius: 9px;
      padding: 10px 12px;
      font-size: 14px;
      font-family: inherit;
      color: #0f172a;
      background: #f8fafc;
    }
    .cpPendingField input:focus,
    .cpPendingField textarea:focus {
      outline: none;
      border-color: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59,130,246,.15);
      background: #fff;
    }
    .cpPendingField input[readonly] { background: #f1f5f9; color: #64748b; }
    .cpPendingActions { display: flex; justify-content: flex-end; }
    .cpPendingSubmit {
      padding: 11px 22px;
      border-radius: 11px;
      background: #16a34a;
      border: none;
      color: #fff;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: background .15s ease;
    }
    .cpPendingSubmit:hover:not(:disabled) { background: #15803d; }
    .cpPendingSubmit:disabled { opacity: .55; cursor: not-allowed; }




    /* ========================================================================
       STAFF CHROME — repainted 2026-08-13 into the approved Clay/Harbor system
       (Talha: repaint the whole staff shell, not just the technician screens).

       This is an OVERRIDE LAYER on purpose, and it is the design swap point:
       the navy rules above are untouched, so this whole block can be deleted to
       revert, and colour changes happen HERE (or in palette.css) rather than
       being hunted through 3,700 lines. Every value is a var() from
       palette.css — no literal colours below this line.

       Scope: the FRAME only (topbar, sidebar, home, shell panes). The mounted
       dashboards keep their own styling until each is rebuilt in turn.
       ======================================================================== */

    /* The page ground AND the default text colour. `color` was missing here:
       the base rule far above is `body { color: var(--text) }` with
       `--text: #0f172a`, so every descendant that did not set its own colour
       inherited Tailwind slate — including the React mount points, and through
       them anything the dashboards did not explicitly paint. Invisible while
       each app set its own colour on its wrapper, and a slate anchor the moment
       one did not. Found by walking computed styles up from #intakeRoot, not
       by looking at the screen. */
    body { background: var(--bg); color: var(--ink); }

    /* ---- topbar ---- */
    .topbar {
      background: var(--card);
      border-bottom: 1px solid var(--line);
      min-height: 64px;
    }
    .topbarLogoMark { background: transparent; }
    .topbarLogoName {
      font-weight: 800;
      letter-spacing: -0.015em;
      color: var(--ink);
    }
    .topbarLogoSub {
      color: var(--muted);
      letter-spacing: 0;
    }
    .hamburgerBtn { color: var(--ink); }
    .hamburgerBtn:hover { background: var(--panel); }
    /* Status pills: quieter than the old neon-on-navy, still scannable. */
    .topbarPill {
      border-radius: 99px;
      font-size: 12px;
      font-weight: 600;
      border: 1px solid transparent;
    }
    .topbarPillOk {
      background: var(--greenSoft);
      color: var(--green);
      border-color: var(--greenSoft);
    }
    .topbarPillRole {
      background: var(--primarySoft);
      color: var(--primaryDeep);
      border-color: var(--primarySoft);
    }
    .topbarAvatar {
      background: var(--primarySoft);
      color: var(--avatarInk);
      font-weight: 600;
    }
    .topbarRoleLabel { color: var(--ink); }
    .profileButton:hover { background: var(--panel); }
    .profileDropdown {
      background: var(--card);
      border: 1px solid var(--line);
      color: var(--ink);
      border-radius: 12px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
    }
    .profileRow { color: var(--muted); }

    /* ---- topbar contents ----
       The right side carried FOUR things that said two: a "Signed In" pill
       (you are looking at the app — you are signed in), a role pill, and then
       the same role again next to the avatar. Role + avatar is the whole
       message. The client portal already hid these for the same reason. */
    .topbarPill { display: none; }

    /* The hamburger kept its dark-chrome colours — white text on a white
       translucent pad — which on the cream topbar made it invisible, and
       invisible again on hover. It is the only way to reach the navigation
       below 900px. */
    .hamburgerBtn {
      background: transparent;
      border: 1px solid var(--ghostLine);
      color: var(--ink);
    }
    .hamburgerBtn:hover { background: var(--panel); color: var(--ink); }

    /* ---- side navigation ---- */
    .sideNav {
      background: var(--panel);
      border-right: 1px solid var(--line);
      /* Was hardcoded to 60px while the topbar is 64px, so the sidebar sat 4px
         under it. --topbarH is measured from the real topbar at runtime. */
      top: var(--topbarH, 64px);

      /* THE BUG: `min-height` let the nav grow past the viewport while
         `position: fixed` meant page scrolling never moved it and it had no
         scroll of its own. On a 700px-tall laptop the supervisor's list ran
         107px below the fold, so the last items in the list
         were simply unreachable — no scrollbar, no way down. A fixed sidebar
         must be exactly viewport-tall and scroll its own overflow. */
      height: calc(100vh - var(--topbarH, 64px));
      min-height: 0;
      overflow-y: auto;
      overscroll-behavior: contain;   /* don't scroll the page at the ends */
      padding-bottom: 18px;
    }
    /* A quiet scrollbar — the default is a grey slab against the warm panel. */
    .sideNav::-webkit-scrollbar { width: 10px; }
    .sideNav::-webkit-scrollbar-thumb {
      background: var(--ghostLine); border-radius: 99px;
      border: 3px solid var(--panel);
    }
    .sideNav::-webkit-scrollbar-track { background: transparent; }
    .sideNavOverlay { background: rgba(46, 39, 35, 0.35); }

    /* Decorative bullets in front of every nav item. They marked nothing. */
    .mainNav button .sdot { display: none; }
    .sideNav .mainNav button { padding-left: 14px; }

    /* ---- top-bar navigation (technicians) ----
       Replaces the sidebar entirely for roles with a handful of destinations.
       The rail was rigid (fixed while the page scrolled), sat tight against
       the content, and spent 220px on two links. */
    .topbarNav { display: none; }
    body.topNavMode .topbarNav {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-left: 22px;
    }
    body.topNavMode .topbarNav button {
      background: none;
      border: none;
      border-radius: 9px;
      padding: 8px 14px;
      font-size: 14.5px;
      font-weight: 500;
      color: var(--muted);
      white-space: nowrap;
      cursor: pointer;
    }
    body.topNavMode .topbarNav button:hover { background: var(--panel); color: var(--ink); }
    body.topNavMode .topbarNav button.active {
      background: var(--primarySoft);
      color: var(--primaryDeep);
      font-weight: 600;
    }
    body.topNavMode .topbarNav button:focus-visible {
      outline: 2px solid var(--primary);
      outline-offset: 2px;
    }
    /* Technician hub v4 (2026-09-21): icon + label per section; the rail's
       status dot has no meaning in the bar. */
    body.topNavMode .topbarNav button { display: inline-flex; align-items: center; gap: 8px; }
    .topbarNav .sdot { display: none !important; }
    .topbarNav .navIcon {
      width: 16px; height: 16px; flex: none;
      fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
    }
    /* Technician hub v5 (2026-10-01): the section icon is a 26 px tile so the
       active section can fill it with its hue; the bar is 56 px like the
       Supervisor's; the logo sits on a 36 px tile. palette.css owns every
       colour here. */
    body.techNav .topbarNav .navIcon {
      width: 26px; height: 26px; padding: 5px; border-radius: 7px; box-sizing: border-box;
    }
    body.techNav .topbar { min-height: 56px; padding-top: 0; padding-bottom: 0; }
    body.techNav .topbarLogoMark { width: 36px; height: 36px; border-radius: 9px; padding: 3px; box-sizing: border-box; }
    body.techNav.topNavMode .topbarNav button { padding: 6px 12px 6px 7px; gap: 9px; }
    body:not(.techNav) #settingsFrameSection,
    body:not(.techNav) #settingsFrame { display: none; }
    /* An iPad in portrait: the brand keeps one line and the four sections
       keep their labels; the subtitle is the thing that goes. */
    @media (max-width: 1000px) {
      body.techNav .topbarLogoSub { display: none; }
      body.techNav .topbarLogoName { white-space: nowrap; }
      body.techNav .topbar { padding-left: 16px; padding-right: 16px; gap: 8px; }
      body.techNav.topNavMode .topbarNav { margin-left: 8px; }
      body.techNav.topNavMode .topbarNav button { padding: 6px 9px 6px 6px; font-size: 14px; }
    }
    /* The rail is gone, so the page reclaims its width — and the content stops
       starting hard against a border. */
    body.topNavMode .sideNav,
    body.topNavMode .sideNavOverlay,
    body.topNavMode .hamburgerBtn { display: none !important; }
    body.topNavMode .mainContent {
      width: 100%;
      margin-left: 0;
      padding: 16px 30px;
    }
    body.topNavMode.signedIn:not(.clientMode) { background: var(--bg); }
    @media (max-width: 720px) {
      body.topNavMode .topbarNav { margin-left: 8px; gap: 0; }
      body.topNavMode .topbarNav button { padding: 8px 10px; font-size: 14px; }
      body.topNavMode .mainContent { padding: 12px 16px; }
      body.topNavMode .topbarLogoSub { display: none; }
      /* Technicians on a phone: the four sections become a fixed bottom tab
         bar (icon over label, 44 px targets); the page keeps room for it. */
      body.topNavMode.techNav .topbarNav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        margin: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
        background: var(--card); border-top: 1px solid var(--line);
      }
      body.topNavMode.techNav .topbarNav button {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 3px; min-height: 52px; padding: 6px 4px; font-size: 11px; white-space: nowrap;
      }
      body.topNavMode.techNav .topbarNav .navIcon { width: 30px; height: 30px; padding: 6px; }
      body.topNavMode.techNav .mainContent { padding-bottom: 96px; }
    }
    /* The 220px rail stripe on the body background went with the rail itself
       (2026-08-16). `body { background: var(--bg) }` now paints the whole
       ground — leaving the gradient in place drew a grey column down the left
       of every supervisor screen for a sidebar that no longer exists. */
    /* Nav items are bare <button>s inside .mainNav (not links). */
    .sideNav .mainNav button {
      color: var(--inkSoft);
      background: none;
      border-radius: 8px;
      font-weight: 500;
      box-shadow: none;
    }
    .sideNav .mainNav button .sdot { background: var(--arrow); }
    .sideNav .mainNav button:hover { background: var(--lineSoft); color: var(--ink); }
    .sideNav .mainNav button.active {
      background: var(--primarySoft);
      color: var(--primaryDeep);
      font-weight: 600;
    }
    .sideNav .mainNav button.active .sdot { background: var(--primary); }

    /* ---- Settings ----
       Flat sections divided by a hairline, not cards inside cards inside
       cards. Two settings do not need three levels of container. */
    .setPage { max-width: 720px; padding: 34px 4px 80px; }
    /* The product typeface, at the scale of the other page headings; the
       serif and monospace faces here predated IBM Plex Sans (2026-09-11). */
    .setTitle {
      font-family: inherit; font-size: 24px; font-weight: 600;
      letter-spacing: -0.3px; margin: 0 0 8px; color: var(--ink);
    }
    .setBack {
      display: inline-flex; align-items: center; gap: 6px;
      margin: 0 0 14px; padding: 0; border: none; background: none;
      font: inherit; font-size: 14px; color: var(--muted); cursor: pointer;
    }
    /* Technicians view Settings inside topNavMode, whose layout rules pad
       .mainContent; a supervisor views it outside that mode, where the
       horizontal padding is 0 — leaving the page 4px from the viewport
       edge. Pad the page itself for that case only. */
    body:not(.topNavMode) .setPage { padding-left: 28px; padding-right: 28px; }
    .setBack:hover { color: var(--ink); }
    .setBack:focus-visible {
      outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px;
    }
    .setSection { padding: 26px 0; border-bottom: 1px solid var(--line); }
    .setSection:last-child { border-bottom: none; }
    .setLabel {
      margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.9px;
      text-transform: uppercase; color: var(--fainter);
    }
    .setHint { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }

    .setAccount { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
    .setAccountEmail { font-family: inherit; font-size: 15px; font-weight: 500; color: var(--ink); }
    .setAccountRole { font-size: 13.5px; color: var(--muted); }
    #pageSettings select {
      font: inherit; font-size: 14px; color: var(--ink); background: var(--card);
      border: 1px solid var(--inputLine); border-radius: 9px; padding: 10px 12px;
    }
    #pageSettings select:focus-visible {
      outline: 2px solid var(--primary); outline-offset: -1px;
    }

    /* Three accent choices on one neutral application frame. */
    .setPalette { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
    .setSwatch {
      display: flex; align-items: center; gap: 11px;
      padding: 12px 16px; cursor: pointer;
      border: 1.5px solid var(--line); border-radius: 11px;
      background: var(--card) !important; color: var(--ink) !important;
      font-weight: 500 !important;
    }
    .setSwatch:hover { border-color: var(--ghostLine); }
    .setSwatch.on { border-color: var(--primary); background: var(--primarySoft) !important; }
    .setSwatch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
    .setSwatchDots { display: flex; gap: 4px; }
    .setSwatchDot { width: 18px; height: 18px; border-radius: 99px; }
    .setSwatchName { font-size: 14.5px; font-weight: 600; display: block; }
    .setSwatchHint { font-size: 12.5px; color: var(--muted); display: block; font-weight: 400; }

/* ===== shell.css part 2 — was ui/index.html inline <style> at line 1751 ===== */
    /* Chrome while the client portal is mounted — clients only ever see this
       surface. Client portal v4 (2026-10-02): the bar takes the frame colour
       like the other roles, 56 px with the logo on a 36 px tile; palette.css
       owns every colour here. Signed-out and staff chrome untouched. */
    body.isClientPortalMounted { background: var(--bg); }
    /* The portal owns its page margins; the shell's 30 px on each side took the
       room the sample sheet needs on a 1280 or 1366 laptop. */
    body.isClientPortalMounted .mainContent { padding: 0; }
    body.isClientPortalMounted .topbar { background: var(--frame); border-bottom: 1px solid var(--frameLine); box-shadow: none; min-height: 56px; padding-top: 0; padding-bottom: 0; }
    body.isClientPortalMounted .topbarLogoMark { width: 36px; height: 36px; border-radius: 9px; padding: 3px; box-sizing: border-box; }
    .cpProfileOnly { display: none; }
    .staffProfileOnly { display: none; }
    body.signedIn:not(.clientMode) .staffProfileOnly { display: flex; }
    body.isClientPortalMounted .cpProfileOnly { display: flex; }
    /* Email + role live on the portal's Profile page for clients — the menu
       itself stays a menu. Staff chrome keeps both rows. */
    body.isClientPortalMounted #profileEmail,
    body.isClientPortalMounted #profileRole { display: none; }
    body.isClientPortalMounted .topbarLogoName { color: var(--frameInk); }
    body.isClientPortalMounted .topbarLogoSub { color: var(--frameMuted); }
    body.isClientPortalMounted .hamburgerBtn { color: var(--frameInk); }
    /* The design's header is quiet: logo + person. The status pills are
       staff-chrome noise for a client — hide them here, keep the avatar menu. */
    body.isClientPortalMounted .topbarPill { display: none; }
    body.isClientPortalMounted .topbarAvatar { background: var(--frameField); color: var(--frameInk); }
    body.isClientPortalMounted .topbarRoleLabel { color: var(--frameInk); }
    body.isClientPortalMounted .profileDropdown { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
    body.isClientPortalMounted .profileRow { color: var(--muted); }

/* ===== shell.css part 3 — was ui/index.html inline <style> at line 1792 ===== */
    /* The absorbed destinations still exist so their pages stay routable and
       their React apps keep mounting — they are simply not a rail any more. */
    .navAbsorbed { display: none !important; }

/* The technician workspace owns loading and access recovery at every width.
   Keep the existing phone browser menu only once its editor is ready. */
body[data-presentation="technician"] #legacyTopbar { display: none !important; }
@media (max-width: 700px), (max-height: 500px) and (max-width: 1000px) {
  body[data-presentation="technician"][data-workbench-ready="true"] #legacyTopbar { display: flex !important; }
}
