﻿@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f2f5fb;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #3344cc;
  --primary-600: #2938ad;
  --success: #1ea672;
  --error: #dc2626;
  --warning: #d97706;
  --border: #d9e0ef;
  --shadow-soft: 0 8px 18px rgba(15, 23, 42, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
}

a {
  color: inherit;
}

.page {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.register-page .page {
  padding-bottom: calc(var(--register-summary-offset, 340px) + env(safe-area-inset-bottom));
}

.content {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 250, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 460px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-switcher {
  max-width: 460px;
  margin: 0 auto;
  padding: 0 16px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.admin-link {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  background: #fff;
}

.admin-link.active {
  border-color: #8ea0ff;
  color: var(--primary);
  background: #eef2ff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  flex: 0 0 auto;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.55rem;
  line-height: 1.25;
}

h2 {
  font-size: 1.05rem;
}

p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.hero {
  display: grid;
  gap: 12px;
  background: linear-gradient(140deg, var(--hero-from, #2f3fbe) 0%, var(--hero-to, #162f88) 100%);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 12px 24px rgba(27, 44, 124, 0.3);
}

.hero p,
.hero .meta {
  color: rgba(255, 255, 255, 0.85);
}

.hero-packages {
  display: grid;
  gap: 10px;
}

.hero .accordion-btn {
  background: #ffffff;
  border-color: #d9e0ef;
  color: var(--text);
}

.hero .accordion-btn:hover {
  background: #f8fbff;
  border-color: #8ea0ff;
}

.hero .btn.btn-primary {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.28);
}

.hero .btn.btn-primary:hover {
  background: #020617;
  border-color: #020617;
}

.hero .card {
  color: var(--text);
}

.hero .card p {
  color: var(--muted);
}

.hero .card strong,
.hero .card h1,
.hero .card h2,
.hero .card h3 {
  color: var(--text);
}

.hero .card .inclusions li {
  color: #425067;
}

.meta {
  font-size: 0.84rem;
}

.btn {
  border: none;
  border-radius: var(--radius);
  min-height: 44px;
  padding: 11px 14px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 6px 14px rgba(51, 68, 204, 0.28);
}

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

.btn-secondary {
  color: var(--primary);
  background: #eef0ff;
  border: 1px solid #d3d9ff;
}

.btn-logout {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.auth-shell {
  min-height: calc(100dvh - 120px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 22px;
  gap: 14px;
}

.auth-title {
  font-size: 2rem;
  text-align: center;
  margin-top: 4px;
}

.auth-subtitle {
  text-align: center;
}

.auth-note {
  text-align: center;
}

.auth-continue-btn {
  background: #000;
  color: #fff;
}

.auth-continue-btn:hover {
  background: #111;
}

.auth-sep {
  position: relative;
  text-align: center;
  color: #94a3b8;
  font-size: 0.84rem;
}

.auth-sep::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.auth-sep span {
  position: relative;
  background: #fff;
  padding: 0 8px;
}

.auth-google-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.auth-google-g {
  font-weight: 800;
  color: #ea4335;
}

.auth-legal {
  text-align: center;
  font-size: 0.78rem;
}

.btn-danger {
  color: #fff;
  background: var(--error);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
  width: fit-content;
}

.badge-paid {
  background: #e7faef;
  color: #11774f;
}

.badge-pending {
  background: #fff5e8;
  color: var(--warning);
}

.badge-inactive {
  background: #eef1f6;
  color: #5c6b82;
}

.badge-error {
  background: #feecec;
  color: #991b1b;
}

.field {
  position: relative;
  display: grid;
  gap: 8px;
}

.field > span {
  position: absolute;
  top: 14px;
  left: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.01em;
  background: #fff;
  padding: 0 6px;
  transform-origin: left top;
  transition: transform 140ms ease, top 140ms ease, color 140ms ease;
  pointer-events: none;
  z-index: 1;
}

.input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
  color: var(--text);
  padding: 18px 12px 8px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #8ea0ff;
  box-shadow: 0 0 0 3px rgba(51, 68, 204, 0.12);
}

.field:focus-within > span,
.field.filled > span {
  top: -7px;
  transform: scale(0.86);
  color: var(--primary);
}

.field .input::placeholder,
.field textarea::placeholder {
  color: transparent;
}

.field:focus-within .input::placeholder,
.field:focus-within textarea::placeholder {
  color: #94a3b8;
}

.field.has-password-toggle .input[type='password'],
.field.has-password-toggle .input[type='text'] {
  padding-right: 44px;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.password-toggle-btn svg {
  width: 14px;
  height: 14px;
  stroke: #64748b;
}

.password-toggle-btn:hover {
  border-color: #8ea0ff;
  background: #f5f7ff;
}

.password-toggle-btn.active svg {
  stroke: #3344cc;
}

.field-static {
  position: static;
  gap: 6px;
}

.field-static > span {
  position: static;
  padding: 0;
  background: transparent;
  transform: none;
  top: auto;
  left: auto;
  color: #4b5d78;
  font-size: 0.78rem;
}

.field-static select,
.field-static .input {
  padding: 10px 12px;
}

.context-card {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #f9fbff;
}

.context-card .meta {
  font-size: 0.78rem;
}

.file-input {
  padding: 10px 12px;
  min-height: 46px;
  line-height: 1.2;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.group-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.group-option {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  min-height: 56px;
  padding: 10px 12px;
  text-align: left;
  color: #334155;
  cursor: pointer;
  display: grid;
  gap: 3px;
  align-content: center;
}

.group-option strong {
  font-size: 0.9rem;
}

.group-option span {
  font-size: 0.76rem;
  color: #64748b;
}

.group-option.active {
  border-color: #8ea0ff;
  background: #f0f3ff;
  box-shadow: 0 0 0 3px rgba(51, 68, 204, 0.12);
  color: #1e3a8a;
}

.radio-card,
.checkbox-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.radio-card.active,
.checkbox-card.active {
  border-color: #8ea0ff;
  box-shadow: 0 0 0 3px rgba(51, 68, 204, 0.12);
}

.checkbox-card.locked {
  border-color: #9bd3c4;
  background: #f1fbf8;
  cursor: default;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.option-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.lecture-option-row {
  align-items: center;
}

.lecture-option-action {
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: right;
}

.checkbox-card.locked .lecture-option-action {
  color: #0f766e;
  font-weight: 700;
}

.icon-actions {
  display: inline-flex;
  gap: 8px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  stroke: #334155;
}

.icon-btn:hover {
  border-color: #8ea0ff;
  background: #f5f7ff;
}

.icon-btn.danger svg {
  stroke: #b91c1c;
}

.icon-btn.danger:hover {
  border-color: #f3b7b7;
  background: #fff1f2;
}

.inline-edit {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.lecture-card,
.event-card {
  cursor: grab;
}

.lecture-card.dragging,
.event-card.dragging {
  opacity: 0.5;
}

.lecture-card.drop-target,
.event-card.drop-target {
  outline: 2px dashed #8ea0ff;
  outline-offset: 2px;
}

.drag-hint {
  font-size: 0.72rem;
  color: #64748b;
}

.accordion-btn {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.accordion-btn:hover {
  border-color: #8ea0ff;
  background: #f0f3ff;
}

.event-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-btn.soft {
  width: auto;
  min-width: 72px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 120ms ease;
}

.switch-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 120ms ease;
}

.switch input:checked + .switch-slider {
  background: #22c55e;
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.switch-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.fab-btn {
  position: fixed;
  right: 14px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(51, 68, 204, 0.34);
  cursor: pointer;
  z-index: 45;
}

.fab-btn:hover {
  background: var(--primary-600);
}

.events-page .page {
  padding-bottom: calc(146px + env(safe-area-inset-bottom));
}

.events-sticky-action {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(62px + env(safe-area-inset-bottom));
  z-index: 39;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(247, 248, 250, 0) 0%, rgba(247, 248, 250, 0.95) 35%, rgba(247, 248, 250, 1) 100%);
  border-top: 1px solid rgba(217, 224, 239, 0.7);
}

.events-sticky-inner {
  max-width: 460px;
  margin: 0 auto;
}

.events-create-btn {
  width: 100%;
  min-height: 46px;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
}

.option-row strong {
  font-size: 0.95rem;
}

.inclusions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
  color: #425067;
}

.inclusions li::before {
  content: '-';
  color: var(--primary);
  margin-right: 7px;
}

.stack {
  display: grid;
  gap: 10px;
}

.registration-split {
  display: grid;
  gap: 10px;
}

.register-columns {
  display: grid;
  gap: 10px;
}

.register-col-left,
.register-col-right {
  display: grid;
  gap: 10px;
  align-content: start;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  align-content: flex-start;
}

.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  min-height: 36px;
  width: auto;
  flex: 0 0 auto;
}

.chip.active {
  border-color: #8ea0ff;
  color: var(--primary);
  background: #f0f2ff;
}

.inline-error {
  color: var(--error);
  font-size: 0.82rem;
  font-weight: 600;
}

.inline-success {
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 700;
}

.global-toast-host {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: grid;
  gap: 8px;
  width: min(520px, calc(100vw - 24px));
  pointer-events: none;
}

.global-toast {
  border: 1px solid #cfd9eb;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  padding: 10px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.global-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.global-toast.hide {
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
}

.global-toast-success {
  border-color: #10b981;
  background: #dcfce7;
  color: #065f46;
}

.global-toast-error {
  border-color: #ef4444;
  background: #fee2e2;
  color: #991b1b;
}

.sticky-summary {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: linear-gradient(180deg, rgba(247, 248, 250, 0) 0%, rgba(247, 248, 250, 1) 40%);
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
}

.register-page.inapp-browser .sticky-summary {
  bottom: 56px;
}

.summary-card {
  max-width: 460px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.13);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  color: #374151;
}

.summary-total {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.summary-compact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.summary-compact-total {
  display: grid;
  gap: 2px;
}

.summary-compact-total span {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 700;
}

.summary-compact-total strong {
  font-size: 1.02rem;
  color: #0f172a;
}

.summary-toggle-btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.summary-details {
  display: none;
  gap: 7px;
}

.summary-details.open {
  display: grid;
}

.summary-note {
  font-size: 0.8rem;
  margin-top: -2px;
}

@media (max-width: 899px) {
  .sticky-summary {
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .summary-card {
    padding: 10px;
    gap: 8px;
  }
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  max-width: 460px;
  margin: 0 auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(64px, 1fr);
  overflow-x: auto;
}

.nav-tab {
  text-decoration: none;
  text-align: center;
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 700;
  padding: 10px 4px 8px;
  display: grid;
  gap: 4px;
}

.nav-tab.active {
  color: var(--primary);
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  margin: 0 auto;
}

.nav-tab.active .nav-dot {
  background: var(--primary);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.4);
  display: none;
  align-items: flex-end;
}

.modal-backdrop.open {
  display: flex;
}

.modal-backdrop-center {
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px;
  display: grid;
  gap: 10px;
  max-height: 82vh;
  overflow: auto;
}

.modal-backdrop-center .modal {
  border-radius: 12px;
  max-width: 560px;
  max-height: min(84vh, 760px);
}

.modal-slider {
  display: flex;
  width: 200%;
  align-items: flex-start;
  transition: transform 220ms ease;
}

.modal-slide {
  width: 50%;
  display: grid;
  gap: 10px;
}

.modal-slider-wrap {
  overflow-x: hidden;
  overflow-y: visible;
}

.modal-fixed-top {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #fff;
  margin: -16px -16px 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 52px;
}

.modal-fixed-top::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
  background: #fff;
}

.modal-fixed-top h2 {
  margin: 0;
  text-align: left;
  width: auto;
  padding-right: 92px;
}

.modal-fixed-top .btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.modal-sticky-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #fff;
  margin: -6px -16px 4px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.history-list {
  max-height: min(56vh, 480px);
  overflow: auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow-soft);
}

.kpi-card .label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.kpi-card .value {
  font-size: 1.2rem;
  font-weight: 800;
}

.scanner-preview {
  min-height: 260px;
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--hero-to, #12216f), var(--hero-from, #1f3ea8));
  border: 1px solid var(--primary-600, #203aa2);
  display: grid;
  place-items: center;
  color: #c7d2fe;
  font-weight: 700;
  overflow: hidden;
  position: relative;
}

.scanner-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-preview::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  opacity: 0.8;
}

.result-card {
  border-radius: var(--radius);
  padding: 16px;
  font-weight: 700;
}

.result-ok {
  background: #e8faef;
  border: 1px solid #9fe4be;
  color: #166a46;
}

.result-bad {
  background: #ffeef0;
  border: 1px solid #f8b2bb;
  color: #991b1b;
}

.scan-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.scan-stamp-attended {
  color: #0f5132;
  border: 1px solid #86efac;
  background: #dcfce7;
}

.scan-stamp-pending {
  color: #7f1d1d;
  border: 1px solid #fca5a5;
  background: #fee2e2;
}

.spin {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #c7d2fe;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes sweep {
  0% {
    transform: translateY(-90px);
  }
  50% {
    transform: translateY(90px);
  }
  100% {
    transform: translateY(-90px);
  }
}

@media (min-width: 900px) {
  .page {
    max-width: 1080px;
    padding-bottom: 24px;
  }

  .register-page .page {
    padding-bottom: 24px;
  }

  .header-inner {
    max-width: 1080px;
  }

  .admin-switcher {
    max-width: 1080px;
  }

  .content {
    max-width: 1080px;
    margin: 0 auto;
  }

  .desktop-grid {
    display: block;
  }

  .desktop-grid > .registration-split {
    grid-column: 1 / -1;
  }

  .register-columns {
    grid-template-columns: 1.05fr 1fr;
    gap: 10px;
    align-items: start;
  }

  .registration-split {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
  }

  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .sticky-summary {
    position: sticky;
    bottom: 0;
    padding: 0;
    background: none;
  }

  .summary-card {
    max-width: none;
    margin: 0;
  }

  .bottom-nav {
    display: none;
  }

  .fab-btn {
    right: max(18px, calc((100vw - 1080px) / 2 + 18px));
    bottom: 22px;
  }

  .events-page .page {
    padding-bottom: 110px;
  }

  .events-sticky-action {
    bottom: 0;
    border-top: 0;
    padding: 12px 18px 16px;
    background: linear-gradient(180deg, rgba(247, 248, 250, 0) 0%, rgba(247, 248, 250, 1) 44%);
  }

  .events-sticky-inner {
    max-width: 1080px;
  }
}

/* Platform Owner Dashboard polish */
.owner-page {
  --primary: #0f766e;
  --primary-600: #0b5f59;
  --surface-soft: #eef6f4;
  background:
    radial-gradient(circle at 8% -10%, #dff5ef 0%, transparent 35%),
    radial-gradient(circle at 94% 0%, #ffe8c9 0%, transparent 28%),
    #f4f7fb;
}

.owner-page .sticky-header {
  background: rgba(244, 247, 251, 0.88);
  border-bottom-color: #d6deea;
}

.owner-page .card {
  border-radius: 14px;
  border-color: #d6deea;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.owner-page .owner-hero {
  gap: 14px;
  background: linear-gradient(125deg, #ffffff 0%, #f3fbf9 55%, #fff8eb 100%);
}

.owner-page .owner-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-page .owner-quick-stats span {
  border: 1px solid #cfe1dc;
  background: #f7fdfb;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  color: #31525b;
}

.owner-page .owner-quick-stats strong {
  color: #0f172a;
}

.owner-page .owner-tabs .chip {
  background: #f9fbff;
}

.owner-page .owner-tabs .chip.active {
  border-color: #80b9ad;
  background: #ebf8f5;
}

.owner-page .owner-org-layout {
  display: grid;
  gap: 12px;
}

.owner-page .owner-org-list {
  gap: 12px;
}

.owner-page .owner-org-card {
  gap: 12px;
}

.owner-page .org-card-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.owner-page .owner-org-title-wrap {
  display: grid;
  --org-logo-size: 100px;
  grid-template-columns: var(--org-logo-size) minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
}

.owner-page .owner-org-logo-mini {
  width: var(--org-logo-size);
  height: var(--org-logo-size);
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.owner-page .owner-org-title-wrap .stack {
  min-width: 0;
  gap: 3px;
}

.owner-page .owner-org-logo-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.owner-page .owner-org-logo-mini span {
  font-size: 0.62rem;
  font-weight: 700;
  color: #64748b;
  text-align: center;
  line-height: 1.1;
  padding: 0 4px;
}

.owner-page .org-slug {
  font-size: 0.9rem;
  color: #0e7490;
}

.owner-page .org-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.owner-page .org-metric {
  border: 1px solid #d8e4e0;
  background: #f7fbfa;
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 3px;
}

.owner-page .org-metric span {
  font-size: 0.72rem;
  color: #64748b;
}

.owner-page .org-metric strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.owner-page .org-meter-block {
  display: grid;
  gap: 6px;
}

.owner-page .org-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #475569;
}

.owner-page .org-meter-head strong {
  color: #0f172a;
}

.owner-page .meter {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.owner-page .meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
}

.owner-page .owner-org-actions-primary .btn,
.owner-page .owner-org-actions-secondary .btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.owner-page .owner-org-actions-primary .btn {
  background: #f4f8ff;
  border-color: #d7e2f7;
}

.owner-page .owner-org-actions-secondary .btn {
  background: #f8fbff;
}

.owner-page .owner-delete-btn {
  justify-self: end;
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.78rem;
}

.owner-page .owner-public-data-btn {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.owner-page .owner-org-danger-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.owner-page .owner-modal-backdrop {
  backdrop-filter: blur(4px);
  background: rgba(15, 23, 42, 0.42);
}

.owner-page .owner-modal {
  max-width: min(560px, calc(100vw - 28px));
  border-radius: 14px;
  border: 1px solid #cdd9e7;
  background: linear-gradient(140deg, #ffffff 0%, #f6fbff 100%);
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.35);
  gap: 14px;
  padding: 20px;
}

.owner-page .owner-modal-head {
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.owner-page .owner-modal-head h3 {
  font-size: 1.05rem;
  line-height: 1.3;
}

.owner-page .owner-modal-body {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.owner-page .owner-modal-body .input[readonly] {
  background: #eef3f9;
  color: #64748b;
}

.owner-page .owner-modal-actions {
  margin-top: 6px;
}

.owner-page .owner-modal-actions .btn {
  min-height: 42px;
}

.owner-page .owner-modal-error {
  min-height: 18px;
}

.owner-page .owner-modal-reset {
  justify-self: end;
  width: auto;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.owner-page .owner-logo-preview {
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  place-items: center;
}

.owner-page .owner-logo-preview img {
  max-width: 100%;
  max-height: 96px;
  object-fit: contain;
}

.owner-page .owner-edit-org-head {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  padding: 6px 0 2px;
}

.owner-page .owner-edit-org-logo {
  width: 84px;
  height: 84px;
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.owner-page .owner-edit-org-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.owner-page .owner-edit-org-logo span {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.owner-page .owner-edit-org-meta {
  display: grid;
  gap: 2px;
  padding-left: 2px;
}

.owner-page .owner-edit-org-meta strong {
  font-size: 0.98rem;
  color: #0f172a;
}

.org-logo-preview {
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  place-items: center;
}

.org-logo-preview img {
  max-width: 100%;
  max-height: 96px;
  object-fit: contain;
}

.org-settings-card {
  gap: 12px;
}

.org-settings-top {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 2px;
}

.org-settings-logo {
  width: 92px;
  height: 92px;
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.org-settings-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.org-settings-logo span {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
}

.org-settings-meta {
  display: grid;
  gap: 4px;
}

.org-logo-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.org-logo-remove-btn {
  width: auto;
  min-height: 42px;
  padding: 9px 12px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.template-field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.email-editor-layout {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.email-editor-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.email-simple-field {
  display: grid;
  gap: 6px;
}

.email-simple-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4b5d78;
}

.email-simple-field .input,
.email-simple-field select,
.email-simple-field textarea {
  padding: 10px 12px;
}

.email-body-field {
  flex: 1 1 auto;
  min-height: 0;
}

.email-body-field .rich-editor-wrap {
  min-height: 0;
}

.email-fields-panel {
  border: 1px solid #d9e2f1;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  align-content: start;
  min-height: 100%;
}

.email-fields-panel h4 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.1;
}

.email-fields-scroll {
  max-height: none;
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.template-field-chip {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  display: flex;
  padding: 6px 10px;
  font-size: 0.76rem;
  border-color: #ccd8f2;
  background: #ffffff;
}

.template-field-token {
  font-weight: 700;
  color: #1f3a8a;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.template-field-chip:hover {
  border-color: #8ea0ff;
  background: #f7f9ff;
}

.email-action-row {
  display: grid;
  gap: 10px;
}

.email-action-row.split {
  grid-template-columns: 1fr;
}

.email-field-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 240px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  background: #ecf2ff;
  border: 1px solid #b7c7f6;
  border-radius: 8px;
  padding: 7px 9px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.email-section {
  gap: 10px;
}

.email-section-toggle {
  width: 100%;
  border: 1px solid #cfd9eb;
  background: #f8fbff;
  color: #0f172a;
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.email-section-icon {
  color: #1f2faa;
  font-weight: 800;
  min-width: 14px;
  text-align: center;
}

.rich-editor-wrap {
  display: grid;
  gap: 8px;
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rich-editor-toolbar .btn {
  width: auto;
  min-height: 32px;
  padding: 4px 11px;
  font-size: 0.78rem;
}

.rich-editor-toolbar .input {
  width: auto;
  min-width: 92px;
  min-height: 32px;
}

@media (min-width: 980px) {
  .email-editor-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    align-items: stretch;
  }

  .email-fields-panel {
    position: sticky;
    top: 78px;
    max-height: min(70vh, 600px);
    overflow: hidden;
  }

  .email-action-row.split {
    grid-template-columns: 1fr 1fr;
  }

  .email-editor-main {
    min-height: min(70vh, 600px);
  }

  .email-body-field .rich-editor-wrap {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
  }

  .email-body-field .rich-editor {
    height: 100%;
    min-height: 280px;
  }
}

.rich-editor {
  min-height: 180px;
  border: 1px solid #cfd9eb;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  line-height: 1.5;
  color: #0f172a;
}

.rich-editor:focus {
  outline: 2px solid #8da2ff;
  outline-offset: 0;
}

.owner-page .owner-remove-user-btn {
  justify-self: end;
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.78rem;
}

.owner-page .owner-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.owner-page .owner-user-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.owner-page .owner-mini-edit,
.owner-page .owner-mini-collapse {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 8px;
  padding: 0;
}

.owner-page .owner-mini-collapse {
  color: #0f766e;
  background: #f0faf7;
  border-color: #b9ddd4;
}

.owner-page .owner-mini-collapse svg,
.owner-page .owner-mini-edit svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.admin-users-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-users-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-mini-toggle {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 8px;
  padding: 0;
  color: #0f766e;
  background: #f0faf7;
  border-color: #b9ddd4;
}

.admin-mini-toggle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.admin-user-row-head {
  align-items: flex-start;
}

.admin-user-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  margin-top: 2px;
}

.admin-user-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #0f766e;
  cursor: pointer;
}

.admin-users-section-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-bulk-box {
  border: 1px solid #d4e2df;
  border-radius: 10px;
  background: #f8fcfb;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.admin-bulk-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-bulk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.admin-bulk-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.admin-bulk-actions #clearSelectedBtn {
  grid-column: 1 / -1;
  width: auto;
  justify-self: end;
}

.admin-remove-user-btn {
  justify-self: end;
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.78rem;
}

.attendee-edit-block {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #d9e5e2;
  border-radius: 10px;
  background: #f8fcfb;
  display: grid;
  gap: 8px;
}

.attendee-session-picker {
  max-height: 180px;
  overflow: auto;
}

.attendee-session-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  border: 1px solid #d8e2f2;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.attendee-session-item input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #0f766e;
}

.attendee-session-item span {
  display: grid;
  gap: 2px;
}

.attendee-session-item small {
  color: #64748b;
}

.attendee-session-select {
  min-height: 170px;
  line-height: 1.35;
  white-space: normal;
}

.attendee-multiselect {
  position: relative;
}

.attendee-multiselect-toggle {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  position: relative;
  padding-right: 42px;
}

.attendee-multiselect-toggle::before {
  content: none;
}

.attendee-multiselect-toggle::after {
  content: none;
}

.attendee-uniform-arrow {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #1f2937 50%),
    linear-gradient(135deg, #1f2937 50%, transparent 50%),
    linear-gradient(#d6deea, #d6deea),
    linear-gradient(#eef2f8, #eef2f8);
  background-position:
    calc(100% - 15px) calc(50% - 1px),
    calc(100% - 10px) calc(50% - 1px),
    calc(100% - 34px) 0,
    100% 0;
  background-size: 5px 5px, 5px 5px, 1px 100%, 34px 100%;
  background-repeat: no-repeat;
}

.attendee-multiselect-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 8;
  background: #fff;
  border: 1px solid #cfd8ea;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  padding: 8px;
}

.attendee-list-card {
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.attendee-list-card:hover,
.attendee-list-card:focus-visible {
  border-color: #9eb5df;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.attendee-list-card:active {
  transform: translateY(1px);
}

.attendee-list-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.attendee-list-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.attendee-list-reg {
  font-size: 0.9rem;
}

.attendee-list-package {
  color: #425067;
}

.attendee-list-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.attendee-list-icon {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 8px;
  padding: 0;
  color: #0f766e;
  background: #f0faf7;
  border-color: #b9ddd4;
}

.attendee-list-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

@media (min-width: 900px) {
  .admin-bulk-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-bulk-actions {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

@media (min-width: 900px) {
  .owner-page .page,
  .owner-page .header-inner,
  .owner-page .content {
    max-width: 1200px;
  }

  .owner-page .owner-org-layout {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    align-items: start;
  }

  .owner-page .owner-org-create {
    position: sticky;
    top: 84px;
  }
}
