/* ── Clinician Booking System ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #0F766E;
  --primary-light: #14B8A6;
  --primary-pale: #CCFBF1;
  --primary-dark: #0A5C56;
  --primary-gradient: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
  --surface: #FFFFFF;
  --surface-alt: #F8FAFB;
  --surface-hover: #F0FDFA;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --success: #059669;
  --success-light: #D1FAE5;
  --info: #3B82F6;
  --info-light: #DBEAFE;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.12);
  --shadow-primary: 0 4px 14px rgba(15, 118, 110, 0.25);
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --transition: 0.2s ease;
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface-alt);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.3; }
h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

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

/* ── Animations ── */
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes checkmark {
  0% { stroke-dashoffset: 20; }
  100% { stroke-dashoffset: 0; }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.05); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

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

.animate-slide-up { animation: slideUp 0.4s ease both; }
.animate-fade-in { animation: fadeIn 0.3s ease both; }
.animate-scale-in { animation: scaleIn 0.3s ease both; }

/* Staggered children animations */
.stagger-children > * { animation: slideUp 0.4s ease both; }
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.10s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.30s; }

/* ── Loading States ── */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinnerRotate 0.6s linear infinite;
  display: inline-block;
}

.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
}

/* ── Layout ── */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-slow);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  object-fit: contain;
  background: var(--primary-pale);
  padding: 4px;
}

.sidebar-logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: var(--shadow-primary);
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

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

.sidebar-nav { padding: 1rem 0.75rem; flex: 1; overflow-y: auto; }

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 0.75rem 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 450;
  color: var(--text-secondary);
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
}

.nav-item:hover { background: var(--surface-hover); color: var(--text); }

.nav-item.active {
  background: var(--primary-pale);
  color: var(--primary-dark);
  font-weight: 550;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:focus-visible { outline: 2px solid var(--primary-light); outline-offset: -2px; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}

.admin-info { flex: 1; min-width: 0; }
.admin-name { font-size: 0.85rem; font-weight: 500; }
.admin-role { font-size: 0.7rem; color: var(--text-muted); }

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
  max-width: 1100px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  animation: slideUp 0.4s ease both;
}

.page-header h1 { color: var(--text); }

.page-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover { box-shadow: var(--shadow); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

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

.btn:active { transform: scale(0.97); }

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  box-shadow: var(--shadow-primary);
  filter: brightness(1.05);
}
.btn-primary:active { filter: brightness(0.95); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-alt); border-color: var(--text-muted); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.4rem 0.6rem;
}
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }

.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #B91C1C; box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.7rem 1.5rem; font-size: 0.95rem; }
.btn-icon { padding: 0.4rem; border-radius: 6px; }

.btn[disabled], .btn.loading {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.loading .btn-text { opacity: 0; }
.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinnerRotate 0.6s linear infinite;
}

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}

.form-input:hover, .form-select:hover, .form-textarea:hover {
  border-color: var(--text-muted);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
  background: white;
}

.form-input.error, .form-select.error, .form-textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.25rem;
  display: none;
}

.form-group.has-error .form-error { display: block; }
.form-group.has-error .form-input,
.form-group.has-error .form-select { border-color: var(--danger); }

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

/* ── Chips / Tags ── */
.chip-group { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 450;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  user-select: none;
}

.chip:hover { border-color: var(--primary-light); color: var(--primary); background: var(--surface-hover); }
.chip.selected { background: var(--primary-pale); border-color: var(--primary-light); color: var(--primary-dark); font-weight: 500; }
.chip svg { width: 14px; height: 14px; }

/* ── Table ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  background: var(--surface-alt);
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--surface-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 550;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #B45309; }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--primary-pale); color: var(--primary); }

/* Dot indicator for badges */
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 { font-family: var(--font-heading); }

.modal-body { padding: 1.5rem; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--surface-alt);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  animation: slideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 280px;
  max-width: 420px;
  pointer-events: auto;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }

.toast-dismiss {
  margin-left: auto;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.toast-dismiss:hover { opacity: 1; }

/* Toast exit animation */
.toast.removing {
  animation: slideOut 0.25s ease forwards;
}

@keyframes slideOut {
  to { opacity: 0; transform: translateX(30px); }
}

/* ── Login ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F0FDFA 0%, #E0F2FE 30%, #F5F3FF 60%, #F0FDFA 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative background circles */
.login-page::before,
.login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: var(--primary);
}

.login-page::before {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
}

.login-page::after {
  width: 400px;
  height: 400px;
  bottom: -150px;
  left: -100px;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.login-card h1 {
  text-align: center;
  margin-bottom: 0.35rem;
}

.login-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  animation: fadeIn 0.4s ease;
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 0.4rem; }
.empty-state p { font-size: 0.88rem; margin-bottom: 1.25rem; }

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}

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

.stat-card:hover::after { opacity: 1; }

.stat-card .stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.25rem;
}

/* ── Clinician Card ── */
.clinician-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.clinician-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.clinician-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.clinician-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.clinician-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: all var(--transition);
}

.clinician-card:hover .clinician-avatar {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-primary);
}

.clinician-name { font-weight: 600; font-size: 1rem; }
.clinician-specialty { font-size: 0.82rem; color: var(--text-secondary); }

.clinician-meta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.clinician-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.clinician-meta-row svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; color: var(--text-muted); }

.clinician-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
}

/* ── Booking Page ── */
.booking-page {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-alt) 100%);
}

.booking-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.booking-header img {
  height: 44px;
  object-fit: contain;
}

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

.booking-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  animation: slideUp 0.4s ease both;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 450;
  transition: all var(--transition);
}

.step-indicator.active { color: var(--primary); font-weight: 600; }
.step-indicator.completed { color: var(--success); }

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all var(--transition-slow);
}

.step-indicator.active .step-number {
  border-color: var(--primary);
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-primary);
}

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

.step-divider {
  width: 30px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  transition: background var(--transition);
}

.step-indicator.completed + .step-divider,
.step-divider:has(+ .step-indicator.active),
.step-divider:has(+ .step-indicator.completed) {
  background: var(--success);
}

.booking-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.4s ease both;
  position: relative;
}

.booking-card h2 { margin-bottom: 0.35rem; }
.booking-card .subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* Specialist selection cards */
.specialist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.specialist-option {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.specialist-option:hover {
  border-color: var(--primary-light);
  background: var(--surface-hover);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.specialist-option.selected {
  border-color: var(--primary);
  background: var(--primary-pale);
  box-shadow: var(--shadow-primary);
}

.specialist-option.selected::after {
  content: '';
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Checkmark via box shadow trick */
  box-shadow: inset -2px -1px 0 0 white, inset -4px -3px 0 0 white;
}

/* Time slots */
.date-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

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

.slot-btn {
  padding: 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
  text-align: center;
}

.slot-btn:hover {
  border-color: var(--primary-light);
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.slot-btn.selected {
  background: var(--primary-gradient);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}

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

/* Confirmation */
.confirmation-summary {
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-light);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  font-size: 0.9rem;
}

.summary-row:not(:last-child) { border-bottom: 1px solid var(--border-light); }
.summary-label { color: var(--text-secondary); }
.summary-value { font-weight: 500; text-align: right; }

/* ── Calendar View ── */
.calendar-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 80px repeat(5, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-time {
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface-alt);
}

.calendar-cell {
  border-bottom: 1px solid var(--border-light);
  border-left: 1px solid var(--border-light);
  min-height: 48px;
  padding: 2px;
}

.calendar-event {
  background: var(--primary-pale);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  line-height: 1.3;
  cursor: pointer;
  transition: all var(--transition);
}

.calendar-event:hover { background: var(--primary-light); color: white; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .main-content { margin-left: 0; padding: 1.25rem; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .mobile-toggle {
    display: flex !important;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.55rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
  }
  .mobile-toggle:active { transform: scale(0.9); }
  .booking-container { padding: 1rem; }
  .booking-card { padding: 1.25rem; border-radius: var(--radius-lg); }
  .specialist-grid { grid-template-columns: 1fr; }
  .booking-steps { gap: 0.35rem; }
  .step-divider { width: 16px; }
  .toast-container { top: 0.75rem; right: 0.75rem; left: 0.75rem; }
  .toast { min-width: auto; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .clinician-grid { grid-template-columns: 1fr; }
}

.mobile-toggle { display: none; }

/* Sidebar overlay on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  z-index: 99;
}

@media (max-width: 768px) {
  .sidebar.open ~ .sidebar-overlay { display: block; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Utility ── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-xs { gap: 0.25rem; }
.gap-sm { gap: 0.4rem; }
.gap-md { gap: 0.75rem; }
.gap-lg { gap: 1.25rem; }
.mt-xs { margin-top: 0.25rem; }
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mb-sm { margin-bottom: 0.5rem; }
.mb-md { margin-bottom: 1rem; }
.mb-lg { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.hidden { display: none !important; }
.w-full { width: 100%; }
.flex-1 { flex: 1; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative { position: relative; }

/* Focus visible utilities */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .sidebar, .mobile-toggle, .toast-container, .modal-overlay, .btn { display: none !important; }
  .main-content { margin-left: 0; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
