:root {
  color-scheme: light;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbeafe;
  --line: #e2e8f0;
  --surface: #ffffff;
  --soft: #f8fbff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef6ff 0%, #f8fbff 42%, #ffffff 100%);
}

.booking-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 24px auto;
}

.booking-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  padding: 22px;
}

.clinic-header {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.clinic-logo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.clinic-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1, h2, p { margin: 0; }
h1 { font-size: 26px; font-weight: 900; }
.clinic-header p { margin-top: 5px; color: var(--muted); font-size: 14px; }

.booking-message {
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 800;
  margin-top: 14px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.payment-verify-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(8px);
}

.payment-verify-overlay[hidden] {
  display: none;
}

.payment-verify-card {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  border-radius: 22px;
  padding: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
  text-align: center;
}

.payment-verify-spinner {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 5px solid #dbeafe;
  border-top-color: #2563eb;
  animation: verify-spin 850ms linear infinite;
}

.payment-verify-card h2 {
  max-width: 430px;
  color: #0f172a;
  font-size: clamp(20px, 4vw, 26px);
  line-height: 1.25;
}

.payment-verify-card p {
  color: #b91c1c;
  font-size: 15px;
  font-weight: 900;
}

.payment-verify-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 13px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

body.is-verifying-payment {
  overflow: hidden;
}

body.is-verifying-payment .wizard-actions button,
body.is-verifying-payment .step-pill {
  pointer-events: none;
}

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

.booking-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 18px 0;
}

button, .primary-action {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

button:disabled { opacity: 0.55; cursor: not-allowed; }
.primary-action { border-color: var(--blue); background: var(--blue); color: #fff; }
.primary-action:hover { background: var(--blue-dark); }

.step-pill {
  min-height: 48px;
  justify-content: flex-start;
  background: #f8fafc;
  color: #475569;
}

.step-pill span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
}

.step-pill.is-active {
  border-color: var(--blue);
  background: #eff6ff;
  color: var(--blue-dark);
}

.step-pill.is-active span,
.step-pill.is-complete span {
  background: var(--blue);
  color: #fff;
}

.wizard-step { display: none; }
.wizard-step.is-active { display: block; }

.step-header {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.step-header > span {
  color: var(--blue);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
}

.step-header h2 {
  font-size: 22px;
  font-weight: 900;
}

.step-header p {
  color: var(--muted);
  font-size: 14px;
}

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 12px;
}

.booking-helper-card {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.helper-copy {
  display: grid;
  gap: 6px;
}

.helper-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.helper-copy h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
}

.helper-copy p {
  max-width: 820px;
  margin: 0;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.visit-reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visit-reason-chip {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 13px;
  background: #fff;
  color: #334155;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.visit-reason-chip:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.visit-reason-chip.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.compact-field {
  max-width: 520px;
}

.urgent-care-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 900;
  line-height: 1.45;
}

.urgent-care-alert i {
  margin-top: 2px;
}

.doctor-suggestion-panel {
  display: grid;
  gap: 10px;
}

.helper-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
}

.helper-empty.warning {
  border-style: solid;
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.suggestion-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}

.suggestion-heading strong {
  color: #0f172a;
  font-size: 15px;
}

.suggestion-heading span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.doctor-suggestion-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.doctor-suggestion-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 118px;
  padding: 13px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #fff;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.doctor-suggestion-card:hover {
  transform: translateY(-2px);
  border-color: #60a5fa;
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.12);
}

.doctor-suggestion-card span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.doctor-suggestion-card em {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.doctor-suggestion-card strong,
.doctor-suggestion-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doctor-suggestion-card strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.doctor-suggestion-card small {
  color: #64748b;
  font-weight: 800;
}

.doctor-suggestion-card b {
  grid-column: 1 / -1;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}

.doctor-card {
  min-height: 126px;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 16px;
  background: #fff;
}

.doctor-card strong {
  font-size: 17px;
}

.doctor-card span,
.doctor-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.doctor-card.is-selected {
  border-color: var(--blue);
  background: #eff6ff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.12);
}

.date-card,
.payment-card,
.patient-form {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.date-card {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(280px, 1fr);
  gap: 14px;
  align-items: end;
}

.field { display: grid; gap: 7px; }
label { color: #334155; font-size: 13px; font-weight: 800; }
label span { color: var(--muted); font-weight: 600; }

input, textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 12px 13px;
  outline: none;
}

textarea { resize: vertical; }
input:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.doctor-fee {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  padding: 13px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.doctor-fee span,
.payment-row span,
.confirmation-details span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.doctor-fee strong,
.payment-row strong,
.confirmation-details strong {
  color: var(--text);
  font-size: 15px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#slotSummary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

#slotSummary strong { color: var(--text); }

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.slot-button {
  min-height: 76px;
  align-items: flex-start;
  flex-direction: column;
  padding: 10px 12px;
}

.slot-button strong { font-size: 16px; }
.slot-button span { font-size: 12px; color: var(--muted); }
.slot-button small { font-size: 11px; color: var(--muted); font-weight: 800; }
.slot-button.available { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.slot-button.selected { border-color: var(--blue); background: #dbeafe; color: var(--blue-dark); }
.slot-button.booked, .slot-button.holiday, .slot-button.doctor-leave, .slot-button.first-half-leave, .slot-button.second-half-leave, .slot-button.break, .slot-button.past-time { background: #f8fafc; color: #64748b; }
.slot-button.booked { border-color: #fed7aa; }
.slot-button.holiday, .slot-button.doctor-leave, .slot-button.first-half-leave, .slot-button.second-half-leave { border-color: #fecaca; }

.slot-alert,
.empty-state {
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.patient-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.span-2 { grid-column: span 2; }

.payment-card {
  display: grid;
  gap: 10px;
}

.booking-payment-helper {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  color: #334155;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08);
}

.booking-payment-helper i {
  margin-top: 3px;
  color: #2563eb;
}

.booking-payment-helper strong {
  color: #0f172a;
  font-weight: 950;
}

.payment-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 10px;
}

.payment-card p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.success-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 6px 11px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 900;
}

.confirmation-panel {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.confirmation-panel h2 { margin-top: 10px; font-size: 20px; }

.confirmation-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.confirmation-details div {
  display: grid;
  gap: 4px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  min-width: 280px;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}

.booking-summary {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.booking-summary div,
.payment-summary-card,
.confirmation-details div {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.booking-summary div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.booking-summary span,
.payment-summary-card span,
.payment-hero span,
.patient-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.booking-summary strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-pill {
  position: relative;
  overflow: hidden;
}

.step-pill.is-complete {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.step-pill.is-complete span {
  background: #16a34a;
  color: #fff;
}

.doctor-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 216px;
  border-color: #dbeafe;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.doctor-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.1);
}

.doctor-card.is-selected {
  border-color: #2563eb;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  box-shadow: 0 22px 50px rgba(37, 99, 235, 0.16);
}

.doctor-selected-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 9px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 900;
}

.doctor-card.is-selected .doctor-selected-badge { display: inline-flex; }

.doctor-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 80px;
}

.doctor-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  box-shadow: inset 0 -10px 20px rgba(15, 23, 42, 0.14);
}

.doctor-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.doctor-identity strong {
  font-size: 18px;
  line-height: 1.2;
}

.doctor-identity span {
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
}

.doctor-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doctor-meta-row em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 9px;
  background: #eef6ff;
  color: #334155;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.doctor-availability {
  display: inline-flex;
  align-items: center;
  justify-self: flex-start;
  gap: 7px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 950;
}

.doctor-availability i { font-size: 8px; }
.doctor-availability.is-live { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }

.doctor-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.doctor-card {
  grid-template-rows: auto 1fr auto;
  min-height: 284px;
  height: 100%;
  padding: 18px;
  border-radius: 18px;
  outline: 0;
}

.doctor-card:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 18px 42px rgba(15, 23, 42, 0.1);
}

.doctor-card.is-selected {
  border-width: 2px;
  box-shadow: 0 22px 52px rgba(37, 99, 235, 0.2);
}

.doctor-card-top {
  align-items: flex-start;
  min-height: 112px;
}

.doctor-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.95) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 82%, rgba(255, 255, 255, 0.95) 0 25%, transparent 26%),
    linear-gradient(135deg, #2563eb, #0f766e);
}

.doctor-avatar i {
  color: rgba(255, 255, 255, 0.92);
  font-size: 28px;
}

.doctor-avatar small {
  position: absolute;
  right: -4px;
  bottom: -5px;
  min-width: 28px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 950;
}

.doctor-avatar.has-photo {
  background: #eff6ff;
}

.doctor-avatar.has-photo img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.doctor-identity {
  min-height: 104px;
}

.doctor-identity strong {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.doctor-specialty,
.doctor-type {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doctor-specialty {
  color: #1e293b;
  font-weight: 900;
}

.doctor-type {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.doctor-meta-row {
  align-content: flex-start;
  min-height: 88px;
}

.doctor-meta-row:empty {
  display: none;
}

.doctor-meta-row em {
  min-height: 34px;
  max-width: 100%;
  white-space: normal;
}

.doctor-availability {
  min-height: 38px;
  margin-top: 2px;
  color: #166534;
}

.date-picker-panel {
  display: grid;
  gap: 10px;
}

.quick-date-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.date-chip {
  min-height: 58px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 2px;
  padding: 9px 11px;
  border-color: #dbeafe;
  background: #f8fbff;
}

.date-chip strong { font-size: 13px; }
.date-chip span { color: #64748b; font-size: 12px; font-weight: 800; }
.date-chip.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.doctor-fee {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: stretch;
}

.doctor-fee div {
  display: grid;
  align-content: center;
  gap: 4px;
}

.slot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.legend-item i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-item.available i { background: #16a34a; }
.legend-item.booked i { background: #2563eb; }
.legend-item.surgery i { background: #7c3aed; }
.legend-item.leave i { background: #f97316; }
.legend-item.emergency i { background: #dc2626; }
.legend-item.meeting i { background: #111827; }
.legend-item.holiday i { background: #94a3b8; }
.legend-item.blocked i { background: #64748b; }

.slot-button {
  border-width: 1px;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.slot-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
}

.slot-button.available { border-color: #86efac; background: #f0fdf4; color: #166534; }
.slot-button.booked { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.slot-button.surgery { border-color: #c4b5fd; background: #f5f3ff; color: #6d28d9; }
.slot-button.leave { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.slot-button.emergency { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.slot-button.meeting { border-color: #cbd5e1; background: #111827; color: #f8fafc; }
.slot-button.holiday { border-color: #e2e8f0; background: #f8fafc; color: #475569; }
.slot-button.blocked,
.slot-button.break,
.slot-button.past-time { border-color: #cbd5e1; background: #f1f5f9; color: #475569; }
.slot-button.selected { border-color: #2563eb; background: #dbeafe; color: #1d4ed8; box-shadow: 0 14px 30px rgba(37, 99, 235, 0.14); }
.slot-button.meeting span,
.slot-button.meeting small { color: #d1d5db; }

.patient-form {
  gap: 16px;
  padding: 18px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.patient-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
}

.patient-summary i {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #2563eb;
  color: #fff;
}

.patient-summary div { display: grid; gap: 2px; }
.patient-summary strong { font-size: 14px; }

.payment-card {
  border: 0;
  padding: 0;
  background: transparent;
}

.payment-hero {
  display: grid;
  gap: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(135deg, #eff6ff, #ffffff 58%, #f0fdfa);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.1);
}

.payment-hero strong {
  color: #0f172a;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
}

.payment-hero em {
  justify-self: flex-start;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.status-pending { background: #fff7ed; color: #c2410c; }
.status-muted { background: #f1f5f9; color: #475569; }

.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.payment-summary-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 15px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.payment-summary-card.highlight {
  border-color: #86efac;
  background: #f0fdf4;
}

.payment-summary-card strong {
  color: #0f172a;
  font-size: 20px;
}

.confirmation-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4, #ffffff 52%, #eff6ff);
  box-shadow: 0 24px 54px rgba(22, 163, 74, 0.12);
}

.success-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  background: #16a34a;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 16px 32px rgba(22, 163, 74, 0.22);
}

.confirmation-panel h2 {
  margin-top: 10px;
  font-size: 26px;
}

.confirmation-details div {
  position: relative;
  min-height: 98px;
  padding: 13px 13px 13px 44px;
  border-color: #dbeafe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.confirmation-details div > i {
  position: absolute;
  top: 14px;
  left: 13px;
  color: #2563eb;
}

.confirmation-actions {
  align-content: flex-start;
}

.confirmation-actions > * {
  width: 100%;
}

.wizard-actions {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin: 20px -22px -22px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
  .booking-steps { grid-template-columns: repeat(3, 1fr); }
  .booking-summary,
  .payment-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doctor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doctor-suggestion-list { grid-template-columns: 1fr; }
  .suggestion-heading { align-items: flex-start; flex-direction: column; }
  .date-card,
  .patient-form,
  .confirmation-details { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .confirmation-panel { align-items: stretch; grid-template-columns: 1fr; }
  .confirmation-actions { justify-content: stretch; min-width: 0; }
  .confirmation-actions > * { flex: 1 1 180px; }
}

@media (max-width: 580px) {
  .booking-shell { width: 100%; margin: 0; }
  .booking-card { border-radius: 0; min-height: 100vh; padding: 16px; }
  .clinic-header { align-items: flex-start; }
  .booking-steps { grid-template-columns: 1fr 1fr; }
  .booking-summary { position: static; grid-template-columns: 1fr 1fr; }
  .quick-date-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .booking-helper-card { padding: 14px; border-radius: 16px; }
  .visit-reason-chips { display: grid; grid-template-columns: 1fr 1fr; }
  .visit-reason-chip { width: 100%; padding: 0 9px; }
  .doctor-suggestion-card { grid-template-columns: auto minmax(0, 1fr); }
  .booking-payment-helper { font-size: 14px; }
  .doctor-grid { grid-template-columns: 1fr; }
  .doctor-card { min-height: 0; }
  .doctor-card-top { padding-right: 0; }
  .doctor-selected-badge { position: static; justify-self: flex-start; order: -1; }
  .payment-summary-grid { grid-template-columns: 1fr; }
  .step-pill { font-size: 12px; padding: 0 10px; }
  .wizard-actions { flex-direction: column; margin: 18px -16px -16px; padding: 12px 16px; }
  .wizard-actions > * { width: 100%; }
}

@media print {
  body { background: #fff; }
  .booking-steps,
  .wizard-actions,
  .confirmation-actions,
  .booking-message { display: none !important; }
  .booking-shell { width: 100%; margin: 0; }
  .booking-card { border: 0; box-shadow: none; }
}
