/**
 * Estilos canónicos para la Calculadora de Indemnización por Accidentes de Tráfico (Baremo Autos)
 * Cumple los estándares de fijate.com (Dark/Light mode, Responsive táctil, Formato A4 pericial)
 */

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

  /* Tema oscuro por defecto */
  --bg-body: #0b0f17;
  --bg-card: #131a26;
  --bg-card-subtle: #192233;
  --bg-card-hover: #1f2a3f;
  --bg-input: #0e1520;
  --border-color: #243247;
  --border-focus: #3b82f6;

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

  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-rgb: 37, 99, 235;

  --color-accent: #0ea5e9;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --bg-input: #ffffff;
  --border-color: #cbd5e1;
  --border-focus: #2563eb;

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

  --color-primary: #1d4ed8;
  --color-primary-hover: #1e40af;
  --color-primary-rgb: 29, 78, 216;

  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Reset y contención canónica */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  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;
}

/* Suite procesal interconectada */
.suite-nav-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  overflow-x: auto;
  white-space: nowrap;
}

.suite-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.suite-badge-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(var(--color-primary-rgb), 0.15);
  color: var(--color-accent);
}

.suite-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.suite-link:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

.suite-link.is-active {
  background: var(--bg-card-subtle);
  color: var(--color-accent);
  font-weight: 600;
}

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

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

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

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

/* Presets rápidos en chips */
.chips-preset-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
}

.chips-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.chip-preset-case {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-preset-case:hover {
  background: rgba(var(--color-primary-rgb), 0.2);
  border-color: var(--color-primary);
  color: var(--color-accent);
}

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

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

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

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.kpi-card.is-grand-total {
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.25) 0%, rgba(14, 165, 233, 0.15) 100%), var(--bg-card);
  border-color: var(--color-primary);
  grid-column: span 2;
}

@media (min-width: 768px) {
  .kpi-card.is-grand-total {
    grid-column: span 1;
  }
}

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

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

.kpi-card.is-grand-total .kpi-value {
  color: #38bdf8;
  font-size: 1.75rem;
}

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

/* Sistema de navegación por pestañas */
.tab-navigation-bar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.25rem;
  overflow-x: auto;
}

.tab-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-nav-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-subtle);
}

.tab-nav-btn.is-active {
  color: var(--color-accent);
  background: var(--bg-card);
  border-bottom: 3px solid var(--color-primary);
  margin-bottom: -2px;
}

.tab-content-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-content-pane.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tarjetas y secciones de formulario */
.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
}

/* Grids de formulario */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

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

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

/* Grupos y controles de formulario */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.form-label-xs {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-label-inline {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  height: 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 0 0.85rem;
  font-family: var(--font-main);
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
}

.form-control-sm {
  height: 36px;
  font-size: 0.85rem;
  padding: 0 0.65rem;
}

/* Desplegables <select> conforme a reglas canónicas */
.form-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: 42px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 0 40px 0 0.85rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  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='%2394a3b8' 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:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
}

.form-select-sm {
  height: 36px;
  font-size: 0.85rem;
  padding-right: 32px;
}

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

/* Wrappers de inputs flexbox proporcionales */
.input-with-suffix {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.input-with-suffix .form-control {
  border: none;
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  background: transparent;
}

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

/* Tarjetas de tipos de días */
.day-type-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.day-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.day-badge.very-grave { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.day-badge.grave { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.day-badge.moderado { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.day-badge.basico { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.day-rate {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Elementos de secuelas e intervenciones */
.secuela-item-card, .gasto-item-card, .intervencion-item-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.secuela-info {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.secuela-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.secuela-index {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
}

.secuela-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.secuela-points-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.secuela-pts-input {
  width: 70px !important;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Caja de Balthazard */
.balthazard-calc-box {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-top: 0.75rem;
}

.balthazard-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.balthazard-text {
  font-size: 0.85rem;
  color: var(--text-main);
}

.balthazard-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  margin: 0 0.3rem;
}

/* Columna de gastos */
.gasto-col-desc {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gasto-col-amount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 140px;
}

/* Botones de acción */
.btn-primary-action, .btn-secondary-action {
  height: 42px;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

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

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

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

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

.btn-icon-danger {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon-danger:hover {
  color: var(--color-danger);
  background: rgba(239, 68, 68, 0.1);
}

.btn-full-mobile {
  width: 100%;
}

@media (min-width: 640px) {
  .btn-full-mobile {
    width: auto;
  }
}

/* Conmutador switch */
.form-group-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.toggle-label {
  display: flex;
  flex-direction: column;
}

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

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

.switch-control {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .3s;
  border-radius: 34px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.switch-control input:checked + .slider-switch {
  background-color: var(--color-primary);
}

.switch-control input:checked + .slider-switch:before {
  transform: translateX(22px);
}

/* Tabla de desglose de liquidación */
.table-breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

.table-breakdown th, .table-breakdown td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.table-breakdown th {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
}

.table-breakdown td.val-cell {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

.table-breakdown tr.total-row td {
  font-weight: 700;
  font-size: 1rem;
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-card-subtle);
}

.table-breakdown tr.grand-total-row td {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-accent);
  background: rgba(var(--color-primary-rgb), 0.15);
  border-top: 2px solid var(--color-primary);
}

/* VISTA PREVIA Y FORMATO A4 IMPRIMIBLE */
.a4-preview-wrapper {
  background: #334155;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  display: flex;
  justify-content: center;
}

[data-theme="light"] .a4-preview-wrapper {
  background: #cbd5e1;
}

.a4-document-page {
  background: #ffffff;
  color: #1e293b;
  width: 100%;
  max-width: 820px;
  min-height: 1050px;
  padding: 40px 45px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-family: 'Inter', serif;
  font-size: 12.5px;
  line-height: 1.55;
  position: relative;
}

.a4-doc-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 14px;
  margin-bottom: 18px;
  text-align: center;
}

.a4-doc-badge {
  display: inline-block;
  background: #0f172a;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.a4-doc-main-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 4px;
}

.a4-doc-legal-basis {
  font-size: 10.5px;
  color: #475569;
  font-style: italic;
}

.a4-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  border: 1px solid #cbd5e1;
  font-size: 11px;
}

.a4-meta-table td {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
}

.a4-meta-table td.cell-label {
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
}

.a4-paragraph {
  margin-bottom: 12px;
  text-align: justify;
}

.a4-section-heading {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 16px 0 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.a4-table-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.a4-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.a4-text-sm {
  font-size: 11px;
  color: #475569;
  margin-bottom: 4px;
}

.report-list {
  padding-left: 20px;
  margin: 6px 0;
  font-size: 11.5px;
}

.report-list li {
  margin-bottom: 4px;
}

.a4-subtotal-row {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #cbd5e1;
  text-align: right;
  font-size: 11.5px;
}

.a4-total-summary-card {
  background: #0f172a;
  color: #ffffff;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 16px 0;
}

.a4-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.a4-grand-total {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: #38bdf8;
}

.a4-mora-line {
  font-size: 11px;
  color: #facc15;
  margin-top: 4px;
}

.a4-signature-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 35px;
  padding-top: 15px;
  text-align: center;
  font-size: 11px;
}

.a4-sign-line {
  width: 70%;
  margin: 40px auto 8px;
  border-bottom: 1px solid #64748b;
}

/* Modales canónicos */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  padding: 1rem;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

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

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

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

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

.modal-body {
  padding: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-main);
}

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

/* REGLAS ESTRICTAS DE IMPRESIÓN (@media print) */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* Ocultar elementos web no deseados en la impresión */
  .app-header,
  .suite-nav-bar,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .fijate-footer,
  .chips-preset-bar,
  .tab-navigation-bar,
  #pane-editor,
  #pane-expediente,
  .a4-preview-toolbar,
  .modal-overlay,
  .related-tools-section,
  .seo-guide-section {
    display: none !important;
  }

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

  .tool-with-sidebar {
    display: block !important;
  }

  .tool-main-content {
    display: block !important;
  }

  #pane-informe {
    display: block !important;
  }

  .a4-preview-wrapper {
    background: transparent !important;
    padding: 0 !important;
  }

  .a4-document-page {
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 0 !important;
    font-size: 11pt !important;
    color: #000000 !important;
  }

  .a4-doc-header, .a4-meta-table, .a4-table-card, .a4-total-summary-card {
    break-inside: avoid;
  }

  .a4-total-summary-card {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
  }

  .a4-grand-total {
    color: #000000 !important;
  }

  .a4-mora-line {
    color: #000000 !important;
  }

  @page {
    size: A4 portrait;
    margin: 15mm 15mm 15mm 15mm;
  }
}
