/* =====================================================================
   Dr. Alan Flores Clinic - public CSS
   Hand-written, Tailwind-inspired utility classes (NO build step).
   Palette: medical teal/emerald + amber accents. NO blue/indigo.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --primary:            #2f62c8; /* hospital blue */
  --primary-dark:       #234ba0;
  --primary-light:      #5a8be0;
  --primary-foreground: #ffffff;
  --primary-50:         #eff4fd;
  --primary-100:        #dce7fa;
  --primary-200:        #b9cef5;

  --navy:               #0f1b33; /* deep navy (dark backdrops, sidebar, footer) */
  --navy-2:             #16284d;

  --background:         #ffffff;
  --foreground:         #0f1b33; /* navy */

  --muted:              #f3f6fb;
  --muted-foreground:   #5b6b85;

  --border:             #e0e7f2;
  --input:              #e0e7f2;
  --ring:               #6f9be8;

  --accent:             #0ea5e9; /* sky */
  --accent-foreground:  #03324d;

  --card:               #ffffff;
  --card-foreground:    #0f172a;

  --destructive:        #ef4444; /* red-500 */
  --destructive-foreground: #ffffff;

  --success:            #10b981; /* emerald-500 */
  --warning:            #f59e0b;
  --danger:             #ef4444;

  --radius:             0.75rem;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.06);
  --shadow:    0 1px 3px 0 rgba(15, 23, 42, 0.10), 0 1px 2px -1px rgba(15, 23, 42, 0.10);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.10), 0 2px 4px -2px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.10), 0 4px 6px -4px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.10);
}

[data-theme="dark"] {
  --primary:            #6f9be8;
  --primary-dark:       #2f62c8;
  --primary-light:      #9bbcf2;
  --primary-foreground: #06142e;
  --primary-50:         #0b1a38;
  --primary-100:        #16305f;
  --primary-200:        #234ba0;

  --background:         #020617; /* slate-950 */
  --foreground:         #f8fafc; /* slate-50 */

  --muted:              #0f172a; /* slate-900 */
  --muted-foreground:   #94a3b8; /* slate-400 */

  --border:             #1e293b; /* slate-800 */
  --input:              #1e293b;
  --ring:               #6f9be8;

  --accent:             #38bdf8;
  --accent-foreground: #e0f2fe;

  --card:               #0f172a; /* slate-900 */
  --card-foreground:    #f8fafc;

  --destructive:        #f87171;
  --destructive-foreground: #450a0a;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5,h6 { margin: 0 0 0.5em; line-height: 1.2; font-weight: 700; color: var(--foreground); }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, select, textarea, button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =====================================================================
   LAYOUT UTILITIES  (mirror Tailwind naming)
   ===================================================================== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.self-center { align-self: 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; }
.gap-12 { gap: 3rem; }

/* Spacing - we use a compact set of the most-used Tailwind scales */
.p-1 { padding: 0.25rem; } .p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; } .p-10 { padding: 2.5rem; }
.p-12 { padding: 3rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-0 { padding-top: 0; } .pb-0 { padding-bottom: 0; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 0.5rem; } .mb-2 { margin-bottom: 0.5rem; }
.mt-4 { margin-top: 1rem; } .mb-4 { margin-bottom: 1rem; }
.mt-6 { margin-top: 1.5rem; } .mb-6 { margin-bottom: 1.5rem; }
.mt-8 { margin-top: 2rem; } .mb-8 { margin-bottom: 2rem; }
.mt-12 { margin-top: 3rem; } .mb-12 { margin-bottom: 3rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

/* Widths / heights */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-6 { width: 1.5rem; } .w-8 { width: 2rem; }
.w-10 { width: 2.5rem; } .w-12 { width: 3rem; }
.w-16 { width: 4rem; } .w-24 { width: 6rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-md { max-width: 28rem; }
.max-w-sm { max-width: 24rem; }
.max-w-full { max-width: 100%; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-6 { height: 1.5rem; } .h-8 { height: 2rem; }
.h-10 { height: 2.5rem; } .h-12 { height: 3rem; }
.h-16 { height: 4rem; } .h-24 { height: 6rem; }
.min-h-screen { min-height: 100vh; }
.min-h-\[60vh\] { min-height: 60vh; }
.min-w-0 { min-width: 0; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.hidden { display: none; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.z-\[100\] { z-index: 100; }

/* Borders */
.border { border-width: 1px; border-style: solid; border-color: var(--border); }
.border-0 { border: 0; }
.border-t { border-style: solid; border-width: 0; border-top-width: 1px; border-color: var(--border); }
.border-b { border-style: solid; border-width: 0; border-bottom-width: 1px; border-color: var(--border); }
.border-r { border-style: solid; border-width: 0; border-right-width: 1px; border-color: var(--border); }
.border-l { border-style: solid; border-width: 0; border-left-width: 1px; border-color: var(--border); }
.border-border { border-color: var(--border); }
.border-primary { border-color: var(--primary); }
.rounded { border-radius: 0.375rem; }
.rounded-md { border-radius: 0.5rem; }
.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t-lg { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.rounded-b-lg { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }

/* Shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.1; }
.text-6xl { font-size: 3.75rem; line-height: 1.1; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }
.font-light { font-weight: 300; }
.italic { font-style: italic; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-relaxed { line-height: 1.75; }
.leading-tight { line-height: 1.15; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre { white-space: pre; }
.break-words { overflow-wrap: break-word; word-break: break-word; }
.underline { text-decoration: underline; }
.no-underline { text-decoration: none; }
.list-none { list-style: none; }

/* Colors - text */
.text-primary { color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-white { color: #fff; }
.text-black { color: #000; }
.text-accent { color: var(--accent); }
.text-destructive { color: var(--destructive); }
.text-success { color: var(--success); }
.text-slate-50 { color: #f8fafc; }
.text-slate-900 { color: #0f172a; }

/* Colors - background */
.bg-primary { background-color: var(--primary); }
.bg-primary-dark { background-color: var(--primary-dark); }
.bg-primary-foreground { background-color: var(--primary-foreground); }
.bg-background { background-color: var(--background); }
.bg-muted { background-color: var(--muted); }
.bg-card { background-color: var(--card); }
.bg-white { background-color: #fff; }
.bg-transparent { background-color: transparent; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-950 { background-color: #020617; }
.bg-teal-50 { background-color: var(--primary-50); }
.bg-teal-100 { background-color: var(--primary-100); }
.bg-teal-600 { background-color: var(--primary); }
.bg-amber-500 { background-color: #f59e0b; }
.bg-accent { background-color: var(--accent); }

/* Opacity-style helpers */
.bg-primary\/5 { background-color: color-mix(in srgb, var(--primary) 5%, transparent); }
.bg-primary\/10 { background-color: color-mix(in srgb, var(--primary) 10%, transparent); }
.bg-primary\/20 { background-color: color-mix(in srgb, var(--primary) 20%, transparent); }
.bg-primary\/90 { background-color: color-mix(in srgb, var(--primary) 90%, transparent); }
.bg-black\/50 { background-color: rgba(0,0,0,0.5); }
.bg-black\/70 { background-color: rgba(0,0,0,0.7); }
.bg-white\/80 { background-color: rgba(255,255,255,0.8); }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-default { cursor: default; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-visible { overflow: visible; }

/* Object fit */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }
.object-center { object-position: center; }

/* Misc */
.transition { transition-property: all; transition-duration: 0.2s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.duration-200 { transition-duration: 0.2s; }
.duration-300 { transition-duration: 0.3s; }
.duration-500 { transition-duration: 0.5s; }
.ease-in-out { transition-timing-function: ease-in-out; }

.hover\:bg-primary-dark:hover { background-color: var(--primary-dark); }
.hover\:bg-primary\/10:hover { background-color: color-mix(in srgb, var(--primary) 10%, transparent); }
.hover\:bg-muted:hover { background-color: var(--muted); }
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-primary-dark:hover { color: var(--primary-dark); }
.hover\:text-white:hover { color: #fff; }
.hover\:shadow-lg:hover { box-shadow: var(--shadow-lg); }
.hover\:shadow-md:hover { box-shadow: var(--shadow-md); }
.hover\:shadow-xl:hover { box-shadow: var(--shadow-xl); }
.hover\:border-primary:hover { border-color: var(--primary); }
.hover\:underline:hover { text-decoration: underline; }
.hover\:opacity-80:hover { opacity: 0.8; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

.select-none { user-select: none; }

.aspect-video { aspect-ratio: 16 / 9; }
.aspect-square { aspect-ratio: 1 / 1; }

.backdrop-blur { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* space-y / space-x (margin-based spacing between siblings) */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }

/* =====================================================================
   COMPONENT CLASSES
   ===================================================================== */
.container {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) { .container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-left: 2rem; padding-right: 2rem; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 600; font-size: 0.95rem; line-height: 1.2;
  padding: 0.625rem 1.25rem;
  border-radius: 0.625rem;
  border: 1px solid transparent;
  background-color: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--primary-foreground);
}
.btn-secondary {
  background-color: var(--muted);
  color: var(--foreground);
  border-color: var(--border);
}
.btn-secondary:hover { background-color: #e2e8f0; }
.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary-dark);
}
.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  border-color: transparent;
}
.btn-ghost:hover { background-color: var(--muted); }
.btn-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
  border-color: var(--destructive);
}
.btn-destructive:hover { background-color: #dc2626; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }

/* Cards */
.card {
  background-color: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.card-content { padding: 1.25rem 1.5rem; }
.card-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
  background-color: color-mix(in srgb, var(--muted) 50%, transparent);
}

/* Inputs */
.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}
.input, .textarea, .select {
  display: block; width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem; line-height: 1.4;
  color: var(--foreground);
  background-color: var(--background);
  border: 1px solid var(--input);
  border-radius: 0.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none; appearance: none;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 35%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); }
.textarea { min-height: 6rem; resize: vertical; }
.input-error, .textarea-error, .select-error {
  border-color: var(--destructive);
}
.input-error:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 30%, transparent); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.15rem 0.65rem;
  font-size: 0.75rem; font-weight: 600;
  border-radius: 9999px;
  background-color: var(--muted);
  color: var(--foreground);
  border: 1px solid var(--border);
  line-height: 1.4;
}
.badge-primary { background-color: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary-dark); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.badge-success { background-color: color-mix(in srgb, var(--success) 15%, transparent); color: #047857; border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.badge-warning { background-color: color-mix(in srgb, var(--warning) 15%, transparent); color: #92400e; border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.badge-danger  { background-color: color-mix(in srgb, var(--destructive) 15%, transparent); color: #b91c1c; border-color: color-mix(in srgb, var(--destructive) 25%, transparent); }
.badge-outline { background-color: transparent; color: var(--foreground); border-color: var(--border); }

/* Alerts */
.alert {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background-color: var(--muted);
  color: var(--foreground);
  font-size: 0.95rem;
}
.alert-error { background-color: color-mix(in srgb, var(--destructive) 10%, transparent); border-color: color-mix(in srgb, var(--destructive) 30%, transparent); color: #991b1b; }
.alert-success { background-color: color-mix(in srgb, var(--success) 10%, transparent); border-color: color-mix(in srgb, var(--success) 30%, transparent); color: #065f46; }
.alert-warning { background-color: color-mix(in srgb, var(--warning) 10%, transparent); border-color: color-mix(in srgb, var(--warning) 30%, transparent); color: #92400e; }

/* Nav links */
.nav-link {
  color: var(--foreground);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  border-radius: 0.5rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover { color: var(--primary); }

/* Glass (frosted header bar) */
.glass {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .glass {
  background-color: rgba(15, 23, 42, 0.85);
}

/* Chip (small filter chip) */
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.8rem; font-weight: 500;
  background-color: var(--muted);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--primary); border-color: var(--primary); }
.chip.is-active { background-color: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* Skeleton */
.skeleton {
  display: block;
  background: linear-gradient(90deg, var(--muted) 25%, color-mix(in srgb, var(--muted) 60%, transparent) 37%, var(--muted) 63%);
  background-size: 400% 100%;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: 0.5rem;
}
@keyframes skeleton-pulse {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 1.25rem; height: 1.25rem;
  border: 2px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-top-color: var(--primary);
  border-radius: 9999px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   LAYOUT: site-shell + sticky footer
   ===================================================================== */
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1 0 auto; width: 100%; }
.site-footer { margin-top: auto; }

/* =====================================================================
   LANDING-PAGE SPECIFIC
   ===================================================================== */
.section { padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 768px) { .section { padding-top: 5rem; padding-bottom: 5rem; } }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    linear-gradient(180deg, var(--primary-50) 0%, var(--background) 100%);
}
[data-theme="dark"] .hero {
  background:
    radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 60%),
    linear-gradient(180deg, #042f2e 0%, var(--background) 100%);
}
.hero-illustration {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), color-mix(in srgb, var(--accent) 10%, transparent));
  border-radius: 2rem;
  padding: 2rem;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}
.hero-illustration svg { width: 100%; height: auto; max-width: 24rem; color: var(--primary); }

/* Hero doctor photo */
.hero-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 28rem;
  margin-inline: auto;
  width: 100%;
}
.hero-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 2rem;
  overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, transparent), color-mix(in srgb, var(--accent) 8%, transparent));
  border: 4px solid #fff;
  box-shadow: 0 20px 50px color-mix(in srgb, var(--primary) 25%, transparent),
              0 0 0 1px color-mix(in srgb, var(--primary) 15%, transparent);
}
.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-photo-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: var(--primary);
  color: #fff;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 30%, transparent);
}
.hero-photo-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  transform: scale(1.08) translateY(8%);
  opacity: 0.85;
}
.hero-photo-decor svg { width: 100%; height: 100%; }

/* Admin avatar in sidebar */
.admin-avatar {
  display: block;
  margin-bottom: .5rem;
}

/* Service card */
.service-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex; flex-direction: column;
  height: 100%;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}
.service-card .icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: 0.85rem;
  background-color: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Feature card (about) */
.feature-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-card .icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 0.75rem;
  background-color: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* Social cards */
.social-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--foreground);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.social-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--foreground);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}
.social-card .icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 9999px;
  color: #fff; flex-shrink: 0;
}
.social-card.facebook .icon-wrap { background-color: #1877f2; }
.social-card.tiktok .icon-wrap { background-color: #000; }
.social-card.instagram .icon-wrap {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.social-card.whatsapp .icon-wrap { background-color: #25d366; }

/* About Dr. Flores / blog */
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin: 0 0 .5rem; }
.lead { font-size: 1.08rem; line-height: 1.8; color: var(--muted-foreground); margin: 1rem 0 0; }
.about-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 768px) { .about-grid.has-photo { grid-template-columns: 17rem 1fr; } }
.about-grid + h2 { margin-top: 2.5rem; }
.post-body + p, .lead + p.text-sm { margin-top: 1.2rem; }
.about-photo { margin: 0; }
.about-photo img { width: 100%; height: auto; border-radius: 1.4rem; box-shadow: var(--shadow-lg); object-fit: cover; aspect-ratio: 1; }
.about-points { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .9rem; }
.about-points li { border-left: 3px solid var(--primary); padding: .2rem 0 .2rem 1rem; display: grid; gap: .15rem; }
.about-points li strong { color: var(--foreground); }
.about-points li span { color: var(--muted-foreground); line-height: 1.7; }
.blog-grid { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.blog-card { border: 1px solid var(--border); border-radius: 1rem; background: var(--card); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-card img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; display: block; }
.blog-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.blog-card h2 { font-size: 1.15rem; margin: 0; line-height: 1.35; }
.blog-card h2 a { color: inherit; text-decoration: none; }
.blog-card p { margin: 0; color: var(--muted-foreground); font-size: .93rem; line-height: 1.6; }
.blog-meta { font-size: .8rem !important; color: var(--muted-foreground); }
.blog-more { margin-top: auto; font-weight: 600; color: var(--primary); text-decoration: none; font-size: .9rem; }
.post-cover { width: 100%; height: auto; border-radius: 1rem; margin: 1.2rem 0; aspect-ratio: 16/9; object-fit: cover; }
.post-body { font-size: 1.05rem; line-height: 1.85; }
.post-body h2 { font-size: 1.55rem; margin: 2rem 0 .6rem; }
.post-body h3 { font-size: 1.25rem; margin: 1.6rem 0 .5rem; }
.post-body h4 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
.post-body p { margin: 1rem 0; }
.post-body ul, .post-body ol { margin: 1rem 0; padding-left: 1.4rem; }
.post-body li { margin: .35rem 0; }
.post-body a { color: var(--primary); text-decoration: underline; }
.post-body img { max-width: 100%; height: auto; border-radius: .8rem; margin: 1.2rem 0; }
.post-body blockquote { margin: 1.2rem 0; padding: .4rem 1.1rem; border-left: 4px solid var(--primary); background: var(--primary-50); border-radius: 0 .6rem .6rem 0; }
.post-body blockquote p { margin: .5rem 0; }
.post-body code { background: var(--muted); padding: .1rem .35rem; border-radius: .3rem; font-size: .92em; }
.post-body hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

/* Booking confirmation: clean key/value list (no boxes) */
.summary-list { max-width: 36rem; margin: 2rem auto 0; text-align: left; }
.summary-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: .85rem .25rem; border-bottom: 1px solid var(--border); }
.summary-list > div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted-foreground); font-size: .9rem; }
.summary-list dd { margin: 0; font-weight: 600; text-align: right; }
.summary-list dd small { font-weight: 400; color: var(--muted-foreground); }

/* Free first consultation banner */
.promo-band { display: grid; gap: 1.2rem; align-items: center; grid-template-columns: 1fr; padding: 1.8rem; border-radius: 1.4rem;
  background: linear-gradient(120deg, var(--primary-50), var(--primary-100)); border: 1px solid var(--primary-200); }
@media (min-width: 820px) { .promo-band { grid-template-columns: auto 1fr auto; padding: 2rem 2.4rem; } }
.promo-icon { width: 3.6rem; height: 3.6rem; border-radius: 1rem; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.promo-copy h2 { font-size: 1.6rem; margin: .5rem 0 .4rem; }
.promo-copy p { margin: 0; color: var(--muted-foreground); line-height: 1.7; }
.promo-copy .promo-note { font-size: .85rem; margin-top: .5rem; }

/* FAQ accordion */
.faq-list { display: grid; gap: .75rem; }
.faq-item { border: 1px solid var(--border); border-radius: .9rem; background: var(--card); padding: .2rem 1.1rem; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: .85rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--primary); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { margin: 0 0 1rem; color: var(--muted-foreground); line-height: 1.7; }
.crumbs { font-size: .85rem; color: var(--muted-foreground); margin-bottom: 1rem; }
.crumbs a { color: var(--muted-foreground); text-decoration: underline; }

/* Contact info cards: equal height, content centered */
.contact-card { display: flex; align-items: center; }
.contact-card .card-content { width: 100%; min-width: 0; }
.contact-card .font-semibold { overflow-wrap: anywhere; }
.contact-card .icon-wrap { flex-shrink: 0; width: 2.5rem; height: 2.5rem; }

/* CTA band */
.cta-band {
  background:
    radial-gradient(800px 300px at 80% 50%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--primary-foreground);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
}
.cta-band h2 { text-wrap: balance; }
.cta-band .btn-primary {
  background-color: #fff; color: var(--primary-dark); border-color: #fff;
}
.cta-band .btn-primary:hover { background-color: var(--primary-50); }

/* =====================================================================
   BOOKING FLOW
   ===================================================================== */
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.stepper-step {
  display: flex; align-items: center; gap: 0.5rem;
  flex: 1 1 0;
  min-width: 0;
}
.stepper-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 9999px;
  background-color: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  font-weight: 700; font-size: 0.85rem;
  flex-shrink: 0;
}
.stepper-step.is-active .stepper-num,
.stepper-step.is-done .stepper-num {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.stepper-label {
  font-size: 0.85rem; font-weight: 600;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.stepper-step.is-active .stepper-label,
.stepper-step.is-done .stepper-label { color: var(--foreground); }
.stepper-bar {
  flex: 1 1 0; height: 2px;
  background-color: var(--border);
  border-radius: 9999px;
  margin: 0 0.5rem;
  min-width: 0.5rem;
}
.stepper-bar.is-done { background-color: var(--primary); }
@media (max-width: 640px) {
  .stepper-label { display: none; }
  .stepper { gap: 0.25rem; }
}

/* Booking step content */
.book-step { display: none; }
.book-step.is-active { display: block; animation: fade-in 0.25s ease; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Selectable service card in booking */
.service-option {
  display: flex; flex-direction: column;
  text-align: left;
  background-color: var(--card);
  border: 2px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
}
.service-option:hover { border-color: color-mix(in srgb, var(--primary) 50%, transparent); transform: translateY(-2px); }
.service-option.is-selected {
  border-color: var(--primary);
  background-color: color-mix(in srgb, var(--primary) 6%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

/* Slot time buttons */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr));
  gap: 0.5rem;
}
.slot-group + .slot-group { margin-top: 1rem; }
.slot-group-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted-foreground); margin-bottom: 0.4rem;
}
.slot-btn { width: 100%; }
.slot-btn {
  padding: 0.65rem 0.5rem;
  border-radius: 0.625rem;
  border: 1.5px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  font-weight: 600; font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.slot-btn:hover { border-color: var(--primary); color: var(--primary); }
.slot-btn.is-selected {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.slot-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Payment option radio cards */
.pay-option {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  background-color: var(--card);
}
.pay-option:hover { border-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.pay-option.is-selected {
  border-color: var(--primary);
  background-color: color-mix(in srgb, var(--primary) 5%, transparent);
}
.pay-option input { accent-color: var(--primary); }

/* Turnstile widget container */
.cf-turnstile, [data-turnstile-disabled] {
  min-height: 65px;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* =====================================================================
   FORM VALIDATION + INLINE ERRORS
   ===================================================================== */
.error {
  display: block;
  color: var(--destructive);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.25rem;
}
.field { margin-bottom: 1rem; }
.field-error input,
.field-error textarea,
.field-error select { border-color: var(--destructive); }
.required-asterisk { color: var(--destructive); }

/* =====================================================================
   TOAST NOTIFICATIONS
   ===================================================================== */
.toast-stack {
  position: fixed; top: 1rem; right: 1rem;
  z-index: 1000;
  display: flex; flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 22rem;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 0.625rem;
  background-color: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  animation: toast-in 0.25s ease;
}
.toast.is-leaving { animation: toast-out 0.2s ease forwards; }
.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--destructive); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info    { border-left: 4px solid var(--primary); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(1rem); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(1rem); }
}

/* =====================================================================
   MODAL / DIALOG
   ===================================================================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fade-in 0.2s ease;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 32rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  animation: modal-in 0.22s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-body { padding: 1.25rem; }
.modal-footer {
  display: flex; gap: 0.5rem; justify-content: flex-end;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* =====================================================================
   TOP BAR (announcement)
   ===================================================================== */
.topbar {
  background-color: var(--primary-dark);
  color: var(--primary-foreground);
  font-size: 0.8rem;
}
.topbar a { color: var(--primary-100); }
.topbar a:hover { color: #fff; }

/* =====================================================================
   HEADER / NAV
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background-color: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-header {
  background-color: rgba(15, 23, 42, 0.92);
}
.brand {
  display: flex; align-items: center; gap: 0.65rem;
  font-weight: 700; color: var(--foreground);
}
.brand:hover { color: var(--primary); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  flex-shrink: 0;
}
.brand-name { font-size: 1.05rem; line-height: 1.15; }
.brand-sub { font-size: 0.75rem; color: var(--muted-foreground); font-weight: 500; }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background-color: var(--background);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  padding: 0.6rem 0.5rem;
  border-radius: 0.5rem;
  color: var(--foreground);
  font-weight: 500;
}
.mobile-menu a:hover { background-color: var(--muted); color: var(--primary); }

.hamburger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 0.5rem;
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  background-color: var(--card);
  color: var(--foreground);
  border-top: 1px solid var(--border);
  padding-top: 3rem;
  padding-bottom: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.footer-links a { display: block; color: var(--muted-foreground); font-size: 0.9rem; padding: 0.2rem 0; }
.footer-links a:hover { color: var(--primary); }
.footer-social { display: flex; gap: 0.5rem; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 9999px;
  background-color: var(--muted);
  color: var(--muted-foreground);
  transition: all 0.18s ease;
}
.footer-social a:hover { background-color: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-bottom {
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--muted-foreground);
}

/* =====================================================================
   ADMIN DATA TABLE HELPER (used by admin agent)
   ===================================================================== */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  text-align: left; padding: 0.65rem 0.75rem;
  background-color: var(--muted);
  color: var(--muted-foreground);
  font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.data-table tr:hover td { background-color: color-mix(in srgb, var(--muted) 40%, transparent); }
.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 0.75rem; }

/* =====================================================================
   RESPONSIVE BREAKPOINTS (mirror Tailwind sm/md/lg prefixes)
   ===================================================================== */
@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:hidden { display: none; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:text-5xl { font-size: 3rem; }
}
@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:hidden { display: none; }
  .md\:flex { display: flex; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:text-left { text-align: left; }
  .md\:text-center { text-align: center; }
  .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .md\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
  .md\:items-center { align-items: center; }
  .md\:flex-row { flex-direction: row; }
}
@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:px-12 { padding-left: 3rem; padding-right: 3rem; }
  .lg\:text-6xl { font-size: 3.75rem; }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ---- Spacing / misc utilities used by the templates (were missing) ---- */
.mb-3 { margin-bottom: 0.75rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.opacity-90 { opacity: 0.9; }
.max-w-xs { max-width: 20rem; }
.max-w-xl { max-width: 36rem; }
.hover\:text-primary:hover { color: var(--primary); }
.bg-destructive\/10 { background-color: color-mix(in srgb, var(--destructive) 10%, transparent); }
@media (min-width: 768px) {
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
  .md\:text-right { text-align: right; }
  .md\:col-span-1 { grid-column: span 1 / span 1; }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
}

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

/* Print */
@media print {
  .site-header, .topbar, .site-footer, .cta-band, .toast-stack, .modal-backdrop { display: none !important; }
}

/* Service / plan cards: centered, so 1 or 2 items don't hug the left edge */
.svc-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; padding: 0; margin: 0; }
.svc-grid > li { flex: 1 1 100%; max-width: 100%; display: flex; }
.svc-grid > li > .service-card { width: 100%; }
@media (min-width: 768px)  { .svc-grid > li { flex: 0 1 calc((100% - 1.5rem) / 2); max-width: calc((100% - 1.5rem) / 2); } }
@media (min-width: 1024px) { .svc-grid > li { flex: 0 1 calc((100% - 3rem) / 3); max-width: calc((100% - 3rem) / 3); } }

/* Long descriptions never stretch a card: 4-line summary + "See details" */
.svc-summary { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.svc-more { display: inline-block; margin: .5rem 0 1rem; font-size: .85rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.svc-more:hover { text-decoration: underline; }
.svc-desc h3 { margin-top: 1.4rem; }
.svc-desc ul { padding-left: 1.2rem; }
.svc-desc li { margin: .45rem 0; }
