/* ==========================================================================
   Calculadora de Actualización de Alquiler IRAV y Zonas Tensionadas
   Fijate Tools - Estilos corporativos canónicos
   ========================================================================== */

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

  /* Colores base tema claro */
  --bg-app: #f4f6f9;
  --bg-card: #ffffff;
  --bg-card-alt: #f8fafc;
  --bg-card-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-glow: rgba(37, 99, 235, 0.15);

  --accent-teal: #0d9488;
  --accent-teal-light: #f0fdfa;

  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;

  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;

  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --info-bg: #eff6ff;
  --info-border: #bfdbfe;

  --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.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-app: #0b0f17;
  --bg-card: #131b26;
  --bg-card-alt: #182232;
  --bg-card-subtle: #1c283a;
  --border-color: #233247;
  --border-focus: #60a5fa;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.12);
  --primary-glow: rgba(59, 130, 246, 0.25);

  --accent-teal: #14b8a6;
  --accent-teal-light: rgba(20, 184, 166, 0.15);

  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --success-border: rgba(34, 197, 94, 0.3);

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.3);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.3);

  --info-bg: rgba(59, 130, 246, 0.12);
  --info-border: rgba(59, 130, 246, 0.25);

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

/* ==========================================================================
   Estructura general y contención
   ========================================================================== */

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  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,
.section-title,
.hero-title,
.faq-section-title {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--text-main);
}

.mono,
.kpi-value,
.code-preview,
.date-mono {
  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 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%;
}

.tool-ad-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: none;
}

@media (min-width: 1536px) {
  .tool-ad-sidebar {
    display: block;
  }
}

.ad-sticky-box {
  position: sticky;
  top: 90px;
}

/* ==========================================================================
   Hero y cabecera de contexto
   ========================================================================== */

.hero-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-alt) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.hero-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-glow);
}

.hero-badge-teal {
  background: var(--accent-teal-light);
  color: var(--accent-teal);
  border-color: rgba(13, 148, 136, 0.2);
}

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

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

/* ==========================================================================
   Contenedor de paneles y cuadrículas
   ========================================================================== */

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

@media (min-width: 992px) {
  .calc-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.card-badge-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-card-subtle);
  color: var(--text-muted);
}

/* ==========================================================================
   Formularios y controles (Reglas móviles estrictas)
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

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

.form-hint {
  font-size: 0.775rem;
  color: var(--text-subtle);
  font-weight: 400;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-alt);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.925rem;
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}

/* Select canónico obligatorio */
.form-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  padding-right: 40px;
  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%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;
}

.form-select option {
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 8px;
}

/* Wrappers flexbox con prefijos / sufijos */
.input-affix-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-alt);
  overflow: hidden;
  transition: var(--transition);
}

.input-affix-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}

.input-affix-group .form-input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.input-affix-group .form-input:focus {
  box-shadow: none;
}

.input-affix {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.85rem;
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  user-select: none;
  border-left: 1px solid var(--border-color);
}

.input-affix-prefix {
  border-left: none;
  border-right: 1px solid var(--border-color);
}

/* Chips y selectores de época rápida */
.quick-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.quick-chip-btn {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.quick-chip-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.quick-chip-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 600;
}

/* Grupos compactos de radio / toggle */
.toggle-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.toggle-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.segmented-control {
  display: flex;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  width: 100%;
}

.segmented-option {
  flex: 1 1 0%;
  min-width: 0;
  text-align: center;
}

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

.segmented-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segmented-option input[type="radio"]:checked + .segmented-label {
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Tarjeta de dictamen legal (Verdict card)
   ========================================================================== */

.verdict-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition);
}

.verdict-box.verdict-irav {
  border-left-color: var(--primary);
  background: linear-gradient(to right, var(--primary-light), var(--bg-card));
}

.verdict-box.verdict-ipc {
  border-left-color: var(--accent-teal);
  background: linear-gradient(to right, var(--accent-teal-light), var(--bg-card));
}

.verdict-box.verdict-frozen {
  border-left-color: var(--warning);
  background: linear-gradient(to right, var(--warning-bg), var(--bg-card));
}

.verdict-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.verdict-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.verdict-irav .verdict-tag {
  background: var(--primary);
  color: #ffffff;
}

.verdict-ipc .verdict-tag {
  background: var(--accent-teal);
  color: #ffffff;
}

.verdict-frozen .verdict-tag {
  background: var(--warning);
  color: #ffffff;
}

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

.verdict-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.verdict-sublaw {
  font-size: 0.775rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-style: italic;
}

/* Alertas de Zona Tensionada y Gran Tenedor */
.tense-zone-callout {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-main);
}

.tense-zone-icon {
  color: var(--warning);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   KPIs de resultados
   ========================================================================== */

.kpi-deck {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

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

.kpi-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kpi-card-highlight {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--primary-light) 100%);
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

.kpi-card-highlight .kpi-value {
  color: var(--primary);
}

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

/* Comparador de índices gráfico */
.comparison-banner {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comparison-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.comparison-bar-wrap {
  flex: 1 1 0%;
  height: 8px;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.comparison-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.bar-irav {
  background: var(--primary);
}

.bar-ipc {
  background: var(--accent-teal);
}

/* ==========================================================================
   Verificador del plazo de preaviso de 30 días
   ========================================================================== */

.preaviso-checker {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.notice-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge-warn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==========================================================================
   Generador de textos legales (WhatsApp y Burofax)
   ========================================================================== */

.generator-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 0.5rem;
  overflow-x: auto;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

.tab-pane.active {
  display: flex;
}

.doc-preview-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  max-height: 480px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-main);
}

.whatsapp-box {
  background: #0d1e18;
  color: #e2f7ed;
  border: 1px solid #1f4738;
  font-family: var(--font-main);
}

[data-theme="light"] .whatsapp-box {
  background: #f0fdf4;
  color: #14532d;
  border: 1px solid #bbf7d0;
}

/* Barra de botones de acción */
.action-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary-action:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-card-alt);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

.btn-whatsapp-action {
  background: #25d366;
  color: #ffffff;
}

.btn-whatsapp-action:hover {
  background: #1eb956;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* ==========================================================================
   Acordeones FAQ y guía SEO canónica
   ========================================================================== */

.faq-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.faq-title {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

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

.faq-item[open] {
  border-color: var(--border-focus);
}

.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  list-style: none;
  color: var(--text-main);
}

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

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

.faq-item[open] .faq-summary svg {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-content {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid transparent;
}

.faq-item[open] .faq-content {
  border-top-color: var(--border-color);
  padding-top: 1rem;
}

.faq-content p {
  margin-bottom: 0.75rem;
}

.faq-content p:last-child {
  margin-bottom: 0;
}

.faq-content ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Modales corporativos (Sustituto de window.alert)
   ========================================================================== */

.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

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

.custom-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: modalPopIn 0.2s ease-out;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.custom-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.custom-modal-icon.icon-success {
  background: var(--success-bg);
  color: var(--success);
}

.custom-modal-icon.icon-info {
  background: var(--info-bg);
  color: var(--primary);
}

.custom-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

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

.custom-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Modo Impresión (@media print)
   ========================================================================== */

@media print {
  /* Ocultar elementos irrelevantes de navegación y publicidad */
  .app-header,
  .fijate-footer,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .hero-box,
  .calc-grid,
  .tab-nav,
  .action-buttons-row,
  .faq-section,
  .custom-modal-backdrop {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }

  .tool-layout {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .generator-section {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tab-pane#tab-burofax {
    display: block !important;
  }

  .tab-pane#tab-whatsapp {
    display: none !important;
  }

  .doc-preview-box {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    color: #000000 !important;
    font-size: 11pt !important;
    font-family: 'Times New Roman', Times, serif !important;
    white-space: pre-wrap !important;
  }
}
