/* The quotation document (preview, view and print page). */
.quote-doc { font-family: Georgia, "Times New Roman", serif; color: #1C2333; font-size: 13.5px; line-height: 1.5; max-width: 800px; margin: 0 auto; position: relative; box-sizing: border-box }
:where(.quote-doc h1, .quote-doc h2, .quote-doc dl, .quote-doc dd, .quote-doc dt) { margin: 0 }
.qd-provisional { background: #FBF0DA; color: #7a5a12; font-family: -apple-system, "Segoe UI", sans-serif; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 6px; margin-bottom: 14px }
.qd-status { position: absolute; top: 0; right: 0; border: 2px solid currentColor; color: #6B7385; padding: 2px 10px; font-family: -apple-system, "Segoe UI", sans-serif; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; transform: rotate(4deg) }
.qd-status-rejected, .qd-status-cancelled { color: #B0413E }
.qd-provisional + .qd-status { top: 44px }
.qd-head { display: flex; gap: 16px; align-items: center; border-bottom: 3px solid #0F1E3D; padding-bottom: 14px; margin-bottom: 18px }
.qd-logo { width: 58px; height: 58px; border-radius: 10px; background: #0F1E3D; color: #D4B26A; display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; overflow: hidden; overflow-wrap: anywhere; text-align: center; line-height: 1 }
.qd-firm { overflow-wrap: anywhere } .qd-firm-name { font-size: 20px; font-weight: 700; color: #0F1E3D }
.qd-title-label { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: #8a6d33; margin-bottom: 10px; font-weight: 700 }
.qd-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px }
.qd-meta dt { font-size: 11px; color: #6B7385; font-family: -apple-system, "Segoe UI", sans-serif } .qd-meta dd { overflow-wrap: anywhere; font-weight: 600 }
.qd-to { margin-bottom: 16px; overflow-wrap: anywhere } .qd-label { font-size: 11px; color: #6B7385; font-family: -apple-system, "Segoe UI", sans-serif } .qd-client { font-weight: 700 }
.qd-title { font-size: 17px; color: #0F1E3D; margin: 6px 0 12px; overflow-wrap: anywhere }
.qd-items { width: 100%; border-collapse: collapse }
.qd-items th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #6B7385; border-bottom: 2px solid #0F1E3D; padding: 7px 8px; background: none; font-family: -apple-system, "Segoe UI", sans-serif }
.qd-items td { padding: 8px; border-bottom: 1px solid #E4E0D6; vertical-align: top; overflow-wrap: anywhere }
.qd-items .qd-n { width: 34px; color: #6B7385 } .qd-items .qd-fee { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 130px }
.qd-items tfoot th, .qd-items tfoot td { border-top: 2px solid #0F1E3D; border-bottom: none; font-size: 15px; color: #0F1E3D; padding-top: 10px }
.qd-items tfoot th { text-align: right; text-transform: none; font-family: Georgia, serif; letter-spacing: 0 } .qd-total { font-weight: 800 }

/* Invoice / receipt / voucher extras */
.qd-notes { margin-top: 16px; overflow-wrap: anywhere }
.qd-discount td, .qd-discount th { color: #9a3412 }
.qd-pay { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; border: 1px solid #e5e1d6; border-radius: 8px; padding: 12px 14px; break-inside: avoid }
.qd-bank { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 4px 0 6px }
.qd-bank div { display: contents } .qd-bank dt { color: #6b7280 } .qd-bank dd { margin: 0; font-weight: 600 }
.qd-qr { margin: 0; text-align: center; flex: none } .qd-qr img { display: block; width: 130px; height: 130px; object-fit: contain }
.qd-qr figcaption { font-size: 11px; color: #6b7280; margin-top: 4px }
.qd-small { margin-top: 18px; font-size: 11px; color: #6B7385; font-family: -apple-system, "Segoe UI", sans-serif }
.qd-items tbody th { text-align: left; width: 160px; font-size: 12px; color: #6B7385; text-transform: none; letter-spacing: 0; font-family: -apple-system, "Segoe UI", sans-serif; background: none; border-bottom: 1px solid #E4E0D6; padding: 8px }
.qd-sign { margin-top: 40px; grid-template-columns: 1fr 1fr } .qd-sign dd { border-top: 1px solid #1C2333; padding-top: 4px; margin-top: 34px !important; min-height: 1.5em }

/* Payslip */
.ps-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px }
.ps-net { display: flex; justify-content: space-between; align-items: baseline; border: 2px solid #0F1E3D; border-radius: 8px; padding: 10px 14px; margin: 16px 0; color: #0F1E3D }
.ps-net b { font-size: 20px }
.ps-employer { margin-top: 6px } .ps-official { font-size: 10px; color: #2E7D5B; font-family: -apple-system, "Segoe UI", sans-serif }
.page-break { break-after: page; height: 24px }
@media (max-width: 560px) { .ps-cols { grid-template-columns: 1fr } }

/* Standalone print page (/print/quotations/:id) */
.print-page { background: #F7F5F0; padding: 24px 16px; margin: 0 }
.print-page .quote-doc { background: #fff; padding: 40px; border: 1px solid #E4E0D6; border-radius: 10px }
.print-bar { max-width: 800px; margin: 0 auto 14px; text-align: right }
.print-bar button { background: #B8954A; color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-weight: 600; cursor: pointer; font-size: 14px }
@media (max-width: 560px) { .qd-meta { grid-template-columns: 1fr } .print-page .quote-doc { padding: 18px } }
@media print {
  .print-bar { display: none }
  .print-page { background: #fff; padding: 0 }
  .print-page .quote-doc { border: none; padding: 0; max-width: none }
  .qd-provisional { display: none }
}
.qd-logo-img { display: block; max-width: 140px; max-height: 72px; width: auto; height: auto; object-fit: contain; flex: none }
