/* Impresión / "Guardar como PDF" — se imprime solo el contenido de la vista.
   Cualquier control que no tenga sentido en papel lleva la clase .no-print;
   el encabezado del PDF (logo, título, filtros) lleva .print-only. */

.print-only { display: none; }

@media print {
  /* Papel: se fuerzan los tokens claros, aunque el dashboard esté en oscuro. */
  :root,
  [data-theme="dark"] {
    color-scheme: light;
    --bg: #ffffff;
    --bg-soft: #f2f5f7;
    --bg-hover: #f2f5f7;
    --border: #d6dde3;
    --border-strong: #b4bec7;
    --text: #000000;
    --text-soft: #33393f;
    --text-muted: #5a626a;
  }

  @page { margin: 14mm; }

  .sidebar,
  .header,
  .menu-backdrop,
  .toast-container,
  .modal-overlay,
  .filters,
  .no-print { display: none !important; }

  .app-layout,
  .main-area {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .content {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .print-only { display: block !important; }

  body { background: #fff !important; }

  .block {
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 14px !important;
  }

  .table { font-size: 10px !important; }
  .table th,
  .table td { padding: 4px 6px !important; }

  /* Encabezado repetido en cada hoja y filas que no se parten al medio. */
  thead { display: table-header-group; }
  tr, .print-head { break-inside: avoid; }

  .print-head {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 2px solid var(--arrenda-teal);
    padding-bottom: 10px;
    margin-bottom: 14px;
  }

  .print-head img { height: 30px; }
  .print-head h1 { font-size: 16px; margin: 0 0 2px; }
  .print-head .print-meta { font-size: 10px; color: var(--text-soft); text-align: right; }
  .print-head .print-meta div { margin-top: 2px; }
}
