/**
 * Estilos canónicos para la Calculadora de regalos en eventos
 * Fijate Tools (2026)
 */

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

  /* Colores temáticos claros */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #6366f1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --color-primary: #4f46e5;
  --color-primary-light: #e0e7ff;
  --color-primary-hover: #4338ca;
  --color-success: #059669;
  --color-success-light: #d1fae5;
  --color-warning: #d97706;
  --color-warning-light: #fef3c7;
  --color-danger: #dc2626;
  --color-danger-light: #fee2e2;
  --color-info: #0284c7;
  --color-info-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.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-card: #131b2a;
  --bg-card-subtle: #1c2638;
  --border-color: #27354a;
  --border-focus: #818cf8;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --color-primary: #6366f1;
  --color-primary-light: rgba(99, 102, 241, 0.15);
  --color-primary-hover: #4f46e5;
  --color-success: #10b981;
  --color-success-light: rgba(16, 185, 129, 0.15);
  --color-warning: #f59e0b;
  --color-warning-light: rgba(245, 158, 11, 0.15);
  --color-danger: #ef4444;
  --color-danger-light: rgba(239, 68, 68, 0.15);
  --color-info: #38bdf8;
  --color-info-light: rgba(56, 189, 248, 0.15);

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

/* Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

.mono,
.kpi-num,
.code-inline,
.concept-text {
  font-family: var(--font-mono);
}

/* Layout de la herramienta */
.tool-layout {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  flex: 1;
}

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

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

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

/* Tarjeta principal contenedora */
.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
  .card-main {
    padding: 1.15rem;
  }
}

/* Encabezado descriptivo de la herramienta */
.tool-hero {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
  text-transform: none;
}

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

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
}

.hero-desc {
  font-size: 0.96rem;
  color: var(--text-secondary);
  max-width: 820px;
  line-height: 1.6;
}

/* Grid interactivo del calculador: Formulario + Resultados */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .calculator-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: start;
  }
}

/* Paneles del formulario */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group-block {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.form-block-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-block-title svg {
  color: var(--color-primary);
}

/* Toggle Tabs para selección de evento */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.35rem;
}

.segmented-option {
  position: relative;
  text-align: center;
}

.segmented-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.65rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.segmented-label svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.segmented-option input[type="radio"]:checked + .segmented-label {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Selector binario tipo Si/No y Pareja/Solo */
.binary-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.binary-option {
  position: relative;
}

.binary-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.binary-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  min-height: 42px;
  transition: all 0.15s ease;
}

.binary-option input[type="radio"]:checked + .binary-label {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

/* Campos de formulario estándar */
.field-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

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

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

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

/* Desplegables <select> con reglas estrictas */
.custom-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 40px 0 12px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  appearance: none;
  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%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-select:focus,
.custom-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.custom-select optgroup {
  font-weight: 700;
  color: var(--color-primary);
  background: var(--bg-card-subtle);
}

.custom-select option {
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Inputs de texto y numéricos */
.custom-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
}

.input-suffix-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.input-suffix-wrap input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.input-suffix-wrap input:focus {
  outline: none;
}

.input-suffix-wrap .suffix-tag {
  padding: 0 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card-subtle);
  height: 44px;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border-color);
}

/* Opciones de desplazamiento (3 botones tipo radio card) */
.travel-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

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

.travel-card-opt {
  position: relative;
}

.travel-card-opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.travel-card-label {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 70px;
  transition: all 0.15s ease;
}

.travel-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.travel-card-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.travel-card-opt input[type="radio"]:checked + .travel-card-label {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.travel-card-opt input[type="radio"]:checked + .travel-card-label .travel-card-title {
  color: var(--color-primary);
}

/* Checkbox personalizado */
.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  border-radius: 4px;
  cursor: pointer;
}

/* ==============================================================
   PANEL DE RESULTADOS (COCKPIT DERECHO O INFERIOR)
   ============================================================== */
.results-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 1rem;
}

.status-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  align-self: flex-start;
}

.status-attending {
  background: var(--color-success-light);
  color: var(--color-success);
}

.status-decline {
  background: var(--color-info-light);
  color: var(--color-info);
}

/* Tarjeta principal con las 3 cifras de la horquilla */
.horquilla-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-subtle) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

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

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

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

/* Tres columnas de KPIs */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.kpi-box.featured {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: scale(1.02);
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: none;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.kpi-box.featured .kpi-label {
  color: var(--color-primary);
}

.kpi-num {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

@media (min-width: 640px) {
  .kpi-num {
    font-size: 1.7rem;
  }
}

.kpi-box.featured .kpi-num {
  color: var(--color-primary);
}

.kpi-per-person {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

/* Desglose detallado del coste */
.breakdown-box {
  border-top: 1px dashed var(--border-color);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.breakdown-row strong {
  color: var(--text-primary);
}

.travel-note-alert {
  font-size: 0.78rem;
  color: var(--color-info);
  background: var(--color-info-light);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-top: 0.4rem;
}

/* ==============================================================
   TERMÓMETRO SOCIAL "¿QUÉ PASA SI DOY X EUROS?"
   ============================================================== */
.thermometer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.thermometer-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

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

.display-custom-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Slider de rango */
.custom-range-slider {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  outline: none;
  accent-color: var(--color-primary);
  cursor: pointer;
  margin-bottom: 1rem;
}

/* Barra visual semáforo */
.thermometer-track {
  width: 100%;
  height: 8px;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border-color);
}

.thermometer-fill {
  height: 100%;
  width: 50%;
  background: var(--color-success);
  transition: width 0.25s ease, background-color 0.25s ease;
}

.thermometer-badge-status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.thermometer-feedback-text {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Planificador de hucha / ahorro previo */
.savings-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

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

.savings-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.savings-val-kpi {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* Botones auxiliares */
.aux-buttons-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.btn-aux {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 42px;
  padding: 0 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-aux:hover {
  background: var(--bg-card-subtle);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Conceptos para Bizum y Transferencia */
.concepts-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.concepts-header {
  margin-bottom: 1rem;
}

.concepts-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

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

.concepts-inputs-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

@media (min-width: 540px) {
  .concepts-inputs-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.concept-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  transition: border-color 0.15s ease;
}

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

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

.concept-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: none;
}

.btn-copy-concept {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-concept:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.concept-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
  margin-bottom: 0.25rem;
}

.concept-tip {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ==============================================================
   ACORDEÓN SEO Y GUÍAS DE PROTOCOLO SOCIAL
   ============================================================== */
.info-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 1.5rem;
}

.guide-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

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

.guide-item-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.guide-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.guide-item-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Preguntas frecuentes (FAQ Accordion) */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

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

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-question:hover {
  color: var(--color-primary);
}

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

/* ==============================================================
   MODALES ACCESIBLES
   ============================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  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-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
  z-index: 10;
}

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

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

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

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

.modal-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-body strong {
  color: var(--text-primary);
}

.fiscal-alert-box {
  background: var(--color-warning-light);
  border-left: 4px solid var(--color-warning);
  padding: 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.84rem;
  color: var(--text-primary);
}

/* Toast de feedback */
.toast-feedback {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--text-primary);
  color: var(--bg-page);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}

.toast-feedback.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Botón de acción principal al 100 % en móvil */
.btn-primary-action {
  width: 100%;
  height: 46px;
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease, transform 0.1s ease;
  margin-top: 1rem;
}

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

.btn-primary-action:active {
  transform: scale(0.99);
}
