/**
 * revival-ui.css
 * Shared design system for all revival.tv web apps.
 * Hosted at: https://assets.revival.tv/revival-ui.css
 * Repo: https://github.com/revival-apps/revival-ui
 *
 * Covers: CSS variables, typography, nav, app header, auth chip,
 *         cards, forms, buttons, action grid, footer, responsive breakpoints.
 *
 * Each app imports this file, then adds app-specific overrides
 * in its own local public/styles.css.
 */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:         #f5f1eb;
  --bg-card:    #faf8f5;
  --bg-header:  #1c2333;
  --ink:        #1a1a2e;
  --ink-2:      #5a5a6e;
  --ink-3:      #9999aa;
  --accent:     #1f4e5f;
  --accent-dk:  #143847;
  --accent-lt:  #e6f0f3;
  --green:      #3a7d5c;
  --green-lt:   #e6f4ed;
  --error:      #c0392b;
  --error-bg:   #fdecea;
  --note-bg:    #fff8e6;
  --note-border:#f0d89a;
  --note-ink:   #7a5a00;
  --border:     rgba(26,26,46,.1);
  --muted:      #5a5a6e;
  --card:       #faf8f5;
  --radius:     12px;
  --shadow:     0 1px 3px rgba(26,26,46,.06), 0 4px 16px rgba(26,26,46,.06);
  --font-serif: 'Lora', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;

  /* Extended palette (upstreamed from revival-dashboard's per-page themes) */
  --accent-2:   #d8a04a;                 /* warm gold — avatars, hover accents */
  --bg-sidebar: #1c2333;                 /* alias of --bg-header (dashboard pages) */
  --red:        #c0392b;                 /* alias of --error */
  --red-lt:     #fdecea;                 /* alias of --error-bg */
  --blue:       #2563a8;
  --blue-lt:    #e8f0fb;
  --orange:     #b04020;
  --orange-lt:  #fbe9dc;

  /* Shadow scale (--shadow above kept for back-compat) */
  --shadow-sm:  0 1px 3px rgba(26,26,46,.06), 0 1px 2px rgba(26,26,46,.04);
  --shadow-md:  0 4px 16px rgba(26,26,46,.08), 0 1px 4px rgba(26,26,46,.04);
  --shadow-lg:  0 12px 40px rgba(26,26,46,.12), 0 2px 8px rgba(26,26,46,.06);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Prevent horizontal scroll — nav header can overflow on narrow viewports.
   Both html AND body must be set; iOS Safari ignores html-only when a
   position:sticky child has overflow-x:auto.

   clip, not hidden: overflow-x hidden turns body into a scroll container,
   which silently disables position: sticky for every descendant on every
   page (the thumbnail generator's pinned preview was the first casualty —
   it had to ship its own page-level override). clip blocks the same
   sideways scroll without creating a scroll container. Browsers too old
   to know clip fall back to hidden via the first declaration. */
html, body { overflow-x: hidden; max-width: 100%; }
html, body { overflow-x: clip; }

html, body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Grain texture */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
}

main, header, footer { position: relative; z-index: 1; }

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── App header ─────────────────────────────────────────────────────────────── */
.app-header {
  background: var(--bg-header);
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* ── App switcher ───────────────────────────────────────────────────────────── */
.app-switcher { position: relative; flex-shrink: 0; }
.app-switcher-btn {
  -webkit-appearance: none; appearance: none;
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; color: #fff;
  cursor: pointer; padding: 6px 10px;
  border-radius: 8px; font-family: inherit; font-size: inherit;
  transition: background .12s;
}
.app-switcher-btn:hover { background: rgba(255,255,255,.1); }
.app-logo { width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0; object-fit: cover; }
.app-name { font-weight: 700; font-size: 1.05rem; color: #fff; }
.switcher-chevron { font-size: .65rem; color: rgba(255,255,255,.5); line-height: 1; transition: transform .15s; }
.app-switcher-btn[aria-expanded="true"] .switcher-chevron { transform: rotate(180deg); }
.app-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.15), 0 1px 4px rgba(0,0,0,.08);
  min-width: 200px; padding: 6px; z-index: 200;
}
.app-menu[hidden] { display: none; }
.app-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink);
  font-size: 14px; font-weight: 500;
  transition: background .12s;
}
.app-menu-item:hover { background: var(--bg); }
.app-menu-icon { width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0; }

/* ── Section nav ────────────────────────────────────────────────────────────── */
.app-nav { display: flex; align-items: center; gap: 2px; }
.app-nav-link {
  display: inline-block; padding: 6px 14px; border-radius: 7px;
  font-size: .88rem; font-weight: 600; color: rgba(255,255,255,.65);
  text-decoration: none; white-space: nowrap;
  transition: background .12s, color .12s;
  -webkit-font-smoothing: antialiased;
}
.app-nav-link:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.9); }
.app-nav-link.active { background: rgba(255,255,255,.92); color: var(--bg-header); font-weight: 600; }
.nav-divider { width: 1px; height: 16px; background: rgba(255,255,255,.2); margin: 0 6px; flex-shrink: 0; }

/* ── Admin sub-nav ──────────────────────────────────────────────────────────── */
.admin-subnav { background: var(--accent-lt); border-bottom: 1px solid rgba(31,78,95,.15); }
.admin-subnav-inner { max-width: 960px; margin: 0 auto; padding: 0 24px; display: flex; gap: 2px; }
.admin-subnav-link {
  display: inline-block; padding: 8px 16px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  text-decoration: none; border-bottom: 2px solid transparent;
  transition: border-color .12s, color .12s;
}
.admin-subnav-link:hover { color: var(--accent-dk); border-bottom-color: rgba(31,78,95,.3); }
.admin-subnav-link.active { color: var(--accent-dk); border-bottom-color: var(--accent); }

/* ── Auth chip ──────────────────────────────────────────────────────────────── */
.auth-chip {
  margin-left: auto;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px; padding: 4px 6px 4px 10px;
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.auth-name { color: rgba(255,255,255,.85); font-size: .82rem; font-weight: 500; white-space: nowrap; }
.auth-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.4); flex-shrink: 0; }
.auth-initials {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff;
  font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: .02em;
}
.auth-logout {
  color: rgba(255,255,255,.55); font-size: .75rem; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  text-decoration: none; transition: background .15s, color .15s;
}
.auth-logout:hover { background: rgba(255,255,255,.1); color: #fff; }
.auth-signin {
  margin-left: auto; font-size: .82rem; font-weight: 500;
  color: rgba(255,255,255,.65); text-decoration: none;
  white-space: nowrap; flex-shrink: 0; transition: color .15s;
}
.auth-signin:hover { color: #fff; }

/* ── Welcome greeting ───────────────────────────────────────────────────────── */
.welcome {
  display: flex; align-items: center; gap: 18px;
  padding-top: 28px; margin-bottom: 36px;
  animation: fadeUp .35s ease both;
  /* No own max-width: it sits inside .container and must share the page's left
     edge — a private 960px cap centered it against wider content below (Aaron,
     2026-08-21: "Good morning Aaron should line up on the left"). */
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.welcome-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--accent-lt); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1.2rem;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(26,26,46,.06), 0 1px 2px rgba(26,26,46,.04);
}
.welcome-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.welcome-text .greeting {
  font-family: var(--font-serif); font-size: 1.85rem; font-weight: 500;
  color: var(--ink); letter-spacing: -.01em; line-height: 1.15;
}
.welcome-text .sub { color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; margin: 24px 0;
}
.intro-card { text-align: center; }
.intro-card .logo { display: block; width: 80px; height: 80px; margin: 4px auto 18px; object-fit: contain; border-radius: 14px; }
.intro-card h1 { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 500; letter-spacing: -.01em; color: var(--ink); margin: 0 0 10px; }
.intro-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-card { padding-top: 14px; }
.field { margin: 20px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 .field { margin: 18px 0 0; }

label, .field-label {
  display: block; font-weight: 500; font-size: .82rem;
  letter-spacing: .02em; text-transform: uppercase;
  margin-bottom: 6px; color: var(--ink-2);
}
.req { color: var(--accent); }
.optional { color: var(--ink-3); font-weight: 400; font-size: .78rem; text-transform: none; letter-spacing: 0; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%; padding: 10px 12px;
  font-size: .95rem; font-family: inherit; color: var(--ink);
  background: #fff; border: 1px solid rgba(26,26,46,.15);
  border-radius: 8px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-lt);
}
textarea { resize: vertical; min-height: 110px; }

.checkbox-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.radio-group { display: flex; gap: 28px; }
.checkbox, .radio {
  display: flex; align-items: center; gap: 9px;
  font-weight: 400; font-size: .9rem; margin: 0; cursor: pointer; color: var(--ink);
}
.checkbox input, .radio input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.conditional { margin-top: 14px; }

.hint { display: block; color: var(--ink-3); font-size: .8rem; margin-top: 5px; }

input[type="file"] {
  width: 100%; font-size: .88rem; font-family: inherit; color: var(--ink);
  padding: 9px 12px; background: #fff;
  border: 1px dashed rgba(26,26,46,.2); border-radius: 8px; cursor: pointer;
}
input[type="file"]::file-selector-button {
  font-family: inherit; font-size: .82rem; font-weight: 600; color: var(--ink);
  background: var(--bg); border: 1px solid rgba(26,26,46,.15);
  border-radius: 6px; padding: 6px 12px; margin-right: 12px; cursor: pointer;
}
input[type="file"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-lt); }

.error-text { display: none; color: var(--error); font-size: .8rem; margin-top: 5px; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--error); }
.field.has-error .error-text { display: block; }

/* ── Banners ────────────────────────────────────────────────────────────────── */
.form-banner { border-radius: 8px; padding: 13px 16px; font-size: .88rem; line-height: 1.5; margin-bottom: 18px; }
.form-banner.error  { background: var(--error-bg); color: var(--error); border: 1px solid #f5c6c0; }
.form-banner.note   { background: var(--note-bg); color: var(--note-ink); border: 1px solid var(--note-border); text-align: left; margin: 20px 0; }
.form-banner.warning{ background: #FEF9E7; color: #7D6608; border: 1px solid #F7DC6F; }
.form-banner.info   { background: var(--accent-lt); color: var(--accent); border: 1px solid rgba(31,78,95,.2); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn-sm { display: inline-block; padding: 4px 12px; border-radius: 6px; font-size: .82rem; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; border: none; }
.btn-sm.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* BUTTONS: TWO FAMILIES (2026-08-21 facilities UX audit, item 4.2).
   Full-size primary — .submit-btn (block, forms) and .btn-add (inline, admin) share
   one visual voice: accent fill, 8px radius, 600 weight, 14px. Compact pill —
   .btn-pill and its variants, 6px radius, for dense rows. Anything new picks one of
   the two; a third family is the drift this comment exists to stop. */
.submit-btn {
  display: inline-block; width: 100%; margin-top: 8px;
  padding: 13px 20px; font-size: 14px; font-weight: 600;
  font-family: var(--font-sans); color: #fff; background: var(--accent);
  border: none; border-radius: 8px; cursor: pointer;
  text-align: center; text-decoration: none; letter-spacing: .01em;
  transition: background .15s, transform .05s;
}
.submit-btn:hover { background: var(--accent-dk); }
.submit-btn:active { transform: translateY(1px); }
.submit-btn:disabled { opacity: .55; cursor: not-allowed; }
.link-btn { width: auto; padding: 11px 28px; }

.btn-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 6px 12px; border-radius: 6px;
  border: 1.5px solid var(--border, #e0dbd4);
  background: var(--card, #fff); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: border-color .12s, color .12s, background .12s;
}
.btn-pill:hover { border-color: #b0a898; background: var(--surface, #f5f0ea); text-decoration: none; }
.btn-pill--accent { background: #e6f0f3; border-color: var(--accent, #1f4e5f); color: var(--accent, #1f4e5f); }
.btn-pill--accent:hover { background: #cfe2e9; border-color: var(--accent, #1f4e5f); }
.btn-pill--filled { background: var(--accent, #1f4e5f); border-color: var(--accent, #1f4e5f); color: #fff; font-size: 13px; font-weight: 700; }
.btn-pill--filled:hover { opacity: .88; background: var(--accent, #1f4e5f); border-color: var(--accent, #1f4e5f); }
.btn-pill--filled:disabled { opacity: .5; cursor: not-allowed; }
.btn-pill--danger { color: var(--muted); }
.btn-pill--danger:hover { border-color: var(--error, #c0392b); color: var(--error, #c0392b); background: var(--card, #fff); }

/* ── Honeypot ───────────────────────────────────────────────────────────────── */
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ── Thank-you / success states ─────────────────────────────────────────────── */
.thankyou-card { text-align: center; padding: 40px 28px; }
.check-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green-lt); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.thankyou-card h1 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 500; color: var(--ink); margin: 0 0 8px; }
.thankyou-card .lead { color: var(--muted); margin: 0 0 22px; font-size: .95rem; }
.summary { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; margin: 0 auto 22px; max-width: 360px; text-align: left; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }
.summary-row:last-child { border-bottom: none; }
.summary-label { color: var(--muted); font-size: .85rem; }
.summary-value { font-weight: 600; font-size: .85rem; }
.muted { color: var(--muted); font-size: .88rem; margin: 18px 0 24px; }

/* ── Action grid (home page cards) ──────────────────────────────────────────── */
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 0 0 24px; }
.action-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 22px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 6px;
  transition: box-shadow .15s, border-color .15s;
}
a.action-card:hover, button.action-card:hover {
  box-shadow: 0 2px 8px rgba(26,26,46,.1), 0 8px 24px rgba(26,26,46,.1);
  border-color: rgba(31,78,95,.4); text-decoration: none;
}
.action-card.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
a.action-card.primary:hover, button.action-card.primary:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.action-card-icon { font-size: 1.5rem; line-height: 1; margin-bottom: 4px; }
.action-card-title { font-weight: 600; font-size: 1rem; margin: 0; }
.action-card-desc { font-size: .83rem; opacity: .72; line-height: 1.5; margin: 0; }
.action-card.full-width { grid-column: 1 / -1; }

/* ── Two-column form layout ──────────────────────────────────────────────────── */
.request-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.request-main { min-width: 0; }
.request-sidebar { position: sticky; top: 24px; }
.sidebar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 20px; margin-top: 24px; }
.sidebar-card h3 { font-size: .92rem; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.sidebar-card .sidebar-desc { font-size: .82rem; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }

/* ── Admin & settings pages ──────────────────────────────────────────────────
   Upstreamed from design-workflow/views/admin.ejs (2026-08-18), unchanged in
   name so design can delete its local <style> block without touching markup.

   WHY IT MOVED. These classes were always shared in intent and private in
   fact: design defined them inline, and this file already carried a
   `.admin-card { padding: 16px 18px; }` override in the 480px media query —
   a responsive rule for a class that did not exist here. Facilities needed
   the same list-management pattern for its leads page, and copying fifty
   lines of CSS into a second app is how a design system quietly stops being
   one. Aaron, 2026-08-18: upstream first, then use it.

   The local fallbacks (var(--border, #e8e2db)) are dropped — every token
   below is defined at the top of this file, so a fallback could only ever
   mask a typo.
   ──────────────────────────────────────────────────────────────────────────── */

/* Sidebar + content layout for a settings page with many sections. */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}

.admin-nav { list-style: none; margin: 0; padding: 0; }
.admin-nav li a {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  text-decoration: none; transition: background .12s;
}
.admin-nav li a:hover  { background: var(--bg); }
.admin-nav li a.active { background: var(--accent); color: #fff; }
.admin-nav-section {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); padding: 14px 14px 4px;
}

/* One section of a settings page. Distinct from .card: tighter heading, and a
   description line that sets up what the controls below it do. */
.admin-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.admin-card h2 {
  font-size: 17px; font-weight: 700; margin: 0 0 4px; color: var(--ink);
}
.admin-card .section-desc {
  font-size: 13px; color: var(--muted); margin: 0 0 24px;
}

/* A list of email addresses that grants something — admins, leads, editors. */
.admin-list { list-style: none; margin: 0 0 24px; padding: 0; }
.admin-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border); gap: 12px;
}
.admin-list li:last-child { border-bottom: none; }
.admin-email {
  font-size: 14px; color: var(--ink); font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
/* Marks the signed-in person in a list they can edit, so "why is there no
   Remove button on this row" answers itself. */
.you-badge {
  font-size: 11px; font-weight: 600; padding: 2px 7px;
  border-radius: 10px; background: var(--green-lt); color: var(--green);
}

/* A row in an editable list: label, then actions, with an optional full-width
   inline edit form as a third wrapped child. */
.list-mgmt-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--border); gap: 12px;
}
.list-mgmt-row:last-child { border-bottom: none; }
.list-mgmt-label {
  font-size: 14px; font-weight: 500; color: var(--ink);
  display: flex; align-items: center; gap: 8px; flex: 1;
}
.list-mgmt-label .sublabel { font-size: 12px; color: var(--muted); font-weight: 400; }
.list-mgmt-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.inactive-badge {
  font-size: 11px; font-weight: 600; padding: 2px 7px;
  border-radius: 10px; background: var(--bg); color: var(--muted);
}

/* Add-a-row forms. Two variants because an email field wants a wider minimum
   than a short slug or name field. */
.add-admin-form,
.add-list-form {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
}
.add-list-form {
  gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.add-admin-form .field,
.add-list-form .field {
  display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.add-admin-form .field { min-width: 220px; }
.add-list-form .field { min-width: 160px; }
.add-admin-form label,
.add-list-form label {
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: none; letter-spacing: 0; margin-bottom: 0;
}
.add-admin-form input[type="email"],
.add-admin-form input[type="text"],
.add-list-form input[type="text"] {
  padding: 9px 13px; border-radius: 8px; border: 1.5px solid var(--border);
  font-size: 14px; color: var(--ink); background: var(--bg-card);
  outline: none; transition: border-color .15s;
}
.add-admin-form input:focus,
.add-list-form input:focus { border-color: var(--accent); background: #fff; }

/* The inline member of the full-size primary family — see the BUTTONS note. */
.btn-add {
  padding: 10px 20px; border-radius: 8px; border: none;
  background: var(--accent); color: #fff; font-size: 14px;
  font-family: var(--font-sans);
  font-weight: 600; cursor: pointer; white-space: nowrap; transition: opacity .12s;
}
.btn-add:hover { opacity: .88; }

.btn-toggle-active,
.btn-edit {
  padding: 5px 12px; border-radius: 6px; border: 1.5px solid var(--border);
  font-size: 12px; font-weight: 600; cursor: pointer; background: var(--bg-card);
  transition: background .12s, color .12s, border-color .12s;
}
.btn-toggle-active { color: var(--muted); }
.btn-toggle-active:hover { background: var(--bg); }
.btn-edit { color: var(--ink); }
.btn-edit:hover { background: var(--blue-lt); border-color: var(--blue); color: var(--blue); }

.inline-edit-wrap {
  padding: 12px 0 4px; border-top: 1px dashed var(--border); margin-top: 4px;
}
.inline-edit-wrap .add-list-form { margin-top: 0; padding-top: 0; border-top: none; }

/* Result of the action just taken. Distinct from .form-banner, which reports
   the state of a form the person is still filling in. */
.flash {
  padding: 12px 16px; border-radius: 8px; font-size: 13px;
  font-weight: 500; margin-bottom: 20px;
}
.flash.success { background: var(--green-lt); color: var(--green); border: 1px solid #a0d4ba; }
.flash.error   { background: var(--error-bg); color: var(--error); border: 1px solid #f0c0bc; }

/* ── Request / job cards ─────────────────────────────────────────────────────
   Upstreamed from design-workflow/views/status.ejs (2026-08-18), same class names
   so design can delete its local <style> block without touching markup.

   Second batch to move up, after the admin list-management family. Same reason:
   facilities needed the identical "a list of things with a status" layout for its
   My Requests page, and Aaron's rule is upstream first, then use.

   WHAT IS DELIBERATELY NOT HERE: design's per-status colour variants
   (.status-badge.proof-sent, .needs-proof, .revisions …). Those are a print shop's
   vocabulary. Facilities has four statuses of its own and steward has a giving
   workflow's. Putting all three sets here would ship every app a dozen classes it
   will never use, so each app colours its own statuses locally and only the SHAPE
   is shared. `.status-badge` alone is a legible neutral badge.
   ──────────────────────────────────────────────────────────────────────────── */

.jobs-list {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
  gap: 16px;
  align-items: start;
}

.job-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  /* Without this a long unbroken description overflows its grid track rather than
     wrapping — the track is sized from content, not from the container. */
  min-width: 0;
}

.job-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.job-title { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0; }
.job-number { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }

/* The shape only — see the note above about colours. */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg);
  color: var(--muted);
}

.job-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 24px;
  font-size: 14px;
  color: var(--ink);
}
.meta-item { display: flex; flex-direction: column; gap: 1px; }
.meta-label {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px;
}
.meta-value { font-weight: 500; }

.job-detail {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.detail-label {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px;
}
.detail-value { font-size: 14px; color: var(--ink); line-height: 1.6; }

.no-results { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer { text-align: center; color: var(--ink-3); font-size: .82rem; padding: 28px 0 48px; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .app-nav-link { padding: 6px 9px; font-size: .8rem; }
  .auth-name { display: none; }
}
@media (max-width: 800px) {
  .app-nav-link { padding: 5px 7px; font-size: .75rem; }
}
@media (max-width: 700px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
}
@media (max-width: 760px) {
  .request-layout { grid-template-columns: 1fr; }
  .request-sidebar { position: static; order: -1; }
  .sidebar-card { margin-top: 0; }
}
@media (max-width: 560px) {
  /* Explicit columns: iOS Safari otherwise packs four tiny ones into the auto-fill. */
  .job-meta { grid-template-columns: 1fr 1fr; gap: 10px 14px; font-size: 13px; }
  .job-title { font-size: 15px; }

  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .checkbox-group { grid-template-columns: 1fr; }
  .card { padding: 20px; }
}
@media (max-width: 540px) {
  .app-header { height: auto; flex-wrap: wrap; padding: 8px 14px 0; gap: 0; }
  .app-switcher { order: 1; }
  .auth-chip, .auth-signin { order: 2; }
  .app-nav {
    order: 3; flex-basis: 100%; overflow-x: auto;
    overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 4px 0 8px; gap: 0;
  }
  .app-nav::-webkit-scrollbar { display: none; }
  .app-nav-link { font-size: .8rem; padding: 5px 10px; }
}
@media (max-width: 480px) {
  .jobs-list { grid-template-columns: 1fr; }
  .job-card { padding: 16px 18px; }

  .container { padding: 0 14px; }
  .welcome { gap: 12px; padding-top: 20px; margin-bottom: 24px; }
  .welcome-avatar { width: 48px; height: 48px; font-size: 1rem; }
  .welcome-text .greeting { font-size: 1.4rem; }
  .welcome-text .sub { font-size: .82rem; }
  .card { padding: 16px; }
  .app-name { display: none; }
  .auth-chip { padding: 4px 6px; gap: 4px; }
  .admin-card { padding: 16px 18px; }
}

/* ── Accessibility ──────────────────────────────────────────────────────────── */
/* Visible keyboard-focus ring on interactive elements. Form fields keep the
   existing :focus box-shadow ring instead (see Forms above), so they're
   excluded here to avoid a doubled outline. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: none; }
.app-header :focus-visible { outline-color: #fff; }

/* Respect OS-level reduced-motion: collapse decorative animations/transitions. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Triage queue ─────────────────────────────────────────────────────────
   Upstreamed 2026-08-21 from design's views/admin-queue.ejs, so facilities'
   queue can be the same object ("the que in admin should look like the
   design que" — Aaron). The family: a hero header, per-person workload
   cards, search, filter/sort/status pills, sections with a dark header and
   a table that reflows to cards on a phone.

   Status COLOURS are deliberately not here — each app's status vocabulary
   is its own (.status-badge in this sheet is the shared shape). App-only
   controls (design's status-override select, repost/delete buttons) also
   stay local. */

.queue-hero {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}
.queue-hero h1 { font-size: 24px; font-weight: 700; margin: 0; color: var(--ink); }
.queue-hero-meta { font-size: 13px; color: var(--muted); }
.btn-reload {
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: none; border: 1px solid var(--accent); border-radius: 8px;
  padding: 5px 14px; cursor: pointer; text-decoration: none;
  transition: background .12s;
}
.btn-reload:hover { background: var(--accent-lt); }

/* Attention banner above the queue — design uses it for unfinished drafts,
   facilities for missed recurring work. */
.drafts-banner {
  background: #f0f7fa; border: 1.5px solid rgba(31,78,95,.18);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 20px;
}
.drafts-banner-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--accent); margin: 0 0 10px;
}
.draft-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 0; border-top: 1px solid rgba(31,78,95,.1);
}
.draft-row:first-of-type { border-top: none; padding-top: 0; }
.draft-row-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.draft-row-meta { font-size: 12px; color: var(--muted); }
.draft-row-age { font-size: 11px; font-weight: 600; color: #a06c00; background: #fff8e6; border-radius: 10px; padding: 2px 8px; }
.draft-row-link {
  margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent);
  text-decoration: none; white-space: nowrap;
}
.draft-row-link:hover { text-decoration: underline; }

/* Per-person workload cards. Click filters the queue to that person. */
.workload-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.workload-card {
  background: var(--card, #fff); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 14px; min-width: 140px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.workload-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.workload-card.active { border-color: var(--accent); background: #f0f7fa; }
.workload-card-name {
  font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .4px; margin-bottom: 4px;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.workload-card-total { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1; }
.workload-card-breakdown { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.wl-chip { border-radius: 8px; padding: 1px 6px; font-weight: 600; }
.wl-ip   { background: #edf7ee; color: #277232; }
.wl-pr   { background: #fff8e6; color: #a06c00; }
.wl-rev  { background: #fff0e6; color: #b85c00; }
.wl-wait { background: #f5f0ff; color: #6b3fc2; }
.wl-hold { background: #f5f5f5; color: #666; }
.wl-alert { background: #fdecea; color: #c0392b; }

/* Search */
.queue-search-wrap { margin-bottom: 16px; }
.queue-search-input {
  width: 100%; box-sizing: border-box;
  padding: 9px 14px 9px 36px; font-size: 14px; font-family: inherit;
  border: 1.5px solid var(--border); border-radius: 8px;
  color: var(--ink); background: var(--card, #fff);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center;
  transition: border-color .12s;
}
.queue-search-input:focus { outline: none; border-color: var(--accent); }
.queue-search-input::placeholder { color: var(--muted); }

/* Filter / sort / status pills */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-pill {
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--border);
  background: var(--card, #fff); color: var(--ink-2, #5a5a6e);
  user-select: none; transition: border-color .1s, color .1s;
}
.filter-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.filter-pill:not(.active):hover { border-color: #b0a898; color: var(--ink); }
.sort-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.sort-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.sort-pill {
  padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--border);
  background: var(--card, #fff); color: var(--ink-2, #5a5a6e);
  user-select: none; transition: border-color .1s, color .1s;
}
.sort-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sort-pill:not(.active):hover { border-color: #b0a898; color: var(--ink); }
.status-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; }
.status-pill {
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 99px; border: 1.5px solid var(--border);
  background: var(--card, #fff); color: var(--muted); cursor: pointer;
  font-family: inherit; transition: background .15s, color .15s;
}
.status-pill.active { background: var(--accent); color: #fff; border-color: transparent; }

/* Sections: dark header bar + table */
.queue-section { margin-bottom: 32px; }
.queue-section-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--accent); color: #fff;
  border-radius: 10px 10px 0 0;
  font-size: 14px; font-weight: 700;
}
.queue-section-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-section-count {
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,.22); border-radius: 10px; padding: 2px 9px;
}
.queue-rush-count {
  font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.9); color: #a04000; border-radius: 10px; padding: 2px 9px;
}
.queue-table-wrap { overflow-x: auto; }
.queue-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: var(--card, #fff);
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.queue-table th {
  text-align: left; padding: 8px 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.queue-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--ink);
}
.queue-table tbody tr:last-child td { border-bottom: none; }
.queue-table tbody tr:hover td { background: #faf8f5; }
.queue-job-title {
  font-size: 13px; font-weight: 600; color: var(--ink);
  text-decoration: none; display: block; line-height: 1.3;
}
.queue-job-title:hover { color: var(--accent); text-decoration: underline; }
.queue-job-sub {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 560px;
}

/* Meta chips */
.chip {
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 8px;
  white-space: nowrap; display: inline-block;
}
.chip-age { color: var(--ink-2, #5a5a6e); }
.chip-date  { background: #f0f4ff; color: #3d5fc2; }
.chip-age   { background: var(--bg); color: var(--muted); }
.chip-age.old   { background: #fff0e6; color: #b85c00; }
.chip-age.older { background: #fdecea; color: #c0392b; }
.chip-rush  { background: #fff3e0; color: #a04000; }

/* Actions cell + inline assign. ONE LINE (Aaron, 2026-08-21) — the earlier
   overflow came from an unbounded control, so the fix is capping the select's
   width, not wrapping the buttons. The wrapper's overflow-x is the escape hatch
   on a genuinely narrow window; under 640px the mobile block reflows the cell. */
.queue-actions-col { white-space: nowrap; text-align: right; }
.queue-actions-col > * { display: inline-flex; vertical-align: middle; }
.queue-actions-col > * + * { margin-left: 6px; }
.queue-actions-col .assign-select { max-width: 150px; }
.queue-empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: 14px; }
.assign-form { display: inline-flex; align-items: center; gap: 6px; }
.assign-select {
  font-size: 12px; padding: 4px 8px; border-radius: 6px;
  border: 1.5px solid var(--border); color: var(--ink);
  background: #fff; cursor: pointer; font-family: inherit;
}
.assign-select:focus { outline: none; border-color: var(--accent); }
.assign-btn {
  font-size: 12px; font-weight: 600; padding: 4px 12px;
  border-radius: 6px; border: none; cursor: pointer;
  background: var(--accent); color: #fff;
  font-family: inherit; white-space: nowrap;
}
.assign-btn:hover { opacity: .85; }
.assign-btn:disabled { opacity: .5; cursor: not-allowed; }
.queue-view-link {
  display: inline-block; padding: 5px 12px; border: 1.5px solid var(--border);
  border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--ink);
  text-decoration: none; background: var(--card, #fff); white-space: nowrap;
}
.queue-view-link:hover { border-color: var(--accent); color: var(--accent); }

/* Phone reflow: the table becomes stacked cards. Cells opt into their role
   with classes rather than nth-child, so apps with different column counts
   share the same rules. */
@media (max-width: 640px) {
  .hide-mobile { display: none; }
  .queue-table-wrap { overflow-x: visible; }
  .queue-table,
  .queue-table thead,
  .queue-table tbody,
  .queue-table tr,
  .queue-table td,
  .queue-table th { display: block; width: 100%; box-sizing: border-box; }
  .queue-table thead { display: none; }
  .queue-table tbody tr.queue-row {
    margin-bottom: 10px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card, #fff);
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
  }
  .queue-table td.queue-cell-main {
    padding: 12px 14px 8px;
    border-bottom: 1px solid var(--border);
  }
  .queue-table td.queue-cell-status {
    padding: 8px 14px;
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    border-bottom: 1px solid var(--border);
  }
  .queue-table td.queue-actions-col {
    padding: 8px 14px 12px;
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    border-bottom: none; text-align: left;
  }
  .queue-table td.queue-actions-col .assign-form { flex-wrap: wrap; }
  .queue-table tbody tr:hover td { background: transparent; }
}

/* ── Communication settings table ─────────────────────────────────────────
   design's Communication Settings layout (Event | Email | SMS), shared so
   facilities' matrix reads as the same object. Checkbox cells are centered;
   a channel an event can't use shows a dash, and one that is always on says
   so in words rather than a disabled control. */
.comms-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.comms-table th {
  text-align: left; padding: 8px 10px 8px 0;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.comms-table th.comms-col-check { text-align: center; width: 70px; }
.comms-table td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.comms-table tr:last-child td { border-bottom: none; }
.comms-event-name { font-weight: 700; color: var(--ink); font-size: 15px; }
.comms-event-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.comms-check { text-align: center; }
.comms-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.comms-na { text-align: center; color: var(--muted); }
.comms-freq { font-size: 12px; color: var(--muted); margin-top: 6px; }
.comms-freq input[type="number"] { width: 56px; padding: 3px 6px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 12px; }

/* ── Detail page ──────────────────────────────────────────────────────────
   The narrow detail column, from design's designer-job.ejs. Most of that page's
   kit already lives above (.job-header, .job-meta, .status-badge, .job-detail);
   these are the three pieces it had and the sheet didn't. */
.detail-wrap { max-width: 860px; margin: 0 auto; }
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 12px;
}
.detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-table th {
  text-align: left; padding: 8px 12px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid var(--border);
}
.detail-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.detail-table tr:last-child td { border-bottom: none; }

/* ── Type-to-search combos (combo.js) ─────────────────────────────────────
   The input matches the estate's form fields (.add-admin-form's input rules) —
   Aaron, 2026-08-21: "This search field should have the same styling as the
   other fields like Display Name." One appearance whether a field is typed,
   picked, or searched. */
.combo-wrap { position: relative; }
.combo-input {
  width: 100%; box-sizing: border-box;
  padding: 9px 13px; border-radius: 8px; border: 1.5px solid var(--border);
  font-size: 14px; font-family: inherit; color: var(--ink);
  background: var(--bg-card, #fff);
  outline: none; transition: border-color .15s;
  -webkit-appearance: none; appearance: none;
}
.combo-input:focus { border-color: var(--accent); background: #fff; }
.combo-input::placeholder { color: var(--muted); }
.combo-menu {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
  margin-top: 4px; background: var(--card, #fff);
  border: 1px solid var(--border); border-radius: 8px;
  max-height: 240px; overflow: auto;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}
.combo-opt { padding: 8px 12px; cursor: pointer; font-size: 13px; color: var(--ink); }
.combo-opt:hover, .combo-opt.active { background: var(--accent-lt, #eef4f6); }
.combo-sub { font-size: 12px; color: var(--muted); }
.combo-empty { padding: 8px 12px; color: var(--muted); font-size: 13px; }


/* ── Queue controls collapse (2026-08-21 audit, item 8.1) ─────────────────
   On a phone the workload strip + search + three pill bars sat above the first
   row. One toggle reclaims the screen; desktop is unchanged. */
.queue-controls-toggle {
  display: none; width: 100%; margin-bottom: 12px;
  padding: 10px 16px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--card, #fff); color: var(--ink); font-size: 14px;
  font-weight: 600; cursor: pointer; font-family: inherit; text-align: left;
}
@media (max-width: 640px) {
  .queue-controls-toggle { display: block; }
  .queue-controls { display: none; }
  .queue-controls.open { display: block; }
}

/* Status dropdown under the badge in a queue row — design's admin-queue control,
   shared now that facilities has it too (Aaron, 2026-08-21: "Status should also
   be a dropdown"). */
.status-override-select {
  font-size: 11px; padding: 3px 6px; border-radius: 6px;
  border: 1.5px solid var(--border); color: var(--ink);
  background: #fff; cursor: pointer; font-family: inherit;
  max-width: 130px; margin-top: 5px; display: block;
}
.status-override-select:focus { outline: none; border-color: var(--accent); }


/* The queue row's Delete — design's .btn-delete-job, shared now facilities has one. */
.btn-delete-job {
  font-size: 12px; font-weight: 500; padding: 4px 10px;
  border-radius: 6px; border: 1.5px solid #fcc; cursor: pointer;
  background: #fff; color: #c0392b; font-family: inherit; white-space: nowrap;
}
.btn-delete-job:hover { background: #fdecea; border-color: #c0392b; }

/* Repost-to-Slack, design's .repost-nts-btn shape. */
.repost-slack-btn {
  font-size: 12px; font-weight: 500; padding: 4px 10px;
  border-radius: 6px; border: 1.5px solid var(--border);
  cursor: pointer; background: #fff; color: var(--muted);
  font-family: inherit; white-space: nowrap;
}
.repost-slack-btn:hover { border-color: var(--accent); color: var(--accent); }


/* ── Focus visibility (2026-08-21 audit, item 4) ──────────────────────────
   One rule instead of per-control border games: anything interactive gets a
   visible ring on keyboard focus. Mouse clicks (:focus without :focus-visible)
   stay clean. */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent, #1f4e5f);
  outline-offset: 2px;
}

/* ── Modal (design's admin-queue modal family, shared) ───────────────────
   Replaces window.prompt/confirm for anything destructive or reason-required
   (audit item 2): stylable, keyboard-dismissable, and the typed reason can't
   be lost to a stray tap. */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, .45); z-index: 100;
  align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--card, #fff); border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .2); padding: 28px;
  width: 440px; max-width: calc(100vw - 32px);
}
.modal h2 { font-size: 18px; margin: 0 0 8px; }
.modal p { font-size: 14px; color: var(--ink-2, #5a5a6e); margin: 0 0 12px; }
.modal textarea, .modal input[type="text"] {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--ink);
}
.modal textarea { min-height: 90px; resize: vertical; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

/* The queue's date cell, replacing per-row inline styles (audit item 7). */
.queue-cell-date { white-space: nowrap; color: var(--muted); font-size: 13px; }
