/* Customer-facing estimate / invoice sheet (print view and customer portal), styled after the shop's Jobber invoices. */
.doc-sheet { --ink: #000; --muted: #555; --head: #545454; --band: #f2f2f2; --rule: #adadad;
  position: relative; background: #fff; color: var(--ink); max-width: 860px; margin: 0 auto; padding: 40px 48px 44px;
  border: 1px solid #e3e3e3; overflow: hidden; font: 14px/1.4 Helvetica, Arial, "Liberation Sans", sans-serif; }
.doc-head { display: flex; align-items: center; gap: 22px; margin-bottom: 30px; }
.doc-logo { width: 116px; height: 116px; border-radius: 50%; object-fit: cover; flex: none; }
.doc-shop-name { font-size: 28px; font-weight: 700; line-height: 1.15; }
.doc-shop-info { font-size: 14px; margin-top: 2px; }
.doc-top { display: grid; grid-template-columns: 1fr 370px; gap: 28px; align-items: start; margin-bottom: 34px; }
.doc-label { font-size: 11px; font-weight: 700; text-transform: uppercase; margin: 22px 0 10px; }
.doc-label-gap { margin-top: 18px; }
.doc-cust { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.doc-cust-sub { font-weight: 700; }
.doc-muted { color: var(--muted); font-size: 13px; }
.doc-box { background: var(--band); }
.doc-box-head { background: var(--head); color: #fff; font-size: 21px; font-weight: 700; padding: 11px 16px; }
.doc-box-row, .doc-box-total, .doc-box-foot { display: flex; justify-content: space-between; padding: 5px 16px; }
.doc-box-row:first-of-type { padding-top: 10px; }
.doc-box-total { background: var(--head); color: #fff; font-size: 19px; font-weight: 700; padding: 6px 16px; margin-top: 6px; }
.doc-box-foot { font-size: 12px; color: var(--muted); padding: 7px 16px; }
.doc-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.doc-details { font-size: 13px; margin-bottom: 8px; }
.doc-details p { margin: 2px 0; white-space: pre-wrap; }
.doc-items { width: 100%; border-collapse: collapse; margin-top: 6px; }
.doc-items th { background: var(--head); color: #fff; font-weight: 700; text-align: left; padding: 8px; border-right: 1px solid #fff; }
.doc-items th:last-child { border-right: none; }
.doc-items td { padding: 14px 8px 18px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.doc-items .doc-date td { color: #777; font-weight: 700; padding: 10px 8px 0; border-bottom: none; }
.doc-items .c-name { width: 28%; }
.doc-items .c-n { text-align: right; white-space: nowrap; width: 90px; }
.doc-items .c-qty { width: 46px; }
.doc-desc-inline { display: none; color: var(--muted); font-size: 12px; margin-top: 3px; }
.doc-items tbody tr:last-child td { border-bottom: 3px solid var(--rule); }
.doc-bottom { display: grid; grid-template-columns: 1fr 330px; gap: 34px; margin-top: 30px; align-items: start; }
.doc-note { font-size: 13px; }
.doc-note p { margin: 0 0 10px; white-space: pre-wrap; }
.doc-sum { width: 100%; border-collapse: collapse; }
.doc-sum td { padding: 7px 6px 7px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.doc-sum td:last-child { text-align: right; white-space: nowrap; }
.doc-sum tr:last-child td { border-bottom: none; }
.doc-sum .strong td { font-weight: 700; }
.doc-watermark { position: absolute; left: 50%; top: 520px; transform: translate(-50%, -50%) rotate(-40deg); font-size: 150px; letter-spacing: 4px;
  font-weight: 400; pointer-events: none; z-index: 2; white-space: nowrap; }
.doc-watermark.good { color: rgba(47, 158, 68, .38); }
.doc-watermark.bad { color: rgba(224, 49, 49, .32); }
.doc-sign { margin-top: 30px; display: flex; gap: 32px; align-items: flex-end; }
.doc-sign.blank div { flex: 1; font-size: 12px; color: var(--muted); }
.doc-sign.blank span { display: block; border-bottom: 1px solid #000; height: 46px; margin-bottom: 4px; }
.doc-sign.signed { border: 1px solid var(--rule); padding: 12px 16px; align-items: center; }
.doc-sign-img img { max-height: 70px; max-width: 260px; display: block; }
.doc-sign-meta { font-size: 13px; color: var(--muted); }
.doc-sign-meta b { color: var(--ink); }
@media (max-width: 680px) {
  .doc-sheet { padding: 22px 16px 28px; }
  .doc-head { gap: 14px; margin-bottom: 18px; }
  .doc-logo { width: 72px; height: 72px; }
  .doc-shop-name { font-size: 21px; }
  .doc-shop-info { font-size: 12px; }
  .doc-top, .doc-bottom { grid-template-columns: 1fr; gap: 18px; }
  .doc-label { margin-top: 4px; }
  .doc-items .c-desc { display: none; }
  .doc-desc-inline { display: block; }
  .doc-items .c-name { width: auto; }
  .doc-items .c-n { width: auto; }
  .doc-items th, .doc-items td { padding-left: 5px; padding-right: 5px; font-size: 13px; }
  .doc-watermark { font-size: 88px; top: 420px; }
}
@media print {
  .doc-sheet { border: none; max-width: none; padding: 0; }
  .doc-sheet, .doc-items th, .doc-box, .doc-box-head, .doc-box-total { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc-items tr { break-inside: avoid; }
  .doc-watermark { position: fixed; top: 50%; }
}
.doc-nw { white-space: nowrap; }
