/* =====================================================================
   Me & You — Tech Solutions · Print
   Documents and reports (DAM, guia de recolhimento, relatórios).
   Screen chrome disappears; content becomes black-on-white A4.
   ===================================================================== */
@media print {
  :root {
    --bg: #fff; --bg-soft: #fff; --bg-tint: #fff;
    --ink: #000; --ink-soft: #1a1a1a; --ink-mute: #444;
    --rule: #999;
    --shadow-sm: none; --shadow: none; --shadow-lg: none;
  }
  body { background: #fff !important; color: #000; font-size: 11pt; }

  /* App chrome never prints */
  .nav, .footer, .toolbar, .pagination, .tabs, .btn, .skip-link,
  .modal-backdrop, .toast, .dropzone { display: none !important; }

  .card, .table-wrap, .file-row { box-shadow: none; border-color: #999; break-inside: avoid; }
  .card::before { display: none; }
  .table th { background: #eee !important; color: #000; }
  .table tbody tr:hover { background: none; }
  .table td, .table th { border-color: #999; }
  tr, .timeline li, .meta-list { break-inside: avoid; }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }

  a { color: #000; text-decoration: none; }
  .aviso { border: 1pt solid #000; background: #fff; }

  h1, h2, h3 { break-after: avoid; color: #000; }
}

/* ---- Printable document sheet (DAM / guia) — screen AND print ---------- */
.doc-sheet {
  background: #fff;
  color: #000;
  max-width: 210mm;
  margin-inline: auto;
  padding: 14mm;
  font-size: 10.5pt;
  border: 1px solid var(--rule);
}
.doc-sheet__head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 2.5px solid #000;
  margin-bottom: var(--sp-4);
}
.doc-sheet__org { font-weight: var(--fw-bold); font-size: 12pt; line-height: 1.25; }
.doc-sheet__org small { display: block; font-weight: var(--fw-normal); font-size: 8.5pt; color: #333; }
.doc-sheet__title {
  margin-left: auto;
  text-align: right;
  font-weight: var(--fw-extrabold);
  font-size: 13pt;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.doc-sheet__title small { display: block; font-weight: var(--fw-medium); font-size: 8.5pt; letter-spacing: 0; text-transform: none; color: #333; }
.doc-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.doc-cell {
  grid-column: span 3;
  border: 1px solid #000;
  padding: 4px 6px;
  min-height: 34px;
}
.doc-cell--4 { grid-column: span 4; }
.doc-cell--6 { grid-column: span 6; }
.doc-cell--12 { grid-column: span 12; }
.doc-cell dt { font-size: 6.5pt; text-transform: uppercase; letter-spacing: 0.05em; color: #333; margin: 0 0 1px; font-weight: var(--fw-semibold); }
.doc-cell dd { margin: 0; font-size: 10pt; font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.doc-cell--total dd { font-size: 13pt; font-weight: var(--fw-extrabold); }
.doc-sheet__barcode {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px dashed #000;
  font-family: var(--font-mono, monospace);
  font-size: 9.5pt;
  letter-spacing: 0.08em;
  word-break: break-all;
}

/* ---- DAM anatomy (matches the live Santaluz document) ------------------- */
.doc-status {
  margin-left: auto;
  align-self: start;
  border: 1.5px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 8.5pt;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  white-space: nowrap;
}
.doc-band {
  background: #1f3864;
  color: #fff;
  text-align: center;
  font-weight: var(--fw-bold);
  font-size: 11pt;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 8px;
  margin: 8px 0 10px;
}
.doc-section {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e8edf5;
  color: #1f3864;
  font-size: 8.5pt;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  margin: 10px 0 6px;
  border-left: 4px solid #1f3864;
}
.doc-cell--box { border: 1px solid #b9c2d0; border-radius: 4px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.doc-table th {
  background: #e8edf5;
  color: #333;
  font-size: 7.5pt;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 8px;
  border: 1px solid #b9c2d0;
  text-align: right;
}
.doc-table td {
  padding: 6px 8px;
  border: 1px solid #b9c2d0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.doc-total {
  background: #1f3864;
  color: #fff;
  font-weight: var(--fw-extrabold);
}
.doc-total td { border-color: #1f3864; font-size: 12pt; }
.doc-total .doc-total__label { font-size: 10pt; letter-spacing: 0.06em; text-transform: uppercase; }
.doc-due {
  border: 2px solid #1f3864;
  border-radius: 4px;
  text-align: center;
  padding: 10px;
}
.doc-due dt { font-size: 7.5pt; text-transform: uppercase; letter-spacing: 0.08em; color: #333; font-weight: var(--fw-bold); margin: 0 0 2px; }
.doc-due dd { margin: 0; font-size: 20pt; font-weight: var(--fw-extrabold); color: #1f3864; font-variant-numeric: tabular-nums; }
.doc-cut {
  border: none;
  border-top: 2px dashed #999;
  margin: 14px 0 0;
}
@media print {
  .doc-band, .doc-section, .doc-table th, .doc-total, .doc-total td { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

@media print {
  .doc-sheet { border: none; padding: 0; max-width: none; }
  @page { size: A4; margin: 14mm; }
}
