/* =============================================================================
 * print.css — Document (invoice / statement / superbill) canvas + print rules.
 * The .doc canvas renders on screen (in a preview) and is the only thing that
 * prints. US Letter @ 96dpi ≈ 816px wide.
 * ========================================================================== */

.doc {
  width: 816px; max-width: 100%; margin: 0 auto; background: #fff; color: #0E1726;
  font-family: var(--font-ui); font-size: 13px; line-height: 1.5;
  padding: 56px 56px 48px;
}
.doc__band { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; padding-bottom: 24px; border-bottom: 2px solid var(--primary); }
.doc__brand { display: flex; gap: 14px; align-items: center; }
.doc__logo { width: 52px; height: 52px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-family: var(--font-heading); font-weight: 700; font-size: 22px; }
.doc__logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.doc__org-name { font-family: var(--font-heading); font-size: 20px; font-weight: 600; }
.doc__org-meta { font-size: 12px; color: #5B647A; margin-top: 2px; }
.doc__meta { text-align: right; }
.doc__doctype { font-family: var(--font-heading); font-size: 26px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--primary); }
.doc__num { font-size: 13px; color: #5B647A; margin-top: 4px; font-variant-numeric: tabular-nums; }
.doc__status { margin-top: 8px; }

.doc__parties { display: flex; justify-content: space-between; gap: 32px; margin: 28px 0; }
.doc__party-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #5B647A; font-weight: 700; margin-bottom: 5px; }
.doc__party-name { font-weight: 600; font-size: 14px; }
.doc__party-line { font-size: 12.5px; color: #2C3650; }
.doc__terms { text-align: right; }
.doc__terms dl { display: grid; grid-template-columns: auto auto; gap: 4px 18px; font-size: 12.5px; justify-content: end; }
.doc__terms dt { color: #5B647A; text-align: right; }
.doc__terms dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.doc__table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.doc__table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--primary); padding: 9px 12px; font-weight: 600; }
.doc__table th.right, .doc__table td.right { text-align: right; }
.doc__table td { padding: 11px 12px; border-bottom: 1px solid #E2E6EF; font-variant-numeric: tabular-nums; vertical-align: top; }
.doc__table .desc-main { font-weight: 600; }
.doc__table .desc-sub { font-size: 11.5px; color: #5B647A; }

.doc__totals { display: flex; justify-content: flex-end; margin-top: 18px; }
.doc__totals-inner { width: 300px; }
.doc__totals-row { display: flex; justify-content: space-between; padding: 6px 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.doc__totals-row--grand { border-top: 2px solid #0E1726; margin-top: 6px; padding-top: 11px; font-size: 17px; font-weight: 700; }
.doc__totals-row--paid { color: #15803D; }
.doc__totals-row--balance { background: var(--primary-soft); border-radius: 8px; font-weight: 700; font-size: 15px; margin-top: 6px; }

.doc__notes { margin-top: 32px; font-size: 12.5px; }
.doc__notes-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #5B647A; font-weight: 700; margin-bottom: 4px; }
.doc__footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid #E2E6EF; font-size: 11px; color: #5B647A; text-align: center; }
.doc__paid-stamp { position: absolute; }

/* statement / superbill table reuse .doc__table */
.doc__section-title { font-family: var(--font-heading); font-size: 15px; font-weight: 600; margin: 24px 0 8px; }

/* ------------------------------- printing -------------------------------- */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .toast-stack, .no-print, .scrim > .modal__header, .scrim > .modal__footer,
  .modal__header, .modal__footer { display: none !important; }
  .app, .app.is-collapsed { display: block; }
  .outlet { padding: 0; max-width: none; }
  .scrim { position: static; background: none; padding: 0; display: block; }
  .modal, .modal--wide { box-shadow: none; max-width: none; max-height: none; width: auto; border-radius: 0; }
  .modal__body { padding: 0; overflow: visible; }
  .doc { width: auto; padding: 0; box-shadow: none; }
  .doc__table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm; }
}
