/*
  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;
}


/* ═══════════════════════════════════════════════════════════
   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);
  }
}

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);
}

/* 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);
}

/* 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);
}

/* 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-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-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-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-activity,
.user-row-activity  { width: 120px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.lhu-actions,
.user-row-actions   { width: 110px; 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; }
  .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;
  font-size: 12px;
  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-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 {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.event-edit-panel.open {
  max-height: 1200px; /* large enough for any plausible form height */
}

.event-edit-panel-inner {
  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; }
}


/* ═══════════════════════════════════════════════════════════
   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;
}

/* 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"] {
  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; }
}