/* Modelos grátis do Xefo (07/11/2026): formulário + prévia ao vivo do documento. Paleta Âmbar (brand-2026.css). */
.md-anchor { scroll-margin-top: 100px; }
.md-h1 { max-width: 900px; }
.md-intro { max-width: 760px !important; }
.md-intro p { margin: 0 0 10px; }
.md-answer { background: #fff; border: 1px solid #f1e3cf; border-left: 4px solid var(--xf-o); border-radius: 16px; padding: 14px 18px; margin-top: 18px; max-width: 760px; font-size: 15.5px; line-height: 1.6; color: var(--xf-ink); }
.md-upd { display: block; margin-top: 14px; font-size: 12.5px; color: var(--xf-muted); }

.md-wrap { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 28px; align-items: start; }
.md-form { background: #fff; border: 1px solid var(--xf-line); border-radius: 22px; padding: 22px; box-shadow: 0 18px 50px rgba(27,45,66,.07); position: sticky; top: 96px; max-height: calc(100vh - 110px); overflow: auto; }
.md-form-h { font-size: 18px; font-weight: 800; margin: 0 0 4px; color: var(--xf-ink); }
.md-hint { font-size: 13px; color: var(--xf-muted); margin: 0 0 14px; line-height: 1.5; }
.md-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.mfld { display: block; margin: 0; min-width: 0; grid-column: 1 / -1; }
.mfld > span { display: block; font-weight: 600; color: var(--xf-ink); font-size: 13px; margin-bottom: 4px; }
.mfld > span i { color: var(--xf-o); font-style: normal; }
.mfld small { display: block; font-size: 11.5px; color: var(--xf-muted); margin-top: 3px; line-height: 1.4; }
.mfld input:not([type=checkbox]), .mfld select, .mfld textarea { width: 100%; min-width: 0; border: 1px solid #e6d9c6; border-radius: 10px; padding: 8px 10px; font-size: 15px; color: var(--xf-ink); background: #FFFCF7; font-family: inherit; }
.mfld textarea { resize: vertical; line-height: 1.45; }
.mfld input:focus, .mfld select:focus, .mfld textarea:focus { outline: 2px solid rgba(240,90,30,.35); border-color: var(--xf-o); }
.mfld-ck { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: var(--xf-ink); }
.mfld-ck input { width: 18px; height: 18px; accent-color: var(--xf-o); }
.mfld-ck small { flex-basis: 100%; }
.md-form-acts { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.md-link { background: none; border: 0; padding: 4px 0; color: var(--xf-o); font-weight: 600; font-size: 13.5px; cursor: pointer; text-align: left; }
.md-link:hover { text-decoration: underline; }
.md-priv { font-size: 12px; color: var(--xf-muted); margin: 10px 0 0; }

.md-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.md-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.md-btns .xf-btn { padding: 9px 14px; font-size: 14px; }
.md-hint-doc { margin-bottom: 10px; }
.md-paper-wrap { background: #EDE6DA; border-radius: 22px; padding: 22px; }

/* ---------- Documento (prévia, impressão e Word usam a mesma estrutura) ---------- */
.md-doc { background: #fff; color: #1f2937; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.45; padding: 34px 36px; border-radius: 6px; box-shadow: 0 10px 30px rgba(27,45,66,.12); max-width: 820px; margin: 0 auto; overflow-wrap: anywhere; }
.md-doc[data-orient="paisagem"] { max-width: 1060px; }
.md-cab { border-bottom: 2px solid #1B2D42; padding-bottom: 10px; margin-bottom: 14px; }
.md-tit { font-size: 19px; font-weight: 700; color: #1B2D42; letter-spacing: .2px; text-transform: uppercase; }
.md-sub { font-size: 13.5px; color: #4a5868; margin-top: 3px; }
.md-h3 { font-size: 14px; font-weight: 700; color: #1B2D42; margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .3px; }
.md-txt p, .md-nota p { margin: 0 0 8px; }
.md-txt { margin: 8px 0; }
.md-nota { font-size: 11.5px; color: #4a5868; border-top: 1px dashed #c9c2b6; padding-top: 8px; margin-top: 12px; }
.md-lista { margin: 4px 0 8px; padding-left: 22px; }
.md-lista li { margin-bottom: 4px; }
.md-info { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.md-info th, .md-info td { border: 1px solid #cfc8bc; padding: 5px 7px; text-align: left; vertical-align: top; font-size: 12.5px; }
.md-info th { background: #f6f2ec; font-weight: 700; width: 17%; color: #1B2D42; }
.md-info td { width: 33%; }
.mf { color: inherit; }
.mf-vazio { display: inline-block; min-width: 120px; border-bottom: 1px solid #9aa3ae; height: 1em; vertical-align: bottom; }
.md-info .mf-vazio, .md-t .mf-vazio { min-width: 60px; }
.md-doc .mf.md-hl { background: #FFF1D6; border-radius: 3px; }

.md-tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 4px 0; }
.md-t { width: 100%; border-collapse: collapse; }
.md-t th, .md-t td { border: 1px solid #cfc8bc; padding: 0; font-size: 12.5px; vertical-align: middle; }
.md-t thead th { background: #1B2D42; color: #fff; font-weight: 700; padding: 6px 6px; text-align: left; font-size: 11.5px; line-height: 1.25; }
.md-t thead th.md-num { text-align: right; }
.md-t td { height: 28px; }
.md-t .md-num { text-align: right; }
.md-in { width: 100%; min-width: 46px; border: 0; background: transparent; padding: 5px 6px; font: inherit; color: inherit; border-radius: 0; }
select.md-in { padding: 4px 2px; -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9aa3ae 50%), linear-gradient(135deg, #9aa3ae 50%, transparent 50%); background-position: calc(100% - 9px) 52%, calc(100% - 5px) 52%; background-size: 4px 4px; background-repeat: no-repeat; padding-right: 14px; }
.md-in:focus { outline: 2px solid rgba(240,90,30,.45); background: #FFFAF0; }
.md-num .md-in { text-align: right; }
.md-calc { display: block; padding: 5px 6px; white-space: nowrap; font-weight: 600; }
.md-tot { background: #f6f2ec; padding: 5px 6px !important; }
.md-tot small { display: block; font-size: 10px; color: #4a5868; font-weight: 600; white-space: normal; }
.md-tot b { display: block; white-space: nowrap; font-size: 13px; }
.md-t tfoot td { background: #f6f2ec; padding: 5px 6px; }
.md-x { width: 26px; border: 0 !important; background: transparent !important; }
.md-del { border: 0; background: none; color: #b0a89c; font-size: 17px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.md-del:hover { color: var(--xf-o); }
.md-add { border: 1.5px dashed #e6c9a3; background: #fff; color: var(--xf-o); border-radius: 10px; padding: 6px 12px; font-weight: 600; font-size: 12.5px; cursor: pointer; margin: 6px 0 4px; font-family: Arial, Helvetica, sans-serif; }
.md-bloco { margin: 6px 0 10px; }

.md-resumo { border-collapse: collapse; margin: 10px 0 6px auto; min-width: 300px; }
.md-resumo th, .md-resumo td { border: 1px solid #cfc8bc; padding: 6px 8px; font-size: 12.5px; }
.md-resumo th { text-align: left; background: #f6f2ec; color: #1B2D42; }
.md-resumo .md-calc { padding: 0; }
.md-resumo .md-dest th, .md-resumo .md-dest td { background: #1B2D42; color: #fff; font-size: 14px; }

.md-ck .md-gr th { background: #f6f2ec; color: #1B2D42; text-align: left; padding: 5px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.md-ckt { padding: 5px 7px !important; line-height: 1.35; }
.md-ckc { width: 52px; text-align: center; }
.md-ck thead th.md-ckc { text-align: center; }
.md-obs { width: 26%; }
.md-box { width: 18px; height: 18px; border: 1.5px solid #7a8696; border-radius: 3px; background: #fff; cursor: pointer; padding: 0; position: relative; vertical-align: middle; }
.md-box[aria-pressed="true"]::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #1B2D42; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.md-t td .md-box { margin: 4px auto; display: block; }

.md-ass { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px 30px; margin-top: 34px; }
.md-ass div { text-align: center; font-size: 12px; color: #4a5868; }
.md-ass span { display: block; border-top: 1px solid #1f2937; margin-bottom: 4px; }

.md-copias { display: grid; gap: 10px; }
.md-copias-1 { grid-template-columns: 1fr; }
.md-copias-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md-copias-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.md-copia { border: 1.5px dashed #9aa3ae; border-radius: 6px; padding: 10px 12px; break-inside: avoid; page-break-inside: avoid; }
.md-copia .md-cab { padding-bottom: 6px; margin-bottom: 8px; }
.md-copia .md-tit { font-size: 14px; }
.md-copia .md-info th { width: 34%; }

/* ---------- Texto abaixo ---------- */
.md-text p, .md-text li { font-size: 16px; line-height: 1.7; color: var(--xf-text); }
.md-steps, .md-care { padding-left: 22px; }
.md-steps li, .md-care li { margin-bottom: 10px; }
.md-extra h2 { font-size: 24px; font-weight: 800; color: var(--xf-ink); margin: 40px 0 10px; }
.md-extra h3 { font-size: 18px; font-weight: 700; margin: 24px 0 8px; }
.md-extra .xf-table { min-width: 520px; }
.md-extra .md-tw2 { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.md-legal { display: flex; gap: 12px; background: #fff; border: 1px solid #f1e3cf; border-left: 4px solid var(--xf-amber); border-radius: 14px; padding: 14px 16px; margin-top: 30px; font-size: 14.5px; line-height: 1.6; color: var(--xf-ink); }
.md-legal i { color: var(--xf-amber-ink); margin-top: 4px; }
.md-fontes { font-size: 13px; color: var(--xf-muted); margin-top: 18px; }
.md-side { position: sticky; top: 110px; }
.md-card h3 { font-size: 17px; }

/* ---------- Hub ---------- */
.mh-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.mh-nav a { border: 1.5px solid #f1e3cf; background: #fff; color: var(--xf-ink); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 13.5px; }
.mh-nav a:hover { border-color: var(--xf-o); color: var(--xf-o); text-decoration: none; }
.mh-cat { scroll-margin-top: 100px; }
.mh-cat + .mh-cat { margin-top: 46px; }
.mh-cat h2 { font-size: 26px; font-weight: 800; margin: 0 0 4px; }
.mh-cat > p { color: var(--xf-muted); margin: 0 0 18px; }

@media (max-width: 991.98px) {
    .md-wrap { grid-template-columns: minmax(0, 1fr); }
    .md-form { position: static; max-height: none; }
    .md-side { position: static; margin-top: 30px; }
}
@media (max-width: 575.98px) {
    .md-form { padding: 18px 16px; }
    .md-fields { grid-template-columns: minmax(0, 1fr); }
    .md-paper-wrap { padding: 8px; border-radius: 14px; margin: 0 -4px; }
    .md-doc { padding: 18px 14px; font-size: 12.5px; }
    .md-tit { font-size: 16px; }
    .md-info th, .md-info td { display: block; width: auto; border-bottom-width: 0; }
    .md-info tr:last-child td:last-child { border-bottom-width: 1px; }
    .md-info th:empty, .md-info th:empty + td { display: none; }
    .md-resumo { min-width: 0; width: 100%; }
    .md-copias-2, .md-copias-3 { grid-template-columns: minmax(0, 1fr); }
    .md-btns { width: 100%; }
    .md-btns .xf-btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Impressão: só o documento ---------- */
#md-print { display: none; }
@media print {
    body.md-printing > *:not(#md-print) { display: none !important; }
    body.md-printing #md-print { display: block !important; }
    body.md-printing { background: #fff !important; margin: 0 !important; padding: 0 !important; }
    #md-print .md-doc { box-shadow: none; padding: 0; max-width: none; border-radius: 0; font-size: 11.5pt; }
    #md-print .no-print, #md-print .md-add, #md-print .md-x { display: none !important; }
    #md-print .md-t thead th { background: #e9e4dc !important; color: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    #md-print .md-resumo .md-dest th, #md-print .md-resumo .md-dest td { background: #e9e4dc !important; color: #111 !important; }
    #md-print .md-tw { overflow: visible; }
    #md-print tr, #md-print .md-ass, #md-print .md-copia { break-inside: avoid; page-break-inside: avoid; }
    #md-print thead { display: table-header-group; }
    #md-print .md-copias-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    #md-print .md-copias-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
.md-info1 th { width: 34%; } .md-info1 td { width: auto; }
/* Checklist com muitas colunas: o item não espreme; a tabela rola dentro da prévia */
.md-ck .md-ckt { min-width: 170px; }
@media print { #md-print .md-ck .md-ckt { min-width: 0; } }
