/*
 * FCC Family Hub — application stylesheet
 * ----------------------------------------------------------------------------
 * Brand refresh built on the Fauntleroy Children's Center identity:
 *   • azure  #0091C7  — the "circle of people" logo color (friendly, primary mark)
 *   • navy   #0A3D7C  — the wordmark color (trust, anchoring)
 * plus a warm sun accent and accessible semantic colors.
 *
 * Design system reference: docs/DESIGN_GUIDELINES.md
 * Fonts (Nunito / Nunito Sans) are loaded via <link> in layouts/application.html.erb.
 *
 * Conventions:
 *   - Everything is token-driven (see :root). Don't hard-code hex in views.
 *   - State is never color-alone: icons (via ::before) + labels accompany color.
 *   - Class names, IDs, data-targets, and the [hidden] rule below are part of
 *     the JS/test contract — restyle them, don't rename them.
 * ========================================================================== */

/* ===========================================================================
   1. DESIGN TOKENS
   =========================================================================== */
:root {
  /* Brand */
  --navy: #0B3D7B;
  --navy-strong: #082F60;
  --azure: #0095CA;
  --azure-ink: #0A6E9C;           /* AA on white — use for link/azure text */
  --sky-50: #EEF7FB;
  --sky-100: #DDEFF8;
  --sky-200: #C4E3F2;

  /* Warm accent */
  --sun: #F6A609;
  --sun-soft: #FFF3DC;
  --sun-ink: #8A5A00;

  /* Semantic */
  --success: #1E8E5A;
  --success-strong: #157A4A;      /* white text stays AA */
  --success-soft: #E4F5EC;
  --success-ink: #136441;
  --warning: #C77700;
  --warning-soft: #FFF1DA;
  --warning-ink: #8A5300;
  --danger: #CE3B2E;
  --danger-strong: #B5281D;
  --danger-soft: #FBEAE8;
  --danger-ink: #92271E;

  /* Neutrals */
  --ink: #16263D;
  --ink-muted: #51637B;
  --ink-subtle: #6E7E94;
  --surface: #FFFFFF;
  --surface-alt: #F7FAFD;
  --border: #D8E3EE;
  --border-strong: #BFD2E3;

  /* Type */
  --font-display: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: clamp(1.9rem, 1.4rem + 1.8vw, 2.5rem);

  /* Space (4px scale) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;

  /* Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* Shadow (navy-tinted, restrained) */
  --shadow-sm: 0 1px 2px rgba(11, 61, 123, 0.06), 0 1px 3px rgba(11, 61, 123, 0.08);
  --shadow: 0 4px 14px rgba(11, 61, 123, 0.10);
  --shadow-md: 0 10px 28px rgba(11, 61, 123, 0.12);
  --shadow-lg: 0 22px 48px rgba(8, 37, 76, 0.28);

  /* Focus ring */
  --ring: 0 0 0 3px rgba(0, 149, 202, 0.40);

  --content-width: 760px;
  --content-width-wide: 1200px;
}

/* ===========================================================================
   2. BASE / RESET
   =========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 480px at 50% -8%, var(--sky-100) 0%, rgba(221, 239, 248, 0) 60%),
    linear-gradient(180deg, #EFF5FA 0%, #FBFDFE 38%) no-repeat;
  background-color: #FBFDFE;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The HTML `hidden` attribute must beat explicit `display:flex/grid` on
 * components like .bulk-action-bar / modal steps. (Relied on by JS + tests.) */
[hidden] { display: none !important; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 var(--space-4);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 700; }

a {
  color: var(--azure-ink);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}
a:hover { color: var(--navy); text-decoration: underline; }

/* Universal, consistent focus indicator (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid var(--azure);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Components that draw their own ring suppress the default outline. */
.btn:focus-visible, .badge:focus-visible { outline-offset: 3px; }

img { max-width: 100%; }

/* Skip link (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 1000;
  background: var(--surface);
  color: var(--navy);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-4); text-decoration: none; }

/* Visually hidden, still available to screen readers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ===========================================================================
   3. LAYOUT — masthead, main, footer
   =========================================================================== */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: linear-gradient(115deg, var(--navy-strong) 0%, var(--navy) 45%, var(--azure) 130%);
  padding: var(--space-4) var(--space-6);
  color: #fff;
  box-shadow: var(--shadow);
}

.left-header { display: flex; align-items: center; gap: var(--space-4); }

.logo-img {
  height: 52px;
  width: 52px;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 5px;
  box-shadow: 0 4px 10px rgba(8, 37, 76, 0.25);
}

.daycare-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.right-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.right-header a,
.logout-link {
  color: #EAF4FB;
  font-weight: 700;
  font-size: var(--text-base);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.right-header a:hover,
.logout-link:hover {
  background-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
}
.right-header a[aria-current="page"] {
  background-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.main-content {
  max-width: var(--content-width);
  margin: var(--space-6) auto var(--space-8);
  padding: var(--space-7);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.main-content--wide { max-width: var(--content-width-wide); }

.site-footer {
  max-width: var(--content-width-wide);
  margin: 0 auto;
  padding: var(--space-5) var(--space-6) var(--space-8);
  color: var(--ink-muted);
  font-size: var(--text-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  align-items: center;
  justify-content: space-between;
}
.site-footer a { font-weight: 700; }
.site-footer__brand { font-weight: 800; color: var(--navy); font-family: var(--font-display); }

/* ===========================================================================
   4. FLASH / ALERTS  (role=status|alert; icon + color, never color alone)
   =========================================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-left-width: 5px;
  border-radius: var(--radius);
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--ink);
}
.alert::before {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.5;
  flex: none;
}
.alert--success { background: var(--success-soft); border-color: var(--success); color: var(--success-ink); }
.alert--success::before { content: "✓"; color: var(--success); }
.alert--danger  { background: var(--danger-soft);  border-color: var(--danger);  color: var(--danger-ink); }
.alert--danger::before  { content: "!"; color: var(--danger); }
.alert--warning { background: var(--warning-soft); border-color: var(--warning); color: var(--warning-ink); }
.alert--warning::before { content: "!"; color: var(--warning); }
.alert--info    { background: var(--sky-100);      border-color: var(--azure);   color: var(--navy); }
.alert--info::before    { content: "i"; color: var(--azure-ink); }

/* ===========================================================================
   5. BUTTONS
   Base `.btn` + modifiers, plus the legacy button classes (kept for JS/tests).
   =========================================================================== */
/* Primary buttons. Note: this intentionally does NOT blanket-style `form button`,
 * because button_to renders row actions (e.g. Archive) as a <button> inside a <form>
 * and they must keep their own small/secondary styling. In-form <button>s all carry
 * their own classes (.btn-primary, .add-family-toggle, token chips, etc.). */
.btn,
form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.1;
  padding: 0.7rem 1.5rem;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy) 0%, var(--azure) 135%);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease, filter 0.15s ease;
}
.btn:hover,
form input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  color: #fff;
  filter: saturate(1.05);
}
.btn:active { transform: translateY(0); }

.btn--secondary {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--border-strong);
  box-shadow: none;
}
.btn--secondary:hover { background: var(--sky-50); color: var(--navy); filter: none; }

.btn--ghost {
  background: transparent;
  color: var(--azure-ink);
  border-color: transparent;
  box-shadow: none;
}
.btn--ghost:hover { background: var(--sky-100); color: var(--navy); filter: none; }

.btn--success { background: var(--success-strong); }
.btn--danger  { background: var(--danger); color: #fff; }
.btn--block   { width: 100%; }

/* ===========================================================================
   6. FORMS
   Base form is layout-only (no card chrome); the page surface is the card.
   =========================================================================== */
form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 100%;
}
form > div { display: flex; flex-direction: column; gap: var(--space-2); }

label { font-weight: 700; color: var(--ink); font-size: var(--text-sm); }
form label { margin-bottom: var(--space-1); }

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
textarea,
select {
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--ink);
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--azure);
  box-shadow: var(--ring);
}
::placeholder { color: var(--ink-subtle); opacity: 1; }

input[disabled] {
  background-color: var(--sky-50);
  cursor: not-allowed;
  color: rgba(22, 38, 61, 0.6);
}

.small-help {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin: var(--space-1) 0 var(--space-2);
  line-height: 1.45;
  display: block;
}

/* Donation grid (new hours form) — two fields side by side, stack on mobile */
.donation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  align-items: start;
}
.donation-field { display: flex; flex-direction: column; gap: var(--space-2); transition: opacity 0.15s ease; }

/* Form-level error summary */
.form-errors {
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-left-width: 5px;
  border-radius: var(--radius);
  color: var(--danger-ink);
}
.form-errors ul { margin: var(--space-2) 0 0; padding-left: 1.25rem; }
.form-errors li { font-size: var(--text-sm); }

.inline-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  width: 100%;
}
.inline-label { margin: 0; }
.inline-input { width: 5rem; }

.decline-reason-field { display: flex; flex-direction: column; gap: var(--space-2); width: 100%; }
.decline-reason-label { font-size: var(--text-sm); color: var(--ink-muted); }
.decline-reason-input {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font-family: inherit;
  font-size: var(--text-sm);
  background: var(--surface);
}
.decline-reason-input:focus { outline: none; border-color: var(--azure); box-shadow: var(--ring); }

.hours-money-wrapper { display: flex; gap: var(--space-6); align-items: flex-start; flex-wrap: wrap; }

/* ===========================================================================
   7. BADGES (status)  — keeps text label intact; icon via ::before
   =========================================================================== */
.badge,
.status-text {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-text::before {
  font-weight: 800;
  line-height: 1;
}
/* Pending */
.badge--pending, .status-text--pending {
  background: var(--sky-100); color: var(--navy); border-color: var(--sky-200);
}
.status-text--pending::before { content: "•"; color: var(--azure); font-size: 1.2em; }
/* Verified / approved / success */
.badge--verified, .badge--success, .status-text--approved {
  background: var(--success-soft); color: var(--success-ink); border-color: rgba(30, 142, 90, 0.35);
}
.status-text--approved::before { content: "✓"; color: var(--success); }
/* Declined / rejected / danger */
.badge--declined, .badge--danger, .status-text--rejected {
  background: var(--danger-soft); color: var(--danger-ink); border-color: rgba(206, 59, 46, 0.35);
}
.status-text--rejected::before { content: "✕"; color: var(--danger); }
.badge--warning { background: var(--warning-soft); color: var(--warning-ink); border-color: rgba(199, 119, 0, 0.35); }

/* ===========================================================================
   8. CARDS, STAT CARDS, PROGRESS
   =========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin: var(--space-5) 0;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--azure);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-5);
  text-align: center;
}
.stat-card--needed { border-top-color: var(--sun); }
.stat-card--verified { border-top-color: var(--success); }
.stat-card--due { border-top-color: var(--navy); }
.stat-card__label {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--space-1);
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.05;
}
.stat-card__hint { font-size: var(--text-xs); color: var(--ink-muted); margin-top: var(--space-1); }

.progress-block { margin: var(--space-5) 0; }
.progress-block__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.progress-block__meta strong { font-family: var(--font-display); color: var(--navy); }
.progress {
  height: 16px;
  background: var(--sky-100);
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress__bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--azure) 0%, var(--navy) 100%);
  transition: width 0.4s ease;
  min-width: 0.5rem;
}
.progress__bar--complete { background: linear-gradient(90deg, var(--success) 0%, var(--success-strong) 100%); }
.progress__bar--early { background: linear-gradient(90deg, var(--sun) 0%, #E8890B 100%); }

/* Celebratory "you're done" banner */
.complete-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--success-soft);
  border: 1px solid var(--success);
  border-left-width: 5px;
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  color: var(--success-ink);
  font-weight: 700;
}
.complete-banner::before { content: "🎉"; font-size: 1.5rem; }

/* ===========================================================================
   9. TABLES  (unified navy header, soft zebra, accessible)
   =========================================================================== */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: var(--text-base);
  box-shadow: var(--shadow-sm);
}

th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 0.9rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  vertical-align: bottom;
}
td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background-color: var(--sky-50); }
tbody tr:hover { background-color: var(--sky-100); transition: background 0.15s ease; }

td a { color: var(--azure-ink); font-weight: 700; }
td a:hover { color: var(--navy); text-decoration: underline; }

.hours-table tbody tr { vertical-align: top; }
.hours-table__date { white-space: nowrap; color: var(--ink-muted); }
.hours-table__detail { word-break: break-word; }
.hours-table__hours { font-weight: 800; text-align: center; font-family: var(--font-display); color: var(--navy); }
.hours-table__status { text-align: left; }

.status-wrapper { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.status-reason {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  white-space: normal;
  font-weight: 500;
}

.contribution-hours-row {
  display: flex; flex-direction: row !important; align-items: center;
  gap: var(--space-2); white-space: nowrap; width: 100%; font-weight: 600;
}
.action-buttons-row { display: flex; flex-direction: row !important; gap: var(--space-2); align-items: center; }

/* The families "Hours DUE" column intentionally keeps stakeholder-required workflow
 * colors (red = not started, purple = commitment met). They are applied INLINE in
 * app/views/family_summaries/index.html.erb so they override row zebra/hover. This is a
 * deliberate exception to the "no color-only state" rule — staff scan by these colors. */

/* Compact tables (e.g. pending approvals) */
table.small-table, table.small-table td, table.small-table th { font-size: var(--text-sm); }
.small-table th:last-child, .small-table td:last-child { min-width: 260px; }

/* Inline approve/decline action buttons in the pending table */
.hours-table .action-buttons,
.small-table .action-buttons {
  min-height: 0;
  padding: 0.4rem 1rem;
  font-size: var(--text-sm);
  border-radius: var(--radius-pill);
  box-shadow: none;
}
/* Decline submit reads as a cautious action without being alarmist */
.action-buttons-row input[type="submit"][formaction] {
  background: var(--surface);
  color: var(--danger-ink);
  border: 1px solid var(--danger);
}
.action-buttons-row input[type="submit"][formaction]:hover {
  background: var(--danger-soft); color: var(--danger-ink); filter: none;
}

/* ===========================================================================
   10. FAMILIES DASHBOARD — metrics panel, toolbar, filters, bulk bar, inline edit
   =========================================================================== */

/* Page header row: title on the left, primary action (Add New Family) on the right. */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}
.page-head h1 { margin: 0; }

/* Reporting dashboard (metrics panel, from PR #48) — restyled to the design
 * system. Left-accent variants map to semantic tokens; mirrors .stat-card. */
.metrics-panel { margin-bottom: var(--space-5); }
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-4);
}
.metric-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--azure);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.metric-card--positive { border-left-color: var(--success); }
.metric-card--warning  { border-left-color: var(--sun); }
.metric-card--danger   { border-left-color: var(--danger); }
.metric-card__value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--navy);
}
.metric-card--positive .metric-card__value { color: var(--success-ink); }
.metric-card--warning  .metric-card__value { color: var(--sun-ink); }
.metric-card--danger   .metric-card__value { color: var(--danger-ink); }
.metric-card__label { font-size: var(--text-sm); font-weight: 700; color: var(--ink); }
.metric-card__sub { font-size: var(--text-xs); font-weight: 600; color: var(--ink-muted); }
.metrics-panel__note { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--ink-muted); }

.family-toolbar { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-4); }

.filters-bar {
  display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end;
  gap: var(--space-3) var(--space-4);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.filter-field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.filter-field label {
  font-size: var(--text-xs); font-weight: 800; color: var(--navy);
  letter-spacing: 0.05em; text-transform: uppercase; margin: 0;
}
.filter-field input[type="text"], .filter-field select { width: auto; }
.filter-field input[type="text"] { min-width: 16rem; }
.filter-field select { min-width: 12rem; }
.filter-field--check { flex-direction: row; align-items: center; gap: var(--space-2); padding-bottom: var(--space-2); }
.filter-field--check input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin: 0; cursor: pointer; accent-color: var(--azure); }
.filter-field--check label { text-transform: none; letter-spacing: normal; font-size: var(--text-base); font-weight: 600; color: var(--ink); cursor: pointer; }

.filters-bar__submit { margin: 0 !important; align-self: flex-end; }
.filters-bar__clear {
  align-self: flex-end;
  display: inline-flex; align-items: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  font-size: var(--text-sm); font-weight: 700;
  color: var(--azure-ink);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.filters-bar__clear:hover, .filters-bar__clear:focus { background: var(--sky-50); border-color: var(--azure); color: var(--navy); text-decoration: none; }
.filters-count { margin-left: auto; align-self: flex-end; font-size: var(--text-sm); font-weight: 700; color: var(--ink-muted); white-space: nowrap; }

.add-family-dropdown { position: relative; }
.add-family-toggle {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 0.6rem 1.25rem; min-height: 44px;
  font-family: var(--font-display); font-size: var(--text-base); font-weight: 700;
  color: var(--navy);
  background: var(--sky-100);
  border: 1px solid var(--sky-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.add-family-toggle:hover { background: var(--sky-200); border-color: var(--azure); }
.add-family-toggle-arrow { display: inline-block; transition: transform 0.2s ease; font-size: 0.8rem; }
.add-family-dropdown.open .add-family-toggle-arrow { transform: rotate(180deg); }
.add-family-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 50;
  width: min(360px, 92vw);
  opacity: 0;
  transform: translateY(-6px) scale(0.99);
  transform-origin: top right;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.add-family-dropdown.open .add-family-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
}
@media (max-width: 600px) {
  .add-family-panel { right: auto; left: 0; transform-origin: top left; }
}
.add-family-panel .add-family-form {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

.bulk-action-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(115deg, var(--navy-strong), var(--navy) 60%, var(--azure) 150%);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.bulk-action-bar__count { font-size: var(--text-base); font-weight: 600; color: #fff; }
.bulk-action-bar__count strong { font-size: var(--text-lg); margin-right: 0.15rem; font-family: var(--font-display); }
.bulk-action-bar__send {
  appearance: none; border: none; background: #fff; color: var(--navy);
  font-family: var(--font-display); font-weight: 800; font-size: var(--text-sm);
  padding: 0.55rem 1.2rem; min-height: 44px; border-radius: var(--radius-pill);
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.bulk-action-bar__send:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* Sticky controls */
.sticky-controls { position: sticky; top: 0; z-index: 10; background: var(--surface); padding-bottom: var(--space-2); }
.sticky-controls--stuck { box-shadow: 0 6px 16px rgba(11, 61, 123, 0.10); }

#family_summaries { margin-top: var(--space-2); }
#family_summaries table { border-collapse: separate; border-spacing: 0; overflow: clip; margin-top: 0; }
#family_summaries tbody tr:last-child td { border-bottom: none; }
#family_summaries thead th { position: sticky; top: var(--sticky-controls-height, 0px); z-index: 5; }
#family_summaries td:last-child { white-space: nowrap; }

.bulk-checkbox-cell { width: 1px; white-space: nowrap; padding-right: var(--space-2); }
.bulk-checkbox-cell input[type="checkbox"] { width: 1.15rem; height: 1.15rem; cursor: pointer; margin: 0; accent-color: var(--azure); }

/* Family name is a link to that family's page (kept as the inline-edit "display" target).
 * display:block so the whole name cell is a click target (names wrap to 2 lines). */
#family_summaries .family-link { display: block; color: var(--navy); font-weight: 700; text-decoration: none; }
#family_summaries .family-link:hover,
#family_summaries .family-link:focus-visible { color: var(--azure-ink); text-decoration: underline; }

.archived-row { opacity: 0.62; }
.archived-row td:first-child { font-style: italic; }

/* Row-level admin action buttons (Show / Archive / Edit / Delete / Save / Cancel) */
.row-actions { white-space: nowrap; }
.row-actions form.row-hidden-form { display: none; }
td form:has(.archive-button), td form.button_to { display: inline-block; padding: 0; border: none; box-shadow: none; gap: 0; margin: 0; }

.show-button, .archive-button, .edit-button, .delete-button, .save-button, .cancel-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 0;
  padding: 0.35rem 0.85rem;
  font-family: var(--font-display);
  font-size: var(--text-xs); font-weight: 700; line-height: 1.2;
  border-radius: var(--radius-pill);
  color: #fff; border: 1px solid transparent; cursor: pointer;
  margin-left: var(--space-2); margin-top: 0;
  text-decoration: none; white-space: nowrap;
  box-shadow: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.show-button:hover, .archive-button:hover, .edit-button:hover, .delete-button:hover, .save-button:hover, .cancel-button:hover {
  transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none; color: #fff;
}
.show-button { background: var(--navy); color: #fff !important; }
.show-button:hover { background: var(--navy-strong); color: #fff !important; }
.edit-button { background: var(--azure-ink); }
.edit-button:hover { background: var(--navy); }
.delete-button { background: var(--danger); }
.delete-button:hover { background: var(--danger-strong); }
.save-button { background: var(--success-strong); }
.cancel-button { background: var(--surface); color: var(--ink-muted); border-color: var(--border-strong); }
.cancel-button:hover { background: var(--surface-alt); color: var(--ink); }
/* Archive is a secondary (outline) action — lower emphasis than the solid Show/Edit/Delete. */
.archive-button { background: var(--surface); color: var(--ink-muted); border-color: var(--border-strong); }
.archive-button:hover { background: var(--surface-alt); color: var(--ink); border-color: var(--ink-subtle); }
.archive-button.unarchive { background: var(--surface); color: var(--success-ink); border-color: var(--success); }
.archive-button.unarchive:hover { background: var(--success-soft); color: var(--success-ink); border-color: var(--success); }

/* Inline edit inputs */
.inline-edit-input {
  padding: 0.4rem 0.6rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: var(--text-base); background: var(--surface); margin: 0; box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.inline-edit-input:focus { outline: none; border-color: var(--azure); box-shadow: var(--ring); }
.inline-edit-input:invalid { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(206, 59, 46, 0.15); }
.inline-edit-input--name { width: 100%; min-width: 12rem; }
.inline-edit-input--hours { width: 6rem; }
tr.inline-editing { background: var(--sky-50); }

/* Reveal inline edit form on row hover/focus (admin convenience tables) */
.small-table tbody tr .inline-form { opacity: 0; max-height: 0; overflow: hidden; pointer-events: none; transition: opacity 0.2s ease, max-height 0.2s ease; }
.small-table tbody tr:hover .inline-form, .small-table tbody tr:focus-within .inline-form { opacity: 1; max-height: 520px; pointer-events: auto; }

/* ===========================================================================
   11. MODALS (bulk email + delete family) — <dialog>
   =========================================================================== */
.bulk-email-modal, .delete-family-modal {
  padding: 0; border: none; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); overflow: hidden;
}
.bulk-email-modal { width: min(720px, 92vw); max-height: 90vh; }
.delete-family-modal { width: min(480px, 92vw); }
.bulk-email-modal::backdrop, .delete-family-modal::backdrop { background: rgba(8, 30, 60, 0.55); backdrop-filter: blur(2px); }

.bulk-email-form { display: block; padding: 0; margin: 0; border: none; box-shadow: none; background: transparent; border-radius: 0; gap: 0; max-height: 90vh; overflow-y: auto; }
.bulk-email-form > div { padding: var(--space-5) var(--space-6); }

.bulk-email-modal__header, .delete-family-modal .bulk-email-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(115deg, var(--navy-strong), var(--navy) 70%, var(--azure) 160%);
  color: #fff;
}
.bulk-email-modal__header h2 { margin: 0; font-size: var(--text-xl); color: #fff; }
.bulk-email-modal__close {
  appearance: none; background: transparent; border: none; color: #fff; font-size: 1.6rem; line-height: 1;
  cursor: pointer; padding: 0.2rem 0.5rem; border-radius: var(--radius-sm);
}
.bulk-email-modal__close:hover { background: rgba(255, 255, 255, 0.18); }

.bulk-email-field { margin-bottom: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.bulk-email-field label { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--navy); }
.bulk-email-field--check { flex-direction: row; align-items: center; gap: var(--space-2); }
.bulk-email-field--check input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--azure); }
.bulk-email-field--check label { text-transform: none; letter-spacing: normal; font-weight: 600; font-size: var(--text-sm); color: var(--ink); }

.bulk-email-tokens { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--ink-muted); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.bulk-email-tokens__label { font-weight: 700; color: var(--navy); margin-right: 0.15rem; }
.bulk-email-tokens__chip {
  appearance: none; display: inline-flex; align-items: baseline; gap: 0.35rem;
  padding: 0.3rem 0.65rem; border-radius: var(--radius-pill);
  background: var(--sky-100); color: var(--navy); border: 1px solid var(--sky-200);
  font: inherit; cursor: pointer; margin: 0;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.bulk-email-tokens__chip:hover { background: var(--sky-200); border-color: var(--azure); transform: translateY(-1px); }
.bulk-email-tokens__chip:active { transform: translateY(0); }
.bulk-email-tokens__chip-token { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 0.82rem; font-weight: 700; }
.bulk-email-tokens__chip-label { font-size: var(--text-xs); color: var(--ink-muted); }

.bulk-email-preview { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); margin-top: var(--space-2); }
.bulk-email-preview__header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }
.bulk-email-preview__header h3 { margin: 0; font-size: var(--text-base); color: var(--navy); }
.bulk-email-preview__header label { font-size: var(--text-xs); font-weight: 700; color: var(--ink-muted); margin-right: 0.4rem; }
.bulk-email-preview__header select { width: auto; padding: 0.35rem 0.5rem; font-size: var(--text-sm); }
.bulk-email-preview__email { background: var(--surface); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); }
.bulk-email-preview__subject { font-size: var(--text-sm); padding-bottom: var(--space-2); margin-bottom: var(--space-2); border-bottom: 1px solid var(--border); word-break: break-word; }
.bulk-email-preview__label { font-weight: 700; color: var(--ink-muted); margin-right: 0.35rem; }
.bulk-email-preview__body { white-space: pre-wrap; font-size: var(--text-sm); line-height: 1.5; color: var(--ink); min-height: 4rem; }

.bulk-email-modal__footer { display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-4) var(--space-6); background: var(--surface-alt); border-top: 1px solid var(--border); }
.bulk-email-modal__footer .btn-primary, .bulk-email-modal__footer .btn-secondary, .bulk-email-modal__footer input[type="submit"] {
  appearance: none; border: none; cursor: pointer; padding: 0.6rem 1.3rem; min-height: 44px;
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 800; border-radius: var(--radius-pill); margin: 0;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.bulk-email-modal__footer .btn-primary, .bulk-email-modal__footer input[type="submit"] {
  background: linear-gradient(135deg, var(--navy), var(--azure) 150%); color: #fff; box-shadow: var(--shadow-sm);
}
.bulk-email-modal__footer .btn-primary:hover, .bulk-email-modal__footer input[type="submit"]:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.bulk-email-modal__footer .btn-secondary { background: var(--surface); color: var(--navy); border: 1px solid var(--border-strong); }
.bulk-email-modal__footer .btn-secondary:hover { background: var(--sky-50); }

.bulk-email-skipped { margin: var(--space-2) 0 var(--space-4); color: var(--warning-ink); background: var(--warning-soft); border-radius: var(--radius-sm); padding: 0.6rem 0.85rem 0.6rem 2rem; list-style: disc; }
.bulk-email-skipped li { font-size: var(--text-sm); }

.delete-family-modal__body { padding: var(--space-4) var(--space-6); }
.delete-family-modal__body p { margin: 0 0 var(--space-3); }
.delete-family-modal__warning { color: var(--danger-ink); background: var(--danger-soft); padding: 0.65rem 0.85rem; border-radius: var(--radius-sm); border-left: 4px solid var(--danger); font-weight: 600; }

.btn-danger {
  appearance: none; background: var(--danger); color: #fff; border: none; border-radius: var(--radius-pill);
  padding: 0.6rem 1.3rem; min-height: 44px; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 800;
  cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: var(--shadow); background: var(--danger-strong); }

/* ===========================================================================
   12. PAGE: LOGIN
   =========================================================================== */
.auth-card { text-align: left; }
.auth-lead { font-size: var(--text-lg); color: var(--ink-muted); }
.auth-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: var(--space-5); gap: var(--space-3); margin: var(--space-5) 0;
}
.auth-form input[type="email"] { font-size: var(--text-lg); }
.auth-magic { background: var(--sky-50); border: 1px dashed var(--azure); border-radius: var(--radius); padding: var(--space-4); }
.auth-help { color: var(--ink-muted); font-size: var(--text-sm); }

/* ===========================================================================
   13. PAGE: FAMILY SUMMARY
   =========================================================================== */
.summary-section { margin-top: var(--space-7); }
.summary-section:first-child { margin-top: 0; }

.useful-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.useful-links li {
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}
.useful-links a { font-weight: 700; }
.useful-links span { display: block; font-size: var(--text-sm); color: var(--ink-muted); font-weight: 400; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.section-head .btn { margin: 0; }

.email-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.email-list li { background: var(--sky-50); border: 1px solid var(--sky-200); border-radius: var(--radius-pill); padding: 0.35rem 0.85rem; font-size: var(--text-sm); color: var(--navy); font-weight: 600; }
.add-email-form { flex-direction: row; align-items: center; gap: var(--space-2); max-width: 480px; }
.add-email-form input[type="email"] { flex: 1; }
.add-email-form input[type="submit"] { width: auto; flex: none; }

/* ===========================================================================
   14. PAGE: FAQ
   =========================================================================== */
.faq h3 { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border); }
.faq h3:first-of-type { border-top: none; padding-top: 0; }
.faq h3 a { color: inherit; text-decoration: none; font-weight: inherit; }
.faq h3 a:hover { color: var(--azure-ink); text-decoration: underline; }
.faq h4 { color: var(--azure-ink); margin-top: var(--space-5); }
.faq ol { padding-left: 1.3rem; display: grid; gap: var(--space-2); }
.faq ol li { padding-left: var(--space-1); }
.faq__ideas { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6); margin-top: var(--space-4); }

/* ===========================================================================
   15. PAGE: AVAILABLE TASKS
   =========================================================================== */
.tasks-intro {
  font-size: var(--text-lg);
  color: var(--ink-muted);
  max-width: 62ch;
  margin-bottom: var(--space-6);
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* min(18rem, 100%) keeps a single card from overflowing narrow viewports */
  grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
  gap: var(--space-4);
}

.task-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--azure);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

.task-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.task-card__title { margin: 0; font-size: var(--text-lg); }

/* Estimate chip — hours tasks read sky/navy, money tasks read green, each with
   its own icon, so the type is clear by more than color alone. */
.task-card__estimate {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--sky-100);
  color: var(--navy);
  border: 1px solid var(--sky-200);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
}
.task-card__estimate--hours::before { content: "\23F1"; } /* stopwatch */
.task-card__estimate--money {
  background: var(--success-soft);
  color: var(--success-ink);
  border-color: rgba(30, 142, 90, 0.35);
}
.task-card__estimate--money::before { content: "\1F4B5"; } /* banknote */

.task-card__desc { margin: 0; color: var(--ink-muted); }

.task-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-2);
}

.task-card__due {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-muted);
}
.task-card__due::before { content: "\1F4C5"; } /* calendar */
.task-card__due--overdue { color: var(--danger-ink); }
.task-card__due--overdue::before { content: "\26A0"; } /* warning */
.task-card__due--none { color: var(--ink-subtle); font-weight: 600; }
.task-card__due--none::before { content: ""; }

/* Admin Edit + Delete actions, right-aligned in the card footer */
.task-card__actions { display: inline-flex; align-items: center; gap: var(--space-2); }
/* button_to renders a <form>; keep the inline Delete action compact */
.task-card form.button_to {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}
.task-card__actions .edit-button,
.task-card__actions .delete-button { margin: 0; }

.tasks-empty { color: var(--ink-muted); }

/* Add Task form: submit + cancel sit side by side (overrides the column default) */
.form-actions {
  flex-direction: row;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ===========================================================================
   16. RESPONSIVE
   =========================================================================== */
@media (max-width: 720px) {
  .stat-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .donation-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }

  .main-header { flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); }
  .right-header { width: 100%; flex-wrap: wrap; gap: var(--space-1); }
  .right-header a, .logout-link { font-size: var(--text-sm); }

  .main-content { padding: var(--space-5) var(--space-4); margin: var(--space-4) var(--space-2) var(--space-6); border-radius: var(--radius-lg); }
  .site-footer { padding: var(--space-4); flex-direction: column; align-items: flex-start; }

  .sticky-controls { position: static; }
  #family_summaries thead th { position: static; }

  .filters-bar { flex-direction: column; align-items: stretch; }
  .filter-field input[type="text"], .filter-field select { min-width: 0; width: 100%; }
  .filters-count { margin-left: 0; }
  .add-email-form { flex-direction: column; align-items: stretch; }
  .add-email-form input[type="submit"] { width: 100%; }

  table { display: block; overflow-x: auto; }
  table:not(.hours-table) th, table:not(.hours-table) td { font-size: var(--text-sm); padding: 0.7rem 0.5rem; }

  /* Hours table → cards on mobile (label via data-label + ::before) */
  table.hours-table { overflow: visible; border: none; box-shadow: none; background: transparent; margin-top: var(--space-4); }
  .hours-table thead { display: none; }
  .hours-table tbody tr {
    display: block; margin-bottom: var(--space-4); padding: var(--space-4);
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    box-shadow: var(--shadow-sm); background: var(--surface);
  }
  .hours-table td { display: block; padding: 0.4rem 0; font-size: var(--text-sm); border: none; }
  .hours-table td::before { content: attr(data-label); display: block; font-weight: 800; color: var(--navy); margin-bottom: 0.15rem; font-family: var(--font-display); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.04em; }
  .hours-table__hours { text-align: left; }
  .status-wrapper { gap: var(--space-2); }
  .status-wrapper .action-buttons { align-self: flex-start; }
}

/* ===========================================================================
   17. REDUCED MOTION (WCAG 2.3.3)
   =========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .show-button:hover, .archive-button:hover, .edit-button:hover,
  .delete-button:hover, .save-button:hover, .bulk-action-bar__send:hover,
  .btn-danger:hover, .bulk-email-tokens__chip:hover { transform: none; }
}
