/* ============================================================
   STYLE.CSS - design tokens, reset, app shell
   ------------------------------------------------------------
   Loaded by EVERY page. Contains only chrome that is shared:
   colour tokens, the reset, body/sidebar/main layout, the top
   bar, cards, toasts, and the account menu + password modal.

   Feature-specific styling lives in dashboard.css.
   ============================================================ */
  :root{--bg:#eef5fc;--panel:#ffffff;--panel2:#e7f1fb;--border:#cfe3f5;--text:#0f2540;--muted:#5c7690;--accent:#2f7de1;--accent2:#5aa8f2;--green:#16a34a;--green2:#15803d;--red:#dc2626;--amber:#d97706;--amber2:#b45309;--blue:#2563eb;--purple:#7c3aed;/* A STICKY CELL MUST BE OPAQUE. --panel is a translucent sheet in the navy theme, so a column that stays put while the grid scrolls under it shows the grid THROUGH the name. These are the solid equivalents; here they are simply --panel and --panel2, which already are solid. */--stickybg:#ffffff;--stickybg2:#e7f1fb;}

  /* THE TIER INSIDE A CARD, and the reason it is not --panel2.
     --panel2 is the recessed tier on the PAGE: a field, a bar track,
     something cut into the body. These two are the recessed tier
     inside a .card, which is a different ground and, once the themes
     arrived, a different sum - theme.css paints its panels as glass,
     and a translucent tier laid over another translucent tier stacks
     rather than recedes. theme.css re-derives both per palette; these
     are the values for the plain sheet, where a card is opaque white
     and the arithmetic is just a colour.

     BOTH NAMES EXIST BECAUSE TWO SHEETS REACHED FOR THE SAME TIER
     INDEPENDENTLY - --card2 from dashboard.css (Risk's Discussion and
     Verify Trackers), --chip from this file (Crossteam's tray items
     and the reaction chips). Neither was ever defined, so every rule
     naming them has painted NOTHING since the day it was written: an
     undefined custom property is invalid at computed-value time, and
     background falls back to transparent rather than to the rule it
     would otherwise have inherited. One tier, one value, the second
     name an alias, so they cannot drift apart later. */
  :root{--card2:#f1f7fd;--chip:var(--card2);}
  *{box-sizing:border-box;margin:0;padding:0}
  body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text);display:flex;min-height:100vh}
  .sidebar{width:236px;flex-shrink:0;background:linear-gradient(180deg,#0d2c50,#0a2140);border-right:none;padding:16px 12px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}
  .nav{flex:1;overflow-y:auto;min-height:0}
  .sidefoot{border-top:1px solid rgba(255,255,255,.12);padding-top:8px;margin-top:8px}
  .sidefoot a{display:flex;align-items:center;gap:12px;padding:11px 13px;border-radius:10px;color:rgba(255,255,255,.62);text-decoration:none;font-size:14.5px;font-weight:600;cursor:pointer}
  .sidefoot a:hover{background:rgba(220,38,38,.16);color:#fca5a5}
  .brand{padding:6px 8px 16px;font-weight:800;font-size:16px;color:#fff}
  .nav a{display:flex;align-items:center;gap:12px;padding:11px 13px;border-radius:10px;color:rgba(255,255,255,.62);text-decoration:none;font-size:14.5px;font-weight:600;cursor:pointer;margin-bottom:3px}
  .nav a .ic{width:20px;text-align:center;font-size:15px}
  .nav a:hover{background:rgba(255,255,255,.08);color:#fff}
  .nav a.active{background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.16);box-shadow:none}
  .nav .soon{margin-left:auto;font-size:9px;font-weight:700;color:rgba(255,255,255,.5);background:rgba(255,255,255,.1);padding:2px 6px;border-radius:20px}
  .nav .navbadge{margin-left:auto;font-size:10px;font-weight:800;background:var(--red);color:#fff;border-radius:20px;padding:1px 7px}
  /* SOMEBODY WROTE YOUR NAME IN IT, as opposed to something merely
     arriving. Chien, 19 September 2026, asking for mentions to be
     findable rather than counted: "show a red number badge on the
     relevant place where the mention exists."

     A ring, not a second colour: the badge stays red because red is
     what says unread here, and a second red-ish shade beside it would
     read as a rendering fault rather than a distinction. Drawn with
     box-shadow so it costs no layout and cannot nudge the label it
     sits after.

     WHITE, NOT THE BACKGROUND COLOUR. The usual trick for this is a
     gap in the page's own colour and then the ring - but .sidebar is a
     navy GRADIENT and .nav a.active lays a translucent white over it,
     so there is no one value that matches behind the pill; it would
     be right at the top of the menu, wrong at the bottom, and wrong
     again on whichever item is open. A halo needs no such match. */
  .nav .navbadge-at{box-shadow:0 0 0 2px rgba(255,255,255,.85)}
  .main{flex:1;min-width:0;padding:22px 28px}
  .topbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px}

  /* ============================================================
     THE SIDEBAR ON A NARROW SCREEN

     It used to be `display:none` below 900px. That is not responsive,
     it is missing: the whole of the navigation - fourteen sections and
     the System Administration group - simply was not there, and there
     was nothing else on the page to reach it with. On a phone, or a
     half-width window on a laptop, the dashboard had one screen and no
     way off it.

     A DRAWER instead. Off-canvas, opened by the button in the top bar,
     closed by the backdrop, by Escape, or by picking a section - which
     is the one thing somebody opening it actually wants to do next.
     ============================================================ */

  /* Hidden above the breakpoint: on a desktop the sidebar is simply
     there, and a button that opens what is already open is a puzzle. */
  .navtoggle{display:none}
  .navscrim{display:none}

  @media(max-width:900px){
    .navtoggle{display:inline-flex;align-items:center;justify-content:center;
      width:38px;height:38px;flex-shrink:0;margin-right:2px;
      background:var(--panel);border:1px solid var(--border);
      border-radius:10px;font-size:17px;line-height:1;cursor:pointer;
      color:var(--text)}
    .navtoggle:hover{background:var(--panel2)}

    .sidebar{position:fixed;left:0;top:0;z-index:95;
      height:100vh;height:100dvh;
      width:min(84vw,300px);
      transform:translateX(-100%);transition:transform .18s ease;
      box-shadow:0 0 40px rgba(15,37,64,.35)}
    .sidebar.open{transform:none}

    /* The backdrop is the other half of the drawer: it says the page
       behind is not the thing being used, and it is the biggest and
       most obvious way to close it. */
    .navscrim{display:block;position:fixed;inset:0;z-index:90;
      background:rgba(15,37,64,.45);opacity:0;pointer-events:none;
      transition:opacity .18s ease}
    .navscrim.open{opacity:1;pointer-events:auto}

    /* The drawer is out of the flow, so the content takes the width. */
    body{display:block}
    .main{width:100%}
  }

  /* A drawer that cannot be animated away should not be animated in. */
  @media(prefers-reduced-motion:reduce){
    .sidebar,.navscrim{transition:none}
  }
  /* ICON + NAME. The header takes both from Permissions.labelFor,
     the same table the sidebar and the Quick Access cards read.
     inline-flex so the glyph sits on the text's baseline box
     rather than dragging the line height around, and the gap is
     the sidebar's, so the two read as the same label. */
  .topbar .pt{font-size:22px;font-weight:800;display:inline-flex;align-items:center;gap:9px;min-width:0}
  .topbar .pt .ic{font-size:19px;line-height:1;flex:none}
  .topbar .pt .ptname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .pttabs{display:flex;gap:7px}
  .pttabs button{background:var(--panel2);border:1px solid var(--border);color:var(--muted);padding:7px 15px;font-size:12.5px;font-weight:700;letter-spacing:.04em;border-radius:8px;cursor:pointer;font-family:inherit}
  .pttabs button:hover{color:var(--text);border-color:var(--accent)}
  .pttabs button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
  .pttabs button.on{background:linear-gradient(135deg,var(--accent),var(--accent2));border-color:var(--accent);color:#fff}
  .tbright{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .tbright select{background:var(--panel2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:6px 9px;font-size:12px;max-width:230px}
  .clock{font-variant-numeric:tabular-nums;color:var(--text);font-weight:700}
  .rolechip{font-size:10px;font-weight:700;padding:2px 8px;border-radius:20px}
  .rc-mgr{background:#ede9fe;color:#6d28d9} .rc-lead{background:#fef3c7;color:#92400e} .rc-agt{background:#e2e8f0;color:#475569}
  .bell{position:relative;background:var(--panel2);border:1px solid var(--border);color:var(--text);border-radius:9px;padding:5px 10px;font-size:15px;cursor:pointer}
  .bell:hover{border-color:var(--accent)}
  .badge-count{position:absolute;top:-7px;right:-7px;background:var(--red);color:#fff;font-size:10px;font-weight:800;min-width:17px;height:17px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px}
  .toast{position:fixed;right:20px;bottom:20px;background:var(--panel);border:1px solid rgba(47,125,225,.4);border-left:4px solid var(--accent);border-radius:10px;padding:12px 16px;font-size:13px;color:var(--text);box-shadow:0 10px 34px rgba(15,37,64,.18);z-index:100;max-width:330px}
  .toast .tt{font-weight:700;margin-bottom:2px}
  /* ONLY THE ONES GIVEN SOMEWHERE TO GO. App.toast adds `clickable`
     when, and only when, a caller hands it a third argument, so this
     cannot reach the 269 toasts that are plain announcements - on any
     department's screen. The Slack-reply pop-up is the one caller
     today. KC, 3 October 2026. */
  .toast.clickable{cursor:pointer}
  /* ---- Personal Chat ---- */
  /* A RIGHT-HAND DRAWER, not a popover. KC, 3 October 2026: it should
     read like Slack or Messenger. position:fixed takes it out of flow
     entirely, so opening it cannot reflow or resize the dashboard -
     the page underneath does not move at all.

     top:64px is the same offset .notifpanel uses: .topbar sits inside
     .main's 22px padding and is about 40px tall. The drawer stays
     there while the page scrolls, which is what makes it a drawer.

     THE TOAST CORNER IS LEFT ALONE. .toast is position:fixed at
     z-index 100, above this panel's 71, so a pop-up still appears and
     is still clickable over the drawer. Nothing about it changes.

     min(420px, 100vw) covers every width in one rule: 420 on a
     desktop, the whole screen on a narrow phone, with no media query
     and no horizontal overflow. */
  .chatpanel{position:fixed;right:0;top:64px;bottom:0;width:min(420px,100vw);background:var(--panel);border-left:1px solid var(--border);border-top:1px solid var(--border);border-radius:12px 0 0 0;box-shadow:-10px 0 34px rgba(15,37,64,.18);z-index:71;overflow:hidden;display:flex;flex-direction:column}
  /* Each view fills the drawer, so the list or the message history
     scrolls on its own and the composer stays on the floor. min-height:0
     is what lets a flex child actually shrink enough to scroll. */
  .chatview{flex:1;min-height:0;display:flex;flex-direction:column}
  .chatphead{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--border);font-weight:700;font-size:13px}
  .chatback{background:none;border:none;color:var(--text);cursor:pointer;font-size:16px;line-height:1;padding:0 2px;font-family:inherit}
  /* THE WAY OUT, AT THE TOP RIGHT. margin-left:auto is the whole of it:
     the list header holds nothing but a title beside this button, so
     without the push it sits against the word "Messages" and reads as
     punctuation rather than a control.

     The conversation header already pushes .chatlock right, and TWO auto
     margins SPLIT the free space between them - which would tear Keep
     away from the × and leave a gap down the middle of the header. So a
     × that follows Keep keeps its place beside it. Both still close the
     drawer outright; .chatback, to their left, is the one that only goes
     back to the list. */
  .chatclose{margin-left:auto;background:none;border:0;color:var(--muted);cursor:pointer;font-size:17px;line-height:1;padding:2px 4px;font-family:inherit}
  .chatclose:hover{color:var(--text)}
  .chatlock + .chatclose{margin-left:0}
  .chatpsearch{padding:8px 12px;border-bottom:1px solid var(--border)}
  .chatpsearch input{width:100%;background:var(--panel2);color:var(--text);border:1px solid var(--border);border-radius:9px;padding:7px 10px;font-size:12.5px;font-family:inherit}
  .chatplist{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;padding:4px}
  /* The row and its delete control, side by side. They are SIBLINGS
     because the row is itself a <button> and nesting one inside it is
     invalid - see convRow() in js/sections/chat.js. min-width:0 on the
     row is what lets the long names and previews inside it ellipsis
     rather than push the × off the edge. */
  .chatconvrow{display:flex;align-items:center;gap:2px}
  .chatconv{display:flex;align-items:center;gap:9px;width:100%;min-width:0;text-align:left;background:none;border:1px solid transparent;border-radius:9px;padding:7px 9px;cursor:pointer;color:var(--text);font-family:inherit;font-size:12.5px}
  .chatconv:hover{background:var(--panel2);border-color:var(--border)}
  .chatconvx{flex:0 0 auto;background:none;border:0;color:var(--muted);cursor:pointer;font-size:15px;line-height:1;padding:4px 6px;font-family:inherit;border-radius:7px;opacity:0}
  .chatconvx:hover,.chatconvx:focus-visible{color:var(--text);background:var(--panel2);opacity:1}
  /* Shown on hover, and ALWAYS once focused or on a touch screen -
     where there is no hover at all and an opacity:0 control would be
     simply unreachable. */
  .chatconvrow:hover .chatconvx,.chatconvrow:focus-within .chatconvx{opacity:1}
  @media (hover: none){.chatconvx{opacity:1}}
  .chatconvtext{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
  .chatconvtop{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
  .chatconvname{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .chatconvwhen{font-size:10.5px;color:var(--muted);flex:0 0 auto}
  .chatconvlast{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .chatconvbadge{flex:0 0 auto;background:var(--red);color:#fff;font-size:10px;font-weight:800;min-width:17px;height:17px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px}
  .chatkept{flex:0 0 auto;font-size:11px}
  .chatheadname{font-weight:700}
  .chatheaddept{font-size:11px;color:var(--muted);margin-left:6px;font-weight:400}
  .chatlock{margin-left:auto;background:none;border:1px solid var(--border);color:var(--muted);border-radius:8px;padding:3px 9px;font-size:11px;cursor:pointer;font-family:inherit;font-weight:400}
  .chatlock.on{border-color:var(--accent);color:var(--accent);font-weight:700}
  .chatmsgs{flex:1;min-height:0;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:7px}
  .chatmsg{display:flex}
  .chatmsg.mine{justify-content:flex-end}
  .chatbubble{max-width:78%;background:var(--panel2);border:1px solid var(--border);border-radius:11px;padding:7px 10px;font-size:12.5px}
  .chatmsg.mine .chatbubble{background:linear-gradient(135deg,var(--accent),var(--accent2));border-color:var(--accent);color:#fff}
  /* A withdrawn message. Muted and italic, with a dashed edge, so it
     reads as the SHAPE of something that is gone rather than as a
     message whose text happens to be "This message was deleted."
     The second rule is not decoration: .chatmsg.mine .chatbubble paints
     my own bubbles accent-on-white and outranks a single class, so
     without it my own tombstone would be white italics on a blue
     gradient. */
  .chatbubble.gone{background:none;border-style:dashed;color:var(--muted);font-style:italic}
  .chatmsg.mine .chatbubble.gone{background:none;border-color:var(--border);color:var(--muted)}
  .chattext{white-space:pre-wrap;word-break:break-word}
  .chatmeta{display:flex;align-items:center;gap:5px;justify-content:flex-end;font-size:10px;color:var(--muted);margin-top:2px}
  .chatmsg.mine .chatmeta{color:rgba(255,255,255,.85)}
  .chatx{background:none;border:none;color:inherit;cursor:pointer;font-size:13px;line-height:1;padding:0 1px;opacity:.65;font-family:inherit}
  .chatx:hover{opacity:1}
  .chatform{display:flex;gap:7px;padding:9px;border-top:1px solid var(--border);
    align-items:flex-end}
  /* The composer's own controls, beside the box rather than inside it:
     the textarea is a real textarea so that Enter, Shift+Enter and the
     browser's own spellcheck all keep working. */
  .chattools{display:flex;gap:4px;align-items:center}
  .chattool{background:none;border:1px solid var(--border);border-radius:8px;
    cursor:pointer;font-size:15px;line-height:1;padding:6px 8px;color:var(--text)}
  .chattool:hover{border-color:var(--accent)}
  .chattool[aria-expanded="true"]{border-color:var(--accent);
    background:var(--panel2)}
  /* ABOVE THE COMPOSER, INSIDE THE DRAWER. Capped and scrolling, so a
     long table never pushes the message box off a short screen. */
  .chatemoji{border-top:1px solid var(--border);background:var(--panel);
    padding:8px 9px;max-height:232px;display:flex;flex-direction:column;gap:6px}
  /* HIDDEN HAS TO BE SAID TWICE, and this line is why. The rule above
     sets display:flex; the browser hides [hidden] from its OWN
     stylesheet, and ANY author rule beats that whatever its
     specificity. So `panel.hidden = true` closed the picker in the DOM
     and left it on the screen: 49px tall, top border and background
     still drawn, an empty strip above the composer that reads as a
     half-broken picker. Measured in a browser, not reasoned about.
     Two other panels here already carry this line for the same
     reason - .edmoved, and .kpiesc .kpanel. */
  .chatemoji[hidden]{display:none}
  /* The search box and the way out, on one row. */
  .chatemojitop{display:flex;gap:6px;align-items:center}
  .chatemojitop .chatemojisearch{flex:1;min-width:0}
  .chatemojix{background:none;border:0;color:var(--muted);cursor:pointer;
    font-size:17px;line-height:1;padding:2px 7px;border-radius:6px}
  .chatemojix:hover{background:var(--panel2);color:var(--text)}
  .chatemojisearch{width:100%;box-sizing:border-box;background:var(--panel2);
    color:var(--text);border:1px solid var(--border);border-radius:8px;
    padding:5px 9px;font-size:12px;font-family:inherit}
  .chatemojigrid{overflow-y:auto;min-height:0}
  .chatemojihead{font-size:10.5px;font-weight:700;color:var(--muted);
    text-transform:uppercase;letter-spacing:.04em;margin:4px 0 3px}
  /* A GRID, NOT A WRAPPING ROW. This was display:flex with
     flex-wrap, which sizes each key to its own glyph - and emoji
     glyphs are not the same width: a flag is wider than a face and
     "100" wider still. The columns never lined up and every row
     started somewhere new. A grid of equal square cells fixes the
     columns; auto-fill keeps it sensible when the drawer is resized. */
  .chatemojirow{display:grid;gap:2px;
    grid-template-columns:repeat(auto-fill,minmax(34px,1fr))}
  .chatemojibtn{display:flex;align-items:center;justify-content:center;
    width:100%;aspect-ratio:1/1;padding:0;
    background:none;border:0;border-radius:6px;cursor:pointer;
    font-size:18px;line-height:1;
    /* ONE COLOUR EMOJI FONT, CHOSEN DELIBERATELY.

       Each platform's own colour emoji font is named, so exactly one
       of them ever matches and the whole grid is drawn by a single
       face. The generic at the end is a symbol font, not a UI text
       font: a text family here is what lets one stray glyph come back
       monochrome - a different weight and a different optical size -
       while its neighbours are in colour. That is the mixture this
       list exists to prevent.

       font-variant-emoji asks for the colour presentation outright on
       browsers that support it, and is ignored by the rest; it costs
       nothing either way.

       WHAT THIS CANNOT DO is make one machine draw another machine's
       artwork. Windows renders Segoe's designs, macOS renders Apple's.
       Matching a specific vendor's drawings everywhere needs a webfont
       shipped with the app, which was measured at 24.2 MB and
       deliberately not taken on. Consistency here means one font per
       machine, evenly sized and centred - not one design worldwide.

       The 232 characters themselves are untouched. */
    font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",
                "Twemoji Mozilla","Android Emoji","Segoe UI Symbol",
                sans-serif;
    font-variant-emoji:emoji}
  .chatemojibtn:hover{background:var(--panel2)}
  .chatemojinone{font-size:12px;color:var(--muted);padding:6px 2px}

  /* ---- attachments ---- */
  /* What is going up with the next message. */
  .chatpending{display:flex;flex-wrap:wrap;gap:6px;padding:8px 9px;
    border-top:1px solid var(--border)}
  .chatchip{display:flex;align-items:center;gap:6px;max-width:100%;
    background:var(--panel2);border:1px solid var(--border);
    border-radius:9px;padding:4px 6px}
  .chatchipimg{width:30px;height:30px;object-fit:cover;border-radius:6px}
  .chatchipicon{font-size:16px;line-height:1}
  .chatchiptext{display:flex;flex-direction:column;min-width:0;
    font-size:11.5px;max-width:150px}
  .chatchiptext{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .chatchipsize{color:var(--muted);font-size:10.5px}
  .chatchipx{background:none;border:0;color:var(--muted);cursor:pointer;
    font-size:15px;line-height:1;padding:0 2px}
  .chatchipx:hover{color:var(--red)}
  .chatchipwait{color:var(--muted);font-size:11.5px;padding:7px 8px}

  /* In the conversation. An image is shown; anything else is a chip
     that says what it is and downloads when clicked. */
  .chatatts{display:flex;flex-direction:column;gap:5px;margin-top:5px}
  .chatshot{display:block}
  .chatshot img{display:block;max-width:100%;max-height:260px;
    border-radius:8px;border:1px solid var(--border)}
  .chatfile{display:flex;align-items:center;gap:7px;text-decoration:none;
    background:var(--panel2);border:1px solid var(--border);
    border-radius:9px;padding:6px 8px;color:var(--text)}
  .chatfile:hover{border-color:var(--accent)}
  .chatfileicon{font-size:16px;line-height:1}
  .chatfilename{font-size:12px;overflow:hidden;text-overflow:ellipsis;
    white-space:nowrap;max-width:170px}
  .chatfilemeta{font-size:10.5px;color:var(--muted);margin-left:auto;
    white-space:nowrap}

  /* ---- @mentions ---- */
  .chatmention{border-top:1px solid var(--border);background:var(--panel);
    max-height:180px;overflow-y:auto}
  .chatmentionrow{display:flex;align-items:baseline;gap:8px;width:100%;
    background:none;border:0;cursor:pointer;text-align:left;
    padding:7px 10px;color:var(--text);font:inherit;font-size:12.5px}
  .chatmentionrow:hover,.chatmentionrow.on{background:var(--panel2)}
  .chatmentionname{font-weight:600}
  .chatmentiondept{font-size:11px;color:var(--muted);margin-left:auto}
  /* A name inside a message. Marked, not linked: it names a person,
     and there is nowhere to send somebody who clicks it. */
  .chatment{font-weight:600;color:var(--accent)}
  .chatment.me{background:var(--accent);color:var(--bg);
    border-radius:4px;padding:0 3px}

  /* Dropping a file anywhere on the drawer. */
  .chatdrag{outline:2px dashed var(--accent);outline-offset:-4px}
  .chatbody{flex:1;resize:none;background:var(--panel2);color:var(--text);border:1px solid var(--border);border-radius:9px;padding:7px 10px;font-size:12.5px;font-family:inherit}
  .chatmore{align-self:center;background:none;border:1px solid var(--border);color:var(--muted);border-radius:8px;padding:3px 10px;font-size:11px;cursor:pointer;font-family:inherit}
  .chatempty{color:var(--muted);font-size:12px;padding:18px 12px;text-align:center;line-height:1.5}

  .demo-note{font-size:11.5px;color:#92400e;background:linear-gradient(90deg,#fef3c7,#fffbeb);border:1px solid #fcd34d;border-radius:9px;padding:7px 12px;margin-bottom:18px}
  .section{display:none} .section.active{display:block}
  .card{background:var(--panel);border:1px solid var(--border);border-radius:16px;padding:22px;margin-bottom:20px;box-shadow:0 1px 3px rgba(15,37,64,.04)}
  .card h2{font-size:18px;font-weight:700;margin-bottom:4px;display:flex;align-items:center;gap:9px}
  .card .csub{color:var(--muted);font-size:12.5px;margin-bottom:16px}

  /* ---- Account menu & password modal ---- */
  input[type=checkbox]{width:auto;accent-color:var(--accent);cursor:pointer}
  .acctname{cursor:pointer;font-weight:700;color:var(--text);padding:5px 9px;border-radius:8px;display:inline-flex;align-items:center;gap:5px}
  .acctname:hover{background:var(--panel2)}
  .acctname .caret{font-size:9px;color:var(--muted)}
  .acctmenu{position:absolute;top:calc(100% + 6px);right:0;background:var(--panel);border:1px solid var(--border);border-radius:10px;box-shadow:0 10px 30px rgba(15,37,64,.14);min-width:170px;z-index:60;overflow:hidden}
  .acctmenu a{display:block;padding:10px 14px;font-size:13px;font-weight:600;color:var(--text);cursor:pointer;text-decoration:none}
  .acctmenu a:hover{background:var(--panel2)}
  /* PADDED, so a dialog does not run edge to edge on a phone. The box
     inside is max-width'd and centred, so on a desktop this changes
     nothing; on a 375px screen it is the difference between a card and
     a page. */
  .pwoverlay{position:fixed;inset:0;background:rgba(15,37,64,.35);display:flex;align-items:center;justify-content:center;z-index:80;padding:16px}
  .pwmodal{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:22px;width:100%;max-width:380px;box-shadow:0 10px 34px rgba(15,37,64,.18)}
  .pwmodal h3{font-size:16px;margin-bottom:3px}
  .pwmodal .sub{font-size:12.5px;color:var(--muted);margin-bottom:16px}
  /* A long elaboration must not push the buttons off the bottom of the
     screen. The modal scrolls; the page behind it does not. */
  .pwmodal{max-height:88vh;overflow:auto}

  /* THE FOOT OF A MODAL. `.pwrow` had no styles at all, so Cancel and
     Save sat hard against the left edge with no gap and no space above
     them - the buttons of a dialog reading as two words in a
     paragraph. Right-aligned, because the action people are reaching
     for is the last thing on the line. */
  .pwrow{display:flex;gap:10px;justify-content:flex-end;align-items:center;
    margin-top:20px}

  /* A MODAL THAT IS A FORM, not a question.

     The edit dialogs borrowed `.grp` from the toolbars, where it is
     only ever styled INSIDE .logbar, .toolbar or .bulk - so in a modal
     it carried nothing at all: labels ran inline with their inputs,
     every box was a different width, and a username wider than the
     input was simply cut off. This is the same design as the intake
     form (.bulk.ctform) rather than a second opinion about what a form
     looks like: label above, field full width, white so a box reads as
     one you may type in. */
  .pwmodal.editmodal{max-width:560px}
  .editform{display:flex;flex-direction:column;gap:15px}
  .editfield{display:flex;flex-direction:column;gap:6px}
  .editfield label{font-size:11px;color:var(--muted);text-transform:uppercase;
    letter-spacing:.4px;font-weight:700}
  .editfield input,.editfield select,.editfield textarea{
    width:100%;box-sizing:border-box;background:var(--panel);
    border:1px solid var(--border);border-radius:9px;padding:9px 11px;
    font:inherit;font-size:13px;color:var(--text)}
  .editfield textarea{min-height:132px;resize:vertical;line-height:1.5}
  .editfield input:focus,.editfield select:focus,.editfield textarea:focus{
    outline:none;border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(47,125,225,.15)}
  /* The one field somebody is most likely to be correcting reads as
     the subject of the dialog. */
  .editfield.wide input{font-weight:600}

  /* THE REMARK COLUMN on Session Log History. Quiet: the numbers are
     what the table is for, and a reason is the footnote to one of
     them. "Add a reason" only shows where somebody may actually write
     one - an empty cell they cannot fill is just noise. */
  .shrem{max-width:230px}
  .shrembtn{border:0;background:transparent;cursor:pointer;font:inherit;
    text-align:left;padding:2px 6px;border-radius:6px;width:100%}
  .shrembtn:hover{background:var(--panel2,#e7f1fb)}
  .shremtext{font-size:11.5px;color:var(--text);white-space:normal;
    display:block;line-height:1.35}
  .shremadd{font-size:11.5px;color:var(--muted);font-style:italic}

  /* CANCEL IS NOT DELETE. The edit dialogs reached for .rmbtn because
     it is the app's other button, and .rmbtn is the REMOVE style -
     red fill, red border. On a dialog whose other button saves, a red
     Cancel reads as "discard this record", which is a different and
     much worse thing than "close this box". Neutral, and quiet beside
     the action somebody actually came for. */
  .ghostbtn{background:var(--panel);color:var(--muted);
    border:1px solid var(--border);border-radius:9px;padding:9px 16px;
    font:inherit;font-size:13px;font-weight:700;cursor:pointer}
  .ghostbtn:hover{background:var(--panel2);color:var(--text)}
  .editmodal .applybtn{padding:9px 20px}

  /* ============================================================
     ADDITIONS FOR THE MULTI-PAGE / ROLE-AWARE SHELL
     Everything above this line is carried over unchanged.
     ============================================================ */

  /* Role chips for the 5-level hierarchy. rc-lead already exists
     above and is reused for all three Team Leader tiers. */
  .rc-admin{background:#fee2e2;color:#b91c1c}
  /* Senior Specialist is level 2 like a Team Leader, so it gets a chip
     of its own rather than reusing rc-lead: on a Staff List the two
     ranks are equal and the roles are not, and one amber chip for both
     would hide exactly the distinction the role was created to make. */
  .rc-senior{background:#dcfce7;color:#15803d}
  .rc-spec{background:#dbeafe;color:#1d4ed8}
  .rc-jr{background:#e2e8f0;color:#475569}
  .rc-trans{background:#ede9fe;color:#6d28d9}

  /* Sidebar group heading for the Admin-only System Administration block */
  .navgroup{margin:16px 0 6px;padding:0 13px;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.38)}
  .navempty{padding:14px 13px;font-size:12.5px;color:rgba(255,255,255,.5);line-height:1.5}
  .nav a.navlink{text-decoration:none}

  .acctwrap{position:relative;display:inline-block}
  .tbright .sep{color:var(--muted)}

  /* Notification tray */
  .notifpanel{position:absolute;right:28px;top:64px;width:320px;background:var(--panel);border:1px solid var(--border);border-radius:12px;box-shadow:0 10px 34px rgba(15,37,64,.18);z-index:70;overflow:hidden}
  .notifhead{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--border);font-size:13px;font-weight:800}
  .notifclear{background:none;border:0;color:var(--accent);font-size:12px;font-weight:700;cursor:pointer;font-family:inherit}
  /* MENTIONS | THREADS | UPDATES. Equal thirds, because which one is
     longest is not a reason for it to be wider, and a strip that
     reflows as counts change is a strip whose buttons move under the
     cursor. The count rides on the label rather than sitting beside it:
     the tray is 320px and three numbers in their own column would take
     the room the words need. */
  .notiftabs{display:flex;border-bottom:1px solid var(--border)}
  .notiftab{flex:1 1 0;background:none;border:0;border-bottom:2px solid
    transparent;padding:8px 4px;font:inherit;font-size:12px;font-weight:700;
    color:var(--muted);cursor:pointer;white-space:nowrap}
  .notiftab.on{color:var(--accent);border-bottom-color:var(--accent)}
  .notiftab:hover{color:var(--text)}
  .notiftabn{margin-left:5px;font-size:11px;font-weight:800;
    background:var(--accent);color:#fff;border-radius:9px;padding:1px 6px}
  .notiftab.on .notiftabn{background:var(--accent)}
  .notiflist{max-height:340px;overflow-y:auto}

  /* THE THREADS WINDOW. A place to go back to, rather than a bell that
     empties as you read it. Sits BELOW .pwoverlay's own 80 so the
     tracker panel opened from a row lands on top of it and the list is
     still there when that panel closes - which is the whole point. */
  .throverlay{z-index:78;align-items:flex-start;padding-top:56px}
  .thrmodal{max-width:min(760px,94vw);padding:20px 22px 16px}
  .thrmodal h3{font-size:18px;margin-bottom:3px}
  .thrmodal .sub{font-size:12.5px;color:var(--muted);margin-bottom:12px;
    max-width:62ch}
  .thrmodal .notiftabs{margin-bottom:2px}
  .thrlist{max-height:min(62vh,560px);overflow-y:auto;margin:0 -22px -16px;
    padding:0 6px 8px}
  /* One row per conversation. A button, because every one of them opens
     something; read and unread differ by weight rather than by colour,
     so a long list does not read as a wall of alerts. */
  .thrrow{display:block;width:100%;text-align:left;background:none;border:0;
    border-bottom:1px solid var(--border);padding:11px 16px;font:inherit;
    cursor:pointer;color:inherit}
  .thrrow:last-child{border-bottom:0}
  .thrrow:hover{background:var(--panel2)}
  .thrtop{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;
    font-size:11.5px;color:var(--muted)}
  .thrwhere{font-weight:700;color:var(--text);font-size:12.5px}
  .thrwhen{margin-left:auto;flex:none}
  .thrn{background:var(--accent);color:#fff;border-radius:9px;
    padding:1px 7px;font-size:10.5px;font-weight:800}
  .thrtag{background:var(--amber);color:#fff;border-radius:9px;
    padding:1px 7px;font-size:10.5px;font-weight:800}
  .thrbody{font-size:13px;line-height:1.5;margin-top:3px;
    color:var(--muted);word-break:break-word}
  .thrrow.unread .thrbody{color:var(--text)}
  .notifempty{padding:22px 14px;text-align:center;color:var(--muted);font-size:12.5px}
  /* Tray items. A Slack-reply item is a button because it opens the
     conversation it is telling you about; an announcement item is not,
     because there is nothing to open. They are styled the same so the
     tray does not look like two different lists. */
  .notifitem{display:block;width:100%;text-align:left;background:none;border:0;
    border-bottom:1px solid var(--border);padding:11px 14px;font:inherit;color:inherit}
  .notifitem:last-child{border-bottom:none}
  .notifesc{cursor:pointer}
  .notifesc:hover{background:var(--panel2)}
  .notiftop{display:flex;align-items:baseline;gap:6px;font-size:12.5px;font-weight:700}
  .notifwhen{margin-left:auto;font-size:10.5px;color:var(--muted);font-weight:600;
    white-space:nowrap}
  .notifbody{font-size:11.5px;color:var(--muted);margin-top:3px;line-height:1.45;
    overflow-wrap:anywhere}
  /* A Slack reply on a thread you followed up on. Clickable like the
     escalation one, and it names its tracker: four of them feed this
     list now, across two dashboards, so "New reply · W32683" on its own
     would not say where to look. */
  .notifthread{cursor:pointer}
  .notifthread:hover{background:var(--panel2)}
  .notifwhere{margin-top:4px;font-size:10px;font-weight:700;color:var(--muted);
    text-transform:uppercase;letter-spacing:.04em}

  /* ---- what has already been read ----

     The tray used to empty itself: every source in it answers "what is
     UNREAD", so reading something removed it and the panel said
     "Nothing new." It keeps a short history now, and this is what
     separates the two - the unread ones have to still read as the
     thing to deal with.

     Dimmed rather than hidden or greyed out entirely: an entry here is
     still worth opening, which is the whole reason it was kept, so it
     must not look disabled. */
  .notifdiv{padding:7px 14px 5px;font-size:10px;font-weight:800;
    letter-spacing:.08em;text-transform:uppercase;color:var(--muted);
    background:var(--panel2);border-bottom:1px solid var(--border)}
  .notifread{opacity:.62}
  .notifread:hover{opacity:1}
  .notifread .notiftop{font-weight:600}

  /* Permission gating: data-perm-mode="disable" */
  .perm-disabled{opacity:.45;cursor:not-allowed;filter:grayscale(1)}

  /* Component load failure */
  .loaderr{padding:10px 14px;background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;border-radius:8px;font-size:12.5px}

  /* Avoid a flash of unstyled/ungated content before Access.apply() runs */
  body:not(.ready) .main{opacity:0}
  body.ready .main{opacity:1;transition:opacity .12s ease}
  /* Environment badge (staging / local) so nobody confuses it with production */
  .envbadge{
    font-size:10px;font-weight:800;letter-spacing:.08em;
    background:var(--amber);color:#fff;
    padding:3px 9px;border-radius:20px;white-space:nowrap;
    align-self:center;
  }
  /* "You are running an older copy" — shown when the app detects that the
     js/app.js it is running differs from the one on the server. Sits above
     everything because a stale page can misrepresent anything below it. */
  .updbanner{display:flex;align-items:center;gap:12px;flex-wrap:wrap;
    padding:10px 16px;background:#fef3c7;border-bottom:1px solid #f59e0b;
    color:#78350f;font-size:13px;position:sticky;top:0;z-index:120}
  .updbanner b{color:#78350f}
  .updbanner button{margin:0}

  /* The zone beside the topbar clock. Once two zones are possible, a bare
     time on screen is ambiguous — this is what removes the ambiguity. */
  .tzbadge{font-size:10.5px;font-weight:800;color:var(--muted);
    background:var(--panel2);border:1px solid var(--border);
    border-radius:20px;padding:1px 7px;margin-left:6px;white-space:nowrap}
  .tznote{font-size:11.5px;color:var(--muted);line-height:1.5;margin-top:10px;
    background:var(--panel2);border:1px solid var(--border);
    border-radius:9px;padding:9px 11px}

  /* A credential shown once, meant to be read aloud or copied. Monospace
     with wide letter-spacing because it will be dictated across a floor,
     and O/0 confusion is why somebody gets locked out. */
  .pwshow{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    font-size:14px;background:var(--panel2);border:1px solid var(--border);
    border-radius:10px;padding:10px 12px;user-select:all;word-break:break-all}
  .pwshow.pwbig{font-size:19px;font-weight:700;letter-spacing:1.5px;
    color:var(--accent);text-align:center}

  /* Staff List: the tab strip and the one action that is not about an
     existing row. Wraps on a narrow screen rather than pushing the
     button off the card. */
  .stafftabrow{display:flex;align-items:center;justify-content:space-between;
    gap:12px;flex-wrap:wrap;margin-bottom:16px}
  .stafftabrow #staffCreate:empty{display:none}

  /* A checkbox that reads as one line rather than as a stray control.
     Used by the New member form. */
  .mkcheck{display:flex;align-items:center;gap:8px;margin:2px 0 10px;
    font-size:12.5px;font-weight:600;color:var(--text);cursor:pointer}
  .mkcheck input{width:16px;height:16px;margin:0;accent-color:var(--accent);cursor:pointer}

  /* Staff List: how somebody signs in, under their address. */
  .stsignin{margin-top:3px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;
    font-weight:400}
  .stsignin .stuser{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    font-size:11px;color:var(--text);background:var(--panel2);
    border:1px solid var(--border);border-radius:6px;padding:1px 6px}
  .stsignin .tag{font-size:9.5px;padding:1px 6px}

  /* ---- Request Cross Team ---- */
  .cttabs{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
  .cttab{border:1px solid var(--border);background:var(--panel);border-radius:8px;padding:6px 14px;font-weight:700;font-size:12px;cursor:pointer;color:var(--muted)}
  .cttab.on{background:var(--blue);border-color:var(--blue);color:#fff}
  /* A group the bot cannot post to yet. Marked on the tab as well as
     inside, so it is visible before the tab is opened. */
  .ctdot{color:var(--red);font-size:9px;vertical-align:middle}
  .ctrefresh{margin-left:auto;border:1px solid var(--border);background:transparent;border-radius:8px;padding:5px 10px;font-size:11px;cursor:pointer;color:var(--muted)}
  .cthelp{color:var(--muted);font-size:12px;margin-bottom:10px}
  /* ONE COLUMN. .bulk supplies the panel, the uppercase labels and the
     stacked .grp fields - the same ones the escalation intake uses, so
     the two forms are one design rather than two opinions. Only the
     column direction and the full-width inputs are added here; .bulk
     itself lays out in a row, which is right for its other callers. */
  .bulk.ctform{flex-direction:column;align-items:stretch;gap:12px}
  .bulk.ctform .grp{width:100%}
  /* WHITE, so a box reads as one you may type in.
     The base rule paints select and input --panel2, which is the same
     tint .bulk uses for its own panel - so every field disappeared into
     the background and the form looked like a summary of something
     already filled in rather than something to fill in. .mmg and .swg
     already override it to --panel for the same reason; this follows
     them rather than inventing a third answer. */
  .bulk.ctform input,.bulk.ctform select,.bulk.ctform textarea{
    width:100%;box-sizing:border-box;background:var(--panel)}
  /* The chip picker is the control, and its inner select is
     borderless - so the box gets the white and the select stays
     transparent inside it. */
  .bulk.ctform .msel{background:var(--panel)}
  .bulk.ctform .msel .mseladd{background:transparent;width:auto}
  .bulk.ctform textarea{min-height:84px}
  .ctspacer{flex:1}
  .ctopts{display:flex;flex-wrap:wrap;gap:10px;padding-top:4px}
  .ctchk{display:inline-flex;align-items:center;gap:6px;font-size:12px}
  .opt{color:var(--muted);font-weight:400}
  .ctactions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;
             margin-top:14px;padding-top:12px;
             border-top:1px solid var(--border)}
  .ctpaste{color:var(--muted);font-size:11px}
  .ctas{color:var(--muted);font-size:11px}
  .cttray{display:flex;gap:6px;flex-wrap:wrap}
  .cttrayitem{background:var(--chip);border:1px solid var(--border);border-radius:6px;padding:2px 6px;font-size:11px}
  .cttrayitem button{border:0;background:transparent;cursor:pointer;color:var(--red)}
  .ctwarn{background:#fff7ed;border:1px solid #fdba74;color:#9a3412;border-radius:8px;padding:10px 12px;font-size:12px;margin-bottom:10px}
  .ctlink{color:#1d4ed8;font-weight:600;white-space:nowrap}
  .ctchan{color:var(--muted);font-size:11px}
  .ctfollow{border:1px solid var(--border);background:transparent;border-radius:6px;padding:3px 8px;font-size:11px;cursor:pointer;margin-top:4px}
  .ctfollowpanel{max-width:640px;width:92vw}
  /* A pasted screenshot, drawn in the thread rather than counted.
     Capped in height so eight of them stay scrollable instead of
     turning the panel into a gallery. */
  .ctfiles{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
  .ctshot{max-width:170px;max-height:120px;border:1px solid var(--border);border-radius:6px;display:block;object-fit:cover}
  .cthint{font-size:11px;color:var(--muted);margin:4px 0 0}
  /* Looking through the list: a username box and a group picker, sat
     above the rows rather than inside the scrolling area, so they stay
     put while the table scrolls under them. */
  .ctfilter{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 10px}
  .ctfilter input[type=search]{flex:1 1 220px;max-width:280px;padding:6px 10px;border:1px solid var(--border);border-radius:6px;font-size:13px;background:var(--card);color:inherit}
  .ctfilter select{padding:6px 10px;border:1px solid var(--border);border-radius:6px;font-size:13px;background:var(--card);color:inherit}
  .ctcount{color:var(--muted);font-size:12px;margin-left:auto}
  .ctthread{max-height:46vh;overflow:auto;border:1px solid var(--border);border-radius:8px;padding:10px;margin:10px 0}
  .ctmsg{padding:8px 0;border-bottom:1px solid var(--border)}
  .ctmsg:last-child{border-bottom:0}
  .ctmsg.parent{background:var(--chip);border-radius:6px;padding:8px}
  .ctwho{font-weight:700;font-size:12px}
  /* The clock beside a reply's author, and the logged time under an
     escalation date: both are the quieter half of the line they sit
     on, so neither competes with the name or the date. */
  .ctwhen{font-weight:400;font-size:11px;color:var(--muted);margin-left:6px}
  .escwhen{font-size:11px;color:var(--muted);font-weight:400;margin-top:2px}
  .cttext{font-size:12px;white-space:pre-wrap}
  /* EDIT AND DELETE, ON A MESSAGE THE DASHBOARD POSTED.

     VISIBLE, not revealed on hover. The escalation panel had these
     from the start at opacity:0 until the row was hovered, on the
     reasoning that a conversation is for reading and two buttons on
     every line compete with the words. It was reported as the feature
     not existing - which is what a control nobody can see is. They are
     quiet instead: muted, small, and only on the few messages that are
     actually ours. */
  .ctmsgedit,.ctmsgdel{border:0;background:transparent;cursor:pointer;
    font:inherit;font-size:11px;font-weight:600;padding:1px 5px;
    border-radius:5px;color:var(--muted)}
  .ctmsgedit:hover{background:var(--chip);color:var(--text)}
  .ctmsgdel:hover{background:#fdeaea;color:#c0392b}
  .ctmsgeditor textarea{width:100%;min-height:70px;font:inherit;
    font-size:12px}
  .ctmsgeditrow{display:flex;gap:8px;justify-content:flex-end;
    margin-top:6px}
  .ctfiles{color:var(--muted);font-size:11px}
  /* The tick is how these teams say "done", so it reads as a chip
     rather than as part of the sentence next to it. */
  .ctemoji{margin-left:8px}
  .ctreact{background:var(--chip);border:1px solid var(--border);border-radius:10px;padding:1px 6px;font-size:10px;margin-right:4px}

  /* ---- General · from Slack (read-only HR notices) ---- */
  .gfcard{margin-top:14px}
  .gfmsg{border-left:3px solid var(--accent);background:var(--panel);
         border:1px solid var(--border);border-left-width:3px;
         border-radius:8px;padding:12px 14px;margin-bottom:10px}
  .gfwho{font-weight:700;font-size:12.5px;display:flex;gap:10px;
         align-items:baseline}
  .gfwhen{color:var(--muted);font-weight:400;font-size:11.5px}
  /* HR notices run to twenty lines and carry their own paragraphing,
     so the whitespace in the message is kept rather than collapsed. */
  .gftext{font-size:13px;line-height:1.6;margin-top:4px}
  .gftext b{font-weight:700}
  /* Slack's own markup, carried through. A campaign post is written in
     Slack's editor and read here, so italic, strikethrough, code and
     quotes have to survive the trip or the Dashboard is showing
     something different from what the Promotion team wrote. */
  .gftext i{font-style:italic}
  .gftext s{text-decoration:line-through;opacity:.75}
  .gfmono{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;
          background:var(--chip);border:1px solid var(--border);
          border-radius:4px;padding:0 4px}
  .gfcode{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;
          background:var(--chip);border:1px solid var(--border);
          border-radius:6px;padding:8px 10px;margin:6px 0;
          white-space:pre-wrap;overflow-x:auto}
  .gfquote{display:block;border-left:3px solid var(--border);
           padding-left:10px;margin:2px 0;color:var(--muted)}
  /* A bullet line from Slack. The marker is drawn here rather than kept
     in the text, so the indent survives: HTML collapses the leading
     spaces Slack sends, which flattened every nested list - the Auto
     Rebate "By site" breakdown arrived as one undifferentiated block.
     The per-line indent is an inline style because the depth comes from
     the post, not from a class we could know in advance. */
  /* A post's Slack thread, and the box that adds to it. Every colour is
     a token, so it follows Light/Dark with everything else. */
  .gfthread{margin-top:8px}
  .gfreplies{background:none;border:0;padding:2px 0;cursor:pointer;
             font:inherit;font-size:11.5px;font-weight:700;
             color:var(--accent,#2f6fd0)}
  .gfreplies:hover{text-decoration:underline}
  .gfreps{margin:6px 0 0;padding-left:10px;
          border-left:2px solid var(--border)}
  .gfrep{margin:6px 0}
  .gfquiet{color:var(--muted);font-size:11.5px;margin:4px 0}
  /* THE NOTICE. Not a muted aside: these channels carry people from
     outside the company, and the sentence is the reason the rank gate
     exists. It sits above the box so it is read before anything is
     typed, not after. */
  .gfwarn{margin:8px 0 4px;padding:5px 9px;border-radius:7px;
          background:var(--chip);border:1px solid var(--border);
          color:var(--text);font-size:11.5px;font-weight:600}
  .gftest{border-color:#d1483f;color:#d1483f}
  .gfreplybox{display:flex;gap:7px;align-items:flex-start}
  .gfreplyin{flex:1;min-width:0;resize:vertical;font:inherit;
             font-size:12.5px;padding:6px 8px;border-radius:7px;
             border:1px solid var(--border);background:var(--panel2);
             color:var(--text)}
  .gfsend{padding:6px 14px;border-radius:7px;cursor:pointer;
          border:1px solid var(--accent,#2f6fd0);
          background:var(--accent,#2f6fd0);color:#fff;
          font:inherit;font-size:12.5px;font-weight:700}
  .gfsend[disabled]{opacity:.6;cursor:default}

  .gfbullet{display:block;position:relative;margin:1px 0;padding-left:14px}
  .gfbullet::before{content:"\2022";position:absolute;left:2px;
                    color:var(--muted)}
  /* Slack is the source of truth, so a post's words can change under
     its original timestamp. Said quietly, beside the date. */
  .gfedit{color:var(--muted);font-weight:400;font-size:11px;
          font-style:italic;margin-left:6px}
  /* HOW MANY ARE NEW, on the card rather than only behind the bell.
     Same red as the menu badge it agrees with - one number, two places,
     and both clear when the screen is opened. */
  /* The Announcements tabs. Three panels that used to stack, so a
     campaign post twenty lines long no longer pushes HR's notices off
     the bottom of the page. */
  .anntabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
  .anntab{display:inline-flex;align-items:center;gap:7px;
          padding:7px 14px;border-radius:9px;cursor:pointer;
          border:1px solid var(--border);background:var(--panel);
          color:var(--muted);font-size:13px;font-weight:600;
          font-family:inherit}
  .anntab:hover{border-color:#9dbdf0}
  .anntab.on{background:var(--accent,#2f6fd0);border-color:var(--accent,#2f6fd0);
             color:#fff}
  /* The unread count, ON the tab. A red number behind a tab nobody has
     opened tells nobody anything. */
  .anntabn{display:inline-block;min-width:18px;padding:0 6px;
           border-radius:9px;background:#d1483f;color:#fff;
           font-size:11px;font-weight:700;line-height:18px;
           text-align:center}
  .anntab.on .anntabn{background:#fff;color:#d1483f}

  /* THE BRAND SWITCH inside the Auto Rebate tab. A second row of
     controls under the tab strip, so it has to read as subordinate to
     it rather than as a second set of tabs: smaller, pill-shaped, and
     outlined when active instead of filled. Every colour is a token,
     so it follows Light/Dark with everything else. */
  .arbrands{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px}
  .arbrand{display:inline-flex;align-items:center;gap:6px;
           padding:4px 12px;border-radius:999px;cursor:pointer;
           border:1px solid var(--border);background:var(--panel);
           color:var(--muted);font-size:12px;font-weight:700;
           font-family:inherit;letter-spacing:.02em}
  .arbrand:hover{border-color:#9dbdf0}
  .arbrand.on{border-color:var(--accent,#2f6fd0);
              color:var(--accent,#2f6fd0);background:var(--panel2)}
  /* The other brand's unread, ON the brand button - the tab's own
     number is both brands added together, so without this there is no
     way to tell which side it is on. */
  .arcount{display:inline-block;min-width:16px;padding:0 5px;
           border-radius:9px;background:#d1483f;color:#fff;
           font-size:10.5px;font-weight:700;line-height:16px;
           text-align:center}

  .gfbadge{display:inline-block;min-width:18px;padding:0 6px;
           border-radius:9px;background:#d1483f;color:#fff;
           font-size:11.5px;font-weight:700;line-height:18px;
           text-align:center;vertical-align:middle}
  .gffiles{color:var(--muted);font-size:11.5px;margin-top:6px}
  .gfreacts{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
  .gfreact{background:var(--chip);border:1px solid var(--border);
           border-radius:10px;padding:1px 7px;font-size:10.5px}

  /* Attachments on a General notice. HR's promotion posts carry four
     cards with people's faces on them; a row of thumbnails is how they
     read, and each opens full size in a tab. */
  .gfshots{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
  .gfshot{max-height:150px;max-width:230px;border:1px solid var(--border);
          border-radius:8px;display:block;background:var(--panel2)}
  .gfshot:hover{border-color:#9dbdf0}
  /* A NEW CLASS, used by nothing else: a Slack attachment that would
     not load, standing in for the browser's broken-image icon. Dashed
     because it marks an absence - see wireShots in
     js/sections/generalfeed.js. */
  .gfgone{display:inline-flex;align-items:center;max-width:230px;
          padding:7px 11px;border:1px dashed var(--border);
          border-radius:8px;background:var(--panel2);color:var(--muted);
          font-size:12px;line-height:1.3}

  /* Search inside a mirrored feed. Forty campaigns and somebody is
     looking for one promo code in one of them. */
  .gfsearch{display:flex;align-items:center;gap:10px;margin:10px 0 12px}
  .gfsearch input{flex:1;min-width:0;padding:7px 11px;border-radius:8px;
                  border:1px solid var(--border);background:var(--panel2,var(--panel));
                  color:inherit;font-size:13px;font-family:inherit}
  .gfsearch input:focus{outline:none;border-color:#9dbdf0}
  .gfcount{color:var(--muted);font-size:11.5px;white-space:nowrap}
  .gfclear{margin-left:6px;padding:2px 9px;border-radius:7px;cursor:pointer;
           border:1px solid var(--border);background:var(--chip);
           color:inherit;font-size:11.5px;font-family:inherit}
  /* Unread, per post. The same red the tab and the menu badge use, so
     one thing being new says so in one colour everywhere. */
  .gfmsg.unread{border-left-color:#d1483f}
  .gfnew{margin-left:auto;background:#d1483f;color:#fff;border-radius:9px;
         padding:0 8px;font-size:10.5px;font-weight:700;line-height:17px}

  /* ---- Follow-ups under a Promotion Update campaign ----

     EVERY TOKEN IS ONE THE CARD ABOVE ALREADY USES. The panel went dark
     on 2 October and these rules must follow the theme with it, so
     nothing here is a literal colour except the one red that already
     means `new` everywhere on this page.

     Scoped under .gfmsg, which only a mirrored post draws - so these
     cannot reach the dashboard's own announcements, and #general shows
     no block to style. */
  .gfmsg .prwrap{margin-top:10px;border-top:1px solid var(--border);
                 padding-top:8px}
  .prtoggle{background:none;border:0;padding:0;cursor:pointer;
            color:var(--muted);font-size:11.5px;font-weight:600;
            font-family:inherit}
  .prtoggle:hover{color:var(--ink)}
  .prlist{margin-top:8px;display:flex;flex-direction:column;gap:8px}
  .prrow{background:var(--chip);border:1px solid var(--border);
         border-radius:7px;padding:8px 10px}
  .prwho{font-weight:700;font-size:12px;display:flex;gap:8px;
         align-items:baseline}
  .prwhen{color:var(--muted);font-weight:400;font-size:11px}
  .prbtns{margin-left:auto;display:flex;gap:8px}
  .prlink{background:none;border:0;padding:0;cursor:pointer;
          color:var(--muted);font-size:11px;font-family:inherit}
  .prlink:hover{text-decoration:underline;color:var(--ink)}
  .prbody{font-size:12.5px;line-height:1.55;margin-top:4px;
          word-break:break-word}
  /* A name somebody was tagged by. The accent rather than a box: a
     follow-up is three lines and a chip in the middle of it reads as a
     button that does nothing. */
  .prat{color:var(--accent);font-weight:600}
  /* A withdrawn follow-up keeps its place in the conversation and says
     so. No author line: who wrote it is in the audit log, which is
     where somebody has to be entitled to look. */
  .prgone{color:var(--muted);font-style:italic;font-size:12px}
  .prshot{display:inline-block;margin-top:6px}
  .prshot img{max-width:260px;max-height:200px;border-radius:6px;
              border:1px solid var(--border);display:block}
  .prnew{margin-top:8px;position:relative}
  .prta,.predit{width:100%;box-sizing:border-box;resize:vertical;
                background:var(--panel);color:var(--ink);
                border:1px solid var(--border);border-radius:7px;
                padding:7px 9px;font-size:12.5px;font-family:inherit}
  .pract{display:flex;gap:8px;align-items:center;margin-top:6px}
  /* The real input is hidden and its LABEL is the button - a file
     input cannot be styled and `accept` still has to be on the input
     itself for the picker to filter. */
  .prfile{position:absolute;width:1px;height:1px;opacity:0;
          pointer-events:none}
  .prclip{cursor:pointer;color:var(--muted);font-size:11.5px}
  .prclip:hover{color:var(--ink)}
  .prchosen{color:var(--muted);font-size:11px;max-width:180px;
            overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .pract .applybtn{margin-left:auto}
  /* The @ picker, positioned over the composer like the trackers'. */
  .prment{position:absolute;z-index:40;left:0;right:0;top:100%;
          background:var(--panel);border:1px solid var(--border);
          border-radius:7px;max-height:180px;overflow:auto}

  /* ============================================================
     THE SIDEBAR, COLLAPSED TO ICONS

     Fourteen sections and a System Administration group is a tall menu,
     and on a laptop it takes 236px from the screen somebody is reading.
     Collapsed it keeps the icons and the badges - still navigable, just
     no longer spending a quarter of the width saying so.

     ABOVE THE BREAKPOINT ONLY. Below 900px the sidebar is already a
     drawer that is off-screen entirely; collapsing something that is
     not there would be a control with nothing to do, and worse, would
     fight the drawer for the same element.

     THE LABELS GO WITH font-size:0 rather than display:none, because
     each one is a bare text node beside its icon span - navigation.js
     builds '<span class="ic">…</span> Name' - and there is no element
     to hide. The icon and the badge get their size back explicitly.
     ============================================================ */
  @media(min-width:901px){
    .navmini .sidebar{width:68px;padding:16px 8px}
    .navmini .brand{font-size:0;padding:6px 0 16px;text-align:center}
    .navmini .brand::before{content:"AI";font-size:15px;font-weight:800;
                            color:#fff;letter-spacing:.02em}
    .navmini .nav a,.navmini .sidefoot a{
      font-size:0;gap:0;justify-content:center;padding:11px 0;
      position:relative}
    .navmini .nav a .ic,.navmini .sidefoot a .ic{font-size:16px;width:auto}
    /* The count still has to be visible - it is the reason somebody
       looks at the menu at all - so it rides the corner of the icon
       instead of sitting after a label that is no longer drawn. */
    .navmini .nav .navbadge{position:absolute;top:4px;right:8px;
                            margin-left:0;font-size:9px;padding:0 5px;
                            line-height:14px}
    .navmini .nav .soon{display:none}
    /* The group headings in the menu are words and nothing else. */
    .navmini .nav .navgroup,.navmini .navminitext{display:none}
  }

  /* The collapse control, now at the top beside the brand rather than
     at the foot under fourteen sections. Styled like a menu item
     because that is what it sits among, but quieter - it is chrome,
     not a section. */
  #btnNavMini{display:flex;align-items:center;gap:12px;padding:8px 13px;
              margin-bottom:6px;border-radius:10px;cursor:pointer;
              color:rgba(255,255,255,.45);font-size:12.5px;font-weight:600;
              text-decoration:none}
  #btnNavMini:hover{background:rgba(255,255,255,.08);color:#fff}
  #btnNavMini .ic{width:20px;text-align:center;font-size:12px}

  /* THE SCROLLBAR IS NOT A FEATURE OF THE MENU. Collapsed to 68px a
     desktop scrollbar takes a fifth of the width and sits where the
     icons are, which is what the screenshot was pointing at. The menu
     still scrolls - by wheel, by trackpad, by keyboard - it just stops
     drawing a track over itself. */
  @media(min-width:901px){
    .navmini .nav{scrollbar-width:none;-ms-overflow-style:none}
    .navmini .nav::-webkit-scrollbar{width:0;height:0}
    .navmini #btnNavMini{justify-content:center;padding:8px 0;gap:0}
  }

  /* ---------------------------------------------------------------
     PROFILE PICTURES

     KC, 24 September 2026: "show their profile picture next to their
     name... keep the UI clean and consistent with the current dark
     theme."

     ONE CLASS, NINE CALLERS. js/avatar.js emits <img class="av"> and
     nothing else; every author line that wants a face adds it to
     whatever it already draws. The size and the shape live here so a
     caller cannot get them subtly different from its neighbour.

     A FIXED BOX, not a percentage. flex-shrink:0 because most of these
     lines ARE flex rows with a long name beside them, and without it a
     narrow panel squashes the circle into an ellipse. object-fit:cover
     because an upload that skipped the canvas step is not necessarily
     square, and letterboxing a face is worse than cropping one.

     The ring is the same idea in both themes - a hairline that
     separates a light photograph from a light card, and a dark one
     from a dark panel - so it is drawn from the border token rather
     than from a colour. */
  /* NAMED .pfp, NOT .av, and that is the whole reason this block reads
     the way it does. css/dashboard.css:194 has defined .av since long
     before profile pictures existed - a 36px initials tile for the
     schedule's "who is out today" row, carrying .av.rest, .av.leave and
     a .rdot badge - and dashboard.css loads AFTER this file, so it won
     every one of these rules. Every profile picture in the app was drawn
     at 36px, with display:flex and a white bold font forced onto an
     <img> that has no text in it.

     Out-specifying it would have left the collision in place for the
     next rule either file grows. Two features wanting the same two
     letters is the problem; a longer selector is not the answer to it. */
  .pfp{width:26px;height:26px;border-radius:50%;flex-shrink:0;
      object-fit:cover;background:var(--panel);
      border:1px solid var(--border);vertical-align:middle}

  /* Sitting in a line of text rather than in a flex row - the
     announcement meta line and the transaction replies. The nudge is
     what stops a circle riding above the baseline of the name. */
  .pfp.avin{width:22px;height:22px;margin-right:7px;
           position:relative;top:5px}

  /* The one on the account menu, and the one in the dialog that
     changes it. Bigger, because here the picture IS the subject. */
  .pfp.avbig{width:84px;height:84px}

  /* THE AUTHOR LINES THAT WERE NOT FLEX ROWS BEFORE. Adding an image
     to a <div> of text leaves it on the baseline with the name beside
     it in the wrong place; these four become rows so the circle and
     the name are centred against each other. Only the ones that
     needed it - .gfwho was already a flex row and keeps its own
     baseline alignment.

     .dcwho is NOT in this list, although it is one of the four. It
     carries its own display:flex in css/dashboard.css, which loads
     after this file and therefore wins - so a second declaration here
     could only ever be the losing half of an argument. It is centred
     where it is declared instead, and dashboard.css says why. */
  .escmsgwho,.discwho,.ctwho{display:flex;align-items:center;gap:9px}

  /* .gfwho aligns its children on the BASELINE so the timestamp sits
     with the name. A circle has no baseline worth aligning to, so it
     is pulled back into line rather than the row being changed - the
     timestamp is what that rule is there for. */
  .gfwho .pfp{align-self:center}

  /* THE MENU ENTRY that opens the picture dialog. The other entries in
     this menu lead with an emoji; this one leads with the picture
     itself, because the answer to "what is mine set to" should not
     need the dialog opened to see it. A row rather than a block, or
     the circle sits above the words. */
  .acctmenu a#btnAvatar{display:flex;align-items:center;gap:9px}
  .acctmenu a#btnAvatar .pfp{width:22px;height:22px}

  /* The dialog: the picture on the left at the size it is judged at,
     the file input and the note beside it. Wraps on a narrow screen
     rather than squeezing the preview, which is the one thing on this
     dialog that has to stay the right shape. */
  .avpick{display:flex;gap:16px;align-items:center;flex-wrap:wrap;
          margin:4px 0 10px}
  .avpickside{flex:1;min-width:190px}
  .avpickside input[type=file]{width:100%;font-size:12.5px;
                               color:var(--text)}

  /* THE ONE IN THE TOP BAR, beside your own name. .acctname is already
     an inline-flex row with a gap, so this needs a size and nothing
     else - no margin, or it fights the gap that is already there.
     Slightly smaller than an author line's: the bar is 44px tall and a
     26px circle in it reads as a button rather than as a face. */
  .pfp.avme{width:22px;height:22px}

  /* ============================================================
     THE SELF-SET PROFILE STATUS, and the card that explains it
     ------------------------------------------------------------
     KC, 26 September 2026: two statuses, Available and Away, set by
     the person themselves - a SEPARATE thing from the sensor-driven
     presence dot, which lives in css/dashboard.css as .pdot / .p-*
     and is not touched here.

     DELIBERATELY DIFFERENT SHAPES, not just different colours. The
     presence dot is a small free-standing circle beside a name; this
     one is a ring welded to the corner of a picture, the way Slack
     and Discord draw it. Somebody scanning the Work Session log sees
     both on one row, and two marks that differed only in hue would be
     two marks nobody could tell apart. Green appears in both because
     green means the same thing in both - but one is a dot in the text
     and the other is a badge on a face, and that is what makes them
     readable together.
     ============================================================ */

  /* The picture, wrapped so a badge has something to be placed
     against. inline-block and line-height:0 so this lays out exactly
     where the bare <img> used to - the nine author lines that do NOT
     ask for a status must be unaffected, and they get no wrapper at
     all. */
  .pfpw{position:relative;display:inline-block;line-height:0;
       flex-shrink:0;vertical-align:middle}
  .psslot{position:absolute;right:-1px;bottom:-1px;line-height:0}
  /* Riding on a .avin picture, which is nudged 5px down the line to
     sit with the text - so the slot goes with it. */
  .pfpw .pfp.avin + .psslot{bottom:4px}

  .psbadge{display:block;width:9px;height:9px;border-radius:50%;
          box-sizing:content-box;
          /* The cut-out ring. Drawn in the PANEL colour rather than
             white so it reads as a hole in the picture on both themes;
             a white ring on a dark panel is a white ring, not a gap. */
          border:2px solid var(--panel)}
  .psbadge.ps-available{background:#16a34a}
  /* Amber, and the same amber as .p-idle - because on the one screen
     where both appear the person really is telling you the same kind
     of thing the sensor is. The shapes are what separate them. */
  .psbadge.ps-away{background:#f59e0b}

  /* In a line of text - the account menu, the card, the picker - where
     there is no picture to sit on. */
  .psbadge.psinline{position:static;display:inline-block;width:8px;
                   height:8px;border:0;margin-right:7px;
                   vertical-align:middle;flex:0 0 auto}
  .pslabel{font-size:12.5px;color:var(--text)}

  /* A name that opens a card. Not styled as a link - it is a name, and
     underlining every name in the Staff List would be forty
     underlines - but the cursor says it is live. */
  .stwho,.wswho{display:inline-flex;align-items:center;gap:8px;
               cursor:pointer}
  .stwho:hover .pcname,.stwho:hover,.wswho:hover{text-decoration:none}
  img.pfp[data-av]:not([data-av=""]){cursor:pointer}

  /* NO ACCOUNT-MENU STRIP any more. An Available / Away picker lived
     at the top of that menu for about an hour on 26 September 2026,
     until KC corrected the requirement - the status is read from the
     idle sensor now, so there is nothing to pick. .acctstatus, .psmine,
     .pspick, .psopt and .pson went with it.  */

  /* ---- the profile card ---- */

  /* FIXED, not absolute: an author line can sit inside a scrolling
     panel, and an absolutely-positioned card would scroll away from
     the face it belongs to. js/profile-card.js places it and closes it
     on scroll rather than chasing the anchor. */
  /* OPAQUE, and that needs saying because it is the one place in this
     app where a panel may not be see-through. --panel is translucent
     in BOTH themes - rgba(255,255,255,.82) light, .09 dark - which is
     right for a panel sitting on the page gradient and wrong for a
     card floating over a table: the rows underneath showed straight
     through the names and the whole thing was unreadable.

     Built from the same two tokens rather than a hard-coded colour, so
     it still looks like every other panel and still follows the theme:
     the translucent panel tint, laid over the opaque page background. */
  .pcard{position:fixed;z-index:1200;width:272px;padding:14px;
        border-radius:12px;
        background:linear-gradient(var(--panel),var(--panel)) ,var(--bg);
        border:1px solid var(--border);
        box-shadow:0 14px 38px rgba(0,0,0,.28)}
  .pchead{display:flex;gap:12px;align-items:center}
  .pcwho{min-width:0}
  /* The three lines wrap rather than push the card wider: 135 people
     and some of the names are long. */
  .pcname{font-weight:700;font-size:14.5px;line-height:1.25;
         word-break:break-word}
  .pcrole{font-size:12px;color:var(--muted);margin-top:2px}
  .pcbody{margin-top:12px;padding-top:11px;border-top:1px solid var(--border)}
  .pcrow{display:flex;gap:10px;align-items:flex-start;margin-top:9px}
  .pcrow:first-child{margin-top:0}
  /* A fixed label column, so "Status" and "Work session" line up and
     the two readings can be compared at a glance. They disagree often
     and legitimately - see js/profile-card.js - and the whole point of
     showing both is that the difference is visible. */
  .pclbl{flex:0 0 88px;font-size:10.5px;line-height:1.3;color:var(--muted);
        text-transform:uppercase;letter-spacing:.04em;padding-top:2px}
  .pcval{flex:1;min-width:0;display:flex;align-items:center;flex-wrap:wrap}
  .pcnote{font-size:11px;color:var(--muted);margin-left:2px}
  .pcclose{position:absolute;top:6px;right:8px;width:24px;height:24px;
          padding:0;line-height:1;font-size:17px;border:0;cursor:pointer;
          border-radius:6px;background:transparent;color:var(--muted)}
  .pcclose:hover{background:var(--panel2);color:var(--text)}

  /* THE NAME IN AN AUTHOR LINE IS CLICKABLE, so it has to look it.
     KC, 26 September 2026: "Make the staff member's name clickable as
     well, not only the profile picture."

     The BEHAVIOUR is structural and needs no list - js/profile-card.js
     opens the card for whichever picture the clicked element directly
     holds, so a tenth author line works the day it is written. Only
     the CURSOR needs naming, because CSS cannot say "an element that
     contains a profile picture" on browsers this app still supports.

     The pointer is set on the CONTAINER, which its bare text - the
     name - inherits, and taken straight back off every element child.
     That is the same split the click rule uses: the name is loose
     text, everything else (timestamp, edited marker, Edit and Delete)
     is wrapped in an element of its own. So the name gets a pointer
     and the timestamp beside it does not. */
  .escmsgwho,.discwho,.ctwho,.dcwho,.gfwho,.ameta,.txrepwho{cursor:pointer}
  .escmsgwho > *,.discwho > *,.ctwho > *,.dcwho > *,.gfwho > *,
  .ameta > *,.txrepwho > *{cursor:auto}
  /* ...except the picture, which was already clickable and stays so. */
  .escmsgwho > .pfpw,.discwho > .pfpw,.ctwho > .pfpw,.dcwho > .pfpw,
  .gfwho > .pfpw,.ameta > .pfpw,.txrepwho > .pfpw,
  .escmsgwho > img.pfp,.discwho > img.pfp,.ctwho > img.pfp,
  .dcwho > img.pfp,.gfwho > img.pfp,.ameta > img.pfp,
  .txrepwho > img.pfp{cursor:pointer}

  /* ============================================================
     INVENTORY — phone handover
     ------------------------------------------------------------
     The section used to be an iframe holding its own stylesheet, so
     none of this existed and none of the dashboard's tokens reached
     it. It is an ordinary section now: every colour below is a var(),
     which is what makes it follow light and dark like everything else.
     The old app was light-only and could not.
     ============================================================ */

  .invcard{padding:0;overflow:hidden}
  /* The Registry's dialogs reuse .pwoverlay / .pwmodal / .mmg / .pwrow
     from the password and profile dialogs, so there is nothing new
     here for them - only this, because a phone list is wider than a
     password field. */
  .pwmodal.invmodal{max-width:440px}
  .invtabs{display:flex;align-items:center;gap:6px;padding:12px 16px;
          border-bottom:1px solid var(--border);flex-wrap:wrap}
  .invtitle{font-weight:700;font-size:15px;margin-right:10px}
  .invtab{padding:7px 14px;border-radius:9px;font-size:13px;cursor:pointer;
         border:1px solid transparent;background:transparent;
         color:var(--muted);font-family:inherit}
  .invtab:hover{background:var(--panel2);color:var(--text)}
  .invtab.on{background:var(--accent);border-color:var(--accent);
            color:#fff;font-weight:600}
  .invtabi{margin-right:3px}
  .invbody{padding:16px}

  /* The brand-region a handover is for. One handover per brand, so
     this is the first thing the screen asks. */
  .invpick{display:flex;align-items:center;gap:10px;margin-bottom:14px;
          flex-wrap:wrap}
  .invpick label{font-size:12px;color:var(--muted);text-transform:uppercase;
                letter-spacing:.04em}
  .invpick select{flex:0 1 340px;min-width:200px}
  .invpickhint{font-size:12px;color:var(--muted)}

  /* The shift header: who is handing over to whom, and the four
     numbers that say whether it is ready. */
  .invshift{display:flex;align-items:center;gap:16px;flex-wrap:wrap;
           padding:14px 16px;border:1px solid var(--border);
           border-radius:12px;background:var(--panel2);margin-bottom:16px}
  .invshiftside{display:flex;align-items:center;gap:11px}
  .invshifti{font-size:22px;line-height:1}
  .invshiftk{font-size:11px;color:var(--muted);text-transform:uppercase;
            letter-spacing:.04em}
  .invshiftv{font-weight:700;font-size:15px}
  .invshifth{font-size:12px;color:var(--muted)}
  .invarrow{font-size:20px;color:var(--muted)}
  .invshiftstats{margin-left:auto;display:flex;gap:10px;flex-wrap:wrap}
  .invshiftstats .invstat{min-width:104px}

  .invstat{border:1px solid var(--border);border-radius:11px;
          padding:11px 13px;background:var(--panel)}
  .invstatk{font-size:11.5px;color:var(--muted);margin-bottom:5px}
  .invstatv{font-size:22px;font-weight:700;letter-spacing:-.02em}
  .invstat.good .invstatv{color:#16a34a}
  .invstat.warn .invstatv{color:#d97706}
  .invstat.bad  .invstatv{color:#dc2626}

  .invsum{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;
         margin-bottom:16px}
  .invsum5{grid-template-columns:repeat(5,1fr)}

  /* Summary on the left, the phone list on the right - the shape of
     KC's screenshot. Collapses to one column on a narrow screen
     rather than squeezing a ten-column table. */
  .invsplit{display:grid;grid-template-columns:minmax(300px,380px) 1fr;
           gap:18px;align-items:start}
  .invsplitreg{grid-template-columns:minmax(220px,280px) 1fr}
  @media (max-width:980px){
    .invsplit,.invsplitreg{grid-template-columns:1fr}
    .invsum,.invsum5{grid-template-columns:repeat(2,1fr)}
    .invshiftstats{margin-left:0;width:100%}
  }

  .invh{font-size:14px;font-weight:700;margin:0 0 10px}
  .invleft .invh:not(:first-child){margin-top:18px}

  .invbanner{padding:11px 13px;border-radius:10px;font-size:13px;
            border:1px solid var(--border);background:var(--panel2);
            margin-bottom:14px}
  .invbanner.ok{background:rgba(22,163,74,.12);
               border-color:rgba(22,163,74,.38)}
  .invbanner.warn{background:rgba(217,119,6,.12);
                 border-color:rgba(217,119,6,.38)}
  .invbanner div{font-size:12.5px;color:var(--muted);margin-top:3px}

  .invform{display:grid;gap:11px;margin-bottom:14px}
  .invfield label{display:block;font-size:12px;color:var(--muted);
                 margin-bottom:4px}
  .invfield select,.invfield input,.invfield textarea{width:100%}
  .invactions{display:flex;gap:9px;flex-wrap:wrap}
  .invactions .applybtn{flex:1}

  .invlisthead{display:flex;align-items:center;gap:10px;margin-bottom:10px;
              flex-wrap:wrap}
  .invlisthead .invh{margin:0}
  .invrowbtns{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap}

  .invfilters{display:flex;gap:8px;margin-bottom:11px;flex-wrap:wrap}
  .invfilters input[type=search]{flex:1;min-width:170px}
  .invfilters select{flex:0 0 auto}
  .invfilters4 select{min-width:140px}

  .invtable{width:100%;border-collapse:collapse;font-size:13px}
  .invtable th{text-align:left;font-size:11px;text-transform:uppercase;
              letter-spacing:.04em;color:var(--muted);font-weight:600;
              padding:8px 9px;border-bottom:1px solid var(--border)}
  .invtable td{padding:9px;border-bottom:1px solid var(--border);
              vertical-align:middle}
  .invtable tbody tr:hover{background:var(--panel2)}
  .invtable tr.on{background:rgba(22,163,74,.09)}
  /* A retired handset, still listed because past handovers reference
     it, but visibly not part of the current count. */
  .invtable tr.off{opacity:.6}
  .invtable td.good,.invtable .good{color:#16a34a;font-weight:600}
  .invtable td.warn,.invtable .warn{color:#d97706;font-weight:600}
  .invtable td.bad,.invtable .bad{color:#dc2626;font-weight:600}
  .invsub{font-size:11px;color:var(--muted)}
  /* Team or Individual, on one line, the way the form was drawn. Three
     stacked radios read as three questions rather than one with three
     answers. */
  .invradios{display:flex;align-items:center;gap:16px;flex-wrap:wrap;
             padding-top:2px}
  .invradios label{display:inline-flex;align-items:center;gap:6px;
                   font-size:13px;cursor:pointer}
  .invradios input{margin:0}
  /* THE PLATFORMS A PHONE SERVES, one chip each. A phone can be on
     several - KC, 6 October 2026 - and the picker above stays the
     dropdown it was, so the list can be as long as esc_brands makes
     it without a checkbox per brand. Empty until something is
     picked, which is why there is no min-height or border: an
     unanswered optional field should not draw a box. */
  .invchips{display:flex;flex-wrap:wrap;gap:6px}
  .invchips:not(:empty){margin-top:7px}
  .invchip{display:inline-flex;align-items:center;gap:5px;
           background:var(--chip,rgba(127,127,127,.14));
           border:1px solid var(--border);border-radius:999px;
           padding:3px 5px 3px 10px;font-size:12px;line-height:1.5;
           color:var(--text)}
  .invchipx{border:0;background:none;cursor:pointer;color:var(--muted);
            font-size:14px;line-height:1;padding:1px 4px;border-radius:999px}
  .invchipx:hover{background:rgba(127,127,127,.22);color:var(--text)}
  /* The typed platform and its Add button share a line - the button
     belongs to the field, not to the dialog. */
  .invaddrow{display:flex;gap:8px;align-items:stretch}
  .invaddrow input{flex:1;min-width:0}
  .invaddrow .applybtn{flex:0 0 auto;padding:0 14px}
  /* Why another team's staff are not in the picker above. */
  .invhint{font-size:11px;color:var(--muted);margin-top:5px;
           line-height:1.45}
  .invdim{color:var(--muted)}
  .invnote{width:100%;font-size:12px;padding:4px 6px}
  .invrowact{white-space:nowrap;text-align:right}

  .invpager{display:flex;align-items:center;gap:6px;margin-top:11px;
           font-size:12px;color:var(--muted);flex-wrap:wrap}
  .invpage{padding:4px 10px;border-radius:7px;cursor:pointer;
          border:1px solid var(--border);background:var(--panel);
          color:var(--text);font-family:inherit;font-size:12px}
  .invpage.on{background:var(--accent);border-color:var(--accent);
             color:#fff;font-weight:600}

  .invbrands{display:flex;flex-direction:column;gap:6px}
  .invbrand{display:flex;flex-direction:column;align-items:flex-start;gap:2px;
           padding:10px 12px;border-radius:10px;cursor:pointer;
           border:1px solid var(--border);background:var(--panel);
           color:var(--text);font-family:inherit;text-align:left;width:100%}
  .invbrand:hover{border-color:var(--accent)}
  .invbrand.on{border-color:var(--accent);
              box-shadow:inset 0 0 0 1px var(--accent)}
  .invbrandn{font-weight:600;font-size:13.5px}
  .invbrandc{font-size:11.5px;color:var(--muted)}

  .invempty{padding:22px;text-align:center;color:var(--muted);
           font-size:13px;border:1px dashed var(--border);border-radius:10px}
  .invemptyh{font-size:12px;margin-top:5px;opacity:.85}

  /* A retired phone in the Registry. .t-in already exists for Active. */
  .tag.t-off{background:var(--panel2);color:var(--muted);
            border:1px solid var(--border)}

  /* ---- the custom profile status ----
     A message the person wrote about themselves. Set apart from the
     availability dot above it ON PURPOSE: that dot is the idle
     sensor's reading and this is whatever they typed, and somebody
     seeing "In a meeting" beside a green dot is reading two true
     things rather than a contradiction. Quotes and italic are what
     make it read as a quotation rather than as a system state. */
  .pccustom{margin:10px 0 0;padding:10px 0 0;
           border-top:1px solid var(--border);
           display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}
  .pcmsg{flex:1;min-width:0;font-size:13px;font-style:italic;
        line-height:1.45;word-break:break-word}
  /* Only ever shown on your OWN card - see customStatusHtml. On
     somebody else's, no message means no block at all, because an
     empty pair of quote marks reads as a message that failed. */
  .pcmsg.pcnone{font-style:normal;color:var(--muted)}
  /* How old it is, and only past an hour. "Back in 10 minutes" from
     yesterday is worse than nothing, so the card stops presenting it
     as current. */
  .pcage{display:block;font-style:normal;font-size:11px;
        color:var(--muted);margin-top:2px}
  .pcedit{flex:0 0 auto;padding:4px 9px;border-radius:7px;cursor:pointer;
         font-size:11.5px;font-family:inherit;
         background:var(--panel2);color:var(--text);
         border:1px solid var(--border)}
  .pcedit:hover{border-color:var(--accent);color:var(--text)}

  /* The dialog. Reuses .pwoverlay / .pwmodal / .mmg / .pwrow from the
     password and profile-picture dialogs; only the counter and the
     suggestion chips are new. */
  .cscount{font-size:11px;color:var(--muted);margin-top:5px;
          text-align:right}
  .cspicks{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 12px}
  /* They FILL the box rather than saving - a one-click save from a
     list is how somebody publishes "Back in 10 minutes" they meant to
     edit first. */
  .cspick{padding:4px 10px;border-radius:20px;cursor:pointer;
         font-size:11.5px;font-family:inherit;
         background:var(--panel2);color:var(--muted);
         border:1px solid var(--border)}
  .cspick:hover{border-color:var(--accent);color:var(--text)}
