/* Proposta comercial (impressão) — CSS global (não isolation). Espelha o artifact aprovado
   (Orçamento — Impressão). O bundle de CSS isolation do Blazor está desligado no App.razor, por
   isso a impressão vive aqui como CSS global, igual ao resto do app. */
.wf-imp {
    --imp-band: var(--wf-brand-navy, #0E1C30);
    --imp-accent: var(--wf-brand-accent, #2B7FD9);
    --imp-line: var(--wf-border, #E4E8EE);
    --imp-faint: var(--wf-text-subtle, #8A96A8);
    background: #eef1f5;
    padding: 16px 12px;
}
.wf-imp * { box-sizing: border-box; }
.wf-imp-sheet {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    color: var(--wf-text, #16202E);
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
    overflow: hidden;
    font-size: 13px;
}
.wf-imp-band {
    background: var(--imp-band);
    color: #fff;
    padding: 24px 36px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}
.wf-imp-band .brand { display: flex; flex-direction: column; gap: 8px; }
.wf-imp-logo { max-height: 44px; max-width: 170px; object-fit: contain; }
.wf-imp-wordmark { font-size: 20px; font-weight: 700; letter-spacing: -.4px; }
.wf-imp-co { font-size: 11px; color: rgba(255, 255, 255, .65); line-height: 1.55; }
.wf-imp-doc { text-align: right; flex-shrink: 0; }
.wf-imp-doc .t { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, .55); font-weight: 600; }
.wf-imp-doc .n { font-size: 21px; font-weight: 700; font-family: var(--wf-font-mono); letter-spacing: -.5px; margin-top: 3px; }
.wf-imp-doc .m { font-size: 11px; color: rgba(255, 255, 255, .72); margin-top: 8px; line-height: 1.7; }
.wf-imp-meta { display: grid; grid-template-columns: 1.4fr 1fr; border-bottom: 1px solid var(--imp-line); }
.wf-imp-meta .box { padding: 16px 36px; }
.wf-imp-meta .box + .box { border-left: 1px solid var(--imp-line); }
.wf-imp-eye { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--imp-accent); font-weight: 700; margin-bottom: 8px; }
.wf-imp-forte { font-size: 14px; font-weight: 600; }
.wf-imp-linha { font-size: 11.5px; color: var(--wf-text-muted, #42506A); line-height: 1.7; margin-top: 3px; }
.wf-imp-facts { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 11.5px; }
.wf-imp-facts dt { color: var(--imp-faint); }
.wf-imp-facts dd { margin: 0; text-align: right; font-weight: 600; }
.wf-imp-body { padding: 20px 36px 8px; }
.wf-imp-sec { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 6px; }
.wf-imp-sec .k { font-size: 12.5px; font-weight: 700; }
.wf-imp-sec .c { font-size: 11px; color: var(--imp-faint); }
.wf-imp-sec .rule { flex: 1; height: 1px; background: var(--imp-line); }
.wf-imp-tabela { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.wf-imp-tabela th { text-align: left; font-size: 9.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--imp-faint); font-weight: 700; padding: 7px 8px; border-bottom: 1.5px solid var(--imp-line); }
.wf-imp-tabela td { padding: 8px; border-bottom: 1px solid var(--wf-border-subtle, #EEF1F5); vertical-align: top; }
.wf-imp-tabela th.n, .wf-imp-tabela td.n { text-align: right; }
.wf-imp-tabela td.n { font-family: var(--wf-font-mono); }
.wf-imp-cod { font-family: var(--wf-font-mono); font-size: 10.5px; color: var(--imp-faint); }
.wf-imp-sub { text-align: right; font-size: 11.5px; font-weight: 600; margin-top: 6px; }
.wf-imp-cond { padding: 14px 36px 8px; }
.wf-imp-grid2 { display: grid; grid-template-columns: 1fr 300px; gap: 26px; align-items: start; }
.wf-imp-cond dl { display: grid; grid-template-columns: 140px 1fr; gap: 5px 12px; font-size: 11.5px; margin: 0; }
.wf-imp-cond dt { color: var(--imp-faint); }
.wf-imp-cond dd { margin: 0; font-weight: 600; }
.wf-imp-fatur { background: var(--wf-info-bg, #EAF3FC); border-radius: 9px; padding: 12px 15px; margin-bottom: 14px; }
.wf-imp-fatur .h { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--imp-accent); font-weight: 700; margin-bottom: 6px; }
.wf-imp-fatur .r { display: flex; justify-content: space-between; font-size: 11.5px; padding: 2px 0; }
.wf-imp-totcard { background: var(--imp-band); color: #fff; border-radius: 12px; padding: 16px 20px; }
.wf-imp-totcard .r { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; color: rgba(255, 255, 255, .72); }
.wf-imp-totcard .r .v { font-family: var(--wf-font-mono); color: #fff; }
.wf-imp-totcard .div { height: 1px; background: rgba(255, 255, 255, .14); margin: 6px 0; }
.wf-imp-totcard .grand { padding-top: 8px; }
.wf-imp-totcard .grand .l { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, .6); font-weight: 600; }
.wf-imp-totcard .grand .v { font-family: var(--wf-font-mono); font-size: 24px; font-weight: 700; margin-top: 2px; }
.wf-imp-obs { padding: 16px 36px 8px; }
.wf-imp-obs .lab { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--imp-faint); font-weight: 700; margin-bottom: 8px; }
.wf-imp-obs p { font-size: 11px; color: var(--wf-text-muted, #42506A); line-height: 1.65; margin: 0 0 9px; }
.wf-imp-warn { background: #FEF7E6; border-left: 3px solid #D97706; border-radius: 0 6px 6px 0; padding: 9px 12px; font-size: 10.5px; color: #7a4d06; line-height: 1.55; }
.wf-imp-aceite { border-top: 1px solid var(--imp-line); margin-top: 14px; padding: 16px 36px 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.wf-imp-aceite .txt { font-size: 10px; color: var(--imp-faint); max-width: 400px; line-height: 1.55; }
.wf-imp-sign { text-align: center; min-width: 220px; }
.wf-imp-sign .ln { border-top: 1px solid var(--wf-text, #16202E); padding-top: 6px; font-size: 10.5px; color: var(--wf-text-muted, #42506A); }

@media print {
    /* Margem de página enxuta (o padrão do navegador é ~25mm, deixando muito espaço vazio). */
    @page { margin: 8mm 10mm; }

    /* Imprime SÓ a proposta: esconde todo o shell do app (sidebar/topbar/abas/editor) e traz a
       folha pro topo. Sem isso, o print sai com o cabeçalho do app junto. */
    body * { visibility: hidden; }
    .wf-imp, .wf-imp * { visibility: visible; }
    .wf-imp {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff;
        padding: 0;
        /* Navegadores removem cores de fundo no print por padrão; sem isto o band escuro, o card de
           totais e os boxes saem sem preenchimento (parecendo "sem estilo"). É herdado pelos filhos. */
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    .wf-imp-sheet { box-shadow: none; border-radius: 0; max-width: none; }
    /* Padding interno menor no print (na tela mantém o respiro de "papel"). */
    .wf-imp-band { padding: 16px 20px; }
    .wf-imp-body { padding: 12px 20px 4px; }
    .wf-imp-meta .box { padding: 12px 20px; }
    .wf-imp-cond, .wf-imp-obs { padding: 8px 20px; }
    .wf-imp-aceite { padding: 12px 20px 8px; }
    thead { display: table-header-group; }
    tr { page-break-inside: avoid; }
    .wf-imp-fatur, .wf-imp-totcard, .wf-imp-aceite, .wf-imp-obs p, .wf-imp-warn { page-break-inside: avoid; }
    .wf-imp-sec { page-break-after: avoid; }
}
