/*
  FILE: css/style.css
  VERSION: v2.13.0
  LAST UPDATED: 2026-08-07

  CHANGE LOG:
  v2.13.0 - CONSOLIDATION. Deleted the bespoke classes added this session that duplicated
            existing primitives, and pointed the markup at the originals instead:
              .dev-notice        -> .placeholder-banner (near-identical already)
              .fr-reply box      -> .form-help (+ one margin rule for in-card use)
              .resource-card-linked -> plain .resource-card in a .resource-grid
              .version-banner    -> .stat-tile / .tile-val / .tile-lbl
              .changelog-*       -> .post-list / .post-card / .post-title / .extras-list
              .table-toolbar     -> .stats-toolbar
              .stmt-file         -> .page-url (un-scoped from .pages-table to be reusable)
              .stmt-actions      -> one shared right-aligned action-cell rule
            Net: ~20 rules removed. Reuse first; only add a class when nothing fits.
  v2.12.0 - Removed every one-sided accent stripe from cards/callouts (.resource-card-linked,
            .dev-notice, .fr-reply, .changelog-entry.is-current, .form-help). That pattern is
            permanently forbidden — see the hard rule in the user global CLAUDE.md.
  v2.11.0 - About page (.version-banner, .changelog-*) and the feature-request reply block
            (.fr-reply). Additive.
  v2.10.0 - Board-on-Resources: .badge-internal (Board-only minutes), .resource-card-linked
            + .resource-links + .resource-note, and .post-status. Additive.
  v2.9.0 - Added .badge-withdrawn (application status) and .table-toolbar (count line +
           table controls on one row, used by Member Dues). Additive.
  v2.8.0 - Click-to-sort .data-table headers (.is-sortable + aria-sort arrows), and the
           generic .wide-view class used by wireWideToggle(). Additive.
  v2.7.0 - Added .dev-notice (Under-development banner), Bank Statements table rules, and the
           upload filename preview. Additive.
  v2.6.0 - Member Dues: added .auto-pill (Automatic/Manual state), .run-problems (the
           can't-be-invoiced callout), and .run-skipped. Additive.
  v2.5.0 - Added the MEMBER DUES block (Accounting → accounting.html): dues status badges
           (.badge-paid/-sent/-draft/-overdue/-unbilled), quarter-cell rules, and the
           unmatched-QBO flag. Additive only — the page reuses the Stats tab control.
  v2.4.0 - .reminder-configs pinned to TWO columns (was repeat(auto-fit, minmax(360px,1fr))),
           which put all four reminder panels on one row on a wide screen. Now members|guests
           on row 1, feature|education on row 2; single column below 860px.
  v2.3.0 - Added .legend-warn for the presenter reminder panels (Weekly Reminders): flags a
           send that would reach nobody. Additive only — no existing rule changed.
  v2.2.0 - Added .extras-list for the Weekly Reminders "Member email extras" panel (TODO #15).
  v2.1.0 - Added the PUBLIC PAGES DIRECTORY block (Admin → Pages / public-pages.html):
           .pages-section, .page-audience, .pages-table cell rules, .pages-footnote.
           Additive only — no existing rule changed.
  v2.0.0 - Design-system consolidation (see the style guide). Utilitarian/flat direction:
           radius scale (3/4px) + warm-surface tokens; dropped card shadows (--shadow-soft:none);
           buttons are solid-or-text at ONE compact size (.btn-ghost is now text, .btn-danger solid,
           .btn-sm inert, .btn-logout text-on-dark); ONE table treatment everywhere (compact,
           gridlined, cream-grey header) — .pres-table matches .data-table, entry-table zebra
           dropped; dark "black box" panel headers (.form-section-head/.notes-block summary/
           .leaderboard-head) replaced with a subtle cream header; nav uses one unified squared
           gold pill (header + sub-nav), underline kept for in-page stats tabs.
  v1.0.0 - Initial TCBE Portal styles. Component structure ported from the
           Veldtech billing dashboard; design tokens retuned to a TCBE palette
           (charcoal + gold/amber). Adds application-form, list, detail, team, and
           resources styles.

  NOTE: exact TCBE brand hex codes are an approximation derived from
  tricountybizexchange.com — refine once official brand values are supplied.
*/

/* ============================================================ RESET ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
/* The `hidden` attribute must win over component `display` rules. Without this,
   any element we set `display` on (badges, .btn, etc.) ignores `hidden`. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background-light);
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
a { color: var(--accent-gold-deep); }

/* ============================================================ TOKENS (TCBE) ============================================================ */
:root {
  --primary-dark:        #1b1d23;   /* charcoal / near-black */
  --primary-dark-hover:  #262932;
  --primary-slate:       #3a3f4b;   /* secondary surfaces / buttons */
  --primary-slate-light: #4b515f;
  --accent-gold:         #d4972a;   /* TCBE gold/amber */
  --accent-gold-light:   #e3ac47;
  --accent-gold-deep:    #a9741a;   /* readable gold for text links on light bg */
  --neutral-silver:      #c0c0c0;
  --background-light:    #f4f1ec;   /* warm off-white */
  --text-dark:           #1a1a1a;
  --text-light:          #ffffff;
  --container-width:     1200px;
  --shadow-soft:         none;   /* flat, utilitarian — no floating cards */
  --border-soft:         1px solid rgba(20, 22, 28, 0.10);

  /* Radius scale — square-ish, three steps only */
  --radius-sm:           3px;    /* buttons, inputs, controls */
  --radius-md:           4px;    /* panels, tables, cards */
  --radius-pill:         3px;    /* badges, nav highlight (squared) */

  /* Warm surfaces — collapse the old ~9 near-identical tints to a few */
  --surface:             #ffffff;
  --surface-muted:       #faf6ee; /* sunken panels, zebra rows */
  --panel-head-bg:       #f0f0f1; /* group/section header band — subtle neutral grey (matches table header family), NOT cream */
  --row-hover:           #f4f0e6; /* table row hover */
  --thead-bg:            #fafafa; /* table header */
  --thead-ink:           #8a8f99;
  --grid-line:           rgba(20, 22, 28, 0.09); /* table cell gridlines */

  /* Status badge palette */
  --badge-submitted-bg:   #f3f4f6;  --badge-submitted-text:   #374151;
  --badge-processing-bg:  #dbeafe;  --badge-processing-text:  #1e40af;
  --badge-approved-bg:    #d1fae5;  --badge-approved-text:    #065f46;
  --badge-denied-bg:      #fee2e2;  --badge-denied-text:      #991b1b;
}

/* ============================================================ LAYOUT ============================================================ */
.container { width: min(100% - 40px, var(--container-width)); margin: 0 auto; }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus {
  left: 12px; top: 12px; z-index: 9999; background: #fff;
  color: var(--primary-dark); padding: 10px 14px; border-radius: var(--radius-sm);
}

/* ============================================================ HEADER ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--primary-dark);
  border-bottom: 3px solid var(--accent-gold);
}
.header-inner {
  display: flex; align-items: center; gap: 24px; min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.brand-mark {
  min-width: 34px; height: 34px; padding: 0 9px; border-radius: var(--radius-sm); flex: 0 0 auto;
  background: var(--accent-gold);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary-dark); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.03em;
}
.brand-name {
  font-size: 0.92rem; font-weight: 800; letter-spacing: 0.01em;
  color: var(--text-light); line-height: 1.15; max-width: 220px;
}
.brand-name small { display: block; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-gold-light); }

.main-nav { display: flex; gap: 6px; margin-left: 12px; }
.main-nav a {
  padding: 7px 13px; border-radius: var(--radius-sm); text-decoration: none;
  font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.72);
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.main-nav a.is-active { color: var(--accent-gold-light); background: rgba(212,151,42,0.24); }

.header-user { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-user-label {
  font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px;
}
.header-role-pill {
  display: inline-block; padding: 2px 9px; border-radius: var(--radius-pill);
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(212,151,42,0.18); border: 1px solid rgba(212,151,42,0.5); color: var(--accent-gold-light);
}
.btn-logout {
  height: 30px; padding: 0 12px; background: transparent;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.78);
  cursor: pointer; white-space: nowrap; transition: background 0.15s ease, color 0.15s ease;
}
.btn-logout:hover { background: rgba(255,255,255,0.08); color: var(--accent-gold-light); }

/* ============================================================ SUB-NAV (team functions) ============================================================ */
.subnav {
  position: sticky; top: 68px; z-index: 999;
  background: var(--primary-slate);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.subnav-inner { display: flex; align-items: center; gap: 18px; min-height: 46px; }
.subnav-team {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-gold-light); flex: 0 0 auto; padding-right: 18px;
  border-right: 1px solid rgba(255,255,255,0.14);
}
.subnav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.subnav-links a {
  padding: 6px 12px; border-radius: var(--radius-sm); text-decoration: none;
  font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.72);
  transition: background 0.15s ease, color 0.15s ease;
}
.subnav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.subnav-links a.is-active { color: var(--accent-gold-light); background: rgba(212,151,42,0.24); }

/* ============================================================ DASHBOARD ============================================================ */
.dash-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; padding: 8px 0 64px;
}
.dash-card {
  background: #fff; border: var(--border-soft); border-radius: var(--radius-md);
  padding: 22px 24px; box-shadow: var(--shadow-soft);
}
.dash-card-shared { background: #faf6ee; }
.dash-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dash-card-head h2 { font-size: 1.05rem; font-weight: 800; color: var(--primary-dark); }
.dash-links { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.dash-links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none;
  font-size: 0.9rem; font-weight: 600; color: var(--primary-dark);
  transition: background 0.15s ease;
}
.dash-links a:hover { background: var(--background-light); }
.dash-arrow { color: var(--accent-gold-deep); font-size: 1.2rem; line-height: 1; }
.dash-empty { font-size: 0.85rem; color: #9ca3af; font-style: italic; padding: 4px 2px; }

/* ============================================================ POSTS (minutes / resources) ============================================================ */
.post-list { display: flex; flex-direction: column; gap: 16px; padding-bottom: 64px; }
.post-card {
  background: #fff; border: var(--border-soft); border-radius: var(--radius-md);
  padding: 20px 24px; box-shadow: var(--shadow-soft);
}
.post-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.post-title { font-size: 1.05rem; font-weight: 800; color: var(--primary-dark); }
.post-date { font-size: 0.78rem; font-weight: 600; color: var(--accent-gold-deep); margin-top: 2px; }
.post-body { margin-top: 12px; font-size: 0.9rem; line-height: 1.65; color: #374151; white-space: normal; }
.meeting-meta { margin-top: 14px; display: flex; align-items: center; gap: 10px; font-size: 0.8rem; }
.notify-panel {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(20,22,28,0.14);
}
.notify-panel .notify-aud { font-size: 0.82rem; color: #374151; margin-bottom: 8px; }
.notify-panel textarea {
  width: 100%; padding: 9px 12px; border: var(--border-soft); border-radius: var(--radius-sm);
  background: var(--background-light); color: var(--text-dark); font-size: 0.88rem;
  line-height: 1.5; resize: vertical; margin-bottom: 10px;
}

/* ============================================================ EMAIL REMINDERS ============================================================ */
/* Reminder config panels — a fixed TWO-column grid, not auto-fit. With four panels (members,
   guests, feature, education) auto-fit packed all four onto one row on a wide screen, which
   squeezed them and broke the pairing. Two columns in DOM order gives the intended reading:
   members | guests on the first row, then the two presenter reminders on the second.
   minmax(0, 1fr) rather than 1fr so a long unbroken value in a field can't blow the column out. */
.reminder-configs {
  display: grid; gap: 22px; margin-bottom: 28px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 860px) {
  .reminder-configs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.reminder-panel { margin-bottom: 0; }
.form-section-head .muted { font-weight: 600; text-transform: none; letter-spacing: 0; color: #6b7280; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 16px; }
.section-head h2 { font-size: 1.1rem; font-weight: 800; color: var(--primary-dark); }
.guest-section { padding-bottom: 64px; }
.guest-toolbar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.guest-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.guest-form input {
  padding: 9px 12px; border: var(--border-soft); border-radius: var(--radius-sm);
  background: var(--background-light); color: var(--text-dark); font-size: 0.88rem; min-width: 200px;
}

/* ============================================================ PAGE INTRO ============================================================ */
.page-intro { padding: 32px 0 8px; }
.page-title { font-size: 1.5rem; font-weight: 800; color: var(--primary-dark); }
.page-subtitle { font-size: 0.95rem; color: #6b7280; margin-top: 4px; }

/* ============================================================ BUTTONS ============================================================ */
/* Buttons: SOLID or TEXT only — no outlines. ONE compact size (~30px). Three tiers:
   primary (solid gold) · secondary (solid slate) · tertiary/.btn-ghost (text). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 13px; border-radius: var(--radius-sm); border: none;
  font-weight: 600; font-size: 0.8rem; cursor: pointer; white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease;
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }
.btn-primary { background: var(--accent-gold); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--accent-gold-light); }
.btn-secondary { background: var(--primary-slate); color: #fff; }
.btn-secondary:hover, .btn-secondary:focus { background: var(--primary-slate-light); }
/* Tertiary = text only (was the outlined ghost button) */
.btn-ghost { background: transparent; color: var(--text-dark); }
.btn-ghost:hover, .btn-ghost:focus { background: rgba(212,151,42,0.12); color: var(--accent-gold-deep); }
/* Destructive = solid red (prominent). Inline row deletes use .btn-danger-text. */
.btn-danger { background: var(--badge-denied-text); color: #fff; }
.btn-danger:hover { background: #7f1616; }
.btn-danger-text { background: transparent; color: var(--badge-denied-text); }
.btn-danger-text:hover { background: rgba(153,27,27,0.10); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm {}  /* deprecated: one compact size now — kept as an inert alias so old markup still works */

/* ============================================================ CONTROLS BAR ============================================================ */
/* Filters/actions row — sits directly on the page canvas (no white band) for a single background fill. */
.controls-bar { background: transparent; padding: 14px 0 0; }
.controls-inner { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.control-group { display: flex; flex-direction: column; gap: 5px; }
.control-group label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--primary-dark); opacity: 0.6;
}
.control-group select, .control-group input[type="search"] {
  height: 30px; padding: 0 10px; border: 1px solid rgba(20,22,28,0.15); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-dark); font-size: 0.84rem;
}
.control-group select { min-width: 200px; cursor: pointer; }
.control-group input[type="search"] { width: 280px; }
.control-group select:focus, .control-group input[type="search"]:focus {
  outline: 2px solid var(--accent-gold); outline-offset: 2px; border-color: transparent;
}
.controls-spacer { margin-left: auto; }

/* ============================================================ DATA TABLE ============================================================ */
.content { padding: 24px 0 64px; }
.table-wrap {
  border-radius: var(--radius-md); overflow-x: auto; overflow-y: hidden;
  border: var(--border-soft); background: var(--surface);
}
/* ONE table treatment, used identically everywhere: compact rows, cell gridlines,
   cream-grey header. Sits directly on the page — never inside an elevated card. */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.data-table thead th {
  padding: 6px 10px; text-align: left; font-size: 0.66rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--thead-ink); background: var(--thead-bg);
  border-bottom: 1px solid rgba(20,22,28,0.15); border-right: 1px solid var(--grid-line); white-space: nowrap;
}
.data-table thead th:last-child { border-right: none; }

/* Click-to-sort headers (wired site-wide by initSortableTables() in js/auth-guard.js).
   Only columns with a heading get .is-sortable — the per-row action columns have empty
   headers and stay inert. The arrow slot is reserved with padding on every sortable
   header so the text does not shift when the indicator appears. */
.data-table thead th.is-sortable {
  cursor: pointer; user-select: none; position: relative; padding-right: 20px;
}
.data-table thead th.is-sortable:hover { color: var(--primary-dark); background: #e8e8ea; }
.data-table thead th.is-sortable:focus-visible {
  outline: 2px solid var(--accent-gold); outline-offset: -2px;
}
/* Faint neutral arrow at rest, so a column reads as sortable before it is clicked. */
.data-table thead th.is-sortable::after {
  content: '↕'; position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  font-size: 0.72rem; font-weight: 700; color: #c2c2c8;
}
.data-table thead th.is-sortable:hover::after { color: #8a8a92; }
.data-table thead th[aria-sort]  { color: var(--accent-gold-deep); }
.data-table thead th[aria-sort="ascending"]::after  { content: '▲'; color: var(--accent-gold-deep); font-size: 0.6rem; }
.data-table thead th[aria-sort="descending"]::after { content: '▼'; color: var(--accent-gold-deep); font-size: 0.6rem; }
.data-table tbody td {
  padding: 5px 10px; border-bottom: 1px solid var(--grid-line);
  border-right: 1px solid var(--grid-line); color: var(--text-dark); vertical-align: middle;
}
.data-table tbody td:first-child { font-weight: 600; }
.data-table tbody td:last-child  { border-right: none; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--row-hover); }
.data-table tbody tr.is-clickable { cursor: pointer; }
.data-table tbody tr.is-clickable:hover { background: var(--row-hover); }
.cell-muted { color: #9ca3af; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
/* Compact per-team role dropdowns on the admin page */
.role-select {
  padding: 5px 8px; border: var(--border-soft); border-radius: var(--radius-sm);
  background: var(--background-light); color: var(--text-dark);
  font-size: 0.8rem; cursor: pointer; min-width: 96px;
}
.role-select:focus { outline: 2px solid var(--accent-gold); outline-offset: 1px; border-color: transparent; }
.role-select:disabled { cursor: not-allowed; opacity: 0.55; }

/* ============================================================ BADGES ============================================================ */
.badge {
  display: inline-block; padding: 3px 11px; border-radius: var(--radius-pill);
  font-size: 0.72rem; font-weight: 700; white-space: nowrap; letter-spacing: 0.02em;
}
.badge-submitted  { background: var(--badge-submitted-bg);  color: var(--badge-submitted-text); }
.badge-processing { background: var(--badge-processing-bg); color: var(--badge-processing-text); }
.badge-approved   { background: var(--badge-approved-bg);   color: var(--badge-approved-text); }
.badge-denied     { background: var(--badge-denied-bg);     color: var(--badge-denied-text); }
/* Restricted / internal-only. Used for a 'Board only' minutes entry — finalised but
   deliberately never shared beyond the owning team. */
.badge-internal   { background: #e0e7ff;                    color: #3730a3; }
/* Withdrawn = the applicant pulled out. Muted slate, NOT the red Denied treatment — the
   two endings mean different things and must not be confusable at a glance. */
.badge-withdrawn  { background: #e5e7eb;                    color: #4b5563; }
.badge-role-admin  { background: #ede9fe; color: #5b21b6; }
.badge-role-member { background: var(--badge-submitted-bg); color: var(--badge-submitted-text); }
.badge-yes { background: var(--badge-approved-bg); color: var(--badge-approved-text); }
.badge-no  { background: var(--badge-submitted-bg); color: var(--badge-submitted-text); }
/* Roster membership statuses */
.badge-active    { background: var(--badge-approved-bg);   color: var(--badge-approved-text); }
.badge-probation { background: #fef3c7;                    color: #92400e; }
.badge-hiatus    { background: #e0e7ff;                    color: #3730a3; }
.roster-count { margin: 0 0 12px; font-size: 0.85rem; color: #6b7280; }
.roster-count strong { color: var(--primary-dark); font-weight: 700; }
.roster-count .dot { margin: 0 8px; color: #d1d5db; }
.badge-removed   { background: var(--badge-denied-bg);     color: var(--badge-denied-text); }

/* ============================================================ STATES ============================================================ */
.state-loading { text-align: center; padding: 80px 24px; color: #999; font-size: 0.95rem; }
.state-loading::before {
  content: ''; display: block; width: 36px; height: 36px;
  border: 3px solid rgba(20,22,28,0.12); border-top-color: var(--accent-gold);
  border-radius: 50%; animation: spin 0.75s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.state-error {
  padding: 24px; text-align: center; color: var(--badge-denied-text);
  background: var(--badge-denied-bg); border-radius: var(--radius-md); font-weight: 600; margin-top: 24px;
}
.no-results { padding: 64px 24px; text-align: center; color: #aaa; font-size: 0.95rem; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--primary-dark); color: #fff; padding: 12px 22px; border-radius: var(--radius-md);
  font-size: 0.88rem; font-weight: 600; box-shadow: var(--shadow-soft); z-index: 2000;
  opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.is-error { background: var(--badge-denied-text); }

/* ============================================================ FORM (public application + detail/edit) ============================================================ */
.form-shell { max-width: 760px; margin: 0 auto; padding: 0 0 64px; }
.form-section {
  background: var(--surface); border: var(--border-soft); border-radius: var(--radius-md);
  margin-bottom: 18px; overflow: hidden;
}
.form-section-head {
  background: var(--panel-head-bg); color: var(--primary-dark);
  padding: 9px 16px; border-bottom: 1px solid rgba(20,22,28,0.12);
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
}
.form-section-body { padding: 22px; }
.form-field { margin-bottom: 18px; }
.form-field:last-child { margin-bottom: 0; }
.form-field label {
  display: block; font-size: 0.8rem; font-weight: 700; color: var(--primary-dark);
  margin-bottom: 6px;
}
.form-field .req { color: var(--accent-gold-deep); }
.form-field .hint { font-weight: 400; color: #6b7280; font-size: 0.78rem; }
/* Inline checkbox row (e.g. the reminder auto-send toggle) */
.form-field-check .check-label {
  display: flex; align-items: center; gap: 9px; margin-bottom: 4px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.form-field-check .check-label input[type="checkbox"] {
  width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--primary-slate);
}
.form-field-check .hint { display: block; }
.form-field input[type="text"], .form-field input[type="email"], .form-field input[type="tel"],
.form-field input[type="url"], .form-field input[type="date"], .form-field input[type="search"],
.form-field select, .form-field textarea {
  display: block; width: 100%; padding: 10px 13px; border: var(--border-soft);
  border-radius: var(--radius-sm); background: var(--background-light); color: var(--text-dark);
  font-size: 0.9rem;
}
.form-field textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--accent-gold); outline-offset: 2px; border-color: transparent;
}
.radio-row { display: flex; gap: 22px; padding-top: 2px; }
.radio-row label { display: flex; align-items: center; gap: 7px; font-weight: 500; margin: 0; cursor: pointer; }
.radio-row input { accent-color: var(--accent-gold); width: 16px; height: 16px; }
.ethics-list { margin: 0 0 4px; padding-left: 20px; color: #374151; font-size: 0.875rem; line-height: 1.7; }
.ethics-list strong { color: var(--primary-dark); }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.form-note { font-size: 0.85rem; color: #6b7280; }

/* Read view (application detail) */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.detail-grid .full { grid-column: 1 / -1; }
.detail-item .detail-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: #9ca3af; margin-bottom: 2px;
}
.detail-item .detail-value { font-size: 0.92rem; color: var(--text-dark); white-space: pre-line; }
.detail-item .detail-value.empty { color: #cbd0d8; font-style: italic; }

/* Status panel on detail page */
.status-panel {
  display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  background: #fff; border: var(--border-soft); border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft); padding: 18px 22px; margin-bottom: 22px;
}
.status-panel .control-group select { min-width: 180px; }
.status-meta { font-size: 0.82rem; color: #6b7280; }
.status-meta strong { color: var(--primary-dark); }

/* ============================================================ RESOURCES (placeholder) ============================================================ */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.resource-card {
  background: #fff; border: var(--border-soft); border-radius: var(--radius-md); box-shadow: var(--shadow-soft);
  padding: 24px;
}
.resource-card h3 { font-size: 1.05rem; color: var(--primary-dark); margin-bottom: 8px; }
.resource-card p { font-size: 0.88rem; color: #6b7280; }
.resource-card .resource-icon { font-size: 1.6rem; margin-bottom: 12px; }
.placeholder-banner {
  background: #fff8eb; border: var(--border-soft); border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 26px; font-size: 0.9rem; color: #7c5a16;
}

/* ============================================================ LOGIN / CHECK-EMAIL ============================================================ */
.login-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 40px 20px; background: var(--background-light);
}
.login-card {
  width: 100%; max-width: 420px; background: #fff; border-radius: var(--radius-md);
  padding: 44px 40px; box-shadow: var(--shadow-soft); border: var(--border-soft);
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.login-brand .brand-mark { height: 40px; font-size: 0.95rem; }
.login-brand .brand-name { color: var(--primary-dark); max-width: none; }
.login-brand .brand-name small { color: var(--accent-gold-deep); }
.login-heading { font-size: 1.3rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.login-subheading { font-size: 0.875rem; color: #6b7280; line-height: 1.5; margin-bottom: 28px; }
.login-label {
  display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--primary-dark); opacity: 0.7; margin-bottom: 6px;
}
.login-input {
  display: block; width: 100%; height: 44px; padding: 0 14px; border: var(--border-soft);
  border-radius: var(--radius-sm); background: var(--background-light); color: var(--text-dark);
  font-size: 0.9rem; margin-bottom: 20px;
}
.login-input:focus { outline: 2px solid var(--accent-gold); outline-offset: 2px; border-color: transparent; }
.login-submit {
  display: block; width: 100%; height: 44px; background: var(--accent-gold); border: none;
  border-radius: var(--radius-sm); color: #fff; font-size: 0.9rem; font-weight: 700; cursor: pointer;
  transition: background 0.15s ease;
}
.login-submit:hover { background: var(--accent-gold-light); }
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.login-error {
  background: var(--badge-denied-bg); color: var(--badge-denied-text); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 0.85rem; font-weight: 500; margin-bottom: 20px;
}
.check-email-icon { font-size: 2.5rem; margin-bottom: 16px; }
.login-back { display: inline-block; margin-top: 20px; font-size: 0.85rem; color: var(--accent-gold-deep); text-decoration: none; font-weight: 600; }
.login-back:hover { color: var(--accent-gold); }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================ PUBLIC FORM HEADER ============================================================ */
.public-hero {
  background: var(--primary-dark); color: #fff; padding: 40px 0 34px;
  border-bottom: 3px solid var(--accent-gold); text-align: center;
}
.public-hero .brand-mark { height: 50px; font-size: 1.1rem; margin-bottom: 16px; }
.public-hero h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: 6px; }
.public-hero .tagline { color: var(--accent-gold-light); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.public-hero p.lead { color: rgba(255,255,255,0.78); font-size: 0.95rem; max-width: 560px; margin: 14px auto 0; }
.public-main { padding-top: 32px; }

/* ============================================================ NOTES PANELS (interview + reference checks) ============================================================ */
.notes-block {
  background: var(--surface); border: var(--border-soft); border-radius: var(--radius-md);
  margin-bottom: 18px; overflow: hidden;
}
.notes-block > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 12px;
  background: var(--panel-head-bg); color: var(--primary-dark); padding: 9px 16px;
  border-bottom: 1px solid rgba(20,22,28,0.12);
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
}
.notes-block > summary::-webkit-details-marker { display: none; }
.notes-block > summary::before {
  content: '▸'; font-size: 0.8rem; color: var(--primary-dark);
  transition: transform 0.15s ease;
}
.notes-block[open] > summary::before { transform: rotate(90deg); }
.notes-block .summary-meta {
  margin-left: auto; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: none; color: #6b7280;
}
.notes-body { padding: 22px; }
.notes-intro { font-size: 0.85rem; color: #6b7280; margin-bottom: 18px; line-height: 1.5; }
.notes-question { margin-bottom: 18px; }
.notes-question:last-of-type { margin-bottom: 0; }
.notes-question > .q-label {
  display: block; font-size: 0.84rem; font-weight: 700; color: var(--primary-dark);
  margin-bottom: 6px; line-height: 1.4;
}
.notes-question textarea {
  display: block; width: 100%; padding: 10px 13px; border: var(--border-soft);
  border-radius: var(--radius-sm); background: var(--background-light); color: var(--text-dark);
  font-size: 0.9rem; min-height: 64px; resize: vertical; line-height: 1.5;
}
.notes-question textarea:focus {
  outline: 2px solid var(--accent-gold); outline-offset: 2px; border-color: transparent;
}
.notes-meta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.notes-meta-row .form-field { flex: 1 1 200px; margin-bottom: 0; }
.notes-save-row { display: flex; align-items: center; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.notes-saved-flag { font-size: 0.82rem; color: #6b7280; }
.notes-complete-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.84rem; font-weight: 600; color: var(--primary-dark); cursor: pointer;
}
.notes-complete-toggle input { accent-color: var(--accent-gold); width: 16px; height: 16px; cursor: pointer; }
.notes-complete-pill {
  display: inline-block; margin-left: 12px; padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; text-transform: none;
  background: var(--badge-approved-bg); color: var(--badge-approved-text);
}

/* Completion badges in the applications table + legend */
.checks-cell { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.check-item {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
}
.check-item.is-done { background: var(--badge-approved-bg);  color: var(--badge-approved-text); }
.check-item.is-not  { background: var(--badge-submitted-bg); color: #9ca3af; }
/* Table note/legend — a plain line ABOVE the table (not attached to it). Standard
   placement for any explanatory text that accompanies a table across the site. */
.table-legend {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0 0 10px; font-size: 0.8rem; color: #6b7280;
}
.table-legend strong { color: var(--primary-dark); }
.table-legend .legend-label {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: #9ca3af; margin-right: 2px;
}
.table-legend .check-item { padding: 1px 7px; }

/* ============================================================ LETTER ACTIONS + MODAL ============================================================ */
.letter-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 3000; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(20, 22, 28, 0.55);
}
.modal-overlay.is-open { display: flex; }
.modal {
  width: 100%; max-width: 620px; max-height: 88vh; display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius-md); box-shadow: 0 24px 70px rgba(20,22,28,0.4);
  overflow: hidden;
}
.modal-head {
  padding: 18px 24px; border-bottom: var(--border-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal-head h2 { font-size: 1.1rem; font-weight: 800; color: var(--primary-dark); }
.modal-close {
  background: transparent; border: none; font-size: 1.4rem; line-height: 1;
  color: #9ca3af; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--primary-dark); background: var(--background-light); }
.modal-body { padding: 22px 24px; overflow-y: auto; }
.modal-recipient { font-size: 0.9rem; color: #374151; margin-bottom: 16px; }
.modal-recipient strong { color: var(--primary-dark); }
.letter-preview {
  background: var(--background-light); border: var(--border-soft); border-radius: var(--radius-md);
  padding: 18px 20px; font-size: 0.86rem; line-height: 1.6; color: #374151;
  max-height: 260px; overflow-y: auto; margin-bottom: 18px; white-space: pre-line;
}
.modal-foot {
  padding: 16px 24px; border-top: var(--border-soft);
  display: flex; align-items: center; gap: 12px; justify-content: flex-end;
}
.modal-foot .modal-status { margin-right: auto; font-size: 0.82rem; color: #6b7280; }

/* ============================================================ RESPONSIVE ============================================================ */
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 10px 14px; min-height: 0; padding: 12px 0; }
  .main-nav { order: 3; width: 100%; margin-left: 0; }
  .header-user { width: 100%; justify-content: space-between; }
  .controls-inner { flex-direction: column; align-items: stretch; }
  .control-group select, .control-group input[type="search"] { width: 100%; min-width: 0; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* ============================================================ HEADSHOT ============================================================ */
/* File input on the public application form */
.form-field input[type="file"] {
  display: block; width: 100%; font-size: 0.88rem; color: var(--text-dark);
  padding: 9px 12px; border: var(--border-soft); border-radius: var(--radius-sm);
  background: var(--background-light); cursor: pointer;
}
.form-field input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 7px 14px; border: none; border-radius: var(--radius-sm);
  background: var(--primary-dark); color: #fff; font-weight: 700; font-size: 0.82rem; cursor: pointer;
}
.headshot-preview { margin-top: 14px; display: flex; align-items: center; gap: 16px; }
.headshot-preview img {
  width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-md);
  border: var(--border-soft); box-shadow: var(--shadow-soft);
}
/* Read-only headshot on the application detail page */
.headshot-link { display: inline-block; line-height: 0; }
.headshot-img {
  width: 160px; height: 160px; object-fit: cover; border-radius: var(--radius-md);
  border: var(--border-soft); box-shadow: var(--shadow-soft);
}

/* ============================================================ PLACEHOLDER CARDS (Stats / Email Settings) ============================================================ */
.placeholder-card {
  max-width: 760px; margin: 0 auto 64px; background: #fff; border: var(--border-soft);
  border-radius: var(--radius-md); box-shadow: var(--shadow-soft); padding: 36px 40px;
}
.placeholder-card h2 { margin: 14px 0 12px; font-size: 1.3rem; color: var(--primary-dark); }
.placeholder-card h3.placeholder-subhead {
  margin: 28px 0 14px; font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--primary-dark);
}
.placeholder-card p { color: #4b5563; font-size: 0.92rem; line-height: 1.65; margin: 0 0 12px; }
.placeholder-card .placeholder-note { color: #6b7280; font-size: 0.85rem; font-style: italic; }
.placeholder-badge {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill);
  background: #fef3c7; color: #92400e; font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.placeholder-list { margin: 0 0 8px; padding-left: 22px; color: #374151; font-size: 0.9rem; line-height: 1.8; }
.placeholder-list strong { color: var(--primary-dark); }
.stat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-chip {
  display: inline-flex; align-items: baseline; gap: 7px; padding: 9px 15px;
  background: var(--background-light); border: var(--border-soft); border-radius: var(--radius-md);
  font-size: 0.84rem; color: #4b5563;
}
.stat-chip strong { color: var(--primary-dark); font-weight: 800; }

/* ============================================================ EMAIL SETTINGS ============================================================ */
/* Emphasis comes from a background tint + the all-round border. NO one-sided accent stripe
   — see the hard rule in the user's global CLAUDE.md; that pattern is permanently forbidden. */
.form-help {
  max-width: 760px; margin: 0 auto 22px; padding: 14px 18px; background: #fffaf0;
  border: var(--border-soft); border-radius: var(--radius-md);
  font-size: 0.85rem; line-height: 1.6; color: #4b5563;
}
.form-help code, .form-note code {
  background: var(--background-light); border: var(--border-soft); border-radius: 4px;
  padding: 1px 6px; font-size: 0.82em; color: var(--primary-dark);
}
textarea.letter-body { min-height: 320px; font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: 0.84rem; line-height: 1.6; }
.modal-cc { margin: -6px 0 14px; font-size: 0.82rem; color: #6b7280; }

/* ============================================================ PRESENTATION SCHEDULE ============================================================ */
.badge-tentative { background: #fef3c7; color: #92400e; }
.badge-locked    { background: var(--badge-approved-bg); color: var(--badge-approved-text); }

/* Admin generator controls */
.pres-controls { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.pres-controls .control-group input[type="number"] {
  width: 110px; height: 30px; padding: 0 10px; border: var(--border-soft); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.84rem; background: #fff;
}
.pres-controls .control-group select { min-width: 150px; }

/* Section headings shared by Schedule / Counts */
.pres-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin: 30px 0 12px;
}
.pres-section-head h2 { font-size: 1.15rem; font-weight: 800; color: var(--primary-dark); margin: 0; }
.pres-legend { font-size: 0.8rem; color: #6b7280; }
.pres-head-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pres-head-tools .cell-muted { font-size: 0.8rem; }
.pres-toggle {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 0.8rem; font-weight: 600; color: var(--primary-dark); cursor: pointer;
}
.pres-toggle input { cursor: pointer; }

/* "Wide view" — break the schedule out of the centered container on large screens so the
   table (and its per-week controls) can sit on one line each. Toggled by #wideToggle,
   which adds .wide-schedule to <body>. No effect below 1180px (the table already fills
   the container there). The margin trick keeps the wider block centered on the viewport. */
@media (min-width: 1180px) {
  .wide-schedule .pres-schedule,
  .wide-schedule .pres-draft {
    width: min(100vw - 32px, 1680px);
    max-width: none;
    margin-left: calc(50% - min(50vw - 16px, 840px));
  }
  .wide-schedule .col-week-ctl { width: 320px; }

  /* Same treatment for the membership roster and guests tables (#wideToggle adds
     .wide-roster / .wide-guests to <body>). Only the data table is widened, not the
     page intro/controls. */
  .wide-roster .content > .container,
  .wide-guests .content > .container,
  /* Generic class used by newer pages via wireWideToggle() in auth-guard.js (Member Dues,
     Bank Statements). The three older page-specific classes above predate it. */
  .wide-view .content > .container {
    width: min(100vw - 32px, 1680px);
    max-width: none;
    margin-left: calc(50% - min(50vw - 16px, 840px));
  }
}

/* Guest attendance (Membership → Guests): numeric visit count + editable date chips. */
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.visit-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.visit-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 4px 3px 9px;
  background: #f0f0f1; border: 1px solid #d9d9de; border-radius: 3px;
  font-size: 0.82rem; font-variant-numeric: tabular-nums;
}
.visit-remove {
  border: none; background: none; cursor: pointer;
  font-size: 1.05rem; line-height: 1; color: #b3261e; padding: 0 4px;
}
.visit-remove:hover { color: #7f1810; }
.visit-empty { color: #888; font-size: 0.85rem; }
.visit-add { display: flex; gap: 8px; align-items: center; }

/* The draft preview stands out from the saved schedule */
.pres-draft { border: 2px solid var(--accent-gold); }
.pres-draft .form-section-head { display: flex; align-items: center; gap: 10px; }

/* Schedule table */
.pres-grid-wrap { overflow-x: auto; border: var(--border-soft); border-radius: var(--radius-md); background: var(--surface); }
.pres-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.pres-table thead th {
  position: sticky; top: 0; background: var(--thead-bg); color: var(--thead-ink);
  text-align: left; font-weight: 800; font-size: 0.66rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 6px 10px; white-space: nowrap;
  border-bottom: 1px solid rgba(20,22,28,0.15); border-right: 1px solid var(--grid-line);
}
.pres-table thead th:last-child { border-right: none; }
.pres-table tbody td { padding: 5px 10px; border-bottom: 1px solid var(--grid-line); border-right: 1px solid var(--grid-line); vertical-align: middle; }
.pres-table tbody td:last-child { border-right: none; }
.pres-table tbody tr:hover { background: var(--row-hover); }
.pres-table .col-num { width: 38px; color: #9ca3af; font-variant-numeric: tabular-nums; }
.pres-table .col-date { white-space: nowrap; font-weight: 600; color: var(--primary-dark); }
.pres-table .col-date .badge { margin-top: 4px; }
.pres-table tr.is-nomeeting { background: #faf7f1; }
.pres-nomeeting { color: #6b7280; }
.pres-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.col-week-ctl { width: 180px; }

/* Presenter cell / combo trigger */
.pres-cell { min-width: 150px; }
.combo-cell {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-width: 140px; padding: 6px 10px; cursor: pointer; text-align: left;
  background: var(--background-light); border: var(--border-soft); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.86rem; color: var(--text-dark); transition: border-color 0.15s, background 0.15s;
}
.combo-cell:hover { background: #fff; border-color: var(--accent-gold); }
.combo-caret { color: #9ca3af; font-size: 0.7rem; }

/* Per-week controls */
.week-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nomeeting-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; color: #4b5563; cursor: pointer; flex: 0 0 auto; white-space: nowrap; }
.week-note { flex: 1 1 96px; min-width: 80px; padding: 5px 8px; border: var(--border-soft); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.8rem; }
.week-delete { flex: 0 0 auto; }

/* Shared searchable picker popover */
.combo-pop {
  position: fixed; z-index: 1000; width: 250px; background: #fff;
  border: var(--border-soft); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); overflow: hidden;
}
.combo-search { width: 100%; padding: 10px 12px; border: 0; border-bottom: var(--border-soft); font-family: inherit; font-size: 0.88rem; outline: none; }
.combo-list { list-style: none; margin: 0; padding: 4px; max-height: 240px; overflow-y: auto; }
.combo-list li { padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.86rem; color: var(--text-dark); }
.combo-list li:hover { background: var(--background-light); }
.combo-list .combo-clear { color: var(--accent-gold-deep); font-weight: 600; }
.combo-list .combo-empty { color: #9ca3af; cursor: default; }
.combo-list .combo-empty:hover { background: none; }

@media (max-width: 720px) {
  .pres-controls { gap: 12px; }
  .col-week-ctl { width: auto; }
}

/* ---------------------------------------------------------------------------
   Member Stats page (stats.html / js/stats.js)
   --------------------------------------------------------------------------- */
.stats-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
/* Underline tabs: flat text tabs on a shared baseline, with a single indicator bar
   that slides + resizes to the active tab (positioned by positionTabIndicator() in
   js/stats.js). Active text also shifts to gold so the state reads even mid-slide. */
.stats-tabs {
  position: relative; display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(20, 22, 28, 0.10);
}
.stat-tab {
  position: relative; height: 40px; padding: 0 14px; border: none; background: none;
  border-radius: 0; font-size: 0.85rem; font-weight: 600; color: #7b8090;
  cursor: pointer; transition: color 0.15s;
}
.stat-tab:hover { color: var(--primary-dark); }
.stat-tab.is-active { color: var(--accent-gold-deep); font-weight: 700; }
.stat-tab:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: -2px; border-radius: 4px; }
.stat-tab-indicator {
  position: absolute; left: 0; top: 0; height: 2.5px; width: 0;
  background: var(--accent-gold); border-radius: 2px 2px 0 0;
  transform: translate(0, 0); pointer-events: none;
  transition: transform 0.25s ease, width 0.25s ease;
}
@media (prefers-reduced-motion: reduce) { .stat-tab-indicator { transition: none; } }
.stats-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stats-year { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: #6b7280; }
.stats-year select { height: 30px; padding: 0 10px; border: var(--border-soft); border-radius: var(--radius-sm); background: #fff; font-weight: 600; }

.stats-weekpick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.stats-weekpick label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--primary-dark); }
.stats-weekpick select, .stats-weekpick input[type="date"] {
  height: 30px; padding: 0 10px; border: var(--border-soft); border-radius: var(--radius-sm); background: #fff; font-weight: 600;
}

/* Summary tiles */
.stat-tiles { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-tile {
  flex: 1 1 96px; min-width: 96px; background: #fff; border: var(--border-soft);
  border-radius: var(--radius-md); box-shadow: var(--shadow-soft); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.tile-val { font-size: 1.5rem; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.tile-lbl { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #9ca3af; }

/* Records cards */
.records-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.record-card {
  background: #fff; border: var(--border-soft); border-radius: var(--radius-md); box-shadow: var(--shadow-soft);
  padding: 18px; display: flex; flex-direction: column; gap: 4px;
}
.record-abbr { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; color: var(--primary-dark); }
.record-val { font-size: 2rem; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.record-lbl { font-size: 0.82rem; font-weight: 600; color: var(--primary-dark); }
.record-when { font-size: 0.75rem; color: #9ca3af; margin-top: 2px; }

/* Entry table — dense spreadsheet-style grid for fast live-meeting entry.
   Overrides the roomy .data-table spacing: small cells, narrow inputs, a sticky
   header, zebra rows, and an active-row highlight so many members fit on screen. */
.entry-scroll { max-height: 68vh; overflow: auto; }
.entry-table { font-size: 0.8rem; }
.entry-table thead th {
  position: sticky; top: 0; z-index: 2;
  padding: 7px 8px; font-size: 0.64rem;
}
.entry-table thead th:first-child { padding-left: 16px; }
.entry-table thead th:last-child  { padding-right: 16px; }
.entry-table tbody td { padding: 2px 8px; }
.entry-table tbody td:first-child { padding-left: 16px; white-space: nowrap; }
.entry-table tbody td:last-child  { padding-right: 16px; }
/* Numeric metric columns stay narrow; the member name column takes the slack. */
.entry-table thead th:not(:first-child), .entry-table tbody td:not(:first-child) { width: 1%; }
/* No zebra — the one table treatment uses gridlines, not striping. Keep the active-row
   highlight (a functional entry affordance, not decoration). */
.entry-table tbody tr:focus-within { background: var(--surface-muted); }
.entry-table .entry-num { width: 52px; height: 26px; padding: 0 5px; border: var(--border-soft); border-radius: var(--radius-sm); text-align: right; font-weight: 600; }
.entry-table .entry-att { width: 46px; height: 26px; padding: 0 4px; border: var(--border-soft); border-radius: var(--radius-sm); background: #fff; font-weight: 600; }
.entry-table .entry-num:focus, .entry-table .entry-att:focus { outline: 2px solid var(--accent-gold); outline-offset: -1px; }
.entry-hint { font-size: 0.78rem; color: #9ca3af; margin: 0 0 10px; }
.entry-hint kbd {
  font-family: inherit; font-size: 0.72rem; font-weight: 700; color: var(--primary-dark);
  background: #f3f0e8; border: var(--border-soft); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 5px; margin: 0 1px;
}
.data-table td .badge { font-size: 0.72rem; }

@media (max-width: 720px) {
  .stats-toolbar { flex-direction: column; align-items: stretch; }
  .stat-tile { flex-basis: calc(50% - 6px); }
}

/* Top 10 leaderboards */
.leaderboards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.leaderboard-card { background: #fff; border: var(--border-soft); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); overflow: hidden; }
.leaderboard-head {
  background: var(--panel-head-bg); color: var(--primary-dark); font-size: 0.76rem; font-weight: 800;
  padding: 8px 12px; letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 1px solid rgba(20,22,28,0.12);
}
.leaderboard-list { list-style: none; margin: 0; padding: 6px 0; }
.leaderboard-list li { display: flex; align-items: center; gap: 10px; padding: 5px 14px; font-size: 0.85rem; }
.leaderboard-list li:nth-child(odd) { background: #faf6ee; }
.lb-rank { width: 20px; text-align: center; font-weight: 800; color: var(--primary-dark); font-size: 0.78rem; }
.lb-name { flex: 1; color: var(--primary-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-val { font-weight: 800; color: var(--primary-dark); }
.lb-empty { color: #9ca3af; font-style: italic; }

/* ============================================================ MEMBER SELF-REPORT ============================================================ */
/* Public mobile stats form (stats-report.html) — builds on the .login-* card/inputs. */
.report-card { max-width: 460px; }
.report-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; margin-bottom: 8px; }
/* Equal-height labels (fit up to 2 lines) + bottom-aligned inputs, so a wrapping label
   like "Referrals Received" doesn't shove its input out of line with its row-mate. */
.report-field { display: flex; flex-direction: column; }
.report-field .login-label { line-height: 1.25; min-height: 2.5em; margin-bottom: 6px; }
.report-field .login-input { margin-top: auto; margin-bottom: 12px; }
.report-note { margin: 12px 0 0; font-size: 0.78rem; color: #8a8f98; text-align: center; line-height: 1.4; }
/* Custom name type-ahead (native <datalist> is unreliable on mobile Firefox/Safari). */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; top: 46px; left: 0; right: 0; z-index: 20; margin: 0; padding: 4px 0;
  list-style: none; background: #fff; border: var(--border-soft); border-radius: var(--radius-sm);
  box-shadow: 0 6px 18px rgba(20,22,28,0.14); max-height: 220px; overflow-y: auto;
}
.ac-item { padding: 10px 14px; font-size: 0.9rem; color: var(--text-dark); cursor: pointer; }
.ac-item:hover, .ac-item.is-active { background: var(--background-light); }

/* ============================================================ PUBLIC PAGES DIRECTORY ============================================================ */
/* Admin → Pages (public-pages.html). Reuses .data-table; only the URL/audience cells differ. */
.pages-section { margin-bottom: 34px; }
.pages-section:last-of-type { margin-bottom: 22px; }
.page-audience {
  display: block; margin-top: 2px; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af;
}
.pages-table td.page-purpose { color: #4b5563; max-width: 420px; }
/* Generic monospace link for a URL or filename in a table. Un-scoped from .pages-table
   2026-08-07 so Bank Statements can reuse it rather than defining its own copy. */
.page-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem; color: var(--accent-gold-deep); word-break: break-all;
}
.page-url:hover { text-decoration: underline; }
.pages-table td.page-actions { text-align: right; white-space: nowrap; }
.pages-footnote { font-size: 0.8rem; color: #6b7280; line-height: 1.5; max-width: 760px; }
.pages-footnote strong { color: var(--primary-dark); }

/* Member-email extras (reminders.html) — what the members reminder appends automatically. */
.extras-list { margin: 0 0 14px; padding-left: 20px; font-size: 0.86rem; color: #4b5563; line-height: 1.7; }
.extras-list strong { color: var(--primary-dark); }

/* Inline warning inside a .table-legend line. Used by the presenter reminder panels to flag a
   send that would reach nobody — an unassigned slot, or a presenter with no email on file. */
.legend-warn { color: var(--badge-denied-text); font-weight: 600; }

/* ---------------------------------------------------------------------------
   MEMBER DUES (accounting.html / js/accounting.js)
   Additive only — the page reuses .stats-toolbar/.stats-tabs/.stat-tab and the
   sliding .stat-tab-indicator from the Stats page, plus .data-table and .form-shell.
   Everything below is new: the dues status badges and the quarter-cell treatment.
   --------------------------------------------------------------------------- */

/* Dues status badges. Reuse the existing badge tokens so a "paid" here reads the same
   green as an "approved" application — one visual language for one meaning. */
.badge-paid     { background: var(--badge-approved-bg);   color: var(--badge-approved-text); }
.badge-sent     { background: var(--badge-processing-bg); color: var(--badge-processing-text); }
.badge-draft    { background: #ede9fe;                    color: #5b21b6; }
.badge-overdue  { background: var(--badge-denied-bg);     color: var(--badge-denied-text); }
.badge-unbilled { background: var(--badge-submitted-bg);  color: var(--badge-submitted-text); }

/* Quarter columns: narrow, centred, and stacked (badge over amount over doc number). */
.dues-table td.dues-q, .dues-table th.dues-q { text-align: center; white-space: nowrap; }
.dues-table td.dues-q { line-height: 1.35; }

/* "Not a billing quarter for this member" — deliberately faint, so it reads as absence
   rather than as an unpaid charge. The two must never be confusable. */
.dues-table td.dues-na { color: #d1d5db; font-weight: 700; }

.dues-amt {
  display: block; margin-top: 3px; font-size: 0.78rem;
  font-weight: 700; color: var(--primary-dark);
}
.dues-doc {
  display: block; font-size: 0.68rem; color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* A member with no QuickBooks customer ID would be skipped silently by a billing run,
   so the cell states it in warning red rather than just sitting empty. */
.dues-unmatched { color: var(--badge-denied-text); font-weight: 600; font-size: 0.8rem; }

/* Row actions. NOT .row-actions — that rule is display:flex, which drops the cell out of
   table layout so it no longer stretches to the row height. Invisible on single-line
   tables, but dues rows run to three lines and the misalignment is obvious. */
.dues-table td.dues-actions,
td.row-actions-cell { text-align: right; white-space: nowrap; vertical-align: middle; }

/* Keep every cell on a common baseline now that row heights vary by content. */
.dues-table td { vertical-align: middle; }

/* The only thing a linking resource card needs beyond .resource-card: its buttons stacked
   rather than side by side. align-items stops them stretching to the column width. */
.resource-links {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 14px;
}

/* Publication-status badge sits beside a post title, so it needs to not inherit the
   title's weight/size. */
.post-title .post-status { vertical-align: middle; margin-left: 8px; font-size: 0.62rem; }


/* About page. Everything reuses existing primitives (.post-list, .post-card, .stat-tile,
   .extras-list); the ONLY new rule is putting the version and its date on one line. */
.changelog-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 6px;
}

/* Admin reply under a feature request. The BOX is .form-help (same callout treatment as
   Email Settings); this only undoes that class's centred-form layout for use inside a card. */
.fr-reply { max-width: none; margin: 12px 0 0; }


/* Automatic/Manual state pill next to the auto-send checkbox. Mirrors the Weekly Reminders
   panels' pill so the two schedulers read the same way. */
.auto-pill {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: var(--radius-sm);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--badge-submitted-bg); color: var(--badge-submitted-text); vertical-align: middle;
}
.auto-pill.is-auto { background: var(--badge-approved-bg); color: var(--badge-approved-text); }

/* Callout for members a run cannot invoice. Red because it is the one preview outcome that
   needs action before the run date, not just information. */
.run-problems {
  margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--badge-denied-bg); color: var(--badge-denied-text);
  font-size: 0.85rem; line-height: 1.5;
}
.run-problems strong { color: inherit; }

/* Skipped rows sit below the billable ones, dimmed — present for completeness, not the
   thing being reviewed. */
.run-skipped td { opacity: 0.72; }


/* The live "will be saved as" filename preview on the upload panel. */
.name-preview {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent-gold-deep);
}

/* Billing-option radios on the PUBLIC application form (apply.html). Stacked cards rather
   than an inline .radio-row: each option carries a price and a sentence of explanation, so
   they need room to be compared. */
.dues-options { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.dues-option {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: var(--border-soft); border-radius: var(--radius-md); background: #fff;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.dues-option:hover { border-color: var(--accent-gold); }
.dues-option:has(input:checked) { border-color: var(--accent-gold); background: #fffdf6; }
.dues-option input { margin-top: 3px; }
.dues-option-body { display: flex; flex-direction: column; gap: 2px; }
.dues-option-label { font-weight: 700; color: var(--primary-dark); }
.dues-option-price { font-size: 1.05rem; font-weight: 800; color: var(--accent-gold-deep); }
/* An unsynced price must read as "not known yet", never as free. */
.dues-option-price.is-pending { font-size: 0.8rem; font-weight: 600; color: #6b7280; }
.dues-option-hint { font-size: 0.8rem; color: #6b7280; }
