:root {
  color-scheme: light;
  --ink: #182b35;
  --ink-soft: #4f616a;
  --muted: #849197;
  --line: #e3e9e9;
  --paper: #ffffff;
  --canvas: #f4f6f6;
  --teal: #147c78;
  --teal-dark: #0d615e;
  --teal-pale: #e8f4f2;
  --amber: #edac58;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.topbar { height: 76px; padding: 0 max(28px, calc((100vw - 1180px) / 2)); background: #fff; border-bottom: 1px solid #e9eded; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: var(--ink); display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand strong { font: 800 18px Manrope, sans-serif; letter-spacing: -1px; display: block; line-height: 1.1; }
.brand-amp { color: var(--teal); }
.brand small { display: block; margin-top: 4px; color: #829097; font-size: 8px; font-weight: 700; letter-spacing: 1.35px; }
.brand-mark, .empty-icon { width: 31px; height: 31px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border: 2px solid var(--teal); border-radius: 5px; transform: skewY(-4deg); }
.brand-mark span, .empty-icon span { background: #d9eeeb; border: 1px solid var(--teal); border-radius: 1px; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { background: #fff; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.save-status { color: var(--muted); font-size: 11px; margin-right: 9px; }
.save-status::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #52a58e; margin: 0 7px 1px 0; }
.button { border: 1px solid transparent; border-radius: 7px; padding: 10px 15px; font-size: 12px; font-weight: 700; transition: background .15s, border-color .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button-quiet { color: var(--ink-soft); background: transparent; }
.button-quiet:hover { background: #f1f5f4; }
.button-primary { background: var(--teal); color: white; box-shadow: 0 3px 8px #147c7820; }
.button-primary:hover { background: var(--teal-dark); }
.button-primary span { margin-right: 6px; font-size: 15px; }
.button-outline { color: var(--teal-dark); border-color: #c9ddda; background: white; }
.button-outline:hover { background: var(--teal-pale); border-color: #aaccc7; }
.workspace { max-width: 1180px; margin: 0 auto; padding: 44px 28px 30px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 0 28px; }
.eyebrow { color: #859398; font-size: 9px; font-weight: 700; letter-spacing: 1.45px; }
.live-dot { width: 5px; height: 5px; margin: 0 0 1px 5px; background: #57ae91; border-radius: 50%; display: inline-block; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 10px 0 4px; font: 800 32px Manrope, sans-serif; letter-spacing: -1.35px; }
.heading-period { color: var(--teal); }
.page-heading p { color: var(--muted); margin: 0; font-size: 12px; }
.quote-number-wrap { font-size: 9px; letter-spacing: 1px; font-weight: 700; color: var(--muted); }
.quote-number-wrap input { display: block; width: 132px; margin-top: 7px; padding: 9px 10px; font-size: 12px; font-weight: 600; letter-spacing: .2px; }
.details-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 16px; }
.panel { background: var(--paper); border: 1px solid #e6ebea; border-radius: 9px; box-shadow: 0 3px 12px #182b3505; }
.details-panel, .business-panel { padding: 20px 21px 17px; }
.section-heading { display: flex; gap: 12px; align-items: flex-start; }
.step-number { width: 25px; height: 25px; flex: 0 0 25px; border: 1px solid #d7e7e4; border-radius: 6px; display: grid; place-items: center; color: var(--teal); background: #f5faf9; font-size: 9px; font-weight: 700; }
.section-heading h2, .totals-title h2 { font: 700 15px Manrope, sans-serif; letter-spacing: -.25px; margin: 1px 0 3px; }
.section-heading p { color: var(--muted); font-size: 10px; margin: 0; }
.field-grid, .config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 11px; }
.details-panel .field-grid, .business-panel .field-grid { margin: 19px 0 0 37px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 5px; color: #66777d; font-size: 10px; font-weight: 600; }
.field-wide { grid-column: span 2; }
.field input, .field select, .field textarea, .quote-number-wrap input { min-width: 0; width: 100%; border: 1px solid #e3e9e8; border-radius: 5px; background: #fff; color: var(--ink); outline: 0; transition: border-color .15s, box-shadow .15s; }
.field input, .field select { height: 34px; padding: 0 9px; font-size: 11px; font-weight: 500; }
.field textarea { padding: 10px; resize: vertical; font-size: 11px; line-height: 1.55; }
.field input[readonly], .field textarea[readonly] { background: #f7f8fa; color: #4f616a; cursor: default; }
.field input:focus, .field select:focus, .field textarea:focus, .quote-number-wrap input:focus { border-color: #78b4ad; box-shadow: 0 0 0 3px #147c7812; }
.field input::placeholder, .field textarea::placeholder { color: #b1babe; font-weight: 400; }
.privacy-note { margin: 17px 0 0 37px; color: #8c999d; font-size: 9px; }
.privacy-note span { color: var(--teal); margin-right: 4px; }
.items-section { margin-top: 31px; }
.items-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.items-heading .section-heading { align-items: center; }
.items-heading .section-heading p { margin-top: 4px; }
.muted-dot { margin: 0 4px; color: #b7c0c2; }
.plus-icon { font-size: 15px; margin-right: 4px; }
.window-list { display: grid; gap: 12px; }
.window-card { padding: 0; overflow: hidden; }
.window-card-head { height: 44px; padding: 0 17px; border-bottom: 1px solid #edf0ef; display: flex; align-items: center; justify-content: space-between; }
.window-title { display: flex; gap: 10px; align-items: center; }
.window-code { display: grid; place-items: center; height: 23px; min-width: 36px; padding: 0 6px; color: var(--teal); background: #edf7f5; border-radius: 4px; font: 700 9px Manrope, sans-serif; }
.inline-name input { border: 0; outline: 0; color: var(--ink); width: 165px; font-size: 11px; font-weight: 700; }
.inline-name input:focus { box-shadow: inset 0 -1px var(--teal); }
.icon-button { border: 0; color: #97a2a4; background: transparent; font-size: 20px; line-height: 1; padding: 4px 7px; border-radius: 4px; }
.icon-button:hover { color: #a44740; background: #fbf0ef; }
.window-card-body { display: grid; grid-template-columns: 245px 1fr; min-height: 345px; }
.drawing-column { padding: 17px 17px 12px; background: #fbfcfc; border-right: 1px solid #edf0ef; display: flex; flex-direction: column; }
.drawing-meta { display: flex; justify-content: space-between; align-items: center; }
.drawing-tag { color: var(--teal); font-size: 8px; font-weight: 700; letter-spacing: .8px; }
.drawing-units { color: #b0b9ba; font-size: 7px; letter-spacing: .4px; }
.drawing-wrap { height: 265px; display: grid; place-items: center; }
.drawing-wrap svg { width: 100%; height: 100%; max-height: 265px; overflow: visible; }
.drawing-caption { margin: auto 0 0; padding-top: 9px; text-align: center; color: #8b979a; font-size: 8px; }
.config-column { padding: 17px 18px 12px; align-self: center; width: 100%; }
.config-grid { gap: 11px 12px; }
.config-grid .field { font-size: 9px; }
.config-grid .field input, .config-grid .field select { height: 32px; font-size: 10px; }
.config-grid .field textarea { min-height: 46px; padding: 7px 8px; font-size: 10px; line-height: 1.4; resize: vertical; }
.config-grid .field-wide textarea { min-height: 52px; }
.input-prefix { display: flex; height: 32px; align-items: center; border: 1px solid #e3e9e8; border-radius: 5px; overflow: hidden; background: white; }
.input-prefix:focus-within { border-color: #78b4ad; box-shadow: 0 0 0 3px #147c7812; }
.input-prefix > span { padding-left: 9px; color: #8b989a; font-size: 10px; }
.input-prefix input { border: 0; height: 30px !important; box-shadow: none !important; padding-left: 4px !important; }
.item-calculation { margin-top: 14px; padding-top: 10px; border-top: 1px solid #edf0ef; color: #809095; display: flex; justify-content: space-between; align-items: center; font-size: 9px; }
.item-calculation strong { color: var(--ink); font: 700 12px Manrope, sans-serif; }
.empty-state { min-height: 230px; border: 1px dashed #cbdad8; border-radius: 9px; background: #fafcfc; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-icon { width: 37px; height: 37px; margin-bottom: 13px; }
.empty-state h3 { margin: 0 0 5px; font: 700 14px Manrope, sans-serif; }
.empty-state p { max-width: 290px; color: var(--muted); font-size: 10px; line-height: 1.6; margin: 0 0 13px; }
.bottom-grid { display: grid; grid-template-columns: 1fr .85fr; gap: 16px; margin-top: 22px; }
.terms-panel, .totals-panel { padding: 19px 21px; }
.terms-panel .field { margin: 18px 0 0 37px; }
.totals-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.totals-title h2 { margin: 4px 0 0; font-size: 17px; }
.currency-chip { background: #f0f5f4; border-radius: 4px; padding: 6px 8px; color: var(--teal-dark); font-size: 9px; font-weight: 700; }
.total-row { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid #eef1f0; color: #758489; font-size: 10px; }
.total-row strong { color: #344851; font-size: 11px; }
.grand-total { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #dfe8e6; margin-top: 2px; padding: 14px 0 8px; font-size: 12px; font-weight: 700; }
.grand-total strong { font: 800 20px Manrope, sans-serif; letter-spacing: -.5px; color: var(--teal-dark); }
.tax-note { color: #9aa5a7; font-size: 8px; margin: 4px 0 0; }
.page-footer { display: flex; justify-content: space-between; margin-top: 19px; padding-top: 12px; border-top: 1px solid #e4e9e8; color: #99a4a6; font-size: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .topbar { height: auto; min-height: 68px; padding: 12px 17px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand strong { font-size: 16px; }
  .topbar-actions { gap: 4px; }
  .save-status { display: none; }
  .button { padding: 9px 10px; font-size: 10px; }
  .workspace { padding: 30px 16px 24px; }
  .page-heading { align-items: flex-start; }
  h1 { font-size: 27px; }
  .page-heading p { max-width: 230px; font-size: 10px; line-height: 1.5; }
  .details-grid, .bottom-grid { grid-template-columns: 1fr; }
  .window-card-body { grid-template-columns: 1fr; }
  .drawing-column { border-right: 0; border-bottom: 1px solid #edf0ef; min-height: 335px; }
  .drawing-wrap { max-width: 340px; width: 100%; height: 285px; align-self: center; }
  .config-column { padding: 16px; }
}
@media (max-width: 430px) {
  .topbar { padding: 10px 12px; }
  .brand small { font-size: 7px; }
  .topbar-actions .button-quiet { display: none; }
  .workspace { padding-right: 12px; padding-left: 12px; }
  .quote-number-wrap input { width: 105px; }
  .items-heading { align-items: flex-start; }
  .items-heading .section-heading p { max-width: 210px; line-height: 1.6; }
  .items-heading > .button { white-space: nowrap; }
  .config-grid { gap: 10px 8px; }
  .details-panel, .business-panel, .terms-panel, .totals-panel { padding-left: 15px; padding-right: 15px; }
  .details-panel .field-grid, .business-panel .field-grid, .terms-panel .field { margin-left: 0; }
}

#print-document { display: none; }

@media print {
  @page { size: A4 portrait; margin: 0; }
  :root { --print-navy: #14294d; --print-crimson: #a71935; --print-blue-tint: #f1f4f9; --print-red-tint: #fff3f4; --print-ink: #263449; --print-muted: #687486; --print-line: #cbd2dc; }
  html, body { width: 100%; margin: 0; background: white; color: var(--print-ink); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body { font-family: Arial, "Segoe UI", sans-serif; font-size: 9pt; }
  .topbar, .workspace { display: none !important; }
  #print-document { display: block; }
  .quotation-page { position: relative; width: 100%; min-height: 297mm; padding: 11mm 12mm 12mm; box-sizing: border-box; break-after: page; page-break-after: always; }
  .quotation-page:last-child { break-after: auto; page-break-after: auto; }
  .quote-header { display: grid; grid-template-columns: 25% minmax(0, 1fr) 20%; grid-template-areas: "logo contact meta"; align-items: start; column-gap: 3mm; padding: 0 0 4mm; border-bottom: 1.2pt solid var(--print-navy); }
  .issuer-logo { grid-area: logo; display: block; width: 35mm; height: 25mm; align-self: start; object-fit: contain; }
  .issuer-contact { grid-area: contact; display: flex; flex-direction: column; gap: .6mm; min-width: 0; margin-top: 3mm; color: var(--print-muted); font-size: 7pt; line-height: 1.35; }
  .issuer-contact span { min-width: 0; overflow-wrap: anywhere; }
  .contact-office, .contact-factory { display: block; }
  .issuer-contact strong { color: var(--print-navy); }
  .issuer-meta { grid-area: meta; margin-top: 3mm; color: var(--print-ink); text-align: right; font-size: 7.2pt; line-height: 1.5; }
  .document-title { margin: 8mm 0 2mm; color: var(--print-navy); font-size: 20pt; font-weight: 700; }
  .document-subtitle { color: var(--print-muted); font-size: 9pt; }
  .cover-quote-ident { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1mm 5mm; width: 100%; margin: 4mm 0 0; color: var(--print-ink); text-align: right; font-size: 7.5pt; line-height: 1.45; }
  .cover-quote-ident strong { color: var(--print-navy); }
  .cover-recipient { margin-top: 4mm; padding: 5mm 6mm; border: .7pt solid var(--print-line); border-left: 2pt solid var(--print-crimson); background: var(--print-blue-tint); }
  .print-label { margin: 0 0 1.5mm; color: var(--print-crimson); font-size: 7pt; font-weight: 700; letter-spacing: .7pt; text-transform: uppercase; }
  .cover-recipient h2 { margin: 0 0 1mm; font-size: 12pt; }
  .cover-recipient p { margin: 0; color: var(--print-muted); font-size: 8.5pt; line-height: 1.5; }
  .cover-letter { margin-top: 10mm; max-width: 165mm; color: var(--print-ink); font-size: 9pt; line-height: 1.75; }
  .cover-letter p { margin: 0 0 4mm; }
  .cover-highlights { margin: 6mm 0 0; padding: 5mm 6mm; border-left: 2pt solid var(--print-navy); background: var(--print-blue-tint); }
  .cover-highlights h2 { margin: 0 0 3mm; color: var(--print-navy); font-size: 10pt; }
  .cover-highlights ul { margin: 0; padding-left: 5mm; color: var(--print-ink); line-height: 1.8; }
  .cover-signoff { margin-top: 10mm; color: var(--print-muted); line-height: 1.7; }
  .cover-signoff strong { color: var(--print-crimson); }
  .schedule-heading { margin: 5mm 0 3mm; padding-bottom: 1.5mm; border-bottom: .7pt solid var(--print-line); color: var(--print-navy); font-size: 11pt; }
  .schedule-caption { margin: -1mm 0 3mm; color: var(--print-muted); font-size: 7.5pt; }
  .schedule-items { display: grid; gap: 4mm; }
  .schedule-item { border: .8pt solid var(--print-line); break-inside: avoid; page-break-inside: avoid; }
  .schedule-item-head { display: grid; grid-template-columns: 21mm 1fr 1fr; min-height: 8mm; border-bottom: .7pt solid var(--print-line); background: var(--print-blue-tint); }
  .schedule-item-head > div { padding: 1.8mm 2mm; border-right: .5pt solid var(--print-line); }
  .schedule-item-head > div:last-child { border-right: 0; }
  .schedule-code { color: var(--print-crimson); font-weight: 700; }
  .schedule-item-body { display: grid; grid-template-columns: 38% 62%; }
  .schedule-drawing { min-width: 0; padding: 2mm; border-right: .7pt solid var(--print-line); text-align: center; }
  .schedule-drawing svg { display: block; width: 100%; height: 68mm; }
  .schedule-view-label { margin: 0; color: var(--print-muted); font-size: 6.5pt; }
  .schedule-specs { min-width: 0; display: flex; flex-direction: column; }
  .detail-list { flex: 1; }
  .detail-row { display: grid; grid-template-columns: 36% 64%; min-height: 5.1mm; border-bottom: .5pt solid var(--print-line); font-size: 7.2pt; break-inside: avoid; page-break-inside: avoid; }
  .detail-row > span { min-width: 0; padding: 1.15mm 1.7mm; border-right: .5pt solid var(--print-line); overflow-wrap: anywhere; }
  .detail-row > span:first-child { background: #f8f9fb; color: var(--print-navy); font-weight: 600; }
  .detail-row > span:last-child { border-right: 0; }
  .item-price-table { width: 100%; margin-top: auto; border-collapse: collapse; font-size: 7.5pt; text-align: center; }
  .item-price-table th, .item-price-table td { width: 33.333%; padding: 1.7mm 1mm; border: .6pt solid var(--print-line); }
  .item-price-table th { background: var(--print-blue-tint); color: var(--print-navy); }
  .item-price-table tbody { font-weight: 700; }
  .schedule-page-footer { display: flex; justify-content: space-between; margin-top: 4mm; padding-top: 1.5mm; border-top: .5pt solid var(--print-line); color: var(--print-muted); font-size: 6.5pt; }
  .summary-title { margin: 7mm 0 3mm; padding: 2mm 0; border-top: .8pt solid var(--print-navy); border-bottom: .8pt solid var(--print-navy); background: var(--print-blue-tint); color: var(--print-navy); font-size: 10pt; font-weight: 700; }
  .summary-table { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
  .summary-table td { padding: 2.2mm 2.5mm; border: .6pt solid var(--print-line); }
  .summary-table td:last-child { width: 37%; text-align: right; white-space: nowrap; }
  .summary-table .summary-grand-total { font-weight: 700; background: var(--print-red-tint); color: var(--print-navy); }
  .summary-table .summary-grand-total td { border-top: 1pt solid var(--print-crimson); border-bottom: 1pt solid var(--print-crimson); font-size: 10pt; }
  .terms-title { margin: 10mm 0 5mm; padding-bottom: 2mm; border-bottom: 1pt solid var(--print-crimson); color: var(--print-navy); font-size: 15pt; }
  .terms-copy { color: var(--print-ink); font-size: 8.5pt; line-height: 1.75; }
  .terms-copy p { margin: 0 0 3mm; }
  .terms-copy ol { padding-left: 6mm; }
  .terms-copy li { padding: 0 0 2mm 1mm; }
  .bank-block { margin-top: 7mm; padding: 4mm; border: .7pt solid var(--print-line); background: var(--print-blue-tint); }
  .bank-block h3 { margin: 0 0 2mm; color: var(--print-navy); font-size: 9pt; }
  .acceptance { margin-top: 13mm; color: var(--print-ink); font-size: 8.5pt; line-height: 1.6; }
  .signature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20mm; margin-top: 22mm; text-align: center; }
  .signature-line { padding-top: 2mm; border-top: .7pt solid var(--print-navy); color: var(--print-muted); font-size: 7.5pt; }
}
