/* ============================================================================
   Volunteer Ledger — design system (v4, light mode only)
   "Soft hospice SaaS + subtle MortonApps DNA" pass: warm cream canvas, deep
   teal product identity, muted rust accent, tiny hints of MortonApps navy in
   gradients and details. Calm and lightweight — not dark, not cyber, not
   overly corporate. Structured app shell (contained main column, pill nav,
   page headers, KPI strips, layered card depth) + document-grade print intact.
   Token-based: change the :root custom properties, the app follows.

   Contrast notes (all checked ≥ 4.5:1 for text):
     --vc-accent  #B64932 on white          ≈ 5.3:1  (TEXT-SAFE rust; the
       decorative rust #C24A2E + soft tint #F8E7DE are NON-TEXT — rails,
       motifs, fills)
     --vc-primary #0F766E on white          ≈ 4.8:1  (on cream ≈ 5.1:1)
     #fff on --vc-primary                   ≈ 4.8:1 (button gradient darker)
     --vc-text-soft #61736B on cream        ≈ 4.7:1
   ============================================================================ */

:root {
  /* color tokens */
  --vc-primary: #0F766E;        /* deep teal — primary actions, links, accents */
  --vc-primary-dark: #0B5F58;   /* dark teal — hover / dark text-on-soft */
  --vc-primary-soft: #E2F0ED;   /* teal tint — pills, fills, hovers */
  --vc-green: #2F7D63;          /* hospice green — supporting (bar fills) */
  --vc-navy: #102A43;           /* MortonApps navy — gradients + details only */
  --vc-accent: #B64932;         /* muted rust — TEXT-SAFE accent (wordmark) */
  --vc-accent-deco: #C24A2E;    /* MortonApps rust — DECORATIVE ONLY (rails), never text */
  --vc-accent-bright: #C24A2E;  /* rust — DECORATIVE ONLY (motifs), never text */
  --vc-accent-soft: #F8E7DE;    /* soft rust tint — rare highlight fills, never text */
  --vc-bg: #F8F5EE;             /* warm cream page canvas */
  --vc-surface: #FFFFFF;        /* card surface */
  --vc-surface-muted: #F3EFE7;  /* warm alternate surface — table header bands */
  --vc-border: #E3DDD2;         /* warm sand border */
  --vc-row-hover: #F8F5EE;      /* table row hover wash (page-canvas cream) */
  --vc-text: #17231F;
  --vc-text-soft: #61736B;
  --vc-danger: #B3473D;         /* SEMANTIC only — destructive/error, never decorative */
  --vc-danger-soft: #F8ECEA;
  --vc-ok: #0F766E;
  --vc-warn: #6B4E13;           /* SEMANTIC amber text — due-soon / expiring (matches trial/pending pills) */
  --vc-warn-soft: #FCF4E2;      /* soft amber fill */

  /* shape + depth — soft radii, layered low-contrast shadows */
  --vc-radius: 18px;
  --vc-radius-sm: 10px;
  --vc-shadow: 0 1px 2px rgba(28, 39, 35, .04), 0 16px 40px rgba(28, 39, 35, .07);
  --vc-shadow-lift: 0 2px 4px rgba(28, 39, 35, .06), 0 22px 48px rgba(28, 39, 35, .1);
  --vc-shadow-panel: 0 1px 3px rgba(28, 39, 35, .05), 0 20px 48px rgba(28, 39, 35, .09);
  --vc-card-grad: linear-gradient(180deg, var(--vc-surface), #FFFFFF);

  /* shell metrics — sticky table headers offset below the sticky nav */
  --vc-nav-h: 68px;

  /* motion — ONE calm ease + duration for the whole app (load-in fades,
     settle-ins, scrims, exits). Fast enough to never feel sluggish (≤240ms);
     every consumer is switched off wholesale in the reduced-motion block. */
  --vc-ease: cubic-bezier(.22, .61, .36, 1);
  --vc-dur: 180ms;

  /* type — generous base for non-technical users; confident display face
     for the wordmark + headings */
  --vc-font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --vc-display: 'Manrope', 'Source Sans 3', system-ui, sans-serif;
  font-size: 17px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--vc-font);
  background: var(--vc-bg);
  color: var(--vc-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App shell pages (app.html) get a sticky-footer column so the tiny
   MortonApps line sits at the true bottom of the scroll. Login + landing
   keep their own layout + the original .vc-footer treatment. */
body.vc-app { min-height: 100vh; display: flex; flex-direction: column; }
body.vc-app .vc-main { flex: 1; width: 100%; }

h1, h2, h3 { font-family: var(--vc-display); line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: 1.22rem; font-weight: 700; letter-spacing: -.015em; }
a { color: var(--vc-primary); }

/* ---- two-tone wordmark (MortonApps family signature) -------------------- */
.wordmark {
  word-spacing: -.14em;
  font-family: var(--vc-display);
  font-weight: 800;
  letter-spacing: -.04em;
  text-decoration: none;
}
.wordmark .wm-a { color: var(--vc-primary); }
/* Subtle gap so "Volunteer Ledger" reads as two words — matches landing.css so
   the app nav + login + password screens line up with the marketing site. */
.wordmark .wm-b { color: var(--vc-accent); margin-left: .16em; }

/* ---- top nav (taller frosted bar, soft pill links) ----------------------- */
.vc-nav {
  display: flex; align-items: center; gap: .4rem;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(227, 221, 210, .65);
  padding: .8rem 2rem;
  position: sticky; top: 0; z-index: 50;
}
.vc-nav .wordmark {
  font-size: 1.12rem; padding: .35rem 1.1rem .35rem 0; margin-right: 1rem;
  white-space: nowrap;
}
.vc-nav a.nav-link {
  text-decoration: none; color: var(--vc-text-soft);
  padding: .42rem .95rem; font-weight: 600;
  border-radius: 999px;
  transition: color .12s, background-color .12s;
}
.vc-nav a.nav-link:hover { color: var(--vc-primary-dark); background: rgba(23, 35, 31, .05); }
.vc-nav a.nav-link.active { color: #075F58; background: #DCEFEB; font-weight: 700; }
.vc-nav .spacer { flex: 1; }

/* workspace chip on the right — avatar dot (agency initial) + name text +
   caret. The chip is a BUTTON that opens the account menu (identity line,
   Change password, Sign out). #who keeps its id contract (app.js sets
   textContent); ui.js mirrors the first letter into #who-avatar and toggles
   .has-text on the chip. */
.who-wrap { position: relative; display: inline-flex; }
.vc-nav .who {
  display: inline-flex; align-items: center; gap: .55rem;
  font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--vc-text);
  background: #fff;
  border: 1px solid var(--vc-border);
  border-radius: 999px;
  padding: .26rem .8rem .26rem .3rem;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(28, 39, 35, .04);
  transition: border-color .12s, box-shadow .12s;
}
.vc-nav .who:hover,
.vc-nav .who[aria-expanded="true"] { border-color: #D5CEC0; box-shadow: 0 2px 8px rgba(28, 39, 35, .08); }
.vc-nav .who:not(.has-text) { display: none; }
.who-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vc-primary), var(--vc-primary-dark));
  color: #fff;
  font-family: var(--vc-display); font-size: .72rem; font-weight: 800;
  user-select: none;
}
.who-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.who-caret { flex: 0 0 auto; color: var(--vc-text-soft); transition: transform .12s; }
.vc-nav .who[aria-expanded="true"] .who-caret { transform: rotate(180deg); }

/* account menu — persistent (hidden) popover anchored to the chip. Reuses the
   .row-menu-pop / .row-menu-item visual language; position is absolute (the
   chip is the anchor), not fixed. #change-pw / #signout keep their ids here
   so app.js wiring + the command palette's .click() hooks keep working. */
.who-wrap .who-menu {
  position: absolute; top: calc(100% + 6px); right: 0; left: auto;
  min-width: 230px;
}
.who-wrap .who-menu[hidden] { display: none; }
.who-menu-id {
  padding: .45rem .7rem .55rem;
  border-bottom: 1px solid var(--vc-border);
  margin-bottom: .25rem;
}
.who-menu-name { font-size: .9rem; font-weight: 700; color: var(--vc-text); }
.who-menu-email { font-size: .8rem; color: var(--vc-text-soft); overflow: hidden; text-overflow: ellipsis; }

/* quiet utility buttons in the nav (the command-palette trigger) */
.vc-nav .nav-util {
  font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--vc-text-soft);
  background: none; border: none; cursor: pointer;
  text-decoration: none;
  padding: .35rem .7rem; border-radius: 999px;
  transition: color .12s, background-color .12s;
}
.vc-nav .nav-util:hover { color: var(--vc-primary-dark); background: rgba(23, 35, 31, .05); }

/* ---- trial countdown pill (nav) -------------------------------------------
   Sits between the search button and the workspace chip (order in DOM).
   Two tones: teal-soft (>14 days) and amber (≤14 days). No panic red ever.
   Hidden by default; app.js shows it only when plan==='trial' && !readOnly. */
.nav-trial-pill {
  display: inline-flex; align-items: center;
  padding: .2rem .75rem;
  border-radius: 99px;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}
.nav-trial-pill[hidden] { display: none; }
.nav-trial-pill--teal  { background: #D7EAE6; color: var(--vc-primary-dark); }  /* soft teal — >14 days */
.nav-trial-pill--amber { background: #FCF4E2; color: #6B4E13; }                 /* soft amber — ≤14 days */

/* ---- trial-expired read-only banner ---------------------------------------
   Fixed directly under the sticky nav (top: var(--vc-nav-h)).
   Full-width, slim, soft amber — calm, not alarming.
   data-trial-banner hook preserved for future CTA injection.
   Hidden by default; app.js shows it and adds body.vc-readonly when readOnly. */
.vc-trial-banner {
  position: sticky; top: var(--vc-nav-h); z-index: 40;
  width: 100%;
  background: #FCF4E2;
  border-bottom: 1px solid #EBDCB4;
  color: #6B4E13;
  font-size: .88rem; font-weight: 600;
  text-align: center;
  padding: .55rem 1.5rem;
  line-height: 1.45;
}
.vc-trial-banner[hidden] { display: none; }

/* CTA inline in the expired-trial banner — sits inline after the text.
   Calm amber-on-amber button: ghost treatment (transparent fill, dark amber
   border + text) so it reads as helpful action, not alarming.
   Print and reduced-motion: banner is already hidden in @media print;
   transition respects prefers-reduced-motion below. */
.trial-banner-msg { margin-right: .75rem; }
.trial-banner-cta {
  display: inline-flex; align-items: center;
  font: inherit; font-size: .85rem; font-weight: 700;
  color: #5A3E0A;
  background: rgba(255, 255, 255, .55);
  border: 1.5px solid #C6A84E;
  border-radius: 99px;
  padding: .18rem .85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .12s, border-color .12s, box-shadow .12s;
  vertical-align: middle;
  text-decoration: none;
}
.trial-banner-cta:hover {
  background: rgba(255, 255, 255, .80);
  border-color: #A68524;
  box-shadow: 0 1px 4px rgba(107, 78, 19, .18);
}
.trial-banner-cta:focus-visible {
  outline: 3px solid rgba(107, 78, 19, .40);
  outline-offset: 2px;
}

/* ---- read-only (trial expired) affordance hiding --------------------------
   The server already rejects every write with a 403 when the trial has ended,
   so data is safe regardless of the UI. These rules ALSO hide the create / edit
   / import / delete affordances so a read-only tenant is never shown an action
   that can't succeed. The banner above already explains "adding or editing is
   paused." VIEW + DOWNLOAD affordances are intentionally NOT hidden — the CSV
   template, full-data exports (Settings → Data Ownership), report downloads, and
   the volunteers "Export CSV" all stay, so the tenant keeps complete access to
   see and download their information. body.vc-readonly is toggled by app.js. */
body.vc-readonly .hours-entry,      /* "Log volunteer hours" entry panel        */
body.vc-readonly .import-label,     /* Import CSV labels (hours + volunteers)    */
body.vc-readonly #v-add,            /* + Add Volunteer                           */
body.vc-readonly #u-add,            /* + Add User                                */
body.vc-readonly #p-edit,           /* volunteer-profile Edit                    */
body.vc-readonly #a-add-bar,        /* New-area input + "+ Add Area" toolbar     */
body.vc-readonly .col-actions {     /* per-row Edit / Delete / Deactivate menus  */
  display: none !important;
}

/* ---- past-due payment banner ----------------------------------------------
   Non-blocking grace-period nudge shown to admins when the subscription is
   past_due. Mirrors the trial banner's slim sticky layout but a DISTINCT,
   warmer/more saturated amber so it reads as an action-needed alert (not the
   calm "trial ended" tone). The tenant keeps full access — no body class, no
   gating. Hidden by default; app.js shows it. */
.vc-pastdue-banner {
  position: sticky; top: var(--vc-nav-h); z-index: 40;
  width: 100%;
  background: #FBE9D8;
  border-bottom: 1px solid #E9C49E;
  color: #7A3E0E;
  font-size: .88rem; font-weight: 600;
  text-align: center;
  padding: .55rem 1.5rem;
  line-height: 1.45;
}
.vc-pastdue-banner[hidden] { display: none; }
.pastdue-banner-msg { margin-right: .75rem; }
.pastdue-banner-cta {
  display: inline-flex; align-items: center;
  font: inherit; font-size: .85rem; font-weight: 700;
  color: #FFFFFF;
  background: #C2410C;
  border: 1.5px solid #A8350A;
  border-radius: 99px;
  padding: .18rem .85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .12s, border-color .12s, box-shadow .12s;
  vertical-align: middle;
  text-decoration: none;
}
.pastdue-banner-cta:hover {
  background: #A8350A;
  border-color: #8C2C08;
  box-shadow: 0 1px 4px rgba(122, 62, 14, .25);
}
.pastdue-banner-cta:focus-visible {
  outline: 3px solid rgba(122, 62, 14, .40);
  outline-offset: 2px;
}

/* low-days trial pill: clickable variant (≤14 days, amber state).
   Cursor + subtle underline signal interactivity without changing the pill's
   calm amber appearance. */
.nav-trial-pill--clickable {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.nav-trial-pill--clickable:hover { opacity: .82; }
.nav-trial-pill--clickable:focus-visible {
  outline: 3px solid rgba(107, 78, 19, .40);
  outline-offset: 2px;
  border-radius: 99px;
}

/* Reactivation modal body styles */
.reactivate-safe-line {
  display: flex; align-items: flex-start; gap: .45rem;
  background: var(--vc-primary-soft);
  border: 1px solid #C0DDD8;
  border-radius: 10px;
  padding: .55rem .85rem;
  color: var(--vc-primary-dark);
  font-size: .92rem; font-weight: 600;
  line-height: 1.45;
  margin-bottom: .9rem;
}
.reactivate-safe-icon { flex: 0 0 auto; margin-top: .12rem; }
.reactivate-plans {
  margin: .25rem 0 .9rem 1.25rem;
  padding: 0;
  font-size: .95rem;
  line-height: 1.6;
}

/* Reactivation modal action stack: recommended plan is the full-width primary
   CTA; the other plan sits half-width next to "Maybe later"; "Email us instead"
   is a quiet link at the very bottom. Replaces the old flex-wrap button row. */
.reactivate-actions { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.2rem; }
.reactivate-primary { width: 100%; }
.reactivate-actions-row { display: flex; gap: .6rem; }
.reactivate-actions-row .btn { flex: 1 1 0; min-width: 0; padding-left: .65rem; padding-right: .65rem; }
.reactivate-mailto {
  display: block; text-align: center; margin-top: .3rem;
  font-size: .9rem; font-weight: 600;
  color: var(--vc-text-soft); text-decoration: none;
}
.reactivate-mailto:hover { color: var(--vc-primary-dark); text-decoration: underline; }
@media (max-width: 460px) {
  .reactivate-actions-row { flex-direction: column; }
}

/* small screens: let the trial pill hide its text if necessary */
@media (max-width: 760px) {
  .nav-trial-pill { padding: .18rem .55rem; font-size: .74rem; }
  /* On very small screens wrap banner so message + CTA stack cleanly */
  .vc-trial-banner,
  .vc-pastdue-banner { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
}

/* small screens: let the nav wrap, collapse the chip to avatar+caret (the
   account menu must stay reachable on mobile), scroll wide tables */
@media (max-width: 760px) {
  .vc-nav { flex-wrap: wrap; padding: .5rem 1rem; }
  .vc-nav .who { padding: .26rem .5rem .26rem .26rem; }
  .vc-nav .who .who-text { display: none; }
  .vc-nav a.nav-link { padding: .35rem .7rem; }
  table.vc-table { display: block; overflow-x: auto; }
}

/* ---- layout ------------------------------------------------------------ */
.vc-main { max-width: 1280px; margin: 0 auto; padding: 34px 32px 64px; }
@media (max-width: 760px) { .vc-main { padding: 22px 16px 52px; } }

/* subtle page transition on route change (app.js swaps one child into #view) */
#view > * { animation: vc-page-in .22s var(--vc-ease); }
@keyframes vc-page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- load-in motion utilities (loading-smoothness pass) ---------------------
   Async-loaded content must SETTLE into place, not pop:
     .vc-fade-in   opacity-only fade — safe everywhere (incl. around
                   position:sticky table headers; no transform involved).
     .vc-settle    fade + 6px rise — cards/panels/report output.
     .vc-stagger   parent utility: each direct child settles in with a tiny
                   cascading delay (dashboard sections, profile blocks).
   All are one-shot CSS animations (`backwards` holds the hidden start state
   through any stagger delay), so re-applying the class re-runs nothing —
   UI.settle(el) force-restarts when a persistent host re-renders. */
@keyframes vc-fade { from { opacity: 0; } }
@keyframes vc-settle { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vc-fade-in { animation: vc-fade var(--vc-dur) var(--vc-ease) backwards; }
.vc-settle { animation: vc-settle var(--vc-dur) var(--vc-ease) backwards; }
.vc-stagger > * { animation: vc-settle 220ms var(--vc-ease) backwards; }
.vc-stagger > *:nth-child(2) { animation-delay: 45ms; }
.vc-stagger > *:nth-child(3) { animation-delay: 90ms; }
.vc-stagger > *:nth-child(n+4) { animation-delay: 130ms; }

/* expandable reveal for sections that arrive late ABOVE existing content
   (Reports → milestone spotlight): the height eases open instead of shoving
   the page down in one frame. Progressive enhancement — browsers that can't
   animate fr tracks still get the opacity fade + instant height (status quo). */
.vc-expand {
  display: grid; grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .26s var(--vc-ease), opacity .26s var(--vc-ease);
}
.vc-expand > * { min-height: 0; overflow: clip; }
.vc-expand.vc-expand-in { grid-template-rows: 1fr; opacity: 1; }
.vc-expand[hidden] { display: none; }

/* tiny muted line at the true bottom of the scroll (app shell only) */
.app-foot {
  text-align: center;
  color: var(--vc-text-soft);
  font-size: .78rem;
  padding: 1rem 1rem 1.4rem;
}
.app-foot a {
  color: var(--vc-text-soft);
  text-decoration: underline;
  text-decoration-color: var(--vc-border);
  text-underline-offset: 3px;
}
.app-foot a:hover { color: var(--vc-primary-dark); }

/* ---- page header (UI.pageHeader) ----------------------------------------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem 1.25rem; flex-wrap: wrap;
  margin: 0 0 1.35rem;
}
.page-head h1 { margin: 0; font-size: 1.95rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.page-desc { margin: .35rem 0 0; color: var(--vc-text-soft); font-size: .92rem; max-width: 60ch; }
.page-head-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* in-page section header — clearly below page titles, above table labels */
.section-head {
  display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
  font-family: var(--vc-display);
  font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--vc-text);
  margin: 0 0 .7rem;
}
.section-head .muted { font-family: var(--vc-font); font-size: .85rem; font-weight: 600; }

/* ---- KPI strip (UI.kpiStrip) — Tier 2 surface ------------------------------ */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .9rem;
  margin: 0 0 1.35rem;
}
.kpi-card {
  background: var(--vc-card-grad);
  border: 1px solid var(--vc-border);
  border-radius: 16px;
  box-shadow: var(--vc-shadow);
  padding: .95rem 1.2rem .9rem;
  min-width: 0;
}
/* When a KPI is an in-page action (button.kpi-card via dataKey), strip the
   native button chrome so it reads identically to the static/link cards. */
button.kpi-card { font: inherit; text-align: left; width: 100%; cursor: pointer; display: block; }
/* Clickable KPI — whole card is a shortcut: lifts + reveals a → on hover. */
.kpi-card--link { position: relative; text-decoration: none; color: inherit; display: block; transition: box-shadow .15s var(--vc-ease), transform .15s var(--vc-ease); }
.kpi-card--link:hover { box-shadow: var(--vc-shadow-lift); transform: translateY(-1px); }
.kpi-card--link::after {
  content: '\2192'; position: absolute; top: .8rem; right: 1rem;
  font-size: 1rem; line-height: 1; color: var(--vc-text-soft);
  opacity: 0; transform: translateX(-3px);
  transition: opacity .15s var(--vc-ease), transform .15s var(--vc-ease);
}
.kpi-card--link:hover::after { opacity: .65; transform: translateX(0); }
/* Soft action-needed rail (amber) — calm, not alarming. */
.kpi-card--accent { border-left: 3px solid var(--vc-warn); }
.kpi-label {
  font-size: .74rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--vc-text-soft);
}
.kpi-val {
  font-family: var(--vc-display);
  font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: var(--vc-primary-dark);
  margin-top: .08rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* supporting row under the number: sub-text + optional trend chip */
.kpi-foot { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .12rem; min-width: 0; }
.kpi-sub { font-size: .8rem; color: var(--vc-text-soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.kpi-trend {
  display: inline-flex; align-items: center; gap: .15rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em;
  border-radius: 99px; padding: .06rem .5rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kpi-trend--up   { background: #D7EAE6; color: var(--vc-primary-dark); }
.kpi-trend--flat { background: #ECE7DB; color: #5C5648; }
.kpi-trend--down { background: var(--vc-accent-soft); color: var(--vc-accent); } /* muted rust, NOT danger red */

/* ---- surface tiers ---------------------------------------------------------
   .panel          Tier 1 — page-level container: larger radius, stronger (still
                   soft) shadow, more padding. .panel--feature adds a SINGLE
                   teal left rail — the functional-screen accent. The multi-
                   color teal→rust→navy gradient is reserved for the deliberate
                   brand moments only (.card-rail on login/set-password and the
                   .ma-badge); it never appears on working screens.
   .card           Tier 2 — the workhorse (unchanged contract, tightened pad).
   .card--utility  Tier 3 — flatter quick-action block, smaller radius,
                   stronger hover lift. Use ONLY on actionable/clickable cards.
   --------------------------------------------------------------------------- */
.panel {
  background: var(--vc-card-grad);
  border: 1px solid var(--vc-border);
  border-radius: 22px;
  box-shadow: var(--vc-shadow-panel);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.3rem;
}
/* overflow: clip (NOT hidden) — hidden would turn the panel into the
   scrollport and break .vc-table--sticky headers inside it */
.panel--feature { position: relative; overflow: clip; }
.panel--feature::before {
  content: '';
  position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: var(--vc-primary);
}

.card {
  background: var(--vc-card-grad);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  box-shadow: var(--vc-shadow);
  padding: 1.3rem 1.45rem;
  margin-bottom: 1.2rem;
}
.card-sub { margin: -.25rem 0 1rem; color: var(--vc-text-soft); font-size: .92rem; }

.card--utility {
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(28, 39, 35, .05);
  padding: 1rem 1.15rem;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.card--utility:hover {
  transform: translateY(-2px);
  box-shadow: var(--vc-shadow-lift);
  border-color: var(--vc-primary);
}

/* 4px top rail gradient — BRAND MOMENTS ONLY (login + set-password cards).
   teal → rust → navy: the MortonApps family signature, decorative colors
   only (never text). Functional screens use .panel--feature's single teal
   left rail instead. */
.card-rail { position: relative; overflow: clip; }   /* clip, not hidden — keeps position:sticky working inside */
.card-rail::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  /* Solid teal — the multi-color MortonApps gradient "didn't work" here
     (Greg, 2026-06-12); brand connection lives in the .ma-badge instead. */
  background: var(--vc-primary);
}

.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.toolbar .grow { flex: 1; min-width: 200px; }

/* ---- quiet MortonApps footer (landing + login keep this) ------------------ */
/* Sits at the true bottom because the card's auto margins (above) absorb all
   free space — the footer itself must NOT carry an auto margin. */
.vc-footer {
  text-align: center;
  color: var(--vc-text-soft);
  font-size: .85rem;
  padding: 1.25rem 1rem 1.5rem;
}
.vc-footer a {
  color: var(--vc-text-soft);
  text-decoration: underline;
  text-decoration-color: var(--vc-border);
  text-underline-offset: 3px;
}
/* Card dead-center, badge at the true bottom: auto margins on BOTH sides of
   the card absorb all free space equally (footer keeps no auto margin —
   getting this pairing wrong pushed the whole card to the bottom, 2026-06-12). */
.login-wrap > main { margin-top: auto; margin-bottom: auto; }
.vc-footer a:hover { color: var(--vc-primary-dark); }

/* ---- forms ------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
/* Log-hours entry form: slightly larger field labels (the "Volunteer"/"Date & time" section headers were removed; spacing + bigger labels carry the grouping). The volunteer portal's "Log my hours" form (.vp-entry) shares the exact same treatment so the two forms read identically. */
.hours-entry label, .vp-entry label { font-size: 1rem; }
.field { margin-bottom: .9rem; }
.hint { font-size: .82rem; color: var(--vc-text-soft); margin-top: .3rem; line-height: 1.4; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="number"], input[type="tel"], input[type="search"], input[type="time"],
select, textarea {
  width: 100%;
  font: inherit;
  color: var(--vc-text);
  background: #fff;
  border: 1.5px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  padding: .6rem .75rem;           /* big touch targets */
  min-height: 2.75rem;             /* ≈ 47px standard control height */
  transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 5rem; resize: vertical; }
/* Selects: strip the native chrome so they match the inputs' rounded corners
   and rounded focus ring everywhere — the main app (admin/staff) AND the
   volunteer self-login portal, which share this stylesheet. A custom chevron
   replaces the native arrow so the dropdown indicator stays. */
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2361736B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 1.05rem;
  padding-right: 2.4rem;
  cursor: pointer;
}
select::-ms-expand { display: none; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(15, 118, 110, .30);   /* calm teal focus ring */
  outline-offset: 1px;
  border-color: var(--vc-primary);
  box-shadow: 0 0 0 5px rgba(15, 118, 110, .08);
}
/* Checkboxes/radios: mouse clicks check them AND focus them, which flashed
   the ring on every tick (Greg, 2026-06-12). Ring only for keyboard focus. */
input[type="checkbox"]:focus:not(:focus-visible),
input[type="radio"]:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}
button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .45);
  outline-offset: 2px;
  border-color: var(--vc-primary);
}

/* inline validation state — pair with a .hint set to the error message */
.input-invalid,
input.input-invalid:focus, select.input-invalid:focus, textarea.input-invalid:focus {
  border-color: var(--vc-danger);
  box-shadow: 0 0 0 4px rgba(179, 71, 61, .12);
}
.input-invalid:focus { outline-color: rgba(179, 71, 61, .30); }
.hint-invalid { color: var(--vc-danger); font-weight: 600; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid > * { min-width: 0; }
.form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

fieldset.areas-pick { border: 1.5px solid var(--vc-border); border-radius: var(--vc-radius-sm); padding: .6rem .85rem .75rem; }
fieldset.areas-pick legend { font-weight: 600; font-size: .92rem; padding: 0 .25rem; }
/* Uniform grid: equal-width columns auto-fit to the container with even row +
   column gaps — no staggered inline-flow. Column min is generous so typical and
   custom area names sit on one line; very long ones wrap inside their own cell
   while every column stays the same width. */
fieldset.areas-pick .areas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .55rem .85rem; margin-top: .4rem; }
fieldset.areas-pick label { display: flex; align-items: center; gap: .45rem; font-weight: 400; margin: 0; min-width: 0; }
fieldset.areas-pick input[type="checkbox"] { flex: none; width: 1.2rem; height: 1.2rem; accent-color: var(--vc-primary); }

/* ---- credential slots in the volunteer form (per-type on-file table) -------- */
fieldset.cred-pick { border: 1.5px solid var(--vc-border); border-radius: var(--vc-radius-sm); padding: .5rem .85rem .75rem; }
fieldset.cred-pick legend { font-weight: 600; font-size: .92rem; padding: 0 .25rem; }
.cred-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cred-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--vc-text-soft); font-weight: 700; padding: .3rem .5rem; border-bottom: 1px solid var(--vc-border); }
.cred-table td { padding: .35rem .5rem; vertical-align: middle; border-bottom: 1px solid var(--vc-border); }
.cred-table tbody tr:last-child td { border-bottom: 0; }
.cred-table td.cred-on { width: 3.4rem; text-align: center; }
.cred-table td.cred-name { font-weight: 600; }
.cred-table input[type="checkbox"] { width: 1.2rem; height: 1.2rem; accent-color: var(--vc-primary); }
.cred-table input[type="date"], .cred-table input[type="text"] { width: 100%; padding: .3rem .5rem; border: 1.5px solid var(--vc-border); border-radius: var(--vc-radius-sm); font: inherit; background: var(--vc-surface); color: var(--vc-text); }
.cred-table input:disabled { opacity: .45; background: var(--vc-surface-muted); }
.cred-set-req { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--vc-text-soft); margin: 0 0 .85rem; cursor: pointer; }
.cred-set-req input { width: 1.15rem; height: 1.15rem; accent-color: var(--vc-primary); margin: 0; }
.cred-req { display: inline-block; margin-left: .35rem; padding: .03rem .4rem; border-radius: 5px; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: var(--vc-warn-soft); color: var(--vc-warn); vertical-align: middle; }

/* ---- soft amber notice box (UI.privacyNotice) ----------------------------- */
.notice-soft {
  display: flex; gap: .65rem; align-items: flex-start;
  background: #FCF4E2;
  border: 1px solid #EBDCB4;
  border-radius: 12px;
  padding: .7rem .95rem;
  color: #6B4E13;                /* amber-safe text, ≥ 4.5:1 on #FCF4E2 */
  font-size: .9rem; line-height: 1.45;
  margin: .25rem 0 1.1rem;
}
.notice-soft strong { color: inherit; }
.notice-soft .notice-icon { flex: 0 0 auto; margin-top: .12rem; }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  font: inherit; font-weight: 600;
  border-radius: var(--vc-radius-sm);
  border: 1.5px solid transparent;
  padding: .62rem 1.2rem;
  min-height: 2.75rem;
  cursor: pointer;
  background: var(--vc-primary-soft);     /* primary-quiet — the default */
  color: var(--vc-primary-dark);
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s, color .12s, filter .12s;
}
.btn:hover { filter: brightness(.98); transform: translateY(-1px); box-shadow: var(--vc-shadow); }
.btn:active { transform: translateY(1px) scale(.99); box-shadow: none; }
.btn-primary {
  background: linear-gradient(180deg, #137C72 0%, #0B625B 100%);
  color: #fff;
  border: 1px solid rgba(8, 77, 71, .35);
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(15, 118, 110, .20), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #0F756B 0%, #0A5750 100%);
  filter: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 118, 110, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:active { transform: translateY(1px) scale(.99); box-shadow: 0 4px 10px rgba(15, 118, 110, .18), inset 0 1px 0 rgba(255, 255, 255, .12); }
/* secondary — white with a border */
.btn-ghost { background: #fff; border-color: var(--vc-border); color: var(--vc-text); }
.btn-ghost:hover { color: var(--vc-primary-dark); border-color: var(--vc-primary); background: #fff; filter: none; }
.btn-danger { background: var(--vc-danger-soft); color: var(--vc-danger); }
.btn-danger-solid { background: var(--vc-danger); color: #fff; }
.btn-danger-solid:hover { filter: brightness(.92); }
/* text-only action that reads as a link (e.g. the hours form's entry-mode
   toggle) — no chrome, so it never competes with the real buttons */
.btn-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: .9rem;
  color: var(--vc-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.btn-link:hover { color: var(--vc-primary-dark); }
/* subdued destructive row action — muted text until hover reveals intent */
.btn-subtle { background: transparent; color: var(--vc-text-soft); }
.btn-subtle:hover { background: var(--vc-danger-soft); color: var(--vc-danger); filter: none; }
.btn-sm { padding: .3rem .7rem; min-height: 2.1rem; font-size: .88rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
/* .btn sets display:inline-flex, which would defeat the hidden attribute —
   restore it (e.g. the profile timeline's "Show more" when fully loaded). */
.btn[hidden] { display: none; }

/* ---- segmented control (shared) ---------------------------------------------
   ONE pattern for every either/or selector: the Dashboard timeframe control
   and the Hours entry-method control both use .seg-control — do not fork a
   second segmented style. Active segment is marked with aria-pressed="true". */
.seg-control {
  display: inline-flex;
  background: var(--vc-surface-muted);
  border: 1px solid var(--vc-border);
  border-radius: 99px;
  padding: 3px; gap: 2px;
}
.seg-control button {
  border: 0; background: transparent;
  font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--vc-text-soft);
  padding: .3rem .85rem;
  border-radius: 99px;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.seg-control button:hover { color: var(--vc-primary-dark); }
.seg-control button[aria-pressed="true"] {
  background: #fff; color: var(--vc-primary-dark);
  box-shadow: 0 1px 2px rgba(28, 39, 35, .14);
}

/* filter chips (Recent Entries quick filters) */
.chip {
  font: inherit; font-size: .86rem; font-weight: 600;
  border: 1.5px solid var(--vc-border);
  background: transparent; color: var(--vc-text-soft);
  border-radius: 999px;
  padding: .28rem .85rem; min-height: 2rem;
  cursor: pointer;
  transition: background-color .12s, color .12s, border-color .12s;
}
.chip:hover { color: var(--vc-primary-dark); border-color: var(--vc-primary); }
.chip.active { background: var(--vc-primary-soft); border-color: var(--vc-primary-soft); color: var(--vc-primary-dark); }
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .9rem; }
.filter-row select { width: auto; min-height: 2.1rem; padding: .25rem 1.8rem .25rem .6rem; font-size: .88rem; }
/* Inline custom-range tray for the hours search filters — a soft tinted panel
   that expands BELOW the chip row when the Custom Range chip is active, so it
   reads as an expansion of that pill rather than a stray second filter row.
   Mirrors the .reactivate-safe-line pale-teal panel look. */
/* Smooth expand/collapse: animate the row track (grid 0fr -> 1fr) so the panel
   grows in height and the volunteer/area row below SLIDES down instead of
   jumping. The pale-teal panel styling lives on .custom-range-panel; the
   .custom-range-clip grid child (overflow:hidden, min-height:0) lets the panel
   clip cleanly to zero height while collapsing (no leftover border line). */
.custom-range-tray {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
  transition: grid-template-rows var(--vc-dur, 200ms) var(--vc-ease, ease),
              margin var(--vc-dur, 200ms) var(--vc-ease, ease),
              opacity var(--vc-dur, 200ms) var(--vc-ease, ease);
}
.custom-range-tray.open {
  grid-template-rows: 1fr;
  margin-top: .75rem;
  margin-bottom: .9rem;   /* breathing room before the volunteer/area filters */
  opacity: 1;
}
.custom-range-clip { overflow: hidden; min-height: 0; }
.custom-range-panel {
  padding: .85rem 1rem;
  border: 1px solid #C0DDD8;
  background: var(--vc-primary-soft);
  border-radius: var(--vc-radius-sm);
}
.custom-range-tray-label { font-weight: 600; font-size: .9rem; margin-bottom: .5rem; color: var(--vc-primary-dark); }
.custom-range-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
@media (prefers-reduced-motion: reduce) {
  .custom-range-tray { transition: none; }
}

/* Generic interaction-toggled reveal — the generalized form of the
   .custom-range-tray.open pattern above, for any field that should slide
   open/closed on a click/select instead of snapping in. (Sibling of
   .vc-expand, which is the ENTRANCE variant for late-arriving content via a
   double-rAF; this one is purely user-toggled via .open.) Wrap the revealable
   content in .vc-reveal-clip and toggle .open on the .vc-reveal container: the
   row track eases 0fr -> 1fr so siblings below SLIDE down. The clip child
   (overflow:hidden, min-height:0) collapses cleanly to zero height. Used by:
   report custom-range + save-as-preset, invite-user volunteer picker,
   hours/portal entry-method swap, settings email-mode swap + volunteer-id
   start row, and audit-detail expanders. */
.vc-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows var(--vc-dur, 200ms) var(--vc-ease, ease),
              opacity var(--vc-dur, 200ms) var(--vc-ease, ease);
}
.vc-reveal.open { grid-template-rows: 1fr; opacity: 1; }
.vc-reveal-clip { overflow: hidden; min-height: 0; }
/* Once fully open, stop clipping so a focused field's outline + glow can paint
   instead of being sliced into a sharp corner (Greg flagged this on the Hours
   field). Delaying the discrete overflow change until the expand finishes keeps
   the open/close animation itself clean; on close, .open drops and the base
   rule re-hides immediately so the collapse still clips. */
.vc-reveal.open > .vc-reveal-clip { overflow: visible; transition: overflow 0s var(--vc-dur, 200ms); }
@media (prefers-reduced-motion: reduce) {
  .vc-reveal { transition: none; }
}

/* From/To labels stack above their inputs inside the tray. */
.filter-date { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .25rem; margin: 0; font-weight: 600; font-size: .82rem; color: var(--vc-text-soft); white-space: nowrap; }
.filter-date input[type="date"] { width: auto; min-height: 2.1rem; padding: .25rem .5rem; font-size: .88rem; font-weight: 400; }
/* 'Clear filters' stays in the layout always — fades + disables when no filter
   is active so the chip row never re-wraps and jitters the page below it. */
.v-clear-filters { transition: opacity var(--vc-dur, 160ms) var(--vc-ease, ease); }
.v-clear-filters.is-empty { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .v-clear-filters { transition: none; } }

/* ---- tables ------------------------------------------------------------- */
table.vc-table { width: 100%; border-collapse: collapse; }
.vc-table th, .vc-table td { text-align: left; padding: .85rem .85rem; vertical-align: middle; }
.vc-table td { border-bottom: 1px solid var(--vc-border); }
.vc-table th {
  font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--vc-primary-dark);
  background: var(--vc-surface-muted);         /* warm alternate band, not hard lines */
  border-bottom: none;
  padding-top: .55rem; padding-bottom: .55rem;
}
.vc-table thead tr th:first-child { border-radius: var(--vc-radius-sm) 0 0 var(--vc-radius-sm); }
.vc-table thead tr th:last-child  { border-radius: 0 var(--vc-radius-sm) var(--vc-radius-sm) 0; }
.vc-table th.sortable { cursor: pointer; user-select: none; }
.vc-table th.sortable:hover { color: var(--vc-primary); }
.vc-table tbody tr { transition: background-color .1s; }
.vc-table tbody tr:hover { background: var(--vc-row-hover); }
.vc-table td .row-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.vc-table td input, .vc-table td select { min-height: 2.2rem; padding: .25rem .4rem; }
/* narrow inline-edit selects: tuck the chevron in so it never overlaps text */
.vc-table td select { padding-right: 1.5rem; background-position: right .45rem center; background-size: .95rem; }

/* sticky header: sticks below the app nav in normal page flow; inside an
   overflow container set --vc-sticky-top: 0 on the wrapper.
   border-collapse: separate is REQUIRED — Chromium mis-lays-out sticky th
   under border-collapse: collapse (header overlaps row 1). */
table.vc-table--sticky { border-collapse: separate; border-spacing: 0; }
.vc-table--sticky thead th { position: sticky; top: var(--vc-sticky-top, var(--vc-nav-h)); z-index: 5; }

/* column alignment utilities (apply to BOTH th and td) */
.vc-table .col-actions { text-align: right; width: 1%; white-space: nowrap; }
.vc-table .col-num { text-align: right; font-variant-numeric: tabular-nums; }
/* the bare .right utility (specificity 0,1,0) loses to `.vc-table th/td
   { text-align: left }` (0,1,1) — re-assert it for the numeric columns that
   use it (report tables, profile Hours-by-Year/timeline, Areas entries) */
.vc-table th.right, .vc-table td.right { text-align: right; }

/* ---- status pill system ----------------------------------------------------
   One .pill class + tone modifiers. .badge / .badge.active / .badge.inactive
   remain as live aliases — existing view markup keeps working unchanged. */
.pill, .badge { display: inline-block; padding: .14rem .7rem; border-radius: 99px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.pill--active,  .badge.active   { background: #D7EAE6; color: var(--vc-primary-dark); }   /* soft teal */
.pill--neutral, .badge.inactive { background: #ECE7DB; color: #5C5648; }                  /* warm stone */
.pill--pending  { background: #FCF4E2; color: #6B4E13; }                                  /* soft amber */
.pill--muted    { background: #EFEDE8; color: var(--vc-text-soft); }                      /* quiet gray */
.pill--danger   { background: var(--vc-danger-soft); color: var(--vc-danger); }           /* sparingly */

.empty { color: var(--vc-text-soft); text-align: center; padding: 2.4rem 1rem; }

/* ---- empty states (UI.emptyState) ----------------------------------------- */
.empty-state { text-align: center; padding: 2.6rem 1.25rem 2.4rem; }
.empty-state-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--vc-primary-soft); color: var(--vc-primary);
  margin-bottom: .65rem;
}
.empty-state-icon svg { display: block; }
.empty-state-title { font-family: var(--vc-display); font-size: 1.08rem; font-weight: 700; color: var(--vc-text); }
.empty-state-body { margin: .3rem auto 0; max-width: 46ch; color: var(--vc-text-soft); font-size: .92rem; line-height: 1.5; }
.empty-state-cta { margin-top: 1rem; }

/* ---- loading skeletons (UI.skeletonRows) ----------------------------------- */
.skeleton {
  display: block;
  height: .9rem; border-radius: 6px;
  background: linear-gradient(90deg, #EFEBE2 25%, #F7F4ED 45%, #EFEBE2 65%);
  background-size: 200% 100%;
  animation: vc-shimmer 1.3s linear infinite;
}
@keyframes vc-shimmer { from { background-position: 120% 0; } to { background-position: -80% 0; } }
.skeleton-line { width: 100%; max-width: 11rem; }
.skeleton-row td:nth-child(even) .skeleton-line { max-width: 7rem; }
/* skeleton rows must occupy the SAME height as a real data row (padding .85rem
   + one 1.5-line-height text line ≈ 54px) so the skeleton→content swap doesn't
   jump: the .9rem bar + .3rem margins ≈ the 25.5px text line it stands in for. */
.skeleton-row td > .skeleton { margin: .3rem 0; }
/* KPI skeleton cards (UI.kpiSkeleton) mirror the real card structure — the
   bars sit INSIDE real .kpi-label/.kpi-val/.kpi-foot wrappers so the card
   height is driven by the same line boxes as the loaded card. inline-block
   keeps the wrapper's line-height in charge (block .skeleton would collapse
   the wrapper to the bar height). */
.kpi-card .skeleton { display: inline-block; vertical-align: middle; width: 100%; }
.kpi-val .skeleton { height: 1em; border-radius: 8px; }

/* ---- row overflow menu (UI.rowMenu) ---------------------------------------- */
.row-menu { display: inline-flex; }
.row-menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex: 0 0 auto;
  background: transparent; border: none; border-radius: 8px;
  color: var(--vc-text-soft); cursor: pointer;
  transition: background-color .12s, color .12s;
}
.row-menu-btn:hover, .row-menu-btn[aria-expanded="true"] { background: var(--vc-surface-muted); color: var(--vc-primary-dark); }
.row-menu-pop {
  position: fixed; z-index: 130;
  min-width: 170px;
  background: #fff;
  border: 1px solid var(--vc-border);
  border-radius: 12px;
  box-shadow: var(--vc-shadow-lift);
  padding: .3rem;
  animation: vc-pop-in .12s ease-out;
}
@keyframes vc-pop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.row-menu-item {
  display: block; width: 100%; text-align: left;
  font: inherit; font-size: .92rem; font-weight: 600;
  color: var(--vc-text);
  background: none; border: none; border-radius: 8px;
  padding: .45rem .7rem; cursor: pointer;
  transition: background-color .1s, color .1s;
}
.row-menu-item:hover, .row-menu-item:focus-visible { background: var(--vc-row-hover); color: var(--vc-primary-dark); outline: none; }
/* destructive item: muted rust at rest, true danger red only on hover/focus */
.row-menu-item.danger { color: var(--vc-accent); }
.row-menu-item.danger:hover, .row-menu-item.danger:focus-visible { background: var(--vc-danger-soft); color: var(--vc-danger); }
.row-menu-item:disabled { opacity: .5; cursor: not-allowed; background: none; color: var(--vc-text-soft); }

/* ---- custom date & time pickers (ui.js attachDatePicker / attachTimePicker) ---
   Desktop-only popovers replacing the unstylable native picker popups. Same
   popover language as .row-menu-pop: white surface, 1px sand border, soft
   lifted shadow, 12-14px radius, fixed positioning clamped to the viewport.
   The inputs themselves stay native (typed entry unchanged); on non-touch
   devices we hide the boxy native indicator and draw our own quiet icon.
   GATE: "not coarse" — must mirror ui.js's COARSE_POINTER check exactly
   (pointer:none environments count as desktop there too). */
@media not all and (pointer: coarse) {
  input[type="date"]::-webkit-calendar-picker-indicator,
  input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
  input[type="date"], input[type="time"] {
    /* longhands only — background shorthand would clobber the base #fff fill */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2361736B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .65rem center;
    background-size: 15px 15px;
    padding-right: 2.1rem;
  }
  input[type="time"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2361736B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  }
}

.vc-dp-pop, .vc-tp-pop {
  position: fixed; z-index: 130;          /* same layer as .row-menu-pop */
  background: #fff;
  border: 1px solid var(--vc-border);
  border-radius: 14px;
  box-shadow: var(--vc-shadow-lift);
  animation: vc-pop-in .12s ease-out;
}

/* calendar popover */
.vc-dp-pop { width: 292px; padding: .65rem .7rem .45rem; }
.vc-dp-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-bottom: .4rem; }
.vc-dp-label {
  font-family: var(--vc-display);
  font-size: .95rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--vc-text);
}
.vc-dp-nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: 0 0 auto;
  background: transparent; border: none; border-radius: 8px;
  color: var(--vc-text-soft); cursor: pointer;
  transition: background-color .12s, color .12s;
}
.vc-dp-nav:hover { background: var(--vc-surface-muted); color: var(--vc-primary-dark); }
.vc-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.vc-dp-dow {
  text-align: center;
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--vc-text-soft);
  padding: .15rem 0 .3rem;
}
.vc-dp-day {
  height: 34px;
  display: flex; align-items: center; justify-content: center;
  font: inherit; font-size: .88rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--vc-text);
  background: transparent; border: none; border-radius: 9px;
  cursor: pointer;
  transition: background-color .1s, color .1s;
}
.vc-dp-day:hover { background: var(--vc-row-hover); color: var(--vc-primary-dark); }
.vc-dp-day.is-out { color: var(--vc-text-soft); opacity: .55; font-weight: 400; }
.vc-dp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--vc-primary); }   /* teal ring */
.vc-dp-day.is-sel { background: var(--vc-primary); color: #fff; }
.vc-dp-day.is-sel:hover { background: var(--vc-primary-dark); color: #fff; }
/* keyboard day-focus ring (DOM focus stays in the input) */
.vc-dp-day.is-focus { outline: 3px solid rgba(15, 118, 110, .30); outline-offset: 1px; }
.vc-dp-foot {
  display: flex; justify-content: flex-end;
  margin-top: .3rem; padding: .4rem .25rem .25rem;
  border-top: 1px solid var(--vc-border);
}
.vc-dp-foot .btn-link { font-size: .85rem; }

/* time popover — scrollable 15-minute list */
.vc-tp-pop { width: 168px; max-height: 252px; overflow-y: auto; padding: .3rem; }
.vc-tp-item {
  display: block; width: 100%; text-align: left;
  font: inherit; font-size: .9rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--vc-text);
  background: none; border: none; border-radius: 8px;
  padding: .38rem .7rem; cursor: pointer;
  transition: background-color .1s, color .1s;
}
.vc-tp-item:hover { background: var(--vc-row-hover); color: var(--vc-primary-dark); }
.vc-tp-item.is-sel { background: var(--vc-primary-soft); color: var(--vc-primary-dark); }

/* ---- modal (slide-over on wide screens) --------------------------------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(23, 35, 31, .38);
  display: flex; justify-content: flex-end;
  animation: vc-fade .18s var(--vc-ease);
}
.modal-panel {
  background: var(--vc-surface);
  width: min(560px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 1.5rem 1.6rem 3rem;
  box-shadow: -8px 0 30px rgba(23, 35, 31, .15);
  animation: vc-slide-in .18s ease-out;
}
@keyframes vc-slide-in { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.modal-foot { display: flex; gap: .75rem; margin-top: 1.25rem; }

/* ---- wide / centered modal variant — UI.modal(title, body, { wide: true }).
   For big forms (the volunteer add/edit) that need room for many fields side by
   side instead of a tall narrow slide-over. Centered, capped height, scrolls
   internally. Collapses to full-screen on small viewports. ------------------- */
.modal-scrim--wide { justify-content: center; align-items: center; padding: 1.5rem; }
.modal-panel--wide {
  width: min(940px, 100%);
  height: auto;
  max-height: 90vh;
  border-radius: var(--vc-radius);
  box-shadow: 0 20px 55px rgba(23, 35, 31, .28);
  animation: vc-pop .16s ease-out;
}
@keyframes vc-pop { from { transform: translateY(10px) scale(.99); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 720px) {
  .modal-scrim--wide { padding: 0; }
  .modal-panel--wide { width: 100%; height: 100%; max-height: none; border-radius: 0; }
}

/* ---- branded "moment" modal (subscribed / plan-change loader + success) -----
   Centered card with a full-bleed soft gradient hero + logo / success check /
   spinner. Add class .brand-modal to a UI.modal(..., {wide:true}) panel. The
   first-login welcome uses its own .wl-* layout (it has a feature grid); these
   classes cover the simpler confirmation + loading moments. --------------------*/
.brand-modal { padding: 0 !important; overflow: hidden; width: min(560px, 100%); }
/* No corner ✕ on the branded "moment" modals — they close via their own in-card
   button (or backdrop/Esc); the absolute close button was also escaping to the
   viewport corner since the panel isn't a positioning context. */
.brand-modal .modal-head { display: none; }
.brand-modal .modal-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.brand-hero { background: linear-gradient(135deg, #E2F0ED 0%, #FBF7EF 60%, #F8E7DE 100%); padding: 2.3rem 2rem 1.8rem; text-align: center; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; display: block; margin: 0 auto; }
.brand-check { width: 46px; height: 46px; border-radius: 50%; background: var(--vc-primary, #0F766E); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(15, 118, 110, .32); margin-top: 0; }
.brand-check svg { color: #fff; }
.brand-title { font-family: var(--vc-font-head, inherit); font-size: 1.55rem; font-weight: 800; letter-spacing: -.01em; margin: .55rem 0 .4rem; }
.brand-msg { color: var(--vc-text-soft, #52635c); max-width: 30rem; margin: 0 auto; line-height: 1.55; font-size: .95rem; }
.brand-msg p { margin: 0; }
.brand-body { padding: 1.4rem 2rem 1.8rem; text-align: center; }
.brand-body .btn { min-width: 210px; justify-content: center; }
.brand-spinner { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; border: 3px solid rgba(15, 118, 110, .22); border-top-color: var(--vc-primary, #0F766E); animation: brand-spin .8s linear infinite; }
@keyframes brand-spin { to { transform: rotate(360deg); } }

/* ---- soft confirmation dialog (UI.confirm) -------------------------------- */
.confirm-scrim {
  position: fixed; inset: 0; z-index: 140;
  background: rgba(23, 35, 31, .38);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  animation: vc-fade .15s var(--vc-ease);
}
.confirm-box {
  background: var(--vc-card-grad);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  box-shadow: var(--vc-shadow-lift);
  width: 100%; max-width: 440px;
  padding: 1.4rem 1.5rem 1.3rem;
  animation: vc-confirm-in .15s ease-out;
}
@keyframes vc-confirm-in { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.confirm-box h2 { font-size: 1.12rem; margin-bottom: .35rem; }
.confirm-msg { margin: 0; color: var(--vc-text-soft); font-size: .95rem; }
.confirm-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ---- command palette (UI.commandPalette, Ctrl/Cmd+K) -----------------------
   Own .cmdk-* namespace — shares the scrim color with .modal-scrim but is a
   separate layer (z 150: over slide-overs at 100 + confirms at 140, under
   toasts at 200). */

/* nav trigger — quiet .nav-util sibling: magnifier + a tiny kbd chip */
.cmdk-nav-btn { display: inline-flex; align-items: center; gap: .45rem; }
.cmdk-nav-btn svg { display: block; flex: 0 0 auto; }
.cmdk-kbd {
  font-size: .68rem; font-weight: 700; letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  color: var(--vc-text-soft);
  background: var(--vc-surface-muted);
  border: 1px solid var(--vc-border);
  border-radius: 6px;
  padding: .04rem .4rem;
  white-space: nowrap;
  transition: color .12s;
}
.cmdk-nav-btn:hover .cmdk-kbd { color: var(--vc-primary-dark); }
@media (max-width: 760px) { .cmdk-kbd { display: none; } }

.cmdk-scrim {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(23, 35, 31, .38);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 18vh 1rem 1.5rem;
  animation: vc-fade .15s var(--vc-ease);
}
.cmdk-panel {
  width: 100%; max-width: 560px;
  background: var(--vc-surface);
  border: 1px solid var(--vc-border);
  border-radius: 16px;
  box-shadow: var(--vc-shadow-lift);
  overflow: hidden;
  animation: vc-cmdk-in .16s ease-out;
}
@keyframes vc-cmdk-in { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }

.cmdk-input-wrap { position: relative; }
.cmdk-search-icon {
  position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%);
  color: var(--vc-text-soft); pointer-events: none;
}
input.cmdk-input {
  width: 100%;
  border: none; border-radius: 0;
  min-height: 3.3rem;
  padding: .85rem 1.1rem .85rem 2.75rem;
  font-size: 1rem;
  background: #fff;
}
input.cmdk-input:focus { outline: none; box-shadow: none; border: none; }

.cmdk-list {
  max-height: 352px; overflow-y: auto;
  border-top: 1px solid var(--vc-border);
  padding: .4rem;
}
.cmdk-group-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--vc-text-soft);
  padding: .5rem .65rem .25rem;
}
.cmdk-item {
  display: flex; align-items: center; gap: .55rem;
  padding: .52rem .65rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600; font-size: .95rem;
  color: var(--vc-text);
}
/* single JS-driven highlight (keyboard + mousemove share it) — no :hover rule,
   so the keyboard cursor and the pointer never show two highlights at once */
.cmdk-item.cmdk-active { background: var(--vc-primary-soft); color: var(--vc-primary-dark); }
.cmdk-item-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item-code { font-size: .8rem; font-weight: 600; color: var(--vc-text-soft); white-space: nowrap; }
.cmdk-item-hint, .cmdk-item .pill { margin-left: auto; flex: 0 0 auto; }
.cmdk-item-hint { font-size: .78rem; font-weight: 600; color: var(--vc-text-soft); white-space: nowrap; }
.cmdk-note { padding: .55rem .65rem .7rem; color: var(--vc-text-soft); font-size: .9rem; }
.cmdk-foot {
  display: flex; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--vc-border);
  background: var(--vc-surface-muted);
  padding: .45rem .9rem;
  font-size: .76rem; font-weight: 600; color: var(--vc-text-soft);
}

/* ---- combobox (volunteer quick-pick on Hours) ---------------------------- */
.combo { position: relative; }
.combo .combo-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
  background: #fff; border: 1.5px solid var(--vc-border);
  border-radius: var(--vc-radius-sm); box-shadow: var(--vc-shadow-lift);
  max-height: 280px; overflow-y: auto; margin: .2rem 0 0; padding: .25rem; list-style: none;
}
.combo .combo-list li { padding: .5rem .6rem; border-radius: 7px; cursor: pointer; }
.combo .combo-list li .sub { font-size: .8rem; color: var(--vc-text-soft); }
.combo .combo-list li:hover, .combo .combo-list li[aria-selected="true"] { background: var(--vc-primary-soft); }

/* ---- toasts + saved flash ------------------------------------------------ */
#vc-toasts { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  background: var(--vc-text); color: #fff;
  border-radius: var(--vc-radius-sm); padding: .6rem 1.1rem;
  box-shadow: var(--vc-shadow-lift); font-weight: 600;
  animation: vc-toast-in .15s ease-out;
}
.toast.error { background: var(--vc-danger); }
@keyframes vc-toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
/* soft exits: toasts drift out instead of vanishing; overlays (slide-over,
   confirm, command palette) fade out. ui.js adds the class, waits ~170ms,
   then removes the node — and skips straight to removal under reduced motion. */
@keyframes vc-fade-out { to { opacity: 0; } }
@keyframes vc-toast-out { to { opacity: 0; transform: translateY(6px); } }
.toast.vc-toast-out { animation: vc-toast-out .16s var(--vc-ease) forwards; }
.vc-leaving { animation: vc-fade-out .15s var(--vc-ease) forwards; pointer-events: none; }

.saved-flash { color: var(--vc-ok); font-weight: 700; opacity: 0; transition: opacity .25s; }
.saved-flash.show { opacity: 1; }

/* ---- login + landing pages ------------------------------------------------ */
/* Layered ambient canvas: soft teal / navy / rust glows over a warm cream
   vertical wash, plus a barely-there navy dot texture (the ::before layer). */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 1.5rem;
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(15, 118, 110, .10), transparent 34%),
    radial-gradient(circle at 84% 14%, rgba(16, 42, 67, .07), transparent 32%),
    radial-gradient(circle at 22% 86%, rgba(194, 74, 46, .055), transparent 30%),
    linear-gradient(180deg, #fbf8f2 0%, #f6f1e8 100%);
}
.login-wrap::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(16, 42, 67, .035) 1px, transparent 1px);
  background-size: 22px 22px;
}
/* faint leaf-line motifs — corner ornamentation only (decorative; aria-hidden).
   Inline stroke opacities are .10–.16; ×.3 here ≈ 3–5% effective. */
.login-motif {
  position: absolute; pointer-events: none; z-index: 0;
  width: 380px; height: 380px;
  right: -110px; top: -110px;
  opacity: .3;
}
.login-motif.motif-b {
  width: 340px; height: 340px;
  left: -120px; right: auto; top: auto; bottom: -120px;
  transform: rotate(160deg);
}
@media (max-width: 760px) { .login-motif { display: none; } }
/* frosted card floating on the ambient canvas */
.login-card {
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  position: relative; z-index: 1;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--vc-border);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(23, 35, 31, .10), 0 2px 8px rgba(23, 35, 31, .05);
  overflow: hidden;
  padding: 2.1rem 2rem 1.7rem;
}
.login-card .wordmark { display: block; text-align: center; font-size: 28px; margin-bottom: .25rem; }
.login-card .tagline { text-align: center; color: var(--vc-text-soft); font-size: .92rem; margin: 0 0 1.5rem; }
.login-card .btn { width: 100%; }
.login-wrap .vc-footer { position: relative; z-index: 1; padding-bottom: 0; }

/* ---- MortonApps product-family badge pill --------------------------------- */
.ma-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid var(--vc-border);
  color: var(--vc-text-soft);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(23, 35, 31, .05);
  transition: color .12s, border-color .12s, background-color .12s;
}
.ma-badge:hover { color: var(--vc-primary-dark); border-color: #D5CEC0; background: rgba(255, 255, 255, .85); }
.ma-badge .ma-dot { display: inline-flex; flex: 0 0 auto; }
.form-error { background: var(--vc-danger-soft); color: var(--vc-danger); border-radius: var(--vc-radius-sm); padding: .55rem .8rem; margin-bottom: .9rem; font-weight: 600; display: none; }
.form-error.show { display: block; }

/* utility */
.muted { color: var(--vc-text-soft); }
.right { text-align: right; }

/* ---- bug report modal (bugs.js) ---------------------------------------- */
.bug-phi-notice { margin-bottom: 1rem; }
.bug-ss-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
}
.bug-my-row {
  padding: .55rem 0;
  border-bottom: 1px solid var(--vc-border);
}
.bug-my-row:last-child { border-bottom: none; }
.bug-my-summary {
  font-size: .92rem; font-weight: 600; color: var(--vc-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
  margin-bottom: .25rem;
}
.bug-my-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
}
.bug-my-date {
  font-size: .8rem; color: var(--vc-text-soft); margin-left: auto;
  white-space: nowrap;
}
/* the "Report a Bug" menu item's inline bug icon */
.bug-menu-icon { vertical-align: -.1em; margin-right: .3em; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: 1rem; }

/* ---- CSV import button group -------------------------------------------- */
.import-group { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
/* It's a <label> (wraps the hidden file input), so it inherits the form-label
   margin-bottom — which nudged it ~5px above its sibling buttons in the
   page-header row (Greg spotted it, 2026-06-12). Zero it; it's a button here. */
.import-label { cursor: pointer; margin-bottom: 0; }
.import-label:hover { filter: brightness(.97); }

/* ---- Import results modal body ------------------------------------------- */
.import-result { padding-top: .25rem; }
.import-created {
  font-size: 1.1rem; font-weight: 600; color: var(--vc-ok);
  margin: 0 0 .75rem;
}
.import-errors { margin-top: .75rem; }
.import-errors-hd {
  font-weight: 600; font-size: .92rem; color: var(--vc-danger);
  margin: 0 0 .4rem;
}
.import-errors-list {
  margin: 0; padding: 0 0 0 1.2rem;
  max-height: 320px; overflow-y: auto;
  font-size: .9rem; color: var(--vc-text);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  padding: .6rem .75rem;
  background: var(--vc-bg);
  list-style: disc;
}
.import-errors-list li { margin-bottom: .3rem; line-height: 1.4; }
.import-errors-list li:last-child { margin-bottom: 0; }

/* ---- Settings view ----------------------------------------------------------
   Premium "control center" layout: sticky left section nav (scroll-spy) +
   one scrolling column of panels. SAFETY: every panel is ALWAYS in the DOM —
   the nav scroll-jumps, it never mounts/unmounts (save handlers read live
   inputs; a 0-element DOM read silently wipes tenant config). */
.settings-layout {
  display: grid; grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.8rem; align-items: start;
  max-width: 1180px;
}
.settings-panels { min-width: 0; max-width: 900px; }
.settings-sec { scroll-margin-top: calc(var(--vc-nav-h) + 18px); }
.settings-sec .card { margin-bottom: 1rem; }   /* tighter rhythm in the column */

/* sticky section nav (left) — teal active state matches the app nav pills */
.settings-nav { position: sticky; top: calc(var(--vc-nav-h) + 24px); }
.settings-nav-inner { display: flex; flex-direction: column; gap: 2px; }
.settings-nav-link {
  font: inherit; font-size: .92rem; font-weight: 600;
  color: var(--vc-text-soft);
  background: none; border: none; border-radius: 10px;
  text-align: left;
  padding: .48rem .85rem;
  cursor: pointer; white-space: nowrap;
  transition: color .12s, background-color .12s;
}
.settings-nav-link:hover { color: var(--vc-primary-dark); background: rgba(23, 35, 31, .05); }
.settings-nav-link.active { color: #075F58; background: #DCEFEB; font-weight: 700; }

/* ≤900px: the nav collapses to a sticky horizontal chip strip */
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .settings-panels { min-width: 0; }
  .settings-nav {
    top: var(--vc-nav-h); z-index: 30; min-width: 0;
    margin: 0 -16px;
    padding: .45rem 16px;
    background: rgba(248, 245, 238, .94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--vc-border);
  }
  .settings-nav-inner {
    flex-direction: row; gap: .35rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .settings-nav-inner::-webkit-scrollbar { display: none; }
  .settings-nav-link { border-radius: 99px; padding: .3rem .85rem; font-size: .86rem; flex: 0 0 auto; }
}

/* panel header: 36px teal icon badge + title + one-line explanation */
.settings-card-hd { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1.1rem; }
.settings-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 10px;
  background: #DCEFEB; color: var(--vc-primary);
}
.settings-card-icon svg { display: block; }
.settings-card-hd h2 { margin: 0; font-size: 1.12rem; line-height: 1.3; }
.settings-card-sub { margin: .12rem 0 0; font-size: .86rem; color: var(--vc-text-soft); line-height: 1.4; }
.settings-subhead {
  font-family: var(--vc-display);
  font-size: .95rem; font-weight: 700; letter-spacing: -.01em;
  margin: 0 0 .7rem;
}

/* panel footer: status text left, Save right — full-bleed bar on a warm bg
   (negative margins match the .card padding 1.3rem 1.45rem) */
.settings-card-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 1.25rem -1.45rem -1.3rem;
  padding: .75rem 1.45rem;
  background: #FAF7F0;
  border-top: 1px solid var(--vc-border);
  border-radius: 0 0 calc(var(--vc-radius) - 1px) calc(var(--vc-radius) - 1px);
}
.settings-ft-status { font-size: .85rem; color: var(--vc-text-soft); min-height: 1.2rem; transition: color .15s; }
.settings-ft-status.is-dirty { color: #6B4E13; font-weight: 600; }
.settings-ft-status.is-saved { color: var(--vc-primary-dark); font-weight: 700; }

/* lighter sub-card (the Test email block under the Email panel) */
.settings-card--sub {
  box-shadow: 0 1px 2px rgba(28, 39, 35, .05);
  padding: 1.05rem 1.45rem 1.15rem;
}

/* soft teal info panel (Volunteer IDs "never renumbered" note) */
.settings-info {
  display: flex; gap: .6rem; align-items: flex-start;
  background: var(--vc-primary-soft);
  border: 1px solid #C9E0DB;
  border-radius: 12px;
  padding: .65rem .9rem;
  color: var(--vc-primary-dark);
  font-size: .88rem; line-height: 1.5;
  margin: .25rem 0 0;
}
.settings-info svg { flex: 0 0 auto; margin-top: .15rem; }

/* radio rows (Volunteer ID assignment mode) */
.radio-group { display: grid; gap: .45rem; margin-top: .15rem; }
.radio-row {
  display: flex; align-items: flex-start; gap: .55rem;
  font-weight: 400; margin: 0; cursor: pointer;
}
.radio-row input[type="radio"] { width: 1.15rem; height: 1.15rem; margin-top: .15rem; flex: 0 0 auto; accent-color: var(--vc-primary); }
.radio-row strong { font-weight: 600; }

/* ---- toggle switch (reusable) ------------------------------------------------
   A real <input type="checkbox" role="switch"> fills the control (keyboard +
   AT intact); the track/thumb are purely visual. Teal when on. */
.toggle-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem;
  padding: .8rem 0;
  border-top: 1px solid var(--vc-border);
}
.toggle-row + .toggle-row { padding-bottom: 0; }
.toggle-text { min-width: 0; }
.toggle-label { font-weight: 600; margin: 0; cursor: pointer; }
.toggle-text .hint { margin-top: .15rem; }
.toggle { position: relative; display: inline-flex; width: 46px; height: 26px; flex: 0 0 auto; margin-top: .1rem; }
.toggle input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; z-index: 1;
}
.toggle-track {
  width: 100%; height: 100%;
  border-radius: 99px;
  background: #D8D2C6;                 /* warm neutral off-state */
  transition: background-color .15s var(--vc-ease);
  position: relative;
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(28, 39, 35, .25);
  transition: transform .15s var(--vc-ease);
}
.toggle input:checked + .toggle-track { background: var(--vc-primary); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-track {
  outline: 3px solid rgba(15, 118, 110, .35);
  outline-offset: 2px;
}

/* ---- Plan panel: status + trial progress bar */
.plan-status { margin-bottom: 1.1rem; }
.plan-status-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.plan-status-meta { font-size: .9rem; color: var(--vc-text-soft); }
.plan-bar { margin-top: .65rem; max-width: 420px; }
.plan-bar-track { height: 8px; border-radius: 99px; background: var(--vc-surface-muted); overflow: hidden; }
.plan-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--vc-primary), var(--vc-green)); min-width: 6px; }
.plan-bar-meta { font-size: .78rem; color: var(--vc-text-soft); margin-top: .3rem; font-variant-numeric: tabular-nums; }
.plan-action { margin-top: .9rem; }

/* Small "Recommended" / "Your plan" tag inside an emphasized Subscribe button. */
.plan-tag {
  display: inline-block;
  margin-left: .45rem;
  padding: .05rem .4rem;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  border-radius: 99px;
  background: rgba(255, 255, 255, .22);
  vertical-align: middle;
}

/* ---- Agency panel: fields left, live report-header preview right */
.agency-split {
  display: grid; grid-template-columns: minmax(0, 1fr) 290px;
  gap: 1.5rem; align-items: start;
  margin-bottom: .35rem;
}
@media (max-width: 760px) { .agency-split { grid-template-columns: 1fr; } }
.report-preview {
  border: 1px solid var(--vc-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--vc-shadow);
  padding: .95rem 1.1rem 1.05rem;
}
.report-preview-tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--vc-text-soft);
  margin-bottom: .6rem;
}
.report-preview-logo img { display: block; max-height: 40px; max-width: 200px; width: auto; margin-bottom: .5rem; }
.report-preview-org { font-family: var(--vc-display); font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; }
.report-preview-title { font-size: .86rem; color: var(--vc-text); }
.report-preview-gen { font-size: .76rem; color: var(--vc-text-soft); margin-top: .15rem; }
.report-preview-nologo { font-size: .78rem; color: var(--vc-text-soft); font-style: italic; margin-top: .55rem; }

/* ---- Milestones: teal token chips with a quiet hover-delete */
.ms-chip-row { display: flex; flex-wrap: wrap; gap: .4rem; min-height: 2rem; align-items: center; }
.ms-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--vc-primary-soft);
  color: var(--vc-primary-dark);
  border-radius: 99px;
  padding: .18rem .35rem .18rem .75rem;
  font-size: .88rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ms-chip-rm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex: 0 0 auto;
  border: none; border-radius: 50%;
  background: transparent; color: var(--vc-primary-dark);
  font-size: .95rem; line-height: 1; padding: 0;
  opacity: .5; cursor: pointer;
  transition: opacity .12s, background-color .12s, color .12s;
}
.ms-chip:hover .ms-chip-rm { opacity: 1; }
.ms-chip-rm:hover, .ms-chip-rm:focus-visible { background: var(--vc-danger-soft); color: var(--vc-danger); opacity: 1; }
.ms-add-row { display: flex; align-items: center; gap: .5rem; margin-top: .55rem; flex-wrap: wrap; }
.ms-add-row input[type="number"] { width: 120px; }
.ms-add-row .btn-link { margin-left: .25rem; }

/* ---- Email panel: live sender preview */
.sender-preview {
  border: 1.5px dashed var(--vc-border);
  border-radius: 12px;
  background: var(--vc-bg);
  padding: .6rem .9rem;
  margin: .3rem 0 .25rem;
  font-size: .88rem;
  overflow-wrap: anywhere;
}
.sender-line { display: flex; gap: .6rem; align-items: baseline; padding: .12rem 0; }
.sender-line[hidden] { display: none; }
.sender-line .sk {
  flex: 0 0 4.2rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--vc-text-soft);
}

/* ---- Data ownership copy */
.settings-data-copy { margin: 0 0 1rem; font-size: .95rem; color: var(--vc-text); max-width: 56ch; line-height: 1.55; }

/* shared settings form bits (pre-redesign contracts kept) */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.settings-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .settings-grid { grid-template-columns: 1fr; } }
.check-row { display: flex; align-items: flex-start; gap: .6rem; }
.check-row input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--vc-primary); }
.check-row label { font-weight: 600; margin: 0; }
.check-row .hint { margin-top: .1rem; }
.email-test-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-top: .25rem; }
.email-test-row .grow { flex: 1; min-width: 220px; }
.test-result { font-weight: 600; font-size: .92rem; margin-top: .6rem; display: none; border-radius: var(--vc-radius-sm); padding: .55rem .8rem; }
.test-result.show { display: block; }
.test-result.ok { background: var(--vc-primary-soft); color: var(--vc-primary-dark); }
.test-result.err { background: var(--vc-danger-soft); color: var(--vc-danger); }

/* ---- Dashboard ------------------------------------------------------------ */
.dash-cols {
  display: grid; grid-template-columns: 3fr 2fr;
  gap: 1.2rem; align-items: start;
}
@media (max-width: 900px) { .dash-cols { grid-template-columns: 1fr; } }
.dash-cols .card { margin-bottom: 1.2rem; }
.dash-cols .card:last-child { margin-bottom: 0; }

.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: .9rem;
  padding: .62rem 0;
  border-bottom: 1px solid var(--vc-border);
}
.activity-list li:last-child { border-bottom: none; }
.activity-list .act-main { min-width: 0; }
.activity-list .act-name { font-weight: 600; }
.activity-list .act-date { color: var(--vc-text-soft); font-size: .88rem; white-space: nowrap; }

.bar-row { margin-bottom: .85rem; }
.bar-row:last-child { margin-bottom: .15rem; }
.bar-meta { display: flex; justify-content: space-between; gap: .75rem; font-size: .92rem; }
.bar-meta .bar-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-meta .bar-hrs { color: var(--vc-text-soft); white-space: nowrap; }
.bar-track { height: 8px; border-radius: 99px; background: var(--vc-surface-muted); margin-top: .32rem; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--vc-primary), var(--vc-green)); min-width: 6px; }

.quick-actions { display: grid; gap: .55rem; }
.qa-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .62rem .85rem;
  border: 1.5px solid var(--vc-border);
  border-radius: 12px;
  text-decoration: none; color: var(--vc-text); font-weight: 600;
  transition: border-color .12s, background-color .12s;
}
.qa-link:hover { border-color: var(--vc-primary); background: var(--vc-primary-soft); color: var(--vc-primary-dark); }
.qa-link .qa-icon { color: var(--vc-primary); display: inline-flex; flex: 0 0 auto; }
.qa-link .qa-sub { display: block; font-weight: 400; font-size: .8rem; color: var(--vc-text-soft); }

/* friendly first-steps card for brand-new tenants */
.first-steps ol { margin: .25rem 0 0; padding-left: 1.3rem; }
.first-steps li { margin-bottom: .45rem; }

/* ---- Hours view -------------------------------------------------------------
   Mirrors the dashboard's rhythm discipline: ONE grid (.hours-stack) whose
   gap is the only source of vertical space — every panel/card margin inside
   is zeroed. .hours-band is the entry|context 2-column row (~2fr/1fr),
   stacking to one column ≤1100px. */
.hours-stack { display: grid; grid-template-columns: 100%; gap: 1.35rem; }
.hours-stack .panel, .hours-stack .card { margin: 0; }
.hours-band {
  display: grid; grid-template-columns: 2fr 1fr;
  gap: 1.35rem; align-items: start; min-width: 0;
}
@media (max-width: 1100px) { .hours-band { grid-template-columns: 1fr; } }

/* compact stats strip — one quiet borderless line, NOT the big KPI cards
   (the Dashboard keeps those; Hours prioritizes entry speed) */
.hours-statline {
  font-size: .9rem; color: var(--vc-text-soft);
  padding: 0 .15rem;
  min-height: 1.35rem;            /* reserve the line so load doesn't shift */
}
.hours-statline strong { color: var(--vc-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hours-statline .statline-sep { margin: 0 .35rem; color: var(--vc-border); }

/* entry-panel head: title/desc left, prefill link right */
.panel-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.panel-title { margin: 0; font-size: 1.22rem; }
.panel-sub { margin: .15rem 0 0; color: var(--vc-text-soft); font-size: .92rem; }

/* quiet privacy note — softer + smaller than .notice-soft; sits directly
   under the entry panel's description */
.note-quiet {
  background: #FBF3DF;
  border: 1px solid #EAD7A7;
  color: #6E5420;
  border-radius: 12px;
  font-size: 13px; line-height: 1.45;
  padding: .45rem .8rem;
  margin: .8rem 0 1rem;
}

/* prefill notice — small inline chip near the prefill link, not a banner */
.prefill-chip {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--vc-surface-muted);
  border: 1px solid var(--vc-border);
  border-radius: 99px;
  padding: .2rem .85rem;
  font-size: .84rem; color: var(--vc-text-soft);
  max-width: 100%;
}
.prefill-chip strong { color: var(--vc-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prefill-chip .btn-link { font-size: .82rem; }

/* selected-volunteer context panel (right column) */
.hours-ctx .ctx-name { font-weight: 700; font-family: var(--vc-display); font-size: 1.02rem; margin-bottom: .5rem; }
.ctx-entries { list-style: none; margin: 0 0 .75rem; padding: 0; }
.ctx-entries li {
  font-size: .88rem; padding: .32rem 0;
  border-bottom: 1px solid var(--vc-border);
  color: var(--vc-text);
}
.ctx-entries li:last-child { border-bottom: none; }
.ctx-entries .muted { font-size: inherit; }
.ctx-fact { font-size: .88rem; margin-bottom: .45rem; }
.ctx-links { margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--vc-border); font-size: .9rem; }
.ctx-placeholder { color: var(--vc-text-soft); font-size: .9rem; padding: .25rem 0 .35rem; }

/* ---- Reports view --------------------------------------------------------- */

/* Launcher tiles grid */
.reports-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-top: .25rem;
}
.rpt-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .35rem;
  background: var(--vc-card-grad);
  border: 1.5px solid var(--vc-border);
  border-radius: var(--vc-radius);
  box-shadow: var(--vc-shadow);
  padding: 1.4rem 1.5rem 1.35rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rpt-card:hover, .rpt-card:focus {
  border-color: var(--vc-primary);
  box-shadow: var(--vc-shadow-lift);
  transform: translateY(-2px);
  outline: none;
}
.rpt-icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--vc-primary-soft);
  color: var(--vc-primary);
  margin-bottom: .3rem;
}
.rpt-icon svg { display: block; }
.rpt-card-title {
  font-family: var(--vc-display);
  font-weight: 700; font-size: 1.08rem;
  color: var(--vc-primary-dark);
}
.rpt-card-desc  { font-size: .92rem; color: var(--vc-text); line-height: 1.45; }
.rpt-card-best  { font-size: .84rem; color: var(--vc-text-soft); margin-top: .1rem; }
.rpt-card-best strong { color: var(--vc-accent); font-weight: 700; }   /* text-safe rust */
.rpt-card .rpt-generate { margin-top: .9rem; }

/* Back bar */
.rpt-back {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: .9rem;
}
.rpt-back-label { font-weight: 600; color: var(--vc-text-soft); font-size: .92rem; }

/* Preset chips */
.rpt-presets { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .25rem; }
.rpt-preset.active {
  background: var(--vc-primary); color: #fff;
  border-color: var(--vc-primary);
}

/* Area block: allow page break between areas in print, not inside a row */
.rpt-area-block { break-inside: avoid-page; }
.rpt-area-name  { margin-bottom: .75rem; color: var(--vc-primary-dark); }

/* Subtotal + grand total rows */
.rpt-subtotal td { background: var(--vc-surface-muted); font-style: italic; }
.rpt-grand-total  { border-top: 2px solid var(--vc-primary); }
.rpt-grand-row td { font-size: 1.03rem; }

/* Stat tiles (individual volunteer report) */
.rpt-tiles {
  display: flex; flex-wrap: wrap; gap: .9rem;
  margin-bottom: 1.4rem;
}
.rpt-tile {
  background: var(--vc-card-grad);
  border: 1.5px solid var(--vc-border);
  border-radius: 16px;
  box-shadow: var(--vc-shadow);
  padding: .9rem 1.4rem;
  min-width: 120px; text-align: center;
}
.rpt-tile-val   { font-family: var(--vc-display); font-size: 1.7rem; font-weight: 800; color: var(--vc-primary-dark); }
.rpt-tile-label { font-size: .82rem; color: var(--vc-text-soft); margin-top: .2rem; }

/* Profile table (individual) */
.rpt-profile th {
  font-weight: 600; font-size: .88rem; color: var(--vc-text-soft);
  text-align: right; padding-right: 1rem; white-space: nowrap;
  width: 11rem; text-transform: none; letter-spacing: 0;
  background: none; border-radius: 0 !important;
}
.rpt-profile td { text-align: left; }

/* Action buttons below the report */
.rpt-actions {
  display: flex; gap: .75rem; margin: .75rem 0 1.5rem;
}

/* ---- Per-agency logo (Feature: branding) ---------------------------------- */
/* Nav: the logo takes the wordmark position; the two-tone wordmark stays
   beside it, smaller — product identity without competing with the agency.
   gap removed so the flex gap never splits the wordmark; logo gets
   margin-right instead, so the gap never splits the wordmark. */
.vc-nav .wordmark { display: inline-flex; align-items: center; }
.nav-logo { display: block; max-height: 34px; max-width: 160px; width: auto; border-radius: 6px; margin-right: .55rem; }
.nav-logo[hidden] { display: none; }
/* A custom logo no longer shrinks/dims the wordmark — the "Volunteer Ledger" text
   stays full size next to the logo, same as with the default logo (Greg 2026-06-18). */
.vc-nav .wordmark.has-logo { /* intentionally no font-size/opacity override */ }

/* Settings → Agency logo uploader */
.logo-row { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.logo-preview {
  display: flex; align-items: center; gap: .6rem;
  min-width: 140px; min-height: 56px;
  border: 1.5px dashed var(--vc-border);
  border-radius: var(--vc-radius-sm);
  padding: .45rem .75rem;
  background: #fff;
}
.logo-preview img { display: block; max-height: 48px; max-width: 220px; width: auto; }
.logo-pending {
  font-size: .76rem; font-weight: 700; letter-spacing: .03em;
  color: #6B4E13; background: #FCF4E2; border: 1px solid #EBDCB4;
  border-radius: 99px; padding: .1rem .55rem; white-space: nowrap;
}
.logo-actions { display: flex; gap: .5rem; align-items: center; }

/* Printed report header logo (audit-binder hardcopy) */
.rpt-print-logo { display: block; max-height: 60px; max-width: 240px; width: auto; margin-bottom: .45rem; }

/* ---- Volunteer profile page ------------------------------------------------ */
.vol-link { color: var(--vc-text); font-weight: 600; text-decoration: none; }
.vol-link:hover { color: var(--vc-primary-dark); text-decoration: underline; text-underline-offset: 3px; }

.profile-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.profile-row {
  display: grid; grid-template-columns: 11rem 1fr; gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--vc-border);
  align-items: baseline;
}
.profile-row:last-child { border-bottom: none; }
.profile-label { font-size: .88rem; font-weight: 600; color: var(--vc-text-soft); }
.profile-val { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .profile-row { grid-template-columns: 1fr; gap: .1rem; } }

/* ---- Hour-entry audit trail annotations ------------------------------------ */
/* tiny muted "edited" tag in the Hours recent-entries table */
.audit-tag {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--vc-text-soft);
  background: var(--vc-surface-muted);
  border-radius: 99px; padding: .08rem .5rem;
  vertical-align: middle; white-space: nowrap;
}

/* timeline sub-line: "edited by … · Jun 10" (click expands before→after) */
.audit-note-row td { padding-top: 0 !important; border-bottom: 1px solid var(--vc-border); }
.audit-note {
  font: inherit; font-size: .82rem; font-weight: 600;
  color: var(--vc-text-soft);
  background: none; border: none; padding: .05rem 0 .35rem; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px;
}
.audit-note:hover { color: var(--vc-primary-dark); }
.audit-detail {
  margin: .15rem 0 .6rem;
  border-left: 3px solid var(--vc-border);
  padding: .35rem 0 .35rem .85rem;
  font-size: .86rem;
}
.audit-events { list-style: none; margin: 0; padding: 0; }
.audit-events > li { margin-bottom: .4rem; }
.audit-events > li:last-child { margin-bottom: 0; }
.audit-ev-hd { font-weight: 600; color: var(--vc-text-soft); }
.audit-diffs { list-style: none; margin: .15rem 0 0; padding: 0 0 0 .9rem; }
.audit-diffs li { margin-bottom: .1rem; }
.audit-diffs s { color: var(--vc-text-soft); }

/* ---- Import review screen (two-step CSV import) ----------------------------- */
.import-summary { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.imp-chip {
  display: inline-flex; align-items: center;
  font-size: .88rem; font-weight: 700;
  border-radius: 99px; padding: .25rem .85rem;
}
.imp-chip.imp-create { background: #D7EAE6; color: var(--vc-primary-dark); }
.imp-chip.imp-update { background: #DCE7F5; color: #1E3A5F; }
.imp-chip.imp-skip { background: #ECE7DB; color: #5C5648; }
/* compact action tag inside the preview table */
.import-preview .imp-chip { font-size: .72rem; padding: .1rem .5rem; }
.import-review-hd { font-weight: 600; font-size: .92rem; margin: 0 0 .4rem; }
.import-preview-wrap {
  max-height: 300px; overflow-y: auto;
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  margin-bottom: .9rem;
}
.import-preview th { position: sticky; top: 0; }
.import-preview td, .import-preview th { padding: .45rem .6rem; font-size: .88rem; }

/* ---- import "source of truth" reconcile (volunteers, manual mode) ----------- */
.imp-chip.imp-deact { background: #F3E6C8; color: #7A5B12; }
.imp-chip.imp-del   { background: #F6D9D2; color: #8A2C16; }
.imp-srctruth { margin: 1rem 0 .2rem; padding-top: .9rem; border-top: 1px solid var(--vc-border); }
.imp-srctruth .field-label { margin-bottom: .5rem; }
.imp-removal { margin-top: .75rem; }
.imp-removal-box {
  border: 1px solid #E7C9A8; background: #FBF3E8;
  border-radius: var(--vc-radius-sm); padding: .8rem .9rem;
}
.imp-removal-hd { font-weight: 700; color: #7A4B12; margin: 0 0 .5rem; }
.imp-removal-box .import-summary { margin-bottom: .4rem; }
.imp-removal-note { font-size: .82rem; color: #6B5A3C; margin: .15rem 0 .5rem; line-height: 1.4; }
.imp-removal-list { list-style: none; margin: .3rem 0 0; padding: 0; max-height: 190px; overflow-y: auto; font-size: .86rem; }
.imp-removal-list li { padding: .2rem 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.imp-rm-act { font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .02em; }
.imp-rm-delete { color: #8A2C16; }
.imp-rm-deactivate { color: #7A5B12; }
.imp-removal-none { color: var(--vc-text-soft); font-size: .88rem; margin: .5rem 0 0; }
.imp-gate-row {
  display: flex; align-items: center; gap: .5rem;
  margin: .75rem 0 0; font-weight: 600; color: var(--vc-text); cursor: pointer;
}
.imp-gate-row input { width: auto; margin: 0; flex: none; }

/* ---- large-file chunked import (client-side splitting) ----------------------
   The pre-flight "what won't upload" report + the apply progress bar. Matches
   the calm import-review look; the unmatched-codes call-out reuses the warning
   palette from .imp-removal-box (sand border, warm fill, amber heading). */
.import-chunked .imp-chunk-headline { font-size: 1rem; line-height: 1.5; margin: 0 0 1rem; }
.import-chunked .imp-chunk-headline strong { font-variant-numeric: tabular-nums; }

/* progress bar — track + animated fill */
.imp-progress { padding: .35rem 0 .25rem; }
.imp-progress-sub { color: var(--vc-text-soft); font-size: .9rem; margin: 0 0 .9rem; line-height: 1.5; }
.imp-progress-track {
  height: 12px; border-radius: 99px;
  background: var(--vc-surface-muted);
  border: 1px solid var(--vc-border);
  overflow: hidden;
}
.imp-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--vc-primary), var(--vc-primary-dark));
  border-radius: 99px;
  transition: width .25s var(--vc-ease, ease);
}
/* apply (real-write) pass — taller, fully-saturated bar so it reads as the
   committing step, distinct from the lighter validation pass. */
.imp-progress-track--apply { height: 14px; }
.imp-progress-track--apply .imp-progress-fill {
  background: linear-gradient(90deg, var(--vc-primary-dark), var(--vc-primary));
}
.imp-progress-status { color: var(--vc-text-soft); font-size: .86rem; margin: .65rem 0 0; font-variant-numeric: tabular-nums; }

/* unmatched volunteer codes — the headline pre-flight call-out (warning palette) */
.imp-unmatched-box {
  border: 1px solid #E7C9A8; background: #FBF3E8;
  border-radius: var(--vc-radius-sm); padding: .85rem .9rem; margin: 0 0 1rem;
}
.imp-unmatched-hd { font-weight: 700; color: #7A4B12; margin: 0 0 .5rem; line-height: 1.4; }
.imp-unmatched-codes {
  font-family: var(--vc-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: .85rem; color: #6B4310; line-height: 1.6;
  margin: 0; max-height: 9rem; overflow-y: auto; word-break: break-word;
}
.imp-unmatched-note { font-size: .82rem; color: #6B5A3C; margin: .55rem 0 0; line-height: 1.4; }

/* grouped error breakdown list */
.imp-chunk-errors { margin: 0 0 1rem; }
.imp-chunk-errors-hd { font-weight: 600; font-size: .92rem; margin: 0 0 .45rem; }
.imp-chunk-errors-list {
  list-style: none; margin: 0; padding: 0;
  max-height: 14rem; overflow-y: auto;
  border: 1px solid var(--vc-border); border-radius: var(--vc-radius-sm);
}
.imp-chunk-errors-list li {
  padding: .45rem .7rem; font-size: .88rem; line-height: 1.4;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.imp-chunk-errors-list li:last-child { border-bottom: 0; }
.imp-chunk-errors-list strong { font-variant-numeric: tabular-nums; }

.imp-chunk-actions-row { margin: 0 0 1rem; }

/* ---- role tiles (Users → Invite User modal) --------------------------------
   The role selector IS the explanation: each role is a stacked, selectable
   tile (hidden radio + styled label) carrying its own one-line description, so
   picking a role and learning what it grants are one act, not two stacked
   blocks. Light-theme only. */
.field-label {            /* non-<label> heading for the radio-group field */
  display: block;
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: .35rem;
}
.role-tiles {
  display: grid;
  gap: .5rem;
}
.role-tile {
  /* reset the global block <label> styling — tiles are flex rows */
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
  padding: .65rem .8rem;
  background: #fff;
  border: 1.5px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  transition: border-color .12s, background-color .12s, box-shadow .12s;
}
.role-tile:hover { border-color: var(--vc-primary); }
/* The real radio is visually hidden but stays focusable/keyboard-operable. */
.role-tile input[type="radio"] {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
/* Custom selection indicator — empty ring inactive, filled dot when checked. */
.role-tile-mark {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin-top: .12rem;
  border-radius: 50%;
  border: 2px solid var(--vc-border);
  background: #fff;
  transition: border-color .12s, box-shadow .12s, background-color .12s;
}
.role-tile-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.role-tile-name { font-weight: 600; color: var(--vc-text); line-height: 1.3; }
.role-tile-desc { font-size: .85rem; color: var(--vc-text-soft); line-height: 1.4; }
/* Active state: pale teal fill + teal border + filled indicator dot. */
.role-tile input[type="radio"]:checked ~ .role-tile-mark {
  border-color: var(--vc-primary);
  background: var(--vc-primary);
  box-shadow: inset 0 0 0 3px #fff;
}
.role-tile:has(input[type="radio"]:checked) {
  background: var(--vc-primary-soft);
  border-color: var(--vc-primary);
}
.role-tile:has(input[type="radio"]:checked) .role-tile-name { color: var(--vc-primary-dark); }
/* Keyboard focus ring on the tile (the hidden radio drives :focus-visible). */
.role-tile:has(input[type="radio"]:focus-visible) {
  outline: 3px solid rgba(15, 118, 110, .45);
  outline-offset: 2px;
  border-color: var(--vc-primary);
}

/* ---- volunteer portal -------------------------------------------------------
   The minimal "My Hours" experience for role==='volunteer'. app.js
   bootVolunteerPortal REMOVES the staff/admin chrome from the DOM; these
   rules are the defense-in-depth second layer (and style the trimmed
   header + the centered single-column page). */
.vc-portal .vc-nav a.nav-link,
.vc-portal .cmdk-nav-btn,
.vc-portal .nav-trial-pill,
.vc-portal .vc-trial-banner,
.vc-portal .vc-pastdue-banner,
.vc-portal #report-bug,
.vc-portal #about-vt { display: none !important; }
.vc-portal .vc-nav .wordmark { cursor: default; }
.vp-agency {
  font-weight: 600;
  color: var(--vc-text-soft);
  font-size: .92rem;
  margin-left: .4rem;
  padding-left: .9rem;
  border-left: 1px solid var(--vc-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 34ch;
}
@media (max-width: 760px) { .vp-agency { display: none; } }
.vp-wrap { max-width: 760px; margin: 0 auto; }
.vp-wrap .panel { margin-bottom: 1.2rem; }
.vp-wrap #vp-table { overflow-x: auto; }   /* history table scrolls, never clips, on narrow screens */
@media (max-width: 640px) {
  .vp-wrap .vc-table th, .vp-wrap .vc-table td { padding: .65rem .45rem; font-size: .9rem; }
}
.vp-noareas {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  background: var(--vc-surface-muted);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius-sm);
  padding: .65rem .85rem;
  font-size: .92rem;
  color: var(--vc-text-soft);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.vp-noareas[hidden] { display: none; }

/* Print-only header — hidden on screen */
.rpt-header.print-only { display: none; }
.rpt-print-org   { font-weight: 700; font-size: 1.1rem; }
.rpt-print-title { font-size: 1.4rem; font-weight: 700; margin: .2rem 0; }
.rpt-print-params{ font-size: .9rem; color: #444; }
.rpt-print-gen   { font-size: .8rem; color: #666; margin-top: .15rem; }

/* ---- @media print ---------------------------------------------------------
   Reports must stay black-on-white DOCUMENT-GRADE — do not soften print.
   The new shell chrome (nav pills, page-header actions, KPI strips, filter
   chips, notices, footers) must never leak into a printed report. */
@media print {
  /* Hide app chrome, config controls, action buttons, toasts */
  .vc-nav,
  .vc-trial-banner,
  .vc-pastdue-banner,
  .nav-trial-pill,
  .vc-footer,
  .app-foot,
  .page-head-actions,
  .kpi-strip,
  .hours-statline,
  .seg-control,
  .filter-row,
  .notice-soft,
  .note-quiet,
  .prefill-chip,
  #vc-toasts,
  #vc-modal-root,
  .confirm-scrim,
  .cmdk-scrim,
  .rpt-back,
  .rpt-presets,
  #rpt-custom-range,
  .rpt-actions,
  .login-motif,
  .row-menu,
  .row-menu-pop,
  .vc-dp-pop,
  .vc-tp-pop,
  .skeleton,
  .empty-state-cta,
  .settings-nav,
  .settings-card-ft,
  .vp-entry,
  .vp-noareas,
  .vp-agency,
  .role-tiles,
  .no-print        { display: none !important; }

  /* settings layout collapses to one printable column; previews stay plain */
  .settings-layout { display: block !important; max-width: 100% !important; }
  .settings-card-icon { display: none !important; }
  .report-preview, .sender-preview { box-shadow: none !important; border: 1px solid #ccc !important; }

  /* Show the print-only report header */
  .rpt-header.print-only { display: block; margin-bottom: 1.25rem; }

  /* Remove config card when printing */
  .card:has(#rpt-run), .card:has(#rpt-status), .card:has(#rpt-vol-sel) { display: none; }

  /* White page, black text */
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  body.vc-app { display: block; }
  .vc-main { max-width: 100% !important; padding: 0 !important; }

  /* Page header: keep the title as a document heading, drop the chrome */
  .page-head { margin-bottom: .75rem; }
  .page-head h1 { color: #000 !important; font-size: 16pt; }
  .page-desc { display: none !important; }

  /* Clean table borders for print */
  table.vc-table { border-collapse: collapse; width: 100%; }
  .vc-table th, .vc-table td {
    border: 1px solid #bbb !important;
    padding: .3rem .5rem !important;
    color: #000 !important;
    background: none !important;
    border-radius: 0 !important;
  }
  .vc-table th {
    background: #f0f0f0 !important;
    font-size: 9pt !important;
  }
  /* Repeat table header on each page */
  thead { display: table-header-group; }
  /* Never break inside a row; allow breaks between area groups */
  tr { break-inside: avoid; }
  .rpt-area-block { break-inside: avoid-page; margin-bottom: .75rem; }
  .rpt-grand-total { break-inside: avoid; }

  /* Subtotal row: light grey on print */
  .rpt-subtotal td { background: #f5f5f5 !important; }

  /* Stat tiles: inline on print */
  .rpt-tiles { display: flex; gap: .5rem; flex-wrap: wrap; }
  .rpt-tile  { border: 1px solid #bbb !important; box-shadow: none !important; padding: .4rem .7rem; background: #fff !important; }
  .rpt-tile-val   { font-size: 1.2rem; color: #000 !important; }
  .rpt-tile-label { font-size: 8pt; color: #444 !important; }

  /* Profile table */
  .rpt-profile th { color: #333 !important; }

  /* Cards + panels: no shadow, no radius, no gradient/rail on print */
  .card, .panel { box-shadow: none !important; border: 1px solid #ccc !important; border-radius: 0 !important;
          background: #fff !important;
          padding: .5rem .75rem !important; margin-bottom: .5rem !important; }
  .card-rail::before, .panel--feature::before { display: none !important; }

  /* Keep badge/pill text visible */
  .pill, .badge   { background: none !important; color: #000 !important; }
  .badge.inactive, .pill--neutral, .pill--muted { color: #555 !important; }

  /* No motion artifacts on print */
  #view > *,
  .vc-fade-in,
  .vc-settle,
  .vc-stagger > * { animation: none !important; }
  .vc-expand { transition: none !important; }
}

/* ---- reduced motion ---------------------------------------------------------
   All decorative animation/transition added in the polish pass respects the
   user's OS preference. */
@media (prefers-reduced-motion: reduce) {
  #view > *,
  .skeleton,
  .row-menu-pop,
  .vc-dp-pop,
  .vc-tp-pop,
  .modal-panel,
  .modal-scrim,
  .confirm-box,
  .confirm-scrim,
  .cmdk-panel,
  .cmdk-scrim,
  .vc-fade-in,
  .vc-settle,
  .vc-stagger > *,
  .vc-leaving,
  .toast.vc-toast-out,
  .toast { animation: none !important; }
  .vc-expand { transition: none !important; }
  .btn, .btn:hover, .btn:active,
  .card--utility, .card--utility:hover,
  .rpt-card, .rpt-card:hover { transition: none !important; transform: none !important; }
  /* settings redesign: toggle motion + dirty-status transitions off
     (scroll-jump smoothness is handled in JS via the same media query) */
  .toggle-track, .toggle-thumb,
  .settings-ft-status,
  .settings-nav-link,
  .ms-chip-rm { transition: none !important; }
}
