/* Folha A4 da proposta. As alturas de cabeçalho/rodapé acompanham CAP_FIRST/CAP_OTHER em documento.js */
.sheet {
  --navy: #0b2545;
  --navy-2: #143660;
  --steel: #3a6699;
  --ink: #0f1f38;
  --muted: #64748b;
  --line: #e1e7ef;
  --tint: #eff3f8;
  --tint-2: #f5f8fb;
  --amber: #f5b301;
  width: 210mm;
  height: 297mm;
  background: #fff;
  color: var(--ink);
  font: 400 13px/1.45 Inter, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
:where(.sheet) :where(h1, h2, h3, p) { margin: 0; }
.sheet small { display: block; }

.d-header {
  height: 128px;
  flex: none;
  box-sizing: border-box;
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(107deg, var(--navy) 0 58%, var(--navy-2) 58% 100%);
  border-bottom: 4px solid var(--steel);
  color: #fff;
}
.d-header img { height: 66px; width: auto; display: block; }
.d-company { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 11.5px; color: #c6d3e3; }
.d-company strong { color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.d-header-mini { height: 60px; border-bottom-width: 3px; }
.d-header-mini img { height: 32px; }

.d-body { flex: 1; min-height: 0; box-sizing: border-box; padding: 26px 44px 10px; }
.d-body > * { box-sizing: border-box; }

.d-footer {
  height: 40px;
  flex: none;
  box-sizing: border-box;
  margin: 0 44px;
  border-top: 2px solid var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.d-footer strong { color: var(--navy); font-weight: 700; }

.d-label, .d-eyebrow, .d-thead {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.d-eyebrow { color: var(--steel); font-weight: 700; }
.d-muted { color: var(--muted); }

.d-intro { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.d-intro h1 { font: 800 40px/1.1 Rubik, Arial, sans-serif; color: var(--navy); margin-top: 6px; }
.d-subtitle { color: var(--muted); font-size: 14px; margin-top: 3px; max-width: 480px; }
.d-meta { display: grid; grid-template-columns: auto auto; gap: 7px 16px; align-items: baseline; text-align: right; }
.d-meta strong { font: 700 16px Rubik, Arial, sans-serif; color: var(--navy); }

.d-client { display: grid; grid-template-columns: 1fr 236px; gap: 22px; margin-bottom: 22px; }
.d-client-card { background: var(--tint); border-radius: 10px; padding: 18px 20px; }
.d-client-card h3 { font: 700 19px/1.25 Rubik, Arial, sans-serif; color: var(--navy); margin: 7px 0 4px; }
.d-client-card h3.d-empty { color: #aab6c6; }
.d-client-card p { font-size: 12.5px; line-height: 1.6; }
.d-client-side { display: flex; flex-direction: column; justify-content: center; }
.d-client-side > div { padding: 11px 0; }
.d-client-side > div + div { border-top: 1px solid var(--line); }
.d-client-side strong { display: block; font: 700 18px/1.3 Rubik, Arial, sans-serif; color: var(--navy); margin-top: 4px; }
.d-client-side small { color: var(--muted); font-size: 11.5px; }

.d-section-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.d-section-title h2, .d-terms h2 { font: 700 16px Rubik, Arial, sans-serif; color: var(--navy); }
.d-section-title em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 13px; }

.d-grid { display: grid; grid-template-columns: 44px 1fr 58px 112px 118px; align-items: center; column-gap: 8px; }
.d-grid .c { text-align: center; }
.d-grid .r { text-align: right; }
.d-thead { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 7px 7px 0 0; }
.d-row { padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.d-roomy { padding: 19px 16px; }
.d-tint { background: var(--tint-2); }
.d-row-empty { color: #94a3b8; padding: 26px 16px; }
.d-num { color: var(--muted); }
.d-desc { display: flex; align-items: center; gap: 12px; min-width: 0; }
.d-desc img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 6px; flex: none; }
.d-desc strong { display: block; font: 700 14px/1.3 Rubik, Arial, sans-serif; color: var(--navy); }
.d-desc small { color: var(--steel); font-size: 12px; font-weight: 600; margin-top: 2px; }
.d-line-total { font: 700 14px Rubik, Arial, sans-serif; color: var(--navy); }

.d-totals { display: grid; grid-template-columns: minmax(0, 1fr) 280px; margin: 20px 0; border-radius: 10px; background: var(--tint); }
.d-totals-left { display: flex; align-items: center; padding: 16px 0; }
.d-totals-left > div { flex: 1 1 0; min-width: 0; padding: 0 20px; }
.d-totals-left .d-label { white-space: nowrap; letter-spacing: .1em; }
.d-totals-left > div:first-child:nth-last-child(3), .d-totals-left > div:first-child:nth-last-child(3) ~ div { padding: 0 14px; }
.d-totals-left > div + div { border-left: 1px solid #d3dbe6; }
.d-totals-left strong { display: block; font: 700 15px Rubik, Arial, sans-serif; color: var(--navy); margin-top: 8px; white-space: nowrap; }
.d-totals-card { background: var(--navy); color: #fff; border-radius: 10px; padding: 15px 20px; }
.d-totals-card .d-label { color: #c6d3e3; white-space: nowrap; }
.d-totals-card > strong { display: block; text-align: right; font: 700 31px/1.15 Rubik, Arial, sans-serif; margin-top: 8px; white-space: nowrap; }
.d-economy { display: table; margin: 6px 0 0 auto; font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--amber); color: var(--navy); padding: 2px 9px; border-radius: 20px; white-space: nowrap; }

.d-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 18px; }
.d-terms-solo { grid-template-columns: 1fr; }
.d-pay { font: 700 18px/1.3 Rubik, Arial, sans-serif; color: var(--navy); margin-top: 7px; }
.d-terms-main .d-muted { font-size: 12px; }
.d-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-top: 14px; }
.d-fact strong { display: block; font-weight: 600; font-size: 12.5px; margin-top: 3px; line-height: 1.35; }
.d-bank { background: var(--tint); border-radius: 10px; padding: 16px 20px; align-self: start; }
.d-bank > div + div { border-top: 1px solid #d3dbe6; margin-top: 12px; padding-top: 12px; }
.d-bank strong { display: block; font-size: 15px; font-weight: 700; margin-top: 4px; }
.d-bank small { color: var(--muted); font-size: 11.5px; }
.d-bank p { margin-top: 4px; font-size: 13px; }

.d-notes { margin-bottom: 14px; border-left: 3px solid var(--steel); padding: 2px 0 2px 14px; }
.d-notes p { white-space: pre-wrap; margin-top: 4px; font-size: 12.5px; }

/* Folha de simulações */
.d-break { height: 0; }
.d-sim-top { display: flow-root; margin-bottom: 20px; }
.d-sim-client { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 14px; background: var(--tint); border-radius: 10px; padding: 14px 20px; }
.d-sim-client strong { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; }
.d-sim-client .d-name strong { font: 700 16px/1.25 Rubik, Arial, sans-serif; color: var(--navy); }
.d-sim { display: flow-root; margin-bottom: 22px; }
.d-sim-head { margin-bottom: 8px; }
.d-sim-head h2 { font: 700 16px Rubik, Arial, sans-serif; color: var(--navy); }
.d-sim-head em { font-style: normal; font-weight: 500; color: var(--steel); font-size: 14px; }
.d-sim-sum { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 9px; margin-bottom: 10px; }
.d-sim-sum > div { padding: 9px 16px; }
.d-sim-sum > div + div { border-left: 1px solid var(--line); }
.d-sim-sum strong { display: block; font: 700 15px Rubik, Arial, sans-serif; color: var(--navy); margin-top: 3px; }
.d-sgrid { display: grid; grid-template-columns: minmax(0, 1.25fr) 74px minmax(0, 1.5fr) minmax(0, 1fr); column-gap: 10px; align-items: center; }
.d-sgrid.d-with-entry { grid-template-columns: minmax(0, 1.15fr) 66px minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr); }
.d-sgrid .r { text-align: right; }
.d-sim .d-thead { padding: 8px 14px; }
.d-srow { padding: 3px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; line-height: 1.3; }
.d-srow > strong { font: 600 12.5px Rubik, Arial, sans-serif; color: var(--navy); }
.d-srow b { font-weight: 600; color: var(--ink); }
.d-srow .d-total { font: 700 13px Rubik, Arial, sans-serif; color: var(--navy); }
.d-plan-title { margin: 4px 0 8px; }
.d-free { color: #1d7a4a; }
.d-plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.d-plan { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border: 1px solid var(--line); background: var(--tint-2); border-radius: 8px; padding: 8px 12px; }
.d-plan span { font: 700 14px Rubik, Arial, sans-serif; color: var(--navy); white-space: nowrap; }
.d-plan strong { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.d-plan-pix { grid-column: span 2; background: var(--navy); border-color: var(--navy); align-items: center; }
.d-plan-pix span { font: 600 11px Inter, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #c6d3e3; }
.d-plan-pix strong { font: 700 17px Rubik, Arial, sans-serif; color: #fff; }
.d-sim-empty { padding: 10px 14px; color: var(--muted); font-size: 12px; }
.d-sim-note { font-size: 11px; color: var(--muted); margin-bottom: 10px; }

/* Versão compacta, aplicada só quando ela faz a proposta caber em menos páginas */
.d-dense .d-intro { margin-bottom: 10px; }
.d-dense .d-intro h1 { font-size: 28px; margin-top: 2px; }
.d-dense .d-client { margin-bottom: 12px; }
.d-dense .d-client-card { padding: 9px 18px; }
.d-dense .d-client-card h3 { font-size: 17px; margin: 3px 0 2px; }
.d-dense .d-client-side > div { padding: 4px 0; }
.d-dense .d-client-side strong { font-size: 16px; margin-top: 1px; }
.d-dense .d-row, .d-dense .d-roomy { padding-top: 6px; padding-bottom: 6px; }
.d-dense .d-totals { margin: 12px 0; }
.d-dense .d-totals-left { padding: 10px 0; }
.d-dense .d-totals-card { padding: 9px 20px; }
.d-dense .d-totals-card > strong { font-size: 26px; margin-top: 3px; }
.d-dense .d-economy { margin-top: 3px; }
.d-dense .d-terms { margin-bottom: 8px; }
.d-dense .d-facts { margin-top: 6px; gap: 6px 18px; }
.d-dense .d-bank { padding: 10px 18px; }
.d-dense .d-bank > div + div { margin-top: 7px; padding-top: 7px; }
.d-dense .d-notes { margin-bottom: 4px; }

/* ---------- Contratos ----------
   Mesma estrutura nos dois designs (texto corrido, tabelas, cláusulas):
   .k-min = Simples (preto e branco)   .k-tg = Design Tigre (faixa fina e detalhes em azul) */
.m-intro p { margin-top: 3px !important; }
.m-strip span + span, .m-facts span + span { margin-left: 22px; }
.m-table { width: 100%; border-collapse: collapse; }
.m-table th, .m-table td { text-align: left; vertical-align: top; }
.m-table .r { text-align: right; white-space: nowrap; }
.m-party { text-align: justify; }
.k-part { margin-bottom: 8px; }
.k-clause { text-align: justify; }
.k-sign { padding-top: 6px; }
.k-place { text-align: center; }
.k-signers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 48px; }
.k-signer { text-align: center; }
.k-signer strong, .k-signer span, .k-signer small { display: block; }
.k-missing { color: #b42318; background: #fdeeec; border-radius: 3px; padding: 0 3px; font-weight: 600; }
.sheets .k-clause[data-clause] { cursor: pointer; border-radius: 3px; }
.sheets .k-clause[data-clause]:hover { background: #fff7dc; box-shadow: 0 0 0 4px #fff7dc; }

/* Simples */
.sheet.k-min { color: #000; font: 400 14.5px/1.42 Carlito, Calibri, 'Segoe UI', Arial, sans-serif; }
.k-min .d-body { padding: 64px 76px 10px; }
.k-min .m-intro { text-align: center; margin-bottom: 14px; }
.k-min .m-intro h1 { font: 700 20px/1.25 Carlito, Calibri, 'Segoe UI', Arial, sans-serif; color: #000; }
.k-min .m-strip { margin-bottom: 4px !important; }
.k-min .m-sec { font: 700 14.5px/1.3 Carlito, Calibri, 'Segoe UI', Arial, sans-serif; color: #000; margin: 16px 0 8px !important; }
.k-min .m-party { margin-bottom: 8px !important; }
.k-min .m-table th, .k-min .m-table td { border: 1px solid #000; padding: 5px 9px; }
.k-min .m-table th, .k-min .m-table tfoot td, .k-min .m-table .m-strong td { font-weight: 700; }
.k-min .m-empty { color: #777; }
.k-min .m-facts { margin-top: 8px !important; }
.k-min .k-pix { margin-top: 10px !important; }
.k-min .k-clause { line-height: 1.45; margin-bottom: 8px !important; }
.k-min .k-lead { margin-bottom: 6px !important; }
.k-min .k-place { margin: 10px 0 4px !important; }
.k-min .k-signer { padding-top: 40px; }
.k-min .k-line { border-top: 1px solid #000; margin-bottom: 4px; }
.k-min .k-signer strong { font-size: 13.5px; line-height: 1.3; }
.k-min .k-signer span { font-size: 13.5px; }
.k-min .k-signer small { color: #333; font-size: 12px; }
.m-footer { height: 40px; flex: none; box-sizing: border-box; margin: 0 76px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #555; }

/* Design Tigre: a essência da marca (faixa com logo, azul-marinho, Rubik) num corpo de contrato */
.sheet.k-tg { font: 400 12.5px/1.55 Inter, Arial, sans-serif; color: #1e293b; }
.k-tg .d-body { padding: 26px 56px 10px; }
.k-tg .d-footer { margin: 0 56px; border-top-width: 1px; }
.k-tg .d-company strong { font-size: 11.5px; }
.k-tg .m-intro { border-bottom: 2px solid var(--navy); padding-bottom: 10px; margin-bottom: 10px; }
.k-tg .m-intro h1 { font: 700 19px/1.25 Rubik, Arial, sans-serif; color: var(--navy); letter-spacing: .01em; }
.k-tg .m-sub { color: var(--muted); font-size: 12.5px; }
.k-tg .m-ref { font: 600 12.5px Rubik, Arial, sans-serif; color: var(--steel); }
.k-tg .m-strip { font-size: 12px; color: #334155; margin-bottom: 2px !important; }
.k-tg .m-strip b, .k-tg .m-facts b, .k-tg .m-party b, .k-tg .k-clause b, .k-tg .k-pix b { color: var(--navy); font-weight: 700; }
.k-tg .m-sec { display: flex; align-items: center; gap: 10px; font: 700 12px Rubik, Arial, sans-serif; letter-spacing: .07em; color: var(--navy); margin: 16px 0 8px !important; }
.k-tg .m-sec::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.k-tg .m-party { margin-bottom: 6px !important; }
.k-tg .m-table { font-size: 12px; }
.k-tg .m-table th, .k-tg .m-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.k-tg .m-table thead th { font: 600 10px Inter, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); border-bottom: 1.5px solid var(--navy); padding-top: 4px; }
.k-tg .m-table tfoot td, .k-tg .m-table .m-strong td { font: 700 12.5px Rubik, Arial, sans-serif; color: var(--navy); border-top: 1.5px solid var(--navy); border-bottom: 0; }
.k-tg .m-table .m-strong td { border-bottom: 0; }
.k-tg .m-empty { color: #94a3b8; }
.k-tg .m-facts { margin-top: 8px !important; font-size: 12px; }
.k-tg .k-pix { margin-top: 10px !important; font-size: 12px; border-left: 3px solid var(--steel); padding: 1px 0 1px 11px; }
.k-tg .k-clause { margin-bottom: 7px !important; }
.k-tg .k-lead { margin-bottom: 4px !important; }
.k-tg .k-place { margin: 10px 0 4px !important; }
.k-tg .k-signer { padding-top: 44px; }
.k-tg .k-line { border-top: 1px solid var(--navy); margin-bottom: 5px; }
.k-tg .k-signer strong { font: 700 11.5px/1.3 Rubik, Arial, sans-serif; color: var(--navy); }
.k-tg .k-signer span { font-size: 11px; color: #334155; }
.k-tg .k-signer small { color: var(--steel); font-size: 10.5px; font-weight: 600; }

/* Compacto: só quando faz o contrato caber em menos páginas.
   d-dense fica na folha impressa ou no corpo da folha de medição. */
.k-min.d-dense .m-sec, .k-min .d-dense .m-sec, .k-tg.d-dense .m-sec, .k-tg .d-dense .m-sec { margin: 10px 0 6px !important; }
.k-min.d-dense .k-clause, .k-min .d-dense .k-clause, .k-min.d-dense .m-party, .k-min .d-dense .m-party { line-height: 1.35; margin-bottom: 6px !important; }
.k-tg.d-dense .k-clause, .k-tg .d-dense .k-clause, .k-tg.d-dense .m-party, .k-tg .d-dense .m-party { line-height: 1.45; margin-bottom: 5px !important; }
.d-dense .m-table th, .d-dense .m-table td { padding-top: 3px; padding-bottom: 3px; }
.d-dense .k-signer { padding-top: 32px !important; }

/* Tamanho da letra do contrato (Menor, Normal, Maior, Grande). */
.k-sheet .d-body > *, .measurer .d-body > * { zoom: var(--kz, 1); }

/* Folha única (declaração de débito e compra): letra e margens menores para caber tudo numa página. */
.sheet.k-one.k-min { font-size: 12px; line-height: 1.28; }
.sheet.k-one.k-tg { font-size: 11px; line-height: 1.35; }
.k-one.k-tg .d-body { padding: 18px 46px 4px; }
.k-one.k-tg .m-intro { padding-bottom: 6px; }
.k-one.k-tg .m-intro h1 { font-size: 16px; }
.k-one.k-tg .k-signer { padding-top: 26px !important; }
.k-one.k-min .d-body { padding: 32px 52px 4px; }
.k-one .m-intro { margin-bottom: 6px !important; }
.k-one.k-min .m-intro h1 { font-size: 16px; }
.k-one .m-sub, .k-one .m-ref { font-size: 11px; margin-top: 1px !important; }
.k-one .m-strip { margin-bottom: 2px !important; }
.k-one .m-sec { margin: 7px 0 4px !important; }
.k-one.k-min .m-sec { font-size: 12.5px; }
.k-one .m-party, .k-one .k-clause { line-height: 1.28 !important; margin-bottom: 3px !important; }
.k-one .m-table { font-size: 11px; }
.k-one .m-table th, .k-one .m-table td { padding: 2px 6px !important; }
.k-one .m-facts { margin-top: 3px !important; }
.k-one .k-sign { padding-top: 0; }
.k-one .k-place { margin: 6px 0 0 !important; }
.k-one .k-signers { gap: 0 36px; }
.k-one .k-signer { padding-top: 26px !important; }
.k-one.k-min .k-signer strong, .k-one.k-min .k-signer span { font-size: 11.5px; line-height: 1.25; }
.k-one.k-min .k-signer small { font-size: 10.5px; }
/* ---------- V2 · Documentos financeiros (demonstrativo e recibos) ----------
   Linguagem de documento financeiro: tons neutros, linhas finas, zebra sutil, valores à direita.
   Só o saldo a pagar e o valor do recibo levam a cor institucional. */
.sheet.fd-sheet { position: relative; font-size: 13.5px; line-height: 1.45; }
.fd-sheet .d-body { padding-top: 24px; }
.fd-blk { display: flow-root; }
.fd-intro { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.fd-intro h1 { font: 700 24px/1.2 Rubik, Arial, sans-serif; margin-top: 4px; }
.fd-intro .d-meta strong { font-size: 14px; }
.fd-client { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 6px 18px; margin-bottom: 18px; }
.fd-client > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fd-client span:not(.d-label) { font-size: 12.5px; overflow-wrap: anywhere; }
.fd-client-name strong { font: 700 15px/1.3 Rubik, Arial, sans-serif; color: var(--navy); }
.fd-sec { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 6px; }
.fd-sec h2 { font: 700 11.5px Rubik, Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.fd-tr { display: grid; column-gap: 10px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.fd-tr .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fd-tr .c { text-align: center; }
.fd-tr small { display: block; color: var(--muted); font-size: 11.5px; }
.fd-tr strong { font-weight: 600; }
.fd-th { font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--navy); padding-top: 2px; }
.fd-th em { font-style: normal; text-transform: none; letter-spacing: 0; }
.fd-zebra { background: var(--tint-2); }
.fd-muted { color: var(--muted); }
.fd-empty { color: var(--muted); }
.fd-items { grid-template-columns: 34px minmax(0, 1fr) 54px 110px 116px; }
.fd-rc { grid-template-columns: 78px 96px 110px minmax(0, 1fr) 116px; }
.fd-itot { display: flex; justify-content: flex-end; gap: 28px; padding: 8px 4px 0; }
.fd-itot > div { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.fd-itot .fd-strong span:last-child { font-weight: 700; color: var(--ink); }
.fd-order { display: flex; align-items: baseline; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fd-order strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.fd-summary { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: stretch; margin: 18px 0 4px; }
.fd-summary-lines { display: flex; flex-direction: column; justify-content: center; border-top: 1px solid var(--line); }
.fd-summary-lines > div { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.fd-summary-lines strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.fd-balance { background: var(--navy); color: #fff; border-radius: 8px; padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; }
.fd-balance .d-label { color: #c6d3e3; }
.fd-balance strong { font: 700 26px/1.15 Rubik, Arial, sans-serif; text-align: right; margin-top: 6px; font-variant-numeric: tabular-nums; }
.fd-balance small { text-align: right; color: #c6d3e3; font-size: 11.5px; margin-top: 3px; }
.fd-accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fd-acc { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fd-acc strong { font-size: 14px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.fd-acc p { font-size: 12px; }
.fd-acc small { color: var(--muted); font-size: 11.5px; }
.fd-acc-main { border: 1.5px solid var(--navy); }
.fd-acc-val { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.fd-acc-val strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.fd-acc-tag { align-self: flex-start; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.fd-notes { margin-top: 18px; }
/* Instruções de pagamento */
.pg-card { display: grid; grid-template-columns: 30px minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 14px; align-items: start; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; }
.pg-num { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--navy); color: var(--navy); font: 700 13px Rubik, Arial, sans-serif; display: flex; align-items: center; justify-content: center; }
.pg-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pg-val { font: 700 19px/1.2 Rubik, Arial, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; }
.pg-main small { color: var(--muted); font-size: 11.5px; }
.pg-acc { display: flex; flex-direction: column; gap: 3px; min-width: 0; border-left: 1px solid var(--line); padding-left: 14px; }
.pg-key { font-size: 15px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; letter-spacing: .01em; }
.pg-acc p { font-size: 12px; }
.pg-acc b { font-weight: 600; }
.pg-acc small { color: var(--muted); font-size: 11.5px; }
/* Recibo */
.fd-recval { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--navy); color: #fff; border-radius: 8px; padding: 14px 20px; margin: 4px 0 18px; }
.fd-recval .d-label { color: #c6d3e3; }
.fd-recval strong { font: 700 28px/1.15 Rubik, Arial, sans-serif; font-variant-numeric: tabular-nums; }
.fd-recval p { font-size: 12.5px; color: #dbe4ef; }
.fd-recbody { font-size: 14px; line-height: 1.65; text-align: justify; margin-bottom: 14px !important; }
.fd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 22px; border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 10px; }
.fd-facts > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fd-facts span:not(.d-label) { font-size: 12.5px; overflow-wrap: anywhere; }
.fd-sign { margin-top: 26px; }
.fd-place { text-align: right; font-size: 13px; }
.fd-sign-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 36px; align-items: end; margin-top: 46px; }
.fd-signer { text-align: center; }
.fd-signer i { display: block; border-top: 1px solid var(--ink); margin-bottom: 6px; }
.fd-signer strong { display: block; font: 700 13px Rubik, Arial, sans-serif; color: var(--navy); }
.fd-signer small { color: var(--muted); font-size: 11px; }
.fd-stamp { height: 96px; border: 1px dashed #b8c3d1; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #9aa7b8; }
/* Recibo simplificado: uma folha com uma ou duas vias */
.fd-simple { display: block; padding: 0; }
.fd-via { box-sizing: border-box; height: 148mm; padding: 26px 44px 18px; position: relative; display: flex; flex-direction: column; }
.fd-two .fd-via { height: 146mm; }
.fd-via-band { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--navy); color: #c6d3e3; border-radius: 8px; padding: 10px 16px; font-size: 10.5px; text-align: right; line-height: 1.4; }
.fd-via-band img { height: 34px; width: auto; display: block; }
.fd-via-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 16px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.fd-via-code { display: block; font: 700 18px Rubik, Arial, sans-serif; color: var(--navy); margin-top: 3px; }
.fd-via-top small { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.fd-via-val { text-align: right; background: var(--navy); color: #fff; border-radius: 8px; padding: 8px 16px; }
.fd-via-val .d-label { color: #c6d3e3; display: block; }
.fd-via-val strong { font: 700 22px Rubik, Arial, sans-serif; font-variant-numeric: tabular-nums; }
.fd-via .fd-recbody { font-size: 13.5px; margin-bottom: 10px !important; }
.fd-via-note { font-size: 12px; color: var(--muted); }
.fd-via .fd-sign { margin-top: auto; }
.fd-via .fd-sign-row { margin-top: 30px; grid-template-columns: minmax(0, 1fr) 140px; }
.fd-via .fd-stamp { height: 74px; }
.fd-cut { position: relative; height: 0; border-top: 1px dashed #9aa7b8; margin: 0 20px; }
.fd-cut span { position: absolute; left: 50%; top: -8px; transform: translateX(-50%); background: #fff; padding: 0 10px; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #9aa7b8; }
.fd-watermark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; font: 800 120px Rubik, Arial, sans-serif; letter-spacing: .08em; color: rgba(180, 35, 24, .14); transform: rotate(-32deg); }
.fd-sheet .d-row, .fd-tr { break-inside: avoid; }

@media print {
  @page { size: A4; margin: 0; }
  .sheet { break-after: page; height: 296.8mm; }
  .sheet:last-child { break-after: auto; }
}

/* Sinal de reserva no PDF */
.d-deposit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; padding: 9px 12px; border-radius: 8px; background: #fff7df; border: 1px solid #f0d58a; }
.d-deposit-paid { background: #e9f6ef; border-color: #a9d8bd; }
.d-deposit strong { display: block; font: 700 14px Rubik, Arial, sans-serif; color: var(--navy); margin-top: 2px; }
.d-deposit small { display: block; font-size: 10.5px; color: #4b5563; margin-top: 1px; }
