/* VITACARE Salud — Design system premium (prototipo landing) */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&display=swap");

:root {
  --blue: #0a3d62;
  --blue-mid: #0c6eb6;
  --blue-soft: #e8f4fc;
  --blue-deep: #062a45;
  --wine: #8b1e3f;
  --wine-mid: #a3244d;
  --wine-soft: #fdf0f4;
  --white: #ffffff;
  --bg: #eef3f8;
  --bg-elevated: #ffffff;
  --text: #0f172a;
  --muted: #5b6b7c;
  --line: #e0e8f0;
  --ok: #0f766e;
  --ok-bg: #ccfbf1;
  --warn: #b45309;
  --warn-bg: #fff7ed;
  --danger: #b91c1c;
  --shadow: 0 2px 4px rgba(10, 61, 98, 0.03), 0 10px 28px -6px rgba(10, 61, 98, 0.1);
  --shadow-lg: 0 12px 28px -8px rgba(10, 61, 98, 0.14), 0 28px 56px -16px rgba(10, 61, 98, 0.16);
  --shadow-float: 0 16px 40px rgba(12, 110, 182, 0.22);
  --shadow-soft: 0 8px 24px rgba(10, 61, 98, 0.07);
  --shadow-wine: 0 12px 32px rgba(139, 30, 63, 0.22);
  --grad-blue: linear-gradient(145deg, var(--blue-mid), var(--blue));
  --grad-wine: linear-gradient(135deg, var(--wine-mid), var(--wine));
  --grad-surface: linear-gradient(180deg, #ffffff 0%, #f5f9fc 100%);
  --grad-section: linear-gradient(180deg, rgba(232, 244, 252, 0.55) 0%, rgba(243, 246, 250, 0.2) 48%, transparent 100%);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --header-h: 64px;
  --bottom-nav-h: 64px;
  --touch: 48px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Brand images — reemplaza archivos en assets/img/ para personalizar */
  --brand-logo-mark: url("../img/logo-mark.svg");
  --brand-logo-full: url("../img/logo.svg");
  --brand-logo-icon: url("../img/logo-icon.jpg");
  --hero-photo: url("../img/hero-bg.jpg");
  --cta-photo: url("../img/cta-bg.jpg");
  --hero-pattern: url("../img/hero-pattern.svg");
  --mesh-pattern: url("../img/pattern-mesh.svg");
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 50% at 0% -10%, rgba(12, 110, 182, 0.07), transparent 55%),
    radial-gradient(ellipse 70% 40% at 100% 20%, rgba(139, 30, 63, 0.045), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Mobile-first: espacio para barra inferior + safe area */
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 0.5rem);
  min-height: 100dvh;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-mid); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--wine); }
h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 0.55em; color: var(--blue); letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--muted); }
.container { width: min(1140px, calc(100% - 1.25rem)); margin: 0 auto; }

/* Touch-friendly defaults (mobile first) */
button, .btn, .nav-toggle, .chip, .tab, input, select, textarea {
  touch-action: manipulation;
}
.btn {
  min-height: var(--touch);
}
input, select, textarea {
  min-height: var(--touch);
  font-size: 16px; /* evita zoom automático iOS */
}

/* ——— Header ——— */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border-bottom: 1px solid rgba(224, 232, 240, 0.85);
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 8px 28px rgba(10, 61, 98, 0.06);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.logo {
  display: flex; align-items: center;
  min-width: 0; max-width: min(62vw, 220px);
  flex-shrink: 1;
  line-height: 0;
}
.logo:hover { opacity: 0.92; }
/* Un solo logo de marca (imagen). Reemplazar assets/img/logo.svg o subir en Admin. */
.logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(200px, 58vw);
  object-fit: contain;
  object-position: left center;
}
.logo-img-footer {
  height: 44px;
  max-width: 200px;
  background: #fff;
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
  box-sizing: content-box;
}

.nav-desktop { display: none; gap: 0.1rem; align-items: center; flex-wrap: wrap; }
.nav-desktop a {
  color: var(--text); font-size: 0.84rem; font-weight: 600;
  padding: 0.48rem 0.72rem; border-radius: 999px; transition: 0.2s var(--ease);
}
.nav-desktop a:hover, .nav-desktop a.active {
  background: var(--blue-soft); color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  min-width: 0;
}
/* Auth / Mi panel: siempre visible (Ingresar o Cuenta + Salir) */
[data-auth-slot] {
  display: inline-flex !important;
  align-items: center;
  min-width: 0;
  visibility: visible !important;
  opacity: 1 !important;
}
.header-user {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}
.header-auth-btn {
  white-space: nowrap;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-logout-btn {
  white-space: nowrap;
  flex-shrink: 0;
}
.header-actions > .btn-primary.btn-sm {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Carrito header — desplegable flotante */
.header-cart {
  position: relative;
  flex-shrink: 0;
}
.header-cart-btn {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  transition: 0.2s var(--ease);
  color: var(--blue);
  padding: 0;
  font-family: inherit;
}
.header-cart-btn:hover,
.header-cart.is-open .header-cart-btn {
  background: var(--blue-soft);
  border-color: var(--blue-mid);
}
.header-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--wine-mid), var(--wine));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(139, 30, 63, 0.35);
  pointer-events: none;
}
.header-cart-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 120;
  width: min(360px, calc(100vw - 1.25rem));
  max-height: min(70vh, 520px);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(10, 61, 98, 0.22);
  animation: cartDrop 0.22s var(--ease);
}
.header-cart-dropdown[hidden] {
  display: none !important;
}
@keyframes cartDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.header-cart-panel {
  max-height: min(70vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 1rem !important;
  margin: 0 !important;
}
.header-cart-panel h3 {
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
}
.header-cart-panel .cart-item {
  font-size: 0.88rem;
}
.header-cart-panel .note-clinical {
  font-size: 0.72rem;
  margin-top: 0.5rem;
}
.header-cart-panel .coupon-box {
  margin-top: 0.5rem;
  padding: 0.55rem;
}
.header-cart-panel .cart-actions {
  gap: 0.4rem;
}
.header-cart-panel .btn {
  min-height: 42px;
  font-size: 0.84rem;
}

.nav-toggle {
  border: 1.5px solid var(--line); background: #fff; border-radius: 14px;
  width: var(--touch); height: var(--touch); min-width: var(--touch);
  display: grid; place-items: center; cursor: pointer;
  font-size: 1.25rem; transition: 0.2s; color: var(--blue); font-weight: 700;
}
.nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: var(--blue-soft); border-color: var(--blue-mid); }
.nav-toggle-bars {
  display: flex; flex-direction: column; gap: 5px; width: 18px;
}
.nav-toggle-bars i {
  display: block; height: 2px; background: var(--blue); border-radius: 2px;
  transition: 0.22s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.nav-mobile {
  display: none; position: absolute; left: 0; right: 0;
  top: calc(var(--header-h) + var(--safe-top));
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.85rem calc(0.85rem + var(--safe-bottom));
  box-shadow: var(--shadow-lg);
  max-height: min(78vh, 560px); overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-mobile.open { display: block; animation: slideDown 0.25s var(--ease); }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-mobile a, .nav-mobile button {
  display: flex; align-items: center; gap: 0.65rem;
  min-height: var(--touch); padding: 0.75rem 1rem; border-radius: 14px;
  color: var(--text); font-weight: 700; font-size: 0.95rem;
  width: 100%; text-align: left; border: none; background: transparent;
  font-family: inherit; cursor: pointer;
}
.nav-mobile a:hover, .nav-mobile a:active,
.nav-mobile button:hover { background: var(--blue-soft); color: var(--blue); }
.nav-mobile .nav-mobile-cta {
  margin-top: 0.35rem;
  background: linear-gradient(135deg, var(--wine-mid), var(--wine));
  color: #fff !important; justify-content: center;
  box-shadow: 0 8px 20px rgba(139, 30, 63, 0.28);
}
.nav-scrim {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(6, 30, 52, 0.35); backdrop-filter: blur(2px);
}
.nav-scrim.open { display: block; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border: none; cursor: pointer; font-weight: 700; font-size: 0.92rem;
  border-radius: 999px; padding: 0.88rem 1.4rem;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), filter 0.22s var(--ease), background 0.22s var(--ease), border-color 0.22s var(--ease);
  text-decoration: none; font-family: inherit; white-space: nowrap;
  position: relative;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--grad-wine);
  color: #fff !important;
  box-shadow: var(--shadow-wine), 0 1px 0 rgba(255,255,255,0.18) inset;
}
.btn-primary:hover {
  filter: brightness(1.07);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(139, 30, 63, 0.32), 0 1px 0 rgba(255,255,255,0.2) inset;
}
.btn-secondary {
  background: var(--grad-blue);
  color: #fff !important;
  box-shadow: 0 10px 28px rgba(12, 110, 182, 0.28), 0 1px 0 rgba(255,255,255,0.15) inset;
}
.btn-secondary:hover {
  filter: brightness(1.07);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(12, 110, 182, 0.34);
}
.btn-outline {
  background: rgba(255,255,255,0.92);
  color: var(--blue) !important;
  border: 1.5px solid #c5d9ea;
  box-shadow: 0 2px 10px rgba(10,61,98,0.05);
}
.btn-outline:hover {
  border-color: var(--blue-mid);
  background: var(--blue-soft);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(12, 110, 182, 0.1);
}
.btn-ghost { background: transparent; color: var(--blue) !important; }
.btn-sm { padding: 0.58rem 1rem; font-size: 0.84rem; }
.btn-block { width: 100%; }
.btn-lg { padding: 1.05rem 1.7rem; font-size: 1rem; }
.btn-soft {
  background: linear-gradient(180deg, #f0f8ff, var(--blue-soft));
  color: var(--blue) !important;
  border: 1px solid rgba(12, 110, 182, 0.1);
  box-shadow: 0 2px 8px rgba(12, 110, 182, 0.06);
}
.btn-soft:hover {
  background: linear-gradient(180deg, #e4f2fc, #d6ecfa);
  border-color: rgba(12, 110, 182, 0.18);
}

/* ——— Cards ——— */
.card {
  background: var(--grad-surface);
  border: 1px solid rgba(224, 232, 240, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.3rem;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
  position: relative;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #c8dae8;
}
.card-icon {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.4rem;
  background:
    linear-gradient(160deg, #ffffff 0%, var(--blue-soft) 100%);
  margin-bottom: 0.95rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 8px 18px rgba(12, 110, 182, 0.1);
  border: 1px solid rgba(12, 110, 182, 0.08);
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.card p { font-size: 0.92rem; margin-bottom: 0.85rem; }
.card-link {
  font-weight: 700; color: var(--wine); font-size: 0.88rem;
  display: inline-flex; align-items: center; gap: 0.3rem;
  transition: gap 0.2s var(--ease);
}
.card:hover .card-link { gap: 0.45rem; }

.grid-2 { display: grid; gap: 1rem; }
.grid-3 { display: grid; gap: 1rem; }
.grid-4 { display: grid; gap: 1rem; }

/* ——— Hero compacto (mobile-first, no se estira de más) ——— */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 92% 8%, rgba(163, 36, 77, 0.42), transparent 52%),
    radial-gradient(ellipse 55% 50% at 8% 92%, rgba(12, 110, 182, 0.45), transparent 48%),
    linear-gradient(148deg, #041e32 0%, #0a3d62 38%, #0c5a8a 72%, #5c1732 140%);
  color: #fff;
  padding: 1.5rem 0 1.75rem;
  min-height: 0;
  display: block;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: var(--hero-photo);
  background-size: cover;
  background-position: center 28%;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.02);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(118deg, rgba(4, 24, 42, 0.94) 0%, rgba(10, 61, 98, 0.86) 42%, rgba(10, 61, 98, 0.72) 68%, rgba(90, 22, 48, 0.78) 100%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(12, 110, 182, 0.2), transparent 60%);
  pointer-events: none;
}
.hero-pattern {
  position: absolute; inset: 0;
  background-image: var(--hero-pattern);
  background-size: 96px 96px;
  opacity: 0.42;
  pointer-events: none;
  mix-blend-mode: soft-light;
}
/* Orbes / brillos decorativos del hero */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(2px);
}
.hero-glow-a {
  width: min(280px, 55vw);
  height: min(280px, 55vw);
  top: -12%;
  right: -6%;
  background: radial-gradient(circle, rgba(163, 36, 77, 0.35) 0%, transparent 70%);
}
.hero-glow-b {
  width: min(220px, 48vw);
  height: min(220px, 48vw);
  bottom: -10%;
  left: -4%;
  background: radial-gradient(circle, rgba(12, 110, 182, 0.38) 0%, transparent 72%);
}
.hero-glow-c {
  width: 120px;
  height: 120px;
  top: 38%;
  left: 42%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  opacity: 0.7;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100% - 1.25rem));
  margin: 0 auto;
}
.hero-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}
.hero-copy { min-width: 0; }
.hero-aside {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 0;
}
/* Tarjeta unificada (foto + buscador) — look premium integrado */
.hero-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.08) 55%, rgba(255,255,255,0.06) 100%);
  border: 1px solid rgba(255,255,255,0.32);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.22) inset,
    0 22px 48px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255,255,255,0.05);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transform: translateZ(0);
}
.hero-search-photo {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  box-shadow: none;
  max-height: 132px;
  background: rgba(6, 30, 52, 0.35);
}
.hero-search-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(6, 30, 52, 0.55) 100%);
  pointer-events: none;
}
.hero-search-photo img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.hero-card-badge {
  position: absolute;
  left: 0.75rem;
  bottom: 0.65rem;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(10, 61, 98, 0.72);
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.hero-visual {
  display: none;
  position: relative;
  margin-bottom: 0.65rem;
}
.hero-visual-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  aspect-ratio: 16 / 10;
  max-height: 160px;
  background: rgba(255,255,255,0.08);
}
.hero-visual-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.38rem, 5.5vw, 1.95rem);
  max-width: 18ch;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 24px rgba(0,0,0,0.3);
}
.hero .lead {
  color: rgba(255,255,255,0.92);
  font-size: 0.92rem;
  max-width: 36ch;
  margin-bottom: 1rem;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.hero-actions .btn {
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  font-size: 0.9rem;
}
.btn-hero-ghost {
  background: rgba(255,255,255,0.1) !important;
  color: #fff !important;
  border: 1.5px solid rgba(255,255,255,0.32) !important;
  box-shadow: none !important;
}
.btn-hero-ghost:hover {
  background: rgba(255,255,255,0.18) !important;
  color: #fff !important;
}

/* Buscador dentro de la tarjeta hero */
.hero-panel {
  margin-top: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 0.85rem 0.85rem 0.95rem;
  backdrop-filter: none;
  box-shadow: none;
  max-width: 100%;
}
.hero-panel-title {
  color: rgba(255,255,255,0.95);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.search-box {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 0.2rem 0.2rem 0.2rem 0.15rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.55);
}
.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
  min-height: 40px;
  border-radius: 10px;
  font-family: inherit;
  color: var(--text);
  min-width: 0;
  background: transparent;
}
.search-box .btn {
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.55rem; }
.chips-compact { margin-top: 0.45rem; }
.chip {
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
  min-height: 28px;
  line-height: 1.2;
}
.chip:hover { background: rgba(255,255,255,0.18); }

/* Trust: pastillas pequeñas con icono + texto corto */
.hero-trust {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0.7rem 0 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.55rem 0.28rem 0.3rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  max-width: 100%;
}
.hero-trust-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  background: rgba(255,255,255,0.16);
  flex-shrink: 0;
  line-height: 1;
  overflow: hidden;
}
.hero-trust-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-trust-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
  min-width: 0;
}
.hero-trust-text strong {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.hero-trust-text small {
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
}
.social-bar-hero {
  justify-content: flex-start !important;
  margin-top: 0.75rem !important;
  gap: 0.35rem !important;
}
.social-bar-hero .social-btn {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  flex: 0 0 auto;
}

/* ——— Sections ——— */
.section {
  position: relative;
  padding: 3.25rem 0;
  overflow: hidden;
}
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--mesh-pattern);
  background-size: 80px 80px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.section > .container,
.section > .container.grid-2 {
  position: relative;
  z-index: 1;
}
.section-alt {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.97) 0%, #ffffff 40%, #f8fbfd 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}
.section:not(.section-alt) {
  background: var(--grad-section);
}
.section-soft {
  background: linear-gradient(180deg, #f8fafc 0%, var(--blue-soft) 100%);
}
.section-head { margin-bottom: 1.6rem; max-width: 38rem; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 {
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  color: var(--blue);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .section-head h2 {
    background: linear-gradient(120deg, var(--blue) 0%, #0c5a8a 70%, var(--blue-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.section-head p { max-width: 48ch; }
.kicker {
  color: var(--wine);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.kicker::before {
  content: "";
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--grad-wine);
  box-shadow: 0 2px 8px rgba(139, 30, 63, 0.25);
}
.section-head.center .kicker {
  justify-content: center;
}

/* Funnel progress (home) */
.funnel-bar {
  display: flex; gap: 0.35rem; overflow-x: auto; padding: 0.25rem 0 0.5rem;
  margin-bottom: 0.25rem; scrollbar-width: none;
}
.funnel-bar::-webkit-scrollbar { display: none; }
.funnel-bar a {
  flex-shrink: 0; font-size: 0.72rem; font-weight: 700; color: var(--muted);
  padding: 0.4rem 0.75rem; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); white-space: nowrap;
}
.funnel-bar a:hover { color: var(--blue); border-color: var(--blue-mid); }

/* Visual media helpers */
.media-card {
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(10, 61, 98, 0.04);
  border: 1px solid rgba(255,255,255,0.7);
  background: #fff;
  position: relative;
}
.media-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 61, 98, 0.18) 100%);
  pointer-events: none;
}
.media-card img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  min-height: 220px; max-height: 320px;
}
.section-visual { display: grid; gap: 1.25rem; align-items: center; }
.brand-strip {
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: center;
  padding: 1.25rem; background: #fff; border-block: 1px solid var(--line);
}
.brand-strip img { height: 36px; width: auto; opacity: 0.85; }

/* Need cards */
.need-card {
  display: flex; gap: 0.95rem; align-items: flex-start;
  padding: 1.25rem 1.2rem; cursor: pointer; text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
}
.need-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad-wine);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  border-radius: 0 4px 4px 0;
}
.need-card:hover::before { opacity: 1; }
.need-card::after {
  content: "→"; position: absolute; right: 1.1rem; bottom: 1.1rem;
  color: var(--wine); font-weight: 700; opacity: 0; transition: 0.25s;
}
.need-card:hover::after { opacity: 1; transform: translateX(3px); }
.need-card:hover h3 { color: var(--wine); }
.need-emoji {
  width: 50px; height: 50px; border-radius: 15px; flex-shrink: 0;
  background: linear-gradient(155deg, #fff 0%, var(--wine-soft) 100%);
  display: grid; place-items: center; font-size: 1.28rem;
  border: 1px solid rgba(139, 30, 63, 0.1);
  box-shadow: 0 6px 14px rgba(139, 30, 63, 0.08);
}

/* Category tiles */
.cat-tile {
  text-decoration: none; color: inherit; display: block; height: 100%;
  padding: 1.4rem 1.3rem;
}
.cat-tile .card-icon { margin-bottom: 1rem; }
.cat-tile h3 { font-size: 1.08rem; }
.cat-price {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--blue);
  background: linear-gradient(180deg, #f0f8ff, var(--blue-soft));
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(12, 110, 182, 0.12);
  letter-spacing: 0.01em;
}

/* Steps */
.steps { display: grid; gap: 1rem; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  background: var(--grad-surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: 0.28s var(--ease);
}
.step:hover {
  border-color: #b8d4ea;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad-blue);
  color: #fff; display: grid; place-items: center; font-weight: 800;
  box-shadow: 0 10px 20px rgba(12, 110, 182, 0.28), 0 1px 0 rgba(255,255,255,0.2) inset;
  font-size: 0.95rem;
}
.step h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.step p { margin: 0; font-size: 0.9rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
.stat {
  background: var(--grad-surface);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  border: 1px solid var(--line);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.stat strong {
  display: block;
  font-size: 1.55rem;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: -0.02em;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .stat strong {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.stat span { font-size: 0.8rem; color: var(--muted); font-weight: 500; }

/* Service select */
.service-select {
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; background: #fff; cursor: pointer; transition: 0.22s var(--ease);
  display: flex; flex-direction: column; gap: 0.4rem; min-height: 100%;
  position: relative;
}
.service-select:hover { border-color: var(--blue-mid); box-shadow: var(--shadow); }
.service-select.selected {
  border-color: var(--wine);
  background: linear-gradient(165deg, #fff 40%, var(--wine-soft));
  box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.12);
}
.service-select.selected::before {
  content: "✓"; position: absolute; top: 12px; right: 12px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--wine); color: #fff; font-size: 0.75rem;
  display: grid; place-items: center; font-weight: 800;
}
.service-select .price { color: var(--blue); font-weight: 800; font-size: 1.08rem; letter-spacing: -0.02em; }
.service-select .meta { font-size: 0.8rem; color: var(--muted); }
.service-select .tag {
  align-self: flex-start; font-size: 0.68rem; font-weight: 700;
  background: var(--blue-soft); color: var(--blue); padding: 0.22rem 0.55rem; border-radius: 999px;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.note-clinical {
  font-size: 0.78rem; color: var(--warn); background: var(--warn-bg);
  border: 1px solid #fed7aa; border-radius: 12px; padding: 0.65rem 0.85rem; margin-top: 0.35rem;
  line-height: 1.45;
}
.note-info {
  font-size: 0.8rem; color: var(--blue); background: var(--blue-soft);
  border: 1px solid #b8d4ea; border-radius: 12px; padding: 0.65rem 0.85rem;
  line-height: 1.45;
}

/* Layout configurator */
.layout-config { display: grid; gap: 1.25rem; align-items: start; }
.cart-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 1.25rem;
}
.cart-panel h3 { font-size: 1.02rem; margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.4rem; }
.cart-empty { font-size: 0.9rem; color: var(--muted); padding: 0.5rem 0 1rem; line-height: 1.5; }
.cart-item {
  display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 0.75rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem;
}
.cart-item .name { font-weight: 700; color: var(--text); }
.cart-item .qty { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 6px; }
.cart-item button.qty-btn {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-weight: 700; transition: 0.15s;
}
.cart-item button.qty-btn:hover { background: var(--blue-soft); border-color: var(--blue-mid); }
.cart-totals { margin-top: 0.85rem; font-size: 0.9rem; }
.cart-totals .row { display: flex; justify-content: space-between; margin-bottom: 0.4rem; color: var(--muted); }
.cart-totals .total {
  display: flex; justify-content: space-between; margin-top: 0.6rem; padding-top: 0.7rem;
  border-top: 1px dashed var(--line); font-weight: 800; color: var(--blue); font-size: 1.1rem;
}
.cart-actions { display: grid; gap: 0.5rem; margin-top: 1rem; }

/* Cupones en configurador de precios */
.coupon-box {
  margin: 0.75rem 0 0.35rem;
  padding: 0.75rem;
  border: 1.5px dashed #b8d4ea;
  border-radius: 14px;
  background: linear-gradient(165deg, #fff, var(--blue-soft));
}
.coupon-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.coupon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.coupon-row input {
  flex: 1 1 120px;
  min-width: 0;
  min-height: 42px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.coupon-row .btn { min-height: 42px; }
.coupon-msg {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
}
.coupon-msg-ok { color: var(--ok); }
.coupon-msg-err { color: var(--danger); }

.cart-mobile-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 0.8rem 1rem;
  box-shadow: 0 -12px 40px rgba(10, 61, 98, 0.1);
}
.cart-mobile-bar .inner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: min(1140px, 100%); margin: 0 auto;
}
.cart-mobile-bar strong { color: var(--blue); font-size: 1.1rem; font-weight: 800; }

/* Tabs */
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.tab {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 0.58rem 1rem; font-weight: 700; font-size: 0.84rem; cursor: pointer;
  color: var(--muted); font-family: inherit; transition: 0.2s;
}
.tab:hover { border-color: var(--blue-mid); color: var(--blue); }
.tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ——— App dashboard ——— */
.app-shell {
  display: grid; gap: 1rem;
  min-height: 60vh;
}
.app-sidebar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem; box-shadow: var(--shadow);
}
.app-user {
  display: flex; gap: 0.75rem; align-items: center;
  padding: 0.85rem 0.75rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: 0.5rem;
}
.app-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-mid), var(--wine));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1rem;
  flex-shrink: 0;
}
.app-user strong { display: block; color: var(--blue); font-size: 0.95rem; }
.app-user span { font-size: 0.78rem; color: var(--muted); }

.dash-nav {
  display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.15rem;
  scrollbar-width: none;
}
.dash-nav::-webkit-scrollbar { display: none; }
.dash-nav a, .dash-nav button {
  white-space: nowrap; padding: 0.62rem 0.95rem; border-radius: 12px;
  background: transparent; border: none; color: var(--text); font-weight: 600;
  font-size: 0.84rem; cursor: pointer; font-family: inherit; text-align: left;
  display: flex; align-items: center; gap: 0.45rem; transition: 0.18s;
}
.dash-nav a:hover, .dash-nav button:hover { background: var(--blue-soft); color: var(--blue); }
.dash-nav a.active, .dash-nav button.active {
  background: linear-gradient(135deg, var(--blue-mid), var(--blue));
  color: #fff !important; box-shadow: 0 6px 16px rgba(12, 110, 182, 0.25);
}

.app-main { min-width: 0; }
.app-panel { display: none; animation: fadeIn 0.3s var(--ease); }
.app-panel.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1.1rem; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem; box-shadow: var(--shadow);
}
.kpi .label { font-size: 0.75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi .value { font-size: 1.35rem; font-weight: 800; color: var(--blue); letter-spacing: -0.02em; margin-top: 0.2rem; }
.kpi.wine .value { color: var(--wine); }

.appt-card {
  display: grid; gap: 0.8rem; padding: 1.2rem; margin-bottom: 0.85rem;
}
.appt-top { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; align-items: flex-start; }
.appt-title { font-weight: 700; color: var(--text); font-size: 1rem; }
.appt-meta { font-size: 0.88rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.45; }
.appt-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.status {
  font-size: 0.7rem; font-weight: 800; padding: 0.28rem 0.65rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0;
}
.status-confirmada { background: var(--ok-bg); color: #115e59; }
.status-pendiente { background: #fef3c7; color: #92400e; }
.status-en_camino { background: #dbeafe; color: #1e40af; }
.status-en_atencion { background: #e0e7ff; color: #3730a3; }
.status-completada { background: #e2e8f0; color: #334155; }
.status-cancelada { background: #fee2e2; color: #991b1b; }
.status-pagado { background: var(--ok-bg); color: #115e59; }
.status-pago_pendiente { background: #ffedd5; color: #9a3412; }

.notif-item {
  display: flex; gap: 0.85rem; padding: 0.95rem 0;
  border-bottom: 1px solid var(--line); align-items: flex-start;
}
.notif-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--wine);
  margin-top: 0.4rem; flex-shrink: 0;
}
.notif-item.read .notif-dot { background: var(--line); }
.notif-item strong { display: block; font-size: 0.92rem; color: var(--text); }
.notif-item span { font-size: 0.8rem; color: var(--muted); }

.qr-card {
  text-align: center; padding: 1.5rem;
  background: linear-gradient(165deg, #fff, var(--blue-soft));
}
.qr-fake {
  width: 148px; height: 148px; margin: 0.85rem auto;
  border-radius: 16px;
  background:
    linear-gradient(90deg, var(--blue) 2px, transparent 2px) 0 0 / 12px 12px,
    linear-gradient(var(--blue) 2px, transparent 2px) 0 0 / 12px 12px,
    #fff;
  border: 8px solid #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Placeholder decorativo solo si AÚN no hay QR real */
.qr-fake:not(.qr-has-image)::after {
  content: "VC"; position: absolute; inset: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; background: var(--wine); color: #fff;
  border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 0.75rem;
  pointer-events: none;
}
/* QR real (img/canvas generado localmente o API) */
.qr-fake.qr-has-image,
.qr-fake:has(img.vc-qr-img),
.qr-fake:has(canvas.vc-qr-canvas) {
  background: #fff;
  width: auto;
  height: auto;
  min-width: 148px;
  min-height: 148px;
  max-width: 220px;
  padding: 0.5rem;
}
.qr-fake.qr-has-image::after,
.qr-fake:has(img.vc-qr-img)::after,
.qr-fake:has(canvas.vc-qr-canvas)::after {
  display: none !important;
  content: none !important;
}
.qr-fake .vc-qr-img,
.qr-fake .vc-qr-canvas {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  background: #fff;
}

.progress-bar {
  height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 0.6rem;
}
.progress-bar > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--wine), var(--blue-mid));
}

/* Forms */
.form-grid { display: grid; gap: 0.9rem; }
/* display:grid de .form-grid anula el [hidden] del navegador — forzar ocultar */
[hidden],
.form-grid[hidden],
[data-tab-panel][hidden] {
  display: none !important;
}
label { display: grid; gap: 0.35rem; font-size: 0.84rem; font-weight: 700; color: var(--text); }

/* Auth: paneles separados (login vs registro) */
.auth-panel[hidden] {
  display: none !important;
}
.auth-login-panel {
  gap: 0.75rem;
}
.auth-recover-link-wrap {
  margin: 0;
  text-align: center;
}
.auth-link-btn {
  background: none;
  border: none;
  padding: 0.35rem 0.25rem;
  color: var(--blue-mid);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-link-btn:hover {
  color: var(--wine);
}
.auth-recover-box {
  margin-top: 0.35rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, var(--blue-soft));
  gap: 0.55rem;
}
.auth-recover-title {
  font-size: 1rem;
  margin: 0;
  color: var(--blue);
}
.auth-recover-hint {
  font-size: 0.84rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}
.auth-or {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-recover-support {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Auth: Google / Facebook (solo login, usuarios registrados) */
.auth-social {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.15rem;
}
.auth-or-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-or-divider::before,
.auth-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-or-divider span {
  white-space: nowrap;
}
.auth-social-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn-social:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(10, 61, 98, 0.1);
}
.btn-social:active {
  transform: scale(0.98);
}
.btn-social-icon {
  flex-shrink: 0;
}
.btn-social-google {
  background: #fff;
  color: #3c4043;
  border-color: #dadce0;
}
.btn-social-google:hover {
  background: #f8f9fa;
}
.btn-social-facebook {
  background: #1877f2;
  color: #fff;
  border-color: #1877f2;
}
.btn-social-facebook:hover {
  filter: brightness(1.05);
  color: #fff;
}
.auth-social-hint {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.35;
  text-align: center;
}
.auth-social-box {
  margin-top: 0.2rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f4f8fc);
  gap: 0.55rem;
}
@media (max-width: 420px) {
  .auth-social-btns {
    grid-template-columns: 1fr;
  }
}

/* Formularios de contacto Empresas (todas las páginas) — compactos, misma ubicación */
form#form.form-grid.card {
  gap: 0.45rem;
  padding: 0.9rem 1rem 1rem;
}
form#form.form-grid h2 {
  font-size: 1.02rem;
  margin: 0 0 0.1rem;
  line-height: 1.2;
}
form#form.form-grid label {
  gap: 0.18rem;
  font-size: 0.76rem;
  font-weight: 700;
}
form#form.form-grid input,
form#form.form-grid select,
form#form.form-grid textarea {
  min-height: 38px;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  border-radius: 10px;
  line-height: 1.3;
}
form#form.form-grid textarea {
  min-height: 64px;
  max-height: 88px;
  resize: vertical;
  padding-top: 0.5rem;
}
form#form.form-grid .btn {
  min-height: 40px;
  padding: 0.5rem 0.9rem;
  font-size: 0.86rem;
  margin-top: 0.1rem;
}
form#form.form-grid .btn + .btn,
form#form.form-grid a.btn {
  margin-top: 0;
}
@media (min-width: 520px) {
  form#form.form-grid.card {
    grid-template-columns: 1fr 1fr;
    column-gap: 0.55rem;
    row-gap: 0.45rem;
  }
  form#form.form-grid h2,
  form#form.form-grid label:has(textarea),
  form#form.form-grid > .btn,
  form#form.form-grid > a.btn {
    grid-column: 1 / -1;
  }
}
input, select, textarea {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 0.78rem 0.95rem;
  font: inherit; color: var(--text); background: #fff; transition: 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(12, 110, 182, 0.15);
}
.form-row-2 { display: grid; gap: 0.85rem; }
.radio-card {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.95rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; transition: 0.2s; background: #fff;
}
.radio-card:has(input:checked) {
  border-color: var(--blue-mid); background: var(--blue-soft);
}
.radio-card input { margin-top: 0.2rem; accent-color: var(--blue); }
.radio-card strong { display: block; font-size: 0.92rem; color: var(--text); }
.radio-card span { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

/* Membership */
.membership-grid {
  align-items: stretch;
}
.plan {
  position: relative; overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  /* padding directo para planes simples (home); plan-body sobrescribe cuando existe */
  padding: 1.3rem 1.25rem 1.35rem;
  background: var(--grad-surface);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
  display: flex; flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow);
}
.plan:has(.plan-body),
.plan:has(.plan-media) {
  padding: 0;
}
.plan:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #c5d9ea;
}
.plan.featured {
  border-color: rgba(139, 30, 63, 0.45);
  background: linear-gradient(180deg, #fff 50%, var(--wine-soft) 100%);
  box-shadow: 0 14px 36px rgba(139, 30, 63, 0.14), 0 0 0 1px rgba(139, 30, 63, 0.06);
}
.plan.featured::before {
  content: "Destacado";
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad-wine);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(139, 30, 63, 0.28);
}
.plan:has(.plan-badge).featured::before,
.plan:has(.plan-media).featured::before {
  display: none;
}
.plan-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--blue-soft);
}
.plan-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.plan-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: linear-gradient(135deg, var(--wine-mid), var(--wine));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(139, 30, 63, 0.28);
}
.plan-body {
  padding: 1.15rem 1.25rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.plan-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}
.plan .price-line {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}
.plan .price-line span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.15rem;
}
.plan ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}
.plan li { margin-bottom: 0.4rem; }
.plan-body .btn { margin-top: auto; }

/* Testimonials */
.t-card {
  padding: 1.4rem 1.35rem;
  height: 100%;
  background: var(--grad-surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.t-card::before {
  content: "\201C";
  position: absolute;
  top: 0.55rem;
  right: 1rem;
  font-size: 3.5rem;
  line-height: 1;
  color: rgba(12, 110, 182, 0.08);
  font-family: Georgia, "Times New Roman", serif;
  pointer-events: none;
}
.t-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.t-stars { color: #f59e0b; letter-spacing: 0.08em; margin-bottom: 0.65rem; font-size: 0.9rem; }
.t-card p { font-size: 0.95rem; color: var(--text); font-style: italic; margin-bottom: 1rem; line-height: 1.55; }
.t-author { font-size: 0.85rem; font-weight: 700; color: var(--blue); }
.t-author span { display: block; font-weight: 500; color: var(--muted); font-size: 0.78rem; margin-top: 0.15rem; }

/* FAQ */
.faq details {
  background: var(--grad-surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.05rem 1.15rem;
  margin-bottom: 0.6rem;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.faq details:hover {
  border-color: #c5d9ea;
}
.faq details[open] {
  border-color: rgba(12, 110, 182, 0.28);
  box-shadow: 0 8px 22px rgba(12, 110, 182, 0.08);
}
.faq summary { font-weight: 700; color: var(--blue); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--wine); font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0.7rem 0 0; font-size: 0.92rem; }

/* Page hero */
.page-hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(125deg, rgba(232, 244, 252, 0.95) 0%, rgba(255,255,255,0.92) 50%, rgba(253, 240, 244, 0.95) 120%),
    var(--hero-photo);
  background-size: cover;
  background-position: center 35%;
  padding: 2.1rem 0 1.7rem; border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(243, 246, 250, 0.35), transparent 60%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.breadcrumb { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.55rem; font-weight: 500; }
.breadcrumb a { color: var(--blue-mid); font-weight: 600; }

/* Coverage */
.cov {
  border-radius: 12px; padding: 0.8rem 0.95rem; font-weight: 600; font-size: 0.9rem; margin-top: 0.5rem;
}
.cov-ok { background: var(--ok-bg); color: #115e59; }
.cov-recargo { background: #ffedd5; color: #9a3412; }
.cov-pendiente { background: #fef3c7; color: #92400e; }
.cov-no { background: #fee2e2; color: #991b1b; }

/* Wizard */
.wizard-steps {
  display: flex; gap: 0.35rem; overflow-x: auto; margin: 1rem 0 0;
  padding-bottom: 0.35rem; scrollbar-width: none;
}
.wizard-steps::-webkit-scrollbar { display: none; }
.wizard-steps span {
  white-space: nowrap; font-size: 0.72rem; font-weight: 700; padding: 0.42rem 0.75rem;
  border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted);
}
.wizard-steps span.on {
  background: linear-gradient(135deg, var(--blue-mid), var(--blue));
  color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(12,110,182,0.3);
}
.wizard-steps span.done { background: var(--blue-soft); color: var(--blue); border-color: transparent; }

.wizard-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow); margin-bottom: 1rem;
}
.wizard-card h2 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.wizard-nav {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.25rem;
  padding-top: 1.1rem; border-top: 1px solid var(--line);
}
.price-sticky-mini {
  background: linear-gradient(135deg, var(--blue-soft), #fff);
  border: 1px solid #b8d4ea; border-radius: var(--radius-sm);
  padding: 0.9rem 1rem; margin-bottom: 1rem;
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
}
.price-sticky-mini strong { font-size: 1.2rem; color: var(--blue); font-weight: 800; }

.confirm-box {
  text-align: center; padding: 1.5rem 1rem;
}
.confirm-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 1rem;
  background: var(--ok-bg); color: var(--ok); display: grid; place-items: center;
  font-size: 2rem; box-shadow: 0 8px 24px rgba(15, 118, 110, 0.15);
}

/* Future integrations note */
.future-note {
  font-size: 0.78rem; color: var(--muted); background: #f8fafc;
  border: 1px dashed var(--line); border-radius: 12px; padding: 0.75rem 0.9rem;
  margin-top: 1rem; line-height: 1.45;
}

/* Footer */
.site-footer {
  position: relative;
  background:
    radial-gradient(ellipse 50% 40% at 10% 0%, rgba(12, 110, 182, 0.25), transparent 55%),
    radial-gradient(ellipse 40% 50% at 90% 100%, rgba(139, 30, 63, 0.2), transparent 50%),
    linear-gradient(180deg, var(--blue-deep), #041c2e);
  color: rgba(255,255,255,0.85); padding: 2.75rem 0 6.5rem; margin-top: 2.5rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #7dd3fc; }
.site-footer h4 { color: #fff; margin-bottom: 0.8rem; font-size: 0.95rem; }
.footer-brand {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem;
}
.footer-grid { display: grid; gap: 1.5rem; }
.footer-copy {
  margin-top: 1.85rem; padding-top: 1.1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.78rem; opacity: 0.75; line-height: 1.5;
}

/* Floaters — premium, alineados, discretos */
.floaters {
  position: fixed;
  right: max(0.65rem, env(safe-area-inset-right, 0px));
  bottom: 5.5rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 28px rgba(10, 61, 98, 0.12);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
.floaters .float-btn { pointer-events: auto; }
.float-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.62rem;
  box-shadow: 0 8px 18px rgba(10, 61, 98, 0.16);
  text-decoration: none;
  text-align: center;
  line-height: 1.1;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), filter 0.22s var(--ease);
  opacity: 0.96;
}
.float-btn:hover {
  transform: scale(1.07) translateY(-1px);
  color: #fff;
  opacity: 1;
  box-shadow: 0 12px 24px rgba(10, 61, 98, 0.22);
}
.float-btn:focus-visible {
  outline: 2px solid var(--blue-mid);
  outline-offset: 2px;
  opacity: 1;
}
.float-wa {
  background: linear-gradient(145deg, #2fe074, #1fbe5a);
  font-size: 1.2rem;
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.35);
}
.float-ai {
  background: var(--grad-blue);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(12, 110, 182, 0.32);
}

.toast {
  position: fixed; left: 50%; bottom: 6.5rem; transform: translateX(-50%) translateY(16px);
  background: var(--blue-deep); color: #fff; padding: 0.8rem 1.2rem; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; opacity: 0; pointer-events: none;
  transition: 0.28s var(--ease); z-index: 120;
  max-width: min(92vw, 380px); text-align: center;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* CTA band con foto */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(125deg, var(--blue) 0%, var(--blue-mid) 50%, var(--wine) 120%);
  color: #fff; padding: 3.75rem 0; text-align: center; border-radius: 0;
  margin: 0;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--cta-photo);
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  filter: saturate(1.05);
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 15% 50%, rgba(12, 110, 182, 0.35), transparent 55%),
    radial-gradient(ellipse 45% 70% at 90% 40%, rgba(139, 30, 63, 0.35), transparent 55%),
    linear-gradient(115deg, rgba(4, 30, 50, 0.9) 0%, rgba(10, 61, 98, 0.78) 45%, rgba(90, 22, 48, 0.84) 100%);
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 {
  color: #fff; font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  text-shadow: 0 2px 24px rgba(0,0,0,0.28);
  letter-spacing: -0.02em;
}
.cta-band p { color: rgba(255,255,255,0.93); max-width: 38ch; margin: 0 auto 1.4rem; }
.cta-band .btn-outline {
  background: rgba(255,255,255,0.1);
  color: #fff !important;
  border-color: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.cta-band .btn-outline:hover { background: rgba(255,255,255,0.2); }

/* Configurator home strip */
.config-preview {
  display: grid; gap: 1rem; align-items: start;
}
.config-preview .mini-services {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem;
}
.config-preview .mini-svc {
  padding: 0.85rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; font-size: 0.85rem; font-weight: 600;
  color: var(--text); transition: 0.2s; text-align: left; font-family: inherit;
}
.config-preview .mini-svc:hover { border-color: var(--blue-mid); }
.config-preview .mini-svc.selected {
  border-color: var(--wine); background: var(--wine-soft); color: var(--wine);
}

/* Desktop */
@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .nav-toggle { display: none; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .stats { grid-template-columns: repeat(5, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { grid-template-columns: 1fr; text-align: center; }
  .step-num { margin: 0 auto; }
  .layout-config { grid-template-columns: 1fr 340px; }
  .cart-panel { position: sticky; top: calc(var(--header-h) + 1rem); }
  .cart-mobile-bar { display: none !important; }
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .app-shell { grid-template-columns: 250px 1fr; gap: 1.25rem; }
  .dash-nav { flex-direction: column; overflow: visible; }
  .dash-nav a, .dash-nav button { width: 100%; }
  .hero { padding: 2rem 0 2.15rem; min-height: 0; }
  .hero-inner { width: min(980px, calc(100% - 1.75rem)); }
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 300px);
    gap: 1.5rem;
    align-items: center;
  }
  .hero h1 { font-size: clamp(1.55rem, 2.4vw, 1.95rem); }
  .hero .lead { font-size: 0.95rem; margin-bottom: 1rem; }
  .hero-panel { max-width: none; }
  .hero-aside { max-width: 300px; }
  .hero-card { border-radius: 20px; }
  .hero-search-photo { max-height: 148px; }
  .hero-search-photo img { height: 148px; }
  .landing-funnel { padding: 1rem 0 0 !important; }
  .section { padding: 3.25rem 0; }
  .stats { grid-template-columns: repeat(5, 1fr); }
  .floaters { bottom: 1.35rem; }
  .site-footer { padding-bottom: 2.75rem; }
  .kpi-row { grid-template-columns: repeat(4, 1fr); }
  .config-preview { grid-template-columns: 1.2fr 0.9fr; }
  .section-visual {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: center;
  }
}

@media (max-width: 767px) {
  body.has-cart-bar {
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 4.5rem);
  }
  .cart-mobile-bar.show { display: block; }
  .layout-config .cart-panel.desktop-only { display: none; }
  .header-actions .btn-sm { padding: 0.55rem 0.85rem; font-size: 0.8rem; }
  /* En agenda wizard: bottom-nav sigue visible; wizard-nav encima */
  body.is-wizard {
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 4.25rem);
  }
  .funnel-bar { margin-bottom: 0.5rem; }
  .hero-trust { gap: 0.35rem; }
  .logo-img { height: 34px; }
}

/* ——— Roles / AI / Social / Staff panels ——— */
.social-bar {
  display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center;
  margin-top: 1.25rem;
}
.social-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.55rem 1rem; border-radius: 999px; font-weight: 700; font-size: 0.82rem;
  color: #fff !important; text-decoration: none; transition: 0.2s;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.social-btn:hover { transform: translateY(-2px); color: #fff !important; filter: brightness(1.08); }
.social-btn.fb { background: #1877f2; }
.social-btn.ig { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.social-btn.tk { background: #010101; }
.social-btn.yt { background: #ff0000; }

.ai-panel {
  position: fixed;
  right: max(0.65rem, env(safe-area-inset-right, 0px));
  bottom: 6.5rem;
  z-index: 91;
  width: min(320px, calc(100vw - 1.5rem));
}
.ai-panel-inner {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 1rem 1.1rem;
}
.ai-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem;
}
.ai-head button {
  border: none; background: var(--bg); width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 1.2rem; line-height: 1;
}
.ai-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.65rem 0; }
.ai-chips button {
  border: 1px solid var(--line); background: var(--blue-soft); color: var(--blue);
  border-radius: 999px; padding: 0.35rem 0.65rem; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.ai-answer {
  font-size: 0.85rem; color: var(--muted); background: var(--bg);
  border-radius: 12px; padding: 0.7rem 0.8rem; margin-bottom: 0.75rem; line-height: 1.45;
  min-height: 3.5rem;
}

.role-grid { display: grid; gap: 1rem; }
.role-card {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.25rem;
  background: #fff; box-shadow: var(--shadow);
}
.role-card h3 { margin-bottom: 0.35rem; }
.role-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.25rem 0.55rem; border-radius: 999px; margin-bottom: 0.5rem;
}
.role-badge.paciente { background: var(--blue-soft); color: var(--blue); }
.role-badge.admin { background: var(--wine-soft); color: var(--wine); }
.role-badge.super { background: #fef3c7; color: #92400e; }
.role-badge.pro { background: var(--ok-bg); color: #115e59; }

.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
@media (min-width: 768px) {
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
}
.metric {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.95rem; box-shadow: var(--shadow);
}
.metric .m-label { font-size: 0.72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.metric .m-value { font-size: 1.4rem; font-weight: 800; color: var(--blue); letter-spacing: -0.02em; margin-top: 0.15rem; }
.metric.wine .m-value { color: var(--wine); }

.chart-bars {
  display: flex; align-items: flex-end; gap: 0.55rem; height: 140px;
  padding: 1rem 0 0;
}
.chart-bars .bar {
  flex: 1; background: linear-gradient(180deg, var(--blue-mid), var(--blue));
  border-radius: 8px 8px 4px 4px; min-height: 12px; position: relative;
}
.chart-bars .bar span {
  position: absolute; bottom: -1.4rem; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; color: var(--muted); font-weight: 600; white-space: nowrap;
}

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 640px;
}
table.data th, table.data td {
  text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line);
}
table.data th { background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
table.data tr:hover td { background: #f8fafc; }

.transfer-box {
  background: var(--bg); border: 1.5px dashed var(--line); border-radius: var(--radius-sm);
  padding: 1rem; margin-top: 0.75rem;
}
.transfer-box dl { margin: 0; display: grid; gap: 0.35rem; font-size: 0.88rem; }
.transfer-box dt { font-weight: 700; color: var(--text); display: inline; }
.transfer-box dd { display: inline; margin: 0 0 0 0.35rem; color: var(--muted); }
.deuna-qr {
  width: 120px; height: 120px; margin: 0.75rem 0;
  border-radius: 12px; border: 6px solid #fff; box-shadow: var(--shadow);
  background: linear-gradient(90deg, #111 2px, transparent 2px) 0 0 / 10px 10px,
    linear-gradient(#111 2px, transparent 2px) 0 0 / 10px 10px, #fff;
}

.staff-top {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: center;
  margin-bottom: 1.25rem;
}
.staff-top h1 { margin: 0; font-size: 1.45rem; }

/* Multi-rol: ver la plataforma como… */
.role-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.role-view-switch-label { white-space: nowrap; }
.role-view-switch select,
select[data-view-as-role] {
  min-height: 32px;
  max-width: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.2rem 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--blue);
  background: #fff;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.nav-mobile-role {
  padding: 0.5rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.nav-mobile-role select {
  flex: 1;
  min-width: 140px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
  font-weight: 700;
  padding: 0.35rem 0.5rem;
}
@media (max-width: 1100px) {
  .role-view-switch-label { display: none; }
}

.qr-scan-zone {
  border: 2px dashed var(--blue-mid); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; background: var(--blue-soft);
  margin: 1rem 0;
}
.nav-staff { color: var(--wine) !important; font-weight: 800 !important; }

.perm-list { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.88rem; }
.perm-list li { margin-bottom: 0.3rem; }

/* Mapa */
.map-box {
  width: 100%;
  height: 260px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  z-index: 1;
  background: #e8f0f5;
}
.map-box .leaflet-container { border-radius: var(--radius-sm); font-family: var(--font); }

/* WhatsApp country + number */
.phone-wa { display: grid; gap: 0.35rem; }
.phone-wa-label { font-size: 0.84rem; font-weight: 700; color: var(--text); }
.phone-wa-row {
  display: grid;
  grid-template-columns: minmax(108px, 40%) 1fr;
  gap: 0.45rem;
  align-items: stretch;
}
.phone-wa-row select,
.phone-wa-row input {
  min-height: var(--touch);
  font-size: 16px;
}
.phone-wa-row select,
.phone-wa-row input {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.78rem 0.7rem;
  font: inherit;
  background: #fff;
  width: 100%;
}
.phone-wa.phone-ok .phone-wa-row input { border-color: #0f766e; }
.phone-wa.phone-invalid .phone-wa-row input { border-color: #b91c1c; }
.phone-wa-preview {
  font-size: 0.82rem;
  color: var(--muted);
  min-height: 1.25rem;
}
.phone-wa-preview strong {
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.phone-wa-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* ——— Sueroterapia: Elige tu Suero (tarjetas con imagen + detalle) ——— */
.suero-pick-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}
.suero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.suero-card:hover,
.suero-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #b8d4ea;
  outline: none;
}
.suero-card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--blue-soft);
  overflow: hidden;
}
.suero-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.suero-card h3 {
  font-size: 1rem;
  margin: 0.85rem 1rem 0.35rem;
  color: var(--blue);
  line-height: 1.25;
}
.suero-card > p {
  font-size: 0.86rem;
  margin: 0 1rem 0.65rem;
  color: var(--muted);
  line-height: 1.4;
  flex: 1;
}
.suero-card-more {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--wine);
}
.suero-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 1rem 1rem;
  flex-wrap: wrap;
}
.suero-card-buy {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}
.suero-card-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.suero-card-actions .btn {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  flex-shrink: 0;
}
.suero-card.selected {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.12);
  background: linear-gradient(180deg, #fff 70%, var(--wine-soft));
}
.suero-card.selected .suero-card-more { color: var(--wine); }
/* Laboratorio: pestañas Paquetes / Exámenes */
.lab-tab-intro {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
  line-height: 1.45;
}
.lab-service-tabs {
  margin-bottom: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.lab-service-tabs .tab {
  cursor: pointer;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  min-height: 40px;
  transition: 0.2s;
}
.lab-service-tabs .tab:hover {
  border-color: var(--blue-mid);
  color: var(--blue);
}
.lab-service-tabs .tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* Salud ocupacional: tarjetas de servicio empresarial */
.so-service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.so-service-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.so-service-card > p {
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
  flex: 0 0 auto;
}
.so-service-card .perm-list {
  margin-top: auto;
  font-size: 0.86rem;
}

/* Convenios: logos de empresas aliadas */
.convenio-logos {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.convenio-logo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1rem 1.15rem;
  text-align: center;
  transition: 0.25s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.convenio-logo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #b8d4ea;
}
.convenio-logo-frame {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 2 / 1;
  display: grid;
  place-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0.85rem;
  padding: 0.5rem;
}
.convenio-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.convenio-logo-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--blue);
}
.convenio-logo-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.4;
  max-width: 28ch;
}
@media (min-width: 600px) {
  .convenio-logos { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .convenio-logos { grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
}

/* Categorías de servicio: panel de carrito también en móvil */
#elige-suero .cart-panel,
#elige-servicio .cart-panel {
  margin-top: 0.5rem;
}
@media (min-width: 768px) {
  #elige-suero .layout-config,
  #elige-servicio .layout-config {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
  #elige-suero .cart-panel,
  #elige-servicio .cart-panel {
    position: sticky;
    top: calc(var(--header-h) + var(--safe-top) + 0.75rem);
  }
}

/* Modal de confirmación (eliminar usuario, acciones irreversibles) */
.confirm-modal[hidden] { display: none !important; }
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.confirm-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 28, 48, 0.55);
  backdrop-filter: blur(3px);
}
.confirm-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(8, 28, 48, 0.28);
  padding: 1.25rem 1.2rem 1.15rem;
  animation: confirm-pop 0.18s ease-out;
}
@keyframes confirm-pop {
  from { transform: translateY(8px) scale(0.98); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
.confirm-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fde8e8;
  color: #b91c1c;
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
}
.confirm-modal-dialog h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: var(--blue);
}
.confirm-modal-dialog p {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.45;
}
.confirm-modal-dialog .confirm-user-name {
  font-weight: 800;
  color: var(--blue);
}
.confirm-modal-warning {
  margin: 0.65rem 0 0.9rem !important;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.86rem !important;
  font-weight: 650;
}
.confirm-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.35rem;
}
.confirm-modal-actions .btn {
  min-height: 44px;
}
.btn-danger {
  background: #b91c1c;
  color: #fff !important;
  border: 1px solid #991b1b;
  border-radius: 12px;
  font-weight: 700;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-danger:hover {
  filter: brightness(1.06);
  color: #fff !important;
}
.btn-danger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.suero-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.suero-modal[hidden] { display: none !important; }
.suero-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 30, 52, 0.55);
  backdrop-filter: blur(3px);
}
.suero-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(88vh, 640px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 1rem 1.1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.28s var(--ease);
}
.suero-modal-x {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--blue);
  z-index: 2;
}
.suero-modal-media {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0.85rem;
  aspect-ratio: 16 / 9;
  background: var(--blue-soft);
}
.suero-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.suero-modal-dialog h3 {
  margin: 0 2rem 0.35rem 0;
  font-size: 1.2rem;
}
.suero-modal-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue-mid);
  margin: 0 0 0.75rem;
}
.suero-modal-list {
  margin: 0 0 0.85rem;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.suero-modal-list li { margin-bottom: 0.4rem; }
.suero-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.suero-modal-actions .btn {
  flex: 1;
  min-height: 48px;
  justify-content: center;
}
@media (min-width: 600px) {
  .suero-pick-grid { grid-template-columns: repeat(2, 1fr); }
  .suero-modal {
    align-items: center;
    padding: 1rem;
  }
  .suero-modal-dialog {
    border-radius: 20px;
    max-height: min(90vh, 700px);
  }
}
@media (min-width: 960px) {
  .suero-pick-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}

/* =========================================================
   MOBILE FIRST — navegación inferior, PWA, tablas→listas, QR
   ========================================================= */

/* Barra inferior siempre visible en móvil */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 110;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding: 0.2rem 0.15rem var(--safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px) saturate(1.15);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 28px rgba(10, 61, 98, 0.08);
}
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.12rem; min-height: 52px; border: none; background: transparent;
  color: var(--muted); font-size: 0.62rem; font-weight: 700; font-family: inherit;
  text-decoration: none; cursor: pointer; border-radius: 12px; padding: 0.25rem 0.1rem;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a:hover, .bottom-nav button:hover { color: var(--blue); }
.bottom-nav a.active, .bottom-nav button.active {
  color: var(--wine);
}
.bottom-nav .bn-icon {
  font-size: 1.2rem; line-height: 1; width: 28px; height: 28px;
  display: grid; place-items: center;
}
.bottom-nav .bn-agendar {
  color: #fff !important;
  position: relative; top: -10px;
}
.bottom-nav .bn-agendar .bn-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(145deg, var(--wine-mid), var(--wine));
  box-shadow: 0 10px 24px rgba(139, 30, 63, 0.38);
  font-size: 1.35rem;
}
.bottom-nav .bn-agendar span { color: var(--wine); margin-top: 0.15rem; }

/* WhatsApp / IA flotantes — móvil (sobre bottom-nav, sin invadir contenido) */
.floaters {
  right: max(0.45rem, env(safe-area-inset-right, 0px));
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 0.5rem);
  padding: 0.28rem;
  gap: 0.4rem;
}
.float-btn {
  width: 42px;
  height: 42px;
}
.float-wa { font-size: 1.12rem; }
.float-ai { font-size: 0.58rem; }
.ai-panel {
  right: max(0.45rem, env(safe-area-inset-right, 0px));
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 6.1rem);
  width: min(320px, calc(100vw - 1.35rem));
}

/* Cart bar encima de bottom-nav */
.cart-mobile-bar {
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
}
.toast {
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 1rem);
}

/* Logo único compacto en móvil */
.logo { max-width: min(58vw, 180px); }
.logo-img { height: 36px; max-width: min(160px, 52vw); }
.header-actions {
  gap: 0.3rem;
}
.header-actions .btn-primary { display: none; } /* Agendar vive en bottom-nav */
.header-cart-btn { width: 40px; height: 40px; min-width: 40px; border-radius: 12px; }
.header-auth-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  max-width: 7.5rem;
}
.header-logout-btn {
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
}
/* En móvil el dropdown se alinea al borde derecho de la pantalla */
.header-cart-dropdown {
  right: -0.25rem;
  width: min(340px, calc(100vw - 1rem));
}

/* ——— Landing mobile-first (toda la home pública) ——— */
.hero-actions { gap: 0.4rem; }
.hero-actions .btn { flex: 1 1 auto; min-width: calc(50% - 0.3rem); justify-content: center; }
.hero-actions .btn-primary { flex: 1 1 100%; }
.landing-funnel { padding: 0.65rem 0 0 !important; }
.funnel-bar a { min-height: 40px; font-size: 0.7rem; padding: 0.45rem 0.7rem; }
.need-card {
  flex-direction: row; padding: 1rem; min-height: auto;
}
.need-card::after { display: none; }
.cat-tile { padding: 1.15rem 1rem; }
.section { padding: 2rem 0; }
.section-head { margin-bottom: 1.15rem; }
.section-head h2 { font-size: clamp(1.25rem, 5vw, 1.55rem); }
.section-head p { font-size: 0.92rem; max-width: none; }
.section-visual { display: grid; gap: 1rem; }
.media-card img { min-height: 180px; max-height: 220px; }
.stats { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.stat { padding: 0.9rem 0.65rem; }
.stat strong { font-size: 1.25rem; }
.t-card { padding: 1.1rem; }
.plan-body { padding: 1rem 1.05rem 1.15rem; }
.plan .btn { width: 100%; min-height: 48px; }
.plan-media { aspect-ratio: 16 / 10; }
.cta-band { padding: 2.25rem 0; }
.cta-band .hero-actions { max-width: 22rem; margin: 0 auto; }
.social-bar { gap: 0.45rem; }
.social-btn { min-height: 42px; flex: 1 1 auto; justify-content: center; font-size: 0.78rem; padding: 0.5rem 0.75rem; }
.footer-grid { gap: 1.25rem; }
.footer-brand { margin-bottom: 0.35rem; }
.config-preview .mini-services { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.config-preview .mini-svc { min-height: 72px; font-size: 0.8rem; padding: 0.7rem; }
.faq summary { min-height: 48px; display: flex; align-items: center; padding-right: 1.5rem; }

/* Wizard tipo app */
.wizard-steps {
  gap: 0.3rem;
  margin: 0.75rem 0 0;
  padding-bottom: 0.15rem;
}
.wizard-steps span {
  font-size: 0.68rem;
  padding: 0.45rem 0.65rem;
  min-height: 36px;
  display: inline-flex; align-items: center;
}
.wizard-progress {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin: 0.75rem 0 0;
}
.wizard-progress .wp-text {
  font-size: 0.8rem; font-weight: 700; color: var(--blue); white-space: nowrap;
}
.wizard-progress-bar {
  flex: 1; height: 8px; background: rgba(10, 61, 98, 0.12); border-radius: 99px; overflow: hidden;
}
.wizard-progress-bar > i {
  display: block; height: 100%; width: 14%;
  background: linear-gradient(90deg, var(--wine), var(--blue-mid));
  border-radius: 99px; transition: width 0.3s var(--ease);
}
.page-hero.wizard-hero { padding: 1.15rem 0 1rem; }
.page-hero.wizard-hero h1 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.page-hero.wizard-hero p { font-size: 0.88rem; margin-bottom: 0; }
.wizard-card {
  border-radius: 18px;
  padding: 1.1rem 1rem 5.5rem; /* espacio para nav fija en móvil */
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow);
}
.wizard-card h2 { font-size: 1.1rem; }
.wizard-nav {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  z-index: 95;
  display: flex; gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(10, 61, 98, 0.08);
  margin: 0;
}
.wizard-nav .btn { flex: 1; min-height: 48px; }
.wizard-nav .btn-outline { flex: 0 0 auto; min-width: 96px; }
body.is-wizard .bottom-nav { /* wizard usa su propia barra de pasos */
}
.price-sticky-mini {
  position: sticky;
  top: calc(var(--header-h) + var(--safe-top) + 0.35rem);
  z-index: 40;
  margin-bottom: 0.75rem;
}

/* Formularios táctiles */
.form-grid label { font-size: 0.88rem; }
.form-grid input, .form-grid select, .form-grid textarea {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
}
.radio-card {
  min-height: var(--touch);
  padding: 1rem;
  border-radius: 16px;
}
.form-row-2 { grid-template-columns: 1fr; }

/* Carga de archivos: cámara + galería */
.file-upload {
  display: grid; gap: 0.55rem;
  padding: 1rem;
  border: 1.5px dashed #b8d4ea;
  border-radius: 16px;
  background: linear-gradient(165deg, #fff, var(--blue-soft));
  text-align: center;
}
.file-upload strong { display: block; color: var(--blue); font-size: 0.95rem; }
.file-upload .fu-hint { font-size: 0.8rem; color: var(--muted); margin: 0; }
.file-upload-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.35rem;
}
.file-upload-actions label.btn {
  cursor: pointer; margin: 0; font-weight: 700;
}
.file-upload input[type="file"] {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
  clip: rect(0,0,0,0);
}
.file-upload-preview {
  display: none; margin-top: 0.35rem; font-size: 0.82rem; color: var(--ok); font-weight: 700;
}
.file-upload-preview.show { display: block; }
.file-upload-preview img {
  max-width: 100%; max-height: 160px; margin: 0.5rem auto 0; border-radius: 12px;
  border: 1px solid var(--line);
}

/* QR pantalla completa */
.qr-fs-open {
  border: none; background: var(--blue-soft); color: var(--blue);
  font-weight: 700; font-size: 0.85rem; font-family: inherit;
  padding: 0.65rem 1rem; border-radius: 999px; cursor: pointer;
  min-height: 44px; margin-top: 0.65rem;
}
.qr-fullscreen {
  position: fixed; inset: 0; z-index: 200;
  background: #041c2e;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.25rem; padding-bottom: calc(1.25rem + var(--safe-bottom));
  color: #fff;
}
.qr-fullscreen.open { display: flex; }
.qr-fullscreen-inner {
  background: #fff; border-radius: 24px; padding: 1.5rem;
  width: min(340px, 100%); text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.qr-fullscreen .qr-fake, .qr-fullscreen .qr-fs-code-box {
  width: min(72vw, 260px); height: min(72vw, 260px);
  margin: 0.5rem auto 1rem;
  border-radius: 20px;
}
.qr-fullscreen h3 { color: var(--blue); margin: 0 0 0.35rem; }
.qr-fullscreen p { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem; }
.qr-fullscreen code {
  display: block; font-size: 0.95rem; font-weight: 800; color: var(--blue);
  letter-spacing: 0.04em; margin-bottom: 1rem;
}
.qr-fullscreen .btn { width: 100%; min-height: 52px; }

/* Tablas → listas en móvil */
.mobile-list { display: grid; gap: 0.75rem; }
.mobile-list-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.95rem 1rem; box-shadow: var(--shadow);
}
.mobile-list-card .ml-row {
  display: flex; justify-content: space-between; gap: 0.75rem;
  padding: 0.35rem 0; border-bottom: 1px solid #f1f5f9;
  font-size: 0.86rem;
}
.mobile-list-card .ml-row:last-child { border-bottom: 0; }
.mobile-list-card .ml-label {
  color: var(--muted); font-weight: 700; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.03em; flex: 0 0 38%;
}
.mobile-list-card .ml-value { color: var(--text); font-weight: 600; text-align: right; flex: 1; word-break: break-word; }
.mobile-list-card .ml-actions {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
}
.table-wrap.mobile-as-cards table.data { display: none; }
.table-wrap.mobile-as-cards .mobile-list { display: grid; }
@media (min-width: 900px) {
  .table-wrap.mobile-as-cards table.data { display: table; min-width: 640px; }
  .table-wrap.mobile-as-cards .mobile-list { display: none; }
}

/* Dashboard paciente / staff en móvil */
.app-sidebar {
  padding: 0.55rem;
  border-radius: 16px;
}
.app-user { padding: 0.65rem 0.55rem 0.75rem; }
.dash-nav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 0.3rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dash-nav::-webkit-scrollbar { display: none; }
.dash-nav a, .dash-nav button {
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.8rem;
}
.dash-nav a.active, .dash-nav button.active {
  border-color: transparent;
}
.kpi-row { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.appt-actions { gap: 0.45rem; }
.appt-actions .btn { min-height: 44px; flex: 1 1 auto; }
.section { padding: 2rem 0; }
.page-hero { padding: 1.35rem 0 1.15rem; }
.page-hero h1 { font-size: clamp(1.35rem, 5.5vw, 1.85rem); }
.need-card, .cat-tile, .card { border-radius: 16px; }
.funnel-bar a { min-height: 36px; display: inline-flex; align-items: center; }
.site-footer { padding-bottom: calc(2rem + var(--bottom-nav-h) + var(--safe-bottom)); margin-top: 1.5rem; }
.map-box { height: 220px; min-height: 200px; }

/* Staff metrics stack */
.staff-top { flex-direction: column; align-items: flex-start; gap: 0.65rem; }
.staff-top .btn { min-height: 44px; }

/* Ocultar bottom-nav en desktop */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .logo { max-width: 240px; }
  .logo-img { height: 44px; max-width: 220px; }
  .header-actions .btn-primary { display: inline-flex; }
  .hero-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .hero-actions .btn {
    width: auto;
    flex: 0 0 auto;
    min-width: 0;
  }
  .hero-actions .btn-primary { flex: 0 0 auto; }
  .search-box { flex-wrap: nowrap; }
  .search-box input { flex: 1 1 auto; width: auto; min-height: 40px; font-size: 0.88rem; }
  .search-box .btn { width: auto; min-height: 40px; }
  .wizard-card { padding: 1.4rem; }
  .wizard-nav {
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 1.1rem 0 0;
    margin-top: 1.25rem;
    border-top: 1px solid var(--line);
    backdrop-filter: none;
  }
  .wizard-nav .btn { flex: 0 0 auto; }
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .floaters {
    bottom: 1.35rem;
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    gap: 0.5rem;
  }
  .float-btn { width: 46px; height: 46px; }
  .float-wa { font-size: 1.25rem; }
  .float-ai { font-size: 0.62rem; }
  .ai-panel {
    bottom: 6.75rem;
    right: max(0.85rem, env(safe-area-inset-right, 0px));
  }
  .header-actions { gap: 0.5rem; }
  .header-user { gap: 0.35rem; }
  .cart-mobile-bar { bottom: 0; }
  .toast { bottom: 6.5rem; }
  .site-footer { padding-bottom: 2.75rem; }
  .dash-nav {
    display: flex; flex-direction: column; overflow: visible;
    grid-auto-flow: row;
  }
  .dash-nav a, .dash-nav button {
    width: 100%; border-radius: 12px; background: transparent; border: none;
  }
  .header-h-desktop { --header-h: 74px; }
  :root { --header-h: 74px; }
  .container { width: min(1140px, calc(100% - 1.75rem)); }
  .staff-top { flex-direction: row; align-items: center; }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Install PWA tip (opcional) */
.pwa-banner {
  display: none;
  position: fixed; left: 0.75rem; right: 0.75rem;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 0.65rem);
  z-index: 115;
  background: var(--blue-deep); color: #fff;
  border-radius: 16px; padding: 0.85rem 1rem;
  box-shadow: var(--shadow-lg);
  align-items: center; justify-content: space-between; gap: 0.75rem;
}
.pwa-banner.show { display: flex; }
.pwa-banner p { margin: 0; font-size: 0.82rem; color: rgba(255,255,255,0.9); }
.pwa-banner .btn { min-height: 40px; padding: 0.5rem 0.9rem; font-size: 0.8rem; }

/* =========================================================
   PREMIUM VISUAL LAYER � elevaci�n est�tica global
   (sin cambios de estructura, rutas ni l�gica)
   ========================================================= */

/* Bottom nav m�s premium */
.bottom-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border-top: 1px solid rgba(224, 232, 240, 0.95);
  box-shadow: 0 -8px 28px rgba(10, 61, 98, 0.08);
}

/* Hero trust chips con m�s presencia */
.hero-trust-item {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.hero-trust-icon {
  background: linear-gradient(145deg, rgba(255,255,255,0.28), rgba(255,255,255,0.1));
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Ghost hero buttons m�s n�tidos */
.btn-hero-ghost {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
}
.btn-hero-ghost:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16) !important;
  transform: translateY(-1px);
}

/* Panel glass del buscador hero */
.hero-panel-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-panel-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7dd3fc, #fff);
  box-shadow: 0 0 8px rgba(125, 211, 252, 0.7);
}

/* Cards de acceso / cat�logo: brillo sutil al hover */
.need-card,
.cat-tile {
  background-image: linear-gradient(165deg, #ffffff 0%, #f7fbfe 100%);
}
a.card.need-card:hover,
a.card.cat-tile:hover {
  border-color: rgba(12, 110, 182, 0.22);
}

/* Home: planes con mejor ritmo visual */
.page-home .plan h3 {
  font-size: 1.12rem;
  margin-bottom: 0.25rem;
}
.page-home .plan .price-line {
  margin-bottom: 0.55rem;
}
.page-home .plan.featured {
  padding-top: 1.45rem;
}

/* P�gina hero interior (otras rutas) � un poco m�s premium */
.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-pattern);
  background-size: 90px 90px;
  opacity: 0.28;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Dashboard cards / paneles ligeros */
.app-panel .card,
.dash-card,
.kpi {
  box-shadow: var(--shadow);
}

/* Nav desktop m�s premium */
@media (min-width: 1024px) {
  .nav-desktop a {
    font-size: 0.86rem;
  }
  .nav-desktop a:hover,
  .nav-desktop a.active {
    box-shadow: 0 4px 12px rgba(12, 110, 182, 0.1);
  }
  .hero {
    padding: 2.35rem 0 2.5rem;
  }
  .hero-card {
    box-shadow:
      0 1px 0 rgba(255,255,255,0.28) inset,
      0 28px 56px rgba(0, 0, 0, 0.34),
      0 0 40px rgba(12, 110, 182, 0.12);
  }
  .hero-glow-a {
    width: 340px;
    height: 340px;
  }
  .floaters {
    bottom: 1.5rem;
    right: max(1rem, env(safe-area-inset-right, 0px));
  }
}

/* Desktop floaters glass pill */
@media (min-width: 768px) {
  .floaters {
    padding: 0.4rem;
    gap: 0.5rem;
  }
  .float-btn {
    width: 48px;
    height: 48px;
  }
  .ai-panel {
    bottom: 8.25rem;
  }
}

/* Evitar saturar en motion-reduce */
@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .plan:hover,
  .step:hover,
  .stat:hover,
  .t-card:hover,
  .btn:hover,
  .float-btn:hover {
    transform: none;
  }
}
