:root {
  --bg: #F6F3FA;
  --surface: #FFFFFF;
  --surface-2: #F1ECF8;
  --text: #191622;
  --muted: #6A6374;
  --border: rgba(25,22,34,.10);

  --purple: #5A36E9;
  --purple-hover: #4B2ED0;
  --teal: #1FAE9E;
  --teal-soft: rgba(31,174,158,.14);

  --danger: #D84A4A;
  --warn: #C08A2C;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;

  --shadow-sm: 0 6px 18px rgba(25,22,34,.08);
  --shadow-md: 0 14px 30px rgba(25,22,34,.10);

  --focus: 0 0 0 3px rgba(90,54,233,.18);
}

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, h4 { line-height: 1.25; }

.gradient-hero {
  background: linear-gradient(135deg, #7A56F0 0%, #5A36E9 45%, #1FAE9E 100%);
}

.gradient-soft {
  background: linear-gradient(135deg, rgba(90,54,233,.05) 0%, rgba(31,174,158,.05) 100%);
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple);
  color: white;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.75rem 1.75rem;
  font-size: 0.875rem;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(90,54,233,.22);
  min-height: 44px;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--purple-hover);
  box-shadow: 0 6px 20px rgba(90,54,233,.32);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: white;
  color: var(--purple);
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  transition: all 0.18s ease;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--purple);
  background: rgba(90,54,233,.04);
}

.btn-ghost {
  display: inline-flex; align-items: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
  transition: color 0.18s ease;
  cursor: pointer;
  min-height: 44px;
  background: none;
  border: none;
  text-decoration: none;
  padding: 0.5rem 0;
}
.btn-ghost:hover { color: var(--purple); }

.input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  background: white;
  font-size: 0.9375rem;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  color: var(--text);
  font-family: inherit;
}
.input:focus {
  border-color: var(--purple);
  box-shadow: var(--focus);
}
.input::placeholder { color: #B0A9BA; }

textarea.input {
  resize: vertical;
  min-height: 80px;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236A6374' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2.5rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.375rem;
  letter-spacing: 0.01em;
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pill {
  display: inline-flex; align-items: center;
  font-size: 0.75rem; font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}
.pill-yes { background: var(--teal-soft); color: #13877A; }
.pill-maybe { background: rgba(192,138,44,.12); color: #9A6F1C; }
.pill-no { background: rgba(216,74,74,.10); color: #B83C3C; }
.pill-pending { background: rgba(106,99,116,.08); color: var(--muted); }
.pill-draft { background: rgba(90,54,233,.08); color: var(--purple); }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: rgba(25,22,34,.12);
  border-radius: 24px; transition: 0.25s ease;
}
.toggle-slider:before {
  content: ""; position: absolute;
  height: 18px; width: 18px; left: 3px; bottom: 3px;
  background-color: white; border-radius: 50%;
  transition: 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.toggle-switch input:checked + .toggle-slider { background-color: var(--purple); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

.section-panel { transition: all 0.25s ease; }
.section-panel.collapsed { max-height: 0; overflow: hidden; opacity: 0; padding-top: 0; padding-bottom: 0; }

.tab-link {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.18s, border-color 0.18s;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
.tab-link:hover { color: var(--text); }
.tab-link.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.accordion-trigger {
  cursor: pointer;
  user-select: none;
}
.accordion-trigger .accordion-icon {
  transition: transform 0.25s ease;
}
.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}
.accordion-body {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
}
.accordion-body.open {
  max-height: 600px; opacity: 1;
}

.progress-bar {
  height: 6px;
  border-radius: 9999px;
  background: rgba(25,22,34,.06);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--teal), var(--purple));
  transition: width 0.4s ease;
}

.more-menu {
  position: relative;
  display: inline-block;
}
.more-menu-content {
  display: none;
  position: absolute;
  right: 0; top: 100%;
  min-width: 160px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  z-index: 20;
  padding: 0.375rem 0;
}
.more-menu.open .more-menu-content { display: block; }
.more-menu-item {
  display: block; width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
.more-menu-item:hover { background: var(--surface-2); }

.flash-error { background: rgba(216,74,74,.08); color: var(--danger); border: 1px solid rgba(216,74,74,.15); }
.flash-success { background: rgba(31,174,158,.08); color: #13877A; border: 1px solid rgba(31,174,158,.15); }
.flash-info { background: var(--surface-2); color: var(--text); }

.bg-surface-2 { background: var(--surface-2); }
.bg-teal-soft { background: var(--teal-soft); }
.bg-purple-soft { background: rgba(90,54,233,.08); }
.text-teal-token { color: #13877A; }

.icon-circle {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-circle-purple { background: rgba(90,54,233,.08); }
.icon-circle-teal { background: var(--teal-soft); }

.panel-surface-2 {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.hint-banner {
  background: rgba(90,54,233,.05);
  border: 1px solid rgba(90,54,233,.10);
  border-radius: var(--radius-lg);
}

.input-readonly {
  background: var(--surface-2);
  cursor: pointer;
}

.btn-teal {
  border-color: var(--teal);
  color: var(--teal);
}

.guest-name-pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-weight: 500;
  background: var(--teal-soft);
  color: #13877A;
}

.note-bubble {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 0.375rem 0.625rem;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--muted);
}

.table-header {
  background: var(--surface-2);
}

.nudge-msg-body {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 1rem;
}

.nudge-card-border {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.success-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--teal-soft);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  font-size: 1.25rem;
  color: var(--teal);
}

.footer-badge {
  background: rgba(90,54,233,.05);
  color: var(--muted);
}

.notif-bell-wrap {
  position: relative;
  display: inline-block;
}
.notif-bell-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.18s, background 0.18s;
}
.notif-bell-btn:hover {
  color: var(--purple);
  background: rgba(90,54,233,.06);
}
.notif-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--purple);
  border-radius: 50%;
  border: 2px solid white;
}
.notif-dropdown {
  display: none;
  position: absolute;
  right: -8px; top: calc(100% + 8px);
  width: 300px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  z-index: 50;
  overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.notif-list {
  max-height: 320px;
  overflow-y: auto;
}
.notif-item {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  text-decoration: none;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }

.more-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(25,22,34,0.35);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.more-menu-overlay.open {
  display: block;
  opacity: 1;
}
.more-menu-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 101;
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.25s ease;
  box-shadow: 0 -4px 20px rgba(25,22,34,.12);
}
.more-menu-sheet.open {
  transform: translateY(0);
}
.more-menu-sheet-handle {
  width: 36px; height: 4px;
  background: rgba(25,22,34,.15);
  border-radius: 4px;
  margin: 0.5rem auto 0.75rem;
}
.more-menu-sheet .more-menu-item {
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
}

@media (max-width: 640px) {
  .btn-primary, .btn-secondary { font-size: 0.8125rem; }
  .notif-dropdown {
    width: 260px;
    right: -40px;
  }
  .more-menu-content {
    display: none !important;
  }
}

@media (min-width: 641px) {
  .more-menu-overlay, .more-menu-sheet {
    display: none !important;
  }
}
