/* ==========================================================================
   RSVP Platform admin — visual system (2026-09-25 redesign)

   Light "glass over aurora" workspace with a deep-space sidebar. Brand
   gradient runs Fokus Target orange → pink → violet. Every gradient that
   carries white text uses the darker 700-level stops (all ≥4.5:1 with
   white); the bright stops are decorative only (glows, art, hairlines).

   Motion: transform/opacity only, shared tokens below, and a tiered
   reduced-motion layer at the bottom (Tier 1 removed, Tier 2 softened,
   Tier 3 — color, focus, spinners — kept).

   Legacy token names (--brand, --text, --border, --bg, …) are kept as
   aliases because inline styles in admin.html / admin*.js reference them.
   ========================================================================== */
:root {
  /* type */
  --font-display: "Sora", "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  /* ink + surfaces */
  --ink: #141526;
  --ink-2: #45495f;
  --ink-3: #636884;
  --ground: #f3f3fa;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.74);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --glass-edge: rgba(255, 255, 255, 0.85);
  --line: rgba(24, 22, 60, 0.08);
  --line-2: rgba(24, 22, 60, 0.14);
  --field: #ffffff;
  --field-line: rgba(24, 22, 60, 0.18);

  /* brand */
  --orange: #ff8a3d;
  --pink: #ff4d8d;
  --violet: #7c5cff;
  --cyan: #38bdf8;
  --grad: linear-gradient(115deg, #c2410c 0%, #be185d 52%, #6d28d9 100%);
  --grad-hover: linear-gradient(115deg, #9a3412 0%, #9d174d 52%, #5b21b6 100%);
  --grad-bright: linear-gradient(115deg, #ff8a3d 0%, #ff4d8d 50%, #7c5cff 100%);
  --grad-soft: linear-gradient(115deg, rgba(255, 138, 61, 0.12), rgba(255, 77, 141, 0.10) 50%, rgba(124, 92, 255, 0.13));
  --grad-ok: linear-gradient(115deg, #15803d, #047857);
  --grad-cool: linear-gradient(115deg, #6d28d9, #0369a1);

  /* semantic */
  --ok: #15803d;
  --ok-bg: #e5f6eb;
  --danger: #c81e3a;
  --danger-bg: #fdecef;
  --warn: #8a5a00;
  --warn-bg: #fff4d6;
  --info: #4c1d95;
  --info-bg: #f1ecff;

  /* legacy aliases (referenced from inline styles) */
  --brand: #c2410c;
  --brand-dark: #9a3412;
  --brand-light: #fff1e8;
  --accent: #ff7a2f;
  --bg: var(--ground);
  --border: var(--line-2);
  --text: var(--ink);
  --text-muted: var(--ink-3);
  --sidebar-bg: #0d0e21;
  --sidebar-text: #b9bbd6;

  /* depth */
  --shadow-sm: 0 1px 2px rgba(22, 20, 55, 0.06);
  --shadow-md: 0 1px 2px rgba(22, 20, 55, 0.05), 0 10px 30px -14px rgba(52, 30, 140, 0.22);
  --shadow-lg: 0 2px 6px rgba(22, 20, 55, 0.06), 0 28px 56px -22px rgba(52, 30, 140, 0.34);
  --shadow-glow: 0 10px 28px -10px rgba(190, 24, 93, 0.55);
  --ring: 0 0 0 3px rgba(124, 92, 255, 0.35);

  /* shape */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --t-fast: 140ms;
  --t-med: 220ms;
  --t-slow: 420ms;

  /* charts — the dataviz skill's validated default palette, unchanged */
  --viz-surface: #fcfcfb;
  --viz-text-primary: var(--ink);
  --viz-text-secondary: var(--ink-3);
  --viz-muted: #898781;
  --viz-grid: #e1e0d9;
  --viz-baseline: #c3c2b7;
  --viz-1: #2a78d6;
  --viz-2: #eb6834;
  --viz-3: #1baf7a;
  --viz-4: #eda100;
  --viz-5: #e87ba4;
  --viz-6: #008300;
  --viz-7: #4a3aa7;
  --viz-8: #e34948;
  --viz-good: #0ca30c;
  --viz-warning: #fab219;
  --viz-critical: #d03b3b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 14px; line-height: 1.5; color: var(--ink);
  background: var(--ground); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  position: relative; min-height: 100vh;
}
/* Aurora: four soft brand-colored light pools drifting very slowly. */
body::before {
  content: ""; position: fixed; inset: -18%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 34% at 14% 8%, rgba(255, 138, 61, 0.20), transparent 70%),
    radial-gradient(36% 32% at 88% 4%, rgba(124, 92, 255, 0.22), transparent 70%),
    radial-gradient(40% 40% at 72% 92%, rgba(255, 77, 141, 0.14), transparent 70%),
    radial-gradient(30% 30% at 18% 88%, rgba(56, 189, 248, 0.13), transparent 70%);
  animation: aurora-drift 32s ease-in-out infinite alternate;
  will-change: transform;
}
/* Isometric lattice, faded toward the bottom — the "blueprint" texture. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='32'%3E%3Cpath d='M0 16 28 0 56 16 28 32Z' fill='none' stroke='%237c5cff' stroke-opacity='.075'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
}
@keyframes aurora-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -2%, 0) scale(1.04); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.02); }
}

a { color: var(--brand); text-underline-offset: 2px; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
code { font-family: var(--font-mono); }
h1, h2, h3, h4 { text-wrap: balance; }
::selection { background: rgba(124, 92, 255, 0.22); }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; transition: top var(--t-fast) var(--ease-out); }
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- Gate */
.gate {
  position: fixed; inset: 0; z-index: 100; overflow: auto; color: #fff;
  display: grid; grid-template-columns: minmax(320px, 460px) minmax(0, 1fr); align-items: center; gap: 24px;
  padding: 32px clamp(16px, 5vw, 72px);
  background:
    radial-gradient(60% 60% at 80% 20%, rgba(124, 92, 255, 0.35), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(255, 77, 141, 0.25), transparent 70%),
    radial-gradient(40% 40% at 30% 10%, rgba(255, 138, 61, 0.22), transparent 70%),
    #0b0c1d;
}
.gate::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='32'%3E%3Cpath d='M0 16 28 0 56 16 28 32Z' fill='none' stroke='%23ffffff' stroke-opacity='.05'/%3E%3C/svg%3E");
}
.gate-card {
  position: relative; z-index: 1; padding: 34px; border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: rise-in 0.7s var(--ease-out) both;
}
.gate-logo { display: block; height: 38px; width: auto; margin-bottom: 26px; }
.gate-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; background: var(--grad-bright); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate h2 { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; letter-spacing: -0.02em; margin: 8px 0 12px; }
.gate p { font-size: 14.5px; color: rgba(255, 255, 255, 0.72); margin: 0 0 22px; line-height: 1.6; }
.gate label { display: block; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, 0.8); margin-bottom: 8px; }
.gate input {
  width: 100%; padding: 14px 16px; border-radius: var(--r-md); font-size: 16px; margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff;
  transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std), background-color var(--t-fast);
}
.gate input::placeholder { color: rgba(255, 255, 255, 0.45); }
.gate input:focus { outline: none; border-color: rgba(167, 139, 250, 0.9); box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.3); background: rgba(255, 255, 255, 0.12); }
.gate button {
  width: 100%; padding: 14px; border: none; border-radius: var(--r-md); background: var(--grad); color: #fff;
  font-weight: 700; font-size: 15.5px; box-shadow: var(--shadow-glow); position: relative; overflow: hidden;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.gate button:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -12px rgba(190, 24, 93, 0.7); }
.gate button:active { transform: scale(0.98); }
.gate .error { color: #ffb4c2; font-size: 13px; margin: 12px 0 0; min-height: 18px; }
.gate-foot { font-size: 12px; color: rgba(255, 255, 255, 0.5); margin-top: 18px; }
.gate-art { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; min-width: 0; }
.gate-art svg { width: min(100%, 620px); height: auto; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.35)); }

/* Isometric art shared motion (inline SVGs) */
.iso-float { animation: iso-float 6s ease-in-out infinite; transform-box: fill-box; }
.iso-shadow { animation: iso-shadow 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.iso-bars > g { animation: iso-rise 0.9s var(--ease-spring) both; transform-box: fill-box; transform-origin: bottom; }
.iso-bars > g:nth-child(2) { animation-delay: 0.08s; }
.iso-bars > g:nth-child(3) { animation-delay: 0.16s; }
.iso-orbs circle { animation: orb-pulse 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes iso-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes iso-shadow { 0%, 100% { transform: scale(1); opacity: 0.22; } 50% { transform: scale(0.88); opacity: 0.14; } }
@keyframes iso-rise { from { transform: scaleY(0.2); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes orb-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
/* individual translate (not transform) so entrances compose with the 3D tilt transform */
@keyframes rise-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

/* ---------------------------------------------------------------- Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; padding: 20px 14px 16px; color: var(--sidebar-text);
  background: linear-gradient(180deg, #0d0e21 0%, #120f29 60%, #17102e 100%);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.04), 12px 0 40px -24px rgba(13, 14, 33, 0.6);
  z-index: 10;
}
.sidebar::before {
  content: ""; position: absolute; width: 260px; height: 260px; left: -90px; top: -110px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.45), transparent 65%); filter: blur(10px);
}
.sidebar::after {
  content: ""; position: absolute; width: 220px; height: 220px; right: -120px; bottom: 60px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 77, 141, 0.28), transparent 65%); filter: blur(10px);
}
.sidebar > * { position: relative; z-index: 1; }
.sidebar .brand { padding: 4px 8px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); margin-bottom: 14px; }
.sidebar .brand img { display: block; height: 30px; width: auto; }
.sidebar .brand .brand-tag {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--grad-bright); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sidebar nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.sidebar .nav-item {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px;
  padding: 9px 12px; border-radius: 12px; cursor: pointer; font-size: 13.5px; font-weight: 500; margin-bottom: 3px; color: var(--sidebar-text);
  transition: background-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-out);
}
.sidebar .nav-item span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.sidebar .nav-item:active { transform: scale(0.98); }
.sidebar .nav-item.active { background: var(--grad); color: #fff; font-weight: 700; box-shadow: 0 10px 24px -12px rgba(190, 24, 93, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.sidebar .nav-item .count { font-size: 11px; font-weight: 700; color: #cfd0e6; background: rgba(255, 255, 255, 0.08); padding: 2px 8px; border-radius: 999px; line-height: 1.4; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.sidebar .nav-item.active .count { color: #fff; background: rgba(255, 255, 255, 0.2); }
.sidebar .nav-section { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: #7d7fa0; margin: 18px 12px 8px; }
.sidebar .add-project-btn {
  width: 100%; margin-top: 10px; padding: 10px; min-height: 42px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, 0.16);
  background: none; color: #d6d7ec; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.sidebar .add-project-btn:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
#add-project-btn { border: none; background: var(--grad); color: #fff; font-weight: 700; box-shadow: var(--shadow-glow); }
#add-project-btn:hover { background: var(--grad-hover); transform: translateY(-1px); }
#add-project-btn:active { transform: scale(0.98); }
#show-archived-btn { border: none; color: #8f91b0; font-size: 12px; min-height: 32px; padding: 6px; }
#show-archived-btn:hover { background: none; color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 28px; background: rgba(247, 247, 252, 0.72); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
}
.topbar h1 { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.015em; margin: 0; }
.topbar .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.topbar .sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); animation: live-dot 2.4s ease-in-out infinite; }
@keyframes live-dot { 0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); } 50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.05); } }
.content { padding: 26px 28px 70px; width: 100%; max-width: 1360px; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 16px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--glass-strong); color: var(--ink);
  font-size: 13.5px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out), background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.btn svg { flex-shrink: 0; }
.btn:hover { background: #fff; border-color: rgba(124, 92, 255, 0.35); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); box-shadow: var(--shadow-sm); }
.btn-brand { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-glow); }
.btn-brand:hover { background: var(--grad-hover); color: #fff; border-color: transparent; box-shadow: 0 16px 32px -12px rgba(190, 24, 93, 0.65); }
/* sheen sweep on primary buttons */
.btn-brand::after, .btn-scan::after, .ci-btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
}
.btn-brand:hover::after, .btn-scan:hover::after, .ci-btn:hover::after { transform: translateX(120%); transition: transform 0.7s var(--ease-out); }
.btn-outline { background: #fff; border: 1px solid rgba(200, 30, 58, 0.45); color: var(--danger); display: inline-flex; align-items: center; min-height: 38px; padding: 8px 14px; border-radius: 12px; font-weight: 600; }
.btn-outline:hover { background: var(--danger-bg); }
.btn:disabled, .btn-brand:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.icon-only { padding: 9px; min-width: 40px; }
.link-btn { background: none; border: none; padding: 0; color: var(--info); text-decoration: underline; text-decoration-color: rgba(76, 29, 149, 0.35); text-underline-offset: 3px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration-color: currentColor; }

.icon-btn {
  border: 1px solid var(--line-2); background: #fff; border-radius: 10px; padding: 6px 11px; min-height: 32px; font-size: 12.5px; font-weight: 600;
  transition: background-color var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.icon-btn:hover { background: #faf9ff; border-color: rgba(124, 92, 255, 0.35); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn.approve { color: var(--ok); border-color: rgba(21, 128, 61, 0.3); }
.icon-btn.approve:hover { background: var(--ok-bg); }
.icon-btn.reject { color: var(--danger); border-color: rgba(200, 30, 58, 0.3); }
.icon-btn.reject:hover { background: var(--danger-bg); }
.icon-btn.reset { color: var(--ink-2); }
.icon-btn.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.icon-btn.danger:hover { background: #a3172f; }
.icon-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.row-actions { display: flex; align-items: center; gap: 6px; }
.last-sent-note { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 3px; }
.row-delete-btn { background: none; border: 1px solid transparent; border-radius: 9px; padding: 6px; min-width: 32px; min-height: 32px; color: #8a8ea6; line-height: 0; transition: color var(--t-fast), background-color var(--t-fast), border-color var(--t-fast); }
.row-delete-btn:hover { color: var(--info); background: var(--info-bg); border-color: rgba(124, 92, 255, 0.25); }
.row-delete-btn[data-action="delete"]:hover { color: var(--danger); background: var(--danger-bg); border-color: rgba(200, 30, 58, 0.25); }

/* ---------------------------------------------------------------- Menus */
.toolbar-spacer { flex: 1 1 auto; }
.menu-wrap { position: relative; }
.menu-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 999px; background: var(--pink); border: 2px solid #fff; }
.menu-popover {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 240px; padding: 8px; border-radius: var(--r-md);
  background: var(--glass-strong); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transform-origin: top left; animation: menu-in 0.18s var(--ease-out) both;
}
.menu-popover--right { left: auto; right: 0; transform-origin: top right; }
@keyframes menu-in { from { opacity: 0; transform: scale(0.95) translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-field { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); padding: 6px 6px 2px; }
.menu-field select { display: block; width: 100%; margin-top: 5px; padding: 9px 10px; border: 1px solid var(--field-line); border-radius: 10px; font-size: 13.5px; background: #fff; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); }
.menu-check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; padding: 9px 8px; border-radius: 9px; cursor: pointer; }
.menu-check:hover { background: rgba(124, 92, 255, 0.07); }
.menu-check input { width: 16px; height: 16px; accent-color: var(--violet); }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; text-align: left; background: none; border: none; padding: 9px 10px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--ink); transition: background-color var(--t-fast), color var(--t-fast);
}
.menu-item:hover { background: rgba(124, 92, 255, 0.08); color: var(--info); }
.menu-item svg { flex-shrink: 0; color: var(--ink-3); }
.menu-item:hover svg { color: var(--violet); }

/* ---------------------------------------------------------------- Stats */
.col-secondary { color: var(--ink-3); font-weight: 400; }
td.col-secondary { font-size: 12.5px; }
.stat-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
@media (max-width: 1320px) { .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat-card { padding: 14px; gap: 10px; } .stat-card .stat-icon { width: 36px; height: 36px; } .stat-card .stat-value { font-size: 22px; } }
.stat-card {
  position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 18px; border-radius: var(--r-lg);
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.stat-card::before { content: ""; position: absolute; left: 20px; right: 20px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad-bright); opacity: 0.9; }
.stat-card.alt::before { background: linear-gradient(90deg, #7c5cff, #38bdf8); }
.stat-card.ok::before { background: linear-gradient(90deg, #22c55e, #14b8a6); }
.stat-card:hover { --lift: -2px; box-shadow: var(--shadow-lg); }
/* 3D chip icon: gradient tile tipped back in perspective */
.stat-card .stat-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; color: #fff;
  background: var(--grad); box-shadow: 0 10px 18px -8px rgba(190, 24, 93, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
  transform: perspective(160px) rotateX(14deg) rotateY(-16deg);
}
.stat-card.alt .stat-icon { background: var(--grad-cool); box-shadow: 0 10px 18px -8px rgba(109, 40, 217, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.12); }
.stat-card.ok .stat-icon { background: var(--grad-ok); box-shadow: 0 10px 18px -8px rgba(21, 128, 61, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.12); }
.stat-card .stat-value { font-family: var(--font-display); font-size: 27px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; white-space: nowrap; display: flex; align-items: baseline; font-variant-numeric: tabular-nums; }
.stat-card .stat-value .stat-frac-sep { font-size: 16px; font-weight: 600; color: var(--ink-3); margin: 0 3px; }
.stat-card .stat-value .stat-frac-den { font-size: 16px; font-weight: 600; color: var(--ink-3); }
.stat-card .stat-label { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; font-weight: 500; }
.stat-card .stat-label .stat-label-sub { display: block; font-size: 11px; opacity: 0.85; }

/* ---------------------------------------------------------------- Panels & tables */
.panel {
  position: relative; padding: 20px 22px; margin-bottom: 20px; border-radius: var(--r-lg);
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.panel h2 { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 14px; }
.panel .note { font-size: 12.5px; color: var(--ink-3); margin-top: -6px; margin-bottom: 14px; line-height: 1.55; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.82); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  position: sticky; top: 0; z-index: 2; background: #f8f7fd; text-align: left; padding: 11px 12px; color: var(--ink-3);
  font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background-color var(--t-fast) var(--ease-std); }
tbody tr:hover { background: rgba(124, 92, 255, 0.045); }
tbody tr.is-test { background: #fffaf0; }
tbody tr.is-selected { background: rgba(124, 92, 255, 0.09); }
tbody tr.is-syncing { position: relative; }
tbody tr.is-syncing::after { content: 'Saving…'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--info); background: var(--info-bg); padding: 2px 8px; border-radius: 999px; }
tbody tr.is-saved-flash td { animation: row-saved-flash 1.1s ease both; }
@keyframes row-saved-flash { 0% { background: var(--ok-bg); } 100% { background: transparent; } }
.empty-note { color: var(--ink-3); font-size: 14px; padding: 16px 0; text-align: center; }

/* skeleton rows (placeholder until the first render replaces them) */
.skel td { padding: 14px 12px; }
.skel span { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #ecebf5 0%, #f7f6fc 40%, #ecebf5 80%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Status pills (selects) */
.approval-select {
  padding: 6px 26px 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; min-height: 30px;
  border: 1px solid transparent; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2344475a' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  transition: box-shadow var(--t-fast), filter var(--t-fast);
}
.approval-select:hover:not(:disabled) { filter: brightness(0.97); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12); }
.approval-select:disabled { cursor: default; background-image: none; padding-right: 11px; }
.approval-select.st-pending, .approval-select.cf-noresponse { background-color: #eef0f6; color: #3f4358; }
.approval-select.st-approved, .approval-select.cf-confirmed { background-color: var(--ok-bg); color: var(--ok); }
.approval-select.st-rejected, .approval-select.cf-cancelled { background-color: var(--danger-bg); color: var(--danger); }
.approval-select.st-waitlisted { background-color: #efe9ff; color: #5b21b6; }
.approval-select.cf-tentative { background-color: var(--warn-bg); color: var(--warn); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.01em; }
.badge-pending, .badge-notsent { background: #eef0f6; color: #3f4358; }
.badge-approved, .badge-attended, .badge-sent { background: var(--ok-bg); color: var(--ok); }
.badge-rejected, .badge-failed { background: var(--danger-bg); color: var(--danger); }
.badge-source { background: var(--grad-soft); color: #5b2a86; border: 1px solid rgba(124, 92, 255, 0.14); }
.badge-dup { background: var(--warn-bg); color: var(--warn); margin-left: 6px; }
.col-num { width: 44px; color: var(--ink-3); font-size: 12px; }
.col-check { width: 38px; }
.col-check input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--violet); }

/* ---------------------------------------------------------------- Toolbar & bulk */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 4px; }
.toolbar input[type="search"], .toolbar select, .toolbar-lite select {
  min-height: 42px; border: 1px solid var(--field-line); border-radius: 12px; background: #fff; font-size: 14px; color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.toolbar input[type="search"] {
  flex: 1 1 240px; min-width: 190px; padding: 10px 14px 10px 38px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23636884' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center;
}
.toolbar select { padding: 9px 12px; cursor: pointer; }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--violet); box-shadow: var(--ring); }
.toolbar label.checkbox-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); white-space: nowrap; cursor: pointer; }
.result-count { font-size: 12.5px; color: var(--ink-3); margin: 12px 0 14px; }
.bulk-bar {
  position: sticky; top: 76px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px;
  border-radius: var(--r-md); background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(124, 92, 255, 0.28);
  box-shadow: 0 14px 30px -18px rgba(109, 40, 217, 0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: rise-in 0.22s var(--ease-out) both;
}
.bulk-bar::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--grad-soft); pointer-events: none; }
.bulk-bar > * { position: relative; }
.bulk-bar .bulk-count { font-weight: 800; color: var(--info); }
.bulk-bar .bulk-spacer { flex: 1 1 auto; }
.bulk-bar .link-btn { color: var(--info); }
.bulk-bar .icon-btn { padding: 8px 14px; font-size: 13px; font-weight: 700; min-height: 36px; }
.bulk-bar .bulk-progress { font-size: 12.5px; color: var(--ink-3); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; font-size: 13.5px; color: var(--ink-2); }
.pagination button { background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 14px; min-height: 36px; font-weight: 600; transition: border-color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.pagination button:hover:not(:disabled) { border-color: var(--violet); }
.pagination button:active:not(:disabled) { transform: scale(0.97); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------------------------------------------------------------- Tabs (segmented) */
.view-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: 20px; width: fit-content; max-width: 100%;
  background: rgba(255, 255, 255, 0.62); border: 1px solid var(--glass-edge); border-radius: 16px; box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.view-tabs button {
  position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 15px; border: none; border-radius: 12px;
  background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 700; isolation: isolate;
  transition: color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-out);
}
.view-tabs button svg { opacity: 0.8; }
.view-tabs button::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--grad); opacity: 0; transform: scale(0.92); box-shadow: 0 8px 18px -10px rgba(190, 24, 93, 0.8); transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-spring); }
.view-tabs button:hover { color: var(--ink); background: rgba(124, 92, 255, 0.07); }
.view-tabs button:active { transform: scale(0.97); }
.view-tabs button[aria-selected="true"] { color: #fff; background: transparent; }
.view-tabs button[aria-selected="true"]::before { opacity: 1; transform: scale(1); }
.view-tabs button[aria-selected="true"] svg { opacity: 1; }

/* Sub-view entrance: display none → block restarts this each time a tab opens */
#view-project > [id^="sub-"], #view-overview, #view-team, #view-project { animation: view-in 0.36s var(--ease-out) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Check-in */
.ci-top {
  position: relative; overflow: hidden; margin-bottom: 16px; padding: 22px 24px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, #0f172a 0%, #14213d 55%, #0f3d2e 100%); color: #fff; box-shadow: var(--shadow-lg);
}
.ci-top::after { content: ""; position: absolute; width: 280px; height: 280px; right: -60px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 197, 94, 0.35), transparent 65%); pointer-events: none; }
.ci-summary { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.ci-big { display: inline-flex; align-items: baseline; gap: 10px; font-family: var(--font-display); font-size: 42px; font-weight: 800; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.ci-big small { font-family: var(--font-body); font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, 0.7); }
.ci-meta { font-size: 13.5px; color: rgba(255, 255, 255, 0.75); }
.ci-progress { position: relative; height: 10px; background: rgba(255, 255, 255, 0.12); border-radius: 999px; margin-top: 16px; overflow: hidden; }
.ci-progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22c55e, #2dd4bf); box-shadow: 0 0 16px rgba(45, 212, 191, 0.7); transition: width 0.6s var(--ease-out); }
.ci-offline { position: relative; margin-top: 12px; font-size: 12.5px; font-weight: 600; color: #fde68a; background: rgba(250, 204, 21, 0.14); padding: 8px 12px; border-radius: 10px; }
.ci-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ci-tools input[type="search"] {
  flex: 1 1 260px; padding: 16px 18px 16px 46px; font-size: 17px; border: 2px solid var(--field-line); border-radius: 16px; background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23636884' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 16px center; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.ci-tools input[type="search"]:focus { border-color: var(--violet); outline: none; box-shadow: var(--ring); }
.ci-tools .btn { padding: 14px 20px; font-size: 15px; border-radius: 16px; min-height: 54px; }
.btn-scan { background: var(--grad-ok); border-color: transparent; color: #fff; box-shadow: 0 12px 26px -12px rgba(21, 128, 61, 0.75); }
.btn-scan:hover { background: linear-gradient(115deg, #166534, #065f46); color: #fff; border-color: transparent; }
.ci-heading { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 10px 2px 10px; }
.ci-list { display: grid; gap: 10px; }
.ci-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-radius: var(--r-md);
  background: var(--glass-strong); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-sm); animation: rise-in 0.28s var(--ease-out) both;
}
.ci-card.is-in { background: linear-gradient(135deg, rgba(229, 246, 235, 0.95), rgba(236, 253, 245, 0.9)); border-color: rgba(21, 128, 61, 0.2); }
.ci-name { font-size: 16px; font-weight: 700; }
.ci-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; overflow-wrap: anywhere; }
.ci-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ci-btn {
  position: relative; overflow: hidden; border: none; border-radius: 14px; padding: 13px 22px; min-width: 128px; min-height: 48px;
  font-size: 15px; font-weight: 800; background: var(--grad-ok); color: #fff; box-shadow: 0 10px 22px -12px rgba(21, 128, 61, 0.8);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med);
}
.ci-btn:hover { transform: translateY(-1px); }
.ci-btn:active { transform: scale(0.97); }
.ci-btn.undo { background: #fff; color: var(--ink-2); border: 1px solid var(--line-2); font-weight: 600; min-width: 0; min-height: 36px; padding: 8px 14px; font-size: 13px; box-shadow: none; }
.ci-time { font-size: 13px; font-weight: 700; color: var(--ok); white-space: nowrap; }

/* ---------------------------------------------------------------- Modals */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(14, 12, 34, 0.42); backdrop-filter: blur(6px) saturate(1.2); -webkit-backdrop-filter: blur(6px) saturate(1.2);
  animation: modal-backdrop-in 0.2s ease both;
}
.modal-backdrop[hidden] { display: none; }
.modal-panel {
  width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; border-radius: 24px;
  background: rgba(255, 255, 255, 0.94); border: 1px solid var(--glass-edge); box-shadow: 0 40px 90px -30px rgba(30, 16, 80, 0.55);
  backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  animation: modal-panel-in 0.32s var(--ease-spring) both;
}
@keyframes modal-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-panel-in { from { opacity: 0; transform: scale(0.94) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-head { position: relative; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad-bright); }
.modal-head h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.modal-head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }
.modal-close { width: 36px; height: 36px; border: none; border-radius: 10px; background: rgba(24, 22, 60, 0.05); font-size: 22px; line-height: 1; color: var(--ink-2); flex-shrink: 0; transition: background-color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.modal-close:hover { background: rgba(24, 22, 60, 0.1); }
.modal-close:active { transform: scale(0.94); }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: rgba(248, 247, 253, 0.7); }
.modal-foot .icon-btn.approve { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); min-height: 42px; border-radius: 12px; font-size: 14px; }
.modal-foot .icon-btn.approve:hover { background: var(--grad-hover); }
.modal-form { padding: 20px 24px; display: grid; gap: 14px; overflow-y: auto; }
.modal-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-form label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.modal-form input[type="text"], .modal-form input[type="email"], .modal-form input[type="tel"], .modal-form input[type="date"], .modal-form input[type="password"], .modal-form input[type="number"],
.modal-form input[type="time"], .modal-form select, .modal-form textarea {
  padding: 11px 13px; min-height: 44px; border: 1px solid var(--field-line); border-radius: 12px; font-size: 15px; color: var(--ink); background: var(--field);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus { outline: none; border-color: var(--violet); box-shadow: var(--ring); }
.modal-form .check { display: flex; align-items: center; gap: 9px; font-weight: 500; color: var(--ink); }
.modal-form .check input { width: 17px; height: 17px; accent-color: var(--violet); }
.modal-form .form-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 2px; display: grid; gap: 10px; }
.modal-form .form-section h4 { margin: 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.muted-inline { text-transform: none; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.modal-form .modal-advanced summary, .fg .modal-advanced summary { list-style: none; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.modal-advanced summary::-webkit-details-marker { display: none; }
.modal-advanced summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform var(--t-fast) var(--ease-out); }
.modal-advanced[open] summary::before { transform: rotate(45deg); }
.modal-advanced summary:hover { color: var(--info); }

.banner-field { display: grid; gap: 6px; }
.banner-preview-lg { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #f6f6fa; }
.banner-preview-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-remove { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 999px; border: none; background: rgba(14, 12, 34, 0.65); color: #fff; font-size: 17px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.banner-remove:hover { background: rgba(14, 12, 34, 0.85); }
.banner-drop-lg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; aspect-ratio: 16 / 9; border: 1.5px dashed var(--field-line); border-radius: 16px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; text-align: center; background: var(--grad-soft); transition: border-color var(--t-fast), color var(--t-fast); }
.banner-drop-lg:hover { border-color: var(--violet); color: var(--info); }
.banner-hint { font-size: 11.5px; color: var(--ink-3); }
.banner-status { font-size: 12px; color: var(--ink-3); }
.banner-status.is-error { color: var(--danger); }
.link-row-wrap { display: block; }
.modal-form .link-row { display: flex; gap: 8px; margin-top: 4px; }
.modal-form .link-row input { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-3); background: #f8f7fd; }
.modal-form .link-row .btn { flex-shrink: 0; padding: 9px 14px; }
.modal-form .status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 2px; }
.modal-form .danger-details summary { color: var(--danger); font-weight: 700; }
.modal-form .danger-details[open] summary { margin-bottom: 10px; }
.modal-form .danger-zone { border: 1px solid rgba(200, 30, 58, 0.18); background: var(--danger-bg); border-radius: 14px; padding: 14px 16px; }
.modal-form .danger-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.modal-form .danger-copy { font-size: 13px; color: var(--ink); font-weight: 600; }
.modal-form .danger-copy small { display: block; font-weight: 400; color: var(--ink-3); margin-top: 2px; }
.modal-note { padding: 12px 14px; font-size: 13px; border-radius: 12px; line-height: 1.5; }
.modal-note.warn { background: var(--warn-bg); color: var(--warn); }
.modal-note.error { background: var(--danger-bg); color: var(--danger); }
.modal-note.info { background: var(--info-bg); color: var(--info); }
.modal-note ul { margin: 8px 0 0; padding-left: 18px; }
.dup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------------------------------------------------------------- Overview */
.overview-table td.name-cell { font-weight: 700; }
.overview-table td.name-cell a { color: var(--ink); text-decoration: none; }
.overview-table td.name-cell a:hover { color: var(--info); text-decoration: underline; }
.overview-table .forecast-cell { color: var(--info); font-weight: 700; }
.overview-table .rate-good { color: var(--ok); font-weight: 700; }
.overview-table .rate-bad { color: var(--danger); font-weight: 700; }

.ov-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: 12px;
  margin-bottom: 20px; padding: 28px 30px; border-radius: var(--r-xl); overflow: hidden; color: #fff;
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(124, 92, 255, 0.55), transparent 70%),
    radial-gradient(50% 80% at 0% 100%, rgba(255, 77, 141, 0.35), transparent 70%),
    linear-gradient(135deg, #0f1027 0%, #1b1440 60%, #2a1242 100%);
  box-shadow: 0 30px 60px -30px rgba(40, 16, 100, 0.7);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform var(--t-slow) var(--ease-out);
}
.ov-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='32'%3E%3Cpath d='M0 16 28 0 56 16 28 32Z' fill='none' stroke='%23ffffff' stroke-opacity='.06'/%3E%3C/svg%3E"); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.ov-hero > * { position: relative; z-index: 1; }
.ov-hero .kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; background: var(--grad-bright); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ov-hero h2 { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -0.02em; margin: 8px 0 10px; }
.ov-hero p { margin: 0 0 20px; color: rgba(255, 255, 255, 0.75); font-size: 14.5px; line-height: 1.6; max-width: 52ch; }
.ov-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ov-hero .btn:not(.btn-brand) { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: #fff; box-shadow: none; }
.ov-hero .btn:not(.btn-brand):hover { background: rgba(255, 255, 255, 0.18); }
.ov-hero .hero-art svg { width: 100%; max-height: 250px; display: block; }
.next-up { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; padding: 8px 12px 8px 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); font-size: 13px; }
.next-up .cd { display: inline-flex; gap: 4px; }
.next-up .cd b { font-family: var(--font-display); font-size: 16px; min-width: 40px; text-align: center; padding: 4px 6px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); font-variant-numeric: tabular-nums; }
.next-up .cd small { display: block; font-size: 9.5px; font-weight: 600; opacity: 0.7; font-family: var(--font-body); }

.section-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 2px 12px; }
.section-title h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.section-title span { font-size: 12.5px; color: var(--ink-3); }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; margin-bottom: 20px; }
.event-card {
  position: relative; display: grid; gap: 12px; padding: 18px; border-radius: var(--r-lg); cursor: pointer; text-align: left; width: 100%; font: inherit;
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-md); color: var(--ink);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out), border-color var(--t-fast);
  animation: rise-in 0.4s var(--ease-out) both;
}
.event-card:hover { --lift: -3px; box-shadow: var(--shadow-lg); border-color: rgba(124, 92, 255, 0.35); }
.event-card:active { --lift: 0px; }
.event-card .ec-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.event-card .ec-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.event-card .ec-date { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.event-card .ec-when { flex-shrink: 0; font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--grad-soft); color: #5b2a86; border: 1px solid rgba(124, 92, 255, 0.16); white-space: nowrap; }
.event-card .ec-when.past { background: #eef0f6; color: var(--ink-3); border-color: transparent; }
.event-card .ec-when.today { background: var(--grad); color: #fff; border-color: transparent; }
.event-card .ec-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.event-card .ec-stats > span { display: block; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line); }
.event-card .ec-name, .event-card .ec-date, .event-card .ec-stats span span { display: block; }
.event-card .ec-stats b { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.event-card .ec-stats span { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.event-card .ec-bar { height: 6px; border-radius: 999px; background: rgba(24, 22, 60, 0.07); overflow: hidden; }
.event-card .ec-bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad-bright); transform-origin: left; animation: bar-grow 0.9s var(--ease-out) both; }
.event-card .ec-foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.empty-state { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 28px 16px; }
.empty-state img { width: 180px; height: auto; }
.empty-state h3 { font-family: var(--font-display); margin: 4px 0 0; font-size: 18px; }
.empty-state p { margin: 0; color: var(--ink-3); max-width: 44ch; }

/* Setup checklist (project view) */
.setup-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 20px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-md); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: rise-in 0.35s var(--ease-out) both; }
.setup-ring { position: relative; width: 62px; height: 62px; }
.setup-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.setup-ring circle { fill: none; stroke-width: 7; }
.setup-ring .track { stroke: rgba(24, 22, 60, 0.08); }
.setup-ring .fill { stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease-out); }
.setup-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.setup-body h3 { font-family: var(--font-display); font-size: 16px; margin: 0 0 8px; }
.setup-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.setup-step { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); background: #fff; color: var(--ink); transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.setup-step:hover { border-color: var(--violet); }
.setup-step:active { transform: scale(0.97); }
.setup-step i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--line-2); font-style: normal; font-size: 11px; }
.setup-step.done { background: var(--ok-bg); border-color: rgba(21, 128, 61, 0.2); color: var(--ok); }
.setup-step.done i { border: none; background: var(--ok); color: #fff; }

/* ---------------------------------------------------------------- QR modal */
.qr-modal-panel { max-width: 360px; }
.qr-modal-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-top: 22px; }
.qr-frame { display: inline-flex; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-md); }
.qr-frame svg { display: block; width: 190px; height: 190px; max-width: 100%; }
.qr-security-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--ink-3); max-width: 270px; }
.qr-security-note svg { flex-shrink: 0; color: var(--warn); }

[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--violet); outline-offset: 2px;
}

/* ---------------------------------------------------------------- Kiosk mode */
.kiosk-exit-link { display: none; font-size: 12px; color: var(--info); margin-top: 4px; font-weight: 600; }
body.kiosk-mode .kiosk-exit-link { display: inline-block; }
body.kiosk-mode .sidebar, body.kiosk-mode .kiosk-hide, body.kiosk-mode #edit-project-btn, body.kiosk-mode #share-link-btn, body.kiosk-mode #sub-registrations { display: none !important; }
body.kiosk-mode .shell { display: block; }
body.kiosk-mode .content { padding: 14px 14px 40px; max-width: none; }
body.kiosk-mode #ci-header { position: sticky; top: 60px; z-index: 6; padding-top: 4px; margin: 0 -14px 12px; background: rgba(243, 243, 250, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
body.kiosk-mode #ci-header > .ci-top, body.kiosk-mode #ci-header > .ci-tools { margin-left: 14px; margin-right: 14px; }
body.kiosk-mode #ci-header > .ci-tools { padding-bottom: 12px; }
body.kiosk-mode .topbar { padding: 12px 16px; }
body.kiosk-mode .topbar h1 { font-size: 17px; }

/* ---------------------------------------------------------------- Charts (charts.js) */
.charts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 20px; }
.chart-card { padding: 18px 20px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-md); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: rise-in 0.4s var(--ease-out) both; }
.chart-card h3 { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; margin: 0 0 2px; color: var(--ink); }
.chart-card .chart-sub { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.chart-card.wide { grid-column: 1 / -1; }
.viz-root { position: relative; font-family: inherit; }
.viz-empty { color: var(--ink-3); font-size: 13px; text-align: center; padding: 30px 0; }
.viz-bar-row { display: flex; align-items: center; gap: 10px; height: 30px; }
.viz-bar-label { flex: 0 0 auto; width: 120px; font-size: 12px; color: var(--viz-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-bar-track { flex: 1; display: flex; align-items: center; height: 22px; padding: 3px 0; cursor: default; }
.viz-bar-fill { height: 16px; border-radius: 4px; width: 0; min-width: 0; transition: width 0.7s var(--ease-out); flex-shrink: 0; }
.viz-bar-value { margin-left: 8px; font-size: 12px; font-weight: 700; color: var(--viz-text-primary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.viz-bar-row:hover .viz-bar-fill { filter: brightness(1.08); }
.viz-status-bar { display: flex; height: 28px; border-radius: 8px; overflow: hidden; background: var(--viz-grid); gap: 2px; }
.viz-status-seg { height: 100%; width: 0; transition: width 0.7s var(--ease-out); position: relative; border-radius: 4px; min-width: 0; }
.viz-status-seg .seg-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; color: #fff; white-space: nowrap; opacity: 0; transition: opacity 0.3s; }
.viz-status-seg:hover .seg-label { opacity: 1; }
.viz-status-legend { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.viz-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--viz-text-secondary); }
.viz-legend-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.viz-trend-svg { width: 100%; height: auto; overflow: visible; }
.viz-trend-line { fill: none; stroke: var(--viz-1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viz-trend-area { fill: var(--viz-1); opacity: 0.1; }
.viz-trend-dot { fill: var(--viz-1); stroke: var(--viz-surface); stroke-width: 2; }
.viz-trend-crosshair { stroke: var(--viz-baseline); stroke-width: 1; pointer-events: none; opacity: 0; transition: opacity 0.12s; }
.viz-trend-hit { fill: transparent; }
.viz-tooltip { position: absolute; pointer-events: none; background: #141526; color: #fff; font-size: 12px; padding: 7px 10px; border-radius: 9px; box-shadow: var(--shadow-lg); opacity: 0; transform: translate(-50%, -100%) translateY(-8px); transition: opacity 0.12s; z-index: 10; white-space: nowrap; }
.viz-tooltip strong { font-size: 13px; }
.viz-tooltip .tt-label { color: rgba(255, 255, 255, 0.7); margin-top: 2px; display: block; }
.viz-tooltip.visible { opacity: 1; }

/* ================================================================ Roles */
body:not(.can-checkin) [data-perm="checkin"],
body:not(.can-write) [data-perm="write"],
body:not(.can-manage) [data-perm="manage"],
body:not(.can-team) [data-perm="team"] { display: none !important; }

/* ================================================================ Sidebar extras */
.nav-team-btn { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 42px; margin-top: 14px; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.04); color: var(--sidebar-text); font-size: 13px; font-weight: 600; transition: background-color var(--t-fast), color var(--t-fast); }
.nav-team-btn:hover, .nav-team-btn.active { background: rgba(255, 255, 255, 0.1); color: #fff; }
.whoami { margin-top: 12px; padding: 12px 10px 2px; border-top: 1px solid rgba(255, 255, 255, 0.07); display: flex; align-items: center; gap: 10px; }
.whoami::before { content: attr(data-initials); width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; color: #fff; background: var(--grad); box-shadow: 0 6px 14px -6px rgba(190, 24, 93, 0.8); }
.whoami:empty::before { display: none; }
.whoami > span, .whoami-name, .whoami-role { display: block; }
.whoami-name { font-size: 12.5px; color: #fff; font-weight: 700; }
.whoami-role { font-size: 11px; color: #8f91b0; }

/* Project chips */
.project-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 30px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.chip-ok { background: var(--ok-bg); border-color: rgba(21, 128, 61, 0.2); color: var(--ok); }
.chip-ok::before { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.chip-bad { background: var(--danger-bg); border-color: rgba(200, 30, 58, 0.2); color: var(--danger); }
.chip-bad::before { background: var(--danger); }
.chip-warn { background: var(--warn-bg); border-color: rgba(138, 90, 0, 0.18); color: var(--warn); }
.chip-warn::before { background: #f59e0b; }
.chip-link { color: var(--info); }
.chip-link::before { display: none; }
.chip-link:hover { border-color: var(--violet); }

/* Scanner overlay — futuristic dark */
.scanner-overlay { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; color: #fff; background: radial-gradient(60% 50% at 50% 30%, #1b1540 0%, #07070f 70%); animation: modal-backdrop-in 0.2s ease both; }
.scanner-top { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 18px; padding-top: calc(16px + env(safe-area-inset-top, 0px)); gap: 12px; }
.scanner-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.scanner-sub { font-size: 13px; color: rgba(255, 255, 255, 0.72); margin-top: 2px; }
.scanner-close { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; width: 44px; height: 44px; border-radius: 14px; font-size: 24px; line-height: 1; flex-shrink: 0; }
.scanner-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.scanner-stage video { width: 100%; height: 100%; object-fit: cover; }
.scanner-frame { position: absolute; width: min(66vw, 300px); aspect-ratio: 1; border-radius: 28px; box-shadow: 0 0 0 9999px rgba(7, 7, 15, 0.5); border: 2px solid rgba(255, 255, 255, 0.2); overflow: hidden; }
.scanner-frame::before { content: ""; position: absolute; inset: -2px; border-radius: 28px; padding: 3px; background: var(--grad-bright); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.9; }
.scanner-frame::after { content: ""; position: absolute; left: 8%; right: 8%; height: 2px; top: 10%; border-radius: 2px; background: linear-gradient(90deg, transparent, #ff4d8d, #7c5cff, transparent); box-shadow: 0 0 14px 2px rgba(255, 77, 141, 0.7); animation: scan-line 2.2s ease-in-out infinite; }
@keyframes scan-line { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(min(52vw, 230px)); } }
.scanner-result { margin: 0 14px; padding: 16px 18px; border-radius: 18px; display: grid; gap: 4px; animation: modal-panel-in 0.28s var(--ease-spring) both; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6); }
.scanner-result strong { font-family: var(--font-display); font-size: 19px; }
.scanner-result span { font-size: 14px; opacity: 0.92; }
.scanner-result .ci-btn { margin-top: 8px; justify-self: start; background: rgba(255, 255, 255, 0.18); box-shadow: none; }
.scanner-result.is-ok { background: linear-gradient(135deg, #15803d, #047857); }
.scanner-result.is-warn { background: linear-gradient(135deg, #92400e, #7c5c10); }
.scanner-result.is-bad { background: linear-gradient(135deg, #b91c1c, #9d174d); }
.scanner-bottom { padding: 14px 16px; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; }
.scanner-toggle { display: flex; gap: 9px; align-items: center; font-size: 13px; color: rgba(255, 255, 255, 0.85); }
.scanner-toggle input { width: 18px; height: 18px; accent-color: #22c55e; }
.scanner-manual { display: flex; gap: 8px; }
.scanner-manual input { flex: 1; min-width: 0; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 16px; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.scanner-manual input::placeholder { color: rgba(255, 255, 255, 0.45); }
.scanner-manual input:focus { outline: none; border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.35); }
.scanner-manual .btn { min-height: 48px; border-radius: 14px; }

/* Toast */
.toast { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 12px 18px 12px 14px; border-radius: 16px; background: rgba(20, 21, 38, 0.92); color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: 0 20px 40px -18px rgba(20, 21, 38, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: toast-in 0.34s var(--ease-spring) both; }
.toast::before { content: ""; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: #22c55e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center; }
.toast-bad { background: rgba(160, 20, 44, 0.95); }
.toast-bad::before { background-color: rgba(255, 255, 255, 0.2); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E"); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(0.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* Modal variants, lists, meta */
.modal-panel.modal-wide { max-width: 780px; }
.file-drop { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 28px; border: 1.5px dashed var(--field-line); border-radius: 16px; cursor: pointer; text-align: center; color: var(--ink-2); font-weight: 600; background: var(--grad-soft); transition: border-color var(--t-fast), color var(--t-fast); }
.file-drop:hover { border-color: var(--violet); color: var(--info); }
.list-rows { display: grid; gap: 8px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.85); transition: background-color var(--t-med), border-color var(--t-med); }
.list-row.is-done { background: var(--ok-bg); border-color: rgba(21, 128, 61, 0.2); }
.meta-grid { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; }
.meta-grid span:nth-child(odd) { font-weight: 700; }
.meta-grid code { font-size: 12.5px; color: var(--ink); letter-spacing: 0.06em; }
.ea-multi { border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 12px; display: grid; gap: 4px; }
.ea-multi legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }

/* Generic form grid used on the tabs */
.fg { display: grid; gap: 12px; }
.fg > h2 { margin-bottom: 2px; }
.fg label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fg input[type="text"], .fg input[type="email"], .fg input[type="tel"], .fg input[type="url"], .fg input[type="number"], .fg input[type="password"],
.fg input[type="datetime-local"], .fg select, .fg textarea, .inline-form input, .toolbar-lite select, .agenda-row input, .tpl-actions input {
  padding: 10px 12px; min-height: 42px; border: 1px solid var(--field-line); border-radius: 12px; font-size: 14px; color: var(--ink); background: var(--field); min-width: 0; width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.fg input:focus, .fg select:focus, .fg textarea:focus, .inline-form input:focus, .agenda-row input:focus, .tpl-actions input:focus { outline: none; border-color: var(--violet); box-shadow: var(--ring); }
.fg textarea { resize: vertical; line-height: 1.55; }
.fg input[readonly], .fg textarea[readonly] { background: #f8f7fd; color: var(--ink-3); }
.fg > .btn, .fg > button.btn { justify-self: start; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hint { font-size: 12.5px; color: var(--ink-3); margin: 0; line-height: 1.55; }
.hint code, .note code { background: rgba(124, 92, 255, 0.08); color: #4c1d95; padding: 1px 6px; border-radius: 6px; font-size: 11.5px; }
.sub-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 8px 0 0; font-weight: 800; }
.fg .check-inline, .check-inline { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check-inline input { width: 17px; height: 17px; accent-color: var(--violet); }
.empty-inline { font-size: 13px; color: var(--ink-3); padding: 14px 16px; border: 1.5px dashed var(--line-2); border-radius: 14px; background: rgba(255, 255, 255, 0.5); }
.link-row { display: flex; gap: 8px; align-items: center; }
.link-row input { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-3); background: #f8f7fd; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 12px; min-height: 42px; }
.color-row { display: flex; gap: 8px; }
.color-row input[type="color"] { width: 46px; height: 42px; padding: 3px; border: 1px solid var(--field-line); border-radius: 12px; background: #fff; cursor: pointer; flex-shrink: 0; }

/* Switch */
.switch-row { display: flex !important; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row .switch-label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.switch-row small { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; margin-top: 1px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; width: 100%; height: 100%; }
.switch-ui { position: absolute; inset: 0; background: #d3d4e0; border-radius: 999px; transition: background-color var(--t-med) var(--ease-std), box-shadow var(--t-med); }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(20, 21, 38, 0.25); transition: transform var(--t-med) var(--ease-spring); }
.switch input:checked + .switch-ui { background: #6d28d9; background-image: var(--grad); box-shadow: 0 4px 12px -4px rgba(190, 24, 93, 0.6); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--violet); outline-offset: 2px; }
.switch input:disabled + .switch-ui { opacity: 0.5; }

/* Form & page tab */
.config-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; align-items: start; }
.config-side { position: sticky; top: 86px; }
.preview-card { border-radius: var(--r-lg); overflow: hidden; background: #0b0c1d; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, 0.4); }
.preview-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.75); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.preview-head span { display: inline-flex; align-items: center; gap: 7px; }
.preview-head span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.preview-head .link-btn { color: #c4b5fd; text-decoration-color: rgba(196, 181, 253, 0.4); }
.preview-card iframe { display: block; width: 100%; height: 720px; border: 0; background: #0b0c1d; }
.builtin-table td, .builtin-table th { white-space: nowrap; }
.builtin-table input { width: 17px; height: 17px; accent-color: var(--violet); cursor: pointer; }
.q-list { display: grid; gap: 10px; }
.q-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 8px; background: rgba(255, 255, 255, 0.8); animation: rise-in 0.25s var(--ease-out) both; }
.q-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.q-head select { flex: 0 1 230px; }
.q-head > input[type="text"] { flex: 1 1 240px; }
.q-num { width: 26px; height: 26px; border-radius: 9px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 6px 12px -6px rgba(190, 24, 93, 0.7); }
.q-tools { margin-left: auto; display: flex; gap: 4px; }
.icon-mini { border: 1px solid var(--line-2); background: #fff; border-radius: 9px; width: 32px; height: 32px; font-size: 14px; line-height: 1; color: var(--ink-2); transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.icon-mini:hover:not(:disabled) { background: #faf9ff; color: var(--info); }
.icon-mini:active:not(:disabled) { transform: scale(0.94); }
.icon-mini.danger:hover { color: var(--danger); border-color: rgba(200, 30, 58, 0.3); background: var(--danger-bg); }
.icon-mini:disabled { opacity: 0.35; cursor: default; }
.agenda-list { display: grid; gap: 8px; }
.agenda-row { display: grid; grid-template-columns: 110px 1fr 32px; gap: 8px; align-items: center; }
.share-qr { display: flex; gap: 16px; align-items: center; }
.share-qr .qr-frame svg { width: 120px; height: 120px; }
.save-bar { position: sticky; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; padding: 10px 12px 10px 18px; border-radius: 18px; color: #fff; background: rgba(20, 21, 38, 0.92); box-shadow: 0 24px 48px -20px rgba(20, 21, 38, 0.8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: toast-bar-in 0.3s var(--ease-spring) both; }
@keyframes toast-bar-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.save-bar span { margin-right: auto; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.save-bar span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 10px #fbbf24; }
.save-bar .btn:not(.btn-brand) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); box-shadow: none; }

/* Messaging tab */
.tpl-list { display: grid; gap: 8px; }
.tpl-item { border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.85); transition: border-color var(--t-fast), box-shadow var(--t-med); }
.tpl-item[open] { border-color: rgba(124, 92, 255, 0.3); box-shadow: var(--shadow-md); }
.tpl-item > summary { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 52px; cursor: pointer; list-style: none; }
.tpl-item > summary::-webkit-details-marker { display: none; }
.tpl-title { font-size: 14px; font-weight: 700; flex: 1; }
.tpl-state { font-size: 11.5px; font-weight: 800; color: var(--ink-3); background: #eef0f6; padding: 3px 10px; border-radius: 999px; }
.tpl-state.on { color: var(--ok); background: var(--ok-bg); }
.tpl-body { padding: 0 14px 14px; }
.tpl-actions { display: flex; gap: 8px; }
.tpl-actions input { flex: 1; }
.tpl-save { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.tpl-save span { font-size: 12.5px; color: var(--warn); font-weight: 700; }
.composer-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.composer-preview { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #f8f7fd; font-size: 13.5px; line-height: 1.6; animation: rise-in 0.22s var(--ease-out) both; }
.pv-subject { font-weight: 800; margin-bottom: 8px; }
.composer-actions { display: flex; justify-content: flex-end; }
.wa-queue { border: 1px solid rgba(21, 128, 61, 0.22); border-radius: 16px; padding: 14px; background: linear-gradient(135deg, rgba(229, 246, 235, 0.8), rgba(236, 253, 245, 0.6)); display: grid; gap: 10px; animation: rise-in 0.3s var(--ease-out) both; }
.wa-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wa-progress { font-size: 12.5px; color: var(--ink-3); font-weight: 700; margin-right: auto; font-variant-numeric: tabular-nums; }

/* Engagement + Team */
.engage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; align-items: start; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-form input[type="text"] { flex: 1; }
.inline-form input[type="number"] { width: 96px; flex: none; }
.qz-options { display: grid; gap: 6px; }
.qz-opt { display: flex !important; align-items: center; gap: 8px; }
.qz-opt input[type="radio"] { width: 19px; height: 19px; accent-color: var(--ok); flex-shrink: 0; min-height: 0; }
.qz-opt input[type="text"] { flex: 1; }
.q-head .pts { display: flex; align-items: center; gap: 6px; }
.q-head .pts input { width: 84px; }
.pz-result { position: relative; overflow: hidden; border-radius: 18px; padding: 20px; text-align: center; display: grid; gap: 8px; color: #fff; background: radial-gradient(70% 90% at 50% 0%, rgba(255, 138, 61, 0.5), transparent 70%), linear-gradient(135deg, #1b1440, #3b1450); animation: modal-panel-in 0.4s var(--ease-spring) both; }
.pz-prize { font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #fcd34d; }
.pz-winner strong { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.pz-winner span { font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.role-list { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 7px; font-size: 13.5px; line-height: 1.55; }
.scope-list { display: grid; gap: 6px; padding: 8px 0 0 26px; }
.act-summary { white-space: normal; min-width: 220px; color: var(--ink-3); }
.fb-comment { margin: 6px 0 0; font-size: 13.5px; white-space: pre-wrap; line-height: 1.55; color: var(--ink); }
.toolbar-lite { display: flex; gap: 8px; margin-bottom: 12px; }

/* ================================================================ 2026-09-25 (round 2)
   Brand mark, sign-in modes, sidebar toggle, event groups + drag order,
   account menu, team passcodes, draw stage, feedback forms, CRM. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body:not(.can-crm) [data-perm="crm"] { display: none !important; }

/* Brand mark */
.gate-kicker { display: inline-flex; align-items: center; gap: 9px; }
.gate-kicker img { width: 24px; height: 24px; filter: drop-shadow(0 4px 12px rgba(255, 77, 141, 0.45)); }
.sidebar .brand .brand-tag img { width: 18px; height: 18px; flex-shrink: 0; filter: drop-shadow(0 3px 8px rgba(255, 77, 141, 0.4)); }

/* Sign-in modes */
.gate-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 6px 0 20px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }
.gate .gate-modes button { width: auto; padding: 10px 8px; font-size: 13.5px; font-weight: 700; background: transparent; box-shadow: none; color: rgba(255, 255, 255, 0.7); border-radius: 10px; overflow: visible; transition: background-color var(--t-fast), color var(--t-fast); }
.gate .gate-modes button:hover { transform: none; box-shadow: none; color: #fff; }
.gate .gate-modes button[aria-selected="true"] { background: rgba(255, 255, 255, 0.15); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.gate .gate-modes button:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.gate .gate-remember { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 13px; color: rgba(255, 255, 255, 0.75); margin: -2px 0 16px; cursor: pointer; }
.gate .gate-remember input { width: 18px; height: 18px; padding: 0; margin: 0; flex-shrink: 0; accent-color: #ff4d8d; }

/* Topbar + sidebar toggle */
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-toggle {
  flex-shrink: 0; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border-radius: 13px;
  border: 1px solid var(--line-2); background: var(--glass-strong); color: var(--ink-2); box-shadow: var(--shadow-sm);
  transition: color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-med) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.icon-toggle:hover { color: var(--ink); border-color: rgba(124, 92, 255, 0.4); box-shadow: var(--shadow-md); }
.icon-toggle:active { transform: scale(0.94); }
.icon-toggle:focus-visible { outline: none; box-shadow: var(--ring); }
.icon-toggle .chev { transition: transform var(--t-med) var(--ease-out); transform-box: fill-box; transform-origin: center; }
body.sidebar-hidden .icon-toggle .chev { transform: scaleX(-1); }
body.kiosk-mode .icon-toggle { display: none; }
.sidebar { transition: margin-left var(--t-slow) var(--ease-out), visibility 0s linear 0s; }
body.sidebar-hidden .sidebar { margin-left: -256px; visibility: hidden; transition: margin-left var(--t-slow) var(--ease-out), visibility 0s linear var(--t-slow); }

/* Sidebar groups */
.sidebar .nav-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .nav-item { justify-content: flex-start; }
.sidebar .nav-item .count { margin-left: auto; }
.sidebar .nav-item:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.8); }
.sidebar .nav-section { display: flex; align-items: center; gap: 8px; }
.sidebar .nav-section b { font-size: 10px; font-weight: 800; color: #b9bbd6; background: rgba(255, 255, 255, 0.07); padding: 1px 7px; border-radius: 999px; letter-spacing: 0; }
.sidebar .nav-section-toggle { width: calc(100% - 24px); border: none; background: none; padding: 4px 0; cursor: pointer; font-family: inherit; text-align: left; border-radius: 6px; }
.sidebar .nav-section-toggle svg { margin-left: auto; transition: transform var(--t-med) var(--ease-out); }
.sidebar .nav-section-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.sidebar .nav-section-toggle:hover { color: #fff; }
.sidebar .nav-section-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.8); }
.sidebar .nav-item.is-done:not(.active) { color: #8f91b0; }
.sidebar .nav-item.is-done:not(.active) .count { opacity: 0.7; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22); flex-shrink: 0; }
.nav-filter-note { font-size: 11.5px; color: #8f91b0; margin: 10px 12px; line-height: 1.5; }
.sidebar .nav-filter-note .link-btn { color: #c4b5fd; font-size: 11.5px; text-decoration-color: rgba(196, 181, 253, 0.4); }
.nav-team-btn-tight { margin-top: 6px; }

/* Drag to reorder */
.drag-handle { flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 28px; margin: -4px 2px -4px -6px; padding: 0; border: none; border-radius: 8px; background: transparent; color: inherit; opacity: 0.55; cursor: grab; touch-action: none; transition: opacity var(--t-fast), background-color var(--t-fast); }
.drag-handle:hover, .drag-handle:focus-visible { opacity: 1; background: rgba(255, 255, 255, 0.1); outline: none; }
.drag-handle:focus-visible { box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.9); }
.drag-handle:active { cursor: grabbing; }
.is-dragging { position: fixed !important; z-index: 300; pointer-events: none; margin: 0 !important; opacity: 0.97; animation: none !important; box-shadow: 0 30px 60px -18px rgba(52, 30, 140, 0.55) !important; }
.sidebar .nav-item.is-dragging { background: #2a2170; color: #fff; }
.drag-placeholder { border: 2px dashed rgba(167, 139, 250, 0.55); border-radius: 12px; background: rgba(124, 92, 255, 0.07); margin-bottom: 3px; }
.drag-placeholder.is-card { border-radius: var(--r-lg); margin: 0; }

/* Overview: sort/filter + grouped cards */
.events-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; margin-bottom: 16px; }
.events-head .section-title { margin-bottom: 0; }
.events-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool-select { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 12px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.tool-select select { border: none; background: transparent; font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink); padding: 6px 4px; min-height: 34px; cursor: pointer; border-radius: 8px; }
.tool-select select:focus-visible { outline: none; box-shadow: var(--ring); }
.tool-range { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.tool-range input { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--field); font-size: 13px; min-height: 40px; }
.ev-group { margin-bottom: 24px; }
.ev-group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 2px 12px; }
.ev-group-head h3 { margin: 0; font-family: var(--font-display); font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.ev-count { font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--grad-soft); color: #5b2a86; border: 1px solid rgba(124, 92, 255, 0.16); }
.ev-group-note { font-size: 12px; color: var(--ink-3); }
.ev-group-done { padding-top: 20px; border-top: 1px dashed var(--line-2); }
.ev-group-done .ev-count { background: var(--ok-bg); color: var(--ok); border-color: rgba(21, 128, 61, 0.2); }
.ev-group .event-grid { margin-bottom: 0; }
.ev-hidden-note { font-size: 12.5px; color: var(--ink-3); margin: -10px 2px 22px; }
.event-card .ec-hit { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; padding: 0; border: none; background: transparent; border-radius: inherit; cursor: pointer; }
.event-card .ec-hit:focus-visible { outline: none; box-shadow: var(--ring); }
.event-card > span { position: relative; z-index: 1; pointer-events: none; }
.event-card .ec-top-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.event-card .drag-handle { pointer-events: auto; position: relative; z-index: 2; color: var(--ink-3); margin: -4px 0; }
.event-card .drag-handle:hover, .event-card .drag-handle:focus-visible { background: rgba(24, 22, 60, 0.06); }
.event-card .ec-when.done { display: inline-flex; align-items: center; gap: 4px; background: var(--ok-bg); color: var(--ok); border-color: rgba(21, 128, 61, 0.2); }
.event-card .ec-when.nodate { background: #eef0f6; color: var(--ink-3); border-color: transparent; }
.event-card.is-done { background: rgba(255, 255, 255, 0.55); }
.event-card.is-done .ec-name { color: var(--ink-2); }
.event-card.is-done .ec-stats > span { background: rgba(255, 255, 255, 0.5); }
.event-card.is-done .ec-bar i { background: linear-gradient(90deg, #4ade80, #15803d); }
.event-card.is-live { border-color: rgba(34, 197, 94, 0.45); box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2), var(--shadow-md); }

/* Account menu */
.whoami { position: relative; }
.whoami-btn { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; text-align: left; padding: 6px 8px; margin: -6px -4px -6px -8px; border: none; border-radius: 10px; background: none; color: inherit; cursor: pointer; transition: background-color var(--t-fast); }
.whoami-btn:hover, .whoami-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.07); }
.whoami-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.8); }
.whoami-btn .whoami-name, .whoami-btn .whoami-role { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whoami-btn svg { grid-column: 2; grid-row: 1 / span 2; color: #8f91b0; }
.whoami-menu { top: auto; bottom: calc(100% + 10px); left: 0; right: 0; min-width: 0; transform-origin: bottom left; }
.whoami-menu button { display: block; width: 100%; text-align: left; min-height: 40px; padding: 9px 10px; border: none; border-radius: 10px; background: none; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.whoami-menu button:hover { background: rgba(124, 92, 255, 0.08); color: var(--info); }
.menu-note { font-size: 12.5px; color: var(--ink-3); margin: 4px 8px 8px; line-height: 1.5; }

/* Team: passcodes */
.pass-row { display: flex; gap: 8px; align-items: center; }
.pass-row input { flex: 1; min-width: 0; }
.signin-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-mini { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #f1eefc; color: var(--info); }
.tag-mini.muted { background: #f1f2f6; color: var(--ink-3); }

/* ---------------------------------------------------------------- Draw stage */
.draw-stage {
  position: fixed; inset: 0; z-index: 400; color: #fff; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto;
  background: radial-gradient(60% 55% at 50% 38%, rgba(124, 92, 255, 0.35), transparent 70%), radial-gradient(40% 40% at 12% 90%, rgba(255, 77, 141, 0.28), transparent 70%), radial-gradient(40% 40% at 88% 10%, rgba(255, 138, 61, 0.25), transparent 70%), #07070f;
  animation: fade-only 0.25s ease both;
}
.draw-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='32'%3E%3Cpath d='M0 16 28 0 56 16 28 32Z' fill='none' stroke='%23ffffff' stroke-opacity='.06'/%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(80% 70% at 50% 45%, #000 30%, transparent 85%); mask-image: radial-gradient(80% 70% at 50% 45%, #000 30%, transparent 85%); }
.draw-stage > * { position: relative; z-index: 1; }
.ds-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(14px, 2.4vh, 28px) clamp(16px, 3vw, 40px); }
.ds-kicker { display: flex; align-items: center; gap: 10px; font-size: clamp(12px, 1.1vw, 15px); font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.ds-kicker img { width: 26px; height: 26px; }
.ds-tools { display: flex; gap: 8px; }
.ds-tool { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.07); color: #fff; font-weight: 700; font-size: 13px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background-color var(--t-fast); }
.ds-tool:hover { background: rgba(255, 255, 255, 0.14); }
.ds-tool:focus-visible, .ds-draw:focus-visible, .ds-prize:focus-visible, .ds-controls select:focus-visible, .ds-controls input:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 3px; }
.ds-center { display: grid; align-content: center; justify-items: center; gap: clamp(14px, 3vh, 34px); padding: 0 clamp(16px, 4vw, 60px); text-align: center; min-height: 0; }
.ds-prize { width: min(900px, 100%); text-align: center; background: transparent; border: none; border-bottom: 1px dashed rgba(255, 255, 255, 0.2); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 3.4vw, 52px); letter-spacing: -0.02em; padding: 4px 8px; }
.ds-prize::placeholder { color: rgba(255, 255, 255, 0.35); }
.ds-window { position: relative; width: min(1100px, 100%); height: clamp(120px, 24vh, 240px); border-radius: 32px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)); border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 40px 90px -40px rgba(0, 0, 0, 0.8); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.ds-window::before, .ds-window::after { content: ""; position: absolute; left: 0; right: 0; height: 28%; z-index: 2; pointer-events: none; }
.ds-window::before { top: 0; background: linear-gradient(180deg, rgba(10, 9, 24, 0.9), transparent); }
.ds-window::after { bottom: 0; background: linear-gradient(0deg, rgba(10, 9, 24, 0.9), transparent); }
.ds-rim { position: absolute; inset: -1px; border-radius: inherit; padding: 2px; z-index: 3; pointer-events: none; background: linear-gradient(115deg, #ff8a3d, #ff4d8d 50%, #7c5cff); opacity: 0; transition: opacity 0.3s ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.draw-stage.is-spinning .ds-rim, .draw-stage.has-winner .ds-rim { opacity: 1; }
.ds-name { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; padding: 0 24px; }
.ds-name strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 6.2vw, 96px); line-height: 1.02; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-name span { font-size: clamp(14px, 1.6vw, 24px); color: rgba(255, 255, 255, 0.7); font-weight: 600; }
.ds-name.is-idle strong { font-size: clamp(22px, 3.2vw, 44px); color: rgba(255, 255, 255, 0.55); font-weight: 700; }
.ds-name.is-winner strong { background: linear-gradient(115deg, #ffd29d, #ff8fb8 50%, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 8px 30px rgba(255, 77, 141, 0.45)); }
.draw-stage.has-winner .ds-window { animation: ds-pop 0.6s var(--ease-spring) both; }
@keyframes ds-pop { 0% { scale: 1; } 40% { scale: 1.035; } 100% { scale: 1; } }
.ds-pool-note { margin-top: calc(-1 * clamp(6px, 1.6vh, 20px)); font-size: clamp(13px, 1.2vw, 16px); font-weight: 600; color: rgba(255, 255, 255, 0.6); }
.ds-winner-label { font-size: clamp(12px, 1.2vw, 16px); font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: #ffd29d; min-height: 1.4em; }
.ds-controls { display: flex; align-items: flex-end; justify-content: center; gap: 12px; flex-wrap: wrap; }
.ds-controls label { display: grid; gap: 6px; text-align: left; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.ds-controls select, .ds-controls input { min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.ds-controls select option { color: #111; }
.ds-controls input[type="number"] { width: 96px; }
.ds-draw { position: relative; overflow: hidden; min-height: 64px; padding: 0 clamp(28px, 4vw, 54px); border: none; border-radius: 20px; font-family: var(--font-display); font-size: clamp(17px, 1.8vw, 22px); font-weight: 800; color: #fff; background: var(--grad); box-shadow: 0 22px 50px -18px rgba(255, 77, 141, 0.8); transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out), opacity var(--t-fast); }
.ds-draw:hover { transform: translateY(-2px); box-shadow: 0 28px 60px -18px rgba(255, 77, 141, 0.9); }
.ds-draw:active { transform: scale(0.97); }
.ds-draw:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.ds-draw::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%); background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.4) 50%, transparent 80%); animation: ds-sheen 2.8s ease-in-out infinite; }
@keyframes ds-sheen { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.ds-msg { min-height: 1.5em; font-size: 14px; color: #ffb4c2; font-weight: 600; }
.ds-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: clamp(12px, 2vh, 24px) clamp(16px, 3vw, 40px); }
.ds-winners { display: flex; gap: 8px; flex-wrap: wrap; max-width: 75%; }
.ds-winners .w { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16); animation: rise-in 0.4s var(--ease-out) both; }
.ds-winners .w small { color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.ds-hint { font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }
.ds-hint kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); }
.ds-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.draw-stage:fullscreen { width: 100vw; height: 100vh; }
.pz-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- Feedback forms */
.fb-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.fb-forms { display: grid; gap: 10px; position: sticky; top: 86px; }
.fb-form-card { position: relative; display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px; text-align: left; width: 100%; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-sm); transition: border-color var(--t-fast), box-shadow var(--t-med) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.fb-form-card:hover { border-color: rgba(124, 92, 255, 0.35); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.fb-form-card[aria-current="true"] { border-color: transparent; box-shadow: 0 0 0 2px #7c5cff, var(--shadow-md); background: #fff; }
.fb-form-card strong { font-family: var(--font-display); font-size: 14.5px; line-height: 1.3; }
.fb-form-card .meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.fb-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(24, 22, 60, 0.05); margin-bottom: 16px; flex-wrap: wrap; }
.fb-seg button { min-height: 38px; padding: 8px 16px; border: none; border-radius: 10px; background: none; font-weight: 700; font-size: 13.5px; color: var(--ink-3); transition: background-color var(--t-fast), color var(--t-fast); }
.fb-seg button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.fb-seg button:focus-visible { outline: none; box-shadow: var(--ring); }
.fbq { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; background: rgba(255, 255, 255, 0.85); animation: rise-in 0.25s var(--ease-out) both; }
.fbq-head { display: grid; grid-template-columns: auto minmax(0, 1fr) 170px auto; gap: 10px; align-items: center; }
.fbq-num { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--grad); }
.fbq-tools { display: flex; gap: 4px; }
.fbq-opts { display: grid; gap: 6px; }
.fbq-opt { display: flex; gap: 6px; align-items: center; }
.fbq-opt input { flex: 1; }
.fbq-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.fbq-row label.inline { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.fbq-preview { font-size: 12px; color: var(--ink-3); }
.fb-add { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-add .btn { min-height: 36px; padding: 7px 12px; font-size: 12.5px; }
.fb-share { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.fb-share .qr-frame svg { width: 220px; height: 220px; }
.fb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.fb-stat { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.85); border: 1px solid var(--line); }
.fb-stat b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fb-stat span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.fb-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
.fb-sum-card { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.85); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.fb-sum-card h4 { margin: 0; font-size: 14px; line-height: 1.4; }
.fb-sum-card .big { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.fb-sum-card .big small { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-left: 4px; }
.fb-bar { display: grid; grid-template-columns: minmax(70px, 38%) minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 12.5px; }
.fb-bar .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-weight: 600; }
.fb-bar .t { height: 10px; border-radius: 999px; background: rgba(24, 22, 60, 0.07); overflow: hidden; }
.fb-bar .t i { display: block; height: 100%; border-radius: inherit; background: var(--grad-bright); transform-origin: left; animation: bar-grow 0.8s var(--ease-out) both; }
.fb-bar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); font-weight: 600; }
.fb-texts { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; padding-right: 4px; }
.fb-texts blockquote { margin: 0; padding: 10px 12px; border-radius: 12px; background: #f8f7fd; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.fb-texts blockquote cite { display: block; margin-top: 4px; font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.fb-nps { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 700; }
.fb-nps span { padding: 3px 9px; border-radius: 999px; }
.fb-nps .pro { background: var(--ok-bg); color: var(--ok); }
.fb-nps .pas { background: #f1f2f6; color: var(--ink-3); }
.fb-nps .det { background: var(--danger-bg); color: var(--danger); }
.fb-resp td { white-space: normal; vertical-align: top; }
.fb-resp td.ans { min-width: 240px; max-width: 420px; font-size: 12.5px; color: var(--ink-2); }
.present-qr { position: fixed; inset: 0; z-index: 400; display: grid; place-content: center; justify-items: center; gap: clamp(12px, 3vh, 28px); padding: 24px; text-align: center; color: #fff;
  background: radial-gradient(60% 55% at 50% 40%, rgba(124, 92, 255, 0.35), transparent 70%), radial-gradient(40% 40% at 10% 90%, rgba(255, 77, 141, 0.25), transparent 70%), #07070f; animation: fade-only 0.25s ease both; }
.present-qr .pq-kicker { font-size: clamp(13px, 1.3vw, 18px); font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #ffd29d; }
.present-qr h2 { margin: 0; font-family: var(--font-display); font-size: clamp(28px, 4.4vw, 64px); letter-spacing: -0.02em; line-height: 1.05; max-width: 20ch; }
.present-qr .pq-code { padding: clamp(14px, 2vw, 26px); border-radius: 32px; background: #fff; box-shadow: 0 50px 120px -40px rgba(255, 77, 141, 0.6); }
.present-qr .pq-code svg { display: block; width: min(52vh, 70vw); height: min(52vh, 70vw); }
.present-qr .pq-url { font-family: var(--font-mono); font-size: clamp(14px, 1.6vw, 22px); color: rgba(255, 255, 255, 0.8); }
.present-qr .ds-tools { position: absolute; top: 20px; right: 20px; }

/* ---------------------------------------------------------------- CRM */
.crm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.crm-stat { position: relative; overflow: hidden; padding: 16px 18px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-md); text-align: left; font: inherit; color: var(--ink); cursor: pointer; transition: box-shadow var(--t-med) var(--ease-out), transform var(--t-fast) var(--ease-out), border-color var(--t-fast); }
.crm-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.crm-stat[aria-pressed="true"] { border-color: transparent; box-shadow: 0 0 0 2px #7c5cff, var(--shadow-md); }
.crm-stat b { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.crm-stat span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.crm-stat i { position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; opacity: 0.18; background: var(--grad-bright); }
.crm-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.crm-toolbar input[type="search"], .crm-toolbar select { min-height: 42px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--field-line); background: var(--field); font-size: 13.5px; }
.crm-toolbar input[type="search"] { flex: 1 1 240px; min-width: 200px; }
.crm-toolbar select { max-width: 220px; }
.crm-table td { vertical-align: middle; }
.crm-table .who { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.crm-avatar { width: 36px; height: 36px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; color: #fff; background: var(--grad); box-shadow: 0 6px 14px -8px rgba(190, 24, 93, 0.8); }
.crm-avatar.prospect { background: var(--grad-cool); }
.crm-avatar.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 18px; }
.crm-table .who strong { display: block; }
.crm-table .who small { display: block; color: var(--ink-3); font-size: 12px; }
.crm-name-btn { background: none; border: none; padding: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.crm-name-btn:hover { color: var(--info); text-decoration: underline; text-underline-offset: 3px; }
.type-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.type-badge.attendee { background: var(--ok-bg); color: var(--ok); }
.type-badge.registrant { background: var(--warn-bg); color: var(--warn); }
.type-badge.prospect { background: var(--info-bg); color: var(--info); }
.tag-list { display: flex; gap: 4px; flex-wrap: wrap; max-width: 260px; }
.crm-drawer-back { position: fixed; inset: 0; z-index: 250; background: rgba(13, 14, 33, 0.35); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade-only 0.2s ease both; }
.crm-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 251; width: min(560px, 100vw); overflow-y: auto; background: var(--ground); box-shadow: -30px 0 80px -30px rgba(22, 20, 55, 0.5); animation: drawer-in 0.32s var(--ease-out) both; display: grid; grid-template-rows: auto 1fr auto; }
@keyframes drawer-in { from { translate: 40px 0; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.crm-drawer-head { position: sticky; top: 0; z-index: 2; display: flex; gap: 14px; align-items: center; padding: 20px 22px; background: rgba(247, 247, 252, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.crm-drawer-head h2 { margin: 0; font-family: var(--font-display); font-size: 19px; }
.crm-drawer-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.crm-drawer-head .modal-close { margin-left: auto; }
.crm-drawer-body { padding: 18px 22px 24px; display: grid; gap: 16px; align-content: start; }
.crm-drawer-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; background: rgba(247, 247, 252, 0.94); border-top: 1px solid var(--line); }
.crm-facts { display: flex; gap: 8px; flex-wrap: wrap; }
.timeline { display: grid; gap: 0; }
.tl-item { position: relative; display: grid; gap: 4px; padding: 0 0 16px 22px; border-left: 2px solid rgba(124, 92, 255, 0.2); margin-left: 6px; }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #7c5cff; }
.tl-item.attended::before { background: #22c55e; border-color: #15803d; }
.tl-item strong { font-size: 14px; }
.tl-item small { font-size: 12px; color: var(--ink-3); }
.invite-list { display: grid; gap: 6px; max-height: 280px; overflow-y: auto; }
.invite-list .list-row { padding: 8px 12px; }

/* ================================================================ Responsive */
@media (max-width: 1100px) {
  .config-layout { grid-template-columns: 1fr; }
  .config-side { position: static; }
  .preview-card iframe { height: 560px; }
  .ov-hero { grid-template-columns: 1fr; }
  .ov-hero .hero-art { display: none; }
}
@media (max-width: 860px) {
  .gate { grid-template-columns: 1fr; align-content: start; }
  .gate-art { order: -1; }
  .gate-art svg { max-height: 200px; }
  .shell { flex-direction: column; }
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 12px; gap: 8px; }
  .sidebar::before, .sidebar::after { display: none; }
  .sidebar .brand { padding: 0 10px 0 0; border: none; margin: 0; flex-shrink: 0; }
  .sidebar .brand .brand-tag { display: none; }
  .sidebar nav { display: flex; flex: none; overflow: visible; gap: 4px; }
  .sidebar .nav-item { margin: 0; white-space: nowrap; }
  .sidebar .nav-section { display: none; }
  .sidebar .add-project-btn { width: auto; margin: 0; padding: 8px 12px; white-space: nowrap; flex-shrink: 0; }
  .whoami { display: none; }
  .nav-team-btn { width: auto; margin: 0; white-space: nowrap; flex-shrink: 0; }
  .topbar { top: 0; padding: 12px 16px; }
  .content { padding: 18px 16px 70px; }
  .bulk-bar { top: 64px; }
  .ci-card { flex-direction: column; align-items: stretch; }
  .ci-actions { justify-content: space-between; }
  .ci-btn { flex: 1; }
  .modal-form .row2, .row2, .row3 { grid-template-columns: 1fr; }
  .engage-grid { grid-template-columns: 1fr; }
  .agenda-row { grid-template-columns: 80px 1fr 32px; }
  .share-qr { flex-direction: column; align-items: flex-start; }
  .setup-card { grid-template-columns: auto 1fr; }
  .setup-card > .link-btn { grid-column: 1 / -1; justify-self: start; }
  .view-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .view-tabs button { flex-shrink: 0; }
  .ov-hero { padding: 22px; }
  body.sidebar-hidden .sidebar { display: none; }
  .sidebar .nav-group { display: contents; }
  .sidebar .nav-group[hidden] { display: none; }
  .sidebar .nav-section-toggle, .sidebar .nav-filter-note, .sidebar .drag-handle { display: none; }
  .sidebar .brand .brand-tag { display: none; }
  .events-head { align-items: stretch; }
  .events-tools { width: 100%; }
  .tool-select { flex: 1 1 200px; }
  .tool-select select { flex: 1; min-width: 0; }
  .fb-layout { grid-template-columns: 1fr; }
  .fb-forms { position: static; }
  .fbq-head { grid-template-columns: auto minmax(0, 1fr); }
  .fbq-head select, .fbq-tools { grid-column: 1 / -1; }
  .fb-share { grid-template-columns: 1fr; justify-items: start; }
  .ds-winners { max-width: 100%; }
}

/* ================================================================ Motion: tiered reduced-motion
   Tier 1 (removed): aurora drift, 3D tilt, floating art, scan line, orb pulse.
   Tier 2 (softened): entrances become short fades, springs become ease.
   Tier 3 (kept): color/background/focus transitions, progress bar width. */
@media (prefers-reduced-motion: reduce) {
  body::before, .iso-float, .iso-shadow, .iso-orbs circle, .scanner-frame::after, .topbar .sub::before { animation: none !important; }
  .iso-bars > g, .event-card .ec-bar i { animation: none !important; }
  .stat-card, .event-card, .ov-hero { transform: none !important; }
  .stat-card:hover, .event-card:hover { --lift: 0px; }
  .btn-brand::after, .btn-scan::after, .ci-btn::after { display: none; }
  #view-project > [id^="sub-"], #view-overview, #view-team, #view-project, .gate-card, .chart-card, .event-card, .ci-card, .q-card,
  .setup-card, .bulk-bar, .composer-preview, .wa-queue, .menu-popover, .modal-panel, .toast, .save-bar, .scanner-result, .pz-result {
    animation: fade-only 0.15s ease both !important;
  }
  .btn:hover, .btn:active, .icon-btn:active, .ci-btn:hover, .ci-btn:active, .view-tabs button:active { transform: none; }
  .view-tabs button::before { transition: opacity 0.12s ease; transform: none; }
  .switch-ui::after { transition: transform 0.12s ease; }
  .skel span { animation: none; }
  .sidebar, body.sidebar-hidden .sidebar { transition: none; }
  .ds-draw::after, .draw-stage.has-winner .ds-window { animation: none; }
  .crm-drawer, .fbq, .ds-winners .w, .draw-stage, .present-qr, .crm-drawer-back { animation: fade-only 0.15s ease both !important; }
  .crm-stat:hover, .fb-form-card:hover, .ds-draw:hover { transform: none; }
  html { scroll-behavior: auto; }
}
@keyframes fade-only { from { opacity: 0; } to { opacity: 1; } }
