/**
 * Fijate Tools - El viciómetro: calculadora del coste de tus vicios y microgastos
 * Hoja de estilos con arquitectura responsive, modo claro/oscuro y componentes táctiles
 */

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

  /* Colores base para tema claro */
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-secondary: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --border-color: #e2e8f0;
  --border-focus: #10b981;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Acentos de choque financiero */
  --accent-emerald: #10b981;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --accent-sky: #0284c7;
  --accent-amber: #f59e0b;
  --accent-amber-subtle: rgba(245, 158, 11, 0.12);
  --accent-coral: #ef4444;
  --accent-coral-subtle: rgba(239, 68, 68, 0.12);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --bg-primary: #0b0f17;
  --bg-card: #131b2e;
  --bg-card-secondary: #1a243b;
  --bg-card-hover: #22304e;
  --border-color: #243049;
  --border-focus: #10b981;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --accent-emerald-subtle: rgba(16, 185, 129, 0.18);
  --accent-amber-subtle: rgba(245, 158, 11, 0.18);
  --accent-coral-subtle: rgba(239, 68, 68, 0.18);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.55);
}

/* Reset y estructura canónica */
*, *::before, *::after {
  box-sizing: border-box;
}

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

h1, h2, h3, h4, h5, h6,
.brand-title,
.hero-title,
.section-title {
  font-family: var(--font-heading);
}

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

/* Layout canónico Fijate con barra lateral de anuncios */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Hero Section y Panel de Choque */
.viciometro-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-header-area {
  margin-bottom: 1.5rem;
}

.hero-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-coral-subtle);
  color: var(--accent-coral);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.5;
}

/* Cuadrícula de KPIs clave */
.hero-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.kpi-card.kpi-danger {
  border-left: 4px solid var(--accent-coral);
}

.kpi-card.kpi-warning {
  border-left: 4px solid var(--accent-amber);
}

.kpi-card.kpi-work {
  border-left: 4px solid var(--accent-sky);
}

.kpi-card.kpi-percent {
  border-left: 4px solid #8b5cf6;
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.kpi-val {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.kpi-danger .kpi-val {
  color: var(--accent-coral);
}

.kpi-warning .kpi-val {
  color: var(--accent-amber);
}

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

/* Banner de Veredicto */
.veredicto-banner {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.veredicto-info {
  flex: 1 1 300px;
}

.veredicto-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.veredicto-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
}

.veredicto-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

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

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent-emerald);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary-action:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  padding: 0.75rem 1.15rem;
  min-height: 44px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-secondary-action:hover {
  background: var(--bg-card-hover);
}

/* Barra de Configuración de Finanzas (Salario, Interés) */
.config-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

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

.config-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-unit input,
.config-field select {
  width: 100%;
  height: 42px;
  padding: 0.5rem 2.2rem 0.5rem 0.85rem;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.config-field select {
  padding-right: 2.5rem;
  cursor: pointer;
}

.input-with-unit input:focus,
.config-field select:focus {
  border-color: var(--border-focus);
}

.input-with-unit .currency-badge {
  position: absolute;
  right: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
  pointer-events: none;
}

/* Rejilla de Vicios y Gastos Cotidianos */
.section-heading-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.section-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-small-action {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  min-height: 36px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-small-action:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

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

.vicio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vicio-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.vicio-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.vicio-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vicio-title-box {
  flex: 1 1 0%;
  min-width: 0;
}

.vicio-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  line-height: 1.3;
}

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

.vicio-monthly-badge {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  background: var(--bg-card-secondary);
  color: var(--text-secondary);
  white-space: nowrap;
}

.vicio-monthly-badge.active {
  background: var(--accent-coral-subtle);
  color: var(--accent-coral);
}

.vicio-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.4;
  flex: 1 0 auto;
}

.vicio-controls {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.control-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.control-val {
  font-weight: 700;
  color: var(--text-primary);
}

.stepper-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-stepper {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.btn-stepper:hover {
  background: var(--bg-card-hover);
}

.vicio-slider {
  flex: 1 1 0%;
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: var(--border-color);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.vicio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-emerald);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease;
}

.vicio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.vicio-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-emerald);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.control-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-color);
  padding-top: 0.65rem;
}

.price-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.price-input {
  width: 80px;
  height: 34px;
  padding: 0.25rem 1.4rem 0.25rem 0.5rem;
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  outline: none;
}

.price-input:focus {
  border-color: var(--border-focus);
}

.currency-unit {
  position: absolute;
  right: 0.45rem;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

/* Vicio personalizado */
.custom-vicio-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.custom-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 1.05rem;
}

.custom-toggle-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-emerald);
}

.custom-vicio-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Sección del Gráfico de Interés Compuesto */
.chart-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.chart-title-area h3 {
  font-size: 1.4rem;
  margin: 0 0 0.25rem;
}

.chart-title-area p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-dot.dot-compound {
  background: var(--accent-emerald);
}

.legend-dot.dot-saved {
  background: var(--accent-sky);
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  min-height: 280px;
  margin-bottom: 1.5rem;
}

#compound-chart {
  display: block;
  width: 100%;
  height: 320px;
  cursor: crosshair;
}

/* Tarjetas de Proyección de Horizontes */
.projections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.proj-card {
  background: var(--bg-card-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
}

.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.proj-years {
  font-weight: 700;
  font-size: 0.95rem;
}

.proj-badge {
  font-size: 0.75rem;
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
}

.proj-amount {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-emerald);
  margin-bottom: 0.65rem;
}

.proj-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.proj-row {
  display: flex;
  justify-content: space-between;
}

.proj-row.highlight {
  color: var(--accent-amber);
  font-weight: 700;
}

/* Sección de Top Drenajes y Fugas de Capital */
.drains-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.top-drains-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drain-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.drain-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
}

.drain-rank {
  font-weight: 800;
  color: var(--accent-coral);
  margin-right: 0.5rem;
}

.drain-name {
  font-weight: 700;
  flex: 1 1 0%;
}

.drain-pct {
  font-weight: 700;
  color: var(--text-muted);
}

.drain-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-card-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.drain-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-coral));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.drain-val {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

.empty-drain {
  color: var(--accent-emerald);
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

/* Sección de Equivalencias Tangibles */
.equivalencias-section {
  margin-bottom: 2rem;
}

.equiv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.equiv-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.equiv-card:hover {
  transform: translateY(-2px);
}

.equiv-card.achieved {
  border-color: var(--accent-emerald);
  background: linear-gradient(to bottom right, var(--bg-card), var(--accent-emerald-subtle));
}

.equiv-card.locked {
  opacity: 0.75;
}

.equiv-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.equiv-content {
  flex: 1 1 0%;
  min-width: 0;
}

.equiv-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.equiv-horizon {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.equiv-status-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.equiv-card.achieved .equiv-status-badge {
  background: var(--accent-emerald);
  color: #ffffff;
}

.equiv-card.locked .equiv-status-badge {
  background: var(--bg-card-secondary);
  color: var(--text-muted);
}

.equiv-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.equiv-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* Modales accesibles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
}

.btn-close-modal {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card-secondary);
  color: var(--text-primary);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-close-modal:hover {
  background: var(--bg-card-hover);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.canvas-preview-wrapper {
  max-width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

#diagnostic-card-canvas {
  max-width: 100%;
  height: auto;
  max-height: 55vh;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Modal de aviso simple */
.modal-notice-dialog {
  max-width: 440px;
  padding: 1.5rem;
}

.modal-notice-title {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.modal-notice-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* Acordeón de FAQs SEO */
.faqs-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card-secondary);
}

.faq-question {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

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

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-emerald);
  transition: transform 0.2s ease;
}

details[open] .faq-question::after {
  content: '−';
}

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

/* Responsive móvil */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.5rem;
  }
  .kpi-val {
    font-size: 1.5rem;
  }
  .vicios-grid {
    grid-template-columns: 1fr;
  }
  .equiv-grid {
    grid-template-columns: 1fr;
  }
  .modal-footer {
    justify-content: stretch;
  }
  .modal-footer button {
    width: 100%;
  }
  .veredicto-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .veredicto-actions {
    width: 100%;
  }
  .veredicto-actions button {
    width: 100%;
  }
}
