/*
  FONTS: For local hosting, download these two families from Google Fonts:
    https://fonts.google.com/specimen/Outfit  (weights 300,400,500,600,700)
    https://fonts.google.com/specimen/DM+Serif+Display (regular + italic)
  Then replace this @import with local @font-face declarations pointing to
  your served font files (e.g. /fonts/Outfit-VariableFont.woff2).
*/
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=DM+Serif+Display:ital@0;1&display=swap');


/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS — dark mode (default)
═══════════════════════════════════════════════════════════ */
:root {
  --bg:               #0B0F1E;
  --bg-gradient:      radial-gradient(ellipse at 20% 0%, #111830 0%, #0B0F1E 60%);
  --surface:          rgba(255, 255, 255, 0.06);
  --surface-hover:    rgba(255, 255, 255, 0.10);
  --surface-border:   rgba(255, 255, 255, 0.10);
  --surface-strong:   rgba(255, 255, 255, 0.12);

  --text-primary:     #E8ECF4;
  --text-secondary:   rgba(232, 236, 244, 0.50);
  --text-muted:       rgba(232, 236, 244, 0.30);

  --sidebar-bg:             rgba(11, 15, 30, 0.70);
  --sidebar-border:         rgba(255, 255, 255, 0.07);
  --sidebar-active:         rgba(255, 255, 255, 0.10);
  --sidebar-active-border:  rgba(96, 239, 188, 0.50);

  --topbar-bg:        rgba(11, 15, 30, 0.60);
  --topbar-border:    rgba(255, 255, 255, 0.07);

  --blob-a:           rgba(96,  239, 188, 0.22);
  --blob-b:           rgba(96,  150, 239, 0.18);
  --blob-c:           rgba(239,  96, 198, 0.15);
  --blob-d:           rgba(239, 192,  96, 0.12);

  --accent-green:     #60EFBC;
  --accent-blue:      #60C6EF;
  --accent-pink:      #EF60C6;
  --accent-amber:     #EFC060;
  --accent-purple:    #A060EF;

  /* Per-event palette — cycle through these by index */
  --event-a:          #60EFBC;
  --event-b:          #60C6EF;
  --event-c:          #EF60C6;
  --event-d:          #EFC060;
  --event-e:          #A060EF;

  /* Text-safe accent colors — same as accent in dark mode,
     overridden to darker WCAG-AA compliant shades in light mode */
  --text-accent-green:  #60EFBC;
  --text-accent-blue:   #60C6EF;
  --text-accent-pink:   #EF60C6;
  --text-accent-amber:  #EFC060;
  --text-accent-purple: #A060EF;

  --btn-primary-bg:    linear-gradient(135deg, #60EFBC, #60C6EF);
  --btn-primary-color: #0B0F1E;
  --btn-ghost-border:  rgba(255, 255, 255, 0.20);
  --btn-ghost-color:   var(--text-secondary);

  --scrollbar-thumb:  rgba(255, 255, 255, 0.12);
  --scrollbar-track:  transparent;

  --shadow-card:      0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-elevated:  0 16px 48px rgba(0, 0, 0, 0.50);

  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  22px;
  --radius-xl:  28px;

  --font-body:    'Outfit', sans-serif;
  --font-display: 'DM Serif Display', serif;
  
  --ink: #e9e7e2;
  --ink-muted: #b4b0a8;
  --page: #17191b;
  --panel: #23262a;
  --rule: #454a50;
  --link: #8fbdf0;
  --link-visited: #c9a7e8;
  --accent: #e0b877;
}


/* ═══════════════════════════════════════════════════════════
   LIGHT MODE OVERRIDES
   Applied when OS preference is light AND data-theme="auto",
   or when data-theme="light" is set explicitly on <html>.
═══════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
    --bg:               #EBF0FF;
    --bg-gradient:      radial-gradient(ellipse at 20% 0%, #DDE8FF 0%, #EBF0FF 60%);
    --surface:          rgba(255, 255, 255, 0.65);
    --surface-hover:    rgba(255, 255, 255, 0.85);
    --surface-border:   rgba(80, 110, 200, 0.14);
    --surface-strong:   rgba(255, 255, 255, 0.80);

    --text-primary:     #1A2050;
    --text-secondary:   rgba(26,  32,  80, 0.55);
    --text-muted:       rgba(26,  32,  80, 0.35);

    --sidebar-bg:             rgba(235, 240, 255, 0.80);
    --sidebar-border:         rgba(80, 110, 200, 0.12);
    --sidebar-active:         rgba(96, 239, 188, 0.18);
    --sidebar-active-border:  rgba(60, 200, 140, 0.70);

    --topbar-bg:        rgba(235, 240, 255, 0.70);
    --topbar-border:    rgba(80, 110, 200, 0.10);

    --blob-a:           rgba(96,  239, 188, 0.30);
    --blob-b:           rgba(96,  150, 239, 0.22);
    --blob-c:           rgba(239,  96, 198, 0.18);
    --blob-d:           rgba(239, 192,  96, 0.18);

    --btn-primary-bg:    linear-gradient(135deg, #2EC99A, #3AAED6);
    --btn-primary-color: #ffffff;
    --btn-ghost-border:  rgba(26, 32, 80, 0.20);
    --btn-ghost-color:   var(--text-secondary);

    --text-accent-green:  #0C7A4E;
    --text-accent-blue:   #0F62A0;
    --text-accent-pink:   #A8126A;
    --text-accent-amber:  #8A5200;
    --text-accent-purple: #5C12B8;

    /* Event palette in light mode — darker for text legibility on light surfaces */
    --event-a:  #0C7A4E;
    --event-b:  #0F62A0;
    --event-c:  #A8126A;
    --event-d:  #8A5200;
    --event-e:  #5C12B8;

    --scrollbar-thumb:  rgba(26, 32, 80, 0.12);
    --shadow-card:      0 4px 24px rgba(26, 32, 80, 0.08);
    --shadow-elevated:  0 12px 40px rgba(26, 32, 80, 0.14);

    --ink: #1a1a1a;
    --ink-muted: #4a4a4a;
    --page: #fdfdfc;
    --panel: #f1efe9;
    --rule: #c9c5bb;
    --link: #0b4f9e;
    --link-visited: #6b3a8f;
    --accent: #7a4b12;
  }
}

html[data-theme="light"] {
  --bg:               #EBF0FF;
  --bg-gradient:      radial-gradient(ellipse at 20% 0%, #DDE8FF 0%, #EBF0FF 60%);
  --surface:          rgba(255, 255, 255, 0.65);
  --surface-hover:    rgba(255, 255, 255, 0.85);
  --surface-border:   rgba(80, 110, 200, 0.14);
  --surface-strong:   rgba(255, 255, 255, 0.80);

  --text-primary:     #1A2050;
  --text-secondary:   rgba(26, 32, 80, 0.55);
  --text-muted:       rgba(26, 32, 80, 0.35);

  --sidebar-bg:             rgba(235, 240, 255, 0.80);
  --sidebar-border:         rgba(80, 110, 200, 0.12);
  --sidebar-active:         rgba(96, 239, 188, 0.18);
  --sidebar-active-border:  rgba(60, 200, 140, 0.70);

  --topbar-bg:        rgba(235, 240, 255, 0.70);
  --topbar-border:    rgba(80, 110, 200, 0.10);

  --blob-a:           rgba(96,  239, 188, 0.30);
  --blob-b:           rgba(96,  150, 239, 0.22);
  --blob-c:           rgba(239,  96, 198, 0.18);
  --blob-d:           rgba(239, 192,  96, 0.18);

  --btn-primary-bg:    linear-gradient(135deg, #2EC99A, #3AAED6);
  --btn-primary-color: #ffffff;
  --btn-ghost-border:  rgba(26, 32, 80, 0.20);
  --btn-ghost-color:   var(--text-secondary);

  --text-accent-green:  #0C7A4E;
  --text-accent-blue:   #0F62A0;
  --text-accent-pink:   #A8126A;
  --text-accent-amber:  #8A5200;
  --text-accent-purple: #5C12B8;

  /* Event palette in light mode — darker for text legibility on light surfaces */
  --event-a:  #0C7A4E;
  --event-b:  #0F62A0;
  --event-c:  #A8126A;
  --event-d:  #8A5200;
  --event-e:  #5C12B8;

  --scrollbar-thumb:  rgba(26, 32, 80, 0.12);
  --shadow-card:      0 4px 24px rgba(26, 32, 80, 0.08);
  --shadow-elevated:  0 12px 40px rgba(26, 32, 80, 0.14);

  --ink: #1a1a1a;
  --ink-muted: #4a4a4a;
  --page: #fdfdfc;
  --panel: #f1efe9;
  --rule: #c9c5bb;
  --link: #0b4f9e;
  --link-visited: #6b3a8f;
  --accent: #7a4b12;
}

/* html[data-theme="dark"] needs no block — :root is the dark default. */


/* ═══════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

a      { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }


/* ═══════════════════════════════════════════════════════════
   AURORA BACKGROUND
═══════════════════════════════════════════════════════════ */
#aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg-gradient);
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.blob-a {
  width: 600px; height: 600px;
  top: -150px; left: -100px;
  background: radial-gradient(circle, var(--blob-a) 0%, transparent 70%);
  animation: floatA 10s ease-in-out infinite;
}
.blob-b {
  width: 700px; height: 700px;
  top: 30%; right: -200px;
  background: radial-gradient(circle, var(--blob-b) 0%, transparent 70%);
  animation: floatB 13s ease-in-out infinite;
}
.blob-c {
  width: 500px; height: 500px;
  bottom: -100px; left: 25%;
  background: radial-gradient(circle, var(--blob-c) 0%, transparent 70%);
  animation: floatC 11s ease-in-out infinite;
}
.blob-d {
  width: 400px; height: 400px;
  top: 60%; left: 40%;
  background: radial-gradient(circle, var(--blob-d) 0%, transparent 70%);
  animation: floatD 9s ease-in-out infinite;
}

@keyframes floatA {
  0%, 100% { transform: translateY(0px)   scale(1.00); }
  50%       { transform: translateY(-30px) scale(1.06); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0px)  scale(1.00); }
  50%       { transform: translateY(25px) scale(0.94); }
}
@keyframes floatC {
  0%, 100% { transform: translateY(-10px) scale(1.00); }
  50%       { transform: translateY(20px)  scale(1.04); }
}
@keyframes floatD {
  0%, 100% { transform: translate(0px,   0px); }
  33%       { transform: translate(20px, -15px); }
  66%       { transform: translate(-15px, 10px); }
}


/* ═══════════════════════════════════════════════════════════
   APP SHELL
═══════════════════════════════════════════════════════════ */
#app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* Applied on pages that have no sidebar (e.g. login, register, welcome).
   Collapses the grid to a single full-width column. */
#app.no-sidebar {
  grid-template-columns: 1fr;
}


/* ── SIDEBAR ──────────────────────────────────────────── */
#sidebar {
  grid-row: 1 / 3;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--sidebar-border);
  padding: 24px 16px;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 24px;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 20px;
}

.logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.logo-sub {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 6px;
  margin-top: 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--text-primary);
  border-color: var(--sidebar-active-border);
  font-weight: 600;
}

.nav-item.active .nav-icon { color: var(--text-accent-green); opacity: 1; }
.nav-item:hover  .nav-icon { opacity: 1; }

.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-badge {
  margin-left: auto;
  background: rgba(239, 192, 96, 0.20);
  color: var(--text-accent-amber);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid rgba(239, 192, 96, 0.30);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--sidebar-border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--surface-border);
}

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--btn-primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--btn-primary-color);
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}


/* ── TOPBAR ───────────────────────────────────────────── */
#topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  background: var(--topbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--topbar-border);
  gap: 16px;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 300;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

#theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}

#theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

#theme-toggle svg { width: 16px; height: 16px; fill: currentColor; }

/* Hidden on desktop; shown on mobile */
#menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-secondary);
  align-items: center; justify-content: center;
  flex-shrink: 0;
}

#menu-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }


/* ── BUTTONS ──────────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 22px;
  border: none;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: opacity 0.18s, transform 0.18s;
}

.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
}

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 22px;
  border: 1px solid var(--btn-ghost-border);
  background: transparent;
  color: var(--btn-ghost-color);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
  font-family: var(--font-body);
  cursor: pointer;
}

/* <input type="submit"> has no children, so flex/inline-flex as a container
   value is inconsistently handled across browsers. inline-block is correct. */
input.btn-ghost {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text-primary);
}


/* ── MAIN CONTENT AREA ────────────────────────────────── */
#main {
  padding: 28px 32px 48px;
  min-width: 0;
  overflow-x: hidden;
}


/* ── GLASS CARD ───────────────────────────────────────── */
.glass {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.glass-strong {
  background: var(--surface-strong);
}


/* ── SECTION HEADER ───────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.section-link {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover { color: var(--text-primary); }


/* ── CONTENT WRAPPER ──────────────────────────────────── */
/*
  Wraps #topbar + #main as a single grid column-2 child.
  When the mobile sidebar opens, blur and dim are applied
  here via filter + ::after. The sidebar lives outside this
  wrapper so it is never affected.
*/
#content-wrapper {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  position: relative;
  /* Needed so the ::after pseudo covers exactly this area */
  overflow: hidden;
  transition: filter 0.28s cubic-bezier(.32,.72,0,1);
}

/* Dim layer — zero opacity by default, fades in when sidebar opens */
#content-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(.32,.72,0,1);
  z-index: 50;
}

/* Both effects activate together via a class on #app */
#app.sidebar-open #content-wrapper {
  filter: blur(3px);
}

#app.sidebar-open #content-wrapper::after {
  opacity: 1;
  pointer-events: auto; /* intercept taps to close the drawer */
}


/* ═══════════════════════════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}

/* Colored top-edge rule — set --text-accent-color per card */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--text-accent-color, var(--text-accent-green));
  opacity: 0.7;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--text-accent-color, var(--text-accent-green));
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-delta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.delta-up   { color: var(--text-accent-green); }
.delta-down { color: var(--text-accent-pink); }


/* ═══════════════════════════════════════════════════════════
   DASHBOARD BODY GRID
═══════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}


/* ═══════════════════════════════════════════════════════════
   EVENT LIST ROWS
═══════════════════════════════════════════════════════════ */
.event-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Set --ev-color on the row element to theme the whole row */
.event-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.18s;
  cursor: default;
}

.event-row:hover { background: var(--surface-hover); }
a.event-row      { cursor: pointer; }
a.event-row      { cursor: pointer; }

.event-dot-wrap {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--ev-color) 12%, transparent);
  border:     1px solid color-mix(in srgb, var(--ev-color) 30%, transparent);
}

.event-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ev-color);
}

.event-info { flex: 1; min-width: 0; }

.event-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
}

.event-date {
  font-size: 12px;
  color: var(--text-muted);
}

.event-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ev-color);
  opacity: 0.8;
}

.event-progress-wrap {
  margin-top: 7px;
  height: 3px;
  background: var(--surface-border);
  border-radius: 2px;
  overflow: hidden;
}

.event-progress-bar {
  height: 100%;
  background: var(--ev-color);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(.22,.61,.36,1);
}

.event-fill {
  text-align: right;
  min-width: 44px;
}

.event-fill-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--ev-color);
}

.event-fill-denom {
  font-size: 11px;
  color: var(--text-muted);
}

.event-status-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid;
}


/* ═══════════════════════════════════════════════════════════
   ALERT CARD
═══════════════════════════════════════════════════════════ */
.alert-card {
  padding: 18px;
  border-color: rgba(239, 192, 96, 0.25) !important;
  background:   color-mix(in srgb, rgba(239,192,96,0.08) 100%, var(--surface)) !important;
}

.alert-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-accent-amber);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Pulsing dot indicator */
.alert-label::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-amber);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1.00); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

.alert-event-name {
  font-size: 15px;
  font-weight: 600;
}

.alert-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.alert-progress {
  margin: 12px 0;
  height: 4px;
  background: rgba(239, 192, 96, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.alert-progress-bar {
  height: 100%;
  background: var(--accent-amber);
  border-radius: 2px;
}

.btn-alert {
  width: 100%;
  padding: 9px 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 192, 96, 0.35);
  background: rgba(239, 192, 96, 0.10);
  color: var(--text-accent-amber);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: background 0.18s;
}

.btn-alert:hover { background: rgba(239, 192, 96, 0.20); }


/* ═══════════════════════════════════════════════════════════
   LEADERBOARD
═══════════════════════════════════════════════════════════ */
.leaderboard-card { padding: 18px; }

.leader-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--surface-border);
}

.leader-row:last-child { border-bottom: none; }

.leader-rank {
  font-family: var(--font-display);
  font-size: 22px;
  min-width: 28px;
  line-height: 1;
}

.leader-info { flex: 1; min-width: 0; }

.leader-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leader-bar-wrap {
  height: 3px;
  background: var(--surface-border);
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}

.leader-bar { height: 100%; border-radius: 2px; }

.leader-hours {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}


/* ═══════════════════════════════════════════════════════════
   SCHEDULE CARD
═══════════════════════════════════════════════════════════ */
.schedule-card {
  padding: 0;
  overflow: hidden;
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.schedule-item:last-child { border-bottom: none; }
.schedule-item:hover      { background: var(--surface-hover); }

.schedule-date-badge {
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.schedule-day {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.schedule-num {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  color: var(--text-primary);
}

.schedule-info { flex: 1; min-width: 0; }

.schedule-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-slots {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.schedule-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.quick-stat-card { padding: 18px; }


/* ═══════════════════════════════════════════════════════════
   PAGE ENTER ANIMATIONS
═══════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.stats-grid     { animation: fadeUp 0.4s ease both; }
.dashboard-grid { animation: fadeUp 0.4s 0.1s ease both; }


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  ≤ 1024px
═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤ 680px
═══════════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  /* Sidebar becomes a slide-in drawer */
  #sidebar {
    grid-row: unset;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(.32,.72,0,1);
    z-index: 100;
  }

  #sidebar.open { transform: translateX(0); }

  #topbar {
    padding: 0 16px;
  }

  #main {
    padding: 20px 16px 48px;
  }

  #menu-toggle { display: flex; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-value { font-size: 28px; }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  /* Collapse button label on narrow topbar */
  .topbar-right .btn-primary span { display: none; }
  .topbar-right .btn-primary      { padding: 9px 12px; }
}

/* ═══════════════════════════════════════════════════════════
   PAGE TOOLBAR
   Sits at the top of <main> on list/detail pages.
   Holds: search + filter tabs + optional view toggle.
═══════════════════════════════════════════════════════════ */
.page-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ── SEARCH INPUT ─────────────────────────────────────── */
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 340px;
}

.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  stroke: var(--text-muted);
  fill: none;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 22px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.18s, background 0.18s;
  outline: none;
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  border-color: rgba(96, 239, 188, 0.40);
  background: var(--surface-hover);
}

/* ── FILTER TABS ──────────────────────────────────────── */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 22px;
  padding: 4px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.filter-tab {
  padding: 6px 16px;
  border-radius: 18px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

.filter-tab:hover { color: var(--text-primary); }

.filter-tab.active {
  background: var(--surface-strong);
  color: var(--text-primary);
}

/* ── VIEW TOGGLE ──────────────────────────────────────── */
.view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 3px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-left: auto;
}

.view-toggle-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.view-toggle-btn svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none; stroke-width: 1.8;
}

.view-toggle-btn:hover { color: var(--text-primary); }

.view-toggle-btn.active {
  background: var(--surface-strong);
  color: var(--text-primary);
}

/* ── STATUS PILLS ─────────────────────────────────────── */
/*
  Usage: <span class="status-pill status-open">Open</span>

  Event statuses:
    status-open     — recruiting ongoing, future event       (green)
    status-full     — fully staffed, future event            (amber)
    status-live     — event is happening right now           (pink, pulsing dot)
    status-planning — not yet open for sign-ups              (blue)
    status-finished — event has ended                        (muted)

  Task / generic statuses:
    status-active   — in progress (used in project-detail)   (green)
    status-overdue  — past due date, action required         (amber)

  Modifier classes can be combined with .status-pill or .event-status-pill.
*/
.status-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
}

/* Recruiting — future event, slots still available */
.status-open {
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-green) 10%, transparent);
}

/* Kept for project-detail task usage */
.status-active {
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-green) 10%, transparent);
}

.status-planning {
  color: var(--text-accent-blue);
  border-color: color-mix(in srgb, var(--accent-blue) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-blue) 10%, transparent);
}

.status-finished {
  color: var(--text-muted);
  border-color: var(--surface-border);
  background:   var(--surface);
}

.status-cancelled {
  color: var(--text-muted);
  border-color: var(--surface-border);
  background:   var(--surface);
}

/* Fully staffed, event is still upcoming */
.status-full {
  color: var(--text-accent-amber);
  border-color: color-mix(in srgb, var(--accent-amber) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-amber) 10%, transparent);
}

/* Past due date — action required */
.status-overdue {
  color: var(--text-accent-amber);
  border-color: color-mix(in srgb, var(--accent-amber) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-amber) 10%, transparent);
}

/* Not yet published */
.status-unpublished {
  color: var(--text-accent-pink);
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-pink) 10%, transparent);
  padding-left: 20px;
  position: relative;
}

/* Happening right now — pulsing dot prefix */
.status-live {
  color: var(--text-accent-pink);
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-pink) 10%, transparent);
  padding-left: 20px;
  position: relative;
}

.status-live::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-accent-pink);
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1;   transform: translateY(-50%) scale(1);    }
  50%       { opacity: 0.4; transform: translateY(-50%) scale(0.65); }
}

/* ── EMPTY STATE ──────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;   /* span all columns in a grid context */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  color: var(--text-muted);
  text-align: center;
  gap: 10px;
}

.empty-state svg {
  width: 40px; height: 40px;
  stroke: var(--text-muted); fill: none; stroke-width: 1.5;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-state-sub {
  font-size: 13px;
}

/* ── RESPONSIVE: TOOLBAR ──────────────────────────────── */
@media (max-width: 680px) {
  .page-toolbar { gap: 8px; }
  .search-wrap  { max-width: none; flex: 1 1 100%; order: -1; }
  .view-toggle  { margin-left: 0; }
}


/* ═══════════════════════════════════════════════════════════
   EVENTS PAGE — event card & list/tile layout
═══════════════════════════════════════════════════════════ */

/* ── EVENT CARD: shared base ──────────────────────────────
   One markup structure; layout is driven by the class
   on #events-container (.view-list or .view-tiles).
──────────────────────────────────────────────────────────── */
.event-card {
  --ev-color: var(--accent-green);

  display: block;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  overflow: hidden;
  position: relative;
}

.event-card:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.ec-accent   { background: var(--ev-color); flex-shrink: 0; }
.ec-body     { flex: 1; min-width: 0; }
.ec-name     { font-size: 14px; font-weight: 700; line-height: 1.3; }
.ec-meta     { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

.ec-category {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ev-color); opacity: 0.9;
}

.ec-location {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 3px;
}

.ec-location svg {
  width: 10px; height: 10px; stroke: currentColor;
  fill: none; stroke-width: 2; flex-shrink: 0;
}

.ec-date-text { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.ec-progress-wrap {
  margin-top: 8px;
  height: 3px;
  background: var(--surface-border);
  border-radius: 2px;
  overflow: hidden;
}

.ec-progress-bar { height: 100%; background: var(--ev-color); border-radius: 2px; }

.ec-slots {
  font-size: 11px; color: var(--text-secondary); margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
}

.ec-slots-num { font-weight: 700; color: var(--ev-color); }

.ec-status-wrap { flex-shrink: 0; }

.ec-arrow {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity 0.15s, transform 0.15s;
  display: flex; align-items: center;
}

.event-card:hover .ec-arrow { opacity: 1; transform: translateX(2px); }


/* ── LIST VIEW ────────────────────────────────────────────── */
#events-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#events-container.view-list {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

#events-container.view-list .event-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--surface-border);
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: 0;
  transform: none;
}

#events-container.view-list .event-card:last-of-type { border-bottom: none; }
#events-container.view-list .event-card:hover        { transform: none; box-shadow: none; }

#events-container.view-list .ec-accent { width: 3px; align-self: stretch; flex-shrink: 0; }
#events-container.view-list .ec-body   { padding: 14px 16px; flex: 1; min-width: 0; }

#events-container.view-list .ec-name {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#events-container.view-list .ec-progress-wrap { display: none; }
#events-container.view-list .ec-meta          { display: none; }
#events-container.view-list .ec-slots         { display: none; }
#events-container.view-list .ec-visibility-wrap { width: 120px; flex-shrink: 0; padding: 0 12px; }
#events-container.view-list .ec-status-wrap   { width: 100px; flex-shrink: 0; padding: 0 12px; }
#events-container.view-list .ec-arrow         { width: 40px;  flex-shrink: 0; padding: 0; justify-content: center; }
#events-container.view-list .ec-footer        { display: none; }

#events-container.view-tiles .ec-visibility-wrap  { display: none; }
#events-container.view-tiles .ec-status-wrap  { display: none; }
#events-container.view-tiles .ec-arrow        { display: none; }

#events-container.view-list .ec-date-col,
#events-container.view-list .ec-slots-col { display: block; }

/* List-mode columns (hidden by default, shown in list view) */
.ec-date-col  { display: none; width: 110px; flex-shrink: 0; padding: 0 12px; }
.ec-slots-col { display: none; width: 90px;  flex-shrink: 0; padding: 0 12px; }

.ec-date-col-day {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted);
}

.ec-date-col-full {
  font-family: var(--font-display);
  font-size: 20px; line-height: 1; color: var(--text-primary);
}

.ec-slots-col-bar {
  height: 3px; background: var(--surface-border);
  border-radius: 2px; overflow: hidden; margin-bottom: 5px;
}

.ec-slots-col-fill { height: 100%; background: var(--ev-color); border-radius: 2px; }
.ec-slots-col-label { font-size: 11px; color: var(--text-secondary); font-weight: 600; }


/* ── TILES VIEW ───────────────────────────────────────────── */
#events-container.view-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

#events-container.view-tiles .event-card { display: flex; flex-direction: column; padding: 0; }
#events-container.view-tiles .ec-accent  { height: 3px; width: 100%; }
#events-container.view-tiles .ec-body    { padding: 16px 16px 12px; flex: 1; }
#events-container.view-tiles .ec-name    { font-size: 15px; margin-bottom: 2px; }

#events-container.view-tiles .ec-progress-wrap { display: block; }
#events-container.view-tiles .ec-date-text     { display: block; }

#events-container.view-tiles .ec-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--surface-border);
  margin-top: auto;
}

#events-container.view-tiles .ec-date-col,
#events-container.view-tiles .ec-slots-col { display: none; }


/* ── LIST HEADER ROW ─────────────────────────────────────── */
#list-header {
  display: none;
  align-items: center;
  gap: 0;
  padding: 8px 0;
  margin-bottom: -1px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.lh-accent { width: 3px; flex-shrink: 0; }
.lh-name   { flex: 1; padding: 0 16px; }
.lh-date   { width: 110px; padding: 0 12px; }
.lh-slots  { width: 90px; padding: 0 12px; }
.lh-visibility { width: 120px; padding: 0 12px; flex-shrink: 0; }
.lh-status { width: 100px; padding: 0 12px; flex-shrink: 0; }
.lh-arrow  { width: 40px; }

.lh-label {
  font-size: 9px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--text-muted);
}

/* Page-enter animation */
#list-header,
#events-container { animation: fadeUp 0.35s ease both; }


/* ── RESPONSIVE: EVENTS PAGE ─────────────────────────────── */
@media (max-width: 1024px) {
  #events-container.view-tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  #events-container.view-tiles { grid-template-columns: 1fr; }

  #events-container.view-list .ec-date-col,
  #events-container.view-list .ec-slots-col { display: none; }

  #events-container.view-list .ec-meta  { display: flex; }
  #events-container.view-list .ec-slots { display: flex; }

  #list-header { display: none !important; }
  #events-container.view-list { border-radius: var(--radius-lg); }
}


/* ═══════════════════════════════════════════════════════════
   AUTH & FORMS
   Used by: index.html (welcome), login.html, register.html
═══════════════════════════════════════════════════════════ */

/* ── AUTH LAYOUT ──────────────────────────────────────────
   Full-viewport centering for pre-auth pages.
   Works inside a bare <main> with no sidebar present.
──────────────────────────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  gap: 0;
}

/* Branding block above the card */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  overflow: hidden;
}

.auth-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.auth-brand-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: -4px;
}

/* Glass card container */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-elevated);
  padding: 36px 32px;
}

.auth-card-title {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-card-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Footer link beneath the card */
.auth-footer {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.auth-footer a {
  color: var(--text-accent-green);
  font-weight: 600;
  transition: opacity 0.15s;
}

.auth-footer a:hover { opacity: 0.75; }


/* ── FORM COMPONENTS ──────────────────────────────────────── */

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Row: two fields side-by-side (e.g. first + last name) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-label .optional {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  font-size: 11px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.18s, background 0.18s;
  outline: none;
  -webkit-appearance: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: rgba(96, 239, 188, 0.50);
  background: var(--surface-hover);
}

/* Password reveal wrapper */
.form-input-wrap {
  position: relative;
}

.form-input-wrap .form-input {
  padding-right: 42px;
}

.form-input-reveal {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.form-input-reveal:hover { color: var(--text-primary); }
.form-input-reveal svg   { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Hint text below an input */
.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -2px;
  line-height: 1.4;
}

/* Field divider (optional section separator) */
.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 4px 0;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--surface-border);
}

/* Submit button — full-width variant of .btn-primary */
.btn-submit {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.18s;
}

.btn-submit:hover { opacity: 0.88; transform: translateY(-1px); }


/* ── WELCOME / HERO PAGE ──────────────────────────────────── */

.welcome-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.welcome-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 20px;
}

.welcome-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.welcome-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--text-accent-green);
  margin-bottom: 14px;
}

.welcome-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text-primary);
  max-width: 640px;
  margin-bottom: 18px;
}

.welcome-headline em {
  font-style: italic;
  color: var(--text-accent-green);
}

.welcome-body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 36px;
  font-weight: 300;
}

.welcome-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 56px;
}

/* Larger CTA for the welcome page */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 28px;
  border: none;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.18s, transform 0.18s;
  letter-spacing: 0.2px;
}

.btn-cta:hover { opacity: 0.88; transform: translateY(-2px); }

.btn-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 28px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}

.btn-cta-ghost:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Feature highlights beneath the CTAs */
.welcome-features {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.welcome-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 120px;
}

.welcome-feature-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.welcome-feature-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

/* ── RESPONSIVE: AUTH PAGES ───────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .form-row  { grid-template-columns: 1fr; }

  .welcome-actions { flex-direction: column; align-items: stretch; }
  .btn-cta,
  .btn-cta-ghost   { justify-content: center; }
}


/* ═══════════════════════════════════════════════════════════
   EVENTS PAGE — category filters & category badges
═══════════════════════════════════════════════════════════ */

/* ── CATEGORY FILTER BAR ─────────────────────────────────
   Sits beneath the main toolbar row on the Events page.
──────────────────────────────────────────────────────────── */
.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.category-filter-bar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 2px;
  white-space: nowrap;
}

.cat-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.cat-filter-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.cat-filter-btn.active {
  background: color-mix(in srgb, var(--text-accent-green) 12%, transparent);
  border-color: color-mix(in srgb, var(--text-accent-green) 40%, transparent);
  color: var(--text-accent-green);
}

/* Dot indicator inside category button */
.cat-filter-btn .cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
  flex-shrink: 0;
}


/* ── CATEGORY BADGES ON CARDS ────────────────────────────── */
.ec-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.ec-cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  white-space: nowrap;
}


/* ── CATEGORY COLUMN (list view, desktop only) ───────────── */
.ec-cat-col {
  display: none;        /* shown by view-list context below */
  width: 210px;
  flex-shrink: 0;
  padding: 0 12px;
}

/* Compact inline badges inside the list column */
.ec-cat-col .ec-categories {
  margin-top: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.ec-cat-col .ec-cat-badge {
  font-size: 10px;
  padding: 2px 7px;
}

/* Header cell */
.lh-categories {
  width: 210px;
  padding: 0 12px;
  flex-shrink: 0;
}


/* ── SHOW/HIDE RULES BY VIEW MODE ────────────────────────── */

/* List view — desktop: show column, hide body badges */
#events-container.view-list .ec-cat-col    { display: block; }
#events-container.view-list .ec-categories { display: none; }

/* Re-show the .ec-categories that live *inside* the list column.
   Needs higher specificity than the hide rule above (0,4,0 > 0,3,0). */
#events-container.view-list .ec-cat-col .ec-categories { display: flex; }

/* Fade the right edge of the column when badges overflow.
   The column is position:relative so the ::after can be absolute. */
.ec-cat-col {
  position: relative;
}

.ec-cat-col::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 28px;
  height: 100%;
  background: linear-gradient(to right, transparent, var(--surface));
  pointer-events: none;
  /* Only visible when there is actually overflow — approximated by
     always rendering it; the gradient is imperceptible on short lists
     because the column background matches the row background. */
}

/* In list view the row background is the container background, so
   the gradient target colour needs to match the card surface. */
#events-container.view-list .ec-cat-col::after {
  background: linear-gradient(to right, transparent, var(--surface));
}

#events-container.view-list .event-card:hover .ec-cat-col::after {
  background: linear-gradient(to right, transparent, var(--surface-hover));
}

/* Tile view — show body badges, never show column */
#events-container.view-tiles .ec-cat-col    { display: none; }
#events-container.view-tiles .ec-categories { display: flex; }

/* Mobile: always hide the column regardless of view mode */
@media (max-width: 680px) {
  #events-container.view-list .ec-cat-col    { display: none; }
  #events-container.view-list .ec-categories { display: none; }
  .lh-categories                             { display: none; }
}


/* ═══════════════════════════════════════════════════════════
   PROJECT DETAIL PAGE
═══════════════════════════════════════════════════════════ */

/* ── PAGE GRID ──────────────────────────────────────────── */
.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* ── PROJECT HEADER ─────────────────────────────────────── */
.project-header {
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

/* Subtle accent glow in top-left corner */
.project-header::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-green) 18%, transparent), transparent 70%);
  pointer-events: none;
}

.project-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.project-title {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: var(--text-primary);
}

.project-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.project-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 720px;
  margin-bottom: 20px;
}

.project-meta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.project-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

.project-meta-item svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
  opacity: 0.6; flex-shrink: 0;
}

.project-meta-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.project-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

/* Overall project progress bar */
.project-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--surface-border);
  border-radius: 3px;
  overflow: hidden;
  max-width: 320px;
}

.project-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.project-progress-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-accent-green);
  white-space: nowrap;
}

.project-progress-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}


/* ── TASK TREE ──────────────────────────────────────────── */
.task-tree {
  list-style: none;
  margin: 0; padding: 0;
}

/* Nested list — indented, connected by a vertical line */
.task-children {
  list-style: none;
  margin: 0; padding: 0 0 0 20px;
  border-left: 1px solid var(--surface-border);
  margin-left: 18px;
}

.task-item {
  position: relative;
}

/* Horizontal connector from the vertical rail to the row */
.task-children > .task-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 20px;
  width: 12px;
  height: 1px;
  background: var(--surface-border);
}

.task-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  min-height: 44px;
}

.task-row:hover {
  background: var(--surface-hover);
}

/* Toggle button (expand/collapse) */
.task-toggle {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border-radius: 5px;
  padding: 0;
  margin-right: 4px;
  transition: background 0.15s, color 0.15s, transform 0.2s;
}

.task-toggle:hover {
  background: var(--surface-border);
  color: var(--text-primary);
}

.task-toggle svg {
  width: 12px; height: 12px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
  stroke-linecap: round;
  transition: transform 0.2s;
}

/* Collapsed state — chevron points right */
.task-item.collapsed > .task-row .task-toggle svg { transform: rotate(-90deg); }

/* Leaf node — show a dot instead of toggle */
.task-toggle.leaf {
  cursor: default;
  pointer-events: none;
}

.task-toggle.leaf svg { display: none; }

.task-toggle.leaf::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--surface-border);
  display: block;
}

/* Task name */
.task-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.task-name.done {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Task status */
.task-status-wrap {
  flex-shrink: 0;
  margin-right: 12px;
}

/* Task volunteer fill */
.task-fill-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 70px;
}

.task-fill-bar-wrap {
  width: 60px; height: 3px;
  background: var(--surface-border);
  border-radius: 2px; overflow: hidden;
}

.task-fill-bar {
  height: 100%;
  background: var(--ev-color, var(--accent-green));
  border-radius: 2px;
}

.task-fill-label {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Collapsed children are hidden */
.task-item.collapsed > .task-children { display: none; }

/* Separator between top-level tasks */
.task-tree > .task-item + .task-item {
  border-top: 1px solid var(--surface-border);
  margin-top: 2px;
  padding-top: 2px;
}


/* ── TIMELINE ───────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0;
}

.timeline-item {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child { padding-bottom: 0; }

/* Vertical rail */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--surface-border);
}

.timeline-item:last-child::before { display: none; }

.timeline-dot-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 3px;
}

.timeline-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  background: var(--bg);
  flex-shrink: 0;
  z-index: 1;
}

.timeline-dot.done    { background: var(--accent-green); border-color: var(--accent-green); }
.timeline-dot.active  { background: var(--accent-blue);  border-color: var(--accent-blue); }
.timeline-dot.warning { background: var(--accent-amber); border-color: var(--accent-amber); }

.timeline-body { flex: 1; min-width: 0; padding-bottom: 2px; }

.timeline-date {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.timeline-detail {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}


/* ── TEAM ROSTER ────────────────────────────────────────── */
.team-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--surface-border);
}

.team-member:last-child { border-bottom: none; }

.team-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.team-member-info { flex: 1; min-width: 0; }

.team-member-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.team-member-role {
  font-size: 11px;
  color: var(--text-muted);
}

.team-member-hours {
  font-size: 11px; font-weight: 700;
  color: var(--text-accent-green);
  white-space: nowrap;
  flex-shrink: 0;
}


/* ── ACTIVITY FEED ──────────────────────────────────────── */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.activity-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.activity-icon svg {
  width: 13px; height: 13px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
}

.activity-body { flex: 1; min-width: 0; }

.activity-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.activity-text strong { color: var(--text-primary); font-weight: 600; }
.activity-text a      { font-weight: 700; }

.activity-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}


/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .project-detail-grid {
    grid-template-columns: 1fr 260px;
    gap: 16px;
  }
}

@media (max-width: 680px) {
  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .project-header { padding: 20px; }
  .project-title  { font-size: 22px; }

  .project-header-top { flex-direction: column; align-items: flex-start; }
  .project-header-actions { width: 100%; }
  .project-header-actions .btn-primary,
  .project-header-actions .btn-ghost { flex: 1; justify-content: center; }

  /* Hide fill bar on mobile task rows — too cramped */
  .task-fill-bar-wrap { display: none; }
  .task-fill-label    { font-size: 11px; }
}


/* ═══════════════════════════════════════════════════════════
   SETTINGS PAGES
═══════════════════════════════════════════════════════════ */

/* ── SETTINGS SUB-NAVIGATION ────────────────────────────── */
.settings-subnav {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 4px;
  flex-wrap: wrap;
}

.settings-subnav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: calc(var(--radius-md) - 4px);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.settings-subnav-link:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.settings-subnav-link.active {
  background: var(--surface-strong);
  color: var(--text-primary);
  font-weight: 600;
}

.settings-subnav-link svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}


/* ── SETTINGS INDEX CARDS ───────────────────────────────── */
.settings-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.settings-index-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
}

.settings-index-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-elevated);
}

.settings-index-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-green) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-green) 25%, transparent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.settings-index-icon svg {
  width: 18px; height: 18px;
  stroke: var(--text-accent-green); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.settings-index-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-index-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

.settings-index-card-arrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-accent-green);
}


/* ── SETTINGS FORM LAYOUT ───────────────────────────────── */
/* Stack of glass panels, one per logical section */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}

.settings-section {
  padding: 24px 28px;
}

.settings-section-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--surface-border);
}

.settings-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.settings-section-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Save / cancel action row at bottom of a form */
.settings-save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* ── TOGGLE SWITCH (boolean settings) ───────────────────── */
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--surface-border);
}

.settings-toggle-row:last-child { border-bottom: none; }

.settings-toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.settings-toggle-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Pill-shaped toggle built on a hidden checkbox */
.toggle-switch {
  position: relative;
  width: 36px; height: 20px;
  flex-shrink: 0;
}

.toggle-switch input {
  position: absolute;
  opacity: 0; width: 0; height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: var(--surface-border);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-track {
  background: color-mix(in srgb, var(--accent-green) 25%, transparent);
  border-color: color-mix(in srgb, var(--accent-green) 45%, transparent);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(16px);
  background: var(--text-accent-green);
}


/* ── ROLE BADGES ────────────────────────────────────────── */
.role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
}

.role-badge.admin {
  color: var(--text-accent-purple);
  border-color: color-mix(in srgb, var(--text-accent-purple) 35%, transparent);
  background: color-mix(in srgb, var(--text-accent-purple) 10%, transparent);
}

.role-badge.coordinator {
  color: var(--text-accent-blue);
  border-color: color-mix(in srgb, var(--text-accent-blue) 35%, transparent);
  background: color-mix(in srgb, var(--text-accent-blue) 10%, transparent);
}

.role-badge.moderator {
  color: var(--text-accent-amber);
  border-color: color-mix(in srgb, var(--text-accent-amber) 35%, transparent);
  background: color-mix(in srgb, var(--text-accent-amber) 10%, transparent);
}

.role-badge.volunteer {
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--text-accent-green) 35%, transparent);
  background: color-mix(in srgb, var(--text-accent-green) 10%, transparent);
}

.role-badge.suspended {
  color: var(--text-muted);
  border-color: var(--surface-border);
  background: var(--surface);
  text-decoration: line-through;
}


/* ── USER TABLE ─────────────────────────────────────────── */
.user-table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
}

.user-row {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
  gap: 0;
}

.user-row:last-child { border-bottom: none; }
.user-row:hover { background: var(--surface-hover); }

/* Shared width tokens for header + rows to stay in sync */
.lhu-identity,
.user-row-identity  { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.lhu-role,
.user-row-role      { width: 130px; flex-shrink: 0; }
.lhu-email,
.user-row-email      { width: 130px; flex-shrink: 0; }
.lhu-phone,
.user-row-phone      { width: 130px; flex-shrink: 0; }
.lhu-status,
.user-row-status      { width: 130px; flex-shrink: 0; }
.lhu-activity,
.user-row-activity  { width: 120px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.lhu-actions,
.user-row-actions   { width: 140px; flex-shrink: 0; display: flex; gap: 6px; justify-content: flex-end; }

.user-row-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.user-row-email {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Compact icon-only action buttons */
.btn-row-action {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: transparent;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.btn-row-action:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--surface-border);
}

.btn-row-action.warn:hover {
  background: color-mix(in srgb, var(--accent-amber) 12%, transparent);
  color: var(--text-accent-amber);
  border-color: color-mix(in srgb, var(--accent-amber) 35%, transparent);
}

.btn-row-action.danger:hover {
  background: color-mix(in srgb, var(--accent-pink) 12%, transparent);
  color: var(--text-accent-pink);
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
}

.btn-row-action svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Pending-approval callout banner */
.pending-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--accent-amber) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-amber) 30%, transparent);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pending-banner-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-accent-amber);
  display: flex; align-items: center; gap: 8px;
}

.pending-banner-text svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; flex-shrink: 0;
}

.pending-banner-actions { display: flex; gap: 6px; }

.pending-banner.error {
  background: color-mix(in srgb, var(--accent-pink) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent-pink) 30%, transparent);
}

.pending-banner.error .pending-banner-text {
  color: var(--text-accent-pink);
}


/* ── CATEGORY MANAGEMENT ────────────────────────────────── */
.category-manage-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

.category-manage-list {
  display: flex;
  flex-direction: column;
}

.category-manage-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.category-manage-row:last-child { border-bottom: none; }
.category-manage-row:hover { background: var(--surface-hover); }

.drag-handle {
  color: var(--text-muted);
  opacity: 0.4;
  cursor: grab;
  flex-shrink: 0;
  display: flex; align-items: center;
}

.drag-handle:active { cursor: grabbing; }

.drag-handle svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round;
}

.category-color-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.10);
}

.category-manage-name {
  flex: 1;
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
}

.category-manage-slug {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  padding: 1px 7px;
  flex-shrink: 0;
}

.category-manage-count {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 56px;
  text-align: right;
}

/* Color swatch radio picker */
.color-swatch-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

.color-swatch-option {
  position: relative;
  width: 24px; height: 24px;
}

.color-swatch-option input[type="radio"] {
  position: absolute;
  opacity: 0; width: 0; height: 0;
}

.color-swatch-option label {
  display: block;
  width: 24px; height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  box-sizing: border-box;
  transition: transform 0.15s, border-color 0.15s;
}

.color-swatch-option label:hover { transform: scale(1.2); }

.color-swatch-option input:checked + label {
  border-color: var(--text-primary);
  transform: scale(1.1);
  box-shadow: 0 0 0 2px var(--bg);
}


/* ── TEAMS MANAGEMENT CARDS ─────────────────────────────── */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.team-manage-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-manage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.team-manage-name {
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
}

.team-manage-desc {
  font-size: 12px; color: var(--text-secondary);
  line-height: 1.5;
}

.team-manage-leads {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.team-lead-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 2px;
}

.team-lead-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 3px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent-green) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-green) 25%, transparent);
  font-size: 11px; font-weight: 600;
  color: var(--text-accent-green);
}

.team-lead-chip .team-avatar {
  width: 18px; height: 18px;
  font-size: 7px;
  background: color-mix(in srgb, var(--accent-green) 20%, transparent);
  border-color: transparent;
}

.team-manage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--surface-border);
  margin-top: auto;
  gap: 8px;
}

.team-member-avatars {
  display: flex;
  flex-direction: row-reverse;
}

.team-member-avatars .team-avatar {
  width: 26px; height: 26px;
  font-size: 9px;
  margin-left: -8px;
  border: 2px solid var(--surface);
}

.team-member-avatars .team-avatar:last-child { margin-left: 0; }

.team-member-count {
  font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 5px;
}

.team-member-count svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

/* New-team / edit-team inline form panel */
.team-form-panel {
  padding: 24px 28px;
}

.team-form-panel.hidden { display: none; }


/* ── SYSTEM STATUS INDICATORS ───────────────────────────── */
.status-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface-border);
}

.status-indicator:last-child { border-bottom: none; }

.status-indicator-label {
  font-size: 13px; color: var(--text-secondary);
}

.status-indicator-value {
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.ok      { background: var(--accent-green); }
.status-dot.warn    { background: var(--accent-amber); }
.status-dot.error   { background: var(--accent-pink); }


/* ── SETTINGS RESPONSIVE ────────────────────────────────── */
@media (max-width: 1024px) {
  .settings-index-grid       { grid-template-columns: repeat(2, 1fr); }
  .category-manage-layout    { grid-template-columns: 1fr 260px; }
}

@media (max-width: 680px) {
  /* Sub-nav: hide text labels, show icons only */
  .settings-subnav-link .subnav-label { display: none; }
  .settings-subnav-link { padding: 8px 12px; }

  .settings-index-grid    { grid-template-columns: 1fr; }
  .settings-form          { max-width: 100%; }
  .settings-section       { padding: 16px; }

  .category-manage-layout { grid-template-columns: 1fr; }
  .category-manage-slug   { display: none; }

  .teams-grid             { grid-template-columns: 1fr; }

  /* User table: hide last-active column, stack actions */
  .user-table-header      { display: none; }
  .user-row-activity      { display: none; }
  .user-row               { flex-wrap: wrap; padding: 12px 16px; gap: 8px; }
  .user-row-identity      { flex: 1 1 100%; }
  .user-row-role          { width: auto; }
  .user-row-actions       { width: auto; margin-left: auto; }
}


/* ── SELECT / COMBOBOX ────────────────────────────────────── */
.form-select-wrap {
  position: relative;
}

.form-select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.18s, background 0.18s;
  outline: none;
}

.form-select:focus {
  border-color: rgba(96, 239, 188, 0.50);
  background: var(--surface-hover);
}

.form-select option[value=""][disabled] {
  color: var(--text-muted);
}

.form-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  pointer-events: none;
  color: var(--text-muted);
}


/* ── BADGE MULTI-SELECT ───────────────────────────────────── */
.badge-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

.badge-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  background: var(--surface-strong);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  user-select: none;
}

.badge-option:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.badge-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.badge-option:has(input:checked) {
  background: color-mix(in srgb, var(--text-accent-green) 12%, transparent);
  border-color: color-mix(in srgb, var(--text-accent-green) 40%, transparent);
  color: var(--text-accent-green);
  font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════
   USER PROFILE HERO
   Used on edit-role page to identify the subject user.
═══════════════════════════════════════════════════════════ */
.user-profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.user-profile-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 2px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.user-profile-info { flex: 1; min-width: 0; }

.user-profile-name {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.user-profile-email {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.user-profile-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-profile-meta-item {
  font-size: 11px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}

.user-profile-meta-item svg {
  width: 11px; height: 11px;
  stroke: currentColor; fill: none; stroke-width: 2;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════
   ROLE SELECTOR CARDS
   Radio-card pattern — one card per role, highlighted on check.
═══════════════════════════════════════════════════════════ */
.role-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Each option is a <label> wrapping a hidden <input type="radio"> */
.role-option {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 2px solid var(--surface-border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  position: relative;
}

.role-option:hover {
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--accent-green) 30%, transparent);
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0; width: 0; height: 0;
  pointer-events: none;
}

/* Selected state */
.role-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent-green) 55%, transparent);
  background: color-mix(in srgb, var(--accent-green) 7%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-green) 20%, transparent);
}

/* Checkmark in top-right corner */
.role-option::after {
  content: '';
  position: absolute;
  top: 12px; right: 12px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  background: var(--surface-strong);
  transition: border-color 0.15s, background 0.15s;
}

.role-option:has(input:checked)::after {
  background: var(--text-accent-green);
  border-color: var(--text-accent-green);
  /* Checkmark drawn with box-shadow trick */
  box-shadow: inset 0 0 0 3px var(--bg);
}

.role-option-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.role-option-icon svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.role-option-name {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary);
}

.role-option-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

/* Permission bullet list inside each card */
.permissions-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
  border-top: 1px solid var(--surface-border);
  padding-top: 10px;
  margin-top: 2px;
}

.permissions-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.permissions-list li::before {
  content: '';
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface-border);
}

.permissions-list li.allowed {
  color: var(--text-secondary);
}

.permissions-list li.allowed::before {
  background: var(--text-accent-green);
  /* Quick checkmark via clip */
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolyline points='2 6 5 9 10 3' stroke='white' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/cover;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolyline points='2 6 5 9 10 3' stroke='white' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/cover;
}

.permissions-list li.denied {
  color: var(--text-muted);
  opacity: 0.6;
}

.permissions-list li.denied::before {
  background: var(--surface-border);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cline x1='3' y1='3' x2='9' y2='9' stroke='currentColor' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='9' y1='3' x2='3' y2='9' stroke='currentColor' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/cover;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cline x1='3' y1='3' x2='9' y2='9' stroke='currentColor' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='9' y1='3' x2='3' y2='9' stroke='currentColor' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/cover;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cline x1='3' y1='3' x2='9' y2='9' stroke='currentColor' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='9' y1='3' x2='3' y2='9' stroke='currentColor' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/cover;
}


/* ═══════════════════════════════════════════════════════════
   DANGER ZONE
   Destructive account actions, visually separated.
═══════════════════════════════════════════════════════════ */
.danger-zone {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--accent-pink) 30%, transparent);
  background: color-mix(in srgb, var(--accent-pink) 5%, transparent);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.danger-zone-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-accent-pink);
}

.danger-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.danger-action-info { flex: 1; min-width: 0; }

.danger-action-label {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
}

.danger-action-desc {
  font-size: 12px; color: var(--text-muted);
  margin-top: 2px; line-height: 1.4;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--accent-pink) 40%, transparent);
  background: color-mix(in srgb, var(--accent-pink) 10%, transparent);
  color: var(--text-accent-pink);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--accent-pink) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent-pink) 55%, transparent);
}

.btn-danger svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.btn-warn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--accent-amber) 40%, transparent);
  background: color-mix(in srgb, var(--accent-amber) 10%, transparent);
  color: var(--text-accent-amber);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-warn:hover {
  background: color-mix(in srgb, var(--accent-amber) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent-amber) 55%, transparent);
}

.btn-warn svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}


/* ═══════════════════════════════════════════════════════════
   PENDING REGISTRATIONS
   Extends the user-table pattern with extra columns.
═══════════════════════════════════════════════════════════ */
.lhu-joined,
.user-row-joined {
  width: 110px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.lhu-note,
.user-row-note {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-secondary);
  padding-right: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inline rejection-reason textarea that appears on Reject click */
.reject-reason-wrap {
  display: none;
  width: 100%;
  padding: 8px 16px 12px 56px; /* aligns with avatar indent */
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.reject-reason-wrap.open {
  display: flex;
}

.reject-reason-wrap textarea {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  resize: vertical;
  outline: none;
  min-height: 60px;
  transition: border-color 0.18s;
}

.reject-reason-wrap textarea:focus {
  border-color: rgba(239, 96, 198, 0.45);
}

.btn-row-action.approve:hover {
  background: color-mix(in srgb, var(--accent-green) 12%, transparent);
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
}


/* ═══════════════════════════════════════════════════════════
   TEAM MEMBERSHIP PAGE
═══════════════════════════════════════════════════════════ */
.team-membership-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

/* Compact member rows — avatar + name/email + remove button */
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.member-row:last-child { border-bottom: none; }
.member-row:hover { background: var(--surface-hover); }

.member-row-info { flex: 1; min-width: 0; }

.member-row-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.member-row-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Add-member panel (right rail) */
.add-member-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/*
 * Scroll-contained list body — used inside both the member list and candidate
 * list panels so that neither can grow the page unboundedly.
 * min() adapts the cap on short/landscape viewports too.
 */
.panel-scroll-body {
  max-height: min(480px, 60vh);
  min-height: 120px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Candidate rows in the add panel — lighter treatment */
.candidate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.candidate-row:last-child { border-bottom: none; }
.candidate-row:hover { background: var(--surface-hover); }

.candidate-row-info { flex: 1; min-width: 0; }

.candidate-row-name {
  font-size: 13px; font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.candidate-row-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Team selector strip at top of membership page */
.team-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.team-selector-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
  white-space: nowrap;
}

.team-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.team-selector-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.team-selector-btn.active {
  background: color-mix(in srgb, var(--text-accent-green) 12%, transparent);
  border-color: color-mix(in srgb, var(--text-accent-green) 40%, transparent);
  color: var(--text-accent-green);
  font-weight: 600;
}


/* ── RESPONSIVE (new pages) ─────────────────────────────── */
@media (max-width: 680px) {
  .role-options          { grid-template-columns: 1fr; }
  .team-membership-layout { grid-template-columns: 1fr; }
  .panel-scroll-body      { max-height: min(300px, 50vh); }

  /* Pending table: hide joined column on mobile */
  .lhu-joined, .user-row-joined { display: none; }

  /* Rejection textarea: remove indent */
  .reject-reason-wrap { padding-left: 16px; }

  /* Profile hero: stack on tiny screens */
  .user-profile-hero { flex-direction: column; align-items: flex-start; gap: 12px; }
}


/* ═══════════════════════════════════════════════════════════
   SIDEBAR USER-CARD AS LINK
═══════════════════════════════════════════════════════════ */
a.user-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

a.user-card:hover {
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
}

a.user-card:hover .user-name {
  color: var(--text-accent-green);
}

/* Chevron hint on hover */
a.user-card .user-card-chevron {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  color: var(--text-muted);
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

a.user-card:hover .user-card-chevron {
  opacity: 1;
}


/* ═══════════════════════════════════════════════════════════
   MY PROFILE PAGE
═══════════════════════════════════════════════════════════ */

/* Avatar editor — larger version of team-avatar with an edit overlay */
.profile-avatar-wrap {
  position: relative;
  width: 72px; height: 72px;
  flex-shrink: 0;
}

.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--btn-primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700;
  color: var(--btn-primary-color);
  border: 2px solid var(--surface-border);
}

.profile-avatar-edit {
  position: absolute;
  bottom: 0; right: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

.profile-avatar-edit:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.profile-avatar-edit svg {
  width: 10px; height: 10px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}


/* Active sessions list */
.session-list {
  display: flex;
  flex-direction: column;
}

.session-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--surface-border);
}

.session-row:last-child { border-bottom: none; }

.session-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.session-icon svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.session-info { flex: 1; min-width: 0; }

.session-device {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
}

.session-meta {
  font-size: 11px; color: var(--text-muted);
  margin-top: 1px;
}

.session-current-badge {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--text-accent-green);
  background: color-mix(in srgb, var(--accent-green) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-green) 25%, transparent);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}


/* Profile stats strip */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--surface-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.profile-stat {
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-stat-value {
  font-size: 22px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.profile-stat-label {
  font-size: 11px; color: var(--text-muted);
}


/* Notification matrix — label + row of toggles */
.notif-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.notif-header-row {
  display: flex;
  align-items: center;
  padding: 6px 0 8px;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 2px;
}

.notif-header-row .notif-event-col { flex: 1; }

.notif-channel-label {
  width: 64px;
  text-align: center;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.notif-row {
  display: flex;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--surface-border);
}

.notif-row:last-child { border-bottom: none; }

.notif-event-col {
  flex: 1;
  font-size: 13px; color: var(--text-secondary);
}

.notif-toggle-col {
  width: 64px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}


/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 680px) {
  .profile-stats { grid-template-columns: repeat(2, 1fr); }

  /* Collapse notification channel columns — stack instead */
  .notif-header-row { display: none; }
  .notif-row { flex-wrap: wrap; gap: 6px; }
  .notif-toggle-col { width: auto; justify-content: flex-start; gap: 4px; }
  .notif-toggle-col::before {
    font-size: 10px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.8px;
  }
}


/* ═══════════════════════════════════════════════════════════
   CALLOUT BLOCKS
   Contextual information panels — not action-oriented banners.
═══════════════════════════════════════════════════════════ */

/* Base callout — extend with a colour modifier */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  margin-bottom: 20px;
}

.callout-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-icon svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.callout-body { flex: 1; min-width: 0; }

.callout-title {
  font-size: 13px; font-weight: 600;
  margin-bottom: 4px;
}

.callout-text {
  font-size: 12px; color: var(--text-secondary);
  line-height: 1.6;
}

.callout-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--surface-border);
}

.callout-meta-item {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}

.callout-meta-item svg {
  width: 11px; height: 11px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

/* Amber / warning variant */
.callout.warn {
  border-color: color-mix(in srgb, var(--accent-amber) 30%, transparent);
  background: color-mix(in srgb, var(--accent-amber) 6%, transparent);
  color: var(--text-accent-amber);
}

.callout.warn .callout-text  { color: var(--text-secondary); }
.callout.warn .callout-meta  { border-top-color: color-mix(in srgb, var(--accent-amber) 20%, transparent); }

/* Pink / danger variant */
.callout.danger {
  border-color: color-mix(in srgb, var(--accent-pink) 30%, transparent);
  background: color-mix(in srgb, var(--accent-pink) 6%, transparent);
  color: var(--text-accent-pink);
}

.callout.danger .callout-text { color: var(--text-secondary); }

/* Green / info variant */
.callout.info {
  border-color: color-mix(in srgb, var(--accent-green) 25%, transparent);
  background: color-mix(in srgb, var(--accent-green) 5%, transparent);
  color: var(--text-accent-green);
}

.callout.info .callout-text  { color: var(--text-secondary); }
.callout.info .callout-meta  { border-top-color: color-mix(in srgb, var(--accent-green) 20%, transparent); }


/* ── REQUIRED FIELD MARKER ───────────────────────────────── */
/* <abbr class="required" title="Required">*</abbr> next to a label */
abbr.required {
  text-decoration: none;
  color: var(--text-accent-pink);
  font-weight: 700;
  margin-left: 3px;
}


/* ═══════════════════════════════════════════════════════════
   EVENT DETAIL PAGE
═══════════════════════════════════════════════════════════ */

/* ── EVENT HEADER ───────────────────────────────────────── */
/*
 * Mirrors .project-header but the corner glow uses --ev-color
 * so each event gets its own accent rather than always green.
 */
.event-header {
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.event-header::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(
          circle,
          color-mix(in srgb, var(--ev-color, var(--accent-green)) 18%, transparent),
          transparent 70%
  );
  pointer-events: none;
}

.event-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.event-header-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.event-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.4px;
  line-height: 1.15;
  color: var(--text-primary);
}

.event-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

/* ── EVENT ACTION BAR ───────────────────────────────────── */
/* Standalone row of event-level actions, sitting between the stats
   grid and the header so the set can grow without squeezing the title. */
.event-action-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.event-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 680px;
  margin-bottom: 18px;
}

/* Slot fill bar — prominent version for the event header */
.event-slot-fill {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.event-slot-bar-wrap {
  flex: 1;
  max-width: 280px;
  height: 6px;
  background: var(--surface-border);
  border-radius: 3px;
  overflow: hidden;
}

.event-slot-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(
          90deg,
          var(--ev-color, var(--accent-green)),
          color-mix(in srgb, var(--ev-color, var(--accent-green)) 60%, var(--accent-blue))
  );
  transition: width 0.4s ease;
}

.event-slot-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.event-slot-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}


/* ── INLINE EDIT PANEL ──────────────────────────────────── */
/*
 * Sits directly below the event header inside the same glass card,
 * separated by a border. Hidden by default; .open toggles visibility.
 * Using max-height animation avoids layout shift during transition.
 */
.event-edit-panel {
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  overflow: hidden;
  transition: grid-template-rows 0.3s ease;
}

.event-edit-panel.open {
  grid-template-rows: minmax(0,1fr);
}

.event-edit-panel-inner {
  /* Grid items default to min-height:auto, which floors the 0fr track at the
     content's min-content height and prevents the panel from collapsing. */
  min-height: 0;
  border-top: 1px solid var(--surface-border);
  padding: 24px 32px;
}

.event-edit-panel-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}


/* ── VOLUNTEER LIST ─────────────────────────────────────── */
/* Extends the team-member pattern with shift and sign-up columns */
.volunteer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.volunteer-row:last-child { border-bottom: none; }
.volunteer-row:hover { background: var(--surface-hover); }

.volunteer-row-info { flex: 1; min-width: 0; }

.volunteer-row-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.volunteer-row-sub {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.volunteer-row-shift {
  flex-shrink: 0;
  width: 90px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
}

.volunteer-col-header {
  display: flex;
  align-items: center;
  padding: 6px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
}

.volunteer-col-header .vch-name  { flex: 1; }
.volunteer-col-header .vch-shift { width: 90px; flex-shrink: 0; text-align: right; }
.volunteer-col-header .vch-act   { width: 36px; flex-shrink: 0; }


/* ── INLINE ADD ROW ─────────────────────────────────────── */
/*
 * Compact search + add control at the top of a panel.
 * Used for adding volunteers and linking project tasks.
 */
.inline-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-strong);
}

.inline-add-row .search-wrap {
  flex: 1;
}

.inline-add-row .search-input {
  font-size: 12px;
}


/* ── LINKED TASK ROWS ───────────────────────────────────── */
.linked-task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.linked-task-row:last-child { border-bottom: none; }
.linked-task-row:hover { background: var(--surface-hover); }

.linked-task-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.linked-task-icon svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.linked-task-info { flex: 1; min-width: 0; }

.linked-task-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.linked-task-project {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


/* ── CATEGORY INLINE MANAGEMENT (right rail) ────────────── */
.cat-manage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-border);
  min-height: 48px;
}

/* Category tag with a remove ✕ button */
.cat-manage-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  transition: border-color 0.15s;
}

.cat-manage-tag:hover {
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
}

.cat-manage-remove {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.cat-manage-remove:hover {
  background: color-mix(in srgb, var(--accent-pink) 15%, transparent);
  color: var(--text-accent-pink);
}

.cat-manage-remove svg {
  width: 9px; height: 9px;
  stroke: currentColor; fill: none; stroke-width: 3;
  stroke-linecap: round;
}

.cat-add-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 16px;
}

.cat-add-select {
  width: 100%;
}


/* ── EVENT DETAIL RESPONSIVE ────────────────────────────── */
@media (max-width: 1024px) {
  .event-header         { padding: 24px 24px; }
  .event-edit-panel-inner { padding: 20px 24px; }
}

@media (max-width: 680px) {
  .event-header         { padding: 18px 16px; }
  .event-title          { font-size: 22px; }
  .event-header-top     { flex-direction: column; align-items: flex-start; }
  .event-header-actions { width: 100%; }
  .event-header-actions .btn-primary,
  .event-header-actions .btn-ghost { flex: 1; justify-content: center; }
  .event-edit-panel-inner { padding: 16px; }
  .volunteer-row-shift  { display: none; }
  .volunteer-col-header .vch-shift { display: none; }
  .event-action-bar { padding: 10px 12px; }
  .event-action-bar .btn-primary,
  .event-action-bar .btn-ghost { flex: 1 1 100%; justify-content: center; }
}


/* ═══════════════════════════════════════════════════════════
   TASK DETAIL PAGES
═══════════════════════════════════════════════════════════ */

/* ── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.breadcrumb-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb-link:hover { color: var(--text-accent-green); }

.breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.4;
  font-size: 11px;
  user-select: none;
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 600;
}


/* ── TASK HEADER CARD ───────────────────────────────────── */
/*
 * Lighter than .project-header — tasks are nested objects,
 * so the header is more compact and the accent is understated.
 */
.task-header {
  padding: 24px 28px;
  margin-bottom: 24px;
}

.task-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.task-header-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.task-title {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--text-primary);
}

.task-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.task-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 640px;
  margin-bottom: 16px;
}

.task-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.task-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

.task-meta-item svg {
  width: 12px; height: 12px;
  stroke: currentColor; fill: none; stroke-width: 2;
  opacity: 0.6; flex-shrink: 0;
}

/* Slot fill bar — compact version for task header */
.task-slot-fill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-slot-bar-wrap {
  width: 80px;
  height: 5px;
  background: var(--surface-border);
  border-radius: 3px;
  overflow: hidden;
}

.task-slot-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  transition: width 0.4s ease;
}

.task-slot-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}


/* ── CONTEXT PANEL ITEMS ────────────────────────────────── */
/* Chips used in the right rail to show linked event / teams */
.context-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.context-chip:hover {
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
  color: var(--text-primary);
}

.context-chip svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  color: var(--text-muted);
}

.context-chip-none {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
}

.context-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-border);
}

.context-section:last-child { border-bottom: none; }

.context-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.context-chips {
  display: flex;
  flex-direction: column;
  gap: 4px;
}


/* ── TASK EDIT PAGE HEADER ──────────────────────────────── */
/* Compact page-scope header used on the three edit pages */
.task-edit-scope {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.task-edit-scope-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.task-edit-scope-icon svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.task-edit-scope-info { flex: 1; min-width: 0; }

.task-edit-scope-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.task-edit-scope-project {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.task-edit-scope .status-pill { flex-shrink: 0; }


/* ── TASK DETAIL RESPONSIVE ─────────────────────────────── */
@media (max-width: 1024px) {
  .task-header { padding: 20px 20px; }
}

@media (max-width: 680px) {
  .task-header { padding: 16px 16px; }
  .task-title  { font-size: 20px; }
  .task-header-top  { flex-direction: column; align-items: flex-start; }
  .task-header-actions { width: 100%; }
  .task-header-actions .btn-primary,
  .task-header-actions .btn-ghost  { flex: 1; justify-content: center; }
  .task-edit-scope { flex-wrap: wrap; }
  .breadcrumb  { gap: 6px; font-size: 11px; }
}


/* ═══════════════════════════════════════════════════════════
   PUBLIC SCHEDULE PAGE
═══════════════════════════════════════════════════════════ */

/* ── ENROLLED BADGE ──────────────────────────────────────── */
/* Used on event cards where the current user has signed up. */
.enrolled-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  color: var(--text-accent-green);
  background: color-mix(in srgb, var(--accent-green) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-green) 35%, transparent);
  white-space: nowrap;
  vertical-align: middle;
  flex-shrink: 0;
}

.enrolled-badge svg {
  width: 10px; height: 10px;
  stroke: currentColor; fill: none; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── ENROLLED CARD VARIANT ───────────────────────────────── */
/* A subtle green tint + stronger border on enrolled event cards.
   --ev-color is already set by the server; this override only
   applies to the border so the card accent still uses the event's
   own colour.                                                  */
.event-card.enrolled {
  border-color: color-mix(in srgb, var(--accent-green) 40%, transparent);
  background: color-mix(in srgb, var(--accent-green) 4%, var(--surface));
}

.event-card.enrolled:hover {
  background: color-mix(in srgb, var(--accent-green) 6%, var(--surface-hover));
}

/* ── ENROLLED SUMMARY BAR ────────────────────────────────── */
/* Banner shown at the top of the schedule page when the user
   has at least one enrolled event.                             */
.enrolled-summary-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 28px;
  border-color: color-mix(in srgb, var(--accent-green) 30%, transparent) !important;
  background: color-mix(in srgb, var(--accent-green) 6%, var(--surface)) !important;
  animation: fadeUp 0.35s ease both;
}

.enrolled-summary-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-green) 16%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--accent-green) 40%, transparent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.enrolled-summary-icon svg {
  width: 16px; height: 16px;
  stroke: var(--accent-green); fill: none; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.enrolled-summary-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.enrolled-summary-text strong { color: var(--text-primary); font-weight: 600; }
.enrolled-summary-text em     { font-style: normal; font-weight: 600; color: var(--text-accent-green); }

/* ── MONTH GROUPING ──────────────────────────────────────── */
.month-group {
  margin-bottom: 36px;
  animation: fadeUp 0.35s ease both;
}

.month-group + .month-group { animation-delay: 0.06s; }
.month-group + .month-group + .month-group { animation-delay: 0.12s; }

.month-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--surface-border);
}

/* Pulsing live dot on the "Live Now" group heading */
.month-heading-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-pink);
  display: inline-block;
  animation: live-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* ── SCHEDULE EVENT ROWS ─────────────────────────────────── */
/* Each event in the public schedule list. Extends .event-card. */
.sched-event-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.sched-event-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: none !important;
  border-bottom: 1px solid var(--surface-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s;
}

.sched-event-row:last-child { border-bottom: none !important; }

.sched-event-row:hover {
  background: var(--surface-hover) !important;
  transform: none !important;
  box-shadow: none !important;
}

.sched-event-row.enrolled {
  border-color: transparent !important;
  /* Left green stripe as enrolled indicator */
  border-left: 3px solid var(--accent-green) !important;
}

/* Date badge — large calendar-style date in left column */
.sched-date-badge {
  width: 64px;
  flex-shrink: 0;
  text-align: center;
  padding: 14px 12px;
  border-right: 1px solid var(--surface-border);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sched-date-month {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
}

.sched-date-day {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.1;
  color: var(--text-primary);
}

.sched-event-row.enrolled .sched-date-day { color: var(--text-accent-green); }

/* Middle content area */
.sched-event-body {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
}

.sched-event-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.sched-event-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.sched-event-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.sched-meta-sep {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 11px;
}

.sched-event-location {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-event-location svg {
  width: 11px; height: 11px;
  stroke: currentColor; fill: none; stroke-width: 2;
  flex-shrink: 0;
}

/* Mini slot-fill bar */
.sched-event-fill {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sched-slots-bar-wrap {
  width: 80px;
  height: 3px;
  background: var(--surface-border);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.sched-slots-bar {
  height: 100%;
  background: var(--ev-color, var(--accent-green));
  border-radius: 2px;
}

.sched-event-row.enrolled .sched-slots-bar { background: var(--accent-green); }

.sched-slots-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Right column: status + arrow */
.sched-event-right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 0 12px;
  flex-shrink: 0;
}

.sched-arrow {
  font-size: 16px;
  color: var(--text-muted);
  opacity: 0.4;
  transition: opacity 0.15s, transform 0.15s;
}

.sched-event-row:hover .sched-arrow { opacity: 0.9; transform: translateX(2px); }

/* ── SCHEDULE RESPONSIVE ─────────────────────────────────── */
@media (max-width: 680px) {
  .sched-date-badge { width: 52px; padding: 12px 8px; }
  .sched-date-day   { font-size: 22px; }
  .sched-event-right .status-pill { display: none; }
  .sched-slots-bar-wrap { display: none; }
  .sched-event-location { display: none; }
}


/* ── SIDEBAR GUEST PROMPT ────────────────────────────────── */
/* Shown in sidebar footer when no user is logged in.
   Replaces the .user-card block.                              */
.sidebar-guest-prompt {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-guest-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.sidebar-guest-prompt .btn-primary {
  width: 100%;
  justify-content: center;
  font-size: 13px;
}


/* ═══════════════════════════════════════════════════════════
   PUBLIC EVENT DETAILS — VOLUNTEER CTA
═══════════════════════════════════════════════════════════ */

/* ── PAGE LAYOUT ─────────────────────────────────────────── */
/* Two-column layout: main content + event info sidebar.     */
.pub-event-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

.pub-event-main  { min-width: 0; }
.pub-event-aside { display: flex; flex-direction: column; gap: 16px; }

/* ── SIMPLIFIED PUBLIC EVENT HEADER ──────────────────────── */
/* Lighter weight than the admin .event-header.
   --ev-color drives the accent glow and slot bar.           */
.pub-event-header {
  padding: 28px 28px 24px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.pub-event-header::before {
  content: '';
  position: absolute;
  top: -50px; left: -50px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(
          circle,
          color-mix(in srgb, var(--ev-color, var(--accent-green)) 16%, transparent),
          transparent 70%
  );
  pointer-events: none;
}

.pub-event-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pub-event-category-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ev-color, var(--accent-green));
  opacity: 0.9;
}

.pub-event-title {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.pub-event-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 20px;
}

/* Volunteer slot fill bar in the public header */
.pub-event-slot-fill {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pub-event-slot-bar-wrap {
  flex: 1;
  max-width: 240px;
  height: 6px;
  background: var(--surface-border);
  border-radius: 3px;
  overflow: hidden;
}

.pub-event-slot-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg,
  var(--ev-color, var(--accent-green)),
  color-mix(in srgb, var(--ev-color, var(--accent-green)) 60%, var(--accent-blue))
  );
  transition: width 0.4s ease;
}

.pub-event-slot-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.pub-event-slot-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── EVENT INFO ASIDE CARD ───────────────────────────────── */
/* Right-rail card listing date, time, location, organizer.  */
.event-info-card { padding: 0; overflow: hidden; }

.event-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-border);
}

.event-info-row:last-child { border-bottom: none; }

.event-info-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.event-info-icon svg {
  width: 14px; height: 14px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.event-info-body { flex: 1; min-width: 0; }

.event-info-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.event-info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.event-info-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

/* ── VOLUNTEER TASK GRID ─────────────────────────────────── */
/* Section header for the volunteer opportunities list.      */
.vol-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.vol-section-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.vol-section-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 3px 10px;
  font-weight: 600;
}

/* Responsive grid of task cards */
.vol-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}

/* ── VOLUNTEER TASK CARD ─────────────────────────────────── */
.vol-task-card {
  --task-color: var(--accent-green);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}

.vol-task-card:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

/* Enrolled variant — green border, subtle tint */
.vol-task-card.enrolled {
  border-color: color-mix(in srgb, var(--accent-green) 45%, transparent);
  background: color-mix(in srgb, var(--accent-green) 4%, var(--surface));
}

/* Full variant — amber border, muted */
.vol-task-card.full {
  border-color: color-mix(in srgb, var(--accent-amber) 30%, transparent);
  opacity: 0.82;
}

/* Coloured top rule */
.vol-task-accent {
  height: 3px;
  background: var(--task-color);
  flex-shrink: 0;
}

.vol-task-body {
  padding: 16px 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.vol-task-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.vol-task-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  flex: 1;
}

.vol-task-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vol-task-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.vol-task-meta-item svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  opacity: 0.55;
}

/* Requirement pills */
.vol-task-req-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.vol-task-req-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Footer: slot bar + CTA button */
.vol-task-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vol-task-slots-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vol-task-slots-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--surface-border);
  border-radius: 2px;
  overflow: hidden;
}

.vol-task-slots-bar {
  height: 100%;
  background: var(--task-color);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.vol-task-slots-label {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.vol-task-slots-num {
  font-weight: 700;
  color: var(--task-color);
}

.vol-task-slots-num.full { color: var(--text-accent-amber); }

/* Enrolled state button override */
.vol-task-card.enrolled .btn-primary {
  background: color-mix(in srgb, var(--accent-green) 22%, var(--surface));
  color: var(--text-accent-green);
  border: 1px solid color-mix(in srgb, var(--accent-green) 40%, transparent);
  pointer-events: none;
  cursor: default;
}

/* ── PUBLIC EVENT PAGE RESPONSIVE ────────────────────────── */
@media (max-width: 1024px) {
  .pub-event-layout { grid-template-columns: 1fr; }
  .pub-event-aside  { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .pub-event-aside  { grid-template-columns: 1fr; }
  .pub-event-title  { font-size: 24px; }
  .vol-task-grid    { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════
   VOLUNTEER CONFIRMATION PAGES
═══════════════════════════════════════════════════════════ */

/* ── LAYOUT ──────────────────────────────────────────────── */
/* Centered single-column layout for confirmation pages.     */
.confirm-layout {
  max-width: 620px;
  margin: 0 auto;
  animation: fadeUp 0.35s ease both;
}

/* ── SUCCESS HERO ─────────────────────────────────────────── */
.confirm-hero {
  text-align: center;
  padding: 36px 24px 32px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.confirm-hero::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle,
  color-mix(in srgb, var(--accent-green) 14%, transparent),
  transparent 65%
  );
  pointer-events: none;
}

.confirm-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-green) 14%, transparent);
  border: 2px solid color-mix(in srgb, var(--accent-green) 35%, transparent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  position: relative;
  z-index: 1;
}

.confirm-icon svg {
  width: 28px; height: 28px;
  stroke: var(--accent-green); fill: none; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.confirm-headline {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.confirm-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── TASK DETAIL SUMMARY CARD ────────────────────────────── */
.confirm-detail-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 16px;
}

.confirm-card-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 20px 8px;
  border-bottom: 1px solid var(--surface-border);
}

.confirm-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--surface-border);
}

.confirm-detail-row:last-child { border-bottom: none; }

.confirm-detail-icon-wrap {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.confirm-detail-icon-wrap svg {
  width: 15px; height: 15px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.confirm-detail-body { flex: 1; min-width: 0; }

.confirm-detail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.confirm-detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.confirm-detail-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

/* ── NEXT STEPS (anonymous page) ─────────────────────────── */
.confirm-next-steps {
  padding: 16px 20px;
}

.confirm-next-steps-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.confirm-next-step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-next-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.confirm-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── ACTION BUTTONS ──────────────────────────────────────── */
.confirm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.confirm-actions .btn-primary { flex: 1; justify-content: center; }
.confirm-actions .btn-ghost   { flex: 1; justify-content: center; }

@media (max-width: 480px) {
  .confirm-actions { flex-direction: column; }
  .confirm-actions .btn-primary,
  .confirm-actions .btn-ghost { flex: unset; }
  .confirm-hero { padding: 24px 16px 20px; }
  .confirm-headline { font-size: 22px; }
}

/* ── FORM SECTION DIVIDER ────────────────────────────────── */
.form-section-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 20px 0;
}

/* Two-tier notification preference styles */
.notif2-list { display: flex; flex-direction: column; }
.notif2-item { border-bottom: 1px solid var(--border); }
.notif2-item:last-child { border-bottom: none; }
.notif2-item.notif2-off .notif2-label { color: var(--text-muted); }

/*
  Single flex container for the whole row.
  Mobile (default): wraps so name+toggle sit on line 1, chips on line 2.
  Desktop (768px+): nowrap so name, chips, and toggle are all on one line.
*/
.notif2-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 16px;
  row-gap: 8px;
  padding: 12px 0;
}

/* Stretches to fill leftover space; always on the first wrapped line */
.notif2-name {
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
}
.notif2-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color 0.15s;
}
.notif2-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* Toggle stays on the first wrapped line, after the name */
.notif2-row > .toggle-switch {
  order: 2;
  flex-shrink: 0;
}

/*
  Mobile: chips take a full-width second line, right-aligned so they
  sit under the toggle rather than the label.
  Desktop: overridden below to sit inline between name and toggle.
*/
.notif2-methods {
  order: 3;
  flex: 0 0 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.notif2-methods.notif2-methods-off { opacity: 0.45; pointer-events: none; }

@media (min-width: 768px) {
  .notif2-row { flex-wrap: nowrap; }
  .notif2-methods {
    order: 2;             /* slots between name and toggle */
    flex: 0 0 auto;       /* shrinks to chip content width */
    justify-content: flex-end;
  }
  .notif2-row > .toggle-switch { order: 3; }
}

/* Chip = visually styled checkbox label */
.notif2-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
}
/* SR-only pattern: input stays in a11y tree and is focusable, but invisible */
.notif2-chip input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.notif2-chip:has(input:checked) {
  background: color-mix(in srgb, var(--accent-blue, #3b82f6) 16%, transparent);
  border-color: var(--accent-blue, #3b82f6);
  color: var(--text-accent-blue, #3b82f6);
}
/* Visible focus indicator on the chip when its hidden input is focused */
.notif2-chip:has(input:focus-visible) {
  outline: 2px solid var(--accent-blue, #3b82f6);
  outline-offset: 2px;
}
.notif2-chip:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.notif2-chip-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── SOCIAL MEDIA POSTS SECTION ──────────────────────── */
.social-col-header {
  display: flex;
  align-items: center;
  padding: 6px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
}

.social-col-header .sch-network { width: 72px; flex-shrink: 0; }
.social-col-header .sch-account { flex: 1; min-width: 0; }
.social-col-header .sch-title   { flex: 1; min-width: 0; padding-left: 10px; }
.social-col-header .sch-act     { width: 72px; flex-shrink: 0; }

.social-post-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}
.social-post-row:last-child { border-bottom: none; }
.social-post-row:hover { background: var(--surface-hover); }

.social-network-badge {
  width: 62px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  color: var(--network-color, var(--text-secondary));
  border-color: color-mix(in srgb, var(--network-color, var(--text-secondary)) 30%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Per-network colour tokens — one spot to change per brand */
.social-badge-facebook  { --network-color: var(--text-accent-blue); }
.social-badge-instagram { --network-color: var(--text-accent-pink); }
.social-badge-x         { --network-color: var(--text-secondary); }
.social-badge-linkedin  { --network-color: #0284C7; }
.social-badge-bluesky   { --network-color: var(--text-accent-blue); }
.social-badge-mastodon  { --network-color: var(--text-accent-purple); }
.social-badge-youtube   { --network-color: var(--text-accent-pink); }
.social-badge-tiktok    { --network-color: var(--text-secondary); }

.social-post-account {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-post-title {
  flex: 1;
  min-width: 0;
  padding-left: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-post-actions {
  width: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* ── ADD POST MODAL ───────────────────────────────────── */
#social-post-dialog {
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--text-primary);
  padding: 0;
  box-shadow: var(--shadow-elevated);
  width: min(480px, calc(100vw - 32px));
  font-family: var(--font-body);
}

#social-post-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.social-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--surface-border);
}

.social-dialog-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.social-dialog-close {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: transparent;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.social-dialog-close:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.social-dialog-close svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.social-dialog-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.social-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--surface-border);
}

/* ── MOBILE: hide title column at event-detail breakpoint ── */
@media (max-width: 680px) {
  .social-post-title             { display: none; }
  .social-col-header .sch-title  { display: none; }
  .social-col-header .sch-act    { width: 72px; }
}
/* ── DISCLOSURE ROWS ─────────────────────────────────────
   Revealed sections animate in via max-height.  The inner
   content gets its own padding so the collapsed state is
   truly zero-height with no visible gap.
──────────────────────────────────────────────────────── */
.reveal-row {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  opacity: 0;
}

.reveal-row.open {
  /* Large enough for any content; CSS can't animate to "auto" */
  max-height: 400px;
  opacity: 1;
}

.reveal-row-inner {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── COLOUR SWATCHES ─────────────────────────────────────
   Radio-based swatch picker using the site's accent tokens.
──────────────────────────────────────────────────────── */
.color-swatch-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.color-swatch-label {
  position: relative;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  /* Allow the scale transform to paint outside the label's box */
  overflow: visible;
}

/* Give the group a little inset so scaled swatches at the edges
   aren't clipped by a parent with overflow:hidden */
.color-swatch-group {
  padding: 4px 2px;
}

/* The actual radio stays accessible but invisible */
.color-swatch-label input[type="radio"] {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.color-swatch-label .swatch {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  box-sizing: border-box;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.color-swatch-label input:checked  + .swatch {
  border-color: var(--text-primary);
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--bg);
}

.color-swatch-label input:focus-visible + .swatch {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

.swatch-green  { background: var(--accent-green); }
.swatch-blue   { background: var(--accent-blue); }
.swatch-pink   { background: var(--accent-pink); }
.swatch-amber  { background: var(--accent-amber); }
.swatch-purple { background: var(--text-accent-purple); }

/* ── DIVIDER between sections ────────────────────────── */
.form-section-divider {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 2px;
}

/* Live preview */
.hero-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-elevated);
  background: var(--surface);
}

.hero-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.hero-preview-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}

.hero-preview-placeholder svg {
  width: 48px;
  height: 48px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-preview-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  pointer-events: none;
}

/* Section headers */
.picker-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Stock image grid */
.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

/* Each stock option is a radio-style card */
.stock-option {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  outline: none;
}

.stock-option:hover,
.stock-option:focus-visible {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(96, 198, 239, 0.25);
  transform: translateY(-2px);
}

.stock-option[aria-checked="true"] {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(96, 239, 188, 0.30);
}

.stock-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Checkmark overlay on selected */
.stock-option-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
}

.stock-option[aria-checked="true"] .stock-option-check {
  opacity: 1;
}

.stock-option-check svg {
  width: 14px;
  height: 14px;
  stroke: #0B0F1E;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Caption under each thumbnail */
.stock-option-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 8px 7px;
  background: linear-gradient(transparent, rgba(0,0,0,0.60));
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  pointer-events: none;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--surface-border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  position: relative;
  text-align: center;
}

.upload-zone:hover,
.upload-zone:focus-within,
.upload-zone.drag-over {
  border-color: var(--accent-blue);
  background: var(--surface-hover);
}

.upload-zone.drag-over {
  border-color: var(--accent-green);
}

.upload-zone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.upload-zone-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-blue);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-zone-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-zone-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.upload-zone-hint strong {
  color: var(--accent-blue);
  font-weight: 600;
}

/* The actual file input is visually hidden but accessible */
.upload-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Uploaded preview thumbnail */
.upload-preview {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: var(--surface);
}

.upload-preview.visible {
  display: flex;
}

.upload-preview-thumb {
  width: 80px;
  height: 45px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--surface-border);
}

.upload-preview-info {
  flex: 1;
  min-width: 0;
}

.upload-preview-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.upload-preview-size {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.upload-preview-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.upload-preview-remove:hover {
  background: rgba(239, 96, 96, 0.15);
  color: #ef6060;
  border-color: rgba(239, 96, 96, 0.40);
}

.upload-preview-remove svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Error message */
.upload-error {
  display: none;
  font-size: 12px;
  color: #ef6060;
  margin-top: 6px;
}

.upload-error.visible {
  display: block;
}

/* Save bar */
.save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  gap: 16px;
}

.save-bar-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.save-bar-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

.save-bar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── LOGISTICAL NOTE ROWS ─────────────────────────────── */
.logistical-note-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.logistical-note-row:last-child { border-bottom: none; }
.logistical-note-row:hover { background: var(--surface-hover); }

.logistical-note-body { flex: 1; min-width: 0; }

.logistical-note-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.logistical-note-content {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ═══════════════════════════════════════════════════════════
   SOCIAL MEDIA PAGES
   Pages: /Socials/index.html, /Socials/post-create.html,
          /Socials/post-details.html, /Socials/networks.html,
          /Socials/accounts.html, /Socials/assignments.html,
          /Socials/mark-published.html
═══════════════════════════════════════════════════════════ */


/* ── PLATFORM BADGES ────────────────────────────────────── */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}

.platform-badge svg {
  width: 10px; height: 10px;
  fill: currentColor;
  flex-shrink: 0;
}

.platform-blue  { color: var(--text-accent-blue);   border-color: color-mix(in srgb, var(--accent-blue)   35%, transparent); background: color-mix(in srgb, var(--accent-blue)   10%, transparent); }
.platform-pink  { color: var(--text-accent-pink);   border-color: color-mix(in srgb, var(--accent-pink)   35%, transparent); background: color-mix(in srgb, var(--accent-pink)   10%, transparent); }
.platform-amber  { color: var(--text-accent-amber);   border-color: color-mix(in srgb, var(--accent-amber)   35%, transparent); background: color-mix(in srgb, var(--accent-amber)   10%, transparent); }
.platform-green  { color: var(--text-accent-green);   border-color: color-mix(in srgb, var(--accent-green)   35%, transparent); background: color-mix(in srgb, var(--accent-green)   10%, transparent); }
.platform-purple  { color: var(--text-accent-purple);   border-color: color-mix(in srgb, var(--accent-purple)   35%, transparent); background: color-mix(in srgb, var(--accent-purple)   10%, transparent); }

.platform-twitter  { color: var(--text-accent-blue);   border-color: color-mix(in srgb, var(--accent-blue)   35%, transparent); background: color-mix(in srgb, var(--accent-blue)   10%, transparent); }
.platform-facebook { color: var(--text-accent-blue);   border-color: color-mix(in srgb, var(--accent-blue)   35%, transparent); background: color-mix(in srgb, var(--accent-blue)   10%, transparent); }
.platform-instagram{ color: var(--text-accent-pink);   border-color: color-mix(in srgb, var(--accent-pink)   35%, transparent); background: color-mix(in srgb, var(--accent-pink)   10%, transparent); }
.platform-linkedin { color: var(--text-accent-blue);   border-color: color-mix(in srgb, var(--accent-blue)   35%, transparent); background: color-mix(in srgb, var(--accent-blue)   10%, transparent); }
.platform-tiktok   { color: var(--text-primary);       border-color: var(--surface-border);                                      background: var(--surface-strong); }
.platform-threads  { color: var(--text-primary);       border-color: var(--surface-border);                                      background: var(--surface-strong); }
.platform-youtube  { color: var(--text-accent-pink);   border-color: color-mix(in srgb, var(--accent-pink)   35%, transparent); background: color-mix(in srgb, var(--accent-pink)   10%, transparent); }
.platform-mastodon { color: var(--text-accent-purple); border-color: color-mix(in srgb, var(--event-e)       35%, transparent); background: color-mix(in srgb, var(--event-e)       10%, transparent); }


/* ── SOCIAL POST STATUS PILLS ───────────────────────────── */
/* .status-scheduled reuses the existing planning look; defined here
   as an alias so social pages don't need to use the events name. */
.status-scheduled {
  color: var(--text-accent-blue);
  border-color: color-mix(in srgb, var(--accent-blue) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-blue) 10%, transparent);
}

.status-published {
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-green) 10%, transparent);
}

.status-missed {
  color: var(--text-accent-pink);
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-pink) 10%, transparent);
}

.status-draft {
  color: var(--text-muted);
  border-color: var(--surface-border);
  background:   var(--surface);
}


/* ── SOCIAL POST LIST (table layout) ────────────────────── */
.social-post-table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.social-post-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-border);
  gap: 0;
  transition: background 0.15s;
  color: var(--text-primary);
  text-decoration: none;
}

.social-post-row:last-child { border-bottom: none; }
.social-post-row:hover { background: var(--surface-hover); }

/* Column widths — keep in sync between header + rows */
.spr-date     { width: 120px; flex-shrink: 0; padding: 0 16px 0 0; }
.spr-content  { flex: 1; min-width: 0; padding-right: 16px; }
.spr-accounts { width: 220px; flex-shrink: 0; padding: 0 12px; }
.spr-status   { width: 100px; flex-shrink: 0; padding: 0 12px; }
.spr-actions  { width: 80px; flex-shrink: 0; display: flex; gap: 6px; justify-content: flex-end; }

.spr-date-day {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted);
}

.spr-date-full {
  font-family: var(--font-display);
  font-size: 20px; line-height: 1;
  color: var(--text-primary);
}

.spr-date-time {
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px;
}

.spr-title {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text-primary);
}

.spr-excerpt {
  font-size: 12px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
  line-height: 1.4;
}

.spr-account-badges {
  display: flex; flex-wrap: wrap; gap: 3px;
}


/* ── POST DETAIL PAGE ───────────────────────────────────── */
.post-detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

.post-detail-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--surface-border);
}

.post-detail-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.2;
}

.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.post-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

.post-detail-meta-item svg {
  width: 12px; height: 12px;
  stroke: currentColor; fill: none; stroke-width: 2;
  opacity: 0.6; flex-shrink: 0;
}

.post-detail-body {
  padding: 24px 28px;
}

.post-content-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-primary);
  white-space: pre-wrap;
  font-family: var(--font-body);
}


/* ── MEDIA GRID (view) ──────────────────────────────────── */
.media-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.media-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  overflow: hidden;
  position: relative;
}

.media-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.media-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
}

.media-thumb-placeholder svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none; stroke-width: 1.5;
  opacity: 0.5;
}


/* ── MEDIA UPLOAD AREA (create form) ────────────────────── */
.media-upload-area {
  border: 2px dashed var(--surface-border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.media-upload-area:hover,
.media-upload-area:focus-within {
  border-color: rgba(96, 239, 188, 0.45);
  background: rgba(96, 239, 188, 0.04);
}

.media-upload-area input[type="file"] { display: none; }

.media-upload-icon {
  width: 34px; height: 34px;
  margin: 0 auto 10px;
  stroke: var(--text-muted); fill: none; stroke-width: 1.5;
  display: block; opacity: 0.5;
}

.media-upload-label {
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.media-upload-hint {
  font-size: 11px; color: var(--text-muted);
}

.media-upload-link {
  color: var(--text-accent-green);
  cursor: pointer;
}

.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.media-preview-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  overflow: hidden;
  position: relative;
}

.media-preview-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}


/* ── PROPAGATION TABLE ──────────────────────────────────── */
.prop-table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.prop-row {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--surface-border);
  gap: 0;
  transition: background 0.15s;
}

.prop-row:last-child { border-bottom: none; }
.prop-row:hover { background: var(--surface-hover); }

/* Column tokens — keep header + rows in sync */
.pc-account  { flex: 1; min-width: 0; padding-right: 12px; }
.pc-platform { width: 110px; flex-shrink: 0; padding: 0 12px; }
.pc-poster   { width: 140px; flex-shrink: 0; padding: 0 12px; }
.pc-status   { width: 100px; flex-shrink: 0; padding: 0 12px; }
.pc-pubdate  { width: 120px; flex-shrink: 0; padding: 0 12px; font-size: 12px; color: var(--text-muted); }
.pc-actions  { width: 80px; flex-shrink: 0; display: flex; gap: 6px; justify-content: flex-end; }

.pc-account-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pc-account-handle {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


/* ── NETWORK MANAGEMENT ROWS ────────────────────────────── */
.network-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.network-row:last-child { border-bottom: none; }
.network-row:hover { background: var(--surface-hover); }

.network-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--surface-border);
}

.network-icon-wrap svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

.network-row-name {
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.network-row-name-disabled {
  font-size: 14px; font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
  color: var(--text-muted);
  flex: 1;
}

.network-row-count {
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; flex-shrink: 0;
  min-width: 90px; text-align: right;
}


/* ── ACCOUNT MANAGEMENT ROWS ────────────────────────────── */
.account-table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.account-row {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--surface-border);
  gap: 0;
  transition: background 0.15s;
}

.account-row:last-child { border-bottom: none; }
.account-row:hover { background: var(--surface-hover); }

/* Column tokens */
.ac-identity  { flex: 0 0 220px; min-width: 0; display: flex; align-items: center; gap: 10px; padding-right: 12px; }
.ac-network    { width: 120px; flex-shrink: 0; padding: 0 12px; }
.ac-assignees { flex: 1; min-width: 0; padding: 0 12px; }
.ac-status     { width: 90px; flex-shrink: 0; }
.ac-actions    { width: 90px; flex-shrink: 0; display: flex; gap: 6px; justify-content: flex-end; }

.ac-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ac-handle {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ac-assignee-chips {
  display: flex; flex-wrap: nowrap; gap: 3px; overflow: hidden;
}

/* Pill showing an assigned user */
.assignee-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px 2px 3px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.assignee-chip .team-avatar {
  width: 16px; height: 16px;
  font-size: 7px;
  border-color: transparent;
}

/* "Add assignee" button inline in row */
.btn-add-assignee {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px dashed var(--surface-border);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px; font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-add-assignee:hover {
  border-color: rgba(96, 239, 188, 0.40);
  color: var(--text-accent-green);
}

.btn-add-assignee svg {
  width: 10px; height: 10px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
}


/* ── POST CREATE LAYOUT ──────────────────────────────────── */
.post-create-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

.char-counter {
  font-size: 11px; color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

.char-counter.warn { color: var(--text-accent-amber); }
.char-counter.over { color: var(--text-accent-pink); }


/* ── MISSED DEADLINE ALERT (danger variant of .alert-card) ─ */
.alert-card-danger {
  padding: 18px;
  border-color: color-mix(in srgb, var(--accent-pink) 30%, transparent) !important;
  background:   color-mix(in srgb, var(--accent-pink) 07%, var(--surface)) !important;
}

.alert-label-danger {
  font-size: 10px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-accent-pink);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}

.alert-label-danger::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-pink);
  animation: pulse 1.8s ease-in-out infinite;
}

/* List of multiple deadline failures */
.deadline-list {
  display: flex; flex-direction: column; gap: 8px;
}

.deadline-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-pink) 07%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-pink) 22%, transparent);
}

.deadline-item-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary); margin-bottom: 2px;
}

.deadline-item-detail {
  font-size: 12px; color: var(--text-secondary);
  line-height: 1.4;
}

.deadline-item-actions {
  display: flex; gap: 6px; margin-top: 8px;
}


/* ── MARK-PUBLISHED CONFIRMATION PAGE ───────────────────── */
.confirm-card {
  max-width: 600px;
  padding: 28px 32px;
}

.confirm-post-preview {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.confirm-post-preview strong {
  display: block;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.5px; color: var(--text-primary);
  margin-bottom: 6px;
}


/* ── RESPONSIVE — SOCIAL PAGES ──────────────────────────── */
@media (max-width: 1100px) {
  .post-create-layout { grid-template-columns: 1fr 260px; }
  .post-detail-grid   { grid-template-columns: 1fr 260px; }
  .spr-accounts       { width: 160px; }
  .pc-poster          { display: none; }
  .pc-pubdate         { display: none; }
}

@media (max-width: 1024px) {
  .post-create-layout { grid-template-columns: 1fr; }
  .post-detail-grid   { grid-template-columns: 1fr; }
  .spr-accounts       { display: none; }
}

@media (max-width: 680px) {
  .social-post-table-header { display: none; }
  .spr-date     { width: 80px; }
  .spr-status   { display: none; }
  .spr-actions  { width: 60px; }

  .prop-table-header  { display: none; }
  .pc-platform        { display: none; }
  .pc-poster          { display: none; }
  .pc-pubdate         { display: none; }
  .pc-status          { width: 80px; }
  .pc-actions         { width: 60px; }

  .account-table-header { display: none; }
  .ac-network           { display: none; }
  .ac-assignees         { display: none; }
  .ac-status            { display: none; }
  .ac-actions           { width: 60px; }

  .network-row-count    { display: none; }

  .post-create-layout   { grid-template-columns: 1fr; }
  .post-detail-grid     { grid-template-columns: 1fr; }
}

/* ================================================================
   SOCIAL MEDIA — ASSIGNMENTS & MARK PUBLISHED ADDITIONS
   ================================================================ */

/* Avatar size variants */
.avatar-sm {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  font-size: 0.75rem;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-xs {
  width: 1.375rem;
  height: 1.375rem;
  min-width: 1.375rem;
  font-size: 0.625rem;
  border-radius: 50%;
  background: var(--accent-purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* Inline assignment add-assignee form (hidden by default) */
.assignment-inline-form {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.875rem 1rem;
  background: var(--glass-bg-hover);
  border-top: 1px solid var(--border);
}

.assignment-inline-form.hidden {
  display: none;
}

.form-field-actions {
  display: flex;
  gap: 0.5rem;
  padding-bottom: 0.125rem; /* align with input baseline */
}

/* Unassigned placeholder note */
.unassigned-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Button size modifiers */
.btn-sm {
  padding: 0.3125rem 0.75rem;
  font-size: 0.8125rem;
}

/* btn-row: generic horizontal action row */
.btn-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* form-label optional hint */
.form-label-optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

/* confirm-post-preview: post excerpt inside confirm card */
.confirm-post-preview {
  padding: 0.875rem 1rem;
  background: var(--glass-bg-hover);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

@media (max-width: 680px) {
  .assignment-inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .form-field-actions {
    width: 100%;
  }
}

/* ================================================================
   SOCIAL MEDIA — ACCENT COLOR SYSTEM
   ================================================================ */

/* Network icon wrap: color driven by class, not inline style */
.network-icon-wrap {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.network-icon-wrap svg { width: 1.125rem; height: 1.125rem; }

.network-accent-pink   { background: color-mix(in srgb, var(--text-accent-pink)   12%, transparent); border-color: color-mix(in srgb, var(--text-accent-pink)   35%, transparent); color: var(--text-accent-pink);   }
.network-accent-amber  { background: color-mix(in srgb, var(--text-accent-amber)  12%, transparent); border-color: color-mix(in srgb, var(--text-accent-amber)  35%, transparent); color: var(--text-accent-amber);  }
.network-accent-green  { background: color-mix(in srgb, var(--text-accent-green)  12%, transparent); border-color: color-mix(in srgb, var(--text-accent-green)  35%, transparent); color: var(--text-accent-green);  }
.network-accent-blue   { background: color-mix(in srgb, var(--text-accent-blue)   12%, transparent); border-color: color-mix(in srgb, var(--text-accent-blue)   35%, transparent); color: var(--text-accent-blue);   }
.network-accent-purple { background: color-mix(in srgb, var(--text-accent-purple) 12%, transparent); border-color: color-mix(in srgb, var(--text-accent-purple) 35%, transparent); color: var(--text-accent-purple); }

/* Accent chip: small labeled pill shown in the network list row */
.network-row-accent { display: flex; align-items: center; }

.accent-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.accent-chip::before {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}
.accent-chip-pink   { color: var(--text-accent-pink);   background: color-mix(in srgb, var(--text-accent-pink)   12%, transparent); border-color: color-mix(in srgb, var(--text-accent-pink)   30%, transparent); }
.accent-chip-amber  { color: var(--text-accent-amber);  background: color-mix(in srgb, var(--text-accent-amber)  12%, transparent); border-color: color-mix(in srgb, var(--text-accent-amber)  30%, transparent); }
.accent-chip-green  { color: var(--text-accent-green);  background: color-mix(in srgb, var(--text-accent-green)  12%, transparent); border-color: color-mix(in srgb, var(--text-accent-green)  30%, transparent); }
.accent-chip-blue   { color: var(--text-accent-blue);   background: color-mix(in srgb, var(--text-accent-blue)   12%, transparent); border-color: color-mix(in srgb, var(--text-accent-blue)   30%, transparent); }
.accent-chip-purple { color: var(--text-accent-purple); background: color-mix(in srgb, var(--text-accent-purple) 12%, transparent); border-color: color-mix(in srgb, var(--text-accent-purple) 30%, transparent); }

/* Accent swatch picker — radio group styled as color circles */
.accent-picker-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.accent-picker {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.375rem;
}

.accent-swatch-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3125rem;
  cursor: pointer;
  user-select: none;
}

/* Hide the native radio visually but keep it accessible */
.accent-swatch-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.accent-swatch {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid transparent;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: transform 0.12s, outline-color 0.12s;
}

.accent-swatch-pink   { background: var(--text-accent-pink);   }
.accent-swatch-amber  { background: var(--text-accent-amber);  }
.accent-swatch-green  { background: var(--text-accent-green);  }
.accent-swatch-blue   { background: var(--text-accent-blue);   }
.accent-swatch-purple { background: var(--text-accent-purple); }

/* Selected state */
.accent-swatch-label input[type="radio"]:checked + .accent-swatch {
  outline-color: var(--text);
  transform: scale(1.18);
}

/* Keyboard focus state */
.accent-swatch-label input[type="radio"]:focus-visible + .accent-swatch {
  outline-color: var(--text-accent-blue);
}

.accent-swatch-name {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Update network-row grid to include the accent chip column */
.network-row {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto auto auto;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.network-row:last-child { border-bottom: none; }

/* ================================================================
   UTILITY — DEACTIVATED / SOFT-DELETED DATA
   ================================================================
   Apply .deactivated to any element (row, cell, span, etc.) to
   render it as visually inactive: struck-through text and muted
   color.  For table rows, put it on the <tr> or row-div directly
   and every child text node inherits the treatment.
   ================================================================ */

.deactivated {
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
  color: var(--text-muted);
}

/* Suppress strikethrough on interactive children (buttons, links)
   so action icons stay legible next to deactivated row text. */
.deactivated a,
.deactivated button,
.deactivated .btn-row-action,
.deactivated .status-pill {
  text-decoration: none;
  color: inherit;
}

/* × button inside an assignee chip */
.assignee-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-left: 1px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}

.assignee-chip-remove:hover {
  background: color-mix(in srgb, var(--text-accent-pink) 18%, transparent);
  color: var(--text-accent-pink);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   REQUESTS FEATURE
   ───────────────────────────────────────────────────────────────────────────────
   Styles for the Requests (suggestion box) system: status pills, source badges,
   request list table, detail page, submit form, and config page components.
   Originally site-requests.css — merged here so only one stylesheet is required.
═══════════════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════
   REQUEST STATUS PILLS
   Extends the existing .status-pill pattern from site.css.
═══════════════════════════════════════════════════════════ */

/* New — blue, pulsing dot prefix (mirrors .status-live pattern) */
.status-new {
  color: var(--text-accent-blue);
  border-color: color-mix(in srgb, var(--accent-blue) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-blue) 10%, transparent);
  padding-left: 20px;
  position: relative;
}

.status-new::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-accent-blue);
  animation: live-pulse 1.8s ease-in-out infinite;
}

/* In Progress — amber */
.status-in-progress {
  color: var(--text-accent-amber);
  border-color: color-mix(in srgb, var(--accent-amber) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-amber) 10%, transparent);
}

/* Forwarded — purple */
.status-forwarded {
  color: var(--text-accent-purple);
  border-color: color-mix(in srgb, var(--accent-purple) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-purple) 10%, transparent);
}

/* Resolved — muted (mirrors .status-finished) */
.status-resolved {
  color: var(--text-muted);
  border-color: var(--surface-border);
  background:   var(--surface);
}

/* Spam / Deleted — pink danger */
.status-spam {
  color: var(--text-accent-pink);
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-pink) 10%, transparent);
}


/* ═══════════════════════════════════════════════════════════
   SOURCE BADGES
   Identify Internal vs External request origin.
═══════════════════════════════════════════════════════════ */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}

.source-badge svg {
  width: 10px; height: 10px;
  stroke: currentColor; fill: none; stroke-width: 2;
  flex-shrink: 0;
}

.source-internal {
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-green) 10%, transparent);
}

.source-external {
  color: var(--text-accent-blue);
  border-color: color-mix(in srgb, var(--accent-blue) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-blue) 10%, transparent);
}

.source-anonymous {
  color: var(--text-muted);
  border-color: var(--surface-border);
  background:   var(--surface);
}


/* ═══════════════════════════════════════════════════════════
   REQUEST LIST TABLE  (requests-index.html)
═══════════════════════════════════════════════════════════ */

/* Column header row */
.req-table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-strong);
}

/* Individual request row */
.req-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-border);
  gap: 0;
  transition: background 0.15s;
  text-decoration: none;
  color: var(--text-primary);
}

.req-row:last-child { border-bottom: none; }
.req-row:hover      { background: var(--surface-hover); }

/* Shared column tokens — kept in sync across header + rows */
.rq-source   { width: 100px; flex-shrink: 0; padding-right: 12px; }
.rq-subject  { flex: 1; min-width: 0; padding: 0 12px; }
.rq-team     { width: 150px; flex-shrink: 0; padding: 0 12px; }
.rq-assigned { width: 140px; flex-shrink: 0; padding: 0 12px; }
.rq-date     { width: 100px; flex-shrink: 0; padding: 0 12px; }
.rq-status   { width: 110px; flex-shrink: 0; padding: 0 12px; }
.rq-actions  { width: 70px;  flex-shrink: 0; display: flex; gap: 5px; justify-content: flex-end; }

/* Subject cell text */
.req-subject-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.req-subject-preview {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Team / General cell */
.req-team-text {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.req-team-general {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Assignee cell */
.req-assigned-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.req-assigned-chip .team-avatar {
  width: 20px; height: 20px;
  font-size: 8px;
  flex-shrink: 0;
}

.req-unassigned {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* Date cell */
.req-date-text {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}


/* ═══════════════════════════════════════════════════════════
   REQUEST DETAIL PAGE  (requests-details.html)
═══════════════════════════════════════════════════════════ */

/* Two-column layout: main content + action rail */
.req-detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

.req-detail-main  { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.req-detail-aside { display: flex; flex-direction: column; gap: 14px; }

/* ── REQUEST HEADER CARD ───────────────────────────────────── */
.req-header-card {
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}

.req-header-card::before {
  content: '';
  position: absolute;
  top: -50px; left: -50px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(
          circle,
          color-mix(in srgb, var(--accent-blue) 14%, transparent),
          transparent 70%
  );
  pointer-events: none;
}

.req-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.req-id {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.req-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 14px;
}

/* Metadata strip below title */
.req-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--surface-border);
}

.req-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.req-meta-item svg {
  width: 13px; height: 13px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

.req-meta-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── MESSAGE BODY CARD ─────────────────────────────────────── */
.req-body-card {
  padding: 24px 28px;
}

.req-body-card-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.req-body-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-primary);
  white-space: pre-wrap;
}

/* ── ACTION PANEL (right rail) ────────────────────────────── */
.req-action-section {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.req-action-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* Outcome action buttons */
.req-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface-strong);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
  text-align: left;
  text-decoration: none;
}

.req-action-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  transform: translateX(2px);
}

.req-action-btn-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--surface-border);
  background: var(--surface);
}

.req-action-btn-icon svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.req-action-btn-text { flex: 1; min-width: 0; }
.req-action-btn-label { line-height: 1.2; }
.req-action-btn-desc  { font-size: 11px; font-weight: 400; color: var(--text-muted); margin-top: 1px; }

/* Colour variants */
.req-action-btn.reply:hover {
  border-color: color-mix(in srgb, var(--accent-blue) 35%, transparent);
  background: color-mix(in srgb, var(--accent-blue) 7%, transparent);
  color: var(--text-accent-blue);
}
.req-action-btn.reply .req-action-btn-icon {
  background: color-mix(in srgb, var(--accent-blue) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent-blue) 25%, transparent);
  color: var(--text-accent-blue);
}

.req-action-btn.project:hover {
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
  background: color-mix(in srgb, var(--accent-green) 7%, transparent);
  color: var(--text-accent-green);
}
.req-action-btn.project .req-action-btn-icon {
  background: color-mix(in srgb, var(--accent-green) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent-green) 25%, transparent);
  color: var(--text-accent-green);
}

.req-action-btn.event:hover {
  border-color: color-mix(in srgb, var(--accent-amber) 35%, transparent);
  background: color-mix(in srgb, var(--accent-amber) 7%, transparent);
  color: var(--text-accent-amber);
}
.req-action-btn.event .req-action-btn-icon {
  background: color-mix(in srgb, var(--accent-amber) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent-amber) 25%, transparent);
  color: var(--text-accent-amber);
}

.req-action-btn.forward:hover {
  border-color: color-mix(in srgb, var(--accent-purple) 35%, transparent);
  background: color-mix(in srgb, var(--accent-purple) 7%, transparent);
  color: var(--text-accent-purple);
}
.req-action-btn.forward .req-action-btn-icon {
  background: color-mix(in srgb, var(--accent-purple) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent-purple) 25%, transparent);
  color: var(--text-accent-purple);
}

.req-action-btn.danger:hover {
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
  background: color-mix(in srgb, var(--accent-pink) 7%, transparent);
  color: var(--text-accent-pink);
}
.req-action-btn.danger .req-action-btn-icon {
  background: color-mix(in srgb, var(--accent-pink) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent-pink) 25%, transparent);
  color: var(--text-accent-pink);
}

/* Forward form panel — hidden until "Forward" is activated */
.req-forward-form {
  display: none;
  padding: 14px;
  background: color-mix(in srgb, var(--accent-purple) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-purple) 22%, transparent);
  border-radius: var(--radius-sm);
  gap: 10px;
  flex-direction: column;
}

.req-forward-form.open { display: flex; }

/* Task project-picker form panel — hidden until "Convert to Task" is activated */
.req-task-form {
  display: none;
  padding: 14px;
  background: color-mix(in srgb, var(--accent-amber) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-amber) 22%, transparent);
  border-radius: var(--radius-sm);
  gap: 10px;
  flex-direction: column;
}

.req-task-form.open { display: flex; }

/* Reply form panel */
.req-reply-form {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  background: color-mix(in srgb, var(--accent-blue) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-blue) 22%, transparent);
  border-radius: var(--radius-md);
}

.req-reply-form.open { display: flex; }

.req-reply-form-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-accent-blue);
  margin-bottom: 4px;
}

/* Quick info card in right rail */
.req-info-card {
  overflow: hidden;
}

.req-info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--surface-border);
}

.req-info-row:last-child { border-bottom: none; }

.req-info-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 70px;
  flex-shrink: 0;
  padding-top: 1px;
}

.req-info-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.req-info-value.muted {
  color: var(--text-muted);
  font-style: italic;
}

/* Activity/audit log at bottom of main column */
.req-activity {
  padding: 20px 24px;
}

.req-activity-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}


/* ═══════════════════════════════════════════════════════════
   SUBMIT PAGE  (requests-submit.html)
═══════════════════════════════════════════════════════════ */

/* Page-level max-width centering */
.req-submit-layout {
  max-width: 680px;
}

/* Decorative hero banner above the form */
.req-submit-hero {
  padding: 28px 32px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.req-submit-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(
          circle,
          color-mix(in srgb, var(--accent-green) 16%, transparent),
          transparent 70%
  );
  pointer-events: none;
}

.req-submit-hero-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-green) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-green) 28%, transparent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}

.req-submit-hero-icon svg {
  width: 22px; height: 22px;
  stroke: var(--text-accent-green); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.req-submit-hero-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.req-submit-hero-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 520px;
}

/* ── TARGET TYPE SELECTOR (radio cards) ─────────────────── */
.req-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.req-type-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--surface-border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.req-type-option:hover {
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--accent-green) 30%, transparent);
}

.req-type-option input[type="radio"] {
  position: absolute;
  opacity: 0; width: 0; height: 0;
  pointer-events: none;
}

.req-type-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent-green) 55%, transparent);
  background: color-mix(in srgb, var(--accent-green) 6%, transparent);
}

.req-type-option::after {
  content: '';
  position: absolute;
  top: 10px; right: 10px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  background: var(--surface-strong);
  transition: border-color 0.15s, background 0.15s;
}

.req-type-option:has(input:checked)::after {
  background: var(--text-accent-green);
  border-color: var(--text-accent-green);
  box-shadow: inset 0 0 0 3px var(--bg);
}

.req-type-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.req-type-icon svg {
  width: 16px; height: 16px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.req-type-option:has(input:checked) .req-type-icon {
  background: color-mix(in srgb, var(--accent-green) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent-green) 28%, transparent);
}

.req-type-option:has(input:checked) .req-type-icon svg {
  stroke: var(--text-accent-green);
}

.req-type-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.req-type-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Team selector (shown when "Specific Team" is chosen) */
.req-team-selector-wrap {
  display: none;
}

.req-team-selector-wrap.visible {
  display: block;
}

/* Anonymous toggle row */
.req-anon-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface-strong);
  cursor: pointer;
  transition: border-color 0.15s;
  user-select: none;
}

.req-anon-row:hover {
  border-color: color-mix(in srgb, var(--accent-amber) 30%, transparent);
}

.req-anon-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent-amber);
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
}

.req-anon-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.req-anon-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Character counter for textarea */
.req-char-counter {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

.req-char-counter.warn { color: var(--text-accent-amber); }
.req-char-counter.over { color: var(--text-accent-pink); }

/* Confirmation state shown after submit */
.req-submit-confirm {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 32px;
  gap: 14px;
}

.req-submit-confirm.visible { display: flex; }

.req-confirm-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-green) 16%, transparent);
  border: 2px solid color-mix(in srgb, var(--accent-green) 35%, transparent);
  display: flex; align-items: center; justify-content: center;
}

.req-confirm-icon svg {
  width: 28px; height: 28px;
  stroke: var(--text-accent-green); fill: none; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.req-confirm-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-primary);
}

.req-confirm-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 420px;
}


/* ═══════════════════════════════════════════════════════════
   CONFIG PAGE  (config-requests.html)
═══════════════════════════════════════════════════════════ */

.req-handler-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.req-handler-row:last-child { border-bottom: none; }
.req-handler-row:hover { background: var(--surface-hover); }

.req-handler-info { flex: 1; min-width: 0; }

.req-handler-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.req-handler-sub {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .req-detail-grid { grid-template-columns: 1fr 270px; }
}

@media (max-width: 780px) {
  .req-detail-grid      { grid-template-columns: 1fr; }
  .req-header-card      { padding: 20px; }
  .req-title            { font-size: 22px; }
}

@media (max-width: 680px) {
  /* Request list: hide team, assigned, date columns */
  .req-table-header                    { display: none; }
  .rq-team, .rq-assigned, .rq-date    { display: none; }
  .rq-source                           { width: 85px; }
  .rq-status                           { width: 90px; }
  .rq-actions                          { width: 52px; }

  /* Submit form: stack type grid */
  .req-type-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════
   MESSAGES — internal SMS-style messaging system
═══════════════════════════════════════════════════════════ */

/* ── THREAD LIST ─────────────────────────────────────────── */
/* Each row is an <a> linking to the thread page; sits inside
   a .glass card that wraps the whole list.                  */
.msg-thread-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-border);
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s;
}

.msg-thread-row:last-child { border-bottom: none; }
.msg-thread-row:hover      { background: var(--surface-hover); }

/* Visible focus ring for keyboard nav */
.msg-thread-row:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: -2px;
}

/* Avatar container — single avatar (DM) or stacked (group) */
.msg-thread-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.msg-thread-avatar .team-avatar {
  width: 44px;
  height: 44px;
  font-size: 14px;
}

/* Group: two overlapping avatars in opposite corners */
.msg-thread-avatar.group .team-avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
  position: absolute;
  border: 2px solid var(--bg);
}

.msg-thread-avatar.group .team-avatar:nth-child(1) {
  top: 0; left: 0;
  background: color-mix(in srgb, var(--accent-blue) 22%, var(--surface-strong));
  color: var(--text-accent-blue);
}

.msg-thread-avatar.group .team-avatar:nth-child(2) {
  bottom: 0; right: 0;
  background: color-mix(in srgb, var(--accent-pink) 22%, var(--surface-strong));
  color: var(--text-accent-pink);
}

/* "+N" overlay when group has 3+ participants */
.msg-thread-avatar .msg-group-count {
  position: absolute;
  bottom: -2px; right: -2px;
  height: 18px; min-width: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

.msg-thread-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg-thread-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.msg-thread-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.msg-thread-row.unread .msg-thread-name { font-weight: 700; }

.msg-thread-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.msg-thread-row.unread .msg-thread-time {
  color: var(--text-accent-green);
  font-weight: 700;
}

.msg-thread-preview {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.msg-thread-row.unread .msg-thread-preview { color: var(--text-primary); }

.msg-thread-preview .preview-prefix { color: var(--text-muted); }

.msg-thread-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

/* Direct vs Group differentiator — shape AND color, never color alone */
.msg-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}

.msg-type-pill svg {
  width: 10px; height: 10px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

.msg-type-pill.direct {
  color: var(--text-accent-blue);
  border-color: color-mix(in srgb, var(--accent-blue) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-blue) 10%, transparent);
}

.msg-type-pill.group {
  color: var(--text-accent-purple);
  border-color: color-mix(in srgb, var(--accent-purple) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-purple) 10%, transparent);
}

/* Unread message count — round badge */
.msg-unread-count {
  height: 18px; min-width: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* ── CONVERSATION VIEW ───────────────────────────────────── */

.msg-conv-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
  height: calc(100dvh - 220px); /* progressive enhancement for mobile */
  min-height: 480px;
  overflow: hidden;
}

.msg-conv-header {
  flex: 0 0 auto;
  padding: 14px 18px;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-strong);
}

.msg-conv-header .msg-thread-avatar,
.msg-conv-header .msg-thread-avatar .team-avatar {
  width: 36px; height: 36px;
  font-size: 12px;
}

.msg-conv-header .msg-thread-avatar.group .team-avatar {
  width: 24px; height: 24px;
  font-size: 9px;
}

.msg-conv-title-block {
  flex: 1;
  min-width: 0;
}

.msg-conv-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-conv-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-conv-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.msg-conv-action-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.msg-conv-action-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.msg-conv-action-btn:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.msg-conv-action-btn svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.msg-conv-action-btn.danger:hover {
  background: color-mix(in srgb, var(--accent-pink) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
  color: var(--text-accent-pink);
}


/* ── MESSAGE STREAM ──────────────────────────────────────── */

.msg-stream {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-gutter: stable;
}

/* Day divider — "Today", "Yesterday", or formatted date */
.msg-day-divider {
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 14px;
  margin: 8px 0 4px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
}

/* A group of consecutive messages from one sender */
.msg-bubble-group {
  display: flex;
  gap: 8px;
  max-width: 78%;
  align-items: flex-end;
}

.msg-bubble-group.outgoing {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-bubble-group.incoming {
  align-self: flex-start;
}

.msg-bubble-group .team-avatar {
  width: 28px; height: 28px;
  font-size: 10px;
  margin-bottom: 4px;
}

.msg-bubble-group.outgoing .team-avatar { display: none; }

.msg-bubble-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

/* Sender name — shown above the first bubble in group chats */
.msg-sender-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-left: 12px;
  margin-bottom: 2px;
}

.msg-bubble {
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.msg-bubble-group.incoming .msg-bubble {
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  border-bottom-left-radius: 6px;
}

.msg-bubble-group.outgoing .msg-bubble {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  border-bottom-right-radius: 6px;
  font-weight: 500;
}

/* Only the LAST bubble in a stack gets the "tail" corner */
.msg-bubble-group.incoming .msg-bubble:not(:last-child) {
  border-bottom-left-radius: 18px;
}
.msg-bubble-group.outgoing .msg-bubble:not(:last-child) {
  border-bottom-right-radius: 18px;
}

.msg-bubble-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  padding: 0 6px;
}

.msg-bubble-group.outgoing .msg-bubble-time { text-align: right; }


/* ── REPLY FORM ──────────────────────────────────────────── */

.msg-reply-form {
  flex: 0 0 auto;
  border-top: 1px solid var(--surface-border);
  padding: 10px 12px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--surface-strong);
}

.msg-reply-input {
  flex: 1;
  min-height: 38px;
  max-height: 140px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}

.msg-reply-input::placeholder { color: var(--text-muted); }

.msg-reply-input:focus {
  border-color: rgba(96, 239, 188, 0.50);
  background: var(--surface-hover);
}

.msg-reply-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.18s, transform 0.18s;
}

.msg-reply-send:hover { opacity: 0.88; transform: translateY(-1px); }
.msg-reply-send:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.msg-reply-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.msg-reply-send svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}


/* ── COMPOSE / RECIPIENT PICKER ──────────────────────────── */

.msg-compose-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

/* Type toggle — Direct vs Group radio cards */
.msg-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.msg-type-toggle label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--surface-border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.msg-type-toggle label:hover {
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--accent-blue) 30%, transparent);
}

.msg-type-toggle input[type="radio"] {
  position: absolute;
  opacity: 0; width: 0; height: 0;
  pointer-events: none;
}

/* Use :focus-within so a keyboard user lands a visible ring on the card */
.msg-type-toggle label:focus-within {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.msg-type-toggle label:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent-blue) 55%, transparent);
  background: color-mix(in srgb, var(--accent-blue) 6%, transparent);
}

.msg-type-toggle .msg-type-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.msg-type-toggle label:has(input:checked) .msg-type-icon {
  background: color-mix(in srgb, var(--accent-blue) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent-blue) 28%, transparent);
}

.msg-type-toggle .msg-type-icon svg {
  width: 16px; height: 16px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.msg-type-toggle label:has(input:checked) .msg-type-icon svg {
  stroke: var(--text-accent-blue);
}

.msg-type-toggle-text { display: flex; flex-direction: column; gap: 2px; }

.msg-type-toggle-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.msg-type-toggle-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ── CANCEL-TASK CHOICE (binary radio cards, cancel vs. keep-and-unlink) ── */
.cancel-task-choice {
  border: none;
  margin: 0;
  padding: 0;
}

.cancel-task-choice-desc {
  margin-bottom: 12px;
}

.cancel-task-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cancel-task-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--surface-border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.cancel-task-option:hover {
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--accent-blue) 30%, transparent);
}

.cancel-task-option input[type="radio"] {
  position: absolute;
  opacity: 0; width: 0; height: 0;
  pointer-events: none;
}

/* :focus-within puts a visible ring on the whole card for keyboard users */
.cancel-task-option:focus-within {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.cancel-task-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent-blue) 55%, transparent);
  background: color-mix(in srgb, var(--accent-blue) 6%, transparent);
}

/* The destructive option gets the pink "danger" treatment only once selected,
   so it doesn't read as an alarming default before the user picks anything. */
.cancel-task-option-danger:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent-pink) 55%, transparent);
  background: color-mix(in srgb, var(--accent-pink) 6%, transparent);
}

.cancel-task-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cancel-task-option:has(input:checked) .cancel-task-icon {
  background: color-mix(in srgb, var(--accent-blue) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent-blue) 28%, transparent);
}

.cancel-task-option-danger:has(input:checked) .cancel-task-icon {
  background: color-mix(in srgb, var(--accent-pink) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent-pink) 28%, transparent);
}

.cancel-task-icon svg {
  width: 16px; height: 16px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.cancel-task-option:has(input:checked) .cancel-task-icon svg {
  stroke: var(--text-accent-blue);
}

.cancel-task-option-danger:has(input:checked) .cancel-task-icon svg {
  stroke: var(--text-accent-pink);
}

.cancel-task-text { display: flex; flex-direction: column; gap: 2px; }

.cancel-task-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.cancel-task-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

@media (max-width: 680px) {
  .cancel-task-options { grid-template-columns: 1fr; }
}

/* Recipient chips for selected recipients */
.msg-recipient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  min-height: 46px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
}

.msg-recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  font-size: 13px;
  color: var(--text-primary);
}

.msg-recipient-chip .team-avatar {
  width: 22px; height: 22px;
  font-size: 9px;
}

.msg-recipient-chip-remove {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  padding: 0;
}

.msg-recipient-chip-remove:hover { color: var(--text-accent-pink); }

.msg-recipient-chip-remove svg {
  width: 10px; height: 10px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
}


/* ── PARTICIPANT LIST (header expand / report context) ───── */

.msg-participants {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.msg-participant {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-border);
}

.msg-participant:last-child { border-bottom: none; }

.msg-participant-info { flex: 1; min-width: 0; }

.msg-participant-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.msg-participant-role {
  font-size: 11px;
  color: var(--text-muted);
}


/* ── DANGER-ACTION CARD (block / report confirmations) ───── */

.msg-danger-card {
  max-width: 560px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg-danger-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-pink) 14%, transparent);
  border: 2px solid color-mix(in srgb, var(--accent-pink) 35%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-danger-icon svg {
  width: 28px; height: 28px;
  stroke: var(--text-accent-pink); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.msg-danger-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-primary);
}

.msg-danger-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.msg-danger-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn-danger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--accent-pink) 50%, transparent);
  background: color-mix(in srgb, var(--accent-pink) 14%, transparent);
  color: var(--text-accent-pink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.18s, transform 0.18s;
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--accent-pink) 22%, transparent);
  transform: translateY(-1px);
}

.btn-danger svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
}


/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 680px) {
  .msg-conv-shell {
    height: calc(100vh - 160px);
    height: calc(100dvh - 160px);
    min-height: 360px;
  }

  .msg-conv-header { padding: 12px 14px; }
  .msg-stream      { padding: 14px 10px; }
  .msg-reply-form  { padding: 8px 10px; }

  .msg-bubble-group { max-width: 88%; }

  .msg-thread-row { padding: 11px 12px; }

  .msg-thread-avatar,
  .msg-thread-avatar .team-avatar {
    width: 40px; height: 40px;
    font-size: 13px;
  }
  .msg-thread-avatar.group .team-avatar {
    width: 26px; height: 26px;
    font-size: 10px;
  }

  .msg-thread-meta { gap: 4px; }

  .msg-type-toggle      { grid-template-columns: 1fr; }
  .msg-compose-card     { padding: 18px; }
}


/* ═══════════════════════════════════════════════════════════
   NEWSLETTER PAGES
   Used by: Newsletters/Index, Details, PostDetails,
            NewPost, EditPost, PublishPost, Subscribers,
            Deliveries
═══════════════════════════════════════════════════════════ */

/* ── NEWSLETTER CARD GRID ────────────────────────────────── */
.nl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.nl-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}

.nl-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
  background: var(--surface-hover);
}

.nl-card-accent {
  height: 3px;
  background: var(--nl-color, var(--accent-green));
  flex-shrink: 0;
}

.nl-card-body {
  padding: 20px 20px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nl-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--nl-color, var(--accent-green)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--nl-color, var(--accent-green)) 25%, transparent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.nl-card-icon svg {
  width: 18px; height: 18px;
  stroke: var(--nl-color, var(--text-accent-green)); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.nl-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.nl-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nl-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--surface-border);
  gap: 8px;
}

.nl-card-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.nl-card-stat svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

.nl-card-stat strong {
  color: var(--text-secondary);
  font-weight: 600;
}


/* ── NEWSLETTER DETAIL HEADER ────────────────────────────── */
.nl-header-card {
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.nl-header-card::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle,
  color-mix(in srgb, var(--accent-green) 18%, transparent),
  transparent 70%);
  pointer-events: none;
}

.nl-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.nl-header-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.4px;
  color: var(--text-primary);
}

.nl-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.nl-header-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin-bottom: 16px;
}

.nl-header-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nl-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

.nl-meta-item svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
  opacity: 0.6; flex-shrink: 0;
}

.nl-meta-item strong {
  color: var(--text-primary);
  font-weight: 600;
}


/* ── POST LIST TABLE ─────────────────────────────────────── */
.nl-post-table { overflow: hidden; }

.nl-post-table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
}

.nl-post-row {
  position: relative;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-border);
  gap: 0;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s;
}

.nl-post-row:last-child { border-bottom: none; }
.nl-post-row:hover { background: var(--surface-hover); }

.nlp-subject   { flex: 1; min-width: 0; padding-right: 16px; }
.nlp-status    { width: 110px; flex-shrink: 0; }
.nlp-date      { width: 140px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.nlp-delivered { width: 90px;  flex-shrink: 0; font-size: 12px; color: var(--text-muted); text-align: right; }
.nlp-actions   { width: 100px; flex-shrink: 0; display: flex; gap: 4px; justify-content: flex-end; }

.nl-post-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nl-post-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}


/* ── POST DETAIL LAYOUT ──────────────────────────────────── */
.nl-detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

.nl-post-header-card {
  padding: 28px 32px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.nl-post-header-card::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle,
  color-mix(in srgb, var(--accent-purple) 14%, transparent),
  transparent 70%);
  pointer-events: none;
}

.nl-post-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.nl-newsletter-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-accent-purple);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--accent-purple) 35%, transparent);
  background: color-mix(in srgb, var(--accent-purple) 10%, transparent);
}

.nl-post-title-text {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.nl-post-meta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nl-post-body-card { padding: 28px 32px; }

.nl-post-body-content {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 680px;
}

.nl-post-body-content h1,
.nl-post-body-content h2,
.nl-post-body-content h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 1.5em 0 0.5em;
  line-height: 1.25;
}

.nl-post-body-content h1 { font-size: 26px; }
.nl-post-body-content h2 { font-size: 22px; }
.nl-post-body-content h3 { font-size: 18px; }
.nl-post-body-content p  { margin-bottom: 1em; }

.nl-post-body-content a {
  color: var(--text-accent-green);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent-green) 40%, transparent);
}

.nl-post-body-content ul,
.nl-post-body-content ol { margin: 0 0 1em 1.5em; }
.nl-post-body-content li { margin-bottom: 0.4em; }

.nl-post-body-content blockquote {
  border-left: 3px solid var(--accent-purple);
  padding: 10px 18px;
  margin: 1em 0;
  color: var(--text-muted);
  font-style: italic;
  background: var(--surface-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nl-post-body-content code {
  font-family: monospace;
  font-size: 13px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  padding: 2px 6px;
}

/* Sidebar panels */
.nl-sidebar-stack { display: flex; flex-direction: column; gap: 16px; }

.nl-info-card { padding: 18px 20px; }

.nl-info-card-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.nl-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--surface-border);
  font-size: 13px;
}

.nl-info-row:last-child { border-bottom: none; }
.nl-info-label { color: var(--text-muted); }
.nl-info-value { color: var(--text-primary); font-weight: 600; }

.nl-action-list { display: flex; flex-direction: column; gap: 8px; }

.nl-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
}

.nl-action-btn:hover {
  background: var(--surface-hover);
  border-color: color-mix(in srgb, var(--accent-green) 30%, transparent);
}

.nl-action-btn svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  opacity: 0.7;
}

.nl-action-btn.nl-action-publish {
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
  background: color-mix(in srgb, var(--accent-green) 8%, transparent);
  color: var(--text-accent-green);
  font-weight: 700;
}

.nl-action-btn.nl-action-publish:hover {
  background: color-mix(in srgb, var(--accent-green) 14%, transparent);
}

.nl-action-btn.nl-action-danger {
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
  background: color-mix(in srgb, var(--accent-pink) 8%, transparent);
  color: var(--text-accent-pink);
}

.nl-action-btn.nl-action-danger:hover {
  background: color-mix(in srgb, var(--accent-pink) 14%, transparent);
}


/* ── COMPOSE / EDIT FORM ─────────────────────────────────── */
.nl-compose-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

.nl-compose-card { padding: 28px 32px; }

.form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
  min-height: 340px;
  transition: border-color 0.18s, background 0.18s;
  outline: none;
  -webkit-appearance: none;
}

.form-textarea::placeholder { color: var(--text-muted); }

.form-textarea:focus {
  border-color: rgba(96, 239, 188, 0.50);
  background: var(--surface-hover);
}

.form-textarea-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.form-char-count { font-size: 11px; color: var(--text-muted); }

.nl-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.nl-toolbar-btn {
  width: 30px; height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  transition: background 0.15s, color 0.15s;
}

.nl-toolbar-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.nl-toolbar-btn svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.nl-toolbar-sep {
  width: 1px;
  height: 18px;
  background: var(--surface-border);
  margin: 0 4px;
  flex-shrink: 0;
}

.nl-tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  min-height: 46px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  align-items: center;
  transition: border-color 0.18s;
}

.nl-tag-input-wrap:focus-within { border-color: rgba(96, 239, 188, 0.50); }

.nl-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 10px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent-purple) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-purple) 28%, transparent);
  color: var(--text-accent-purple);
  font-size: 12px;
  font-weight: 600;
}

.nl-tag-chip-remove {
  width: 14px; height: 14px;
  border: none; background: none;
  color: inherit; cursor: pointer;
  opacity: 0.7;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  border-radius: 50%;
  transition: opacity 0.15s;
}

.nl-tag-chip-remove:hover { opacity: 1; }

.nl-tag-chip-remove svg {
  width: 10px; height: 10px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
}

.nl-tag-text-input {
  flex: 1;
  min-width: 120px;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
}

.nl-tag-text-input::placeholder { color: var(--text-muted); }

.nl-compose-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--surface-border);
  margin-top: 24px;
}


/* ── PUBLISH PAGE ────────────────────────────────────────── */
.nl-publish-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.nl-preview-card { padding: 0; overflow: hidden; }

.nl-preview-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--surface-border);
}

.nl-preview-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.nl-preview-subject {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.nl-preview-preheader { font-size: 13px; color: var(--text-muted); font-style: italic; }

.nl-preview-body {
  padding: 24px;
  font-size: 14px;
  line-height: 1.72;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--surface-border);
  max-height: 420px;
  overflow-y: auto;
}

.nl-preview-body p  { margin-bottom: 1em; }
.nl-preview-body h2 { font-family: var(--font-display); font-size: 20px; color: var(--text-primary); margin: 1.25em 0 0.5em; }

.nl-preview-footer-bar {
  padding: 12px 24px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nl-preview-footer-bar a { color: var(--text-accent-blue); text-decoration: underline; }

.nl-publish-options { display: flex; flex-direction: column; gap: 16px; }

.nl-publish-card {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nl-publish-card-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nl-send-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 13px;
  border-radius: var(--radius-md);
  border: 2px solid var(--surface-border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.nl-send-option input[type="radio"],
.nl-send-option input[type="checkbox"] {
  position: absolute;
  opacity: 0; width: 0; height: 0;
  pointer-events: none;
}

.nl-send-option:focus-within {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.nl-send-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent-green) 55%, transparent);
  background: color-mix(in srgb, var(--accent-green) 6%, transparent);
}

.nl-send-option-radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s;
}

.nl-send-option:has(input:checked) .nl-send-option-radio {
  border-color: var(--accent-green);
}

.nl-send-option:has(input:checked) .nl-send-option-radio::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-accent-green);
  display: block;
}

.nl-send-option-text { flex: 1; }
.nl-send-option-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.nl-send-option-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }

.nl-schedule-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.nl-confirm-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--surface-border);
  padding-top: 14px;
}

.nl-confirm-stat {
  flex: 1;
  text-align: center;
  padding: 0 8px;
  border-right: 1px solid var(--surface-border);
}

.nl-confirm-stat:last-child { border-right: none; }

.nl-confirm-stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  color: var(--text-accent-green);
}

.nl-confirm-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.nl-publish-actions { display: flex; flex-direction: column; gap: 8px; }
.nl-publish-actions .btn-primary { justify-content: center; }
.nl-publish-actions .btn-ghost   { justify-content: center; }


/* ── SUBSCRIBER & DELIVERY TABLES ────────────────────────── */
.nl-sub-table { overflow: hidden; }

.nl-sub-table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
}

.nl-sub-row {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--surface-border);
  gap: 0;
  transition: background 0.15s;
}

.nl-sub-row:last-child { border-bottom: none; }
.nl-sub-row:hover { background: var(--surface-hover); }

.nlsub-identity { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.nlsub-email    { width: 220px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.nlsub-date     { width: 130px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.nlsub-status   { width: 120px; flex-shrink: 0; }
.nlsub-actions  { width: 60px;  flex-shrink: 0; display: flex; justify-content: flex-end; }

.nldel-identity { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.nldel-email    { width: 220px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.nldel-sent     { width: 150px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.nldel-status   { width: 100px; flex-shrink: 0; }
.nldel-opened   { width: 120px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); }

.nl-sub-name  { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-sub-email-text { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* ── NEWSLETTER STATUS PILLS (extend .status-pill base) ───── */
.status-draft        { color: var(--text-muted); border-color: var(--surface-border); background: var(--surface); }
.status-scheduled    { color: var(--text-accent-blue);   border-color: color-mix(in srgb, var(--accent-blue)   35%, transparent); background: color-mix(in srgb, var(--accent-blue)   10%, transparent); }
.status-published    { color: var(--text-accent-green);  border-color: color-mix(in srgb, var(--accent-green)  35%, transparent); background: color-mix(in srgb, var(--accent-green)  10%, transparent); }
.status-new          { color: var(--text-accent-purple); border-color: color-mix(in srgb, var(--accent-purple) 35%, transparent); background: color-mix(in srgb, var(--accent-purple) 10%, transparent); }
.status-subscribed   { color: var(--text-accent-green);  border-color: color-mix(in srgb, var(--accent-green)  35%, transparent); background: color-mix(in srgb, var(--accent-green)  10%, transparent); }
.status-unsubscribed { color: var(--text-muted); border-color: var(--surface-border); background: var(--surface); }
.status-bounced      { color: var(--text-accent-pink);   border-color: color-mix(in srgb, var(--accent-pink)   35%, transparent); background: color-mix(in srgb, var(--accent-pink)   10%, transparent); }
.status-delivered    { color: var(--text-accent-blue);   border-color: color-mix(in srgb, var(--accent-blue)   35%, transparent); background: color-mix(in srgb, var(--accent-blue)   10%, transparent); }
.status-opened       { color: var(--text-accent-green);  border-color: color-mix(in srgb, var(--accent-green)  35%, transparent); background: color-mix(in srgb, var(--accent-green)  10%, transparent); }


/* ── RESPONSIVE: NEWSLETTER PAGES ───────────────────────── */
@media (max-width: 1024px) {
  .nl-grid { grid-template-columns: repeat(2, 1fr); }
  .nl-detail-grid,
  .nl-compose-grid,
  .nl-publish-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nl-grid { grid-template-columns: 1fr; }

  .nl-post-table-header          { display: none; }
  .nlp-date, .nlp-delivered      { display: none; }
  .nlp-actions                   { width: auto; }

  .nl-sub-table-header           { display: none; }
  .nlsub-email, .nlsub-date,
  .nlsub-actions                 { display: none; }
  .nldel-email, .nldel-sent,
  .nldel-opened                  { display: none; }

  .nl-header-card,
  .nl-post-header-card           { padding: 20px; }
  .nl-header-title               { font-size: 22px; }
  .nl-post-title-text            { font-size: 22px; }
  .nl-post-body-card             { padding: 20px; }
  .nl-compose-card               { padding: 20px; }

  .nl-schedule-inputs            { grid-template-columns: 1fr; }

  .nl-header-top                 { flex-direction: column; align-items: flex-start; }
  .nl-header-actions             { width: 100%; }
  .nl-header-actions .btn-primary,
  .nl-header-actions .btn-ghost  { flex: 1; justify-content: center; }
}

/* ── Affiliate social account table ───────────────────
       These rules are page-specific. Move to site.css once
       the feature ships, alongside the aff-icon-* rules
       from the Index page. */

.aff-sa-table {
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  margin-top: 4px;
  /* No overflow:hidden — the reveal-rows must expand freely in flow */
}

/* Give the header top-corner rounding that the container cannot
   provide without overflow:hidden clipping the foldouts */
.aff-sa-header {
  border-radius: calc(var(--radius-sm) - 1px) calc(var(--radius-sm) - 1px) 0 0;
}

/* Column widths — identical in both the header and data rows */
.aff-sa-col-platform { width: 120px; flex-shrink: 0; }
.aff-sa-col-handle   { flex: 0 0 200px; min-width: 0; padding: 0 12px; }
.aff-sa-col-url      { flex: 1; min-width: 0; padding: 0 12px; overflow: hidden; }
.aff-sa-col-actions  { width: 76px; flex-shrink: 0; display: flex; gap: 5px; justify-content: flex-end; }

.aff-sa-url-link {
  font-size: 12px;
  color: var(--text-accent-blue);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aff-sa-url-link:hover         { text-decoration: underline; }
.aff-sa-url-link:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
  border-radius: 2px;
}
.aff-sa-url-none { font-size: 13px; color: var(--text-muted); }

/* Inner area of an open edit panel */
.aff-sa-edit-inner {
  padding: 16px;
  background: var(--surface-strong);
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}

/* Tint the row whose edit panel is currently open */
.aff-sa-row.aff-sa-is-editing {
  background: color-mix(in srgb, var(--accent-blue) 5%, var(--surface-hover));
}
.aff-sa-row.aff-sa-is-editing .ac-name {
  color: var(--text-accent-blue);
}

/* The base reveal-row cap is 400 px. Three-field forms fit,
   but raise the limit so longer validation messages aren't clipped. */
.aff-sa-edit-panel.open { max-height: 700px; }

@media (max-width: 680px) {
  .aff-sa-col-url      { display: none; }
  .aff-sa-col-handle   { flex: 1; padding-right: 8px; }
  .aff-sa-col-platform { width: 100px; }
  .aff-sa-col-actions  { width: 64px; }
}


/* fieldset reset — kill default browser chrome so it matches .glass */
.affiliate-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.affiliate-legend {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  padding: 14px 16px 8px;
}

.affiliate-row-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px 14px;
  border-bottom: 1px solid var(--surface-border);
}

.affiliate-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.affiliate-row:hover { background: var(--surface-hover); }

.affiliate-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 3px 0;
  cursor: pointer;
  position: relative; /* containing block for the clipped input below */
}

/* SR-only: input stays in the a11y tree and keyboard-focusable,
   but its native box is visually replaced by .affiliate-radio-dot */
.affiliate-radio-label input[type="radio"] {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.affiliate-radio-dot {
  position: relative;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  background: var(--surface-strong);
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}

.affiliate-radio-dot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  transition: background 0.15s;
}

.affiliate-radio-label:has(input:checked) .affiliate-radio-dot {
  border-color: var(--text-accent-green);
}

.affiliate-radio-label:has(input:checked) .affiliate-radio-dot::after {
  background: var(--text-accent-green);
}

/* Visible keyboard-focus ring, since the native input box is clipped */
.affiliate-radio-label:has(input:focus-visible) .affiliate-radio-dot {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}

.affiliate-row-name {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.affiliate-row-name.is-none {
  color: var(--text-muted);
  font-style: italic;
}

/* Dedicated modifier so the badge's class name describes what it
   means here, rather than borrowing the unrelated "volunteer" role tint */
.role-badge.leading {
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--text-accent-green) 35%, transparent);
  background: color-mix(in srgb, var(--text-accent-green) 10%, transparent);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   MY TEAMS PAGE
   Append to the end of site.css so these rules win over the
   equal-specificity base rules they refine (.status-pill etc).
═══════════════════════════════════════════════════════════ */

/* Card grid, but as a real <ul> so screen readers announce the count */
.my-teams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.my-team-card {
  position: relative;
}

/* Leader emphasis is redundant with the "Team lead" pill — never the only cue */
.my-team-card.is-leader {
  border-color: color-mix(in srgb, var(--accent-green) 40%, transparent);
  box-shadow: inset 3px 0 0 0 var(--accent-green), var(--shadow-card);
}

.my-team-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

/* .team-manage-name is authored for a <div>; reset heading defaults */
.my-team-card .team-manage-name {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.my-team-link {
  color: inherit;
  text-decoration: none;
}

.my-team-link:hover {
  color: var(--text-accent-green);
  text-decoration: underline;
}

.my-team-link:focus-visible,
.my-team-action:focus-visible,
.my-teams-grid .cat-filter-btn:focus-visible {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Role pill: .status-pill is inline-block, this adds icon alignment */
.team-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  flex-shrink: 0;
}

.team-role-pill svg {
  width: 0.9em;
  height: 0.9em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Joined / role metadata as a definition list */
.my-team-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.my-team-meta-item {
  display: flex;
  gap: 0.4em;
  min-width: 0;
}

.my-team-meta dt {
  font-weight: 600;
  color: var(--text-muted);
}

.my-team-meta dd {
  margin: 0;
  color: var(--text-secondary);
}

.my-team-card .team-manage-desc,
.my-team-card .team-member-count {
  margin: 0;
}

.my-team-action {
  font-size: 0.75rem;
  padding: 5px 12px;
  white-space: nowrap;
}

/* Windows High Contrast: colour-based cues drop out, so keep a real border */
@media (forced-colors: active) {
  .my-team-card.is-leader {
    border-left: 3px solid Highlight;
  }
}

@media (max-width: 680px) {
  .my-teams-grid { grid-template-columns: 1fr; }

  /* Header stacks so a long team name never squeezes the role pill */
  .my-team-card .team-manage-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .my-team-card .team-manage-footer {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .my-team-action { margin-left: auto; }
}

/* ═══════════════════════════════════════════════════════════
   DESTRUCTIVE CONFIRMATION PAGES
   Danger-tinted variants of the existing .confirm-* family,
   used by /Events/Cancel and any other irreversible action.
═══════════════════════════════════════════════════════════ */

/* Wider variant — the impact grid and form need more room than
   the 620px receipt-style confirmation pages. */
.confirm-layout-wide { max-width: 780px; }

/* Pink glow instead of the green success glow */
.confirm-hero-danger::before {
  background: radial-gradient(circle,
  color-mix(in srgb, var(--accent-pink) 14%, transparent),
  transparent 65%
  );
}

.confirm-icon-danger {
  background: color-mix(in srgb, var(--accent-pink) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent-pink) 40%, transparent);
}

/* --text-accent-pink rather than --accent-pink: the raw accent
   fails contrast against the light-mode surface. */
.confirm-icon-danger svg { stroke: var(--text-accent-pink); }

/* Impact stat cards. auto-fit rather than a fixed column count so
   the grid works whether 2 or 3 cards are rendered (guest counts
   only appear when the event accepts attendees). */
.confirm-impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 420px) {
  .confirm-impact-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* Destructive submit sits in the same row as .btn-ghost */
.confirm-actions .btn-danger {
  flex: 1;
  justify-content: center;
  padding: 11px 20px;
  font-size: 14px;
}

@media (max-width: 480px) {
  .confirm-actions .btn-danger { flex: unset; }
}

/* ASP.NET emits the validation summary container unconditionally and
   marks it .validation-summary-valid when empty. Without this it
   renders as an empty bordered box on first load. */
.callout.validation-summary-valid { display: none; }
.callout ul { margin: 0; padding-left: 18px; }

/* Respect reduced-motion on the confirmation entrance animation. */
@media (prefers-reduced-motion: reduce) {
  .confirm-layout { animation: none; }
}
/* .breadcrumb applied to a semantic <ol>/<li> for screen readers;
   strip default list-box styling without touching the flex layout. */
.breadcrumb { list-style: none; margin: 0 0 16px; padding: 0; }

/* ═══════════════════════════════════════════════════════════
   CONFIRMATION PAGES — DANGER VARIANT
   Add after the existing "VOLUNTEER CONFIRMATION PAGES" block.
   Reuses .confirm-hero / .confirm-icon but swaps the green
   "success" accent for the pink "danger" accent already used
   by .danger-zone / .btn-danger / .callout.danger elsewhere.
═══════════════════════════════════════════════════════════ */
.confirm-hero.danger::before {
  background: radial-gradient(circle,
  color-mix(in srgb, var(--accent-pink) 14%, transparent),
  transparent 65%
  );
}

.confirm-icon.danger {
  background: color-mix(in srgb, var(--accent-pink) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
}

.confirm-icon.danger svg {
  stroke: var(--text-accent-pink);
}

/* Let a .btn-danger fill half the row the same way .btn-primary/.btn-ghost
   already do inside .confirm-actions. */
.confirm-actions .btn-danger { flex: 1; justify-content: center; }

/* ── REQUIRED ACKNOWLEDGEMENT ROW ─────────────────────────── */
/* "I understand this can't be undone" checkbox shown above a
   destructive submit button. Mirrors .req-anon-row's layout. */
.confirm-ack-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface-strong);
  margin-bottom: 16px;
}

.confirm-ack-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent-pink);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.confirm-ack-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

/* ── VISIBLE KEYBOARD FOCUS FOR BUTTONS/LINKS ─────────────── */
/* .btn-primary/.btn-ghost/.btn-danger/.btn-warn currently have no
   focus treatment of their own, so a keyboard user tabbing through
   gets no visible indicator of which control is focused. That's a
   pre-existing, site-wide gap (not something introduced by these two
   pages) — but it matters most exactly here, where the focused
   control may be the one that cancels a project. Added as a generic
   rule so it's fixed everywhere these classes are used, not just on
   the new pages. Safe to skip if you already handle this elsewhere. */
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.btn-danger:focus-visible,
.btn-warn:focus-visible {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}

/* Wraps a single btn-row-action button for POST-based row actions;
   keeps the form from disrupting the row's flex layout. */
.btn-row-action-form {
  display: contents;
}

/* Reset native <button> chrome so a submit button matches the
   <a class="btn-row-action"> it replaces. */
button.btn-row-action {
  padding: 0;
  border: 1px solid var(--surface-border);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

/* Persistent state coloring for icon toggle buttons (e.g. team-answering
   availability). Unlike .btn-row-action's hover-only tints, these stay
   visible so the current state is readable at rest, not just on hover. */
.btn-row-action.toggle-on {
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
  background: color-mix(in srgb, var(--accent-green) 12%, transparent);
}

.btn-row-action.toggle-on:hover {
  background: color-mix(in srgb, var(--accent-green) 20%, transparent);
}

.btn-row-action.toggle-off {
  color: var(--text-muted);
}

/* .btn-row-action had no focus-visible indicator at all (a pre-existing,
   site-wide gap — see the note above .btn-primary:focus-visible). Adding
   it here since this new toggle needs to be operable via keyboard. */
.btn-row-action:focus-visible {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}

/* Toggle switch has no visible keyboard-focus indicator anywhere it's used.
   Matches the existing focus-visible convention used for buttons. */
.toggle-switch input:focus-visible + .toggle-track {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}

/* ── GENERAL UTILITIES ──────────────────────────────────────
   The SR-only block is currently copy-pasted inline in three
   places (.notif2-chip, .color-swatch-label, .affiliate-radio-label).
   This is the same rule as a reusable class; those three can be
   collapsed onto it later.
──────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* .text-danger is referenced by asp-validation-for spans across the app but
   was never defined, so field-level validation messages currently inherit
   body colour and read as ordinary hint text. */
.text-danger {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-accent-pink);
  font-weight: 600;
}
.text-warning {
   color: var(--text-accent-amber) !important;
 }

/* Pushes a trailing action button to the right end of .page-toolbar,
   matching how .view-toggle already behaves. */
.toolbar-action { margin-left: auto; }

/* Green counterpart to the existing .btn-row-action.danger / .warn */
.btn-row-action.success:hover {
  background: color-mix(in srgb, var(--accent-green) 12%, transparent);
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
}

/* Neutral "switched off" pill. Visually identical to .status-cancelled but
   named for what it means, so the markup reads correctly. */
.status-inactive {
  color: var(--text-muted);
  border-color: var(--surface-border);
  background: var(--surface);
}


/* ── SKILL GLYPH TILE ───────────────────────────────────────
   Explicit emoji font stack: var(--font-body) is Outfit, which has no
   emoji coverage, so a bare glyph would fall through to whatever the UA
   picks — often a monochrome or tofu box on Linux. Listing the platform
   emoji fonts first keeps the tile consistent across OSes.
──────────────────────────────────────────────────────────── */
.skill-glyph {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
  'Segoe UI Symbol', 'Noto Sans Symbols 2', var(--font-body);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-primary);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
}


/* ── SKILL LIST (Index) ─────────────────────────────────── */
.skill-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--surface-border);
}

.skill-list-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.skill-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.skill-row:last-child { border-bottom: none; }
.skill-row:hover      { background: var(--surface-hover); }

/* min-width:0 lets long descriptions wrap instead of forcing the flex row wide */
.skill-row-body { flex: 1; min-width: 0; }

.skill-row-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.skill-row-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-row-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.skill-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 4px;
}


/* ── GLYPH PICKER (Create / Edit) ───────────────────────── */

/* Reset the UA fieldset box so it lays out like the sibling .form-field
   divs; the element is chosen for the grouping semantics, not its chrome. */
.glyph-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.glyph-fieldset legend { padding: 0; }

.glyph-field-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.glyph-input {
  width: 4.5rem;
  flex-shrink: 0;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
  'Segoe UI Symbol', 'Noto Sans Symbols 2', var(--font-body);
  font-size: 1.375rem;
  line-height: 1.4;
}

.glyph-hint {
  flex: 1;
  min-width: 12rem;
  margin: 0;
  align-self: center;
}

.glyph-quickpick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.glyph-quickpick-btn {
  width: 2.375rem;
  height: 2.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
  'Segoe UI Symbol', 'Noto Sans Symbols 2', var(--font-body);
  font-size: 1.125rem;
  line-height: 1;
  color: var(--text-primary);
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.glyph-quickpick-btn:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

/* The selected state uses a border-WIDTH change as well as colour, so it is
   still distinguishable without colour perception. The glyph input itself
   also displays the chosen character, which is the primary textual cue. */
.glyph-quickpick-btn[aria-pressed="true"] {
  border-width: 2px;
  border-color: var(--text-accent-green);
  background: color-mix(in srgb, var(--accent-green) 16%, transparent);
}

.glyph-quickpick-btn:focus-visible {
  outline: 2px solid var(--text-accent-green);
  outline-offset: 2px;
}


/* ── LIVE PREVIEW (Create / Edit) ───────────────────────── */
.skill-preview {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--surface-strong);
  border: 1px dashed var(--surface-border);
  border-radius: var(--radius-sm);
}

.skill-preview-body { min-width: 0; }

.skill-preview-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Applied by skill-form.js while the name field is empty, so the placeholder
   text does not read as a real value. */
.skill-preview-name.skill-preview-placeholder {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 500;
}

.skill-preview-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 2px 0 0;
}


/* ── RESPONSIVE: SKILL PAGES ────────────────────────────── */
@media (max-width: 680px) {
  /* Full-width create button under the search + filter controls rather than
     squeezed beside them. */
  .toolbar-action {
    margin-left: 0;
    flex: 1 1 100%;
    justify-content: center;
  }

  .skill-row {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  /* Actions drop to their own line so the name and description keep a
     readable measure on a narrow screen. flex-wrap above is what actually
     lets the 100% basis break the line. */
  .skill-row-actions {
    flex-basis: 100%;
    justify-content: flex-end;
    padding-top: 0;
  }

  .skill-list-header { padding: 14px 14px 12px; }

  .glyph-hint { min-width: 100%; }
}

/* ── USER SKILLS (My Skills) ──────────────────────────────
   Rows listing the current user's own skills (UserSkill: a
   SkillType + a SkillLevel). Deliberately separate from the
   existing .skill-row / .skill-list rules, which list SkillType
   catalog entries in the admin area — same visual language,
   different data, different class names so the two can't be
   conflated or accidentally restyled together.
──────────────────────────────────────────────────────────── */
.myskill-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--surface-border);
}

.myskill-list-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.myskill-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.myskill-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.15s;
}

.myskill-row:last-child { border-bottom: none; }
.myskill-row:hover      { background: var(--surface-hover); }

.myskill-row-body { flex: 1; min-width: 0; }

.myskill-row-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.myskill-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Compact variant for the abbreviated summary on the account page —
   same structure, tighter padding, no per-row actions (the card
   links out to the full manager instead). */
.myskill-row-compact { padding: 10px 0; }


/* ── SKILL LEVEL METER (read-only display) ────────────────
   Ordinal progress as filled/unfilled dots PLUS the level name as
   visible text, so level is never conveyed by colour or position
   alone. 4 dots (Novice..Expert); Unskilled renders with all dots
   empty rather than a "1st" dot, since there's no progress to show.
──────────────────────────────────────────────────────────── */
.level-meter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.level-meter-track {
  display: inline-flex;
  gap: 3px;
}

.level-meter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
}

.level-meter-dot.filled {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.level-meter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}


/* ── SKILL LEVEL SELECT (Add / Edit forms) ────────────────
   Native radio group styled as a segmented control (matches
   .filter-tabs). Every option's full name is always visible text —
   keyboard and screen-reader users get the same info as sighted
   mouse users, and no option relies on colour to be told apart.
──────────────────────────────────────────────────────────── */
.level-select {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin: 0;
  min-width: 0;
}

.level-option {
  position: relative;
  flex: 1 1 auto;
  text-align: center;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.level-option:hover { color: var(--text-primary); }

.level-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.level-option:has(input:checked) {
  background: var(--surface-strong);
  color: var(--text-accent-blue);
}

.level-option:has(input:focus-visible) {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}


/* ── RESPONSIVE: MY SKILLS PAGES ──────────────────────────── */
@media (max-width: 680px) {
  .myskill-row          { padding: 12px 14px; flex-wrap: wrap; }
  .myskill-row-actions  { flex-basis: 100%; justify-content: flex-end; }
  .myskill-list-header  { padding: 14px 14px 12px; }

  .level-select { flex-direction: column; }
  .level-option { text-align: left; }
}

/* ── MY SKILLS SUMMARY BADGES (Me page) ───────────────────
   Compact, wrapping badges for the abbreviated skill list on the
   account page. Separate from .myskill-row/.myskill-list, which
   remain the full-width list rows used on the Index management page.
──────────────────────────────────────────────────────────── */
.myskill-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.myskill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
}

/* Smaller round variant of .skill-glyph, sized for an inline badge
   rather than a list-row tile. Same emoji font stack for the same
   cross-platform-glyph-coverage reason. */
.myskill-badge-glyph {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
  'Segoe UI Symbol', 'Noto Sans Symbols 2', var(--font-body);
  font-size: 0.9rem;
  line-height: 1;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 50%;
}

.myskill-badge-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

@media (max-width: 680px) {
  .myskill-badge { padding: 5px 10px 5px 5px; }
}
/* ── TASK SKILL REQUIREMENTS ──────────────────────────────
   Requirement-level badges. Combine with the .status-pill base
   (same pill shape as task/event status pills). The word itself
   ("Required"/"Recommended"/"Optional") always carries the meaning;
   colour is a secondary cue, and the amber/blue/neutral triad stays
   distinguishable without red-green perception.
──────────────────────────────────────────────────────────── */
.req-required {
  color: var(--text-accent-amber);
  border-color: color-mix(in srgb, var(--accent-amber) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-amber) 10%, transparent);
}

.req-recommended {
  color: var(--text-accent-blue);
  border-color: color-mix(in srgb, var(--accent-blue) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-blue) 10%, transparent);
}

.req-optional {
  color: var(--text-muted);
  border-color: var(--surface-border);
  background:   var(--surface);
}

/* Minimum-skill line inside a .skill-row on the task detail page:
   a small caption next to the read-only .level-meter. Wraps on
   narrow screens so the meter never gets clipped. */
.skill-req-min {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.skill-req-min-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   CANDIDATE FITNESS INDICATOR
   Sits inside .candidate-row-info so the bar gets the full width
   of the info column and stays legible in the 320px right rail.
   The numeric label is the authoritative signal — the bar is
   aria-hidden and colour is redundant reinforcement only, so the
   control still reads correctly for colour-blind users.
═══════════════════════════════════════════════════════════ */
.fitness {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.fitness-track {
  flex: 1;
  min-width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--surface-border);
  overflow: hidden;
}

.fitness-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--fitness-color, var(--accent-blue));
  transition: width 0.3s ease;
}

.fitness-value {
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;   /* stops the label jittering 9% → 100% */
  color: var(--fitness-text, var(--text-secondary));
  white-space: nowrap;
}

.fitness-high { --fitness-color: var(--accent-green); --fitness-text: var(--text-accent-green); }
.fitness-mid  { --fitness-color: var(--accent-amber); --fitness-text: var(--text-accent-amber); }
.fitness-low  { --fitness-color: var(--accent-pink);  --fitness-text: var(--text-accent-pink);  }

@media (prefers-reduced-motion: reduce) {
  .fitness-fill { transition: none; }
}

/* ── Truncated-list footer (count note + "show more") ───── */
.list-cap-note {
  margin: 0;
  padding: 8px 16px;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--text-secondary);
  border-top: 1px solid var(--surface-border);
  background: var(--surface-strong);
}

.list-more-wrap {
  padding: 10px 16px 14px;
}

.list-more-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════
   PASSWORD RESET PAGES
   Append to site.css.
═══════════════════════════════════════════════════════════ */

/* ── AUTH CARD: SEMANTIC HEADING ────────────────────────────
   .auth-card-title / .auth-card-sub were written for <div>s. These
   pages use <h1> and <p> so the heading order is correct for screen
   readers; UA default margins would otherwise fight the card spacing. */
h1.auth-card-title { margin: 0 0 6px; font-weight: 600; }
p.auth-card-sub    { margin-top: 0; }

/* ── AUTH LAYOUT: MOBILE VIEWPORT HEIGHT ────────────────────
   100vh ignores the collapsing browser chrome on mobile, so the card
   sits slightly off-centre and can be pushed under the URL bar. dvh
   tracks the visible viewport; guarded so older engines keep 100vh. */
@supports (min-height: 100dvh) {
  .auth-layout { min-height: 100dvh; }
}

/* ── PASSWORD REQUIREMENT CHECKLIST ─────────────────────────
   Met/unmet is signalled three ways — icon shape (circle vs tick),
   colour, and visually-hidden text — so it survives colour blindness,
   forced-colours mode, and screen readers alike. */
.pw-req-list {
  list-style: none;
  margin: -0.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.pw-req {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
  transition: color 0.15s;
}

.pw-req-icon {
  flex-shrink: 0;
  width: 0.875rem;
  height: 0.875rem;
  display: flex;
}

.pw-req-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pw-req .icon-met     { display: none; }
.pw-req.met           { color: var(--text-accent-green); }
.pw-req.met .icon-met   { display: block; }
.pw-req.met .icon-unmet { display: none; }

/* Keeps the literal punctuation set from wrapping mid-list and gives it
   enough tracking to be legible at 0.75rem. */
.pw-req-glyphs {
  white-space: nowrap;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* ── PASSWORD MATCH INDICATOR ───────────────────────────────
   The wording carries the meaning; colour only reinforces it. */
.pw-match {
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 600;
  min-height: 1.05rem;      /* reserves the line so the form doesn't jump */
}

.pw-match.ok  { color: var(--text-accent-green); }
.pw-match.bad { color: var(--text-accent-pink); }

/* ── LINKS INSIDE CALLOUTS ──────────────────────────────────
   .callout-text sets its own colour, so an <a> inside it was
   indistinguishable from surrounding prose — colour alone wouldn't be
   enough regardless, hence the underline. */
.callout-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.callout-text a:hover { opacity: 0.75; }

/* ── KEYBOARD FOCUS ─────────────────────────────────────────
   .form-input sets outline:none and signals focus with a border-colour
   change only — too subtle, and colour-only. .btn-submit and
   .form-input-reveal were missing from the existing focus-visible list
   entirely. Same treatment as the .btn-primary rule already in the file. */
.form-input:focus-visible,
.form-textarea:focus-visible,
.btn-submit:focus-visible,
.form-input-reveal:focus-visible,
.auth-footer a:focus-visible,
.callout-text a:focus-visible {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}

.btn-submit:focus-visible { outline-offset: 3px; }

/* ── REDUCED MOTION ─────────────────────────────────────────
   .btn-submit lifts on hover; suppress it for users who ask. */
@media (prefers-reduced-motion: reduce) {
  .btn-submit:hover { transform: none; }
  .pw-req { transition: none; }
}

/* ═══════════════════════════════════════════════════════════
   PASSWORD RESET — CONFIRMATION PAGES
   Append to site.css, after the password reset block.

   These pages reuse the .confirm-* family from the volunteer
   confirmation pages, but inside an .auth-card rather than the
   full-width .confirm-layout, so a few pieces need re-anchoring.
═══════════════════════════════════════════════════════════ */

/* Centred variant of .auth-card. Wider than the 420px form cards
   because the "what happens next" list reads badly at that width. */
.auth-card-confirm {
  text-align: center;
  max-width: 480px;
}

/* .confirm-headline was written for a <div>; these pages use <h1> so the
   heading order is correct, and UA margins would break the card rhythm. */
h1.confirm-headline {
  margin: 0 0 10px;
  font-weight: 600;
}

/* .confirm-sub already centres itself with margin:0 auto. */
.auth-card-confirm .confirm-sub { margin-bottom: 0; }

/* .confirm-icon assumes a hero with a radial glow behind it; standing
   alone in a card it needs its own breathing room. */
.auth-card-confirm .confirm-icon { margin-bottom: 20px; }

/* ── NEXT-STEPS BLOCK INSIDE AN AUTH CARD ───────────────────
   .confirm-next-steps is normally a .glass card in its own right. Inside
   .auth-card that would nest two translucent surfaces, so use the flat
   inset treatment instead. Left-aligned: it's prose, and the centred
   parent would leave ragged left edges on wrapped lines. */
.auth-card-confirm .confirm-next-steps {
  text-align: left;
  margin-top: 24px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}

/* Semantic <ol>: the numbering is a real sequence, so screen readers
   should get list semantics. .confirm-step-num supplies the visible
   marker (and is aria-hidden), hence the native marker is suppressed. */
ol.confirm-next-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* .confirm-next-steps-heading was written for a <div>. */
h2.confirm-next-steps-heading { margin: 0 0 12px; }

/* ── ACTION ROW ─────────────────────────────────────────────
   .confirm-actions stretches its children to fill the row and already
   stacks below 480px; it just needs separating from the copy above.
   .btn-ghost isn't in the existing "flex: 1" rules, so add it. */
.auth-card-confirm .confirm-actions { margin-top: 24px; }
.confirm-actions .btn-ghost { flex: 1; justify-content: center; }

/* ── REDUCED MOTION ─────────────────────────────────────────
   .btn-primary lifts on hover. */
@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   DANGER ZONE — two-column split
   Puts the benign action and the destructive one in separate
   panels, side by side, so neither can be mis-clicked for the
   other. Stacks below 680px (the site's usual breakpoint) with
   a wider gap so they still don't read as one list.
═══════════════════════════════════════════════════════════ */
.danger-zone-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.danger-action-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface);
}

/* Distinguished by fill AND border weight, not hue alone, so it
   survives deuteranopia/protanopia and forced-colors mode. */
.danger-action-col--destructive {
  border-color: color-mix(in srgb, var(--accent-pink) 40%, transparent);
  background: color-mix(in srgb, var(--accent-pink) 8%, transparent);
}

/* Bottom-aligns the buttons across both columns even when the two
   descriptions wrap to different heights. */
.danger-action-actions {
  margin-top: auto;
  padding-top: 4px;
}

/* --text-muted is 30% alpha; these descriptions carry the warning
   about what the button does, so they get the 50% ramp instead. */
.danger-action-col .danger-action-desc { color: var(--text-secondary); }

/* Reset the h2 default margins now that the title is a real heading. */
h2.danger-zone-title { margin: 0; }

@media (max-width: 680px) {
  .danger-zone-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ── SKILL REQUIREMENTS INSIDE A CONFIRM DETAIL ROW ───────
   Denser than the full-width .skill-row list on the task detail
   page: this sits inside .confirm-detail-body, which is already
   indented by the row's icon column, so it gets no padding of
   its own and leans on .skill-req-min / .level-meter for the
   two comparison lines.
──────────────────────────────────────────────────────────── */
.confirm-skill-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.confirm-skill-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* min-width:0 lets long skill names wrap instead of widening the row */
.confirm-skill-body { flex: 1; min-width: 0; }

.confirm-skill-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.confirm-skill-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Fixed label column so the "Minimum" and "Your level" meters line
   up under one another. The rem value tracks the label font size, so
   it still holds if the user scales text up. */
.confirm-skill-body .skill-req-min-label { min-width: 5.5rem; }

/* Small round variant of .skill-glyph for dense inline lists —
   inherits the emoji font stack from the base class. */
.skill-glyph.skill-glyph-sm {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.9rem;
  border-radius: 50%;
}

/* Met / below-minimum pills. Combine with the .status-pill base.
   The words carry the meaning; green vs amber is a secondary cue
   and deliberately avoids a red/green pairing. */
.skill-match-met {
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-green) 10%, transparent);
}

.skill-match-short {
  color: var(--text-accent-amber);
  border-color: color-mix(in srgb, var(--accent-amber) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-amber) 10%, transparent);
}

/* Redundant colour cue on the user's own meter when it falls short of
   the minimum. Never the sole signal — the pill text says the same. */
.level-meter.is-short .level-meter-dot.filled {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
}

@media (max-width: 480px) {
  .confirm-skill-item { gap: 8px; }
  /* Drop the fixed label column so the meter isn't squeezed on narrow
     screens; .skill-req-min already wraps. */
  .confirm-skill-body .skill-req-min-label { min-width: 0; }
}

/* ── FILTER GROUP (labelled segmented radio control) ───────
   Wraps a .filter-tabs pill group with a visible label so two or more
   independent filters can share one .page-toolbar and still be told
   apart. The group is a real radiogroup over native <input type="radio">
   elements, so arrow keys move between options, only the selected option
   is a tab stop, and AT announces "Status, Active, 1 of 2" instead of a
   run of unlabelled buttons.

   Label reuses .category-filter-bar-label (Events page) rather than
   introducing a second micro-label class.
──────────────────────────────────────────────────────────── */
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* Five role pills plus a label will overflow a narrow toolbar; wrapping
   is scoped to .filter-group so existing single-row .filter-tabs
   elsewhere keep their current behaviour. */
.filter-group .filter-tabs {
  flex-wrap: wrap;
}

/* Radio-driven variant of .filter-tab: same pill, but on a <label>
   wrapping an .sr-only radio instead of a <button>. Existing
   button-based .filter-tab / .filter-tab.active usage is untouched. */
.filter-tab:has(input[type="radio"]) {
  position: relative;          /* contains the absolutely-positioned .sr-only input */
  display: inline-flex;
  align-items: center;
}

.filter-tab:has(input:checked) {
  background: var(--surface-strong);
  color: var(--text-primary);
}

/* Focus lands on the visually hidden radio, so the pill has to surface it.
   Matches the site's existing :focus-visible convention. */
.filter-tab:has(input:focus-visible) {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}

@media (max-width: 680px) {
  /* Each filter takes its own row instead of being squeezed against the
     other; .search-wrap already goes full width at this breakpoint. */
  .filter-group { flex: 1 1 100%; }
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL FOOTER
═══════════════════════════════════════════════════════════ */
#app-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.875rem 2rem;
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--topbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--topbar-border);
}

.footer-meta,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.footer-links a {
  color: var(--text-accent-blue);
  text-decoration: underline;
  transition: opacity 0.15s;
}

.footer-links a:hover { opacity: 0.75; }

.footer-links a:focus-visible {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}

@media (max-width: 680px) {
  #app-footer { padding: 0.875rem 1rem; }
}

/* ═══════════════════════════════════════════════════════════
   VERSION HISTORY  (version-history.html)

   Each .release accepts an optional inline --rel-color to tint
   its top rule and version number, matching the .stat-card
   pattern. Left unset, the card renders in neutral tones.

   Each .change-group carries a category class that sets
   --chg-color for its heading, icon, and bullet markers.
   Category is never conveyed by colour alone — the heading
   text and icon shape both identify it.
═══════════════════════════════════════════════════════════ */
.release-log {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 880px;
}

.release {
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}

/* Coloured top-edge rule */
.release::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--rel-color, var(--surface-border));
  opacity: 0.8;
}

.release-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--surface-border);
}

.release-ident {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.release-version {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--rel-color, var(--text-primary));
}

.release-date {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.release-summary {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 68ch;
}

/* ── CHANGE GROUPS ────────────────────────────────────── */
.change-group + .change-group { margin-top: 18px; }

.change-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--chg-color, var(--text-secondary));
  margin-bottom: 9px;
}

.change-group-title svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.change-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-left: 22px;
}

.change-list li {
  position: relative;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
  max-width: 68ch;
}

.change-list li::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--chg-color, var(--text-muted));
  opacity: 0.7;
}

.change-added    { --chg-color: var(--text-accent-green);  }
.change-improved { --chg-color: var(--text-accent-blue);   }
.change-fixed    { --chg-color: var(--text-accent-amber);  }
.change-security { --chg-color: var(--text-accent-purple); }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 680px) {
  .release          { padding: 20px 18px; }
  .release-version  { font-size: 1.5rem; }
  .release-head     { margin-bottom: 16px; }
}


/* Effective / last-updated block at the top of each document. */
.docmeta {
  color: var(--ink-muted);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9em;
  margin: 0 0 2rem;
}

.docmeta p { margin: 0.2rem 0; font-size: inherit; }

/* Conspicuous terms (warranty disclaimer, liability limits).
   Set off by weight, a rule, and a panel — not by capitalisation, which
   screen readers may read letter-by-letter and which is harder to read. */
.conspicuous {
  font-weight: 700;
  background: var(--panel);
  border-left: 4px solid var(--accent);
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
}

/* Highlight a section when the reader arrives via an anchor link. */
section:target > h2 {
  background: var(--panel);
  box-shadow: -0.4rem 0 0 var(--panel), 0.4rem 0 0 var(--panel);
}

/* ── BUTTON STYLED AS FOOTER LINK ────────────────────────────
   Same look as .auth-footer a, but for a <button> inside a POST
   form — used where a plain <a> would issue a GET (e.g. sign out
   from the terms-update gate). */
.auth-footer-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-accent-green);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-footer-btn:hover { opacity: 0.75; }

.auth-footer-btn:focus-visible {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}

/* Explanation under a .section-header. --text-primary because
   --text-secondary/--text-muted fall below 4.5:1 on a light-mode card. */
.section-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

/* Group heading inside a panel (h3 under a .section-title h2).
   --text-primary keeps it above 4.5:1 in both themes. */
.section-subhead {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1rem 0 0.25rem;
}
/* ═══════════════════════════════════════════════════════════
   ORGANIZER APPLICATION
═══════════════════════════════════════════════════════════ */

/* Centers a width-constrained column in #main. The max-width classes
   (.req-submit-layout, .settings-form) only cap the width; without auto
   side margins the content sits against the left edge. */
.centered-column {
  margin-inline: auto;
}

/* Social media account rows. Unlike .form-row, these stay two columns
   on narrow screens so every input stays under its column heading. */
.social-account-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.social-account-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* .badge-option hides its checkbox but had no visible keyboard focus.
   Same treatment as the site's other :focus-visible rules. */
.badge-option:has(input:focus-visible) {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}

/* Checkmark on selected badges, so the selected state isn't conveyed by
   colour alone. Uses currentColor, so it also survives forced-colors mode. */
.badge-option-check {
  display: none;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-option:has(input:checked) .badge-option-check { display: block; }

/* Link inside running text. The base `a` rule strips colour and underline,
   which leaves inline links indistinguishable from the text around them. */
.inline-link {
  color: var(--text-accent-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inline-link:hover { opacity: 0.75; }

.inline-link:focus-visible {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
}

/* "Opens in a new tab" icon */
.inline-link svg {
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.2em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ═══════════════════════════════════════════════════════════
   VETTING PAGE  (Auth/Vetting)
   Append to site.css.

   No new components — the page is built from .settings-form,
   .req-submit-hero, .confirm-next-steps, .callout, .timeline and
   .status-pill. These rules only re-anchor those pieces for the
   semantic elements the page uses and for being stacked inside
   .settings-form.
═══════════════════════════════════════════════════════════ */

/* ── SEMANTIC HEADINGS ──────────────────────────────────────
   .req-submit-hero-title, .section-title, .settings-section-desc,
   .callout-title and .callout-text were all written for <div>s. The
   page uses real headings and paragraphs so the outline is correct
   for screen readers; UA default margins would break the rhythm. */
h1.req-submit-hero-title { margin: 0 0 6px; }
p.req-submit-hero-sub    { margin: 0; }

h1.section-title,
h2.section-title         { margin: 0; }

p.settings-section-desc  { margin: 0; }

p.callout-title          { margin-top: 0; }
p.callout-text           { margin: 0; }

/* ── PANEL STACKING ─────────────────────────────────────────
   .settings-form supplies the 20px gap between panels, but
   .req-submit-hero and .callout each carry a 20px bottom margin of
   their own for standalone use, which doubles the gap here. */
.settings-form > .req-submit-hero,
.settings-form > .callout { margin-bottom: 0; }

/* Inside a panel the callout is the last child, so its spacing
   belongs above it rather than below. */
.settings-section > .callout:last-child { margin: 16px 0 0; }

/* ── STATUS PILL IN A SECTION HEADER ────────────────────────
   .section-header is space-between with no gap; once the heading and
   the pill are long enough to meet (~320px) they touch. */
.section-header > .status-pill { margin-left: 12px; }

/* ── TIMELINE ───────────────────────────────────────────────
   The stages are a real sequence, so the list is an <ol>; the dots
   supply the visible marker. .timeline already zeroes side padding. */
ol.timeline { list-style: none; margin: 0; }

/* Sits alongside the existing .done / .active / .warning dots, for a
   stage that finished with a negative outcome. Colour is decoration
   only here — every stage states its outcome in .timeline-detail. */
.timeline-dot.danger {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
}

/* ═══════════════════════════════════════════════════════════
   VETTING — moderator queue, review, and result pages
   Extends the existing .req-row / .req-table-header list pattern
   and the .status-pill / .req-detail-grid detail pattern.
═══════════════════════════════════════════════════════════ */

/* ── OUTCOME PILLS ────────────────────────────────────────
   Same colours as .status-published / .status-missed, but named for
   what they mean here so the markup reads correctly. */
.status-approved {
  color: var(--text-accent-green);
  border-color: color-mix(in srgb, var(--accent-green) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-green) 10%, transparent);
}

.status-denied {
  color: var(--text-accent-pink);
  border-color: color-mix(in srgb, var(--accent-pink) 35%, transparent);
  background:   color-mix(in srgb, var(--accent-pink) 10%, transparent);
}

/* ── COLUMN TOKENS ────────────────────────────────────────
   Mirrors the .rq-* tokens used by the requests list. */
.vt-person { flex: 1; min-width: 0; padding-right: 12px; }
.vt-teams  { width: 200px; flex-shrink: 0; padding: 0 12px; }
.vt-vetter { width: 170px; flex-shrink: 0; padding: 0 12px; }
.vt-date   { width: 110px; flex-shrink: 0; padding: 0 12px; }
.vt-status { width: 120px; flex-shrink: 0; padding-left: 12px; text-align: right; }

/* ── APPLICANT CELL ───────────────────────────────────────
   Avatar + username over full name. */
.vet-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.vet-person-text {
  flex: 1;
  min-width: 0;
}

/* .req-subject-text / .req-subject-preview are block-level in the
   requests list; here they sit inside inline spans. */
.vet-person-text .req-subject-text,
.vet-person-text .req-subject-preview { display: block; }

/* ── UNREVIEWED ROWS ──────────────────────────────────────
   Three independent cues so this never relies on colour alone:
   the accent edge, the tinted row, and the "New" pill inside it.
   An inset shadow rather than a border-left keeps the cell text
   aligned with the rows in the section below. */
.vet-row-new {
  box-shadow: inset 3px 0 0 var(--accent-blue);
  background: color-mix(in srgb, var(--accent-blue) 5%, transparent);
}

.vet-row-new:hover {
  background: color-mix(in srgb, var(--accent-blue) 11%, transparent);
}

/* Whole-row links had no focus treatment. Same pattern as the
   existing .msg-thread-row rule, applied to .req-row so it also
   fixes the requests list. Drop this block if you'd rather not
   touch that page. */
.req-row:focus-visible {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: -2px;
}

/* ── SECTION SPACING ──────────────────────────────────────
   The queue page stacks two list sections. */
.vet-section + .vet-section { margin-top: 32px; }

/* ── APPLICATION Q&A ──────────────────────────────────────
   A <dl>: <dt> is the prompt the applicant answered, <dd> the answer.
   Sentence case rather than the tracked caps used for card titles,
   because these are real questions, not labels. */
.vet-qa-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}

.vet-qa-question {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.vet-qa-answer {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  /* Keep long answers inside a comfortable measure. */
  max-width: 68ch;
}

.vet-qa-answer.is-blank {
  color: var(--text-muted);
  font-style: italic;
}

/* ── LISTED SOCIAL ACCOUNTS ───────────────────────────────
   Network name in a fixed gutter so the handles line up. */
.vet-social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.vet-social-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--surface-border);
}

.vet-social-row:last-child { border-bottom: none; }

.vet-social-network {
  width: 130px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.vet-social-handle {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/* ── INLINE PILL ROW (requested teams) ────────────────────
   Wraps the shared .vol-task-req-pill. */
.vet-pill-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── DECISION FORM ────────────────────────────────────────
   .form-textarea is squared off at the top and 340px tall because
   the newsletter editor sits a toolbar above it. Neither applies here. */
.vet-decision-notes {
  min-height: 150px;
  border-radius: var(--radius-sm);
}

/* ── RESPONSIVE ───────────────────────────────────────────
   Below 680px the applicant and the status carry the row; the
   supporting columns are still in the row's aria-label. */
@media (max-width: 680px) {
  .vt-teams,
  .vt-vetter,
  .vt-date { display: none; }

  .vt-status { width: 104px; }

  .vet-social-row {
    flex-direction: column;
    gap: 2px;
  }

  .vet-social-network { width: auto; }
}

/* ── INLINE NOTE EDITING ───────────────────────────────── */
/* Pairs a note row with its edit foldout as a single list item. The row
   separator moves onto the wrapper; otherwise an open panel would render
   below its own row's bottom border. */
.logistical-note-item { border-bottom: 1px solid var(--surface-border); }
.logistical-note-item:last-child { border-bottom: none; }
.logistical-note-item .logistical-note-row { border-bottom: none; }

/* Groups the row's action buttons tightly rather than inheriting the row's
   12px content gap, which is sized for body-to-button spacing. */
.note-row-actions {
  display: flex;
  gap: 6px;
  align-self: flex-start;
  margin-top: 2px;
  flex-shrink: 0;
}

/* .event-edit-panel-inner's 24px/32px padding is sized for the full-width
   event form; inside a note row it should align with the row's own padding. */
.note-edit-panel .event-edit-panel-inner { padding: 14px 16px; }

/* ═══════════════════════════════════════════════════════════
   ADDITIONS FOR THE POLLS PAGES
   Append to site.css. Colours come from existing tokens only,
   so light/dark mode needs no extra work.
═══════════════════════════════════════════════════════════ */

/* ── GLOBAL: [hidden] ─────────────────────────────────────
   Several components set display via a class, which outranks the
   user-agent [hidden] rule and leaves "hidden" elements visible.
   The poll list relies on this when filtering rows.
──────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }

/* ── FIELDSET RESET ───────────────────────────────────────
   Identical to .affiliate-fieldset / .glyph-fieldset /
   .accent-picker-fieldset. Worth collapsing all four into this
   one class when you next touch those pages.
──────────────────────────────────────────────────────────── */
.plain-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.plain-fieldset legend { padding: 0; }


/* ═══════════════════════════════════════════════════════════
   POLL LIST  (Polls/Index)
   Rows reuse .req-table-header and .req-row; only the column
   tokens and the list reset are new.
═══════════════════════════════════════════════════════════ */
.poll-list { overflow: hidden; }

.poll-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* The row is not itself a link, so the highlight follows focus
   into the question link and the action button. */
.poll-list .req-row:focus-within { background: var(--surface-hover); }

.pl-question  { flex: 1; min-width: 0; padding-right: 12px; display: flex; flex-direction: column; gap: 2px; }
.pl-audience  { width: 170px; flex-shrink: 0; padding: 0 12px; display: flex; flex-direction: column; gap: 2px; }
.pl-responses { width: 100px; flex-shrink: 0; padding: 0 12px; text-align: right; }
.pl-status    { width: 110px; flex-shrink: 0; padding: 0 12px; }
.pl-actions   { width: 64px;  flex-shrink: 0; display: flex; gap: 5px; justify-content: flex-end; }

.poll-row-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.3;
}

.poll-row-link:hover { text-decoration: underline; }

.poll-row-link:focus-visible {
  outline: 2px solid var(--text-accent-blue);
  outline-offset: 2px;
  border-radius: 2px;
}


/* ═══════════════════════════════════════════════════════════
   POLL FORM  (Polls/Create, Polls/Details edit panel)
═══════════════════════════════════════════════════════════ */

/* Sections stacked inside a single .glass card rather than one
   card each, so the edit panel and the create page match. */
.poll-form-section + .poll-form-section { margin-top: 28px; }

/* ── ANSWER OPTION EDITOR ─────────────────────────────── */
.poll-option-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.poll-option-row .form-input {
  flex: 1;
  min-width: 0;
}

.poll-option-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Disabled move/remove buttons must still read as present, but
   clearly inert — and must not react to hover. */
.btn-row-action:disabled {
  opacity: 0.35;
  cursor: default;
}

.btn-row-action:disabled:hover {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--surface-border);
}

/* The stock .reveal-row cap of 400px is too short for a long team list. */
.reveal-row.poll-reveal-tall.open { max-height: 900px; }


/* ═══════════════════════════════════════════════════════════
   CHOICE LISTS  (selection mode, audience, and the ballot)
   Built on .nl-send-option; only the container and a square
   checkbox counterpart to .nl-send-option-radio are new.
═══════════════════════════════════════════════════════════ */
.poll-choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nl-send-option-check {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 2px solid var(--surface-border);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}

.nl-send-option:has(input:checked) .nl-send-option-check {
  border-color: var(--accent-green);
  background: color-mix(in srgb, var(--accent-green) 22%, transparent);
}

/* Checkmark drawn with two borders so it inherits the accent colour */
.nl-send-option:has(input:checked) .nl-send-option-check::after {
  content: '';
  width: 5px; height: 9px;
  margin-top: -2px;
  border: solid var(--text-accent-green);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}


/* ═══════════════════════════════════════════════════════════
   READ-ONLY OPTION LIST  (Polls/Details)
   Rows reuse .req-info-row / .req-info-label / .req-info-value.
═══════════════════════════════════════════════════════════ */
.poll-static-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* .req-info-card is a title-less, full-bleed row list: it carries no padding
   of its own, so a heading dropped straight into it sits at x=0 and gets
   clipped by the card's overflow:hidden at the rounded corners. Inset the
   heading to match the rows instead of padding the card, which would pull
   the row dividers off the edges everywhere .req-info-card is used. */
.req-info-card > .nl-info-card-title {
  padding: 16px 16px 0;
  margin-bottom: 10px;
}

/* Small form sitting at the foot of a .req-info-card, matching the
   padding and divider of the .req-info-row list above it. */
.poll-inline-form {
  padding: 14px 16px;
  border-top: 1px solid var(--surface-border);
}


/* ═══════════════════════════════════════════════════════════
   RESULTS TABLE  (Polls/Results)
   A real table: the counts and shares are text, and the bars are
   decorative, so screen readers get the numbers directly.
═══════════════════════════════════════════════════════════ */
.poll-results {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.poll-results th,
.poll-results td {
  text-align: left;
  padding: 14px 8px;
  border-bottom: 1px solid var(--surface-border);
  vertical-align: top;
}

.poll-results thead th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 8px;
}

.poll-results tbody tr:last-child th,
.poll-results tbody tr:last-child td { border-bottom: none; }

.poll-results tbody th { font-weight: 400; }

.poll-col-num {
  width: 90px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.poll-results thead .poll-col-num { text-align: right; font-weight: 700; }

.poll-result-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.poll-result-bar-wrap {
  display: block;
  height: 8px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--surface-border);
  overflow: hidden;
}

.poll-result-bar {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--accent-green);
}

/* ── VOTER CHIPS (non-anonymous results) ──────────────── */
.poll-voter-chips {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  /* Poll list: drop the columns that are least useful on a phone
     and let the question own the row. */
  .poll-list .req-table-header { display: none; }
  .pl-audience,
  .pl-responses               { display: none; }
  .poll-list .req-row         { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .pl-question                { flex: 1 1 100%; padding-right: 0; }
  .pl-status                  { width: auto; padding: 0; }
  .pl-actions                 { width: auto; margin-left: auto; }

  /* Option editor: the arrows and remove button move under the input. */
  .poll-option-row            { flex-wrap: wrap; }
  .poll-option-row .form-input { flex: 1 1 100%; }
  .poll-option-actions        { margin-left: auto; }

  /* Results: tighten the numeric columns so option text keeps room. */
  .poll-results th,
  .poll-results td            { padding: 12px 4px; }
  .poll-col-num               { width: 64px; font-size: 13px; }
}

/* ── CHOICE CARD TEXT ─────────────────────────────────────
   .nl-send-option-name / -desc are spans inside a <label>, so they
   rendered inline. Block display stacks them and lets -desc's
   existing margin-top apply.
──────────────────────────────────────────────────────────── */
.nl-send-option-name,
.nl-send-option-desc { display: block; }

/* .confirm-card-heading was written for a <div>; /Error uses an <h2>
   so the section shows up in a screen reader's heading list. Only the
   UA margin needs stripping — the class already sets its own size. */
h2.confirm-card-heading { margin: 0; }

/* Trace IDs are long strings with no break opportunities, so they
   overflow the card on narrow viewports without anywhere-wrapping.
   Sized in em so it tracks .confirm-detail-value instead of pinning
   a px size the user can't scale. */
.code-chip {
  font-family: monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  padding: 2px 6px;
}