/* ---- Design tokens ----
   Palette inspired by a hangar at dusk + safety-orange aircraft trim:
   --bg:        #1B2430  deep slate navy
   --surface:   #232E3D  panel surface
   --surface-2: #2C3949  raised panel
   --border:    #33404F
   --text:      #EDEFF2
   --muted:     #8FA0B3
   --accent:    #E8622C  safety orange (throttle/warning trim)
   --good:      #4FA97C  active / positive
   --bad:       #D9534F  pending / rejected
   Type: "Barlow Condensed" (display, gauge-like numerals) + "Inter" (body) + "JetBrains Mono" (data/tables)
*/

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

* { box-sizing: border-box; }

:root {
  --bg: #1B2430;
  --surface: #232E3D;
  --surface-2: #2C3949;
  --border: #33404F;
  --text: #EDEFF2;
  --muted: #8FA0B3;
  --accent: #E8622C;
  --good: #4FA97C;
  --bad: #D9534F;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Column flex so the shared site footer sits at the viewport bottom even
     when the view above it (e.g. the login card) is short. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, .display {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}

.mono { font-family: 'JetBrains Mono', monospace; }

a { color: var(--accent); }

/* --- App shell ---
   Shared header for both the login screen and the logged-in app. These
   values are deliberately copied 1:1 from the public homepage's nav.top /
   .brandmark (public/site.css) rather than approximated, so the bar itself
   doesn't shift position, color, or size when a member crosses from the
   public site into the app — same background rgba, same blur, same border
   color, same max-width wrap, same logo size. */
/* Brand row + tabs row stick together as one block, so the menu options stay
   fixed at the top while only the page content scrolls beneath. */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar {
  background: rgba(27, 36, 48, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #364256;
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px clamp(20px, 5vw, 56px);
  min-height: 86px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Stay one row while it fits; when brand + actions no longer fit, the actions
     block wraps onto its own row instead of overflowing the viewport. */
  flex-wrap: wrap;
  gap: 10px 16px;
}
.topbar .brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.topbar .brand-logo { height: 60px; width: auto; border-radius: 8px; flex-shrink: 0; }
/* The logo already carries the club name; the line beside it is the section
   label (or, once signed in, who you're signed in as), set off by a divider.
   Matches the public nav's brand treatment. */
.topbar .brand-text {
  display: flex; flex-direction: column; line-height: 1.3;
  padding-left: 16px; border-left: 1px solid #364256;
}
.topbar .brand-text span {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
}
/* Email (primary) reads brighter than the role line beneath it, with a little
   gap so the two lines aren't cramped together. */
#whoami { color: var(--text); }
.topbar .brand-text .whoami-role { display: inline-block; margin-top: 3px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Same ghost-button treatment as the public nav's .btn-ghost, applied to
   both the <a> (Public Site) and <button> (Account/Log out) controls in the
   app header, so all three read as one family instead of mixing the nav's
   mono/ghost style with the app's default Barlow Condensed buttons. */
.btn-public {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text);
  background: transparent; border: 1px solid #364256; border-radius: 2px; padding: 10px 20px;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
/* Keep the ghost look on hover. Account/Log out are <button>s, so without
   pinning the background here the global `button:hover` (solid orange) bleeds
   through and leaves orange text on an orange fill — unreadable. */
.btn-public:hover { background: transparent; border-color: var(--accent); color: var(--accent); filter: none; }

/* Once the actions wrap below the brand there's room to keep the signed-in
   identity visible, but a long email must truncate rather than widen the row. */
.topbar .brand { min-width: 0; }
.topbar .brand-text { min-width: 0; }
.topbar .brand-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62vw; }

@media (max-width: 720px) {
  .topbar-inner { min-height: 0; padding-top: 12px; padding-bottom: 12px; }
  /* Full-width actions row, buttons kept left under the brand. */
  .topbar-actions { width: 100%; justify-content: flex-start; }
  .topbar .brand-logo { height: 48px; }
}
@media (max-width: 430px) {
  /* Tightest layout: drop the identity line and trim the buttons a little so
     they stay tappable. A regular member's three actions fit one row; a staff
     user's four wrap to a compact second row, which is fine. */
  .topbar .brand-text { display: none; }
  .topbar .brand-logo { height: 42px; }
  .topbar-actions { gap: 8px; }
  .btn-public { padding: 8px 12px; font-size: 11px; letter-spacing: 0.03em; }
}

/* Section tabs, styled as the second row of the nav block: identical link
   treatment to the public site's .navlinks a.link (Inter 14px, muted grey,
   thin orange underline that slides in) rather than the app's old bold
   condensed tabs, so public → member area keeps one link language. The bar
   shares the topbar's background; the topbar's own border-bottom is dropped
   inside the app view (below) so brand row + links row read as one block. */
.tabs-bar {
  position: relative;
  background: rgba(27, 36, 48, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #364256;
}
#app-view .topbar { border-bottom: none; }
.tabs-inner {
  max-width: 1180px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 clamp(20px, 5vw, 56px);
  display: flex;
  align-items: center;
}
.tabs {
  display: flex;
  flex-wrap: wrap;      /* narrow screens: tabs drop to a second row instead of collapsing into a menu */
  gap: 2px 30px;        /* small row-gap so wrapped rows aren't cramped; the tab padding carries the rest */
  flex: 1 1 auto;
  min-width: 0;
}
/* Compact "current tab ▾" button shown only when the full row can't fit
   (see updateTabsLayout) — the horizontal tabs collapse into a dropdown. */
.tabs-toggle { display: none; }
.tab {
  flex: 0 0 auto; /* don't shrink, so overflow is measurable (drives the collapse) */
  font-size: 14px;
  color: var(--muted);
  padding: 12px 0 14px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.2s ease;
}
.tab:hover { color: var(--text); }
.tab:hover::after { transform: scaleX(1); }
.tab.active { color: var(--text); }
.tab.active::after { transform: scaleX(1); }

/* --- Collapsed nav (when the tabs don't fit on one row) --- */
.tabs-bar.collapsed .tabs-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: transparent; border: none; color: var(--text);
  font-family: inherit; font-size: 14px; padding: 13px 0; cursor: pointer;
}
.tabs-bar.collapsed .tabs-toggle-caret { margin-left: auto; color: var(--muted); transition: transform 0.2s ease; }
.tabs-bar.collapsed.open .tabs-toggle-caret { transform: rotate(180deg); }
.tabs-bar.collapsed .tabs {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 29;
  flex-direction: column; gap: 0; display: none;
  background: rgba(27, 36, 48, 0.98); backdrop-filter: blur(10px);
  border-bottom: 1px solid #364256; box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}
.tabs-bar.collapsed.open .tabs { display: flex; }
.tabs-bar.collapsed .tab {
  padding: 12px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
}
.tabs-bar.collapsed .tab:last-child { border-bottom: none; }
.tabs-bar.collapsed .tab::after { display: none; } /* the sliding underline doesn't fit a vertical list */
.tabs-bar.collapsed .tab.active { color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.tabs-bar.collapsed .tab:hover { background: rgba(232, 98, 44, 0.08); }

/* --- Grouped nav dropdowns (People / Money / Club / More) --- */
.tab-group { position: relative; flex: 0 0 auto; }
.tab-grouphead {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  background: transparent; border: none; box-shadow: none; font-family: inherit;
  font-size: 14px; text-transform: none; letter-spacing: normal; color: var(--muted);
  padding: 12px 0 14px; cursor: pointer;
}
.tab-grouphead:hover { background: transparent; color: var(--text); filter: none; box-shadow: none; }
.tab-grouphead.active { color: var(--text); }
.tab-grouphead.active::after { transform: scaleX(1); }
.grp-caret { font-size: 9px; color: var(--muted); transition: transform 0.2s ease; }
.tab-group.open .grp-caret { transform: rotate(180deg); }
.tab-menu {
  display: none; position: absolute; top: 100%; left: -14px; min-width: 176px; z-index: 40;
  background: rgba(27, 36, 48, 0.98); backdrop-filter: blur(10px);
  border: 1px solid #364256; border-top: none; border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4); padding: 6px 0;
}
.tab-group.open .tab-menu { display: block; }
.tab-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 18px; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab-menu-item:hover { background: rgba(232, 98, 44, 0.10); color: var(--text); }
.tab-menu-item.active { color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }

/* Action-needed count badge (open grievances, new feedback, pending claims…). */
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px; margin-left: 6px;
  font-size: 11px; font-weight: 700; line-height: 1; font-family: var(--font-body, inherit);
  background: var(--accent); color: #1B1310; border-radius: 999px; flex: 0 0 auto;
}
.tab-menu-item .tab-badge { margin-left: 0; }

/* Grouped nav inside the collapsed (mobile) menu: flatten the dropdowns into
   labelled sections in the vertical list. */
.tabs-bar.collapsed .tab-group { display: block; }
.tabs-bar.collapsed .tab-grouphead {
  display: block; width: 100%; text-align: left; pointer-events: none;
  padding: 14px clamp(20px, 5vw, 56px) 4px; font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.tabs-bar.collapsed .grp-caret { display: none; }
/* A group head is only a section label in the collapsed menu — don't give it the
   active-item accent even when one of its items is current. */
.tabs-bar.collapsed .tab-grouphead.active { color: var(--muted); box-shadow: none; }
.tabs-bar.collapsed .tab-menu {
  position: static; display: block; background: none; border: none;
  box-shadow: none; border-radius: 0; padding: 0; min-width: 0; backdrop-filter: none;
}
.tabs-bar.collapsed .tab-menu-item {
  padding: 12px clamp(20px, 5vw, 56px); border-bottom: 1px solid var(--border); font-size: 14px;
}
.tabs-bar.collapsed .tab-menu-item:hover { background: rgba(232, 98, 44, 0.08); }
.tabs-bar.collapsed .tab-menu-item.active { color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }

/* Same content grid as the public site's .wrap (site.css): 1180px max width
   with the same responsive gutters, so nothing shifts when crossing between
   the homepage and the member area. */
main { padding: 28px clamp(20px, 5vw, 56px) 44px; max-width: 1180px; margin: 0 auto; }

/* --- Instrument panel: gauge-style stat readouts as discrete cards on a
   gapped grid (numeral above its label, matching the public homepage's
   readout strip). Discrete cards — not one shared slab — so a partial last
   row simply ends instead of leaving empty slab cells. */
.gauges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
/* Explicit column counts for stat sections: each section uses a count that
   divides its tile total exactly (6 tiles -> cols-3, 8 -> cols-4, 10 ->
   cols-5), so no row is ever left with a lone orphan tile. The narrow
   breakpoints only step down to other divisors of the same totals (6 -> 2x3,
   8 -> 2x4, 10 -> 2x5), so the grid stays even at every width. */
.gauges.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gauges.cols-4 { grid-template-columns: repeat(4, 1fr); }
.gauges.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 860px) {
  .gauges.cols-4, .gauges.cols-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .gauges.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 430px) {
  .gauges.cols-3, .gauges.cols-4, .gauges.cols-5 { grid-template-columns: 1fr; }
}
.gauge {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 6px;
  padding: 18px clamp(16px, 2.2vw, 24px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(10, 14, 20, 0.25);
}
.gauge .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.gauge .value {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 600;
  white-space: nowrap;
}
.gauge .value.good { color: var(--good); }
.gauge .value.bad { color: var(--bad); }

/* Placeholder shown in a dashboard section while its data loads. */
.dash-loading {
  color: var(--muted); font-size: 13px; padding: 22px 4px;
  animation: dashPulse 1.2s ease-in-out infinite;
}
@keyframes dashPulse { 0%,100% { opacity: 0.45; } 50% { opacity: 0.85; } }
@media (prefers-reduced-motion: reduce) { .dash-loading { animation: none; } }

/* Section divider for grouping stats (Finances / Membership / Engagement) on
   the dashboard and inside reports. */
.stat-section {
  margin: 26px 0 12px; color: var(--muted); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  border-bottom: 1px solid var(--border); padding-bottom: 6px;
}
.stat-section:first-child { margin-top: 0; }

/* --- Cards / panels --- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}
.panel h2 { font-size: 18px; margin-bottom: 14px; color: var(--muted); }

/* --- Getting-started onboarding checklist --- */
.panel.onboarding { border-color: var(--accent); }
.panel.onboarding h2 { color: var(--text); }
.chk-list { display: flex; flex-direction: column; gap: 2px; }
.chk-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 4px; border-top: 1px solid var(--border);
}
.chk-item:first-child { border-top: none; }
.chk-dot {
  flex: 0 0 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1; margin-top: 1px;
  border: 1px solid var(--border); color: var(--muted); background: var(--surface-2);
}
.chk-dot.done { background: rgba(79,169,124,0.18); border-color: transparent; color: var(--good); }
.chk-dot.opt { color: var(--accent); }
.chk-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chk-body strong { font-weight: 600; font-size: 14px; }
.chk-item.done .chk-body strong { color: var(--muted); font-weight: 500; }
.chk-help { font-size: 12.5px; color: var(--muted); }
.chk-go {
  flex: 0 0 auto; align-self: center;
  padding: 6px 12px; font-size: 12px;
}
/* Brief highlight when a checklist item scroll-jumps to a panel. */
@keyframes panelFlash { 0% { box-shadow: 0 0 0 2px var(--accent); } 100% { box-shadow: 0 0 0 2px transparent; } }
.panel.flash { animation: panelFlash 1.1s ease-out; }
@media (prefers-reduced-motion: reduce) { .panel.flash { animation: none; } }

/* --- Member events & volunteering --- */
.event-card { position: relative; transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease; }
.event-card:not(.past):hover { border-color: rgba(232, 98, 44, 0.35); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30); transform: translateY(-2px); }
/* Imminent events (today / tomorrow / this weekend) get a subtle accent edge. */
.event-card.soon::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0; }
.event-card.past { opacity: 0.85; border-color: var(--border); }
@media (prefers-reduced-motion: reduce) { .event-card:not(.past):hover { transform: none; } }

/* Filter toggle (Upcoming / I'm volunteering / Past) */
.event-filter { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.event-filter-btn {
  font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; width: auto;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.event-filter-btn:hover { border-color: var(--accent); color: var(--text); }
.event-filter-btn.active { background: rgba(232,98,44,0.15); border-color: var(--accent); color: var(--accent); }
.event-filter-btn .cnt { font-weight: 700; opacity: .75; margin-left: 2px; }

/* Card header: date badge + title/meta + optional flyer thumbnail */
/* Date badge = left gutter; .event-body holds everything else in one column. */
.event-row { display: flex; align-items: flex-start; gap: 14px; }
.event-body { flex: 1; min-width: 0; }
.event-head { display: flex; align-items: flex-start; gap: 14px; }
.event-head-main { flex: 1; min-width: 0; }
.event-desc { margin: 12px 0 0; font-size: 14px; line-height: 1.55; }
.event-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.event-meta { font-size: 13px; color: var(--accent); font-family: var(--mono, monospace); margin-top: 5px; }
/* Venue + address on their own clean line (name still opens the map). */
.event-loc { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 13px; line-height: 1.5; }
.event-loc .loc-pin { flex: 0 0 auto; color: var(--muted); position: relative; top: 3px; }
.event-loc-body { min-width: 0; }
.event-loc .loc-link { color: var(--text); font-weight: 600; text-decoration: none; }
.event-loc .loc-link:hover { color: var(--accent); }
.event-loc-sep { color: var(--border); }
.event-loc-addr { color: var(--muted); }
.event-date-badge {
  flex: 0 0 auto; width: 54px; text-align: center; line-height: 1.1;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 7px 0;
}
.event-date-badge .edb-mon { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.event-date-badge .edb-day { display: block; font-size: 22px; font-weight: 700; color: var(--text); }
.event-date-badge.past { opacity: .55; }
.event-date-badge.past .edb-mon { color: var(--muted); }

/* Status pills */
.ev-pill { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.ev-pill.today { background: var(--accent); color: #fff; }
.ev-pill.soon { background: rgba(232,98,44,0.16); color: var(--accent); }
.ev-pill.upcoming { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.ev-pill.wrapped { background: rgba(79,169,124,0.15); color: var(--good); }
.ev-pill.ended { background: var(--surface-2); color: var(--muted); }

/* Flyer thumbnail (image flyers) / download link (PDF flyers) */
.event-flyer { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.event-flyer-dl { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); text-decoration: none; }
.event-flyer-dl:hover { color: var(--accent); }
.event-flyer-dl svg { flex: 0 0 auto; }
.event-flyer-thumb { position: relative; flex: 0 0 auto; display: block; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.event-flyer-thumb img, .event-flyer-thumb canvas { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.event-flyer-thumb.pdf-thumb canvas { background: #fff; }
.flyer-badge { position: absolute; bottom: 3px; right: 3px; font-size: 9px; font-weight: 700; letter-spacing: .04em; padding: 1px 4px; border-radius: 3px; background: rgba(0,0,0,0.6); color: #fff; pointer-events: none; }
.event-flyer-file { font-size: 13px; }

/* Action bar: reads as a footer (thin divider) with the RSVP toggle on the left
   and the quieter add-to-calendar utilities grouped on the right. */
.event-actions { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
a.btn-sm { text-decoration: none; display: inline-flex; align-items: center; }
.event-actions-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.event-actions-label svg { flex: 0 0 auto; opacity: 0.85; }

/* One-time "finish your profile to volunteer" banner atop the Events page. */
.profile-gate { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; border-left: 3px solid var(--accent); }
.profile-gate-body { display: flex; align-items: flex-start; gap: 10px; min-width: 0;
  font-size: 13.5px; line-height: 1.5; color: var(--text); }
.profile-gate-body svg { flex: 0 0 auto; margin-top: 1px; color: var(--accent); }
.profile-gate .btn-sm { white-space: nowrap; flex: 0 0 auto; }

/* RSVP toggle — accent outline (subtle CTA), filled tint once you're going. */
.rsvp-btn { width: auto; font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  padding: 6px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
  transition: background .14s ease, color .14s ease; }
.rsvp-btn:hover { background: rgba(232, 98, 44, 0.12); }
.rsvp-btn.going { background: rgba(232, 98, 44, 0.15); }
.rsvp-btn.going:hover { background: rgba(232, 98, 44, 0.22); }

/* Add-to-calendar group: pushed to the right, quiet ghost buttons. */
.event-cal-group { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.cal-btn { width: auto; font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 5px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  transition: border-color .12s ease, color .12s ease; }
.cal-btn:hover { border-color: var(--muted); color: var(--text); }
/* Matches the neutral "In N days" status pill (.ev-pill.upcoming). */
.rsvp-count {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.rsvp-count svg { flex: 0 0 auto; }

/* Volunteer fill progress (card-level summary + per-task mini bar) */
.ev-vol-summary { margin-top: 14px; }
.ev-progress-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--text); margin-bottom: 5px; }
.ev-progress-pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.ev-progress { height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.ev-progress-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width .25s ease; }
.ev-progress-bar.full { background: var(--good); }
.ev-progress.mini { height: 4px; }
@media (prefers-reduced-motion: reduce) { .ev-progress-bar { transition: none; } }

.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px;
  padding: 12px 14px;
}
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.task-action { flex: 0 0 auto; align-self: center; }
.task-cap {
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: rgba(79,169,124,0.15); color: var(--good); white-space: nowrap;
}
.task-cap.full { background: rgba(217,83,79,0.18); color: var(--bad); }
.vol-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vol-chip {
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
/* When a coordinator sees an email, stack name + email so both read clearly
   instead of running together on one line. */
.vol-chip.has-email {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  gap: 1px; padding: 5px 11px; border-radius: 12px; line-height: 1.3;
}
.vol-chip .vol-name { font-weight: 600; }
.vol-chip .vol-email { color: var(--muted); text-decoration: none; margin-left: 4px; }
.vol-chip.has-email .vol-email { margin-left: 0; font-size: 11.5px; }
.vol-chip .vol-email:hover { color: var(--accent); }

/* Explanatory callout (e.g. "what's a grievance?") — a calm, bordered note. */
.info-callout {
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 13px 16px; margin-bottom: 16px; font-size: 13.5px; line-height: 1.6;
}
.info-callout strong { color: var(--text); }
.info-callout p { color: var(--muted); margin: 6px 0 0; }

/* --- Renewal-season nudge banner --- */
.renewal-nudge {
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, rgba(232,98,44,0.12), rgba(232,98,44,0.02));
}
.renewal-nudge-body { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.renewal-nudge-title {
  font-family: 'Barlow Condensed', sans-serif; font-size: 19px; font-weight: 600;
  color: var(--accent); letter-spacing: 0.01em;
}
.renewal-nudge-text { color: var(--text); font-size: 13.5px; line-height: 1.55; margin: 4px 0 0; max-width: 62ch; }
.renewal-nudge-actions { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.renewal-nudge-later { color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.renewal-nudge-later:hover { color: var(--accent); text-decoration: underline; }
/* "Find your people" community nudge — green-toned + welcoming, distinct from the
   orange dues nudge. Shares the nudge layout classes for a consistent feel. */
.connect-nudge {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-left: 4px solid var(--good);
  background: linear-gradient(90deg, rgba(79,169,124,0.13), rgba(79,169,124,0.02));
}
.connect-nudge-body { display: flex; align-items: center; gap: 14px; min-width: 0; }
.connect-nudge-emoji { flex: 0 0 auto; font-size: 26px; line-height: 1; }
.connect-nudge-title { font-family: 'Barlow Condensed', sans-serif; font-size: 19px; font-weight: 600; color: var(--good); letter-spacing: 0.01em; }
.connect-nudge-text { color: var(--text); font-size: 13.5px; line-height: 1.55; margin: 4px 0 0; max-width: 62ch; }
.connect-nudge-text strong { color: var(--good); font-weight: 600; }
.connect-nudge-actions { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.connect-nudge-actions button { background: var(--good); border-color: var(--good); color: #10221a; font-weight: 600; }
.connect-nudge-actions button:hover { filter: brightness(1.07); }
.connect-nudge-later { color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.connect-nudge-later:hover { color: var(--good); text-decoration: underline; }

/* Lapsed variant — firmer, red-toned to signal urgency. */
.lapsed-nudge {
  border-left: 4px solid var(--bad);
  background: linear-gradient(90deg, rgba(217,83,79,0.15), rgba(217,83,79,0.03));
}
.lapsed-nudge-title {
  font-family: 'Barlow Condensed', sans-serif; font-size: 19px; font-weight: 600;
  color: var(--bad); letter-spacing: 0.01em;
}
.lapsed-nudge-btn { background: var(--bad); }
.lapsed-nudge-btn:hover { background: #c0433f; filter: none; }

/* --- Member Interests directory --- */
/* Categories sit two-up on desktop so the browse area reads as tidy lanes
   instead of one tall wall of pills; the last odd category spans full width.
   Collapses to a single column on narrow screens. */
.interest-browse { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 36px; margin-top: 12px; }
.interest-browse .interest-cat:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 700px) { .interest-browse { grid-template-columns: 1fr; gap: 14px; } }
.interest-cat-label {
  font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); font-size: 13px;
  padding-bottom: 5px; border-bottom: 1px solid var(--border); margin-bottom: 9px;
}
.interest-tags { display: flex; flex-wrap: wrap; gap: 8px; }
/* Small round ✕ beside the results heading to clear the selected interest.
   Background pinned on hover so the global solid-orange button:hover doesn't
   bleed through. */
.int-clear {
  flex: 0 0 auto; width: 22px; height: 22px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  font-size: 14px; line-height: 1; cursor: pointer;
}
.int-clear:hover { background: transparent; border-color: var(--accent); color: var(--accent); filter: none; }
.interest-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
/* Pin background + colour on hover so the global solid-orange button:hover
   doesn't bleed through; hover only warms the border. */
.interest-tag:hover { border-color: var(--accent); background: var(--surface-2); color: var(--text); }
.interest-tag .cnt { color: var(--muted); font-size: 12px; }
.interest-tag.active,
.interest-tag.active:hover { background: rgba(232,98,44,0.15); border-color: var(--accent); color: var(--accent); }
.interest-tag.active .cnt { color: var(--accent); }

/* My Interests checkboxes as bordered "chips" — a boxed background around each
   option so a long row is easy to scan and clearly separated. A checked chip
   warms to the accent; a disabled one (e.g. Instructor/Mentor before Advanced)
   dims. */
.int-opt {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; text-transform: none; letter-spacing: normal; color: var(--text); margin: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px; cursor: pointer; transition: border-color .12s, background .12s;
}
.int-opt:hover { border-color: var(--accent); }
.int-opt:has(input:checked) { border-color: var(--accent); background: rgba(232,98,44,0.12); }
.int-opt input { width: auto; margin: 0; flex: 0 0 auto; }
.int-opt.disabled { opacity: .45; cursor: not-allowed; }
.int-opt.disabled:hover { border-color: var(--border); }
.member-int-card { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.member-int-card:last-child { border-bottom: none; }
.member-int-main { flex: 1 1 auto; min-width: 0; }
/* Small "put a face to a name" avatar: approved photo, else initials. */
.member-int-avatar { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: var(--accent); display: flex; align-items: center; justify-content: center; }
.member-int-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-int-avatar span { color: #1b1310; font-family: var(--font-display, inherit); font-weight: 700; font-size: 15px; }
.member-int-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.member-int-name { font-weight: 600; font-size: 14px; }
/* The shared interest, called out beside the name. */
.member-match {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap;
  padding: 2px 10px; border-radius: 999px;
  background: rgba(232,98,44,0.15); border: 1px solid var(--accent); color: var(--accent);
}
/* Everything else, demoted to one quiet line so the card stays calm. */
.member-also { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-top: 4px; }

/* Removable chips for a multi-select type-ahead (e.g. event coordinators). */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.chip-row:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; padding: 4px 6px 4px 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.chip-x {
  width: 18px; height: 18px; padding: 0; border: none; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.chip-x:hover { color: var(--bad); }

.guest-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.guest-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--border);
}
.guest-line:last-child { border-bottom: none; }
.guest-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* Location link: keeps the surrounding text colour (grey/accent per context),
   only revealing itself as a link on hover with an underline + pointer. */
.loc-link { color: inherit; text-decoration: none; cursor: pointer; }
.loc-link:hover, .loc-link:focus-visible { text-decoration: underline; }

/* Location map overlay — site-styled chrome around a keyless Google embed. */
.map-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10, 14, 20, 0.7); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.map-box {
  width: 100%; max-width: 640px; background: var(--surface);
  border: 1px solid var(--border); border-top: 3px solid var(--accent);
  border-radius: 8px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.map-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.map-title { font-size: 16px; font-weight: 600; color: var(--text); }
.map-addr { font-size: 13px; color: var(--muted); margin-top: 2px; }
.map-close {
  flex: 0 0 auto; width: 32px; height: 32px; padding: 0; border-radius: 4px;
  background: transparent; border: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer;
}
.map-close:hover { color: var(--text); }
.map-body { height: 380px; background: var(--surface-2); }
/* Dark-mode the bright map embed so it sits with the app's theme. */
.map-body iframe { width: 100%; height: 100%; border: 0; display: block; filter: invert(0.92) hue-rotate(180deg) brightness(0.95); }
.map-loading { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--muted); font-size: 14px; }
.map-foot { padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13px; }
.map-foot a { color: var(--accent); text-decoration: none; }
.map-foot a:hover { text-decoration: underline; }
@media (max-width: 560px) { .map-body { height: 300px; } }

/* --- Forms --- */
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; text-transform: uppercase; letter-spacing: 0.04em; }
input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}
/* Force every single-line control to the same height regardless of type —
   native <select>, date and number inputs otherwise render slightly taller or
   shorter than plain text inputs. box-sizing:border-box (global) means this
   height is inclusive of the 9px padding + 1px border. Checkboxes/radios are
   excluded (they size themselves), and textareas keep their own multi-line
   height below. */
input:not([type="checkbox"]):not([type="radio"]), select {
  height: 38px;
  line-height: 1.2;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
textarea { resize: vertical; min-height: 70px; }
/* Read-only "View" mode for a form — visually distinct from an editable one
   so it's obvious at a glance that changes won't stick. */
input:disabled, select:disabled, textarea:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: var(--surface);
}

/* Buttons share the public site's .btn language (site.css): JetBrains Mono
   uppercase, square 2px corners, solid = throttle orange / ghost = thin
   border that goes orange on hover — so controls feel identical on either
   side of the login boundary. */
button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #1B1310;
  border: 1px solid transparent;
  padding: 10px 20px;
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  font-size: 12.5px;
  white-space: nowrap;
  margin: 0;
}
button:hover { background: #f0703a; }
button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
button.secondary:hover { background: transparent; border-color: var(--accent); color: var(--accent); }
button.danger { background: var(--bad); color: #fff; }
button.danger:hover { background: #E2655F; }
button:disabled {
  background: var(--border);
  color: var(--muted);
  border-color: transparent;
  cursor: not-allowed;
}
button:disabled:hover { background: var(--border); color: var(--muted); }

/* Compact per-row table actions (Edit, Approve, Reject, Delete, etc.) — kept
   smaller than standalone panel buttons so a row of 2-3 actions doesn't
   dominate the row visually. */
button.btn-sm { padding: 5px 10px; font-size: 11px; letter-spacing: 0.04em; }

/* Row action buttons stacked vertically, all the same width, instead of
   wrapping side by side once there are 2-3 of them (Approve/Reject/Edit). */
.action-stack { display: flex; flex-direction: column; gap: 4px; width: 76px; }
.action-stack button { width: 100%; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

/* --- Tables --- */
/* Scroll wrapper injected around every table (see initTableScrollGuard): keeps
   a wide table inside its panel and lets it scroll horizontally on narrow
   viewports instead of spilling past the cell background / widening the page. */
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
th {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-size: 12px;
}
td.num { font-family: 'JetBrains Mono', monospace; }

/* Expenses list: fixed column widths for stable alignment regardless of how
   long a category/subcategory/attributed-to value happens to be. */
.expense-table { table-layout: fixed; }
.expense-table td, .expense-table th { overflow: hidden; word-wrap: break-word; text-overflow: ellipsis; }

/* Displayed (read-only) dates: centered, never wrapping to a second line.
   Scoped to its own class rather than reusing .num, which is shared with
   money columns elsewhere. */
.date-cell { text-align: center; white-space: nowrap; }
td.date-cell { font-family: 'JetBrains Mono', monospace; }

/* General-purpose centering for a header/cell pair, e.g. Waiver and Status
   on the Members list. */
.center-cell { text-align: center; }

/* Dashboard "AMA expiring" table: text within each cell stays left-justified,
   but the table itself is narrower than the panel and centered as a block
   (like .trend-table below) so the whole 4-column group reads as centered
   within the panel rather than stretched edge-to-edge. Extra horizontal cell
   padding gives clearer breathing room between columns. */
.evenly-spaced-table { table-layout: fixed; width: 92%; margin: 0 auto; }
.evenly-spaced-table th, .evenly-spaced-table td { text-align: left; padding: 8px 24px; }
.evenly-spaced-table td.date-cell, .evenly-spaced-table th.date-cell { text-align: center; }
/* Email tends to be the longest content in the row, so its column reads as
   most cramped against the next one — give that specific gap extra room. */
.evenly-spaced-table th:nth-child(3), .evenly-spaced-table td:nth-child(3) { padding-left: 116px; }

/* Matches .evenly-spaced-table's width/centering/column proportions exactly,
   so a control placed in its 4th cell lines up with the table's last
   (Expires) column beneath it. */
.evenly-spaced-table-header { width: 92%; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; margin-bottom: 10px; }

/* Dashboard "Membership trend" table: centered under the (now fixed-size)
   chart above it, narrower than it, with equal-width columns so Year/Active
   members/YoY change are evenly spaced. */
.trend-table { width: 70%; max-width: 480px; margin: 0 auto; table-layout: fixed; }
.trend-table th, .trend-table td { text-align: center; padding: 8px 20px; }

/* Dashboard expense-breakdown tables (by category / by person): fixed,
   matching column widths so Count/Total/bar line up vertically between the
   two stacked panels no matter how long the row labels are, with extra
   horizontal breathing room between fields. */
.breakdown-table { table-layout: fixed; }
.breakdown-table col.bt-label { width: 42%; }
.breakdown-table col.bt-count { width: 16%; }
.breakdown-table col.bt-total { width: 20%; }
.breakdown-table col.bt-bar { width: 22%; }
.breakdown-table th, .breakdown-table td { padding: 8px 18px; }
.breakdown-table .num { text-align: right; }
.bt-bar-track { background: var(--border); border-radius: 3px; overflow: hidden; height: 8px; }
.bt-bar-fill { background: var(--accent); height: 100%; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  text-transform: uppercase;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
}
.badge.approved { background: rgba(79,169,124,0.2); color: var(--good); }
.badge.pending { background: rgba(232,98,44,0.2); color: var(--accent); }
.badge.rejected { background: rgba(217,83,79,0.2); color: var(--bad); }
.badge.active { background: rgba(79,169,124,0.2); color: var(--good); }
.badge.inactive { background: rgba(139,152,168,0.2); color: var(--muted); }
.badge.pending_renewal { background: rgba(232,98,44,0.2); color: var(--accent); }

/* Open grievances: pulled to the top of the queue (server-ordered) and flagged
   here so an unresolved one further down the list never gets forgotten. */
tr.grievance-open > td { background: rgba(232,98,44,0.07); }
tr.grievance-open > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.grievance-open-callout {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px; padding: 10px 12px; border-radius: 6px;
  background: rgba(232,98,44,0.12); border: 1px solid rgba(232,98,44,0.35);
  border-left: 4px solid var(--accent);
  color: var(--text); font-size: 13.5px; font-weight: 600;
}

.msg { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; font-size: 14px; }
.msg.error { background: rgba(217,83,79,0.18); color: #FFCFCB; border: 1px solid var(--bad); border-left: 3px solid var(--bad); font-weight: 600; }
.msg.ok { background: rgba(79,169,124,0.15); color: #A9E0C1; border: 1px solid var(--good); }

/* Read-only "verified" display for values looked up automatically (e.g. AMA
   expiration) instead of a plain disabled input, so it reads as confirmed
   data rather than a greyed-out field. */
.verified-field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  background: rgba(79,169,124,0.12);
  border: 1px solid rgba(79,169,124,0.4);
  border-radius: 4px;
  color: var(--good);
  font-size: 14px;
  min-height: 34px;
  box-sizing: border-box;
}
.verified-field.unverified {
  background: rgba(139,152,168,0.1);
  border-color: var(--border);
  color: var(--muted);
}
/* A previously-accepted waiver whose text has since changed — distinct from
   both the green "current" state and the grey "never signed" state. */
.verified-field.stale {
  background: rgba(232,98,44,0.12);
  border-color: rgba(232,98,44,0.4);
  color: var(--accent);
}

/* Field Access card — the payoff for an active membership: a "field pass" that
   pairs where the field is with this year's gate code. Green ("access granted")
   accent, distinct from the app's orange, so it reads as a reward. */
.field-access {
  border-color: rgba(79,169,124,0.5);
  background: linear-gradient(155deg, rgba(79,169,124,0.10), rgba(79,169,124,0.015) 55%), var(--surface);
}
.field-access h2 { color: var(--text); font-size: 17px; margin: 0; letter-spacing: .01em; }
.fa-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.fa-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fa-keyicon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--good); background: rgba(79,169,124,0.14); border: 1px solid rgba(79,169,124,0.4); }
.fa-sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.fa-active { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--good);
  background: rgba(79,169,124,0.13); border: 1px solid rgba(79,169,124,0.4); }
.fa-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 7px rgba(79,169,124,0.9); }

.fa-body { display: flex; gap: 16px; flex-wrap: wrap; }
.fa-block { flex: 1 1 250px; min-width: 0; }
.fa-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fa-label svg { flex: 0 0 auto; color: var(--good); opacity: .9; }

.fa-address { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  min-height: 56px; box-sizing: border-box; padding: 12px 14px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 15px;
  text-decoration: none; transition: border-color .15s, background .15s; }
.fa-address:hover { border-color: rgba(79,169,124,0.55); background: rgba(79,169,124,0.06); }
.fa-directions { flex: 0 0 auto; color: var(--good); font-size: 12.5px; font-weight: 600; white-space: nowrap; }

.fa-code { display: flex; align-items: center; justify-content: center; min-height: 56px; box-sizing: border-box;
  padding: 10px 14px; border-radius: 9px; background: rgba(9,13,18,0.5); border: 1px solid rgba(79,169,124,0.4);
  font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 600; letter-spacing: .06em;
  color: var(--good); text-shadow: 0 0 20px rgba(79,169,124,0.4); }
.fa-hint { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 8px; text-align: center; }

/* Green "put a face to a name" nudge on the profile-photo uploader. */
.photo-tip { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 14px; padding: 10px 13px; border-radius: 8px;
  background: rgba(79,169,124,0.10); border: 1px solid rgba(79,169,124,0.35);
  color: var(--text); font-size: 13px; line-height: 1.5; }
.photo-tip svg { flex: 0 0 auto; margin-top: 1px; color: var(--good); }
.photo-tip strong { color: var(--good); font-weight: 600; }

.fa-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.fa-note svg { flex: 0 0 auto; margin-top: 2px; opacity: .8; }

/* Small "?" hint icon next to a label, with the explanation in a native
   tooltip on hover — keeps auto-lookup notes out of the way until asked for. */
.field-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(143,160,179,0.25);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-transform: none;
  letter-spacing: normal;
  cursor: help;
  margin-left: 4px;
}

.auth-shell {
  max-width: 380px;
  margin: 10vh auto;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
}
.auth-shell h1 { font-size: 26px; margin-bottom: 4px; }
.auth-shell .sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.link-row { margin-top: 14px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }

.receipt-thumb { max-width: 90px; max-height: 60px; border-radius: 4px; border: 1px solid var(--border); }
.receipt-preview { max-width: 220px; max-height: 220px; border-radius: 6px; border: 1px solid var(--border); display: block; }

.hidden { display: none !important; }

/* --- Shared site footer ---
   Same footer as the public pages (site.css `footer`), duplicated here with
   a scoped class because the app pages load style.css, not site.css, and
   pulling both in would collide on base element styles. Content/markup in
   login.html mirrors index.html's footer 1:1. */
.site-foot { margin-top: auto; border-top: 1px solid var(--border); padding: 48px 0 40px; }
.site-foot .foot-inner {
  max-width: 1180px; margin: 0 auto; box-sizing: border-box;
  padding: 0 clamp(20px, 5vw, 56px);
}
.site-foot .foot-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border);
}
@media (max-width: 700px) { .site-foot .foot-grid { grid-template-columns: 1fr; } }
.site-foot h5 {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 14px;
}
.site-foot p { color: var(--muted); font-size: 13.5px; line-height: 1.65; margin: 0; max-width: 36ch; }
.site-foot .foot-links { display: flex; flex-direction: column; gap: 10px; }
.site-foot .foot-links a { font-size: 14px; color: var(--muted); text-decoration: none; }
.site-foot .foot-links a:hover { color: var(--accent); }
.site-foot .bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; flex-wrap: wrap; gap: 10px;
}
.site-foot .bottom span { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted); }

/* Search-as-you-type suggestion list (e.g. the grievance form's "Regarding"
   field) — a dropdown panel anchored under its text input. */
.autocomplete-suggestions {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.autocomplete-option { padding: 8px 12px; font-size: 14px; cursor: pointer; }
.autocomplete-option:hover { background: rgba(232,98,44,0.15); }
.autocomplete-option.secondary { color: var(--muted); border-top: 1px solid var(--border); }

/* Full-screen overlay modal (currently used for the click-through waiver
   review/acceptance flow). */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-scroll-text {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  overflow-y: auto;
  flex: 1;
  min-height: 160px;
  max-height: 45vh;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 14px 0;
}
/* Handbook-review variant: holds rendered Markdown (not preformatted text), so
   let it wrap normally and give each section a clear divider + heading. */
.modal-scroll-text.handbook-doc { white-space: normal; }
.hb-agree-sec + .hb-agree-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.hb-agree-sec-title {
  font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}

/* --- Club Handbook (member Club Rules + By-Laws) --- */
.handbook-toggle { display: flex; gap: 6px; margin: 6px 0 22px; flex-wrap: wrap; }
.hb-btn {
  font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 999px; width: auto;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.hb-btn:hover { border-color: var(--accent); color: var(--text); }
.hb-btn.active { background: rgba(232,98,44,0.15); border-color: var(--accent); color: var(--accent); }
.handbook-doc { max-width: 74ch; line-height: 1.7; }
.handbook-doc h3 { font-size: 21px; margin: 28px 0 8px; color: var(--text); }
.handbook-doc h4 { font-size: 16.5px; font-weight: 700; margin: 24px 0 7px; color: var(--text); }
.handbook-doc h3:first-child, .handbook-doc h4:first-child { margin-top: 0; }
.handbook-doc p { margin: 0 0 12px; color: var(--muted); }
.handbook-doc ul { margin: 0 0 16px; padding-left: 20px; }
.handbook-doc li { margin: 0 0 7px; color: var(--muted); line-height: 1.6; }
.handbook-doc strong { color: var(--text); font-weight: 600; }
.handbook-doc a { color: var(--accent); text-decoration: none; cursor: pointer; }
.handbook-doc a:hover { text-decoration: underline; }

/* Profile photo preview + directory opt-in checkboxes */
.pf-photo { width: 120px; height: 120px; border-radius: 10px; overflow: hidden; flex: 0 0 auto;
  background: var(--surface-raised, #1e2733); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-photo span { color: var(--muted); font-size: 12px; }
.dir-check { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: var(--text); font-size: 14px; cursor: pointer; }
.dir-check input { width: auto; margin: 0; }

/* Member directory + content-review card grids */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.dir-card { background: var(--surface-raised, #1e2733); border: 1px solid var(--border); border-radius: 10px; padding: 18px 14px; text-align: center; }
.dir-avatar { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; margin: 0 auto 10px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; }
.dir-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dir-avatar span { color: #1b1310; font-family: var(--font-display, inherit); font-weight: 700; font-size: 28px; }
.dir-name { color: var(--text); font-weight: 600; }
.dir-title { margin-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.dir-contact { margin-top: 6px; font-size: 12.5px; line-height: 1.5; }
.dir-contact a { color: var(--accent); text-decoration: none; }
.dir-contact a:hover { text-decoration: underline; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.review-card { text-align: center; }
.review-card .pf-photo { margin: 0 auto 8px; }
.review-note { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* Profile-photo crop/zoom stage */
.crop-stage { width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 1 / 1;
  border-radius: 10px; overflow: hidden; background: #000; touch-action: none; }
.crop-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.crop-stage canvas:active { cursor: grabbing; }

/* Member file library */
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.file-chip { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 999px;
  padding: 5px 13px; font-size: 13px; cursor: pointer; font-family: inherit; }
.file-chip:hover { color: var(--text); border-color: var(--muted); }
.file-chip.active { background: var(--accent); border-color: var(--accent); color: #1b1310; font-weight: 600; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.file-card { display: flex; gap: 14px; background: var(--surface-raised, #1e2733); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.file-thumb { width: 72px; height: 72px; flex: 0 0 auto; border-radius: 8px; overflow: hidden;
  background: rgba(232, 98, 44, 0.12); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.file-thumb.has-img { background: #000; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-ext { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: 0.03em; }
.file-body { min-width: 0; flex: 1; }
.file-title { color: var(--text); font-weight: 600; }
.file-badge { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(232, 98, 44, 0.15);
  color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.file-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.file-desc { color: var(--muted); font-size: 13px; margin-top: 6px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.file-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.file-tag { font-size: 11.5px; color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 9px; cursor: pointer; }
.file-tag:hover { color: var(--text); border-color: var(--muted); }
.file-tag.active { color: var(--accent); border-color: var(--accent); }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
a.btn-sm { display: inline-flex; align-items: center; text-decoration: none; }
.review-files { display: flex; flex-direction: column; gap: 14px; }
.review-file { display: flex; gap: 14px; align-items: flex-start; }
.review-file .file-thumb { width: 56px; height: 56px; }

/* Event flyer preview overlay */
.flyer-backdrop { z-index: 1100; padding: 24px; }
.flyer-overlay { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  width: min(92vw, 880px); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.flyer-overlay-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 11px 12px 11px 18px; border-bottom: 1px solid var(--border); }
.flyer-overlay-title { font-weight: 600; color: var(--text); font-size: 15px; }
.flyer-overlay-actions { display: flex; gap: 8px; align-items: center; }
.flyer-overlay-body { flex: 1 1 auto; min-height: 0; background: #0f141a; overflow: auto; }
.flyer-overlay-body.is-img { display: flex; align-items: center; justify-content: center; padding: 14px; }
.flyer-overlay-body.is-img img { max-width: 100%; max-height: 84vh; display: block; }
.flyer-pdf { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px; }
.flyer-pdf-page { max-width: 100%; background: #fff; border-radius: 2px; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.flyer-pdf-loading, .flyer-pdf-fallback { color: var(--muted); font-size: 14px; text-align: center; padding: 52px 20px; }
.handbook-updated { margin: 22px 0 0; font-size: 12.5px; color: var(--muted); }
