/* Canonical client-document stylesheet — the white-label letterhead/document look
   (quotes, invoices, statements). SELF-CONTAINED: declares its own --doc-* tokens and
   uses only those, so it renders identically whether linked in the portal or inlined
   into the PDF (Chromium set_content, no :root from a host app).

   SYNC: this file is the single source of truth. portal/app/document.css is a generated
   copy (scripts/sync_portal_css.py); tests/test_document_css_sync.py fails on drift.
   Edit THIS file, then run the sync script. */
:root {
  --doc-ink: #1c1c1c;
  --doc-muted: #555b62;
  --doc-line: #e0e0dd;      /* hairline */
  --doc-line2: #cfcfca;     /* stronger rule */
  --doc-mono: 'DM Mono', ui-monospace, Consolas, monospace;
  --doc-display: 'Syne', ui-sans-serif, system-ui, sans-serif;
  --doc-body: 'Schibsted Grotesk', ui-sans-serif, 'Segoe UI', system-ui, sans-serif;
}

.doc-sheet { font-family: var(--doc-body); color: var(--doc-ink); font-size: 13px; line-height: 1.5; }

.doc-letterhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--doc-ink); margin-bottom: 22px; }
.doc-logo { max-height: 72px; max-width: 260px; margin-bottom: 8px; display: block; }
.doc-brand { font-family: var(--doc-display); font-size: 19px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 6px; }
.doc-meta { font-size: 11.5px; color: var(--doc-muted); line-height: 1.6; }
.doc-number { text-align: right; font-family: var(--doc-mono); font-variant-numeric: tabular-nums; font-size: 10px; color: var(--doc-muted); letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; }
.doc-num-val { font-size: 14px; color: var(--doc-ink); letter-spacing: 0.08em; margin: 4px 0; }

.doc-title { text-align: center; padding: 16px 0; margin: 6px 0 24px; border-top: 1px solid var(--doc-ink); border-bottom: 1px solid var(--doc-ink); }
.doc-title h2 { font-family: var(--doc-display); font-size: 16px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; margin: 0; }
.doc-for { font-size: 11.5px; color: var(--doc-muted); margin-top: 5px; letter-spacing: 0.08em; }

.doc-bill-to { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.doc-h3 { font-family: var(--doc-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--doc-muted); font-weight: 500; margin: 0 0 6px; }
.doc-name { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.doc-line { font-size: 11.5px; color: var(--doc-muted); line-height: 1.6; }
.doc-right { text-align: right; }

.doc-panel { border: 1px solid var(--doc-line); border-radius: 8px; padding: 16px 18px; margin-bottom: 20px; page-break-inside: avoid; break-inside: avoid; }
.doc-h2 { font-family: var(--doc-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--doc-muted); margin: 0 0 10px; }

table.doc-table { width: 100%; border-collapse: collapse; }
table.doc-table th { font-family: var(--doc-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--doc-muted); text-align: left; border-bottom: 1px solid var(--doc-line2); padding: 6px 8px; }
table.doc-table td { padding: 7px 8px; border-bottom: 1px solid var(--doc-line); }
table.doc-table th.num, table.doc-table td.num { text-align: right; font-family: var(--doc-mono); font-variant-numeric: tabular-nums; }

.doc-totals { margin-top: 14px; text-align: right; font-size: 13px; font-family: var(--doc-mono); font-variant-numeric: tabular-nums; line-height: 1.8; }
.doc-total { font-weight: 700; font-size: 17px; margin-top: 2px; color: var(--doc-ink); }

.doc-terms { font-size: 12.5px; padding-left: 20px; margin: 0; }
.doc-terms li { margin-bottom: 4px; }
.doc-prewrap { font-size: 12.5px; white-space: pre-wrap; }
.doc-pay { font-size: 12.5px; line-height: 1.7; }
.doc-footer { margin-top: 30px; font-size: 11px; color: var(--doc-muted); text-align: center; }
