/* A4 quote document. Sized in mm so print output matches the preview. */
.doc {
  --brand: #1f2a44;
  --ink: #1b2233;
  --muted: #5b6475;
  --rule: #dfe3ea;
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  padding: 16mm 15mm 14mm;
  background: #fff;
  color: var(--ink);
  font: 9.5pt/1.45 'Onest', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  position: relative;
  display: flex;
  flex-direction: column;
}
.doc *, .doc *::before, .doc *::after { box-sizing: border-box; }
.doc .muted { color: var(--muted); }
.doc-head { display: flex; justify-content: space-between; gap: 10mm; align-items: flex-start; }
.doc .logo { max-height: 18mm; max-width: 55mm; display: block; margin-bottom: 4mm; object-fit: contain; }
.doc .seller-name { font-size: 13pt; font-weight: 700; letter-spacing: -.01em; }
.doc .meta { color: var(--muted); font-size: 8.5pt; margin-top: 1.5mm; }
.doc .title-block { text-align: right; min-width: 55mm; }
.doc .doc-title { font-size: 20pt; font-weight: 700; color: var(--brand); letter-spacing: -.02em; line-height: 1.1; }
.doc dl { display: grid; grid-template-columns: auto auto; justify-content: end; gap: .6mm 4mm; margin: 3mm 0 0; font-size: 8.5pt; }
.doc dt { color: var(--muted); }
.doc dd { margin: 0; font-weight: 600; }
.doc .to { margin: 10mm 0 7mm; }
.doc .to .label { color: var(--muted); font-size: 8.5pt; }
.doc .client-name { font-size: 12pt; font-weight: 700; }
.doc .intro { margin: 4mm 0 0; max-width: 150mm; }
.doc table.items { width: 100%; border-collapse: collapse; }
.doc .items th { text-align: left; font-size: 8pt; font-weight: 600; color: var(--muted); padding: 2mm 2mm; border-bottom: 1.5px solid var(--ink); }
.doc .items td { padding: 2.4mm 2mm; border-bottom: 1px solid var(--rule); vertical-align: top; }
.doc .items .num { text-align: right; white-space: nowrap; }
.doc .items .n { width: 7mm; color: var(--muted); }
.doc .items .strong { font-weight: 600; }
.doc .items .desc .muted { font-size: 8.5pt; margin-top: .6mm; }
.doc .items .empty { text-align: center; color: var(--muted); padding: 8mm; }
.doc .items tr { break-inside: avoid; }
.doc .sum { display: flex; justify-content: space-between; gap: 8mm; margin-top: 5mm; align-items: flex-start; break-inside: avoid; }
.doc .words { font-size: 8.5pt; color: var(--muted); font-style: italic; max-width: 85mm; padding-top: 1.5mm; }
.doc .totals { min-width: 78mm; }
.doc .trow { display: flex; justify-content: space-between; gap: 6mm; padding: 1.2mm 0; }
.doc .trow.grand { border-top: 1.5px solid var(--ink); margin-top: 1mm; padding-top: 2mm; font-weight: 700; font-size: 11pt; }
.doc .trow.pay { background: color-mix(in srgb, var(--brand) 9%, #fff); margin-top: 1.5mm; padding: 2mm 2.5mm; font-weight: 700; color: var(--brand); border-radius: 1.5mm; }
.doc-foot { margin-top: auto; padding-top: 10mm; display: flex; justify-content: space-between; gap: 10mm; align-items: flex-end; break-inside: avoid; }
.doc .notes { font-size: 8.5pt; max-width: 110mm; }
.doc .notes h4 { margin: 3mm 0 .6mm; font-size: 8.5pt; }
.doc .notes p { margin: 0; color: var(--muted); }
.doc .sign { width: 55mm; text-align: center; position: relative; }
.doc .stamp { display: flex; justify-content: center; margin-bottom: -10mm; position: relative; z-index: 1; }
.doc .stamp svg { width: 38mm; height: 38mm; }
.doc .sign-line { border-top: 1px solid var(--ink); padding-top: 1.5mm; font-size: 8.5pt; margin-top: 12mm; }
.doc .brandmark { position: absolute; bottom: 6mm; left: 0; right: 0; text-align: center; font-size: 7pt; color: #9aa1ad; }

/* Kurumsal: solid brand band header, all-caps-free, strong table header */
.doc--kurumsal { padding-top: 0; }
.doc--kurumsal .doc-head { margin: 0 -15mm; padding: 12mm 15mm 9mm; background: var(--brand); color: #fff; }
.doc--kurumsal .doc-head .meta, .doc--kurumsal dt { color: color-mix(in srgb, #fff 72%, var(--brand)); }
.doc--kurumsal .doc-title { color: #fff; }
.doc--kurumsal .logo { background: #fff; padding: 1.5mm; border-radius: 1mm; }
.doc--kurumsal .items th { background: color-mix(in srgb, var(--brand) 8%, #fff); color: var(--brand); border-bottom: 0; }
.doc--kurumsal .items tbody tr:nth-child(even) td { background: #f7f8fa; }

/* Zarif: serif display, hairline brand rule */
.doc--zarif .seller-name, .doc--zarif .doc-title, .doc--zarif .client-name { font-family: 'Literata', Georgia, serif; font-weight: 600; }
.doc--zarif .doc-title { font-size: 24pt; font-weight: 500; }
.doc--zarif .doc-head { border-bottom: 2px solid var(--brand); padding-bottom: 6mm; }
.doc--zarif .items th { border-bottom-color: var(--brand); color: var(--brand); }
.doc--zarif .trow.grand { border-top-color: var(--brand); }

@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff !important; margin: 0; }
  .doc { box-shadow: none !important; transform: none !important; margin: 0 !important; min-height: 297mm; }
}
