/* Isolated business381 presentation. No selectors outside the module/dialog. */
html body .biz381{font:14px/1.45 system-ui,"Segoe UI",Arial,sans-serif!important;color:var(--t-text,#182c40)!important}
html body .biz381[hidden]{display:none!important}
html body .biz381 header,html body .biz381 nav,html body .biz381 footer{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;margin:0 0 12px!important;padding:0!important;background:transparent!important}
html body .biz381 h2{font-size:18px!important;line-height:1.3!important;margin:0!important;color:inherit!important}
html body .biz381 h3{font-size:15px!important;margin:0 0 10px!important;color:inherit!important}
html body .biz381 button{border:1px solid var(--t-line,#ced8e2)!important;background:var(--t-surface,#fff)!important;color:var(--t-text,#182c40)!important;border-radius:7px!important;min-height:34px!important;padding:7px 12px!important;font:inherit!important;width:auto!important;cursor:pointer!important;margin:0!important}
html body .biz381 button[type=submit]{background:var(--t-accent,#1466bb)!important;color:var(--t-accent-text,#fff)!important}
html body .biz381 button:disabled{opacity:.5!important;cursor:not-allowed!important}
html body .biz381 .b381-spacer{flex:1}
html body .biz381 .b381-grid,html body .biz381 .b381-filters{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(175px,1fr))!important;gap:12px!important;align-items:end!important;margin:12px 0!important}
html body .biz381 .b381-customer-wide{grid-column:span 2;min-width:0}
@media(max-width:600px){html body .biz381 .b381-customer-wide{grid-column:span 1}}
html body .biz381 label{display:flex!important;flex-direction:column!important;gap:5px!important;color:inherit!important;margin:0!important;font-weight:500!important}
html body .biz381 :is(input,select,textarea){box-sizing:border-box!important;max-width:100%!important;width:100%!important;min-height:36px!important;border:1px solid var(--t-line,#ced8e2)!important;border-radius:7px!important;padding:7px 9px!important;background:var(--t-input,var(--t-surface,#fff))!important;color:var(--t-text,#182c40)!important;font:inherit!important}
html body .biz381 .b381-check{display:flex!important;flex-direction:row!important;align-items:center!important;gap:9px!important}
html body .biz381 input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px!important;flex:0 0 18px!important}
html body .biz381 details,html body .biz381 .b381-panel,html body .biz381 .b381-contract{border:1px solid var(--t-line,#ced8e2)!important;background:var(--t-surface,#fff)!important;border-radius:9px!important;padding:12px!important;margin:10px 0!important;color:inherit!important}
html body .biz381 details summary{cursor:pointer!important;color:inherit!important}
html body .biz381 .b381-scroll{overflow-x:auto!important;border:1px solid var(--t-line,#ced8e2)!important;border-radius:9px!important;margin:12px 0!important}
html body .biz381 table{width:100%!important;border-collapse:collapse!important;background:var(--t-surface,#fff)!important;color:inherit!important;text-align:left!important;font:inherit!important}
html body .biz381 :is(td,th){padding:10px!important;border-bottom:1px solid var(--t-line,#ced8e2)!important;background:transparent!important;color:inherit!important;vertical-align:middle!important}
html body .biz381 .b381-badge{display:inline-block;padding:3px 8px;border:1px solid var(--t-line,#ced8e2);border-radius:20px;white-space:nowrap}
html body .biz381 .b381-metrics{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(155px,1fr))!important;gap:10px!important;margin:12px 0!important}
html body .biz381 .b381-metrics article{display:flex;flex-direction:column;gap:4px;padding:14px;border:1px solid var(--t-line,#ced8e2);border-top:3px solid var(--t-accent,#1466bb);border-radius:9px;background:var(--t-surface,#fff)}
html body .biz381 .b381-metrics strong{font-size:24px!important;color:inherit!important}
html body .biz381 .b381-columns{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;gap:12px!important}
html body .biz381 .b381-rank{display:flex;gap:10px;justify-content:space-between;overflow-wrap:anywhere}
html body .biz381 .b381-note{border-inline-start:3px solid var(--t-accent,#1466bb);padding:9px 12px;background:var(--t-surface,#fff);color:inherit}
html body .biz381-dialog{box-sizing:border-box!important;width:min(1080px,94vw)!important;max-width:94vw!important;max-height:90vh!important;overflow:auto!important;border:1px solid var(--t-line,#ced8e2)!important;border-radius:12px!important;background:var(--t-surface,#fff)!important;color:var(--t-text,#182c40)!important;padding:22px!important}
html body .biz381-dialog::backdrop{background:#0008}
html body .biz381 .b381-line{display:grid!important;grid-template-columns:130px minmax(150px,2fr) repeat(3,minmax(80px,1fr)) auto!important;gap:8px!important;align-items:end!important;border:1px solid var(--t-line,#ced8e2)!important;padding:10px!important;margin:10px 0!important;min-width:0!important}
html body .biz381 [data-message]{color:var(--t-text,#182c40)!important;overflow-wrap:anywhere}
@media(max-width:850px){html body .biz381 .b381-line{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
html body .biz381 .b390-lookup{position:relative;min-width:0}html body .biz381 .b390-results{position:absolute;z-index:20;top:100%;left:0;right:0;max-height:250px;overflow:auto;background:var(--t-surface,#fff);color:var(--t-text,#182c40);border:1px solid var(--t-line,#ccd);box-shadow:0 6px 18px #0003}html body .biz381 .b390-results button{display:block;width:100%;text-align:start;white-space:normal;line-height:1.4;border:0;border-bottom:1px solid var(--t-line,#ccd);padding:9px;background:inherit;color:inherit}html body .biz381 .b390-results button[aria-selected="true"],html body .biz381 .b390-results button:hover{outline:2px solid var(--t-accent,#168);outline-offset:-2px}html body .biz381 .b390-results[hidden]{display:none!important}html body .biz381-dialog .b381-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}html body .biz381-dialog nav{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0}@media(max-width:720px){html body .biz381-dialog .b381-grid{grid-template-columns:1fr!important}}
.biz381 .b398-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px;padding-left:24px}.biz381 .b398-steps li{padding:12px;border:1px solid var(--border,#77808c);border-radius:10px}.biz381 .b398-steps h3{font-size:1rem;margin:0 0 10px}.biz381 .b398-steps button{margin:4px 6px 4px 0}
.biz381 .b403-check{display:flex;align-items:center;gap:8px;margin:10px 0}.biz381 .b403-check input[type=checkbox]{width:18px;height:18px;min-height:0;display:inline-block;margin:0;flex:0 0 18px}.biz381 [data-portal]{padding:12px 0}.biz381 [data-preview]{margin-top:12px}.biz381 [data-preview] td{vertical-align:middle}

/* Entradas: keep the all-periods control compact inside the fiscal dialog. */
.biz381.biz381-dialog form[data-portal] > label.b403-check{display:inline-flex!important;flex-direction:row!important;align-items:center;justify-content:flex-start;gap:10px!important;width:fit-content!important;max-width:100%;padding:10px 14px!important;margin:0 0 14px!important;border:1px solid var(--t-line,#64748b);border-radius:8px;cursor:pointer;text-align:left}
.biz381.biz381-dialog form[data-portal] > label.b403-check > input[type=checkbox]{appearance:auto!important;display:inline-block!important;position:static!important;width:18px!important;height:18px!important;min-height:18px!important;flex:0 0 18px;margin:0!important;padding:0!important;accent-color:var(--t-accent,#16886b)}
.biz381.biz381-dialog form[data-portal] > label.b403-check > span{display:inline!important;margin:0!important;line-height:1.4}

.biz381.biz381-dialog label.b425-select{display:inline-flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;width:fit-content!important;padding:10px 14px!important;border:1px solid var(--t-line,#64748b);border-radius:8px;text-align:left;margin:12px 0!important;cursor:pointer}.biz381.biz381-dialog label.b425-select input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px!important;flex:0 0 18px;margin:0!important;accent-color:var(--t-accent,#16886b)}

/* 445: compact CNPJ import action. */
.biz381 .b381-cnpj-icon445{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 34px;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:7px!important;border:1px solid var(--t-line,#cbd5e1);border-radius:7px;background:var(--t-surface,#fff);color:var(--t-text,#172b43)}.biz381 .b381-cnpj-icon445 svg{display:block;width:17px;height:17px}.biz381 .b381-cnpj-icon445:disabled{opacity:.45;cursor:not-allowed}

/* RTC v8: scoped fiscal declaration, including native hidden controls. */
html body .biz381 [data-rtc-editor] [hidden]{display:none!important}
html body .biz381 [data-rtc-editor] fieldset{min-width:0;border:1px solid var(--t-line,#ced8e2);border-radius:8px;padding:12px;margin:12px 0}
html body .biz381 [data-rtc-editor] legend{padding:0 6px;font-weight:600;color:inherit}
html body .biz381 [data-rtc-editor] :is(label,select){min-width:0}
html body .biz381 [data-rtc-editor] textarea{resize:vertical;min-height:74px}
