/* ba-genetics panel — estilos minimalistas con paleta navy/turquesa.
   Diseño influenciado por partners/secure2 (escala canónica ozona-core)
   y la paleta histórica de los PDFs de BA Genetics:
   - navy        #0B3D5B   primary
   - turquoise   #2EC4B6   accent
   - text        #2D3748
   - muted       #64748B
   - bg          #F7F9FB
   - border      #E2E8F0
*/

* { box-sizing: border-box; }

/* ───────────────────────────────────────────────────────────────────
   ESCALA TIPOGRÁFICA — única para todo el panel autenticado.

   - Body: 15px (incluye p, td, th, label, li, button, input).
   - Badges: 14px (= body − 1) con JetBrains Mono, weight 400.
   - h1: 26px · h2: 20px · h3: 17px · h4: 15.5px.
   - Inter para body, Inter Tight 700 para títulos, JetBrains Mono
     para badges, datos numéricos y código.

   No queremos variaciones puntuales por componente. Si un sitio pide
   otro tamaño, debe usar una de las variables --fs-*.
   ─────────────────────────────────────────────────────────────────── */
:root {
  /* Reducción global ≈ 20% sobre la escala anterior. Mantiene jerarquía
     pero compacta toda la UI autenticada. */
  --fs-body:   12px;   /* texto general (era 15) */
  --fs-badge:  11px;   /* body − 1 (era 14) */
  --fs-h1:     21px;   /* (era 26) */
  --fs-h2:     16px;   /* (era 20) */
  --fs-h3:     14px;   /* (era 17) */
  --fs-h4:     12.5px; /* (era 15.5) */
  --fs-small:  10.5px; /* (era 13) */
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  color: #0B1220;
  background: #F6F8FB;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Títulos: Inter Tight 700, escala única, mismo letter-spacing. */
h1, h2, h3, h4 {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

/* Cuerpo de texto y formularios — body uniforme. */
p, td, th, label, li, summary, .lead,
input, select, textarea, button {
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 400;
}
strong, b { font-weight: 600; }
small { font-size: var(--fs-small); }

a { color: #0B3D5B; text-decoration: none; }
a:hover { color: #2EC4B6; text-decoration: underline; }
.muted { color: #6b7a90; font-weight: 400; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* Topbar */
.topbar {
  background: #0B3D5B;
  color: white;
  border-bottom: 3px solid #2EC4B6;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: white !important; }
.brand:hover { text-decoration: none; }
.brand-mark {
  background: #2EC4B6;
  color: #0B3D5B;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
}
.brand-name { font-weight: 600; font-size: 16px; }
.topnav { flex: 1; display: flex; gap: 16px; }
.topnav a { color: rgba(255,255,255,0.85); font-size: 14px; padding: 6px 0; border-bottom: 2px solid transparent; }
.topnav a:hover { color: white; text-decoration: none; border-bottom-color: rgba(46,196,182,0.5); }
.topnav a.active { color: white; border-bottom-color: #2EC4B6; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-email { color: rgba(255,255,255,0.8); font-size: 13px; }
.btn-logout, .btn-login {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.btn-logout:hover, .btn-login:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.logout-form { display: inline; margin: 0; }

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Page head */
.page-head { margin-bottom: 24px; }
.page-head h1 { margin: 0 0 4px 0; color: var(--bag-navy, #0C1C2C); }
.page-head h2 { color: var(--bag-navy, #0C1C2C); margin: 24px 0 12px 0; }
.back-link { font-size: var(--fs-small); color: #64748B; }
.back-link:hover { color: var(--bag-navy, #0C1C2C); }

/* Cabecera del paciente reutilizada por _partials/patient_tabs.html */
.patient-head { margin: 4px 0 16px; }
.patient-head .back-link { display: inline-block; margin-bottom: 6px; }
.patient-h1   { margin: 0; color: var(--bag-navy, #0C1C2C); }

/* KPI cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #2EC4B6;
  border-radius: 6px;
  padding: 16px 20px;
}
.kpi-label { font-size: 12px; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-value { font-size: 32px; font-weight: 700; color: #0B3D5B; line-height: 1; margin-top: 8px; }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #E2E8F0;
  margin: 16px 0 24px 0;
}
.tab {
  padding: 10px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748B;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: #0B3D5B; text-decoration: none; }
.tab.active { color: #0B3D5B; border-bottom-color: #2EC4B6; font-weight: 600; }
.tab-disabled { color: #CBD5E0; cursor: not-allowed; }
.tab-disabled:hover { color: #CBD5E0; }

/* Cards */
.card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 16px;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #E2E8F0;
  font-size: 14px;
}
.data-table th {
  background: #F7F9FB;
  color: #64748B;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table tbody tr:hover { background: #F7F9FB; }
.data-table tbody tr:last-child td { border-bottom: 0; }
/* `compact` solo reduce el padding; el tamaño de letra se mantiene igual que
   en las tablas normales para que cabeceras y celdas sean coherentes en todo
   el panel (p. ej. "Tus compras" vs "Pacientes"). */
.data-table.compact th, .data-table.compact td { padding: 8px 12px; }
.row-archived { opacity: 0.55; }
.row-actions { white-space: nowrap; }

/* ───────────────────────────────────────────────────────────────────
   BADGES — todos en JetBrains Mono, weight 400, tamaño var(--fs-badge)
   (= body − 1px). Sin negrita, sin uppercase forzado. Las variantes
   solo cambian color de fondo y borde.

   Usadas por: .badge, .badge-count, .badge-* (tipo informe), .lang-pill,
   .role-pill, .status, .dob-badge, .pill-mono, .wizard-pill,
   .report-badge, .report-subtype.
   ─────────────────────────────────────────────────────────────────── */
.badge,
.badge-count,
.badge-health_plan,
.badge-cholesterol,
.badge-glucose,
.badge-pharma,
.badge-oxstress,
.lang-pill,
.role-pill,
.status,
.dob-badge,
.pill-mono,
.wizard-pill,
.report-badge,
.report-subtype {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: var(--fs-badge);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
}
.badge-count        { background: #E8F0FE; color: #0B3D5B; }
.badge-health_plan  { background: #E8F0FE; color: #0B3D5B; }
.badge-cholesterol  { background: #FDE8E8; color: #B91C1C; }
.badge-glucose      { background: #FFF3E0; color: #B45309; }
.badge-pharma       { background: #F3E8FF; color: #6B21A8; }
.badge-oxstress     { background: #E8F5E9; color: #15803D; }

.lang-pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  color: #64748B;
}

.role-pill {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bag-navy, #0C1C2C);
  color: white;
  border-radius: 4px;
}

/* Status pill — distintivo por color, mismo tipo de letra mono regular */
.status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.status-ready      { background: #ddf7e8; color: #1f7a4d; border-color: #b8ecc5; }
.status-generating { background: #fdf3d2; color: #8a6300; border-color: #f3e0a3; }
.status-failed     { background: #fde0e2; color: #9a2025; border-color: #f4bcc0; }
.status-archived   { background: #eef2f7; color: #6b7a90; border-color: #d4dae3; }

/* Generate bar (PR11) */
.generate-bar {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.generate-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.generate-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #64748B; }
.generate-form select { padding: 6px 8px; border: 1px solid #E2E8F0; border-radius: 4px; font-size: 13px; }
/* U-UI-1 (2026-06-28): eliminado el .btn-primary DUPLICADO (turquesa). El
   sistema de botones vigente es .btn / .btn-primary (navy) definido más abajo;
   esta copia ganaba/perdía por cascada y confundía. Los usos sueltos de
   .btn-primary pasan a .btn .btn-primary. */
.muted.small { font-size: 11px; margin-top: 8px; margin-bottom: 0; }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
}
.filters label { font-size: 13px; color: #64748B; display: flex; align-items: center; gap: 6px; }
.filters select { padding: 6px 8px; border: 1px solid #E2E8F0; border-radius: 4px; font-size: 13px; }
.filters .cb input { margin-right: 4px; }

/* Buttons / links */
.btn-link {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  background: transparent;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  color: #0B3D5B;
  cursor: pointer;
}
.btn-link:hover { background: #0B3D5B; color: white; text-decoration: none; }
.btn-link.danger { color: #B91C1C; border-color: #FDE8E8; }
.btn-link.danger:hover { background: #B91C1C; color: white; }

/* Flashes */
.flashes { list-style: none; padding: 0; margin: 0 0 16px 0; }
.flash {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 14px;
}
.flash-success { background: #E8F5E9; color: #15803D; border-left: 4px solid #15803D; }
.flash-info    { background: #E8F0FE; color: #0B3D5B; border-left: 4px solid #0B3D5B; }
.flash-error   { background: #FDE8E8; color: #B91C1C; border-left: 4px solid #B91C1C; }

/* U-UI-3: foco visible y consistente para navegación por teclado. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #2EC4B6;
  outline-offset: 2px;
  border-radius: 3px;
}

/* Pager */
.pager { display: flex; align-items: center; gap: 16px; margin-top: 16px; justify-content: center; }

/* Public homepage */
.public-hero {
  text-align: center;
  padding: 64px 24px 48px;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 40px;
}
.public-hero h1 {
  font-size: clamp(32px, 6vw, 56px);   /* U-RWD-5: no desborda en móvil */
  color: #0B3D5B;
  margin: 0 0 16px;
  letter-spacing: -1px;
}
.public-hero .lead {
  font-size: 20px;
  color: #2D3748;
  max-width: 640px;
  margin: 0 auto 16px;
}
.public-hero .hero-sub {
  font-size: 15px;
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.5;
}
.hero-actions { margin-top: 24px; }
.btn-primary-lg {
  display: inline-block;
  background: #2EC4B6;
  color: white;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.btn-primary-lg:hover {
  background: #0B3D5B;
  color: white;
  text-decoration: none;
}
.public-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.feature-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 24px;
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 12px;
}
.feature-card h3 {
  color: #0B3D5B;
  font-size: 16px;
  margin: 0 0 8px;
}
.feature-card p { font-size: 14px; line-height: 1.45; margin: 0; }
.public-cta {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid #E2E8F0;
  margin-top: 32px;
}
.public-cta p { font-size: 14px; margin: 0 0 12px; }

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  color: #64748B;
  font-size: 12px;
  border-top: 1px solid #E2E8F0;
  margin-top: 48px;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  row-gap: 6px;
  margin-top: 12px;
}
.footer-legal a {
  color: #64748B;
  text-decoration: none;
  padding: 0 20px;
  border-right: 1px solid #CBD5E1;
  line-height: 1;
}
.footer-legal a:last-child { border-right: none; }
.footer-legal a:hover { color: #0B3D5B; text-decoration: underline; }

/* U-RWD-7: en móvil, altura táctil ≥44px en enlaces del pie y botones pequeños. */
@media (max-width: 640px) {
  .footer-legal a { padding: 12px 16px; line-height: 1.2; }
  .btn-sm { padding: 12px 16px; min-height: 44px; box-sizing: border-box; }
}

/* Páginas legales (privacidad, aviso legal, cookies) */
.legal { max-width: 820px; margin: 0 auto; padding: 8px 4px 40px; line-height: 1.65; color: #2D3748; }
.legal h1 { color: #0B3D5B; font-size: 30px; margin: 0 0 20px; letter-spacing: -0.5px; }
.legal h2 { color: #0B3D5B; font-size: 20px; margin: 32px 0 10px; }
.legal h3 { color: #0B3D5B; font-size: 16px; margin: 22px 0 8px; }
.legal p, .legal li { font-size: 15px; }
.legal a { color: #2EC4B6; }
.legal a:hover { color: #0B3D5B; }
.legal-index { color: #475569; font-size: 14px; background: #F8FAFC;
  border: 1px solid #E2E8F0; border-radius: 8px; padding: 14px 14px 14px 34px; margin: 0 0 12px; }
.legal-index li { margin: 2px 0; }
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.legal-table th, .legal-table td { border: 1px solid #E2E8F0; padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-table th { background: #0B3D5B; color: #fff; font-weight: 600; }
.legal-table tr:nth-child(even) td { background: #F8FAFC; }
/* U-RWD-3: en móvil, tablas legales de varias columnas con scroll horizontal
   (display:block convierte la tabla en contenedor desplazable). */
@media (max-width: 640px) {
  .legal-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
}

/* U-UI-2: botón en estado "subiendo…". */
.btn.is-loading { opacity: .65; cursor: progress; pointer-events: none; }

/* U-RWD-5 (2026-06-28): eliminado el bloque "Public homepage" DUPLICADO
   (estaba repetido más arriba). La home actual usa su propio CSS y no
   extiende base.html, así que estas reglas eran código muerto duplicado. */

/* Impersonation banner (PR17) */
.impersonate-banner {
  background: #FFF3E0; color: #B45309; padding: 10px 24px;
  border-bottom: 2px solid #B45309; display: flex; align-items: center;
  justify-content: space-between; font-size: 13px;
}
.impersonate-banner .btn-link { background: #B45309; color: white; border-color: #B45309; }
.impersonate-banner .btn-link:hover { background: #92400E; color: white; }

/* Badge mono dd/mm/aaaa para fechas — hereda font-family/size/weight del
   bloque común de badges (mono regular, var(--fs-badge)). */
.dob-badge {
  display: inline-block;
  background: #f6f8fb;
  border: 1px solid #e3e8ef;
  color: #0C1C2C;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: help;
}

/* ─── /dashboard/perfil ─────────────────────────────────────────────── */
.profile-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 28px 60px;
}
.profile-page .page-head h1 {
  font-size: 28px;
  margin: 0 0 6px;
  color: #0B1220;
}
.profile-page .page-head p {
  color: #6b7a90;
  margin: 0 0 22px;
  font-weight: 400;
}
.profile-form {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 14px;
  padding: 24px 26px;
  box-shadow: 0 12px 34px rgba(10,22,40,.06);
}
.profile-form .form-row {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 16px;
}
.profile-form label {
  font-size: 13px;
  font-weight: 600;
  color: #0B1220;
}
.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form select {
  font: 400 14px 'Inter', system-ui, sans-serif;
  padding: 10px 12px;
  border: 1px solid #d4dae3;
  border-radius: 8px;
  background: #fff;
  color: #0B1220;
}
.profile-form input:disabled {
  background: #f6f8fb;
  color: #6b7a90;
  cursor: not-allowed;
}
.profile-form small.muted {
  font-size: 12.5px;
  color: #6b7a90;
}
.profile-form .form-actions {
  display: flex; gap: 12px; align-items: center;
  margin-top: 8px;
}
.profile-form .btn {
  font-family: 'Inter', sans-serif;
  font-weight: 700; font-size: 14px;
  border: 0; border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  text-decoration: none;
}
.profile-form .btn-primary {
  background: linear-gradient(100deg, #7C5CFF 0%, #22D3EE 100%);
  color: #06121b;
  box-shadow: 0 8px 22px rgba(124,92,255,.30);
}
.profile-form .btn-primary:hover { transform: translateY(-1px); }
.profile-form .btn-ghost {
  background: transparent;
  color: #2a384b;
  border: 1px solid #d4dae3;
}
.profile-form .btn-ghost:hover { background: #f6f8fb; }

/* ─── Wizards de paciente: RAW · Analíticas · Antropometría ─────────── */
.wizards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 0 0 24px;
}
.wizard-card {
  background: #fff;
  border: 1px solid #e3e8ef;          /* borde uniforme (sin barra a la izquierda) */
  border-radius: 6px;                 /* mismo redondeo que el resto de bloques (.card) */
  padding: 18px 20px;
  box-shadow: 0 12px 34px rgba(10,22,40,.06);
  display: flex; flex-direction: column; gap: 8px;
}
/* .wizard-card--ok ya no cambia el borde (antes pintaba la barra verde). */
/* Cabecera: título a la izquierda + estado (pill o fecha) a la derecha */
.wizard-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0;
}
.wizard-card-head h3 {
  font-size: 15.5px; font-weight: 700; margin: 0;
  color: #0B1220;
  display: inline-flex; align-items: center; gap: 8px;
}
/* Icono plano line-art: hereda el color del título, peso fino. */
.wizard-card-ico {
  width: 18px; height: 18px;
  display: inline-block;
  color: var(--bag-navy, #0C1C2C);
  flex-shrink: 0;
}

/* Link de acción del wizard (Reemplazar / Añadir nueva / Actualizar) — al
   tamaño del meta, sin negrita, color navy, subraya en hover. */
.wizard-action-link {
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--bag-navy, #0C1C2C);
  text-decoration: none;
  padding: 0;
}
.wizard-action-link:hover { text-decoration: underline; color: var(--bag-navy, #0C1C2C); }
.wizard-card-meta {
  font-size: 13px; color: #6b7a90; margin: 0;
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
/* Acciones siempre alineadas a la DERECHA, abajo del card */
.wizard-card-actions {
  margin-top: auto;
  display: flex; gap: 10px; align-items: center;
  justify-content: flex-end;
  padding-top: 8px;
}
.wizard-pill {
  display: inline-block;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid transparent; width: fit-content;
}
.wizard-pill--ok      { background: #ddf7e8; color: #1f7a4d; border-color: #b8ecc5; }
.wizard-pill--pending { background: #fdeaea; color: #9a2025; border-color: #f4bcc0; }

/* Páginas de wizard (upload_raw, upload_labs, anthropometria) */
.wizard-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 28px 60px;
}
.wizard-page h1 {
  font-size: 28px; margin: 8px 0 6px; color: #0B1220;
}
.wizard-page > .muted { font-size: 14px; margin: 0 0 18px; }
.wizard-status {
  padding: 11px 14px; border-radius: 10px;
  background: #eef2f7; color: #2a384b;
  margin: 0 0 18px; font-size: 14px;
}
.wizard-status--ok { background: #ecfdf5; color: #15803d; border: 1px solid #b8ecc5; }
.wizard-form {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 12px 34px rgba(10,22,40,.06);
  display: flex; flex-direction: column; gap: 14px;
}
.wizard-label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: #0B1220; font-weight: 600;
}
.wizard-label input, .wizard-label select, .wizard-label textarea {
  font: 400 14px 'Inter', system-ui, sans-serif;
  padding: 10px 12px;
  border: 1px solid #d4dae3;
  border-radius: 8px;
  background: #fff; color: #0B1220;
}
.wizard-label small { font-weight: 400; margin-top: 2px; }
.wizard-h2 {
  font-size: 15px; font-weight: 700; color: #0B3D5B;
  margin: 14px 0 2px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.wizard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.wizard-actions {
  display: flex; gap: 12px; align-items: center; margin-top: 6px;
}
.wizard-table {
  width: 100%; border-collapse: collapse; margin-top: 8px;
  background: #fff; border-radius: 12px; overflow: hidden;
  border: 1px solid #e3e8ef;
}
.wizard-table th, .wizard-table td {
  padding: 10px 14px; font-size: 13px; text-align: left;
  border-bottom: 1px solid #eef2f7;
}
.wizard-table tr:last-child td { border-bottom: 0; }
.wizard-table th { background: #f6f8fb; color: #6b7a90; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Botones genéricos usados en wizards — versión sobria navy plano */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px;
  border: 0; border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer; text-decoration: none;
  transition: background-color .15s ease;
}
.btn-primary {
  background: #0C1C2C;
  color: #fff;
}
.btn-primary:hover { background: #14283f; text-decoration: none; }
.btn-ghost {
  background: transparent; color: #2a384b;
  border: 1px solid #d4dae3;
}
.btn-ghost:hover { background: #f6f8fb; text-decoration: none; }
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
}

/* ─── Utilidades de tabla ────────────────────────────────────────── */
.col-right  { text-align: right; }
.col-center { text-align: center; }

/* Card especial para 'Tus compras' — sin barra verde lateral */
.card-packs { border-left: 4px solid var(--bag-navy, #0C1C2C); }
/* Mismo tamaño que cualquier h2 del panel (p. ej. "Pacientes"). */
.card-h2    { margin-top: 0; color: var(--bag-navy, #0C1C2C); font-size: var(--fs-h2); }

/* Cabecera de columna acepta el align via .col-right/.col-center */
.data-table thead th.col-right  { text-align: right; }
.data-table thead th.col-center { text-align: center; }
.data-table tbody td.col-right  { text-align: right; }
.data-table tbody td.col-center { text-align: center; }

/* La pildora "status" debe quedar centrada visualmente en su celda */
.packs-table .status { display: inline-block; }

/* ─── Mobile: ocultar columnas no críticas ────────────────────────── */
@media (max-width: 640px) {
  .col-hide-mobile { display: none !important; }
  .data-table { font-size: 13px; }
  .btn-sm { padding: 5px 11px; font-size: 12.5px; }
}

/* ─── Páginas de progreso (reports + redeem) ─────────────────────── */
.progress-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.progress-h1 {
  color: var(--bag-navy, #0C1C2C);
  margin-top: 0;
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 700;
}
.progress-bar-track {
  background: #E2E8F0;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
  margin: 24px 0 8px;
}
.progress-bar-fill {
  background: var(--bag-navy, #0C1C2C);
  height: 100%;
  width: 5%;
  transition: width .4s ease;
}
.progress-msg { font-size: 14px; }
.progress-done { display: none; margin-top: 20px; }
.progress-done-line {
  color: #15803D;
  font-weight: 600;
}
.progress-error { display: none; margin-top: 20px; color: #B91C1C; }
.progress-error-msg { font-weight: 600; }
.progress-error-hint { font-size: 13px; }
