:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --success: #10b981;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

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

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

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  display: inline-block;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text-main);
}

h1, h2 {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

/* Progress bar */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.progress-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.progress-step.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

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

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 10px;
  transition: background 0.3s ease;
}

/* Steps */
.step-container {
  animation: fadeIn 0.4s ease forwards;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-bar {
  margin-bottom: 1.5rem;
}

.search-bar input, .client-form input {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: all 0.2s;
}

.search-bar input:focus, .client-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.client-form input {
  margin-bottom: 1rem;
}

/* Lists & Cards */
.grid-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 5px;
}

.grid-list::-webkit-scrollbar {
  width: 6px;
}
.grid-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: var(--bg-hover);
}

.card-title {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.card-price {
  font-weight: 600;
  color: var(--primary);
}

/* Calendar & Times */
.calendar-picker {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

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

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s;
}
.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.week-label {
  font-weight: 500;
}

.days-row {
  display: flex;
  justify-content: space-between;
}

.day-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 40px;
}
.day-col:hover {
  background: var(--bg-hover);
}
.day-col.selected {
  background: var(--primary);
  color: white;
}
.day-col.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: none;
}
.day-col.disabled.off-day {
  opacity: 0.45;
}

.day-status {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #ef4444;
  margin-top: 0.15rem;
}

.day-name {
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.day-num {
  font-size: 1.125rem;
  font-weight: 600;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.time-slot {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.time-slot:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}
.time-slot.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Summary */
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-label {
  color: var(--text-muted);
}
.summary-value {
  font-weight: 500;
  text-align: right;
  max-width: 60%;
}

/* Sub-note under a summary row, e.g. why we extended the appointment block. */
.summary-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: right;
  padding: 0 0 0.5rem 0;
  font-style: italic;
}

/* Co-booking suggestion ("Most clients also book…"). Mirrors summary-card
   style so it reads as a continuation of the review, not a CTA. */
.related-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.related-title {
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.related-list {
  margin: 0 0 0.75rem 0;
  padding: 0;
  font-size: 0.9375rem;
  list-style: none;
}
.related-list .related-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
}
.related-list .related-item:last-child { border-bottom: none; }
.related-desc { flex: 1; }

/* Add/Remove button on each related-services row. Compact, secondary look so
   it reads as an action on the suggestion rather than a primary CTA. */
.btn-related-add {
  background: var(--bg-card);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.375rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.btn-related-add:hover { background: var(--primary); color: white; }
.btn-related-add.added {
  background: var(--bg-muted, #eef);
  border-color: var(--text-muted);
  color: var(--text-muted);
}
.btn-related-add.added:hover {
  background: #fee;
  border-color: #c33;
  color: #c33;
}

.related-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Sub-line under a summary value, used to list extra services beneath the
   primary one. Reads as a continuation, not a separate row. */
.summary-subline {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Buttons */
.mt-4 { margin-top: 1.5rem; }

.btn {
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s;
}

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

.btn.secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn.secondary:hover {
  background: var(--bg-hover);
}

/* DOB and consent on new-client form */
.dob-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-main);
}
.dob-hint {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.85rem;
}
.client-form input[type="date"] {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  margin-bottom: 1rem;
  color-scheme: dark;
}
.consent-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
  line-height: 1.4;
}
.consent-row + .consent-row {
  border-top: 1px solid var(--border);
}
.consent-row input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: var(--primary);
}
.consent-row a {
  color: var(--primary);
  text-decoration: underline;
}

.success-message {
  text-align: center;
  padding: 3rem 0;
}
.success-icon {
  width: 80px;
  height: 80px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem auto;
}

/* AI Style Concierge Box */
.ai-search-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 15px rgba(59, 130, 246, 0.1);
}

.ai-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.ai-badge {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ai-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ai-input-wrap {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ai-input-wrap input {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ai-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.btn-ai-search {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-ai-search:hover {
  opacity: 0.92;
}
.btn-ai-search:active {
  transform: scale(0.98);
}

.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  padding: 0.35rem 0.7rem;
  border-radius: 16px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: white;
}

.divider-text {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 1.5rem 0 1rem 0;
}
.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.divider-text span {
  padding: 0 0.75rem;
}

/* AI Matched Service Cards */
.ai-match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.25rem 0.75rem 0.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #93c5fd;
}

.btn-clear-matches {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

.card.ai-card {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(49, 46, 129, 0.2));
}

.badge-recommended {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  margin-left: 0.4rem;
}

.ai-rationale {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.4rem;
  line-height: 1.35;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

/* Slot Badges */
.time-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  position: relative;
}

.time-slot.optimal {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.slot-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-optimal {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.badge-popular {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.tip-subtext {
  color: #cbd5e1;
  font-weight: 400;
  font-size: 0.85rem;
}

/* Quick Rebook & Frequent Stylist/Service Styles */
.quick-rebook-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 15px rgba(16, 185, 129, 0.15);
  animation: fadeIn 0.3s ease;
}

.quick-rebook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.quick-rebook-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.quick-rebook-visits {
  font-size: 0.8rem;
  color: #94a3b8;
}

.quick-rebook-content {
  margin-bottom: 1rem;
}

.quick-rebook-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 0.35rem;
}

.quick-rebook-desc {
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.quick-rebook-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-quick-rebook {
  background: linear-gradient(135deg, #10b981, #0d9488);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-quick-rebook:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
  filter: brightness(1.05);
}

.quick-frequent-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.2);
}

.quick-frequent-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: 100%;
}

.chip-frequent {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #bfdbfe;
  padding: 0.35rem 0.75rem;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-frequent:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.chip-addon {
  background: rgba(30, 41, 59, 0.8);
  border: 1px dashed rgba(16, 185, 129, 0.5);
  color: #a7f3d0;
  padding: 0.35rem 0.75rem;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.chip-addon:hover {
  background: rgba(16, 185, 129, 0.2);
  border-style: solid;
  border-color: #10b981;
  color: white;
}

.chip-addon.active {
  background: rgba(16, 185, 129, 0.3);
  border-style: solid;
  border-color: #10b981;
  color: #ecfdf5;
  font-weight: 600;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.badge-usual-stylist {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.card.highlighted-usual {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(6, 78, 59, 0.18));
}



