/* Inter Variable — self-hosted, no external requests (2026-07-28 rebrand).
   font-weight: 100 900 covers the whole variable axis, so every existing
   font-weight rule (400/600/700 etc.) already used across the app "just
   works" against this one file — no other CSS needed to change. */
@font-face {
  font-family: 'Inter Variable';
  src: url('/static/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Variable';
  src: url('/static/fonts/InterVariable-Italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Manrope + IBM Plex Mono — the designed faces (Nocturne Glass, 2026-09-26).
   Self-hosted in /static/fonts; Inter above stays as the fallback. */
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/IBMPlexMono-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/IBMPlexMono-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/IBMPlexMono-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/IBMPlexMono-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/IBMPlexMono-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/IBMPlexMono-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/static/fonts/Manrope-200-800-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/static/fonts/Manrope-200-800-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Ember — refined Zed BPO brand: warm near-black + precise logo orange
     (matches Zed Payroll's identical refresh), a raised surface tone for
     hover/elevation, and a muted semantic green. */
  --bg: #0b0f17;
  --panel: #17140f;
  --panel-2: #1e1a14;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5efe6;
  --muted: #948a7c;
  --accent: #2f7df6;
  --accent-soft: rgba(47, 125, 246, 0.16);
  --ok: #4caf7d;
  --bad: #e2685f;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  /* Renders native widget internals (select arrow + popup list, date picker)
     dark — CSS can style the control box but not those parts. */
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; }
.brand-logo { height: 24px; width: auto; display: block; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: 13px; padding: 6px 12px; border-radius: 8px; transition: color .15s ease, background .15s ease; }
.topbar nav a:hover { color: var(--text); background: var(--panel-2); }
.who { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.who button { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; transition: border-color .15s ease, color .15s ease; }
.who button:hover { border-color: var(--accent); color: var(--accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; margin-bottom: 20px; box-shadow: 0 20px 45px -32px rgba(0, 0, 0, 0.7);
}
.card h2 { margin-top: 0; font-size: 16px; }

.grid-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-form .full { grid-column: 1 / -1; }
.grid-form label, .inline-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.grid-form input, .grid-form select,
.inline-form input, .inline-form select {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font-size: 14px; margin-top: 2px;
}
.inline-form { display: flex; gap: 16px; align-items: flex-end; margin-bottom: 12px; }

button, .btn-secondary {
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-block; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(47, 125, 246, 0.5); }
button:active { transform: translateY(0); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
td { transition: background .15s ease; }
tr:hover td { background: var(--panel-2); }

.pill { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: var(--border); color: var(--text); text-transform: capitalize; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--bad); font-size: 13px; }

/* login page */
.login-wrap { max-width: 360px; margin: 100px auto; padding: 0 20px; }
.login-wrap .card { text-align: center; }
.login-logo { height: 46px; width: auto; display: block; margin: 0 auto 12px; }

/* chat layout */
.chat-shell { display: grid; grid-template-columns: 260px 1fr; gap: 0; height: calc(100vh - 65px); }
.contacts { border-right: 1px solid var(--border); overflow-y: auto; padding: 12px; }
.contacts a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 14px; margin-bottom: 2px;
  transition: background .15s ease;
}
.contacts a:hover { background: var(--panel-2); }
.contacts a.active { background: var(--panel-2); border: 1px solid var(--border); }
.contacts a .cname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  /* Neutral background (not --accent-soft) — this file is shared by the
     Zednex (violet) and Medical instances too, which override --accent per
     view but have no matching "soft" tint; a neutral chip + accent-colored
     initials looks right under any of the three brand colors. */
  width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.unread-badge { background: var(--bad); color: #fff; flex-shrink: 0; }
.conversation { display: flex; flex-direction: column; height: 100%; }
.thread-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.thread-name { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; }
.thread-header .btn-secondary {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; font-size: 12.5px; margin-left: 0;
}
.thread-header .btn-secondary:disabled { opacity: .6; cursor: default; }
.refresh-icon { display: inline-block; font-size: 14px; line-height: 1; }
.btn-secondary.spinning .refresh-icon { animation: spin .6s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.msg {
  /* Without pre-wrap a multi-line message collapses into one run-on paragraph.
     Any message with deliberate line breaks — an announcement, a list, an
     address — was silently being flattened. */
  white-space: pre-wrap; overflow-wrap: anywhere;
  max-width: 60%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.4;
  opacity: 0; animation: msg-in .28s ease forwards;
}
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.msg.mine { align-self: flex-end; background: var(--accent); color: #fff; }
.msg.theirs { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--border); }
.msg-meta { display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.msg-time { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.msg.mine .msg-time { color: rgba(255, 255, 255, 0.75); }
/* Read receipts — WhatsApp-style double check. Gray = sent, not yet read;
   blue = read. Blue is a fixed hex (not --accent) so it reads correctly and
   consistently regardless of which of the 3 brand accents this instance uses. */
.ticks { display: inline-flex; color: rgba(255, 255, 255, 0.55); flex-shrink: 0; transition: color .2s ease; }
.ticks.read { color: #53bdeb; }
.ticks svg { display: block; }
.composer { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--border); }
.composer input { flex: 1; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 14px; transition: border-color .15s ease; }
.composer input:focus { border-color: var(--accent); outline: none; }
.empty-state { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); }

/* ---- File attachments (2026-08-19) ---------------------------------------
   Shared verbatim across all three instances, so nothing here may derive from
   --accent in a way that assumes a particular brand colour (same reasoning as
   the read-receipt ticks). */
.attach-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; margin-bottom: 4px;
  border-radius: 8px; text-decoration: none;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  color: inherit; max-width: 100%; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.attach-chip:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .28); }
.msg.theirs .attach-chip { background: rgba(255, 255, 255, .05); }
.ac-clip { flex-shrink: 0; font-size: 15px; line-height: 1; }
.ac-name {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ac-size { flex-shrink: 0; font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }

.composer-wrap { border-top: 1px solid var(--border); }
.composer-wrap .composer { border-top: none; }

.attach-btn {
  flex-shrink: 0; background: transparent; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; font-size: 16px; line-height: 1;
  cursor: pointer; color: var(--text); transition: border-color .15s ease, background .15s ease;
}
.attach-btn:hover { border-color: var(--accent); background: rgba(255, 255, 255, .05); }

.pending-file {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 16px 0; padding: 8px 10px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
}
.pf-name {
  flex: 1; min-width: 0; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pf-size { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pf-bar { width: 90px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.pf-bar-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .12s linear; }
.pf-clear {
  flex-shrink: 0; background: transparent; border: none; color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.pf-clear:hover { color: var(--text); }

.composer-error { margin: 10px 16px 0; font-size: 12px; color: #f87171; }

/* Any element given an explicit `display:` above would otherwise ignore the
   `hidden` attribute entirely — the UA rule [hidden]{display:none} loses to a
   class selector. Caught in local testing: the empty attachment bar rendered
   permanently above the composer. */
.pending-file[hidden], .pf-bar[hidden], .composer-error[hidden] { display: none !important; }

/* Download feedback. The Tauri desktop window saves the file but shows no
   dialog, no progress and no completion notice — without this the employee
   sees nothing happen and clicks Download repeatedly. */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(12px);
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 16px; font-size: 13px; z-index: 9999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Complaints channel (2026-08-19) ------------------------------------- */
.complaint-note {
  display: flex; align-items: center;
  margin: 12px 16px 0; padding: 8px 12px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
}
.anon-toggle { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.anon-toggle input { cursor: pointer; }
.anon-mark { font-size: 10px; opacity: .7; font-style: italic; margin-top: 3px; }

.complaint { border-left: 3px solid var(--accent); }
.complaint.is-anon { border-left-color: var(--muted); }
.complaint-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.complaint-who { font-weight: 600; font-size: 14px; }
.complaint-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; white-space: nowrap; }
.complaint-body { white-space: pre-wrap; line-height: 1.55; font-size: 14px; }
.anon-pill { background: rgba(255, 255, 255, .1); }

/* `.btn` was used by download.ejs and by the attachment 404 page's only way
   back to Chat, but never actually defined — so the escape affordance rendered
   as plain link text. */
.btn {
  display: inline-block; padding: 9px 16px; border-radius: 8px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 500; border: 1px solid transparent;
}
.btn:hover { filter: brightness(1.08); }

.complaint-intro {
  align-self: center; max-width: 460px; margin: 10px 0 2px;
  font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center;
}


/* === NOCTURNE GLASS — 2026-09-26 ===========================================
   The whole visual port of the Claude Design mockup (screens 6a-15o) for the
   chat app. Append-only: delete this block and the two <script src="/static/
   app.js"> tags and the old top-bar app is back. Nothing below decides what a
   role may see — it restyles the nodes the server already rendered.

   Shared by all four instances (rsynced), so every accent colour is derived
   from --accent (each view injects its own) via color-mix — never a fixed blue
   where the element must repaint under Zednex violet / MedEx teal.

   Stacking: the rail is z 20, modals 50, the toast stays 9999 and the kiosk
   diag box 99999. Nothing here creates a stacking context on body. */

:root {
  --text: #e6ebf4;
  --muted: rgba(230, 235, 244, .5);
  --border: rgba(148, 163, 184, .15);
  --panel: #141d2f;
  --panel-2: rgba(255, 255, 255, .06);
  --ok: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --accent-300: color-mix(in srgb, var(--accent) 50%, #fff);
  --accent-900: color-mix(in srgb, var(--accent) 16%, #0b0f17);
  --accent-13: color-mix(in srgb, var(--accent) 13%, transparent);
  --link: color-mix(in srgb, var(--accent) 85%, #fff);
  --rail-rest: 64px;
  --rail-open: 216px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --glass-bg: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .01) 45%, rgba(255, 255, 255, .03));
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 1px rgba(255, 255, 255, .05), inset 1px 0 0 rgba(255, 255, 255, .05), 0 18px 40px -22px rgba(0, 0, 0, .8);
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 1px rgba(255, 255, 255, .05), inset 1px 0 0 rgba(255, 255, 255, .05), 0 6px 16px -8px rgba(0, 0, 0, .7);
}

html { height: 100%; }
body {
  font-family: "Manrope", "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.55;
  background:
    radial-gradient(60% 50% at 85% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(50% 45% at 0% 100%, rgba(145, 132, 217, .11), transparent 70%),
    radial-gradient(40% 35% at 60% 60%, rgba(52, 211, 153, .05), transparent 70%),
    #0b0f17;
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--link); }
h1, h2, h3, h4, h5, h6 { line-height: 1.12; letter-spacing: -.015em; font-weight: 500; margin: 0 0 .5em; }
.page-title { font-size: 20px; font-weight: 600; margin: 0; }
h6, .eyebrow {
  font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(230, 235, 244, .5); font-weight: 600; margin: 0 0 10px;
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.error { color: var(--bad); font-size: 12.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Page frame ---------------------------------------------------------- */
.container { max-width: 1200px; margin: 0; padding: 28px 36px 40px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.page-head .page-title { margin-right: auto; }
.page-sub { font-size: 12px; color: rgba(230, 235, 244, .45); margin: 0 0 26px; }
.page-sub.tight { margin-bottom: 22px; }
.backlink { font-size: 12.5px; text-decoration: none; }

/* ---- THE RAIL (was the top bar) ------------------------------------------
   64px at rest, 216px on hover / focus-within, floating over the content: the
   page track never moves (body padding is the resting width), so nothing a
   person is reading jumps when they brush the rail. */
body:has(> .topbar) { padding-left: var(--rail-rest); }
.topbar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--rail-rest);
  display: flex; flex-direction: column; align-items: stretch; gap: 0;
  padding: 20px 14px 16px;
  border-bottom: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .1);
  overflow: hidden;
  z-index: 20;
  transition: width .45s var(--ease);
}
.topbar:hover, .topbar:focus-within { width: var(--rail-open); }
.topbar * { white-space: nowrap; }

/* Everything but the icons fades at rest. */
.brand > span:not(.zed-mark),
.nav-group,
.nav-label,
.who-name,
.who .logout,
.rail-note,
.rail-conv > :not(summary),
.rail-conv summary .conv-caret { opacity: 0; transition: opacity .25s ease; }
.topbar:hover .brand > span:not(.zed-mark), .topbar:focus-within .brand > span:not(.zed-mark),
.topbar:hover .nav-group, .topbar:focus-within .nav-group,
.topbar:hover .nav-label, .topbar:focus-within .nav-label,
.topbar:hover .who-name, .topbar:focus-within .who-name,
.topbar:hover .who .logout, .topbar:focus-within .who .logout,
.topbar:hover .rail-note, .topbar:focus-within .rail-note,
.topbar:hover .rail-conv > :not(summary), .topbar:focus-within .rail-conv > :not(summary),
.topbar:hover .rail-conv summary .conv-caret, .topbar:focus-within .rail-conv summary .conv-caret {
  opacity: 1; transition: opacity .35s ease .12s;
}

/* Brand row: animated mark 26px + flat accent-300 wordmark. */
.brand { padding: 0 5px; margin-bottom: 18px; gap: 10px; font-size: 15px; font-weight: 600; color: var(--accent-300); flex: 0 0 auto; }
.brand-logo { height: 26px; width: 26px; object-fit: contain; }
.brand .zed-mark { width: 26px; height: 26px; }

/* Kickers (group labels, injected by app.js). */
.nav-group {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(230, 235, 244, .4); padding: 14px 10px 4px;
}
.nav-group:first-child { padding-top: 4px; }

.topbar nav { flex: 0 0 auto; flex-direction: column; gap: 2px; overflow: visible; }
.topbar nav a, .rail-conv summary {
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 12px;
  padding: 7px 10px; border-radius: 12px; font-size: 13.5px;
  border: 1px solid transparent; color: var(--text); text-decoration: none;
  background: none; cursor: pointer; list-style: none;
  transition: background .25s, box-shadow .25s, transform .25s var(--ease), border-color .25s;
}
.rail-conv summary::-webkit-details-marker { display: none; }
.topbar nav a::before, .rail-conv summary::before {
  content: ''; flex: 0 0 16px; width: 16px; height: 16px;
  background: currentColor; opacity: .8;
  -webkit-mask: var(--glyph) center / contain no-repeat;
  mask: var(--glyph) center / contain no-repeat;
}
/* The sheen. ::before is the glyph, so the sheen goes on ::after. */
.topbar nav a::after, .rail-conv summary::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 70% at 20% 0%, rgba(255, 255, 255, .18), transparent 55%),
              radial-gradient(80% 60% at 100% 100%, color-mix(in srgb, var(--accent-300) 8%, transparent), transparent 60%);
  opacity: 0; transition: opacity .25s;
}
.topbar nav a:hover, .rail-conv summary:hover {
  color: var(--text);
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  border-color: rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}
.topbar nav a:hover::before { opacity: 1; }
.topbar nav a:active { transform: scale(.97); }
.topbar nav a.active {
  color: #dbe8ff;
  border-color: color-mix(in srgb, var(--accent-300) 45%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 42%, transparent), color-mix(in srgb, var(--accent) 14%, transparent) 60%, color-mix(in srgb, var(--accent-300) 22%, transparent));
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), inset 0 -1px 1px color-mix(in srgb, var(--accent-300) 30%, transparent), 0 8px 22px -8px color-mix(in srgb, var(--accent) 60%, transparent), 0 1px 3px rgba(0, 0, 0, .4);
}
.topbar nav a.active::before { opacity: 1; }
.topbar nav a.active::after { opacity: 1; }
.nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Route glyphs — CSS masks keyed off href (24x24, stroke 1.7, round caps).
   --glyph is defaulted on the <a>, not on ::before, so an unmapped route gets
   a neutral dot rather than a solid square (an unset property invalidates
   `mask` and paints the full currentColor box). */
.topbar nav a, .rail-conv summary {
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
}
.topbar nav a[href="/chat"]          { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3Cpath d='M8 9.5h8M8 12.5h5'/%3E%3C/svg%3E"); }
.topbar nav a[href*="complaints"]    { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5 2.5 20h19z'/%3E%3Cpath d='M12 10v4.5'/%3E%3Ccircle cx='12' cy='17.2' r='.6'/%3E%3C/svg%3E"); }
.topbar nav a[href="/admin/monitor"] { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='4' width='19' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3Cpath d='M6 11h3l1.5-3 2.5 6 1.5-3H18'/%3E%3C/svg%3E"); }
.topbar nav a[href="/admin/users"]   { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3Cpath d='M6.5 18.5c1.2-2 3.2-3 5.5-3s4.3 1 5.5 3'/%3E%3C/svg%3E"); }
.topbar nav a[href="/admin/ips"]     { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M3 11h16M11 3c2.2 2.3 3 5 3 8s-.8 5.7-3 8c-2.2-2.3-3-5-3-8s.8-5.7 3-8z'/%3E%3Crect x='15.5' y='17' width='6' height='4.5' rx='1'/%3E%3Cpath d='M17 17v-1.3a1.5 1.5 0 0 1 3 0V17'/%3E%3C/svg%3E"); }
.topbar nav a[href="/download"]      { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='11' rx='1.5'/%3E%3Cpath d='M2 19h20'/%3E%3Cpath d='M10 9.5h4'/%3E%3C/svg%3E"); }
.rail-conv summary                   { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h12v8H8l-5 3.5z'/%3E%3Cpath d='M18 8h3v11l-4-3h-6v-1'/%3E%3C/svg%3E"); }

/* Unread count — the mono accent pill. #bell/#bellCount are the ids the
   nav.ejs poll writes to; app.js moves #bell into the Conversations row (or
   the compact title bar) and it keeps working because the node is the same. */
.conv-badge, #bellCount {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-family: var(--mono); font-size: 10px; font-weight: 600; line-height: 1;
  flex: none; text-transform: none;
}
.bell { display: inline-flex; align-items: center; margin-left: auto; }
/* At rest the count rides the icon's top-right corner and stays visible. */
.topbar nav a .bell, .rail-conv summary .bell { position: absolute; left: 20px; top: 3px; margin: 0; }
.topbar nav a .bell #bellCount, .rail-conv summary .bell #bellCount { min-width: 15px; height: 15px; font-size: 9px; padding: 0 4px; }
.topbar:hover nav a .bell, .topbar:focus-within nav a .bell,
.topbar:hover .rail-conv summary .bell, .topbar:focus-within .rail-conv summary .bell { position: static; margin-left: auto; }
.topbar:hover nav a .bell #bellCount, .topbar:focus-within nav a .bell #bellCount,
.topbar:hover .rail-conv summary .bell #bellCount, .topbar:focus-within .rail-conv summary .bell #bellCount { min-width: 17px; height: 17px; font-size: 10px; padding: 0 5px; }

/* Conversations live IN the rail (6a). Rendered by chat.ejs through the nav
   partial; the details scrolls as one so the footer stays pinned. */
.rail-conv { margin-top: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.rail-conv summary .nav-label { flex: 1; }
.rail-conv summary .conv-caret { font-size: 9px; color: rgba(230, 235, 244, .45); }
.rail-conv[open] summary .conv-caret { transform: none; }
.rail-conv:not([open]) summary .conv-caret { transform: rotate(-90deg); }
.rail-conv-body { display: flex; flex-direction: column; gap: 8px; padding: 8px 4px 10px 8px; }
.conv-start { display: flex; gap: 6px; margin: 0; }
.conv-start input { flex: 1; min-width: 0; font-size: 12px; min-height: 30px; padding: 0 10px; }
.conv-start button { font-size: 12px; padding: 4px 10px; }
.rail-conv-body .error { margin: 0; font-size: 11.5px; white-space: normal; }
.conv-list { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.rail-conv-body .nav-group { padding: 10px 8px 2px; }
.conv-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 13px;
  transition: background .15s ease;
}
.conv-row:hover { background: rgba(255, 255, 255, .05); }
.conv-row.active { background: var(--accent-13); }
.conv-row.active .conv-name { color: var(--accent-300); font-weight: 600; }
.conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.conv-name { overflow: hidden; text-overflow: ellipsis; }
.conv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.conv-time { display: none; font-family: var(--mono); font-size: 10px; color: rgba(230, 235, 244, .4); }
.rail-note { padding: 12px 10px 0; font-size: 10.5px; color: rgba(230, 235, 244, .35); flex: 0 0 auto; }

/* Avatars: accent-900 disc, accent-300 initials. */
.avatar {
  width: 28px; height: 28px; background: var(--accent-900); color: var(--accent-300);
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(255, 255, 255, .08);
}
.avatar.lg { width: 30px; height: 30px; font-size: 11px; }
.avatar.xl { width: 38px; height: 38px; font-size: 12.5px; }

/* Rail footer: avatar + name + Log out ghost. */
.who {
  margin-top: auto; flex: 0 0 auto; flex-direction: row; align-items: center;
  gap: 9px; padding: 12px 4px 0; border-top: 1px solid var(--border);
  color: var(--text); font-size: 12.5px;
}
.who-avatar {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-900); color: var(--accent-300);
  display: grid; place-items: center; font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(255, 255, 255, .08);
}
.who-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.who form { flex: 0 0 auto; }
.who .logout { font-size: 12px; }
/* Fallback only: if a page has no [data-refresh-slot] the button stays here
   as an icon. Every page ships a slot, so this is belt-and-braces. */
.who #globalRefreshBtn { width: 30px; height: 30px; padding: 0; font-size: 0; flex: none; }
.who #globalRefreshBtn .refresh-icon { font-size: 14px; }

/* ---- The animated ZED mark (halves glide in, seam flashes) --------------- */
.zed-mark { position: relative; display: block; flex: 0 0 auto; }
.zed-mark-half { position: absolute; inset: 0; opacity: 0; }
.zed-mark-half img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.zed-mark-seam {
  position: absolute; left: 50%; top: -10%; bottom: -10%; width: 1.5px;
  transform: translateX(-50%); opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(235, 240, 248, .95), transparent);
}

/* ---- Buttons ------------------------------------------------------------- */
button, .btn, .btn-secondary, .btn-ghost {
  position: relative; border-radius: 999px;
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: var(--btn-shadow);
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.3;
  padding: 6px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
button, .btn, .btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, color-mix(in srgb, var(--accent) 78%, #fff) 95%, transparent), color-mix(in srgb, var(--accent) 90%, transparent) 50%, color-mix(in srgb, color-mix(in srgb, var(--accent) 82%, #000) 92%, transparent));
  border-color: color-mix(in srgb, var(--accent-300) 45%, transparent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 3px rgba(10, 40, 110, .35), 0 8px 22px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-secondary, .btn-ghost, button.btn-secondary, button.btn-ghost, a.btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  border-color: rgba(255, 255, 255, .14); color: var(--text);
  box-shadow: var(--btn-shadow); font-weight: 500;
}
.btn-danger, button.btn-danger { color: var(--bad); border-color: rgba(248, 113, 113, .45); }
.btn-red, button.btn-red { background: #dc2626; border-color: #dc2626; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 0, 0, .25), 0 8px 22px -10px rgba(0, 0, 0, .7); }
.btn-green, button.btn-green { background: #16a34a; border-color: #16a34a; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 0, 0, .25), 0 8px 22px -10px rgba(0, 0, 0, .7); }
button:hover, .btn:hover, .btn-secondary:hover, .btn-ghost:hover { transform: translateY(-1px); filter: brightness(1.1); color: inherit; }
.btn-secondary:hover, .btn-ghost:hover { border-color: rgba(255, 255, 255, .22); color: var(--text); box-shadow: var(--btn-shadow); }
button:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 3px rgba(10, 40, 110, .35), 0 8px 22px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
button:active, .btn:active, .btn-secondary:active, .btn-ghost:active { transform: scale(.96); }
button:disabled { opacity: .6; cursor: default; transform: none; filter: none; }
.btn-sm { font-size: 12px; padding: 5px 12px; }
.btn-xs { font-size: 11.5px; padding: 4px 11px; }
.icon-btn, button.icon-btn { width: 30px; height: 30px; padding: 0; }
.thread-header .btn-secondary { font-size: 12px; padding: 6px 14px; }
.thread-header .btn-secondary:disabled { opacity: .6; cursor: default; }

/* ---- Inputs -------------------------------------------------------------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea,
.grid-form input, .grid-form select, .inline-form input, .inline-form select, .composer input {
  font-family: inherit; font-size: 14px; color: var(--text);
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(255, 255, 255, .03));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35), inset 0 -1px 0 rgba(255, 255, 255, .06);
  min-height: 36px; padding: 6px 12px; margin: 0;
  caret-color: var(--accent);
  transition: border-color .2s, box-shadow .2s;
}
textarea { line-height: 1.55; padding: 10px 12px; resize: vertical; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus, select:focus, textarea:focus,
.composer input:focus {
  outline: none; border-color: color-mix(in srgb, var(--accent-300) 60%, transparent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
::placeholder { color: rgba(230, 235, 244, .38); }
input[readonly] { color: rgba(230, 235, 244, .7); }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.input-sm { min-height: 32px; font-size: 12.5px; }
.field {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(230, 235, 244, .5);
}
.field > input, .field > select, .field > textarea { text-transform: none; letter-spacing: normal; font-size: 13px; min-height: 34px; }
.field.k11 { font-size: 11px; letter-spacing: .08em; }
.grid-form { gap: 14px; }
.grid-form label, .inline-form label { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(230, 235, 244, .5); gap: 6px; }
.grid-form input, .grid-form select { text-transform: none; letter-spacing: normal; font-size: 13px; min-height: 34px; margin-top: 0; }

/* ---- Panels (glass) ------------------------------------------------------ */
.card {
  background-color: transparent; background-image: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  box-shadow: var(--glass-shadow);
  padding: 20px; margin-bottom: 22px;
}
.card.panel { padding: 0; }
.panel-head { display: flex; align-items: baseline; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.panel-head h6, .panel-head .eyebrow { margin: 0; }
.panel-head .meta { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.panel-body { padding: 20px; }
.panel-body.flush { padding: 0; }
.panel-empty { padding: 44px 0; text-align: center; font-size: 13px; color: rgba(230, 235, 244, .45); }
.card.accent { border-color: color-mix(in srgb, var(--accent-300) 35%, transparent); }
.card.danger { border-color: rgba(248, 113, 113, .32); background-image: linear-gradient(160deg, rgba(248, 113, 113, .08), rgba(248, 113, 113, .03)); }

/* Stat tiles */
.tiles { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 30px; }
.tile {
  position: relative; isolation: isolate; min-width: 118px;
  padding: 12px 16px; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, .05));
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 1px rgba(255, 255, 255, .06), inset 1px 0 0 rgba(255, 255, 255, .06), 0 10px 28px -12px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .4);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.tile::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: .9;
  background: radial-gradient(120% 70% at 20% 0%, rgba(255, 255, 255, .18), transparent 55%),
              radial-gradient(80% 60% at 100% 100%, color-mix(in srgb, var(--accent-300) 8%, transparent), transparent 60%);
}
.tile:hover {
  transform: translateY(-2px); border-color: rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 1px rgba(255, 255, 255, .08), 0 16px 34px -14px rgba(0, 0, 0, .8), 0 0 0 1px color-mix(in srgb, var(--accent-300) 8%, transparent);
}
.tile-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(230, 235, 244, .45); white-space: nowrap; }
.tile-val { font-size: 27px; font-weight: 600; margin-top: 6px; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.tile-val.ok { color: var(--ok); } .tile-val.sky { color: #7dd3fc; } .tile-val.warn { color: var(--warn); } .tile-val.bad { color: var(--bad); }

/* ---- Tables -------------------------------------------------------------- */
table { font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; border-bottom: none; vertical-align: middle; }
th { font-size: 11px; letter-spacing: .08em; color: rgba(230, 235, 244, .6); font-weight: 600; }
th.r, td.r { text-align: right; }
thead tr { box-shadow: inset 0 -1px 0 var(--border); }
tbody tr {
  background-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 8%, transparent) 48px, color-mix(in srgb, var(--text) 8%, transparent) calc(100% - 48px), transparent);
  background-repeat: no-repeat; background-size: 100% 1px; background-position: bottom;
  transition: background-color .15s ease;
}
tbody tr:hover { background-color: rgba(255, 255, 255, .04); }
tbody tr:hover td { background: transparent; }
td .avatar { display: inline-grid; place-items: center; vertical-align: middle; }
.cell-user { display: flex; align-items: center; gap: 10px; font-weight: 600; }
td.mono, .cell-mono { font-family: var(--mono); font-size: 12.5px; }
td.dim { color: var(--muted); }
td form { margin: 0; display: inline-flex; }
.table-wrap { overflow-x: auto; }
.card.panel table th:first-child, .card.panel table td:first-child { padding-left: 20px; }
.card.panel table th:last-child, .card.panel table td:last-child { padding-right: 20px; }

/* ---- Pills / tags -------------------------------------------------------- */
.pill, .tag {
  display: inline-block; font-size: 10.5px; padding: 3px 10px; border-radius: 7.5px;
  background: rgba(148, 163, 184, .15); color: rgba(230, 235, 244, .65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 0 0 .5px rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  text-transform: none; line-height: 1.4; white-space: nowrap;
}
.tag-ok { background: rgba(52, 211, 153, .13); color: var(--ok); }
.tag-bad { background: rgba(248, 113, 113, .13); color: var(--bad); }
.tag-warn { background: rgba(251, 191, 36, .13); color: var(--warn); }
.tag-admin { background: rgba(145, 132, 217, .18); color: #b5aaf0; }
.tag-accent { background: var(--accent-13); color: var(--accent-300); }
.anon-pill { background: rgba(255, 255, 255, .1); }
.unread-badge { background: var(--accent); color: #fff; }

/* ---- Modals (10a / 11a / 11b) ------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 20px;
  background: rgba(5, 8, 14, .55);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  backdrop-filter: blur(6px) saturate(140%);
}
.modal[hidden] { display: none; }
.modal-card {
  width: 460px; max-width: 100%; max-height: calc(100vh - 40px); overflow: auto;
  background: linear-gradient(160deg, rgba(40, 52, 78, .72), rgba(16, 24, 42, .62));
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  backdrop-filter: blur(40px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 1px rgba(255, 255, 255, .06), 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 .5px rgba(255, 255, 255, .08);
  padding: 26px 28px; display: flex; flex-direction: column; gap: 18px;
}
.modal-card.sm { width: 400px; padding: 24px 26px; gap: 16px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; }
.modal-head .grow { margin-right: auto; min-width: 0; }
.modal-head h5 { margin: 0; font-weight: 600; font-size: 17px; }
.modal-head .sub { font-size: 12px; color: rgba(230, 235, 244, .5); margin-top: 4px; }
.modal-close { font-size: 13px; padding: 2px 8px; width: 30px; height: 30px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-grid .full { grid-column: 1 / -1; }
.modal-row {
  border: 1px solid var(--border); border-radius: 10px; background: rgba(20, 29, 47, .5);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
}
.modal-row .grow { margin-right: auto; min-width: 0; }
.modal-row .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(230, 235, 244, .45); }
.modal-row .v { margin-top: 4px; font-size: 12.5px; color: rgba(230, 235, 244, .6); }
.modal-row form { display: flex; align-items: center; gap: 8px; margin: 0; }
.modal-row.danger { border-color: rgba(248, 113, 113, .28); background: rgba(248, 113, 113, .06); }
.modal-row.danger .t { font-size: 12.5px; font-weight: 600; color: var(--bad); }
.modal-row.danger .v { font-size: 11.5px; color: rgba(230, 235, 244, .45); margin-top: 3px; }
.modal-row.ok { border-color: rgba(52, 211, 153, .28); background: rgba(52, 211, 153, .06); }
.modal-row.ok .t { font-size: 12.5px; font-weight: 600; color: var(--ok); }
.pin-input { font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: .08em; }
.modal-note { font-size: 11.5px; color: rgba(230, 235, 244, .4); margin: -6px 0 0; line-height: 1.5; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 16px; }
.modal-foot form { margin: 0; }
.warn-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(248, 113, 113, .13); color: var(--bad); display: grid; place-items: center; font-size: 16px; flex: none; }
.confirm-copy { font-size: 13px; line-height: 1.6; color: rgba(230, 235, 244, .65); }
.user-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; background: rgba(20, 29, 47, .5); padding: 10px 12px; }
.user-chip .n { font-size: 13px; font-weight: 600; margin-right: auto; }
.user-chip .u { font-family: var(--mono); font-size: 11.5px; color: rgba(230, 235, 244, .45); }

/* ---- Chat (6a) ----------------------------------------------------------- */
.chat-shell { display: flex; flex-direction: column; grid-template-columns: none; height: 100vh; min-height: 0; }
.conversation { flex: 1; min-height: 0; }
.thread-header { padding: 14px 22px; gap: 10px; border-bottom: 1px solid var(--border); }
.thread-name { gap: 10px; font-size: 14.5px; font-weight: 600; margin-right: auto; min-width: 0; }
.thread-name .avatar { width: 30px; height: 30px; font-size: 11px; }
.thread-name .nm { display: flex; flex-direction: column; min-width: 0; }
.thread-name .nm .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-back { display: none; }
.thread-actions { display: flex; align-items: center; gap: 8px; }
.messages { padding: 24px 26px; gap: 16px; }
.msg {
  max-width: 560px; padding: 14px 16px; font-size: 13.5px; line-height: 1.55; border-radius: 14px;
}
.msg.mine {
  border-radius: 14px 14px 4px 14px; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, color-mix(in srgb, var(--accent) 80%, #fff) 90%, transparent), color-mix(in srgb, var(--accent) 85%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 16px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.msg.theirs {
  border-radius: 14px 14px 14px 4px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 1px rgba(255, 255, 255, .05), inset 1px 0 0 rgba(255, 255, 255, .05);
}
.msg-meta { margin-top: 10px; gap: 0; font-family: var(--mono); font-size: 10.5px; }
.msg-time { font-size: 10.5px; color: rgba(230, 235, 244, .4); }
.msg.mine .msg-time, .msg.mine .msg-meta { color: rgba(255, 255, 255, .65); }
/* The mockup shows "· seen" as text; the ticks stay in the DOM for the read
   logic (applyReadUpTo toggles .ticks.read AND .msg.read) but never paint. */
.ticks { display: none; }
.seen { display: none; }
.msg.read .seen { display: inline; }
.msg-sender { font-size: 10.5px; opacity: .7; margin-bottom: 3px; }
/* pre-wrap moves from the bubble to the body text: a pre-wrapped bubble
   would paint every template newline between chip / body / meta as a blank
   line. The body div keeps deliberate line breaks exactly as before. */
.msg { white-space: normal; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.attach-chip {
  gap: 10px; padding: 10px 12px; margin: 0 0 4px; border-radius: 9px; border: none;
  background: rgba(255, 255, 255, .14);
}
.attach-chip:hover { background: rgba(255, 255, 255, .2); border: none; }
.msg.theirs .attach-chip { background: rgba(255, 255, 255, .08); }
.msg.theirs .attach-chip:hover { background: rgba(255, 255, 255, .13); }
.ac-type {
  width: 30px; height: 30px; border-radius: 7px; background: rgba(255, 255, 255, .18);
  display: grid; place-items: center; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; flex: none;
}
.attach-chip .ac-clip { display: none; }
.ac-name { font-size: 13px; font-weight: 600; }
.ac-size { font-family: var(--mono); font-size: 10.5px; opacity: 1; color: rgba(255, 255, 255, .7); margin-left: auto; }
.msg.theirs .ac-size { color: rgba(230, 235, 244, .5); }
.composer { padding: 14px 22px; gap: 10px; align-items: center; }
.composer input { min-height: 38px; font-size: 13px; padding: 6px 14px; }
.attach-btn, button.attach-btn {
  font-size: 12.5px; padding: 6px 14px; line-height: 1.3;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .14); color: var(--text); font-weight: 500;
  box-shadow: var(--btn-shadow);
}
.attach-btn:hover { border-color: rgba(255, 255, 255, .22); background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)); }
.pending-file {
  margin: 12px 22px 0; padding: 8px 12px; border-radius: 10px;
  background-image: var(--glass-bg); background-color: transparent;
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.pf-size { font-family: var(--mono); }
.pf-bar-fill { background: var(--accent); }
.pf-clear, button.pf-clear { background: none; border: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 4px; width: auto; height: auto; color: var(--muted); font-size: 18px; }
.pf-clear:hover { color: var(--text); transform: none; filter: none; }
.composer-error { margin: 10px 22px 0; font-size: 12px; color: var(--bad); }
.empty-state { font-size: 13px; }
.empty-head { display: flex; align-items: center; justify-content: flex-end; padding: 14px 22px; border-bottom: 1px solid var(--border); }

/* ---- Complaints (6b) ----------------------------------------------------- */
.cpl-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 32px 40px; display: grid; place-items: start center; }
.cpl { width: 620px; max-width: 100%; display: flex; flex-direction: column; gap: 18px; margin-top: 26px; }
.cpl .page-title { margin: 0 0 8px; }
.cpl .lead { font-size: 13px; line-height: 1.6; color: rgba(230, 235, 244, .55); }
.cpl-card { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; margin: 0; }
.cpl-card textarea { font-size: 13.5px; line-height: 1.55; width: 100%; }
.cpl-row { display: flex; align-items: center; gap: 10px; }
.cpl-row .anon-toggle { font-size: 13px; color: rgba(230, 235, 244, .75); gap: 8px; }
.cpl-row button[type="submit"] { margin-left: auto; font-size: 13px; }
.cpl .foot { font-size: 11.5px; color: rgba(230, 235, 244, .4); }
.cpl .composer-error { margin: 0; }
.complaint { border-left: 3px solid var(--accent); }
.complaint.is-anon { border-left-color: rgba(230, 235, 244, .3); }
.complaint-meta .btn-secondary { font-size: 11.5px; padding: 4px 11px; }

/* ---- Monitor thread (15o) ----------------------------------------------- */
.mon-thread { display: flex; flex-direction: column; gap: 14px; padding: 22px; max-height: 70vh; overflow-y: auto; margin: 0; }
.mon-thread .msg { max-width: 420px; padding: 10px 14px; line-height: 1.45; animation: none; opacity: 1; }
.mon-thread .msg-meta { margin-top: 5px; opacity: .65; }
.mon-thread .msg.mine .msg-time { color: #fff; }

/* ---- Login (§14) --------------------------------------------------------- */
body.page-login {
  min-height: 100vh; display: grid; place-items: center; padding: 20px; margin: 0;
  background: radial-gradient(ellipse 62% 48% at 50% 36%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), #0b0f17;
}
.login-wrap { max-width: none; margin: 0; padding: 0; width: 364px; max-width: 100%; }
.login-card {
  position: relative; text-align: center; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
  background-color: rgba(20, 29, 47, .72); border-radius: 14px; padding: 38px 34px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), var(--glass-shadow);
}
.login-brand { display: flex; justify-content: center; margin-bottom: 4px; }
.login-brand img, .login-brand .zed-mark { width: 52px; height: 52px; }
.login-logo { height: 52px; width: 52px; margin: 0; }
.login-title { font-size: 19px; font-weight: 600; letter-spacing: .01em; margin: 0 0 6px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input { width: 100%; min-height: 40px; }
.login-form button { width: 100%; margin-top: 6px; font-size: 14px; padding: 9px 16px; }
.login-card .error { margin: 0; }
.signing-in {
  position: absolute; inset: 0; z-index: 2; border-radius: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(ellipse 70% 55% at 50% 44%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 72%), #0b0f17;
}
.signing-in .zed-mark { width: 118px; height: 118px; }
.signing-in p { margin: 0; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 75%, #fff); }
.zp-track { width: 120px; height: 2px; background: rgba(148, 163, 184, .15); border-radius: 2px; overflow: hidden; }
.zp-bar { display: block; width: 40%; height: 100%; background: var(--accent); animation: zpLoad 1.4s ease-in-out infinite; }
@keyframes zpLoad { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

/* ---- Download page ------------------------------------------------------- */
.dl-row { border: none; margin: 0 0 10px; }
.dl-row .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---- Toast / misc ------------------------------------------------------- */
.toast {
  background: linear-gradient(160deg, rgba(40, 52, 78, .85), rgba(16, 24, 42, .8));
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border-color: rgba(255, 255, 255, .16); border-radius: 12px;
}

/* ---- COMPACT MODE (7a / 7b) — desktop window min width is 700px --------- */
@media (max-width: 720px) {
  body:has(> .topbar) { padding-left: 0; }
  body.page-chat { display: flex; flex-direction: column; height: 100vh; min-height: 0; }
  .topbar {
    position: static; width: auto; padding: 0; overflow: visible;
    background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    transition: none; flex: 0 0 auto; z-index: auto;
  }
  .topbar:hover, .topbar:focus-within { width: auto; }
  .brand > span:not(.zed-mark), .nav-group, .nav-label, .who-name, .who .logout, .rail-note,
  .rail-conv > :not(summary), .rail-conv summary .conv-caret { opacity: 1; transition: none; }
  /* Title bar: 18px mark + wordmark + unread badge right. */
  .brand {
    position: relative; margin: 0; padding: 10px 12px; gap: 9px; justify-content: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
    -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .1);
  }
  .brand-logo, .brand .zed-mark { width: 18px; height: 18px; }
  .brand > span:not(.zed-mark) { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
  .brand .bell { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); margin: 0; }
  /* Nav becomes an icon strip so every route stays one tap away. */
  .topbar nav { flex-direction: row; justify-content: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
  .topbar nav a { padding: 7px; border-radius: 10px; }
  .topbar nav a .bell { position: absolute; left: 18px; top: 2px; }
  .nav-label, .nav-group { display: none; }
  /* Conversations list (7a): 32px avatars, time right, unread under it. */
  .rail-conv { margin: 0; overflow-y: auto; }
  .rail-conv summary { display: none; }
  .rail-conv-body { padding: 12px 10px 4px; gap: 8px; }
  .conv-start { padding: 0 4px; }
  .conv-start input { font-size: 12.5px; min-height: 32px; }
  .conv-start button { font-size: 12px; padding: 4px 12px; }
  .rail-conv-body .nav-group { display: block; padding: 10px 10px 2px; }
  .conv-row { gap: 11px; padding: 9px 10px; border-radius: 9px; }
  .conv-row:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
  .conv-row .avatar { width: 32px; height: 32px; font-size: 11px; }
  .conv-name { font-size: 13.5px; font-weight: 600; }
  .conv-row.unread .conv-name { font-weight: 700; }
  .conv-time { display: block; }
  .rail-note { padding: 8px 14px; }
  .who { margin: 0; padding: 10px 14px; gap: 9px; font-size: 12px; }
  .who-avatar { flex-basis: 24px; width: 24px; height: 24px; font-size: 9.5px; }
  .who .logout { font-size: 11.5px; }
  /* /chat with no ?u = the list; with ?u = the thread with a back arrow. */
  body.page-chat.no-thread .topbar { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  body.page-chat.no-thread .rail-conv { flex: 1 1 auto; min-height: 0; }
  body.page-chat.no-thread .chat-shell { display: none; }
  body.page-chat.has-thread .rail-conv, body.page-chat.has-thread .rail-note, body.page-chat.has-thread .who { display: none; }
  body.page-chat .chat-shell { flex: 1 1 auto; height: auto; min-height: 0; }
  .thread-header { padding: 10px 14px; }
  .thread-back {
    display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
    text-decoration: none; color: rgba(230, 235, 244, .7); font-size: 15px; flex: none;
  }
  .thread-back:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
  .thread-name { font-size: 13.5px; }
  .thread-name .avatar { width: 28px; height: 28px; font-size: 10px; }
  .thread-header .btn-secondary { font-size: 11.5px; padding: 5px 11px; }
  .messages { padding: 16px; gap: 12px; }
  .msg { max-width: 300px; padding: 11px 13px; font-size: 12.5px; line-height: 1.5; }
  .msg.mine { border-radius: 12px 12px 4px 12px; }
  .msg.theirs { border-radius: 12px 12px 12px 4px; }
  .msg-meta { margin-top: 8px; font-size: 9.5px; }
  .attach-chip { gap: 9px; padding: 8px 10px; border-radius: 8px; }
  .ac-type { width: 26px; height: 26px; border-radius: 6px; font-size: 8.5px; }
  .ac-name { font-size: 11.5px; }
  .ac-size { font-size: 9.5px; }
  .composer { padding: 10px 14px; gap: 8px; }
  .composer input { min-height: 34px; font-size: 12.5px; }
  .attach-btn, button.attach-btn { font-size: 11.5px; padding: 5px 9px; }
  .composer button[type="submit"] { font-size: 12.5px; padding: 5px 12px; }
  .pending-file, .composer-error { margin-left: 14px; margin-right: 14px; }
  .container { padding: 18px 16px 32px; }
  .cpl-wrap { padding: 20px 16px; }
  .modal-grid { grid-template-columns: 1fr; }
  .ip-grid { grid-template-columns: 1fr !important; }
}

/* ---- Allowed IPs (15n) --------------------------------------------------- */
.ip-intro { font-size: 12px; color: rgba(230, 235, 244, .45); line-height: 1.5; margin: 0 0 14px; }
.ip-intro strong { color: var(--warn); }
.ip-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin: 0; }
.ip-grid button { font-size: 12.5px; min-height: 34px; }

/* ---- Motion -------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .topbar, .tile, button, .btn, .msg, .zp-bar { transition: none !important; animation: none !important; transform: none !important; }
  .msg { opacity: 1; }
}

/* ---- Glass block: small follow-ups ------------------------------------- */
.who .btn-ghost:hover, .who button.logout:hover { color: var(--text); border-color: rgba(255, 255, 255, .22); }
.who #globalRefreshBtn { order: 2; }
.who form { order: 3; }
.rail-note { white-space: normal; }
.empty-state { flex: 1; height: auto; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
[data-refresh-slot] .refresh-icon { display: none; }

/* ── ZED shell embedded mode (2026-09-30) ─────────────────────────────────────────────────────
   Added to <html> by a one-line detector when this app is framed inside app.zedenterprises.net.
   Hides ONLY the inner wordmark (the shell already shows one); the app's own nav, refresh and
   logout stay exactly where they are. A direct visit never gets the class, so nothing changes there. */
.embedded .topbar .brand { display: none; }

/* ---- Group chats (2026-10-04) ------------------------------------------ */
/* Rounded-square avatar so a group never reads as a person in the rail. */
.group-avatar { border-radius: 8px; font-size: 13px; background: var(--accent-13); color: var(--accent-300); }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.group-new { font-size: 10.5px; letter-spacing: .04em; text-transform: none; color: var(--accent-300); text-decoration: none; padding: 1px 6px; border-radius: 6px; }
.group-new:hover { background: var(--accent-13); }
.group-sub {
  all: unset; cursor: pointer; font-size: 11.5px; font-weight: 400; color: rgba(230, 235, 244, .5);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw;
}
.group-sub:hover { color: var(--accent-300); }
.msg-sender { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 11.5px; font-weight: 600; color: var(--accent-300); white-space: normal; }
.role-tag {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .02em; line-height: 1.5;
  padding: 0 7px; border-radius: 999px; background: var(--accent-13); color: var(--accent-300); white-space: nowrap;
}
.msg-system {
  align-self: center; display: flex; gap: 8px; align-items: baseline; max-width: 80%;
  font-size: 11.5px; color: rgba(230, 235, 244, .55); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; text-align: center;
}
.msg-system .msg-time { font-size: 9.5px; }
.group-readonly { padding: 16px; font-size: 12.5px; color: rgba(230, 235, 244, .5); text-align: center; }
.modal-card.wide { width: 680px; }
.member-list { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow-y: auto; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: 13px; }
.member-row:hover { background: rgba(255, 255, 255, .04); }
.member-row .grow { margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.member-row form { display: flex; align-items: center; gap: 6px; margin: 0; }
.member-row form .btn-danger { min-width: 70px; justify-content: center; }
.member-row .dim, .group-form .dim { color: rgba(230, 235, 244, .4); font-size: 11.5px; }
.member-row[hidden] { display: none; }
.member-list.pick { max-height: none; }
.pick-label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.manage-k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(230, 235, 244, .45); margin-bottom: -10px; }
@media (max-width: 720px) {
  .member-row { flex-wrap: wrap; }
  .member-row input.input-sm { width: 100% !important; }
}

/* ---- Office select (2026-10-26) ------------------------------------------
   Drawn by app.js only inside the ZED app, only for a suite super admin (the
   shell decides). Same place and fade as Payroll's rail company select. */
.rail-office { margin: 0 0 16px; padding: 0 5px; display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: opacity .25s ease; }
.topbar:hover .rail-office, .topbar:focus-within .rail-office { opacity: 1; transition: opacity .35s ease .12s; }
.rail-office-label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(230, 235, 244, .45); }
.rail-office select { width: 100%; font-size: 12.5px; min-height: 32px; padding: 5px 8px; }
/* Compact (<720px, the desktop apps): no hover rail there, so the select is simply shown. */
@media (max-width: 720px) { .rail-office { opacity: 1; padding: 8px 12px 0; margin-bottom: 8px; } }
