:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --sky: #0284c7;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --rose: #dc2626;
  --rose-soft: #fef2f2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Navbar */
.topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}

.brand:hover {
  text-decoration: none;
}

.brand-dot {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--surface-muted);
  color: var(--text);
  text-decoration: none;
}

.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #0284c7 100%);
  color: #ffffff;
  border-radius: 22px;
  padding: 28px 24px;
  margin: 20px 0;
  box-shadow: 0 12px 30px -8px rgba(79, 70, 229, 0.35);
}

@media (min-width: 768px) {
  .hero {
    padding: 36px 36px;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.16);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
}

.hero-subtitle {
  margin: 0 0 18px;
  font-size: 16px;
  opacity: 0.92;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.hero-desc {
  margin: 0;
  font-size: 14px;
  opacity: 0.92;
  white-space: pre-line;
  max-width: 72ch;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

@media (min-width: 640px) {
  .card {
    padding: 24px;
  }
}

.card-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.card-sub {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-soft);
}

/* Capacity Bar */
.capacity-card {
  padding: 16px 20px;
}

.capacity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--surface-muted);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--emerald);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-fill.warn {
  background: var(--amber);
}

.progress-fill.full {
  background: var(--rose);
}

/* Grid layout for form + summary */
.grid-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 48px;
}

@media (min-width: 900px) {
  .grid-main {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  }
  .sticky-summary {
    position: sticky;
    top: 76px;
  }
}

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

@media (min-width: 600px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.kpi-label {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

/* Form Elements */
.field {
  margin-bottom: 14px;
}

.field:last-child {
  margin-bottom: 0;
}

label.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.req {
  color: var(--rose);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

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

.help-text {
  font-size: 12.5px;
  color: var(--text-soft);
  margin-top: 4px;
}

/* Option check cards */
.option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: border-color 0.15s, background 0.15s;
  background: #fff;
}

.option-item:hover {
  border-color: #a5b4fc;
}

.option-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.option-item.checked {
  border-color: var(--primary);
  background: #fafaff;
}

.option-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.option-name {
  font-weight: 600;
  font-size: 15px;
}

.option-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 14px;
  white-space: nowrap;
}

.option-desc {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 3px;
}

/* Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.stepper button {
  border: none;
  background: var(--surface-muted);
  color: var(--text);
  width: 40px;
  height: 40px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.stepper button:hover:not(:disabled) {
  background: #e2e8f0;
}

.stepper button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stepper span {
  min-width: 46px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-lg {
  padding: 13px 20px;
  font-size: 15px;
  width: 100%;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 13px;
  border-radius: 8px;
}

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

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

.btn-success {
  background: var(--emerald);
  color: #fff;
}

.btn-success:hover {
  background: #047857;
}

.btn-danger {
  background: var(--rose-soft);
  color: var(--rose);
  border-color: #fecaca;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: #cbd5e1;
}

.btn-secondary:hover {
  background: var(--surface-muted);
}

/* Alerts & Badges */
.alert {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: var(--rose-soft);
  border-color: #fecaca;
  color: #991b1b;
}

.alert-success {
  background: var(--emerald-soft);
  border-color: #a7f3d0;
  color: #065f46;
}

.alert-warn {
  background: var(--amber-soft);
  border-color: #fde68a;
  color: #92400e;
}

.alert-info {
  background: var(--primary-soft);
  border-color: #c7d2fe;
  color: #3730a3;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-confirmed {
  background: #dcfce7;
  color: #166534;
}

.badge-reported {
  background: #dbeafe;
  color: #1e40af;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

/* Summary lines */
.summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--border);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--border);
  font-size: 18px;
  font-weight: 800;
}

/* Reference Box & Payment Tabs */
.ref-box {
  background: var(--surface-muted);
  border: 2px dashed #94a3b8;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin: 14px 0;
}

.ref-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 4px 0;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tab-btn {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.tab-btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.pay-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: #fafbff;
}

.pay-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
}

@media (min-width: 640px) {
  .pay-grid {
    grid-template-columns: 1fr auto;
  }
}

.qr-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  width: 196px;
  margin: 0 auto;
}

.qr-box img, .qr-box svg {
  display: block;
  margin: 0 auto;
  max-width: 168px;
  height: auto;
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 14px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

/* Admin Table & Filters */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pill-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.pill-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.reg-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  margin-bottom: 12px;
}

.reg-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.reg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.reg-details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 16px 20px;
  overflow: auto;
}

.email-iframe {
  width: 100%;
  min-height: 440px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.editor-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fafbfc;
}

footer.site-footer {
  text-align: center;
  padding: 24px 16px 40px;
  font-size: 13px;
  color: var(--text-soft);
}
