/* ===================
   CSS Variables
   =================== */
:root {
  --primary: #4b5320;
  --primary-hover: #3d4419;
  --primary-light: #6b7530;
  --success: #2d5016;
  --error: #991b1b;
  --warning: #92400e;
  --text: #1c1917;
  --text-muted: #57534e;
  --background: #fafaf9;
  --card: #ffffff;
  --border: #d6d3d1;
  --border-light: #e7e5e4;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --border-radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===================
   Reset & Base
   =================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

a:hover {
  text-decoration: underline;
}

/* ===================
   Accessibility
   =================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Ensure focus is visible on dark backgrounds */
.btn-primary:focus-visible,
.ticket-card-header a:focus-visible {
  outline-color: white;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===================
   Layout
   =================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  overflow-x: hidden;
}

.main-content {
  flex: 1;
  padding: 2rem 0;
}

/* ===================
   Header
   =================== */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

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

.logo-img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

/* ===================
   Footer
   =================== */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer p { margin: 0; }

/* ===================
   Buttons
   =================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  min-height: 44px; /* Minimum touch target */
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  gap: 0.5rem;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--background);
  text-decoration: none;
}

.btn-disabled,
.btn:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn:disabled:hover {
  background: var(--border);
  text-decoration: none;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-block {
  width: 100%;
}

/* ===================
   Forms
   =================== */
.form { max-width: 100%; }

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 500;
  font-size: 0.9375rem;
}

.required {
  color: var(--error) !important;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 48px; /* Comfortable touch target */
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  background: white;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(75, 83, 32, 0.1);
}

.form-hint {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ===================
   Alerts
   =================== */
.alert {
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
}

.alert ul {
  margin: 0;
  padding-left: 1.25rem;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--error);
}

.alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: var(--warning);
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--success);
}

/* ===================
   Page Header
   =================== */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin: 0;
}

/* ===================
   Breadcrumb
   =================== */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-sep {
  margin: 0 0.5rem;
}

/* ===================
   Event List
   =================== */
.event-list {
  display: grid;
  gap: 1.5rem;
}

.event-card {
  background: var(--card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.event-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.event-card-content {
  padding: 1.5rem;
  flex: 1;
}

@media (max-width: 640px) {
  .event-card-content {
    padding: 1.25rem;
  }
}

.event-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.event-description {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.event-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.event-detail-icon {
  font-size: 1rem;
  width: 1.5rem;
}

.spots-low {
  color: var(--warning);
  font-weight: 600;
}

.event-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.price-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.price-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.event-action {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.spots-sold-out {
  color: var(--error);
  font-weight: 600;
}

.sold-out-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sold-out-text {
  margin: 0;
  color: var(--error);
}

.waitlist-form {
  max-width: 400px;
}

.waitlist-text {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.waitlist-inline-form {
  display: flex;
  gap: 0.5rem;
}

.waitlist-inline-form .form-input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .waitlist-inline-form {
    flex-direction: column;
  }

  .waitlist-inline-form .btn {
    width: 100%;
  }
}

.waitlist-message {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  font-size: 0.9375rem;
}

.waitlist-message.success {
  background: #f0fdf4;
  color: var(--success);
}

.waitlist-message.error {
  background: #fef2f2;
  color: var(--error);
}

/* ===================
   Event Hero
   =================== */
.event-hero {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.event-hero h1 {
  margin-bottom: 0.75rem;
}

.event-hero-description {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.event-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.event-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.event-meta-item strong {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ===================
   Registration Form
   =================== */
.registration-form-container {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.registration-form-container h2 {
  margin-bottom: 1.5rem;
}

/* ===================
   Progress Bar
   =================== */
.progress-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  max-width: 120px;
  position: relative;
}

/* Connector line between steps */
.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 1rem;
  left: calc(50% + 1.25rem);
  width: calc(100% - 2.5rem);
  height: 2px;
  background: var(--border);
}

.progress-step.completed:not(:last-child)::after {
  background: var(--success);
}

.step-number {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.875rem;
}

.step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.progress-step.completed .step-number {
  background: var(--success);
  color: white;
}

.progress-step.completed .step-number > span {
  display: none;
}

.progress-step.completed .step-number::before {
  content: '✓';
  font-size: 0.875rem;
}

.progress-step.active .step-number {
  background: var(--primary);
  color: white;
}

.progress-step.active .step-label {
  color: var(--text);
  font-weight: 500;
}

/* ===================
   Terms Page
   =================== */
.terms-container {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.terms-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.term-item {
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.term-header {
  padding: 1rem;
  background: var(--background);
}

@media (max-width: 640px) {
  .term-header {
    padding: 1.25rem 1rem;
  }
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.checkbox-custom {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  transition: all 0.15s ease;
}

@media (max-width: 640px) {
  .checkbox-custom {
    width: 1.75rem;
    height: 1.75rem;
  }
}

.checkbox-label input:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '✓';
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

.checkbox-label input:focus-visible + .checkbox-custom {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.term-title {
  font-weight: 600;
}

.term-text {
  padding: 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.term-text p {
  margin: 0;
}

/* ===================
   Signature
   =================== */
.signature-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.signature-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  background: white;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.signature-mode {
  display: none;
}

.signature-mode.active {
  display: block;
}

.signature-pad-container {
  position: relative;
}

.signature-canvas {
  width: 100%;
  height: 180px;
  border: 2px solid var(--border);
  border-radius: var(--border-radius);
  background: white;
  touch-action: none;
}

@media (min-width: 640px) {
  .signature-canvas {
    height: 160px;
  }
}

#clear-signature {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.signature-input {
  font-family: 'Brush Script MT', 'Segoe Script', 'Bradley Hand', cursive;
  font-size: 1.75rem;
  padding: 1rem;
  text-align: center;
  font-style: italic;
}

/* ===================
   Payment Page
   =================== */
.payment-container {
  display: grid;
  gap: 2rem;
  max-width: 100%;
  overflow: hidden;
}

@media (min-width: 768px) {
  .payment-container {
    grid-template-columns: 1fr 320px;
  }
}

.payment-main {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .payment-main {
    padding: 2rem;
  }
}

.ticket-types {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.ticket-type-card {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

@media (max-width: 640px) {
  .ticket-type-card {
    padding: 1.25rem;
  }
}

.ticket-type-card:hover {
  border-color: var(--primary-light);
}

.ticket-type-card.selected {
  border-color: var(--primary);
  background: rgba(75, 83, 32, 0.03);
}

.ticket-type-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ticket-type-card:has(input:focus-visible),
.ticket-type-card input:focus-visible ~ .ticket-type-content {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.ticket-type-content {
  flex: 1;
  min-width: 0;
}

.ticket-type-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ticket-type-name {
  font-weight: 600;
}

.ticket-type-price {
  font-weight: 700;
  color: var(--primary);
}

.ticket-type-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.ticket-type-check {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--border);
  color: transparent;
  font-size: 0.875rem;
  margin-left: 1rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.ticket-type-card.selected .ticket-type-check {
  background: var(--primary);
  color: white;
}

.payment-section {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.payment-section h2 {
  margin-bottom: 1.5rem;
}

#payment-element {
  margin-bottom: 1.5rem;
  max-width: 100%;
  overflow: hidden;
}

.payment-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

.btn-secondary .spinner {
  border-color: rgba(0,0,0,0.1);
  border-top-color: var(--text);
}

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

/* Sidebar */
.payment-sidebar {
  position: sticky;
  top: 2rem;
}

.order-summary {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.order-summary h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.summary-label {
  color: var(--text-muted);
}

.summary-value {
  text-align: right;
  font-weight: 500;
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

.summary-total {
  font-size: 1.125rem;
}

.summary-total .summary-value {
  font-weight: 700;
  color: var(--primary);
}

/* Promo Code */
.promo-code-section {
  margin: 1rem 0;
}

.promo-toggle-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.promo-toggle-btn:hover {
  text-decoration: underline;
}

.promo-input-group {
  display: flex;
  gap: 0.5rem;
}

.promo-input-group .form-input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  min-height: 40px;
}

@media (max-width: 360px) {
  .promo-input-group {
    flex-direction: column;
  }

  .promo-input-group .btn {
    width: 100%;
  }
}

.promo-message {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}

.promo-message.success {
  color: var(--success);
}

.promo-message.error {
  color: var(--error);
}

.promo-applied-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(45, 80, 22, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
}

.promo-code-text {
  font-weight: 600;
  color: var(--success);
}

.promo-discount-text {
  color: var(--text-muted);
}

.promo-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  line-height: 1;
}

.promo-remove:hover {
  color: var(--error);
}

.discount-value {
  color: var(--success);
}

.free-message {
  text-align: center;
  padding: 2rem;
  background: rgba(45, 80, 22, 0.1);
  border-radius: var(--border-radius);
  color: var(--success);
  font-weight: 600;
}

/* Debug Panel (dev only) */
.debug-panel {
  margin-top: 1rem;
  padding: 1rem;
  background: #fef3c7;
  border: 2px dashed #f59e0b;
  border-radius: var(--border-radius);
}

.debug-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #92400e;
}

/* ===================
   Confirmation Page
   =================== */
.confirmation-container {
  max-width: 600px;
  margin: 0 auto;
}

.confirmation-header {
  text-align: center;
  margin-bottom: 2rem;
}

.success-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-size: 2rem;
  animation: pop-in 0.4s ease-out;
}

@keyframes pop-in {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===================
   Ticket Card
   =================== */
.ticket-card {
  background: var(--card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.ticket-card-header {
  background: var(--primary);
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.ticket-card-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.ticket-card-body {
  padding: 2rem;
}

.ticket-qr {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ticket-qr svg {
  max-width: 180px;
  height: auto;
}

.ticket-qr-large svg {
  max-width: 250px;
}

.ticket-number {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px dashed var(--border);
}

.ticket-number .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.ticket-number .value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.1em;
  word-break: break-all;
}

.ticket-number-large .value {
  font-size: 2rem;
}

.ticket-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ticket-detail {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.ticket-detail .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.ticket-detail .value {
  font-weight: 500;
  word-break: break-word;
}

.ticket-card-footer {
  background: var(--background);
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.ticket-card-footer p { margin: 0; }

.checked-in-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(45, 80, 22, 0.1);
  border-radius: var(--border-radius);
  color: var(--success);
  font-weight: 600;
}

.checked-in-badge .check-icon {
  font-size: 1.25rem;
}

.checked-in-time {
  font-weight: 400;
  font-size: 0.875rem;
}

/* ===================
   Confirmation Actions
   =================== */
.confirmation-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.confirmation-note {
  background: var(--background);
  padding: 1.5rem;
  border-radius: var(--border-radius);
}

.confirmation-note h3 {
  margin-bottom: 1rem;
}

.confirmation-note ul {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.confirmation-note li {
  margin-bottom: 0.25rem;
}

.confirmation-note p {
  margin: 0;
  font-size: 0.9375rem;
}

.contact-line {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.contact-link {
  font-weight: 600;
}

/* ===================
   Ticket Page
   =================== */
.ticket-page {
  max-width: 500px;
  margin: 0 auto;
}

.ticket-card-full {
  margin-top: 1rem;
}

.ticket-card-full .ticket-card-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.ticket-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.btn-icon {
  margin-right: 0.5rem;
}

/* ===================
   Error Page
   =================== */
.error-page {
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ===================
   Empty State
   =================== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state code {
  background: var(--background);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

/* ===================
   Admin Styles
   =================== */
.admin-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .admin-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.admin-header-content h1 {
  margin-bottom: 0.25rem;
}

.admin-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.back-link {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.admin-stats-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .admin-stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

.admin-stat-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.admin-stat-card h2 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.stat-numbers {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-actions {
  display: flex;
  gap: 0.5rem;
}

/* Admin Table */
.table-container {
  background: var(--card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.admin-table th {
  background: var(--background);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.admin-table tbody tr:hover {
  background: var(--background);
}

.admin-table tfoot .total-row {
  background: var(--background);
  border-top: 2px solid var(--border);
}

.admin-table tfoot .total-row td {
  padding-top: 1rem;
}

.ticket-number-cell {
  font-family: monospace;
  font-weight: 600;
}

.nickname {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.date-cell {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.checked-in-row {
  background: rgba(45, 80, 22, 0.03);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-checked-in {
  background: rgba(45, 80, 22, 0.1);
  color: var(--success);
}

.status-pending {
  background: var(--background);
  color: var(--text-muted);
}

/* ===================
   Waitlist Section
   =================== */
.waitlist-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.waitlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.waitlist-header h2 {
  margin: 0;
}

/* ===================
   Check-in Scanner
   =================== */
.checkin-container {
  max-width: 600px;
  margin: 0 auto;
}

.scanner-section {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

#scanner-container {
  margin-bottom: 1.5rem;
}

#reader {
  width: 100%;
  margin-bottom: 1rem;
}

.manual-entry {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.divider-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.manual-form {
  display: flex;
  gap: 0.5rem;
}

.manual-form .form-input {
  flex: 1;
  text-transform: uppercase;
  font-family: monospace;
  font-size: 1.125rem;
  letter-spacing: 0.05em;
}

.result-section {
  margin-bottom: 1.5rem;
}

.result-card {
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
}

.result-card.success {
  background: rgba(45, 80, 22, 0.1);
  border: 2px solid var(--success);
}

.result-card.warning {
  background: #fffbeb;
  border: 2px solid var(--warning);
}

.result-card.error {
  background: #fef2f2;
  border: 2px solid var(--error);
}

.result-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.result-card.success .result-icon { color: var(--success); }
.result-card.warning .result-icon { color: var(--warning); }
.result-card.error .result-icon { color: var(--error); }

.result-card h2 {
  margin-bottom: 0.5rem;
}

.result-meta {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.recent-checkins {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.recent-checkins h3 {
  margin-bottom: 1rem;
}

.recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recent-list li:last-child {
  border-bottom: none;
}

.recent-list .empty-state {
  padding: 1rem 0;
  text-align: center;
  border-bottom: none;
}

.recent-name {
  font-weight: 500;
}

.recent-time {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ===================
   Mobile Adjustments
   =================== */
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .event-hero,
  .registration-form-container,
  .terms-container,
  .payment-main,
  .scanner-section,
  .order-summary {
    padding: 1.5rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .confirmation-actions {
    flex-direction: column;
  }

  .confirmation-actions .btn {
    width: 100%;
  }

  /* Primary action stands out */
  .confirmation-actions .btn-primary {
    order: -1;
  }

  .progress-bar {
    gap: 0.25rem;
  }

  .step-label {
    font-size: 0.6875rem;
  }
}
