// Additional CSS for new features
.event-switcher {
  position: relative;
}
.event-switcher-trigger {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: 100%;
  text-align: start;
  transition: background 0.08s ease;
}
.event-switcher-trigger:hover { background: var(--surface-2); }
.event-switcher-trigger .meta { flex: 1; min-width: 0; }
.event-switcher-trigger .label {
  font-size: 10.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.event-switcher-trigger .name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.event-switcher-trigger .date { font-size: 11.5px; color: var(--text-3); }
.event-switcher-trigger .chev { color: var(--text-3); flex-shrink: 0; }

.event-menu {
  position: absolute;
  top: calc(100% + 4px);
  inset-inline-start: 0; inset-inline-end: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  z-index: 50;
  padding: 4px;
  max-height: 360px;
  overflow-y: auto;
}
.event-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.event-menu-item:hover { background: var(--surface-2); }
.event-menu-item.active { background: var(--accent-soft); }
.event-menu-item .body { flex: 1; min-width: 0; }
.event-menu-item .name { font-size: 13px; font-weight: 600; }
.event-menu-item .meta { font-size: 11px; color: var(--text-3); }
.event-menu-item .check { color: var(--accent); }
.event-menu-divider { height: 1px; background: var(--divider); margin: 4px 0; }
.event-menu-foot { padding: 6px; }

/* Phase pill in topbar */
.phase-tabs {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.phase-tab {
  border: none; background: transparent;
  padding: 4px 12px;
  font-size: 12px; font-weight: 500;
  color: var(--text-2);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.phase-tab.active {
  background: var(--text); color: #fff;
}
.phase-tab .icon { width: 12px; height: 12px; }

/* Dark topbar override: invert the phase pill so it reads on the gradient */
.topbar .phase-tabs {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}
.topbar .phase-tab { color: rgba(245, 245, 244, 0.70); }
.topbar .phase-tab:hover { color: #fff; }
.topbar .phase-tab.active {
  background: #fafaf9;
  color: oklch(27.4% 0.006 286.033);
}

/* Group cards */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.group-card-head {
  display: flex; align-items: flex-start; gap: 10px;
}
.group-color {
  width: 10px; height: 10px; border-radius: 3px; margin-top: 6px; flex-shrink: 0;
}
.group-card .name { font-size: 14px; font-weight: 600; }
.group-card .sub { font-size: 11.5px; color: var(--text-3); }
.group-card .meta-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-3);
}
.group-card .meta-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.group-card .actions {
  display: flex; gap: 6px; margin-top: 4px;
  border-top: 1px solid var(--divider);
  padding-top: 10px;
}

/* Check-in mode */
.checkin-search {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.checkin-search .icon { width: 18px; height: 18px; color: var(--text-3); }
.checkin-search input {
  flex: 1;
  border: none; outline: none;
  font-size: 18px;
  background: transparent;
  font-family: inherit;
  font-weight: 500;
}
.checkin-search input:placeholder-shown ~ .checkin-search-reset { display: none; }
.checkin-stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.checkin-stat {
  background: var(--surface);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.checkin-stat .label { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.checkin-stat .value {
  font-size: 22px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.checkin-stat .value .total { color: var(--text-3); font-size: 14px; font-weight: 500; }

.checkin-row {
  display: grid;
  grid-template-columns: 36px 1fr 100px 90px 130px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
}
.checkin-row:last-child { border-bottom: none; }
.checkin-row.in { background: var(--green-soft); }
.checkin-row .avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-3); color: var(--text-2);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
}
.checkin-row.in .avatar-sm { background: var(--green); color: #fff; }
.checkin-row .name { font-weight: 600; font-size: 14px; }
.checkin-row .phone { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); direction: ltr; text-align: end; }

.tickets-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}
.tickets-control button {
  width: 24px; height: 24px;
  border: none;
  background: var(--surface);
  border-radius: 50%;
  font-size: 14px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  display: grid; place-items: center;
}
.tickets-control button:hover { background: var(--text); color: #fff; }
.tickets-control button:disabled { opacity: 0.3; cursor: not-allowed; }
.tickets-control .num {
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 600;
  font-family: var(--font-mono);
}

/* RSVP badges */
.rsvp-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.rsvp-pill.yes { color: var(--green); background: var(--green-soft); border-color: var(--green-border); }
.rsvp-pill.no { color: var(--red); background: var(--red-soft); border-color: var(--red-border); }
.rsvp-pill.maybe { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-border); }
.rsvp-pill.pending { color: var(--text-3); }

/* SMS API card */
.api-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.api-logo {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
}
.api-card .body { flex: 1; }
.api-card .title { font-size: 13.5px; font-weight: 600; }
.api-card .desc { font-size: 12px; color: var(--text-3); }

/* Post-event report */
.report-hero {
  background: linear-gradient(135deg, #1a1a17 0%, #2a2a26 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 28px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}
.report-hero h2 {
  font-size: 24px; margin: 0 0 4px; font-weight: 600; letter-spacing: -0.02em;
}
.report-hero .sub { font-size: 13.5px; opacity: 0.7; }
.report-hero .big-num {
  font-size: 56px; font-weight: 600; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.report-hero .big-num .total { font-size: 22px; opacity: 0.5; font-weight: 500; }
.report-hero .big-label { font-size: 12px; opacity: 0.6; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.report-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.report-stat .label { font-size: 11.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.report-stat .value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.report-stat .delta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.attendance-bar {
  display: flex;
  height: 32px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 8px 0;
}
.attendance-seg { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #fff; min-width: 30px; }
.attendance-seg.attended { background: var(--green); }
.attendance-seg.no-show { background: #d97706; color: #fff; }
.attendance-seg.not-registered { background: var(--text-4); }

/* === Thank-you flow === */
.audience-card {
  text-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.audience-card:hover { border-color: var(--text-3); background: var(--surface-2); }
.audience-card[data-active="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-ring, rgba(99,102,241,0.12));
}
.audience-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.audience-card-radio {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--text-4);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.audience-card-radio.active { border-color: var(--accent); }
.audience-card-radio-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.audience-card-count {
  margin-inline-start: auto;
  font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.audience-card-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.audience-card-desc { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.15s ease-out;
}
/* The browser default [hidden] { display: none } is overridden by the
   author-CSS display:flex above. Restore it so the modal actually hides. */
.modal-overlay[hidden] { display: none !important; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}
.modal.modal-lg { width: min(580px, calc(100vw - 32px)); }

/* Grouped fields inside a modal — soft card per group for clear structure. */
.modal-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 16px;
}
.modal-section-title {
  font-size: 11.5px; font-weight: 700;
  color: var(--text-3);
  margin: 0 0 14px;
  letter-spacing: 0.04em;
}

/* Modal header with title + subtitle (e.g. event name) on one block, no big icon circle. */
.modal-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.modal-header .modal-icon { margin-bottom: 0; width: 36px; height: 36px; }
.modal-header h3 { margin: 0; line-height: 1.2; }
.modal-header .modal-sub {
  font-size: 12.5px; color: var(--text-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Toggle row: switch on one side, label + description stack on the other. */
.modal-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.modal-toggle-row .col-flex { flex: 1; min-width: 0; }
.modal-toggle-row .row-title { font-size: 13.5px; font-weight: 500; color: var(--text); }

/* Readonly slug display — code-style card with a clickable full URL. */
.modal-slug-display {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  direction: ltr;
}
.modal-slug-display a {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
  flex: 1;
  min-width: 0;
}
.modal-slug-display a:hover { color: var(--accent); text-decoration: underline; }
.modal-slug-display a .icon { flex-shrink: 0; color: var(--text-3); }
.modal-slug-display a:hover .icon { color: var(--accent); }

/* Segmented control — clean radio button group for short option sets
   (status / phase). Inputs are visually hidden; labels are the click
   target and reflect the :checked state via adjacent-sibling selector. */
.seg-control {
  display: inline-flex; flex-wrap: wrap;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  /* Don't get stretched by parent column-flex (.auth-field) — size to content. */
  align-self: flex-start;
}
.seg-control input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
  width: 0; height: 0;
}
.seg-control label {
  font-size: 12.5px; font-weight: 500;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-2);
  white-space: nowrap;
  user-select: none;
  transition: background 0.1s, color 0.1s;
  display: inline-flex; align-items: center; justify-content: center;
}
.seg-control label:hover { color: var(--text); background: var(--surface-2); }
.seg-control input[type="radio"]:checked + label {
  background: var(--text);
  color: #fff;
}
.seg-control input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Fixed-width compact fields for short numeric/time values. */
.auth-field.field-time { width: 92px; flex: none; }
.auth-field.field-quota { width: 110px; flex: none; }

/* Mobile: modal rows must wrap so fields don't overflow the modal width.
   Auth-fields with inline flex:N styles get min-width:100% so they stack;
   the fixed-width compact fields (.field-time, .field-quota) are excluded
   and flow naturally — two times fit on one line, quota wraps to the next. */
@media (max-width: 560px) {
  .modal-section .row-flex { flex-wrap: wrap; }
  .modal-section .row-flex > .auth-field:not(.field-time):not(.field-quota) {
    min-width: 100%;
  }
  .modal { padding: 18px; }
  .modal-section { padding: 12px 12px 14px; }
}

/* Plain 24h time input (replaces native type=time, which respects OS locale). */
input.time-input, input.date-input {
  direction: ltr;
  text-align: start;
  font-variant-numeric: tabular-nums;
}

.form-builder-empty {
  padding: 14px 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

/* Singleton modals opened from inside another modal (form-field picker,
   HTML export) must paint above the per-event edit modal that launched them.
   Same z-index loses because they appear earlier in DOM. */
#form-builder-picker-modal,
#form-builder-export-modal { z-index: 10000; }

/* === Event-creation wizard ============================================== */
/* The wizard is one form spread across five .wiz-step sections inside a
   modal-lg. JS toggles `is-active` + `hidden` per step and updates the
   stepper indicator. */
.modal.wiz { width: min(680px, calc(100vw - 32px)); }

.wiz-stepper {
  margin: -4px 0 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.wiz-stepper-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.wiz-stepper-fill {
  height: 100%;
  width: 20%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.wiz-stepper-dots {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.wiz-dot {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  color: var(--text-3);
  min-width: 0;
}
.wiz-dot > span {
  flex: 0 0 18px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 600;
  color: var(--text-3);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.wiz-dot > em {
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wiz-dot.is-active > span { background: var(--accent); color: #fff; border-color: var(--accent); }
.wiz-dot.is-active { color: var(--text); font-weight: 500; }
.wiz-dot.is-done > span { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.wiz-step { display: none; flex-direction: column; gap: 14px; }
.wiz-step.is-active { display: flex; }
.wiz-step-lede {
  font-size: 13px; color: var(--text-2);
  margin: 0 0 4px;
  line-height: 1.6;
}

/* Step 1: preset picker cards */
.wiz-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.wiz-preset {
  position: relative;
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 16px 14px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.06s;
}
.wiz-preset:hover { border-color: var(--text-3); }
.wiz-preset > input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;
}
.wiz-preset:has(input:checked),
.wiz-preset.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.wiz-preset-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.wiz-preset:has(input:checked) .wiz-preset-icon,
.wiz-preset.is-selected .wiz-preset-icon {
  background: var(--accent);
  color: #fff;
}
.wiz-preset-title {
  font-size: 14px; font-weight: 600; color: var(--text);
}
.wiz-preset-desc {
  font-size: 12.5px; color: var(--text-2);
  line-height: 1.5;
}
.wiz-preset-points {
  list-style: none; margin: 4px 0 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-2);
}
.wiz-preset-points li {
  display: flex; align-items: center; gap: 6px;
  line-height: 1.4;
}
.wiz-preset-points li.muted {
  color: var(--text-3);
  font-size: 11.5px;
  font-style: italic;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

/* Step 3: registration summary + customize disclosure */
.wiz-reg-points {
  list-style: none; margin: 0 0 12px; padding: 0;
  display: flex; flex-direction: column;
  gap: 8px;
}
.wiz-reg-points li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.wiz-reg-icon {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.wiz-customize-btn {
  margin-top: 6px;
  align-self: flex-start;
}

/* Step 4: tickets-coming-soon teaser */
.wiz-tickets-teaser {
  display: flex; flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.wiz-tickets-teaser-head {
  display: flex; align-items: flex-start; gap: 12px;
}
.wiz-tickets-teaser-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wiz-tickets-teaser-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 2px;
}
.wiz-tickets-teaser-desc {
  font-size: 12.5px; color: var(--text-2);
  line-height: 1.5;
}
.wiz-tickets-mock {
  display: flex; flex-direction: column;
  gap: 6px;
}
.wiz-tickets-mock-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text);
}
.wiz-tickets-mock-row.dim { color: var(--text-2); }
.wiz-tickets-mock-row.sold { opacity: 0.7; }
.wiz-tickets-mock-name { line-height: 1.5; }
.wiz-tickets-mock-name .muted { color: var(--text-3); font-size: 11.5px; }
.wiz-tickets-mock-stock {
  font-size: 12px; color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wiz-tickets-teaser-foot {
  font-size: 12px; color: var(--text-3);
  line-height: 1.5;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}

/* Step 5: summary list */
.wiz-summary {
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 8px;
}
.wiz-summary > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.wiz-summary > div:last-child { border-bottom: 0; }
.wiz-summary dt {
  font-size: 11.5px; font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.02em;
  margin: 0;
}
.wiz-summary dd {
  font-size: 13px; color: var(--text);
  margin: 0;
  line-height: 1.5;
}

/* Footer actions: keep Cancel on one side and Back/Next on the other, while
   keeping the existing modal-actions spacing rules. */
.wiz-actions [data-wiz-action="cancel"] { margin-inline-end: auto; }

@media (max-width: 640px) {
  .wiz-preset-grid { grid-template-columns: 1fr; }
  .wiz-stepper-dots { gap: 2px; }
  .wiz-dot > em { display: none; }
  .wiz-summary > div { grid-template-columns: 1fr; gap: 2px; }
}

/* === Ticket-types builder =============================================== */
.tickets-builder-list {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.tickets-row {
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.tickets-row-head {
  display: flex; align-items: center; gap: 8px;
}
.tickets-row-name { flex: 1; min-width: 0; }
.tickets-row-sold {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  padding: 2px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-variant-numeric: tabular-nums;
}
.tickets-row-desc { resize: vertical; min-height: 38px; }
.tickets-row-foot {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 8px;
}
.tickets-row-field {
  display: flex; flex-direction: column;
  gap: 4px;
}
.tickets-row-field > span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

/* === Public registration: ticket-type selector ========================== */
.ticket-selector {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.ticket-selector-row {
  display: flex; align-items: stretch; gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  transition: border-color 0.12s, background 0.12s;
}
.ticket-selector-row.is-sold-out {
  opacity: 0.55;
  cursor: not-allowed;
}
.ticket-selector-row.is-paid-blocked {
  border-style: dashed;
}
.ticket-selector-row.has-qty {
  border-color: rgba(37, 99, 235, 0.5);
  background: rgba(37, 99, 235, 0.06);
}
.ticket-selector-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  gap: 4px;
}
.ticket-selector-name {
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.ticket-selector-desc {
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.85;
}
.ticket-selector-meta {
  font-size: 12px;
  display: flex; gap: 10px;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}
.ticket-selector-stepper {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
  align-self: center;
}
.ticket-stepper-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.8);
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.ticket-stepper-btn:disabled {
  opacity: 0.4; cursor: not-allowed;
}
.ticket-stepper-val {
  min-width: 30px; text-align: center;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.ticket-selector-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: rgba(0,0,0,0.05);
  border-radius: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ticket-selector-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
}
@media (max-width: 480px) {
  .ticket-selector-row { flex-direction: column; }
  .ticket-selector-stepper { align-self: flex-end; }
}


.modal-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === Auth screens === */
.auth-shell {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface-2);
  padding: 32px 16px;
  position: relative;
}
.auth-bg-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
  background-size: 32px 32px;
  opacity: 0.5;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}
.auth-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(15,23,42,0.08);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-logo { display: block; text-align: center; margin: 0 0 18px; }
.auth-logo img { height: 40px; width: auto; display: inline-block; }
.auth-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 4px; }
.auth-sub { font-size: 13px; color: var(--text-3); margin: 0 0 22px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 12px; font-weight: 500; color: var(--text-2); display: flex; align-items: center; }
.auth-field input, .auth-field select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font: inherit; font-size: 13.5px;
  color: var(--text);
  transition: all 0.12s;
}
.auth-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-pw-wrap { position: relative; }
.auth-pw-wrap input { width: 100%; padding-inline-end: 36px; box-sizing: border-box; }
.auth-eye { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-3); padding: 4px; }
.auth-link { background: none; border: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 0; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }
.auth-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.auth-err { font-size: 12px; color: var(--red); display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: rgba(220,38,38,0.06); border-radius: 6px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-3); font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
.auth-foot { margin-top: 18px; font-size: 12px; color: var(--text-3); text-align: center; }
.auth-sent { text-align: center; padding: 16px 0; }
.auth-sent-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.auth-sent h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.auth-sent p { margin: 0; font-size: 12.5px; color: var(--text-3); }

/* === Admin === */
.role-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.role-purple { background: #f3e8ff; color: #6b21a8; }
.role-blue   { background: #dbeafe; color: #1e40af; }
.role-green  { background: #dcfce7; color: #166534; }
.role-gray   { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text, var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}
.row-menu {
  position: absolute;
  inset-inline-end: 0; top: calc(100% + 4px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.12);
  padding: 4px; z-index: 50;
  min-width: 200px; text-align: start;
}
.row-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 10px;
  background: none; border: none; cursor: pointer;
  font-size: 12.5px; color: var(--text); border-radius: 6px;
  text-align: start;
}
.row-menu button:hover { background: var(--surface-2); }
.row-menu button.danger { color: var(--red); }
.row-menu-divider { height: 1px; background: var(--divider); margin: 4px 0; }

