/* Rwanda Health Connect — Design System v3 */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&display=swap');

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

:root {
  /* ── Blue scale ── */
  --blue-50:  #EFF6FF; --blue-100: #DBEAFE; --blue-200: #BFDBFE;
  --blue-400: #60A5FA; --blue-500: #3B82F6;
  --blue-600: #2563EB; --blue-700: #1D4ED8; --blue-800: #1E40AF;

  /* ── Teal/Cyan (medical trust accent) ── */
  --teal-50:  #F0FDFA; --teal-100: #CCFBF1; --teal-200: #99F6E4;
  --teal-500: #14B8A6; --teal-600: #0D9488; --teal-700: #0F766E;

  /* ── Green scale ── */
  --green-50: #F0FDF4; --green-100: #DCFCE7; --green-200: #BBF7D0;
  --green-500: #22C55E; --green-600: #16A34A; --green-700: #15803D;

  /* ── Red/Danger ── */
  --red-50: #FFF1F2; --red-100: #FFE4E6;
  --red-500: #EF4444; --red-600: #DC2626;

  /* ── Amber/Warning ── */
  --amber-50: #FFFBEB; --amber-100: #FEF3C7;
  --amber-500: #F59E0B; --amber-600: #D97706;

  /* ── Indigo ── */
  --indigo-50: #EEF2FF; --indigo-100: #E0E7FF;
  --indigo-500: #6366F1; --indigo-600: #4F46E5;

  /* ── Gray scale ── */
  --gray-50:  #F8FAFC; --gray-100: #F1F5F9; --gray-200: #E2E8F0;
  --gray-300: #CBD5E1; --gray-400: #94A3B8; --gray-500: #64748B;
  --gray-600: #475569; --gray-700: #334155; --gray-800: #1E293B;
  --gray-900: #0F172A;
  --white: #FFFFFF;

  /* ── Semantic tokens ── */
  --primary:         #2563EB;
  --primary-hover:   #1D4ED8;
  --primary-bg:      #EFF6FF;
  --primary-border:  #BFDBFE;
  --secondary:       #0D9488;
  --secondary-hover: #0F766E;
  --secondary-bg:    #F0FDFA;
  --danger:          #DC2626;
  --danger-bg:       #FFF1F2;
  --warning:         #D97706;
  --warning-bg:      #FFFBEB;

  /* ── Surface ── */
  --text:       #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --bg:         #F0F7FF;
  --surface:    #FFFFFF;
  --border:     #E2E8F0;

  /* ── Gradients ── */
  --grad-primary: linear-gradient(135deg, #2563EB 0%, #0D9488 100%);
  --grad-hero:    linear-gradient(150deg, #0f172a 0%, #1e3a8a 38%, #0c4a6e 70%, #0f766e 100%);
  --grad-success: linear-gradient(135deg, #16A34A 0%, #0D9488 100%);
  --grad-warm:    linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
  --grad-card:    linear-gradient(145deg, #FFFFFF 0%, #F8FAFF 100%);

  /* ── Shadows ── */
  --shadow-xs:      0 1px 2px rgb(15 23 42/5%);
  --shadow-sm:      0 2px 4px rgb(15 23 42/6%), 0 1px 2px rgb(15 23 42/4%);
  --shadow:         0 4px 8px rgb(15 23 42/6%), 0 2px 4px rgb(15 23 42/3%);
  --shadow-md:      0 8px 20px rgb(15 23 42/8%), 0 4px 8px rgb(15 23 42/4%);
  --shadow-lg:      0 20px 40px rgb(15 23 42/10%), 0 8px 16px rgb(15 23 42/5%);
  --shadow-xl:      0 32px 60px rgb(15 23 42/14%);
  --shadow-card:    0 2px 12px rgb(15 23 42/6%), 0 1px 3px rgb(15 23 42/4%);
  --shadow-primary: 0 6px 20px rgb(37 99 235/28%);
  --shadow-success: 0 6px 20px rgb(13 148 136/28%);

  /* ── Border radius ── */
  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius:     10px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-2xl: 36px;
  --radius-full: 9999px;

  /* ── Typography ── */
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;

  /* ── Motion ── */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --duration:    200ms;
  --transition:  var(--duration) var(--ease);
}

/* ════════════════════════════════════════
   Base
════════════════════════════════════════ */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}
img     { display: block; max-width: 100%; }
a       { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }
ul      { list-style: none; }
button  { font-family: var(--font); }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-900);
  letter-spacing: -0.025em;
}
h1 { font-size: clamp(1.875rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p  { color: var(--gray-600); line-height: 1.7; }
small { font-size: 0.8125rem; }

/* ════════════════════════════════════════
   Layout
════════════════════════════════════════ */
.container    { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { width: 100%; max-width: 480px;  margin: 0 auto; padding: 0 1.5rem; }
.container-md { width: 100%; max-width: 720px;  margin: 0 auto; padding: 0 1.5rem; }

/* ════════════════════════════════════════
   Navbar
════════════════════════════════════════ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226,232,240,0.8);
  box-shadow: 0 1px 0 rgba(15,23,42,0.04);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px; padding: 0 1.5rem;
  max-width: 1200px; margin: 0 auto;
}
.navbar-brand {
  display: flex; align-items: center; gap: 0.625rem;
  font-weight: 800; font-size: 1.0625rem; color: var(--gray-900);
  text-decoration: none; letter-spacing: -0.03em;
}
.navbar-brand:hover { color: var(--primary); }
.navbar-brand-icon {
  width: 36px; height: 36px;
  background: var(--grad-primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
  box-shadow: 0 2px 8px rgb(37 99 235/30%);
}
.navbar-brand-icon svg { width: 18px; height: 18px; }
.navbar-links { display: flex; align-items: center; gap: 0.25rem; }
.navbar-links a {
  padding: 0.5rem 0.875rem; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500; color: var(--gray-600);
  transition: all var(--transition);
}
.navbar-links a:hover  { background: var(--gray-100); color: var(--gray-900); }
.navbar-links a.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.navbar-cta   { display: flex; align-items: center; gap: 0.75rem; }
.navbar-toggle {
  display: none; cursor: pointer; background: none; border: none; padding: 0.5rem;
  border-radius: var(--radius-sm);
}
.navbar-toggle span {
  display: block; width: 22px; height: 2px; background: var(--gray-700);
  transition: all var(--transition); margin: 5px 0; border-radius: 2px;
}

/* ── Mobile menu ── */
.mobile-menu {
  display: none; position: fixed; inset: 66px 0 0 0; z-index: 99;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem; flex-direction: column; gap: 0.375rem;
  box-shadow: var(--shadow-lg); overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1rem; border-radius: var(--radius);
  font-size: 0.9375rem; font-weight: 500; color: var(--gray-700);
  transition: all var(--transition); border: 1px solid transparent;
}
.mobile-menu a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.mobile-menu a:hover { background: var(--gray-100); border-color: var(--border); }
.mobile-menu a.active-link { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-border); }

/* ════════════════════════════════════════
   Buttons
════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem; border-radius: var(--radius); border: none;
  font-family: var(--font); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all var(--transition);
  white-space: nowrap; line-height: 1.4; letter-spacing: -0.01em;
  position: relative;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn:disabled      { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-sm  { padding: 0.4rem 0.875rem; font-size: 0.8125rem; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg  { padding: 0.875rem 1.875rem; font-size: 1rem; border-radius: var(--radius-md); }
.btn-lg svg { width: 18px; height: 18px; }
.btn-full{ width: 100%; }

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 2px 8px rgb(37 99 235/22%);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
  color: white;
}
.btn-primary:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 4px rgb(37 99 235/15%); }

.btn-secondary {
  background: var(--grad-success);
  color: white;
  box-shadow: 0 2px 8px rgb(13 148 136/22%);
}
.btn-secondary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-success);
  color: white;
}
.btn-secondary:active:not(:disabled) { transform: translateY(1px); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover:not(:disabled) {
  background: var(--primary-bg);
  color: var(--primary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--gray-100);
  color: var(--gray-900);
}
.btn-ghost:active:not(:disabled) { background: var(--gray-200); }

/* Subtle bordered button — secondary action on light backgrounds */
.btn-soft {
  background: transparent;
  color: var(--gray-700);
  border: 1.5px solid var(--border);
}
.btn-soft:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-900);
}
.btn-soft:active:not(:disabled) { background: var(--gray-100); transform: scale(0.97); }

.btn-danger {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  color: white;
}
.btn-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgb(220 38 38/30%);
}
.btn-danger:active:not(:disabled) { transform: translateY(1px); }

/* ── Hero / dark-background button variants ── */
.btn-white {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18), 0 1px 4px rgba(0,0,0,0.1);
}
.btn-white:hover:not(:disabled) {
  background: #f0f4ff;
  color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
}
.btn-white:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 2px 8px rgba(0,0,0,0.14); }

.btn-glass {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-glass:hover:not(:disabled) {
  background: rgba(255,255,255,0.22);
  color: white;
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-1px);
}
.btn-glass:active:not(:disabled) { transform: translateY(1px); background: rgba(255,255,255,0.18); }

.btn-loading { pointer-events: none; }
.btn-loading::after {
  content: ''; position: absolute; right: 1rem;
  width: 14px; height: 14px;
  border: 2px solid transparent; border-top-color: currentColor;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}

/* ── Amazing landing CTA pill buttons ── */
@keyframes shimmer-sweep {
  0%   { left: -100%; }
  100% { left: 220%; }
}
@keyframes cta-glow-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(255,255,255,0.22), 0 2px 8px rgba(0,0,0,0.12); }
  50%       { box-shadow: 0 4px 36px rgba(255,255,255,0.48), 0 2px 8px rgba(0,0,0,0.12); }
}

/* White pill — primary action on dark/gradient backgrounds */
.btn-cta-primary {
  display: inline-flex; align-items: center; gap: 0.625rem;
  position: relative; overflow: hidden;
  background: #ffffff; color: #1d4ed8;
  font-family: var(--font); font-weight: 800; font-size: 1rem;
  padding: 0.9375rem 2.25rem; border-radius: 9999px; border: none;
  box-shadow: 0 4px 20px rgba(255,255,255,0.22), 0 2px 8px rgba(0,0,0,0.12);
  letter-spacing: -0.02em; cursor: pointer; text-decoration: none;
  transition: transform 0.22s cubic-bezier(.22,.61,.36,1), box-shadow 0.22s ease, color 0.15s ease;
  white-space: nowrap;
  animation: cta-glow-pulse 2.8s ease-in-out infinite;
}
.btn-cta-primary svg { width: 19px; height: 19px; flex-shrink: 0; }
.btn-cta-primary::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.75), transparent);
  animation: shimmer-sweep 3.8s ease infinite;
  pointer-events: none;
}
.btn-cta-primary:hover {
  color: #1e40af;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 44px rgba(255,255,255,0.44), 0 4px 14px rgba(0,0,0,0.18);
  animation: none;
}
.btn-cta-primary:active  { transform: translateY(-1px) scale(1.01); }
.btn-cta-primary:focus-visible { outline: 3px solid rgba(255,255,255,0.8); outline-offset: 3px; }

/* Glass pill — secondary action on dark/gradient backgrounds */
.btn-cta-glass {
  display: inline-flex; align-items: center; gap: 0.625rem;
  position: relative; overflow: hidden;
  background: rgba(255,255,255,0.08); color: white;
  font-family: var(--font); font-weight: 700; font-size: 1rem;
  padding: 0.9375rem 2.25rem; border-radius: 9999px;
  border: 2px solid rgba(255,255,255,0.45);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  letter-spacing: -0.015em; cursor: pointer; text-decoration: none;
  transition: all 0.22s cubic-bezier(.22,.61,.36,1);
  white-space: nowrap;
}
.btn-cta-glass svg { width: 19px; height: 19px; flex-shrink: 0; }
.btn-cta-glass:hover {
  color: white;
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.72);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 32px rgba(0,0,0,0.24), 0 0 0 4px rgba(255,255,255,0.08);
}
.btn-cta-glass:active  { transform: translateY(-1px) scale(1.01); }
.btn-cta-glass:focus-visible { outline: 3px solid rgba(255,255,255,0.7); outline-offset: 3px; }

/* Gradient pill — primary action on white/light backgrounds */
.btn-cta-action {
  display: inline-flex; align-items: center; gap: 0.625rem;
  position: relative; overflow: hidden;
  background: var(--grad-primary); color: white;
  font-family: var(--font); font-weight: 800; font-size: 1.0625rem;
  padding: 1rem 2.5rem; border-radius: 9999px; border: none;
  box-shadow: 0 4px 20px rgb(37 99 235 / 32%);
  letter-spacing: -0.02em; cursor: pointer; text-decoration: none;
  transition: transform 0.22s cubic-bezier(.22,.61,.36,1), box-shadow 0.22s ease;
  white-space: nowrap;
}
.btn-cta-action svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-cta-action::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer-sweep 4s ease infinite;
  pointer-events: none;
}
.btn-cta-action:hover {
  color: white;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 44px rgb(37 99 235 / 48%);
}
.btn-cta-action:active  { transform: translateY(-1px) scale(1.01); }
.btn-cta-action:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

@media (max-width: 480px) {
  .btn-cta-primary, .btn-cta-glass { width: 100%; justify-content: center; padding: 1rem 1.5rem; }
  .btn-cta-action { padding: 0.9375rem 2rem; font-size: 1rem; }
}

/* ════════════════════════════════════════
   Form Elements
════════════════════════════════════════ */
.form-group { margin-bottom: 1.375rem; }
.form-label {
  display: block; font-size: 0.875rem; font-weight: 600;
  color: var(--gray-700); margin-bottom: 0.5rem; letter-spacing: -0.01em;
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-input, .form-select, .form-textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: 0.9375rem; color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none; -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(37 99 235/10%);
}
.form-input::placeholder { color: var(--gray-400); }
.form-input.error { border-color: var(--danger); }
.form-input.error:focus { box-shadow: 0 0 0 3px rgb(220 38 38/10%); }
.form-hint  { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.375rem; }
.form-error { font-size: 0.8125rem; color: var(--danger); margin-top: 0.375rem; display: none; font-weight: 500; }
.form-error.show { display: block; }

.input-group { display: flex; }
.input-group .input-prefix {
  display: flex; align-items: center; padding: 0 0.875rem;
  background: var(--gray-100); border: 1.5px solid var(--border);
  border-right: none; border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.875rem; color: var(--gray-600); font-weight: 500; white-space: nowrap;
  gap: 0.375rem;
}
.input-group .form-input { border-radius: 0 var(--radius) var(--radius) 0; flex: 1; }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.875rem center; background-size: 1rem;
  padding-right: 2.75rem; cursor: pointer;
}

/* ════════════════════════════════════════
   Cards
════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.card-lg     { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.card-body   { padding: 1.5rem; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.card-footer {
  padding: 1.25rem 1.5rem; border-top: 1px solid var(--border);
  background: var(--gray-50);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ── Stat Cards ── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: all 0.25s var(--ease);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--grad-primary);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.stat-card .stat-icon svg { width: 22px; height: 22px; }
.stat-card .stat-value {
  font-size: 2rem; font-weight: 800; color: var(--gray-900);
  line-height: 1; margin-bottom: 0.375rem; letter-spacing: -0.03em;
}
.stat-card .stat-label { font-size: 0.8125rem; color: var(--text-muted); font-weight: 500; }

/* ════════════════════════════════════════
   Icon utilities
════════════════════════════════════════ */
.icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon svg { width: 1em; height: 1em; }

/* Feature icon color variants */
.feature-icon { width: 56px; height: 56px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.feature-icon svg { width: 26px; height: 26px; }
.feature-icon-blue   { background: var(--blue-50);   color: var(--blue-600); }
.feature-icon-green  { background: var(--green-50);  color: var(--green-600); }
.feature-icon-amber  { background: var(--amber-50);  color: var(--amber-600); }
.feature-icon-teal   { background: var(--teal-50);   color: var(--teal-600); }
.feature-icon-red    { background: var(--red-50);    color: var(--red-600, #DC2626); }
.feature-icon-indigo { background: var(--indigo-50); color: var(--indigo-600); }

/* Step icon circle */
.step-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.125rem; color: white;
  box-shadow: 0 6px 20px rgb(37 99 235/30%);
  transition: transform 0.3s var(--ease);
}
.step-icon svg { width: 28px; height: 28px; }

/* Sidebar icon */
.nav-icon-svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Stat card icon — color variants (kept for backward compat) */
.stat-icon-blue   { background: var(--blue-100);  color: var(--blue-700); }
.stat-icon-green  { background: var(--green-100); color: var(--green-700); }
.stat-icon-amber  { background: var(--amber-100); color: var(--amber-600); }
.stat-icon-red    { background: var(--red-100);   color: var(--red-600, #DC2626); }

/* ════════════════════════════════════════
   Badges
════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.25rem 0.75rem; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; white-space: nowrap; letter-spacing: 0.01em;
}
.badge-blue  { background: #DBEAFE; color: #1D4ED8; }
.badge-green { background: #DCFCE7; color: #15803D; }
.badge-red   { background: #FFE4E6; color: #DC2626; }
.badge-amber { background: #FEF3C7; color: #D97706; }
.badge-gray  { background: var(--gray-100); color: var(--gray-600); }
.badge-teal  { background: #CCFBF1; color: #0F766E; }
.badge-dot::before { content: '●'; font-size: 0.5rem; }

/* ════════════════════════════════════════
   Alerts
════════════════════════════════════════ */
.alert {
  display: flex; align-items: flex-start; gap: 0.875rem;
  padding: 1rem 1.25rem; border-radius: var(--radius); border-left: 4px solid;
  margin-bottom: 1rem;
}
.alert-icon    { font-size: 1.125rem; flex-shrink: 0; line-height: 1.5; }
.alert-icon svg { width: 18px; height: 18px; }
.alert-content p { font-size: 0.875rem; }
.alert-info    { background: #EFF6FF; border-color: #3B82F6; color: #1D4ED8; }
.alert-info    .alert-icon { color: #2563EB; }
.alert-info    .alert-content p { color: #1e40af; }
.alert-success { background: #F0FDF4; border-color: #22C55E; }
.alert-success .alert-icon { color: #16A34A; }
.alert-success .alert-content p { color: #166534; }
.alert-warning { background: #FFFBEB; border-color: #F59E0B; }
.alert-warning .alert-icon { color: #D97706; }
.alert-danger  { background: #FFF1F2; border-color: #EF4444; }
.alert-danger  .alert-icon { color: #DC2626; }

/* ════════════════════════════════════════
   Tables
════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
  background: var(--gray-50); padding: 0.875rem 1rem;
  font-weight: 700; color: var(--gray-500); text-align: left;
  border-bottom: 2px solid var(--border); white-space: nowrap;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.table td {
  padding: 1rem; border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700); vertical-align: middle;
}
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: #F5F8FF; }
.table tbody tr:last-child td { border-bottom: none; }

/* ════════════════════════════════════════
   Toasts
════════════════════════════════════════ */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.625rem;
  pointer-events: none; max-width: calc(100vw - 2rem);
}
.toast {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem; border-radius: var(--radius-md);
  background: var(--gray-900); color: white; box-shadow: var(--shadow-xl);
  pointer-events: all; animation: slideIn 0.35s var(--ease-bounce);
  max-width: 380px; font-size: 0.875rem; font-weight: 500;
  border: 1px solid rgba(255,255,255,0.08);
}
.toast-success { background: linear-gradient(135deg, #16A34A, #0D9488); }
.toast-error   { background: linear-gradient(135deg, #DC2626, #B91C1C); }
.toast-warning { background: linear-gradient(135deg, #D97706, #B45309); }
.toast-info    { background: linear-gradient(135deg, #2563EB, #0D9488); }
.toast-icon    { font-size: 1rem; flex-shrink: 0; }
.toast-dismiss {
  margin-left: auto; background: none; border: none; color: white;
  opacity: 0.65; cursor: pointer; padding: 0.25rem; font-size: 1rem; line-height: 1; flex-shrink: 0;
}
.toast-dismiss:hover { opacity: 1; }
.toast.fade-out { animation: fadeOut 0.3s var(--ease) forwards; }

/* ════════════════════════════════════════
   Spinner & Loading
════════════════════════════════════════ */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--gray-200); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.7s linear infinite; margin: auto;
}
.spinner-sm { width: 18px; height: 18px; border-width: 2px; }

.loading-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; padding: 3rem; color: var(--text-muted);
}

/* ── Empty state ── */
.empty-state { text-align: center; padding: 3.5rem 1.5rem; }
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { color: var(--gray-700); margin-bottom: 0.5rem; }
.empty-state p  { font-size: 0.875rem; color: var(--text-muted); max-width: 300px; margin: 0 auto; }

/* ── Divider ── */
.divider      { height: 1px; background: var(--border); margin: 1.5rem 0; }
.divider-text { display: flex; align-items: center; gap: 1rem; color: var(--text-muted); font-size: 0.8125rem; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ════════════════════════════════════════
   Step Indicator
════════════════════════════════════════ */
.steps { display: flex; align-items: center; margin-bottom: 2rem; overflow-x: auto; padding-bottom: 0.5rem; }
.step  { display: flex; align-items: center; flex-shrink: 0; }
.step-num {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 700; flex-shrink: 0;
  border: 2px solid var(--border); color: var(--gray-400); background: var(--white);
  transition: all 0.3s var(--ease);
}
.step.active .step-num { background: var(--grad-primary); border-color: transparent; color: white; box-shadow: 0 3px 12px rgb(37 99 235/30%); }
.step.done   .step-num { background: var(--grad-success);  border-color: transparent; color: white; }
.step-label  { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); margin-left: 0.5rem; white-space: nowrap; }
.step.active .step-label { color: var(--primary); font-weight: 600; }
.step.done   .step-label { color: var(--secondary); }
.step-line   { flex: 1; min-width: 2rem; height: 2px; background: var(--border); margin: 0 0.5rem; border-radius: 1px; transition: background 0.3s var(--ease); }
.step.done + .step .step-line { background: var(--grad-success); }

/* ════════════════════════════════════════
   Slot Grid
════════════════════════════════════════ */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.625rem; }
.slot-btn {
  padding: 0.625rem 0.5rem; border: 1.5px solid var(--border);
  border-radius: var(--radius); background: var(--white); cursor: pointer;
  font-family: var(--font); font-size: 0.8125rem; font-weight: 600;
  color: var(--gray-700); text-align: center; transition: all var(--transition);
}
.slot-btn:hover    { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); transform: translateY(-1px); }
.slot-btn.selected { border-color: transparent; background: var(--grad-primary); color: white; box-shadow: 0 3px 10px rgb(37 99 235/25%); }
.slot-btn:active:not(:disabled) { transform: translateY(1px); }
.slot-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.slot-btn:disabled { opacity: 0.4; cursor: not-allowed; background: var(--gray-100); pointer-events: none; }

/* ════════════════════════════════════════
   Doctor Card
════════════════════════════════════════ */
.doctor-card {
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  padding: 1.25rem; cursor: pointer; transition: all 0.25s var(--ease);
  background: var(--white);
}
.doctor-card:hover {
  border-color: var(--primary); box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.doctor-card.selected {
  border-color: transparent;
  background: linear-gradient(145deg, #EFF6FF, #F0FDFA);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-card);
}
.doctor-avatar {
  width: 52px; height: 52px; border-radius: var(--radius-full);
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: white; font-weight: 700; flex-shrink: 0;
}

/* ════════════════════════════════════════
   Page Header
════════════════════════════════════════ */
.page-header {
  background: var(--grad-hero);
  color: white; padding: 2.5rem 1.5rem;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,255,255,0.04) 0%, transparent 70%);
}
.page-header > * { position: relative; }
.page-header h1 { color: white; font-size: clamp(1.5rem, 3vw, 2rem); }
.page-header p  { color: rgba(255,255,255,0.82); margin-top: 0.5rem; font-size: 1rem; }

/* ════════════════════════════════════════
   Sidebar Layout
════════════════════════════════════════ */
.app-layout { display: flex; min-height: calc(100vh - 66px); }
.sidebar {
  width: 248px; flex-shrink: 0; background: var(--white);
  border-right: 1px solid var(--border); padding: 1.5rem 1rem;
  position: sticky; top: 66px; height: calc(100vh - 66px); overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500; color: var(--gray-600);
  transition: all var(--transition);
}
.sidebar-nav a:hover  { background: var(--gray-100); color: var(--gray-900); }
.sidebar-nav a.active {
  background: linear-gradient(135deg, #EFF6FF, #F0FDFA);
  color: var(--primary); font-weight: 600;
}
.sidebar-nav .nav-icon { font-size: 1.125rem; width: 20px; text-align: center; }
.sidebar-nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-divider { height: 1px; background: var(--border); margin: 0.75rem 0; }
.main-content { flex: 1; padding: 2rem 1.5rem; min-width: 0; }

/* ════════════════════════════════════════
   Auth Pages
════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  background: var(--grad-hero);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem 1.5rem; position: relative;
  /* no overflow:hidden — must allow scroll when content is tall */
}
.auth-page::before {
  content: ''; position: fixed; inset: 0;
  background: radial-gradient(ellipse at 30% 80%, rgba(255,255,255,0.05) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}
.auth-page::after {
  content: ''; position: fixed;
  width: 450px; height: 450px; border-radius: 50%;
  background: rgba(255,255,255,0.03);
  top: -120px; right: -120px; pointer-events: none; z-index: 0;
}

.auth-card {
  width: 100%; max-width: 440px;
  background: var(--white); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); overflow: hidden; position: relative; z-index: 1;
  flex-shrink: 0;
}
.auth-card-header {
  background: linear-gradient(135deg, #f0f7ff 0%, #f0fdfa 100%);
  padding: 2rem; text-align: center; border-bottom: 1px solid var(--border);
}
.auth-logo {
  width: 72px; height: 72px;
  background: var(--grad-primary);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-primary);
  color: white;
}
.auth-logo svg { width: 36px; height: 36px; }
.auth-card-body  { padding: 2rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-muted); }

/* ════════════════════════════════════════
   OTP Inputs
════════════════════════════════════════ */
.otp-inputs { display: flex; gap: 0.625rem; justify-content: center; }
.otp-input {
  width: 52px; height: 60px; text-align: center;
  font-size: 1.375rem; font-weight: 700;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); color: var(--gray-900);
  background: var(--white); transition: all var(--transition);
}
.otp-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(37 99 235/10%);
  transform: scale(1.06);
}
.otp-input.filled { border-color: var(--primary); background: #EFF6FF; }

/* ════════════════════════════════════════
   Summary Box
════════════════════════════════════════ */
.summary-box {
  background: var(--gray-50); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.25rem; }
.summary-row:not(:last-child) { border-bottom: 1px solid var(--gray-100); }
.summary-row .key { font-size: 0.8125rem; color: var(--text-muted); }
.summary-row .val { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); text-align: right; }
.summary-total {
  background: linear-gradient(135deg, #EFF6FF, #F0FDFA);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 1rem;
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--primary-border);
}
.summary-total .key { font-weight: 600; color: var(--primary); }
.summary-total .val { font-size: 1.25rem; font-weight: 800; color: var(--primary); }

/* ════════════════════════════════════════
   Hero Section
════════════════════════════════════════ */
.hero {
  background: var(--grad-hero);
  color: white; padding: 5.5rem 1.5rem 6.5rem; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 50%);
}
.hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 80px; background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  color: white; margin-bottom: 1.375rem;
  text-shadow: 0 2px 32px rgba(0,0,0,0.2);
}
.hero p {
  color: rgba(255,255,255,0.85); font-size: 1.125rem;
  margin-bottom: 2.25rem; max-width: 580px; margin-left: auto; margin-right: auto;
}
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.625rem;
  background: rgba(255,255,255,0.12); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-full);
  padding: 0.5rem 1.125rem; font-size: 0.8125rem; font-weight: 600;
  color: rgba(255,255,255,0.95); margin-bottom: 1.5rem; letter-spacing: 0.01em;
}
.hero-badge .pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ADE80; animation: pulse 2s infinite; flex-shrink: 0;
}

/* ════════════════════════════════════════
   Feature Cards
════════════════════════════════════════ */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2rem 1.75rem; border: 1px solid var(--border);
  transition: all 0.25s var(--ease);
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-primary);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-card h3 { font-size: 1.0625rem; margin-bottom: 0.625rem; }
.feature-card p  { font-size: 0.9rem; }

/* ════════════════════════════════════════
   Section
════════════════════════════════════════ */
.section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p  { max-width: 540px; margin: 0 auto; font-size: 1.0625rem; }
.section-label {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-size: 0.75rem; font-weight: 800; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.75rem;
}
.section-label::before {
  content: ''; display: block;
  width: 24px; height: 3px;
  background: var(--grad-primary);
  border-radius: 2px; flex-shrink: 0;
}

/* ── Star rating ── */
.star-rating { display: flex; gap: 2px; margin-top: 1rem; }
.star-rating svg { width: 15px; height: 15px; fill: #F59E0B; flex-shrink: 0; }

/* ════════════════════════════════════════
   Testimonials
════════════════════════════════════════ */
.testimonial {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  position: relative; overflow: hidden;
  transition: all 0.25s var(--ease);
}
.testimonial::before {
  content: '\201C'; position: absolute; top: 0.75rem; right: 1.25rem;
  font-size: 5rem; line-height: 1; color: var(--gray-100);
  font-family: Georgia, serif; font-weight: 700; pointer-events: none;
}
.testimonial:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.testimonial-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.testimonial p {
  font-size: 0.9375rem; font-style: italic;
  color: var(--gray-700); position: relative; z-index: 1;
}

/* ════════════════════════════════════════
   Footer
════════════════════════════════════════ */
.footer { background: var(--gray-900); color: var(--gray-400); padding: 4rem 0 2rem; margin-top: auto; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand {
  display: flex; align-items: center; gap: 0.625rem;
  font-size: 1rem; font-weight: 800; color: white; margin-bottom: 0.875rem;
}
.footer-brand-icon {
  width: 30px; height: 30px;
  background: var(--grad-primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
}
.footer-brand-icon svg { width: 16px; height: 16px; }
.footer-links h4 { color: white; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.footer-links a  { display: block; color: var(--gray-400); font-size: 0.875rem; margin-bottom: 0.625rem; transition: all var(--transition); }
.footer-links a:hover { color: white; transform: translateX(3px); }
.footer-bottom {
  border-top: 1px solid var(--gray-800); padding-top: 1.5rem; font-size: 0.8125rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-flag {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.8125rem; color: var(--gray-400);
}

/* ════════════════════════════════════════
   Welcome Banner (Dashboard)
════════════════════════════════════════ */
.welcome-banner {
  background: var(--grad-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  color: white; margin-bottom: 1.75rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  position: relative; overflow: hidden;
}
.welcome-banner::before {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.welcome-banner::after {
  content: ''; position: absolute; right: 30px; bottom: -40px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.welcome-banner h1 { color: white; font-size: 1.375rem; margin-bottom: 0.25rem; }
.welcome-banner p  { color: rgba(255,255,255,0.82); font-size: 0.875rem; }
.welcome-banner > * { position: relative; z-index: 1; }

/* ════════════════════════════════════════
   Animations
════════════════════════════════════════ */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fadeIn  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(24px); } }
@keyframes pulse   { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.9); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes float   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.animate-in { animation: fadeIn 0.4s var(--ease); }
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius);
}

/* ════════════════════════════════════════
   Utilities
════════════════════════════════════════ */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; }  .gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }    .gap-6 { gap: 1.5rem; }   .gap-8 { gap: 2rem; }
.grid   { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.text-center  { text-align: center; } .text-right { text-align: right; }
.text-sm  { font-size: 0.875rem; }   .text-xs  { font-size: 0.75rem; }
.text-lg  { font-size: 1.125rem; }   .text-xl  { font-size: 1.25rem; }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--secondary); }
.text-danger  { color: var(--danger); }
.text-white   { color: white; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }  .mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; } .mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.p-4  { padding: 1rem; }    .p-6 { padding: 1.5rem; }   .p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem;   padding-bottom: 1rem; }
.rounded      { border-radius: var(--radius); }
.rounded-md   { border-radius: var(--radius-md); }
.rounded-full { border-radius: var(--radius-full); }
.border       { border: 1px solid var(--border); }
.shadow       { box-shadow: var(--shadow); }
.shadow-md    { box-shadow: var(--shadow-md); }
.w-full       { width: 100%; }
.hidden       { display: none !important; }
.sr-only      { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.relative     { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ════════════════════════════════════════
   Responsive
════════════════════════════════════════ */
@media (max-width: 1024px) {
  .sidebar { display: none; }
  .main-content { padding: 1.5rem 1rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .navbar-cta .btn:not(.btn-primary) { display: none; }
  .navbar-toggle { display: block; }
  .navbar-inner { height: 58px; padding: 0 1rem; }

  /* Prevent iOS input zoom — must be ≥16px */
  .form-input, .form-select, .form-textarea { font-size: 16px; }

  /* Touch-friendly buttons (≥44px height) */
  .btn    { min-height: 44px; }
  .btn-lg { min-height: 52px; font-size: 1rem; }
  .btn-sm { min-height: 36px; }

  /* Auth card */
  .auth-card { border-radius: var(--radius-lg); }
  .auth-card-header { padding: 1.5rem 1.25rem; }
  .auth-card-body  { padding: 1.5rem 1.25rem; }

  /* Sidebar layout — full width on tablet */
  .app-layout { flex-direction: column; }
  .main-content { padding: 1.25rem 1rem; }

  /* OTP inputs */
  .otp-input { width: 46px; height: 54px; font-size: 1.25rem; }

  /* Hero */
  .hero { padding: 4rem 1.25rem 5.5rem; }
  .hero::after { height: 52px; }
  .section { padding: 3.5rem 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .table-wrapper { border-radius: 0; }

  /* Cards — remove hover lift on touch */
  .stat-card:hover, .feature-card:hover { transform: none; }
  .testimonial:hover { transform: none; }

  .navbar-cta > span { display: none; }
}

@media (max-width: 480px) {
  .auth-page { padding: 0; justify-content: flex-start; }
  .auth-card {
    border-radius: 0;
    min-height: 100svh;
    box-shadow: none;
  }
  .auth-card-header { padding: 2rem 1.25rem 1.25rem; }
  .auth-card-body  { padding: 1.25rem 1rem; }

  .otp-inputs { gap: 0.3rem; }
  .otp-input  { width: 42px; height: 50px; font-size: 1.125rem; border-radius: var(--radius-sm); }

  .hero p { font-size: 1rem; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero-btns .btn { width: 100%; justify-content: center; }

  .slot-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .input-group .input-prefix { padding: 0 0.625rem; font-size: 0.8125rem; }

  #toast-container { right: 0.75rem; left: 0.75rem; bottom: 1rem; }
  .toast { max-width: 100%; }

  .step-num { width: 32px; height: 32px; font-size: 0.8125rem; }
  .step-label { display: none; }
  .step-line { min-width: 1rem; }

  .page-header { padding: 1.5rem 1rem; }
  .doctor-card { padding: 1rem; }
  .doctor-avatar { width: 44px; height: 44px; font-size: 1rem; }

  .auth-logo { width: 60px; height: 60px; }
  .auth-logo svg { width: 28px; height: 28px; }
}

/* Safe-area insets for iPhone X+ notch / Android gesture bar */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .auth-page { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
  #toast-container { bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
  .mobile-menu { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}
