/* ==========================================================================
   CUOTITO — SISTEMA DE DISEÑO INSTITUCIONAL Y FINANCIERO
   Dirección de arte deliberada para administración de condominios en Ecuador
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Paleta cromática — Modo Oscuro Institucional (Default) */
  --bg-canvas: #090e17;
  --bg-surface: #101826;
  --bg-surface-elevated: #162235;
  --bg-surface-subtle: #1c2b42;
  --bg-card-highlight: #132034;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-prominent: rgba(255, 255, 255, 0.28);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090e17;

  /* Acentos de Dominio Contable & Financiero */
  --accent-emerald: #10b981;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --accent-emerald-border: rgba(16, 185, 129, 0.35);
  
  --accent-brass: #d97706;
  --accent-brass-subtle: rgba(217, 119, 6, 0.12);
  --accent-brass-border: rgba(217, 119, 6, 0.35);
  
  --accent-sky: #0284c7;
  --accent-sky-subtle: rgba(2, 132, 199, 0.12);
  
  --accent-danger: #ef4444;
  --accent-danger-subtle: rgba(239, 68, 68, 0.12);

  /* WhatsApp Official Brand Green for Canonical CTA */
  --wa-brand-color: #25d366;
  --wa-brand-hover: #1da851;
  --wa-brand-subtle: rgba(37, 211, 102, 0.12);

  /* Tipografía */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Espaciado & Contenedores */
  --container-max: 1200px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Sombras y Elevación */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 28px -6px rgba(0, 0, 0, 0.55);

  /* Transiciones */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-subtle: #e2e8f0;
  --bg-card-highlight: #f8fafc;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.15);
  --border-prominent: rgba(15, 23, 42, 0.26);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;

  --accent-emerald: #059669;
  --accent-emerald-subtle: rgba(5, 150, 105, 0.08);
  --accent-emerald-border: rgba(5, 150, 105, 0.28);

  --accent-brass: #b45309;
  --accent-brass-subtle: rgba(180, 83, 9, 0.08);
  --accent-brass-border: rgba(180, 83, 9, 0.28);

  --accent-sky: #0369a1;
  --accent-sky-subtle: rgba(3, 105, 161, 0.08);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px -6px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   RESET & TIPOGRAFÍA BASE
   ========================================================================== */

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  letter-spacing: -0.011em;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

/* Compensación de ancla con la cabecera fija */
section, [id] {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* Contenedores */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 768px) {
  .section-padding {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

/* Cabeceras de Sección con Rigor Tipográfico */
.section-header {
  margin-bottom: 3.5rem;
  max-width: 720px;
}

.section-header.text-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.section-badge--emerald {
  background-color: var(--accent-emerald-subtle);
  border-color: var(--accent-emerald-border);
  color: var(--accent-emerald);
}

.section-badge--brass {
  background-color: var(--accent-brass-subtle);
  border-color: var(--accent-brass-border);
  color: var(--accent-brass);
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 68ch;
}

.section-header.text-center .section-description {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   COMPONENTES UI & BOTONES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 0.8125rem 1.375rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-emerald);
  outline-offset: 2px;
}

.btn--primary {
  background-color: var(--text-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background-color: #e2e8f0;
  transform: translateY(-1px);
}

[data-theme="light"] .btn--primary:hover {
  background-color: #1e293b;
}

.btn--secondary {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

.btn--secondary:hover {
  background-color: var(--bg-surface-subtle);
  border-color: var(--border-prominent);
}

.btn--whatsapp {
  background-color: var(--wa-brand-color);
  color: #0b1c11;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
}

.btn--whatsapp:hover {
  background-color: var(--wa-brand-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn--emerald {
  background-color: var(--accent-emerald);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn--emerald:hover {
  background-color: #0d9668;
  transform: translateY(-1px);
}

.btn--sm {
  font-size: 0.8125rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
}

.btn--lg {
  font-size: 1.0625rem;
  padding: 1rem 1.75rem;
  border-radius: var(--radius-md);
}

.btn--block {
  width: 100%;
}

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
}

/* ==========================================================================
   HEADER & NAVEGACIÓN GLOBAL (#main-header)
   ========================================================================== */

#main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(9, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="light"] #main-header {
  background-color: rgba(248, 250, 252, 0.88);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.3125rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.brand-logo-picture {
  display: flex;
  align-items: center;
}

.brand-logo-img {
  width: 153px;
  height: 48px;
  max-height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.brand-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background-color: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--accent-emerald-border);
}

#primary-nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

#primary-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

#primary-nav a:hover {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

#theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  transition: all var(--transition-fast);
}

#theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

#mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
}

/* Mobile Drawer */
#mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: var(--bg-canvas);
  padding: 1.5rem;
  overflow-y: auto;
  border-top: 1px solid var(--border-subtle);
  z-index: 99;
}

#mobile-drawer.is-open {
  display: block;
}

#mobile-drawer ul {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

#mobile-drawer a {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  padding: 0.5rem 0;
}

@media (max-width: 992px) {
  #primary-nav {
    display: none;
  }
  #btn-header-demo {
    display: none;
  }
  #btn-header-login {
    display: none;
  }
  #mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 640px) {
  #btn-header-pilot {
    display: none;
  }
  #btn-header-login,
  #btn-header-register {
    display: none;
  }
  .brand-logo {
    font-size: 1.125rem;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   HERO SECTION (#hero)
   ========================================================================== */

#hero {
  position: relative;
  padding-top: 4.5rem;
  padding-bottom: 5.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 65%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge-wrap {
  margin-bottom: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-surface-elevated);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-title {
  font-size: clamp(2.25rem, 4.5vw, 3.625rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 58ch;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.75rem;
}

/* Métricas clave de rendimiento en Hero */
.hero-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

.hero-metric-item {
  display: flex;
  flex-direction: column;
}

.hero-metric-val {
  font-family: var(--font-mono);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-metric-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Hero Visual Layout con Escena 3D y Mascota Cuoti */
.hero-visual-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.hero-scene-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.hero-scene-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.hero-scene-picture {
  display: block;
  width: 100%;
}

.hero-scene-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 675;
  object-fit: cover;
  display: block;
}

.hero-mascot-badge {
  position: absolute;
  bottom: 0.875rem;
  right: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: rgba(9, 14, 23, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.85rem 0.3rem 0.35rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  z-index: 2;
}

.hero-mascot-picture {
  display: flex;
  align-items: center;
}

.hero-mascot-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.hero-mascot-speech {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.hero-mascot-name {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-mascot-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
}

/* Hero Mockup Visual (#hero-mockup) */
#hero-mockup {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.mockup-header-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.mockup-pill {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-subtle);
  border: 1px solid var(--accent-emerald-border);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.mockup-chat-preview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mockup-bubble {
  max-width: 88%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.45;
}

.mockup-bubble--out {
  align-self: flex-end;
  background-color: #1a4d33;
  color: #f1fdf5;
  border-bottom-right-radius: 2px;
}

[data-theme="light"] .mockup-bubble--out {
  background-color: #dcf8c6;
  color: #0d2818;
}

.mockup-bubble--in {
  align-self: flex-start;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: 2px;
}

.mockup-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  text-align: right;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ==========================================================================
   COMPATIBILIDAD BANCARIA (#bancos)
   Uso nominativo estricto sin logos oficiales según especificación
   ========================================================================== */

#bancos {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.banks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.bank-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.bank-card:hover {
  border-color: var(--border-prominent);
  transform: translateY(-2px);
}

.bank-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.bank-tag-neutral {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.bank-badge-status {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-subtle);
  border: 1px solid var(--accent-emerald-border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.bank-details-list {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bank-details-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bank-details-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
}

.banks-legal-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.25rem;
  line-height: 1.5;
}

/* ==========================================================================
   FLUJO EN 3 PASOS (#como-funciona)
   ========================================================================== */

#como-funciona {
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.step-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.step-visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.step-icon-picture {
  display: flex;
  align-items: center;
}

.step-icon-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

.step-icons-duo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.step-mascot-picture {
  display: flex;
  align-items: center;
}

.step-mascot-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.step-number-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-subtle);
  border: 1px solid var(--accent-emerald-border);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  align-self: flex-start;
  margin-bottom: 0;
}

.step-title {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.step-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.step-meta-code {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: var(--bg-surface-elevated);
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

@media (max-width: 880px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SIMULADOR INTERACTIVO WHATSAPP (#simulador)
   ========================================================================== */

#simulador {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.sim-container-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: flex-start;
}

.sim-controls-panel {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.sim-assistant-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.sim-mascot-picture {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sim-mascot-avatar {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
  transition: transform var(--transition-fast);
}

.sim-assistant-status {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sim-assistant-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sim-assistant-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-mono);
  transition: color var(--transition-fast);
}

.sim-assistant-badge.is-scanning {
  color: var(--accent-emerald);
  font-weight: 700;
}

.sim-assistant-badge.is-success {
  color: #00a884;
  font-weight: 700;
}

.sim-form-group {
  margin-bottom: 1.5rem;
}

.sim-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.sim-select, .sim-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.sim-select:focus, .sim-input:focus {
  outline: 2px solid var(--accent-emerald);
}

.sim-buttons-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

/* Panel de Métricas Operativas en Simulador */
.sim-metrics-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.sim-metrics-box-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.sim-metrics-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.sim-metric-val {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sim-metric-name {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Chat Mockup en Simulador */
.sim-phone-frame {
  background-color: #0b141b;
  border: 2px solid var(--border-prominent);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.sim-phone-header {
  background-color: #1f2c34;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sim-bot-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sim-bot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
}

.sim-bot-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e9edef;
}

.sim-bot-badge {
  font-size: 0.6875rem;
  color: #8696a0;
}

#wa-messages-area {
  min-height: 420px;
  max-height: 480px;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #0b141b;
  background-image: radial-gradient(#1f2c34 1px, transparent 1px);
  background-size: 18px 18px;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  animation: fadeInBubble 250ms ease-out;
}

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

.chat-bubble--resident {
  align-self: flex-end;
  background-color: #005c4b;
  color: #e9edef;
  border-top-right-radius: 2px;
}

.chat-bubble--bot {
  align-self: flex-start;
  background-color: #202c33;
  color: #e9edef;
  border-top-left-radius: 2px;
}

.receipt-card {
  background-color: #111b21;
  border: 1px solid #00a884;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #e9edef;
}

.receipt-header {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  color: #00a884;
  font-weight: 700;
}

.sim-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 920px) {
  .sim-container-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   DECRETO EJECUTIVO 462 (#decreto-462)
   ========================================================================== */

#decreto-462 {
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.decreto-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.decreto-mandates {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.decreto-visual-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.decreto-badge-picture {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.decreto-badge-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.decreto-mascot-picture {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.decreto-mascot-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.decreto-visual-text {
  display: flex;
  flex-direction: column;
}

.mandate-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
}

.mandate-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-brass-subtle);
  border: 1px solid var(--accent-brass-border);
  color: var(--accent-brass);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mandate-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.mandate-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Vista Previa Reporte D-462 */
.report-preview-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.report-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.report-doc-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.report-table-mock {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: 1.25rem;
}

.report-table-mock th {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-medium);
  color: var(--text-muted);
}

.report-table-mock td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.report-table-mock .status-exec {
  color: var(--accent-danger);
  font-weight: 700;
}

.report-table-mock .status-ok {
  color: var(--accent-emerald);
}

.report-actions {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 880px) {
  .decreto-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CALCULADORA INTERACTIVA DE AHORRO (#calculadora)
   ========================================================================== */

#calculadora {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.calc-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.calc-slider-section {
  margin-bottom: 2.5rem;
}

.calc-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
}

.calc-units-display {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.calc-slider-input {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-surface-subtle);
  outline: none;
  cursor: pointer;
  accent-color: var(--accent-emerald);
}

.calc-slider-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.calc-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.calc-result-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.calc-result-card--featured {
  border-color: var(--accent-emerald-border);
  background: radial-gradient(circle at 100% 0%, var(--accent-emerald-subtle) 0%, var(--bg-surface) 70%);
}

.calc-card-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.calc-card-val {
  font-family: var(--font-mono);
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.calc-card-val--emerald {
  color: var(--accent-emerald);
}

.calc-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

#min-rate-warning {
  display: none;
  font-size: 0.8125rem;
  color: var(--accent-brass);
  background-color: var(--accent-brass-subtle);
  border: 1px solid var(--accent-brass-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

#min-rate-warning.is-active {
  display: block;
}

@media (max-width: 880px) {
  .calc-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .calc-results-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PLANES Y PRECIOS TRANSPARENTES (#precios)
   ========================================================================== */

#precios {
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-cards-wrap {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  background-color: var(--bg-surface);
  border: 2px solid var(--accent-emerald-border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.pricing-ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-emerald);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.875rem;
  border-radius: var(--radius-full);
}

.pricing-plan-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.pricing-plan-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.75rem;
}

.pricing-rate-box {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.pricing-amount {
  font-family: var(--font-mono);
  font-size: 3.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.pricing-unit {
  font-size: 1rem;
  color: var(--text-muted);
}

.pricing-minimum-callout {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-subtle);
  border: 1px solid var(--accent-emerald-border);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.75rem;
  width: fit-content;
  margin: 0 auto 2rem auto;
}

.pricing-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 2.25rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.75rem;
}

.pricing-features-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.pricing-check-icon {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

/* ==========================================================================
   PROGRAMA PILOTO & FORMULARIO (#piloto)
   Integración con Cloudflare Turnstile anti-bot
   ========================================================================== */

#piloto {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.pilot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.pilot-perks {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pilot-perk-item {
  display: flex;
  gap: 1rem;
}

.pilot-perk-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-emerald-subtle);
  border: 1px solid var(--accent-emerald-border);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pilot-form-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: border-color var(--transition-fast);
}

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

.form-input::placeholder {
  color: var(--text-muted);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Contenedor del Widget Cloudflare Turnstile */
.turnstile-wrap {
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
  min-height: 65px;
}

#cf-turnstile-widget, #cf-turnstile-pilot {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Turnstile fallback simulado para entornos locales/testing */
.turnstile-mock-box {
  width: 100%;
  padding: 0.875rem 1rem;
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.turnstile-mock-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-emerald);
}

/* Tarjeta de Confirmación de Lead (#form-success) */
#form-success {
  display: none;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--accent-emerald-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  text-align: center;
}

#form-success.is-visible {
  display: block;
}

.form-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--accent-emerald-subtle);
  border: 1px solid var(--accent-emerald-border);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
}

.form-success-mascot-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
}

.form-success-mascot-picture {
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-success-mascot-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

@media (max-width: 920px) {
  .pilot-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PREGUNTAS FRECUENTES (#faq)
   ========================================================================== */

#faq {
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.faq-accordion {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-medium);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

.faq-arrow {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.faq-item.is-open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.faq-item.is-open .faq-answer {
  display: block;
}

/* ==========================================================================
   PIE DE PÁGINA INSTITUCIONAL & LEGAL (#site-footer)
   ========================================================================== */

#site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-brand-col p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 32ch;
  margin-top: 1rem;
}

.footer-brand-logo {
  margin-bottom: 0.75rem;
}

.footer-app-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.footer-app-badge {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.footer-app-3d-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.footer-app-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.35;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links-list a {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-links-list a:hover {
  color: var(--text-primary);
}

.footer-direct-channel {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Disclaimer Legal Permanente en Footer */
.footer-disclaimer-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.footer-disclaimer-box strong {
  color: var(--text-secondary);
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-legal-anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal-anchors a:hover {
  color: var(--text-primary);
}

@media (max-width: 880px) {
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MODALES LEGALES (#terminos, #privacidad, #legal-disclaimer)
   ========================================================================== */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(9, 14, 23, 0.8);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-elevated);
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.modal-body h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-card--auth {
  max-width: 480px;
  width: 100%;
}

.form-error-banner {
  padding: 0.75rem 1rem;
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  color: #f87171;
  font-size: 0.8125rem;
  line-height: 1.45;
  margin: 1rem 0;
}

[data-theme="light"] .form-error-banner {
  background-color: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.unverified-warning-box {
  padding: 1rem;
  background-color: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: var(--radius-md);
  margin: 1rem 0;
  text-align: left;
}

[data-theme="light"] .unverified-warning-box {
  background-color: #fef3c7;
  border-color: #fcd34d;
}

.demo-token-simulator-card {
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.btn-link {
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  transition: opacity var(--transition-fast);
}

.btn-link:hover {
  opacity: 0.85;
}

/* Accesibilidad y reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   OPTIMIZACIONES MÓVILES EXHAUSTIVAS (VIEWPORT <= 640PX)
   Garantiza 0 desbordamiento horizontal y excelente legibilidad
   ========================================================================== */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  .calc-box, .pilot-form-card, .report-preview-box, .sim-controls-panel {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
    max-width: 100%;
    box-sizing: border-box;
  }

  .pricing-card {
    padding: 2rem 1.25rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  .btn {
    white-space: normal;
  }

  .btn--lg {
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    width: 100%;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .hero-metrics-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .sim-phone-frame {
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .sim-buttons-row {
    flex-direction: column;
  }

  .sim-metrics-list {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .calc-slider-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .calc-results-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
  }

  .report-table-mock {
    min-width: 280px;
    font-size: 0.6875rem;
  }

  .report-actions {
    flex-direction: column;
  }

  .bank-card {
    padding: 1.25rem 1rem;
  }

  .mandate-card {
    flex-direction: column;
    padding: 1.25rem 1rem;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .wizard-progress-bar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .wizard-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .wizard-actions .btn {
    width: 100%;
  }

  .unit-tab-group {
    flex-direction: column;
  }
}

/* ==========================================================================
   ONBOARDING WIZARD STYLES (/onboarding)
   ========================================================================== */
.wizard-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
}

.wizard-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.wizard-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wizard-main {
  flex: 1;
  padding: 2.5rem 0 4rem 0;
}

.wizard-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 2rem;
  list-style: none;
  padding: 0;
}

.wizard-step-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.wizard-step-item.is-active {
  border-color: var(--accent-emerald);
  color: var(--text-primary);
  background-color: var(--accent-emerald-subtle);
}

.wizard-step-item.is-completed {
  border-color: var(--accent-emerald-border);
  color: var(--accent-emerald);
}

.wizard-step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: inherit;
}

.wizard-step-item.is-active .wizard-step-number {
  background-color: var(--accent-emerald);
  color: #ffffff;
}

.wizard-step-item.is-completed .wizard-step-number {
  background-color: var(--accent-emerald);
  color: #ffffff;
}

.wizard-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.wizard-card-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.wizard-card-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.wizard-card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.unit-tab-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background-color: var(--bg-surface-elevated);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.unit-tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.unit-tab-btn.is-active {
  background-color: var(--bg-surface);
  color: var(--accent-emerald);
  box-shadow: var(--shadow-sm);
}

.qr-scan-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  margin-bottom: 1.5rem;
}

.qr-code-svg-wrap {
  width: 180px;
  height: 180px;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.units-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.units-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.units-table th, .units-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.units-table th {
  background-color: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
}

.units-table tr:hover {
  background-color: var(--accent-emerald-subtle);
}

/* Dashboard Summary Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.dashboard-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.dashboard-card-val {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

