/* ─── Appointment Hub ─────────────────────────────────────── */

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

body {
  background: #f5f0eb;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: #1a2332;
  min-height: 100vh;
}

.ah-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 16px 80px;
}

/* Header */
.ah-header {
  text-align: center;
  margin-bottom: 32px;
}
.ah-brand {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #1a2332;
  line-height: 1.2;
}
.ah-tagline {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #6b7a8d;
}
.ah-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
.ah-logo img {
  max-height: 72px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Progress */
.ah-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}
.ah-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ah-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #c8c4bf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #b0aaa3;
  background: transparent;
  transition: all 0.2s;
}
.ah-step-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: #b0aaa3;
  font-weight: 600;
  transition: color 0.2s;
}
.ah-step.active .ah-step-num {
  background: #1a2332;
  border-color: #1a2332;
  color: #fff;
}
.ah-step.active .ah-step-label {
  color: #1a2332;
}
.ah-step.done .ah-step-num {
  background: #1a2332;
  border-color: #1a2332;
  color: #fff;
}
.ah-step.done .ah-step-label {
  color: #1a2332;
}
.ah-step-line {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: #d8d3cd;
  margin: 0 8px;
  margin-bottom: 16px;
}

/* Card */
.ah-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

/* Panel */
.ah-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.ah-panel-title {
  font-size: 1.55rem;
  font-weight: 600;
  color: #1a2332;
  letter-spacing: -0.3px;
}
.ah-panel-sub {
  margin-top: 4px;
  font-size: 0.88rem;
  color: #8a8f97;
}
.ah-empty {
  text-align: center;
  color: #8a8f97;
  padding: 40px 0;
}

/* Provider select */
.ah-provider-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}
.ah-provider-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #8a8f97;
}
.ah-select {
  padding: 8px 32px 8px 12px;
  border: 1.5px solid #e0dbd4;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1a2332;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231a2332' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
}
.ah-select:focus {
  border-color: #1a2332;
}

/* Services Grid */
.ah-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.ah-service-card {
  position: relative;
  border: 1.5px solid #e8e3dd;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.ah-service-card:hover {
  border-color: #1a2332;
  box-shadow: 0 2px 10px rgba(26,35,50,0.08);
}
.ah-service-card.selected {
  border-color: #1a2332;
  box-shadow: 0 2px 12px rgba(26,35,50,0.1);
}
.ah-service-check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  color: #1a2332;
  opacity: 0;
  transition: opacity 0.18s;
}
.ah-service-card.selected .ah-service-check {
  opacity: 1;
}
.ah-service-check svg { width: 12px; height: 12px; }
.ah-service-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1a2332;
  margin-bottom: 4px;
  padding-right: 24px;
}
.ah-service-desc {
  font-size: 0.83rem;
  color: #8a8f97;
  margin-bottom: 10px;
  line-height: 1.4;
}
.ah-service-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ah-service-duration {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: #8a8f97;
}
.ah-service-duration svg { width: 13px; height: 13px; }

/* Step 2 */
.ah-service-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0ebe5;
}
.ah-summary-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a2332;
}
.ah-summary-duration {
  font-size: 0.85rem;
  color: #8a8f97;
}

.ah-time-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 24px 0 32px;
}

/* Calendar */
.ah-calendar-wrap {
  border: 1px solid #ede8e2;
  border-radius: 12px;
  padding: 20px;
}
.ah-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ah-cal-nav {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #1a2332;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.ah-cal-nav:hover { background: #f0ebe5; }
.ah-cal-month {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #1a2332;
}
.ah-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}
.ah-cal-dow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a8f97;
  padding: 4px 0;
}
.ah-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.ah-cal-day {
  text-align: center;
  padding: 7px 2px;
  font-size: 0.85rem;
  color: #1a2332;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.ah-cal-day:hover:not(.other-month):not(.disabled) {
  background: #f0ebe5;
}
.ah-cal-day.other-month { color: #ccc9c4; cursor: default; }
.ah-cal-day.disabled { color: #ccc9c4; cursor: default; }
.ah-cal-day.today { font-weight: 700; }
.ah-cal-day.selected {
  background: #1a2332;
  color: #fff;
  border-radius: 6px;
}

/* Slots */
.ah-slots-wrap { padding-top: 4px; }
.ah-slots-date {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a2332;
  margin-bottom: 14px;
  min-height: 24px;
}
.ah-slots-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ah-slot-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 6px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #e0dbd4;
  margin-bottom: 6px;
}
.ah-slot-group-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1a2332;
}
.ah-slot-group-count {
  font-size: 0.78rem;
  color: #8a8f97;
  flex: 1;
}
.ah-slot-group-chevron {
  font-size: 0.7rem;
  color: #8a8f97;
}
.ah-slot-subgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.ah-slot-btn {
  border: 1.5px solid #e0dbd4;
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #1a2332;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.ah-slot-btn:hover { border-color: #1a2332; }
.ah-slot-btn.selected {
  background: #1a2332;
  border-color: #1a2332;
  color: #fff;
}
.ah-slot-time {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
}
.ah-slot-provider {
  font-size: 0.68rem;
  font-weight: 400;
  color: #8a8f97;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ah-slot-btn.selected .ah-slot-provider {
  color: rgba(255, 255, 255, 0.7);
}
.ah-slots-empty {
  font-size: 0.88rem;
  color: #8a8f97;
  margin-top: 12px;
}
.ah-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #e0dbd4;
  border-top-color: #1a2332;
  border-radius: 50%;
  animation: ah-spin 0.7s linear infinite;
  margin: 20px auto;
}
@keyframes ah-spin { to { transform: rotate(360deg); } }

/* Step 3 */
.ah-details-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  margin-top: 8px;
}
.ah-field { margin-bottom: 18px; }
.ah-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #8a8f97;
  margin-bottom: 6px;
}
.ah-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e0dbd4;
  border-radius: 8px;
  font-size: 0.92rem;
  color: #1a2332;
  background: #faf8f6;
  outline: none;
  transition: border-color 0.15s;
}
.ah-input:focus { border-color: #1a2332; background: #fff; }
.ah-input::placeholder { color: #b0aaa3; }
.ah-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1.5px solid #e0dbd4;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 4px;
}
.ah-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #1a2332;
  cursor: pointer;
}
.ah-checkbox-row label {
  font-size: 0.88rem;
  color: #1a2332;
  cursor: pointer;
  line-height: 1.4;
}
.ah-checkbox-row label span {
  display: block;
  font-size: 0.8rem;
  color: #8a8f97;
  margin-top: 2px;
}
.ah-field-error {
  color: #c0392b;
  font-size: 0.82rem;
  margin-top: 10px;
}

/* Summary box */
.ah-summary-box {
  background: #f9f6f2;
  border-radius: 12px;
  padding: 20px;
}
.ah-summary-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a2332;
  margin-bottom: 16px;
}
.ah-summary-row { margin-bottom: 4px; }
.ah-summary-key {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #8a8f97;
  margin-bottom: 2px;
}
.ah-summary-val {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a2332;
}
.ah-summary-meta {
  display: block;
  font-size: 0.82rem;
  color: #8a8f97;
  margin-top: 1px;
}
.ah-summary-divider {
  height: 1px;
  background: #e8e3dd;
  margin: 14px 0;
}

/* Actions */
.ah-actions {
  display: flex;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #f0ebe5;
}
.ah-actions-right { justify-content: flex-end; }
.ah-actions-between { justify-content: space-between; }
.ah-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a2332;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.15s;
}
.ah-btn-primary:hover:not(:disabled) {
  opacity: 0.88;
  transform: translateY(-1px);
}
.ah-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ah-btn-arrow { font-size: 1.1rem; line-height: 1; }
.ah-btn-back {
  background: none;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #8a8f97;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}
.ah-btn-back:hover { color: #1a2332; }

/* Confirmation */
.ah-confirmation {
  text-align: center;
  padding: 60px 40px;
}
.ah-confirm-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
}
.ah-confirm-icon svg { width: 60px; height: 60px; }
.ah-confirm-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a2332;
  margin-bottom: 8px;
}
.ah-confirm-sub {
  font-size: 0.95rem;
  color: #6b7a8d;
  margin-bottom: 24px;
}
.ah-confirm-details {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  background: #f9f6f2;
  border-radius: 12px;
  padding: 20px 32px;
  text-align: left;
}
.ah-confirm-details span {
  font-size: 0.9rem;
  color: #1a2332;
}
.ah-confirm-details strong { font-weight: 600; }

/* Responsive */
@media (max-width: 600px) {
  .ah-card { padding: 24px 18px; }
  .ah-services-grid { grid-template-columns: 1fr; }
  .ah-time-layout { grid-template-columns: 1fr; }
  .ah-details-layout { grid-template-columns: 1fr; }
  .ah-brand { font-size: 1.8rem; }
  .ah-panel-header { flex-direction: column; }
  .ah-provider-wrap { width: 100%; }
}
