/* ==========================================================================
   hub.css (fork-only): the look of every internal hub page.

   Same rules as the Daddy's Crew staffing app (STAFFING TOOL/src/ui/styles.css),
   so the two read as one product:
     - Light, always, whatever the device is set to.
     - True black on white, like the logo. Archivo Black for page titles and
       big figures, Inter for everything read, JetBrains Mono for figures,
       IDs and dates.
     - Body 15px, nothing under 12px, no light weights, every text colour at
       least 4.5:1 on white. Capitals only for short labels.
     - Pink is a fill behind black text, a focus ring or a hover marker.
       Never pink text on white (3:1, fails).
     - Hard corners, no drop shadows, no blur. Form fields have a full 1.5px
       border and a 40px minimum height. Buttons are a 2px black outline,
       primary is solid black. State is form before colour: solid black is
       done, an outline is pending, red is only for things a person must act on.

   How it applies. Every hub page has <html class="hub-ui"> and links this
   file after its own <style>. Everything here is scoped to .hub-ui, so the
   public forms (inquiry, apply, crew) and portal.html are never touched.
     1. Tokens. :root.hub-ui outranks each page's own :root block, so the
        variables the older pages already use (--bg, --card, --amber,
        --line...) are redefined here and most of the restyle comes free.
        Amber becomes ink. applyTheme() in shared.js does nothing on a
        .hub-ui page, so the Sheet's theme can't paint over this; it still
        colours the public forms and portal.html.
     2. Shell: the sidebar, the sign-in card, page frame.
     3. The older pages (board, calendar, clients, payments, files, admin):
        a legibility floor generated from their own CSS, then overrides for
        their components. Their own <style> blocks are left as they were, so
        upstream BookingSuite changes still merge cleanly into them.
     4. The pages built on the staffing classes (applications, roster,
        <body class="hub-staff">): the staffing components, scoped to
        .hub-staff so generic selectors like `label` and `table` can't reach
        the older pages.
   New hub CSS goes here, not in a page, and uses the tokens. No hard-coded
   colours.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */

:root.hub-ui {
  color-scheme: light;

  --paper: #ffffff;
  --paper-2: #f4f4f5;
  --paper-3: #e9e9ec;
  --ink: #0a0a0a;
  --ink-2: #27272a;
  --mid: #45454a;        /* 9.5:1 on white */
  --faint: #66666d;      /* 5.7:1 on white */
  --rule: #d4d4d8;
  --rule-input: #8e8e96; /* 3.3:1: a control's edge has to be findable */
  --rule-strong: #0a0a0a;
  --alert: #b42318;      /* 6.6:1 on white */
  --alert-soft: #fdecea;
  --accent: #ff4fa3;     /* 6.5:1 behind black text */
  --accent-soft: #ffe3f1;
  --on-ink: #ffffff;
  --scrim: rgba(10, 10, 10, 0.55);

  --display: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --body: var(--sans);

  --track: 0.04em;
  --track-wide: 0.06em;

  /* The older pages' names, mapped onto the tokens above. */
  --bg: var(--paper);
  --card: var(--paper);
  --surface: var(--paper);
  --surface-2: var(--paper-2);
  --surface-3: var(--paper-3);
  --line: var(--rule);
  --line-2: var(--rule-input);
  --border: var(--rule);
  --ink2: var(--ink-2);
  --muted: var(--mid);
  --muted-2: var(--faint);
  --amber: var(--ink);
  --amber-dim: var(--ink);
  --amber-soft: var(--accent-soft);
  --accent2: var(--ink);
  --gold: var(--ink);
  --green: var(--ink);
  --green-soft: var(--paper-2);
  --red: var(--alert);
  --red-soft: var(--alert-soft);
  --blue: var(--ink-2);
  --blue-soft: var(--paper);
  --violet: var(--ink);
  --violet-soft: var(--paper-2);
  --stale: var(--faint);
  --stale-soft: var(--paper-2);

  /* Pipeline status: new is an outline, quoted is pink behind black,
     contracted is solid black, invoiced solid grey, stale and dead quiet. */
  --new-bg: var(--paper);          --new-border: var(--ink);          --new-text: var(--ink);
  --quoted-bg: var(--accent-soft); --quoted-border: var(--ink);       --quoted-text: var(--ink);
  --contracted-bg: var(--ink);     --contracted-border: var(--ink);   --contracted-text: var(--on-ink);
  --invoiced-bg: var(--mid);       --invoiced-border: var(--mid);     --invoiced-text: var(--on-ink);
  --stale-bg: var(--paper-2);      --stale-border: var(--rule-input); --stale-text: var(--mid);
  --dead-bg: var(--paper-2);       --dead-border: var(--rule);        --dead-text: var(--faint);
  --cancelled-bg: var(--dead-bg);  --cancelled-border: var(--dead-border); --cancelled-text: var(--dead-text);
}

.hub-ui body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.hub-ui *, .hub-ui *::before, .hub-ui *::after { box-sizing: border-box; }
.hub-ui * { border-radius: 0 !important; }
.hub-ui .spin { border-radius: 50% !important; } /* the loading spinner stays round */
.hub-ui ::selection { background: var(--accent); color: #0a0a0a; }
.hub-ui :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--accent); }
@media (prefers-reduced-motion: reduce) { .hub-ui * { transition: none !important; animation: none !important; } }

/* Form controls, on every hub page. :root.hub-ui and the :not() chain keep
   these above each page's own per-class input rules. */
:root.hub-ui input:not([type='checkbox']):not([type='radio']):not([type='color']):not([type='file']):not([type='range']),
:root.hub-ui select,
:root.hub-ui textarea {
  min-height: 40px;
  background: var(--paper);
  border: 1.5px solid var(--rule-input);
  color: var(--ink);
  padding: 8px 10px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
  outline: none;
}
:root.hub-ui input:not([type='checkbox']):not([type='radio']):not([type='color']):not([type='file']):not([type='range']):hover,
:root.hub-ui select:hover,
:root.hub-ui textarea:hover { border-color: var(--ink); }
:root.hub-ui input:not([type='checkbox']):not([type='radio']):not([type='color']):not([type='file']):not([type='range']):focus,
:root.hub-ui select:focus,
:root.hub-ui textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent); }
:root.hub-ui input::placeholder, :root.hub-ui textarea::placeholder { color: var(--faint); opacity: 1; }
:root.hub-ui input[type='date'], :root.hub-ui input[type='time'], :root.hub-ui input[type='number'] { font-family: var(--mono); font-size: 14px; }
:root.hub-ui select { cursor: pointer; }
:root.hub-ui textarea { resize: vertical; min-height: 84px; }
:root.hub-ui input[type='checkbox'], :root.hub-ui input[type='radio'] { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; }
:root.hub-ui input[type='file'] { font-family: var(--sans); font-size: 14px; color: var(--ink-2); }
:root.hub-ui input[type='file']::file-selector-button {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: var(--track-wide); text-transform: uppercase;
  min-height: 36px; padding: 6px 12px; margin-right: 12px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer;
}
:root.hub-ui input[type='file']::file-selector-button:hover { background: var(--ink); color: var(--on-ink); }

/* ---------- 2. Shell ---------- */

/* Sidebar: fixed on the left on desktop, a scrolling bar across the top on
   phones. The page itself scrolls (not an inner pane), so nothing on the
   older pages had to change how it scrolls. */
.hub-ui .sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 232px;
  z-index: 40; /* under every overlay and modal (50 and up) */
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 0 20px;
  background: var(--paper-2);
  border-right: 1px solid var(--rule);
}
.hub-ui #app { padding-left: 232px; }
.hub-ui .brand { padding: 0 24px 22px; }
.hub-ui .brand a { display: inline-block; text-decoration: none; }
.hub-ui .brand-logo { display: block; width: 112px; height: auto; }
.hub-ui .brand-sub {
  display: inline-block;
  margin-top: 12px;
  padding: 2px 8px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hub-ui .nav-group { padding: 10px 12px; border-top: 1px solid var(--rule); }
.hub-ui .nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: none;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.hub-ui .nav-item:hover { background: var(--paper-3); color: var(--ink); text-decoration: none; }
.hub-ui .nav-item.active { background: var(--ink); color: var(--on-ink); }
.hub-ui .nav-count { margin-left: auto; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--mid); }
.hub-ui .nav-item.active .nav-count { color: var(--on-ink); }
.hub-ui .sidebar .spacer { flex: 1; }
.hub-ui .user-chip {
  display: block;
  padding: 10px 12px 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--mid);
  word-break: break-all;
}

/* The page frame. Each older page keeps its own max-width; it just sits
   against the sidebar instead of centring in the window. */
.hub-ui .page { margin: 0; padding: 36px 44px 80px; }

/* Sign-in and blocked screens: one plain card on grey, the cap on top. */
.hub-ui .auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 64px;
  background: var(--paper-2);
}
.hub-ui .auth-wrap .auth-card {
  width: 100%;
  max-width: 440px;
  padding: 28px 28px 32px;
  background: var(--paper);
  border: 3px solid var(--rule-strong);
  box-shadow: none;
  backdrop-filter: none;
  text-align: left;
}
.hub-ui .auth-mark { display: block; width: 88px; height: auto; margin-bottom: 18px; }
.hub-ui .auth-logo,
.hub-ui .auth-head .brand-name {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--ink);
  text-transform: uppercase;
  margin-bottom: 8px;
}
/* The cap logo already carries the wordmark; the name stays for screen readers. */
.hub-ui .auth-logo,
.hub-ui .auth-head .brand-name {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hub-ui .auth-eyebrow,
.hub-ui .auth-head .brand-sub { margin: 0 0 20px; }
.hub-ui .auth-eyebrow {
  display: inline-block;
  padding: 2px 8px;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hub-ui .auth-desc,
.hub-ui .auth-body { font-size: 15px; line-height: 1.55; color: var(--mid); margin-bottom: 24px; }
.hub-ui .auth-head, .hub-ui .auth-body { padding: 0; border: none; }
.hub-ui .auth-body { margin-bottom: 0; }
.hub-ui .auth-desc a, .hub-ui .auth-body a, .hub-ui #blocked-desc a { color: var(--ink) !important; text-decoration: underline; }
.hub-ui .btn-gsi,
.hub-ui .auth-body .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-top: 0;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  cursor: pointer;
  opacity: 1;
}
.hub-ui .auth-body .btn { margin-top: 24px; }
.hub-ui .btn-gsi:hover,
.hub-ui .auth-body .btn:hover:not(:disabled) { background: var(--accent); border-color: var(--ink); color: #0a0a0a; opacity: 1; }
/* The Google mark sits on a white tile so its colours still read on black. */
.hub-ui .btn-gsi svg { background: #fff; padding: 3px; width: 24px; height: 24px; box-sizing: border-box; }
.hub-ui #blocked-screen .btn-gsi,
.hub-ui #blocked-screen .auth-body .btn { background: var(--paper); color: var(--ink); }
.hub-ui #blocked-screen .btn-gsi:hover,
.hub-ui #blocked-screen .auth-body .btn:hover { background: var(--ink); color: var(--on-ink); }
.hub-ui .auth-error {
  display: none; /* shown by showAuthError() */
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid var(--alert);
  border-left: 6px solid var(--alert);
  background: var(--alert-soft);
  color: var(--alert);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .hub-ui #app { padding-left: 0; }
  .hub-ui .sidebar {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 8px;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .hub-ui .brand { padding: 8px 12px; flex: none; }
  .hub-ui .brand-logo { width: 40px; }
  .hub-ui .sidebar .brand-sub, .hub-ui .user-chip, .hub-ui .sidebar .spacer { display: none; }
  .hub-ui .nav-group { display: flex; padding: 0; border: none; flex: none; }
  .hub-ui .nav-item { width: auto; padding: 14px 12px; white-space: nowrap; }
  .hub-ui .page { padding: 24px 16px 60px; }
}

/* ---------- 3a. Older pages: legibility floor ----------
   Generated once from the six older pages' own <style> blocks: every
   selector that set text under 12px, running text under 13.5px, or an
   uppercase label. Regenerate by hand if a page adds new small text. */

/* Nothing under 12px. */
.hub-ui .action-btn,
.hub-ui .action-tag,
.hub-ui .admin-tab,
.hub-ui .btn-new-inq,
.hub-ui .btn-refresh,
.hub-ui .cal-chip-meta,
.hub-ui .cal-chip-name,
.hub-ui .cal-daynum,
.hub-ui .cal-dow,
.hub-ui .cal-legend,
.hub-ui .cal-more,
.hub-ui .cal-pop-label,
.hub-ui .cal-pop-time,
.hub-ui .cal-pop-title,
.hub-ui .cal-today-btn,
.hub-ui .card-ago,
.hub-ui .card-followup,
.hub-ui .card-meta,
.hub-ui .card-ref,
.hub-ui .card-type,
.hub-ui .chart-label,
.hub-ui .chart-legend,
.hub-ui .client-count,
.hub-ui .client-meta,
.hub-ui .col-cnt,
.hub-ui .col-title,
.hub-ui .col-toggle,
.hub-ui .d-avail,
.hub-ui .d-edit-label,
.hub-ui .d-label,
.hub-ui .d-ref,
.hub-ui .d-section-title,
.hub-ui .d-services,
.hub-ui .d-status-badge,
.hub-ui .deal-badge,
.hub-ui .deal-btn,
.hub-ui .deal-notes,
.hub-ui .deal-rating,
.hub-ui .deal-sub,
.hub-ui .deal-value,
.hub-ui .empty-col,
.hub-ui .file-btn,
.hub-ui .file-meta,
.hub-ui .files-empty,
.hub-ui .files-section-desc,
.hub-ui .filter-pill,
.hub-ui .fin-card-label,
.hub-ui .fin-card-pct,
.hub-ui .flag-tag,
.hub-ui .followup-clear-btn,
.hub-ui .followup-row label,
.hub-ui .header-btn,
.hub-ui .hint-note,
.hub-ui .inv-save-status,
.hub-ui .invoice-meta,
.hub-ui .itot-label,
.hub-ui .log-count,
.hub-ui .log-more-note,
.hub-ui .log-select,
.hub-ui .log-tbl,
.hub-ui .log-tbl td.mono,
.hub-ui .log-tbl td::before,
.hub-ui .log-tbl th,
.hub-ui .log-to,
.hub-ui .meeting-empty,
.hub-ui .meeting-input,
.hub-ui .meeting-type-btn,
.hub-ui .mini-btn,
.hub-ui .no-date-btn,
.hub-ui .overdue-tag,
.hub-ui .pay-addbtn,
.hub-ui .pay-method,
.hub-ui .paytag,
.hub-ui .qs-deposit,
.hub-ui .reminder-dismiss,
.hub-ui .repeat-tag,
.hub-ui .review-save-status,
.hub-ui .review-section-title,
.hub-ui .search-count,
.hub-ui .seg-btn,
.hub-ui .sort-label,
.hub-ui .sort-pill,
.hub-ui .sort-select,
.hub-ui .star-detail-label,
.hub-ui .stat-label,
.hub-ui .status-badge,
.hub-ui .status-row label,
.hub-ui .team-tbl .team-name-input,
.hub-ui .team-tbl select.team-perm-select,
.hub-ui .theme-field label,
.hub-ui .toast,
.hub-ui .version-tag,
.hub-ui .warn-ref,
.hub-ui .warn-title { font-size: 12px; }

/* Running text in panels and tables up to 14px. */
.hub-ui .card-quote-total,
.hub-ui .client-chevron,
.hub-ui .d-edit-inp,
.hub-ui .d-notes,
.hub-ui .d-row,
.hub-ui .deal-title,
.hub-ui .empty,
.hub-ui .error-banner,
.hub-ui .file-name,
.hub-ui .followup-date-input,
.hub-ui .loading-wrap,
.hub-ui .log-search,
.hub-ui .meeting-row,
.hub-ui .pay-add .inp,
.hub-ui .pay-row .inp,
.hub-ui .problem-toggle,
.hub-ui .rating-label,
.hub-ui .reminder-banner,
.hub-ui .review-notes,
.hub-ui .search-inp,
.hub-ui .sort-dir,
.hub-ui .star-btn,
.hub-ui .status-select,
.hub-ui .team-intro,
.hub-ui .warn-item { font-size: 14px; }

/* Labels: Inter, not mono; 600, not 400. */
.hub-ui .action-btn,
.hub-ui .action-tag,
.hub-ui .admin-tab,
.hub-ui .btn-new-inq,
.hub-ui .btn-refresh,
.hub-ui .cal-dow,
.hub-ui .cal-pop-label,
.hub-ui .cal-pop-time,
.hub-ui .cal-today-btn,
.hub-ui .client-count,
.hub-ui .col-title,
.hub-ui .col-toggle,
.hub-ui .d-edit-label,
.hub-ui .d-section-title,
.hub-ui .d-status-badge,
.hub-ui .deal-badge,
.hub-ui .deal-btn,
.hub-ui .file-btn,
.hub-ui .filter-pill,
.hub-ui .fin-card-label,
.hub-ui .flag-tag,
.hub-ui .followup-row label,
.hub-ui .header-btn,
.hub-ui .inv-save-status,
.hub-ui .itot-label,
.hub-ui .log-tbl td::before,
.hub-ui .log-tbl th,
.hub-ui .meeting-type-btn,
.hub-ui .mini-btn,
.hub-ui .no-date-btn,
.hub-ui .overdue-tag,
.hub-ui .pay-addbtn,
.hub-ui .paytag,
.hub-ui .reminder-dismiss,
.hub-ui .repeat-tag,
.hub-ui .review-save-status,
.hub-ui .review-section-title,
.hub-ui .seg-btn,
.hub-ui .sort-label,
.hub-ui .sort-pill,
.hub-ui .star-detail-label,
.hub-ui .stat-label,
.hub-ui .status-badge,
.hub-ui .status-row label,
.hub-ui .theme-field label,
.hub-ui .warn-title { font-family: var(--sans); font-weight: 600; letter-spacing: var(--track-wide); }


/* ---------- 3b. Older pages: components ---------- */

/* Prose that the old look set in mono goes back to Inter. Figures, IDs and
   dates (card refs, amounts, day numbers, timestamps) stay mono. */
.hub-ui .loading-wrap, .hub-ui .empty, .hub-ui .files-empty, .hub-ui .empty-col,
.hub-ui .meeting-empty, .hub-ui .hint-note, .hub-ui .search-count, .hub-ui .log-more-note,
.hub-ui .log-count, .hub-ui .avail-checking, .hub-ui .toast, .hub-ui .card-followup,
.hub-ui .cal-chip, .hub-ui .cal-more, .hub-ui .cal-legend, .hub-ui .chart-legend,
.hub-ui .reminder-banner, .hub-ui .d-label, .hub-ui .client-meta, .hub-ui .deal-sub,
.hub-ui .file-meta, .hub-ui .invoice-meta { font-family: var(--sans); }
.hub-ui .loading-wrap { color: var(--mid); font-weight: 600; }

/* Page titles: the board's inline title and the big display headings. */
.hub-ui .page-header { align-items: flex-end !important; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 3px solid var(--rule-strong); }
.hub-ui .page-title { font-family: var(--display); font-size: 30px; letter-spacing: 0.01em; line-height: 1.1; }
.hub-ui .page-header > div:first-child { font-size: 30px !important; letter-spacing: 0.01em !important; line-height: 1.1; text-transform: uppercase; }
.hub-ui .page-header > div:last-child { flex-wrap: wrap; }

/* Buttons. Outline: 2px black, white. Hover fills black. */
.hub-ui .header-btn, .hub-ui .btn-refresh, .hub-ui .no-date-btn, .hub-ui .action-btn,
.hub-ui .action-btn.secondary, .hub-ui .action-btn.gold, .hub-ui .cal-today-btn,
.hub-ui .cal-nav-btn, .hub-ui .detail-close, .hub-ui .col-toggle, .hub-ui .sort-dir,
.hub-ui .deal-btn, .hub-ui .file-btn, .hub-ui .pay-addbtn, .hub-ui .mini-btn,
.hub-ui .meeting-type-btn, .hub-ui .btn-new-inq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  opacity: 1;
  filter: none;
  transform: none;
}
.hub-ui .header-btn:hover, .hub-ui .btn-refresh:hover, .hub-ui .no-date-btn:hover:not(:disabled),
.hub-ui .action-btn:hover:not(:disabled), .hub-ui .cal-today-btn:hover, .hub-ui .cal-nav-btn:hover,
.hub-ui .detail-close:hover, .hub-ui .col-toggle:hover, .hub-ui .sort-dir:hover, .hub-ui .deal-btn:hover,
.hub-ui .file-btn:hover, .hub-ui .pay-addbtn:hover, .hub-ui .mini-btn:hover:not(:disabled),
.hub-ui .meeting-type-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
/* Primary: solid black, white text (the old amber buttons had near-black
   text that would vanish on black). Hover is the pink marker. */
.hub-ui .btn-new-inq, .hub-ui .action-btn.primary, .hub-ui .deal-btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
.hub-ui .btn-new-inq:hover, .hub-ui .action-btn.primary:hover:not(:disabled), .hub-ui .deal-btn.primary:hover {
  background: var(--accent);
  border-color: var(--ink);
  color: #0a0a0a;
}
/* The next step in the flow: pink behind black. */
.hub-ui .action-btn.gold { background: var(--accent-soft); }
/* Small buttons inside rows. */
.hub-ui .mini-btn, .hub-ui .deal-btn, .hub-ui .file-btn, .hub-ui .meeting-type-btn {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  border-width: 1.5px;
}
.hub-ui .detail-close, .hub-ui .cal-nav-btn, .hub-ui .sort-dir { width: 40px; height: 40px; padding: 0; font-size: 18px; flex: none; }
/* Delete and "no date" are red outlines, filled on hover. */
.hub-ui .file-del, .hub-ui .no-date-btn:hover:not(:disabled) { border-color: var(--alert); color: var(--alert); background: var(--paper); }
.hub-ui .file-del:hover { background: var(--alert); border-color: var(--alert); color: #fff; }
.hub-ui .no-date-btn:hover:not(:disabled) { background: var(--alert); color: #fff; }
/* Disabled: a dashed edge as well as a lighter tone; the text still reads. */
.hub-ui .action-btn:disabled, .hub-ui .no-date-btn:disabled, .hub-ui .mini-btn:disabled {
  border-style: dashed;
  border-color: var(--rule-input);
  background: var(--paper-2);
  color: var(--faint);
  opacity: 1;
}
/* On/off toggles and pills: an outline when off, solid black when on. */
.hub-ui .sort-pill, .hub-ui .filter-pill {
  min-height: 36px;
  padding: 6px 12px;
  border: 1.5px solid var(--rule-input);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}
.hub-ui .sort-pill:hover, .hub-ui .filter-pill:hover { border-color: var(--ink); color: var(--ink); }
.hub-ui .meeting-type-btn.active, .hub-ui .sort-pill.active, .hub-ui .filter-pill.active,
.hub-ui .stale-toggle.active, .hub-ui .dead-toggle.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
/* Link-style buttons. */
.hub-ui .reminder-dismiss, .hub-ui .followup-clear-btn {
  color: var(--ink);
  opacity: 1;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hub-ui .reminder-dismiss:hover, .hub-ui .followup-clear-btn:hover { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.hub-ui .pay-xbtn { color: var(--mid); font-size: 18px; }
.hub-ui .pay-xbtn:hover { color: var(--alert); }

/* Tags. */
.hub-ui .repeat-tag, .hub-ui .flag-tag, .hub-ui .overdue-tag, .hub-ui .col-cnt,
.hub-ui .d-status-badge, .hub-ui .deal-badge, .hub-ui .status-badge, .hub-ui .action-tag, .hub-ui .paytag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1.5px solid var(--rule-input);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--track);
  line-height: 1.5;
  white-space: nowrap;
}
.hub-ui .repeat-tag { background: var(--accent); border-color: var(--ink); color: #0a0a0a; }
.hub-ui .flag-tag, .hub-ui .overdue-tag, .hub-ui .paytag.due { background: var(--alert-soft); border-color: var(--alert); color: var(--alert); }
.hub-ui .paytag { justify-content: center; min-height: 32px; padding: 4px 10px; }
.hub-ui .paytag.paid { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.hub-ui .col-cnt { font-family: var(--mono); letter-spacing: 0; background: var(--paper); color: var(--ink); }
.hub-ui .action-tag { background: var(--paper); color: var(--ink-2); }
.hub-ui .action-tag.login { border-color: var(--ink); color: var(--ink); }
.hub-ui .action-tag.status_change { background: var(--accent-soft); border-color: var(--ink); color: var(--ink); }
.hub-ui .action-tag.email_sent { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.hub-ui .action-tag.file_uploaded { border-color: var(--ink); color: var(--ink); background: var(--paper-2); }
.hub-ui .action-tag.file_deleted { background: var(--alert-soft); border-color: var(--alert); color: var(--alert); }
/* Status, wherever it appears: badges, column counts, calendar chips. */
.hub-ui .new:is(.d-status-badge, .deal-badge, .status-badge, .cal-chip), .hub-ui .col-new .col-cnt { background: var(--new-bg); border-color: var(--new-border); color: var(--new-text); }
.hub-ui .quoted:is(.d-status-badge, .deal-badge, .status-badge, .cal-chip), .hub-ui .col-quoted .col-cnt { background: var(--quoted-bg); border-color: var(--quoted-border); color: var(--quoted-text); }
.hub-ui .contracted:is(.d-status-badge, .deal-badge, .status-badge, .cal-chip), .hub-ui .col-contracted .col-cnt { background: var(--contracted-bg); border-color: var(--contracted-border); color: var(--contracted-text); }
.hub-ui .invoiced:is(.d-status-badge, .deal-badge, .status-badge, .cal-chip), .hub-ui .col-invoiced .col-cnt { background: var(--invoiced-bg); border-color: var(--invoiced-border); color: var(--invoiced-text); }
.hub-ui .stale:is(.d-status-badge, .deal-badge, .status-badge, .cal-chip), .hub-ui .col-stale .col-cnt { background: var(--stale-bg); border-color: var(--stale-border); color: var(--stale-text); border-style: dashed; }
.hub-ui :is(.dead, .cancelled):is(.d-status-badge, .deal-badge, .status-badge, .cal-chip), .hub-ui .col-dead .col-cnt { background: var(--dead-bg); border-color: var(--dead-border); color: var(--dead-text); }
.hub-ui .d-status-badge:empty { display: none; }

/* Banners. */
.hub-ui .error-banner, .hub-ui .review-warning {
  border: 1px solid var(--alert);
  border-left: 6px solid var(--alert);
  background: var(--alert-soft);
  color: var(--alert);
}
.hub-ui .error-banner { font-weight: 600; }
.hub-ui .review-warning .warn-item { color: var(--ink); }
.hub-ui .reminder-banner {
  border: 1px solid var(--rule);
  border-left: 6px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}
.hub-ui .empty, .hub-ui .files-empty { color: var(--mid); }
.hub-ui .empty { border: 1.5px dashed var(--rule-input); padding: 40px 20px; font-size: 15px; }

/* Toasts: solid black. */
.hub-ui .toast { background: var(--ink); border: 2px solid var(--ink); color: var(--on-ink); box-shadow: none; font-weight: 600; font-size: 14px; }

/* Stat tiles: a ruled grid, big figures in the display face. */
.hub-ui .stats-bar, .hub-ui .pay-stats, .hub-ui .fin-summary {
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.hub-ui .stat-card, .hub-ui .fin-card {
  background: var(--paper);
  border: none;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 20px 16px;
}
.hub-ui .stat-card .stat-value, .hub-ui .fin-card-val {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: 0;
}
.hub-ui .stat-label, .hub-ui .fin-card-label { color: var(--mid); margin-top: 8px; }
.hub-ui .fin-card-label { margin: 0 0 8px; }
.hub-ui .stat-value.outstanding { color: var(--alert); }
.hub-ui .fin-card.total { background: var(--accent-soft); }
.hub-ui .fin-card-pct { color: var(--mid); }

/* ---------- Board ---------- */
.hub-ui .col { background: var(--paper-2); border: 1px solid var(--rule); }
.hub-ui .col-head { background: var(--paper); border-top: 3px solid var(--ink); border-bottom: 1px solid var(--rule-input); padding: 10px 12px; }
.hub-ui .col-title { color: var(--ink); font-size: 13px; font-weight: 700; }
.hub-ui .col-title::before, .hub-ui .d-section-title::before { content: none; }
.hub-ui .empty-col { color: var(--faint); }
.hub-ui .inquiry-card { background: var(--paper); border: 1px solid var(--rule-input); padding: 14px; }
.hub-ui .inquiry-card:hover { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); transform: none; }
/* Starred: a pink bar down the left edge, not a glow. */
.hub-ui .inquiry-card.starred { border-color: var(--ink) !important; box-shadow: none; }
.hub-ui .inquiry-card.starred::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 6px;
  background: var(--accent);
  border-right: 1px solid var(--ink);
}
.hub-ui .card-name { font-size: 15px; font-weight: 600; }
.hub-ui .card-type { font-size: 13.5px; color: var(--mid); }
.hub-ui .card-ref, .hub-ui .card-ago, .hub-ui .card-meta { color: var(--mid); }
.hub-ui .card-quote-total { color: var(--ink); border-top-color: var(--rule); font-size: 14px; }
.hub-ui .card-followup { color: var(--mid); }
.hub-ui .card-followup.due-soon { color: var(--ink); }
.hub-ui .card-followup.overdue { color: var(--alert); }
.hub-ui .star-btn, .hub-ui .star-detail-btn { color: var(--faint); opacity: 1; transform: none; }
.hub-ui .star-btn:hover, .hub-ui .star-detail-btn:hover { color: var(--ink); opacity: 1; transform: none; }
.hub-ui .star-btn.active, .hub-ui .star-detail-btn.active { color: var(--ink); }
.hub-ui .star-btn { font-size: 16px; }

.hub-ui .sort-bar { gap: 8px 10px; }
.hub-ui .sort-label { color: var(--ink-2); }
:root.hub-ui .sort-select { width: auto; }

/* Detail panel: slides over a dark scrim, hard black edge, no shadow. */
.hub-ui .detail-overlay { background: var(--scrim); backdrop-filter: none; }
.hub-ui .detail-panel { background: var(--paper); border-left: 3px solid var(--rule-strong); box-shadow: none; }
.hub-ui .detail-header, .hub-ui .detail-review, .hub-ui .detail-footer { background: var(--paper); }
.hub-ui .detail-review { background: var(--paper-2); }
.hub-ui .d-ref { color: var(--mid); font-size: 12px; }
.hub-ui .d-name { font-family: var(--display); font-size: 24px; letter-spacing: 0; line-height: 1.1; color: var(--ink); }
.hub-ui .d-status-badge { margin-top: 8px; }
.hub-ui .d-section-title { color: var(--ink-2); font-size: 12px; font-weight: 700; border-bottom-color: var(--rule); }
.hub-ui .d-label { color: var(--mid); font-size: 12px; font-weight: 700; letter-spacing: var(--track-wide); text-transform: uppercase; padding-top: 2px; }
.hub-ui .d-value { color: var(--ink); }
.hub-ui .d-value a, .hub-ui .avail-list a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; border-bottom: none; }
.hub-ui .d-value a:hover, .hub-ui .avail-list a:hover { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.hub-ui .d-services, .hub-ui .d-notes { color: var(--ink-2); font-size: 14px; }
.hub-ui .d-edit-label { color: var(--ink-2); font-weight: 700; }
.hub-ui .review-section-title { color: var(--ink-2); font-weight: 700; }
.hub-ui .review-section-title .opt { color: var(--mid); font-weight: 400; letter-spacing: 0; text-transform: none; }
.hub-ui .rating-star { color: var(--faint); font-size: 20px; }
.hub-ui .rating-star.filled, .hub-ui .rating-star:hover { color: var(--ink); }
.hub-ui .review-save-status, .hub-ui .inv-save-status { color: var(--mid); }
.hub-ui .review-save-status.saved, .hub-ui .inv-save-status.saved { color: var(--ink); }
.hub-ui .review-save-status.err, .hub-ui .inv-save-status.err { color: var(--alert); }
.hub-ui .quote-summary-box { background: var(--paper-2); border: 1px solid var(--rule); border-left: 6px solid var(--ink); }
.hub-ui .qs-total { color: var(--ink); font-size: 18px; }
.hub-ui .qs-deposit { color: var(--mid); }
.hub-ui .avail-ok { color: var(--ink); }
.hub-ui .avail-conflict { color: var(--alert); }
.hub-ui .avail-checking { color: var(--mid); }
.hub-ui .status-row label, .hub-ui .followup-row label { color: var(--ink-2); font-weight: 700; }
.hub-ui .status-select, .hub-ui .followup-date-input { flex: 1; }
.hub-ui .followup-row label { width: auto; min-width: 56px; }
.hub-ui .detail-action-row .action-btn { padding: 8px 6px; }
.hub-ui .meeting-row { color: var(--ink-2); }
.hub-ui .meeting-empty, .hub-ui .hint-note { color: var(--mid); }
.hub-ui .star-detail-label { color: var(--ink-2); }

/* ---------- Calendar ---------- */
.hub-ui .cal-month-label { font-family: var(--display); font-size: 30px; letter-spacing: 0.01em; text-transform: uppercase; }
.hub-ui .cal-legend { color: var(--ink-2); font-size: 13px; gap: 8px 16px; }
.hub-ui .cal-legend .dot { width: 14px; height: 14px; border: 1.5px solid transparent; }
.hub-ui .cal-legend .dot.st-new { background: var(--new-bg) !important; border-color: var(--new-border); }
.hub-ui .cal-legend .dot.st-quoted { background: var(--quoted-bg) !important; border-color: var(--quoted-border); }
.hub-ui .cal-legend .dot.st-contracted { background: var(--contracted-bg) !important; border-color: var(--contracted-border); }
.hub-ui .cal-legend .dot.st-invoiced { background: var(--invoiced-bg) !important; border-color: var(--invoiced-border); }
.hub-ui .cal-legend .dot.st-stale { background: var(--stale-bg) !important; border-color: var(--stale-border); border-style: dashed; }
.hub-ui .cal-legend .dot.st-off { background: var(--alert) !important; }
.hub-ui .cal-legend .dot.st-other { background: var(--rule-input) !important; }
.hub-ui .cal-grid { border: 1px solid var(--rule); border-top: 2px solid var(--rule-strong); background: var(--rule); gap: 1px; }
.hub-ui .cal-dow { background: var(--paper-2); color: var(--ink-2); font-weight: 700; }
.hub-ui .cal-cell { background: var(--paper); }
.hub-ui .cal-cell.pad { background: var(--paper-2); opacity: 1; }
.hub-ui .cal-cell.pad .cal-daynum { color: var(--faint); }
.hub-ui .cal-daynum { color: var(--mid); font-size: 12px; }
/* Today: a black ring and the date in a black block. */
.hub-ui .cal-cell.today { box-shadow: inset 0 0 0 2px var(--ink); }
.hub-ui .cal-cell.today .cal-daynum { color: var(--ink); font-weight: 700; }
.hub-ui .cal-cell.off-pipeline { box-shadow: inset 0 0 0 2px var(--alert); }
.hub-ui .cal-flag { background: var(--alert); width: 8px; height: 8px; }
.hub-ui .cal-flag.noise { background: var(--rule-input); }
.hub-ui .cal-popover { border: 2px solid var(--ink); box-shadow: none; background: var(--paper); }
.hub-ui .cal-pop-label { color: var(--alert); font-weight: 700; }
.hub-ui .cal-pop-label.muted { color: var(--mid); }
.hub-ui .cal-pop-time { color: var(--mid); }
.hub-ui .cal-pop-title { color: var(--ink); font-size: 13px; }
.hub-ui a.cal-pop-item:hover { background: var(--accent-soft); }
.hub-ui .cal-chip { border: 1.5px solid var(--rule-input); padding: 3px 5px; background: var(--paper-2); color: var(--ink-2); }
.hub-ui .cal-chip:hover { filter: none; outline: 2px solid var(--accent); outline-offset: 0; }
.hub-ui .cal-chip-name { font-weight: 700; }
.hub-ui .cal-chip-meta { opacity: 1; }
.hub-ui .cal-more { color: var(--mid); }

/* ---------- Clients ---------- */
.hub-ui .client-card, .hub-ui .invoice-card, .hub-ui .files-section { background: var(--paper); border: 1px solid var(--rule-input); }
.hub-ui .client-card.open { border-color: var(--ink); }
.hub-ui .client-card.flagged, .hub-ui .invoice-card.overdue { border-color: var(--alert); border-left: 6px solid var(--alert); }
.hub-ui .client-head:hover { background: var(--accent-soft); }
.hub-ui .client-name, .hub-ui .invoice-name, .hub-ui .files-section-title { font-family: var(--display); font-size: 20px; letter-spacing: 0; line-height: 1.15; }
.hub-ui .client-value { font-family: var(--display); color: var(--ink); font-size: 20px; }
.hub-ui .client-meta, .hub-ui .client-count, .hub-ui .deal-sub, .hub-ui .deal-attr, .hub-ui .invoice-meta, .hub-ui .file-meta { color: var(--mid); }
.hub-ui .client-chevron { color: var(--ink); }
.hub-ui .deal-title, .hub-ui .file-name { color: var(--ink); font-size: 14px; }
.hub-ui .deal-rating { color: var(--ink); }
.hub-ui .deal-notes { color: var(--mid); }
.hub-ui .deal-value { color: var(--ink); font-size: 13px; }
.hub-ui .deal-row:hover { background: var(--paper-2); }

/* ---------- Payments ---------- */
.hub-ui .invoice-head { border-bottom-color: var(--rule); }
.hub-ui .invoice-totals { background: var(--paper-2); }
.hub-ui .itot-label { color: var(--mid); }
.hub-ui .itot-value { font-size: 16px; color: var(--ink); }
.hub-ui .itot-value.balance-due { color: var(--alert); font-weight: 600; }
.hub-ui .itot-value.balance-paid { color: var(--ink); font-weight: 600; }
.hub-ui .invoice-foot { border-top-color: var(--rule); }
.hub-ui .pay-row { grid-template-columns: minmax(0, 1fr) 96px 116px auto auto; }

/* ---------- Files ---------- */
.hub-ui .files-section-head { background: var(--paper-2); border-bottom: 1px solid var(--rule-input); }
.hub-ui .files-section-desc { color: var(--mid); font-size: 14px; }
.hub-ui .file-row:hover { background: var(--paper-2); }

/* ---------- Admin ---------- */
.hub-ui .admin-tabs { gap: 4px; border-bottom: 2px solid var(--rule-strong); flex-wrap: wrap; }
.hub-ui .admin-tab {
  margin: 0;
  padding: 9px 16px;
  border: none;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}
.hub-ui .admin-tab:hover { background: var(--paper-3); color: var(--ink); }
.hub-ui .admin-tab.active { background: var(--ink); color: var(--on-ink); }
.hub-ui .seg { background: var(--paper); border: 2px solid var(--ink); }
.hub-ui .seg-btn { color: var(--ink-2); font-weight: 700; padding: 8px 12px; }
.hub-ui .seg-btn + .seg-btn { border-left: 2px solid var(--ink); }
.hub-ui .seg-btn:hover { background: var(--paper-2); color: var(--ink); }
.hub-ui .seg-btn.active { background: var(--ink); color: var(--on-ink); }
.hub-ui .team-intro { color: var(--mid); }
/* Chart: three costs need three marks that don't rely on hue alone. */
.hub-ui .seg-venue { background: var(--ink); }
.hub-ui .seg-prod { background: var(--accent); }
.hub-ui .seg-staff { background: var(--rule-input); }
.hub-ui .chart-label, .hub-ui .chart-legend { color: var(--mid); }
/* At 12px the old upward slant ran into the bar; slant down and away instead. */
.hub-ui .chart-label { transform: rotate(40deg); left: 4px; }
.hub-ui .chart-legend { margin-top: 52px; }
.hub-ui .chart-legend .dot { width: 12px; height: 12px; }
/* Tables: 14px, grey header row, 2px black rule on top. */
.hub-ui .log-tbl { font-size: 14px; border-top: 2px solid var(--rule-strong); }
.hub-ui .log-tbl th { background: var(--paper-2); color: var(--ink-2); font-weight: 700; border-bottom: 1px solid var(--rule-input); }
.hub-ui .log-tbl td { color: var(--ink); border-bottom-color: var(--rule); }
.hub-ui .log-tbl td.mono { color: var(--mid); font-size: 13px; }
.hub-ui .log-tbl tr:hover td { background: var(--paper-2); }
:root.hub-ui .team-tbl .team-perm-select, :root.hub-ui .team-tbl .team-name-input { font-size: 14px; min-height: 36px; padding: 6px 8px; }
.hub-ui .version-tag { color: var(--mid); border-top-color: var(--rule); }
.hub-ui .theme-field label { color: var(--ink-2); font-weight: 700; }
.hub-ui .theme-field input[type=color] { border: 1.5px solid var(--rule-input); background: var(--paper); }
/* The theme preview shows the public forms' colours, so it keeps their
   shape. shared.js applyTheme() writes the picked colours onto it. */
.hub-ui .theme-preview-card { border-radius: 8px !important; }
.hub-ui .theme-preview-btn { border-radius: 6px !important; }
.hub-ui .theme-preview-card { font-family: 'Inter', system-ui, sans-serif; }

@media (max-width: 680px) {
  .hub-ui .log-tbl { border-top: none; }
  .hub-ui .log-tbl tr { background: var(--paper); border: 1px solid var(--rule-input); }
  .hub-ui .log-tbl td::before { color: var(--mid); font-weight: 700; }
}
@media (max-width: 900px) {
  .hub-ui .stats-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  /* 40px controls don't fit five across a phone: the label takes its own line. */
  .hub-ui .pay-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: 6px; padding: 8px 0; }
  .hub-ui .pay-row > :first-child { grid-column: 1 / -1; }
  .hub-ui .pay-add { flex-wrap: wrap; }
  .hub-ui .pay-add .inp { flex: 1 1 120px; min-width: 0; }
  .hub-ui .pay-addbtn { flex: 1 1 100%; }
  .hub-ui .cal-chip { padding: 2px 3px; }
  .hub-ui .cal-legend { font-size: 12px; }
  .hub-ui .cal-month-label { font-size: 22px; }
  .hub-ui .page-header > div:first-child { font-size: 24px !important; }
}

/* ---------- 4. Pages built on the staffing classes (applications, roster) ---------- */

.hub-staff h1, .hub-staff h2, .hub-staff h3, .hub-staff h4,
.hub-staff .btn, .hub-staff .badge, .hub-staff label, .hub-staff thead th, .hub-staff .tab, .hub-staff .rate-btn, .hub-staff .check-pill,
.hub-staff .stat-label, .hub-staff .banner-title, .hub-staff .kv dt, .hub-staff .tiny {
  text-transform: uppercase;
}
.hub-staff input, .hub-staff textarea, .hub-staff select { text-transform: none; letter-spacing: 0; }

.hub-staff a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hub-staff a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--accent); }

.hub-staff h1, .hub-staff h2, .hub-staff h3, .hub-staff h4 { margin: 0; text-wrap: balance; }
.hub-staff h1 { font-family: var(--display); font-size: 30px; font-weight: 400; letter-spacing: 0.01em; line-height: 1.1; }
.hub-staff h2 { font-size: 16px; font-weight: 700; letter-spacing: var(--track); }
.hub-staff h3 { font-size: 14px; font-weight: 700; letter-spacing: var(--track-wide); margin-bottom: 10px; }
.hub-staff h4 { font-size: 12px; font-weight: 700; letter-spacing: var(--track-wide); color: var(--mid); margin-bottom: 6px; }
.hub-staff p { margin: 0 0 10px; }
.hub-staff .mono { font-family: var(--mono); font-size: max(12px, 0.92em); letter-spacing: 0; text-transform: none; }

.hub-staff .page { padding: 36px 44px 80px; max-width: 1240px; }
.hub-staff .page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding-bottom: 18px; margin-bottom: 28px; border-bottom: 3px solid var(--rule-strong); flex-wrap: wrap;
}
.hub-staff .page-head .sub { color: var(--mid); font-size: 15px; margin-top: 8px; }

/* ---------- Stats ---------- */
.hub-staff .grid-4 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); margin-bottom: 32px;
}
.hub-staff .stat { padding: 18px 20px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.hub-staff .stat-value { font-family: var(--display); font-size: 34px; font-weight: 400; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hub-staff .stat-label { font-size: 12px; font-weight: 600; color: var(--mid); letter-spacing: var(--track-wide); margin-top: 8px; }
.hub-staff .stat-note { font-size: 13px; color: var(--faint); margin-top: 4px; }

/* ---------- Buttons ---------- */
.hub-staff .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink); padding: 8px 16px; border-radius: 0;
  font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: var(--track-wide);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.hub-staff .btn:hover:not(:disabled) { background: var(--ink); color: var(--on-ink); text-decoration: none; }
.hub-staff .btn:disabled { border-style: dashed; border-color: var(--rule-input); color: var(--faint); background: var(--paper-2); cursor: not-allowed; }
.hub-staff .btn-primary { background: var(--ink); color: var(--on-ink); }
.hub-staff .btn-primary:hover:not(:disabled) { background: var(--accent); border-color: var(--ink); color: #0a0a0a; }
.hub-staff .btn-sm { min-height: 32px; padding: 4px 10px; font-size: 12px; border-width: 1.5px; }
.hub-staff .btn-block { width: 100%; }
.hub-staff .btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Tags ---------- */
.hub-staff .badge {
  display: inline-flex; align-items: center; padding: 2px 7px; border: 1.5px solid var(--rule-input);
  font-size: 12px; font-weight: 700; letter-spacing: var(--track); color: var(--ink-2); background: var(--paper);
  white-space: nowrap; line-height: 1.5;
}
.hub-staff .badge-ok { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.hub-staff .badge-info { border-color: var(--ink); color: var(--ink); }
.hub-staff .badge-bad { background: var(--alert-soft); border-color: var(--alert); color: var(--alert); }
.hub-staff .badge-muted { border-color: var(--rule); color: var(--mid); background: var(--paper-2); }
.hub-staff .badge-status-new { border-color: var(--ink); color: var(--ink); }
.hub-staff .badge-status-review { background: var(--accent-soft); border-color: var(--ink); color: var(--ink); border-style: dashed; }
.hub-staff .badge-status-accepted { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.hub-staff .badge-status-denied { border-color: var(--rule); color: var(--mid); background: var(--paper-2); text-decoration: line-through; }

/* ---------- Filters ---------- */
.hub-staff input:not([type='checkbox']):not([type='radio']):not([type='file']), .hub-staff select, .hub-staff textarea { width: 100%; }
.hub-staff .toolbar { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; margin-bottom: 20px; }
.hub-staff .toolbar .search { flex: 1 1 220px; min-width: 180px; }
.hub-staff label { display: block; font-size: 12px; font-weight: 700; letter-spacing: var(--track-wide); color: var(--ink-2); margin-bottom: 6px; }
.hub-staff .rate-group { display: inline-flex; border: 2px solid var(--ink); }
.hub-staff .rate-btn {
  padding: 7px 12px; background: var(--paper); border: none; color: var(--ink-2);
  font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: var(--track-wide); cursor: pointer;
}
.hub-staff .rate-btn + .rate-btn { border-left: 2px solid var(--ink); }
.hub-staff .rate-btn:hover { background: var(--paper-2); color: var(--ink); }
.hub-staff .rate-btn.on { background: var(--ink); color: var(--on-ink); }
.hub-staff .rate-btn:disabled { cursor: default; }
.hub-staff .rate-btn:disabled:not(.on):hover { background: var(--paper); color: var(--ink-2); }
.hub-staff .check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-staff .check-pill {
  display: inline-flex; align-items: center; min-height: 36px; border: 1.5px solid var(--rule-input); padding: 6px 12px;
  cursor: pointer; font-size: 13px; font-weight: 600; letter-spacing: var(--track); color: var(--ink-2);
  background: var(--paper); font-family: var(--sans);
}
.hub-staff .check-pill:hover { border-color: var(--ink); color: var(--ink); }
.hub-staff .check-pill.on { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.hub-staff .check-pill .n { font-family: var(--mono); margin-left: 6px; letter-spacing: 0; }
.hub-staff .check-pill.hidden-status { text-decoration: line-through; }

/* ---------- Table ---------- */
.hub-staff .table-wrap { overflow-x: auto; border-top: 2px solid var(--rule-strong); }
.hub-staff table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hub-staff thead th {
  text-align: left; padding: 10px 14px 10px 8px; border-bottom: 1px solid var(--rule-input);
  font-size: 12px; letter-spacing: var(--track-wide); color: var(--ink-2); font-weight: 700;
  white-space: nowrap; background: var(--paper-2);
}
.hub-staff tbody td { padding: 12px 14px 12px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.hub-staff tbody tr { cursor: pointer; }
.hub-staff tbody tr:hover td { background: var(--accent-soft); }
.hub-staff tr.is-denied td { color: var(--mid); }

.hub-staff .avatar {
  width: 34px; height: 34px; background: var(--ink); color: var(--on-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em; flex: 0 0 auto; overflow: hidden;
}
.hub-staff .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-staff .avatar-xl { width: 104px; height: 104px; font-size: 26px; font-family: var(--display); font-weight: 400; }
.hub-staff .person-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hub-staff .person-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hub-staff .dim { color: var(--mid); }
.hub-staff .faint { color: var(--faint); }
.hub-staff .small { font-size: 13.5px; }
.hub-staff .tiny { font-size: 12px; letter-spacing: var(--track); }
.hub-staff .tiny.mono { text-transform: none; letter-spacing: 0; }
.hub-staff .nowrap { white-space: nowrap; }
.hub-staff .clip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hub-staff .empty { padding: 40px 20px; border: 1.5px dashed var(--rule-input); color: var(--mid); font-size: 15px; line-height: 1.7; }
.hub-staff .banner {
  border: 1px solid var(--rule); border-left: 6px solid var(--ink); background: var(--paper-2);
  padding: 12px 16px; margin-bottom: 24px; font-size: 14.5px;
}
.hub-staff .banner-bad { border-color: var(--alert); background: var(--alert-soft); }
.hub-staff .banner-bad .banner-title { color: var(--alert); }
.hub-staff .banner-title { font-size: 12.5px; letter-spacing: var(--track-wide); font-weight: 700; margin-bottom: 2px; }

/* ---------- Detail ---------- */
.hub-staff .modal-backdrop {
  position: fixed; inset: 0; background: var(--scrim); display: flex;
  align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.hub-staff .modal {
  background: var(--paper); border: 3px solid var(--rule-strong); padding: 28px 32px;
  max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto;
}
.hub-staff .modal-head { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--rule); }
.hub-staff .modal-head h2 { font-family: var(--display); font-size: 24px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.hub-staff .modal-close { margin-left: auto; }
.hub-staff .kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 15px; margin: 0 0 24px; }
.hub-staff .kv dt { color: var(--mid); font-size: 12px; font-weight: 700; letter-spacing: var(--track-wide); white-space: nowrap; padding-top: 3px; }
.hub-staff .kv dd { margin: 0; word-break: break-word; }

/* ---------- Review (applications) ---------- */
.hub-staff .star { background: none; border: none; padding: 2px 4px; font-size: 20px; line-height: 1; color: var(--faint); cursor: pointer; }
.hub-staff .star:hover, .hub-staff .star.on { color: var(--ink); }
.hub-staff .star:disabled { cursor: default; }
.hub-staff .star:disabled:not(.on):hover { color: var(--faint); }
.hub-staff .review-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--rule); }
.hub-staff .review-meta { font-size: 13px; color: var(--faint); }
.hub-staff .history { margin-bottom: 24px; border-bottom: 1px solid var(--rule); }
.hub-staff .history-row { display: flex; align-items: center; gap: 16px; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.hub-staff .history-row .dim { flex: 1; min-width: 0; }
.hub-staff .toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px);
  background: var(--ink); border: 2px solid var(--ink); color: var(--on-ink);
  padding: 10px 18px; font-size: 14px; font-weight: 600; z-index: 60; transition: transform .2s; pointer-events: none;
}
.hub-staff .toast.show { transform: translateX(-50%) translateY(0); }
.hub-staff .toast.bad { background: var(--alert); border-color: var(--alert); color: #fff; }

.hub-staff .loading { padding: 48px 0; color: var(--mid); font-size: 13px; font-weight: 600; letter-spacing: var(--track-wide); text-transform: uppercase; }

/* ---------- Roster ---------- */
.hub-staff .tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--rule-strong); margin-bottom: 28px; flex-wrap: wrap; }
.hub-staff .tab {
  padding: 9px 16px; font-size: 13px; letter-spacing: var(--track-wide); color: var(--ink-2); cursor: pointer;
  background: var(--paper-2); border: none; font-family: var(--sans); font-weight: 700;
}
.hub-staff .tab:hover { background: var(--paper-3); color: var(--ink); }
.hub-staff .tab.active { background: var(--ink); color: var(--on-ink); }
.hub-staff .tab .n { font-family: var(--mono); margin-left: 6px; padding: 0 5px; background: var(--alert); color: #fff; letter-spacing: 0; }
.hub-staff .tab .n:empty { display: none; }
.hub-staff .import-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; margin-bottom: 8px; }
.hub-staff .import-help { line-height: 1.7; border-left: 1px solid var(--rule); padding-left: 24px; }
.hub-staff .field { margin-bottom: 20px; }
.hub-staff .hint { font-size: 13px; color: var(--faint); margin-top: 6px; }
.hub-staff .pre-notes { white-space: pre-wrap; font-size: 14px; color: var(--ink-2); border: 1px solid var(--rule-input); background: var(--paper-2); padding: 12px 14px; }
.hub-staff .preview { margin-top: 32px; padding-top: 28px; border-top: 3px solid var(--rule-strong); }
.hub-staff .mt-lg { margin-top: 32px; }
.hub-staff textarea.mono-area, .hub-staff .import-grid textarea { font-family: var(--mono); font-size: 13px; }

@media (max-width: 760px) {
  .hub-staff .page { padding: 24px 16px 60px; }
  .hub-staff h1 { font-size: 24px; }
  .hub-staff .modal { padding: 22px 18px; }
  .hub-staff .modal-head { flex-wrap: wrap; }
  .hub-staff .avatar-xl { width: 72px; height: 72px; }
  .hub-staff .import-grid { grid-template-columns: 1fr; gap: 24px; }
  .hub-staff .import-help { border-left: none; padding-left: 0; }
}
