/* ============================================================
   SaveDate Design System v3 — "Celebration Studio"
   Cream canvas · deep navy ink · lime CTA · colorful bento tiles.
   Desktop = bold admin studio · Mobile = native-app feel.
   ============================================================ */

:root {
  /* Core palette — brand: black · rose · teal · yellow */
  --navy: #1a1a1a;
  --navy-deep: #000000;
  --ink: #1a1a1a;
  --text: #3c3c46;
  --muted: #6f6f7a;
  --faint: #a4a4ae;

  --bg: #ffffff;          /* white canvas with soft ambient tints */
  --surface: #ffffff;
  --surface-2: #f4f4f6;
  --line: #e8e8ec;

  --lime: #cdf05e;         /* primary CTA accent (navy text on it) */
  --lime-deep: #b8e13e;
  --lime-soft: #f2fbd9;
  --green: #2fbf71;
  --green-soft: #e2f6ec;
  --lav: #cfc9f6;           /* lavender hero tint */
  --lav-soft: #edeafb;
  --coral: #ff6f61;
  --coral-soft: #ffe9e6;
  --yellow: #ffd159;
  --yellow-soft: #fff3d6;
  --teal: #3e948c;
  --teal-soft: #e7f3f2;
  --rose: #ed5f78;          /* celebration accent (kept from brand) */
  --rose-soft: #fdeef1;

  /* Feedback */
  --success: #21935c;
  --success-soft: #e2f6ec;
  --danger: #d64545;
  --danger-soft: #fceaea;

  /* Type scale */
  --fs-xs: .8125rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.8rem;
  --fs-3xl: 2.5rem;

  /* Shape & depth */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 58, .06);
  --shadow-md: 0 12px 32px rgba(20, 20, 58, .10);
  --shadow-lg: 0 28px 64px rgba(20, 20, 58, .18);

  /* Motion */
  --ease: cubic-bezier(.22, .8, .36, 1);
  --t-fast: 160ms;
  --t-med: 260ms;

  /* Layout */
  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* Legacy aliases (older components) */
  --primary: var(--navy);
  --primary-strong: var(--navy-deep);
  --primary-soft: var(--rose-soft);
  --accent: var(--yellow);
  --accent-soft: var(--yellow-soft);
  --brand: var(--navy);
  --ink-soft: var(--muted);
  --ink-faint: var(--faint);
  --rose-dark: #d84f68;
  --yellow-deep: #e9b53a;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* the hidden attribute must always win. App pages get this from Bootstrap's
   reboot, but marketing pages don't load Bootstrap — without it, any element
   whose class sets a display (e.g. .modal { display:flex }) stays rendered
   while "hidden": an invisible centred modal was swallowing taps mid-page. */
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--ink); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 .6em; overflow-wrap: break-word; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid #f5b7c3; outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--rose-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Ambient gradient wash (lavender/lime on cream) ---------- */
.bgcolor-wrapper { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.bgcolor-wrapper i { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(10px); }
.bgcolor-wrapper .bg-rose {
  top: -140px; left: 14%; opacity: .5;
  background: radial-gradient(50% 50% at 50% 50%, var(--lav) 0%, rgba(255,255,255,0) 70%);
  animation: bgDriftX 9s ease-in-out infinite alternate;
}
.bgcolor-wrapper .bg-yellow {
  bottom: -6%; left: -80px; opacity: .35;
  background: radial-gradient(50% 50% at 50% 50%, var(--yellow) 0%, rgba(255,255,255,0) 70%);
  animation: bgDriftY 8s ease-in-out infinite alternate;
}
.bgcolor-wrapper .bg-teal {
  bottom: 42%; right: -140px; opacity: .35;
  background: radial-gradient(50% 50% at 50% 50%, #9fdcc8 0%, rgba(255,255,255,0) 70%);
  animation: bgDriftY2 10s ease-in-out infinite alternate;
}
@keyframes bgDriftX  { to { transform: translateX(30vw); } }
@keyframes bgDriftY  { to { transform: translateY(-34vh); } }
@keyframes bgDriftY2 { to { transform: translateY(26vh); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 46px; padding: 0 1.55rem;
  border: 1.5px solid transparent; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--fs-sm); text-decoration: none; color: var(--ink);
  position: relative; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn svg { flex: none; }

.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-deep); box-shadow: 0 10px 26px rgba(30, 30, 75, .32); }
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover {
  background: var(--yellow); color: var(--ink);
  box-shadow: 0 10px 26px rgba(255, 209, 89, .5);
}
.btn-primary:hover .spinner { border-color: rgba(26, 26, 26, .25); border-top-color: var(--ink); }
.btn-lime, .btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-lime:hover, .btn-yellow:hover { background: #f7c63e; box-shadow: 0 10px 26px rgba(255, 209, 89, .5); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(47, 191, 113, .4); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 600; }
.btn-ghost:hover { border-color: var(--navy); }
.btn-soft { background: var(--lav-soft); color: var(--navy); }
.btn-soft:hover { background: #e2ddf8; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #f8d9d9; }
.btn-sm { min-height: 38px; padding: 0 1.1rem; font-size: var(--fs-xs); }
.btn-lg { min-height: 54px; padding: 0 2rem; font-size: var(--fs-md); }
.btn-block { width: 100%; }
.btn-icon { min-width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.btn-icon:hover { background: var(--surface-2); }

.btn .spinner { display: none; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: .6; }
.spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: currentColor;
  animation: spin .7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; position: relative; }
.field label {
  display: flex; align-items: center; gap: .35rem;
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink); margin-bottom: .4rem;
}
.field label .req { color: var(--coral); font-weight: 800; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .65rem 1.05rem;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  appearance: none;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
/* appearance:none above removes the native dropdown arrow — without a
   replacement, selects read as dead text boxes. Draw our own chevron. */
.field select, select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6f7a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 16px 16px;
  padding-right: 2.6rem;
  cursor: pointer;
}
/* selects have no ::placeholder — show the empty "Select…" option muted like
   input placeholders, and keep the dropdown list itself readable */
.field select:has(option[value=""]:checked) { color: var(--muted); }
.field select option { color: var(--ink); background: #fff; }
.field select option[value=""] { color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: none !important;
  border-color: var(--rose) !important;
  box-shadow: 0 4px 16px rgba(237, 95, 120, .2) !important;
}
/* the global keyboard-focus ring stays for buttons/links, but form fields
   use the rose border + glow instead of an outline */
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .input:focus-visible {
  outline: none;
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field .error-msg {
  display: none; font-size: var(--fs-xs); color: var(--danger); margin-top: .3rem; font-weight: 600;
  animation: slideDown var(--t-fast) var(--ease);
}
.field.has-error .error-msg { display: block; }
.field .hint { font-size: var(--fs-xs); color: var(--faint); margin-top: .3rem; }
.input-wrap { position: relative; }
.input-wrap .trailing {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  color: var(--faint); min-width: 40px; min-height: 40px;
  display: grid; place-items: center; border-radius: 50%;
}
.input-wrap .trailing:hover { color: var(--ink); background: var(--surface-2); }

/* password strength meter (shared) */
.pw-meter { display: flex; gap: 4px; margin-top: .45rem; }
.pw-meter i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background var(--t-med); }
.pw-meter.s1 i:nth-child(1) { background: var(--danger); }
.pw-meter.s2 i:nth-child(-n+2) { background: var(--yellow); }
.pw-meter.s3 i:nth-child(-n+3) { background: var(--teal); }
.pw-meter.s4 i { background: var(--green); }
.pw-hint { font-size: var(--fs-xs); color: var(--faint); margin-top: .25rem; }
/* An empty meter and a generic hint are noise before there is a password to
   rate, so both stay hidden until the first keystroke. The shared handler in
   app.js adds .pw-live to the field once the input has a value. Declared after
   the base rules above so source order and specificity agree. */
.field .pw-meter,
.field .pw-hint { display: none; }
.field.pw-live .pw-meter { display: flex; }
.field.pw-live .pw-hint { display: block; }

/* ---------- public knowledgebase / blog (marketing chrome) ---------- */
/* the hero comes from the shared .ab2 / .nx-sh pattern; only the article list
   needs constraining, since long help text is unreadable at full page width */
.kb-public .kb-wrap { max-width: 860px; }
.kb-public .nx-sec:last-child { padding-top: 1.5rem; }
/* the hero above is centred, so the search and its count sit centred too —
   the article list itself stays left-aligned, because body text should be */
.kb-public .kb-searchwrap { margin-inline: auto; }
.kb-public .kb-count { text-align: center; }

/* blog placeholder — ghost previews of the first posts, one card per topic the
   hero promises, in the site's glass-card language. The skeleton lines shimmer
   like a feed that is about to load, which is exactly the message.
   (`.ab2 .nx-sec` in home.css sets a 5rem top padding and loads after this
   file, so the section selector carries the extra class to win.) */
.ab2.blog-soon .bs-sec { padding-top: 2rem; }

/* "Coming soon" pill with a softly pulsing dot */
.blog-soon .bs-badge {
  display: flex; width: fit-content; margin: 0 auto 2.3rem;
  align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem 1.15rem;
  font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); box-shadow: 0 4px 14px rgba(26, 26, 26, .08);
}
.blog-soon .bs-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); animation: bsPulse 1.6s ease-in-out infinite; }
@keyframes bsPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.55); opacity: .45; } }

/* the three ghosts: glass cards, gently fanned like a stack on a desk */
.blog-soon .bs-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem;
  max-width: 940px; margin: 0 auto 2.6rem; padding-top: .5rem;
}
.blog-soon .bs-ghost {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .85); border-radius: 24px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(26, 26, 26, .07);
}
.blog-soon .bs-ghost:nth-child(1) { transform: rotate(-2deg) translateY(8px); }
.blog-soon .bs-ghost:nth-child(2) { transform: translateY(-8px); box-shadow: 0 18px 44px rgba(26, 26, 26, .1); }
.blog-soon .bs-ghost:nth-child(3) { transform: rotate(2deg) translateY(8px); }

/* cover: a soft brand tint with the topic's icon — same colour pairs as the
   stag chips, so the page stays in one palette */
.blog-soon .bs-cover { height: 118px; display: grid; place-items: center; }
.blog-soon .g-rose   .bs-cover { background: radial-gradient(130% 100% at 50% 0%, #fbdce3 0%, #fdf2f5 100%); color: #c2496a; }
.blog-soon .g-yellow .bs-cover { background: radial-gradient(130% 100% at 50% 0%, #ffe8b0 0%, #fdf7e8 100%); color: #b0730a; }
.blog-soon .g-teal   .bs-cover { background: radial-gradient(130% 100% at 50% 0%, #dcefec 0%, #f0f8f6 100%); color: #075e55; }
.blog-soon .bs-meta { padding: 1.05rem 1.2rem 1.25rem; display: grid; gap: .6rem; justify-items: start; }
.blog-soon .bs-chip {
  font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: .3rem .65rem; border-radius: 999px; margin-bottom: .15rem;
}
.blog-soon .g-rose   .bs-chip { background: #fbdce3; color: #c2496a; }
.blog-soon .g-yellow .bs-chip { background: #ffe8b0; color: #b0730a; }
.blog-soon .g-teal   .bs-chip { background: #dcefec; color: #075e55; }

/* skeleton lines, shimmering left to right on staggered delays */
.blog-soon .bs-line {
  display: block; height: 11px; border-radius: 6px;
  background: linear-gradient(90deg, #eeeef1 25%, #f9f9fb 45%, #eeeef1 65%);
  background-size: 200% 100%; animation: bsShimmer 2.1s linear infinite;
}
.blog-soon .bs-ghost:nth-child(2) .bs-line { animation-delay: .35s; }
.blog-soon .bs-ghost:nth-child(3) .bs-line { animation-delay: .7s; }
.blog-soon .w85 { width: 85%; }
.blog-soon .w60 { width: 60%; }
.blog-soon .w40 { width: 40%; height: 9px; }
.blog-soon .bs-byline { display: flex; align-items: center; gap: .55rem; width: 100%; margin-top: .3rem; }
.blog-soon .bs-dot { width: 22px; height: 22px; border-radius: 50%; background: #eeeef1; flex: none; }
@keyframes bsShimmer { to { background-position: -200% 0; } }

.blog-soon .bs-note {
  text-align: center; color: var(--muted); font-size: var(--fs-sm); line-height: 1.75;
  max-width: 52ch; margin: 0 auto 1.8rem;
}
.blog-soon .bs-actions { display: flex; gap: .65rem; flex-wrap: wrap; justify-content: center; }
.blog-soon .bs-actions .btn { text-decoration: none; min-height: 46px; padding-inline: 1.35rem; }

@media (max-width: 860px) {
  /* one card per row; the fan flattens so nothing looks broken when stacked */
  .blog-soon .bs-grid { grid-template-columns: 1fr; max-width: 400px; gap: 1rem; }
  .blog-soon .bs-ghost:nth-child(n) { transform: none; box-shadow: 0 10px 30px rgba(26, 26, 26, .07); }
  .blog-soon .bs-cover { height: 96px; }
}
@media (max-width: 480px) {
  /* stacked, full-width buttons read better than two cramped pills */
  .blog-soon .bs-actions { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-soon .bs-badge i, .blog-soon .bs-line { animation: none; }
}

/* helper bubble */
.helper-tip { position: relative; display: inline-flex; }
.helper-tip > button {
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--lav-soft); color: var(--navy); font-size: 11px; font-weight: 800; line-height: 1;
  display: grid; place-items: center;
}
.helper-tip .tip-bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) scale(.94);
  min-width: 210px; max-width: 260px; padding: .6rem .8rem; z-index: 30;
  background: var(--navy); color: #fff; font-size: var(--fs-xs); font-weight: 500; line-height: 1.5;
  border-radius: var(--r-sm); box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity var(--t-fast), transform var(--t-fast);
}
.helper-tip .tip-bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px;
  border: 6px solid transparent; border-top-color: var(--navy);
}
.helper-tip > button:focus + .tip-bubble,
.helper-tip:hover .tip-bubble { opacity: 1; transform: translateX(-50%) scale(1); pointer-events: auto; }

/* switches */
.switch { position: relative; display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  width: 46px; height: 27px; border-radius: 999px; background: #d9d6ca;
  transition: background var(--t-med) var(--ease); flex: none; position: relative;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease);
}
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(19px); }
.switch input:focus-visible + .track { outline: 3px solid #f5b7c3; outline-offset: 2px; }

/* range slider */
input[type=range].range { width: 100%; height: 44px; background: transparent; appearance: none; }
input[type=range].range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(to right, var(--navy) var(--fill, 50%), var(--line) var(--fill, 50%));
}
input[type=range].range::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--ink); box-shadow: var(--shadow-sm);
}

/* color swatch */
.color-dot {
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 0 0 1.5px var(--line), var(--shadow-sm);
  overflow: hidden; position: relative; flex: none;
  transition: transform var(--t-fast) var(--ease);
}
.color-dot:active { transform: scale(.92); }
.color-dot input[type=color] { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; }

/* ---------- Cards, bento tiles ---------- */
.card {
  background: var(--surface); border-radius: var(--r-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  padding: 1.4rem;
}
.card-hover { transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.tile {
  border-radius: var(--r-xl); padding: 1.4rem 1.5rem; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 128px;
  border: 1px solid transparent;
}
.tile .t-label { font-size: var(--fs-xs); font-weight: 700; opacity: .75; display: flex; align-items: center; gap: .45rem; }
.tile .t-value { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.tile .t-sub { font-size: var(--fs-xs); opacity: .7; font-weight: 600; }
.tile-navy { background: var(--ink); color: #fff; }
.tile-navy .t-value { color: #fff; }
.tile-lime { background: var(--yellow); color: var(--ink); }
.tile-white { background: var(--surface); border-color: var(--line); color: var(--ink); }
.tile-green { background: var(--teal); color: #fff; }
.tile-rose { background: var(--rose); color: #fff; }
.tile-lav { background: var(--lav-soft); color: var(--ink); }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .75rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700;
}
.chip svg { flex: none; }
.chip-success { background: var(--green-soft); color: var(--success); }
.chip-warn { background: var(--yellow-soft); color: #8a6410; }
.chip-muted { background: var(--surface-2); color: var(--muted); }
.chip-teal { background: var(--teal-soft); color: var(--teal); }
.chip-lime { background: var(--yellow-soft); color: #8a6410; }

/* ---------- Dropdown menus (profile / notifications) ---------- */
.pop-wrap { position: relative; }
.pop-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 600;
  min-width: 250px; max-width: 92vw;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: .5rem;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.pop-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.pop-menu .pm-head { padding: .65rem .8rem .5rem; border-bottom: 1px solid var(--line); margin-bottom: .35rem; }
.pop-menu .pm-head b { display: block; font-size: var(--fs-sm); color: var(--ink); }
.pop-menu .pm-head span { font-size: var(--fs-xs); color: var(--faint); }
.pop-item {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  min-height: 44px; padding: 0 .8rem; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink); text-decoration: none; text-align: left;
  transition: background var(--t-fast);
}
.pop-item:hover { background: var(--surface-2); }
.pop-item.danger { color: var(--danger); }
.pop-item.danger:hover { background: var(--danger-soft); }
.pop-item svg { flex: none; color: var(--muted); }
.pop-item.danger svg { color: var(--danger); }
.pop-sep { height: 1px; background: var(--line); margin: .35rem .4rem; }

/* notifications */
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item { display: flex; gap: .7rem; padding: .65rem .8rem; border-radius: var(--r-sm); align-items: flex-start; }
.notif-item:hover { background: var(--surface-2); }
.notif-item .n-ic { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.notif-item .n-body { min-width: 0; flex: 1; font-size: var(--fs-xs); color: var(--text); line-height: 1.45; }
.notif-item .n-body b { color: var(--ink); }
.notif-item .n-time { font-size: 11px; color: var(--faint); white-space: nowrap; }
.notif-empty { text-align: center; padding: 1.6rem 1rem; color: var(--faint); font-size: var(--fs-xs); }
.icon-btn-badge { position: relative; }
.icon-btn-badge .badge {
  position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--coral); color: #fff;
  font-size: 10px; font-weight: 800; display: grid; place-items: center; line-height: 1;
  border: 2px solid var(--surface);
}

/* ---------- Top loader ---------- */
#top-loader {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 9999;
  background: linear-gradient(90deg, var(--yellow), var(--rose));
  border-radius: 0 3px 3px 0; opacity: 0; transition: width .3s var(--ease), opacity .3s;
}
#top-loader.active { opacity: 1; }

/* ---------- Toasts ---------- */
#toast-zone {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  display: flex; flex-direction: column; gap: .5rem; z-index: 10000;
  width: min(92vw, 420px); pointer-events: none;
}
@media (min-width: 900px) { #toast-zone { bottom: 24px; } }
.toast {
  display: flex; align-items: center; gap: .5rem;
  width: max-content; max-width: 100%; margin-inline: auto;
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--ink); border: 1px solid rgba(255, 255, 255, .55);
  padding: .35rem .9rem .35rem .45rem; border-radius: var(--r-pill);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .16);
  font-size: var(--fs-xs); font-weight: 600; pointer-events: auto;
  animation: toastIn var(--t-med) var(--ease);
}
.toast.leaving { animation: toastOut var(--t-fast) var(--ease) forwards; }
.toast svg { flex: none; }
.toast .t-ic {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: rgba(26, 26, 26, .08); color: var(--ink);
}
.toast .t-ic svg { width: 12px; height: 12px; }
.toast-success { background: rgba(214, 240, 222, .7); color: #14532d; }
.toast-success .t-ic { background: rgba(28, 124, 70, .16); color: #1c7c46; }
.toast-error, .toast-delete { background: rgba(250, 221, 221, .72); color: #7f1d1d; }
.toast-error .t-ic, .toast-delete .t-ic { background: rgba(192, 52, 52, .15); color: #c03434; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- Modals & bottom sheets ---------- */
.modal-backdrop {
  /* above the account drawer/sheets (z 1198-1199): confirms must never be dimmed by them */
  position: fixed; inset: 0; z-index: 1300;
  background: rgba(20, 20, 58, .5); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity var(--t-med) var(--ease);
}
.modal-backdrop.show { opacity: 1; }
.modal {
  position: fixed; z-index: 1301; background: var(--surface);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  max-height: min(86dvh, 720px);
  /* top:auto beats Bootstrap's .modal{top:0} — otherwise the sheet gets
     pinned to both edges and stretches the full screen on phones */
  left: 0; right: 0; bottom: 0; top: auto;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  transform: translateY(100%); transition: transform var(--t-med) var(--ease);
  padding-bottom: var(--safe-b);
}
.modal.show { transform: translateY(0); }
.modal .sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: .6rem auto 0; flex: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.4rem .4rem; flex: none; }
.modal-head h3 { margin: 0; font-size: var(--fs-lg); }
.modal-body { padding: .5rem 1.4rem 1.25rem; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-foot { display: flex; gap: .75rem; padding: .9rem 1.4rem calc(.9rem + var(--safe-b)); border-top: 1px solid var(--line); flex: none; }
.modal-foot .btn { flex: 1; }
@media (min-width: 640px) {
  .modal {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: min(92vw, 560px); border-radius: var(--r-xl);
    transform: translate(-50%, -46%) scale(.96); opacity: 0;
    transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
  }
  .modal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .modal .sheet-grab { display: none; }
}
.modal-lg { width: min(96vw, 860px); }

/* compact centered confirm dialog */
@media (min-width: 640px) { .modal.modal-confirm { width: min(90vw, 360px); } }
/* phones: a small floating card, not a full-width sheet */
@media (max-width: 639px) {
  .modal.modal-confirm {
    left: .9rem; right: .9rem; bottom: calc(1rem + var(--safe-b));
    border-radius: var(--r-xl);
  }
  .modal.modal-confirm .sheet-grab { display: none; }
  .modal.modal-confirm .cf-body { padding: 1.5rem 1.2rem 1.3rem; }
  /* pages with a fixed bottom bar: float the card clear of it, so its
     corners never merge into the bar behind the backdrop */
  body.has-bottom-nav .modal.modal-confirm { bottom: calc(var(--nav-h, 58px) + var(--safe-b) + 12px); }
  body:has(.ed-footbar) .modal.modal-confirm { bottom: calc(80px + var(--safe-b)); }
}
.modal-confirm .cf-body { padding: 1.8rem 1.5rem calc(1.5rem + var(--safe-b)); text-align: center; }
.modal-confirm .cf-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 1rem;
}
.modal-confirm .cf-icon.cf-danger { background: var(--danger-soft); color: var(--danger); }
.modal-confirm .cf-icon.cf-normal { background: var(--rose-soft); color: var(--rose); }
.modal-confirm h3 { font-size: var(--fs-lg); margin-bottom: .35rem; }
.modal-confirm p { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 1.4rem; }
.modal-confirm .cf-btns { display: flex; gap: .6rem; justify-content: center; }
.modal-confirm .cf-btns .btn { flex: 1; max-width: 150px; }

/* ---- email confirmation dialog (SD.verifyEmail) ---- */
.vf-body .vm-lead { margin-bottom: 1rem; }
/* the address, stated plainly — people mistype it at sign-up and need to see
   exactly where the email is going before they wait for it */
.vf-body .vm-addr {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.vf-body .vm-mail {
  font-weight: 700; color: var(--ink); font-size: var(--fs-sm);
  word-break: break-all;
}
.vf-body .vm-change {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: .78rem; font-weight: 700; color: var(--rose);
}
.vf-body .vm-change:hover { text-decoration: underline; }
.vf-body .vm-editwrap { margin-bottom: 1rem; }
.vf-body .vm-input, .vf-body .vm-code { width: 100%; text-align: center; }
.vf-body .vm-code {
  font-size: 1.5rem; font-weight: 700; letter-spacing: .5em;
  text-indent: .5em;                        /* centres text that has trailing tracking */
  padding-block: .7rem;
}
.vf-body .vm-step2 { margin-bottom: .9rem; }
.vf-body .vm-sent { margin: 0 0 .7rem; }
.vf-body .vm-msg { min-height: 1.2em; margin: 0 0 1rem; font-size: .82rem; line-height: 1.5; }
.vf-body .vm-msg.vm-good { color: var(--teal); }
.vf-body .vm-msg.vm-bad  { color: var(--danger); }
.vf-body .vm-resend {
  display: block; margin: .9rem auto 0; background: none; border: 0; cursor: pointer;
  font-size: .8rem; font-weight: 700; color: var(--muted);
}
.vf-body .vm-resend:hover:not(:disabled) { color: var(--rose); }
.vf-body .vm-resend:disabled { cursor: default; opacity: .6; }

/* ============================================================
   APP SHELL — floating rounded header (desktop) + bottom nav (mobile)
   ============================================================ */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; gap: .8rem;
  height: 64px; margin: 0; padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(232, 232, 236, .8);
}
main#main { padding-top: 64px; }
.app-header .logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.app-header .logo img { height: 40px; width: auto; }
.app-header .spacer { flex: 1; }

.pill-nav {
  display: none; position: absolute; left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border-radius: 999px; padding: 5px; gap: 2px;
}
@media (min-width: 900px) { .pill-nav { display: flex; } }
.pill-nav a {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 40px; padding: 0 1.3rem; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--muted); text-decoration: none;
  transition: all var(--t-fast) var(--ease);
}
.pill-nav a:hover { color: var(--ink); }
.pill-nav a.active { background: var(--navy); color: #fff; font-weight: 700; box-shadow: var(--shadow-sm); }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--yellow); color: var(--ink);
  display: grid; place-items: center; font-weight: 800;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-btn { display: inline-flex; align-items: center; gap: .45rem; border-radius: 999px; padding: 3px; transition: background var(--t-fast); }
.avatar-btn:hover { background: var(--surface-2); }
.avatar-btn .caret { color: var(--muted); transition: transform var(--t-fast); }
.avatar-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }

/* mobile bottom nav */
/* full-width glassy bar — same language as the marketing pages, icons only */
.bottom-nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 200;
  transform-origin: 50% 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: .45rem .7rem;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(26, 26, 26, .16);
  transition: transform .3s var(--ease), bottom .3s var(--ease);
}
.bottom-nav.mini { transform: scale(.92); bottom: calc(8px + var(--safe-b)); }
@media (min-width: 900px) { .bottom-nav { display: none; } }
.bottom-nav a, .bottom-nav button {
  width: 58px; height: 44px; border-radius: 999px; flex: none; position: relative;
  display: grid; place-items: center;
  color: #55555e; background: none; border: 0; text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.bottom-nav svg { width: 22px; height: 22px; }
.bottom-nav .bn-logo img { height: 22px; width: auto; }
/* instagram-style active state: a soft translucent pill behind the icon */
.bottom-nav .active { background: rgba(26, 26, 26, .08); color: var(--ink); }
.bottom-nav a:active, .bottom-nav button:active { background: rgba(26, 26, 26, .06); }
.bn-badge {
  position: absolute; top: 3px; right: 3px;
  min-width: 16px; height: 16px; border-radius: 999px; padding: 0 3px;
  background: var(--rose); color: #fff; font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
}
.has-bottom-nav { padding-bottom: calc(86px + var(--safe-b)); }
@media (min-width: 900px) { .has-bottom-nav { padding-bottom: 40px; } }

/* phones: everything lives in the bottom pill — no top header */
@media (max-width: 899px) {
  .app-header { display: none; }
  main#main { padding-top: 14px; }
}

/* sticky action bar */
.sticky-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  display: flex; gap: .7rem;
  padding: .75rem clamp(1rem, 3vw, 2.5rem) calc(.75rem + var(--safe-b));
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.sticky-actions .btn { flex: 1; }
@media (min-width: 900px) {
  .sticky-actions { position: sticky; background: transparent; border: 0; backdrop-filter: none; justify-content: flex-end; }
  .sticky-actions .btn { flex: 0 0 auto; min-width: 190px; }
}
.has-sticky-actions { padding-bottom: calc(80px + var(--safe-b)); }

/* ---------- Skeletons / progress ---------- */
.skeleton {
  background: linear-gradient(100deg, var(--surface-2) 40%, #faf9f4 50%, var(--surface-2) 60%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--yellow), var(--rose));
  border-radius: inherit; transition: width .25s var(--ease);
}

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: clamp(1rem, 3vw, 2.5rem); }
.container-fluid { width: 100%; padding-inline: clamp(1rem, 3vw, 2.5rem); }
.grid { display: grid; gap: 1rem; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.mt-2 { margin-top: .5rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-soft { color: var(--muted); }
.text-xs { font-size: var(--fs-xs); } .text-sm { font-size: var(--fs-sm); }
.hide-desktop { display: initial; } .hide-mobile { display: none; }
@media (min-width: 900px) { .hide-desktop { display: none; } .hide-mobile { display: initial; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-4px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
.anim-in { animation: fadeUp .45s var(--ease) both; }
.anim-in-1 { animation-delay: .05s; } .anim-in-2 { animation-delay: .12s; } .anim-in-3 { animation-delay: .19s; }

/* ---------- SDPicker: custom date & time popup ---------- */
.sdp-pop {
  position: absolute; z-index: 950; width: 300px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 18px; box-shadow: 0 18px 50px rgba(26, 26, 26, .18);
  padding: .9rem; display: none;
  animation: fadeUp .22s var(--ease) both;
}
.sdp-pop.open { display: block; }
.sdp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.sdp-nav { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.sdp-nav:hover { background: var(--surface-2); }
.sdp-title { display: flex; gap: .3rem; }
.sdp-title select {
  border: 0; background: var(--surface-2); border-radius: 8px; padding: .25rem .4rem;
  font-weight: 700; font-size: var(--fs-xs); color: var(--ink); cursor: pointer;
}
.sdp-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 10.5px; font-weight: 700; color: var(--faint); margin-bottom: .25rem; }
.sdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.sdp-cell {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.sdp-cell:not(.off):not([disabled]):hover { background: #f2f2f4; }
.sdp-cell:not(.off):not([disabled]):active { transform: scale(.9); }
.sdp-cell.today { box-shadow: inset 0 0 0 1.5px var(--teal); }
.sdp-cell.sel { background: var(--ink); color: #fff; }
.sdp-cell[disabled] { color: #cfcfd6; cursor: not-allowed; }
/* time picker — same visual language as the calendar */
/* time picker: AM/PM toggle → hour grid → minute grid (two taps) */
.sdp-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: .7rem;
}
.sdp-seg button {
  min-height: 34px; border-radius: 999px; font-weight: 700; font-size: var(--fs-xs);
  color: var(--muted); transition: background var(--t-fast), color var(--t-fast);
}
.sdp-seg button:hover { color: var(--ink); }
.sdp-seg button.sel { background: var(--ink); color: #fff; }
.sdp-tlabel { font-size: 10.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin: .15rem 0 .35rem; }
.sdp-tgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: .45rem; }
.sdp-tgrid button {
  min-height: 36px; border-radius: 9px; font-size: var(--fs-xs); font-weight: 600;
  color: var(--ink); background: #fff; border: 1px solid #ececf0;
  transition: background var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.sdp-tgrid button:hover { background: #f2f2f4; }
.sdp-tgrid button:active { transform: scale(.92); }
.sdp-tgrid button.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
/* (legacy scroll-column styles kept for safety) */
.sdp-time { display: grid; grid-template-columns: 1fr 1fr 74px; gap: .5rem; height: 196px; }
.sdp-col { overflow-y: auto; display: flex; flex-direction: column; gap: 3px; scrollbar-width: thin; padding-right: 2px; }
.sdp-col button {
  flex: none; min-height: 38px; border-radius: 10px; font-weight: 600; font-size: var(--fs-xs); color: var(--ink);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.sdp-col button:hover { background: #f2f2f4; }
.sdp-col button:active { transform: scale(.92); }
.sdp-col button.sel { background: var(--ink); color: #fff; }
.sdp-ap { justify-content: flex-start; }
.sdp-time-foot { display: flex; gap: .5rem; margin-top: .7rem; }
.sdp-time-foot button { flex: 1; min-height: 42px; border-radius: 999px; font-weight: 700; font-size: var(--fs-xs); transition: background var(--t-fast), box-shadow var(--t-fast); }
.sdp-clear { background: var(--surface-2); color: var(--muted); }
.sdp-clear:hover { background: #eae8ee; }
.sdp-done { background: var(--ink); color: #fff; }
.sdp-done:hover { background: #000; box-shadow: 0 8px 20px rgba(26, 26, 26, .3); }

/* ---------- Bootstrap 5 coexistence ----------
   Bootstrap is available for grids/utilities (row, col-*, d-flex, g-*, …).
   These rules keep OUR components' geometry when bootstrap.css is loaded
   (class name overlaps: .modal .toast .btn .card .badge .progress). */
.modal { width: auto; height: auto; display: flex; }
@media (min-width: 640px) { .modal { width: min(92vw, 560px); } }
.modal.modal-lg { width: auto; }
@media (min-width: 640px) { .modal.modal-lg { width: min(96vw, 860px); } }
.modal.modal-xl { width: auto; max-height: min(92dvh, 940px); }
@media (min-width: 640px) { .modal.modal-xl { width: min(96vw, 1180px); } }
.toast { width: max-content; max-width: 100%; border: 1px solid rgba(255, 255, 255, .55); font-size: var(--fs-xs); }
/* Bootstrap claims ".toast" too and hides it without its .show class — ours always shows */
.toast:not(.show), .toast.show { display: flex; opacity: 1; }
.btn { --bs-btn-focus-box-shadow: none; }
.btn:focus-visible { box-shadow: none; }
/* bootstrap also defines .btn-primary/.btn-dark (blue/gray) — feed it OUR
   colours through its variables so no blue border/active state leaks through */
.btn-primary {
  --bs-btn-bg: var(--rose); --bs-btn-color: #fff;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: var(--yellow); --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: var(--yellow); --bs-btn-active-color: var(--ink);
  --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-bg: var(--rose); --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-border-color: transparent;
  --bs-btn-focus-shadow-rgb: 237, 95, 120;
}
.btn-dark {
  --bs-btn-bg: var(--navy); --bs-btn-color: #fff;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: var(--navy-deep); --bs-btn-hover-color: #fff;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: var(--navy-deep); --bs-btn-active-color: #fff;
  --bs-btn-active-border-color: transparent;
}
/* bootstrap owns ".btn-danger" too — feed it OUR palette or its red/hover wins */
.btn-danger {
  --bs-btn-bg: var(--danger-soft); --bs-btn-color: var(--danger);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: #f2c2c2; --bs-btn-hover-color: var(--danger);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: #f2c2c2; --bs-btn-active-color: var(--danger);
  --bs-btn-active-border-color: transparent;
  --bs-btn-focus-shadow-rgb: 216, 74, 74;
}
.btn-primary:focus, .btn-primary:active, .btn-dark:focus, .btn-dark:active,
.btn-ghost:focus, .btn-ghost:active, .btn-danger:focus, .btn-danger:active {
  outline: none; box-shadow: none;
}
.card { display: block; }
.icon-btn-badge .badge { display: grid; line-height: 1; }
.progress { display: block; }

/* notification bell: quick ring wiggle, re-triggered on an interval while
   there are unread notifications (badge visible) */
@keyframes sd-bell-ring {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-12deg); }
  45% { transform: rotate(9deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(3deg); }
}
@media (prefers-reduced-motion: no-preference) {
  #notif-btn.ringing > svg,
  .bottom-nav [data-open-notifs].ringing > svg {
    animation: sd-bell-ring .9s ease-in-out;
    transform-origin: 50% 3px;
  }
}

/* ================= account area — editor-style shell ====================== */
.acct-grid {
  display: grid; grid-template-columns: 260px minmax(0, 1fr);
  align-items: stretch; min-height: calc(100vh - 64px);
}
/* the account shell fills the viewport itself — drop the page bottom padding
   that other pages keep for the mobile bottom nav */
@media (min-width: 900px) {
  body.has-bottom-nav:has(.acct-grid) { padding-bottom: 0; }
}
.acct-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .72) 34%, rgba(255, 255, 255, .58) 100%);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid rgba(232, 232, 236, .8);
  padding: 1.1rem .9rem .9rem;
  display: flex; flex-direction: column; gap: 4px;
  /* pinned: only the content column scrolls */
  position: sticky; top: 64px; height: calc(100vh - 64px);
  overflow-y: auto; overscroll-behavior: contain;
}
.acct-nav > a {
  display: flex; align-items: center; gap: .7rem;
  min-height: 46px; padding: 0 .8rem; border-radius: 13px;
  border: 1.5px solid transparent;
  font-size: var(--fs-sm); font-weight: 600; color: #4a4a54;
  text-decoration: none; position: relative;
  transition: all var(--t-fast) var(--ease);
}
.acct-nav > a:hover { background: rgba(237, 95, 120, .07); color: var(--ink); transform: translateX(2px); }
.acct-nav > a.active {
  background: #fff; color: var(--ink); font-weight: 700;
  border-color: var(--sec-c, var(--rose));
  box-shadow: 0 6px 18px rgba(26, 26, 26, .1);
}
.acct-nav > a.active::before {
  content: ""; position: absolute; left: -0.9rem; top: 9px; bottom: 9px; width: 3.5px;
  border-radius: 0 3px 3px 0; background: var(--sec-c, var(--rose));
}
.acct-nav > a .mi {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; flex: none;
  transition: transform var(--t-fast);
}
.acct-nav > a:hover .mi { transform: scale(1.06); }
/* chip colours cycle the pink, mint, lilac, yellow family order */
.acct-nav a[data-key="events"]        { --sec-c: var(--rose); }
.acct-nav a[data-key="events"] .mi        { background: var(--rose-soft);  color: var(--rose); }
.acct-nav a[data-key="notifications"] { --sec-c: var(--teal); }
.acct-nav a[data-key="notifications"] .mi { background: var(--teal-soft);  color: var(--teal); }
.acct-nav a[data-key="settings"]      { --sec-c: #6b6b76; }
.acct-nav a[data-key="settings"] .mi      { background: #ececf1; color: #55555f; }
.acct-nav a[data-key="report"]        { --sec-c: #cf9a1c; }
.acct-nav a[data-key="report"] .mi        { background: var(--yellow-soft); color: #8a6410; }
.acct-nav a[data-key="support"]       { --sec-c: var(--coral); }
.acct-nav a[data-key="support"] .mi       { background: var(--coral-soft); color: var(--coral); }
.acct-nav a[data-key="knowledgebase"] { --sec-c: #5b6fbf; }
.acct-nav a[data-key="knowledgebase"] .mi { background: var(--lav-soft, #edeafb); color: #5b6fbf; }
.acct-nav a[data-key="orders"]        { --sec-c: var(--success); }
.acct-nav a[data-key="orders"] .mi        { background: var(--green-soft); color: var(--success); }
.acct-foot { margin-top: auto; padding: 1rem .2rem 0; border-top: 1px solid var(--line); }
.acct-foot .af-btns { display: flex; gap: .6rem; margin-bottom: .8rem; }
.acct-foot .af-btns > * { flex: 1; justify-content: center; }
.acct-foot .acct-legal { display: flex; flex-wrap: wrap; gap: .15rem .7rem; justify-content: center; margin-bottom: .45rem; }
.acct-foot .acct-legal a { font-size: 10px; color: var(--faint); text-decoration: none; }
.acct-foot .acct-legal a:hover { color: var(--muted); text-decoration: underline; }
.acct-foot .acct-copy { font-size: 10px; color: var(--faint); text-align: center; }
.acct-main { min-width: 0; padding: clamp(1.3rem, 3vw, 2.4rem) clamp(1.1rem, 3.5vw, 2.8rem) 3rem; }
.acct-main > h1 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 800; margin: 0 0 1.2rem; }
.acct-sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 1.6rem; }

/* page head with a back affordance. The pill sits on its own line, so however
   long the title runs it can never crowd, wrap around or squash the button. */
.page-head { margin-bottom: 1.6rem; }
.page-head h1 {
  font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 800;
  margin: 0 0 .4rem; overflow-wrap: anywhere;   /* long subjects wrap, never overflow */
}
.page-head .acct-sub { margin-bottom: 0; }
.page-back {
  display: inline-flex; align-items: center; gap: .5rem; max-width: 100%;
  margin: 0 0 .9rem; padding: .3rem .95rem .3rem .32rem;
  border-radius: 999px; text-decoration: none;
  background: rgba(255, 255, 255, .72); border: 1px solid var(--line);
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.page-back .pb-ic {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--rose-soft); color: var(--rose);
  transition: transform var(--t-med) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.page-back .pb-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-back:hover { color: var(--ink); border-color: var(--rose); box-shadow: 0 4px 14px rgba(237, 95, 120, .14); }
.page-back:hover .pb-ic { background: var(--rose); color: #fff; transform: translateX(-3px); }
.page-back:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { .page-back:hover .pb-ic { transform: none; } }
/* flat sections separated by rules, not floating boxes */
/* ---------- Knowledgebase ---------- */
.acct-lede {
  color: var(--muted); font-size: var(--fs-sm, .9375rem); line-height: 1.6;
  max-width: 62ch; margin: -.4rem 0 1.4rem;
}
.kb-toolbar { margin: 0 0 1.5rem; }
.kb-searchwrap { position: relative; max-width: 520px; }
.kb-searchwrap input {
  width: 100%; min-height: 48px; padding: 0 2.4rem 0 2.5rem;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface, #fff); color: var(--ink);
  font: inherit; font-size: var(--fs-sm, .9375rem);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.kb-searchwrap input:focus {
  outline: none; border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(237, 95, 120, .13);
}
.kb-searchwrap input::-webkit-search-cancel-button { display: none; }
.kb-searchic {
  position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
#kb-clear {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); background: var(--surface-2); border: 0; cursor: pointer;
}
#kb-clear:hover { color: var(--ink); }

.kb-count { font-size: var(--fs-xs); color: var(--muted); margin: .8rem 0 0; min-height: 1em; }

.kb-item {
  background: var(--surface, #fff); border: 1.5px solid var(--line);
  border-radius: var(--r-md); margin-bottom: .55rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.kb-item:hover { border-color: #dcdce4; }
.kb-item[open] { border-color: var(--rose); box-shadow: 0 4px 18px rgba(237, 95, 120, .08); }
.kb-item summary {
  display: flex; align-items: center; gap: .8rem;
  padding: .95rem 1.1rem; cursor: pointer; list-style: none;
  font-weight: 700; color: var(--ink); font-size: var(--fs-sm, .9375rem);
}
.kb-item summary::-webkit-details-marker { display: none; }
.kb-item summary:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: var(--r-md); }
.kb-q { flex: 1; }
.kb-caret { flex: none; color: var(--muted); transition: transform var(--t-fast); }
.kb-item[open] .kb-caret { transform: rotate(180deg); color: var(--rose); }
.kb-body { padding: 0 1.1rem 1.1rem; font-size: var(--fs-sm, .9375rem); line-height: 1.65; color: #43434e; }
.kb-body > :first-child { margin-top: 0; }
.kb-body p { margin: .7rem 0; }
.kb-body b { color: var(--ink); }
.kb-body a { color: var(--rose); font-weight: 600; }
.kb-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em;
  background: var(--surface-2); padding: .1rem .35rem; border-radius: 5px; color: var(--ink);
}
.kb-ext { margin-left: .22rem; vertical-align: -1px; opacity: .75; }

.kb-steps { margin: .7rem 0; padding: 0; list-style: none; counter-reset: kbs; }
.kb-steps > li {
  counter-increment: kbs; position: relative;
  padding: 0 0 .75rem 2.1rem; margin: 0;
}
.kb-steps > li::before {
  content: counter(kbs); position: absolute; left: 0; top: -1px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--rose); color: #fff;
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.kb-steps > li:last-child { padding-bottom: 0; }

.kb-list { margin: .7rem 0; padding-left: 1.15rem; }
.kb-list li { margin-bottom: .45rem; }
.kb-code { margin: .6rem 0; padding: 0; list-style: none; }
.kb-code li {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84em;
  background: var(--surface-2); border-radius: 8px; padding: .4rem .6rem;
  margin-bottom: .3rem; word-break: break-all; color: #43434e;
}
.kb-note {
  background: rgba(255, 209, 89, .16); border-left: 3px solid var(--yellow);
  border-radius: 0 10px 10px 0; padding: .65rem .85rem; margin: .9rem 0 !important;
  font-size: var(--fs-xs); line-height: 1.6;
}

.kb-flash { animation: kb-flash 1.2s ease; }
@keyframes kb-flash {
  0%, 100% { box-shadow: 0 4px 18px rgba(237, 95, 120, .08); }
  25%      { box-shadow: 0 0 0 4px rgba(237, 95, 120, .3); }
}

.kb-empty {
  text-align: center; padding: 2.4rem 1.2rem;
  border: 1.5px dashed var(--line); border-radius: var(--r-lg); margin-top: 1rem;
}
.kb-empty-t { font-weight: 800; font-size: var(--fs-md); margin: 0 0 .3rem; }
.kb-empty p { color: var(--muted); font-size: var(--fs-sm, .9375rem); margin: 0 0 1rem; }

.kb-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-top: 2rem; padding-top: 1.3rem; border-top: 1px solid var(--line);
}
.kb-foot p { margin: 0; font-size: var(--fs-sm, .9375rem); color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .kb-caret, .kb-flash { transition: none; animation: none; }
}

.acct-card { padding: 0 0 1.7rem; margin: 0 0 1.7rem; border-bottom: 1px solid var(--line); }
.acct-card:last-of-type { border-bottom: 0; }
.acct-card h3 { font-size: var(--fs-md); font-weight: 800; margin-bottom: .9rem; }
@media (max-width: 860px) {
  .acct-grid { grid-template-columns: 1fr; }
  /* the account drawer (avatar / Profile tab) is the navigation on phones */
  .acct-nav { display: none; }
}

/* my events cards: bordered white cards, like the editor event cards */
.ae-card {
  position: relative;
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 232, 236, .85); border-radius: 14px;
  padding: 1.1rem 1.2rem; margin-bottom: 1rem;
  display: flex; flex-direction: column; gap: .75rem;
  transition: box-shadow var(--t-fast);
}
.ae-card:hover { box-shadow: 0 6px 20px rgba(26, 26, 26, .07); }
/* the card's backdrop-filter makes it a stacking context, so an open menu that
   overflows the card would be painted over by the next card — lift the card */
.ae-card.menu-open { z-index: 20; }
/* the dots sit top-right of the card, so the title row never pushes them
   onto a line of their own (which threw the menu off-screen on phones) */
.ae-top { display: flex; justify-content: space-between; gap: .8rem; align-items: center; flex-wrap: wrap; padding-right: 48px; }
.ae-title { font-weight: 800; font-size: var(--fs-md); }
.ae-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; color: var(--muted); font-size: var(--fs-xs); }
.ae-meta b { color: var(--ink); font-weight: 700; }
.ae-stats { display: flex; gap: .5rem; flex-wrap: wrap; }
.ae-stat {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .8rem; font-size: var(--fs-xs); font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, .6);
}
/* three-colour stat icons: views rose, RSVPs mint, greetings lilac */
.ae-stat-views svg { color: var(--rose); }
.ae-stat-rsvp svg { color: var(--teal); }
.ae-stat-greet svg { color: #5b6fbf; }
/* actions live behind a three-dots menu, same as the dashboard event cards */
.ae-actions { position: absolute; top: 1.05rem; right: 1.1rem; z-index: 9; display: flex; }
.ae-dots {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .88); color: #55555e;
  box-shadow: 0 4px 12px rgba(26, 26, 26, .12);
  display: grid; place-items: center;
  transition: color .15s var(--ease), transform .15s var(--ease);
}
.ae-dots:hover { color: var(--ink); transform: scale(1.06); }
.ae-menu {
  position: absolute; top: 46px; right: 0; z-index: 8; width: 226px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid #ececea; border-radius: 16px; padding: .55rem;
  box-shadow: 0 18px 44px rgba(26, 26, 26, .18);
  display: none; transform-origin: top right;
}
.ae-menu.open { display: block; animation: aeMenuIn .22s var(--ease); }
@keyframes aeMenuIn { from { opacity: 0; transform: scale(.88) translateY(-6px); } }
.ae-menu-item {
  width: 100%; display: flex; align-items: center; gap: .55rem;
  background: none; border: 0; border-radius: 12px; padding: .6rem .75rem;
  color: var(--ink); font-weight: 700; font-size: .84rem; cursor: pointer;
  text-align: left; text-decoration: none;
  transition: background .15s var(--ease);
}
.ae-menu-item:hover { background: var(--surface-2); color: var(--ink); }
.ae-menu-del { color: #d23b52; margin-top: .2rem; }
.ae-menu-del:hover { background: #fdecec; color: #d23b52; }

/* settings: buried account-lifecycle links */
.acct-danger-zone { margin-top: 2.4rem; text-align: center; }
.acct-danger-zone summary {
  list-style: none; cursor: pointer; display: inline-block;
  color: var(--faint); font-size: 10.5px; font-weight: 500;
}
.acct-danger-zone summary::-webkit-details-marker { display: none; }
.acct-danger-zone summary:hover { color: var(--muted); text-decoration: underline; }
.acct-danger-zone .adz-body { margin-top: .7rem; font-size: var(--fs-xs); color: var(--faint); }
.acct-danger-zone .adz-body button {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--faint); font-size: 11px; text-decoration: underline;
}
.acct-danger-zone .adz-body button:hover { color: var(--danger); }

/* reason checklists inside the deactivate / delete modals */
.reason-list { display: grid; gap: .45rem; margin: .8rem 0 1rem; }
.reason-list label {
  display: flex; align-items: center; gap: .6rem;
  border: 1px solid var(--line); border-radius: 10px;
  padding: .6rem .8rem; cursor: pointer; font-size: var(--fs-sm);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.reason-list label:hover { border-color: var(--rose); background: rgba(237, 95, 120, .04); }
.reason-list input { accent-color: var(--rose); width: 16px; height: 16px; flex: none; }

/* profile drawer: full-height panel sliding in from the right */
.prd-backdrop {
  position: fixed; inset: 0; z-index: 1198;
  background: rgba(20, 20, 20, .38);
  opacity: 0; pointer-events: none; transition: opacity .28s var(--ease);
}
.prd-backdrop.open { opacity: 1; pointer-events: auto; }
.prd {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1199;
  width: min(340px, 94vw); height: 100dvh;
  background: #fff; box-shadow: -12px 0 40px rgba(26, 26, 26, .18);
  transform: translateX(105%); transition: transform .3s var(--ease);
  display: flex; flex-direction: column;
}
.prd.open { transform: none; }

/* desktop: a floating glassy panel — inset from the edges, rounded all round */
@media (min-width: 900px) {
  .prd {
    top: 14px; right: 14px; bottom: 14px; height: auto;
    border-radius: 24px; overflow: hidden;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .85);
    box-shadow: 0 24px 60px rgba(26, 26, 26, .22);
    transform: translateX(calc(100% + 20px));
  }
  .prd.open { transform: none; }
  .prd .prd-head { border-bottom: 1px solid rgba(26, 26, 26, .14); }
  .prd .prd-foot { border-top: 1px solid rgba(26, 26, 26, .14); }
  .prd-nav a:hover, .prd-nav button:hover { background: rgba(255, 255, 255, .7); }
  /* solid colour icon chips with white glyphs — same as the phone sheet */
  .prd-nav a:nth-child(1) .mi { background: var(--rose) !important; color: #fff !important; }
  .prd-nav a:nth-child(2) .mi { background: var(--teal) !important; color: #fff !important; }
  .prd-nav a:nth-child(3) .mi { background: #5b6fbf !important; color: #fff !important; }
  .prd-nav a:nth-child(4) .mi { background: #f58b4e !important; color: #fff !important; }
  .prd-nav a:nth-child(5) .mi { background: #e0a232 !important; color: #fff !important; }
  .prd-nav a:nth-child(6) .mi { background: var(--success, #2fbf71) !important; color: #fff !important; }
  .prd-nav a:nth-child(7) .mi { background: #55555f !important; color: #fff !important; }
  .prd-nav button .mi { background: #d23b52 !important; color: #fff !important; }
  /* close button hugs the top-right corner */
  .prd-close { position: absolute; top: 12px; right: 12px; margin-left: 0; }
  .prd .prd-head { padding-right: 3rem; }
}

/* phones: the drawer becomes a glassy bottom sheet that slides UP,
   and the floating bottom nav stays visible on top of it */
@media (max-width: 899px) {
  .prd-backdrop { z-index: 180; }
  .prd {
    top: auto; left: 0; right: 0; bottom: 0; z-index: 190;
    width: auto; height: auto; max-height: 82dvh;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 0; border-radius: 26px 26px 0 0;
    box-shadow: 0 -18px 50px rgba(26, 26, 26, .22);
    transform: translateY(105%); transition: transform .35s var(--ease);
  }
  .prd.open { transform: translateY(0); }
  /* little grabber, like a native sheet — drag it down to close */
  .prd::before {
    content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px; border-radius: 999px; background: rgba(26, 26, 26, .22);
  }
  .prd .prd-head { padding-top: 1.4rem; border-bottom: 1px solid rgba(26, 26, 26, .14); touch-action: none; cursor: grab; }
  .prd-nav a:hover { background: rgba(255, 255, 255, .65); }
  /* menu icons: solid colour chips with white glyphs */
  .prd-nav a:nth-child(1) .mi { background: var(--rose) !important; color: #fff !important; }
  .prd-nav a:nth-child(2) .mi { background: var(--teal) !important; color: #fff !important; }
  .prd-nav a:nth-child(3) .mi { background: #5b6fbf !important; color: #fff !important; }
  .prd-nav a:nth-child(4) .mi { background: #f58b4e !important; color: #fff !important; }
  .prd-nav a:nth-child(5) .mi { background: #e0a232 !important; color: #fff !important; }
  .prd-nav a:nth-child(6) .mi { background: var(--success, #2fbf71) !important; color: #fff !important; }
  .prd-nav a:nth-child(7) .mi { background: #55555f !important; color: #fff !important; }
  .prd-nav button .mi { background: #d23b52 !important; color: #fff !important; }
  /* notifications sheet list: scrolls between head and the view-all link */
  .prd .prd-nlist { flex: 1; overflow-y: auto; padding: .5rem .6rem; min-height: 130px; max-height: none; }
  .prd-viewall {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    width: 100%; padding: .35rem 0;
    font-size: .85rem; font-weight: 700; color: var(--muted); text-decoration: none;
    transition: color .15s var(--ease);
  }
  .prd-viewall:active, .prd-viewall:hover { color: var(--rose); }
  /* the sheet closes by drag, backdrop tap or the profile button — no × needed */
  .prd-close { display: none !important; }
  /* keep the last items clear of the floating nav pill */
  .prd .prd-foot { padding-bottom: calc(86px + var(--safe-b)); border-top: 1px solid rgba(26, 26, 26, .12); }
}
/* ===== create-invitation bottom sheet (phones only) ===== */
.csheet { display: none; }
@media (max-width: 899px) {
  .csheet {
    display: flex; flex-direction: column; overflow: hidden;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 190;
    max-height: 88dvh;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -18px 50px rgba(26, 26, 26, .22);
    transform: translateY(105%); transition: transform .35s var(--ease);
  }
  .csheet.open { transform: translateY(0); }
  .csheet::before {
    content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px; border-radius: 999px; background: rgba(26, 26, 26, .22);
  }
  .csheet .cs-head {
    position: relative; flex: none; text-align: center;
    padding: 1.7rem 1rem .9rem; touch-action: none; cursor: grab;
    border-bottom: 1px solid rgba(26, 26, 26, .12);
  }
  .csheet .cs-head h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 .2rem; }
  .csheet .cs-head p { color: var(--muted); font-size: var(--fs-xs); margin: 0; }
  .cs-grid {
    overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr);
    gap: .5rem; align-content: start;
    padding: .9rem .9rem calc(86px + var(--safe-b));
  }
  .cs-card {
    position: relative; display: flex; flex-direction: column; align-items: center;
    justify-content: flex-start; gap: .45rem;
    min-height: 112px; padding: 1.7rem .25rem .8rem;
    border-radius: 16px; border: 1px solid #ececea;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 3px 14px rgba(26, 26, 26, .06);
    font-weight: 700; font-size: 11px; line-height: 1.15; color: var(--ink); text-align: center;
  }
  .cs-card:active { transform: scale(.97); }
  .cs-card .ticon {
    width: 44px; height: 44px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    box-shadow: 0 8px 20px rgba(26, 26, 26, .16);
  }
  .cs-card.soon { color: var(--muted); }
  .cs-card.soon .ticon { opacity: .55; filter: saturate(.65); box-shadow: none; }
  .cs-card .soon-tag {
    position: absolute; top: 5px; right: 5px;
    font-size: 8.5px; font-weight: 800; letter-spacing: .05em;
    background: var(--yellow); color: var(--ink); padding: 2px 7px; border-radius: 999px;
  }
}

.prd-head {
  display: flex; align-items: center; gap: .8rem;
  padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--line);
}
.prd-head .avatar { width: 46px; height: 46px; font-size: 1.1rem; }
.prd-head b { display: block; }
.prd-head span.prd-email { color: var(--faint); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.prd-close { margin-left: auto; }
.prd-nav { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: 4px; }
.prd-nav a, .prd-nav button {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  min-height: 46px; padding: 0 .8rem; border-radius: 13px;
  font-size: var(--fs-sm); font-weight: 600; color: #4a4a54; text-decoration: none;
  background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left;
  transition: all var(--t-fast) var(--ease);
}
.prd-nav a:hover, .prd-nav button:hover { background: rgba(237, 95, 120, .07); color: var(--ink); transform: translateX(2px); }
.prd-nav .mi { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.prd-foot { border-top: 1px solid var(--line); padding: .9rem 1.1rem 1rem; }
.prd-foot .prd-btns { display: flex; gap: .6rem; margin-bottom: .7rem; }
.prd-foot .prd-btns > * { flex: 1; }
.prd-foot .prd-legal { display: flex; flex-wrap: wrap; gap: .15rem .7rem; justify-content: center; }
.prd-foot .prd-legal a { font-size: 10px; color: var(--faint); text-decoration: none; }
.prd-foot .prd-legal a:hover { color: var(--muted); text-decoration: underline; }

/* legal pages: deliberately small print */
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 2.2rem 1rem 3rem; }
.legal-wrap h1 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; margin-bottom: .25rem; }
.legal-wrap .legal-updated { color: var(--faint); font-size: var(--fs-xs); margin-bottom: 1.4rem; }
.legal-wrap h2 { font-size: var(--fs-md); font-weight: 800; margin: 1.3rem 0 .4rem; }
.legal-wrap p, .legal-wrap li { font-size: var(--fs-sm); line-height: 1.75; color: var(--muted); }
.legal-wrap ul { padding-left: 1.2rem; }

/* ===== cookie policy: a proper legal document — readable measure, clear
   heading hierarchy, disclosure tables that scroll inside their own box ===== */
.ck-doc { max-width: 860px; }
.ck-doc h1 { margin-bottom: .5rem; }
.ck-doc .legal-updated {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--faint); margin-bottom: 1.8rem;
  padding-bottom: 1.1rem; border-bottom: 1px solid var(--line);
}
.ck-doc .ck-ver {
  background: var(--rose-soft); color: var(--rose);
  font-weight: 800; font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
}
.ck-doc h2 {
  font-size: clamp(1.05rem, 1.9vw, 1.2rem); font-weight: 800; color: var(--ink);
  margin: 2.4rem 0 .7rem; line-height: 1.35;
}
.ck-doc h3 {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  font-size: .95rem; font-weight: 800; color: var(--ink);
  margin: 1.7rem 0 .5rem;
}
.ck-doc p, .ck-doc li { font-size: .875rem; line-height: 1.8; }
.ck-doc p { margin: 0 0 .85rem; }
.ck-doc ul { margin: 0 0 1rem; padding-left: 1.15rem; }
.ck-doc li { margin-bottom: .4rem; }
.ck-doc li::marker { color: var(--rose); }
.ck-doc b { color: var(--ink); font-weight: 700; }
.ck-doc a { color: var(--rose); font-weight: 600; }
.ck-doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; font-weight: 700; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 6px; white-space: nowrap;
}

/* summary panel up top */
.ck-tldr {
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 232, 236, .9); border-left: 3px solid var(--rose);
  border-radius: 14px; padding: 1.2rem 1.3rem .9rem; margin-bottom: 1.6rem;
}
.ck-tldr h2 { margin: 0 0 .6rem; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--rose); }
.ck-tldr ul { margin: 0; padding-left: 1.1rem; }
.ck-tldr li { margin-bottom: .45rem; }

/* emphasis callout for clauses the reader must not miss (liability, backups) */
.ck-tldr.ck-key { border-left-color: var(--coral, #f58b4e); }
.ck-tldr.ck-key h2 { color: #b4560f; }
.ck-tldr.ck-key p { margin-bottom: .5rem; }
.ck-tldr.ck-key p:last-child { margin-bottom: 0; }
.ck-clause { font-size: .875rem; line-height: 1.8; color: var(--muted); margin: 0 0 .7rem; }
.ck-clause b.ck-cn { color: var(--ink); font-weight: 800; margin-right: .35rem; }

/* category status badges */
.ck-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.ck-badge-on { background: var(--green-soft); color: var(--success); }
.ck-badge-none { background: var(--surface-2); color: var(--muted); }

/* disclosure tables — wide content scrolls in its own box, never the page */
.ck-tw {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: .5rem 0 1.3rem; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .6);
}
.ck-table { width: 100%; min-width: 520px; border-collapse: collapse; }
.ck-table th, .ck-table td {
  text-align: left; vertical-align: top;
  padding: .75rem .9rem; font-size: .8rem; line-height: 1.65;
  border-bottom: 1px solid var(--line);
}
.ck-table thead th {
  font-weight: 800; color: var(--ink); background: rgba(26, 26, 26, .035);
  font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.ck-table tbody td { color: var(--muted); }
.ck-table tbody tr:last-child td { border-bottom: 0; }
.ck-table td:first-child { color: var(--ink); font-weight: 600; }
.ck-table td:last-child { white-space: normal; }
.ck-tag {
  display: inline-block; margin-top: 4px;
  font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: var(--teal-soft); color: var(--teal); padding: 2px 7px; border-radius: 999px;
}
.ck-note { font-size: var(--fs-xs); color: var(--faint); font-style: italic; }

/* reset-choice call to action */
.ck-manage {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 1.05rem 1.2rem; margin: 1.1rem 0 .5rem;
}
.ck-manage b { display: block; font-size: var(--fs-sm); margin-bottom: .15rem; }
.ck-manage span { display: block; font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; max-width: 46ch; }
.ck-manage .btn { flex: none; }
.ck-manage .ck-current { margin-top: .5rem; color: var(--faint); }
.ck-manage .ck-current b { display: inline; color: var(--ink); font-size: var(--fs-xs); }

/* preferences popup: one row per category, tap the row to flip it */
.ck-modal-lead { font-size: var(--fs-xs); color: var(--muted); line-height: 1.7; margin: 0 0 1rem; }
.ck-pref {
  display: flex; align-items: center; gap: .8rem;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: .8rem .9rem; margin-bottom: .55rem; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.ck-pref:hover { border-color: var(--rose); box-shadow: 0 4px 14px rgba(237, 95, 120, .1); }
.ck-pref.is-locked { cursor: default; background: var(--surface-2); }
.ck-pref.is-locked:hover { border-color: var(--line); box-shadow: none; }
.ck-pref-txt { flex: 1; min-width: 0; }
.ck-pref-txt b { display: block; font-size: var(--fs-sm); font-weight: 800; color: var(--ink); }
.ck-pref-txt span { display: block; font-size: var(--fs-xs); color: var(--muted); line-height: 1.55; margin-top: 2px; }
.ck-req {
  flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  background: var(--green-soft); color: var(--success); padding: 3px 8px; border-radius: 999px;
}
.ck-modal-foot-note { font-size: 10.5px; color: var(--faint); line-height: 1.6; margin: .9rem 0 0; }
.ck-modal-foot .btn { flex: 1; justify-content: center; }
@media (max-width: 520px) {
  .ck-modal-foot { flex-wrap: wrap; }
  .ck-modal-foot .btn:last-child { flex-basis: 100%; }
}
@media (max-width: 600px) {
  .ck-doc h2 { margin-top: 1.9rem; }
  .ck-manage { flex-direction: column; align-items: stretch; }
  .ck-manage .btn { width: 100%; justify-content: center; }
}

/* notifications hosted in the account shell: full width, My-Events-style cards */
.acct-main .ntf-wrap { max-width: none; margin: 0; padding: 0; }
.acct-main .ntf-head .chip { display: none; }
.acct-main .ntf-item {
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 232, 236, .85); border-radius: 14px;
  box-shadow: none;
  transition: box-shadow var(--t-fast);
}
.acct-main .ntf-item:hover { box-shadow: 0 6px 20px rgba(26, 26, 26, .07); }
.acct-main .ntf-item.new { border-color: var(--teal); background: rgba(62, 148, 140, .05); }

/* legal entries in the sidebar use the same chip style */
.acct-nav > a[data-key="terms"]   { --sec-c: var(--rose); }
.acct-nav > a[data-key="terms"] .mi   { background: var(--rose-soft);  color: var(--rose); }
.acct-nav > a[data-key="privacy"] { --sec-c: var(--teal); }
.acct-nav > a[data-key="privacy"] .mi { background: var(--teal-soft);  color: var(--teal); }
.acct-nav > a[data-key="cookies"] { --sec-c: #cf9a1c; }
.acct-nav > a[data-key="cookies"] .mi { background: var(--yellow-soft); color: #8a6410; }
/* footer buttons: identical pills, borders on both */
.acct-foot .af-btns > * {
  flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700;
}
.acct-foot .af-btns .btn-outline { border: 1.5px solid var(--line); background: #fff; }
.acct-foot .af-btns .btn-outline:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
/* the account shell adds its own page heading — hide the included one and its
   spacing so every page starts at the same distance below the title */
.acct-main .ntf-head { display: none; }
.acct-main .legal-wrap { padding: 0; margin: 0; max-width: 760px; }
/* legal pages in the account shell: keep the same reading measure as the public
   copies and centre heading + body together in the wide panel */
.acct-main .acct-legal-doc { max-width: 860px; margin-inline: auto; }
/* the wrapper puts this h1 out of reach of `.acct-main > h1`, so restate that
   page-title style here — it must match every other account page */
.acct-main .acct-legal-doc > h1 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 800; margin: 0 0 1.2rem; }
.acct-main .acct-legal-doc .legal-wrap { max-width: none; }
.acct-main .legal-wrap h1 { display: none; }
.acct-main .legal-wrap .legal-updated { margin-bottom: 1rem; }

/* settings: identical gradient boxes (dashboard-tile recipe, tints cycling) */
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 360px)); gap: 1rem; justify-content: center; }
.set-card {
  display: flex; flex-direction: column; gap: .8rem;
  background:
    radial-gradient(120% 75% at 50% 0%, rgba(237, 95, 120, .05) 0%, transparent 60%),
    rgba(255, 255, 255, .78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid #ececea; border-radius: 12px;
  box-shadow: 0 3px 14px rgba(26, 26, 26, .06);
  padding: 1.3rem 1.4rem; min-height: 230px;
}
.set-card:nth-child(3n+2) {
  background:
    radial-gradient(120% 75% at 50% 0%, rgba(62, 148, 140, .06) 0%, transparent 60%),
    rgba(255, 255, 255, .78);
}
.set-card:nth-child(3n) {
  background:
    radial-gradient(120% 75% at 50% 0%, rgba(244, 196, 48, .08) 0%, transparent 60%),
    rgba(255, 255, 255, .78);
}
.set-card h3 { font-size: var(--fs-md); font-weight: 800; display: flex; align-items: center; flex-wrap: wrap; }
.set-card .set-sub { color: var(--muted); font-size: var(--fs-xs); margin-top: -.55rem; }
.tfa-stores { display: flex; gap: .5rem; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  padding: .42rem .95rem; font-size: var(--fs-xs); font-weight: 700;
  color: var(--ink); text-decoration: none;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.store-badge:hover { border-color: var(--ink); transform: translateY(-1px); }

/* leave chooser: two big option cards */
.reason-list-btn {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  padding: .9rem 1rem; margin-bottom: .6rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.reason-list-btn:hover { border-color: var(--ink); box-shadow: 0 4px 14px rgba(26, 26, 26, .08); }
.reason-list-btn b { display: block; margin-bottom: .15rem; }
.reason-list-btn span { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }

/* settings delete button: light border at rest; hover keeps the dark fill */
.btn-delete-acct { border-color: var(--line); }

/* report page: full-width form on the left, contact boxes on the right */
.report-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 2.8rem; align-items: start; }
.report-grid form .field input,
.report-grid form .field select,
.report-grid form .field textarea { width: 100%; }
.report-side { display: flex; flex-direction: column; gap: 1rem; }
.report-side .set-card { min-height: 0; }
.report-side .rs-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.report-side .rs-mail { font-weight: 700; font-size: var(--fs-sm); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.report-side .rs-mail:hover { color: var(--rose); text-decoration: underline; }
/* minmax(0,…) not a bare 1fr: a bare 1fr floors at min-content, and the
   nowrap ticket rows have a ~539px min-content that forced a page-wide
   horizontal scroll on phones */
@media (max-width: 980px) { .report-grid { grid-template-columns: minmax(0, 1fr); } }

/* admin extras */
.adm-big { font-size: 2.2rem; font-weight: 800; line-height: 1.1; }
.adm-search { display: flex; gap: .6rem; align-items: center; margin-bottom: 1.2rem; max-width: 640px; }

/* ================= admin shell (no app header — full-height sidebar) ====== */
.adm-grid { min-height: 100vh; transition: grid-template-columns .3s var(--ease); }
.adm-grid .acct-nav {
  top: 0; height: 100vh; padding-top: 0;
  width: 260px; min-width: 260px; /* keep shape while sliding, no squish */
  transition: transform .3s var(--ease), visibility 0s;
}
.adm-brand {
  display: flex; align-items: center; justify-content: space-between; gap: .55rem;
  padding: .45rem .2rem .45rem .3rem; margin-bottom: .2rem;
  border-bottom: 1px solid var(--line);
}
.adm-brand .adm-logo { height: 30px; width: auto; display: block; }
.adm-burger {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.adm-burger:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.adm-burger-float {
  position: fixed; top: 14px; left: 14px; z-index: 60; display: none;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(26, 26, 26, .14);
}
body.adm-nav-off .adm-grid { grid-template-columns: 0 minmax(0, 1fr); }
body.adm-nav-off .adm-grid .acct-nav {
  transform: translateX(-100%); visibility: hidden;
  transition: transform .3s var(--ease), visibility 0s .3s;
}
@keyframes adm-fade { from { opacity: 0; transform: scale(.9); } }
body.adm-nav-off .adm-burger-float { display: grid; animation: adm-fade .3s var(--ease); }
body.adm-nav-off .adm-grid .acct-main { padding-top: 4.4rem; }
/* phone bottom tab bar — app style, one colour per tab */
.adm-tabs {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 65;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: .28rem .3rem calc(.28rem + env(safe-area-inset-bottom));
}
.adm-tabs > * {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: .26rem .1rem; border: 0; background: none; border-radius: 10px;
  font-family: inherit; font-size: 9.5px; font-weight: 700; color: var(--muted);
  text-decoration: none; cursor: pointer;
}
.adm-tabs .ati {
  width: 30px; height: 22px; border-radius: 8px;
  display: grid; place-items: center; color: var(--at-c);
}
.adm-tabs > *.active { color: var(--at-deep, var(--at-c)); }
.adm-tabs > *.active .ati { background: var(--at-soft); }
.adm-tabs [data-tab="dashboard"] { --at-c: var(--rose);  --at-soft: var(--rose-soft); }
.adm-tabs [data-tab="events"]    { --at-c: var(--teal);  --at-soft: var(--teal-soft); }
.adm-tabs [data-tab="users"]     { --at-c: #5b6fbf; --at-soft: var(--lav-soft, #edeafb); }
.adm-tabs [data-tab="support"]   { --at-c: var(--coral); --at-soft: var(--coral-soft); }
.adm-tabs [data-tab="more"]      { --at-c: #cf9a1c; --at-soft: var(--yellow-soft); --at-deep: #8a6410; }

@media (max-width: 860px) {
  /* phones: bottom tabs replace the hamburger; "More" slides the sidebar over */
  .adm-grid .acct-nav {
    display: flex; position: fixed; left: 0; top: 0; height: 100dvh;
    width: 264px; min-width: 264px;
    z-index: 70; box-shadow: 0 0 60px rgba(26, 26, 26, .28);
  }
  /* the sidebar is fixed (out of flow) — the page keeps its single column */
  body.adm-nav-off .adm-grid { grid-template-columns: minmax(0, 1fr); }
  .adm-burger-float, body.adm-nav-off .adm-burger-float { display: none; animation: none; }
  body.adm-nav-off .adm-grid .acct-main { padding-top: clamp(1.3rem, 3vw, 2.4rem); }
  .adm-grid .acct-main { padding-bottom: 5.2rem; }
  .adm-tabs { display: flex; }
}

/* ================= admin dashboard — one colour per stat card ============ */
.adm-stat {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, #fff 30%, var(--as-soft) 130%);
  border: 1px solid rgba(232, 232, 236, .9); border-radius: 18px;
  padding: 1.15rem 1.2rem 1.25rem;
  display: flex; flex-direction: column; gap: .6rem;
  box-shadow: 0 6px 22px rgba(26, 26, 26, .05);
}
.adm-stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--as-c); }
.adm-stat .as-head { display: flex; align-items: center; gap: .65rem; }
.adm-stat .as-ic {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--as-soft); color: var(--as-deep, var(--as-c));
}
.adm-stat h3 { font-size: var(--fs-md); font-weight: 800; }
.adm-stat .set-sub { color: var(--muted); font-size: var(--fs-xs); margin: -.35rem 0 0; }
.adm-stat .adm-big { color: var(--as-deep, var(--as-c)); }
.as-pills { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: auto; }
.as-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--ap-soft, var(--as-soft)); color: var(--ap-c, var(--as-deep, var(--as-c)));
  border-radius: 999px; padding: .3rem .75rem;
  font-size: var(--fs-xs); font-weight: 600;
}
.as-pill b { font-weight: 800; }
.adm-stat[data-c="rose"]   { --as-c: var(--rose);  --as-soft: var(--rose-soft); }
.adm-stat[data-c="teal"]   { --as-c: var(--teal);  --as-soft: var(--teal-soft); }
.adm-stat[data-c="yellow"] { --as-c: #f0b428; --as-soft: var(--yellow-soft); --as-deep: #8a6410; }
.adm-stat[data-c="lilac"]  { --as-c: #5b6fbf; --as-soft: var(--lav-soft, #edeafb); }
.as-pill[data-c="rose"]   { --ap-soft: var(--rose-soft);   --ap-c: var(--rose); }
.as-pill[data-c="teal"]   { --ap-soft: var(--teal-soft);   --ap-c: var(--teal); }
.as-pill[data-c="green"]  { --ap-soft: var(--green-soft);  --ap-c: var(--success); }
.as-pill[data-c="yellow"] { --ap-soft: var(--yellow-soft); --ap-c: #8a6410; }
.as-pill[data-c="red"]    { --ap-soft: var(--danger-soft); --ap-c: var(--danger); }
.as-pill[data-c="coral"]  { --ap-soft: var(--coral-soft);  --ap-c: var(--coral); }
.as-pill[data-c="lilac"]  { --ap-soft: var(--lav-soft, #edeafb); --ap-c: #5b6fbf; }

/* ================= admin events table — one line per event =============== */
.adm-filters { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.adm-filters .field { margin: 0; }
.adm-filters .f-grow { flex: 1 1 230px; min-width: 210px; }
.adm-filters .f-date { width: 128px; }
.adm-filters .f-date input { width: 100%; cursor: pointer; }
.adm-link { color: var(--ink); font-weight: 700; text-decoration: none; }
.adm-link:hover { color: var(--rose); text-decoration: underline; }
.adm-link-muted { font-weight: 500; color: var(--muted); }
/* the whole cell is the click target, not just the glyphs — an invisible
   overlay stretches the link across its td without touching the row height */
.adm-tbl td.tt { position: relative; }
.adm-tbl td.tt .adm-link { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-tbl td.tt .adm-link::after { content: ""; position: absolute; inset: 0; }
.adm-tbl tbody tr[hidden] { display: none; }
/* suspended owner: the whole row reads red at a glance */
.adm-tbl tbody tr.row-suspended td { background: var(--danger-soft); }
.adm-tbl tbody tr.row-suspended:hover td { background: #f8dcdc; }
.adm-tbl tbody tr.row-suspended td, .adm-tbl tbody tr.row-suspended .adm-link { color: var(--danger); }
.adm-tbl tbody tr.row-suspended .adm-link:hover { color: var(--danger); }
.adm-tbl-wrap {
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 232, 236, .85); border-radius: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
}
.adm-tbl { width: 100%; min-width: 760px; border-collapse: collapse; font-size: var(--fs-xs); }
.adm-tbl th {
  text-align: left; font-weight: 800; color: var(--muted);
  padding: .65rem .7rem; border-bottom: 1.5px solid var(--line);
  white-space: nowrap; position: sticky; top: 0;
}
.adm-tbl td { padding: .5rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-tbl tbody tr:last-child td { border-bottom: 0; }
.adm-tbl tbody tr:hover td { background: rgba(237, 95, 120, .04); }
.adm-tbl .tt { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.adm-tbl .owner { font-weight: 500; color: var(--muted); max-width: 180px; }
.adm-tbl .nowrap { white-space: nowrap; }
.adm-tbl .num { text-align: center; font-weight: 700; white-space: nowrap; width: 44px; }
.adm-tbl .act { width: 44px; text-align: right; }
.adm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .4rem; vertical-align: 1px; }

/* kebab dropdown */
.adm-menu { position: relative; display: inline-block; }
.adm-menu-btn { color: var(--muted); width: 30px; height: 30px; min-height: 0; padding: 0; display: grid; place-items: center; }
.adm-menu-panel {
  display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 40;
  min-width: 168px; padding: .35rem;
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 14px 38px rgba(26, 26, 26, .16);
}
.adm-menu.open .adm-menu-panel { display: block; }
.adm-menu-panel > * {
  display: flex; align-items: center; gap: .55rem; width: 100%;
  padding: .5rem .65rem; border: 0; background: none; border-radius: 9px;
  font-family: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--ink);
  text-decoration: none; cursor: pointer; text-align: left;
}
.adm-menu-panel > *:hover { background: var(--rose-soft); color: var(--rose); }

/* account-details modal: compact one-line event rows */
.am-evs { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.am-ev {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .1rem; border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs);
}
.am-ev:last-child { border-bottom: 0; }
.am-ev .adm-dot { margin-right: 0; flex: none; }
.am-ev-t {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 700; color: var(--ink); text-decoration: none;
}
.am-ev-t:hover { color: var(--rose); text-decoration: underline; }
.am-ev-m { color: var(--faint); white-space: nowrap; }
.am-ev-n { min-width: 26px; text-align: center; font-weight: 700; color: var(--rose); }

/* ================= support tickets (user + admin) ======================== */
.tk-row {
  display: flex; align-items: center; gap: .8rem;
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 232, 236, .85); border-radius: 14px;
  padding: .85rem 1rem; margin-bottom: .6rem;
  text-decoration: none; color: var(--ink);
  transition: box-shadow var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.tk-row:hover { box-shadow: 0 8px 24px rgba(26, 26, 26, .09); transform: translateY(-1px); border-color: var(--rose); }
.tk-ic { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; }
.tk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-subject { font-weight: 800; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-meta { color: var(--faint); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-hint { display: inline-flex; align-items: center; gap: .3rem; color: var(--success); font-size: var(--fs-xs); font-weight: 700; }
.tk-arrow { color: var(--faint); flex: none; }
.tk-row:hover .tk-arrow { color: var(--rose); }

/* conversation thread */
.tk-thread { min-width: 0; }
.tk-msg { display: flex; margin-bottom: .8rem; }
.tk-msg.tk-mine { justify-content: flex-end; }
.tk-bubble {
  max-width: min(560px, 92%);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(232, 232, 236, .9); border-radius: 15px;
  padding: .8rem 1rem;
  box-shadow: 0 3px 12px rgba(26, 26, 26, .05);
}
.tk-mine .tk-bubble { background: var(--rose-soft); border-color: rgba(237, 95, 120, .25); border-bottom-right-radius: 5px; }
.tk-support .tk-bubble { border-bottom-left-radius: 5px; }
.tk-who { font-size: var(--fs-xs); font-weight: 800; margin-bottom: .3rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.tk-who span { color: var(--faint); font-weight: 500; }
.tk-bubble p { font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; margin: 0; }
.tk-closed-note {
  background: var(--yellow-soft); border: 1px solid rgba(207, 154, 28, .3); border-radius: 12px;
  color: #8a6410; font-size: var(--fs-xs); font-weight: 600;
  padding: .7rem 1rem; margin: 1rem 0;
}
.tk-closed-note a { color: var(--rose); font-weight: 700; }
.tk-reply { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* ticket details grid in the side card */
.tk-details {
  display: grid; grid-template-columns: auto 1fr; gap: .45rem .9rem;
  font-size: var(--fs-xs); align-items: center;
}
.tk-details > span { color: var(--muted); }
.tk-details > b { font-weight: 700; text-align: right; }

/* blinking "tickets waiting" dot (admin sidebar + phone tab bar) */
.adm-alert-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
  margin-left: auto; flex: none;
  animation: adm-blink 1.1s ease-in-out infinite;
}
.adm-alert-dot-tab { position: absolute; top: 3px; right: calc(50% - 16px); margin: 0; }
@keyframes adm-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .25; transform: scale(.75); }
}
