/**
 * Hoja de estilos del Simulador del Complemento de Ayuda para la Infancia (CAPI)
 * Identidad visual Fijate Tools: Tipografías Inter, Outfit, JetBrains Mono.
 * Totalmente responsive, accesible y compatible con temas claro y oscuro.
 */

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

  /* Paleta cromática modo claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #0284c7;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-heading: #0f172a;

  /* Estados semáforo */
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;
  --success-accent: #10b981;

  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;
  --warning-accent: #f59e0b;

  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;
  --danger-accent: #ef4444;

  --primary-accent: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 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"], body.dark-theme {
  --bg-page: #0b0f17;
  --bg-card: #131b26;
  --bg-card-subtle: #1a2433;
  --border-color: #243042;
  --border-focus: #38bdf8;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-heading: #f8fafc;

  --success-bg: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.35);
  --success-text: #34d399;
  --success-accent: #10b981;

  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.35);
  --warning-text: #fbbf24;
  --warning-accent: #f59e0b;

  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.35);
  --danger-text: #f87171;
  --danger-accent: #ef4444;

  --primary-accent: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-light: rgba(56, 189, 248, 0.15);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
}

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

.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
}

.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 editorial de la herramienta */
.hero-intro-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-intro-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #10b981);
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary-accent);
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

.hero-desc {
  font-size: 0.975rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 860px;
}

/* Presets rápidos de demostración */
.presets-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
}

.presets-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}

.preset-chip-btn {
  appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 34px;
}

.preset-chip-btn:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  transform: translateY(-1px);
}

/* Tarjetas principales de la interfaz */
.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header-bar {
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.card-body-content {
  padding: 1.5rem;
}

/* Formularios y cuadrículas */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

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

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-help {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.input-text, .select-custom {
  appearance: none;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-main);
  font-size: 0.9375rem;
  padding: 0.625rem 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-main);
  min-height: 44px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-text:focus, .select-custom:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.select-custom {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

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

.input-prefix-wrapper input {
  padding-right: 4.5rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.input-suffix-tag {
  position: absolute;
  right: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

.input-help-text {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Conmutador de modo de ingresos (anual / mensual) */
.switch-mode-group {
  display: inline-flex;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.1875rem;
  gap: 0.1875rem;
}

.btn-mode-toggle {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mode-toggle.active {
  background: var(--bg-card);
  color: var(--primary-accent);
  box-shadow: var(--shadow-sm);
}

/* Switches y casillas personalizadas */
.custom-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.625rem;
  cursor: pointer;
}

.custom-checkbox-row input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 0.375rem;
  background: var(--bg-card);
  cursor: pointer;
  display: grid;
  place-content: center;
  margin-top: 0.125rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.custom-checkbox-row input[type="checkbox"]:checked {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
}

.custom-checkbox-row input[type="checkbox"]:checked::before {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

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

.checkbox-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Fila de menores interactiva */
.children-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.children-count-pill {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary-accent);
  background: var(--primary-light);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
}

.children-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.child-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.125rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  gap: 1rem;
  transition: border-color 0.2s ease;
}

.child-row-card:hover {
  border-color: var(--border-focus);
}

.child-row-info {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex: 1 1 0%;
  min-width: 0;
}

.child-avatar-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: var(--primary-light);
  color: var(--primary-accent);
  display: grid;
  place-content: center;
  flex-shrink: 0;
}

.child-inputs-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 0%;
  min-width: 0;
}

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

.input-child-name {
  max-width: 200px;
}

.age-picker-wrapper {
  flex: 1 1 0%;
}

.child-row-rate {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-shrink: 0;
}

.child-rate-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.child-rate-badge.badge-rate-active {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.child-rate-badge.badge-rate-active .rate-amount {
  color: var(--success-text);
}

.rate-amount {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
}

.rate-period {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-remove-child {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 0.375rem;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-remove-child:hover {
  background: var(--danger-bg);
  color: var(--danger-accent);
}

.btn-add-child-action {
  appearance: none;
  width: 100%;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  color: var(--primary-accent);
  padding: 0.75rem;
  border-radius: 0.75rem;
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  transition: all 0.2s ease;
}

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

/* Tarjeta héroe de veredicto y semáforo */
.verdict-hero-card {
  border-radius: 1rem;
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  border: 1px solid transparent;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
}

.verdict-hero-card.verdict-positive {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.verdict-hero-card.verdict-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.verdict-hero-card.verdict-negative {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.verdict-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.verdict-badge {
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3125rem 0.875rem;
  border-radius: 9999px;
}

.badge-success {
  background: var(--success-accent);
  color: #ffffff;
}

.badge-warning {
  background: var(--warning-accent);
  color: #ffffff;
}

.badge-danger {
  background: var(--danger-accent);
  color: #ffffff;
}

.verdict-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  color: var(--text-heading);
}

.verdict-message {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  color: var(--text-main);
  max-width: 860px;
}

/* Cuadrícula de KPIs monetarios */
.kpi-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.kpi-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.kpi-label-text {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.kpi-value-figure {
  font-family: var(--font-mono);
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--primary-accent);
  line-height: 1.1;
  margin-bottom: 0.375rem;
}

.kpi-subtext-note {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Desglose por menor */
.breakdown-child-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.breakdown-child-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.breakdown-name-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breakdown-child-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
}

.breakdown-child-age-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.breakdown-stage-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.breakdown-future-notice {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--primary-accent);
  font-weight: 500;
  margin-top: 0.125rem;
}

.breakdown-child-figure {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.breakdown-monthly-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-heading);
}

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

/* Barras de progreso de holgura */
.limits-progress-box {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.progress-group-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

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

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

.margin-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.375rem;
}

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

.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.fill-success {
  background: linear-gradient(90deg, #10b981, #059669);
}

.fill-warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.fill-danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.progress-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* Asistente telemático y checklist */
.telematic-guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.guide-step-card {
  padding: 1.25rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
}

.step-card-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}

.step-number-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-accent);
  color: #ffffff;
  display: grid;
  place-content: center;
  font-size: 0.8125rem;
  font-weight: 800;
}

.step-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
}

.step-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.btn-external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.5rem 0.875rem;
  background: var(--primary-accent);
  color: #ffffff;
  border-radius: 0.5rem;
  text-decoration: none;
  min-height: 40px;
  transition: all 0.2s ease;
}

.btn-external-link:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Checklist de documentos */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.checklist-doc-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.625rem;
  padding: 0.75rem 1rem;
  transition: all 0.15s ease;
}

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

.checklist-doc-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin: 0;
}

.checklist-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 0.375rem;
  background: var(--bg-card);
  cursor: pointer;
  display: grid;
  place-content: center;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.checklist-checkbox:checked {
  background: var(--success-accent);
  border-color: var(--success-accent);
}

.checklist-checkbox:checked::before {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checklist-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.125rem;
}

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

.badge-mandatory {
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--danger-accent);
  background: var(--danger-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.badge-optional {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card-subtle);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.checklist-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Botones de acción inferior */
.action-buttons-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn-action-primary, .btn-action-secondary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.625rem 1.125rem;
  border-radius: 0.5rem;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.15s ease;
}

.btn-action-primary {
  background: var(--primary-accent);
  color: #ffffff;
  border: none;
}

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

.btn-action-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-action-secondary:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

/* Modal accesible corporativo */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 23, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.custom-modal-overlay.active {
  display: flex;
}

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

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

.custom-modal-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
}

.custom-modal-close {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 0.375rem;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-modal-close:hover {
  background: var(--bg-card-subtle);
  color: var(--text-heading);
}

.custom-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--text-main);
  scrollbar-width: thin;
}

.modal-explanatory-text p {
  margin: 0 0 0.875rem;
}

.modal-explanatory-text ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.modal-explanatory-text li {
  margin-bottom: 0.5rem;
}

.report-textarea {
  width: 100%;
  height: 240px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.75rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-main);
  resize: vertical;
}

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

/* Responsividad mobile-first */
@media (max-width: 900px) {
  .form-grid-3, .kpi-grid-3, .guide-steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tool-layout {
    margin: 1rem auto 2rem;
    padding: 0 0.75rem;
  }

  .hero-headline {
    font-size: 1.35rem;
  }

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

  .child-row-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .child-row-rate {
    justify-content: space-between;
  }

  .action-buttons-bar {
    flex-direction: column;
  }

  .action-buttons-bar button {
    width: 100%;
  }
}

/* Estilos de impresión */
@media print {
  .app-header, .fijate-footer, .tool-ad-sidebar, .tools-ad-banner-section,
  .presets-bar, .action-buttons-bar, .btn-add-child-action, .btn-remove-child {
    display: none !important;
  }

  body, .tool-layout, .tool-main-content, .card-main {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .verdict-hero-card {
    border: 1px solid #000000 !important;
    background: #ffffff !important;
  }
}

