:root {
  --budget-dark: #12323d;
  --budget-teal: #0bb2c7;
  --budget-teal-dark: #087f92;
  --budget-soft: #edf8f9;
  --budget-line: #d4e2e6;
  --budget-muted: #687d85;
}

* { box-sizing: border-box; }
.budget-app main { margin-left: 180px; min-height: 100vh; padding-bottom: 50px; background: #eef4f5; }
.brand span { display: flex; flex-direction: column; }
.brand small { color: #8fb0ba; letter-spacing: 2px; }
.nav-item { text-decoration: none; }

.budget-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 28px; background: #fff; border-bottom: 1px solid var(--budget-line);
}
.budget-toolbar p { margin: 0; color: var(--budget-teal-dark); font-size: 10px; font-weight: 900; letter-spacing: 2px; }
.budget-toolbar h1 { margin: 4px 0 2px; font-size: 27px; }
.budget-toolbar small { color: var(--budget-muted); }
.budget-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.budget-action-feedback {
  flex-basis: 100%;
  min-height: 16px;
  color: var(--budget-teal-dark);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}
.budget-action-feedback.error { color: #ad3535; }
.budget-list-source { display: none; }
.budget-workspace {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  width: min(1240px, calc(100% - 48px));
  margin: 22px auto 50px;
  align-items: start;
}
.budget-index {
  position: sticky;
  top: 22px;
  overflow: hidden;
}
.budget-index-heading {
  padding: 22px;
  border-bottom: 1px solid var(--budget-line);
}
.budget-index-heading h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
.budget-index-heading p {
  margin: 0;
  color: var(--budget-muted);
  font-size: 13px;
  line-height: 1.4;
}
.budget-index-heading .search {
  margin-top: 17px;
}
.budget-search-results {
  max-height: 720px;
  overflow: auto;
}
.budget-result {
  width: 100%;
  padding: 15px 20px;
  border: 0;
  border-bottom: 1px solid #edf1f2;
  background: #fff;
  color: var(--budget-dark);
  text-align: left;
  cursor: pointer;
}
.budget-result:hover,
.budget-result.active {
  background: #f0fafb;
}
.budget-result.active {
  box-shadow: inset 3px 0 var(--budget-teal);
}
.budget-result strong,
.budget-result small {
  display: block;
}
.budget-result strong {
  margin-bottom: 5px;
  font-size: 13px;
}
.budget-result small {
  overflow: hidden;
  color: var(--budget-muted);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.budget-search-empty {
  padding: 32px 20px;
  color: var(--budget-muted);
  font-size: 12px;
  text-align: center;
}
.budget-document-column { min-width: 0; }
.budget-actions button, .source-bar button, .add-line {
  border: 1px solid var(--budget-line); border-radius: 8px; padding: 9px 12px;
  background: #fff; color: var(--budget-dark); font-weight: 750; cursor: pointer;
}
.budget-actions .primary, .source-bar button { border-color: var(--budget-teal-dark); background: var(--budget-teal-dark); color: #fff; }
.budget-actions .danger { color: #a83232; }
.budget-actions select, .source-bar select { padding: 9px; border: 1px solid var(--budget-line); border-radius: 8px; background: #fff; }

/* Mantém a barra desta folha idêntica às restantes áreas da aplicação. */
.budget-actions .button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--budget-line);
  border-radius: 10px;
  background: #fff;
  color: var(--budget-dark);
  font-size: 13px;
  font-weight: 700;
}
.budget-actions .button.primary {
  border-color: var(--budget-teal-dark);
  background: var(--budget-teal-dark);
  color: #fff;
}
.budget-actions .button.danger {
  border-color: #efcccc;
  background: #fff;
  color: #ad3535;
}

.source-bar {
  display: flex; align-items: end; gap: 10px; max-width: 1060px; margin: 0 auto 14px;
  padding: 14px 18px; border: 1px solid var(--budget-line); border-radius: 12px; background: #fff;
}
.source-bar label { flex: 1; color: #50666e; font-size: 10px; font-weight: 800; }
.source-bar select { display: block; width: 100%; margin-top: 5px; }
.source-bar span { color: var(--budget-teal-dark); font-size: 10px; font-weight: 800; }

.budget-sheet {
  width: 210mm; min-height: 297mm; margin: 0 auto; padding: 13mm 14mm 15mm;
  overflow: visible; background: #fff; color: var(--budget-dark);
  box-shadow: 0 12px 35px rgba(18, 49, 60, .12);
}
.budget-sheet input, .budget-sheet textarea, .budget-sheet select {
  width: 100%; border: 0; border-bottom: 1px solid var(--budget-line); padding: 1.5mm 0;
  background: transparent; color: var(--budget-dark); font: inherit; resize: none;
}
.budget-sheet label { display: block; color: var(--budget-muted); font-size: 8px; font-weight: 750; }

.document-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14mm;
  padding-bottom: 7mm; border-bottom: 2px solid var(--budget-teal);
}
.company-block { min-width: 0; flex: 1; }
.company-identity { display: flex; align-items: center; gap: 12px; }
.company-identity img { width: 52px; height: 52px; object-fit: contain; }
.company-identity > div { flex: 1; }
.company-identity input {
  max-width: 90mm; border: 0; padding: 0; font-size: 23px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase;
}
.company-identity span { display: block; margin-top: 1mm; color: var(--budget-muted); font-size: 9px; letter-spacing: .4px; }
.company-details { max-width: 116mm; margin: 3mm 0 0 64px; color: var(--budget-muted); font-size: 7.5px; line-height: 1.35; }
.company-details textarea, .company-details input { border: 0; padding: 0; color: var(--budget-muted); }
.company-details textarea { display: block; min-height: 8mm; }
.company-details > div { display: flex; gap: 5mm; }
.company-details > div span { display: flex; align-items: center; gap: 1mm; white-space: nowrap; }
.company-details > div input { width: 35mm; }

.document-title { min-width: 58mm; padding: 5mm; border-radius: 4mm; background: var(--budget-dark); color: #fff; text-align: right; }
.document-title > span, .document-title > strong, .document-title > small { display: block; }
.document-title > span { color: #69dfec; font-size: 9px; font-weight: 900; letter-spacing: 2px; }
.document-title > strong { margin: 3mm 0 4mm; font-size: 19px; }
.document-title small { margin-top: 1.5mm; color: #c2d4da; font-size: 8px; }
.document-title input { display: inline; width: 30mm; border: 0; padding: 0; color: #fff; text-align: right; }

.client-panel {
  display: grid; grid-template-columns: 38mm 1fr; gap: 6mm; margin: 7mm 0 5mm;
  padding: 5mm; border: 1px solid var(--budget-line); border-left: 4px solid var(--budget-teal);
  border-radius: 3mm; background: linear-gradient(100deg, var(--budget-soft), #fff 46%);
}
.section-heading span { color: var(--budget-teal-dark); font-size: 7px; font-weight: 900; letter-spacing: 1.6px; }
.budget-sheet h2 { margin: 1mm 0 0; color: var(--budget-dark); font-size: 13px; }
.client-fields { display: grid; grid-template-columns: 1.4fr .65fr .85fr; gap: 3mm 5mm; }
.client-name { grid-column: span 1; }
.client-address { grid-column: span 2; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }

.budget-subject { margin: 0 0 6mm; padding: 3mm 4mm; border-radius: 2mm; background: #f6fafb; }
.budget-subject input { color: var(--budget-dark); font-size: 13px; font-weight: 850; }

.items-section table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.items-section .col-description { width: auto; }
.items-section .col-quantity { width: 19mm; }
.items-section .col-price { width: 25mm; }
.items-section .col-discount { width: 15mm; }
.items-section .col-amount { width: 25mm; }
.items-section .col-actions { width: 7mm; }
.items-section thead { display: table-header-group; }
.items-section th { padding: 3mm 2mm; background: var(--budget-dark); color: #fff; font-size: 8px; text-align: left; }
.items-section .table-context th {
  padding: 2mm; border-bottom: 1px solid rgba(255,255,255,.2);
  background: var(--budget-teal-dark); font-size: 7px; letter-spacing: .8px; text-transform: uppercase;
}
.items-section th:nth-child(2),
.items-section th:nth-child(3),
.items-section th:nth-child(4),
.items-section td:nth-child(2),
.items-section td:nth-child(3),
.items-section td:nth-child(4) { text-align: center; }
.items-section th:nth-child(5) { text-align: right; }
.items-section td:nth-child(2) input,
.items-section td:nth-child(3) input,
.items-section td:nth-child(4) input { text-align: center; }
.items-section tbody tr { break-inside: avoid; page-break-inside: avoid; }
.items-section td { padding: 3mm 2mm; border-bottom: 1px solid var(--budget-line); vertical-align: top; }
.items-section td:first-child { border-left: 2px solid transparent; }
.items-section tbody tr:nth-child(even) td { background: #f8fbfb; }
.items-section input, .items-section textarea { font-size: 9px; line-height: 1.45; }
.items-section textarea { min-height: 18mm; overflow: hidden; }
.items-section .line-total { text-align: right; font-size: 9px; font-weight: 850; }
.remove-line { border: 0; background: transparent; color: #a83232; cursor: pointer; }
.add-line { margin-top: 3mm; font-size: 9px; }

.document-bottom { display: grid; grid-template-columns: 1fr 66mm; gap: 12mm; margin-top: 9mm; break-inside: avoid; page-break-inside: avoid; }
.conditions { padding: 4mm; border: 1px solid var(--budget-line); border-radius: 3mm; }
.conditions input, .conditions textarea { font-size: 9px; }
.totals { padding: 4mm; border-radius: 3mm; background: var(--budget-dark); color: #fff; }
.totals > div, .totals > label {
  display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 2.5mm 0;
  border-bottom: 1px solid rgba(255,255,255,.18); color: #c4d5da; font-size: 9px;
}
.totals strong { color: #fff; }
.totals select { width: 55px; border-color: rgba(255,255,255,.35); color: #fff; text-align: right; }
.totals .grand { border: 0; color: #6de1ee; font-size: 15px; }
.document-footer { margin-top: 11mm; padding-top: 5mm; border-top: 1px solid var(--budget-line); color: var(--budget-muted); font-size: 8px; break-inside: avoid; }
.document-footer div { display: grid; grid-template-columns: 1fr 1fr; gap: 15mm; margin-top: 10mm; }
.document-footer div span { padding-top: 7mm; border-top: 1px solid var(--budget-line); text-align: center; }
.document-footer > small { display: block; margin-top: 17mm; padding: 4mm 0 0; border-top: 1px solid var(--budget-dark); text-align: center; }

/* Proposta comercial: composição leve inspirada em documentos de cotação. */
.document-head {
  display: grid; grid-template-columns: 1fr 74mm; gap: 16mm;
  min-height: 56mm; padding-bottom: 8mm; border-bottom: 1px solid var(--budget-line);
}
.company-identity { align-items: flex-start; }
.company-identity img { width: 38px; height: 38px; }
.company-identity input { font-size: 19px; letter-spacing: .5px; }
.company-identity span { font-size: 9px; }
.company-details { max-width: 100mm; margin: 4mm 0 0; color: #4f6068; font-size: 10.5px; line-height: 1.5; }
.company-details textarea { min-height: 12mm; }
.company-details > div { display: block; }
.company-details > div span { margin-top: 1mm; }
.company-details > div input { width: 44mm; }
.client-panel {
  display: block; margin: 5mm 0 0; padding: 0; border: 0; border-radius: 0; background: transparent;
}
.section-heading span { color: var(--budget-teal-dark); font-size: 9px; }
.client-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 4mm; }
.client-fields label { margin: 0; }
.client-fields label, .budget-subject label, .conditions label { font-size: 9px; }
.client-fields .client-name, .client-fields .client-address { grid-column: 1 / -1; }
.client-fields input, .client-fields textarea { border: 0; padding: .8mm 0; font-size: 10.5px; line-height: 1.35; }
.quotation-heading { margin: 10mm 0 7mm; }
.quotation-heading h2 { margin: 0 0 7mm; color: var(--budget-teal-dark); font-size: 19px; font-weight: 550; letter-spacing: -.2px; }
.quotation-heading h2 span { font: inherit; }
.quotation-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7mm; }
.quotation-meta label { color: var(--budget-teal-dark); font-size: 10px; font-weight: 850; }
.quotation-meta input { margin-top: 1mm; border: 0; color: #53656d; font-size: 11px; font-weight: 500; }
.budget-subject { margin-bottom: 5mm; padding: 0; background: transparent; }
.budget-subject label { color: var(--budget-teal-dark); }
.budget-subject input { border-bottom: 1px solid var(--budget-line); font-size: 12.5px; }
.items-section .table-context th { padding: 1.8mm 1mm; background: transparent; color: var(--budget-muted); border-top: 1px solid var(--budget-line); border-bottom: 0; }
.items-section th { padding: 2.5mm 1mm; background: #fff; color: var(--budget-teal-dark); border-bottom: 1px solid var(--budget-line); font-size: 9.5px; }
.items-section tbody tr:nth-child(even) td { background: #fff; }
.items-section tbody tr:nth-child(odd) td { background: #f6f3f5; }
.items-section td { padding: 2.5mm 1mm; }
.items-section textarea { min-height: 12mm; }
.document-bottom { grid-template-columns: 1fr 62mm; gap: 7mm; margin-top: 5mm; }
.conditions { padding: 0; border: 0; border-radius: 0; }
.conditions label { margin-top: 2mm; }
.conditions input, .conditions textarea { font-size: 10px; }
.totals { padding: 0; border-radius: 0; background: #fff; color: var(--budget-dark); }
.totals > div, .totals > label { border-bottom: 1px solid var(--budget-line); color: var(--budget-dark); font-size: 10px; }
.totals strong { color: var(--budget-dark); }
.totals select { color: var(--budget-dark); }
.totals .grand { color: var(--budget-dark); font-size: 14px; font-weight: 900; }
.document-footer { margin-top: 8mm; }
.document-footer { font-size: 9px; line-height: 1.45; }
.items-section input, .items-section textarea, .items-section .line-total { font-size: 10.5px; }

@media (min-width: 1051px) { .budget-app main { margin-left: 248px; } }
@media (max-width: 1050px) {
  .budget-app main { margin-left: 82px; }
  .budget-toolbar { align-items: flex-start; flex-direction: column; }
  .budget-actions { justify-content: flex-start; }
  .source-bar { margin: 16px; }
  .budget-workspace { grid-template-columns: 1fr; width: calc(100% - 32px); }
  .budget-index { position: static; }
  .budget-search-results { max-height: 300px; }
  .budget-sheet { width: calc(100% - 32px); min-height: auto; }
}
@media (max-width: 700px) {
  .budget-app main { margin-left: 0; }
  .budget-sheet { padding: 8mm; }
  .source-bar { align-items: stretch; flex-direction: column; }
  .document-head, .document-bottom, .client-panel { grid-template-columns: 1fr; flex-direction: column; }
  .document-title { width: 100%; text-align: left; }
  .company-details { margin-left: 0; }
  .client-fields { grid-template-columns: 1fr; }
  .client-name, .client-address { grid-column: auto; }
}

@page { size: A4; margin: 13mm 14mm 15mm; }
@media print {
  body { background: #fff; }
  .sidebar, .budget-toolbar, .source-bar, .no-print, .security-toast { display: none !important; }
  .budget-app main { margin: 0; padding: 0; background: #fff; }
  .budget-sheet { width: auto; min-height: auto; margin: 0; padding: 0; overflow: visible; box-shadow: none; }
  .budget-sheet input, .budget-sheet textarea, .budget-sheet select {
    border-color: transparent; appearance: none; -webkit-appearance: none;
  }
  .company-details input, .company-details textarea { overflow: visible; }
  .items-section table { page-break-inside: auto; }
  .items-section thead { display: table-header-group; }
  .items-section tr { break-inside: avoid; page-break-inside: avoid; }
  .items-section textarea { height: auto; min-height: 18mm; overflow: visible; }
  .document-bottom, .document-footer, .client-panel, .document-head { break-inside: avoid; page-break-inside: avoid; }
}

/* Modelo A4 GPRO - composição baseada na folha comercial aprovada. */
.budget-sheet {
  --quote-blue: #08b4cf;
  --quote-fill: #e5f8fb;
  --quote-text: #2c2729;
  width: 210mm;
  min-height: 297mm;
  padding: 12mm 14mm 8mm;
  color: var(--quote-text);
  font-family: "Avenir Next", Avenir, Montserrat, "Helvetica Neue", Arial, sans-serif;
}
.budget-sheet input,
.budget-sheet textarea,
.budget-sheet select {
  border: 0;
  color: var(--quote-text);
}
.document-head {
  position: relative;
  display: grid;
  grid-template-columns: 88mm 1fr;
  gap: 18mm;
  min-height: 63mm;
  padding: 0 0 7mm;
  border-bottom: 1px solid var(--quote-blue);
}
.document-head::after {
  content: "ORÇAMENTO";
  position: absolute;
  top: 0;
  right: 0;
  color: #272326;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
}
.company-identity {
  display: flex;
  align-items: center;
  gap: 3mm;
}
.company-identity img {
  width: 19mm;
  height: 19mm;
}
.quote-wordmark {
  position: relative;
  min-width: 65mm;
  line-height: 1;
}
.quote-wordmark > div {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}
.quote-wordmark strong {
  color: #272326;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -1px;
}
.quote-wordmark span {
  color: #272326;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: -1px;
}
.quote-wordmark small {
  display: block;
  margin-top: 1.2mm;
  color: #363033;
  font-size: 8.5px;
  font-weight: 400;
  white-space: nowrap;
}
.company-name-source,
.company-contact-source,
.seller-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.company-details {
  max-width: 62mm;
  margin: 7mm 0 0 22mm;
  color: #40393c;
  font-size: 9.5px;
  line-height: 1.35;
}
.company-details textarea {
  min-height: 28mm;
  padding: 0;
  overflow: hidden;
  color: #40393c;
  line-height: 1.45;
}
.company-tax-line {
  display: flex !important;
  align-items: center;
  gap: 1mm !important;
  margin-bottom: 4mm;
}
.company-tax-line span {
  display: block !important;
  margin: 0 !important;
  white-space: nowrap;
}
.company-tax-line input {
  width: 40mm !important;
  padding: 0;
  color: #40393c;
}
.client-panel {
  display: block;
  margin: 20mm 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.section-heading span {
  display: block;
  margin: 0 0 2mm 2mm;
  color: #40393c;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.client-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 4mm;
  min-height: 38mm;
  padding: 4mm 5mm;
  border-radius: 2mm;
  background: var(--quote-fill);
}
.client-fields label {
  margin: 0;
}
.client-fields label span {
  display: none;
}
.client-fields .client-name,
.client-fields .client-address {
  grid-column: 1 / -1;
}
.client-fields input,
.client-fields textarea {
  padding: .6mm 0;
  color: #59676d;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.25;
}
.client-fields #budgetCustomerName {
  color: #111;
  font-weight: 700;
}
.client-fields textarea {
  min-height: 15mm;
}
.quotation-heading {
  position: relative;
  margin: 3mm 0 4mm;
}
.quotation-meta {
  display: grid;
  grid-template-columns: 1.08fr 1fr 1fr 1fr;
  gap: 2mm;
}
.quotation-meta label {
  color: #40393c;
  font-size: 9px;
  font-weight: 500;
}
.quotation-meta input,
.quotation-meta .reference-box {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 9mm;
  margin-top: 2mm;
  padding: 2mm 3mm;
  border: 0;
  border-radius: 2mm;
  background: var(--quote-fill);
  color: #40393c;
  font-size: 10px;
  font-weight: 500;
}
.quotation-meta label:first-child .reference-box {
  border: 1px solid var(--quote-blue);
  background: #fff;
}
.budget-subject {
  margin: 0 0 3mm;
  padding: 2mm 3mm;
  border: 1px dashed var(--budget-line);
  background: #fff;
}
.budget-subject #budgetSubject {
  font-weight: 400;
}
.budget-subject label {
  font-weight: 400;
}
.items-section {
  margin-top: 2mm;
}
.items-section table {
  border-collapse: separate;
  border-spacing: 1.5mm 0;
  margin: 0 -1.5mm;
  width: calc(100% + 3mm);
}
.items-section .col-description { width: 48%; }
.items-section .col-quantity { width: 15%; }
.items-section .col-price { width: 15%; }
.items-section .col-discount { width: 5%; }
.items-section .col-amount { width: 15%; }
.items-section .col-actions { width: 2%; }
.items-section th {
  padding: 0 1mm 2mm;
  border: 0;
  background: #fff;
  color: #40393c;
  font-size: 9px;
  font-weight: 500;
  text-align: left;
}
.items-section th:nth-child(2),
.items-section th:nth-child(3),
.items-section th:nth-child(4) {
  text-align: center;
}
.items-section th:nth-child(5) {
  text-align: center;
}
.items-section td,
.items-section tbody tr:nth-child(odd) td,
.items-section tbody tr:nth-child(even) td {
  padding: 3mm;
  border: 0;
  border-radius: 2mm;
  background: var(--quote-fill);
  vertical-align: top;
}
.items-section tbody tr:only-child td {
  height: 82mm;
}
.items-section tbody tr:not(:only-child) td {
  min-height: 20mm;
}
.items-section input,
.items-section textarea,
.items-section .line-total {
  font-size: 10px;
  line-height: 1.4;
}
.items-section textarea {
  min-height: 20mm;
}
.items-section .line-total {
  text-align: right;
  font-weight: 400;
}
.add-line {
  margin: 2mm 0 0;
}
.document-bottom {
  display: grid;
  grid-template-columns: 1fr 57mm;
  gap: 20mm;
  margin-top: 4mm;
}
.conditions {
  padding: 0 2mm;
  border: 0;
}
.conditions label {
  margin: 0 0 2.7mm;
  color: #40393c;
  font-size: 8.7px;
  font-weight: 500;
}
.conditions input,
.conditions textarea {
  min-height: 6mm;
  margin-top: 1mm;
  padding: .8mm 0;
  border-bottom: 1px solid var(--quote-blue);
  font-size: 9px;
}
.conditions textarea {
  min-height: 10mm;
}
.totals {
  padding: 0;
  border-radius: 0;
  background: #fff;
  color: var(--quote-text);
}
.totals > div,
.totals > label {
  min-height: 12mm;
  margin: 0;
  padding: 1mm 0;
  border-bottom: 1px solid var(--quote-blue);
  color: #40393c;
  font-size: calc(9px + 2pt);
  font-weight: 400;
}
.totals strong {
  color: #40393c;
  font-weight: 400;
  font-size: inherit;
}
.totals select {
  width: 15mm;
  color: #40393c;
  font-size: inherit;
  font-weight: 400;
}
.totals .grand {
  color: #272326;
  font-size: calc(12px + 2pt);
  font-weight: 700;
}
.totals .grand strong {
  font-weight: 700;
}

/* Corpo tipográfico uniforme: referência visual = linha Subtotal */
.company-details,
.company-details input,
.company-details textarea,
.section-heading span,
.client-fields input,
.client-fields textarea,
.quotation-meta label,
.quotation-meta input,
.quotation-meta .reference-box,
.budget-subject label,
.budget-subject input,
.items-section th,
.items-section input,
.items-section textarea,
.items-section .line-total,
.conditions label,
.conditions input,
.conditions textarea,
.document-footer {
  font-size: calc(9px + 2pt);
}
.document-footer {
  margin-top: 7mm;
  padding-top: 0;
  border: 0;
  color: #40393c;
  font-size: 8.5px;
  text-align: center;
}
.document-footer p {
  max-width: 150mm;
  margin: 0 auto 3mm;
  line-height: 1.35;
}
.document-footer small {
  display: block;
  margin: 0;
  padding: 2.5mm 0 0;
  border-top: 1px solid var(--quote-blue);
  color: #40393c;
  font-size: 8.5px;
}
.document-footer b {
  margin: 0 3mm;
  font-weight: 400;
}

@page { size: A4; margin: 0; }
@media print {
  #dataSafetyBar,
  .data-safety-bar {
    display: none !important;
  }
  .budget-sheet {
    width: 210mm;
    min-height: 297mm;
    padding: 12mm 14mm 8mm;
  }
  .document-head {
    grid-template-columns: 88mm 1fr;
  }
  .client-fields,
  .quotation-meta input,
  .quotation-meta .reference-box,
  .items-section td,
  .items-section tbody tr:nth-child(odd) td,
  .items-section tbody tr:nth-child(even) td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .items-section tbody tr:only-child td {
    height: 82mm;
  }
  .document-footer {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
