/* BAKERY COST — documents and labels.
   The page size comes from <style id="page-style"> (setPageStyle); the @media print rules in styles.css serve /report. */
.doc{background:white;max-width:1000px;margin:0 auto 40px;padding:40px;border:1px solid var(--line);border-radius:6px;color:#222;overflow-x:auto;font-size:13px;line-height:1.55}
.doc table{width:100%;min-width:0;border-collapse:collapse;font-size:12px;table-layout:auto}
.doc td,.doc th{padding:6px 8px;text-align:left;overflow-wrap:break-word;border-bottom:1px solid #eee}
.doc .doc-lines td:first-child,.doc .doc-lines th:first-child{min-width:8ch;overflow-wrap:break-word;hyphens:auto}
.doc-meta>div,.doc-totals strong{white-space:nowrap}
.share-preview{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.6 var(--sans);background:var(--surface-estimate);color:var(--ink);padding:12px;border-radius:6px}
@media screen and (max-width:700px){.doc{padding:16px 12px;margin:0 8px 24px}.doc-header{flex-direction:column}.doc-meta{text-align:left;align-items:flex-start}}
.doc thead{display:table-header-group}
.doc tr,.doc .totals,.doc .doc-header{break-inside:avoid}
.doc-header{display:flex;justify-content:space-between;gap:20px;margin-bottom:24px}
.doc-header img{max-height:60px;width:auto;height:auto;max-width:240px;object-fit:contain}
.label-sheet{position:relative;break-after:page;background:white;margin:0 auto 20px;box-shadow:0 2px 12px #30201018}
.label{position:absolute;padding:3mm;overflow:hidden;font-size:9pt;line-height:1.25;box-sizing:border-box;overflow-wrap:anywhere}
.label.overflow{outline:2px solid var(--terra)}
.label-preview{border:1px dashed var(--line);border-radius:4px;padding:3mm;max-width:100mm;font-size:9pt;line-height:1.25;background:white;overflow-wrap:anywhere}
.label-preview p,.label p{margin:0 0 1mm;color:#222}
.label strong.allergen,.label-preview strong.allergen{font-weight:700;text-transform:uppercase}
/* Documents (quote, invoice, price list, production, shopping): a calm business-letter layout. */
.doc-header>div{font-size:12px;line-height:1.6;color:#444}
.doc-header>div:first-child>strong{display:block;font-size:16px;color:#222;margin:6px 0 4px}
.doc-meta{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.doc-page h2{font:450 28px/1.15 var(--serif);letter-spacing:-.02em;color:#222;margin:0 0 8px}
.doc-page h3{font:600 11px/1.4 var(--sans);letter-spacing:1.2px;text-transform:uppercase;color:#5f564d;margin:24px 0 8px}
.doc-customer{margin:0 0 22px;font-size:13px;line-height:1.6;color:#222}
.doc-customer h3{margin-top:0}
.doc th{font-weight:600;color:#4a4239;background:#f6f3ee;border-bottom:1px solid #ddd}
.doc .doc-lines td:not(:first-child),.doc .doc-lines th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.doc .totals,.doc-totals{margin:18px 0 0 auto;max-width:340px;font-size:13px;font-variant-numeric:tabular-nums;color:#222;break-inside:avoid}
.doc .totals>div:last-child{border-top-color:#ccc}
.doc-page>section{margin-top:24px}
.doc-page>section p{margin:0;color:#333;white-space:pre-line}
.doc-page>footer{margin-top:28px;padding-top:12px;border-top:1px solid #eee;font-size:11px;color:#5f564d}
.doc .group-row th{background:transparent;font:600 10px/1.4 var(--sans);letter-spacing:1px;text-transform:uppercase;color:#5f564d;padding:16px 8px 4px;border-bottom:1px solid #ddd}
.doc .shopping-total{display:flex;justify-content:flex-end;margin:12px 0 0;font-size:13px;color:#222}
.doc .quiet{color:#5f564d}
/* Narrow phones: headers and the unit price may wrap so the amount column stays inside the page. */
@media screen and (max-width:480px){
  .doc .doc-lines td,.doc .doc-lines th{padding:6px 4px}
  .doc .doc-lines th:not(:first-child),.doc .doc-lines td:nth-child(3){white-space:normal}
}
@media print{
  .print-controls,.toast,.skip-link,dialog,.no-print{display:none!important}
  :root{color-scheme:light}
  .print-page .empty-state .button,.print-page .empty-state .text-button{display:none}
  .table-wrap.reflow{overflow:visible}
  body{background:white}
  .doc{border:0;border-radius:0;margin:0;padding:0;max-width:none;overflow:visible}
  .label-sheet{box-shadow:none;margin:0}
  .label.overflow{outline:0}
}
