/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f4f8;
  color: #1e293b;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: #1e40af;
}

/* Calendar */
.calendar {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 1.25rem;
}

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

.calendar-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.nav-btn {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  color: #475569;
  transition: background 0.15s;
}
.nav-btn:hover { background: #f1f5f9; }

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.day:hover:not(.empty):not(.past) {
  background: #dbeafe;
}

.day.empty { cursor: default; }

.day.today {
  border: 2px solid #2563eb;
  font-weight: 700;
}

.day.past {
  color: #cbd5e1;
  cursor: default;
}

.day.selected {
  background: #2563eb;
  color: #fff;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.modal-wide {
  max-width: 560px;
}

.modal h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
}
.modal-close:hover { color: #475569; }

/* Day navigation */
.day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.day-nav span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

/* Two-day slot grid */
.two-day-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.day-column {
  min-width: 0;
}

.day-col-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 0.5rem;
}

.day-col-label.next-day {
  color: #7c3aed;
  border-bottom-color: #c4b5fd;
}

.slot-column {
  display: flex;
  flex-direction: column;
  gap: 3px;
  user-select: none;
  -webkit-user-select: none;
}

/* Slot buttons */
.step-label {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.slot-btn {
  padding: 0.45rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  transition: all 0.1s;
}
.slot-btn:hover:not(.unavailable) {
  border-color: #2563eb;
  background: #eff6ff;
}
.slot-btn.unavailable {
  background: #f8fafc;
  color: #cbd5e1;
  cursor: default;
  text-decoration: line-through;
}
.slot-btn.selected {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.slot-btn.anchor {
  box-shadow: 0 0 0 2px #1d4ed8;
}

/* Selection summary */
.selection-summary {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
  transition: all 0.15s;
  user-select: none;
}
.selection-summary.has-selection {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 500;
}

/* Form */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #475569;
}
.form-group input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.15s;
}
.form-group input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s;
}
.btn-primary {
  background: #2563eb;
  color: #fff;
  flex: 1;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #93c5fd; cursor: default; }
.btn-secondary {
  background: #f1f5f9;
  color: #475569;
}
.btn-secondary:hover { background: #e2e8f0; }

/* Confirmation / Pending */
.confirmation { text-align: center; padding: 1rem 0; }
.check-icon, .pending-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.check-icon { background: #10b981; color: #fff; }
.pending-icon { background: #f59e0b; color: #fff; }
.confirmation h3 { color: #10b981; margin-bottom: 0.5rem; }
.confirmation.pending h3 { color: #d97706; }
.confirmation p { color: #64748b; font-size: 0.9rem; }
.pending-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.error {
  margin-top: 0.75rem;
  padding: 0.6rem;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: center;
}
.error.hidden { display: none; }

.step.hidden { display: none; }

/* Admin styles */
.admin-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.admin-login {
  max-width: 360px;
  margin: 4rem auto;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  text-align: center;
}

.admin-login h2 { margin-bottom: 1.5rem; }

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

.admin-header h1 { margin-bottom: 0; text-align: left; }

.filter-bar {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s;
}
.filter-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.bookings-table {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow-x: auto;
}

.bookings-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.bookings-table th {
  background: #f8fafc;
  padding: 0.75rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.bookings-table td {
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.bookings-table td:nth-child(3) { min-width: 160px; }
.bookings-table td:nth-child(6) { min-width: 140px; }

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-confirmed { background: #dcfce7; color: #16a34a; }
.status-cancelled { background: #fee2e2; color: #dc2626; }
.status-pending { background: #fef3c7; color: #d97706; }

.action-btn {
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  margin-right: 0.25rem;
}
.confirm-btn {
  border: 1px solid #86efac;
  color: #16a34a;
}
.confirm-btn:hover { background: #f0fdf4; }
.cancel-btn {
  border: 1px solid #fca5a5;
  color: #dc2626;
}
.cancel-btn:hover { background: #fef2f2; }

.empty-state {
  padding: 3rem;
  text-align: center;
  color: #94a3b8;
}

.log