@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&family=Syne:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0C080D;
  --bg2:       #110D12;
  --bg3:       #17121A;
  --bg4:       #1E1722;
  --crimson:   #8B1A2F;
  --crimson-l: #B02440;
  --crimson-d: #5C0F1E;
  --violet:    #6B3FA0;
  --violet-l:  #8B5FC0;
  --violet-d:  #3D1F6E;
  --rose:      #C2445A;
  --text:      #EDE4E8;
  --text2:     #A99BA8;
  --text3:     #9C8FA0;        /* bumped from #6B5F6A (3.0:1) to meet WCAG AA 4.5:1 */
  --text-min:  #8B7D8A;        /* fallback for the very rare case the previous value is genuinely needed */
  --border:    rgba(139,26,47,0.2);
  --border2:   rgba(107,63,160,0.15);

  /* ── Safe-area inset shorthands (2026-05-31 mobile sweep) ─────────
     Always wrap with max(<fallback>, env(...)) so devices without the
     inset (most desktop browsers) still get the fallback. Use these in
     sticky composers, fixed CTAs, and bottom toasts. */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);
}

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

body {
  font-family: 'Syne', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  /* 300ms tap delay was already disabled via viewport meta on most browsers,
     but touch-action: manipulation also disables double-tap-to-zoom on body,
     making taps feel instant on iOS. Inputs/zoomable images still respond. */
  touch-action: manipulation;
}

/* Global tap-highlight tint (replaces the ugly default grey iOS rectangle
   on every link/button). Subtle rose at low alpha matches the brand. */
* { -webkit-tap-highlight-color: rgba(194, 68, 90, 0.15); }

/* Mobile UX utility classes (2026-05-31) — opt-in.
   .min-vh-100 handles the iOS Safari 100vh bug (URL bar would steal pixels).
   100dvh tracks the dynamic viewport so layouts no longer jump on scroll. */
.min-vh-100 { min-height: 100vh; min-height: 100dvh; }
.h-screen   { height: 100vh; height: 100dvh; }

/* Safe-area padding utilities — apply to sticky composers, fixed CTAs, modals. */
.safe-pad-bottom { padding-bottom: max(1rem, calc(1rem + env(safe-area-inset-bottom, 0px))); }
.safe-pad-top    { padding-top:    max(1rem, calc(1rem + env(safe-area-inset-top, 0px))); }
.safe-pad-x      { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }

/* Tactile feedback on tap — pairs with :active. On touch devices :hover is
   unreliable; :active fires reliably on every tap and gives the user the
   "press" feedback they expect from native apps. */
.touch-feedback { transition: transform 100ms ease-out, opacity 100ms ease-out; }
.touch-feedback:active { transform: scale(0.97); opacity: 0.92; }

/* Smooth iOS scrolling — apply to any overflow container. */
.scroll-smooth-touch { -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1000; opacity: 0.3; mix-blend-mode: overlay;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem 3rem;
  background: rgba(12,8,13,0.9);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem; font-weight: 300;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
}
.logo em { font-style: italic; color: var(--rose); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-link { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text3); text-decoration: none; transition: color 0.3s; }
.nav-link:hover { color: var(--text2); }
.nav-cta {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--rose); border: 1px solid var(--crimson);
  padding: 0.55rem 1.4rem; text-decoration: none; transition: all 0.3s;
  position: relative; overflow: hidden;
}
.nav-cta::before { content: ''; position: absolute; inset: 0; background: var(--crimson-d); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
.nav-cta:hover::before { transform: scaleX(1); }
.nav-cta span { position: relative; z-index: 1; }

/* BUTTONS */
.btn-primary {
  display: inline-block; padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--crimson), var(--violet-d));
  color: var(--text); font-family: 'Syne', sans-serif;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; transition: all 0.3s; border: none; cursor: pointer;
  position: relative; overflow: hidden;
}
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, var(--crimson-l), var(--violet)); opacity: 0; transition: opacity 0.3s; }
.btn-primary:hover::after { opacity: 1; }
.btn-primary span { position: relative; z-index: 1; }

.btn-ghost {
  display: inline-block; padding: 0.9rem 2rem;
  background: transparent; color: var(--text2);
  border: 1px solid var(--border); font-family: 'Syne', sans-serif;
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase;
  text-decoration: none; transition: all 0.3s; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--crimson); color: var(--text); }

/* SHARED LAYOUT */
.section-inner { max-width: 1100px; margin: 0 auto; padding: 0 3rem; }
.page-wrap { padding: 7rem 3rem 5rem; max-width: 1100px; margin: 0 auto; }

.label {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--rose); display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem;
}
.label::after { content: ''; flex: 0 0 40px; height: 1px; background: var(--rose); opacity: 0.5; }

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 300; line-height: 1.1; margin-bottom: 1rem;
}

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; line-height: 1.1; margin-bottom: 0.5rem;
}

/* Heading gradient — red→purple shift on em accents inside any heading
   (user-authored 2026-05-08). Replaces the prior solid rose accent. */
.section-title em,
.page-title em,
.hero-title em,
.card-title em,
.gate-title em,
h1 em, h2 em, h3 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--crimson) 0%, var(--rose) 35%, var(--violet-l) 80%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* background-clip:text only paints inside the element box; with tight heading
     line-heights, italic descenders (g, y, p, j) fell outside it and rendered
     transparent ("cut off"). Padding extends the gradient box to cover them. */
  padding-bottom: 0.15em;
}

.page-sub { font-size: 0.88rem; color: var(--text2); line-height: 1.8; font-weight: 400; margin-bottom: 2.5rem; max-width: 520px; }

/* CARDS */
.card {
  border: 1px solid var(--border); background: var(--bg2);
  position: relative; overflow: hidden; transition: background 0.3s;
}
.card:hover { background: var(--bg3); }
.card-top-line::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--crimson), var(--violet), transparent);
}

/* DIVIDER */
.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 3rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-size: 0.62rem; color: var(--text3); letter-spacing: 0.08em; }
.footer-links { display: flex; gap: 2rem; }
.footer-link { font-size: 0.62rem; color: var(--text3); text-decoration: none; letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.2s; }
.footer-link:hover { color: var(--text2); }

/* FORM ELEMENTS */
.form-label { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text3); margin-bottom: 0.45rem; display: block; }
.form-input {
  width: 100%; padding: 0.8rem 1rem;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-family: 'Syne', sans-serif;
  font-size: 0.85rem; font-weight: 400; outline: none;
  transition: border-color 0.25s;
}
.form-input:focus { border-color: var(--crimson); }
.form-input::placeholder { color: var(--text3); opacity: 0.6; }

/* BADGES */
.badge { display: inline-block; font-size: 0.58rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; padding: 0.2rem 0.6rem; border: 1px solid; }
.badge-rose { border-color: var(--crimson); color: var(--rose); }
.badge-green { border-color: rgba(74,222,128,0.3); color: #4ade80; background: rgba(74,222,128,0.06); }
.badge-yellow { border-color: rgba(251,191,36,0.3); color: #fbbf24; background: rgba(251,191,36,0.06); }
.badge-violet { border-color: rgba(139,95,192,0.3); color: var(--violet-l); background: rgba(139,95,192,0.06); }
.badge-muted { border-color: var(--border); color: var(--text3); }

/* STATUS DOTS */
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.68rem; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; }
.status.active .status-dot { background: #4ade80; }
.status.active { color: #4ade80; }
.status.pending .status-dot { background: #fbbf24; }
.status.pending { color: #fbbf24; }
.status.inactive .status-dot { background: var(--text3); }
.status.inactive { color: var(--text3); }

/* TABLES */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 0.75rem 1.5rem; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text3); border-bottom: 1px solid var(--border); }
td { padding: 1rem 1.5rem; font-size: 0.82rem; border-bottom: 1px solid rgba(139,26,47,0.07); color: var(--text2); font-weight: 400; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(139,26,47,0.03); }

/* NAV ACTIVE STATE */
.nav-link.nav-active { color: var(--rose); }

/* PAGE INDICATOR BAR */
.page-indicator {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  background: rgba(12,8,13,0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  height: 36px; overflow-x: auto;
}
.pi-item {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0 1rem; height: 100%;
  font-size: 0.55rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text3);
  text-decoration: none; transition: color 0.2s;
  border-right: 1px solid var(--border); position: relative;
  white-space: nowrap; flex-shrink: 0;
}
.pi-item:hover { color: var(--text2); }
.pi-item.pi-active { color: var(--rose); }
.pi-item.pi-active::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--crimson), transparent);
}
.pi-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--crimson); flex-shrink: 0; }

/* MEMBER PILL in bottom bar */
.pi-member-pill {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0 1rem; margin-left: auto;
  font-size: 0.55rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--rose);
  flex-shrink: 0; white-space: nowrap;
}
.pi-tier-dot { width: 5px; height: 5px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
.pi-logout {
  background: transparent; border: none; color: var(--text3);
  font-size: 0.55rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; cursor: pointer; font-family: 'Syne', sans-serif;
  padding: 0; transition: color 0.2s;
}
.pi-logout:hover { color: #f87171; }

/* page-indicator was removed in Session 12 (js/nav.js:59) — body padding-bottom
   was reserving 36px for it. Now an orphan phantom gap; removed. */

@media (max-width: 700px) {
  .page-indicator { justify-content: flex-start; }
  .pi-item { padding: 0 0.75rem; font-size: 0.5rem; }
}

/* ── Skip to main content link (a11y) ───────────────────────────────
   First focusable element after <body>. Visually hidden until focused
   via Tab key, then slides into view. Lets keyboard + screen-reader
   users jump past repetitive nav.
   Class is namespaced `a11y-skip-link` because some pages already use
   `.skip-link` locally for a different "skip-the-form" concept. */
.a11y-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--crimson);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  transition: top 0.15s ease;
}
.a11y-skip-link:focus,
.a11y-skip-link:focus-visible {
  top: 0;
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

/* ── Keyboard focus visibility — site-wide ────────────────────────────
   Previously every interactive element had outline:none with no replacement.
   This single rule restores keyboard accessibility everywhere. */
:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
  border-radius: 2px;
}
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
[role="radio"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}


/* ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeUp 0.5s ease both; }

/* ─── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .section-inner, .page-wrap { padding: 7rem 1.5rem 4rem; }
  nav { padding: 1.1rem 1.5rem; }
  footer { padding: 2rem 1.5rem; flex-direction: column; gap: 0.75rem; text-align: center; }
  .footer-links { justify-content: center; }
}

/* Hamburger kicks in at 900px (not 600) so the nav never wraps to a
   second row on narrow non-fullscreen browser windows. Without this,
   between ~600-900px the 5 nav links + logo + CTA exceed the available
   width and wrap, doubling the nav height to ~140px and overlapping
   page-level fixed layouts (community-shell composer, etc.). */
@media (max-width: 900px) {
  /* NAV — hamburger on mobile + narrow desktop */
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: fixed; top: 56px; left: 0; right: 0; background: rgba(12,8,13,0.98); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 1.5rem; gap: 1rem; z-index: 199; }
  .nav-hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: transparent; border: none; }
  .nav-hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text2); transition: all 0.2s; }
  .nav-cta { display: none; }
}

@media (max-width: 600px) {
  nav { padding: 1rem 1.5rem; }

  /* PAGE INDICATOR — element removed in Session 12 but rules left for safety */
  .page-indicator { overflow-x: auto; justify-content: flex-start; height: 32px; }
  .pi-item { padding: 0 0.65rem; font-size: 0.5rem; flex-shrink: 0; }

  /* SECTION TITLES */
  .section-title { font-size: 1.8rem; }
  .page-title { font-size: 1.8rem; }

  /* BUTTONS */
  .btn-primary { padding: 1.05rem 1.6rem; font-size: 0.7rem; min-height: 48px; }
  .btn-ghost   { padding: 1rem 1.4rem; min-height: 48px; }
  .cta-row { flex-direction: column; align-items: flex-start; }

  /* TOUCH TARGETS — Apple HIG 44pt / Material 48dp.
     Universal floor for any interactive element ≤600px. Local rules can
     override (e.g., composer-send is intentionally a 38px circle inside a
     larger 56px tap area), but the default must clear the bar. */
  .nav-links.open .nav-link { padding: 0.65rem 0; min-height: 44px; display: flex; align-items: center; font-size: 0.72rem; }
  .nav-links.open .nav-cta { display: inline-block; padding: 0.95rem 1.6rem; min-height: 48px; }
  .action-btn { padding: 0.7rem 1rem; min-height: 44px; }

  /* Touch feedback site-wide on phones — press = subtle scale.
     Excludes inputs/links-in-prose where it would feel wrong. */
  button:active:not(:disabled),
  a.btn-primary:active,
  a.btn-ghost:active,
  a.nav-cta:active,
  .action-btn:active:not(:disabled),
  [role="button"]:active {
    transform: scale(0.97);
    transition: transform 80ms ease-out;
  }

  /* FORM INPUTS — prevent iOS zoom-on-focus + size for thumb.
     Also covers bot.html / community.html custom composer inputs.
     `font-size: 16px` is the iOS Safari threshold; anything smaller
     triggers focus-zoom which traps the user in zoomed state. */
  .form-input,
  input.form-input,
  textarea.form-input,
  select.form-input,
  .composer-input,
  textarea.composer-input,
  input.composer-input,
  input[type="email"],
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px !important;   /* iOS won't zoom if input >= 16px */
    min-height: 48px;
  }
  textarea, textarea.form-input { min-height: 100px; }
  textarea.composer-input { min-height: 44px; }   /* composer is intentionally smaller, just 1 line */

  /* TOAST positioning — keep above mobile safe-area + home indicator */
  .toast-stack { bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important; }

  /* MODAL on phones — bottom-sheet feel with safe-area respect.
     Drag-up handle is implied by the gradient top stripe (modal-box::before). */
  .modal-overlay .modal-content,
  .modal-overlay .modal-box {
    margin: 1rem;
    margin-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

/* ── Mobile-only safe-area cushion on FIXED bottom UI ──────────────────
   Toasts, sticky composers, and any `position: fixed; bottom: 0` element
   that lives ON the home-indicator zone needs a safe-area pad. Page-level
   composers (bot.html, community.html) handle this locally; this catches
   generic ones. */
@media (max-width: 900px) {
  .toast-stack { bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
}

/* === PHASE 5 PRIMITIVES (Banner / Modal / Form-check / Toast / Spinner) === */

/* 1. Banner system — UI-SPEC 1.1 */
.banner {
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.78rem;
  line-height: 1.55;
  border: 1px solid;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}
.banner-heading { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; }
.banner-body { color: var(--text2); font-size: 0.78rem; }
.banner-cta { margin-top: 0.6rem; align-self: flex-start; }
.banner.info { border-color: var(--border2); background: rgba(107,63,160,0.06); color: var(--violet-l); }
.banner.success { border-color: rgba(74,222,128,0.3); background: rgba(74,222,128,0.06); color: #4ade80; }
.banner.warning { border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.06); color: #fbbf24; }
.banner.error { border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.06); color: #f87171; }
.banner.expiry-cutoff { border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.08); color: #f87171; }

/* 2. Modal — UI-SPEC 1.2 (promoted from admin.html lines 121-129) */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(8,5,8,0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: none; align-items: center; justify-content: center;
  padding: 2rem;
}
.modal-overlay.visible { display: flex; }
.modal-box {
  max-width: 480px; width: 100%;
  border: 1px solid var(--border);
  background: var(--bg2);
  padding: 2rem;
  position: relative; overflow: hidden;
}
.modal-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
}
.modal-box.destructive::before {
  background: linear-gradient(90deg, transparent, #f87171, transparent);
}
.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem; font-weight: 300;
  margin-bottom: 0.5rem;
}
.modal-title em { font-style: italic; color: var(--rose); }
.modal-body {
  font-size: 0.82rem; color: var(--text2); line-height: 1.65;
  margin-bottom: 1.5rem;
}
.modal-actions { display: flex; gap: 0.5rem; margin-top: 1.5rem; }

/* 3. Form-check + helper + char-count — UI-SPEC 1.3 */
.form-helper { font-size: 0.7rem; color: var(--text3); margin-top: 0.35rem; line-height: 1.5; }
.form-helper.error { color: #f87171; }
.form-charcount { font-size: 0.65rem; color: var(--text3); text-align: right; margin-top: 0.3rem; letter-spacing: 0.05em; }
.form-charcount.warn { color: var(--rose); }
.form-charcount.danger { color: #f87171; }
textarea.form-input { resize: vertical; min-height: 88px; font-family: 'Syne', sans-serif; line-height: 1.55; }

.form-check { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.85rem 0; cursor: pointer; }
.form-check input[type=checkbox] {
  appearance: none; width: 16px; height: 16px;
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; flex-shrink: 0; margin-top: 2px;
  transition: all 0.2s; position: relative;
}
.form-check input[type=checkbox]:checked { border-color: var(--rose); background: var(--bg3); }
.form-check input[type=checkbox]:checked::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--rose); font-size: 0.72rem; font-weight: 600;
}
.form-check input[type=checkbox]:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.form-check input[type=checkbox].error { border-color: #f87171; }
.form-check-label { font-size: 0.78rem; color: var(--text2); line-height: 1.55; }
.form-check-label a { color: var(--rose); text-decoration: underline; text-underline-offset: 2px; }
@keyframes shake-error {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.shake-error { animation: shake-error 0.25s ease-in-out 1; }

/* 4. Toast — UI-SPEC 1.6 */
.toast-stack {
  position: fixed; bottom: 56px; right: 24px; z-index: 600;
  display: flex; flex-direction: column-reverse; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 0.75rem 1.1rem;
  font-size: 0.78rem; color: var(--text);
  pointer-events: auto;
  min-width: 220px;
  position: relative; overflow: hidden;
  animation: toastIn 0.25s ease both;
}
.toast.success { border-color: rgba(74,222,128,0.35); }
.toast.error { border-color: rgba(248,113,113,0.35); }
.toast::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 5. Action button — promoted from admin.html lines 97-106 + destructive variant */
.action-btn {
  padding: 0.5rem 1rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  border: 1px solid; cursor: pointer;
  transition: all 0.2s;
  background: transparent; white-space: nowrap;
}
.action-btn.reject { color: #f87171; border-color: rgba(248,113,113,0.35); }
.action-btn.reject:hover { background: rgba(248,113,113,0.1); }
.action-btn.approve { color: #4ade80; border-color: rgba(74,222,128,0.35); }
.action-btn.approve:hover { background: rgba(74,222,128,0.1); }
.action-btn.schedule { color: var(--violet-l); border-color: rgba(139,95,192,0.35); }
.action-btn.schedule:hover { background: rgba(139,95,192,0.1); }
.action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* 6. Loading spinner (text-only, UI-SPEC 1.5) */
.loading-spinner {
  font-size: 0.78rem; color: var(--text2);
  padding: 1.5rem; text-align: center;
  letter-spacing: 0.05em;
}
.loading-spinner em { font-style: italic; color: var(--rose); }

/* 7. Locked / EXPIRED feature treatment (UI-SPEC 5 quick-links) */
.feature-locked { opacity: 0.35; cursor: pointer; position: relative; }
.feature-locked .badge-expired {
  display: inline-block;
  font-size: 0.55rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: #f87171;
  border: 1px solid rgba(248,113,113,0.35);
  padding: 0.15rem 0.4rem;
}
