@font-face { font-family: 'IBM Plex Sans'; src: url('../assets/fonts/IBMPlexSans-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../assets/fonts/IBMPlexSans-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../assets/fonts/IBMPlexSans-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../assets/fonts/IBMPlexSans-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --doc-papel: #FFFFFF;
  --doc-tinta: #15181C;
  --doc-tinta-2: #3F4650;
  --doc-tinta-3: #5B636D;
  --doc-linha: #D5D9DE;
  --doc-faixa: #F4F5F7;
  --doc-galho: #F88F22;
  --doc-destaque: #15181C;
  --doc-sombra: 0 1px 3px rgba(21, 24, 28, .18), 0 14px 40px rgba(21, 24, 28, .22);
}
.doc-folhas {
  --escala: 1;
  display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%;
}
.folha-caixa { flex: none; zoom: var(--escala); background: var(--doc-papel); box-shadow: var(--doc-sombra); }
.folha {
  box-sizing: border-box; width: 794px; height: 1123px; overflow: hidden; display: flex; flex-direction: column;
  background: var(--doc-papel); color: var(--doc-tinta); overflow-wrap: anywhere;
  font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 13px; line-height: 1.45; font-variant-numeric: tabular-nums;
}
.doc-regua { position: absolute; top: 0; left: -10000px; visibility: hidden; pointer-events: none; }
.doc-regua .folha { height: auto; }
.folha * { box-sizing: border-box; }
.folha b { font-weight: 600; }
.folha-orcamento { padding: 56px 56px 44px; gap: 22px; }
.folha-layout { padding: 48px 56px 44px; gap: 20px; }

.doc-rotulo { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--doc-tinta-3); }
.doc-rotulo.escuro { color: var(--doc-tinta); }
.doc-rotulo.destaque { color: var(--doc-destaque); }
.galho { display: inline-block; width: 14px; height: 3px; margin-right: 8px; border-radius: 2px; background: var(--doc-galho); vertical-align: middle; }
.doc-sub { color: var(--doc-tinta-2); }
.doc-nota { font-size: 11px; color: var(--doc-tinta-3); margin-top: 2px; }
.forte { font-weight: 600; color: var(--doc-tinta); }
.pedaco { display: inline-block; max-width: 100%; }

.doc-topo { display: flex; flex-direction: column; gap: 22px; }
.doc-cab { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 4px 0 6px; }
.doc-emp { display: flex; gap: 22px; align-items: center; min-width: 0; }
.doc-logo { display: block; flex: none; width: 128px; height: 48px; object-fit: contain; object-position: left center; }
.doc-logo-nome {
  width: auto; min-width: 128px; max-width: 280px; height: auto; min-height: 48px;
  display: flex; align-items: center; font-size: 17px; font-weight: 600; line-height: 1.2; color: var(--doc-tinta); overflow-wrap: anywhere;
}
.doc-logo.pequena { width: 110px; height: 40px; }
.doc-logo-nome.pequena { width: auto; min-height: 40px; font-size: 14px; }
.doc-emp-dados { font-size: 12px; color: var(--doc-tinta-2); line-height: 1.65; padding-left: 22px; border-left: 1px solid var(--doc-linha); min-width: 0; }
.doc-emp-nome { font-size: 15px; color: var(--doc-tinta); }
.doc-num { flex: none; display: flex; flex-direction: column; gap: 4px; text-align: right; }
.doc-num-n { font-size: 28px; font-weight: 600; line-height: 1.1; }
.doc-num-data { font-size: 12px; color: var(--doc-tinta-2); }
.doc-traco { flex: none; height: 2px; background: var(--doc-destaque); }

.doc-cli { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.doc-cli .doc-rotulo { margin-bottom: 4px; }
.doc-cli-nome { font-size: 15px; color: var(--doc-tinta); }

.doc-tbl { width: 100%; table-layout: fixed; border-collapse: collapse; }
.doc-tbl .c-ordem { width: 28px; }
.doc-tbl .c-qtd { width: 64px; }
.doc-tbl .c-unit { width: 112px; }
.doc-tbl .c-tot { width: 120px; }
.doc-tbl .doc-desc { overflow-wrap: anywhere; word-break: normal; }
.doc-tbl thead tr { border-bottom: 1px solid var(--doc-destaque); }
.doc-tbl th { text-align: left; padding: 8px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--doc-tinta-3); }
.doc-tbl td { padding: 10px 8px; vertical-align: top; }
.doc-tbl tbody tr { border-bottom: 1px solid var(--doc-linha); break-inside: avoid; }
.doc-tbl th:first-child, .doc-tbl td:first-child { padding-left: 0; }
.doc-tbl th:last-child, .doc-tbl td:last-child { padding-right: 0; }
.doc-tbl .ordem { color: var(--doc-tinta-3); }
.doc-tbl .n { text-align: right; white-space: nowrap; }
.doc-total { display: flex; justify-content: flex-end; margin-top: 10px; }
.doc-total > div { width: 260px; display: flex; justify-content: space-between; align-items: baseline; }
.doc-total span { font-size: 12px; font-weight: 600; color: var(--doc-tinta-2); }
.doc-total b { font-size: 17px; }

.doc-pe { margin-top: auto; display: flex; flex-direction: column; gap: 18px; }
.doc-cond {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px;
  padding-top: 16px; border-top: 1px solid var(--doc-linha); font-size: 12px; color: var(--doc-tinta-2);
}
.doc-cond > .doc-rotulo, .doc-cond-obs { grid-column: 1 / -1; }
.doc-cond-rot { font-size: 11px; color: var(--doc-tinta-3); }
.doc-cond-item + .doc-cond-item { margin-top: 8px; }
.doc-duvidas {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 16px; border-radius: 6px; background: var(--doc-faixa); font-size: 12px; color: var(--doc-tinta-2);
}
.doc-duvidas b { color: var(--doc-tinta); text-align: right; }
.doc-rodape {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 10px; border-top: 1px solid var(--doc-linha); font-size: 11px; color: var(--doc-tinta-3);
}
.doc-continua { margin-top: auto; text-align: right; font-size: 11px; color: var(--doc-tinta-3); }
.folha-orcamento .doc-rodape { margin-top: 0; }
.folha-layout .doc-rodape { margin-top: auto; }
.doc-assinatura { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.doc-assinatura img { height: 11px; width: auto; display: block; }

.lay-cab { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--doc-destaque); }
.lay-emp { display: flex; gap: 14px; align-items: center; min-width: 0; font-size: 14px; }
.lay-cab-dir { text-align: right; font-size: 12px; color: var(--doc-tinta-2); }
.lay-area {
  height: 640px; display: flex; align-items: center; justify-content: center; padding: 24px;
  border: 1px solid var(--doc-linha); border-radius: 8px; background: var(--doc-faixa);
}
.lay-img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.lay-info { display: flex; flex-direction: column; gap: 14px; }
.lay-info .doc-rotulo { margin-bottom: 4px; }
.lay-desc { font-size: 16px; font-weight: 600; line-height: 1.35; }
.lay-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lay-val { font-size: 18px; font-weight: 600; }
.lay-nota { font-size: 12px; color: var(--doc-tinta-2); }

@page { size: A4 portrait; margin: 0; }
@media print {
  html, body { background: var(--doc-papel) !important; }
  .shell { display: block !important; }
  .main, .content { padding: 0 !important; margin: 0 !important; max-width: none !important; background: var(--doc-papel) !important; }
  .doc-folhas { --escala: 1 !important; display: block; gap: 0; }
  .folha-caixa { zoom: 1 !important; box-shadow: none; break-after: page; }
  .folha-caixa:last-child { break-after: auto; }
  .folha { width: 210mm; height: 297mm; }
  .doc-regua { display: none; }
  .doc-folhas, .doc-folhas * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
