/* Purchase order and quote maker. Loaded after demo.css, getpaid.css and calc.css. */
.pd-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1.5rem; align-items: start; padding-bottom: 2.5rem; }
.pd-form h2 { margin: 1.5rem 0 0.75rem; font-size: 1.125rem; }
.pd-form h2:first-of-type { margin-top: 0; }
.pd-form .cf { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.pd-form .cf input, .pd-row input { font-size: 1rem; }
.pd-form textarea { font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 0.55rem 0.7rem; width: 100%; resize: vertical; min-height: 4.6rem; }
.pd-form .pd-wide { grid-column: 1 / -1; }
.pd-row { display: grid; grid-template-columns: 6rem 8.5rem minmax(0, 1fr) auto; gap: 0.5rem 0.75rem; align-items: end; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); }
.pd-row:first-child { padding-top: 0; }
.pd-row label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.875rem; color: var(--muted); min-width: 0; }
.pd-row input { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 0.5rem 0.65rem; width: 100%; font-variant-numeric: tabular-nums; }
.pd-desc { grid-column: 1 / -1; }
.pd-amt { margin: 0 0 0.55rem; display: flex; gap: 0.5rem; align-items: baseline; justify-content: flex-end; font-size: 0.875rem; color: var(--muted); }
.pd-amt b { color: var(--ink); font-weight: 500; }
.pd-x { justify-self: end; margin-bottom: 0.2rem; padding: 0.35rem 0.7rem; font-size: 0.875rem; }
.pd-acts { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
#pd-msg { margin: 0.75rem 0 0; }
#pd-msg:empty { display: none; }
.pd-side { position: sticky; top: 1rem; min-width: 0; }
.pd-side .gp-out { margin: 0 0 0.9rem; }
.pd-scroll { overflow-x: auto; }
.pd-paper { background: #fff; color: #181715; border: 1px solid #d4d4cc; box-shadow: 0 1px 2px rgba(24, 23, 21, 0.06), 0 6px 18px rgba(24, 23, 21, 0.06); padding: 2.25rem 2.25rem 1.5rem; min-width: 30rem; font-size: 0.9375rem; line-height: 1.45; }
.pd-paper p { margin: 0; }
.pd-paper h3 { font-size: 0.75rem; font-weight: 500; color: #6a6964; margin: 0 0 0.3rem; letter-spacing: 0.01em; }
.pd-ph { color: #a3a29b; }
.pd-dh { display: flex; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.25rem; border-bottom: 2px solid #181715; }
.pd-me p + p { margin-top: 0.25rem; color: #4a4945; }
.pd-co { font-weight: 600; font-size: 1.0625rem; }
.pd-title { text-align: right; }
.pd-title h2 { font-size: 1.75rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 0.6rem; }
.pd-title dl { margin: 0; display: grid; gap: 0.15rem; font-size: 0.875rem; }
.pd-title dl div { display: flex; justify-content: flex-end; gap: 0.75rem; }
.pd-title dt { color: #6a6964; }
.pd-title dd { margin: 0; font-weight: 500; }
.pd-parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; padding: 1.25rem 0; }
.pd-party b { font-weight: 600; }
.pd-paper table { font-size: 0.875rem; }
.pd-lines th { color: #6a6964; border-bottom: 1px solid #181715; padding: 0.4rem 0.5rem; }
.pd-lines td { border-bottom: 1px solid #e1e1da; padding: 0.5rem; overflow-wrap: anywhere; }
.pd-lines th:first-child, .pd-lines td:first-child { padding-left: 0; }
.pd-lines th:last-child, .pd-lines td:last-child { padding-right: 0; }
.pd-lines tr { break-inside: avoid; page-break-inside: avoid; }
.pd-sum { width: auto; min-width: 16rem; margin: 0.75rem 0 0 auto; break-inside: avoid; page-break-inside: avoid; }
.pd-sum td { border: 0; padding: 0.25rem 0; }
.pd-sum td.r { padding-left: 2rem; }
.pd-total td { border-top: 2px solid #181715; padding-top: 0.5rem; font-weight: 600; font-size: 1rem; }
.pd-notes { margin-top: 1.5rem; break-inside: avoid; page-break-inside: avoid; }
.pd-notes p { color: #33322f; }
.pd-sign { margin-top: 2rem; break-inside: avoid; page-break-inside: avoid; }
.pd-signlines { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 1.25rem; margin-top: 2.5rem; }
.pd-signlines span { border-top: 1px solid #181715; padding-top: 0.3rem; font-size: 0.8125rem; color: #6a6964; }
.pd-made { margin-top: 2rem !important; font-size: 0.75rem; color: #8a8983; }
@media (max-width: 899px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-side { position: static; }
}
@media (max-width: 599px) {
  .pd-paper { padding: 1.25rem 1rem 1rem; min-width: 0; font-size: 0.875rem; }
  .pd-dh { flex-direction: column; gap: 1rem; }
  .pd-title { text-align: left; }
  .pd-title dl div { justify-content: flex-start; }
  .pd-parties { grid-template-columns: 1fr; gap: 1rem; }
  .pd-lines { min-width: 20rem; }
  .pd-lines th, .pd-lines td { padding: 0.45rem 0.3rem; }
  .pd-sum { min-width: 0; width: 100%; }
  .pd-signlines { grid-template-columns: 1fr; gap: 2rem; }
  .pd-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pd-amt { grid-column: 1; justify-content: flex-start; }
  .pd-x { grid-column: 2; }
  .pd-acts .gp-btn, .pd-acts .btn { flex: 1 1 100%; }
}
@media print {
  @page { margin: 0.6in 0.6in 0.6in; }
  .pd-form, .pd-side > .gp-out, .pd-side > .hint, .pd-ph { display: none !important; }
  .pd-grid { display: block; padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .pd-side { position: static; }
  .pd-scroll { overflow: visible; }
  .pd-paper { border: 0; box-shadow: none; padding: 0; min-width: 0; font-size: 10.5pt; }
  .pd-lines thead { display: table-header-group; }
  .pd-made { color: #777; font-size: 8pt; }
}
