/* V12.8-RC4 — acabamento visual e fluxos consolidados */
:root{--ref-gold:#c48b22;--ref-gold-dark:#9b6814;--ref-ink:#12161a;--ref-muted:#68727c;--ref-line:#dce1e5;--ref-soft:#f6f7f8;--ref-green:#28764a;--ref-green-bg:#eaf6ee;--ref-amber:#9a650c;--ref-amber-bg:#fff5e3}
.app-content{max-width:1540px;width:100%;margin:0 auto;padding:30px 34px 64px}
.ux-page-head{margin-bottom:22px}.ux-page-head h1,.page-head h1{font-size:28px;line-height:1.15;letter-spacing:-.025em;margin:5px 0 7px}.ux-page-head p,.page-head p{max-width:850px}
.app-header{gap:12px}.header-search{max-width:650px}.header-add-process{margin-left:auto}.notification-bell{font-size:19px;line-height:1;padding:8px;margin:0 2px}.header-user-menu{flex:0 0 auto}.header-user{display:flex;align-items:center;gap:10px}.header-user-menu>summary::-webkit-details-marker{display:none}.header-user-popover{padding:6px;border-radius:9px}.header-user-popover a{border-radius:6px;font-size:12px}.header-user-popover a:hover{background:#f4f5f6}
.sidebar-nav{min-height:0;overflow-y:auto}.sidebar-bottom{flex:0 0 auto}
.sidebar-portfolio-actions{display:grid;gap:5px;padding:0 7px 10px}.sidebar-portfolio-actions details{position:relative}.sidebar-portfolio-actions summary{list-style:none;cursor:pointer;border:1px solid #ffffff1c;border-radius:7px;padding:8px 9px;color:#d9dde1;font-size:10px;font-weight:750}.sidebar-portfolio-actions summary::-webkit-details-marker{display:none}.sidebar-portfolio-actions summary:before{content:'›';display:inline-block;margin-right:7px;color:#d5a339}.sidebar-portfolio-actions details[open] summary{background:#ffffff0d;color:#fff}.sidebar-portfolio-actions form{position:absolute;left:calc(100% + 12px);bottom:0;width:290px;background:#fff;color:#16191c;border:1px solid var(--ref-line);border-radius:10px;padding:13px;display:grid;gap:9px;z-index:80;box-shadow:0 18px 50px #0004}.sidebar-portfolio-actions label{font-size:10px}.sidebar-portfolio-actions input,.sidebar-portfolio-actions select{margin-top:5px;width:100%}.sidebar-portfolio-actions .btn{width:100%}
.ux-metric-grid.six{grid-template-columns:repeat(6,minmax(0,1fr))}
.ux-panel,.ux-table-card,.result-card,.assertiva-split-downloads{border-color:var(--ref-line);border-radius:10px}.ux-metric{border-radius:10px;min-height:108px;padding:17px 18px}.ux-metric strong{font-size:28px}.ux-metric-grid.four{margin:16px 0 18px}.ux-metric-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.btn{font-weight:750;letter-spacing:0}.btn-primary{background:var(--ref-gold)!important;border-color:var(--ref-gold)!important;color:#111!important}.btn-primary:hover{background:#d0a03e!important;border-color:#d0a03e!important}.btn-danger-outline{background:#fff!important;color:#a83d3d!important;border:1px solid #e0aaaa!important}.btn-filter.active{background:#111!important;color:#fff!important;border-color:#111!important}
.field-error{color:#a83d3d;font-size:11px;font-weight:750}.ux-dropzone.has-error{border-color:#bd5757!important;background:#fff7f7}

/* Lote de extração */
#extracao{display:flex;flex-direction:column}.stage-head{align-items:flex-end}.stage-head.simple{align-items:center}
#extracao>.stage-head{order:1}#extracao>.ux-metric-grid{order:2}#extracao>.extraction-bulk-tools{order:3}#extracao>.review-tabs{order:4}#extracao>.missing-bulk-bar{order:5}#extracao>.stack{order:6}#extracao>.pagination-bar{order:7}#extracao>.assertiva-split-downloads{order:8;margin-top:22px}
.extraction-bulk-tools{display:flex;gap:8px;padding:12px;background:#fff;border:1px solid var(--ref-line);border-radius:10px;margin-bottom:12px}.extraction-bulk-tools #extractionSelectedCount{margin-right:12px}.bulk-select-label{border-radius:7px}.review-tabs{gap:7px;margin:0 0 12px}.review-tabs a{font-size:11px;font-weight:750;color:#4f5962;background:#fff}.review-tabs a:hover{border-color:#c8a25b;color:#855c13}.review-tabs a.active{background:#171a1d;color:#fff;border-color:#171a1d}
.result-card{padding:15px 18px;margin-bottom:10px}.result-card-top{min-height:30px}.result-card .file-name{font-size:15px}.result-card .reason{margin:9px 0 0;padding:9px 11px;font-size:11px}.process-card-details{margin-top:12px;border-top:1px solid #e8ebed;padding-top:10px}.process-card-details>summary{cursor:pointer;color:#805a18;font-size:12px;font-weight:750;list-style:none}.process-card-details>summary:before{content:'▸';display:inline-block;margin-right:7px;transition:.15s}.process-card-details[open]>summary:before{transform:rotate(90deg)}.process-card-details>.grid-form{margin-top:14px}.process-card-details .ignore-form{margin-top:12px}
.pagination-bar{background:#fff;border:1px solid var(--ref-line);border-radius:9px;padding:9px 12px;margin:4px 0}.pagination-bar label{display:flex;align-items:center;gap:8px;margin:0;font-size:11px}.pagination-bar select{min-height:34px;padding:5px 28px 5px 8px;margin:0}.pagination-bar a{color:#875e16;font-size:11px;font-weight:750}
.assertiva-split-downloads{padding:17px 18px}.assertiva-split-downloads>div:first-child{max-width:850px}.split-download-actions{justify-content:flex-end}.missing-bulk-bar{display:flex;align-items:center;gap:8px;background:var(--ref-amber-bg);border:1px solid #e6c783;border-radius:9px;padding:10px 12px;margin:0 0 12px}.missing-bulk-bar>span{display:grid;margin-right:auto}.missing-bulk-bar small{font-size:10px;color:var(--ref-muted);margin-top:2px}
.missing-bulk-bar>.bulk-select-label{display:flex;align-items:center;gap:7px;margin:0 10px 0 0;white-space:nowrap}.missing-bulk-bar>.bulk-select-label input{width:auto;min-height:auto}.ux-adam-download-bar{justify-content:space-between}.ux-adam-download-bar>div{display:grid;gap:3px}.ux-adam-download-bar>div>span{font-size:12px;color:var(--ref-muted);font-weight:400}.ux-adam-download-bar>.btn{margin-left:auto;white-space:nowrap}

/* Usuários */
.user-create-panel{padding:20px}.user-create-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.user-create-grid button{grid-column:1/2;width:100%}.users-table{overflow:visible}.users-table table{min-width:1080px}.users-table td:last-child{min-width:410px}.user-action-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.user-action-row form{margin:0}.user-action-row details{position:relative}.user-action-row summary{list-style:none}.user-action-row summary::-webkit-details-marker{display:none}.user-edit-details form,.user-password-details form{position:absolute;right:0;top:38px;z-index:40;width:330px;background:#fff;border:1px solid var(--ref-line);border-radius:10px;padding:14px;display:grid;gap:9px;box-shadow:0 16px 42px #0002}.user-action-row h3{font-size:14px;margin:0 0 3px}.user-action-row input,.user-action-row select{margin:0}

/* Lotes de cadastro */
.distribution-page-head{align-items:center}.page-head-actions{display:flex;align-items:center;gap:9px}.lot-state{font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.07em;border-radius:999px;padding:7px 10px;background:#edf0f2;color:#59626b}.state-em_andamento{background:var(--ref-amber-bg);color:var(--ref-amber)}.state-concluido{background:var(--ref-green-bg);color:var(--ref-green)}
.lot-management-panel{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:14px}.lot-management-panel h2{font-size:18px;margin:3px 0 4px}.lot-management-panel p{font-size:11px;color:var(--ref-muted);margin:0;max-width:720px}.lot-management-panel form{display:flex;align-items:flex-end;gap:8px;flex:0 0 auto}.lot-management-panel label{min-width:250px}.lot-management-panel select{margin-top:5px}.lot-metrics{margin-bottom:14px}.lot-action-toolbar,.admin-selected-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--ref-line);background:#fff;padding:10px 12px}.lot-action-toolbar{border-radius:9px 9px 0 0}.lot-action-toolbar>div,.lot-primary-actions{display:flex;align-items:center;gap:9px}.lot-action-toolbar span{font-size:10px;color:var(--ref-muted)}.admin-selected-actions{border-top:0;background:#fafbfc}.admin-selected-actions>div{display:grid;margin-right:auto}.admin-selected-actions small{font-size:10px;color:var(--ref-muted)}.admin-selected-actions form{display:flex;align-items:center;gap:7px;margin:0}.admin-selected-actions select{min-width:180px;margin:0}.distribution-table{border-radius:0 0 9px 9px;border-top:0}.distribution-table tr.status-row-retirado,.distribution-table tr.status-row-retornado_fila{opacity:.68;background:#fafafa}

/* Revisões e acompanhamento */
.queue-tabs{display:flex;gap:7px;margin:0 0 16px}.queue-tabs a{display:flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid var(--ref-line);border-radius:8px;background:#fff;color:#3e464d;text-decoration:none;font-size:11px;font-weight:750}.queue-tabs a.active{background:#171a1d;color:#fff;border-color:#171a1d}.queue-tabs b{background:#e7c26d;color:#201b12;border-radius:999px;padding:1px 6px}.registration-review-card h2{font-size:18px}.registration-review-card dl{grid-template-columns:160px 1fr}.administrative-review-actions{display:grid;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid var(--ref-line)}.administrative-review-actions textarea{min-height:72px}.admin-review-buttons,.assign-review-control{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.assign-review-control{padding:5px;background:#f5f6f7;border-radius:8px}.assign-review-control select{min-width:190px;margin:0}.tracking-filters{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap;background:#fff;border:1px solid var(--ref-line);border-radius:10px;padding:13px;margin-bottom:14px}.tracking-filters label{min-width:150px;margin:0}.tracking-filters input,.tracking-filters select{margin-top:5px}.tracking-table table{min-width:1160px}.success-number{color:var(--ref-green)}.progress-cell{width:110px;height:7px;background:#e9ecef;border-radius:99px;overflow:hidden;margin-bottom:4px}.progress-cell span{display:block;height:100%;background:#55a475;border-radius:99px}
.registration-return{border-left:3px solid #d69a31}.administrative-review{border-left:3px solid #9a762f}
.document-queue-toolbar{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--ref-line);border-radius:10px;padding:12px;margin-bottom:12px}.document-queue-toolbar>span{margin-right:auto;color:var(--ref-muted);font-size:11px}.queue-item-select{display:inline-flex;align-items:center;gap:6px;margin:0 8px 8px 0}.document-evidence-actions{display:flex;gap:7px;flex-wrap:wrap}

/* Mensagens rápidas */
.alert{position:relative;border-radius:9px;border-width:1px;box-shadow:0 8px 24px #0000000c}.alert.success{border-left:4px solid #4f9a6b}.alert.danger{border-left:4px solid #bc5555}
.flash-stack{display:grid;gap:8px;margin-bottom:14px}.quick-flash{display:flex;align-items:center;gap:12px;transition:.18s ease}.quick-flash>span{flex:1}.flash-close{border:0;background:transparent;color:inherit;font-size:11px;font-weight:800;text-decoration:underline;cursor:pointer;padding:5px}.quick-flash.is-closing{opacity:0;transform:translateY(-5px)}
.confirmation-modal-backdrop{position:fixed;inset:0;background:#1118;display:grid;place-items:center;z-index:300;padding:20px}.confirmation-modal{width:min(610px,100%);background:#fff;border-radius:14px;padding:28px;box-shadow:0 28px 80px #0004;position:relative;text-align:center}.modal-close{position:absolute;right:14px;top:10px;border:0;background:transparent;font-size:28px;cursor:pointer;color:#68727c}.confirmation-check{display:inline-grid;place-items:center;width:48px;height:48px;border-radius:50%;background:var(--ref-green-bg);color:var(--ref-green);font-size:25px;font-weight:900}.confirmation-modal h2{margin:12px 0 7px}.confirmation-modal p{margin:5px 0}.modal-review-note{color:var(--ref-amber)}.modal-success-note{color:var(--ref-green)}.confirmation-downloads,.confirmation-modal-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:18px}

@media(max-width:1100px){.user-create-grid{grid-template-columns:1fr 1fr}.lot-management-panel{align-items:flex-start;flex-direction:column}.lot-management-panel form{width:100%}.admin-selected-actions{align-items:flex-start;flex-direction:column}.users-table{overflow-x:auto}}
@media(max-width:1200px){.ux-metric-grid.six{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.app-content{padding:22px 16px 48px}.stage-head{align-items:flex-start}.extraction-bulk-tools{align-items:stretch}.lot-action-toolbar{align-items:flex-start;flex-direction:column}.lot-action-toolbar>div,.lot-primary-actions{flex-wrap:wrap}.lot-primary-actions{width:100%}.lot-primary-actions .btn{flex:1}.profile-grid{grid-template-columns:1fr}.tracking-filters label{flex:1 1 180px}.sidebar-portfolio-actions form{position:fixed;left:16px;right:16px;bottom:16px;width:auto}}
@media(max-width:650px){.ux-page-head h1,.page-head h1{font-size:24px}.ux-metric-grid.four,.ux-metric-grid.five,.ux-metric-grid.two{grid-template-columns:1fr 1fr}.user-create-grid{grid-template-columns:1fr}.user-create-grid button{grid-column:auto}.missing-bulk-bar,.lot-management-panel form,.admin-review-buttons{align-items:stretch;flex-direction:column}.missing-bulk-bar .btn,.lot-management-panel label,.lot-management-panel .btn,.admin-review-buttons .btn{width:100%}.page-head-actions{align-items:stretch;flex-direction:column}.queue-tabs{overflow-x:auto}.queue-tabs a{white-space:nowrap}}


/* ==========================================================
   CORREÇÕES SOLICITADAS — FINAL VERIFICADA 2026-08-31
   ========================================================== */

/* Sino CNA: ícone vetorial simples, sem emoji e sem gradiente */
.app-header .notification-bell{position:relative;display:inline-grid!important;place-items:center!important;width:36px!important;height:36px!important;padding:0!important;margin:0 4px!important;color:#C38326!important;border-radius:8px!important;font-size:0!important;background:transparent!important;text-decoration:none}
.app-header .notification-bell:hover{background:#fbf7ee!important;color:#C38326!important}
.app-header .notification-bell-icon{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.app-header .notification-bell span{right:-3px!important;top:-3px!important;background:#C38326!important}

/* Cards do dashboard sem traços coloridos no topo */
.ux-metric,.ux-metric.attention,.ux-metric.success{border:1px solid var(--ref-line)!important;border-top-width:1px!important}
.ux-metric:hover{border-color:#c9a24d!important}

/* Fontes maiores, menos pesadas e alinhamento consistente */
.ux-page-head h1{font-size:27px!important;font-weight:600!important;letter-spacing:-.02em}
.ux-page-head p{font-size:13px!important;font-weight:400!important;line-height:1.5}
.ux-metric{min-height:118px!important;padding:18px 17px!important}
.ux-metric span{font-size:13px!important;line-height:1.3!important;font-weight:500!important;color:#4e5760!important;min-height:34px;display:flex;align-items:flex-start}
.ux-metric strong{font-size:29px!important;line-height:1!important;margin:8px 0 8px!important;font-weight:600!important;letter-spacing:-.025em}
.ux-metric small{font-size:12px!important;line-height:1.4!important;font-weight:400!important;color:#717b84!important}
.metric-triple{font-size:22px!important}
.ux-section-head h2{font-size:21px!important;font-weight:600!important;letter-spacing:-.01em}
.ux-section-head p{font-size:13px!important;font-weight:400!important}
.ux-task-row{padding:15px 16px!important;min-height:70px!important;align-items:center!important}
.ux-task-row strong{font-size:14px!important;line-height:1.35!important;font-weight:600!important}
.ux-task-row span{font-size:12px!important;line-height:1.45!important;font-weight:400!important}
.ux-task-row b{font-size:12px!important;line-height:1.25!important;font-weight:600!important;min-width:108px;text-align:right}
.ux-task-group-label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8d681f;padding:4px 2px 1px;margin-top:1px}
.ux-task-group-label.operational{margin-top:10px;color:#66717b}
.ux-panel-head h3{font-size:15px!important;font-weight:600!important}
.ux-panel-head a{font-size:12px!important;font-weight:600!important}
.ux-empty,.ux-mini-row span,.ux-mini-row small{font-size:12px!important}

/* Extração: arquivos separados da Assertiva ANTES dos processos */
#extracao{display:flex!important;flex-direction:column!important}
#extracao>.stage-head{order:1!important}
#extracao>.ux-metric-grid{order:2!important}
#extracao>.extraction-bulk-tools{order:3!important}
#extracao>.review-tabs{order:4!important}
#extracao>.missing-bulk-bar{order:5!important}
#extracao>.assertiva-split-downloads{order:6!important;margin:0 0 14px!important}
#extracao>.stack{order:7!important}
#extracao>.pagination-bar{display:none!important;order:8!important}

/* Formulário de usuário: só o campo incorreto é limpo/destacado */
.user-create-grid input[aria-invalid="true"],.user-create-grid select[aria-invalid="true"]{border-color:#b84d4d!important;box-shadow:0 0 0 2px rgba(184,77,77,.10)!important;background:#fffafa!important}

@media(max-width:1200px){.ux-metric span{min-height:0}.ux-task-row b{min-width:0}}

/* ==========================================================
   AJUSTES FINAIS — RODADA 2 — 2026-08-31
   ========================================================== */

/* Preferência visual: nenhum traço automático acima de controles/details. */
details{border-top:0!important}
.header-user-menu,.header-user-menu>summary,.user-action-row details,.user-action-row details>summary,.issue-action,.sidebar-portfolio-menu,.sidebar-portfolio-tool{border-top:0!important;margin-top:0!important;padding-top:0!important}
.process-card-details{border-top:0!important}

/* Cabeçalho: remove a barra que aparecia acima do usuário por herança de <details>. */
.app-header .header-user-menu{margin:0!important;padding:0!important;border:0!important;align-self:center}
.app-header .header-user-menu>summary{margin:0!important;padding:0!important;border:0!important}

/* Tipografia mais leve e legível no sistema. */
.app-body{font-weight:400}
.app-body strong{font-weight:600}
.app-body .sidebar-link{font-size:13px!important;font-weight:500!important}
.app-body .sidebar-brand-cna{font-weight:400}
.app-body .ux-eyebrow{font-weight:600!important}
.app-body .btn,.app-body button,.app-body summary.btn{font-weight:600!important}
.app-body .badge{font-weight:600!important}
.app-body .ux-table-card th{font-weight:600!important}
.app-body .ux-table-card td{font-weight:400!important}
.app-body .ux-action-link{font-weight:500!important}
.app-body .header-user-text strong{font-weight:600!important}
.app-body .header-user-text span{font-weight:400!important}
.app-body .ux-task-group-label{font-weight:600!important}
.app-body .ux-task-row strong{font-weight:500!important}
.app-body .ux-task-row b{font-weight:500!important}
.app-body .ux-panel-head h3,.app-body .ux-section-head h2,.app-body .ux-page-head h1{font-weight:600!important}

/* Prefeitura atual: um único dropdown, sem três botões ocupando a lateral. */
.sidebar-portfolio-menu{position:relative;margin:0 2px 8px!important;padding:0!important}
.sidebar-portfolio-menu>summary.sidebar-portfolio{position:relative;cursor:pointer;list-style:none;margin:0!important;padding:10px 34px 11px 12px!important;border:1px solid transparent!important;border-radius:8px;transition:.15s ease}
.sidebar-portfolio-menu>summary.sidebar-portfolio::-webkit-details-marker{display:none}
.sidebar-portfolio-menu>summary.sidebar-portfolio:hover,.sidebar-portfolio-menu[open]>summary.sidebar-portfolio{background:#ffffff09;border-color:#ffffff12!important}
.sidebar-portfolio-chevron{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-style:normal;color:#d1a54d;font-size:15px;transition:.15s ease}
.sidebar-portfolio-menu[open] .sidebar-portfolio-chevron{transform:translateY(-50%) rotate(180deg)}
.sidebar-portfolio-popover{position:absolute;left:calc(100% + 12px);bottom:0;width:310px;background:#fff;color:#171a1d;border:1px solid var(--ref-line);border-radius:11px;padding:14px;z-index:90;box-shadow:0 18px 50px #0003;display:grid;gap:12px}
.sidebar-portfolio-popover-head{display:grid;gap:3px}.sidebar-portfolio-popover-head strong{font-size:14px;font-weight:600}.sidebar-portfolio-popover-head small{font-size:11px;color:var(--ref-muted)}
.sidebar-portfolio-popover label{margin:0;font-size:11px;font-weight:500}.sidebar-portfolio-popover input,.sidebar-portfolio-popover select{width:100%;margin-top:5px}
.sidebar-portfolio-select-form{margin:0}
.sidebar-portfolio-tool>summary{list-style:none;cursor:pointer;border:1px solid var(--ref-line)!important;border-radius:7px;padding:9px 10px!important;margin:0!important;color:#6f5119;font-size:11px;font-weight:600;background:#fafbfc}
.sidebar-portfolio-tool>summary::-webkit-details-marker{display:none}
.sidebar-portfolio-tool[open]>summary{background:#fbf7ee;border-color:#d9bd85!important}
.sidebar-portfolio-tool>form{display:grid;gap:8px;padding-top:10px}.sidebar-portfolio-tool .btn{width:100%}

/* Usuários: ações perfeitamente alinhadas e sem traços acima. */
.users-table td{vertical-align:middle}
.users-table td:last-child{vertical-align:middle}
.user-action-row{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:nowrap!important;min-height:34px}
.user-action-row details,.user-action-row form{display:flex!important;align-items:center!important;margin:0!important;padding:0!important;border:0!important}
.user-action-row .btn-mini,.user-action-row summary.btn-mini{height:32px!important;min-height:32px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;margin:0!important;line-height:1!important}

/* Meus processos: status compacto em vez do grande círculo/oval. */
.lot-card{align-items:center!important;min-height:102px}
.lot-card-copy{display:grid!important;gap:6px!important;min-width:0}
.lot-card-copy>strong{font-size:15px;font-weight:600;line-height:1.3}
.lot-card-copy>small{font-size:12px;color:var(--ref-muted)}
.lot-card-statuses{display:flex!important;flex-direction:column!important;align-items:flex-end!important;justify-content:center!important;align-content:flex-end!important;gap:6px!important;min-width:118px;justify-self:end}
.lot-card-statuses .badge{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:max-content!important;min-width:0!important;max-width:100%!important;height:auto!important;padding:6px 10px!important;border-radius:999px!important;font-size:10px!important;line-height:1.1!important;font-weight:600!important;white-space:nowrap!important;text-align:center!important;justify-self:end!important}
.lot-card-statuses .badge.caution{background:#fff2dc!important;color:#8f5e08!important}
.lot-card-statuses .badge.ok{background:var(--ref-green-bg)!important;color:var(--ref-green)!important}

/* Status do lote: badge limpa e pequena. */
.lot-state{font-size:10px!important;font-weight:600!important;letter-spacing:.045em!important;padding:7px 11px!important;line-height:1!important}

@media(max-width:900px){
  .sidebar-portfolio-popover{position:fixed;left:16px;right:16px;bottom:16px;width:auto;max-height:70vh;overflow:auto}
  .user-action-row{flex-wrap:wrap!important}
}

/* ==========================================================
   LEGIBILIDADE GLOBAL — FONTE MAIOR EM TODO O SISTEMA
   2026-08-31 — ajuste solicitado após revisão visual
   ========================================================== */

/* Base geral */
html{font-size:16px}
body,.app-body{font-size:15px!important;line-height:1.5!important}
.app-body p,.app-body li,.app-body dd,.app-body dt{font-size:14px;line-height:1.5}
.app-body small{font-size:12.5px}

/* Cabeçalho e busca */
.app-header{font-size:14px}
.header-search input{font-size:14px!important}
.header-user-text strong{font-size:13px!important}
.header-user-text span{font-size:11.5px!important}
.header-user-popover a{font-size:13px!important}
.header-add-process{font-size:13px!important}

/* Menu lateral */
.app-body .sidebar-link{font-size:14.5px!important;line-height:1.25!important}
.sidebar-brand-sub{font-size:10px!important}
.sidebar-portfolio span{font-size:10px!important}
.sidebar-portfolio strong{font-size:14px!important}
.sidebar-portfolio small{font-size:11.5px!important;line-height:1.35!important}
.sidebar-portfolio-popover-head strong{font-size:15px!important}
.sidebar-portfolio-popover-head small{font-size:12px!important}
.sidebar-portfolio-popover label{font-size:12.5px!important}
.sidebar-portfolio-tool>summary{font-size:12.5px!important}

/* Títulos e textos de página */
.ux-page-head h1,.page-head h1{font-size:30px!important;line-height:1.18!important}
.ux-page-head p,.page-head p{font-size:14px!important;line-height:1.55!important}
.ux-eyebrow{font-size:11.5px!important}
.ux-section-head h2{font-size:23px!important;line-height:1.25!important}
.ux-section-head p{font-size:14px!important;line-height:1.5!important}
.ux-panel-head h3{font-size:16px!important}
.ux-panel-head a{font-size:13px!important}

/* Cards de métricas */
.ux-metric{min-height:124px!important;padding:19px 18px!important}
.ux-metric span{font-size:14px!important;line-height:1.35!important;min-height:36px}
.ux-metric strong{font-size:31px!important;line-height:1!important}
.ux-metric small{font-size:13px!important;line-height:1.45!important}
.metric-triple{font-size:24px!important}

/* Blocos de tarefas / dashboard */
.ux-task-row{min-height:74px!important;padding:16px 17px!important}
.ux-task-row strong{font-size:15px!important;line-height:1.4!important}
.ux-task-row span{font-size:13px!important;line-height:1.5!important}
.ux-task-row b{font-size:13px!important;line-height:1.3!important}
.ux-task-group-label{font-size:12px!important}
.ux-empty,.ux-mini-row span,.ux-mini-row small{font-size:13px!important}

/* Formulários */
.app-body label,.stack-form label,.user-create-grid label,.reassign-panel label,.ux-cadastro-form label{font-size:13px!important;line-height:1.35!important}
.app-body input,.app-body select,.app-body textarea{font-size:14px!important;line-height:1.35!important}
.field-error{font-size:12.5px!important}

/* Botões e badges */
.app-body .btn,.app-body button,.app-body summary.btn{font-size:13px!important;line-height:1.2!important}
.app-body .btn-mini,.app-body summary.btn-mini{font-size:12px!important}
.app-body .badge{font-size:11px!important;line-height:1.15!important}
.lot-state{font-size:11.5px!important}
.lot-card-statuses .badge{font-size:11.5px!important;padding:7px 11px!important}

/* Tabelas */
.ux-table-card th,.users-table th,.distribution-table th{font-size:12.5px!important;line-height:1.3!important}
.ux-table-card td,.users-table td,.distribution-table td{font-size:13.5px!important;line-height:1.45!important}
.ux-table-card td small,.users-table td small,.distribution-table td small{font-size:11.5px!important}

/* Extração / revisão */
.result-card .file-name{font-size:16px!important}
.result-card .reason{font-size:13px!important;line-height:1.45!important}
.process-card-details>summary{font-size:13.5px!important}
.review-tabs a,.queue-tabs a{font-size:13px!important}
.missing-bulk-bar small,.document-queue-toolbar>span{font-size:12.5px!important}
.assertiva-split-downloads{font-size:13.5px}

/* Cadastro / lotes */
.lot-card-copy>strong{font-size:16px!important}
.lot-card-copy>small{font-size:13px!important}
.lot-management-panel h2{font-size:20px!important}
.lot-management-panel p{font-size:13px!important;line-height:1.5!important}
.lot-action-toolbar span,.admin-selected-actions small{font-size:12px!important}

/* Telas auxiliares */
.registration-review-card h2{font-size:20px!important}
.document-queue-toolbar{font-size:13px}
.notification-card span{font-size:13px!important}
.notification-card p{font-size:14px!important}
.audit-event strong{font-size:14px!important}
.audit-event span,.audit-event small{font-size:12.5px!important}
.security-check strong{font-size:14px!important}
.security-check span{font-size:13px!important}

/* Mobile: mantém legibilidade sem estourar os cards */
@media(max-width:900px){
  body,.app-body{font-size:14px!important}
  .app-body .sidebar-link{font-size:14px!important}
  .ux-page-head h1,.page-head h1{font-size:27px!important}
  .ux-metric span{font-size:13px!important}
  .ux-metric strong{font-size:28px!important}
  .ux-metric small{font-size:12px!important}
}

/* ==========================================================
   AJUSTES FINAIS — LOGO OFICIAL + PREFEITURA NO CABEÇALHO
   + LEGIBILIDADE LEVEMENTE MAIOR
   ========================================================== */

/* Logo oficial CNA no topo da lateral */
.app-body .sidebar-brand{
  height:98px!important;
  min-height:98px!important;
  padding:12px 14px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}
.app-body .sidebar-brand-logo{
  display:block!important;
  width:168px!important;
  max-width:100%!important;
  height:auto!important;
  max-height:76px!important;
  object-fit:contain!important;
}

/* A lateral fica dedicada à navegação; prefeitura saiu daqui. */
.app-body .sidebar-bottom{padding:10px 10px 14px!important}

/* Prefeitura atual no cabeçalho, antes de Adicionar processos. */
.header-portfolio-menu{
  position:relative;
  flex:0 0 auto;
  margin-left:auto!important;
}
.header-portfolio-menu>summary::-webkit-details-marker{display:none}
.header-portfolio-summary{
  list-style:none;
  cursor:pointer;
  min-width:220px;
  max-width:270px;
  height:48px;
  padding:6px 38px 6px 12px;
  border:1px solid #dfe3e7;
  border-radius:9px;
  background:#fff;
  display:flex;
  align-items:center;
  position:relative;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.header-portfolio-summary:hover,.header-portfolio-menu[open]>.header-portfolio-summary{
  border-color:#d7b46f;
  background:#fffdf9;
  box-shadow:0 2px 8px rgba(0,0,0,.04);
}
.header-portfolio-copy{
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-areas:"label label" "code name";
  align-items:center;
  column-gap:8px;
  row-gap:1px;
  min-width:0;
  width:100%;
}
.header-portfolio-copy small{
  grid-area:label;
  font-size:10px!important;
  line-height:1!important;
  text-transform:uppercase;
  letter-spacing:.09em;
  color:#7c858d;
  font-weight:500!important;
}
.header-portfolio-copy strong{
  grid-area:code;
  font-size:13.5px!important;
  line-height:1.2!important;
  color:#9a6b13;
  font-weight:600!important;
  white-space:nowrap;
}
.header-portfolio-copy em{
  grid-area:name;
  font-style:normal;
  font-size:12px!important;
  line-height:1.2!important;
  color:#4f5962;
  font-weight:400!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.header-portfolio-chevron{
  position:absolute;
  right:12px;
  top:50%;
  width:18px;
  height:18px;
  transform:translateY(-50%);
  fill:none;
  stroke:#C38326;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:transform .15s ease;
}
.header-portfolio-menu[open] .header-portfolio-chevron{transform:translateY(-50%) rotate(180deg)}
.header-portfolio-popover{
  position:absolute;
  right:0;
  top:calc(100% + 9px);
  width:330px;
  max-height:calc(100vh - 100px);
  overflow:auto;
  background:#fff;
  color:#171a1d;
  border:1px solid var(--ref-line);
  border-radius:11px;
  padding:14px;
  z-index:100;
  box-shadow:0 18px 50px rgba(0,0,0,.18);
  display:grid;
  gap:12px;
}
.header-portfolio-popover-head{display:grid;gap:3px}
.header-portfolio-popover-head strong{font-size:15px!important;font-weight:600!important}
.header-portfolio-popover-head small{font-size:12.5px!important;color:var(--ref-muted)}
.header-portfolio-popover label{margin:0;font-size:13px!important;font-weight:500!important}
.header-portfolio-popover input,.header-portfolio-popover select{width:100%;margin-top:5px;font-size:14px!important}
.header-portfolio-select-form{margin:0}
.header-portfolio-tool{margin:0!important;padding:0!important;border:0!important}
.header-portfolio-tool>summary{
  list-style:none;
  cursor:pointer;
  border:1px solid var(--ref-line)!important;
  border-radius:7px;
  padding:10px 11px!important;
  margin:0!important;
  color:#6f5119;
  font-size:13px!important;
  font-weight:500!important;
  background:#fafbfc;
}
.header-portfolio-tool>summary::-webkit-details-marker{display:none}
.header-portfolio-tool[open]>summary{background:#fbf7ee;border-color:#d9bd85!important}
.header-portfolio-tool>form{display:grid;gap:8px;padding-top:10px}
.header-portfolio-tool .btn{width:100%}

/* O botão continua ao lado da prefeitura, sem empurrar tudo sozinho. */
.app-header .header-add-process{margin-left:0!important}

/* Um pouquinho mais de legibilidade global, sem voltar a deixar a fonte pesada. */
body,.app-body{font-size:15.5px!important}
.app-body .sidebar-link{font-size:15px!important}
.app-header{font-size:14.5px!important}
.header-search input{font-size:14.5px!important}
.header-user-text strong{font-size:13.5px!important}
.header-user-text span{font-size:12px!important}
.header-add-process{font-size:13.5px!important}
.app-body p,.app-body li,.app-body dd,.app-body dt{font-size:14.5px!important}
.app-body small{font-size:13px}
.ux-page-head p,.page-head p,.ux-section-head p{font-size:14.5px!important}
.ux-metric span{font-size:14.5px!important}
.ux-metric small{font-size:13.5px!important}
.ux-task-row strong{font-size:15.5px!important}
.ux-task-row span{font-size:13.5px!important}
.ux-task-row b{font-size:13.5px!important}
.ux-task-group-label{font-size:12.5px!important}
.ux-table-card td,.users-table td,.distribution-table td{font-size:14px!important}
.app-body label,.stack-form label,.user-create-grid label,.reassign-panel label,.ux-cadastro-form label{font-size:13.5px!important}
.app-body input,.app-body select,.app-body textarea{font-size:14.5px!important}
.app-body .btn,.app-body button,.app-body summary.btn{font-size:13.5px!important}

@media(max-width:1220px){
  .header-portfolio-summary{min-width:170px;max-width:200px}
  .header-portfolio-copy em{display:none}
  .header-portfolio-copy{grid-template-columns:1fr;grid-template-areas:"label" "code"}
}
@media(max-width:900px){
  .app-body .sidebar-brand{height:94px!important;min-height:94px!important}
  .app-body .sidebar-brand-logo{width:160px!important}
  .header-portfolio-menu{display:none}
  body,.app-body{font-size:14.5px!important}
  .app-body .sidebar-link{font-size:14.5px!important}
}

/* ==========================================================
   TESTE FINAL LIMPO R2 — PADRONIZAÇÃO E AJUSTES VISUAIS
   2026-09-01
   ========================================================== */

/* Tipografia única no sistema inteiro. */
html,body,.app-body,.app-shell,.app-header,.app-sidebar,.app-content,
button,input,select,textarea,table,th,td,label,summary,.btn,.badge{
  font-family:"Manrope","Segoe UI",Arial,sans-serif!important;
}
body,.app-body{font-size:16px!important;font-weight:400!important;line-height:1.5!important}
.app-body p,.app-body li,.app-body dd,.app-body dt{font-size:15px!important;font-weight:400!important}
.app-body small{font-size:13.5px!important}
.app-body strong{font-weight:600!important}
h1,h2,h3,h4,h5,h6{font-family:"Manrope","Segoe UI",Arial,sans-serif!important;font-weight:600!important}
.app-body .sidebar-link{font-size:15.5px!important;font-weight:500!important}
.app-body .btn,.app-body button,.app-body summary.btn{font-size:14px!important;font-weight:500!important}
.app-body .btn-mini,.app-body summary.btn-mini{font-size:13px!important}
.app-body label{font-size:14px!important;font-weight:500!important}
.app-body input,.app-body select,.app-body textarea{font-size:15px!important;font-weight:400!important}
input::file-selector-button{font:500 14px "Manrope","Segoe UI",Arial,sans-serif!important}
.ux-page-head h1,.page-head h1{font-size:30px!important;font-weight:600!important}
.ux-section-head h2{font-size:23px!important;font-weight:600!important}
.ux-panel-head h3{font-size:16px!important;font-weight:600!important}
.ux-metric span{font-size:15px!important;font-weight:500!important}
.ux-metric strong{font-size:31px!important;font-weight:600!important}
.ux-metric small{font-size:13.5px!important}
.ux-task-row strong{font-size:15.5px!important;font-weight:500!important}
.ux-task-row span{font-size:13.5px!important}
.ux-task-row b{font-size:13.5px!important;font-weight:500!important}
.ux-task-group-label{font-size:12.5px!important;font-weight:600!important;letter-spacing:.08em!important}
.ux-table-card th,.users-table th,.distribution-table th{font-size:13px!important;font-weight:600!important}
.ux-table-card td,.users-table td,.distribution-table td{font-size:14.5px!important;font-weight:400!important}

/* Logo é um link para o início, mantendo a composição intacta. */
.sidebar-brand-home{display:flex;width:100%;height:100%;align-items:center;justify-content:center;text-decoration:none;border:0!important}
.sidebar-brand-home:focus-visible{outline:2px solid #C38326;outline-offset:2px;border-radius:6px}
.sidebar-brand-home .sidebar-brand-logo{pointer-events:none}

/* Prefeitura realmente centralizada na barra superior. */
.app-header{height:72px!important;min-height:72px!important;align-items:center!important}
.header-portfolio-menu{
  display:flex!important;
  align-items:center!important;
  align-self:center!important;
  height:48px!important;
  margin:0 0 0 auto!important;
  padding:0!important;
  border:0!important;
}
.header-portfolio-summary{height:48px!important;margin:0!important;box-sizing:border-box!important}
.header-add-process,.notification-bell,.header-user-menu{align-self:center!important;margin-top:0!important;margin-bottom:0!important}
.header-user-menu{padding-top:0!important}

/* Dashboard: operação à esquerda, cadastro/gestão à direita. */
.dashboard-task-layout{grid-template-columns:minmax(0,1.55fr) minmax(390px,.9fr)!important;gap:20px!important;align-items:start!important}
.operational-task-list,.dashboard-side-stack{align-content:start!important}
.ux-registration-panel{display:grid;gap:9px;align-content:start}
.ux-registration-list{display:grid;gap:8px}
.ux-registration-panel>.ux-task-group-label,.operational-task-list>.ux-task-group-label{margin:0 0 3px!important;padding:0 2px!important;line-height:1.25!important}
.dashboard-side-stack{gap:12px!important}
.dashboard-side-stack .ux-task-row{grid-template-columns:38px minmax(0,1fr)!important;gap:11px!important;padding:13px 14px!important}
.dashboard-side-stack .ux-task-row b{grid-column:2!important;justify-self:end!important;margin-top:3px!important}
.dashboard-side-stack .ux-task-row span{line-height:1.4!important}
.dashboard-side-stack .ux-panel{margin:0!important}

/* Botões: borda completa nos quatro lados. Remove-se só o traço decorativo externo. */
.user-action-row .btn-secondary,.user-action-row summary.btn-secondary{
  border:1px solid #cfd4d8!important;
}
.user-action-row .btn-danger-outline{border:1px solid #e0aaaa!important}
.user-action-row .btn-primary{border:1px solid var(--ref-gold)!important}
.user-action-row details>summary.btn{border-top-width:1px!important;border-top-style:solid!important}
.user-action-row{align-items:center!important}

/* Modal de edição de usuário: substitui a edição inline espremida. */
.user-edit-modal{
  width:min(640px,calc(100vw - 32px));
  max-width:640px;
  padding:0!important;
  border:1px solid #d9dee3!important;
  border-radius:14px!important;
  background:#fff;
  color:#171a1d;
  box-shadow:0 28px 80px rgba(0,0,0,.24);
}
.user-edit-modal::backdrop{background:rgba(10,10,11,.42)}
.user-edit-modal-form{display:grid;gap:20px;padding:22px}
.user-edit-modal-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}
.user-edit-modal-head h2{font-size:23px!important;margin:3px 0 4px!important}
.user-edit-modal-head p{margin:0!important;color:var(--ref-muted);font-size:14px!important}
.user-edit-modal-close{width:36px;height:36px;min-width:36px!important;min-height:36px!important;padding:0!important;border:1px solid #d8dde1!important;border-radius:8px!important;background:#fff!important;color:#353a3f!important;font-size:22px!important;line-height:1!important}
.user-edit-modal-close:hover{background:#f6f7f8!important}
.user-edit-modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.user-edit-modal-grid label{display:grid;gap:6px;margin:0!important}
.user-edit-modal-grid input,.user-edit-modal-grid select{width:100%;margin:0!important}
.user-edit-modal-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:4px}
.user-edit-modal-actions .btn{min-width:130px}

/* Mantém o popup de redefinição de senha organizado e abaixo do botão. */
.user-password-details{position:relative!important}
.user-password-details form{right:auto!important;left:0!important;top:38px!important;width:320px!important}

@media(max-width:1180px){
  .dashboard-task-layout{grid-template-columns:1fr!important}
  .dashboard-side-stack{grid-template-columns:1fr 1fr!important}
  .ux-registration-panel{grid-column:1/-1}
}
@media(max-width:760px){
  body,.app-body{font-size:15px!important}
  .dashboard-side-stack{grid-template-columns:1fr!important}
  .user-edit-modal-grid{grid-template-columns:1fr}
  .user-edit-modal-actions{flex-direction:column-reverse}
  .user-edit-modal-actions .btn{width:100%}
}

/* ==========================================================
   TESTE FINAL LIMPO R3 — CORREÇÕES DE FLUXO E ALINHAMENTO
   2026-09-01
   ========================================================== */

/* Gestão do lote: select e botão no mesmo eixo e com a mesma altura. */
.lot-management-panel form{
  display:flex!important;
  align-items:flex-end!important;
  gap:10px!important;
}
.lot-management-panel form>label{
  display:grid!important;
  gap:6px!important;
  margin:0!important;
}
.lot-management-panel form>label>select{
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
}
.lot-management-panel form>.btn{
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
}

/* Acompanhamento: filtros e ações perfeitamente alinhados. */
.tracking-filters{
  align-items:flex-end!important;
}
.tracking-filters>label{
  display:grid!important;
  gap:6px!important;
  margin:0!important;
}
.tracking-filters>label>input,
.tracking-filters>label>select{
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
}
.tracking-filters>.btn{
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  align-self:flex-end!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}

/* Controles administrativos com select + botão, inclusive ações de fila. */
.admin-selected-actions form,
.admin-review-buttons,
.assign-review-control,
.review-response-form{
  align-items:center!important;
}
.admin-selected-actions select,
.admin-selected-actions .btn,
.admin-review-buttons .btn,
.assign-review-control select,
.assign-review-control .btn{
  min-height:42px!important;
  height:42px!important;
  margin-top:0!important;
  margin-bottom:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.assign-review-control{padding:4px!important}
.review-response-form .btn{min-height:42px!important;align-self:end!important}

@media(max-width:650px){
  .lot-management-panel form>.btn,
  .tracking-filters>.btn,
  .admin-selected-actions .btn,
  .admin-review-buttons .btn{
    width:100%!important;
  }
}

/* ==========================================================
   R3 PATCH — ALINHAMENTO MATCH DE VALORES
   2026-09-01
   ========================================================== */
.ux-match-toolbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
}
.ux-master-upload{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  margin:0!important;
}
.ux-master-upload>span{
  display:flex!important;
  align-items:center!important;
  min-height:44px!important;
  margin:0!important;
  white-space:nowrap!important;
}
.ux-master-upload form{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin:0!important;
}
.ux-master-upload input[type="file"]{
  height:44px!important;
  min-height:44px!important;
  max-width:240px!important;
  margin:0!important;
  padding:4px 6px!important;
  display:flex!important;
  align-items:center!important;
  font:inherit!important;
  line-height:34px!important;
  border:1px solid var(--ref-line)!important;
  border-radius:8px!important;
  background:#fff!important;
}
.ux-master-upload input[type="file"]::file-selector-button{
  height:32px!important;
  margin:0 8px 0 0!important;
  padding:0 10px!important;
  border:1px solid #cfd5da!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#15191d!important;
  font:inherit!important;
  cursor:pointer!important;
}
.ux-master-upload .btn{
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
}
@media(max-width:900px){
  .ux-match-toolbar{align-items:stretch!important;flex-direction:column!important}
  .ux-master-upload{width:100%!important;align-items:stretch!important;flex-direction:column!important}
  .ux-master-upload>span{min-height:auto!important}
  .ux-master-upload form{width:100%!important;align-items:stretch!important;flex-wrap:wrap!important}
  .ux-master-upload input[type="file"]{max-width:none!important;flex:1 1 260px!important}
  .ux-master-upload .btn{flex:0 0 auto!important}
}

/* =========================================================
   Importação direta de processos por planilha
   ========================================================= */
.process-entry-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
.process-entry-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(300px,.85fr);
  gap:24px;
  align-items:center;
  min-height:220px;
}
.process-entry-card .ux-panel-copy h3{margin:8px 0 8px;font-size:20px;font-weight:600}
.entry-source-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:62px;padding:5px 9px;border-radius:999px;
  background:#eef1f4;color:#3b4650;font-size:11px;font-weight:600;letter-spacing:.08em
}
.entry-source-badge.spreadsheet{background:#fff3dd;color:#9a6100}
.spreadsheet-entry-card{border-color:#e3d7bf}
.import-source-name{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}
.spreadsheet-import-intro{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,440px);gap:34px;align-items:center;padding:28px
}
.import-flow-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:22px}
.import-flow-line span{border:1px solid #d9dee3;border-radius:8px;padding:8px 11px;font-size:12px;font-weight:600;background:#fff}
.import-flow-line b{font-weight:500;color:#a76d10}
.import-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.danger-metric strong{color:#b42318}
.import-detection-card{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}
.import-preview-table{max-height:58vh;overflow:auto}
.import-preview-table table{min-width:1000px}
.import-preview-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:16px}

@media(max-width:1250px){
  .process-entry-grid{grid-template-columns:1fr}
  .process-entry-card{grid-template-columns:1fr 1fr}
}
@media(max-width:820px){
  .process-entry-card,.spreadsheet-import-intro{grid-template-columns:1fr}
  .import-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){.import-summary-grid{grid-template-columns:1fr}}

/* R4 — fluxo separado de importações por planilha */
.spreadsheet-value-choice{min-width:360px;display:grid;gap:6px}.spreadsheet-value-choice select{min-height:44px}
.inline-cnj-form{display:flex;gap:8px;align-items:center;min-width:360px}.inline-cnj-form input{min-width:245px}.inline-cnj-form .btn{white-space:nowrap}
.spreadsheet-flow-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.selected-row{background:#fffaf0}
@media(max-width:900px){.spreadsheet-value-choice{min-width:0}.inline-cnj-form{min-width:0;flex-wrap:wrap}.inline-cnj-form input{min-width:210px}.spreadsheet-flow-footer{justify-content:flex-start;flex-wrap:wrap}}

/* CNA UPDATE 02 — ações claras para importações por planilha */
.sheet-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;white-space:nowrap}
.compact-btn{min-height:34px!important;padding:7px 12px!important;font-size:13px!important}
.sheet-download-box{display:flex;align-items:center;gap:16px;flex-wrap:wrap;justify-content:flex-end}
.sheet-download-box>div{display:flex;flex-direction:column;align-items:flex-end;line-height:1.15}
.sheet-download-box strong{font-size:24px;font-weight:600}
.btn.is-disabled{opacity:.55;pointer-events:none;cursor:not-allowed}
#planilha-detalhes{scroll-margin-top:90px}
@media(max-width:900px){.sheet-download-box{justify-content:flex-start}.sheet-download-box>div{align-items:flex-start}}

/* UPDATE 03 — atalhos Assertiva por importação de planilha */
.spreadsheet-assertiva-panel{margin:0 0 18px}
.spreadsheet-assertiva-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.spreadsheet-assertiva-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border:1px solid #dfe3e8;border-radius:10px;background:#fff}
.spreadsheet-assertiva-card .row-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
@media (max-width:1100px){.spreadsheet-assertiva-grid{grid-template-columns:1fr}.spreadsheet-assertiva-card{align-items:flex-start}}

/* =========================================================
   CNA UPDATE 04 — refinamento visual de baixo risco
   ========================================================= */
:root{
  --state-success:#236c43;
  --state-success-bg:#eaf6ee;
  --state-success-line:#b9dfc7;
  --state-info:#285d7a;
  --state-info-bg:#eaf4f9;
  --state-info-line:#bdd8e6;
  --state-warning:#80570d;
  --state-warning-bg:#fff5e3;
  --state-warning-line:#ead092;
  --state-error:#963737;
  --state-error-bg:#fdecec;
  --state-error-line:#efbcbc;
  --state-neutral:#59636d;
  --state-neutral-bg:#f0f2f4;
  --state-neutral-line:#d8dde1;
  --state-returned:#685176;
  --state-returned-bg:#f3eef6;
  --state-returned-line:#d9cce1;
}

/* Tabelas: uma única área de rolagem, sem ocultar colunas ou paginar. */
.ux-table-card,.table-scroll{
  max-width:100%;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
}
.ux-table-card{overflow-y:auto}
.table-scroll{overflow-y:hidden}
.ux-table-card>.table-scroll{width:100%;overflow-y:hidden}
.ux-table-card table,.table-scroll>table{width:100%;min-width:760px}
.ux-table-card th,.ux-table-card td,.table-scroll th,.table-scroll td{vertical-align:middle}
.ux-table-card th:last-child,.ux-table-card td:last-child{padding-right:16px}
.ux-table-card::-webkit-scrollbar,.table-scroll::-webkit-scrollbar{height:10px}
.ux-table-card::-webkit-scrollbar-thumb,.table-scroll::-webkit-scrollbar-thumb{background:#c8cdd2;border:3px solid #fff;border-radius:999px}
.ux-table-card::-webkit-scrollbar-track,.table-scroll::-webkit-scrollbar-track{background:#fff}

/* Filtros: campos e ações com a mesma altura e alinhamento. */
.ux-filter-bar{
  display:flex!important;
  align-items:flex-end!important;
  gap:10px!important;
  flex-wrap:wrap!important;
  margin:0 0 16px!important;
}
.ux-page-head .ux-filter-bar{margin:0!important}
.ux-filter-bar>label{display:grid!important;gap:6px!important;margin:0!important;min-width:150px}
.ux-filter-bar>label input,.ux-filter-bar>label select,
.ux-filter-bar>input:not([type="hidden"]){height:44px!important;min-height:44px!important;margin:0!important}
.ux-filter-bar>input:not([type="hidden"]){flex:1 1 280px;min-width:240px}
.ux-filter-bar>.btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;height:44px!important;min-height:44px!important;margin:0!important;white-space:nowrap}
.ux-filter-bar.compact{justify-content:flex-end}
.ux-filter-bar.compact>label{min-width:170px}
.tracking-filters.ux-filter-bar{padding:14px!important;background:#fff;border:1px solid var(--ref-line);border-radius:10px}

/* Estados semânticos: sucesso, informação, atenção, erro, neutro e devolvido. */
.badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px;
  border:1px solid transparent!important;
  font-weight:600!important;
  text-decoration:none!important;
}
.badge.ok,.badge.safe,.badge.status-success{
  color:var(--state-success)!important;background:var(--state-success-bg)!important;border-color:var(--state-success-line)!important
}
.badge.pending,.badge.manual,.badge.status-info{
  color:var(--state-info)!important;background:var(--state-info-bg)!important;border-color:var(--state-info-line)!important
}
.badge.caution,.badge.review,.badge.status-warning{
  color:var(--state-warning)!important;background:var(--state-warning-bg)!important;border-color:var(--state-warning-line)!important
}
.badge.danger-badge,.badge.status-error{
  color:var(--state-error)!important;background:var(--state-error-bg)!important;border-color:var(--state-error-line)!important
}
.badge.muted-badge,.badge.status-neutral{
  color:var(--state-neutral)!important;background:var(--state-neutral-bg)!important;border-color:var(--state-neutral-line)!important
}
.badge.status-returned{
  color:var(--state-returned)!important;background:var(--state-returned-bg)!important;border-color:var(--state-returned-line)!important
}
.alert,.ux-info{border-radius:9px!important;border:1px solid var(--state-info-line)!important;border-left-width:4px!important;background:var(--state-info-bg)!important;color:var(--state-info)!important;padding:12px 14px!important}
.alert.success,.ux-info.success{border-color:var(--state-success-line)!important;border-left-color:var(--state-success)!important;background:var(--state-success-bg)!important;color:var(--state-success)!important}
.alert.info,.ux-info:not(.success):not(.warning):not(.danger):not(.error){border-left-color:var(--state-info)!important}
.alert.warning,.ux-info.warning{border-color:var(--state-warning-line)!important;border-left-color:var(--state-warning)!important;background:var(--state-warning-bg)!important;color:var(--state-warning)!important}
.alert.danger,.alert.error,.ux-info.danger,.ux-info.error{border-color:var(--state-error-line)!important;border-left-color:var(--state-error)!important;background:var(--state-error-bg)!important;color:var(--state-error)!important}
.alert.neutral{border-color:var(--state-neutral-line)!important;border-left-color:var(--state-neutral)!important;background:var(--state-neutral-bg)!important;color:var(--state-neutral)!important}
.alert.returned{border-color:var(--state-returned-line)!important;border-left-color:var(--state-returned)!important;background:var(--state-returned-bg)!important;color:var(--state-returned)!important}
.spreadsheet-import-alert{margin:14px 0!important}

/* Hierarquia das ações, sem mudar comportamento ou permissão. */
.btn-primary,.btn-confirm{
  background:var(--ref-gold)!important;
  border:1px solid var(--ref-gold)!important;
  color:#15120c!important;
  font-weight:600!important;
}
.btn-primary:hover,.btn-confirm:hover{background:#d0a03e!important;border-color:#d0a03e!important;color:#15120c!important}
.btn-secondary,.btn-filter{
  background:#fff!important;
  border:1px solid #c9cfd4!important;
  color:#252a2f!important;
  font-weight:500!important;
}
.btn-secondary:hover,.btn-filter:hover{background:#f7f8f9!important;border-color:#9fa8b0!important;color:#171a1d!important}
.btn-danger-outline{
  background:#fff!important;
  border:1px solid var(--state-error-line)!important;
  color:var(--state-error)!important;
  font-weight:500!important;
}
.btn-danger-outline:hover{background:var(--state-error-bg)!important;border-color:#d78f8f!important;color:#7f2929!important}
.btn:disabled,.btn.is-disabled,button:disabled{opacity:.52!important;cursor:not-allowed!important;box-shadow:none!important}

/* Estados vazios simples e consistentes. */
.ux-empty-card,
.ux-table-card tbody tr:only-child>td[colspan],
.table-scroll tbody tr:only-child>td[colspan]{
  color:var(--state-neutral)!important;
  background:#fafbfc!important;
  text-align:center!important;
  font-size:14px!important;
  line-height:1.5!important;
  padding:24px 18px!important;
}
.ux-empty-card{border:1px dashed #cfd5da!important;border-radius:10px!important;min-height:72px}

@media(max-width:700px){
  .ux-filter-bar{align-items:stretch!important;flex-direction:column!important}
  .tracking-filters.ux-filter-bar>label{flex:0 0 auto!important}
  .ux-filter-bar>label,.ux-filter-bar>input:not([type="hidden"]),.ux-filter-bar>.btn{width:100%!important;min-width:0!important}
  .ux-filter-bar.compact{justify-content:flex-start}
}

/* CNA UPDATE 05 — downloads ADAM separados por tipo na Central Assertiva. */
.assertiva-adam-list{display:grid;gap:10px}
.assertiva-adam-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 18px!important}
.assertiva-adam-copy{display:grid;gap:3px;min-width:0}
.assertiva-adam-copy>strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.assertiva-adam-copy>span{font-size:12.5px;color:var(--ref-muted)}
.assertiva-adam-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
@media(max-width:900px){
  .assertiva-adam-card{align-items:flex-start;flex-direction:column}
  .assertiva-adam-actions{justify-content:flex-start;width:100%}
}
@media(max-width:600px){.assertiva-adam-actions .btn{width:100%!important}}

/* CNA UPDATE 06 — exportação ADAM e consulta dos contatos da Assertiva. */
.spreadsheet-adam-downloads{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 18px;padding:18px!important}
.spreadsheet-adam-downloads h3{margin:3px 0 5px}.spreadsheet-adam-downloads p{margin:0;max-width:720px;color:var(--ref-muted)}
.spreadsheet-adam-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;flex:0 0 auto}
.spreadsheet-contact-cell{min-width:220px}.spreadsheet-contact-cell>strong,.spreadsheet-contact-cell>span{display:block}
.spreadsheet-contact-cell>span{margin-top:3px;color:var(--ref-muted);font-size:12.5px}
.spreadsheet-contact-details{margin-top:7px}.spreadsheet-contact-details summary{color:var(--ref-gold);cursor:pointer;font-size:12.5px;font-weight:500;list-style-position:inside}
.spreadsheet-contact-popover{display:grid;gap:4px;margin-top:7px;padding:10px 12px;border:1px solid #e0e4e8;border-radius:8px;background:#f8f9fa;font-size:12px;white-space:normal}
.spreadsheet-contact-popover strong{margin-top:4px;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--ref-muted)}
.spreadsheet-contact-popover strong:first-child{margin-top:0}.spreadsheet-contact-popover b{display:inline-block;min-width:72px;font-weight:500;color:var(--ref-muted)}
@media(max-width:900px){.spreadsheet-adam-downloads{align-items:flex-start;flex-direction:column}.spreadsheet-adam-actions{justify-content:flex-start;width:100%}}
@media(max-width:600px){.spreadsheet-adam-actions .btn{width:100%!important}}

/* =========================================================
   CNA UPDATE 09 — refinamentos visuais aprovados
   ========================================================= */

/* O atributo HTML hidden deve prevalecer sobre grids/flex definidos no tema. */
[hidden],#customDistributionSizeWrap[hidden]{display:none!important}

/* Usuários: ações alinhadas e redefinição de senha em área própria. */
.user-action-row{align-items:center!important;gap:7px!important}
.user-action-row .btn,.user-action-row summary.btn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:34px!important;height:34px!important;line-height:1.1!important;text-align:center!important
}
.user-password-modal{width:min(520px,calc(100% - 32px))!important}
.user-password-field{display:grid;gap:7px;margin:0!important;font-size:13px!important}
.user-password-field input{width:100%;min-height:44px;margin:0!important}

/* Entrada por planilha: menos texto e eixos consistentes entre cópia e upload. */
.process-entry-card .ux-panel-copy{align-self:center}
.process-entry-card .ux-panel-copy p{max-width:480px;line-height:1.55;margin:0 0 10px}
.process-entry-card .ux-upload-form{align-items:center;justify-content:flex-end;margin:0}
.process-entry-card .ux-upload-form .btn{display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1.25}

/* Envios recentes: coluna de ações identificada e centralizada. */
.recent-uploads-table th,.recent-uploads-table td{vertical-align:middle!important}
.recent-uploads-table th:last-child{min-width:180px}
.recent-upload-actions{display:flex!important;align-items:center!important;gap:12px!important;white-space:nowrap}
.recent-upload-actions form{display:flex;align-items:center;margin:0}
.recent-upload-actions .ux-action-link,.recent-upload-actions .text-button{line-height:1.25}

/* Extração: progresso da Assertiva antes das ferramentas; seleção contextual colada aos resultados. */
#extracao>.stage-head{order:1!important}
#extracao>.ux-metric-grid{order:2!important}
#extracao>.assertiva-split-downloads{order:3!important;margin:0 0 14px!important}
#extracao>.extraction-bulk-tools{order:4!important}
#extracao>.review-tabs{order:5!important}
#extracao>.missing-bulk-bar{order:6!important}
#extracao>.stack{order:7!important}
#extracao>.pagination-bar{order:8!important}
.extraction-bulk-tools,.missing-bulk-bar{align-items:center!important}
.missing-bulk-bar button:disabled{opacity:.48!important}

.assertiva-split-downloads{align-items:flex-start!important;gap:18px!important}
.assertiva-split-downloads>div:first-child{flex:1 1 720px;max-width:none!important;min-width:0}
.batch-assertiva-summary{margin-top:13px;border:1px solid #dde2e6;border-radius:9px;background:#fff;overflow:hidden}
.batch-assertiva-summary-head{display:flex;align-items:baseline;gap:7px;padding:10px 12px;border-bottom:1px solid #e4e8eb}
.batch-assertiva-summary-head>strong{font-size:13px;font-weight:600}
.batch-assertiva-summary-head>span{font-size:11.5px;color:var(--ref-muted)}
.batch-assertiva-summary .table-scroll{width:100%}
.batch-assertiva-summary table{min-width:650px!important}
.batch-assertiva-summary th,.batch-assertiva-summary td{padding:8px 11px!important;text-align:center!important;font-size:12px!important;line-height:1.3!important}
.batch-assertiva-summary th:first-child,.batch-assertiva-summary td:first-child{text-align:left!important}
.batch-without-document{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:8px;padding:9px 12px;border-top:1px solid #e4e8eb;background:#fafbfc}
.batch-without-document>span{font-size:12px;color:#4f5962}.batch-without-document>strong{font-size:14px}.batch-without-document>small{font-size:11px;color:var(--ref-muted)}

/* Textos auxiliares mantêm ritmo uniforme nas telas administrativas. */
.process-entry-card p,.step-panel p,.ux-section-head p,.assertiva-split-downloads .tiny{line-height:1.5}

@media(max-width:900px){
  .assertiva-split-downloads{flex-direction:column!important}
  .assertiva-split-downloads>div:first-child{flex-basis:auto;width:100%}
  .split-download-actions{justify-content:flex-start!important;width:100%}
  .process-entry-card .ux-upload-form{justify-content:flex-start}
}
@media(max-width:650px){
  .user-action-row{flex-wrap:wrap!important}
  .batch-without-document{grid-template-columns:1fr auto}
  .batch-without-document>small{grid-column:1/-1}
  .missing-bulk-bar{align-items:stretch!important}
}

/* Em notebooks, evita comprimir texto e controles em colunas estreitas. */
@media(max-width:1450px){
  .process-entry-grid{grid-template-columns:1fr!important}
  .process-entry-card{grid-template-columns:minmax(0,1fr) minmax(320px,.75fr)!important}
}
@media(max-width:820px){.process-entry-card{grid-template-columns:1fr!important}}

/* O quadro por tipo usa toda a largura; downloads permanecem logo abaixo. */
.assertiva-split-downloads{flex-direction:column!important}
.assertiva-split-downloads>div:first-child{flex-basis:auto!important;width:100%}
.split-download-actions{justify-content:flex-start!important;width:100%}

/* Campos: foco dourado de um único traço, sem o halo espesso do tema base. */
:where(input,select,textarea):focus{
  border-color:#c38326!important;
  outline:none!important;
  box-shadow:0 0 0 1px rgba(195,131,38,.10)!important;
}
:where(input,select,textarea):focus-visible{
  outline:1px solid #c38326!important;
  outline-offset:1px!important;
  box-shadow:none!important;
}
.ux-dropzone:has(input:focus-visible){outline:1px solid #c38326!important;outline-offset:1px!important;box-shadow:none!important}

/* =========================================================
   CNA UPDATE 11 — clareza por lote e acabamento visual
   ========================================================= */
.ux-metric-grid.seven{grid-template-columns:repeat(7,minmax(0,1fr))}
.app-body .btn,.app-body a.btn,.app-body button.btn,.app-body summary.btn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  text-align:center!important;line-height:1.2!important
}
:where(a[href],button,summary,[tabindex]):focus-visible{
  outline:1px solid #c38326!important;outline-offset:2px!important;box-shadow:none!important;border-radius:6px
}
.document-lot-filter,.match-lot-filter{margin:0 0 14px!important}
.document-lot-filter label,.match-lot-filter label{min-width:280px}
.document-filter-count{margin-left:auto;color:var(--ref-muted);font-size:12px}
.document-save-form{grid-template-columns:minmax(220px,1fr) minmax(180px,.8fr) auto!important;align-items:end!important}
.document-save-form label{margin:0!important}
.document-save-form input,.document-save-form select,.document-save-form .btn{min-height:44px!important}
.document-save-form .btn{min-width:220px}
.match-status-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.match-group-row td{padding:10px 14px!important;background:#f4f6f7!important;color:#46515a!important;font-size:12px!important;font-weight:600!important;text-transform:uppercase;letter-spacing:.04em}
.match-group-row.apt td{background:#eef8f2!important;color:#256b43!important}
.batch-without-document{grid-template-columns:auto auto 1fr auto}
.batch-without-document .ux-action-link{white-space:nowrap}
@media(max-width:1450px){.ux-metric-grid.seven{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:950px){.ux-metric-grid.seven{grid-template-columns:repeat(2,minmax(0,1fr))}.document-save-form{grid-template-columns:1fr 1fr!important}.document-save-form .btn{grid-column:1/-1;width:100%}.document-filter-count{width:100%;margin-left:0}.batch-without-document{grid-template-columns:1fr auto}.batch-without-document>small,.batch-without-document .ux-action-link{grid-column:1/-1}}
@media(max-width:600px){.ux-metric-grid.seven,.document-save-form{grid-template-columns:1fr!important}.document-save-form .btn{grid-column:auto}.document-lot-filter label,.match-lot-filter label{min-width:0}}

/* CNA UPDATE 12 — leitura e trabalho por lote */
/* CNA UPDATE 14 — confirmação individual, sem alterar os formulários existentes */
.identity-review-form{display:grid;gap:12px;margin-top:18px}
.identity-review-form>input[type=text],.identity-review-form>textarea{width:100%;box-sizing:border-box}
.identity-review-form .row-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.identity-review-form .row-actions .btn{min-height:44px;white-space:normal}
.identity-review-form>label{margin:0}
.identity-review-form p{margin:0}
.address-review-form{display:grid;gap:14px;margin-top:20px}
.address-review-form>label{display:block;margin:0}
.address-review-form input:not([type=checkbox]):not([type=hidden]),.address-review-form select,.address-review-form textarea{width:100%;box-sizing:border-box}
.address-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.address-fields label{display:block;margin:0}
.address-street{grid-column:span 2}
.address-review-form .row-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.address-review-form .btn{min-height:44px;justify-self:start}
.address-followup-action{margin-top:16px}
@media(max-width:760px){.address-fields{grid-template-columns:1fr}.address-street{grid-column:auto}}
.assertiva-lot-filter{margin:0 0 14px!important}
.assertiva-lot-filter label{min-width:280px}
.batch-stage-overview{margin-bottom:22px}
.batch-status-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px}
.batch-status-grid .ux-metric{min-height:126px}
.batch-status-grid .ux-metric small{line-height:1.45}
@media(max-width:1500px){.batch-status-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:950px){.batch-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.batch-status-grid{grid-template-columns:1fr}.assertiva-lot-filter label{min-width:0}}
