:root {
  --primary: #0F4A46;
  --primary-light: #166B65;
  --primary-dark: #093330;
  --accent: #C8A96E;
  --accent-light: #FAF5EB;
  --accent-gold: #DFCA9B;
  --text-main: #1C2321;
  --text-muted: #6B7280;
  --bg-main: #FAFAF7;
  --bg-surface: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.85);
  --border: #E5E7EB;
  --border-focus: #0F4A46;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --success: #16A34A;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(15, 74, 70, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 74, 70, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 74, 70, 0.12);
  --card-padding: 20px;
  --font-heading: 'Assistant', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Assistant', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  background: rgba(250, 250, 247, 0.95);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(15, 74, 70, 0.08);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-badge {
  font-size: 0.75rem;
  background: var(--accent-light);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 14px 28px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 74, 70, 0.22);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 74, 70, 0.32);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: #EEF2F6 !important;
  color: #94A3B8 !important;
}

.btn-secondary {
  background: white;
  border: 1.5px solid var(--border);
  color: var(--primary-dark);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.skincare-phase {
  animation: fadeInPhase 0.25s ease-out;
}

@keyframes fadeInPhase {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.badge-subphase {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--accent-light);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(13, 148, 136, 0.2);
}

/* Banner de Piel Sana Obligatorio */
.healthy-skin-banner {
  background: var(--accent-light);
  border-bottom: 1px solid var(--accent);
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-dark);
}

/* Hero Section */
.hero {
  max-width: 1240px;
  margin: 3rem auto 5rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.2rem;
  line-height: 1.15;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-content h1 span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* Sello Oficial: Diseñado a medida por el Dr. Aedo, dermatólogo */
.doctor-endorsement-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--accent-light);
  border: 1px solid rgba(15, 74, 70, 0.2);
  padding: 0.4rem 0.95rem;
  border-radius: 30px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
}

.doctor-endorsement-badge svg {
  color: var(--primary);
  flex-shrink: 0;
}

.hero-visual-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.hero-visual {
  background: linear-gradient(145deg, #FAF5EB, #F2E8D5);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

.product-duo-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.duo-box {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--card-padding, 20px);
  box-shadow: 0 4px 20px rgba(15, 74, 70, 0.05);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.duo-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.duo-box .icon {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary);
}

.duo-box h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.duo-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* How It Works Section */
.section {
  max-width: 1240px;
  margin: 5rem auto;
  padding: 0 1.25rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: 2.4rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* === CÓMO FUNCIONA — ESTÉTICA NEOHAIR CON VIDEO Y TIMELINE === */
.features {
  max-width: 1240px;
  margin: 5rem auto;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

@media (min-width: 992px) {
  .features {
    display: grid;
    grid-template-columns: 1fr 1.55fr;
    gap: 3.5rem;
    align-items: start;
  }
  .features-header {
    text-align: left;
    position: sticky;
    top: 90px;
    align-self: start;
    margin-bottom: 0;
  }
}

.features-header {
  margin-bottom: 2.5rem;
}

.features-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #C8A96E;
  margin-bottom: 0.6rem;
}

.features-title {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--primary-dark);
  line-height: 1.2;
}

/* Video Card & Placeholder */
.home-video-card {
  margin: 1.5rem 0 1rem;
  width: 100%;
  max-width: 100%;
}

.home-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md, 16px);
  overflow: hidden;
  background: linear-gradient(135deg, #093330 0%, #166B65 100%);
  box-shadow: 0 12px 32px -8px rgba(15, 74, 70, 0.2), 0 0 0 1px rgba(200, 169, 110, 0.3);
  transition: box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-video-container:hover {
  box-shadow: 0 16px 36px -8px rgba(15, 74, 70, 0.28), 0 0 0 1.5px rgba(200, 169, 110, 0.5);
}

.home-explainer-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border-radius: inherit;
}

.home-video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 74, 70, 0.4) 0%, rgba(9, 51, 48, 0.75) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 5;
  text-align: center;
  padding: 1.5rem;
}

.home-video-overlay:hover {
  background: radial-gradient(circle at center, rgba(15, 74, 70, 0.25) 0%, rgba(9, 51, 48, 0.65) 100%);
}

.home-video-play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C8A96E 0%, #DFCA9B 100%);
  color: #0F4A46;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(200, 169, 110, 0.5);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-video-play-btn svg {
  margin-left: 3px;
}

.home-video-overlay:hover .home-video-play-btn {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(200, 169, 110, 0.7);
}

.home-video-caption-badge {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #FAF5EB;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.features-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 1rem;
}

/* Timeline de Pasos */
.steps-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.step-row {
  display: grid;
  grid-template-columns: 52px 24px 1fr;
  gap: 0 16px;
  align-items: stretch;
}

.step-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #C8A96E;
  letter-spacing: -0.5px;
  line-height: 1.2;
  padding-top: 18px;
  text-align: right;
}

.step-connector {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 18px;
}

.step-connector::before {
  content: '';
  width: 2px;
  flex: 1;
  background: linear-gradient(to bottom, #C8A96E, #E5E7EB);
  border-radius: 2px;
  margin-top: 22px;
}

.step-connector::after {
  content: '';
  position: absolute;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #C8A96E;
  border: 2px solid var(--bg-main, #FAFAF7);
  box-shadow: 0 0 0 2px #C8A96E;
}

.step-row.last .step-connector::before {
  display: none;
}

.step-content {
  padding: var(--card-padding, 20px);
  background: #FFFFFF;
  border-radius: var(--radius-md, 16px);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(15, 74, 70, 0.04);
  margin-bottom: 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.step-content:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 74, 70, 0.08);
  border-color: rgba(200, 169, 110, 0.6);
}

.step-row.last .step-content {
  margin-bottom: 0;
}

.step-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.step-header-bar h3 {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0;
  letter-spacing: -0.2px;
}

.step-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(200, 169, 110, 0.12);
  border: 1px solid rgba(200, 169, 110, 0.35);
  color: #8A6D3B;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.step-content:hover .step-time-badge {
  background: rgba(200, 169, 110, 0.2);
  border-color: rgba(200, 169, 110, 0.5);
}

.step-content p {
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.6;
  margin: 0;
}

.step-content p strong {
  color: var(--primary-dark);
  font-weight: 700;
}

@media (max-width: 640px) {
  .step-row, .step-row.last {
    grid-template-columns: 32px 16px 1fr;
    gap: 0 8px;
  }
  .step-number {
    font-size: 1.2rem;
    padding-top: 14px;
    text-align: left;
  }
  .step-connector {
    padding-top: 14px;
  }
  .step-connector::after {
    top: 20px;
    width: 10px;
    height: 10px;
  }
  .step-connector::before {
    margin-top: 18px;
  }
  .step-content {
    padding: 16px;
  }
  .step-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* Plans Section */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.plan-card {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--card-padding, 20px);
  border: 1px solid var(--border);
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.plan-card.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-md);
  transform: scale(1.03);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
}

.plan-title {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.plan-price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1rem 0;
}

.plan-price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  margin: 1.5rem 0 2rem;
  text-align: left;
  font-size: 0.9rem;
}

.plan-features li {
  padding: 0.4rem 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-features li::before {
  content: "✓";
  color: var(--primary);
  font-weight: bold;
}

/* Quiz UI Components & Contenedor Responsivo (Geometría NeoHair Solutions) */
.quiz-wrapper {
  width: 100%;
  max-width: 1100px; /* Tamaño exacto NeoHair */
  margin: 2.5rem auto 4.5rem;
  padding: 0 20px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .quiz-wrapper {
    padding: 0 16px;
    margin: 1.5rem auto 3rem;
  }
}

.quiz-card {
  background: white;
  border-radius: 32px; /* Radio NeoHair 32px */
  padding: 24px; /* Padding NeoHair 24px */
  box-shadow: 0 12px 36px -8px rgba(15, 74, 70, 0.08), 0 4px 12px rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .quiz-card {
    padding: 24px 18px;
    border-radius: 24px;
  }
}

.recommended-pill {
  position: absolute;
  top: 14px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #937233;
  background: rgba(200, 169, 110, 0.14);
  border: 1px solid rgba(200, 169, 110, 0.38);
  padding: 3px 10px;
  border-radius: 100px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(200, 169, 110, 0.10);
}

.recommended-pill svg {
  color: #937233;
  flex-shrink: 0;
}

.option-box:has(.recommended-pill) h4 {
  padding-right: 95px;
}

/* Quiz Card Header: Título y Etiqueta Superior (Estilo NeoHair) */
.quiz-card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 4px;
  padding-top: 10px; /* Espacio bajo la barra de progreso absoluta */
}

.step-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(200, 169, 110, 0.12);
  border: 1px solid rgba(200, 169, 110, 0.35);
  color: #937233;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  align-self: flex-start;
  box-shadow: 0 1px 4px rgba(200, 169, 110, 0.08);
}

#quiz-header-title {
  color: var(--primary);
  margin: 0;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  text-align: left;
}

/* Subtítulo / Instrucción Contextual del Paso: Jerarquía clara (16px semi-bold) */
.quiz-step-desc,
.quiz-subpage > p:first-of-type {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  line-height: 1.5 !important;
  margin-top: 6px !important;
  margin-bottom: 22px !important;
}

/* Barra de Progreso Superior Pegada al Borde de la Tarjeta */
.progress-bar-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 0;
  margin-bottom: 0;
  overflow: hidden;
  z-index: 10;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  width: 5%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 13.5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 15.5px;
  font-family: inherit;
  transition: all 0.25s ease;
  background: #ffffff;
  color: var(--text-main);
  box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 169, 110, 0.15);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-auto-rows: 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 768px) {
  .options-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto;
    gap: 12px;
  }
}

/* ========================================================
   REGLA DE TARJETAS DE SELECCIÓN:
   1. Si tiene icono y texto principal (sin texto asociado):
      [ icono ]  [ texto principal ]  (en una sola fila horizontal)
   2. Si tiene icono, texto principal + texto asociado:
                 texto principal
      [ icono ]  texto asociado
   3. Si tiene solo texto principal + texto asociado (sin icono):
      texto principal
      texto asociado
   ======================================================== */

.option-box {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 16px 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: white;
  user-select: none;
  box-sizing: border-box;
  position: relative;
}

/* CASO 1: Icono + Texto principal (sin texto asociado <p>) */
.option-box:not(:has(p)) {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  min-height: 72px;
  height: 100%;
}

.option-box:not(:has(p)) .icon {
  order: 1;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #64748b;
  transition: color 0.2s ease;
}

.option-box:not(:has(p)) h4 {
  order: 2;
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
}

/* CASO 2: Icono + Texto principal + Texto asociado (<p>) */
.option-box:has(p):has(.icon) {
  display: grid !important;
  grid-template-areas:
    "title title"
    "icon desc";
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 8px 12px;
  min-height: 105px;
  height: 100%;
}

.option-box:has(p):has(.icon) h4 {
  grid-area: title;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
  margin: 0;
}

.option-box:has(p):has(.icon) .icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 2px;
  flex-shrink: 0;
  color: #64748b;
  transition: color 0.2s ease;
}

.option-box:has(p):has(.icon) p {
  grid-area: desc;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* CASO 3: Solo Texto principal + Texto asociado (sin icono) */
.option-box:has(p):not(:has(.icon)) {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  min-height: 95px;
  height: 100%;
}

.option-box:has(p):not(:has(.icon)) h4 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
  margin: 0;
}

.option-box:has(p):not(:has(.icon)) p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Íconos neutros (sin color por defecto) */
.option-box .icon svg {
  stroke: currentColor;
}

.option-box:hover .icon {
  color: var(--primary);
}

.option-box.selected .icon {
  color: var(--primary);
}

.option-box:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 74, 70, 0.06);
}

.option-box:hover .icon {
  color: var(--primary);
}

.option-box.selected {
  border-color: var(--accent);
  background: rgba(200, 169, 110, 0.08);
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.15);
  color: var(--primary-dark);
}

.option-box.selected .icon {
  color: var(--primary);
}

/* Opción 2: Tarjeta con Foto Adjuntada en Skincare Actual */
.option-box.has-photo {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 88px !important;
  border-color: var(--primary) !important;
  background: #f0fdfa !important;
  box-shadow: 0 4px 16px rgba(15, 74, 70, 0.12) !important;
  padding: 14px 18px !important;
}

.option-box.has-photo .btn-photo-action {
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.option-box.has-photo .btn-photo-change {
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  color: #374151;
}

.option-box.has-photo .btn-photo-change:hover {
  background: #F3F4F6;
  border-color: #9CA3AF;
}

.option-box.has-photo .btn-photo-remove {
  border: 1px solid rgba(15, 74, 70, 0.18);
  background: #FFFFFF;
  color: var(--primary);
  transition: all 0.2s ease;
}

.option-box.has-photo .btn-photo-remove:hover {
  background: #E6F4F1;
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Botones de origen Cámara y Galería estilo NeoHair dentro de la tarjeta */
#routine-source-btns {
  grid-column: 1 / -1;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
}

.triage-alert {
  background: var(--danger-bg);
  border: 1.5px solid #FCA5A5;
  border-radius: 20px;
  padding: 20px 24px;
  color: var(--danger);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: none;
}

.formula-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.formula-box {
  background: var(--bg-main);
  border-radius: var(--radius-md);
  padding: var(--card-padding, 20px);
  border: 1px solid var(--border);
}

.formula-box h4 {
  color: var(--primary);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.actives-list {
  list-style: none;
  margin: 0.8rem 0;
}

.actives-list li {
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: white;
  padding: 3.5rem 1.5rem 1.5rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer p, .footer a {
  color: #9CA3AF;
  font-size: 0.9rem;
  text-decoration: none;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1240px;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: #6B7280;
}

/* ========================================================
   SISTEMA UNIFICADO DE CONTENEDORES Y ANCHOS RESPONSIVOS
   (Todo el sistema: Inicio, Quiz, Confirmación y Portal)
   ======================================================== */

.nav-container,
.hero,
.section,
.features,
.footer-container,
.footer-bottom {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  transition: max-width 0.25s ease;
}

/* 1. Desktop Extra Amplio / PC Ultra-Wide (>= 1400px) */
@media (min-width: 1400px) {
  .nav-container,
  .hero,
  .section,
  .features,
  .footer-container,
  .footer-bottom {
    max-width: 1360px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .hero {
    grid-template-columns: 1.15fr 1fr;
    gap: 4rem;
    margin: 4rem auto 6rem;
  }
  .features {
    gap: 4rem;
    margin: 4rem auto 6rem;
  }
  .hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
  }
  .hero-subtitle {
    font-size: 1.25rem;
  }
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
  }
  .plans-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
  }
}

/* 2. Desktop Estándar / PC (1024px a 1399px) */
@media (min-width: 1024px) and (max-width: 1399px) {
  .nav-container,
  .hero,
  .section,
  .features,
  .footer-container,
  .footer-bottom {
    max-width: 1240px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .hero {
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    margin: 3rem auto 5rem;
  }
  .features {
    gap: 3rem;
    margin: 3rem auto 5rem;
  }
  .hero-content h1 {
    font-size: 3.2rem;
    line-height: 1.15;
  }
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  .plans-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* 3. Tablet y Pantallas Medianas (768px a 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .nav-container,
  .hero,
  .section,
  .features,
  .footer-container,
  .footer-bottom {
    max-width: 768px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin: 2.5rem auto 4rem;
    text-align: center;
  }
  .features {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin: 2.5rem auto 4rem;
  }
  .hero-features {
    justify-content: center;
  }
  .hero-content h1 {
    font-size: 2.8rem;
  }
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* 4. Teléfono Móvil (< 768px) */
@media (max-width: 767px) {
  .nav-container,
  .hero,
  .section,
  .features,
  .footer-container,
  .footer-bottom {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 1.5rem auto 3rem;
  }
  .features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem auto 3.5rem;
  }
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .product-duo-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .plans-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .formula-result-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .form-grid-4, .form-grid-3, .form-grid-split, .form-grid-2 {
    grid-template-columns: 1fr !important;
  }
  .quiz-card {
    padding: var(--card-padding, 20px);
    border-radius: var(--radius-md);
  }
  .quiz-card-header {
    margin-bottom: 1.5rem;
  }
  .quiz-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
  }
  #quiz-header-title {
    font-size: 1.35rem;
  }
  #progress-step-text {
    font-size: 0.82rem;
  }
  .progress-bar-container {
    margin-bottom: 0;
  }
  .options-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* ==========================================
   CLINICAL QUESTIONNAIRE MULTI-STEP STYLES
   ========================================== */
.steps-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
  gap: 0.5rem;
}

.step-indicator {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.step-indicator:hover {
  color: var(--primary);
  border-bottom-color: var(--primary-light);
}

.step-indicator.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.step-indicator.completed {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
}

/* Grids for Personal Data matching reference */
.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.2fr;
  gap: 1rem;
}

.form-grid-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Phone input with +56 prefix */
.phone-input-group {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: white;
  transition: all 0.25s ease;
  height: 52px;
  box-sizing: border-box;
}

.phone-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 169, 110, 0.15);
}

.phone-prefix {
  background: var(--bg-main);
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--primary-dark);
  border-right: 1.5px solid var(--border);
  user-select: none;
  font-size: 15px;
}

.phone-input-group input {
  border: none !important;
  box-shadow: none !important;
  padding: 0 16px;
  font-size: 15.5px;
  flex: 1;
  font-family: inherit;
  outline: none;
  height: 100%;
}

/* Date input group con autoavance estandarizado y redondeado (20px) */
.date-input-group {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: white;
  transition: all 0.25s ease;
  height: 52px;
  padding: 0 18px;
  box-sizing: border-box;
  width: 100%;
}

.date-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 169, 110, 0.15);
}

.date-input-group.input-invalid {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

.date-input-group input.date-segment {
  border: none !important;
  box-shadow: none !important;
  padding: 0 4px !important;
  font-size: 15.5px !important;
  text-align: center;
  font-family: inherit;
  outline: none;
  background: transparent;
  width: 44px;
  color: var(--text-main);
  height: 100%;
}

.date-input-group input.date-segment.date-year {
  width: 64px;
}

.date-input-group input.date-segment::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.date-input-group input.date-segment:disabled {
  background: transparent;
  color: var(--text-muted);
  cursor: not-allowed;
}

.date-input-group.disabled-group {
  background: #F8FAFC;
  opacity: 0.75;
}

.date-separator {
  color: var(--text-muted);
  font-weight: 500;
  user-select: none;
  padding: 0 4px;
  font-size: 15.5px;
}

/* Domicile confirmation box */
.confirm-address-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  background: var(--bg-main);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.confirm-address-box:hover {
  border-color: var(--primary-light);
}

.confirm-address-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.confirm-address-box span {
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.45;
}

/* Medical History Sections */
.medical-section {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.medical-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.medical-section-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.chip-item {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  cursor: pointer;
  background: white;
  color: var(--text-dark);
  transition: all 0.2s ease;
  user-select: none;
}

.chip-item:hover {
  border-color: var(--primary-light);
  background: #F8FAFC;
}

.chip-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
}

.radio-group-horizontal {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin: 0.75rem 0 1rem;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.radio-label input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Conditional Female Block (Clean subtle badge, NO top stripe) */
.conditional-female-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-top: 1.75rem;
  transition: all 0.3s ease;
}

.female-box-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #DCFCE7;
  color: #166534;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.contraindication-alert {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: #92400E;
  margin-top: 0.75rem;
  line-height: 1.45;
}

/* ==========================================
   RUT VALIDATION & FORM LOCKING STYLES
   ========================================== */
.rut-status-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  margin-top: 0.4rem;
  transition: all 0.2s ease;
}

.rut-status-badge.pending {
  color: #64748B;
}

.rut-status-badge.valid {
  color: #0D9488;
  font-weight: 600;
}

.rut-status-badge.invalid {
  color: #EF4444;
  font-weight: 600;
}

.form-input.input-valid {
  border-color: #0D9488 !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1) !important;
}

.form-input.input-invalid {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Estado de bloqueo de campos dependientes (gris visible y notorio) */
.dependent-fields-container,
.dependent-field-box {
  transition: all 0.3s ease;
}

.dependent-fields-container.form-locked,
.dependent-field-box.form-locked {
  pointer-events: none;
  user-select: none;
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled,
.date-input-group.disabled-group,
.date-input-group:has(input:disabled),
.phone-input-group.disabled-group,
.phone-input-group:has(input:disabled),
.dependent-fields-container.form-locked .form-input,
.dependent-field-box.form-locked .date-input-group,
.dependent-field-box.form-locked .phone-input-group {
  background-color: #F8FAFC !important;
  border-color: #E2E8F0 !important;
  color: #94A3B8 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.date-input-group:has(input:disabled) input.date-segment,
.dependent-field-box.form-locked .date-input-group input.date-segment,
.phone-input-group:has(input:disabled) input,
.dependent-field-box.form-locked .phone-input-group input {
  background: transparent !important;
  color: #94A3B8 !important;
  cursor: not-allowed !important;
}

.date-input-group:has(input:disabled) .date-separator,
.dependent-field-box.form-locked .date-input-group .date-separator {
  color: #CBD5E1 !important;
}

.phone-input-group:has(input:disabled) .phone-prefix,
.dependent-field-box.form-locked .phone-input-group .phone-prefix {
  background-color: #F1F5F9 !important;
  color: #94A3B8 !important;
  border-right-color: #E2E8F0 !important;
}

.dependent-fields-container.form-locked label,
.dependent-field-box.form-locked label {
  color: #94A3B8 !important;
}

.dependent-fields-container.form-unlocked,
.dependent-field-box.form-unlocked {
  pointer-events: auto;
  user-select: auto;
}

.lock-info-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
}

.lock-info-box.unlocked {
  background: #F0FDF4;
  border-color: #86EFAC;
  color: #166534;
}

/* ========================================================
   TOOLBAR MODO DESARROLLO (SOLO VISIBLE EN LOCALHOST)
   ======================================================== */
.dev-toolbar {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 74, 70, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  border-radius: 40px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  font-size: 0.85rem;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: slideUpDev 0.3s ease-out;
}

@keyframes slideUpDev {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.dev-toolbar-badge {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
}

.dev-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-dev {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-dev:hover {
  background: white;
  color: var(--primary);
}

.btn-dev-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-dev-primary:hover {
  background: #0f766e;
  color: white;
}

.dev-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  cursor: pointer;
  user-select: none;
  margin-left: 0.35rem;
  color: rgba(255, 255, 255, 0.9);
}

.dev-toggle input {
  accent-color: var(--accent);
  cursor: pointer;
}

/* ========================================================
   SUBPÁGINAS Y CONTROLES DEL CUESTIONARIO PAGINADO
   ======================================================== */
.quiz-subpage {
  display: none;
  animation: fadeInPhase 0.22s ease-out;
}

.quiz-subpage.active {
  display: block;
}

/* Matriz de Escala (Sensaciones y Rutina) */
.scale-item-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--card-padding, 20px);
  margin-bottom: 0.85rem;
  background: #FAFAFA;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.2s;
}

.scale-item-card:hover {
  border-color: #cbd5e1;
}

.scale-item-label {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.scale-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scale-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
  color: var(--text-dark);
}

.scale-btn:hover {
  border-color: var(--primary);
  background: var(--accent-light);
}

.scale-btn.selected {
  background: rgba(200, 169, 110, 0.14) !important;
  color: var(--primary-dark) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 2px 10px rgba(200, 169, 110, 0.18) !important;
  font-weight: 700;
}

/* Categorías de Metas Clínicas */
.goal-category-box {
  margin-bottom: 1.25rem;
  padding: var(--card-padding, 20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #FAFAFA;
}

.goal-category-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 0.65rem;
}

.goal-chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.goal-chip {
  padding: 0.45rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-dark);
}

.goal-chip:hover {
  border-color: var(--primary);
}

.goal-chip.selected {
  background: rgba(200, 169, 110, 0.14) !important;
  color: var(--primary-dark) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 2px 10px rgba(200, 169, 110, 0.18) !important;
  font-weight: 700;
}

/* Captura Fotográfica Facial */
.photo-capture-card {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: var(--card-padding, 20px);
  text-align: center;
  background: #F8FAFC;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}

.photo-capture-card:hover {
  border-color: var(--primary);
}

.photo-preview-img {
  max-width: 220px;
  max-height: 220px;
  border-radius: var(--radius-md);
  margin: 1rem auto 0;
  object-fit: cover;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  display: none;
}

/* Selector de Ubicación */
.location-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

@media (max-width: 640px) {
  .location-input-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Tarjeta de Edad Calculada Automáticamente */
.age-calculated-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.age-calculated-badge.valid {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.age-calculated-badge.invalid {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ========================================================
   HOJA 2.8: ORDENAMIENTO DE CATEGORÍAS DE METAS POR PREFERENCIA
   ======================================================== */
.ranking-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rank-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--card-padding, 20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}


.rank-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 14px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-sizing: border-box;
}

.rank-item-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
}

.rank-item-card.top-priority {
  border-color: var(--accent);
  background: rgba(200, 169, 110, 0.08);
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.15);
}

.rank-item-card.dragging {
  opacity: 0.55;
  border: 2px dashed var(--accent);
  background: rgba(200, 169, 110, 0.06);
}

.rank-item-card.drag-over {
  border-top: 3px solid var(--accent);
}

.rank-card-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  background: #E2E8F0;
  color: #475569;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.rank-item-card.top-priority .rank-badge {
  background: var(--accent);
  color: #FFFFFF;
}

.rank-card-info h4 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.2rem;
}

.rank-card-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Botón de Arrastre Lateral Derecho para Reordenar Metas */
.rank-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #F1F5F9;
  color: #64748B;
  cursor: grab;
  cursor: -webkit-grab;
  transition: all 0.2s ease;
  user-select: none;
  touch-action: none;
  flex-shrink: 0;
}

.rank-drag-handle:hover {
  background: rgba(200, 169, 110, 0.18);
  color: #937233;
}

.rank-drag-handle:active,
.rank-item-card.dragging .rank-drag-handle {
  cursor: grabbing;
  cursor: -webkit-grabbing;
}

.btn-rank-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  color: #475569;
  transition: all 0.18s ease;
  padding: 0;
  line-height: 1;
}

.btn-rank-arrow:hover:not(:disabled) {
  background: rgba(200, 169, 110, 0.22);
  color: #937233;
  border-color: #C8A96E;
}

.btn-rank-arrow:active:not(:disabled) {
  transform: scale(0.92);
}

/* ========================================================
   HOJA 3.1: RUTINA ACTUAL EN 2 PASOS (PRODUCTOS + FRECUENCIA)
   ======================================================== */
.routine-step-section {
  margin-bottom: 1.75rem;
}

.routine-step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.routine-step-title .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.routine-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
  margin-bottom: 1.25rem;
}

.routine-product-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  min-height: 64px;
  height: 100%;
  box-sizing: border-box;
}

.routine-product-card:hover {
  border-color: #94A3B8;
  background: #F8FAFC;
}

.routine-product-card.selected {
  border-color: var(--accent);
  background: rgba(200, 169, 110, 0.08);
  box-shadow: 0 4px 14px rgba(200, 169, 110, 0.12);
}

.routine-product-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  pointer-events: none;
}

.routine-product-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1E293B;
  line-height: 1.3;
}

/* Frecuencias: Tarjetas directas individuales sin "doble tarjeta" gris */
.routine-frequencies-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 0;
}

.routine-freq-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 14px 20px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  min-height: 60px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.routine-freq-row:hover {
  border-color: #cbd5e1;
}

.routine-freq-row-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-dark);
  min-width: 150px;
}

.routine-freq-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-freq {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: #F8FAFC;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-freq:hover {
  background: #E2E8F0;
  color: #1E293B;
}

.btn-freq.selected {
  background: rgba(200, 169, 110, 0.14) !important;
  border-color: var(--accent) !important;
  color: var(--primary-dark) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(200, 169, 110, 0.18) !important;
}

@media (max-width: 640px) {
  .routine-freq-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ========================================================
   FOTO GRID ESTILO NEOHAIR STEP 6 (3 TARJETAS DESMEJILLAS/FRONTAL)
   ======================================================== */
.file-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 auto 1.5rem;
}

@media (max-width: 768px) {
  .file-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.file-item {
  border: 1.5px dashed #cbd5e1;
  border-radius: 20px;
  background: #f8fafc;
  min-height: 210px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px 16px;
  text-align: center;
  box-sizing: border-box;
}

.file-item:hover {
  border-color: var(--primary);
  background: #f0fdfa;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 74, 70, 0.08);
}

.file-item.has-file {
  border-style: solid;
  border-color: var(--primary);
  background: #ffffff;
  padding: 0;
}

.file-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  position: absolute;
  top: 0;
  left: 0;
}

.file-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(15, 74, 70, 0.9), transparent);
  padding: 24px 10px 12px;
  color: white;
  font-weight: 700;
  font-size: 14px;
  box-sizing: border-box;
}

.file-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--primary);
  border: 1.5px solid rgba(15, 74, 70, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 74, 70, 0.16);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  padding: 0;
}

.file-remove:hover {
  transform: scale(1.1);
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(15, 74, 70, 0.3);
}

.file-remove svg {
  stroke: currentColor;
  transition: stroke 0.2s;
}

/* Iconos de fotos estilo PureSkincare (sin fondo de color, lineal y limpio) */
.file-icon-wrapper {
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: none;
  color: #64748b;
  transition: color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.file-icon-wrapper svg {
  width: 36px;
  height: 36px;
  stroke: currentColor;
  stroke-width: 1.7;
}

.file-item:hover .file-icon-wrapper {
  color: var(--primary);
  transform: translateY(-3px) scale(1.05);
}

.file-label-text {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.file-hint {
  font-size: 13px;
  color: #64748b;
}

/* Botones de origen de foto integrados directamente en cada tarjeta */
.file-source-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  width: 100%;
  z-index: 2;
}

.btn-slot-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--primary-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-slot-source:hover {
  border-color: var(--accent);
  background: rgba(200, 169, 110, 0.14);
  color: #937233;
  transform: translateY(-1px);
}

.btn-slot-source svg {
  color: currentColor;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .routine-freq-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ========================================================
   HOJA 4.1: PATOLOGÍAS AGRUPADAS POR CATEGORÍA
   ======================================================== */
.chronic-categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.chronic-category-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  padding: var(--card-padding, 20px);
  transition: all 0.2s ease;
}

.chronic-category-card.selected,
.chronic-category-card.none-card.selected {
  border-color: var(--accent) !important;
  background: rgba(200, 169, 110, 0.08) !important;
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.18) !important;
}

.chronic-cat-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.chronic-cat-header input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.35rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.chronic-cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(15, 74, 70, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  transition: all 0.2s ease;
  margin-top: 0.05rem;
}

.chronic-category-card.selected .chronic-cat-icon {
  background: rgba(200, 169, 110, 0.16);
  color: #937233;
}

.chronic-cat-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.2rem;
}

.chronic-cat-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.chronic-cat-detail {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
  display: none;
}

.chronic-cat-detail.active {
  display: block;
}

.chronic-cat-detail label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
}

.chronic-spec-input {
  width: 100%;
  padding: 12px 18px;
  font-size: 14.5px;
  border: 1.5px solid var(--border);
  border-radius: 20px !important;
  background: #FFFFFF;
  color: #1E293B;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.chronic-spec-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 169, 110, 0.15);
}

/* Estandarización Global: Todos los cuadros de texto son redondeados (20px) */
input[type="text"]:not(.date-segment),
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
.form-input,
.form-select,
.form-textarea {
  border-radius: 20px !important;
}

/* Animación fluida de Reordenamiento de Prioridades (Paso 12) */
.rank-item-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}

.rank-item-card.rank-item-moved {
  box-shadow: 0 8px 24px rgba(200, 169, 110, 0.25) !important;
  border-color: var(--accent) !important;
}

/* ========================================================
   ESTANDARIZACIÓN GLOBAL DE LISTAS DESPLEGABLES (SELECT)
   Idénticas a cuadros de texto: Altura 52px, Redondeo 20px,
   Chevron SVG de diseño y foco en Champagne Gold.
   ======================================================== */
select.form-select,
.form-select {
  display: block !important;
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 12px 45px 12px 20px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 20px !important;
  font-size: 15.5px !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  color: var(--text-main) !important;
  background-color: #FFFFFF !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230F4A46' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 18px center !important;
  background-size: 18px 18px !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
}

select.form-select:focus,
.form-select:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(200, 169, 110, 0.15) !important;
}

select.form-select:disabled,
.form-select:disabled {
  background-color: #F8FAFC !important;
  border-color: #E2E8F0 !important;
  color: #94A3B8 !important;
  cursor: not-allowed !important;
  opacity: 0.85 !important;
}

/* Accent Color Universal: Champagne Gold para inputs nativos */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent) !important;
}

/* Tarjeta de Alerta Gineco-Obstétrica */
.pregnancy-alert-card {
  background: #FAF5EB;
  border: 1.5px solid #F3E8D0;
  border-radius: 16px;
  padding: 16px 20px;
  color: #78350F;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: 0 4px 14px rgba(200, 169, 110, 0.08);
}

.pregnancy-alert-card strong {
  color: #92400E;
}

/* Especificación dinámica de Alergias */
.allergy-spec-card {
  background: #FDFCF9;
  border: 1.5px solid rgba(200, 169, 110, 0.4);
  border-radius: 20px;
  padding: 16px 20px;
  margin-top: 1rem;
  transition: all 0.25s ease;
}

.allergy-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.allergy-spec-item:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   SISTEMA ESTANDARIZADO DE MODALES Y POPUPS (PURESKINCARE SOLUTIONS)
   ========================================================================== */

.pureskincare-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9, 51, 48, 0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1.25rem;
  animation: modalFadeIn 0.25s ease-out forwards;
}

.pureskincare-modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg, 24px);
  width: 100%;
  max-width: 460px;
  box-shadow: 0 25px 60px -12px rgba(15, 74, 70, 0.28);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 74, 70, 0.08);
  padding: 2.25rem 2rem 2rem 2rem;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { transform: translateY(16px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.pureskincare-modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #F3F4F6;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.3rem;
  line-height: 1;
}

.pureskincare-modal-close:hover {
  background: #E5E7EB;
  color: #1F2937;
  transform: rotate(90deg);
}

/* Icono insignia superior (64x64) */
.pureskincare-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
}

.pureskincare-modal-icon.icon-security,
.pureskincare-modal-icon.icon-success {
  background: #E6F4F1;
  border: 1.5px solid rgba(15, 74, 70, 0.18);
  color: var(--primary);
}

.pureskincare-modal-icon.icon-warning,
.pureskincare-modal-icon.icon-alert {
  background: #FEF3C7;
  border: 1.5px solid #FCD34D;
  color: #D97706;
}

.pureskincare-modal-icon.icon-error {
  background: #FEE2E2;
  border: 1.5px solid #FCA5A5;
  color: #DC2626;
}

/* Título oficial PureSkincare */
.pureskincare-modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  margin: 0 0 0.5rem 0;
  line-height: 1.35;
}

.pureskincare-modal-title .modal-subtitle {
  font-size: 1.15rem;
  font-weight: 700;
  opacity: 0.95;
  display: inline-block;
  margin-top: 0.25rem;
}

/* Texto de cuerpo */
.pureskincare-modal-text {
  font-size: 0.92rem;
  color: #4B5563;
  line-height: 1.55;
  text-align: center;
  margin: 0 0 1.35rem 0;
}

/* Form inputs directos (Sin tarjeta anidada) */
.pureskincare-modal-field {
  margin-bottom: 1.5rem;
  text-align: left;
}

.pureskincare-modal-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 0.5rem;
}

/* Botones estándar: Verde y Blanco */
.pureskincare-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-btn-green {
  background: var(--primary);
  color: #FFFFFF;
  width: 100%;
  height: 50px;
  border-radius: 100px;
  font-size: 0.98rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 74, 70, 0.22);
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.modal-btn-green:hover:not(:disabled) {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 74, 70, 0.32);
}

.modal-btn-green:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.modal-btn-white {
  background: #FFFFFF;
  border: 1.5px solid #D1D5DB;
  color: var(--primary-dark);
  width: 100%;
  height: 48px;
  border-radius: 100px;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.modal-btn-white:hover {
  border-color: var(--primary);
  background: #F9FAFB;
  color: var(--primary);
}

/* ========================================================
   POST-ANÁLISIS: PROPUESTA DERMATOLÓGICA Y LÍNEA DE TIEMPO (N1 A N10)
   ======================================================== */

/* Ocultar el encabezado estándar del quiz cuando se visualiza el resultado final (sin doble título) */
.quiz-card:has(#step-result.active) .quiz-card-header {
  display: none !important;
}

.result-greeting-card {
  background: linear-gradient(135deg, #0F4A46 0%, #175752 50%, #0c3b38 100%);
  border: 1px solid rgba(200, 169, 110, 0.4);
  border-radius: 24px;
  padding: 38px 32px;
  margin-bottom: 2.25rem;
  box-shadow: 0 16px 36px rgba(15, 74, 70, 0.22);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-greeting-card::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 550px;
  height: 250px;
  background: radial-gradient(ellipse at center, rgba(200, 169, 110, 0.16) 0%, rgba(15, 74, 70, 0) 70%);
  pointer-events: none;
}

.greeting-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(200, 169, 110, 0.18);
  color: #F8EED9;
  border: 1px solid rgba(200, 169, 110, 0.45);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.greeting-badge svg {
  color: #C8A96E;
  flex-shrink: 0;
}

.greeting-title {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 0.4rem 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-align: center;
}

.greeting-subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 700;
  color: #C8A96E;
  margin: 0 0 0.85rem 0;
  letter-spacing: 0.01em;
  text-align: center;
}

.greeting-desc {
  font-size: 1.02rem;
  color: rgba(240, 245, 243, 0.92);
  line-height: 1.65;
  margin: 0 auto;
  max-width: 760px;
  text-align: center;
}

@media (max-width: 768px) {
  .result-greeting-card {
    padding: 28px 20px;
    border-radius: 20px;
  }
  .greeting-title {
    font-size: 1.45rem;
  }
}

/* Barra de Plan Colapsado (Paso 1) */
.plan-collapsed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F4F8F6;
  border: 1.5px solid rgba(15, 74, 70, 0.25);
  border-radius: 18px;
  padding: 16px 22px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(15, 74, 70, 0.05);
  animation: fadeInDown 0.35s ease-out;
}

.collapsed-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.collapsed-check-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 74, 70, 0.2);
}

.collapsed-text {
  text-align: left;
}

.collapsed-title {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.collapsed-title strong {
  color: var(--primary);
  font-size: 1.08rem;
  font-weight: 800;
}

.collapsed-price {
  background: rgba(200, 169, 110, 0.22);
  color: #8C6D2D;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.collapsed-features {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-change-plan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid rgba(15, 74, 70, 0.25);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-change-plan:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 74, 70, 0.15);
}

.plan-includes-box {
  margin: 1rem 0 1.1rem;
  padding: 0.95rem 1.1rem;
  background: #F4F8F7;
  border-radius: 14px;
  border: 1.5px solid #E1EBE8;
  transition: all 0.2s ease;
}

.plan-includes-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.55rem;
}

.plan-includes-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.plan-includes-items li {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  line-height: 1.4;
}

.plan-includes-items li svg {
  color: var(--primary);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.plan-card-new.selected .plan-includes-box {
  background: #EAF4F2;
  border-color: #B9DCD6;
}

/* Animación y Sección Paso 2 */
.step-2-formulas-section {
  animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .plan-collapsed-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .btn-change-plan {
    align-self: flex-start;
  }
}

/* Selector de Planes */
.plan-selection-section {
  margin: 1.5rem 0 2rem;
  text-align: left;
}

.section-label-header {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: clamp(24px, 3.2vw, 30px);
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 8px 0;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  line-height: 1.5;
  margin: 0;
}

.plans-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-top: 1.2rem;
}

.plan-card-new {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 26px 22px;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.plan-card-new:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 74, 70, 0.10);
}

.plan-card-new.selected {
  border: 2.5px solid var(--primary);
  background: #F8FBFA;
  box-shadow: 0 10px 32px rgba(15, 74, 70, 0.14);
}

.plan-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.plan-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #E8F2F0;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-card-new.selected .plan-icon-wrapper {
  background: var(--primary);
  color: #FFFFFF;
}

.plan-check-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.plan-card-new.selected .plan-check-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.plan-badge-floating {
  position: absolute;
  top: -12px;
  left: 22px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(200, 169, 110, 0.4);
}

.plan-name-new {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0.2rem 0 0.35rem;
  letter-spacing: -0.01em;
}

.plan-price-new {
  font-size: 2.05rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0.25rem 0 0.55rem;
  line-height: 1.15;
}

.plan-price-new span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.plan-contents-pill {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: #E6F0EE;
  padding: 4px 12px;
  border-radius: 12px;
  margin: 0.4rem 0 0.6rem;
}

.plan-desc-new {
  font-size: 0.95rem;
  font-weight: 500;
  color: #4B5563;
  line-height: 1.55;
  margin: 0;
}

/* Bloques de Línea de Tiempo de Productos (Nivel 1 a 10) */
.timeline-section-title {
  margin: 2.5rem 0 1.2rem;
  text-align: left;
}

/* Grid día + noche lado a lado */
.products-timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 860px) {
  .products-timeline-grid {
    grid-template-columns: 1fr;
  }
}

.products-timeline-grid .timeline-product-block {
  margin-bottom: 0;
}

.timeline-product-block {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px 20px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 18px rgba(15, 74, 70, 0.04);
  text-align: left;
  transition: all 0.3s ease;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #F1F5F9;
}

.product-tag-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 0.3rem;
}

.tag-day {
  background: #FEF3C7;
  color: #92400E;
}

.tag-night {
  background: #E0E7FF;
  color: #3730A3;
}

.tag-eye {
  background: #FCE7F3;
  color: #9D174D;
}

.tag-serum {
  background: #CCFBF1;
  color: #115E59;
}

.product-main-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.1rem 0 0.3rem;
}

.product-vehicle-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.timeline-track-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: #166534;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  padding: 5px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Cuadrícula Comparativa Nivel 1 vs Nivel 10 */
.timeline-comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 1.2rem;
  margin: 1.2rem 0;
}

@media (max-width: 820px) {
  .timeline-comparison-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .timeline-arrow-connector {
    flex-direction: row !important;
    padding: 0.5rem 0;
  }
  .timeline-arrow-connector .connector-line {
    height: 2px !important;
    width: auto !important;
    flex: 1;
  }
}

.timeline-card {
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.timeline-card.card-initial {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
}

.timeline-card.card-target {
  background: #F0FDF4;
  border: 1.5px solid #86EFAC;
}

.timeline-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.level-tag-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-initial-level {
  background: #E2E8F0;
  color: #334155;
}

.tag-target-level {
  background: #166534;
  color: #FFFFFF;
}

.level-number-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.timeline-card-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.4;
}

.actives-list-new {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  flex: 1;
}

.actives-list-new li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.07);
  font-size: 0.88rem;
  color: var(--text-main);
  gap: 0.5rem;
}

.actives-list-new li:last-child {
  border-bottom: none;
}

.actives-list-new .active-name {
  font-weight: 500;
  line-height: 1.35;
}

.actives-list-new .active-dose-base {
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}

.actives-list-new .active-dose-target {
  font-weight: 700;
  color: var(--primary-dark);
  background: none;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
}

.timeline-card-bottom {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.timeline-card.card-target .timeline-card-bottom {
  color: #166534;
  font-weight: 700;
}

/* Conector de Línea de Tiempo */
.timeline-arrow-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 130px;
}

.timeline-arrow-connector .connector-line {
  flex: 1;
  width: 2px;
  background: #CBD5E1;
}

.connector-badge-center {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.connector-badge-center svg {
  color: var(--primary);
}

.connector-badge-center span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.product-usage-instructions {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0.8rem 0 0;
  line-height: 1.45;
  background: #F8FAFC;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

/* Nota Regulatoria y Médica (Unificada para todas las advertencias e "Importante:") */
.medical-approval-notice,
.clinical-safety-note,
.clinical-warning-box,
.medical-warning-box {
  background: #FAF5EB;
  border: 1.5px solid #F3E8D0;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 1.5rem 0;
  text-align: left;
  color: #78350F;
  font-size: 0.88rem;
  line-height: 1.45;
}

.notice-icon-wrap,
.clinical-safety-note .notice-icon-wrap,
.clinical-warning-box .notice-icon-wrap,
.medical-warning-box .notice-icon-wrap {
  color: #92400E;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-content-text,
.clinical-safety-note .notice-content-text,
.clinical-warning-box .notice-content-text,
.medical-warning-box .notice-content-text {
  font-size: 0.88rem;
  color: #78350F;
  line-height: 1.45;
}

.medical-approval-notice strong,
.notice-content-text strong,
.clinical-safety-note strong,
.clinical-warning-box strong,
.medical-warning-box strong {
  color: #92400E;
}

/* Botonera de Acción Post-Análisis (Volver izq compacto, Continuar/Pagar der expandido ocupando el resto) */
.result-action-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.25rem;
  width: 100%;
}

.btn-post-return {
  min-width: 120px;
  height: 48px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  flex-shrink: 0;
}

.btn-post-return:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F8FAFC;
}

.btn-post-pay {
  flex: 1;
  height: 50px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1.02rem;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(15, 74, 70, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 1.5rem;
}

.btn-post-pay:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 74, 70, 0.35);
}




/* ============================================================
   CAJA UNIFICADA DE PRODUCTO (AM + PM) - ESTÉTICA PURESKINCARE
   ============================================================ */
.formula-product-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 74, 70, 0.06), 0 1px 3px rgba(0,0,0,0.03);
  margin-bottom: 2rem;
}
.formula-box-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 22px;
  background: var(--primary);
  gap: 1rem;
}
.formula-box-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.formula-box-brand svg {
  color: var(--accent, #C8A96E);
}
.formula-box-progress-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #F8EED9;
  background: rgba(200, 169, 110, 0.16);
  border: 1px solid rgba(200, 169, 110, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.formula-box-progress-tag svg {
  color: var(--accent, #C8A96E);
}
.formula-box-section {
  padding: 18px 22px 14px;
}
.formula-box-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px;
  padding: 9px 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
  background: #F8FAF9;
  border: 1px solid #E6ECE9;
}
.am-header {
  background: #FAF8F5;
  border: 1px solid #ECE7DF;
}
.pm-header {
  background: #F4F7F6;
  border: 1px solid #DFE7E4;
}
.eye-header {
  background: #FBF8F7;
  border: 1px solid #EBE4E2;
}
.serum-header {
  background: #F5F7F8;
  border: 1px solid #E0E7E9;
}
.formula-box-section-id {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
}
.am-id svg {
  color: #B88E3E;
}
.pm-id svg {
  color: var(--primary);
}
.eye-id svg {
  color: #A36B7E;
}
.serum-id svg {
  color: var(--primary-light);
}
.formula-box-vehiculo {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748B;
  font-style: italic;
  max-width: 58%;
  text-align: right;
}
.formula-box-cols-header {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  padding: 0 2px;
  gap: 0;
}
.fcol-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 8px;
  flex: 1;
}
.fcol-label.inicio {
  background: #F1F5F4;
  color: #475569;
  border: 1px solid #E2E8F0;
}
.fcol-label.objetivo {
  background: rgba(15, 74, 70, 0.06);
  color: var(--primary);
  border: 1px solid rgba(15, 74, 70, 0.16);
  text-align: right;
}
.fcol-spacer {
  width: 38px;
  flex-shrink: 0;
}
.formula-box-actives-row {
  display: grid;
  grid-template-columns: 1fr 38px 1fr;
  align-items: start;
}
.fcol-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.fcol-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px;
  border-bottom: 1px dashed #E2E8F0;
  font-size: 0.82rem;
  gap: 6px;
}
.fcol-list li:last-child {
  border-bottom: none;
}
.fcol-list li .active-name {
  color: #1E293B;
  font-weight: 500;
}
.fcol-list li .active-dose-base,
.fcol-list-target li .active-dose-target {
  color: #1E293B !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}
.fcol-arrow-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  height: 100%;
}
.fcol-arrow-line {
  flex: 1;
  width: 1px;
  background: #E2E8F0;
  min-height: 8px;
}
/* Notas inferiores por columna */
.formula-box-notes-row {
  display: grid;
  grid-template-columns: 1fr 38px 1fr;
  align-items: start;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #F1F5F4;
}
.fcol-note {
  font-size: 0.73rem;
  line-height: 1.45;
  color: #64748B;
}
.fnote-title {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin-bottom: 2px;
}
.fcol-note.objetivo-note .fnote-title {
  color: var(--primary);
}
.fnote-text {
  margin: 0;
  color: #64748B;
}
.formula-box-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #E2E8F0 15%, #CBD5E1 50%, #E2E8F0 85%, transparent);
  margin: 0 22px;
}

/* ============================================================
   PASO 3: MÉTODO DE PAGO Y RESUMEN DE ORDEN
   ============================================================ */
.step-3-payment-section {
  animation: fadeInDown 0.35s ease-out;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.payment-order-summary {
  background: #FAF9F6;
  border: 1px solid #E5EBE8;
  border-radius: 18px;
  padding: 18px 24px;
  margin-bottom: 1.5rem;
}

.order-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  color: #475569;
  margin-bottom: 8px;
}

.order-summary-row:last-child {
  margin-bottom: 0;
}

.order-summary-val {
  color: #1E293B;
  font-weight: 600;
}

.summary-total-row {
  border-top: 1px solid #E2E8F0;
  padding-top: 12px;
  margin-top: 12px;
  font-size: 1rem;
}

.summary-total-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

.summary-period {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748B;
}

.payment-methods-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 2rem;
}

.payment-method-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}

.payment-method-card:hover {
  border-color: #CBD5E1;
  background: #FDFDFD;
}

.payment-method-card.active {
  border-color: var(--primary);
  background: #F4F8F6;
  box-shadow: 0 4px 16px rgba(15, 74, 70, 0.08);
}

.payment-method-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.payment-method-card.active .payment-method-radio {
  border-color: var(--primary);
}

.radio-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  transform: scale(0);
  transition: transform 0.2s ease;
}

.payment-method-card.active .radio-inner {
  transform: scale(1);
}

.payment-method-info {
  flex: 1;
}

.payment-method-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 2px;
}

.payment-method-sub {
  font-size: 0.8rem;
  color: #64748B;
  line-height: 1.35;
}

.payment-method-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(15, 74, 70, 0.08);
  color: var(--primary);
  border: 1px solid rgba(15, 74, 70, 0.18);
  white-space: nowrap;
}

/* ==========================================================================
   Camera Modal - PureSkincare Clinical Device Interface
   ========================================================================== */
.camera-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 51, 48, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.camera-card {
    width: 100%;
    max-width: 580px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 74, 70, 0.14);
    box-shadow: 0 25px 60px -10px rgba(15, 74, 70, 0.28), 0 0 0 1px rgba(15, 74, 70, 0.05);
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: cameraModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cameraModalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.camera-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #FFFFFF;
    border-bottom: 1px solid rgba(15, 74, 70, 0.08);
}

.camera-title-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
}

.camera-title-badge svg {
    color: var(--accent);
    stroke: var(--accent);
}

.camera-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #E6F4F1;
    border: 1px solid rgba(15, 74, 70, 0.16);
    color: var(--primary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
}

.camera-btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.06);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(15, 74, 70, 0.22);
}

.camera-viewport-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #061A18;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-instruction-pill {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(9, 51, 48, 0.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(200, 169, 110, 0.55);
    color: #FFFFFF;
    padding: 8px 22px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 16px rgba(9, 51, 48, 0.35);
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
}

/* Corner HUD Bracket Highlights */
.camera-hud-corner {
    position: absolute;
    width: 26px;
    height: 26px;
    border-color: var(--accent);
    border-style: solid;
    pointer-events: none;
    z-index: 5;
    opacity: 0.92;
    filter: drop-shadow(0 0 5px rgba(200, 169, 110, 0.45));
}
.camera-hud-top-left { top: 16px; left: 16px; border-width: 3px 0 0 3px; border-top-left-radius: 8px; }
.camera-hud-top-right { top: 16px; right: 16px; border-width: 3px 3px 0 0; border-top-right-radius: 8px; }
.camera-hud-bottom-left { bottom: 16px; left: 16px; border-width: 0 0 3px 3px; border-bottom-left-radius: 8px; }
.camera-hud-bottom-right { bottom: 16px; right: 16px; border-width: 0 3px 3px 0; border-bottom-right-radius: 8px; }

.camera-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    background: var(--bg-main);
    border-top: 1px solid rgba(15, 74, 70, 0.08);
    position: relative;
}

.shutter-btn-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.shutter-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFFFFF 65%, #F0FDF4 100%);
    border: 4px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 74, 70, 0.16), 0 0 0 8px rgba(200, 169, 110, 0.22), 0 8px 22px rgba(15, 74, 70, 0.28);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    padding: 0;
    outline: none;
}

.shutter-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 0 0 6px rgba(15, 74, 70, 0.25), 0 0 0 10px rgba(200, 169, 110, 0.35), 0 12px 28px rgba(15, 74, 70, 0.35);
}

.shutter-btn:active {
    transform: scale(0.93);
}

.shutter-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(15, 74, 70, 0.18);
}

.camera-gallery-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 9px 18px;
    border-radius: 100px;
    background: #FFFFFF;
    border: 1.5px solid rgba(15, 74, 70, 0.18);
    box-shadow: 0 2px 6px rgba(15, 74, 70, 0.05);
    transition: all 0.2s ease;
}

.camera-gallery-link:hover {
    background: #E6F4F1;
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 74, 70, 0.12);
}

.camera-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    transition: opacity 0.15s ease-out;
}
.camera-flash.active {
    opacity: 0.9;
    transition: none;
}

.camera-status-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(6, 26, 24, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 20;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

@media (max-width: 600px) {
    .camera-modal-backdrop {
        padding: 0;
    }
    .camera-card {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
        border: none;
    }
    .camera-viewport-wrapper {
        flex: 1;
        aspect-ratio: auto;
    }
}

/* ========================================================
   HOJA PREFERENCIA DE ACTIVOS (page-2-8-actives)
   ======================================================== */
.active-pref-default-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 1.25rem;
}

.active-pref-default-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.active-pref-default-card.selected {
  border-color: var(--accent) !important;
  background: rgba(200, 169, 110, 0.08) !important;
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.18) !important;
}

.pref-default-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pref-default-checkbox input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.pref-default-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  flex-wrap: wrap;
}

.pref-default-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1E293B;
  transition: all 0.2s ease;
}

.active-pref-default-card.selected .pref-default-title {
  font-weight: 600;
  color: var(--primary-dark);
}

.pref-default-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(15, 74, 70, 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(15, 74, 70, 0.15);
}

.active-pref-default-card.selected .pref-default-badge {
  background: rgba(200, 169, 110, 0.2);
  color: #8c6a28;
  border-color: rgba(200, 169, 110, 0.35);
}

.pref-default-sub {
  margin: 0.5rem 0 0 2.1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.pref-actives-subtitle {
  margin: 1.4rem 0 0.8rem 0;
  font-weight: 600;
  font-size: 0.84rem;
  color: #64748B;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preferred-actives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.pref-active-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  user-select: none;
}

.pref-active-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 74, 70, 0.06);
}

.pref-active-card:hover .pref-active-name {
  color: var(--primary-dark);
}

.pref-active-card.selected {
  border-color: var(--accent) !important;
  background: rgba(200, 169, 110, 0.08) !important;
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.18) !important;
}

.pref-active-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0;
}

.pref-active-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: #1E293B;
  transition: color 0.15s ease, font-weight 0.15s ease;
}

.pref-active-card.selected .pref-active-name {
  font-weight: 600;
  color: var(--primary-dark);
}

.pref-active-chk {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.pref-active-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(15, 74, 70, 0.06);
  padding: 2px 7px;
  border-radius: 6px;
  margin-bottom: 0.4rem;
  width: fit-content;
}

.pref-active-card.selected .pref-active-tag {
  background: rgba(200, 169, 110, 0.2);
  color: #8c6a28;
}

.pref-active-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.active-other-container {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: #FAFAFA;
  transition: all 0.2s ease;
}

.active-other-container.active {
  border-style: solid;
  border-color: var(--accent);
  background: rgba(200, 169, 110, 0.04);
}

.active-other-chk-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-dark);
  user-select: none;
}

.active-other-chk-label input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

/* ========================================================
   PANTALLA DE PROCESAMIENTO Y ANÁLISIS CLÍNICO (ESTILO PURESKINCARE)
   ======================================================== */
.processing-screen {
  text-align: center;
  padding: 48px 24px 44px;
}

.processing-orbit {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
}

.processing-core {
  position: absolute;
  inset: 18px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #15625c 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  animation: pulse-core 2s ease-in-out infinite;
  box-shadow: 0 6px 24px rgba(15, 74, 70, 0.28);
}

@keyframes pulse-core {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(200, 169, 110, 0.45);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 16px rgba(200, 169, 110, 0);
  }
}

.processing-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  border-right-color: var(--accent);
  animation: spin 1.4s linear infinite;
}

.processing-ring-2 {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: var(--accent);
  border-left-color: rgba(15, 74, 70, 0.65);
  animation: spin 2.2s linear infinite reverse;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.processing-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.processing-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 34px;
  line-height: 1.45;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.processing-steps {
  list-style: none;
  max-width: 440px;
  margin: 0 auto;
  padding: 0;
  text-align: left;
}

.proc-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
  color: #94a3b8;
  transition: all 0.35s ease;
}

.proc-step:last-child {
  border-bottom: none;
}

.proc-step.active {
  color: var(--primary-dark);
  font-weight: 600;
}

.proc-step.done {
  color: #059669;
  font-weight: 500;
}

.proc-step-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.proc-step.active .proc-step-icon {
  background: rgba(15, 74, 70, 0.08);
  color: var(--primary);
  border: 1.5px solid var(--accent);
  animation: bounce-icon 0.7s ease infinite alternate;
}

.proc-step.done .proc-step-icon {
  background: #d1fae5;
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

@keyframes bounce-icon {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}

.proc-step-bar {
  height: 4px;
  background: #f1f5f9;
  border-radius: 99px;
  margin-top: 28px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.proc-step-fill {
  height: 100%;
  width: 15%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 99px;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}


