/* Impresión / "Guardar como PDF".
   Oculta el marco de la aplicación y deja solo el contenido de la vista,
   con un encabezado de marca. Usa tokens (sin colores literales). */
.printhead { display: none; }

@media print {
  @page { margin: 14mm 12mm; }

  /* Ocultar todo el marco de la app */
  .nav, .topbar, #btnImprimir, .toast-stack, .toasts, .notif-panel,
  .tour, .modal__backdrop, .menu, .drawer__backdrop { display: none !important; }

  html, body { background: #fff !important; }
  .app { display: block !important; }
  .main { margin: 0 !important; }
  .view { overflow: visible !important; height: auto !important; padding: 0 !important; }
  .view__inner { padding: 0 !important; max-width: none !important; }

  /* Encabezado impreso de marca */
  .printhead {
    display: block; margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 2px solid var(--brand);
  }
  .printhead__row { display: flex; justify-content: space-between; align-items: baseline; }
  .printhead__empresa { font-size: 15pt; font-weight: 800; color: var(--text-primary); }
  .printhead__soft { font-size: 9pt; color: var(--text-muted); }
  .printhead__vista { font-size: 12pt; font-weight: 700; margin-top: 4px; color: var(--brand-ink); }
  .printhead__meta { font-size: 8.5pt; color: var(--text-muted); }

  /* Evitar cortes feos */
  .card, .kpi, table, .chart { break-inside: avoid; page-break-inside: avoid; }
  .card { box-shadow: none !important; border: 1px solid var(--border) !important; }

  /* Colores fieles en impresión */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}
