/* A Kybos quote on paper (js/quote-view.mjs): the layout of Kybos's Bloom quotes, on A4. Always black on white, in
   day and night mode alike, because it is a document. Used by Office's live preview (scaled to fit) and by
   quote-print.html (printed or saved as PDF). */
.qp { width: 794px; min-height: 1123px; box-sizing: border-box; padding: 34px 48px 40px; background: #fff; color: #111; position: relative;
  font: 11.2px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; text-align: left; }
.qp *, .qp *::before, .qp *::after { box-sizing: border-box; }
.qp p { margin: 0 0 6px; }
.qp p:last-child { margin-bottom: 0; }
.qp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.qp-logo { height: 52px; width: auto; margin-top: 6px; }
.qp-meta { text-align: right; line-height: 1.55; font-weight: 600; }
.qp-num { font-size: 20px; font-weight: 700; line-height: 1.25; }
.qp-parties { display: flex; gap: 24px; margin-top: 28px; }
.qp-parties > div { flex: 1; line-height: 1.55; min-width: 0; overflow-wrap: anywhere; }
.qp-lab { font-weight: 600; margin-bottom: 7px; }
.qp-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.qp-job { margin-top: 18px; font-size: 12px; }
.qp-amount { font-size: 20px; font-weight: 700; margin: 20px 0 12px; }
.qp-lines { width: 100%; border-collapse: collapse; }
.qp-lines th { text-align: left; font-weight: 600; padding: 9px 0; border-bottom: 1.8px solid #111; }
.qp-lines td { vertical-align: top; padding: 9px 0; border-bottom: .8px solid #cfcfcf; }
.qp-lines .qp-r { text-align: right; }
.qp-item { width: 58%; padding-right: 28px !important; overflow-wrap: anywhere; }
.qp-t { font-weight: 600; margin-bottom: 5px; }
.qp-qty { width: 13%; } .qp-tax { width: 12%; } .qp-amt { width: 17%; font-weight: 600; white-space: nowrap; }
.qp-sub { font-size: 10px; color: #333; margin-top: 8px; font-weight: 400; }
.qp-u { font-size: 10px; color: #333; }
.qp-was { color: #777; text-decoration: line-through; font-weight: 400; margin-right: 6px; }
.qp-empty { color: #777; text-align: center; padding: 24px 0 !important; }
.qp-accepted { margin: 0 0 18px; padding: 9px 12px; border: 1.4px solid #23854f; border-radius: 6px; color: #1a6a3e; font-weight: 600; overflow-wrap: anywhere; }
.qp-bottom { display: flex; gap: 28px; margin-top: 14px; break-inside: avoid; }
.qp-memo { flex: 1.25; padding-right: 28px; overflow-wrap: anywhere; }
.qp-totals { flex: 1; }
.qp-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.qp-row span:last-child { white-space: nowrap; text-align: right; }
.qp-row.qp-line { border-bottom: .8px solid #cfcfcf; padding-bottom: 7px; }
.qp-due { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; border-top: 1.8px solid #111; padding-top: 8px; }
.qp-due b { font-size: 20px; }
.qp-pay { margin-top: 18px; break-inside: avoid; }
.qp-box { border: .9px solid #333; border-radius: 5px; padding: 14px 20px; display: grid; grid-template-columns: 110px 1fr 120px 1fr; gap: 9px 12px; }
.qp-box span:nth-child(odd) { color: #333; }
.qp-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 8px; border-top: .8px solid #cfcfcf; font-size: 9.5px; color: #333; }
.qp-terms { margin-top: 30px; font-size: 10px; color: #222; break-before: page; overflow-wrap: anywhere; }

/* The print page (quote-print.html) */
body.qp-page { margin: 0; background: #e9e4dd; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
.qp-bar { position: sticky; top: 0; z-index: 2; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 12px 16px;
  background: rgba(255, 252, 247, .92); border-bottom: 1px solid rgba(70, 50, 30, .12); }
.qp-bar button, .qp-bar a { font: 600 15px/1 inherit; padding: 12px 18px; border-radius: 22px; border: 1px solid rgba(70, 50, 30, .2); background: #fff; color: #221c17; text-decoration: none; cursor: pointer; }
.qp-bar button.dark { background: #221c17; color: #fff; border-color: #221c17; }
.qp-bar .note { flex-basis: 100%; text-align: center; font-size: 13px; color: #6b5d50; }
#paper { display: flex; justify-content: center; padding: 24px 16px 60px; overflow-x: auto; }
#paper .qp { box-shadow: 0 10px 40px rgba(52, 34, 18, .18); }
.qp-msg { padding: 40px 16px; text-align: center; color: #6b5d50; }
@media (max-width: 830px) { #paper { justify-content: flex-start; } }
@page { size: A4; margin: 12mm 12mm 14mm; }
@media print {
  body.qp-page { background: #fff; }
  .qp-bar { display: none; }
  #paper { padding: 0; display: block; overflow: visible; }
  #paper .qp { box-shadow: none; width: auto; min-height: 0; padding: 0; }
}

/* ---------- The client's quote page (quote.html) ---------- */
body.qc { background: #f3eee7; color: #221c17; }
.qc-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right)); background: rgba(255, 252, 247, .94); border-bottom: 1px solid rgba(70, 50, 30, .12); }
.qc-logo { height: 34px; width: auto; }
.qc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1.1 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  padding: 12px 18px; border-radius: 22px; border: 1px solid rgba(70, 50, 30, .22); background: #fff; color: #221c17; text-decoration: none; cursor: pointer; }
.qc-btn.dark { background: #221c17; border-color: #221c17; color: #fff; }
.qc-btn.big { width: 100%; padding: 16px 18px; font-size: 16.5px; border-radius: 26px; }
.qc-btn[disabled] { opacity: .55; cursor: wait; }
#qc { max-width: 860px; margin: 0 auto; padding: 18px 16px 70px; display: grid; gap: 16px; }
.qc-card { background: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 8px 30px rgba(52, 34, 18, .1); }
.qc-card h1 { font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
.qc-card h2 { font-size: 21px; margin: 0 0 6px; }
.qc-card p { margin: 0 0 8px; line-height: 1.5; }
.qc-kicker { color: #8a7a6a; font-weight: 600; font-size: 14px; }
.qc-total { font-size: 30px; font-weight: 750; letter-spacing: -.01em; margin: 6px 0 4px !important; }
.qc-total span { font-size: 15px; font-weight: 500; color: #6b5d50; }
.qc-meta { color: #6b5d50; }
.qc-summary .qc-btn { margin-top: 8px; }
.qc-done { display: flex; gap: 16px; align-items: flex-start; border: 2px solid #23854f; }
.qc-tick { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #23854f; color: #fff; font-size: 24px; font-weight: 700; }
.qc-note h1 { font-size: 21px; }
.qc-contact { color: #6b5d50; }
.qc-contact a { color: #7a4410; }
.qc-small { font-size: 13.5px; color: #6b5d50; }
.qc-accept form { display: grid; gap: 14px; margin-top: 12px; }
.qc-field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.qc-field em { font-weight: 400; font-style: normal; color: #8a7a6a; }
.qc-field input { font: inherit; font-weight: 500; font-size: 16px; padding: 13px 14px; border-radius: 12px; border: 1px solid rgba(70, 50, 30, .25); background: #fffdfa; color: #221c17; }
.qc-field input:focus { outline: none; border-color: #d98f3c; box-shadow: 0 0 0 3px rgba(217, 143, 60, .22); }
.qc-field input[aria-invalid] { border-color: #9b2f1d; }
.qc-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; line-height: 1.45; cursor: pointer; }
.qc-check input { width: 22px; height: 22px; margin-top: 1px; accent-color: #221c17; flex: none; }
.qc-err { color: #9b2f1d; font-weight: 600; margin: 0 !important; }
.qp-responsive { display: flex; justify-content: center; overflow-x: auto; }
.qp-responsive .qp { box-shadow: 0 8px 30px rgba(52, 34, 18, .1); border-radius: 6px; }
/* On a phone the paper reflows to the screen instead of shrinking an A4 page to unreadable size (screens only: a
   printed or saved PDF keeps the A4 layout, though an A4 page is narrower than 830 px). */
@media screen and (max-width: 830px) {
  .qp-responsive .qp { width: 100%; min-height: 0; padding: 20px 16px 24px; font-size: 14px; }
  .qp-responsive .qp-top { flex-direction: column; gap: 12px; }
  .qp-responsive .qp-meta { text-align: left; }
  .qp-responsive .qp-parties, .qp-responsive .qp-bottom { flex-direction: column; gap: 14px; }
  .qp-responsive .qp-memo { padding-right: 0; }
  .qp-responsive .qp-lines thead { display: none; }
  .qp-responsive .qp-lines tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; border-bottom: .8px solid #cfcfcf; padding: 10px 0; }
  .qp-responsive .qp-lines td { border: 0; padding: 0 !important; width: auto; }
  .qp-responsive .qp-item { grid-column: 1 / -1; margin-bottom: 6px; }
  .qp-responsive .qp-qty::before { content: "Qty "; color: #6b5d50; }
  .qp-responsive .qp-tax { grid-column: 1; }
  .qp-responsive .qp-tax::before { content: "GST "; color: #6b5d50; }
  .qp-responsive .qp-amt { grid-column: 2; grid-row: 2 / span 2; align-self: end; }
  .qp-responsive .qp-sub { display: inline; margin: 0 0 0 6px; }
  .qp-responsive .qp-box { grid-template-columns: 1fr 1fr; padding: 12px; }
  .qp-responsive .qp-foot { flex-direction: column; gap: 4px; }
  .qc-card { padding: 18px; }
  .qc-card h1 { font-size: 21px; }
}
@media print {
  body.qc { background: #fff; }
  .qc-bar, .qc-summary, .qc-accept, .qc-btn, .qc-note .qc-contact { display: none !important; }
  #qc { display: block; padding: 0; max-width: none; }
  .qc-card { box-shadow: none; padding: 0 0 12px; border: 0; }
  .qc-done { border: 1.5px solid #23854f; padding: 10px; margin-bottom: 12px; }
  .qp-responsive { display: block; }
  .qp-responsive .qp { box-shadow: none; width: auto; min-height: 0; padding: 0; }
}
.qc-accept { scroll-margin-top: 80px; }
.qc-btn[hidden] { display: none; }
.qp-due-on { font-size: 13px; font-weight: 500; color: #333; }
.qp-paid { display: inline-block; margin-left: 10px; padding: 2px 10px; border: 2px solid #23854f; border-radius: 6px; color: #23854f; font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; vertical-align: 3px; }

/* ---------- The client's pay page (pay.html, js/pay.js) ---------- */
.qc-card h3 { font-size: 17px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.pay-ways { display: grid; gap: 18px; }
.pay-ways h2 { margin: 0; }
.pay-way { border: 1px solid rgba(70, 50, 30, .14); border-radius: 14px; padding: 16px; background: #fffdfa; }
.pay-free { font-size: 12.5px; font-weight: 700; color: #23854f; border: 1.5px solid #23854f; border-radius: 999px; padding: 2px 9px; }
.pay-bank { display: grid; gap: 2px; margin-bottom: 10px; }
.pay-row { display: grid; grid-template-columns: 9.5em 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(70, 50, 30, .08); }
.pay-row span { color: #6b5d50; }
.pay-row b { font-variant-numeric: tabular-nums; word-break: break-all; }
.qc-btn.small { padding: 6px 12px; font-size: 13.5px; border-radius: 14px; }
.pay-online .qc-btn.big { margin: 6px 0 8px; }
.pay-test { display: inline-block; font-size: 13.5px; font-weight: 700; color: #7a4410; background: #fbecd6; border-radius: 8px; padding: 4px 10px; }
.pay-wait { border: 2px solid #d98f3c; }
.pay-failed { border: 2px solid #9b2f1d; }
.pay-late { color: #9b2f1d; }
@media screen and (max-width: 520px) {
  .pay-row { grid-template-columns: 1fr auto; }
  .pay-row span { grid-column: 1 / -1; font-size: 13.5px; }
}
@media print {
  .pay-ways, .pay-wait, .pay-failed { display: none !important; }
}
.qp-online a { color: inherit; }
