/* DIMI Gestão v7.98.3 — Fluxo fiscal completo */
#app-shell .dimi-fiscal-page{display:grid;gap:14px;min-width:0}
#app-shell .dimi-fiscal-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px;border:1px solid var(--line,#dbe3ec);border-radius:16px;background:linear-gradient(135deg,var(--card,#fff),color-mix(in srgb,var(--dimi-ui-primary,#16a34a) 4%,#fff));box-shadow:0 8px 26px rgba(15,23,42,.045)}
#app-shell .dimi-fiscal-kicker{font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.12em;color:var(--dimi-ui-primary,#15865a)}
#app-shell .dimi-fiscal-hero h3{margin:4px 0 4px;font-size:22px;letter-spacing:-.03em}
#app-shell .dimi-fiscal-hero p{margin:0;color:var(--muted,#64748b);font-size:11px;line-height:1.45;max-width:780px}
#app-shell .dimi-fiscal-env{display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:7px 11px;border:1px solid #bfd8ca;background:#eefaf3;color:#0b7547;font-size:10px;font-weight:900;white-space:nowrap}
#app-shell .dimi-fiscal-env.prod{background:#fff1f0;border-color:#fac7c2;color:#b42318}
#app-shell .dimi-fiscal-tabs{display:flex;gap:5px;overflow-x:auto;scrollbar-width:none;padding:5px;border:1px solid var(--line,#dbe3ec);border-radius:13px;background:var(--surface-2,#f8fafc)}
#app-shell .dimi-fiscal-tabs::-webkit-scrollbar{display:none}
#app-shell .dimi-fiscal-tabs button{border:0;border-radius:9px;background:transparent;color:var(--muted,#53657a);padding:9px 12px;font-size:10px;font-weight:850;white-space:nowrap;cursor:pointer}
#app-shell .dimi-fiscal-tabs button.active{background:var(--card,#fff);color:var(--dimi-ui-primary,#128557);box-shadow:0 2px 8px rgba(15,23,42,.07)}
#app-shell .dimi-fiscal-grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
#app-shell .dimi-fiscal-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#app-shell .dimi-fiscal-card{border:1px solid var(--line,#dbe3ec);border-radius:14px;background:var(--card,#fff);padding:14px;min-width:0}
#app-shell .dimi-fiscal-card h4{margin:0 0 4px;font-size:13px}
#app-shell .dimi-fiscal-card p{margin:0;color:var(--muted,#64748b);font-size:10px;line-height:1.45}
#app-shell .dimi-fiscal-kpi span{display:block;color:var(--muted,#64748b);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.05em}
#app-shell .dimi-fiscal-kpi b{display:block;margin-top:5px;font-size:20px;line-height:1.05;overflow-wrap:anywhere}
#app-shell .dimi-fiscal-kpi small{display:block;margin-top:5px;color:var(--muted,#64748b);font-size:9px;line-height:1.35}
#app-shell .dimi-fiscal-status{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 7px;font-size:8px;font-weight:900;border:1px solid #d8e1e9;background:#f5f7fa;color:#526477;white-space:nowrap}
#app-shell .dimi-fiscal-status.ok{background:#ecfdf3;color:#067647;border-color:#abefc6}
#app-shell .dimi-fiscal-status.warn{background:#fffaeb;color:#b54708;border-color:#fedf89}
#app-shell .dimi-fiscal-status.bad{background:#fef3f2;color:#b42318;border-color:#fecdca}
#app-shell .dimi-fiscal-checks{display:grid;gap:7px;margin-top:10px}
#app-shell .dimi-fiscal-check{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px 10px;border:1px solid var(--line,#e2e8f0);border-radius:10px;background:var(--surface-2,#f8fafc)}
#app-shell .dimi-fiscal-check .ico{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:#fff;border:1px solid var(--line,#dbe3ec);font-weight:900}
#app-shell .dimi-fiscal-check b{display:block;font-size:10.5px}.dimi-fiscal-check small{display:block;color:var(--muted,#64748b);font-size:8.5px;margin-top:2px}
#app-shell .dimi-fiscal-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
#app-shell .dimi-fiscal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}
#app-shell .dimi-fiscal-toolbar .filters{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
#app-shell .dimi-fiscal-toolbar input,#app-shell .dimi-fiscal-toolbar select{min-width:160px}
#app-shell .dimi-fiscal-table table{min-width:980px}
#app-shell .dimi-fiscal-table th{font-size:9px}.dimi-fiscal-table td{font-size:10px}
#app-shell .dimi-fiscal-doc-actions{display:flex;gap:5px;flex-wrap:wrap;align-items:center}
#app-shell .dimi-fiscal-form{display:grid;gap:12px}
#app-shell .dimi-fiscal-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
#app-shell .dimi-fiscal-form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
#app-shell .dimi-fiscal-form label{font-size:10px;font-weight:750;color:var(--text,#142033)}
#app-shell .dimi-fiscal-form label>input,#app-shell .dimi-fiscal-form label>select,#app-shell .dimi-fiscal-form label>textarea{margin-top:4px}
#app-shell .dimi-fiscal-section{border:1px solid var(--line,#dbe3ec);border-radius:13px;overflow:hidden;background:var(--card,#fff)}
#app-shell .dimi-fiscal-section>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px;border-bottom:1px solid var(--line,#e5e7eb);background:var(--surface-2,#f8fafc)}
#app-shell .dimi-fiscal-section>header h4{margin:0;font-size:11px}.dimi-fiscal-section>.inside{padding:13px}
#app-shell .dimi-fiscal-switch{display:flex;align-items:center;gap:8px;font-size:10px;font-weight:800}.dimi-fiscal-switch input{width:auto!important}
#app-shell .dimi-fiscal-note{padding:10px 12px;border:1px solid #bfdbfe;border-radius:10px;background:#eff6ff;color:#254d72;font-size:9.5px;line-height:1.5}
#app-shell .dimi-fiscal-note.warn{border-color:#fedf89;background:#fffaeb;color:#7a4a00}
#app-shell .dimi-fiscal-note.danger{border-color:#fecdca;background:#fef3f2;color:#912018}
#app-shell .dimi-fiscal-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:9px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:290px;overflow:auto;padding:10px;border:1px solid var(--line,#dbe3ec);border-radius:9px;background:#0f172a;color:#e2e8f0}
#app-shell .dimi-fiscal-progress{height:7px;border-radius:999px;background:#e9eef3;overflow:hidden}.dimi-fiscal-progress i{display:block;height:100%;background:var(--dimi-ui-primary,#16a34a)}
#app-shell .dimi-fiscal-cert{display:grid;grid-template-columns:50px minmax(0,1fr) auto;gap:12px;align-items:center}.dimi-fiscal-cert .ico{width:50px;height:50px;border-radius:13px;display:grid;place-items:center;font-size:24px;background:#effaf5;border:1px solid #b7e3cc}
#app-shell .dimi-fiscal-empty{padding:34px 20px;text-align:center;color:var(--muted,#64748b);border:1px dashed var(--line,#cfd8e3);border-radius:13px;background:var(--surface-2,#f8fafc)}
#app-shell .dimi-fiscal-official{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.dimi-fiscal-official span{font-size:8px;font-weight:850;border-radius:999px;padding:4px 7px;background:#eef3f7;color:#526477}
#app-shell .dimi-fiscal-product-panel{margin-top:0}
#app-shell .dimi-fiscal-product-panel .product-grid-4{margin-bottom:12px}
#app-shell .dimi-fiscal-view-panel{border:1px solid var(--line,#dbe3ec);border-radius:10px;overflow:hidden;margin-top:12px}
#app-shell .dimi-fiscal-view-panel h4{margin:0;padding:10px 12px;background:var(--surface-2,#f8fafc);border-bottom:1px solid var(--line,#e5e7eb);font-size:11px}
#app-shell .dimi-fiscal-view-panel .inside{padding:12px}
html[data-theme="dark"] #app-shell .dimi-fiscal-hero{background:linear-gradient(135deg,#101c2d,#10251f)}
html[data-theme="dark"] #app-shell .dimi-fiscal-env{background:#102c22;border-color:#246146;color:#86efac}
html[data-theme="dark"] #app-shell .dimi-fiscal-tabs,html[data-theme="dark"] #app-shell .dimi-fiscal-check,html[data-theme="dark"] #app-shell .dimi-fiscal-section>header{background:#0d1727}
html[data-theme="dark"] #app-shell .dimi-fiscal-tabs button.active{background:#152238;color:#6ee7b7}
@media(max-width:1180px){#app-shell .dimi-fiscal-grid4{grid-template-columns:repeat(2,minmax(0,1fr))}#app-shell .dimi-fiscal-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){#app-shell .dimi-fiscal-hero{flex-direction:column}#app-shell .dimi-fiscal-grid4,#app-shell .dimi-fiscal-grid2,#app-shell .dimi-fiscal-form-grid,#app-shell .dimi-fiscal-form-grid.two{grid-template-columns:1fr}#app-shell .dimi-fiscal-cert{grid-template-columns:42px minmax(0,1fr)}#app-shell .dimi-fiscal-cert .dimi-fiscal-actions{grid-column:1/-1}#app-shell .dimi-fiscal-check{grid-template-columns:28px minmax(0,1fr)}#app-shell .dimi-fiscal-check>.dimi-fiscal-status{grid-column:2}}

/* v7.97.5 — navegação fiscal, importação XML e páginas auxiliares */
#app-shell .dimi-fiscal-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:12px;padding:15px 17px;border:1px solid var(--line,#dbe3ec);border-radius:14px;background:var(--card,#fff)}
#app-shell .dimi-fiscal-section-head .identity{display:flex;align-items:center;gap:12px;min-width:0}
#app-shell .dimi-fiscal-section-head .ico{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:var(--surface-2,#f8fafc);border:1px solid var(--line,#dbe3ec);font-size:20px;flex:0 0 auto}
#app-shell .dimi-fiscal-section-head h3{margin:0;font-size:18px;letter-spacing:-.025em}
#app-shell .dimi-fiscal-section-head p{margin:3px 0 0;color:var(--muted,#64748b);font-size:10px}
#app-shell .dimi-fiscal-upload{display:grid;place-items:center;gap:8px;min-height:170px;padding:24px;border:2px dashed var(--line,#cbd5e1);border-radius:14px;background:var(--surface-2,#f8fafc);text-align:center;transition:.16s ease}
#app-shell .dimi-fiscal-upload.drag{border-color:var(--dimi-ui-primary,#16a34a);background:color-mix(in srgb,var(--dimi-ui-primary,#16a34a) 7%,var(--card,#fff))}
#app-shell .dimi-fiscal-upload strong{font-size:14px}#app-shell .dimi-fiscal-upload span{font-size:10px;color:var(--muted,#64748b)}
#app-shell #fiscal-sidebar-subnav>button.active,#app-shell #fiscal-aux-subnav>button.active{color:var(--dimi-ui-primary,#128557);font-weight:900;background:color-mix(in srgb,var(--dimi-ui-primary,#16a34a) 8%,transparent)}

/* v7.98.3 — editor completo do documento fiscal */
#app-shell .dimi-fiscal-editor{margin-top:12px;border:1px solid var(--line,#dbe3ec);border-radius:13px;background:var(--card,#fff);overflow:hidden}
#app-shell .dimi-fiscal-editor>summary{cursor:pointer;padding:12px 14px;background:var(--surface-2,#f8fafc);font-size:11px;font-weight:900;list-style:none;border-bottom:1px solid var(--line,#dbe3ec)}
#app-shell .dimi-fiscal-editor>summary::-webkit-details-marker{display:none}
#app-shell .dimi-fiscal-editor form{padding:13px}
#app-shell .dimi-fiscal-step{padding:12px 0;border-bottom:1px solid var(--line,#e5e7eb)}
#app-shell .dimi-fiscal-step:first-child{padding-top:0}.dimi-fiscal-step:last-of-type{border-bottom:0}
#app-shell .dimi-fiscal-step h5{margin:0 0 10px;font-size:11px;color:var(--text,#142033)}
#app-shell .dimi-fiscal-edit-table table{min-width:1080px}
#app-shell .dimi-fiscal-edit-table th{font-size:8.5px;white-space:nowrap}.dimi-fiscal-edit-table td{font-size:9px;vertical-align:top}
#app-shell .dimi-fiscal-edit-table input{min-width:86px;width:100%;padding:7px 8px;font-size:9px}
#app-shell .dimi-fiscal-edit-table td:first-child{min-width:180px}
#app-shell .dimi-fiscal-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:12px}
#app-shell .dimi-fiscal-editor-footer span{font-size:9px;color:var(--muted,#64748b)}
@media(max-width:760px){#app-shell .dimi-fiscal-editor form{padding:10px}}

/* DIMI v7.99.0 — configuração fiscal integrada e emissão completa */
.dimi-fiscal-config-native{display:grid;gap:14px}
.dimi-fiscal-config-native .dimi-fiscal-card{margin:0 0 14px}
.dimi-fiscal-checkline{display:flex!important;align-items:flex-start;gap:9px;margin-top:12px;padding:12px;border:1px solid #dbe6ef;border-radius:10px;background:#f8fbfd}
.dimi-fiscal-checkline input{width:auto!important;margin-top:2px}.dimi-fiscal-checkline small{color:var(--muted);margin-left:5px}
.dimi-fiscal-sticky-actions{position:sticky;bottom:0;z-index:5;display:flex;gap:8px;justify-content:flex-end;padding:12px;margin-top:14px;border:1px solid #dbe6ef;border-radius:12px;background:color-mix(in srgb,var(--card,#fff) 94%,transparent);backdrop-filter:blur(8px)}
.dimi-fiscal-setup-head{background:var(--card,#fff);border:1px solid #dbe6ef;border-radius:14px;padding:18px;margin-bottom:14px}.dimi-fiscal-setup-head h3{margin:0 0 18px}
.dimi-fiscal-setup-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:0;position:relative}.dimi-fiscal-setup-steps:before{content:"";position:absolute;left:8%;right:8%;top:17px;height:2px;background:#d4dde7;z-index:0}
.dimi-fiscal-setup-steps>div{position:relative;z-index:1;display:grid;justify-items:center;gap:6px;text-align:center;color:#64748b}.dimi-fiscal-setup-steps span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#dbe2e8;color:#334155;font-weight:800}.dimi-fiscal-setup-steps .active span{background:var(--dimi-ui-primary,#16a34a);color:#fff}.dimi-fiscal-setup-steps .done span{background:#173f62;color:#fff}.dimi-fiscal-setup-steps .active small{color:#0f172a;font-weight:800}
.dimi-fiscal-wizard-actions{display:flex;justify-content:space-between;gap:10px;margin-top:18px}.dimi-fiscal-cert-choice{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.dimi-fiscal-cert-choice>div{border:1px solid #d9e1ea;border-radius:12px;padding:18px;background:#f8fafc}.dimi-fiscal-cert-choice>div.active{background:#ecfdf5;border-color:#86efac}.dimi-fiscal-cert-choice b{font-size:18px;display:block}.dimi-fiscal-cert-choice small{display:block;margin-top:6px;line-height:1.45;color:#64748b}
.dimi-fiscal-confirm{text-align:center;padding:34px}.dimi-fiscal-confirm-icon{width:82px;height:82px;border-radius:50%;display:grid;place-items:center;margin:0 auto 16px;background:#16a34a;color:#fff;font-size:48px;font-weight:900}.dimi-fiscal-confirm h3{font-size:24px;margin:0 0 8px}.dimi-fiscal-confirm .dimi-fiscal-wizard-actions{justify-content:center}
.dimi-fiscal-full-note{display:grid;gap:14px}.dimi-fiscal-full-note>.dimi-fiscal-card{margin:0}.dimi-fiscal-full-note h4{font-size:18px;margin:0 0 14px}.dimi-fiscal-edit-table input,.dimi-fiscal-edit-table select{min-width:90px}
.dimi-fiscal-tax-row td{background:#f8fafc!important}.dimi-fiscal-tax-row.hidden{display:none}.dimi-fiscal-tax-row .dimi-fiscal-form-grid{padding:8px 0}
.dimi-fiscal-payment-row{display:grid;grid-template-columns:minmax(90px,.7fr) minmax(180px,1.5fr) minmax(150px,1fr) minmax(120px,1fr) auto;gap:10px;align-items:end;border:1px solid #dce5ed;border-radius:10px;padding:12px;margin-bottom:10px;background:#fbfdff}.dimi-fiscal-payment-row .btn{align-self:end;height:38px}
.dimi-fiscal-total-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.dimi-fiscal-total-grid input[readonly]{background:#f2f5f8;color:#334155;font-weight:700}
#v4-settings-body .dimi-fiscal-config-native .dimi-fiscal-card{box-shadow:none}
@media(max-width:1100px){.dimi-fiscal-total-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dimi-fiscal-payment-row{grid-template-columns:1fr 1fr}.dimi-fiscal-payment-row .btn{width:max-content}}
@media(max-width:720px){.dimi-fiscal-setup-steps{grid-template-columns:repeat(2,1fr);row-gap:16px}.dimi-fiscal-setup-steps:before{display:none}.dimi-fiscal-cert-choice,.dimi-fiscal-total-grid{grid-template-columns:1fr}.dimi-fiscal-payment-row{grid-template-columns:1fr}.dimi-fiscal-sticky-actions{flex-wrap:wrap;position:static}.dimi-fiscal-wizard-actions{flex-wrap:wrap}}


/* v7.99.0 R2 - apresentação simples e segura do certificado A1 */
.dimi-cert-clean-card{margin-top:14px;padding:18px 20px;border:1px solid rgba(22,163,74,.24);background:linear-gradient(135deg,rgba(240,253,244,.96),rgba(236,253,245,.74));border-radius:16px;display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:14px}
.dimi-cert-clean-icon{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:#16a34a;color:#fff;font-size:24px;font-weight:900;box-shadow:0 8px 22px rgba(22,163,74,.18)}
.dimi-cert-clean-copy{min-width:0;display:flex;flex-direction:column;gap:3px}.dimi-cert-clean-copy>span{font-size:10px;font-weight:900;letter-spacing:.11em;color:#15803d}.dimi-cert-clean-copy>b{font-size:18px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dimi-cert-clean-copy>small{font-size:12px;color:#64748b}.dimi-cert-clean-copy>em{font-size:10px;font-style:normal;color:#94a3b8;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dimi-cert-clean-status{padding:7px 11px;border-radius:999px;background:#dcfce7;border:1px solid #86efac;color:#166534;font-size:11px;font-weight:900;letter-spacing:.05em}
@media(max-width:760px){.dimi-cert-clean-card{grid-template-columns:42px 1fr}.dimi-cert-clean-status{grid-column:2;justify-self:start}.dimi-cert-clean-copy>b{white-space:normal}}
