/* ============================================================
   SUPERDROP — Hand-written stylesheet (Propshaft, no Tailwind)
   Dark "nightlife" theme.
   Served directly as "application" by Propshaft.
   ============================================================ */

/* --- Design tokens --- */
:root {
  --primary: #4f78c4;
  --primary-hover: #3d62a8;
  --primary-dark: #2a4573;
  --secondary: #191098;
  --accent: #b10b56;
  --accent-hover: #8f0945;
  --background: #840b3f;
  --card: #6a0932;

  --success: #2bc155;
  --warning: #fe8024;
  --danger: #ff2e2e;
  --info: #4f78c4;

  --text: #c0c5f2;
  --text-dark: #ffffff;
  --text-gray: #a8aed4;
  --border: #a01048;

  --bodybg: #840b3f;
  --bodyfg: #ffffff;
  --title: #ffffff;

  /* Gradients */
  --gradient-primary: linear-gradient(to right, #9333ea, #db2777);
  --gradient-primary-hover: linear-gradient(to right, #7e22ce, #be185d);
  --gradient-primary-active: linear-gradient(to right, #6b21a8, #9d174d);
  --gradient-avatar: linear-gradient(135deg, var(--primary), #a855f7);
  --gradient-dark: linear-gradient(180deg, rgba(132, 11, 63, 0.8) 0%, rgba(25, 16, 152, 0.8) 100%);
  --gradient-card: linear-gradient(180deg, #6a0932 0%, #4a0625 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(132, 11, 63, 0.9) 100%);
  --swiper-gradient: linear-gradient(90deg, #840b3f 0%, rgba(132, 11, 63, 0) 30%, rgba(132, 11, 63, 0) 70%, #840b3f 100%);

  /* Primary opacity scale */
  --primary-10: color-mix(in srgb, var(--primary) 10%, transparent);
  --primary-20: color-mix(in srgb, var(--primary) 20%, transparent);
  --primary-30: color-mix(in srgb, var(--primary) 30%, transparent);
  --primary-40: color-mix(in srgb, var(--primary) 40%, transparent);
  --primary-50: color-mix(in srgb, var(--primary) 50%, transparent);
  --primary-60: color-mix(in srgb, var(--primary) 60%, transparent);
  --primary-70: color-mix(in srgb, var(--primary) 70%, transparent);
  --primary-80: color-mix(in srgb, var(--primary) 80%, transparent);
  --primary-90: color-mix(in srgb, var(--primary) 90%, transparent);

  /* Social colors */
  --whatsapp: #25d366;
  --instagram: #c32aa3;
  --facebook: #3b5998;
  --spotify: #1ed760;

  /* Font families (Superdrop brand: Sora display · Inter body/UI · JetBrains Mono data) */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Easing */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Radii — cards 16 · buttons 14 · inputs 10 · large 20 · pills 999 */
  --radius-card: 16px;
  --radius-btn: 14px;
  --radius-input: 10px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* ----------------------------------------------------------
     TYPE SCALE — every step ships a PAIRED line-height.
     RULE: never set font-size without its --lh-* partner.
     Shared with the marketing surface so both themes speak one
     type language; only the colors differ between scopes.
     ---------------------------------------------------------- */
  --fs-display-xl: clamp(2.4rem, 6vw, 4.2rem);
  --lh-display-xl: 1.1;
  --fs-display-lg: clamp(2rem, 4vw, 3rem);
  --lh-display-lg: 1.15;
  --fs-display-md: clamp(1.6rem, 3vw, 2.2rem);
  --lh-display-md: 1.25;
  --fs-body-lg: 1.125rem;
  --lh-body-lg: 1.6;
  --fs-body: 1rem;
  --lh-body: 1.6;
  --fs-label: 0.8125rem;
  --lh-label: 1.4;

  /* ----------------------------------------------------------
     PHASE 3 DESIGN SYSTEM — semantic + system tokens.
     Components reference ONLY these vars, never raw hex, so a
     sister product (Superchat) re-skins by overriding this block
     with its own palette while the component CSS stays untouched.
     ---------------------------------------------------------- */

  /* Semantic surfaces (magenta-nocturnal, aliased) */
  --surface-0: var(--background); /* app body                       */
  --surface-1: var(--card); /* cards, nav, feed rows                */
  --surface-2: #560a29; /* raised: sheets, menus, toasts, popovers  */
  --surface-scan: #000000; /* camera backdrop                       */
  --overlay-scrim: rgba(0, 0, 0, 0.6);

  /* Semantic text */
  --text-1: var(--text-dark); /* titles / max contrast   */
  --text-2: var(--text); /* body copy                    */
  --text-3: var(--text-gray); /* muted / secondary       */
  --on-accent: #ffffff; /* text on accent fills (theme_style flips to black on light brand colors) */
  --on-primary: #ffffff; /* text on primary + gradient-primary fills */

  /* Semantic borders */
  --border-subtle: rgba(160, 16, 72, 0.3);
  --border-strong: var(--border);

  /* Link text — accessible blue on magenta.
     Raw --primary (#4f78c4) fails as body text (2.29:1); this passes. */
  --link: #9db8e8;

  /* Focus ring — one shared token for every focusable control */
  --focus-ring: 0 0 0 3px var(--primary-50);

  /* Operational SCAN semantics (RESERVED — never decorative).
     Green/red/amber belong to the door verdict, nothing else. */
  --scan-pass: var(--success); /* green flood   */
  --scan-fail: var(--danger); /* red flood      */
  --scan-warn: var(--warning); /* amber flood   */
  --on-pass: #0a0a0a; /* dark glyph/text on green (8.3:1) */
  --on-fail: #ffffff; /* white on red (large text only)  */
  --on-warn: #0a0a0a; /* dark glyph/text on amber (7.8:1)*/

  /* Status text tuned for SMALL text on dark (raw hues can fail) */
  --status-success: var(--success);
  --status-warning: var(--warning);
  --status-danger: #ff8080; /* raw #ff2e2e = 3.35:1 (fail); this 5.1:1 */
  --status-info: var(--link);
  --status-vip: #e6b34d; /* gold */

  /* Spacing scale — 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Tap targets — 48px min, 56px for door/scan actions */
  --tap-min: 48px;
  --tap-door: 56px;

  /* Elevation */
  --elev-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --elev-pop: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --elev-sheet: 0 -16px 40px -12px rgba(0, 0, 0, 0.6);

  /* Motion — operational paths capped at 200ms */
  --motion-fast: 120ms;
  --motion-base: 180ms;
  --motion-slow: 200ms;
  --motion-celebrate: 600ms; /* DELIGHT ONLY — promoter surfaces */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);

  /* z-index scale */
  --z-nav: 50;
  --z-sheet: 80;
  --z-toast: 90;
  --z-dialog: 100;
  --z-flood: 120;
}

/* Light theme override */
.light {
  --card: #ffffff;
  --text-dark: #312a2a;
  --text: #7e7e7e;
  --bodybg: #f5f5f5;
  --border: #e6e6e6;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* `hidden` always hides, even on elements whose class sets a display (a dropzone
   preview, a verdict overlay); Stimulus toggles visibility with it. */
[hidden] { display: none !important; }

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--card);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bodybg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  line-height: 1.6;
}

h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--title);
  margin: 0 0 0.5em;
  /* Safe default leading for headings that don't opt into a type-scale step.
     Larger display headings (.page-title) override with their paired token.
     RULE: never set a heading font-size without its matching line-height. */
  line-height: var(--lh-display-md);
}

p {
  color: var(--text);
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.5s var(--ease-in-out);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

textarea,
input,
select {
  font-family: inherit;
  outline: 0;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

section {
  position: relative;
}

::selection {
  background-color: var(--primary);
  color: var(--on-primary);
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes toTopFromBottom {
  49% { transform: translate(100%, -100%); }
  50% { opacity: 0; transform: translate(-100%, 100%); }
  51% { opacity: 1; }
}
@keyframes ScaleInOut {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@keyframes ripple-1 {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}
@keyframes toLeftFromRight {
  49% { transform: translateX(100%); }
  50% { opacity: 0; transform: translateX(-100%); }
  51% { opacity: 1; }
}
@keyframes toRightFromLeft {
  49% { transform: translateX(-100%); }
  50% { opacity: 0; transform: translateX(100%); }
  51% { opacity: 1; }
}
@keyframes headerSlideDown {
  0% { margin-top: -150px; }
  100% { margin-top: 0; }
}
@keyframes loaderAnim {
  100% { opacity: 1; transform: scale3d(0.5, 0.5, 1); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(79, 120, 196, 0.3); }
  50% { box-shadow: 0 0 40px rgba(177, 11, 86, 0.5); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Animation helper classes */
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }

/* ============================================================
   CONTAINERS
   ============================================================ */
.container-fluid {
  width: 100%;
  max-width: 1870px;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
.container {
  width: 100%;
  max-width: 1330px;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
.container-sm {
  width: 100%;
  max-width: 946px;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* ============================================================
   PRELOADER
   ============================================================ */
.sd-loader {
  background: var(--bodybg);
  height: 100vh;
  position: fixed;
  width: 100%;
  z-index: 999999;
  top: 0;
  left: 0;
  transition: all 300ms var(--ease-in);
  display: flex;
  align-items: center;
  justify-content: center;
  /* CSS failsafe: even if JS never dismisses it (module error, Turbo edge case),
     the overlay self-hides. JS normally removes it far sooner (~200ms). This is
     why a stuck preloader can no longer blank the page. */
  animation: sd-loader-failsafe 0s linear 1.5s forwards;
}
@keyframes sd-loader-failsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.sd-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.sd-loader .spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  opacity: 0.4;
  background: var(--accent);
  animation: loaderAnim 0.7s linear infinite alternate forwards;
}

/* ============================================================
   BUTTONS
   ============================================================ */
/* Brand button treatment: UPPERCASE · 600 · 13px · tracking 0.14em · radius 14px */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: var(--radius-btn);
  padding: 0.75rem 1.25rem;
  height: 3.25rem;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  border: none;
  color: inherit;
  background: transparent;
  transition: all 0.4s var(--ease-in-out);
}
@media screen and (max-width: 567px) {
  .btn {
    padding: 0.5rem 0.875rem;
    height: 3rem;
  }
}

.btn-gradient {
  background: var(--gradient-primary);
  color: var(--on-primary);
  font-weight: 600;
}
.btn-gradient:hover { background: var(--gradient-primary-hover); }
.btn-gradient:active { background: var(--gradient-primary-active); }

.btn-primary { background-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-accent { background-color: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background-color: var(--accent-hover); }

.btn-dark { background-color: var(--secondary); color: #fff; height: 2.5rem; }
.btn-dark:hover { background-color: var(--primary); color: var(--secondary); }

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover { background-color: var(--primary); color: var(--on-primary); }

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
}
.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-sm { padding: 0.5rem 0.875rem; font-size: 0.75rem; height: auto; }
/* Icon buttons stay circular and drop the brand letter-spacing (no text). */
.btn-icon { width: 2.5rem; height: 2.5rem; padding: 0; justify-content: center; border-radius: var(--radius-pill); letter-spacing: normal; }

/* Flair hover effect (animated circular fill) */
.button-flair {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: scale(0);
}
.button-flair::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  aspect-ratio: 1 / 1;
  background-color: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.btn.button--stroke:hover { color: #fff; }
.button--stroke:hover .button__label {
  transition: color 0.15s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.button__label {
  position: relative;
  z-index: 1;
  text-align: center;
  transition: color 0.05s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.button--stroke::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.button--stroke .button-flair {
  transform: scale(0);
  transform-origin: 0 0;
}

/* Scale-up hover */
.btn-hover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  transform-origin: bottom left;
  transition: all 250ms linear 0s;
  transform: scale(0);
  z-index: 0;
}
.btn.btn-hover:hover::before { transform: scale(1); }

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99;
  transition: all 0.5s var(--ease-in-out);
}

.full-sidenav { z-index: 10; }

.site-header .navbar > li > a {
  padding: 0.625rem 1.25rem;
  font-size: 1.125rem;
  font-weight: 500;
  display: block;
  width: 100%;
  color: #fff;
  position: relative;
}
.site-header .navbar > li > a:hover { color: var(--primary); }
.site-header .navbar > li > a::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 0;
  background: var(--primary);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.5s var(--ease-in-out);
}

.sub-menu-down,
.sub-menu-down a { position: relative; }

/* Desktop nav / dropdowns */
@media (min-width: 1200px) {
  .site-header .navbar { color: #fff; padding-bottom: 0; }
  .site-header .navbar > li:hover > a::after { width: 1rem; }
  .site-header .navbar .sub-menu {
    color: #fff;
    position: absolute;
    top: 100%;
    left: 0;
    width: 14rem;
    border-radius: 0.375rem;
    background: var(--secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2.5rem);
    transition: all 0.5s var(--ease-in-out);
  }
  .site-header .navbar > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Mobile off-canvas nav */
@media (max-width: 1199px) {
  .site-header .navbar { padding-bottom: 1.25rem; }
  .full-sidenav {
    position: fixed;
    height: 100vh;
    width: 31.25rem;
    left: -100%;
    top: 0;
    opacity: 0;
    visibility: hidden;
    background: var(--card);
    overflow-y: auto;
    padding: 1.25rem;
    transition: all 0.7s var(--ease-in-out);
  }
  .full-sidenav.show {
    visibility: visible;
    opacity: 1;
    left: 0;
  }
  .site-header .navbar .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
}
@media (max-width: 575px) {
  .full-sidenav { width: 18.75rem; }
}

.site-header .navbar > .sub-menu-down .sub-menu > li > a {
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 400;
  display: block;
  width: 100%;
  color: #fff;
}
.site-header .navbar > .sub-menu-down .sub-menu > li > a:hover { color: var(--accent); }

/* Hamburger menu */
.menu-btn .toggle-btn span:nth-child(1) { width: 1.5rem; }
.menu-btn .toggle-btn span:nth-child(2) { width: 1.875rem; }
.menu-btn .toggle-btn span:nth-child(3) { width: 1rem; }
.menu-btn.open .toggle-btn span:nth-child(1) { width: 1.875rem; margin: 0; transform: rotate(45deg); }
.menu-btn.open .toggle-btn span:nth-child(2) { opacity: 0; margin: 0; }
.menu-btn.open .toggle-btn span:nth-child(3) { width: 1.875rem; margin: 0; transform: rotate(-45deg); }
.menu-btn.open::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.6);
  transition: all 0.5s var(--ease-in-out);
}

/* Sticky header */
.is-fixed:not(.sticky-no) .main-bar-wraper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(24px);
  animation: 0.95s ease 0s normal forwards 1 running headerSlideDown;
}
.site-header.is-fixed { height: 5rem; transition: all 0.5s var(--ease-in-out); }
.site-header.is-fixed .main-bar-wraper .container-fluid > div { padding-top: 0.625rem; padding-bottom: 0.625rem; }

body.menu-btn-open { height: 100vh; overflow: hidden; }

/* ============================================================
   CARDS
   ============================================================ */
.sd-card {
  background-color: var(--card);
  border-radius: var(--radius-card);
  border: 1px solid rgba(160, 16, 72, 0.3);
  padding: 1.5rem;
  transition: all 0.5s var(--ease-in-out);
}
.sd-card:hover {
  border-color: rgba(177, 11, 86, 0.5);
  box-shadow: 0 8px 32px rgba(177, 11, 86, 0.15);
}
.sd-card-glass {
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
}

/* ============================================================
   SWIPER / CAROUSEL
   ============================================================ */
.swiper-button-next::after,
.swiper-button-prev::after { display: none; }

.sd-pagination .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
  border-radius: 0.375rem;
  transition: all 0.5s var(--ease-in-out);
  margin: 0 0.5rem;
}
.sd-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
  width: 2rem;
  background: var(--accent);
}

/* ============================================================
   ACCORDION
   ============================================================ */
.sd-accordion .accordion-header {
  cursor: pointer;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--title);
  font-size: 1.125rem;
  border-bottom: 1px solid rgba(160, 16, 72, 0.3);
  transition: all 0.3s var(--ease-in-out);
}
.sd-accordion .accordion-header:hover { color: var(--accent); }
.sd-accordion .accordion-header .indicator { transition: all 0.3s var(--ease-in-out); }
.sd-accordion .accordion-header.open .indicator { transform: rotate(180deg); }
.sd-accordion .accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s var(--ease-in-out);
}
.sd-accordion .accordion-body.open { max-height: 24rem; }

/* ============================================================
   FORMS
   ============================================================ */
.sd-input {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(160, 16, 72, 0.3);
  border-radius: var(--radius-input);
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-body);
  transition: all 0.3s var(--ease-in-out);
}
.sd-input::placeholder { color: var(--text-gray); }
.sd-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(79, 120, 196, 0.5);
}
.sd-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-gray);
  margin-bottom: 0.375rem;
  font-family: var(--font-body);
}
.sd-select {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(160, 16, 72, 0.3);
  border-radius: var(--radius-input);
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-body);
  appearance: none;
  transition: all 0.3s var(--ease-in-out);
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23a8aed4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.sd-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(79, 120, 196, 0.5);
}

/* ============================================================
   AUTH PAGES (login, passwords, 2FA)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 26rem;
  background: var(--card);
  border: 1px solid rgba(160, 16, 72, 0.3);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.auth-card > p { color: var(--text-gray); }

/* Activation (set your password): welcome hero, show/hide, live rules checklist. */
.act-card { max-width: 28rem; padding: 2rem 2rem 1.5rem; }
.act-hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 1.5rem; }
.act-logo { height: 22px; width: auto; opacity: 0.7; margin-bottom: 1.25rem; }
.act-avatar {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 0.85rem; border-radius: 20px;
  background: var(--gradient-primary); color: var(--on-primary);
  font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; box-shadow: 0 12px 30px -12px var(--accent);
}
.act-card .act-hero h1 { margin: 0; }
.act-eyebrow {
  margin: 0 0 0.3rem; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
}
.act-lede { margin: 0.4rem 0 0.85rem; color: var(--text-gray); }
.act-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; }
.act-input { position: relative; }
.act-input input { padding-right: 3rem; }
.act-eye {
  position: absolute; right: 0.4rem; top: 50%; translate: 0 -50%; display: grid; place-items: center;
  width: 36px; height: 36px; border: none; border-radius: 10px; background: transparent; color: var(--text-3); cursor: pointer;
}
.act-eye:hover { color: var(--text-1); background: var(--surface-2); }
.act-eye:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.act-rules {
  list-style: none; margin: 0.25rem 0 1.25rem; padding: 0.85rem 1rem; display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-input); background: var(--surface-0);
}
.act-rules li { display: flex; align-items: center; gap: 0.45rem; color: var(--text-3); font-size: 0.82rem; transition: color 0.15s ease; }
.act-rules li i { opacity: 0.35; transition: opacity 0.15s ease; }
.act-rules li.is-met { color: var(--text-1); }
.act-rules li.is-met i { opacity: 1; }
.act-steps { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.act-steps__item {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.7rem; border-radius: var(--radius-input);
  border: 1px solid var(--border-subtle); background: var(--surface-0); color: var(--text-3); font-size: 0.82rem; font-weight: 600;
}
.act-steps__icon {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px;
  background: var(--surface-2); color: var(--text-3); font-size: 0.75rem;
}
.act-steps__item.is-current, .act-steps__item.is-done { color: var(--text-1); }
.act-steps__item.is-current .act-steps__icon, .act-steps__item.is-done .act-steps__icon { background: var(--gradient-primary); color: var(--on-primary); }
.act-avatar i { font-size: 1.6rem; }
.act-submit { width: 100%; display: inline-flex; justify-content: center; align-items: center; gap: 0.5rem; }
.act-foot { margin: 1.25rem 0 0; text-align: center; color: var(--text-3); font-size: 0.8rem; }
@media (max-width: 420px) { .act-card { padding: 1.5rem 1.25rem 1.25rem; } .act-rules { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .act-rules li, .act-rules li i { transition: none; } }
.auth-card .qr-code {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0;
}
.auth-card .qr-code svg { max-width: 100%; height: auto; }

.field { margin-bottom: 1rem; }
.field label,
.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-gray);
  margin-bottom: 0.375rem;
}
.field input,
.field select,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(160, 16, 72, 0.3);
  border-radius: var(--radius-input);
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s var(--ease-in-out);
}
.field input:focus,
.field select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(79, 120, 196, 0.5);
}
.form-field { margin-bottom: 1rem; }
.form-field option { color: #000; }

.sd-form-errors {
  background: rgba(255, 46, 46, 0.12);
  border: 1px solid var(--danger);
  border-radius: var(--radius-input);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #fff;
}
.sd-form-errors ul { margin: 0.5rem 0 0; padding-left: 1.25rem; list-style: disc; }

.actions { margin-top: 1.5rem; }
.actions input[type="submit"],
.actions button,
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--gradient-primary);
  color: var(--on-primary);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  border: none;
  border-radius: var(--radius-btn);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-in-out);
}
.actions input[type="submit"]:hover,
.actions button:hover,
.btn-submit:hover { background: var(--gradient-primary-hover); }

.auth-card .field + p,
.auth-card > p:last-child { margin-top: 1.25rem; text-align: center; }
.auth-card a:not(.btn) { color: var(--primary); }
.auth-card a:not(.btn):hover { text-decoration: underline; }

/* Flash / inline messages */
.flash-notice,
.notice {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  background-color: rgba(43, 193, 85, 0.1);
  color: var(--success);
  border: 1px solid rgba(43, 193, 85, 0.2);
}
/* A JS status slot (data-*-target="status") is empty until there's something to say. */
.flash-alert:empty,
.alert:empty { display: none; }
.flash-alert,
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  background-color: rgba(255, 46, 46, 0.1);
  color: var(--danger);
  border: 1px solid rgba(255, 46, 46, 0.2);
}

/* ============================================================
   SCROLL PROGRESS / SCROLL-TO-TOP
   ============================================================ */
#scrollProgress {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s var(--ease-in-out);
}
#scrollProgress.active { opacity: 1; pointer-events: auto; }
#scrollProgress svg { width: 100%; height: 100%; transform: rotate(-90deg); }
#scrollProgress circle { stroke: var(--accent); stroke-width: 3; fill: none; }
#scrollProgress .arrow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.875rem;
}

/* ============================================================
   LINK HOVER UNDERLINE
   ============================================================ */
.link-hover { position: relative; }
.link-hover::after {
  content: "";
  position: absolute;
  height: 1px;
  background: var(--accent);
  bottom: 0;
  right: 0;
  width: 0;
  transition: all 0.5s var(--ease-in-out);
}
.link-hover:hover::after { width: 100%; left: 0; right: auto; }

/* ============================================================
   DASHBOARD LAYOUT (Admin / Operator sidebar)
   ============================================================ */
.sd-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 16rem;
  background-color: var(--card);
  border-right: 1px solid rgba(160, 16, 72, 0.3);
  z-index: 99;
  overflow-y: auto;
  transition: transform 0.5s var(--ease-in-out);
  scrollbar-width: thin;
}
.sd-sidebar .sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(160, 16, 72, 0.2);
}
.sd-sidebar .sidebar-logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
/* Logo mark (light cube grid on the magenta app surface). Container laid out
   flex above; mark's viewBox padding gives the ½-cube clear space. */
.sd-logo-mark { display: block; flex-shrink: 0; }
.sd-sidebar .sidebar-nav { padding: 1rem 0; }
.sd-sidebar .sidebar-item { padding: 0.25rem 1rem; }
.sd-sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  color: var(--text-gray);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s var(--ease-in-out);
}
.sd-sidebar .sidebar-link i { width: 1.25rem; text-align: center; }
.sd-sidebar .sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.sd-sidebar .sidebar-link.active {
  background: var(--gradient-primary);
  color: var(--on-primary);
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}
/* Not-yet-built sections: visible but clearly inert. */
.sd-sidebar .sidebar-link.is-soon {
  opacity: 0.45;
  cursor: default;
}
.sd-sidebar .sidebar-link.is-soon:hover {
  background: transparent;
  color: var(--text-gray);
}
.sd-sidebar .sidebar-soon {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.4rem;
}
.sd-sidebar .sidebar-section {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(168, 174, 212, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-display);
}

.sd-main { margin-left: 16rem; min-height: 100vh; }
.sd-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 4rem;
  background-color: rgba(106, 9, 50, 0.8);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(160, 16, 72, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}
.sd-content { padding: 1.5rem; }

/* Topbar helper elements */
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.sidebar-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
}
.topbar-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; color: #fff; }
.topbar-user { display: flex; align-items: center; gap: 0.75rem; }
.topbar-user-meta .name { font-size: 0.875rem; font-weight: 500; color: #fff; margin: 0; }
.topbar-user-meta .role { font-size: 0.75rem; color: var(--text-gray); margin: 0; }
.topbar-bell {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text-gray);
  font-size: 1.125rem;
  transition: color 0.3s var(--ease-in-out);
}
.topbar-bell:hover { color: #fff; }
.topbar-bell .badge-count {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 1rem;
  height: 1rem;
  background-color: var(--accent);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1199px) {
  .sd-sidebar { transform: translateX(-100%); }
  .sd-sidebar.open { transform: translateX(0); }
  .sd-main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
}
@media (max-width: 575px) {
  .topbar-user-meta { display: none; }
}

/* ============================================================
   PROMOTER / SECURITY SIMPLE NAV
   ============================================================ */
.simple-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(106, 9, 50, 0.8);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(160, 16, 72, 0.2);
}
.simple-nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
  padding: 0 1rem;
}
.simple-nav__brand,
.security-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
}
.simple-nav__user { display: flex; align-items: center; gap: 0.75rem; }
.simple-nav__user .name { font-size: 0.875rem; color: #fff; }
@media (max-width: 575px) {
  .simple-nav__user .name { display: none; }
}

/* Bottom tab bar (promoter mobile) */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: var(--card);
  border-top: 1px solid rgba(160, 16, 72, 0.2);
}
.tab-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 4rem;
}
.tab-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: var(--text-gray);
  font-size: 0.75rem;
}
.tab-bar__item i { font-size: 1.125rem; }
.tab-bar__item:hover { color: var(--accent); }
@media (min-width: 576px) {
  .tab-bar { display: none; }
}

.dashboard-main {
  max-width: 1330px;
  margin: 0 auto;
  padding: 1.5rem 1rem 5rem;
}
@media (min-width: 576px) {
  .dashboard-main { padding-bottom: 1.5rem; }
}

/* Security layout */
.security-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--card);
  border-bottom: 1px solid rgba(160, 16, 72, 0.2);
}
.security-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  padding: 0 1rem;
}
.security-main { padding: 1rem; }

/* ============================================================
   BADGES / TAGS
   ============================================================ */
/* Neutral chip for every state. No colored text, tints or dots: an icon carries
   the meaning. The -primary/-success/... variants are kept as hooks but look the same. */
.sd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.65rem;
  border-radius: 9999px;
  background-color: var(--surface-2);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.sd-badge i { color: var(--text-3); font-size: 0.7rem; }

/* ============================================================
   DASHBOARD METRICS + TABLES (index views)
   ============================================================ */
.page-title { font-family: var(--font-display); font-size: var(--fs-display-md); line-height: var(--lh-display-md); font-weight: 700; color: var(--title); margin-bottom: 1.5rem; }

/* CRUD layout helpers (index/show/form) */
.sd-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.sd-page-head .page-title { margin-bottom: 0; }
.sd-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}
.sd-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-gray);
}
.sd-tab:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.sd-tab.active { background: var(--gradient-primary); color: var(--on-primary); }
.sd-row-actions { display: flex; gap: 0.4rem; justify-content: flex-end; white-space: nowrap; }
.sd-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-gray);
}
.sd-empty p { margin-bottom: 1.25rem; }
.sd-form { max-width: 640px; }
.sd-form-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.5rem; }
.sd-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem 2rem; margin-bottom: 2rem; }
.sd-detail dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-gray); margin-bottom: 0.25rem; }
.sd-detail dd { margin: 0 0 1rem; color: var(--title); }
.sd-qr { max-width: 260px; background: #fff; padding: 0.75rem; border-radius: var(--radius-input); }
.sd-qr svg { width: 100%; height: auto; display: block; }

/* Tap-friendly card list (promoter mobile views) */
.sd-list { display: flex; flex-direction: column; gap: 0.75rem; }
.sd-list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: inherit;
}
.sd-list-card:hover { border-color: var(--accent); }
.sd-list-card__title { font-family: var(--font-display); font-weight: 600; color: var(--title); }

/* Security check-in scanner */
.sec-checkin { max-width: 520px; margin: 0 auto; }
.sec-video {
  width: 100%;
  aspect-ratio: 1;
  max-height: 55vh;
  object-fit: cover;
  background: #000;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.sec-result:empty { display: none; }
.sec-result {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius-card);
  margin-bottom: 1.25rem;
}
.sec-result__title { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: #fff; }
.sec-result__sub { margin-top: 0.25rem; color: rgba(255, 255, 255, 0.9); }
.sec-result--green { background: var(--success); }
.sec-result--yellow { background: var(--warning); }
.sec-result--red { background: var(--danger); }
.section-title { font-family: var(--font-display); font-size: 1.25rem; line-height: var(--lh-display-md); font-weight: 600; color: var(--title); margin: 2rem 0 1rem; }
.subtitle { color: var(--text-gray); margin-bottom: 1.5rem; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.metric-card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(160, 16, 72, 0.2);
  border-radius: var(--radius-card);
  padding: 1.25rem;
}
.metric-card .metric-label { font-size: 0.875rem; color: var(--text-gray); margin: 0 0 0.375rem; }
.metric-card .metric-value { font-family: var(--font-mono); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; color: var(--title); margin: 0; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--card);
  border-radius: 0.875rem;
  overflow: hidden;
  font-size: 0.9rem;
}
.data-table thead tr { background-color: rgba(255, 255, 255, 0.05); }
.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(160, 16, 72, 0.15);
  color: var(--text);
}
.data-table tbody tr { transition: background-color 0.3s var(--ease-in-out); }
.data-table tbody tr:hover { background-color: rgba(255, 255, 255, 0.04); }

/* ============================================================
   STAT CARDS (rich dashboard)
   ============================================================ */
.sd-stat-card {
  background-color: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(160, 16, 72, 0.2);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}
.sd-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  opacity: 0.1;
  background: var(--gradient-primary);
  filter: blur(30px);
}
.sd-stat-card .stat-value { font-family: var(--font-mono); font-size: 1.875rem; font-weight: 600; letter-spacing: -0.02em; color: var(--title); }
.sd-stat-card .stat-label { font-size: 0.875rem; color: var(--text-gray); margin-top: 0.25rem; }
.sd-stat-card .stat-trend { font-size: 0.75rem; font-weight: 600; margin-top: 0.5rem; display: inline-flex; align-items: center; gap: 0.25rem; }
.sd-stat-card .stat-trend.up { color: var(--success); }
.sd-stat-card .stat-trend.down { color: var(--danger); }

/* ============================================================
   AVATARS
   ============================================================ */
.sd-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  background: var(--gradient-avatar);
  flex-shrink: 0;
}
.sd-avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.sd-avatar-md { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
.sd-avatar-lg { width: 3rem; height: 3rem; font-size: 1rem; }

/* ============================================================
   HEADLINE TEXT ANIMATION (GSAP)
   ============================================================ */
.headline { opacity: 0; }
.headline .char { display: inline-block; }

/* ============================================================
   HELPERS
   ============================================================ */
.svg-currentcolor path { stroke: currentColor; }

/* Mono data utility — numbers, prices, counts, times, QR codes.
   Matches marketing's .mkt-num; tabular-nums stops digit jitter. */
.sd-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.glass {
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.glow-accent { box-shadow: 0 0 30px rgba(177, 11, 86, 0.3); }
.glow-primary { box-shadow: 0 0 30px rgba(79, 120, 196, 0.3); }

/* ============================================================
   ============================================================
   PHASE 3 DESIGN SYSTEM — COMPONENT LAYER
   Mobile-first (390px). Every color is a var(--…) semantic token
   (defined in :root) so components are palette-agnostic and a
   sister product re-skins by overriding tokens only.
   Naming: sd-block__element--modifier (BEM-ish).
   Delight is gated: promoter/head_promoter + success moments only;
   the admin panel and the scanner chrome stay sober.
   ============================================================
   ============================================================ */

/* ------------------------------------------------------------
   Design-system keyframes
   ------------------------------------------------------------ */
@keyframes sd-flood-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sd-glyph-pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes sd-pass-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
  100% { box-shadow: 0 0 0 40px rgba(255, 255, 255, 0); }
}
@keyframes sd-count-tick {
  0% { transform: translateY(0.35em); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes sd-celebrate {
  0% { transform: scale(1); }
  35% { transform: scale(1.14) rotate(-2deg); }
  70% { transform: scale(0.98) rotate(1deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes sd-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes sd-toast-in {
  from { transform: translateY(-0.75rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes sd-skeleton {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes sd-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes sd-feed-in {
  from { transform: translateY(-0.5rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ------------------------------------------------------------
   1. App bar / top glance bar  (glance-only, no controls)
   ------------------------------------------------------------ */
.sd-appbar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-4);
  background: color-mix(in srgb, var(--surface-1) 88%, transparent);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}
.sd-appbar__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-body);
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sd-appbar__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-1);
}
/* Quiet, honest connection indicator (never blocks work) */
.sd-conn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-3);
}
.sd-conn::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--text-3);
  flex-shrink: 0;
}
.sd-conn--synced::before { background: var(--scan-pass); }
.sd-conn--queued::before { background: var(--scan-warn); }
.sd-conn--offline::before { background: var(--scan-fail); }

/* ------------------------------------------------------------
   2. Stat card — "one big number" glance tile
   ------------------------------------------------------------ */
.sd-glance {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.sd-glance__label {
  font-size: 0.8rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sd-glance__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: clamp(2.5rem, 12vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-1);
}
.sd-glance__value small { font-size: 0.45em; color: var(--text-3); font-weight: 500; }
.sd-glance__trend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}
.sd-glance__trend--up { color: var(--status-success); }
.sd-glance__trend--down { color: var(--status-danger); }
.sd-glance__trend--flat { color: var(--text-3); }
/* tiny inline pace sparkline (bars) */
.sd-spark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 1.75rem;
  margin-top: var(--space-2);
}
.sd-spark > i {
  flex: 1;
  min-width: 2px;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0.85;
}
/* promoter/head_promoter delight: value ticks when it rises */
.sd-glance--live .sd-glance__value { animation: sd-count-tick var(--motion-base) var(--ease-emphasized); }

/* ------------------------------------------------------------
   3. Live check-in feed
   ------------------------------------------------------------ */
.sd-feed { display: flex; flex-direction: column; gap: var(--space-2); }
.sd-feed__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  animation: sd-feed-in var(--motion-base) var(--ease-standard);
}
.sd-feed__body { min-width: 0; flex: 1; }
.sd-feed__name { font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-feed__meta { font-size: 0.8rem; color: var(--text-3); }
.sd-feed__time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--text-3);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   4. Progress meter — benefit threshold / goal gradient
   ------------------------------------------------------------ */
.sd-meter { display: flex; flex-direction: column; gap: var(--space-2); }
.sd-meter__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.sd-meter__label { font-size: 0.85rem; color: var(--text-3); }
.sd-meter__count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-1);
}
.sd-meter__track {
  height: 0.75rem;
  background: rgba(0, 0, 0, 0.28);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.sd-meter__fill {
  display: block;
  height: 100%;
  min-width: 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-primary);
  transition: width var(--motion-slow) var(--ease-standard);
}
/* goal reached — DELIGHT (promoter/head_promoter surfaces) */
.sd-meter--reached .sd-meter__fill { background: var(--scan-pass); }
.sd-meter--reached .sd-meter__count { color: var(--status-success); animation: sd-celebrate var(--motion-celebrate) var(--ease-emphasized); }
.sd-goal-burst {
  position: relative;
}
.sd-goal-burst::after {
  content: "";
  position: absolute;
  inset: -20% -6%;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(43, 193, 85, 0.25), transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.sd-goal-burst.is-reached::after { animation: sd-flood-in var(--motion-celebrate) var(--ease-standard); opacity: 1; }

/* ------------------------------------------------------------
   5. Buttons — thumb-zone helpers over the existing .btn system
   (.btn / .btn-gradient primary / .btn-outline / .btn-ghost exist)
   ------------------------------------------------------------ */
/* Full-width buttons wrap a long label instead of clipping it on a phone. */
.btn-block { width: 100%; white-space: normal; text-align: center; height: auto; min-height: 3.25rem; line-height: 1.3; }
.btn-door { height: var(--tap-door); min-height: var(--tap-door); font-size: 0.875rem; }
/* fixed bottom action bar — owns the green thumb zone on phones */
.sd-actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-nav);
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface-1) 92%, transparent);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
}
.sd-actionbar .btn { flex: 1; }

/* ------------------------------------------------------------
   6-8. Form field, select, search, textarea
   ------------------------------------------------------------ */
.sd-field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.sd-field__label { font-size: 0.85rem; font-weight: 500; color: var(--text-3); }
.sd-field__hint { font-size: 0.75rem; color: var(--text-3); }
.sd-field__error { font-size: 0.8rem; color: var(--status-danger); }
.sd-field__control,
.sd-field input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.sd-field select,
.sd-field textarea {
  width: 100%;
  min-height: var(--tap-min);
  padding: 0.7rem 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  color: var(--text-1);
  font: inherit;
  transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard);
}
.sd-field textarea { min-height: 6rem; resize: vertical; }
.sd-field__control:focus,
.sd-field input:focus,
.sd-field select:focus,
.sd-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
.sd-field ::placeholder { color: var(--text-3); }
.sd-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23a8aed4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}
.sd-field select option { color: #000; }
/* search field with leading glyph, sits in lower thumb zone */
.sd-search { position: relative; }
.sd-search__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.sd-search input {
  width: 100%;
  min-height: var(--tap-door);
  padding: 0.7rem 0.85rem 0.7rem 2.5rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  color: var(--text-1);
  font: inherit;
}
.sd-search input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }

/* ------------------------------------------------------------
   9-11. Toggle, checkbox, radio
   ------------------------------------------------------------ */
.sd-toggle { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; min-height: var(--tap-min); }
.sd-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.sd-toggle__track {
  width: 3rem;
  height: 1.75rem;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  position: relative;
  transition: background var(--motion-base) var(--ease-standard);
  flex-shrink: 0;
}
.sd-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: var(--radius-pill);
  background: var(--text-1);
  transition: transform var(--motion-base) var(--ease-standard);
}
.sd-toggle input:checked + .sd-toggle__track { background: var(--gradient-primary); border-color: transparent; }
.sd-toggle input:checked + .sd-toggle__track::after { transform: translateX(1.25rem); }
.sd-toggle input:focus-visible + .sd-toggle__track { box-shadow: var(--focus-ring); }

.sd-check, .sd-radio { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; min-height: var(--tap-min); color: var(--text-2); }
.sd-check input, .sd-radio input {
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-strong);
  transition: background var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
}
.sd-check input { border-radius: 6px; }
.sd-radio input { border-radius: var(--radius-pill); }
.sd-check input:checked, .sd-radio input:checked { background: var(--gradient-primary); border-color: transparent; }
.sd-check input:checked::after {
  content: "";
  display: block;
  width: 0.4rem;
  height: 0.75rem;
  margin: 0.15rem auto 0;
  border: solid var(--on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.sd-radio input:checked::after { content: ""; display: block; width: 0.6rem; height: 0.6rem; margin: 0.4rem auto; border-radius: var(--radius-pill); background: var(--on-accent); }
.sd-check input:focus-visible, .sd-radio input:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ------------------------------------------------------------
   12. Segmented tabs (pill group)
   ------------------------------------------------------------ */
.sd-segment {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}
.sd-segment__option {
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  min-height: 40px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
}
.sd-segment__option[aria-selected="true"], .sd-segment__option.active { background: var(--gradient-primary); color: var(--on-accent); }
.sd-segment__option:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ------------------------------------------------------------
   13. Avatar stack (over existing .sd-avatar)
   ------------------------------------------------------------ */
.sd-avatar-stack { display: inline-flex; align-items: center; }
.sd-avatar-stack .sd-avatar { border: 2px solid var(--surface-1); margin-left: -0.6rem; }
.sd-avatar-stack .sd-avatar:first-child { margin-left: 0; }
.sd-avatar-stack__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -0.6rem;
  border: 2px solid var(--surface-1);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  width: 2rem;
  height: 2rem;
}

/* ------------------------------------------------------------
   14. Status chips (verified / used / VIP / pending) — shape + color
   ------------------------------------------------------------ */
.sd-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
}
.sd-chip::before { font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 0.7em; }
.sd-chip--verified { background: rgba(43, 193, 85, 0.16); color: var(--status-success); border-color: rgba(43, 193, 85, 0.35); }
.sd-chip--verified::before { content: "\f00c"; } /* check */
.sd-chip--used { background: rgba(168, 174, 212, 0.14); color: var(--text-3); border-color: var(--border-subtle); }
.sd-chip--used::before { content: "\f560"; } /* slash */
.sd-chip--vip { background: rgba(230, 179, 77, 0.16); color: var(--status-vip); border-color: rgba(230, 179, 77, 0.4); }
.sd-chip--vip::before { content: "\f005"; } /* star */
.sd-chip--pending { background: rgba(254, 128, 36, 0.16); color: var(--status-warning); border-color: rgba(254, 128, 36, 0.35); }
.sd-chip--pending::before { content: "\f017"; } /* clock */

/* ------------------------------------------------------------
   15. Empty state (meaningful; delight variant floats the icon)
   ------------------------------------------------------------ */
.sd-emptystate {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-3);
}
.sd-emptystate__icon {
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.85;
  margin-bottom: var(--space-4);
}
.sd-emptystate__title { font-family: var(--font-display); font-weight: 600; color: var(--text-1); margin-bottom: var(--space-2); }
.sd-emptystate__msg { max-width: 24rem; margin: 0 auto var(--space-5); }
.sd-emptystate--delight .sd-emptystate__icon { animation: sd-float 3s var(--ease-standard) infinite; }

/* ------------------------------------------------------------
   16. Toast
   ------------------------------------------------------------ */
.sd-toast-region {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  pointer-events: none;
}
.sd-toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 30rem;
  margin: 0 auto;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--elev-pop);
  color: var(--text-1);
  pointer-events: auto;
  animation: sd-toast-in var(--motion-base) var(--ease-emphasized);
}
.sd-toast__icon { flex-shrink: 0; }
.sd-toast--success { border-left: 3px solid var(--status-success); }
.sd-toast--success .sd-toast__icon { color: var(--status-success); }
.sd-toast--error { border-left: 3px solid var(--status-danger); }
.sd-toast--error .sd-toast__icon { color: var(--status-danger); }
.sd-toast--info { border-left: 3px solid var(--status-info); }
.sd-toast--info .sd-toast__icon { color: var(--status-info); }

/* ------------------------------------------------------------
   17. Bottom sheet
   ------------------------------------------------------------ */
.sd-sheet { position: fixed; inset: 0; z-index: var(--z-sheet); }
.sd-sheet__backdrop { position: absolute; inset: 0; background: var(--overlay-scrim); animation: sd-flood-in var(--motion-base) var(--ease-standard); }
.sd-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88vh;
  overflow-y: auto;
  padding: var(--space-3) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  background: var(--surface-2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--elev-sheet);
  animation: sd-sheet-up var(--motion-slow) var(--ease-emphasized);
}
.sd-sheet__handle { width: 2.5rem; height: 0.3rem; border-radius: var(--radius-pill); background: var(--border-strong); margin: 0 auto var(--space-4); }

/* ------------------------------------------------------------
   18. Confirm dialog (irreversible actions — redeemer)
   ------------------------------------------------------------ */
.sd-dialog { position: fixed; inset: 0; z-index: var(--z-dialog); display: flex; align-items: center; justify-content: center; padding: var(--space-5); }
.sd-dialog__backdrop { position: absolute; inset: 0; background: var(--overlay-scrim); animation: sd-flood-in var(--motion-base) var(--ease-standard); }
.sd-dialog__panel {
  position: relative;
  width: 100%;
  max-width: 24rem;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--elev-pop);
}
.sd-dialog__title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--text-1); margin-bottom: var(--space-3); }
.sd-dialog__body { color: var(--text-2); margin-bottom: var(--space-6); }
.sd-dialog__actions { display: flex; gap: var(--space-3); }
.sd-dialog__actions .btn { flex: 1; }

/* ------------------------------------------------------------
   19. Scanner screen shell (door / redeemer)
   ------------------------------------------------------------ */
.sd-scanner {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--surface-scan);
}
.sd-scanner__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sd-scanner__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: calc(var(--space-3) + env(safe-area-inset-top, 0px)) var(--space-4) var(--space-3);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
}
.sd-scanner__count { margin-left: auto; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; color: #fff; }
/* aiming reticle — centered, thumb-clear */
.sd-scanner__frame {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(64vw, 260px);
  aspect-ratio: 1;
  margin: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35);
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: -3px;
}
.sd-scanner__actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
}
.sd-scanner__actions .btn { flex: 1; height: var(--tap-door); }

/* ------------------------------------------------------------
   20. Big pass/fail verdict — full-screen flood, shape + color
   ------------------------------------------------------------ */
.sd-verdict {
  position: fixed;
  inset: 0;
  z-index: var(--z-flood);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  animation: sd-flood-in var(--motion-fast) var(--ease-standard);
}
.sd-verdict--pass { background: var(--scan-pass); color: var(--on-pass); }
.sd-verdict--fail { background: var(--scan-fail); color: var(--on-fail); }
.sd-verdict--warn { background: var(--scan-warn); color: var(--on-warn); }

/* Expired-QR override: hold the circle; a green fill grows to full screen, then
   admits. Press-and-hold is the deliberate guard on a rule the door is bending. */
.sd-verdict__occupancy {
  margin-top: var(--space-2, 0.5rem);
  padding: 0.4rem 1rem;
  border: 1px dashed currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: clamp(1rem, 4.5vw, 1.25rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
/* Sensitive: blurred until tapped (re-blurs after 5 s, see qr_scanner_controller). */
.sd-verdict__occupancy-value { filter: blur(0.45em); transition: filter 0.2s ease; user-select: none; }
.sd-verdict__occupancy.is-revealed .sd-verdict__occupancy-value { filter: none; }
@media (prefers-reduced-motion: reduce) { .sd-verdict__occupancy-value { transition: none; } }

.sd-verdict__hold {
  position: relative;
  margin-top: var(--space-6);
  width: 9rem;
  height: 9rem;
  border-radius: var(--radius-pill);
  border: 3px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #fff;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sd-verdict__holdfill {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--scan-pass, #2bc155);
  transform: scale(0);
  transition: transform 1.3s linear;
  z-index: 0;
}
.sd-verdict__hold.is-holding .sd-verdict__holdfill { transform: scale(24); }
.sd-verdict__holdlabel {
  position: relative;
  z-index: 1;
  padding: 0 var(--space-3);
  font-weight: 700;
  line-height: 1.15;
}
@media (prefers-reduced-motion: reduce) {
  .sd-verdict__holdfill { transition-duration: 1.3s; }
}
.sd-verdict__glyph {
  font-size: clamp(5rem, 34vw, 12rem);
  line-height: 1;
  margin-bottom: var(--space-4);
  animation: sd-glyph-pop var(--motion-base) var(--ease-emphasized);
}
/* pass gets a single, quick success pulse — no wait, no extra tap */
.sd-verdict--pass .sd-verdict__glyph {
  border-radius: var(--radius-pill);
  animation: sd-glyph-pop var(--motion-base) var(--ease-emphasized), sd-pass-pulse var(--motion-slow) var(--ease-standard);
}
.sd-verdict__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 8vw, 2.75rem);
  line-height: 1.1;
}
.sd-verdict__name { font-size: clamp(1.25rem, 6vw, 1.75rem); font-weight: 600; margin-top: var(--space-2); }
/* reason line is intentionally large + bold so it clears AA large-text */
.sd-verdict__reason { font-size: 1.2rem; font-weight: 700; margin-top: var(--space-3); opacity: 0.95; }

/* ------------------------------------------------------------
   21. Skeleton loaders
   ------------------------------------------------------------ */
.sd-skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 37%, rgba(255, 255, 255, 0.04) 63%);
  background-size: 200% 100%;
  border-radius: var(--radius-input);
  animation: sd-skeleton 1.4s var(--ease-standard) infinite;
}
.sd-skeleton--text { height: 0.9rem; margin-bottom: var(--space-2); }
.sd-skeleton--title { height: 1.6rem; width: 60%; margin-bottom: var(--space-3); }
.sd-skeleton--stat { height: 3.5rem; border-radius: var(--radius-lg); }
.sd-skeleton--row { height: 3.75rem; border-radius: var(--radius-card); margin-bottom: var(--space-2); }

/* ------------------------------------------------------------
   Delight utilities (subtle brand glow / depth)
   ------------------------------------------------------------ */
.sd-brand-glow { position: relative; }
.sd-brand-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 90% at 50% 0%, rgba(177, 11, 86, 0.14), transparent 70%);
  pointer-events: none;
}
.sd-depth { box-shadow: var(--elev-card); }

/* ------------------------------------------------------------
   Reduced motion — kill non-essential animation, keep the verdict
   readable (opacity/color only, no transforms/pulses).
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .sd-glance--live .sd-glance__value,
  .sd-feed__row,
  .sd-meter--reached .sd-meter__count,
  .sd-goal-burst.is-reached::after,
  .sd-emptystate--delight .sd-emptystate__icon,
  .sd-toast,
  .sd-sheet__panel,
  .sd-sheet__backdrop,
  .sd-dialog__backdrop,
  .sd-verdict,
  .sd-verdict__glyph,
  .sd-verdict--pass .sd-verdict__glyph,
  .sd-skeleton {
    animation: none !important;
  }
  .sd-meter__fill { transition: none; }
}

/* WhatsApp code: on a computer, a QR of the same wa.me link to send it from the phone. */
.phone-verification__qr { display: none; }
@media (min-width: 900px) and (hover: hover) {
  .phone-verification__qr {
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem; margin: 1rem auto 0.25rem;
  }
  .phone-verification__qr svg { width: 168px; height: 168px; padding: 10px; border-radius: 14px; background: #fff; }
  .phone-verification__qr .sa-hint { margin: 0; text-align: center; }
}
.in-app-steps { margin: 0 0 1.25rem; padding-left: 1.25rem; color: var(--text-2); display: grid; gap: 0.4rem; }
.act-step-title { margin: 0 0 0.25rem; font-size: 1.05rem; text-align: center; }
.identity-consent { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.5rem 0 1rem; color: var(--text-2); font-size: 0.85rem; }
.identity-consent input { margin-top: 0.2rem; accent-color: var(--accent); }
.identity-consent a { color: var(--text-1); }

/* --- Event closure: the cat and the red button (panel/events/closures) --- */
.closure__card { max-width: 32rem; margin-inline: auto; text-align: center; }
.closure__card .sa-card__actions { justify-content: center; }
.closure__warning { font-weight: 600; }
.closure-cat { display: block; width: min(16rem, 100%); margin: 0 auto 1rem; overflow: visible; }
.closure-cat__body { filter: drop-shadow(0 0 1px #a1a1aa); }
.closure-cat__tail { transform-origin: 38px 148px; animation: closure-tail 2.4s ease-in-out infinite; }
.closure-cat__eye { transform-box: fill-box; transform-origin: center; animation: closure-blink 4s infinite; }
.closure-cat__paw { transform-origin: 96px 112px; transform: rotate(-24deg); }
.closure-cat__boom { opacity: 0; transform-origin: 178px 112px; transform: scale(0); }
.closure-cat.is-pressed {
  .closure-cat__paw { animation: closure-slap 0.5s ease-in 0.3s both; }
  .closure-cat__cap { transform-box: fill-box; transform-origin: center bottom; animation: closure-press 0.15s ease-out 0.75s both; }
  .closure-cat__boom { animation: closure-boom 0.9s cubic-bezier(.2,.9,.3,1.2) 0.85s both; }
  .closure-cat__button { animation: closure-gone 0.1s linear 0.95s both; }
  .closure-cat__body { animation: closure-hop 0.6s ease-out 0.9s both; }
}
@keyframes closure-tail { 50% { transform: rotate(14deg); } }
@keyframes closure-blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes closure-slap { from { transform: rotate(-24deg); } to { transform: rotate(10deg); } }
@keyframes closure-press { to { transform: scaleY(0.4); } }
@keyframes closure-boom { 0% { opacity: 0; transform: scale(0); } 40% { opacity: 1; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }
@keyframes closure-gone { to { opacity: 0; } }
@keyframes closure-hop { 30% { transform: translate(-6px, -14px); } 100% { transform: translate(-10px, 0); } }
@media (prefers-reduced-motion: reduce) {
  .closure-cat *, .closure-cat.is-pressed * { animation: none !important; }
  .closure-cat.is-pressed .closure-cat__boom { opacity: 1; transform: none; }
  .closure-cat.is-pressed .closure-cat__button { opacity: 0; }
}

/* --- CSV pre-load (panel/pending_members) --- */
.pending-progress { display: grid; gap: .5rem; }
.pending-progress__count { font-weight: 600; margin: 0; }
.pending-progress progress { width: 100%; height: .5rem; accent-color: var(--accent, #9333ea); }
.dash-pending { display: block; color: inherit; text-decoration: none; margin-block-end: 1rem; }
.csv-sample { font-size: .8rem; padding: .75rem; border-radius: .5rem; background: var(--surface-2, rgba(127,127,127,.12)); overflow-x: auto; }
.uxp-table tr.is-error td { opacity: .75; }
.join-link__qr { margin-block-start: .75rem; }
.join-link__qr summary { list-style: none; display: inline-flex; gap: .4rem; cursor: pointer; }
.join-link__qr summary::-webkit-details-marker { display: none; }
.account-choices { list-style: none; padding: 0; display: grid; gap: .5rem; }
