/* ==========================================================================
   RedSana AI — Aplicación Integrada (Flujo Completo Registro -> Mi Salud)
   Sin selectores artificiales · 100% Funcional y Persistente
   ========================================================================== */

:root {
  --red: #d8302b;
  --red-hover: #b8231f;
  --red-soft: #fdf2f2;
  --red-border: rgba(216, 48, 43, 0.28);
  --ink: #181716;
  --ink-secondary: #3d3935;
  --muted: #6a645d;
  --subtle: #8e8780;
  --ivory: #f4f1eb;
  --ivory-light: #faf9f6;
  --surface: #ffffff;
  --line: #e6e2dc;
  --line-strong: #181716;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.14);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: #f4f1eb;
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ==========================================================================
   HEADER PÚBLICO / NAVEGACIÓN
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(244, 241, 235, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
}

.brand-pulse {
  width: 10px;
  height: 10px;
  background: var(--red);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(216, 48, 43, 0.2);
  animation: pulse-ring 2.4s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(216, 48, 43, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(216, 48, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(216, 48, 43, 0); }
}

.brand-logo-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-logo-text span {
  color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--red);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 20px;
  padding: 2px;
}

.lang-btn {
  background: none;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-radius: 16px;
  transition: all 0.15s;
}

.lang-btn.active {
  background: var(--ink);
  color: #fff;
}

.btn-header-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 85;
  background: var(--red);
  border: 1px solid var(--red);
  padding: 13px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(216, 48, 43, 0.3);
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-header-chat:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 13px 30px rgba(216, 48, 43, 0.34);
}

.btn-header-misalud {
  background: var(--red);
  border: none;
  color: #fff;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-header-misalud:hover {
  background: var(--red-hover);
}

.btn-header-user {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.user-avatar-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

/* ==========================================================================
   VISTAS PRINCIPALES (Router Reactivo)
   ========================================================================== */
.view-container {
  display: none;
  min-height: calc(100vh - 65px);
}

.view-container.active {
  display: block;
}

/* ==========================================================================
   PORTADA PÚBLICA (VIEW: HOME)
   ========================================================================== */
.home-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* HERO CONSOLA */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 56px;
}

.hero-editorial {
  text-align: center;
  max-width: 720px;
  margin-bottom: 32px;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 14px;
}

.hero-lead {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--muted);
  line-height: 1.5;
}

/* CONSOLA HORIZONTAL TELÉFONO */
.console-card {
  width: 100%;
  max-width: 960px;
  background: #ffffff;
  border: 4px solid #181716;
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: 360px 1fr;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(24, 23, 22, 0.12), 0 10px 25px rgba(24, 23, 22, 0.08);
}

.console-avatar-box {
  background: #181716;
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.console-avatar-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.console-content {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.console-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  background: var(--red-soft);
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
  width: fit-content;
}

.console-title {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 10px;
}

.console-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.console-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.topic-chip {
  background: var(--ivory);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topic-chip:hover {
  background: #fff;
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-1px);
}

.console-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-primer-paso {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(216, 48, 43, 0.3);
  transition: all 0.15s;
}

.btn-primer-paso:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
}

.btn-abrir-asistente {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 14px 22px;
  border-radius: 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-abrir-asistente:hover {
  border-color: var(--ink);
}

/* ==========================================================================
   SECCIÓN LA RUEDA (EL RECORRIDO / CÓMO FUNCIONA)
   ========================================================================== */
.wheel-section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
  margin-bottom: 48px;
  scroll-margin-top: 88px;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 12px;
}

.section-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

.wheel-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3.2vw, 44px);
  box-shadow: var(--shadow-sm);
}

.orbit-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Círculo de productos: las cuatro opciones permanecen visibles y seleccionables. */
.ring-wrap {
  width: min(100%, 510px);
  max-width: 510px;
  aspect-ratio: 1;
  position: relative;
  margin: 0 auto;
  display: grid;
  place-items: center;
  isolation: isolate;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 24%, #fff9f8 24.4% 43%, #fff 43.5% 67%, #fff9f8 67.5% 100%);
}

.ring-wrap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#ringProgress {
  transition: stroke-dashoffset 0.4s ease;
}

.ring-center {
  position: relative;
  z-index: 2;
  width: 32%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--red-border);
  background: #fff;
  box-shadow: 0 10px 30px rgba(43, 30, 28, 0.09);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 10px;
}

.ring-center-mark,
.phone-app-mark {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.ring-center-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 13px;
}

.ring-center strong {
  font-size: clamp(12px, 1.25vw, 17px);
  font-weight: 850;
  color: var(--ink);
  white-space: nowrap;
}

.ring-center strong span {
  color: var(--red);
}

.ring-center small {
  max-width: 120px;
  font-size: clamp(8px, 0.85vw, 11px);
  color: var(--muted);
  font-weight: 650;
  line-height: 1.25;
}

.ring-node {
  position: absolute;
  z-index: 3;
  width: 34%;
  min-height: 74px;
  background: #fff;
  border: 1.5px solid #e7dedc;
  padding: 9px 11px;
  border-radius: 18px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(44, 28, 27, 0.09);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  text-align: left;
}

.ring-node:hover,
.ring-node:focus-visible {
  border-color: var(--red);
  box-shadow: 0 10px 25px rgba(216, 48, 43, 0.16);
}

.ring-node:focus-visible {
  outline: 3px solid rgba(216, 48, 43, 0.22);
  outline-offset: 3px;
}

.ring-node.active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 10px 25px rgba(216, 48, 43, 0.3);
}

.ring-node[data-step="0"] { top: 2.5%; left: 50%; width: 46%; transform: translateX(-50%); }
.ring-node[data-step="1"] { right: 1.5%; top: 50%; transform: translateY(-50%); }
.ring-node[data-step="2"] { bottom: 2.5%; left: 50%; width: 46%; transform: translateX(-50%); }
.ring-node[data-step="3"] { left: 1.5%; top: 50%; transform: translateY(-50%); }
.ring-node[data-step="0"]:hover,
.ring-node[data-step="0"]:focus-visible,
.ring-node[data-step="2"]:hover,
.ring-node[data-step="2"]:focus-visible { transform: translateX(-50%) translateY(-2px); }
.ring-node[data-step="1"]:hover,
.ring-node[data-step="1"]:focus-visible,
.ring-node[data-step="3"]:hover,
.ring-node[data-step="3"]:focus-visible { transform: translateY(-50%) translateX(2px); }

.ring-node-index {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--red-soft);
  color: var(--red);
  font-size: 11px;
  font-weight: 850;
}

.ring-node.active .ring-node-index {
  color: var(--red);
  background: #fff;
}

.ring-node-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ring-node-copy strong {
  font-size: clamp(10px, 1.05vw, 13px);
  line-height: 1.15;
  font-weight: 800;
}

.ring-node-copy small {
  font-size: 11px;
  line-height: 1.15;
  color: var(--muted);
  font-weight: 700;
}

.ring-node.active .ring-node-copy small {
  color: rgba(255, 255, 255, 0.86);
}

.orbit-caption {
  margin: 13px 8px 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
}

/* Teléfono: diseño fijo; cambia el producto, no la estructura del chat. */
.phone-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-stage-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.phone-stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.red-sana-phone {
  position: relative;
  width: min(100%, 350px);
  padding: 8px;
  border-radius: 44px;
  border: 2px solid #07090b;
  background: linear-gradient(145deg, #34383d, #111315 22%, #08090a 78%, #2d3034);
  box-shadow: 0 23px 45px rgba(20, 21, 24, 0.2), 0 4px 12px rgba(20, 21, 24, 0.12);
}

.phone-side-key {
  position: absolute;
  width: 3px;
  background: #272a2e;
  border-radius: 4px 0 0 4px;
}

.phone-side-key-left { left: -4px; top: 115px; height: 48px; }
.phone-side-key-right { right: -4px; top: 145px; height: 66px; border-radius: 0 4px 4px 0; }

.phone-frame {
  position: relative;
  overflow: hidden;
  border: 3px solid #101214;
  border-radius: 35px;
  background: #fff;
}

.phone-island {
  position: absolute;
  top: 7px;
  left: 50%;
  z-index: 4;
  width: 92px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #08090a;
}

.phone-island span {
  position: absolute;
  top: 8px;
  right: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #252a33;
}

.phone-screen {
  min-height: 548px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fff 0%, #fff 64%, #faf8f7 100%);
  padding: 0 0 7px;
}

.phone-status-bar {
  height: 34px;
  padding: 13px 18px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: #191919;
  font-size: 9px;
  font-weight: 800;
}

.phone-app-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 11px;
  border-bottom: 1px solid #f0edeb;
}

.phone-app-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 11px;
  font-size: 12px;
}

.phone-app-header > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.phone-app-header strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.phone-app-header strong em {
  color: var(--red);
  font-style: normal;
}

.phone-app-header small {
  color: var(--muted);
  font-size: 9px;
}

.phone-app-menu {
  margin-left: auto;
  color: var(--red);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 2px;
}

.phone-video-window {
  position: relative;
  height: 145px;
  margin: 10px 11px 0;
  overflow: hidden;
  border-radius: 19px;
  background: #222;
}

.phone-host-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
}

.phone-video-caption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 9px;
  color: #fff;
  background: rgba(20, 20, 20, 0.67);
  font-size: 8px;
  line-height: 1.2;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.phone-video-caption i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--red);
}

.phone-preview-content {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px 13px 8px;
}

.phone-access-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #f2d1cf;
  border-radius: 13px;
  background: #fff7f6;
}

.phone-lock-icon {
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--red);
  font-size: 14px;
  font-weight: 800;
}

.phone-access-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 9px;
  line-height: 1.3;
  font-weight: 850;
}

.phone-access-note p {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.wheel-detail-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wheel-step-badge {
  color: var(--red);
  font-size: 8px;
  line-height: 1.3;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.wheel-step-title {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.wheel-step-desc {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.wheel-step-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 850;
}

.wheel-step-price span {
  color: var(--subtle);
  font-size: 8px;
  font-weight: 650;
}

.btn-wheel-action {
  min-height: 40px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 13px;
  padding: 9px 14px;
  color: #fff;
  background: var(--red);
  box-shadow: 0 5px 12px rgba(216, 48, 43, 0.2);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.btn-wheel-action:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
}

.phone-purchase-note {
  color: var(--subtle);
  font-size: 8px;
  line-height: 1.3;
  text-align: center;
}

.phone-disabled-input {
  min-height: 33px;
  margin: auto 12px 2px;
  padding: 0 9px;
  border: 1px solid #e8e4e2;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #938c87;
  background: #f8f7f6;
  font-size: 8px;
}

.phone-disabled-input span:last-child {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #c9c2bd;
  font-size: 10px;
}

.phone-home-indicator {
  width: 82px;
  height: 4px;
  margin: 6px auto 1px;
  border-radius: 999px;
  background: #171717;
}

.wheel-back-to-cover {
  align-self: center;
  margin-top: 14px;
}

.btn-back-to-cover {
  align-self: flex-start;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--red-border);
  border-radius: 22px;
  padding: 10px 16px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-back-to-cover:hover {
  background: var(--red-soft);
  border-color: var(--red);
}

.misalud-back-to-cover {
  margin-bottom: 16px;
}

/* ==========================================================================
   SECCIÓN 4 PRODUCTOS CANÓNICOS
   ========================================================================== */
.catalog-section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.product-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 8px;
}

.product-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.product-tag {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
  min-height: 36px;
}

.product-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
}

.product-desc {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.45;
  margin-bottom: 20px;
  flex-grow: 1;
}

.btn-select-product {
  background: var(--ivory);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.btn-select-product:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ==========================================================================
   SECCIÓN FAQ
   ========================================================================== */
.faq-section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
  max-width: 840px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  cursor: pointer;
}

.faq-item summary {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.faq-answer {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ==========================================================================
   VISTA: REGISTRO / IDENTIFICACIÓN (VIEW: REGISTER)
   ========================================================================== */
.auth-page {
  max-width: 520px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.product-context-banner {
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-context-banner strong {
  color: var(--red);
}

.btn-google-auth {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.15s;
}

.btn-google-auth:hover {
  background: var(--ivory);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
  margin: 20px 0;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface);
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--red);
}

.btn-submit-auth {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.15s;
}

.btn-submit-auth:hover {
  background: var(--red-hover);
}

.auth-switch-link {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

.auth-switch-link a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

/* BOTONES DE PRUEBA RÁPIDA (AUDITORÍA FELIPE) */
.test-accounts-panel {
  margin-top: 28px;
  border-top: 1px dashed var(--line);
  padding-top: 20px;
}

.test-accounts-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--subtle);
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: center;
}

.test-accounts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-test-account {
  background: var(--ivory);
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.btn-test-account:hover {
  background: #fff;
  border-color: var(--red);
  color: var(--red);
}

/* ==========================================================================
   VISTA: ACTIVACIÓN OBLIGATORIA (EL CANDADO CANÓNICO)
   ========================================================================== */
.activation-page {
  max-width: 560px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

.activation-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.activation-head {
  text-align: center;
  margin-bottom: 28px;
}

.activation-lock-icon {
  width: 48px;
  height: 48px;
  background: var(--red-soft);
  color: var(--red);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}

.activation-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.activation-sub {
  font-size: 14px;
  color: var(--muted);
}

/* CAJA DE ERROR CLÍNICO (MENSAJES CANÓNICOS) */
.activation-error-banner {
  background: #fef2f2;
  border: 1.5px solid #dc2626;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #991b1b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  display: none;
  align-items: flex-start;
  gap: 10px;
}

.activation-error-banner.visible {
  display: flex;
}

/* SELECTOR DE SEXO REGISTRADO AL NACER (BINARIO ESTRICTO) */
.sex-button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.btn-sex-option {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.btn-sex-option:hover {
  border-color: var(--red-border);
}

.btn-sex-option.active {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
  font-weight: 700;
}

/* CHECKBOXES DE CONSENTIMIENTO SEPARADOS */
.consent-box {
  background: var(--ivory-light);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.consent-box.checked {
  background: var(--surface);
  border-color: var(--red);
}

.consent-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--red);
  cursor: pointer;
}

.consent-text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
}

.consent-text small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.btn-activate-account {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 15px 20px;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
  transition: all 0.15s;
}

.btn-activate-account:disabled {
  background: #d4cfc9;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================================================
   VISTA: MI SALUD AUTÉNTICO (VIEW: MISALUD)
   ========================================================================== */
.misalud-page {
  max-width: 1100px;
  margin: 32px auto 80px;
  padding: 0 20px;
}

.misalud-user-header {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px 36px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.user-identity-col {
  display: flex;
  align-items: center;
  gap: 18px;
}

.user-big-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.user-text-details h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.user-meta-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.verified-pill {
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.user-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-open-chat-docked {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-logout {
  background: var(--ivory);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-logout:hover {
  background: #fff;
  border-color: var(--red);
  color: var(--red);
}

/* BANNER DE PRODUCTO CONSERVADO DESDE LA RUEDA */
.selected-product-alert {
  background: #fffafa;
  border: 1.5px solid #f0c6c4;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.selected-product-alert strong {
  color: var(--red);
  font-size: 14px;
}

.selected-product-alert p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.misalud-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 30px;
}

.misalud-overview-card {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.misalud-orientation-card {
  border-color: #efc3c1;
  background: linear-gradient(160deg, #fffafa 0%, #fff 72%);
}

.misalud-card-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: #fff0ef;
  font-size: 20px;
  font-weight: 700;
}

.misalud-overview-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.misalud-overview-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.misalud-overview-card .misalud-card-note {
  margin-top: auto;
  padding-top: 4px;
  color: #766e69;
  font-size: 11px;
}

.misalud-card-action {
  margin-top: auto;
  padding: 10px 13px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.misalud-card-action:hover {
  background: var(--red-hover);
}

.misalud-card-action-secondary {
  color: var(--red);
  background: #fff;
  border: 1px solid #e7b8b5;
}

.misalud-card-action-secondary:hover {
  color: #fff;
}

/* BARRA DE PESTAÑAS FUNCIONALES DE MI SALUD */
.misalud-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  color: var(--red);
  border-bottom-color: var(--red);
  font-weight: 700;
}

/* CONTENIDO DE PESTAÑAS */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ESTADO VACÍO HONESTO */
.honest-empty-card {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
}

.empty-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.empty-action-btn {
  background: var(--ink);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sample-toggle {
  background: var(--ivory);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sample-toggle:hover {
  background: #fff;
  border-color: var(--red);
  color: var(--red);
}

/* TARJETAS DE INFORMES DE MUESTRA */
.reports-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.report-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-category {
  font-size: 12px;
  font-weight: 800;
  color: var(--red);
  text-transform: uppercase;
}

.report-date {
  font-size: 12px;
  color: var(--subtle);
}

.report-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.report-summary {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.report-rec-box {
  background: var(--ivory);
  border-left: 3px solid var(--red);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: var(--ink);
}

/* ==========================================================================
   CHATBOT LATERAL ÚNICO CON VIDEO APROBADO (#chatDrawer)
   ========================================================================== */
.chat-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: var(--surface);
  box-shadow: -8px 0 32px rgba(0,0,0,0.18);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-drawer.open {
  right: 0;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ivory);
}

.chat-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.chat-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-chat-control {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-chat-control:hover {
  background: rgba(0,0,0,0.06);
  color: var(--ink);
}

.chat-video-strip {
  width: 100%;
  height: 160px;
  background: #000;
  position: relative;
  overflow: hidden;
}

.chat-video-strip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg {
  max-width: 86%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}

.chat-msg.bot {
  align-self: flex-start;
  background: var(--ivory);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--red);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.chat-action-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}

.chat-action-chip:hover {
  border-color: var(--red);
  color: var(--red);
}

/* BANNER DE EMERGENCIA MÉDICA EN CHAT */
.chat-emergency-card {
  background: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 14px;
  color: #7f1d1d;
  font-size: 13px;
  line-height: 1.45;
}

.chat-emergency-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.chat-input-bar {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  background: #fff;
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 14px;
}

.btn-chat-send {
  background: var(--red);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (ESCRITORIO & MÓVIL 390PX)
   ========================================================================== */
@media (max-width: 900px) {
  .console-card {
    grid-template-columns: 1fr;
  }
  .console-avatar-box {
    min-height: 240px;
  }
  .wheel-container {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .product-wheel-layout {
    gap: 28px;
  }
  .ring-wrap {
    max-width: 470px;
  }
  .phone-stage {
    max-width: 440px;
    margin-inline: auto;
  }
  .products-grid {
    grid-template-columns: 1fr 1fr;
  }
  .misalud-user-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .misalud-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 10px 16px;
  }
  .activation-page {
    margin: 24px auto 56px;
    padding: 0 16px;
  }
  .activation-card {
    padding: 24px 20px;
    border-radius: 24px;
  }
  .activation-title {
    font-size: 21px;
  }
  .consent-box {
    padding: 12px;
    gap: 10px;
  }
  .misalud-page {
    margin: 24px auto 56px;
    padding: 0 16px;
  }
  .nav-links {
    display: none;
  }
  .wheel-section {
    padding: 42px 0;
    margin-bottom: 28px;
  }
  .wheel-section .section-header {
    margin-bottom: 22px;
  }
  .wheel-container {
    gap: 22px;
    padding: 12px;
    border-radius: 22px;
  }
  .ring-wrap {
    width: min(100%, 390px);
  }
  .ring-center {
    width: 29%;
    gap: 3px;
    padding: 6px;
  }
  .ring-center-mark {
    width: 23px;
    height: 23px;
    border-radius: 8px;
    font-size: 10px;
  }
  .ring-center strong {
    font-size: 11px;
  }
  .ring-center small {
    max-width: 74px;
    font-size: 8px;
  }
  .ring-node {
    min-height: 61px;
    padding: 7px 8px;
    gap: 6px;
    border-radius: 14px;
  }
  .ring-node[data-step="1"],
  .ring-node[data-step="3"] {
    width: 35%;
  }
  .ring-node-index {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    border-radius: 7px;
    font-size: 9px;
  }
  .ring-node-copy strong {
    font-size: 10px;
  }
  .ring-node-copy small {
    font-size: 9px;
  }
  .orbit-caption {
    margin-top: 10px;
    font-size: 11px;
  }
  .phone-stage-label {
    font-size: 11px;
  }
  .btn-header-chat {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 8px 20px rgba(216, 48, 43, 0.3);
  }
  .btn-header-chat #txtHeaderChat {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .red-sana-phone {
    width: min(100%, 340px);
    border-radius: 39px;
  }
  .phone-frame {
    border-radius: 31px;
  }
  .phone-screen {
    min-height: 520px;
  }
  .phone-video-window {
    height: 132px;
  }
  .wheel-back-to-cover {
    margin-top: 12px;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .chat-drawer {
    width: 100vw;
    right: -100vw;
  }
  .misalud-user-header {
    padding: 20px;
    margin-bottom: 16px;
    align-items: stretch;
  }
  .misalud-tabs-nav {
    margin-bottom: 20px;
  }
  .user-identity-col {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
    gap: 12px;
  }
  .user-text-details {
    flex: 1;
    min-width: 0;
  }
  .user-text-details h2,
  .user-meta-tags span {
    overflow-wrap: anywhere;
  }
  .user-text-details h2 {
    font-size: 18px;
  }
  .user-meta-tags {
    flex-wrap: wrap;
    min-width: 0;
  }
  .user-actions-row {
    flex-wrap: wrap;
  }
  .selected-product-alert {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 16px;
  }
  .misalud-overview-grid {
    gap: 12px;
    margin-bottom: 22px;
  }
  .misalud-overview-card {
    padding: 18px;
  }
  .console-content {
    padding: 24px 20px;
  }
  .btn-primer-paso {
    width: 100%;
    justify-content: center;
  }
  .console-action-row {
    flex-direction: column;
  }
  .btn-back-to-cover {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 13px;
  }
}

/* BOTÓN FLOTANTE PERMANENTE PARA ASISTENTE IA */
.floating-chat-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 990;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 22, 28, 0.94);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, opacity 0.2s ease;
}
.floating-chat-trigger:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(199, 43, 30, 0.6);
}
.floating-chat-trigger:active {
  transform: translateY(0) scale(0.98);
}
.chat-drawer.open ~ .floating-chat-trigger {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
}
.floating-chat-trigger .floating-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #c72b1e;
  box-shadow: 0 0 8px #c72b1e;
  animation: pulseDotAnim 2s infinite ease-in-out;
}
@keyframes pulseDotAnim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(199, 43, 30, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(199, 43, 30, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(199, 43, 30, 0); }
}
@media (max-width: 600px) {
  .floating-chat-trigger {
    bottom: 18px;
    right: 18px;
    padding: 10px 16px;
    font-size: 13px;
  }
}
