/* Print documents (phiếu thu, sổ, biên bản). Black-on-white, Times; independent of the screen theme. */
/* ---------- Mẫu in ---------- */
.print-mode [data-native-topbar], .print-mode [data-native-sidebar] { display: none; }
.print-mode .layout { grid-template-columns: minmax(0, 1fr); }
.print-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; position: sticky; top: 0; background: var(--bg); padding: 6px 0; z-index: 2; }
.input-inline { width: auto; }
.paper { display: grid; gap: 16px; justify-items: center; }
.doc { background: #fff; color: #000; width: min(100%, 210mm); padding: 10mm 12mm; box-shadow: 0 1px 4px rgba(0,0,0,.18); font: 13px/1.45 "Times New Roman", Times, serif; }
.doc-voucher { width: min(100%, 210mm); }
.doc-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.doc-company { font-size: 12px; }
.doc-company strong { font-size: 13px; text-transform: uppercase; }
.doc-form { text-align: center; font-size: 11px; max-width: 45%; }
.doc-title-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; margin: 6px 0; }
.doc-title { text-align: center; font-size: 20px; margin: 4px 0 0; letter-spacing: .5px; }
.doc-date, .doc-lien, .doc-period { text-align: center; margin: 0; font-style: italic; }
.doc-numbers { font-size: 12px; min-width: 150px; }
.doc-meta { text-align: center; font-size: 11px; margin: 2px 0 8px; }
.doc-body { margin: 6px 0; }
.doc-field { display: grid; grid-template-columns: 170px 1fr; gap: 4px; }
.doc-value { border-bottom: 1px dotted #777; min-height: 1.4em; }
.doc-words { font-style: italic; }
.doc-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px; }
.doc-table th, .doc-table td { border: 1px solid #333; padding: 2px 5px; vertical-align: top; }
.doc-table th { background: #f0f0f0; text-align: center; }
.doc-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-table tfoot td { font-weight: bold; }
.doc-table tr.opening td { font-style: italic; }
.doc-table-compact { font-size: 11px; }
.doc-sign { margin-top: 10px; page-break-inside: avoid; }
.doc-sign-date { text-align: right; font-style: italic; margin: 0 0 4px; }
.doc-sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 4px; }
.doc-sign-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.doc-sign-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.doc-col-codes th { font-weight: normal; font-style: italic; }
.doc-table td.code { white-space: nowrap; }
@page a5 { size: A5 landscape; margin: 8mm 10mm; }
@page a4 { size: A4 portrait; margin: 10mm 12mm; }
.paper-a5 .doc { page: a5; }
.paper-a4 .doc { page: a4; }
.doc-sign-grid > div { display: grid; }
.doc-sign-grid em { font-size: 11px; }
.doc-sign-space { height: 48px; }
.doc-received { font-style: italic; margin: 6px 0; }
.doc-warn { color: #a00; font-weight: bold; text-align: center; }
.doc-foot { margin-top: 10px; border-top: 1px solid #ccc; padding-top: 4px; font-size: 10px; color: #555; }
@media print {
  .print-toolbar, .no-print { display: none !important; }
  .content { padding: 0 !important; }
  .paper { display: block; }
  .doc { box-shadow: none; width: auto; padding: 0; }
  .page-break { break-before: page; }
  .doc-table thead { display: table-header-group; }
  .doc-table tr { break-inside: avoid; }
}
/* A5 phiếu thu fits one sheet per liên. */
.paper-a5 .doc-voucher { font-size: 12px; line-height: 1.3; }
.paper-a5 .doc-voucher .doc-sign-space { height: 34px; }
.paper-a5 .doc-voucher .doc-title { font-size: 18px; }
.paper-a5 .doc-voucher .doc-foot { margin-top: 4px; }
@media print { .paper-a5 .doc-voucher { break-inside: avoid; } }
