/**
 * Estilos canónicos para el Planificador de ahorro e inversión
 * Fijate Tools - Suite de Finanzas
 */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores temáticos */
  --emerald-primary: #10b981;
  --emerald-hover: #059669;
  --emerald-soft: rgba(16, 185, 129, 0.12);
  --teal-primary: #0d9488;
  --blue-accent: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.12);
  --amber-warning: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --red-danger: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.12);
  --purple-accent: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, 0.12);

  /* Tema Oscuro (por defecto) */
  --bg-page: #0b0f17;
  --bg-card: #131b26;
  --bg-card-subtle: #182232;
  --bg-input: #0e141e;
  --border-color: #212e42;
  --border-focus: #10b981;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-secondary: #cbd5e1;
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #059669;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-secondary: #334155;
  --shadow-card: 0 4px 18px -2px rgba(0, 0, 0, 0.06);
}

/* Base y tipografía */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.plan-hero-title,
.step-title,
.faq-section-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.mono {
  font-family: var(--font-mono);
}

/* Layout y Contención */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3.5rem;
  padding: 0 1rem;
  width: 100%;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1536px) {
  .tool-with-sidebar {
    grid-template-columns: 1fr 300px;
  }
}

.tool-main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}

/* Hero descriptivo */
.plan-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.plan-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.plan-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--emerald-soft);
  color: var(--emerald-primary);
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.plan-hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.plan-hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 900px;
  line-height: 1.6;
}

/* Stepper / Navegación por etapas */
.stepper-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.stepper-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-height: 42px;
}

.stepper-tab:hover {
  border-color: var(--emerald-primary);
  color: var(--text-main);
}

.stepper-tab.active {
  background: var(--emerald-soft);
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card-subtle);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.stepper-tab.active .step-num {
  background: var(--emerald-primary);
  color: #ffffff;
}

/* Secciones de cada paso */
.step-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.step-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--emerald-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.step-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   PASO 1: REGLA 50/30/20
   ============================================================ */
.budget-input-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.field-label-prominent {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.live-income-badge {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--emerald-primary);
}

.presets-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.presets-intro {
  font-size: 0.825rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-preset {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.825rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}

.btn-preset:hover {
  border-color: var(--emerald-primary);
  color: var(--text-main);
}

.btn-preset.active {
  background: var(--emerald-soft);
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
  font-weight: 600;
}

.slider-with-number {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.styled-range {
  flex: 1 1 200px;
  accent-color: var(--emerald-primary);
  cursor: pointer;
  height: 8px;
}

.input-money-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 0.6rem;
  padding: 0 0.85rem;
  transition: border-color 0.2s ease;
  min-height: 44px;
}

.input-money-wrapper:focus-within {
  border-color: var(--border-focus);
}

.styled-number-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  width: 110px;
  outline: none;
}

.input-suffix {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Cuadrícula tricolor 50/30/20 */
.rule-503020-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .rule-503020-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.rule-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rule-box:hover {
  transform: translateY(-2px);
}

.rule-box-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.rule-percent-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 0.4rem;
}

.badge-needs {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-wants {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-savings {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.rule-category-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.rule-amount-row {
  display: flex;
  flex-direction: column;
}

.rule-amount {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.rule-amount-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rule-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.825rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.rule-checklist li {
  position: relative;
  padding-left: 1.15rem;
}

.rule-checklist li::before {
  content: '•';
  position: absolute;
  left: 0.25rem;
  color: var(--text-muted);
  font-weight: bold;
}

/* Barra proporcional tricolor */
.budget-bar-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.budget-bar-track {
  height: 28px;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
}

.budget-bar-fill {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.5rem;
  transition: width 0.3s ease;
}

.fill-needs { background: #2563eb; }
.fill-wants { background: #d97706; }
.fill-savings { background: #059669; }

/* Feedback y semáforo */
.budget-feedback-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 0.75rem;
}

.feedback-icon {
  color: var(--emerald-primary);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.feedback-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.feedback-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   PASO 2: FONDO DE EMERGENCIA
   ============================================================ */
.emergency-workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .emergency-workspace-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.emergency-form-box,
.emergency-results-box {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.box-subheading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field-helper {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.styled-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: 44px;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 0.6rem;
  padding: 0 40px 0 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  appearance: none;
  background-image: url("data:svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.styled-select option {
  background: var(--bg-card);
  color: var(--text-main);
}

.emergency-kpi-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kpi-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-main-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--emerald-primary);
  line-height: 1;
}

.kpi-explanation {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.progress-bar-track {
  height: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #0d9488 100%);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.time-to-complete-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
}

.time-icon {
  color: var(--blue-accent);
  flex-shrink: 0;
}

.time-info {
  display: flex;
  flex-direction: column;
}

.time-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.time-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.emergency-rule-card {
  background: var(--bg-card-subtle);
  border: 1px dashed var(--emerald-primary);
  border-radius: 0.85rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rule-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-main);
}

.rule-card-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   PASO 3: TEST PERFIL INVERSOR
   ============================================================ */
.risk-test-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .risk-test-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.quiz-container-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quiz-question-group {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-q-num {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--blue-accent);
  text-transform: uppercase;
}

.quiz-q-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-option:hover {
  border-color: var(--emerald-primary);
}

.quiz-option input[type="radio"] {
  display: none;
}

.option-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  margin-top: 0.2rem;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}

.quiz-option input[type="radio"]:checked + .option-check {
  border-color: var(--emerald-primary);
  background: var(--emerald-primary);
  box-shadow: inset 0 0 0 3px var(--bg-card);
}

.option-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.option-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Tarjeta resultado perfil */
.profile-result-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: fit-content;
}

.profile-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.profile-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.profile-score-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  color: var(--text-secondary);
}

.profile-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--emerald-primary);
  line-height: 1.2;
}

.profile-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.asset-allocation-box {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
}

.alloc-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
}

.alloc-bar-track {
  height: 24px;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  background: var(--bg-input);
}

.alloc-bar-fill {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  transition: width 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fill-equity { background: #10b981; }
.fill-bonds { background: #3b82f6; }
.fill-cash { background: #64748b; }

.alloc-legend-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.825rem;
}

.alloc-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.dot-alloc {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.dot-equity { background: #10b981; }
.dot-bonds { background: #3b82f6; }
.dot-cash { background: #64748b; }

.alloc-labels {
  display: flex;
  flex-direction: column;
}

.alloc-labels strong {
  color: var(--text-main);
}

.alloc-labels span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.tax-tip-card {
  background: var(--blue-soft);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 0.65rem;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tax-tip-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #60a5fa;
}

.tax-tip-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============================================================
   PASO 4: COMISIONES BANCARIAS
   ============================================================ */
.fees-comparison-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fees-duel-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.duel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.duel-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.col-tag {
  font-size: 0.85rem;
  font-weight: 700;
}

.col-bank .col-tag { color: #f87171; }
.col-index .col-tag { color: #34d399; }

.col-fee {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
}

.col-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.duel-vs-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
}

.fees-table-responsive {
  width: 100%;
  overflow-x: auto;
}

.fees-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.fees-table th,
.fees-table td {
  padding: 0.75rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border-color);
}

.fees-table th:first-child,
.fees-table td:first-child {
  text-align: left;
}

.fees-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.fees-table td {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-weight: 600;
}

.th-loss,
.td-loss {
  color: #f87171 !important;
}

.fees-takeaway-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--red-soft);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.takeaway-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.takeaway-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.takeaway-text strong {
  font-size: 1rem;
  color: #f87171;
}

.takeaway-text span {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   PASO 5: HOJA DE RUTA & CTA
   ============================================================ */
.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.roadmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.roadmap-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--emerald-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.roadmap-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-action-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.6rem;
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 42px;
}

.btn-action-outline:hover {
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
}

.roadmap-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .roadmap-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .roadmap-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.summary-pill {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.summary-val {
  font-size: 1.35rem;
  font-weight: 800;
}

.color-savings { color: #10b981; }
.color-emerald { color: #059669; }
.color-blue { color: #3b82f6; }

.summary-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Mandamientos */
.roadmap-commandments {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.commandments-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

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

@media (min-width: 768px) {
  .commandments-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cmd-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.cmd-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--emerald-soft);
  color: var(--emerald-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cmd-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cmd-content strong {
  font-size: 0.9rem;
  color: var(--text-main);
}

.cmd-content p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Banner CTA hacia el Simulador de ahorros */
.roadmap-cta-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(13, 148, 136, 0.15) 100%);
  border: 1px solid var(--emerald-primary);
  border-radius: 1rem;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-banner-text {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cta-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--emerald-primary);
  text-transform: uppercase;
}

.cta-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.cta-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.btn-cta-simulate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.6rem;
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
  color: #ffffff;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
  min-height: 48px;
}

.btn-cta-simulate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  color: #ffffff;
}

/* ============================================================
   PREGUNTAS FRECUENTES (FAQ)
   ============================================================ */
.faq-accordion-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

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

.faq-question-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  min-height: 48px;
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.faq-question-btn[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: var(--emerald-primary);
}

.faq-answer-panel {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.6;
}

.faq-answer-panel[hidden] {
  display: none;
}

/* ============================================================
   MODAL DE CONFIRMACIÓN CANÓNICO
   ============================================================ */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.custom-modal-backdrop[hidden] {
  display: none;
}

.custom-modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.custom-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.custom-modal-body {
  padding: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.custom-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-color);
}

.btn-modal-cancel {
  padding: 0.6rem 1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  min-height: 40px;
}

.btn-modal-confirm {
  padding: 0.6rem 1.25rem;
  background: var(--red-danger);
  border: none;
  border-radius: 0.5rem;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  min-height: 40px;
}

/* ============================================================
   RESPONSIVE Y CONTROLES TÁCTILES MÓVILES
   ============================================================ */
@media (max-width: 640px) {
  .plan-hero {
    padding: 1.25rem;
  }
  .plan-hero-title {
    font-size: 1.4rem;
  }
  .step-section {
    padding: 1.25rem;
  }
  .budget-input-card {
    padding: 1rem;
  }
  .presets-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .btn-preset {
    width: 100%;
    text-align: center;
  }
  .slider-with-number {
    flex-direction: column;
    align-items: stretch;
  }
  .input-money-wrapper {
    width: 100%;
    justify-content: space-between;
  }
  .styled-number-input {
    flex: 1 1 0%;
    width: 0;
    min-width: 0;
  }
  .btn-cta-simulate {
    width: 100%;
  }
  .roadmap-card {
    padding: 1.25rem;
  }
}

/* ============================================================
   ESTILOS DE IMPRESIÓN (PDF / A4)
   ============================================================ */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-header,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .stepper-nav,
  .no-print,
  .faq-accordion-section,
  .fijate-footer {
    display: none !important;
  }
  .tool-layout {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  .step-section {
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  .roadmap-card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
}
