/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --navy:    #111111;
  --navy-md: #333333;
  --gold:    #444444;
  --gold-lt: #666666;
  --cream:   #ffffff;
  --white:   #ffffff;
  --gray-50: #f9fafb;
  --gray-100:#f1f3f6;
  --gray-300:#d0d5dd;
  --gray-500:#6b7280;
  --gray-700:#374151;
  --gray-900:#111827;
  --green:   #15803d;
  --red:     #b91c1c;
  --radius:  6px;
  --shadow:  0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: #111; text-decoration: underline; }
a:hover { color: #555; }

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-300);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.2;
  text-decoration: none;
}
.brand-logo {
  height: 44px;
  object-fit: contain;
  object-position: left center;
  display: block;
  flex-shrink: 0;
}
.brand-sub {
  font-size: 0.7rem;
  color: var(--gray-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: #000; background: var(--gray-100); }
.nav-form { display: inline; }
.btn-link {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  color: var(--gray-500);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.btn-link:hover { color: #000; background: var(--gray-100); }

/* ── Main ──────────────────────────────────────────────────────────────── */
.site-main { flex: 1; }
.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--gray-500);
  font-size: 0.8rem;
  border-top: 1px solid var(--gray-300);
  margin-top: 3rem;
  background: var(--white);
}

/* ── Flash ─────────────────────────────────────────────────────────────── */
.flash {
  max-width: 1200px;
  margin: 1rem auto 0;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
}
.flash--success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.flash--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Auth pages ────────────────────────────────────────────────────────── */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 2rem 1rem;
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

/* Wide variant for the register page (holds two columns) */
.auth-wrap--wide { align-items: flex-start; padding-top: 3rem; }
.register-card   { max-width: 860px; }

/* Two-column grid: [fields] [donate]
   On wide screens the submit button sits below the fields column.
   On narrow screens the order is fields → donate → submit.        */
.register-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "fields donate"
    "submit donate";
  gap: 1.5rem 2rem;
  align-items: start;
}
.register-header { margin-bottom: 1.5rem; }
.register-fields { grid-area: fields; }
.register-donate { grid-area: donate; margin-top: 0; }
.register-submit { grid-area: submit; }

@media (max-width: 680px) {
  .register-card  { max-width: 420px; }
  .register-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "fields"
      "donate"
      "submit";
  }
}
.auth-card--center { text-align: center; }
.auth-logo {
  display: block;
  margin: 0 auto 0;
  height: 250px;
  width: auto;
}
.auth-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.auth-subtitle {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}
.auth-alt {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-500);
}
.pending-icon { font-size: 3rem; margin-bottom: 1rem; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}
.field-hint { font-weight: 400; color: var(--gray-500); }
.field input, .inline-input {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field input:focus, .inline-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn--primary:hover { background: var(--navy-md); border-color: var(--navy-md); color: var(--white); }
.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--success {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn--success:hover { opacity: 0.85; color: var(--white); }
.btn--danger {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn--danger:hover { opacity: 0.85; color: var(--white); }
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--gray-300);
  font-weight: 500;
}
.btn--ghost:hover { background: var(--gray-100); }
.btn--full { width: 100%; }
.btn--sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }

/* ── Page header ───────────────────────────────────────────────────────── */
.page-header {
  background: var(--white);
  color: var(--gray-900);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--gray-300);
}
.page-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.4rem;
}
.page-desc {
  color: var(--gray-500);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Content wrap ──────────────────────────────────────────────────────── */
.content-wrap {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.content-wrap--narrow {
  max-width: 680px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* ── Library ───────────────────────────────────────────────────────────── */
.library-wrap {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.year-section { margin-bottom: 2.5rem; }
.year-heading {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.5rem;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  display: inline-block;
}
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.pdf-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--gray-900);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.pdf-card:hover {
  border-color: #111;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  transform: translateY(-1px);
  color: #111;
}
.pdf-card__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  color: var(--gold);
}
.pdf-card__icon svg { width: 100%; height: 100%; }
.pdf-card__body { flex: 1; min-width: 0; }
.pdf-card__name {
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdf-card__arrow { color: var(--gray-300); font-size: 1rem; flex-shrink: 0; }
.pdf-card:hover .pdf-card__arrow { color: var(--gold); }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--gray-100);
}

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--shadow);
}
.stat-card--alert { border-left: 4px solid var(--gold); }
.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--navy);
  line-height: 1;
}
.stat-label { color: var(--gray-500); font-size: 0.85rem; }
.stat-link { font-size: 0.85rem; font-weight: 600; color: var(--gold); text-decoration: none; margin-top: 0.5rem; }
.stat-link:hover { color: var(--navy); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: var(--gray-50);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--gray-300);
}
.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--gray-50); }
.row--inactive { opacity: 0.5; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 0.8rem; }
.text-center { text-align: center; }

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge--approved { background: #dcfce7; color: #166534; }
.badge--pending  { background: #fef9c3; color: #854d0e; }
.badge--denied   { background: #fee2e2; color: #991b1b; }
.badge--admin     { background: #ede9fe; color: #5b21b6; }
.badge--developer { background: #111; color: #fff; }
.badge--user     { background: var(--gray-100); color: var(--gray-700); }

/* ── Filter bar ────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── Action row ────────────────────────────────────────────────────────── */
.action-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Rename form ───────────────────────────────────────────────────────── */
.rename-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.rename-form .inline-input {
  font-size: 0.875rem;
  padding: 0.35rem 0.6rem;
  width: auto;
  flex: 1;
}

/* ── Info list ─────────────────────────────────────────────────────────── */
.info-list {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.6rem 1rem;
}
.info-list dt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}
.info-list dd { display: flex; align-items: center; }

/* ── Search ────────────────────────────────────────────────────────────── */
.search-form { margin-top: 1.25rem; }
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 580px;
  margin: 0 auto;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
}
.search-icon { width: 1.1rem; height: 1.1rem; color: rgba(255,255,255,0.5); flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font: inherit;
  font-size: 0.95rem;
  min-width: 0;
}
.search-input::placeholder { color: rgba(255,255,255,0.45); }
.search-clear {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0 0.25rem;
  line-height: 1;
}
.search-clear:hover { color: var(--white); }
.btn--gold {
  background: #111;
  color: #fff;
  border-color: #111;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
}
.btn--gold:hover { background: #333; border-color: #333; color: #fff; }

.search-meta { margin-bottom: 1.25rem; }
.search-count { color: var(--gray-700); font-size: 0.95rem; }
.search-none { color: var(--gray-700); font-size: 0.95rem; margin-bottom: 0.5rem; }
.search-hint { color: var(--gray-500); font-size: 0.85rem; }

/* ── Search results ────────────────────────────────────────────────────── */
.result-list { display: flex; flex-direction: column; gap: 0.75rem; }
.result-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--gray-900);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.result-card:hover {
  border-color: #111;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  color: #111;
}
.result-card__icon { flex-shrink: 0; width: 1.75rem; height: 1.75rem; color: var(--gold); margin-top: 0.1rem; }
.result-card__icon svg { width: 100%; height: 100%; }
.result-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.result-card__name { font-weight: 600; font-size: 1rem; }
.result-card__snippet {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-card__snippet--none { font-style: italic; }
.result-card__year {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  align-self: flex-start;
}

/* ── PDF card description ──────────────────────────────────────────────── */
.pdf-card__desc {
  font-size: 0.75rem;
  color: var(--gray-500);
  display: block;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Admin edit form ───────────────────────────────────────────────────── */
.edit-form { display: flex; flex-direction: column; gap: 0.4rem; }
.inline-textarea {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--gray-900);
  background: var(--white);
  resize: vertical;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.inline-textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}

/* ── Member checklist ──────────────────────────────────────────────────── */
.member-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
}
.member-check-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  border-radius: calc(var(--radius) - 1px);
  transition: background 0.1s;
}
.member-check-row:hover { background: var(--gray-50); }
.member-check-row input[type=checkbox] { width: 1rem; height: 1rem; flex-shrink: 0; accent-color: var(--navy); }
.member-check-name { font-weight: 500; font-size: 0.9rem; flex-shrink: 0; }
.member-check-email { color: var(--gray-500); font-size: 0.82rem; flex: 1; }

/* ── Donate box ────────────────────────────────────────────────────────── */
/* ── Inline field errors ───────────────────────────────────────────────── */
.field-error {
  display: none;
  font-size: 0.8rem;
  color: #c0392b;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ── Donate box ────────────────────────────────────────────────────────── */
.donate-box {
  padding: 1.5rem;
  background: #f0f7f4;
  border: 1px solid #b2d8c8;
  border-radius: var(--radius);
  text-align: center;
}
.donate-box__icon { font-size: 1.6rem; color: #c0392b; margin-bottom: 0.5rem; }
.donate-box__title { font-size: 1.1rem; color: var(--navy); margin: 0 0 0.5rem; }
.donate-box__body {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}
.donate-form { text-align: left; }
.donate-amount-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.donate-amount-label { font-size: 0.88rem; font-weight: 600; color: var(--gray-700); white-space: nowrap; }
.donate-amount-input-wrap { position: relative; flex: 1; }
.donate-amount-symbol {
  position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%);
  font-weight: 700; color: var(--gray-500); pointer-events: none;
}
.donate-amount-input {
  width: 100%; padding: 0.5rem 0.6rem 0.5rem 1.4rem;
  border: 1px solid var(--gray-300); border-radius: var(--radius);
  font: inherit; font-size: 1rem; color: var(--gray-900);
}
.donate-amount-input:focus {
  outline: none; border-color: #0070ba; box-shadow: 0 0 0 3px rgba(0,112,186,0.15);
}
.btn--paypal {
  background: #0070ba; color: #fff; font-weight: 700;
  border: none; border-radius: var(--radius); padding: 0.7rem 1.25rem;
  cursor: pointer; font-size: 0.95rem; transition: background 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 0.35rem;
}
.btn--paypal:hover { background: #005ea6; }
.donate-thanks {
  margin-top: 1rem; font-size: 0.88rem; color: #1a7a4a;
  font-weight: 600; text-align: center;
}

/* ── Donate page ───────────────────────────────────────────────────────── */
.donate-page-form { text-align: left; }
.donate-suggestions {
  display: flex; gap: 0.5rem; justify-content: center;
  flex-wrap: wrap; margin-top: 0.75rem;
}
.suggest-btn {
  padding: 0.35rem 0.85rem; border: 2px solid var(--gray-300);
  border-radius: 999px; background: #fff; cursor: pointer;
  font: inherit; font-size: 0.88rem; font-weight: 600;
  color: var(--gray-700); transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.suggest-btn:hover { border-color: #111; color: #111; }
.suggest-btn--active { background: #111; color: #fff; border-color: #111; }

/* ── Nav donate button ─────────────────────────────────────────────────── */
.nav-donate-btn {
  background: #111; color: #fff; border: none;
  border-radius: 999px; font-weight: 600;
  padding: 0.3rem 0.85rem; font-size: 0.82rem;
  cursor: pointer; transition: background 0.15s;
}
.nav-donate-btn:hover { background: #333; }
.btn--outline-dark {
  background: transparent; color: var(--gray-900);
  border: 1.5px solid var(--gray-900); border-radius: 999px;
  font-weight: 600; padding: 0.3rem 0.85rem; font-size: 0.82rem;
  cursor: pointer; transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.btn--outline-dark:hover { background: var(--gray-900); color: #fff; }

/* ── Invite bar ────────────────────────────────────────────────────────── */
.invite-bar { margin-bottom: 1rem; }
.invite-inline { margin-top: 0.6rem; }
.invite-fields {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--gray-50); border: 1px solid var(--gray-300);
  border-radius: var(--radius);
}
.invite-input {
  padding: 0.4rem 0.75rem; border: 1px solid var(--gray-300);
  border-radius: var(--radius); font: inherit; font-size: 0.88rem;
  flex: 1; min-width: 160px;
}
.invite-input:focus { outline: none; border-color: #111; box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }

/* ── Inline name editor ────────────────────────────────────────────────── */
.name-cell { display: flex; align-items: center; gap: 0.4rem; }
.name-edit-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gray-500); font-size: 0.85rem; padding: 0 0.2rem;
  opacity: 0; transition: opacity 0.15s;
}
.name-cell:hover .name-edit-btn { opacity: 1; }
.name-edit-form { display: flex; align-items: center; gap: 0.25rem; }
.name-edit-input {
  padding: 0.2rem 0.4rem; border: 1px solid var(--gray-300);
  border-radius: var(--radius); font: inherit; font-size: 0.9rem;
  width: 140px;
}
.name-edit-input:focus { outline: none; border-color: #111; box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }
.name-save-btn, .name-cancel-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; padding: 0.1rem 0.25rem; border-radius: 3px;
}
.name-save-btn { color: var(--green); }
.name-save-btn:hover { background: #dcfce7; }
.name-cancel-btn { color: var(--red); }
.name-cancel-btn:hover { background: #fee2e2; }

/* ── User access editor ────────────────────────────────────────────────── */
.action-col { display: flex; flex-direction: column; gap: 0.35rem; }
.access-inline-form {
  margin-top: 0.25rem;
  padding: 0.75rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  min-width: 240px;
}
.access-type-row { display: flex; gap: 1rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.access-radio { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; cursor: pointer; }
.access-radio input { accent-color: #111; }
.year-picker-wrap { margin-bottom: 0.4rem; }
.year-chips {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin-bottom: 0.4rem; min-height: 1rem;
}
.year-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #111; color: #fff;
  font-size: 0.8rem; font-weight: 600;
  padding: 0.2rem 0.5rem; border-radius: 999px;
}
.chip-remove {
  background: none; border: none; color: #fff;
  cursor: pointer; font-size: 0.9rem; line-height: 1;
  padding: 0; margin: 0; opacity: 0.7;
}
.chip-remove:hover { opacity: 1; }
.year-typeahead-wrap { position: relative; }
.year-typeahead {
  width: 100%; padding: 0.35rem 0.6rem;
  border: 1px solid var(--gray-300); border-radius: var(--radius);
  font: inherit; font-size: 0.85rem;
}
.year-typeahead:focus { outline: none; border-color: #111; box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }
.year-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: #fff; border: 1px solid var(--gray-300);
  border-radius: var(--radius); list-style: none;
  margin: 2px 0 0; padding: 0.25rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 180px; overflow-y: auto;
}
.year-dropdown li {
  padding: 0.35rem 0.75rem; cursor: pointer; font-size: 0.88rem;
}
.year-dropdown li:hover { background: var(--gray-100); }
.access-years-label { font-size: 0.82rem; color: #333; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .header-inner { padding: 0 1rem; }
  .pdf-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 0.5rem; }
  .rename-form { flex-direction: column; align-items: stretch; }
}
