/* Expansão do menu e aparência, carregado após as regras responsivas. */
:root{color-scheme:light;--surface:#fff;--surface-soft:#f1f5fb;--page:#f7fbfe;--ink:#132458;--muted:#6179a0;--line:#d7e2ef;--accent:#2357b6;}
#appScreen{--sidebar-width:clamp(220px,16.1vw,280px);}
.sidebar-brand{width:100%;border:0;background:transparent;color:var(--sidebar-ink);font-family:inherit;cursor:pointer;text-align:left;position:relative;}
.sidebar-brand strong{min-width:0;overflow:hidden;text-overflow:ellipsis;}
.sidebar-toggle-icon{width:15px;height:15px;flex:none;margin-left:auto;transform:rotate(180deg);}
.modal-perfil-card{max-height:calc(100svh - 32px);overflow-y:auto;}
.theme-preference{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 24px;padding:14px 0 20px;border-bottom:1px solid var(--line);color:var(--ink);}
.theme-preference strong,.theme-preference small{display:block;}.theme-preference strong{font-size:14px;}.theme-preference small{font-size:12px;color:var(--muted);margin-top:5px;}
#btnThemeToggle{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);color:var(--ink);font-weight:600;font-size:13px;}
#btnThemeToggle:hover{border-color:var(--accent);}#btnThemeToggle .ui-icon{width:19px;height:19px;}
@media(min-width:761px){
 .sidebar-collapsed #appScreen{--sidebar-width:86px;}
 .sidebar-collapsed .app-sidebar{padding-left:10px;padding-right:10px;}
 .sidebar-collapsed .sidebar-brand{justify-content:center;padding:4px 2px 24px;}
 .sidebar-collapsed .sidebar-brand strong,.sidebar-collapsed .sidebar-toggle-icon{display:none;}
 .sidebar-collapsed .sidebar-logo{width:42px;}
 .sidebar-collapsed .side-nav button,.sidebar-collapsed .sidebar-bottom button{justify-content:center;padding:12px 6px;gap:0;min-height:50px;}
 .sidebar-collapsed .side-nav button>span:last-child:not(.sidebar-image-icon),.sidebar-collapsed .sidebar-bottom button>span:not(.sidebar-image-icon){display:none;}
 .sidebar-collapsed .sidebar-bottom{padding:16px 0 0;}
 .sidebar-collapsed .side-icon{width:34px;height:34px;}
}
@media(max-width:1180px) and (min-width:761px){#appScreen .header{flex-wrap:wrap;}#appScreen .header-right{min-width:0;}.dashboard-charts{grid-template-columns:1fr;}}
@media(max-width:760px){
 .sidebar-brand{justify-content:flex-start;}.sidebar-toggle-icon{display:block;}
 .sidebar-collapsed .side-nav,.sidebar-collapsed .sidebar-bottom{display:none;}
 .sidebar-collapsed .sidebar-brand{padding-bottom:0;}
 .sidebar-collapsed .sidebar-toggle-icon{transform:rotate(90deg);}
}
/* Tema escuro: superfícies distintas, textos claros e cores financeiras. */
html[data-theme="dark"]{color-scheme:dark;--surface:#172235;--surface-soft:#202f46;--page:#0e1726;--ink:#e0eaff;--muted:#adbed6;--line:#354760;--accent:#88baff;--navy:#233f79;--navy-2:#305295;--green:#63dfac;--green-dark:#63dfac;--green-bg:#173b32;--red:#ff8695;--red-bg:#432631;--purple:#c6a5ff;--purple-bg:#352b4c;--blue:#8dc1ff;--blue-bg:#233954;--teal:#68d8d4;--orange:#ffc56d;--gray-50:#0e1726;--gray-100:#202f46;--gray-200:#354760;--gray-300:#4c6080;--gray-400:#a2b4cf;--gray-500:#adbed6;--gray-700:#cfdaec;--gray-900:#edf3ff;--ref-ink:#e0eaff;--ref-line:#354760;--ref-muted:#adbed6;}
html[data-theme="dark"] body{background:var(--page);color:var(--ink);}
html[data-theme="dark"] #appScreen{--navy:#e0eaff;--green:#63dfac;--red:#ff8695;--purple:#c6a5ff;--blue:#8dc1ff;background:var(--page)!important;color:var(--ink);}
html[data-theme="dark"] .app-sidebar{--sidebar-ink:#bad3ff;}
html[data-theme="dark"] :is(.app-sidebar,.stat-card,.chart-card,.table-card,.modal,.config-modal,.modal-perfil-card,.config-section,.rep-reference-panel,.rep-ref-card,.sector-search-card,.sector-list-card,.sector-detail-card,.import-card,.login-card,.login-form-panel,.chart-empty){background:var(--surface)!important;border-color:var(--line)!important;color:var(--ink);box-shadow:0 5px 20px #0002;}
html[data-theme="dark"] :is(.comp-chip,.user-chip,.user-chip .avatar,.search-box,.filter-select-wrap,.modal-perfil-input,.field input,.field select,.rep-input,.cell-input,.config-input,.config-select,.import-drop-area,.import-files-empty,.sector-detail-card>footer,.module-message,.ref-money>span){background:var(--surface-soft)!important;border-color:var(--line)!important;color:var(--ink)!important;}
html[data-theme="dark"] :is(input,select,textarea){color:var(--ink);accent-color:var(--accent);}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#a4b5cf!important;opacity:1;}
html[data-theme="dark"] :is(select option){background:var(--surface);color:var(--ink);}
html[data-theme="dark"] :is(h1,h2,h3,.module-screen,.config-title,.module-heading h1,.sector-list-item,.sector-detail-title,.modal-perfil-label,.field label,.config-checkbox,.config-checkbox-perm,.rep-reference,.rep-reference-panel h2,.rep-reference-header>.ui-icon,.ref-title-icon,.config-logo-icon,.config-initial,.admin-tag,.config-admin-chip){color:var(--ink)!important;}
html[data-theme="dark"] :is(.header p,.st-label,.monthly-legend,.chart-note,.sector-legend-row,.donut-center span,.user-chip .role,.table-footer .showing,.config-subtitle,.module-heading p,.sector-list-item small,.sector-detail-title p,.sector-modal-admin,.sector-empty,.import-drop-area p,.import-drop-area small,.import-footer p,.import-status,.ref-modal .modal-header p,.ref-summary-title,.rep-ref-detail,.rep-ref-top,.rep-reference-header p,.login-footer,.brand-sub){color:var(--muted)!important;}
html[data-theme="dark"] :is(thead th,tfoot td,.resumo-table thead th,.resumo-table tfoot td){background:#243956!important;color:var(--ink)!important;border-color:var(--line)!important;}
html[data-theme="dark"] :is(tbody td,.config-table tbody td,.sector-table td){background:transparent!important;border-color:var(--line)!important;}
html[data-theme="dark"] :is(tbody tr:nth-child(even),.sector-list-item){background:var(--surface)!important;}
html[data-theme="dark"] :is(tbody tr:hover,.sector-list-item:hover,.side-nav button:hover,.sidebar-bottom button:hover){background:var(--surface-soft)!important;}
html[data-theme="dark"] :is(.side-overview,.sector-list-item.selected,#btnSetores,#btnImportacao,#btnReparticao,#btnConfiguracoes){color:var(--sidebar-ink);}
html[data-theme="dark"] #appScreen :is(.side-overview,#btnSetores,#btnImportacao,#btnReparticao,#btnConfiguracoes){background-color:transparent;}
html[data-theme="dark"] #appScreen .side-overview,html[data-theme="dark"] .sector-list-item.selected{background:#253c5b!important;}
html[data-theme="dark"] #appScreen:has(#setoresScreen:not(.hidden)) #btnSetores,html[data-theme="dark"] #appScreen:has(#importacaoScreen:not(.hidden)) #btnImportacao,html[data-theme="dark"] #appScreen:has(#reparticaoScreen:not(.hidden)) #btnReparticao,html[data-theme="dark"] #appScreen:has(#configScreen:not(.hidden)) #btnConfiguracoes{background:#253c5b!important;}
html[data-theme="dark"] #appScreen:has(:is(#setoresScreen,#importacaoScreen,#reparticaoScreen,#configScreen):not(.hidden)) .side-overview{background:transparent!important;}
html[data-theme="dark"] :is(.btn-secondary,.module-secondary,.modal-perfil-btn-cancelar,.config-action-btn.edit,.config-action-btn.del){background:var(--surface-soft)!important;color:var(--ink)!important;border-color:var(--line)!important;}
html[data-theme="dark"] :is(.btn-save,.config-btn-add,.modal-perfil-btn-salvar,.module-primary){background:#315fa7!important;color:#fff!important;border-color:#5b85c5!important;}
html[data-theme="dark"] :is(.ref-title-icon,.config-logo-icon,.config-initial,.admin-tag,.config-admin-chip,.config-checkbox,.config-checkbox-perm){background:var(--surface-soft)!important;border-color:var(--line)!important;}
html[data-theme="dark"] :is(.modal-header,.config-modal-header,.modal-footer,.config-modal-footer,.sector-search,.sector-list-item,.sector-detail-heading,.ref-summary-title,.rep-ref-detail){border-color:var(--line)!important;}
html[data-theme="dark"] .rep-ref-card.indigo,html[data-theme="dark"] .rep-ref-card.royal{--rep-value:#a4b5ff;}
html[data-theme="dark"] .rep-ref-card.teal{--rep-value:#68d8d4;}html[data-theme="dark"] .rep-ref-card.amber{--rep-value:#ffd180;}html[data-theme="dark"] .rep-ref-card.orange{--rep-value:#ffa777;}html[data-theme="dark"] .rep-ref-card.blue{--rep-value:#8dc1ff;}html[data-theme="dark"] .rep-ref-card.purple{--rep-value:#dea1ff;}
html[data-theme="dark"] :is(.percent-badge,.offer-type-tag,.import-format-tags span){background:#1c4037!important;color:#80ebbc!important;}
html[data-theme="dark"] :is(.c-percent.alert .percent-badge){background:#493b28!important;color:#ffd180!important;}
html[data-theme="dark"] .import-format-tags .pdf,html[data-theme="dark"] .module-message.error{background:#432631!important;color:#ffadb5!important;border-color:#714653;}
html[data-theme="dark"] #appScreen .st-green .st-icon{background:#173b32;}html[data-theme="dark"] #appScreen .st-red .st-icon{background:#432631;}html[data-theme="dark"] #appScreen .st-purple .st-icon{background:#352b4c;}html[data-theme="dark"] #appScreen .st-blue .st-icon{background:#233954;}
html[data-theme="dark"] #loginScreen{background:radial-gradient(ellipse at center,#1c2c45,#0e1726)!important;}
html[data-theme="dark"] #loginScreen .brand,html[data-theme="dark"] .login-logo-mark{color:#bad3ff;}
html[data-theme="dark"] .login-logo-mark{background:#bad3ff;}
html[data-theme="dark"] #loginScreen .login-input-wrap{background:var(--surface-soft);border-color:var(--line);}
html[data-theme="dark"] #loginScreen :is(.field label,.login-icon){color:var(--ink);}
html[data-theme="dark"] #loginScreen input{background:transparent!important;color:var(--ink)!important;}
html[data-theme="dark"] #loginScreen .brand{color:#bad3ff;}
html[data-theme="dark"] #loginScreen .btn-primary{background:#315fa7;color:#fff;}
html[data-theme="dark"] :is(.config-table tbody td,.sector-table td,.resumo-table tbody td,.config-admin-chip-del,.sector-church .ui-icon,.sector-icon-button,.module-heading-left>.ui-icon,.modal-perfil-eye){color:var(--ink)!important;}
html[data-theme="dark"] .field input:focus,html[data-theme="dark"] .field select:focus,html[data-theme="dark"] .modal-perfil-input:focus{border-color:var(--accent)!important;box-shadow:0 0 0 3px #88baff22;}
html[data-theme="dark"] #modalLancamento :is(.ref-title-icon){background:var(--surface-soft)!important;color:var(--ink)!important;}
html[data-theme="dark"] .sidebar-bottom:before{background:var(--line);}
@media(min-width:761px){#appScreen .stat-card{gap:clamp(10px,1vw,18px);}#appScreen .st-icon{width:calc(62 * var(--dashboard-unit));height:calc(62 * var(--dashboard-unit));}#appScreen .st-value{font-size:clamp(17px,1.55vw,28px);white-space:normal;overflow-wrap:anywhere;}}
html[data-theme="dark"] .side-icon,html[data-theme="dark"] #btnNovaOferta .side-icon,html[data-theme="dark"] #btnNovaDeducao .side-icon,html[data-theme="dark"] #btnReparticao .side-icon{background:var(--surface-soft);}
html[data-theme="dark"] .dot.green{background:#63dfac;}html[data-theme="dark"] .dot.red{background:#ff8695;}
html[data-theme="dark"] #appScreen .filter-toggle{color:var(--muted);border-color:var(--line);}

/* Competência digitável, mantendo a mesma apresentação nos dois temas. */
#appScreen .comp-chip #selCompetencia{width:8ch;min-width:0;border:0;border-radius:4px;background:transparent;color:var(--navy);font-family:inherit;font-weight:700;font-size:calc(14 * var(--dashboard-unit));padding:4px 2px;}
#appScreen .comp-chip:has(#selCompetencia){flex-shrink:0;}
#appScreen .comp-chip #selCompetencia[aria-invalid="true"]{outline:2px solid var(--red);outline-offset:3px;}
#appScreen .table-header h2{text-transform:none;}
@media(max-width:760px){#appScreen .comp-chip #selCompetencia{font-size:14px;width:100%;}}

/* Setores e Importação: ocupam a área disponível sem rolagem da página. */
#appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)){height:100svh;min-height:0;display:flex;flex-direction:column;padding-top:14px;padding-bottom:14px;gap:0;}
#appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden))>.header{display:none;}
:is(#setoresScreen,#importacaoScreen){--mu:.8px;flex:1;min-height:0;display:flex;flex-direction:column;gap:12px;}
:is(#setoresScreen,#importacaoScreen) .module-heading{flex:none;margin:0 2px 2px;gap:12px;}
:is(#setoresScreen,#importacaoScreen) .module-heading-left{gap:14px;}
:is(#setoresScreen,#importacaoScreen) .module-heading-left>.ui-icon{width:30px;height:30px;flex:none;}
:is(#setoresScreen,#importacaoScreen) .module-heading h1{font-size:25px;margin:0 0 4px;}
:is(#setoresScreen,#importacaoScreen) .module-heading p{font-size:14px;}
:is(#setoresScreen,#importacaoScreen) :is(.module-primary,.module-secondary){font-size:13px;padding:9px 12px;gap:8px;min-height:36px;}
:is(#setoresScreen,#importacaoScreen) :is(.module-primary,.module-secondary) .ui-icon{width:18px;height:18px;}
#setoresScreen .sector-search-card{flex:none;padding:9px;margin:0;}
#setoresScreen .sector-search{padding:8px 12px;gap:12px;}
#setoresScreen .sector-search input{font-size:14px;}
#setoresScreen .sector-search .ui-icon{width:19px;height:19px;}
#setoresScreen .module-message{flex:none;font-size:13px;margin:0;padding:8px 12px;}
#setoresScreen .sector-grid{flex:1;min-height:0;grid-template-columns:minmax(200px,.8fr) minmax(0,2fr);gap:12px;}
#setoresScreen :is(.sector-list-card,.sector-detail-card){min-height:0;height:100%;}
#setoresScreen .sector-list-card{display:flex;flex-direction:column;padding:9px;}
#setoresScreen .sector-list-card>h2{font-size:17px;margin:6px 7px 12px;flex:none;}
#setoresLista{min-height:0;flex:1;overflow-y:auto;overflow-x:hidden;max-height:none;overscroll-behavior:contain;scrollbar-gutter:stable;}
#setoresScreen .sector-list-item{padding:12px 9px;gap:12px;}
#setoresScreen .sector-list-item strong{font-size:14px;}
#setoresScreen .sector-list-item small{font-size:12px;}
#setoresScreen .sector-list-item>span{gap:4px;}
#setoresScreen .sector-list-item>.ui-icon{width:22px;height:22px;flex:none;}
#setoresScreen .sector-list-item>.ui-icon:last-child{width:15px;height:15px;}
#setoresScreen .sector-detail-heading{padding:14px;gap:12px;flex:none;flex-wrap:wrap;}
#setoresScreen .sector-detail-title{gap:12px;}
#setoresScreen .sector-detail-title>.ui-icon{width:27px;height:27px;flex:none;}
#setoresScreen .sector-detail-title h2{font-size:21px;margin:0 0 4px;}
#setoresScreen .sector-detail-title p{font-size:13px;}
#setoresScreen .sector-actions{gap:8px;}
#setoresScreen .sector-table-scroll{flex:1;min-height:0;overflow:hidden;padding:0 10px;}
#appScreen #setoresScreen .sector-table{min-width:0;width:100%;table-layout:fixed;}
#appScreen #setoresScreen .sector-table th{font-size:12px;padding:9px 10px;height:34px;}
#appScreen #setoresScreen .sector-table td{font-size:13px;padding:4px 10px;height:44px;}
#appScreen #setoresScreen .sector-table :is(th,td):first-child{width:auto;}
#appScreen #setoresScreen .sector-table :is(th,td):nth-child(2){width:100px;}
#appScreen #setoresScreen .sector-table :is(th,td):last-child{width:88px;}
#setoresScreen .sector-church{gap:10px;min-width:0;}
#setoresScreen .sector-church .ui-icon{width:21px;height:24px;flex:none;}
#setoresScreen .sector-church>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#setoresScreen .sector-icon-button{padding:5px;}
#setoresScreen .sector-icon-button .ui-icon{width:20px;height:20px;}
#setoresScreen .sector-row-actions{gap:4px;}
#setoresScreen .sector-detail-card>footer{flex:none;padding:8px 12px;font-size:12px;display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:38px;}
.sector-pages{display:flex;align-items:center;gap:6px;white-space:nowrap;}
.sector-pages button{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:5px;width:28px;height:28px;display:grid;place-items:center;}
.sector-pages .ui-icon{width:16px;height:16px;}.sector-pages button:first-child .ui-icon{transform:rotate(180deg);}
#importacaoScreen .import-card{flex:1;min-height:0;display:flex;flex-direction:column;padding:16px;gap:10px;}
#importacaoScreen .import-card>h2{font-size:18px;margin:0;flex:none;}
#importacaoScreen .import-drop-area{flex:1;min-height:0;padding:14px;}
#importacaoScreen .import-drop-area>.ui-icon{width:34px;height:34px;margin-bottom:10px;flex:none;}
#importacaoScreen .import-drop-area h3{font-size:18px;}
#importacaoScreen .import-drop-area p{font-size:14px;margin:0 0 10px;}
#importacaoScreen .import-drop-area small{font-size:12px;}
#importacaoScreen .import-format-tags{gap:10px;margin:10px 0 6px;}
#importacaoScreen .import-format-tags span{font-size:11px;padding:4px 10px;}
#importacaoScreen .import-files-empty{font-size:13px;padding:10px 12px;margin:0;flex:none;}
#importacaoScreen .import-footer{padding-top:10px;gap:10px;flex:none;}
#importacaoScreen .import-footer p{font-size:12px;}
#importacaoScreen .import-status{margin:0;font-size:11px;flex:none;}
@media(max-width:950px){#setoresScreen .sector-grid{grid-template-columns:minmax(180px,.75fr) minmax(0,1.5fr);}}
@media(max-width:760px){
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)){padding:10px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .app-sidebar{flex:none;margin-bottom:10px;padding:8px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .sidebar-brand{padding:0 4px 8px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .sidebar-logo{width:30px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .sidebar-brand strong{font-size:16px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .side-nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .side-nav button{font-size:10px;padding:6px 4px;min-height:30px;gap:5px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .side-nav :is(.ui-icon,.sidebar-image-icon){width:16px;height:16px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .side-icon{width:18px;height:18px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .sidebar-bottom{margin-top:5px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .sidebar-bottom button{font-size:11px;padding:6px;gap:6px;}
 #appScreen:has(:is(#setoresScreen,#importacaoScreen):not(.hidden)) .sidebar-bottom :is(.ui-icon,.sidebar-image-icon){width:18px;height:18px;}
 :is(#setoresScreen,#importacaoScreen){gap:8px;}
 :is(#setoresScreen,#importacaoScreen) .module-heading{flex-wrap:nowrap;gap:8px;}
 :is(#setoresScreen,#importacaoScreen) .module-heading h1{font-size:20px;}
 :is(#setoresScreen,#importacaoScreen) .module-heading p{font-size:12px;}
 :is(#setoresScreen,#importacaoScreen) .module-heading-left{gap:9px;}
 :is(#setoresScreen,#importacaoScreen) .module-heading-left>.ui-icon{width:23px;height:23px;}
 :is(#setoresScreen,#importacaoScreen) :is(.module-primary,.module-secondary){font-size:12px;padding:7px 9px;min-height:32px;}
 #setoresScreen .sector-grid{grid-template-columns:1fr;grid-template-rows:minmax(90px,.7fr) minmax(180px,2fr);gap:8px;}
 #setoresScreen .sector-list-card{padding:5px;}
 #setoresScreen .sector-list-card>h2{font-size:14px;margin:3px 6px 6px;}
 #setoresScreen .sector-list-item{padding:7px;}
 #setoresScreen .sector-list-item small{display:none;}
 #setoresScreen .sector-detail-heading{padding:8px;gap:7px;}
 #setoresScreen .sector-detail-title h2{font-size:17px;}
 #setoresScreen .sector-detail-title>.ui-icon{width:22px;height:22px;}
 #setoresScreen .sector-detail-title p{font-size:11px;}
 #setoresScreen .sector-actions{margin-left:auto;gap:5px;}
 #appScreen #setoresScreen .sector-table :is(th,td){padding-left:6px;padding-right:6px;font-size:11px;}
 #appScreen #setoresScreen .sector-table :is(th,td):nth-child(2){width:72px;}
 #appScreen #setoresScreen .sector-table :is(th,td):last-child{width:70px;}
 #setoresScreen .sector-church .ui-icon{display:none;}
 #setoresScreen .sector-detail-card>footer{font-size:10px;padding:5px 8px;}
 #importacaoScreen .import-card{padding:12px;gap:8px;}
 #importacaoScreen .import-drop-area{padding:10px;}
 #importacaoScreen .import-drop-area h3{font-size:16px;}
 #importacaoScreen .import-drop-area p{font-size:12px;}
 #importacaoScreen .import-footer{flex-direction:row;align-items:center;gap:8px;}
}
#appScreen #setoresScreen .sector-table td:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
/* Importação ativa: etapas compactas e conferência com rolagem no cartão. */
.import-controls{display:flex;align-items:end;gap:18px;flex-wrap:wrap;flex:none;}
.import-controls label{font-size:13px;font-weight:600;display:flex;flex-direction:column;gap:6px;}
.import-controls input{width:135px;padding:9px 10px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink);font:inherit;}
.import-controls>div{margin-right:auto;display:flex;flex-direction:column;gap:5px;font-size:13px;color:var(--ink);}
.import-controls small{color:var(--muted);}
#importacaoScreen .import-drop-area{cursor:pointer;min-height:140px;}
#importacaoScreen .import-drop-area:focus-visible{outline:2px solid var(--accent);}
.import-progress{flex:none;margin:0;font-size:13px;color:var(--ink);line-height:1.4;}.import-progress.error{color:var(--red);}
#importRevisao{display:flex;flex-direction:column;flex:1;min-height:0;gap:7px;}
.import-review-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;}
.import-review-heading h2{font-size:17px;margin:0;}
#importResumo{font-size:12px;color:var(--muted);margin:0;}
.import-preview-scroll{flex:1;min-height:0;overflow:auto;border:1px solid var(--line);border-radius:8px;}
#appScreen .import-preview{min-width:1000px;width:100%;border-collapse:collapse;}
#appScreen .import-preview th{position:sticky;top:0;font-size:12px;padding:10px;z-index:1;}
#appScreen .import-preview td{font-size:12px;padding:8px;text-align:left;white-space:normal;}
.import-preview td strong,.import-preview td small{display:block;}.import-preview td small{font-size:10px;color:var(--muted);margin-top:4px;}
.import-preview select{width:210px;}.import-preview input:not([type="checkbox"]){width:94px;}
.import-preview :is(select,input:not([type="checkbox"])){padding:8px;border:1px solid var(--line);border-radius:5px;background:var(--surface);color:var(--ink);font:inherit;}
.import-preview .import-pending td:last-child{color:var(--orange);}
.import-replace{font-size:12px;display:flex;gap:8px;align-items:center;color:var(--ink);}
.import-replace input{flex:none;}
#importacaoScreen .import-footer{align-items:center;}
@media(max-width:760px){.import-controls{gap:8px;}.import-controls label{font-size:11px;}.import-controls>div{font-size:11px;max-width:45%;}.import-controls>button{width:100%;}.import-controls input{padding:7px;}.import-review-heading h2{font-size:14px;}#importacaoScreen .import-footer{flex-direction:column;align-items:stretch;}.import-replace{font-size:11px;}#importacaoScreen .import-status{font-size:10px;}#importacaoScreen .import-drop-area{min-height:90px;}.import-progress{font-size:11px;}}
.import-preview td:last-child label{display:flex;align-items:center;gap:5px;margin-top:7px;font-size:11px;color:var(--ink);}
#importCard #btnRegistrarImport:disabled,#importCard #btnSelecionarImport:disabled,#importCard #btnConferirImport:disabled{opacity:.5;cursor:not-allowed;}

/* Registro: informa pendências e confirma dentro do app, sem alertas nativos. */
#importacaoScreen .import-action-help{flex:none;font-size:12px;line-height:1.35;margin:0;color:var(--ink);}
.import-replace-required{outline:2px solid var(--orange);outline-offset:5px;border-radius:4px;}
#modalConfirmarImportacao .modal{max-width:640px;}
#modalConfirmarImportacao .modal-body{font-size:15px;line-height:1.6;color:var(--ref-ink);}
#modalConfirmarImportacao .modal-body p{margin:0 0 12px;overflow-wrap:anywhere;}
#modalConfirmarImportacao #importConfirmarResumo{font-weight:700;}
#modalConfirmarImportacao #importConfirmarAviso{margin:0;color:var(--muted);}
@media(max-width:640px){#modalConfirmarImportacao .modal-footer{flex-direction:column-reverse;align-items:stretch;}#modalConfirmarImportacao .modal-footer button{white-space:normal;}#importacaoScreen .import-action-help{font-size:11px;}}

/* Coluna editável de despesas CNS, com rolagem restrita à tabela em telas menores. */
#dashboardScreen .table-card .table-scroll>table{min-width:calc(980 * var(--dashboard-unit));}
#dashboardScreen .c-desp-cns{font-variant-numeric:tabular-nums;}

.import-footer-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;}
#importCard #btnCancelarImport:disabled{opacity:.5;cursor:not-allowed;}
@media(max-width:760px){.import-footer-actions{width:100%;}.import-footer-actions>button{flex:1;justify-content:center;white-space:normal;}}
#importacaoScreen .import-footer{flex-wrap:wrap;}
.import-footer .import-replace{flex:1 1 260px;min-width:0;}
.import-footer-actions{max-width:100%;min-width:0;}
.import-footer-actions>button{min-width:0;white-space:normal;}
@media(max-width:760px){.import-footer .import-replace{flex:0 1 auto;}}
