/* AFERIUM R5 DESIGN V5 NATIVE — tema oficial único.
   O tema visual legado foi removido fisicamente dos CSS operacionais.
   Arquivos operacionais conservam somente estrutura/layout; toda aparência pertence a esta folha. */

html,body{max-width:100%;overflow-x:hidden;}
img,svg,canvas,video{max-width:100%;}
.qf-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

/* Aferium R5 — camada universal de diálogos e correção de overflow.
   O runtime marca qualquer diálogo presente ou futuro com classes canônicas,
   evitando depender de listas de componentes específicos. */
body .qf-dialog-viewport-safe{
  box-sizing:border-box;
  max-inline-size:100vw;
  max-block-size:var(--qf-visual-viewport-height,100dvh);
  overflow:hidden;
}
body .qf-dialog-panel-safe{
  box-sizing:border-box;
  min-inline-size:0;
  max-inline-size:min(100%,960px);
  max-block-size:calc(var(--qf-visual-viewport-height,100dvh) - 20px);
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable both-edges;
}
body .qf-dialog-panel-safe :where(*,::before,::after){box-sizing:border-box;}
body .qf-dialog-panel-safe :where(input:not([type=checkbox]):not([type=radio]),select,textarea,button,.btn,.mini-btn,.mode-btn){
  min-inline-size:0;
  max-inline-size:100%;
}
body [data-qf-overflow-fix="scroll"]{
  max-inline-size:100%;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}
body [data-qf-overflow-fix="wrap"]{
  min-inline-size:0;
  max-inline-size:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
@media(max-width:820px){
  body .qf-dialog-viewport-safe{
    position:fixed;
    inset:0;
    inline-size:100%;
    block-size:var(--qf-visual-viewport-height,100dvh);
    padding:max(6px,env(safe-area-inset-top,0px)) max(6px,env(safe-area-inset-right,0px)) max(6px,env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));
    display:flex;
    align-items:center;
    justify-content:center;
  }
  body .qf-dialog-panel-safe{
    inline-size:100%;
    max-inline-size:100%;
    max-block-size:calc(var(--qf-visual-viewport-height,100dvh) - max(12px,env(safe-area-inset-top,0px) + env(safe-area-inset-bottom,0px)));
    margin:auto;
  }
  body.qf-keyboard-open .qf-dialog-viewport-safe{align-items:flex-start;}
  body.qf-keyboard-open .qf-dialog-panel-safe{margin:0 auto;}
  body .qf-dialog-panel-safe :where(.actions,.modal-actions,.profile-form-actions,.qf276-dialog-actions,.qf-gov-dialog-actions,.qf258-form-actions,.v177-edit-actions,.signpad-actions,.nc-actions,.qf-v279-batch-actions,.qf-sheet-editor-actions){
    display:grid;
    grid-template-columns:minmax(0,1fr);
    inline-size:100%;
    gap:10px;
  }
  body .qf-dialog-panel-safe :where(.actions,.modal-actions,.profile-form-actions,.qf276-dialog-actions,.qf-gov-dialog-actions,.qf258-form-actions,.v177-edit-actions,.signpad-actions,.nc-actions,.qf-v279-batch-actions,.qf-sheet-editor-actions)>*{
    inline-size:100%;
    min-inline-size:0;
    max-inline-size:100%;
  }
}

/* AFERIUM — normalização visual operacional compartilhada. */
.sheetPage .pageNumber{z-index:var(--qf-z-local);}.logoCell{text-align:center;}.signBlock{text-align:center;}.toast{opacity:0;}.toast.show{opacity:1;}.empty{text-align:center;}.viewer-fallback{text-align:center;}@media (max-width: 900px){.btn, .mini-btn, .mode-btn{text-align:center;}}.deadline-days{text-align:center;}.dossier-table th,
.dossier-table td{text-align:left;}.nav-btn{text-align:left;}#questionnaireModal{z-index:var(--qf-z-modal);}.v102-preview th,.v102-preview td{text-align:left;}.v102-sign-line{text-align:center;}.v104-banner p{opacity:.95;}body .btn,body .mini-btn,body .mode-btn,body button {text-align:center;}body .modal-head{z-index:var(--qf-z-sticky);}.v142-dead-days{text-align:center;}.v142-dead-empty{text-align:center;}.v143-audit-time{text-align:right;}.v143-audit-empty{text-align:center;}@media (max-width:1100px){.v143-audit-time{text-align:left;}}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .filters{z-index:var(--qf-z-sticky);}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .card{text-align:left;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .modal{z-index:var(--qf-z-modal);}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .btn:disabled{opacity:.45;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .sie{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .ph-title{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official .band{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .choice.vertical button{text-align:left;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .sigfill{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .sigmeta{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .nc-modal{z-index:var(--qf-z-modal-nested);}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official.full-official .official-cnc{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official th{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official .band,:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official th.band{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official .official-cnc{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official .auto{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .print-head-v27 .ph-title-main{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official.full-official th{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official.full-official td.label{text-align:left;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official.full-official td.official-cnc{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .oh-logo{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .oh-title{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .oh-elab{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .choice-final{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official-cnc{text-align:center;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .add-action-wrap{text-align:right;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .top{z-index:var(--qf-z-sticky);}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .modal,:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .nc-modal,:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .signpad-modal{z-index:var(--qf-z-modal-nested);}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) [aria-invalid="true"]{outline-offset:2px;}@media (max-width:900px){#planilhas .qf-v200-head-chips span{text-align:center;}}@media (max-width:900px){.qf-mobile-header{z-index:var(--qf-z-nav);}.qf-mobile-backdrop{z-index:var(--qf-z-backdrop);opacity:0;}body.qf-menu-open .qf-mobile-backdrop{opacity:1;}.btn,.mini-btn,.mode-btn{text-align:center;}}@media (max-width:900px){.qf-drawer-btn{text-align:left;}body .btn,
  body .mini-btn,
  body .mode-btn{text-align:center;}}.qf-login-brand{z-index:var(--qf-z-local);}.qf-login-copy{z-index:var(--qf-z-local);}.qf-login-badges{z-index:var(--qf-z-local);}.qf-login-foot{text-align:center;}#qfSessionGate{z-index:var(--qf-z-auth);}.qf-session-card{text-align:center;}.qf-auth-badge{z-index:var(--qf-z-toast);}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .signpad-modal{z-index:var(--qf-z-modal-nested);}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .sigstamp{text-align:left;}@media (max-width:760px){:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .stamp-preview{text-align:left;}}.qf-cloud-badge{z-index:var(--qf-z-toast);}.modal{z-index:var(--qf-z-modal);}.toast,.qf-cloud-badge{z-index:var(--qf-z-toast);}#qfLoginGate{z-index:var(--qf-z-auth);}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline-offset:2px;}thead th{z-index:var(--qf-z-sticky);}:where(button,a,input,select,textarea,[tabindex]):focus-visible{outline-offset:3px;}button:disabled,[aria-disabled="true"]{opacity:.58;}.qf-legal-modal{z-index:var(--qf-z-modal);}.qf-legal-empty{text-align:center;}body.qf-login-locked #qfLoginGate{z-index:var(--qf-z-auth);isolation:isolate;}/* O portao de login ja cria contexto proprio (isolation:isolate + z-index),
   entao o campo nao precisa de elevacao. Com z-index:90 sobre position:relative
   o input passava a ser pintado acima do botao de revelar senha (z-index:4),
   tornando o olhinho inalcancavel ao toque. */
.modal:not(.show):not(.active):not(.open),
#modal:not(.show):not(.active):not(.open){opacity:0;}.modal.show,.modal.active,.modal.open,#modal.show,#modal.active,#modal.open{opacity:1;}form[data-qf-submitting="1"] button[type="submit"],
button[data-qf-action-busy="1"]{opacity:.68;}#signatureModal.qf-signature-portal{z-index:var(--qf-z-modal-nested);isolation:isolate;}#signatureModal.qf-signature-portal .signpad-head{z-index:var(--qf-z-sticky);}#signatureModal.qf-signature-portal .signpad-actions{z-index:var(--qf-z-sticky);}#signatureModal.qf-signature-portal .btn:disabled{opacity:.62;}@media (max-width:760px){#signatureModal.qf-signature-portal .stamp-preview{text-align:left;}}.qf-consolidation-modal{z-index:var(--qf-z-modal);}.qf-consolidation-head{z-index:var(--qf-z-sticky);}.qf-consolidation-actions button:disabled{opacity:.55;}.qf275-modal,.qf275-confirm-modal{z-index:var(--qf-z-modal-nested);}.qf275-confirm-modal{z-index:var(--qf-z-modal-nested);}.qf276-legal-hero-row{z-index:var(--qf-z-local);}.qf276-btn:disabled{opacity:.5;}.qf276-empty{text-align:center;}.qf276-modal{z-index:var(--qf-z-modal);}.qf276-print-frame{opacity:.01;z-index:var(--qf-z-behind);}.qf276-legal-loading{text-align:center;}#qfSystemEmergency{z-index:var(--qf-z-critical);}.recall-v96-hero-main h2{z-index:var(--qf-z-local);}.recall-v96-hero-main p{z-index:var(--qf-z-local);}.recall-v96-hero-tags{z-index:var(--qf-z-local);}.recall-v96-step:not(:last-child)::after{z-index:var(--qf-z-local);}#recall .phase56-list .empty,#recall .recall-v96-trace-list>.empty{text-align:center;}.qf-v266-modal{z-index:var(--qf-z-modal-nested);}.qf-v266-head{z-index:var(--qf-z-sticky);}:where(button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])):focus-visible{outline-offset:3px;}.qf-skip-link{z-index:var(--qf-z-skip);}.qf-signature-cell-clean{text-align:center;}.qf-sheet-history-empty{text-align:center;}.qf258-modal{z-index:var(--qf-z-modal);}.v177-modal{z-index:var(--qf-z-modal);}.qf-v280-conflict{z-index:var(--qf-z-modal);}.qf-v280-restore-confirm button:disabled{opacity:.55;}.viewer-pdf-fallback{text-align:center;}.qf-write-blocked{z-index:var(--qf-z-toast);}.qf-dialog-viewport-safe{isolation:isolate;}@media (max-width:820px){.nc-head,.signpad-head,.qf-v279-batch-head{z-index:var(--qf-z-sticky);}.nc-actions,.signpad-actions,.qf-v279-batch-actions{z-index:var(--qf-z-sticky);}.nc-actions > *{text-align:center;}}/* Governança — estados visuais operacionais. */
#termoCompromisso .qf-gov-hero-copy,#termoCompromisso .qf-gov-hero-seal{z-index:var(--qf-z-local);}.qf-gov-modal{z-index:var(--qf-z-modal-nested);}.qf-gov-lock{outline-offset:1px;}#bibliotecaLegal .qf276-metric:before{opacity:.75;}#bibliotecaLegal .qf276-source-health .qf276-empty{text-align:left;}.qf-rt-page-copy{z-index:var(--qf-z-local);}.qf-rt-page-side{z-index:var(--qf-z-local);}.qf-rt-pending-box{text-align:center;}.qf-rt-empty{text-align:center;}.qf-gov-empty,.qf-gov-waiting{text-align:center;}@media (max-width:650px){.qf-rt-pending-box{text-align:left;}}/* Qualidade — estados visuais operacionais. */
.qf-q-issue{text-align:left;}.qf-q-upload button:disabled{opacity:.65;}.qf-q-evidence.retired{opacity:.72;}.qf-q-empty{text-align:center;}.qf-q-focus-pulse{outline-offset:3px;}.qf-q-thumb-placeholder{text-align:center;}#viewerModal.modal.show,#detailsModal.modal.show,#profileFormModal.modal.show,#moduleGuideModal.modal.show,#pacFormModal.modal.show,#docFormModal.modal.show{z-index:var(--qf-z-modal);}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .nc-modal.show,:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .signpad-modal.show{z-index:var(--qf-z-modal-nested);}.qf-gov-modal.show{z-index:var(--qf-z-modal-nested);}.toast{z-index:var(--qf-z-toast);}/* Administração de planilhas — estados visuais operacionais. */
.qf-sheet-btn:disabled{opacity:.46;}.qf-sheet-paper-code{text-align:right;}.qf-sheet-rail-stats>div{text-align:center;}.qf-sheet-admin-empty,.qf-sheet-admin-loading{text-align:center;}.qf-sheet-admin-modal{z-index:var(--qf-z-modal);}/* Administração da plataforma — estados visuais operacionais. */
.qf-platform-hero span{opacity:.8;}.qf-platform-table th,.qf-platform-table td{text-align:left;}/* Informações do sistema — estados visuais operacionais. */
.qf-system-card dd{text-align:right;}.qf-license-block{z-index:var(--qf-z-critical);}.qf-license-block-card{text-align:center;}@media (max-width:760px){.qf-system-card dd{text-align:left;}}

/* =====================================================================
   AFERIUM R5 DESIGN V5 — sistema visual semântico claro/escuro.
   Esta camada é exclusivamente visual. Não altera regras, dados ou fluxos.
   ===================================================================== */
:root{
  color-scheme:light;
  --qf-space-1:4px;--qf-space-2:8px;--qf-space-3:12px;--qf-space-4:16px;--qf-space-5:20px;--qf-space-6:24px;--qf-space-8:32px;
  --qf-radius-control:11px;--qf-radius-card:16px;--qf-radius-panel:20px;--qf-radius-hero:24px;--qf-radius-pill:999px;
  --qf-shadow-control:var(--qf-ui-shadow-1);--qf-shadow-card:var(--qf-ui-shadow-2);--qf-shadow-panel:var(--qf-ui-shadow-3);
  --qf-ui-canvas:#f3f6f8;
  --qf-ui-surface:#ffffff;
  --qf-ui-surface-raised:#ffffff;
  --qf-ui-surface-soft:#f7f9fa;
  --qf-ui-surface-muted:#eef3f5;
  --qf-ui-text:#182432;
  --qf-ui-text-strong:#0b1622;
  --qf-ui-text-2:#42526a;
  --qf-ui-text-3:#58697e;
  --qf-ui-text-4:#5b6b7d;
  --qf-ui-border:#d9e2e7;
  --qf-ui-border-soft:#e6ecef;
  --qf-ui-border-strong:#cbd7dd;
  --qf-ui-brand:#087e87;
  --qf-ui-brand-strong:#066a72;
  /* Marca aplicada a texto. No tema claro o tom de preenchimento (#087e87) fica
     entre 4,29:1 e 4,45:1 sobre as superfícies claras — abaixo do mínimo legível.
     O texto usa o tom forte; preenchimentos e bordas seguem em --qf-ui-brand. */
  --qf-ui-brand-text:#066a72;
  --qf-ui-brand-soft:#e3f5f5;
  --qf-ui-brand-soft-2:#d2eeee;
  --qf-ui-success:#16794a;
  --qf-ui-warning:#8a6116;
  --qf-ui-danger:#b42318;
  --qf-ui-shadow-1:0 1px 2px rgba(12,27,40,.035);
  --qf-ui-shadow-2:0 10px 30px rgba(12,27,40,.065);
  --qf-ui-shadow-3:0 24px 64px rgba(12,27,40,.13);
  --qf-ui-overlay:rgba(7,17,31,.64);
  --qf-ui-nav:#f7f9fb;
  --qf-ui-nav-raised:#ffffff;
  --qf-ui-nav-text:#46566b;
  --qf-ui-nav-muted:#8490a0;
  --qf-ui-nav-heading:#182638;
  --qf-ui-nav-border:#dce4ea;
  --qf-ui-nav-active:#e7f2f3;
  --qf-ui-nav-icon:#728196;
  --qf-ui-sheet:#ffffff;
  --qf-ui-sheet-soft:#f8fafc;
  --qf-ui-sheet-text:#172033;
  --qf-ui-sheet-line:#697586;
  --qf-ui-login-bg:radial-gradient(circle at 12% 18%,rgba(21,143,153,.10),transparent 30%),radial-gradient(circle at 84% 14%,rgba(76,118,162,.08),transparent 28%),linear-gradient(145deg,#e8eef2 0%,#f6f8fa 49%,#eaf1f4 100%);
  --qf-ui-hero:radial-gradient(circle at 93% 8%,rgba(13,131,140,.13),transparent 31%),linear-gradient(135deg,#ffffff 0%,#f7fbfb 62%,#edf7f7 100%);
  --bg:var(--qf-ui-canvas);
  --surface:var(--qf-ui-surface);
  --line:var(--qf-ui-border);
  --text:var(--qf-ui-text);
  --muted:var(--qf-ui-text-3);
  --primary:var(--qf-ui-brand);
  --primary-dark:var(--qf-ui-brand-strong);
  --shadow:var(--qf-ui-shadow-2);
  --sheet-black:var(--qf-ui-sheet-text);
  --sheet-line:var(--qf-ui-sheet-line);
  --sheet-soft:var(--qf-ui-sheet-soft);
}
html[data-qf-theme="dark"]{
  color-scheme:dark;
  --qf-ui-canvas:#0d1622;
  --qf-ui-surface:#111f2c;
  --qf-ui-surface-raised:#162634;
  --qf-ui-surface-soft:#13222f;
  --qf-ui-surface-muted:#192b3a;
  --qf-ui-text:#e8eef5;
  --qf-ui-text-strong:#f5f8fb;
  --qf-ui-text-2:#c0ccda;
  --qf-ui-text-3:#a8b7c9;
  --qf-ui-text-4:#9aabbd;
  --qf-ui-border:#293d4d;
  --qf-ui-border-soft:#223442;
  --qf-ui-border-strong:#365064;
  --qf-ui-brand:#55c4cb;
  --qf-ui-brand-strong:#73d3d8;
  /* No tema escuro a marca já alcança 5,29:1 a 6,41:1 sobre as superfícies escuras. */
  --qf-ui-brand-text:#55c4cb;
  --qf-ui-brand-soft:#14343a;
  --qf-ui-brand-soft-2:#19424a;
  --qf-ui-success:#52c78b;
  --qf-ui-warning:#e4b35d;
  --qf-ui-danger:#ff8e86;
  --qf-ui-shadow-1:0 1px 2px rgba(0,0,0,.20);
  --qf-ui-shadow-2:0 8px 25px rgba(0,0,0,.25);
  --qf-ui-shadow-3:0 20px 52px rgba(0,0,0,.34);
  --qf-ui-overlay:rgba(1,7,18,.78);
  --qf-ui-nav:#060d17;
  --qf-ui-nav-raised:#0d1925;
  --qf-ui-nav-text:#b9c5d4;
  --qf-ui-nav-muted:#68798f;
  --qf-ui-nav-heading:#e2eaf3;
  --qf-ui-nav-border:rgba(255,255,255,.075);
  --qf-ui-nav-active:rgba(84,196,203,.105);
  --qf-ui-nav-icon:#8291a5;
  --qf-ui-sheet:#111c29;
  --qf-ui-sheet-soft:#172536;
  --qf-ui-sheet-text:#e7edf4;
  --qf-ui-sheet-line:#63758b;
  --qf-ui-login-bg:radial-gradient(circle at 15% 20%,rgba(34,167,187,.13),transparent 32%),radial-gradient(circle at 82% 18%,rgba(14,139,149,.10),transparent 28%),linear-gradient(145deg,#06101d 0%,#091827 48%,#0c1a2b 100%);
  --qf-ui-hero:radial-gradient(circle at 94% 4%,rgba(85,196,203,.12),transparent 31%),linear-gradient(135deg,#142131 0%,#121e2c 62%,#10242a 100%);
}
html.qf-theme-changing :where(body,#qf221DesktopNav,#qf221Drawer,#qf221MobileTop,.main,.topbar,.panel,.card,.module-card,.quick,.qf-theme-toggle,input,select,textarea,button){transition:background-color .16s ease,border-color .16s ease,color .14s ease;}
::view-transition-old(root),::view-transition-new(root){animation-duration:.30s;animation-timing-function:cubic-bezier(.2,.8,.2,1);}

/* Base e shell */
html,body{background:var(--qf-ui-canvas);color:var(--qf-ui-text);}
body.qf221-ready{background:var(--qf-ui-canvas);}
html[data-qf-theme="dark"] body.qf221-ready{background:var(--qf-ui-canvas);}
body.qf221-ready .main{background:transparent;color:var(--qf-ui-text);}
body :where(h1,h2,h3,h4,h5,h6){color:var(--qf-ui-text-strong);}
body :where(p,label,small,.muted,.note){color:var(--qf-ui-text-3);}

/* Tema — controle persistente e acessível */
.qf-theme-toggle{width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:1px solid var(--qf-ui-border);border-radius:10px;background:var(--qf-ui-surface-raised);color:var(--qf-ui-text-3);display:grid;place-items:center;box-shadow:none;position:relative;flex:0 0 36px;overflow:hidden;}
.qf-theme-toggle:hover{border-color:var(--qf-ui-border-strong);color:var(--qf-ui-brand-text);background:var(--qf-ui-surface-soft);filter:none;}
.qf-theme-toggle-track,.qf-theme-toggle-sun,.qf-theme-toggle-moon{position:absolute;inset:0;display:grid;place-items:center;}.qf-theme-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}.qf-theme-toggle-sun,.qf-theme-toggle-moon{transition:opacity .18s,transform .22s cubic-bezier(.2,.8,.2,1);}
html[data-qf-theme="light"] .qf-theme-toggle-sun{opacity:0;transform:rotate(-40deg) scale(.65);}html[data-qf-theme="light"] .qf-theme-toggle-moon{opacity:1;transform:none;}html[data-qf-theme="dark"] .qf-theme-toggle-moon{opacity:0;transform:rotate(35deg) scale(.65);}html[data-qf-theme="dark"] .qf-theme-toggle-sun{opacity:1;transform:none;}
.qf-theme-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;padding-top:10px;border-top:1px solid var(--qf-ui-nav-border);color:var(--qf-ui-nav-muted);font-size:11px;font-weight:650;}.qf-theme-footer .qf-theme-toggle{background:var(--qf-ui-nav-raised);border-color:var(--qf-ui-nav-border);color:var(--qf-ui-nav-text);}

/* Login V5 nativo — DOM e aparência canônicos; nenhum cartão legado intermediário. */
#qfLoginGate.login-screen{
  position:fixed;inset:0;z-index:var(--qf-z-auth);
  min-height:100dvh;overflow:auto;
  display:none;grid-template-columns:minmax(0,1.1fr) minmax(420px,.9fr);
  background:var(--qf-ui-login-bg);color:var(--qf-ui-text);
}
body.qf-login-locked #qfLoginGate.login-screen{display:grid;}
#qfLoginGate.login-screen::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.26;background-image:linear-gradient(rgba(24,50,72,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(24,50,72,.03) 1px,transparent 1px);background-size:48px 48px;mask-image:linear-gradient(to bottom,#000,transparent 90%);}
html[data-qf-theme="dark"] #qfLoginGate.login-screen::before{background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);}
.login-brand{position:relative;padding:clamp(34px,7vw,92px);display:flex;flex-direction:column;justify-content:space-between;min-height:100dvh;z-index:var(--qf-z-local);}
.login-brand-top{display:flex;align-items:center;gap:14px;}.login-logo{width:46px;height:46px;display:grid;place-items:center;flex:none;background:transparent;border:0;box-shadow:none;}.login-logo img{width:44px;height:44px;object-fit:contain;display:block;}.login-word strong{display:block;color:var(--qf-ui-text-strong);font-size:17px;letter-spacing:.06em;}.login-word span{display:block;margin-top:3px;font-size:11px;color:var(--qf-ui-text-3);letter-spacing:.03em;}.login-brand-top>.qf-theme-toggle{margin-left:auto;}
.login-copy{max-width:620px;padding:80px 0 72px;}.login-kicker{display:inline-flex;align-items:center;gap:8px;color:var(--qf-ui-brand-text);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;}.login-kicker::before{content:"";width:24px;height:1px;background:var(--qf-ui-brand);}.login-copy h1{margin:18px 0;font-size:clamp(38px,5vw,66px);line-height:1.02;letter-spacing:-.045em;max-width:650px;font-weight:660;color:var(--qf-ui-text-strong);}.login-copy h1 span{color:var(--qf-ui-brand-text);}.login-copy p{margin:0;color:var(--qf-ui-text-3);font-size:15px;line-height:1.7;max-width:560px;}.login-capabilities{display:flex;gap:8px;flex-wrap:wrap;margin-top:28px;}.login-capability{border:1px solid var(--qf-ui-border);background:color-mix(in srgb,var(--qf-ui-surface) 72%,transparent);padding:8px 11px;border-radius:999px;font-size:11px;color:var(--qf-ui-text-3);}.login-foot{font-size:11px;color:var(--qf-ui-text-4);letter-spacing:.025em;}
.login-panel{position:relative;display:flex;align-items:center;justify-content:center;padding:34px;min-height:100dvh;z-index:var(--qf-z-local);}.login-panel::before{content:"";position:absolute;inset:24px;border:1px solid var(--qf-ui-border);border-radius:30px;background:linear-gradient(180deg,color-mix(in srgb,var(--qf-ui-surface) 55%,transparent),color-mix(in srgb,var(--qf-ui-surface) 12%,transparent));box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 35%,transparent);}
.login-card{position:relative;width:min(100%,430px);z-index:var(--qf-z-local);background:color-mix(in srgb,var(--qf-ui-surface) 96%,transparent);color:var(--qf-ui-text);border:1px solid var(--qf-ui-border);border-radius:24px;box-shadow:0 28px 80px rgba(0,0,0,.20);padding:32px;display:block;min-height:0;overflow:visible;animation:qfV5LoginCardIn .7s var(--qf-v5-ease) both;}
@keyframes qfV5LoginCardIn{from{opacity:0;transform:translateY(18px) scale(.985)}to{opacity:1;transform:none}}
.login-card-head{margin-bottom:26px;}.login-card-head h2{margin:0;font-size:24px;letter-spacing:-.025em;color:var(--qf-ui-text-strong);}.login-card-head p{margin:8px 0 0;font-size:12.5px;color:var(--qf-ui-text-3);line-height:1.55;}.field{margin-top:15px;}.field label{display:block;font-size:11.5px;font-weight:650;color:var(--qf-ui-text-2);margin-bottom:7px;}.input-wrap{height:46px;border:1px solid var(--qf-ui-border);background:var(--qf-ui-surface-raised);border-radius:11px;display:flex;align-items:center;gap:10px;padding:0 13px;transition:border .18s,box-shadow .18s;}.input-wrap:focus-within{border-color:color-mix(in srgb,var(--qf-ui-brand) 55%,var(--qf-ui-border));box-shadow:0 0 0 4px var(--qf-ui-brand-soft);}.input-wrap .icon{width:17px;height:17px;color:var(--qf-ui-text-4);fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}.input-wrap input{border:0;outline:0;background:transparent;width:100%;min-height:0;height:auto;padding:0;box-shadow:none;font-size:13px;color:var(--qf-ui-text);}.login-submit{width:100%;height:46px;min-height:46px;border:0;border-radius:11px;margin-top:20px;background:var(--qf-ui-brand);color:#fff;font-weight:680;font-size:13px;display:flex;align-items:center;justify-content:center;box-shadow:0 5px 15px color-mix(in srgb,var(--qf-ui-brand) 22%,transparent);transition:transform .18s,background .18s,box-shadow .18s;}.login-submit:hover{background:var(--qf-ui-brand-strong);transform:translateY(-1px);}.login-submit:active{transform:none;}.login-submit:disabled{opacity:.70;cursor:wait;}.demo-note{margin-top:16px;padding:11px 12px;border-radius:10px;background:var(--qf-ui-surface-soft);border:1px solid var(--qf-ui-border-soft);color:var(--qf-ui-text-3);font-size:11px;line-height:1.45;}.demo-note strong{color:var(--qf-ui-text-2);}.login-error{min-height:20px;margin-top:-5px;color:var(--qf-ui-danger);font-size:11px;font-weight:600;opacity:0;transition:.18s;}.login-error[data-tone="info"]{color:var(--qf-ui-brand-text);}.login-error.show{opacity:1;}.login-recovery-row{display:flex;justify-content:flex-end;margin-top:9px;min-height:20px}.login-recovery-link{appearance:none;border:0;background:transparent;color:var(--qf-ui-brand-text);padding:2px 0;font-size:11.5px;font-weight:680;line-height:1.35;cursor:pointer;text-decoration:none}.login-recovery-link:hover{text-decoration:underline;text-underline-offset:3px}.login-recovery-link:focus-visible{border-radius:5px;outline:2px solid color-mix(in srgb,var(--qf-ui-brand) 55%,transparent);outline-offset:3px}.login-recovery-link:disabled{opacity:.58;cursor:wait;text-decoration:none}
.login-screen{opacity:1;}body.qf-boot-loading .login-screen{visibility:hidden;}body.qf-login-entering #qfLoginGate .login-brand-top{animation:qfV5LoginPart .52s .06s var(--qf-v5-ease) both;}body.qf-login-entering #qfLoginGate .login-copy{animation:qfV5LoginPart .58s .12s var(--qf-v5-ease) both;}body.qf-login-entering #qfLoginGate .login-card{animation:qfV5LoginCard .62s .16s var(--qf-v5-ease) both;}@keyframes qfV5LoginPart{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}@keyframes qfV5LoginCard{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}
@media(max-width:900px){#qfLoginGate.login-screen{grid-template-columns:1fr;}.login-brand{min-height:auto;padding:28px 28px 0;}.login-copy{padding:42px 0 18px;}.login-foot{display:none;}.login-panel{min-height:auto;padding:18px 24px 32px;}.login-panel::before{inset:8px 14px 18px;}}
@media(max-width:640px){#qfLoginGate.login-screen{display:none;min-height:100dvh;padding:0;}body.qf-login-locked #qfLoginGate.login-screen{display:block;}.login-brand{min-height:auto;padding:20px 20px 0;}.login-brand-top{gap:11px;}.login-logo{width:38px;height:38px;}.login-logo img{width:37px;height:37px;}.login-copy{padding:28px 0 7px;}.login-copy h1{font-size:28px;line-height:1.02;max-width:340px;margin:11px 0 10px;}.login-copy p{font-size:11.3px;line-height:1.5;max-width:345px;}.login-kicker{font-size:11px;}.login-capabilities{display:none;}.login-panel{min-height:auto;padding:8px 14px calc(18px + env(safe-area-inset-bottom,0px));}.login-panel::before{display:none;}.login-card{padding:20px;border-radius:19px;width:100%;max-width:430px;}.login-card-head{margin-bottom:18px;}.login-card-head h2{font-size:20px;}.login-card-head p{font-size:11.5px;}.field{margin-top:12px;}.input-wrap{height:43px;}.login-submit{height:43px;min-height:43px;margin-top:16px;}.demo-note{margin-top:12px;padding:9px 10px;}}

/* Sessão/autenticação pós-login — loader circular premium. */
#qfSessionGate{background:radial-gradient(circle at 50% 36%,rgba(39,172,185,.13),transparent 25%),linear-gradient(180deg,#07111f 0%,#081320 100%);color:#fff;overflow:hidden;}html[data-qf-theme="light"] #qfSessionGate{background:radial-gradient(circle at 50% 36%,rgba(39,172,185,.14),transparent 25%),linear-gradient(180deg,#edf3f6 0%,#e9f0f4 100%);color:#132033;}#qfSessionGate::before{content:"";position:absolute;inset:0;opacity:.15;background-image:linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);background-size:52px 52px;mask-image:radial-gradient(circle at 50% 45%,#000 0,transparent 72%);pointer-events:none;}html[data-qf-theme="light"] #qfSessionGate::before{background-image:linear-gradient(rgba(31,57,75,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(31,57,75,.03) 1px,transparent 1px);}
.qf-session-card{width:min(430px,92vw);min-height:0;padding:24px;border:0;border-radius:0;background:transparent;box-shadow:none;color:inherit;position:relative;z-index:var(--qf-z-local);}.qf-session-orbit{width:164px;height:164px;position:relative;display:grid;place-items:center;margin:0 auto 28px;}.qf-session-ring{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg);overflow:visible;}.qf-session-ring-bg{fill:none;stroke:rgba(255,255,255,.075);stroke-width:3;}html[data-qf-theme="light"] .qf-session-ring-bg{stroke:rgba(20,54,72,.10);}.qf-session-spinner{width:auto;height:auto;border:0;border-radius:0;fill:none;stroke:#5ed2d9;stroke-width:3;stroke-linecap:round;stroke-dasharray:92 266;transform-origin:70px 70px;animation:qfPremiumSessionArc 1.55s linear infinite;filter:none;}.qf-session-ring-glow{position:absolute;inset:18px;border-radius:50%;background:radial-gradient(circle,rgba(74,184,195,.13) 0%,rgba(74,184,195,.035) 45%,transparent 72%);animation:qfSessionGlow 2.3s ease-in-out infinite;}.qf-session-mark{position:relative;z-index:var(--qf-z-local);width:76px;height:76px;border-radius:24px;border:1px solid rgba(255,255,255,.065);background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012));display:grid;place-items:center;box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 14px 30px rgba(0,0,0,.18);}.qf-session-mark img{width:49px;height:49px;object-fit:contain;}.qf-session-dot{display:none;}.qf-session-eyebrow{color:#62cdd4;font-size:11px;letter-spacing:.15em;text-transform:uppercase;font-weight:720;margin-bottom:9px;}.qf-session-card h2{color:#f5f8fb;margin:0 0 10px;font-size:25px;font-weight:660;letter-spacing:-.025em;}.qf-session-card p{min-height:44px;color:#95a5b7;font-size:12px;line-height:1.6;}.qf-session-steps{width:min(100%,300px);display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:22px auto 0;}.qf-session-steps i{display:block;height:2px;border-radius:var(--qf-radius-pill);background:linear-gradient(90deg,rgba(94,210,217,.18),rgba(94,210,217,.54));}.qf-session-actions{margin-top:22px;}.qf-session-actions button{min-height:46px;border-radius:11px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.055);color:#eaf1f7;font-weight:650;}.qf-session-actions button:hover{background:rgba(255,255,255,.09);filter:none;}
html[data-qf-theme="light"] .qf-session-mark{border-color:rgba(29,52,69,.08);background:rgba(255,255,255,.76);box-shadow:inset 0 1px 0 rgba(255,255,255,.75),0 14px 32px rgba(41,65,83,.10);}html[data-qf-theme="light"] .qf-session-spinner{stroke:#0f8b94;filter:none;}html[data-qf-theme="light"] .qf-session-card h2{color:#152235;}html[data-qf-theme="light"] .qf-session-card p{color:#6e7d90;}html[data-qf-theme="light"] .qf-session-eyebrow{color:#0d838c;}html[data-qf-theme="light"] .qf-session-steps i{background:rgba(36,62,79,.08);}html[data-qf-theme="light"] .qf-session-actions button{border-color:var(--qf-ui-border);background:var(--qf-ui-surface-raised);color:var(--qf-ui-text-2);}
.qf-session-card.is-error{padding:30px;border:1px solid var(--qf-ui-border);border-radius:20px;background:var(--qf-ui-surface);box-shadow:var(--qf-ui-shadow-3);}.qf-session-card.is-error .qf-session-spinner{animation:none;stroke:var(--qf-ui-danger);stroke-dasharray:358;}.qf-session-card.is-error .qf-session-ring-glow,.qf-session-card.is-error .qf-session-dot,.qf-session-card.is-error .qf-session-steps{display:none;}.qf-session-card.is-error .qf-session-eyebrow{color:var(--qf-ui-danger);}.qf-session-card.is-error h2{color:var(--qf-ui-text-strong);}.qf-session-card.is-error p{color:var(--qf-ui-text-3);}.qf-session-card.is-error .qf-session-mark{background:var(--qf-ui-surface-soft);border-color:var(--qf-ui-border);box-shadow:none;}.qf-session-card.is-error .qf-session-actions button{background:var(--qf-ui-surface-raised);border-color:var(--qf-ui-border);color:var(--qf-ui-text-2);}
@keyframes qfPremiumSessionArc{to{transform:rotate(360deg)}}@keyframes qfSessionGlow{0%,100%{transform:scale(.96);opacity:.42}50%{transform:scale(1.035);opacity:.82}}

/* Conteúdo, superfícies, formulários e cartões */
body.qf221-ready .topbar{background:var(--qf-ui-surface);border:1px solid var(--qf-ui-border);border-radius:16px;box-shadow:var(--qf-ui-shadow-1);color:var(--qf-ui-text);}.topbar h1,.topbar h2,.topbar h3{color:var(--qf-ui-text-strong);}.topbar p,.topbar span:not(.tag):not(.badge){color:var(--qf-ui-text-3);}
body.qf221-ready :where(.panel,.group-card,.strategy-card,.pac-card,.doc-section,.item-card,.phase2-item,.phase3-card,.phase789-card,.phase56-card,.plan-card,.info-card,.permission-row,.doc-card,.qf-sheet-admin-card,.qf-platform-card,.qf276-card,.qf258-card){background:var(--qf-ui-surface);border-color:var(--qf-ui-border);color:var(--qf-ui-text);box-shadow:var(--qf-ui-shadow-1);}
body.qf221-ready :where(.group-card,.info-card){background:var(--qf-ui-surface);}
body.qf221-ready :where(input:not([type=checkbox]):not([type=radio]),select,textarea){background:var(--qf-ui-surface-raised);color:var(--qf-ui-text);border-color:var(--qf-ui-border);box-shadow:none;}body.qf221-ready :where(input,select,textarea):focus{border-color:var(--qf-ui-brand);box-shadow:0 0 0 4px var(--qf-ui-brand-soft);outline:none;}body.qf221-ready :where(input,textarea)::placeholder{color:var(--qf-ui-text-4);}
body.qf221-ready :where(.chip,.tag,.badge):not(.error):not(.danger){background:var(--qf-ui-surface-soft);border-color:var(--qf-ui-border);color:var(--qf-ui-text-2);}

/* Canonical controls — one base definition; variants only adjust emphasis/size. */
:where(body.qf221-ready :where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn):not([data-qf-open-sheet]):not(.danger):not(.btn-danger):not([data-state="danger"]):not(.status-badge):not(.qf-license-status)):is(button,a,label,input,summary,span,div){min-height:40px;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--qf-ui-border);border-radius:var(--qf-radius-control);background:var(--qf-ui-surface-raised);color:var(--qf-ui-text-2);box-shadow:var(--qf-shadow-control);font-weight:650;line-height:1.2;cursor:pointer;transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease;}
body.qf221-ready :where(.btn){min-height:42px;padding-inline:15px;}
body.qf221-ready :where(.mini-btn){min-height:36px;padding-inline:11px;font-size:12px;}
body.qf221-ready :where(.mode-btn,.qf-sheet-btn){min-height:40px;padding-inline:13px;}
:where(body.qf221-ready :where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn):disabled):is(button,a,label,input,summary,span,div){cursor:not-allowed;opacity:.55;box-shadow:none;}
:where(body.qf221-ready :where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn):not(.danger):not(.btn-danger):not([data-state="danger"]):not(:disabled):hover):is(button,a,label,input,summary,span,div){background:var(--qf-ui-surface-soft);border-color:var(--qf-ui-border-strong);color:var(--qf-ui-text-strong);filter:none;}
body.qf221-ready :where(.btn-primary,.primary):not(.danger):not(.btn-danger){background:var(--qf-ui-brand);border-color:var(--qf-ui-brand);color:#fff;box-shadow:0 7px 18px color-mix(in srgb,var(--qf-ui-brand) 18%,transparent);}body.qf221-ready :where(.btn-primary,.primary):not(:disabled):hover{background:var(--qf-ui-brand-strong);border-color:var(--qf-ui-brand-strong);color:#fff;box-shadow:0 9px 22px color-mix(in srgb,var(--qf-ui-brand) 22%,transparent);}
body.qf221-ready :where(.mode-btn.active,.week-btn.active,.qf-sheet-btn.active,[aria-pressed="true"]):not([data-qf-theme-toggle]){background:var(--qf-ui-brand-soft);border-color:var(--qf-ui-brand-soft-2);color:var(--qf-ui-brand-text);box-shadow:none;}

/* Contenção estrutural de ações no mobile — sem paleta legada. */
@media(max-width:820px){
  body.qf221-ready :where(.top-actions,.actions,.item-actions,.doc-actions,.profile-actions,.profile-form-actions,.attachment-actions,.sheet-attachment-actions,.qf-gov-actions,.qf-gov-request-actions,.qf-gov-dialog-actions,.qf-law-actions,.qf-platform-actions,.qf-platform-formActions,.qf-platform-headActions,.qf-platform-verificationActions,.qf-q-evidence-actions,.qf-rt-decision-actions,.qf-sheet-editor-actions,.qf-v279-planilhas-head-actions,.qf-v280-backup-actions,.qf-write-blocked-actions,.qf258-actions,.qf258-form-actions,.qf276-actions,.qf276-dialog-actions,.signpad-actions,.nc-actions,.v142-dead-actions,.v143-audit-actions,.v177-edit-actions){display:flex;flex-wrap:wrap;inline-size:100%;max-inline-size:100%;gap:10px;}
  body.qf221-ready :where(.actions,.item-actions,.doc-actions,.profile-actions,.profile-form-actions,.attachment-actions,.sheet-attachment-actions,.qf-gov-actions,.qf-gov-request-actions,.qf-gov-dialog-actions,.qf-law-actions,.qf-platform-actions,.qf-platform-formActions,.qf-platform-headActions,.qf-platform-verificationActions,.qf-q-evidence-actions,.qf-rt-decision-actions,.qf-sheet-editor-actions,.qf-v279-planilhas-head-actions,.qf-v280-backup-actions,.qf-write-blocked-actions,.qf258-actions,.qf258-form-actions,.qf276-actions,.qf276-dialog-actions,.signpad-actions,.nc-actions,.v142-dead-actions,.v143-audit-actions,.v177-edit-actions)>:where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn){flex:1 1 100%;inline-size:100%;max-inline-size:100%;}
  body.qf221-ready .top-actions>:where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn){flex:1 1 auto;inline-size:auto;max-inline-size:100%;}
  body.qf221-ready :where(.toolbar,.profile-toolbar,.phase3-toolbar,.phase56-toolbar,.phase789-toolbar,.qf-sheet-catalog-toolbar,.qf-sheet-editor-toolbar,.qf258-toolbar,.qf276-toolbar,.v102-toolbar,.v104-toolbar,.v142-dead-toolbar,.v143-audit-toolbar){min-inline-size:0;max-inline-size:100%;flex-wrap:wrap;gap:10px;}
}

/* Feedback e superfícies globais também pertencem ao tema único. */
body .toast{background:var(--qf-ui-surface-raised);border:1px solid var(--qf-ui-border);color:var(--qf-ui-text);box-shadow:var(--qf-ui-shadow-2);}
body .toast :where(strong,b){color:var(--qf-ui-text-strong);}
body .toast :where(p,span,small){color:var(--qf-ui-text-3);}
#qfSystemEmergency{background:var(--qf-ui-canvas);color:var(--qf-ui-text);}
#qfSystemEmergency :where(h1,h2,h3,strong){color:var(--qf-ui-text-strong);}
#qfSystemEmergency :where(p,span,small){color:var(--qf-ui-text-3);}
body .qf-platform-actionCard{background:var(--qf-ui-surface);border-color:var(--qf-ui-border);color:var(--qf-ui-text);box-shadow:var(--qf-ui-shadow-1);}
body .qf-platform-actionCard :where(h2,h3,strong){color:var(--qf-ui-text-strong);}
body .qf-platform-actionCard :where(p,span,small,label){color:var(--qf-ui-text-3);}
body .qf-platform-actionCard :where(input,textarea,select){background:var(--qf-ui-surface-raised);color:var(--qf-ui-text);border-color:var(--qf-ui-border);}

/* Tabelas normais do sistema */
body.qf221-ready table:not(.gridTable):not(.headTable){color:var(--qf-ui-text);background:var(--qf-ui-surface);border-color:var(--qf-ui-border);}body.qf221-ready table:not(.gridTable):not(.headTable) :where(th,td){border-color:var(--qf-ui-border);color:inherit;background:var(--qf-ui-surface);}body.qf221-ready table:not(.gridTable):not(.headTable) th{background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-2);}

/* Modais e pop-ups obedecem ao mesmo tema */
body :where(.modal,.nc-modal,.signpad-modal,.qf-v279-batch-modal,.qf275-modal,.qf275-confirm-modal,.qf276-modal,.qf-legal-modal,.qf-gov-modal,.qf-sheet-admin-modal,.qf258-modal,.v177-modal,.qf-v266-modal,.qf-consolidation-modal,#signatureModal.qf-signature-portal,.qf-license-block){background:var(--qf-ui-overlay);backdrop-filter:blur(10px) saturate(.92);-webkit-backdrop-filter:blur(10px) saturate(.92);}
body :where(.modal-card,.viewer-card,.doc-modal-card,.pac-modal-card,.nc-panel,.signpad-panel,.qf-v279-batch-panel,.qf275-dialog,.qf275-confirm-card,.qf276-dialog,.qf-legal-dialog,.qf-gov-panel,.qf-sheet-admin-modal>section,.qf258-modal-card,.v177-edit-card,.qf-v266-panel,.qf-consolidation-dialog,.qf-license-block-card){border:1px solid var(--qf-ui-border);background:var(--qf-ui-surface);color:var(--qf-ui-text);box-shadow:var(--qf-ui-shadow-3);}
body :where(.modal-card,.viewer-card,.doc-modal-card,.pac-modal-card,.nc-panel,.signpad-panel,.qf-v279-batch-panel,.qf275-dialog,.qf275-confirm-card,.qf276-dialog,.qf-legal-dialog,.qf-gov-panel,.qf-sheet-admin-modal>section,.qf258-modal-card,.v177-edit-card,.qf-v266-panel,.qf-consolidation-dialog,.qf-license-block-card) :where(h1,h2,h3,h4,h5,strong,legend){color:var(--qf-ui-text-strong);}body :where(.modal-card,.viewer-card,.doc-modal-card,.pac-modal-card,.nc-panel,.signpad-panel,.qf-v279-batch-panel,.qf275-dialog,.qf275-confirm-card,.qf276-dialog,.qf-legal-dialog,.qf-gov-panel,.qf-sheet-admin-modal>section,.qf258-modal-card,.v177-edit-card,.qf-v266-panel,.qf-consolidation-dialog,.qf-license-block-card) :where(p,small,label,.muted){color:var(--qf-ui-text-3);}
body :where(.modal,.nc-modal,.signpad-modal,.qf-v279-batch-modal,.qf275-modal,.qf275-confirm-modal,.qf276-modal,.qf-legal-modal,.qf-gov-modal,.qf-sheet-admin-modal,.qf258-modal,.v177-modal,.qf-v266-modal,.qf-consolidation-modal,#signatureModal.qf-signature-portal,.qf-license-block) :where(input:not([type=checkbox]):not([type=radio]),select,textarea){background:var(--qf-ui-surface-raised);color:var(--qf-ui-text);border-color:var(--qf-ui-border);}
#profileFormModal .profile-form,#profileFormModal :where(.profile-password-tools,.profile-note){background:var(--qf-ui-surface-soft);border-color:var(--qf-ui-border);color:var(--qf-ui-text);}
@media(max-width:820px){#profileFormModal .modal-head{background:var(--qf-ui-surface);border-color:var(--qf-ui-border);}#profileFormModal .profile-form-actions{background:linear-gradient(180deg,rgba(0,0,0,0),var(--qf-ui-surface) 24%);}}

/* Planilhas dentro do sistema seguem o tema; impressão continua clara. */
.sheetPage{background:var(--qf-ui-sheet);color:var(--qf-ui-sheet-text);border-color:var(--qf-ui-border-strong);box-shadow:var(--qf-ui-shadow-2);}.sheetPage .pageNumber{background:var(--qf-ui-sheet);color:var(--qf-ui-sheet-text);}.headTable td,.gridTable th,.gridTable td{border-color:var(--qf-ui-sheet-line);color:var(--qf-ui-sheet-text);}.fillInput,.fillText,.fillSelect{color:var(--qf-ui-sheet-text);background:transparent;}.fillInput::placeholder,.fillText::placeholder{color:var(--qf-ui-text-4);}.signStroke{border-color:var(--qf-ui-sheet-text);}
/* O canvas de assinatura é uma superfície de captura e permanece branco para não alterar o bitmap gerado. */
.canvasSign{background:#fff;color:#111;}

/* Visualizadores de arquivos preservam o conteúdo original do documento/anexo. */
:where(iframe,embed,object,img,video,canvas){filter:none;}
html[data-qf-theme="dark"] :where(.qf221-logo img,.qf221-mobileLogo img,.qf-home-brandmark img,.qf-session-mark img){filter:brightness(0) invert(1);}

@media(max-width:1024px){.qf-login-card{width:min(760px,100%);grid-template-columns:1fr;min-height:0;}.qf-login-visual{min-height:270px;padding:28px;}.qf-login-copy h1{font-size:clamp(32px,5vw,42px);}.qf-home-module-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:720px){#qfLoginGate{padding:0;}.qf-login-card{width:100%;min-height:100dvh;border:0;border-radius:0;box-shadow:none;}.qf-login-visual{min-height:218px;padding:20px;gap:18px;}.qf-login-logo{width:150px;height:48px;}.qf-login-copy h1{font-size:29px;margin-bottom:9px;}.qf-login-copy p{font-size:12px;line-height:1.5;}.qf-login-badges{display:none;}.qf-login-formWrap{padding:22px 18px calc(26px + env(safe-area-inset-bottom,0px));}.qf-login-form{gap:13px;}.qf-login-form h2{font-size:23px;}.qf-login-control input,.qf-login-submit{min-height:46px;}.qf-home-hero{padding:20px;border-radius:18px;}.qf-home-module-grid{grid-template-columns:1fr;padding:9px;border-radius:17px;}.qf-home-card{min-height:0;padding:17px;}.qf-home-shortcut-grid{grid-template-columns:1fr 1fr;}.qf-home-shortcut{min-height:76px;}.qf-session-orbit{width:148px;height:148px;margin-bottom:24px;}.qf-session-card h2{font-size:22px;}}
@media(max-width:430px){.qf-home-shortcut-grid{grid-template-columns:1fr 1fr;}.qf-theme-toggle{width:34px;height:34px;min-width:34px;min-height:34px;}.qf-login-copy h1{font-size:27px;}}

/* IMPRESSÃO / PDF / A4: sempre canônico claro, independente do tema da interface. */
@media print{
  html{color-scheme:light;background:#fff;}body,body.qf221-ready,.main,.section{background:#fff;color:#111827;box-shadow:none;}
  .sheetPage{background:#fff;color:#111827;border-color:#cbd5e1;box-shadow:none;}
  .sheetPage .pageNumber{background:#fff;color:#111827;}.headTable td,.gridTable th,.gridTable td{border-color:#1f2937;color:#111827;}.gridTable th{background:#f8fafc;}.fillInput,.fillText,.fillSelect{color:#111827;background:transparent;}.square,.signStroke{border-color:#111827;}.canvasSign{background:#fff;color:#111;}
  .qf-theme-toggle{display:none;}
}

/* R5 DESIGN V5 — cobertura final de superfícies legadas e estados semânticos.
   Mantém componentes de negócio intactos; somente substitui cores de superfície. */
:root{
  --qf-ui-success-soft:#edf8f2;
  --qf-ui-warning-soft:#fff7e8;
  --qf-ui-danger-soft:#fff0ef;
  --qf-ui-info:#3975a7;
  --qf-ui-info-soft:#edf5fb;
}
html[data-qf-theme="dark"]{
  --qf-ui-success-soft:#142d23;
  --qf-ui-warning-soft:#342a16;
  --qf-ui-danger-soft:#371b1d;
  --qf-ui-info:#84b5df;
  --qf-ui-info-soft:#142a3a;
}

/* Componentes operacionais usam exclusivamente superfícies semânticas V5. */
body.qf221-ready :where(
  .doc-card,.doc-empty,.doc-stat,.doc-side,.doc-dropzone,.doc-type-chip,.doc-section-head,.doc-count,.doc-toggle,
  .strategy-points span,.strategy-mini,.pac-mini,.pac-panel,.pac-doc,.pac-empty,.empty,.viewer-wrap,.item-icon,
  .phase2-metric,.phase2-preview-card,.deadline-stat,.deadline-days,.trace-stat,.trace-step,
  .dossier-brand-logo,.dossier-kpi,.dossier-section-card,.dossier-note,.dossier-badge,
  .phase3-metric,.phase3-tag,.phase3-note-box,.audit-strong-card,.audit-meta span,.audit-compare pre,.lock-note,
  .legal-metric,.legal-badge,.legal-info-box,.legal-alert-metric,
  .phase56-metric,.phase56-tag,.legal-law,.audit-check-item,.recall-report,.recall-step,
  .attachment-field,.phase789-metric,.phase789-tag,.phase789-mini,.phase789-check-card,.phase789-checklist span,.phase789-form,.phase789-toolbar,
  .v102-kpi,.v102-panel,.v102-item,.v102-badge,.v102-preview table,.v104-mini,.v104-tag,.v104-resolve,.v104-time,
  .period-pill,.period-card,.period-day-chip,.module-guide-card,
  .v100-kpi,.v100-panel,.v100-row,.v100-pill,.v100-check,.v100-dossier,
  .v142-dead-kpi,.v142-dead-card,.v142-dead-days,.v142-dead-tag,.v142-dead-empty,.v142-dead-note,
  .v143-audit-kpi,.v143-audit-card,.v143-audit-tag,.v143-audit-empty,.v143-audit-note,
  .v159-kpi,.v159-flow-row,.v159-flow-status,.v159-note,
  .v160-kpi,.v160-row,.v160-status,.v160-dossier-preview,.v160-badge,.v160-table-wrap,
  .v99-lab-card,.v99-integration-item,.v99-tag,
  #perfis .profile-kpi,#perfis .profile-tag,#perfis .profile-session,.qf-auth-badge,
  .v255-doc-stat,.v255-doc-row,.qf-legal-scope-card,.qf-legal-tools,.qf-law-card,.qf-law-link,.qf-law-local,.qf-legal-empty,.qf-legal-foot,
  .qf-consolidation-panel,.qf-consolidation-head,.qf-consolidation-note,.qf-consolidation-item,
  .sheet-attachments-badge,.sheet-attachment-uploader,.sheet-attachment-item,.sheet-attachment-empty,.qf-v273-security-note,
  .qf275-kpi,.qf275-source-chip,.qf275-update-card,.qf275-source-change,.qf275-pill,.qf275-diff>div,.qf275-alert-summary,.qf275-alert-summary div,.qf275-alert-item,.qf275-history>div,
  .qf276-metric,.qf276-card,.qf276-empty,.qf276-print-option,.qf276-sheet-check,.qf276-progress,.qf276-legal-loading,
  .recall-v96-step,.recall-v96-tag,.qf-v266-card,.qf-v266-panel,.qf-v266-note,
  .qf-sheet-history-item,.qf258-kpis article,.qf258-lot-card,.qf258-pill,.qf258-step,.qf258-balance-grid>div,.qf258-calc>div,.qf258-detail-grid>article,.qf258-production-card,.qf258-stamp,.qf258-detail-block,
  .qf-v280-conflict,.qf-v280-restore-confirm,.qf-write-blocked,.qf-runtime-fatal,.qf-runtime-fatal code,
  #qfQualityIntegrityPanel,.qf-q-issue,.qf-q-limit,.qf-q-evidence,
  .qf-platform-summary article,.qf-platform-tableWrap,.qf-platform-actionCard,.qf-platform-bootstrap,.qf-platform-denied,
  #termoCompromisso .qf-gov-card,#termoCompromisso .qf-gov-request,#termoCompromisso .qf-gov-hero,#termoCompromisso .qf-gov-declaration,
  .qf-gov-change-panel,.qf-gov-record-summary>div,.qf-rt-approval-kpis article,.qf-rt-governance-note,.qf-rt-queue-card,.qf-rt-case,.qf-rt-decision-card,.qf-gov-evidence,.qf-gov-sheet-decisions,
  .qf-system-card
){
  background:var(--qf-ui-surface);
  border-color:var(--qf-ui-border);
  color:var(--qf-ui-text);
  box-shadow:var(--qf-ui-shadow-1);
}

/* Superfícies auxiliares, vazias e campos de apoio recebem nível secundário. */
body.qf221-ready :where(
  .doc-empty,.pac-empty,.empty,.phase3-note-box,.dossier-note,.legal-info-box,.audit-compare pre,
  .v142-dead-empty,.v142-dead-note,.v143-audit-empty,.v143-audit-note,.v159-note,
  .qf-legal-empty,.qf-legal-foot,.qf-consolidation-note,.sheet-attachment-empty,.qf-v273-security-note,
  .qf275-history>div,.qf276-empty,.qf276-legal-loading,.qf-v266-note,.qf-v280-restore-confirm,.qf-write-blocked,.qf-runtime-fatal code,
  .qf-q-limit,.qf-rt-governance-note
){background:var(--qf-ui-surface-soft);}

/* Entradas que pertencem a famílias históricas, inclusive toolbars dinâmicas. */
body.qf221-ready :where(
  .phase56-form,.phase789-form,.v142-dead-toolbar,.v143-audit-toolbar,.qf275-case-grid,.qf276-toolbar,.qf276-form,.qf276-print-option,
  .qf258-toolbar,.qf258-form,.qf-legal-tools,.qf-q-upload,.qf-sheet-admin-modal
) :where(input:not([type=checkbox]):not([type=radio]),select,textarea){
  background:var(--qf-ui-surface-raised);
  color:var(--qf-ui-text);
  border-color:var(--qf-ui-border);
}

/* Estados semânticos: continuam amarelo/vermelho/verde/azul, mas adaptados ao tema. */
body.qf221-ready :where(article,div,span,p,label)[class~="yellow"],
body.qf221-ready :where(article,div,span,p,label)[class~="warning"],
body.qf221-ready :where(article,div,span,p,label)[class~="warn"]{
  background:var(--qf-ui-warning-soft);
  border-color:color-mix(in srgb,var(--qf-ui-warning) 30%,var(--qf-ui-border));
  color:var(--qf-ui-warning);
}
body.qf221-ready :where(article,div,span,p,label)[class~="red"],
body.qf221-ready :where(article,div,span,p,label)[class~="danger"],
body.qf221-ready :where(article,div,span,p,label)[class~="bad"],
body.qf221-ready :where(article,div,span,p,label)[class~="critical"],
body.qf221-ready :where(article,div,span,p,label)[class~="error"]{
  background:var(--qf-ui-danger-soft);
  border-color:color-mix(in srgb,var(--qf-ui-danger) 30%,var(--qf-ui-border));
  color:var(--qf-ui-danger);
}
body.qf221-ready :where(article,div,span,p,label)[class~="green"],
body.qf221-ready :where(article,div,span,p,label)[class~="success"],
body.qf221-ready :where(article,div,span,p,label)[class~="ok"]{
  background:var(--qf-ui-success-soft);
  border-color:color-mix(in srgb,var(--qf-ui-success) 30%,var(--qf-ui-border));
  color:var(--qf-ui-success);
}
body.qf221-ready :where(article,div,span,p,label)[class~="blue"],
body.qf221-ready :where(article,div,span,p,label)[class~="neutral"]{
  background:var(--qf-ui-info-soft);
  border-color:color-mix(in srgb,var(--qf-ui-info) 28%,var(--qf-ui-border));
  color:var(--qf-ui-info);
}

/* Editores e administração de planilhas também seguem a superfície atual. */
body.qf221-ready :where(.qf-sheet-admin,.qf-sheet-editor-workspace,.qf-sheet-paper-wrap,.qf-sheet-paper){
  background:var(--qf-ui-surface);
  border-color:var(--qf-ui-border);
  color:var(--qf-ui-text);
}
body.qf221-ready .qf-sheet-signature canvas,
body.qf221-ready #termoCompromisso .qf-gov-sign canvas,
body.qf221-ready .qf-gov-signature-decision canvas{
  background:#fff;
  color:#111;
}

/* Conteúdo documental/anexo nunca recebe filtro de tema. */
body.qf221-ready :where(.doc-viewer iframe,.doc-viewer object,.doc-viewer img,.viewer-frame iframe,.qf276-print-frame,iframe,embed,object){
  background:#fff;
  filter:none;
}

/* =====================================================================
   AFERIUM V5 NATIVE — SHELL CANÔNICO.
   Checkmate visual: o shell antigo não é mascarado nem reaproveitado como
   desenho. IDs/classes qf221 permanecem somente como contratos funcionais.
   ===================================================================== */
:root{
  --qf-v5-nav-w:270px;
  --qf-v5-top-h:72px;
  --qf-v5-content-max:1460px;
  --qf-v5-gutter:clamp(20px,3vw,42px);
  --qf-v5-ease:cubic-bezier(.2,.8,.2,1);
}
body.qf221-ready #qfAppMount{display:block;width:100%;min-height:100dvh;}
body.qf221-ready .app{display:block;width:100%;min-height:calc(100dvh - var(--qf-v5-top-h));overflow:visible;}
body.qf221-ready .main{
  width:auto;min-width:0;min-height:calc(100dvh - var(--qf-v5-top-h));
  margin-left:var(--qf-v5-nav-w);padding:30px var(--qf-v5-gutter) 48px;overflow-x:hidden;
  transition:margin-left .24s var(--qf-v5-ease);
}
body.qf221-ready .section{display:none;min-width:0;width:100%;max-width:var(--qf-v5-content-max);margin-inline:auto;}
body.qf221-ready .section.active{display:block;animation:qfV5ViewIn .14s ease-out both;}
body.qf221-ready .section[hidden]:not(.active){display:none;}
body.qf221-ready .section.active[hidden]{display:block;}
@keyframes qfV5ViewIn{from{opacity:.72}to{opacity:1}}

/* Sidebar V5: compacto, hierárquico, sem cartões gigantes do shell anterior. */
#qf221DesktopNav,#qf221Drawer{
  background:var(--qf-ui-nav);
  color:var(--qf-ui-nav-text);border-right:1px solid var(--qf-ui-nav-border);
}
#qf221DesktopNav{
  position:fixed;inset:0 auto 0 0;z-index:var(--qf-z-nav);width:var(--qf-v5-nav-w);height:100dvh;
  display:flex;flex-direction:column;overflow:hidden;transition:transform .24s var(--qf-v5-ease),opacity .2s ease;
}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-brand{
  height:72px;min-height:72px;padding:0 18px;display:flex;align-items:center;gap:11px;
  border-bottom:1px solid var(--qf-ui-nav-border);background:transparent;
}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-logo{
  width:34px;height:34px;flex:0 0 34px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;display:grid;place-items:center;
}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-logo img{width:33px;height:33px;object-fit:contain;filter:saturate(.96) contrast(1.10);transition:filter .24s var(--qf-v5-ease),opacity .24s var(--qf-v5-ease);}
html[data-qf-theme="dark"] :is(#qf221DesktopNav,#qf221Drawer) .qf221-logo img,
html[data-qf-theme="dark"] .qf-home-brandmark img,html[data-qf-theme="dark"] .qf-session-mark img{filter:brightness(0) invert(1);opacity:.96;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-brandText{min-width:0;display:block;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-brandText strong{display:block;color:var(--qf-ui-nav-heading);font-size:14px;letter-spacing:.055em;font-weight:720;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-brandText span{display:block;color:var(--qf-ui-nav-muted);font-size:11px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-collapse,:is(#qf221DesktopNav,#qf221Drawer) .qf221-close{
  margin-left:auto;width:32px;height:32px;min-width:32px;min-height:32px;padding:0;display:grid;place-items:center;border:1px solid var(--qf-ui-nav-border);border-radius:9px;background:var(--qf-ui-nav-raised);color:var(--qf-ui-nav-text);box-shadow:none;
}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-collapse svg,:is(#qf221DesktopNav,#qf221Drawer) .qf221-close svg,#qf221ShowDesktopNav svg,#qf221OpenMenu svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-searchWrap{padding:13px 12px 4px;border:0;flex:0 0 auto;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-search{
  width:100%;height:36px;min-height:36px;padding:0 10px;border:1px solid var(--qf-ui-nav-border);border-radius:9px;background:var(--qf-ui-nav-raised);color:var(--qf-ui-nav-heading);font-size:11.5px;font-weight:500;outline:0;box-shadow:none;
}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-search::placeholder{color:var(--qf-ui-nav-muted);}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-search:focus{border-color:color-mix(in srgb,var(--qf-ui-brand) 56%,var(--qf-ui-nav-border));box-shadow:0 0 0 3px var(--qf-ui-brand-soft);}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-homeSlot{padding:8px 9px 1px;flex:0 0 auto;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:4px 9px 18px;scrollbar-width:thin;overscroll-behavior:contain;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-kicker{margin:13px 10px 7px;color:var(--qf-ui-nav-muted);font-size:11px;text-transform:uppercase;letter-spacing:.13em;font-weight:760;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-group{display:block;margin:1px 0;border:0;border-radius:0;background:transparent;box-shadow:none;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-groupHead{
  width:100%;min-height:40px;padding:8px 10px;display:grid;grid-template-columns:16px minmax(0,1fr) 16px;align-items:center;gap:10px;text-align:left;border:0;border-radius:9px;background:transparent;color:var(--qf-ui-nav-text);box-shadow:none;overflow:hidden;
}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-groupHead:hover{background:color-mix(in srgb,var(--qf-ui-nav-active) 58%,transparent);color:var(--qf-ui-nav-heading);}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-groupIco{width:16px;height:16px;display:grid;place-items:center;border:0;border-radius:0;background:transparent;color:var(--qf-ui-nav-icon);}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-groupIco svg{width:16px;height:16px;stroke-width:1.8;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-groupText{min-width:0;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-groupText strong{display:block;color:var(--qf-ui-nav-heading);font-size:12.3px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-groupText small{display:none;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-chevron{width:16px;height:16px;display:grid;place-items:center;color:var(--qf-ui-nav-muted);background:transparent;transition:transform .18s ease;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-chevron svg{width:14px;height:14px;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-group.open .qf221-chevron{transform:rotate(180deg);background:transparent;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-items{display:none;min-width:0;padding:2px 0 4px 27px;position:relative;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-items::before{content:"";position:absolute;left:17px;top:3px;bottom:7px;width:1px;background:var(--qf-ui-nav-border);}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-group.open .qf221-items,:is(#qf221DesktopNav,#qf221Drawer) .qf221-group.search-open .qf221-items{display:grid;gap:0;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-item{
  width:100%;min-height:36px;padding:7px 10px;display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:9px;text-align:left;border:0;border-radius:9px;background:transparent;color:var(--qf-ui-nav-text);box-shadow:none;font-weight:560;position:relative;overflow:hidden;
}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-homeSlot>.qf221-item{min-height:39px;padding-inline:10px;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-item:hover{background:color-mix(in srgb,var(--qf-ui-nav-active) 58%,transparent);color:var(--qf-ui-nav-heading);}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-item.active{background:var(--qf-ui-nav-active);color:var(--qf-ui-nav-heading);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--qf-ui-brand) 11%,transparent);}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-item.active::before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:2px;border-radius:2px;background:var(--qf-ui-brand);}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-itemIco{width:16px;height:16px;display:grid;place-items:center;border:0;border-radius:0;background:transparent;color:var(--qf-ui-nav-icon);}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-itemIco svg{width:16px;height:16px;stroke-width:1.8;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-item.active .qf221-itemIco{color:var(--qf-ui-brand-text);}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-itemText{min-width:0;color:inherit;font-size:11.8px;font-weight:580;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-lock{margin-left:auto;width:14px;height:14px;padding:0;display:grid;place-items:center;color:var(--qf-ui-nav-muted);background:transparent;border:0;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-lock svg{width:12px;height:12px;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-item.locked{opacity:.58;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-empty{padding:14px 10px;text-align:center;color:var(--qf-ui-nav-muted);font-size:11px;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-empty[hidden],:is(#qf221DesktopNav,#qf221Drawer) .qf221-item[hidden],:is(#qf221DesktopNav,#qf221Drawer) .qf221-group[hidden]{display:none;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-footer{flex:0 0 auto;display:grid;gap:8px;padding:11px 12px 14px;border-top:1px solid var(--qf-ui-nav-border);color:var(--qf-ui-nav-muted);background:transparent;font-size:11px;}
:is(#qf221DesktopNav,#qf221Drawer) .qf-theme-footer{border-color:var(--qf-ui-nav-border);color:var(--qf-ui-nav-muted);}

#qf221ShowDesktopNav{position:fixed;z-index:var(--qf-z-nav);top:17px;left:14px;width:38px;height:38px;min-width:38px;min-height:38px;padding:0;display:grid;place-items:center;border:1px solid var(--qf-ui-border);border-radius:9px;background:var(--qf-ui-surface-raised);color:var(--qf-ui-text-2);box-shadow:var(--qf-ui-shadow-1);}
#qf221ShowDesktopNav[hidden]{display:none;}
body.qf221-nav-collapsed #qf221DesktopNav{transform:translateX(calc(-100% - 18px));opacity:0;visibility:hidden;pointer-events:none;}
body.qf221-nav-collapsed .main{margin-left:0;}

/* Topbar V5 global: mesma arquitetura da referência aprovada no desktop e mobile. */
#qf221MobileTop{
  position:sticky;top:0;z-index:var(--qf-z-nav);margin-left:var(--qf-v5-nav-w);width:calc(100% - var(--qf-v5-nav-w));height:var(--qf-v5-top-h);min-height:var(--qf-v5-top-h);
  display:flex;align-items:center;gap:14px;padding:0 26px;
  background:color-mix(in srgb,var(--qf-ui-surface) 88%,transparent);color:var(--qf-ui-text);border-bottom:1px solid var(--qf-ui-border-soft);
  box-shadow:0 8px 28px rgba(12,27,40,.035);backdrop-filter:blur(18px) saturate(1.12);-webkit-backdrop-filter:blur(18px) saturate(1.12);transition:margin-left .24s var(--qf-v5-ease),width .24s var(--qf-v5-ease);
}
body.qf221-nav-collapsed #qf221MobileTop{margin-left:0;width:100%;padding-left:66px;}
#qf221OpenMenu{display:none;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:1px solid var(--qf-ui-border);border-radius:9px;background:var(--qf-ui-surface-raised);color:var(--qf-ui-text-2);box-shadow:none;place-items:center;}
.qf-v5-breadcrumb{min-width:0;}
.qf-v5-breadcrumb small{display:block;color:var(--qf-ui-text-4);font-size:11px;line-height:1.25;margin-bottom:2px;}
.qf-v5-breadcrumb strong{display:block;color:var(--qf-ui-text-strong);font-size:13px;font-weight:680;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.qf-v5-top-spacer{flex:1 1 auto;min-width:8px;}
.qf-v5-session-pill{height:34px;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--qf-ui-border);border-radius:9px;background:var(--qf-ui-surface-raised);color:var(--qf-ui-text-2);font-size:11.2px;white-space:nowrap;}
.qf-v5-online-dot{width:6px;height:6px;border-radius:50%;background:#27a468;box-shadow:0 0 0 3px rgba(39,164,104,.10);flex:0 0 6px;}
.qf-v5-top-user{display:flex;align-items:center;gap:9px;min-width:0;margin-left:2px;}
.qf-v5-avatar{width:30px;height:30px;flex:0 0 30px;border-radius:9px;background:var(--qf-ui-brand-soft);border:1px solid var(--qf-ui-brand-soft-2);color:var(--qf-ui-brand-text);display:grid;place-items:center;font-size:11px;font-weight:760;}
.qf-v5-top-user-copy{min-width:0;max-width:160px;}
.qf-v5-top-user-copy strong{display:block;color:var(--qf-ui-text-2);font-size:11.5px;font-weight:640;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.qf-v5-top-user-copy small{display:block;color:var(--qf-ui-text-4);font-size:11px;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#qf221MobileTop>.qf-theme-toggle{flex:0 0 36px;margin:0;background:var(--qf-ui-surface-raised);border-color:var(--qf-ui-border);color:var(--qf-ui-text-3);}
#qf221MobileTop .qf276-logout.mobile{display:none;}

#qf221Backdrop,#qf221Drawer{display:none;}
@media(max-width:980px){
  :root{--qf-v5-top-h:64px;}
  #qf221DesktopNav,#qf221ShowDesktopNav{display:none;}
  body.qf221-ready .app{min-height:calc(100dvh - var(--qf-v5-top-h));}
  body.qf221-ready .main{margin-left:0;padding:19px max(14px,env(safe-area-inset-right,0px)) calc(32px + env(safe-area-inset-bottom,0px)) max(14px,env(safe-area-inset-left,0px));}
  #qf221MobileTop,body.qf221-nav-collapsed #qf221MobileTop{
    margin-left:0;width:100%;height:var(--qf-v5-top-h);min-height:var(--qf-v5-top-h);gap:10px;padding:max(0px,env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) 0 max(14px,env(safe-area-inset-left,0px));
  }
  #qf221OpenMenu{display:grid;flex:0 0 36px;}
  .qf-v5-breadcrumb{flex:1 1 auto;}
  .qf-v5-top-spacer{display:none;}
  .qf-v5-session-pill{display:none;}
  .qf-v5-top-user-copy{display:none;}
  .qf-v5-top-user{margin-left:auto;}
  .qf-v5-avatar{width:30px;height:30px;flex-basis:30px;}
  #qf221Backdrop{position:fixed;inset:0;z-index:var(--qf-z-backdrop);display:block;background:var(--qf-ui-overlay);backdrop-filter:blur(10px) saturate(.92);-webkit-backdrop-filter:blur(10px) saturate(.92);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .22s ease,visibility .22s;}
  #qf221Drawer{position:fixed;inset:0 auto 0 0;z-index:var(--qf-z-drawer);width:min(82vw,282px);height:100dvh;display:flex;flex-direction:column;overflow:hidden;box-shadow:18px 0 50px rgba(4,12,24,.22);transform:translateX(-103%);visibility:hidden;pointer-events:none;transition:transform .26s var(--qf-v5-ease),visibility .26s;}
  body.qf221-menu-open #qf221Backdrop{opacity:1;visibility:visible;pointer-events:auto;}
  body.qf221-menu-open #qf221Drawer{transform:translateX(0);visibility:visible;pointer-events:auto;}
  #qf221Drawer .qf221-body{overflow-y:auto;}
}
@media(max-width:520px){
  #qf221MobileTop>.qf-theme-toggle{width:34px;height:34px;min-width:34px;min-height:34px;flex-basis:34px;}
  .qf-v5-avatar{display:none;}
  .qf-v5-breadcrumb small{font-size:11px;}.qf-v5-breadcrumb strong{font-size:12.5px;}
}
@media(max-width:360px){
  #qf221MobileTop,body.qf221-nav-collapsed #qf221MobileTop{gap:8px;padding-inline:max(10px,env(safe-area-inset-left,0px));}
}

/* Topbars dos módulos: sem herança do cabeçalho histórico */
body.qf221-ready .topbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  margin:0 0 18px;
  padding:18px 20px;
}
body.qf221-ready .topbar>div:first-child{min-width:0;flex:1 1 360px;}
body.qf221-ready .topbar h1{margin:0;font-size:clamp(24px,3vw,32px);line-height:1.12;letter-spacing:-.03em;}
body.qf221-ready .topbar p{margin:6px 0 0;max-width:82ch;font-size:13.2px;line-height:1.58;}
body.qf221-ready .top-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap;}

/* Início V5 canônico — navegação calma, compacta e consistente. */
.qf-home{display:grid;gap:24px;}
.home-hero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(290px,.55fr);gap:16px;align-items:stretch;margin:0;padding:0;border:0;background:transparent;box-shadow:none;overflow:visible;}
.hero-main,.session-card{background:var(--qf-ui-surface);border:1px solid var(--qf-ui-border);border-radius:22px;box-shadow:var(--qf-ui-shadow-1);}
.hero-main{padding:30px 32px;position:relative;overflow:hidden;background:var(--qf-ui-hero);}
.hero-main::before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--qf-ui-brand),color-mix(in srgb,var(--qf-ui-brand) 30%,transparent),transparent 68%);opacity:.9;}
.hero-main::after{content:"";position:absolute;width:230px;height:230px;border-radius:50%;right:-130px;top:-135px;background:radial-gradient(circle,color-mix(in srgb,var(--qf-ui-brand) 11%,transparent),transparent 70%);pointer-events:none;}
.hero-brandrow{display:flex;align-items:center;gap:11px;margin-bottom:22px;position:relative;z-index:1;}
.hero-brandmark{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;background:transparent;border:0;}.hero-brandmark img{width:38px;height:38px;object-fit:contain;}
.hero-brandcopy strong{display:block;font-size:11.5px;color:var(--qf-ui-text-2);}.hero-brandcopy span{display:block;font-size:11px;color:var(--qf-ui-text-4);margin-top:2px;}
.eyebrow{font-size:11px;font-weight:780;text-transform:uppercase;letter-spacing:.13em;color:var(--qf-ui-brand-text);}
.hero-main h1{position:relative;z-index:1;margin:8px 0;font-size:clamp(28px,3vw,38px);line-height:1.08;letter-spacing:-.035em;color:var(--qf-ui-text-strong);}.hero-main p{position:relative;z-index:1;margin:0;color:var(--qf-ui-text-3);font-size:12.5px;line-height:1.65;max-width:720px;}
.session-card{padding:16px 18px;display:block;background:var(--qf-ui-surface-soft);}
.session-line{display:grid;grid-template-columns:34px minmax(0,1fr);gap:11px;align-items:center;padding:11px 0;border:0;border-bottom:1px solid var(--qf-ui-border-soft);border-radius:0;background:transparent;box-shadow:none;}.session-line:last-child{border-bottom:0;}
.session-ico{width:34px;height:34px;border-radius:10px;background:var(--qf-ui-surface-raised);border:1px solid var(--qf-ui-border-soft);display:grid;place-items:center;color:var(--qf-ui-brand-text);}.session-ico svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;}.session-line small{display:block;font-size:11px;color:var(--qf-ui-text-4);}.session-line strong{display:block;font-size:11px;color:var(--qf-ui-text-2);margin-top:2px;font-weight:650;}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:2px 0 -10px;padding:0 2px;}.section-head h2{display:flex;align-items:center;gap:9px;margin:0;font-size:15px;color:var(--qf-ui-text-strong);letter-spacing:-.01em;}.section-head h2::before{content:"";width:3px;height:17px;border-radius:999px;background:var(--qf-ui-brand);}.section-head p{margin:3px 0 0;font-size:11.2px;color:var(--qf-ui-text-3);}
.module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:0;border:0;border-radius:0;background:transparent;}
.module-card{min-height:180px;display:flex;flex-direction:column;position:relative;overflow:hidden;padding:20px;border:1px solid var(--qf-ui-border);border-radius:18px;background:var(--qf-ui-surface);box-shadow:var(--qf-ui-shadow-1);transition:border-color .18s,box-shadow .18s,transform .18s;}
.module-card::before{content:"";position:absolute;left:0;top:18px;bottom:18px;width:3px;border-radius:0 999px 999px 0;background:var(--qf-card-accent,var(--qf-ui-brand));opacity:.8;}.module-card.tone-quality{--qf-card-accent:var(--qf-ui-brand);}.module-card.tone-trace{--qf-card-accent:#477aa8;}.module-card.tone-docs{--qf-card-accent:#9a7540;}.module-card::after{display:none;}.module-card:hover{border-color:color-mix(in srgb,var(--qf-card-accent,var(--qf-ui-brand)) 25%,var(--qf-ui-border));box-shadow:var(--qf-ui-shadow-2);transform:translateY(-2px);}
.module-icon{width:38px;height:38px;flex:0 0 38px;margin:0;border-radius:11px;background:var(--qf-ui-surface-soft);border:1px solid var(--qf-ui-border-soft);display:grid;place-items:center;color:var(--qf-card-accent,var(--qf-ui-brand));}.module-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;}.module-card h3{font-size:14px;color:var(--qf-ui-text-strong);margin:14px 0 6px;letter-spacing:-.012em;}.module-card p{font-size:11.7px;color:var(--qf-ui-text-3);line-height:1.55;margin:0 0 16px;}
.card-link,.device-card button{margin-top:auto;align-self:flex-start;min-height:34px;padding:0 11px;border:1px solid var(--qf-ui-border);border-radius:10px;background:var(--qf-ui-surface-raised);color:var(--qf-ui-text-2);box-shadow:none;display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:690;text-align:left;}.card-link:hover,.device-card button:hover{background:var(--qf-ui-brand-soft);border-color:color-mix(in srgb,var(--qf-ui-brand) 28%,var(--qf-ui-border));color:var(--qf-ui-brand-text);transform:none;}
.qf-home-shortcuts{padding:0;border:0;background:transparent;box-shadow:none;}.qf-home-shortcuts h2{font-size:12.5px;margin:0 0 11px;color:var(--qf-ui-text-2);}
.quick-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;padding:0;border:0;border-radius:0;background:transparent;}.quick{min-height:58px;padding:10px 11px;border:1px solid var(--qf-ui-border);border-radius:13px;background:var(--qf-ui-surface);color:var(--qf-ui-text-2);text-align:left;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:9px;box-shadow:none;transition:background-color .18s,border-color .18s,box-shadow .18s;}.quick:hover{border-color:var(--qf-ui-border-strong);background:var(--qf-ui-surface-raised);box-shadow:var(--qf-ui-shadow-1);}.quick .qf-home-shortcut-icon{width:28px;height:28px;flex:0 0 28px;border:1px solid var(--qf-ui-border-soft);border-radius:9px;background:var(--qf-ui-surface-soft);color:var(--qf-ui-brand-text);display:grid;place-items:center;}.quick .qf-home-shortcut-icon svg{width:14px;height:14px;}.quick strong{font-size:11px;font-weight:660;line-height:1.25;color:var(--qf-ui-text-2);}
.home-bottom{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(290px,.6fr);gap:14px;margin-top:0;}.guide,.device-card{border:1px solid var(--qf-ui-border);border-radius:18px;background:var(--qf-ui-surface);box-shadow:var(--qf-ui-shadow-1);}.guide{padding:19px;}.guide h2,.device-card h2{font-size:12.5px;margin:0;color:var(--qf-ui-text-2);}.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px;}.step{padding:13px;background:var(--qf-ui-surface-soft);border:1px solid var(--qf-ui-border-soft);border-radius:12px;box-shadow:none;}.step-n{width:23px;height:23px;border-radius:8px;background:var(--qf-ui-brand-soft);color:var(--qf-ui-brand-text);display:grid;place-items:center;font-size:11px;font-weight:780;}.step strong{display:block;font-size:11px;margin-top:9px;color:var(--qf-ui-text-2);}.step p{font-size:11px;line-height:1.5;color:var(--qf-ui-text-3);margin:4px 0 0;}
.device-card{padding:19px;display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;align-content:start;}.device-icon{width:38px;height:38px;border-radius:11px;background:var(--qf-ui-surface-soft);border:1px solid var(--qf-ui-border-soft);display:grid;place-items:center;color:var(--qf-ui-brand-text);}.device-icon svg{width:18px;height:18px;}.device-card p{font-size:11.1px;color:var(--qf-ui-text-3);line-height:1.55;margin:5px 0 13px;}.device-card button{margin-top:0;}
@media(max-width:1180px){.quick-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:900px){.home-hero,.home-bottom{grid-template-columns:1fr;}.module-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:720px){.qf-home{gap:18px;}.hero-main{padding:22px;}.module-grid{grid-template-columns:1fr;gap:10px;}.module-card{min-height:0;padding:17px 18px;}.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.steps{grid-template-columns:1fr;}.section-head{margin-top:0;}.quick{min-height:54px;}}
@media(max-width:430px){.quick-grid{grid-template-columns:1fr;}.section-head{display:block;}.hero-main h1{font-size:clamp(25px,9vw,32px);}}

/* Governança — acabamento documental canônico. */
#termoCompromisso .qf-gov-wrap{gap:16px;}
#termoCompromisso .qf-gov-hero{border:1px solid color-mix(in srgb,var(--qf-ui-brand) 16%,var(--qf-ui-border));border-radius:24px;background:color-mix(in srgb,var(--qf-ui-brand-soft) 28%,var(--qf-ui-surface));box-shadow:var(--qf-ui-shadow-1);}
#termoCompromisso .qf-gov-hero::before{background:radial-gradient(circle,color-mix(in srgb,var(--qf-ui-brand) 12%,transparent),transparent 68%);}
#termoCompromisso .qf-gov-hero::after{display:none;}
#termoCompromisso .qf-gov-eyebrow{padding:6px 9px;border:1px solid color-mix(in srgb,var(--qf-ui-brand) 18%,var(--qf-ui-border));border-radius:999px;background:var(--qf-ui-brand-soft);color:var(--qf-ui-brand-text);font-size:11px;font-weight:780;letter-spacing:.08em;text-transform:uppercase;}
#termoCompromisso .qf-gov-hero h1{font-size:clamp(27px,3vw,38px);line-height:1.1;letter-spacing:-.035em;color:var(--qf-ui-text-strong);}
#termoCompromisso .qf-gov-hero p{color:var(--qf-ui-text-3);font-size:12.5px;line-height:1.62;}
#termoCompromisso .qf-gov-hero-seal span{border:1px solid var(--qf-ui-border);border-radius:13px;background:color-mix(in srgb,var(--qf-ui-surface-raised) 92%,transparent);color:var(--qf-ui-text-2);box-shadow:none;}
#termoCompromisso .qf-gov-hero-seal b{border-radius:9px;background:var(--qf-ui-brand-soft);color:var(--qf-ui-brand-text);font-size:11px;}
#termoCompromisso .qf-gov-summary{border:1px solid var(--qf-ui-border);border-radius:20px;background:var(--qf-ui-surface-soft);box-shadow:none;}
#termoCompromisso .qf-gov-summary-head span{color:var(--qf-ui-text-4);font-size:11px;text-transform:uppercase;letter-spacing:.07em;font-weight:740;}#termoCompromisso .qf-gov-summary-head strong{color:var(--qf-ui-text-strong);}
#termoCompromisso .qf-gov-summary-grid article{border:1px solid var(--qf-ui-border-soft);border-radius:14px;background:var(--qf-ui-surface);box-shadow:none;}#termoCompromisso .qf-gov-summary-grid i{border-radius:9px;background:var(--qf-ui-brand-soft);color:var(--qf-ui-brand-text);font-style:normal;font-weight:800;}#termoCompromisso .qf-gov-summary-grid strong{color:var(--qf-ui-text-strong);}#termoCompromisso .qf-gov-summary-grid p{color:var(--qf-ui-text-3);line-height:1.5;}
#termoCompromisso .qf-gov-card{border:1px solid var(--qf-ui-border);border-radius:20px;background:var(--qf-ui-surface);box-shadow:var(--qf-ui-shadow-1);}
#termoCompromisso .qf-gov-company-responsibilities,#termoCompromisso .qf-gov-intro{border:1px solid var(--qf-ui-border-soft);border-radius:15px;background:var(--qf-ui-surface-soft);}
#termoCompromisso .qf-gov-section-kicker,#termoCompromisso .qf-gov-intro-mark{color:var(--qf-ui-brand-text);font-size:11px;font-weight:770;letter-spacing:.07em;text-transform:uppercase;}
#termoCompromisso .qf-gov-clause{border-bottom:1px solid var(--qf-ui-border-soft);}#termoCompromisso .qf-gov-clause:last-of-type{border-bottom:0;}#termoCompromisso .qf-gov-clause-number{border:1px solid color-mix(in srgb,var(--qf-ui-brand) 18%,var(--qf-ui-border));border-radius:12px;background:var(--qf-ui-brand-soft);color:var(--qf-ui-brand-text);font-size:11px;font-weight:800;}#termoCompromisso .qf-gov-term li{color:var(--qf-ui-text-2);line-height:1.58;}
#termoCompromisso .qf-gov-declaration{border:1px solid color-mix(in srgb,var(--qf-ui-brand) 17%,var(--qf-ui-border));border-radius:15px;background:color-mix(in srgb,var(--qf-ui-brand-soft) 55%,var(--qf-ui-surface));box-shadow:none;}
@media(max-width:700px){#termoCompromisso .qf-gov-hero{border-radius:20px;}#termoCompromisso .qf-gov-summary{padding:14px;}#termoCompromisso .qf-gov-summary-head{display:grid;gap:3px;}#termoCompromisso .qf-gov-summary-grid{gap:8px;}}

/* Geometria visual comum: todos os módulos partem do mesmo sistema V5. */
body.qf221-ready :where(
  .panel,.card,[class$="-card"],[class*="-card "],[class$="-panel"],[class*="-panel "],
  [class$="-metric"],[class*="-metric "],[class$="-banner"],[class*="-banner "],
  [class$="-note"],[class*="-note "]
){
  border-style:solid;
  border-width:1px;
  border-radius:14px;
}
body.qf221-ready :where(.panel,.card){padding:18px;}
body.qf221-ready :where(.panel-head,.card-head){
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
body.qf221-ready :where(.panel-head h2,.panel-head h3,.card-head h2,.card-head h3){margin:0;}
body.qf221-ready :where(.panel-head p,.card-head p){margin:4px 0 0;}
body.qf221-ready :where(.field){min-width:0;}
body.qf221-ready :where(.field label){display:block;margin:0 0 6px;font-size:11.8px;font-weight:650;}
body.qf221-ready :where(input:not([type=checkbox]):not([type=radio]),select,textarea){
  width:100%;
  min-height:42px;
  padding:9px 11px;
  border-style:solid;
  border-width:1px;
  border-radius:10px;
}
body.qf221-ready textarea{min-height:86px;resize:vertical;}

body.qf221-ready table:not(.gridTable):not(.headTable){width:100%;border-collapse:collapse;}
body.qf221-ready table:not(.gridTable):not(.headTable) :where(th,td){padding:10px 12px;border-bottom-style:solid;border-bottom-width:1px;text-align:left;vertical-align:top;}
body.qf221-ready table:not(.gridTable):not(.headTable) th{font-size:11px;font-weight:760;text-transform:uppercase;letter-spacing:.055em;}

/* Print sempre termina em papel claro, mesmo que novas regras UI sejam adicionadas acima. */
@media print{
  html{color-scheme:light;background:#fff;}
  body,body.qf221-ready,.app,.main,.section{background:#fff;color:#111827;box-shadow:none;}
  #qf221DesktopNav,#qf221MobileTop,#qf221Backdrop,#qf221Drawer,#qf221ShowDesktopNav,.qf-theme-toggle{display:none;}
  body.qf221-ready .main{margin:0;padding:0;width:100%;max-width:100%;}
  .sheetPage{background:#fff;color:#111827;border-color:#cbd5e1;box-shadow:none;}
  .sheetPage .pageNumber{background:#fff;color:#111827;}
  .headTable td,.gridTable th,.gridTable td{border-color:#1f2937;color:#111827;}
  .gridTable th{background:#f8fafc;}
  .fillInput,.fillText,.fillSelect{color:#111827;background:transparent;}
  .square,.signStroke{border-color:#111827;}
  .canvasSign{background:#fff;color:#111;}
}

/* V5 native icon contract: generated navigation SVGs are line icons, never browser-default black fills. */
:is(#qf221DesktopNav,#qf221Drawer,#qf221MobileTop,#qf221ShowDesktopNav) svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
/* Compact footer controls; logout is not a full-width legacy slab. */
:is(#qf221DesktopNav,#qf221Drawer) .qf221-footer>.qf276-logout{width:100%;min-height:36px;padding:7px 10px;border:1px solid var(--qf-ui-nav-border);border-radius:9px;background:var(--qf-ui-nav-raised);color:var(--qf-ui-nav-text);font-size:11px;font-weight:620;box-shadow:none;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-footer>.qf276-logout:hover{background:var(--qf-ui-nav-active);color:var(--qf-ui-nav-heading);}

/* =====================================================================
   AFERIUM R5 DESIGN V5 — MINI AUDITORIA DE ESTABILIDADE RESPONSIVA.
   Correções visuais e de viewport sem alterar regras, dados ou fluxos.
   ===================================================================== */

/* Contrato de ícones: SVGs de interface são traços sem preenchimento
   implícito do navegador e herdam a cor semântica em claro/escuro. */
body.qf221-ready :where(
  .session-ico,.module-icon,.qf-home-shortcut-icon,.device-icon,.info-icon,
  .qf-gov-dialog-mark,.qf-sheet-model-icon,.module-help-btn .icon,
  .qf-v200-head-icon,.qf-legal-button
) svg,
:where(body.qf221-ready :where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn) > svg){
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
body.qf221-ready :where(.qf-home-shortcut-icon,.device-icon,.info-icon,.qf-gov-dialog-mark,.qf-sheet-model-icon,.qf-v200-head-icon){
  color:var(--qf-ui-brand-text);
}
body.qf221-ready :where(.qf-legal-button,.module-help-btn){color:var(--qf-ui-brand-text);background:var(--qf-ui-brand-soft);border-color:color-mix(in srgb,var(--qf-ui-brand) 38%,var(--qf-ui-border));font-weight:700;}
body.qf221-ready .qf-explicit-close{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-inline-size:max-content;padding-inline:11px;font-weight:700;color:var(--qf-ui-text-2);background:var(--qf-ui-surface-raised);border-color:var(--qf-ui-border-strong);}
body.qf221-ready .qf-explicit-close>span[aria-hidden="true"]{font-size:18px;line-height:1;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .mobile-section{background:var(--qf-ui-brand-soft);color:var(--qf-ui-brand-strong);border:1px solid color-mix(in srgb,var(--qf-ui-brand) 28%,var(--qf-ui-border));border-radius:11px;font-weight:750;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .mobile-card{background:var(--qf-ui-surface-raised);color:var(--qf-ui-text);border:1px solid var(--qf-ui-border);border-radius:12px;box-shadow:var(--qf-ui-shadow-1);}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .mobile-card>b{color:var(--qf-ui-text-strong);}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .m-field>label,:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .toolbarhint{color:var(--qf-ui-text-3);font-weight:650;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .m-choice button{background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-2);border-color:var(--qf-ui-border-strong);}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .m-choice button.on{background:var(--qf-ui-brand);color:#fff;border-color:var(--qf-ui-brand);}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .tab{background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-2);border-color:var(--qf-ui-border);font-weight:700;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .tab.active{background:var(--qf-ui-brand);color:#fff;border-color:var(--qf-ui-brand);}

/* Planilhas oficiais: a remoção física do tema legado não pode remover
   a geometria documental. Linhas pertencem ao contrato visual V5. */
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root :where(.sheet,.sheetPage){
  background:var(--qf-ui-sheet);
  color:var(--qf-ui-sheet-text);
}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root :where(.official,.gridTable,.headTable){
  border-collapse:collapse;
  color:var(--qf-ui-sheet-text);
}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official :where(th,td),
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .gridTable :where(th,td),
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .headTable td{
  border:1px solid var(--qf-ui-sheet-line);
  color:var(--qf-ui-sheet-text);
  background:var(--qf-ui-sheet);
}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root :where(.official,.gridTable) th,
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root :where(.official,.gridTable) .band{
  background:var(--qf-ui-sheet-soft);
  color:var(--qf-ui-sheet-text);
}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root :where(.print-head,.period,.official-head-wrap){
  color:var(--qf-ui-sheet-text);
}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .print-head > :where(.ph-logo,.ph-title,.ph-meta),
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .ph-meta > div,
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official-head :where(th,td),
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .oh-meta > div{
  border:1px solid var(--qf-ui-sheet-line);
  color:var(--qf-ui-sheet-text);
  background:var(--qf-ui-sheet);
}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .print-head > :where(.ph-title,.ph-meta),
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official-head :where(.oh-title,.oh-elab){
  background:var(--qf-ui-sheet-soft);
}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root :where(.entry,.selectcell,.mark,.miniopt,.choice button){
  color:var(--qf-ui-sheet-text);
  border-color:var(--qf-ui-sheet-line);
  background:var(--qf-ui-sheet);
}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root :where(.choice button.on,.miniopt.on,.mark.on,.selectcell.on,.active-choice){
  color:#fff;
  border-color:var(--qf-ui-brand);
  background:var(--qf-ui-brand);
}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root :where(input,textarea,select,[contenteditable="true"]){
  color:var(--qf-ui-sheet-text);
  caret-color:var(--qf-ui-sheet-text);
}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .tablewrap{
  max-inline-size:100%;
  overflow-x:auto;
  overflow-y:visible;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}

/* O runtime pode identificar um overlay role=dialog como painel. Quando
   as duas classes recaem no mesmo nó, preserva-se o overlay como viewport
   e o primeiro painel interno recebe o scroll efetivo. */
body .qf-dialog-viewport-safe.qf-dialog-panel-safe{
  inline-size:100%;
  max-inline-size:100vw;
  max-block-size:var(--qf-visual-viewport-height,100dvh);
  overflow:hidden;
  scrollbar-gutter:auto;
}
body .qf-dialog-viewport-safe.qf-dialog-panel-safe > :where(
  .panel,.modal-card,.viewer-card,.doc-modal-card,.pac-modal-card,.nc-panel,
  .signpad-panel,.qf-v279-batch-panel,.qf275-dialog,.qf275-confirm-card,
  .qf276-dialog,.qf-legal-dialog,.qf-gov-panel,.qf258-modal-card,
  .v177-edit-card,.qf-v266-panel,.qf-consolidation-dialog
){
  min-inline-size:0;
  max-inline-size:min(100%,960px);
  max-block-size:calc(var(--qf-visual-viewport-height,100dvh) - 20px);
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

/* Rede de segurança contra controles escapando do viewport. */
:where(body.qf221-ready :where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn)):is(button,a,label,input,summary,span,div){
  box-sizing:border-box;
  min-inline-size:0;
  max-inline-size:100%;
  overflow-wrap:anywhere;
  word-break:normal;
}
body.qf221-ready :where(
  .panel-head,.card-head,.modalbar,.gov,.govbtns,.tabs,.toolbar,.top-actions,
  .profile-toolbar,.phase3-toolbar,.phase56-toolbar,.phase789-toolbar,
  .qf-sheet-catalog-toolbar,.qf-sheet-editor-toolbar,.qf258-toolbar,
  .qf276-toolbar,.qf-v279-planilhas-head-actions,.qf-gov-dialog-actions,
  .profile-form-actions,.modal-actions,.signpad-actions,.nc-actions
){
  min-inline-size:0;
  max-inline-size:100%;
}
body.qf221-ready :where(
  .panel-head,.card-head,.modalbar,.gov,.govbtns,.tabs,.toolbar,.top-actions,
  .profile-toolbar,.phase3-toolbar,.phase56-toolbar,.phase789-toolbar,
  .qf-sheet-catalog-toolbar,.qf-sheet-editor-toolbar,.qf258-toolbar,
  .qf276-toolbar,.qf-v279-planilhas-head-actions,.qf-gov-dialog-actions,
  .profile-form-actions,.modal-actions,.signpad-actions,.nc-actions
) > *{
  min-inline-size:0;
  max-inline-size:100%;
}

@media(max-width:820px){
  /* Modal de planilha: um único eixo vertical rolável dentro do painel.
     O body pode permanecer bloqueado sem congelar o conteúdo. */
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal.qf-dialog-viewport-safe{
    inset:0;
    inline-size:100%;
    block-size:var(--qf-visual-viewport-height,100dvh);
    max-inline-size:100vw;
    max-block-size:var(--qf-visual-viewport-height,100dvh);
    padding:0;
    align-items:stretch;
    justify-content:stretch;
    overflow:hidden;
    touch-action:pan-y pinch-zoom;
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal.qf-dialog-panel-safe{
    overflow:hidden;
    margin:0;
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal > .panel{
    inline-size:100%;
    max-inline-size:100%;
    block-size:var(--qf-visual-viewport-height,100dvh);
    max-block-size:var(--qf-visual-viewport-height,100dvh);
    margin:0;
    overflow:hidden;
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr);
    overscroll-behavior:none;
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal :where(.modalbar,.gov){
    min-inline-size:0;
    max-inline-size:100%;
    flex-wrap:wrap;
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .govbtns{
    inline-size:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .govbtns > :where(button,.btn){
    inline-size:100%;
    min-inline-size:0;
    max-inline-size:100%;
    white-space:normal;
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .modal-body{
    min-block-size:0;
    max-block-size:none;
    overflow:hidden;
    display:grid;
    grid-template-rows:minmax(0,1fr);
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .content{
    min-inline-size:0;
    min-block-size:0;
    block-size:100%;
    max-inline-size:100%;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y pinch-zoom;
    padding-block-end:max(20px,env(safe-area-inset-bottom,0px));
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .tabs{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    inline-size:100%;
    max-inline-size:100%;
    overflow:visible;
    gap:8px;
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .tabs > .tab{
    inline-size:100%;
    min-inline-size:0;
    max-inline-size:100%;
    white-space:normal;
    line-height:1.25;
    text-align:center;
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .tablewrap{
    inline-size:100%;
    max-inline-size:100%;
    overflow-x:auto;
    overflow-y:visible;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x pan-y pinch-zoom;
  }

  /* Cabeçalhos e barras de ação: quebram em linhas sem criar largura fantasma. */
  body.qf221-ready :where(.panel-head,.card-head,.modalbar,.gov,.top-actions){
    flex-wrap:wrap;
  }
  body.qf221-ready :where(
    .govbtns,.modal-actions,.profile-form-actions,.qf-gov-dialog-actions,
    .qf258-form-actions,.v177-edit-actions,.signpad-actions,.nc-actions,
    .qf-v279-batch-actions,.qf-sheet-editor-actions
  ){
    inline-size:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
  }
  body.qf221-ready :where(
    .govbtns,.modal-actions,.profile-form-actions,.qf-gov-dialog-actions,
    .qf258-form-actions,.v177-edit-actions,.signpad-actions,.nc-actions,
    .qf-v279-batch-actions,.qf-sheet-editor-actions
  ) > *{
    inline-size:100%;
    min-inline-size:0;
    max-inline-size:100%;
  }
}

/* Impressão preserva grade documental canônica independente do tema UI. */
@media print{
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official :where(th,td),
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .gridTable :where(th,td),
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .headTable td,
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .print-head > :where(.ph-logo,.ph-title,.ph-meta),
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .ph-meta > div,
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official-head :where(th,td),
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .oh-meta > div{
    border:1px solid #1f2937;
    color:#111827;
    background:#fff;
  }
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root :where(.official,.gridTable) th,
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root :where(.official,.gridTable) .band,
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .official-head :where(.oh-title,.oh-elab){
    background:#f8fafc;
  }
}

/* A planilha oficial mantém a largura de trabalho em desktop; o limite
   universal de 960px é apenas fallback para diálogos genéricos. */
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal > .panel{
  max-inline-size:min(1380px,100%);
}
@media(max-width:820px){
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal > .panel{max-inline-size:100%;}
}

/* Com o painel interno corretamente identificado pelo runtime, a planilha
   mantém scroll interno na área de conteúdo também em desktop. */
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal > .panel.qf-dialog-panel-safe{
  max-block-size:min(95vh,1080px);
  overflow:hidden;
}
@media(max-width:820px){
  :where(body.qf221-ready :where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn)):is(button,a,label,input,summary,span,div){
    min-inline-size:0;
    max-inline-size:100%;
    white-space:normal;
  }
  body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal > .panel.qf-dialog-panel-safe{
    max-block-size:var(--qf-visual-viewport-height,100dvh);
  }
}

/* =====================================================================
   AFERIUM R5 DESIGN V5 — PERFORMANCE + LEGIBILIDADE.
   Camada final: reduz custo de pintura/observação, melhora contraste e
   acabamento sem alterar regras de negócio ou conteúdo documental.
   ===================================================================== */
:root{
  --qf-v5-divider:color-mix(in srgb,var(--qf-ui-brand) 20%,var(--qf-ui-border));
  --qf-v5-module-accent:color-mix(in srgb,var(--qf-ui-brand) 82%,var(--qf-ui-text-strong));
}
html[data-qf-theme="dark"]{
  --qf-v5-divider:color-mix(in srgb,var(--qf-ui-brand) 28%,var(--qf-ui-border));
  --qf-v5-module-accent:var(--qf-ui-brand);
}

/* Acabamento dos módulos: hierarquia mais evidente, sem efeitos pesados. */
body.qf221-ready .section.active>.topbar{
  position:relative;
  border-color:var(--qf-v5-divider);
  border-left:3px solid var(--qf-v5-module-accent);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
body.qf221-ready .section.active>.topbar::after{
  content:"";position:absolute;left:18px;right:18px;bottom:-1px;height:1px;
  background:var(--qf-v5-divider);pointer-events:none;
}
body.qf221-ready :where(.panel,.card,[class$="-card"],[class$="-panel"]){
  border-color:var(--qf-ui-border);
}
body.qf221-ready :where(.panel-head,.card-head){
  padding-bottom:12px;
  border-bottom:1px solid var(--qf-ui-border-soft);
}
body.qf221-ready :where(.panel-head h2,.panel-head h3,.card-head h2,.card-head h3){
  color:var(--qf-ui-text-strong);
  letter-spacing:-.01em;
}
body.qf221-ready :where(.panel-head p,.card-head p,.topbar p){color:var(--qf-ui-text-3);}

/* Legibilidade mínima consistente em navegação, módulos e controles. */
body.qf221-ready :where(.field label,.panel p,.card p,.note,.attachment-note){line-height:1.5;}
:is(#qf221DesktopNav,#qf221Drawer) :where(.qf221-itemText,.qf221-groupText strong){letter-spacing:.002em;}
:is(#qf221DesktopNav,#qf221Drawer) .qf221-groupText small{line-height:1.3;}
body.qf221-ready :where(input,select,textarea,button,.btn,.mini-btn){font-size:max(12px,1em);}
@media(max-width:820px){
  body.qf221-ready .section:not(#planilhas) :where(input,select,textarea),
  body.qf221-ready #qfLoginGate :where(input,select,textarea){font-size:16px;} /* evita zoom/flicker móvel sem inflar a grade operacional */
  body.qf221-ready .main{padding-bottom:calc(34px + env(safe-area-inset-bottom,0px));}
}

/* Renderização mais barata em dispositivos de toque: sem hover/transforms e blur. */
@media(hover:none),(pointer:coarse){
  body.qf221-ready :where(.module-card,.quick,.btn,button,.mini-btn,.mode-btn){transition:none;}
  body.qf221-ready :where(.module-card,.quick,.btn,button,.mini-btn,.mode-btn):hover{transform:none;}
  #qf221DesktopNav,#qf221Drawer,#qf221MobileTop{backdrop-filter:none;-webkit-backdrop-filter:none;}
  body :where(.modal,.nc-modal,.signpad-modal,.qf-v279-batch-modal,.qf275-modal,.qf275-confirm-modal,.qf276-modal,.qf-legal-modal,.qf-gov-modal,.qf-sheet-admin-modal,.qf258-modal,.v177-modal,.qf-v266-modal,.qf-consolidation-modal,#signatureModal.qf-signature-portal,.qf-license-block){backdrop-filter:none;-webkit-backdrop-filter:none;}
}

/* Tabelas e listas: reduzir repaints sem esconder conteúdo ou quebrar sticky. */
body.qf221-ready :where(.phase56-list,.phase789-list,.profile-list,.recall-v96-trace-list){
  contain:layout style;
}
body.qf221-ready .qf-responsive-table-wrap{contain:layout style;max-width:100%;}
body.qf221-ready table{font-variant-numeric:tabular-nums;}

/* Ícones V5: contrato visual em ambos os temas, exceto imagens/logotipos. */
:where(body.qf221-ready :where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn,.qf221-itemIco,.qf221-groupIco,.module-icon,.session-ico,.quick,.device-icon) svg){
  fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;
}

/* A marca normal fica intacta no tema claro; no escuro vira branca de forma determinística. */
html[data-qf-theme="light"] :where(.qf221-logo img,.qf221-mobileLogo img,.qf-v6-mobile-brand img,#qfHomeLogo,.qf-home-brandmark img,.qf-session-mark img,#qfLoginLogo,.login-logo img){
  filter:none;opacity:1;
}
html[data-qf-theme="dark"] :where(.qf221-logo img,.qf221-mobileLogo img,.qf-v6-mobile-brand img,#qfHomeLogo,.qf-home-brandmark img,.qf-session-mark img,#qfLoginLogo,.login-logo img){
  filter:brightness(0) invert(1);opacity:.98;
}

/* Menos animação durante navegação e rolagem; preserva a abertura premium. */
body.qf221-ready{scroll-behavior:auto;}

@media(max-width:820px){
  body.qf221-ready .section.active{animation:none;}
  #qf221Backdrop{transition:opacity .14s ease,visibility .14s;}
  #qf221Drawer{transition:transform .18s ease,visibility .18s;}
}

/* =====================================================================
   AFERIUM R5 MODULE SURFACE ROOT — canonical, non-invasive hierarchy.
   Module metadata decorates section roots only; existing DOM remains intact.
   ===================================================================== */
body.qf221-ready .section[data-qf-area]{--qf-module-accent:var(--qf-ui-brand);--qf-module-soft:var(--qf-ui-brand-soft);--qf-module-glow:color-mix(in srgb,var(--qf-ui-brand) 14%,transparent);}

body.qf221-ready .section[data-qf-area="inicio"]{--qf-module-accent:var(--qf-ui-brand);--qf-module-soft:var(--qf-ui-brand-soft);--qf-module-glow:color-mix(in srgb,var(--qf-ui-brand) 14%,transparent);}

/* No synthetic heading is inserted into module content. Existing titles stay authoritative. */
body.qf221-ready .section.qf-premium-module{position:relative;padding-bottom:24px;}
body.qf221-ready .section.qf-premium-module>.topbar,body.qf221-ready .section.qf-premium-module>.qf-v200-planilhas-head,body.qf221-ready .section.qf-premium-module>.qf-platform-hero,body.qf221-ready .section.qf-premium-module>.qf-system-hero,body.qf221-ready .section.qf-premium-module>.qf276-legal-hero {
  position:relative;isolation:isolate;overflow:hidden;
  border:1px solid color-mix(in srgb,var(--qf-module-accent) 20%,var(--qf-ui-border));
  border-radius:22px;
  background:var(--qf-ui-surface);
  box-shadow:var(--qf-ui-shadow-1);
}
body.qf221-ready .section.qf-premium-module>.qf-v200-planilhas-head::before,body.qf221-ready .section.qf-premium-module>.qf-platform-hero::before,body.qf221-ready .section.qf-premium-module>.qf-system-hero::before,body.qf221-ready .section.qf-premium-module>.qf276-legal-hero::before {
  display:none;
}
body.qf221-ready .section.qf-premium-module>.topbar::after,
body.qf221-ready .section.qf-premium-module>.qf-v200-planilhas-head::after{
  content:"";position:absolute;left:22px;bottom:0;width:56px;height:2px;border-radius:999px 999px 0 0;background:var(--qf-module-accent);opacity:.88;
}

/* Modules whose main surface is a panel keep one coherent card instead of a nested fake hero. */
body.qf221-ready .section.qf-premium-module>.panel{
  border:1px solid color-mix(in srgb,var(--qf-module-accent) 14%,var(--qf-ui-border));
  border-radius:22px;
  background:var(--qf-ui-surface);
  box-shadow:0 12px 30px rgba(15,23,42,.06);
  overflow:hidden;
}
body.qf221-ready .section.qf-premium-module>.panel>.panel-head{
  position:relative;margin:0;padding:20px 22px 18px;
  border-bottom:1px solid var(--qf-ui-border-soft);
  background:var(--qf-ui-surface-soft);
}
/* Visual anchor lives in CSS; titles/actions remain the module's own DOM. */
body.qf221-ready .section.qf-premium-module>.topbar,
body.qf221-ready .section.qf-premium-module>.panel>.panel-head{
  display:grid;grid-template-columns:minmax(0,1fr);align-items:start;column-gap:16px;row-gap:13px;
}
body.qf221-ready .section.qf-premium-module>.topbar::before,
body.qf221-ready .section.qf-premium-module>.panel>.panel-head::before{display:none;}
body.qf221-ready .section.qf-premium-module>.topbar>.top-actions,
body.qf221-ready .section.qf-premium-module>.panel>.panel-head>.top-actions{grid-column:1;justify-self:start;width:100%;max-width:100%;align-items:center;}
body.qf221-ready .section.qf-premium-module>.topbar>div:not(.top-actions):first-of-type,
body.qf221-ready .section.qf-premium-module>.panel>.panel-head>div:not(.top-actions):first-of-type{min-width:0;}
body.qf221-ready .section.qf-premium-module>.topbar :is(h1,h2),
body.qf221-ready .section.qf-premium-module>.panel>.panel-head :is(h1,h2){margin-top:0;margin-bottom:5px;}
body.qf221-ready .section.qf-premium-module>.topbar p,
body.qf221-ready .section.qf-premium-module>.panel>.panel-head p{margin-bottom:0;line-height:1.52;}
body.qf221-ready .section.qf-premium-module>.panel>.toolbar{margin:16px 22px 0;}
body.qf221-ready .section.qf-premium-module>.panel>.grid-list,
body.qf221-ready .section.qf-premium-module>.panel>.phase56-list,
body.qf221-ready .section.qf-premium-module>.panel>.phase789-list{padding:16px 22px 22px;}
body.qf221-ready .section.qf-premium-module>.panel>.panel-head h2,
body.qf221-ready .section.qf-premium-module>.panel>.panel-head h1{font-size:clamp(22px,2.2vw,29px);letter-spacing:-.025em;}
body.qf221-ready .section.qf-premium-module>.panel>.panel-head p{max-width:78ch;margin-top:6px;}

/* Action groups remain visually attached to the module header. */
body.qf221-ready .section.qf-premium-module :is(.topbar,.panel-head,.qf-v200-planilhas-head) .top-actions{align-items:center;justify-content:flex-start;gap:9px;}
body.qf221-ready .section.qf-premium-module :is(.topbar,.panel-head,.qf-v200-planilhas-head) .chip{
  min-height:42px;display:inline-flex;align-items:center;padding:0 13px;border-radius:12px;
  border:1px solid color-mix(in srgb,var(--qf-module-accent) 18%,var(--qf-ui-border));
  background:var(--qf-module-soft);color:var(--qf-module-accent);font-weight:720;
}
body.qf221-ready .section.qf-premium-module :is(.topbar,.panel-head,.qf-v200-planilhas-head) :is(.btn,.mini-btn,button){border-radius:12px;}

body.qf221-ready .section.qf-premium-module :is(.topbar,.panel-head) .top-actions .btn-primary{
  background:var(--qf-module-accent);border-color:var(--qf-module-accent);color:#fff;
  box-shadow:0 8px 20px var(--qf-module-glow);font-weight:720;
}
body.qf221-ready .section.qf-premium-module :is(.topbar,.panel-head) .qf-legal-button{
  background:color-mix(in srgb,var(--qf-ui-surface-raised) 94%,var(--qf-module-soft));
}
body.qf221-ready .section.qf-premium-module :is(.topbar,.panel-head) .qf-legal-button svg{color:var(--qf-module-accent);}

/* Common content cards: rounded, separated, and lighter than the primary module surface. */
body.qf221-ready .section.qf-premium-module :is(.phase56-card,.phase789-card,.profile-card,.v104-card,.v255-doc-row,.qf276-card,.qf-platform-card,.qf-system-card,.qf258-lot-card,.recall-v96-card,.doc-card,.pac-card){
  border:1px solid color-mix(in srgb,var(--qf-module-accent) 11%,var(--qf-ui-border));
  border-radius:18px;background:var(--qf-ui-surface-raised);
  box-shadow:0 7px 19px rgba(15,23,42,.045);
}
body.qf221-ready .section.qf-premium-module :is(.phase56-metric,.phase789-metric,.profile-kpi,.v104-mini,.v255-doc-stat,.qf276-metric,.qf258-kpis article,.recall-v96-metric){
  position:relative;overflow:hidden;border:1px solid color-mix(in srgb,var(--qf-module-accent) 12%,var(--qf-ui-border));
  border-radius:17px;background:var(--qf-ui-surface);
  box-shadow:var(--qf-ui-shadow-1);
}
body.qf221-ready .section.qf-premium-module :is(.phase56-metric,.phase789-metric,.profile-kpi,.v104-mini,.v255-doc-stat,.qf276-metric,.qf258-kpis article,.recall-v96-metric)::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--qf-module-accent);opacity:.65;
}
body.qf221-ready .section.qf-premium-module :is(.toolbar,.phase56-toolbar,.phase789-toolbar,.v104-toolbar,.v102-toolbar,.qf276-toolbar,.qf258-toolbar,.profile-toolbar,.recall-v96-search){
  border:1px solid var(--qf-ui-border);border-radius:16px;
  background:color-mix(in srgb,var(--qf-ui-surface-soft) 84%,var(--qf-ui-surface));
  padding:12px;box-shadow:inset 0 1px 0 rgba(255,255,255,.28);
}
body.qf221-ready .section.qf-premium-module :is(.empty,.qf-legal-empty,.qf258-empty-inline){
  border:1px dashed color-mix(in srgb,var(--qf-module-accent) 23%,var(--qf-ui-border));border-radius:17px;
  background:color-mix(in srgb,var(--qf-module-soft) 52%,var(--qf-ui-surface));color:var(--qf-ui-text-3);
}

/* Planilhas — contrato canônico Stage17: rolagem, filtros e catálogo uniformes. */
#planilhas.qf-premium-module{min-width:0;}
#planilhas.qf-premium-module .qf-v200-planilhas-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;padding:20px 22px;margin-bottom:14px;border:1px solid color-mix(in srgb,var(--qf-module-accent) 15%,var(--qf-ui-border));border-radius:20px;background:var(--qf-ui-surface);box-shadow:var(--qf-ui-shadow-1);}
#planilhas.qf-premium-module .qf-v200-head-main{display:flex;gap:13px;align-items:center;min-width:0;padding:0;}
#planilhas.qf-premium-module .qf-v200-head-main>div:last-child{min-width:0;}
#planilhas.qf-premium-module .qf-v200-head-main h1{margin:0;font-size:clamp(24px,2.5vw,30px);letter-spacing:-.03em;}
#planilhas.qf-premium-module .qf-v200-head-main p{margin:5px 0 0;max-width:72ch;font-size:12.5px;line-height:1.5;color:var(--qf-ui-text-3);}
#planilhas.qf-premium-module .qf-v200-head-icon{width:44px;height:44px;min-width:44px;display:grid;place-items:center;border-radius:13px;background:var(--qf-module-soft);border:1px solid color-mix(in srgb,var(--qf-module-accent) 18%,var(--qf-ui-border));color:var(--qf-module-accent);font-size:19px;}
#planilhas .qf-v279-planilhas-head-actions{display:flex;align-items:center;justify-content:flex-end;min-width:0;}
#planilhas .qf-v200-head-chips{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;}
#planilhas .qf-v200-head-chips span{display:inline-flex;align-items:center;min-height:30px;padding:0 9px;border:1px solid var(--qf-ui-border);border-radius:999px;background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-3);font-size:11px;font-weight:680;white-space:nowrap;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .filters{position:relative;top:auto;display:flex;align-items:end;justify-content:space-between;gap:14px;border:1px solid var(--qf-ui-border);border-radius:16px;background:var(--qf-ui-surface);box-shadow:var(--qf-ui-shadow-1);padding:13px 15px;margin-bottom:14px;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .filters>.fields{display:flex;align-items:end;gap:9px;flex-wrap:wrap;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .filters .field{margin:0;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;align-items:stretch;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards>.card{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:8px;min-width:0;min-height:142px;height:100%;padding:17px 18px 16px 20px;text-align:left;overflow:hidden;border:1px solid var(--qf-ui-border);border-radius:16px;background:var(--qf-ui-surface);box-shadow:var(--qf-ui-shadow-1);transition:border-color .18s,box-shadow .18s,transform .18s;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards>.card::after{content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:0 999px 999px 0;background:var(--qf-module-accent);opacity:.72;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards>.card::before{display:none;content:none;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards>.card:hover{border-color:color-mix(in srgb,var(--qf-module-accent) 25%,var(--qf-ui-border));box-shadow:var(--qf-ui-shadow-2);transform:translateY(-2px);}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards>.card>b{display:block;margin:0;padding:0;color:var(--qf-module-accent);font-size:15px;line-height:1.15;font-weight:820;letter-spacing:-.015em;text-align:left;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards>.card>span{display:block;min-width:0;margin:0;padding:0;color:var(--qf-ui-text-strong);font-size:11.4px;font-weight:720;line-height:1.4;overflow-wrap:break-word;word-break:normal;text-align:left;}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards>.card>small{display:inline-flex;width:max-content;max-width:100%;align-items:center;min-height:25px;margin:auto 0 0;padding:4px 8px;border-radius:999px;border:1px solid color-mix(in srgb,var(--qf-module-accent) 17%,var(--qf-ui-border));background:var(--qf-module-soft);color:var(--qf-module-accent);font-size:11px;font-weight:730;text-align:left;}
@media(min-width:981px){body.qf221-ready:not(.qf-dialog-open):has(#planilhas.active){overflow-y:auto;}body.qf221-ready .main:has(#planilhas.active){overflow:visible;}#planilhas.active{max-height:calc(100dvh - 58px);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding-right:8px;padding-bottom:36px;}}
@media(max-width:900px){#planilhas.qf-premium-module .qf-v200-planilhas-head{grid-template-columns:1fr;align-items:start;padding:18px;}#planilhas .qf-v279-planilhas-head-actions,#planilhas .qf-v200-head-chips{justify-content:flex-start;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .filters{align-items:stretch;flex-direction:column;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .filters>.fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:620px){#planilhas.qf-premium-module .qf-v200-head-main{display:flex;}#planilhas.qf-premium-module .qf-v200-head-icon{width:38px;height:38px;min-width:38px;border-radius:11px;}#planilhas .qf-v200-head-chips span:first-child{display:none;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .filters>.fields{grid-template-columns:1fr 1fr;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards{grid-template-columns:1fr;gap:9px;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards>.card{min-height:118px;padding:15px 16px 14px 18px;gap:7px;}}
/* Heróis de módulos — um único padrão visual para módulos operacionais. */
body.qf221-ready :is(.phase789-module-hero,.recall-v96-hero){display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,340px);gap:14px;align-items:stretch;margin:0 0 16px;}
body.qf221-ready :is(.phase789-hero-card,.recall-v96-hero-main,.phase789-check-card,.recall-v96-hero-check){min-width:0;min-height:160px;border:1px solid var(--qf-ui-border);border-radius:18px;background:var(--qf-ui-surface);box-shadow:var(--qf-ui-shadow-1);}
body.qf221-ready :is(.phase789-hero-card,.recall-v96-hero-main){display:flex;flex-direction:column;justify-content:center;padding:22px 24px;overflow:hidden;position:relative;}
body.qf221-ready :is(.phase789-hero-card,.recall-v96-hero-main)::after{display:none;content:none;}
body.qf221-ready :is(.phase789-hero-card,.recall-v96-hero-main) h2{margin:0 0 7px;font-size:clamp(18px,1.8vw,22px);line-height:1.2;letter-spacing:-.02em;color:var(--qf-ui-text-strong);}
body.qf221-ready :is(.phase789-hero-card,.recall-v96-hero-main) p{margin:0;max-width:78ch;font-size:12.2px;line-height:1.55;color:var(--qf-ui-text-3);}
body.qf221-ready :is(.phase789-hero-tags,.recall-v96-hero-tags){display:flex;flex-wrap:wrap;gap:7px;margin-top:15px;}
body.qf221-ready :is(.phase789-hero-tags,.recall-v96-hero-tags)>span{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border:1px solid var(--qf-ui-border-soft);border-radius:999px;background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-2);font-size:11px;font-weight:650;}
body.qf221-ready .recall-v96-eyebrow{display:inline-flex;width:max-content;align-items:center;margin:0 0 9px;padding:0;border:0;background:transparent;color:var(--qf-module-accent,var(--qf-ui-brand));font-size:11px;font-weight:780;letter-spacing:.08em;text-transform:uppercase;}
body.qf221-ready .recall-v96-eyebrow::before{display:none;content:none;}
body.qf221-ready :is(.phase789-check-card,.recall-v96-hero-check){display:flex;flex-direction:column;justify-content:center;padding:18px 20px;overflow:hidden;}
body.qf221-ready :is(.phase789-check-card,.recall-v96-hero-check) h3{margin:0 0 7px;font-size:13px;line-height:1.3;color:var(--qf-ui-text-strong);}
body.qf221-ready .phase789-check-card>p{margin:0 0 9px;font-size:11.3px;line-height:1.48;color:var(--qf-ui-text-3);}
body.qf221-ready :is(.phase789-checklist,.recall-v96-checklist){display:grid;gap:0;}
body.qf221-ready :is(.phase789-checklist,.recall-v96-checklist)>span{position:relative;display:flex;align-items:flex-start;gap:8px;margin:0;padding:8px 0;border-top:1px solid var(--qf-ui-border-soft);background:transparent;color:var(--qf-ui-text-2);font-size:11px;line-height:1.4;}
body.qf221-ready :is(.phase789-checklist,.recall-v96-checklist)>span::before{content:"✓";position:static;width:16px;height:16px;flex:0 0 16px;display:grid;place-items:center;border:0;border-radius:0;background:transparent;color:var(--qf-module-accent,var(--qf-ui-brand));font-size:11px;font-weight:800;}
@media(max-width:980px){body.qf221-ready :is(.phase789-module-hero,.recall-v96-hero){grid-template-columns:1fr;}body.qf221-ready :is(.phase789-hero-card,.recall-v96-hero-main,.phase789-check-card,.recall-v96-hero-check){min-height:0;}body.qf221-ready :is(.phase789-hero-card,.recall-v96-hero-main){padding:19px;}body.qf221-ready :is(.phase789-check-card,.recall-v96-hero-check){padding:16px 18px;}}

/* RT approvals: governability is information architecture, not a plain white rectangle. */
#aprovacoesRT .qf-rt-page-head{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(310px,.6fr);gap:18px;margin:0 0 16px;padding:24px;border:1px solid color-mix(in srgb,var(--qf-module-accent,var(--qf-ui-brand)) 18%,var(--qf-ui-border));border-radius:24px;background:var(--qf-ui-surface);box-shadow:var(--qf-ui-shadow-1);}
#aprovacoesRT .qf-rt-page-kicker{display:inline-flex;margin-bottom:8px;color:var(--qf-module-accent,var(--qf-ui-brand));font-size:11px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;}
#aprovacoesRT .qf-rt-page-copy h1{margin:0 0 7px;font-size:clamp(26px,3vw,34px);letter-spacing:-.035em;color:var(--qf-ui-text-strong);}
#aprovacoesRT .qf-rt-page-copy p{margin:0;max-width:78ch;line-height:1.6;color:var(--qf-ui-text-3);}
#aprovacoesRT .qf-rt-page-side{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(110px,.55fr);gap:10px;align-self:stretch;}
#aprovacoesRT :is(.qf-rt-access,.qf-rt-pending-box){display:grid;align-content:center;gap:4px;padding:14px 15px;border:1px solid var(--qf-ui-border);border-radius:17px;background:color-mix(in srgb,var(--qf-ui-surface-raised) 90%,var(--qf-module-soft,var(--qf-ui-brand-soft)));box-shadow:inset 0 1px 0 rgba(255,255,255,.35);}
#aprovacoesRT :is(.qf-rt-access,.qf-rt-pending-box)>span{font-size:11px;font-weight:760;letter-spacing:.06em;text-transform:uppercase;color:var(--qf-ui-text-4);}
#aprovacoesRT .qf-rt-access strong{color:var(--qf-module-accent,var(--qf-ui-brand));line-height:1.25;}
#aprovacoesRT .qf-rt-pending-box strong{font-size:28px;line-height:1;color:var(--qf-ui-text-strong);}
#aprovacoesRT :is(.qf-rt-access,.qf-rt-pending-box) small{line-height:1.35;color:var(--qf-ui-text-3);}
#aprovacoesRT .qf-rt-approval-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 14px;}
#aprovacoesRT .qf-rt-approval-kpis article{position:relative;overflow:hidden;padding:15px 17px;border:1px solid color-mix(in srgb,var(--qf-module-accent,var(--qf-ui-brand)) 11%,var(--qf-ui-border));border-radius:17px;background:var(--qf-ui-surface);box-shadow:0 6px 18px rgba(15,23,42,.04);}
#aprovacoesRT .qf-rt-approval-kpis article::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--qf-module-accent,var(--qf-ui-brand));opacity:.58;}
#aprovacoesRT .qf-rt-approval-kpis article>div{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"label value" "detail detail";align-items:baseline;gap:4px 9px;width:100%;}
#aprovacoesRT .qf-rt-approval-kpis article span{grid-area:label;color:var(--qf-ui-text-3);font-size:11px;font-weight:700;}
#aprovacoesRT .qf-rt-approval-kpis article strong{grid-area:value;justify-self:end;color:var(--qf-ui-text-strong);font-size:22px;line-height:1;}
#aprovacoesRT .qf-rt-approval-kpis article small{grid-area:detail;color:var(--qf-ui-text-4);line-height:1.35;}
#aprovacoesRT .qf-rt-approval-kpis article>i{display:none;}
#aprovacoesRT .qf-rt-governance-note{margin:0 0 14px;padding:15px 17px;border:1px solid color-mix(in srgb,var(--qf-module-accent,var(--qf-ui-brand)) 14%,var(--qf-ui-border));border-radius:17px;background:var(--qf-ui-surface-soft);box-shadow:none;}
#aprovacoesRT .qf-rt-queue-card{padding:20px;border:1px solid var(--qf-ui-border);border-radius:22px;background:var(--qf-ui-surface);box-shadow:0 10px 28px rgba(15,23,42,.055);}
#aprovacoesRT .qf-rt-empty{display:grid;justify-items:center;gap:7px;min-height:180px;align-content:center;padding:24px;border:1px dashed color-mix(in srgb,var(--qf-module-accent,var(--qf-ui-brand)) 20%,var(--qf-ui-border));border-radius:18px;background:color-mix(in srgb,var(--qf-module-soft,var(--qf-ui-brand-soft)) 46%,var(--qf-ui-surface));}
#aprovacoesRT .qf-rt-empty>span{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:var(--qf-module-soft,var(--qf-ui-brand-soft));color:var(--qf-module-accent,var(--qf-ui-brand));font-weight:800;}

/* Server write refusal: compact operational alert, not a detached white slab. */
.qf-write-blocked{border:1px solid color-mix(in srgb,var(--qf-ui-danger) 28%,var(--qf-ui-border));border-left:4px solid var(--qf-ui-danger);border-radius:18px;background:color-mix(in srgb,var(--qf-ui-surface) 94%,var(--qf-ui-danger-soft,rgba(193,50,50,.08)));box-shadow:0 18px 48px rgba(15,23,42,.18);padding:15px 17px;}
.qf-write-blocked strong{color:var(--qf-ui-text-strong);font-size:13.5px;}.qf-write-blocked p{color:var(--qf-ui-text-3);line-height:1.45;}.qf-write-blocked-actions{width:auto;flex:0 0 auto;}.qf-write-blocked button{border-radius:11px;background:var(--qf-ui-surface-raised);border:1px solid var(--qf-ui-border);color:var(--qf-ui-text-2);}

/* Legal modal remains operable on narrow screens. */
.qf-legal-head{position:sticky;top:0;z-index:var(--qf-z-sticky);background:var(--qf-ui-surface);border-bottom:1px solid var(--qf-ui-border);}.qf-legal-close{min-height:44px;padding-inline:13px;border-radius:12px;font-weight:720;}#qf276LegislationStrip .qf276-btn{font-weight:720;}

/* Session entry animation is bound to the real authenticated loading lifecycle. */
body.qf-session-entering #qfSessionGate .qf-session-card{animation:qfSessionCardEnter .62s cubic-bezier(.18,.86,.24,1) both;}body.qf-session-entering #qfSessionGate .qf-session-orbit{animation:qfSessionOrbitEnter .9s .08s cubic-bezier(.18,.86,.24,1) both;}body.qf-session-entering #qfSessionGate .qf-session-mark{animation:qfSessionBrandEnter 1.05s .12s cubic-bezier(.18,.86,.24,1) both;transform-origin:50% 50%;}body.qf-session-entering #qfSessionGate :is(.qf-session-eyebrow,h2,p,.qf-session-steps){animation:qfSessionCopyEnter .55s .28s cubic-bezier(.18,.86,.24,1) both;}@keyframes qfSessionCardEnter{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}@keyframes qfSessionOrbitEnter{from{opacity:0;transform:scale(.82)}to{opacity:1;transform:scale(1)}}@keyframes qfSessionCopyEnter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes qfSessionBrandEnter{0%{opacity:0;transform:scale(.58) rotate(-14deg)}68%{opacity:1;transform:scale(1.10) rotate(2deg)}100%{opacity:1;transform:scale(1) rotate(0)}}

.qf-v6-mobile-brand{display:none;}
@media(hover:hover) and (pointer:fine){
  body.qf221-ready .section.qf-premium-module :is(.phase56-card,.phase789-card,.profile-card,.v104-card,.v255-doc-row,.qf276-card,.qf-platform-card,.qf-system-card,.qf258-lot-card,.recall-v96-card,.doc-card,.pac-card){transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;}
  body.qf221-ready .section.qf-premium-module :is(.phase56-card,.phase789-card,.profile-card,.v104-card,.v255-doc-row,.qf276-card,.qf-platform-card,.qf-system-card,.qf258-lot-card,.recall-v96-card,.doc-card,.pac-card):hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--qf-module-accent) 22%,var(--qf-ui-border));box-shadow:0 12px 28px rgba(15,23,42,.075);}
}

@media(max-width:980px){
  :root{--qf-v5-top-h:78px;}
  #qf221MobileTop,body.qf221-nav-collapsed #qf221MobileTop{min-height:70px;height:70px;background:color-mix(in srgb,var(--qf-ui-surface) 96%,transparent);color:var(--qf-ui-text);border-bottom-color:var(--qf-ui-border);box-shadow:0 5px 18px rgba(12,27,40,.07);}
  #qf221OpenMenu{width:42px;height:42px;min-width:42px;min-height:42px;flex-basis:42px;border-color:var(--qf-ui-border);background:var(--qf-ui-surface-raised);color:var(--qf-ui-text-2);}
  .qf-v6-mobile-brand{width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;padding:3px;border:0;border-radius:0;background:transparent;overflow:visible;}.qf-v6-mobile-brand img{width:100%;height:100%;object-fit:contain;filter:none;}.qf-v6-mobile-brand strong{color:var(--qf-ui-brand-text);font-size:12px;}
  html[data-qf-theme="dark"] .qf-v6-mobile-brand img{filter:brightness(0) invert(1);}
  #qf221MobileTop .qf-v5-breadcrumb small{color:var(--qf-ui-text-4);font-size:11px;letter-spacing:.025em;}#qf221MobileTop .qf-v5-breadcrumb strong{color:var(--qf-ui-text-strong);font-size:13.5px;font-weight:730;}#qf221MobileTop>.qf-theme-toggle{border-color:var(--qf-ui-border);background:var(--qf-ui-surface-raised);color:var(--qf-ui-text-3);}
  body.qf221-ready .main{padding-top:14px;}
  body.qf221-ready .section.qf-premium-module>.topbar,body.qf221-ready .section.qf-premium-module>.qf-v200-planilhas-head{border-radius:18px;padding:18px;margin-bottom:14px;}
  body.qf221-ready .section.qf-premium-module>.panel{border-radius:18px;}
  body.qf221-ready .section.qf-premium-module>.panel>.panel-head{padding:17px 18px 15px;}
  body.qf221-ready .section.qf-premium-module>.topbar,body.qf221-ready .section.qf-premium-module>.panel>.panel-head{grid-template-columns:minmax(0,1fr);column-gap:0;}
  body.qf221-ready .section.qf-premium-module>.topbar::before,body.qf221-ready .section.qf-premium-module>.panel>.panel-head::before{display:none;}
  body.qf221-ready .section.qf-premium-module>.topbar>.top-actions,body.qf221-ready .section.qf-premium-module>.panel>.panel-head>.top-actions{grid-column:1/-1;justify-self:stretch;width:100%;max-width:none;padding-top:4px;}
  body.qf221-ready .section.qf-premium-module>.panel>.toolbar{margin:14px 18px 0;}
  body.qf221-ready .section.qf-premium-module>.panel>.grid-list{padding:14px 18px 18px;}
  #planilhas .qf-v200-head-main{display:flex;grid-template-columns:none;gap:12px;}#planilhas .qf-v200-head-icon{display:flex;width:46px;height:46px;min-width:46px;}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .filters{padding:14px;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .fields{grid-template-columns:1fr;gap:10px;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .field{padding:0;background:transparent;border:0;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root .field label{font-size:11px;font-weight:750;letter-spacing:.04em;text-transform:uppercase;color:var(--qf-ui-text-3);}
  
  #aprovacoesRT .qf-rt-page-head{grid-template-columns:1fr;padding:18px;border-radius:19px;}#aprovacoesRT .qf-rt-page-side{grid-template-columns:1fr 120px;}#aprovacoesRT .qf-rt-approval-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  .qf-write-blocked{align-items:stretch;flex-direction:column;}.qf-write-blocked-actions{width:100%;}.qf-write-blocked-actions button{flex:1 1 140px;}
  .qf-legal-modal.show{align-items:stretch;padding:0;}.qf-legal-dialog{width:100vw;max-width:100vw;height:var(--qf-visual-viewport-height,100dvh);max-height:var(--qf-visual-viewport-height,100dvh);border-radius:0;overflow:auto;padding-bottom:max(18px,env(safe-area-inset-bottom,0px));}.qf-legal-head{padding-top:max(14px,env(safe-area-inset-top,0px));}
}
@media(max-width:620px){
  #aprovacoesRT .qf-rt-page-side,#aprovacoesRT .qf-rt-approval-kpis{grid-template-columns:1fr;}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards{grid-template-columns:1fr;gap:9px;}:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #cards>.card{padding:14px;min-height:150px;}
}
@media(prefers-reduced-motion:reduce){
  body.qf-login-entering #qfLoginGate :is(.login-brand-top,.login-copy,.login-card),
  body.qf-session-entering #qfSessionGate .qf-session-card,
  body.qf-session-entering #qfSessionGate .qf-session-orbit,
  body.qf-session-entering #qfSessionGate .qf-session-mark,
  body.qf-session-entering #qfSessionGate .qf-session-mark img,
  body.qf-session-entering #qfSessionGate :is(.qf-session-eyebrow,h2,p,.qf-session-steps){animation:none;}
}

/* Premium surface rhythm — shared by final-client modules. */
body.qf221-ready .section.qf-premium-module{--qf-module-radius:var(--qf-radius-panel);}
body.qf221-ready .section.qf-premium-module>:where(.topbar,.panel,.qf-v200-planilhas-head,.qf-platform-hero,.qf-rt-page-head){border-radius:var(--qf-radius-panel);box-shadow:var(--qf-shadow-card);}
body.qf221-ready .section.qf-premium-module :where(.card,.doc-card,.pac-card,.phase3-card,.phase56-card,.phase789-card,.profile-card,.qf276-card,.qf-platform-card,.qf-system-card,.qf258-lot-card,.recall-v96-card){border-radius:var(--qf-radius-card);box-shadow:var(--qf-shadow-control);}
body.qf221-ready .section.qf-premium-module :where(.topbar,.panel-head,.qf-v200-planilhas-head){position:relative;}
body.qf221-ready .section.qf-premium-module :where(.topbar,.panel-head,.qf-v200-planilhas-head)::after{content:"";position:absolute;left:18px;width:44px;bottom:-1px;height:2px;border-radius:2px;background:var(--qf-module-accent,var(--qf-ui-brand));pointer-events:none;}
body.qf221-ready .section.qf-premium-module :where(.topbar,.panel-head,.qf-v200-planilhas-head) h1,body.qf221-ready .section.qf-premium-module :where(.topbar,.panel-head,.qf-v200-planilhas-head) h2{letter-spacing:-.03em;}
body.qf221-ready .section.qf-premium-module :where(.empty,.qf-rt-empty,.doc-empty,.pac-empty){border-radius:var(--qf-radius-card);border-style:dashed;background:color-mix(in srgb,var(--qf-ui-surface-soft) 78%,var(--qf-module-soft,var(--qf-ui-brand-soft)));}

/* =====================================================================
   AFERIUM R5 STAGE 5 — UNIVERSAL COMPONENT CONTRACT
   One component language for controls, forms, tables, dialogs and states.
   ===================================================================== */
body.qf221-ready{
  --qf-control-h:44px;
  --qf-control-radius:12px;
  --qf-control-pad-x:13px;
  --qf-component-gap:12px;
  --qf-component-gap-lg:18px;
  --qf-state-info:var(--qf-ui-brand);
  --qf-state-success:#16845b;
  --qf-state-warning:#b66a10;
  --qf-state-danger:#c53b45;
}

/* Buttons */
:where(body.qf221-ready :where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn,.qf-gov-btn)):is(button,a,label,input,summary,span,div){
  min-height:var(--qf-control-h);
  border-radius:var(--qf-control-radius);
  padding-inline:var(--qf-control-pad-x);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:700;
  line-height:1.2;
  cursor:pointer;
  transition:border-color .16s ease,background-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
:where(body.qf221-ready :where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn,.qf-gov-btn):disabled):is(button,a,label,input,summary,span,div),
:where(body.qf221-ready :where([aria-disabled="true"])):is(button,a,label,input,summary,span,div){cursor:not-allowed;filter:saturate(.72);}
:where(body.qf221-ready :where(button,.btn,.mini-btn,.mode-btn,.qf-sheet-btn,.qf276-btn,.qf-gov-btn):active:not(:disabled)):is(button,a,label,input,summary,span,div){transform:translateY(1px);}
body.qf221-ready :where(.btn-primary,.primary,[data-variant="primary"]){
  background:var(--qf-ui-brand);border-color:var(--qf-ui-brand);color:#fff;
  box-shadow:0 8px 18px color-mix(in srgb,var(--qf-ui-brand) 20%,transparent);
}
body.qf221-ready :where(.btn-danger,.danger,[data-variant="danger"]){
  background:var(--qf-state-danger);border-color:var(--qf-state-danger);color:#fff;
}

/* Fields */
body.qf221-ready :where(.field,label.qf-field,.qf-gov-dialog-field,.qf-sheet-admin-modal-body>label){
  display:grid;gap:7px;min-width:0;
}
body.qf221-ready :where(.field>label,label.qf-field>span,.qf-gov-dialog-field>span,.qf-sheet-admin-modal-body>label>span){
  color:var(--qf-ui-text-2);font-size:12px;font-weight:720;line-height:1.3;
}
body.qf221-ready :where(input:not([type=checkbox]):not([type=radio]),select,textarea,[contenteditable="true"]){
  width:100%;min-width:0;min-height:var(--qf-control-h);
  border:1px solid var(--qf-ui-border-strong);border-radius:var(--qf-control-radius);
  background:var(--qf-ui-surface-raised);color:var(--qf-ui-text-strong);
  padding:10px var(--qf-control-pad-x);box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
  transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease;
}
body.qf221-ready textarea{min-height:96px;resize:vertical;line-height:1.5;}
body.qf221-ready :where(input:not([type=checkbox]):not([type=radio]),select,textarea,[contenteditable="true"]):hover:not(:disabled){border-color:color-mix(in srgb,var(--qf-ui-brand) 34%,var(--qf-ui-border-strong));}
body.qf221-ready :where(input:not([type=checkbox]):not([type=radio]),select,textarea,[contenteditable="true"]):focus{
  border-color:var(--qf-ui-brand);outline:0;box-shadow:0 0 0 3px color-mix(in srgb,var(--qf-ui-brand) 14%,transparent);
}
body.qf221-ready :where(input,select,textarea)[aria-invalid="true"]{
  border-color:var(--qf-state-danger);box-shadow:0 0 0 3px color-mix(in srgb,var(--qf-state-danger) 12%,transparent);
}
body.qf221-ready :where(input,select,textarea):disabled,
body.qf221-ready :where(input,select,textarea)[readonly]{background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-3);}
body.qf221-ready :where(.field small,.qf-gov-dialog-field small,.qf-sheet-admin-modal-body label small,.help-text){color:var(--qf-ui-text-3);line-height:1.45;}

/* Checkbox / radio */
body.qf221-ready :where(input[type=checkbox],input[type=radio]){
  inline-size:18px;block-size:18px;accent-color:var(--qf-ui-brand);vertical-align:middle;
}

/* Tables */
body.qf221-ready :where(.tablewrap,.qf-responsive-table-wrap,[data-table-wrap]){
  max-width:100%;overflow:auto;border:1px solid var(--qf-ui-border);border-radius:var(--qf-radius-card);background:var(--qf-ui-surface);
}
body.qf221-ready :where(.tablewrap,.qf-responsive-table-wrap,[data-table-wrap])>table{margin:0;border:0;}
body.qf221-ready table:not(.gridTable):not(.headTable){width:100%;border-spacing:0;border-collapse:separate;}
body.qf221-ready table:not(.gridTable):not(.headTable) thead th{
  position:sticky;top:0;background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-2);font-size:11px;font-weight:760;letter-spacing:.045em;text-transform:uppercase;
  border-bottom:1px solid var(--qf-ui-border-strong);white-space:nowrap;
}
body.qf221-ready table:not(.gridTable):not(.headTable) tbody tr:last-child>td{border-bottom:0;}
body.qf221-ready table:not(.gridTable):not(.headTable) tbody tr:hover>td{background:color-mix(in srgb,var(--qf-ui-brand-soft) 38%,var(--qf-ui-surface));}

/* Dialogs / modals */
body.qf221-ready :where(.modal,.nc-modal,.signpad-modal,.qf-v279-batch-modal,.qf275-modal,.qf275-confirm-modal,.qf276-modal,.qf-legal-modal,.qf-gov-modal,.qf-sheet-admin-modal,.qf258-modal,.v177-modal,.qf-v266-modal,.qf-consolidation-modal){
  align-items:center;justify-content:center;padding:clamp(14px,3vw,32px);
  background:rgba(8,15,29,.52);
}
body.qf221-ready :where(.modal,.nc-modal,.signpad-modal,.qf-v279-batch-modal,.qf275-modal,.qf275-confirm-modal,.qf276-modal,.qf-legal-modal,.qf-gov-modal,.qf-sheet-admin-modal,.qf258-modal,.v177-modal,.qf-v266-modal,.qf-consolidation-modal) :where(.panel,.modal-card,.viewer-card,.doc-modal-card,.pac-modal-card,.nc-panel,.signpad-panel,.qf-v279-batch-panel,.qf275-dialog,.qf275-confirm-card,.qf276-dialog,.qf-legal-dialog,.qf-gov-panel,.qf258-modal-card,.v177-edit-card,.qf-v266-panel,.qf-consolidation-dialog,section[role="dialog"]){
  border:1px solid var(--qf-ui-border);border-radius:20px;background:var(--qf-ui-surface-raised);box-shadow:0 24px 70px rgba(5,12,24,.22);overflow:hidden;
}
body.qf221-ready :where(.modalbar,.modal-head,.qf-gov-dialog-head,.qf276-dialog-head,.qf-legal-head,.qf-sheet-admin-modal header){
  min-height:62px;padding:15px 18px;border-bottom:1px solid var(--qf-ui-border-soft);background:var(--qf-ui-surface-raised);position:sticky;top:0;z-index:var(--qf-z-sticky);
}
body.qf221-ready :where(.modal-body,.qf-gov-dialog-body,.qf276-dialog-body,.qf-sheet-admin-modal-body,.nc-body,.signpad-body){min-width:0;overflow:auto;overscroll-behavior:contain;}
body.qf221-ready :where(.modal-actions,.qf-gov-dialog-actions,.qf276-dialog-actions,.qf-sheet-admin-modal footer,.signpad-actions,.nc-actions){
  display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:14px 18px;border-top:1px solid var(--qf-ui-border-soft);background:var(--qf-ui-surface-soft);
}
body.qf221-ready :where(.close,[data-close],[data-modal-close],[data-print-close]){flex:0 0 auto;}

/* Empty, loading, progress and feedback states */
body.qf221-ready :where(.empty,.doc-empty,.pac-empty,.qf-legal-empty,.qf276-empty,.qf-sheet-history-empty,.qf-rt-empty){
  min-height:112px;display:grid;place-items:center;padding:24px;border:1px dashed var(--qf-ui-border-strong);border-radius:var(--qf-radius-card);background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-3);line-height:1.5;
}
body.qf221-ready :where([aria-busy="true"],form[data-qf-submitting="1"]){cursor:progress;}
body.qf221-ready :where(.qf276-progress,.progress,[role="progressbar"]){border-radius:var(--qf-control-radius);overflow:hidden;}
body.qf221-ready :where(.toast,.qf-cloud-badge,.qf-auth-badge){
  border:1px solid var(--qf-ui-border);border-radius:14px;background:var(--qf-ui-surface-raised);box-shadow:0 14px 36px rgba(5,12,24,.16);color:var(--qf-ui-text-strong);
}
body.qf221-ready :where(.error,[data-state="error"]){color:var(--qf-state-danger);}
body.qf221-ready :where(.success,[data-state="success"]){color:var(--qf-state-success);}
body.qf221-ready :where(.warning,[data-state="warning"]){color:var(--qf-state-warning);}

/* Action bars and responsive behavior */
body.qf221-ready :where(.actions,.top-actions,.toolbar,.modal-actions,.profile-form-actions,.qf-gov-dialog-actions,.qf258-form-actions,.v177-edit-actions,.signpad-actions,.nc-actions,.qf-v279-batch-actions,.qf-sheet-editor-actions){
  gap:9px;flex-wrap:wrap;
}
@media(max-width:680px){
  body.qf221-ready :where(.modal,.nc-modal,.signpad-modal,.qf-v279-batch-modal,.qf275-modal,.qf275-confirm-modal,.qf276-modal,.qf-legal-modal,.qf-gov-modal,.qf-sheet-admin-modal,.qf258-modal,.v177-modal,.qf-v266-modal,.qf-consolidation-modal){padding:0;align-items:flex-end;}
  body.qf221-ready :where(.modal,.nc-modal,.signpad-modal,.qf-v279-batch-modal,.qf275-modal,.qf275-confirm-modal,.qf276-modal,.qf-legal-modal,.qf-gov-modal,.qf-sheet-admin-modal,.qf258-modal,.v177-modal,.qf-v266-modal,.qf-consolidation-modal) :where(.panel,.modal-card,.viewer-card,.doc-modal-card,.pac-modal-card,.nc-panel,.signpad-panel,.qf-v279-batch-panel,.qf275-dialog,.qf275-confirm-card,.qf276-dialog,.qf-legal-dialog,.qf-gov-panel,.qf258-modal-card,.v177-edit-card,.qf-v266-panel,.qf-consolidation-dialog,section[role="dialog"]){
    width:100%;max-width:none;max-height:92dvh;border-radius:20px 20px 0 0;
  }
  body.qf221-ready :where(.modal-actions,.qf-gov-dialog-actions,.qf276-dialog-actions,.qf-sheet-admin-modal footer,.signpad-actions,.nc-actions)>:where(button,.btn){flex:1 1 140px;}
}
/* Guia de preenchimento — cabeçalho separado, scroll seguro e ação sempre fora do texto. */
#moduleGuideModal .modal-card{border:1px solid var(--qf-ui-border);border-radius:24px;background:var(--qf-ui-surface);box-shadow:var(--qf-ui-shadow-3);overflow:hidden;}
#moduleGuideModal .modal-head{position:relative;top:auto;z-index:2;margin:0;padding:20px 22px 16px;border-bottom:1px solid var(--qf-ui-border);background:var(--qf-ui-surface);display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:16px;}#moduleGuideModal .modal-head>div:first-child{min-width:0;}#moduleGuideModal .modal-head h3{margin:0;color:var(--qf-ui-text-strong);letter-spacing:-.025em;}#moduleGuideModal .modal-head p{margin:7px 0 0;max-width:72ch;color:var(--qf-ui-text-3);}#moduleGuideModal .modal-head .top-actions{width:auto;min-width:0;margin:0;display:flex;justify-content:flex-end;align-items:flex-start;}#moduleGuideModal #closeModuleGuideBtn{width:auto;min-width:82px;min-height:40px;margin:0;flex:0 0 auto;position:static;}
#moduleGuideModal .module-guide-body{background:var(--qf-ui-surface);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:18px 22px 22px;}#moduleGuideModal :where(.module-guide-highlight,.module-guide-side,.module-guide-card,.module-guide-footer-note){border:1px solid var(--qf-ui-border);border-radius:16px;background:var(--qf-ui-surface-raised);box-shadow:none;}#moduleGuideModal .module-guide-highlight{border-left:3px solid var(--qf-module-accent,var(--qf-ui-brand));}#moduleGuideModal .module-guide-badge{border:1px solid color-mix(in srgb,var(--qf-module-accent,var(--qf-ui-brand)) 18%,var(--qf-ui-border));border-radius:999px;background:var(--qf-module-soft,var(--qf-ui-brand-soft));color:var(--qf-module-accent,var(--qf-ui-brand));}#moduleGuideModal .module-guide-step{border:1px solid var(--qf-ui-border);border-radius:14px;background:var(--qf-ui-surface);}#moduleGuideModal .module-guide-step::before{border-radius:999px;background:var(--qf-module-soft,var(--qf-ui-brand-soft));color:var(--qf-module-accent,var(--qf-ui-brand));font-weight:800;}
@media(max-width:700px){#moduleGuideModal .modal-card{border-radius:20px 20px 0 0;}#moduleGuideModal .modal-head{padding:16px 14px 13px;gap:10px;}#moduleGuideModal .module-guide-body{padding:14px;}#moduleGuideModal .modal-head h3{font-size:clamp(20px,6vw,26px);}#moduleGuideModal #closeModuleGuideBtn{min-width:72px;min-height:38px;padding:7px 9px;}}

/* Stage 15 — mobile-first sheets, evidence and NC traceability */
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-mobile-sheet-head{display:grid;gap:12px;margin:0 0 12px;padding:14px 15px;border:1px solid var(--qf-ui-border);border-radius:18px;background:var(--qf-ui-surface-raised);box-shadow:0 8px 24px rgba(5,12,24,.06)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-mobile-sheet-head h2{margin:4px 0 2px;font-size:18px;line-height:1.25;color:var(--qf-ui-text-strong)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-mobile-sheet-head p{margin:0;color:var(--qf-ui-text-3);font-size:12px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-mobile-sheet-code{display:inline-flex;align-items:center;min-height:28px;padding:5px 10px;border-radius:999px;background:var(--qf-ui-brand-soft);color:var(--qf-ui-brand-text);font-weight:800;font-size:12px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-mobile-sheet-note{padding:10px 12px;border-radius:13px;background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-3);font-size:12px;line-height:1.45}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachments{margin:18px 0;border:1px solid var(--qf-ui-border);border-radius:18px;background:var(--qf-ui-surface-raised);overflow:hidden;break-inside:avoid}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachments-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid var(--qf-ui-border-soft)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachments-head h3{margin:0 0 4px;font-size:15px;color:var(--qf-ui-text-strong)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachments-head p{margin:0;max-width:70ch;color:var(--qf-ui-text-3);font-size:12px;line-height:1.45}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachments-badge{white-space:nowrap;padding:5px 9px;border-radius:999px;background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-2);font-size:11px;font-weight:750}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachments-body{padding:14px 16px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-uploader{display:flex;align-items:flex-end;gap:10px;margin-bottom:12px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-uploader>div{min-width:0;flex:1}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-uploader input{width:100%}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-uploader small{display:block;margin-top:6px;color:var(--qf-ui-text-3);line-height:1.4}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-empty{padding:16px;border:1px dashed var(--qf-ui-border);border-radius:14px;background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-3);text-align:center}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-list{display:grid;gap:10px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-item{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px;border:1px solid var(--qf-ui-border-soft);border-radius:14px;background:var(--qf-ui-surface)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-preview{width:72px;height:58px;border-radius:10px;overflow:hidden;background:var(--qf-ui-surface-soft);display:grid;place-items:center}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-preview img{width:100%;height:100%;object-fit:cover;display:block}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-file-icon{font-size:11px;font-weight:850;color:var(--qf-ui-text-3)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-meta{min-width:0}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-meta h4{margin:0 0 4px;overflow-wrap:anywhere;color:var(--qf-ui-text-strong);font-size:13px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-meta p{margin:0;color:var(--qf-ui-text-3);font-size:11px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace{margin:18px 0;border:1px solid var(--qf-ui-border);border-radius:18px;background:var(--qf-ui-surface-raised);overflow:hidden;break-inside:avoid}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-head{display:flex;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid var(--qf-ui-border-soft)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-head h3{margin:0 0 4px;font-size:15px;color:var(--qf-ui-text-strong)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-head p{margin:0;color:var(--qf-ui-text-3);font-size:12px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-head>span{white-space:nowrap;color:var(--qf-ui-text-3);font-size:11px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-item{padding:15px 16px;border-bottom:1px solid var(--qf-ui-border-soft)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-item:last-child{border-bottom:0}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-title{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-title span{padding:5px 9px;border-radius:999px;font-size:11px;font-weight:750}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-title .ok{background:color-mix(in srgb,var(--qf-state-success) 14%,transparent);color:var(--qf-state-success)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-title .bad{background:color-mix(in srgb,var(--qf-state-danger) 13%,transparent);color:var(--qf-state-danger)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace-title .pending{background:color-mix(in srgb,var(--qf-state-warning) 14%,transparent);color:var(--qf-state-warning)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace dl{display:grid;grid-template-columns:minmax(130px,190px) minmax(0,1fr);gap:7px 12px;margin:0 0 12px}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace dt{font-size:11px;font-weight:800;color:var(--qf-ui-text-2)}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace dd{margin:0;color:var(--qf-ui-text-strong);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
:is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-rt-sign{margin:10px 0}
body.qf221-ready .nc-resolution-modal{position:fixed;inset:0;z-index:var(--qf-z-modal-nested);display:none;align-items:center;justify-content:center;padding:20px;background:rgba(8,15,29,.58)}
body.qf221-ready .nc-resolution-modal.show{display:flex}
body.qf221-ready .nc-resolution-panel{width:min(680px,100%);max-height:90dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;border:1px solid var(--qf-ui-border);border-radius:22px;background:var(--qf-ui-surface-raised);box-shadow:0 24px 70px rgba(5,12,24,.26);overflow:hidden}
body.qf221-ready .nc-resolution-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:16px 18px;border-bottom:1px solid var(--qf-ui-border-soft)}
body.qf221-ready .nc-resolution-head b{display:block;color:var(--qf-ui-text-strong);font-size:17px}
body.qf221-ready .nc-resolution-head small{display:block;margin-top:4px;color:var(--qf-ui-text-3)}
body.qf221-ready .nc-resolution-body{overflow:auto;padding:18px;display:grid;gap:14px}
body.qf221-ready .nc-resolution-original,.nc-resolution-note{padding:13px 14px;border:1px solid var(--qf-ui-border-soft);border-radius:14px;background:var(--qf-ui-surface-soft)}
body.qf221-ready .nc-resolution-original p{margin:6px 0 0;line-height:1.5;color:var(--qf-ui-text-2)}
body.qf221-ready .nc-resolution-note{font-size:12px;line-height:1.5;color:var(--qf-ui-text-3)}
body.qf221-ready .nc-resolution-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding:14px 18px;border-top:1px solid var(--qf-ui-border-soft);background:var(--qf-ui-surface-soft)}
@media(max-width:820px){
  body.qf221-ready :where(.section>.head,.section>.section-head,.panel-head,.module-head){min-width:0}
  body.qf221-ready :where(.section,.panel,.card,.module-card){max-width:100%;min-width:0}
  body.qf221-ready :where(.fields,.form-grid,.qf-form-grid){grid-template-columns:minmax(0,1fr)}
  body.qf221-ready :where(.top-actions,.actions,.toolbar){width:100%;min-width:0}
  body.qf221-ready :where(.top-actions,.actions,.toolbar)>:where(button,.btn,select,input){max-width:100%}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-sheet-mobile-mode{padding:0 2px}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-sheet-mobile-mode>.period{margin:8px 0 12px}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .mobile-card{padding:14px;border-radius:16px}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .m-card-title-row b{font-size:14px;line-height:1.35;overflow-wrap:anywhere}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .m-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .m-choice button{min-width:0;white-space:normal}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-uploader{align-items:stretch;flex-direction:column}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-item{grid-template-columns:62px minmax(0,1fr)}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-preview{width:62px;height:54px}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-actions{grid-column:1/-1;justify-content:stretch}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .sheet-attachment-actions .btn{flex:1 1 120px}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace dl{grid-template-columns:1fr}
  :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .qf-nc-trace dt{margin-top:4px}
  body.qf221-ready .nc-resolution-modal{padding:0;align-items:flex-end}
  body.qf221-ready .nc-resolution-panel{width:100%;max-height:94dvh;border-radius:22px 22px 0 0}
  body.qf221-ready .nc-resolution-actions .btn{flex:1 1 150px}
}
@media print{
  .qf-mobile-sheet-head{display:none}
  .sheet-attachment-uploader,.sheet-attachment-actions,.qf-nc-trace-item>button{display:none}
  .sheet-attachments,.qf-nc-trace{border-color:#bbb;background:#fff;color:#111;box-shadow:none}
  .sheet-attachment-item,.qf-nc-trace-item{break-inside:avoid;background:#fff;color:#111}
  .sheet-attachment-preview{background:#f3f3f3}
  .sheet-attachment-preview img{max-width:32mm;max-height:24mm;object-fit:contain}
}

/* Stage 19 — fiscal-grade immutable records */
#planilhas #sheetHost{display:flex;flex-direction:column;min-height:0;}
#planilhas #qfQualityIntegrityPanel{order:90;position:relative;inset:auto;margin:18px 0 0;}
#planilhas #qfGovSheetAudit{order:91;position:relative;inset:auto;margin:12px 0 0;}
.qf-gov-record-summary{grid-template-columns:repeat(3,minmax(0,1fr));}
.qf-gov-dialog-field input[type="password"]{width:100%;min-height:44px;}
.qf-record-regularized{opacity:.92;}
.qf-record-regularized .item-main>p{margin-bottom:8px;}
.qf-v2829-integrity[data-qf-integrity-host]{min-height:0;margin-top:8px;}
@media(max-width:700px){.qf-gov-record-summary{grid-template-columns:1fr}.qf-gov-dialog-actions{display:grid;grid-template-columns:1fr}.qf-gov-dialog-actions .qf-gov-btn{width:100%}}

/* Stage 20 — canonical permission feedback. */
.qf-access-denied{position:fixed;inset:0;z-index:var(--qf-z-modal-nested);display:none;place-items:center;padding:18px;background:rgba(5,15,25,.48);backdrop-filter:blur(8px);}
.qf-access-denied.show{display:grid;}
.qf-access-denied-card{position:relative;width:min(440px,100%);padding:26px;border:1px solid var(--qf-ui-border);border-radius:var(--qf-radius-panel);background:var(--qf-ui-surface-raised);box-shadow:var(--qf-shadow-panel);color:var(--qf-ui-text);}
.qf-access-denied-card h2{margin:6px 40px 8px 0;color:var(--qf-ui-text-strong);font-size:1.24rem;}
.qf-access-denied-card p{margin:0 0 14px;color:var(--qf-ui-text-2);line-height:1.55;}
.qf-access-denied-kicker{display:inline-flex;padding:5px 9px;border-radius:var(--qf-radius-pill);background:var(--qf-ui-brand-soft);color:var(--qf-ui-brand-strong);font-size:.72rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;}
.qf-access-denied-note{margin:0 0 18px;padding:12px 13px;border:1px solid var(--qf-ui-border-soft);border-radius:var(--qf-radius-control);background:var(--qf-ui-surface-soft);color:var(--qf-ui-text-2);font-size:.9rem;line-height:1.45;}
.qf-access-denied-card>.btn{width:100%;min-height:44px;}
.qf-access-denied-close{position:absolute;right:14px;top:14px;width:36px;height:36px;border:1px solid var(--qf-ui-border);border-radius:50%;background:var(--qf-ui-surface-soft);color:var(--qf-ui-text);cursor:pointer;font-size:1.25rem;line-height:1;}

/* Stage31 final-client polish */
body.qf221-ready .section.qf-premium-module{--qf-final-gap:16px}
body.qf221-ready .section.qf-premium-module :is(.panel,.card,.doc-card,.pac-card,.phase3-card,.phase56-card,.phase789-card,.profile-card,.qf276-card,.qf-platform-card,.qf-system-card){border-radius:18px}
body.qf221-ready .section.qf-premium-module :is(button,.btn,[role="button"],input,select,textarea){min-height:42px}
body.qf221-ready .section.qf-premium-module :is(h1,h2,h3){text-wrap:balance}
body.qf221-ready .section.qf-premium-module :is(p,.muted,small){line-height:1.5}
@media(max-width:980px){body.qf221-ready .section.qf-premium-module{padding-inline:12px}body.qf221-ready .section.qf-premium-module :is(.panel,.card,.doc-card,.pac-card,.phase3-card,.phase56-card,.phase789-card,.profile-card,.qf276-card,.qf-platform-card,.qf-system-card){border-radius:16px}body.qf221-ready .section.qf-premium-module :is(.actions,.top-actions,.qf276-actions){flex-wrap:wrap;gap:8px}body.qf221-ready .section.qf-premium-module :is(button,.btn,[role="button"]){max-width:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto;animation-duration:.01ms;animation-iteration-count:1;transition-duration:.01ms}}

/* Editor estrutural: o documento é uma planilha, não um conjunto de controles V5. */
body.qf221-ready .qf-sheet-admin .qf-structure-document{background:#fff;color:#111;}
body.qf221-ready .qf-sheet-admin table.qf-structure-head,
body.qf221-ready .qf-sheet-admin table.qf-structure-table{width:100%;border-collapse:collapse;border-spacing:0;table-layout:fixed;background:#fff;color:#111;}
body.qf221-ready .qf-sheet-admin table.qf-structure-head td,
body.qf221-ready .qf-sheet-admin table.qf-structure-table td{width:auto;min-height:0;margin:0;border:1px solid #535353;border-radius:0;background:#fff;color:#111;box-shadow:none;text-align:left;vertical-align:middle;}
body.qf221-ready .qf-sheet-admin table.qf-structure-head td{padding:4px 6px;}
body.qf221-ready .qf-sheet-admin table.qf-structure-table td{padding:3px 5px;}
body.qf221-ready .qf-sheet-admin .qf-structure-paragraph{width:auto;min-width:0;min-height:0;margin:0 0 3px;padding:1px 2px;border:0;border-radius:0;background:#fff;color:#111;box-shadow:none;}
body.qf221-ready .qf-sheet-admin .qf-structure-document [contenteditable="true"]{min-height:0;border-radius:0;background:#fff;color:#111;box-shadow:none;}
body.qf221-ready .qf-sheet-admin .qf-structure-document span[contenteditable="true"]{display:inline;width:auto;min-width:1.5em;padding:0 2px;border:0;}
body.qf221-ready .qf-sheet-admin .qf-structure-document td[contenteditable="true"]{display:table-cell;width:auto;padding:3px 5px;border:1px solid #535353;}
body.qf221-ready .qf-sheet-admin .qf-structure-document p[contenteditable="true"]{width:auto;padding:1px 2px;border:0;}
body.qf221-ready .qf-sheet-admin .qf-structure-document [contenteditable="true"]:hover{background:#f4f9ff;border-radius:0;box-shadow:inset 0 0 0 1px #70a7dd;}
body.qf221-ready .qf-sheet-admin .qf-structure-document [contenteditable="true"]:focus{background:#eef6ff;border-radius:0;outline:2px solid #1769aa;outline-offset:-2px;box-shadow:none;}
body.qf221-ready .qf-sheet-admin .qf-structure-document [contenteditable="true"].changed{background:#fff7e8;outline:2px solid #b66a00;outline-offset:-2px;}

/* =====================================================================
   STAGE 49 — LOGIN HOLD-TO-REVEAL + BIBLIOTECA LEGAL MOBILE ROOT FIX
   O olho da senha só revela enquanto existe pressão ativa. A biblioteca
   legal móvel volta ao fluxo normal do documento, sem cabeçalho/strip
   concorrendo pelo mesmo espaço e sem controles escapando do viewport.
   ===================================================================== */
.qf-login-password-control{position:relative;}
.qf-login-password-control>.qf-login-leading-icon{left:15px;right:auto;width:19px;height:19px;pointer-events:none;}
.qf-login-password-control>#qfLoginPass{min-width:0;padding-left:0;padding-right:52px;font-size:16px;line-height:1.25;}
.qf-login-password-reveal{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--qf-ui-text-3);display:grid;place-items:center;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;z-index:4;cursor:pointer;}
.qf-login-password-reveal svg{position:static;inset:auto;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;}
.qf-login-password-reveal:is(:hover,:focus-visible,.is-revealing){color:var(--qf-ui-brand-text);background:var(--qf-ui-brand-soft);}
.qf-login-password-reveal.is-revealing{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--qf-ui-brand) 42%,transparent);}

/* O modal legal possui uma única autoridade de layout. */
#qfLegislationModal.qf-legal-modal{overflow:hidden;}
#qfLegislationModal .qf-legal-dialog{min-width:0;}
#qfLegislationModal .qf-legal-head>*{min-width:0;}
#qfLegislationModal .qf-legal-head h2,#qfLegislationModal .qf-legal-head p,#qf276LegislationStrip :is(strong,p){overflow-wrap:anywhere;word-break:normal;}
#qf276LegislationStrip{margin:0;padding:14px 22px;border-bottom:1px solid var(--qf-ui-border-soft);background:var(--qf-ui-surface-soft);min-width:0;}
#qf276LegislationStrip>div{min-width:0;}
#qf276LegislationStrip p{margin:4px 0 0;line-height:1.45;}
#qfLegislationModal .qf-legal-scope-card,#qfLegislationModal .qf-law-card{min-width:0;overflow-wrap:anywhere;}
#qfLegislationModal .qf-legal-body{min-width:0;min-height:0;}

@media(max-width:700px){
  #qfLegislationModal.qf-legal-modal.show,#qfLegislationModal.qf-legal-modal.qf-dialog-viewport-safe.show{display:flex;align-items:stretch;justify-content:stretch;padding:0;overflow:hidden;}
  #qfLegislationModal .qf-legal-dialog,#qfLegislationModal .qf-legal-dialog.qf-dialog-panel-safe{display:block;width:100vw;max-width:100vw;height:var(--qf-visual-viewport-height,100dvh);max-height:var(--qf-visual-viewport-height,100dvh);margin:0;padding:0 0 max(16px,env(safe-area-inset-bottom,0px));border-radius:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
  #qfLegislationModal .qf-legal-head{position:relative;top:auto;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:12px;align-items:start;padding:max(16px,env(safe-area-inset-top,0px)) 16px 14px;background:var(--qf-ui-surface);}
  #qfLegislationModal .qf-legal-head h2{margin:0 0 6px;font-size:clamp(24px,7vw,31px);line-height:1.12;}
  #qfLegislationModal .qf-legal-head p{margin:0;font-size:15px;line-height:1.45;}
  #qfLegislationClose{position:relative;inset:auto;width:44px;min-width:44px;height:44px;padding:0;border-radius:12px;align-self:start;}
  #qfLegislationClose span:last-child{display:none;}
  #qf276LegislationStrip{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin:0;padding:14px 16px;position:relative;inset:auto;z-index:0;}
  #qf276LegislationStrip .qf276-btn{width:100%;min-height:46px;}
  #qfLegislationModal .qf-legal-scope-strip{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:12px 16px;}
  #qfLegislationModal .qf-legal-scope-card{padding:14px;}
  #qfLegislationModal .qf-legal-scope-card strong{font-size:16px;line-height:1.25;}
  #qfLegislationModal .qf-legal-scope-card span{font-size:14px;line-height:1.45;}
  #qfLegislationModal .qf-legal-tools{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:14px 16px;align-items:stretch;}
  #qfLegislationModal .qf-legal-tools>div{min-width:0;}
  #qfLegislationModal .qf-legal-tools :is(input,select){width:100%;min-width:0;height:46px;font-size:16px;}
  #qfLegislationModal .qf-legal-count{grid-column:auto;width:100%;height:auto;min-height:42px;white-space:normal;padding:10px 12px;}
  #qfLegislationModal .qf-legal-body{padding:12px 16px 18px;overflow:visible;}
  #qfLegislationModal .qf-legal-grid,#qfLegislationModal .legal-library-grid.qf-v257-library{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;}
  #qfLegislationModal .qf-law-card-head{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;}
  #qfLegislationModal .qf-law-status{justify-self:start;white-space:normal;}
  #qfLegislationModal .qf-law-actions{display:grid;grid-template-columns:minmax(0,1fr);width:100%;}
  #qfLegislationModal .qf-law-actions>*{width:100%;max-width:100%;min-height:44px;justify-content:center;}
  #qfLegislationModal .qf-legal-foot{padding:14px 16px max(18px,env(safe-area-inset-bottom,0px));line-height:1.45;}

  /* Central Biblioteca Legal: mesma regra de uma coluna e zero overflow. */
  #bibliotecaLegal{min-width:0;overflow-x:hidden;}
  #bibliotecaLegal :where(.qf276-legal-hero,.qf276-legal-hero-row,.qf276-card,.qf276-card-head,.qf276-change,.qf276-library-item,.qf276-source,.qf276-toolbar,.qf276-meta-row,.qf276-actions){min-width:0;max-width:100%;}
  #bibliotecaLegal .qf276-legal-hero-row,#bibliotecaLegal .qf276-card-head{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;}
  #bibliotecaLegal .qf276-legal-metrics,#bibliotecaLegal .qf276-grid,#bibliotecaLegal .qf276-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;}
  #bibliotecaLegal .qf276-toolbar :is(input,select){width:100%;min-width:0;font-size:16px;}
  #bibliotecaLegal .qf276-actions{display:grid;grid-template-columns:minmax(0,1fr);width:100%;}
  #bibliotecaLegal .qf276-actions>.qf276-btn{width:100%;}
  #bibliotecaLegal :where(h2,h3,h4,p,strong,span,small){max-width:100%;overflow-wrap:anywhere;word-break:normal;}
  #bibliotecaLegal .qf276-tag{white-space:normal;max-width:100%;}
}

/* Stage 50 — acesso temporário seguro */
.qf-temporary-access-modal{width:min(760px,calc(100vw - 28px));max-height:min(88dvh,900px);overflow:hidden;display:flex;flex-direction:column}
.qf-temporary-access-body{overflow:auto;overscroll-behavior:contain;padding-bottom:max(24px,env(safe-area-inset-bottom))}
.qf-temporary-access-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.58fr);gap:16px;align-items:end}
.qf-temporary-access-grid .field.full{grid-column:1/-1}
.qf-temporary-hours{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}
.qf-temporary-hours span{font-weight:800;opacity:.72}
.qf-temporary-role-chip{min-height:46px;display:flex;align-items:center;padding:0 14px;border:1px solid var(--border,#31475b);border-radius:14px;font-weight:800;background:color-mix(in srgb,var(--surface,#102537) 92%,transparent)}
.qf-temporary-security-note{margin-top:16px;line-height:1.5}
.qf-temporary-access-actions{display:flex;justify-content:flex-end;margin-top:14px}
.qf-temporary-result{margin-top:18px;padding:16px;border:1px solid var(--border,#31475b);border-radius:18px;background:color-mix(in srgb,var(--surface,#102537) 94%,transparent)}
.qf-temporary-result>label{display:block;font-weight:850;margin-bottom:8px}
.qf-temporary-link-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.qf-temporary-link-row input{min-width:0;width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.88rem}
.qf-temporary-result p{margin:10px 0 0;opacity:.78}
.qf-temporary-credentials{display:grid;gap:8px;margin-top:14px}.qf-temporary-credentials label{font-weight:850;margin-top:4px}.qf-temporary-credentials input{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.qf-temporary-once-warning{margin-top:12px;padding:11px 12px;border-radius:12px;background:color-mix(in srgb,var(--accent,#33c7b3) 10%,transparent);font-size:.9rem;line-height:1.42}
.qf-temporary-list-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:24px;padding-top:18px;border-top:1px solid var(--border,#31475b)}
.qf-temporary-list-head h4{margin:0;font-size:1rem}.qf-temporary-list-head p{margin:4px 0 0;opacity:.7;font-size:.88rem}
.qf-temporary-access-list{display:grid;gap:10px;margin-top:12px}
.qf-temporary-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:13px 14px;border:1px solid var(--border,#31475b);border-radius:15px;background:color-mix(in srgb,var(--surface,#102537) 96%,transparent)}
.qf-temporary-item-main{min-width:0}.qf-temporary-item-main strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qf-temporary-item-main small{display:block;margin-top:5px;opacity:.72;line-height:1.35}
.qf-temporary-state{display:inline-flex;align-items:center;width:max-content;margin-top:7px;padding:4px 8px;border-radius:999px;font-size:.76rem;font-weight:850;background:color-mix(in srgb,var(--accent,#33c7b3) 12%,transparent)}
.qf-temporary-state.is-ended{background:color-mix(in srgb,#ef6a6a 12%,transparent)}
.qf-temporary-item button[disabled]{opacity:.55;cursor:not-allowed}
@media(max-width:640px){
 .qf-temporary-access-modal{width:calc(100vw - 16px);max-height:calc(100dvh - 18px);border-radius:20px}
 .qf-temporary-access-grid{grid-template-columns:1fr;gap:12px}.qf-temporary-access-grid .field.full{grid-column:auto}
 .qf-temporary-link-row{grid-template-columns:1fr}.qf-temporary-link-row .btn{width:100%}
 .qf-temporary-access-actions .btn{width:100%}
 .qf-temporary-item{grid-template-columns:1fr}.qf-temporary-item>.btn{width:100%}
 .qf-temporary-list-head{align-items:flex-start}
}

/* Stage 5 — Produção */
#producao .qf5-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:16px 0}
#producao .qf5-kpis article{padding:16px;border:1px solid var(--border);border-radius:16px;background:var(--surface,#fff);display:grid;gap:6px}
#producao .qf5-kpis span,.qf5-order-grid span{font-size:12px;color:var(--muted)}
#producao .qf5-kpis strong{font-size:24px}
.qf5-banner{padding:13px 15px;border:1px solid var(--border);border-radius:14px;margin:12px 0;background:var(--surface,#fff)}
.qf5-banner.warning{border-color:#d79b26}.qf5-banner.danger{border-color:#b84c4c}
.qf5-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.qf5-form label,.qf5-material label{display:grid;gap:6px}.qf5-form .full{grid-column:1/-1}
.qf5-materials{display:grid;gap:10px;margin:16px 0}.qf5-materials>h3{margin:0}.qf5-material{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,200px);gap:14px;align-items:center;padding:13px;border:1px solid var(--border);border-radius:14px}.qf5-material p,.qf5-material small{margin:3px 0;color:var(--muted)}
.qf5-sign{display:grid;gap:8px;margin:14px 0}.qf5-sign canvas{display:block;width:100%;max-width:620px;height:150px;border:1px dashed var(--border);border-radius:12px;background:#fff;touch-action:none}.qf5-sign .mini-btn{justify-self:start}
.qf5-orders{display:grid;gap:14px}.qf5-order{border:1px solid var(--border);border-radius:16px;padding:15px;background:var(--surface,#fff)}.qf5-order-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.qf5-order-head h3,.qf5-order-head p{margin:0 0 5px}.qf5-state{padding:6px 10px;border-radius:999px;border:1px solid var(--border);white-space:nowrap}.qf5-order-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.qf5-order-grid>div{display:grid;gap:4px;padding:10px;border-radius:12px;background:var(--surface-soft,rgba(127,127,127,.06))}.qf5-order-grid small{color:var(--muted);overflow-wrap:anywhere}.qf5-actions{display:flex;flex-wrap:wrap;gap:8px}
.qf5-modal{z-index:var(--qf-z-modal-nested)}.qf5-modal-card{width:min(820px,calc(100vw - 24px));max-height:min(90vh,900px);overflow:auto}.qf5-modal-body{padding:16px}.qf5-sub-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.qf5-sub-row{display:grid;grid-template-columns:1.3fr 1fr .7fr;gap:8px;margin:8px 0}
@media(max-width:900px){#producao .qf5-kpis,.qf5-order-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.qf5-form{grid-template-columns:1fr}.qf5-form .full{grid-column:auto}}
@media(max-width:600px){#producao .qf5-kpis,.qf5-order-grid{grid-template-columns:1fr}.qf5-material{grid-template-columns:1fr}.qf5-sub-row{grid-template-columns:1fr}.qf5-order-head{display:grid}.qf5-actions .btn{width:100%}.qf5-sign canvas{height:130px}}

/* Produção: bloco de consumo real. */
.qf6-actual-block,.qf6-driver-block{margin:0 0 16px;padding:14px;border:1px solid var(--line,#dfe5ec);border-radius:16px;background:var(--soft,#f8fafc)}.qf6-actual-block h3,.qf6-driver-block h3{margin:0 0 4px}.qf6-actual-block p{margin:0 0 12px;color:var(--muted,#64748b)}

/* Program Stage 9 — Mobile, Responsividade, Performance e Resiliência Operacional */
/* Ocultação acessível: seletor final e mais específico que as regras globais de formulário. */
body input.qf-sr-only,body .qf-sr-only,body .qf-visually-hidden{
  position:absolute;inline-size:1px;block-size:1px;width:1px;height:1px;
  min-inline-size:1px;min-block-size:1px;max-inline-size:1px;max-block-size:1px;
  padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);
  white-space:nowrap;border:0;
}
/* Alvos críticos de fechamento acionáveis por toque, sem inflar a grade fiscal. */
@media(hover:none),(pointer:coarse){
  body.qf221-ready :is(.modal,.nc-modal,.signpad-modal,#signatureModal,.qf-sec-modal,#moduleGuideModal) :is(.close,[data-close],[data-modal-close],[data-print-close],[data-s5-close],[data-qf-sec-close],#closeModuleGuideBtn){
    min-inline-size:44px;min-block-size:44px;
  }
  body.qf221-ready #qfSecurityModal .qf-sec-modal-close{inline-size:44px;block-size:44px;}
  body.qf221-ready #moduleGuideModal #closeModuleGuideBtn{min-inline-size:72px;min-block-size:44px;}
}
/* A assinatura usa a altura visual real e não pode escapar da viewport em telefones estreitos. */
@media(max-width:680px){
  body.qf221-ready #signatureModal.qf-dialog-viewport-safe{padding:0;align-items:flex-end;}
  body.qf221-ready #signatureModal .signpad-panel.qf-dialog-panel-safe{
    inline-size:100%;max-inline-size:none;block-size:auto;
    max-block-size:var(--qf-visual-viewport-height,100dvh);margin:0;
    border-radius:20px 20px 0 0;overflow:auto;overscroll-behavior:contain;
    padding-bottom:env(safe-area-inset-bottom,0px);
  }
}

/* Stage 63 — NC scroll/camera + Produção UX regression root fix */
body.qf221-ready #ncModal.show{align-items:center;justify-content:center;padding:clamp(8px,2vw,18px)}
body.qf221-ready #ncModal.show .nc-panel.qf-dialog-panel-safe,
body.qf221-ready #ncModal.show .nc-panel{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(720px,100%);height:auto;max-height:min(92dvh,920px);overflow:hidden!important;overscroll-behavior:none}
body.qf221-ready #ncModal.show .nc-head,body.qf221-ready #ncModal.show .nc-actions{position:relative!important;inset:auto!important;top:auto!important;bottom:auto!important;z-index:2}
body.qf221-ready #ncModal.show .nc-body{min-height:0;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;padding-bottom:18px}
body.qf221-ready #ncModal .nc-evidence-block{order:-10;margin:0 0 4px;border-color:color-mix(in srgb,var(--accent,#0f9fb7) 36%,var(--qf-ui-border));background:color-mix(in srgb,var(--accent,#0f9fb7) 6%,var(--qf-ui-surface));box-shadow:0 8px 26px rgba(15,23,42,.05)}
body.qf221-ready #ncModal .nc-evidence-head h3{font-size:1rem}
body.qf221-ready #ncModal .nc-evidence-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.qf221-ready #ncModal .nc-evidence-actions .btn{min-height:44px}
@media(max-width:820px){
 body.qf221-ready #ncModal.show{padding:0;align-items:flex-end}
 body.qf221-ready #ncModal.show .nc-panel.qf-dialog-panel-safe,body.qf221-ready #ncModal.show .nc-panel{width:100%;max-width:none;height:var(--qf-visual-viewport-height,100dvh);max-height:var(--qf-visual-viewport-height,100dvh);border-radius:20px 20px 0 0}
 body.qf221-ready #ncModal.show .nc-body{padding:12px 14px 20px}
 body.qf221-ready #ncModal .nc-evidence-actions{grid-template-columns:1fr}
 body.qf221-ready #ncModal .nc-actions{padding-bottom:max(12px,env(safe-area-inset-bottom,0px))}
}

#producao.qf-premium-module{max-width:1480px;margin-inline:auto}
#producao .qf5-topbar{padding-bottom:14px;border-bottom:1px solid var(--border,var(--qf-ui-border));margin-bottom:4px}
#producao .qf5-topbar p{max-width:760px}
#producao .qf5-orders-panel{margin-top:16px}
.qf5-empty-orders,.qf6-empty{display:grid;gap:5px;justify-items:start;padding:28px;border:1px dashed var(--border,var(--qf-ui-border));border-radius:16px;background:var(--surface-soft,rgba(127,127,127,.04))}
.qf5-empty-orders span,.qf6-empty span{color:var(--muted,var(--qf-ui-text-3))}
.qf5-modal-card,.qf6-modal-card{display:grid;grid-template-rows:auto minmax(0,1fr);width:min(760px,calc(100vw - 24px));max-height:min(92dvh,900px);overflow:hidden!important}
.qf5-modal-body,.qf6-modal-body{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:18px}
.qf5-create-form,.qf6-modal-body form{display:grid;gap:16px}
.qf5-create-intro{display:grid;gap:4px;padding:13px 14px;border-radius:14px;background:var(--surface-soft,rgba(127,127,127,.06));border:1px solid var(--border,var(--qf-ui-border))}
.qf5-create-intro span,.qf5-materials-head span{font-size:.86rem;color:var(--muted,var(--qf-ui-text-3))}
.qf5-materials-head{display:grid;gap:3px}.qf5-materials-head h3{margin:0}
.qf5-select-first{text-align:center;padding:22px}
.qf5-modal-actions,.qf6-modal-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:4px}
.qf-advanced{border:1px solid var(--border,var(--qf-ui-border));border-radius:14px;background:var(--surface-soft,rgba(127,127,127,.04));overflow:hidden}
.qf-advanced>summary{cursor:pointer;padding:13px 14px;font-weight:750;list-style-position:inside}
.qf-advanced>p{margin:0;padding:0 14px 10px;color:var(--muted,var(--qf-ui-text-3));font-size:.88rem}
.qf-advanced>.qf5-form,.qf-advanced>.qf6-form{padding:0 14px 14px}
.qf6-modal{z-index:var(--qf-z-modal-nested)}
.qf6-form-simple{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:700px){
 #producao .top-actions{width:100%}
 #producao .top-actions .btn{flex:1 1 100%}
 .qf5-modal,.qf6-modal{padding:0;align-items:flex-end}
 .qf5-modal-card,.qf6-modal-card{width:100vw;max-width:100vw;height:var(--qf-visual-viewport-height,100dvh);max-height:var(--qf-visual-viewport-height,100dvh);border-radius:20px 20px 0 0}
 .qf5-modal-body,.qf6-modal-body{padding:14px 14px max(18px,env(safe-area-inset-bottom,0px))}
 .qf5-modal-actions,.qf6-modal-actions{display:grid;grid-template-columns:1fr}
 .qf6-form-simple{grid-template-columns:1fr}
}

/* Stage 64 — confirmação recente de identidade para evidências sem perder a NC em andamento. */
.qf-evidence-reauth-layer{position:fixed;inset:0;z-index:calc(var(--qf-z-critical,100) + 5);display:grid;place-items:center;padding:18px;background:rgba(4,12,22,.62);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.qf-evidence-reauth-card{width:min(460px,100%);max-height:min(680px,calc(100dvh - 36px));overflow:auto;border:1px solid color-mix(in srgb,var(--qf-line,#d9e1e8) 78%,transparent);border-radius:22px;padding:22px;background:var(--qf-surface,#fff);color:var(--qf-text,#162235);box-shadow:0 26px 80px rgba(0,0,0,.28)}
.qf-evidence-reauth-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;margin-bottom:14px;background:color-mix(in srgb,var(--qf-brand,#0d838c) 14%,transparent);color:var(--qf-brand,#0d838c);font-weight:900;font-size:1.05rem}
.qf-evidence-reauth-copy>span{display:block;margin-bottom:5px;color:var(--qf-brand,#0d838c);font-size:.72rem;font-weight:850;letter-spacing:.045em;text-transform:uppercase}
.qf-evidence-reauth-copy h3{margin:0;font-size:1.1rem;line-height:1.25;color:var(--qf-text-strong,#0d1726)}
.qf-evidence-reauth-copy p{margin:8px 0 18px;color:var(--qf-muted,#6d7b8f);font-size:.86rem;line-height:1.5}
.qf-evidence-reauth-field{display:grid;gap:7px;margin-top:12px;font-size:.8rem;font-weight:750}
.qf-evidence-reauth-field[hidden]{display:none!important}
.qf-evidence-reauth-field input{width:100%;min-height:44px;border:1px solid var(--qf-line,#d9e1e8);border-radius:12px;padding:10px 12px;background:color-mix(in srgb,var(--qf-surface,#fff) 96%,var(--qf-canvas,#edf2f6));color:inherit;outline:none}
.qf-evidence-reauth-field input:focus{border-color:var(--qf-brand,#0d838c);box-shadow:0 0 0 3px color-mix(in srgb,var(--qf-brand,#0d838c) 16%,transparent)}
.qf-evidence-reauth-message{min-height:22px;margin-top:10px;color:#b33a3a;font-size:.78rem;line-height:1.4}
.qf-evidence-reauth-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:10px}
.qf-evidence-reauth-actions .btn{min-height:42px}
@media(max-width:560px){.qf-evidence-reauth-layer{align-items:end;padding:10px}.qf-evidence-reauth-card{width:100%;max-height:min(78dvh,680px);border-radius:20px;padding:18px}.qf-evidence-reauth-actions{display:grid;grid-template-columns:1fr 1fr}.qf-evidence-reauth-actions .btn{width:100%;white-space:normal}}

/* Stage 65 — estabilidade de persistência + cadastro de produto simplificado. */
.qf-product-advanced{border:1px solid var(--border,var(--qf-ui-border));border-radius:14px;background:var(--surface-soft,rgba(127,127,127,.04));overflow:hidden}
.qf-product-advanced>summary{cursor:pointer;padding:13px 14px;font-weight:760;list-style-position:inside;color:var(--text,var(--qf-ui-text-1))}
.qf-product-advanced-grid{margin:0!important;padding:2px 14px 14px!important}
[data-qf-persistence="saving"]{outline:1px solid color-mix(in srgb,var(--accent,#0f9fb7) 38%,transparent);outline-offset:1px}
[data-qf-persistence="pending"]{outline:1px dashed color-mix(in srgb,var(--accent,#0f9fb7) 44%,transparent);outline-offset:1px}
[data-qf-persistence="error"]{outline:1px solid color-mix(in srgb,#b33a3a 58%,transparent);outline-offset:1px}
[data-qf-persistence="saved"]{outline:none}
@media(max-width:700px){.qf-product-advanced-grid{padding:2px 10px 12px!important}.qf-product-advanced>summary{min-height:44px;display:flex;align-items:center}}

/* Stage 68 — apontamento de produção em etapas */
.qf68-pointing-modal .qf68-card{width:min(980px,96vw);max-height:min(92vh,920px);display:flex;flex-direction:column;overflow:hidden}
.qf68-pointing-modal .qf5-modal-body{overflow:auto;padding-top:0}
.qf68-progress{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:14px 22px;border-bottom:1px solid var(--border,#dbe6f0);background:var(--surface-soft,rgba(127,145,165,.06))}
.qf68-progress>div{display:flex;align-items:center;gap:8px;min-width:0;opacity:.56}.qf68-progress b{display:grid;place-items:center;width:26px;height:26px;border-radius:999px;border:1px solid currentColor;flex:0 0 auto}.qf68-progress span{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.qf68-progress>div.active,.qf68-progress>div.done{opacity:1}.qf68-progress>div.active b{background:var(--accent,#0aa6b5);color:#fff;border-color:transparent}.qf68-progress>div.done b{background:rgba(10,166,181,.14);border-color:rgba(10,166,181,.45)}
.qf68-form{display:block}.qf68-form section{padding:22px 4px 6px}.qf68-step-head{margin-bottom:18px}.qf68-step-head>span{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--accent,#0aa6b5)}.qf68-step-head h3{font-size:24px;margin:4px 0 5px}.qf68-step-head p{margin:0;color:var(--muted,#67788e)}
.qf68-inputs{display:grid;gap:10px}.qf68-input-row{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:6px 16px;align-items:center;padding:14px;border:1px solid var(--border,#dbe6f0);border-radius:14px}.qf68-input-row>span{font-weight:700}.qf68-input-row>small{grid-column:1/2;color:var(--muted,#67788e)}.qf68-input-row>input{grid-column:2;grid-row:1/3}
.qf68-subs{display:grid;gap:10px;margin-top:12px}.qf68-subs .qf5-sub-row{display:grid;grid-template-columns:minmax(180px,1.4fr) minmax(140px,1fr) 140px;gap:10px}.qf68-hint,.qf68-disclaimer{color:var(--muted,#67788e);font-size:13px;margin-top:12px}
.qf68-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.qf68-metrics article{border:1px solid var(--border,#dbe6f0);border-radius:16px;padding:15px;background:var(--surface,#fff);display:flex;flex-direction:column;gap:5px}.qf68-metrics article>span{font-size:12px;color:var(--muted,#67788e)}.qf68-metrics article>strong{font-size:22px}.qf68-metrics article>small{color:var(--muted,#67788e)}.qf68-loss{border-color:rgba(220,80,80,.35)!important}.qf68-warning{margin-top:12px;padding:12px 14px;border-radius:12px;background:rgba(210,60,60,.12);color:#b33;font-weight:700}
.qf68-breakdowns{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}.qf68-breakdowns>div{border:1px solid var(--border,#dbe6f0);border-radius:14px;padding:14px}.qf68-breakdowns h4{margin:0 0 10px}.qf68-breakdowns [data-s68-input-breakdown]>div,.qf68-breakdowns [data-s68-sub-breakdown]>div{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:8px 0;border-top:1px dashed var(--border,#dbe6f0)}.qf68-breakdowns small{grid-column:1/3;color:var(--muted,#67788e)}
.qf68-next-flow{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;margin:18px 0 24px}.qf68-next-flow>div{display:flex;align-items:center;gap:8px;padding:12px 14px;border:1px solid var(--border,#dbe6f0);border-radius:14px}.qf68-next-flow b{display:grid;place-items:center;width:24px;height:24px;border-radius:999px;background:rgba(10,166,181,.14)}.qf68-next-flow i{font-style:normal;opacity:.5}.qf68-footer{position:sticky;bottom:-1px;display:flex;gap:10px;align-items:center;padding:14px 0 4px;background:var(--surface,#fff);border-top:1px solid var(--border,#dbe6f0);margin-top:18px}.qf68-footer-spacer{flex:1}
@media(max-width:760px){.qf68-progress{grid-template-columns:repeat(5,1fr);padding:10px}.qf68-progress span{display:none}.qf68-progress>div{justify-content:center}.qf68-metrics,.qf68-breakdowns{grid-template-columns:1fr 1fr}.qf68-input-row{grid-template-columns:1fr}.qf68-input-row>input,.qf68-input-row>small{grid-column:1;grid-row:auto}.qf68-subs .qf5-sub-row{grid-template-columns:1fr}.qf68-footer{flex-wrap:wrap}.qf68-footer-spacer{display:none}.qf68-footer .btn{flex:1 1 46%}}
@media(max-width:480px){.qf68-metrics,.qf68-breakdowns{grid-template-columns:1fr}.qf68-step-head h3{font-size:21px}}

@media(max-width:700px){.qf-login-password-control{min-height:50px}.qf-login-password-control>#qfLoginPass{width:100%;min-width:0;font-size:16px!important}.qf-login-password-reveal{right:3px}.qf-login-password-control>.qf-login-leading-icon{position:static!important;flex:0 0 19px!important;transform:none!important;margin:0!important}.qf-product-advanced,.qf-product-advanced *{max-width:100%;box-sizing:border-box}}
.qf6-actual-block,.qf6-driver-block{background:var(--qf-ui-surface-soft,#f8fafc)}

/* Planilhas — escolha enviada e ainda não confirmada pelo servidor.
   A marcação aparece no mesmo quadro do clique; este estado só sinaliza que a confirmação
   está em andamento (e impede um segundo clique na mesma célula até lá). */
#sheetHost .qf-choice-pending{cursor:progress;position:relative}
#sheetHost .qf-choice-pending.on{box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--qf-ui-brand) 55%,transparent)}

/* Stage 95 — acabamento.
   O acento de módulo era desenhado 1px abaixo da borda do cartão de título (por três regras
   diferentes) e atravessava o canto arredondado. O cartão de título já carrega o destaque do
   módulo; nos cabeçalhos de painel o acento fica dentro da área do próprio cabeçalho. */
body.qf221-ready .section.qf-premium-module>.topbar::after,
body.qf221-ready .section.active>.topbar::after{content:none;display:none}
body.qf221-ready .section.qf-premium-module .panel-head::after{bottom:0}
/* Stage 95 — aviso institucional (.govnote) tinha só cor de fundo, sem recuo: texto colado na borda. */
.govnote{display:block;padding:9px 12px;border:1px solid var(--qf-ui-border,rgba(127,154,178,.28));border-radius:10px;font-size:.8125rem;line-height:1.45;overflow-wrap:anywhere}
.govnote:empty{display:none}
.govnote>b:first-child{margin-right:4px}
/* Stage 95 — C/NC na tabela: "NC" nunca quebra em duas linhas; NC aprovada sem registro fica destacada. */
#sheetHost .miniopt{white-space:nowrap}
#sheetHost .miniopt.qf-nc-needs-evidence{box-shadow:0 0 0 2px #fff,0 0 0 4px #c2413a;cursor:pointer}
#sheetHost .qf-nc-needs-evidence-note{color:#b42318;font-weight:700}
/* Stage 95 — data do cabeçalho da planilha diária quebra só na barra ("01/09/" + "2026"), nunca no meio do ano. */
#sheetHost table.daily-table td.auto{overflow-wrap:normal;word-break:normal}
/* Stage 95 — envio em andamento nos pop-ups de correção/decisão e destaque das opções de foto. */
.qf-gov-modal.qf-gov-busy [aria-busy="true"]{cursor:progress;opacity:.85}
.qf-gov-modal.qf-gov-busy [data-close]{pointer-events:none;opacity:.5}
#ncModal .qf-nc-tools-attention{outline:3px solid var(--accent,#0f9fb7);outline-offset:4px;border-radius:12px}
#qfNcMorePhotosModal .qf-nc-more-panel{max-width:520px}
/* Stage 95 — célula retificada (tela e impressão). */
.qf-rect-mark{display:inline-block;margin-left:3px;padding:0 4px;border-radius:6px;background:#b45309;color:#fff;font-size:.62em;font-weight:800;line-height:1.35;vertical-align:super;cursor:help}
.qf-rect-note{color:#b45309;font-weight:700}
.qf-gov-print-legend{margin:4px 0 8px;font-size:.85em}
@media print{.qf-rect-mark{background:none!important;color:#000!important;border:1px solid #000;-webkit-print-color-adjust:exact;print-color-adjust:exact}}
/* Stage 95 — resposta imediata ao clique.
   Medido em Chromium: o desfoque de fundo (backdrop-filter) atrás das janelas obrigava o navegador a
   recalcular o desfoque da tela inteira a cada atualização — abrir planilha 296 ms → 112 ms, trocar de
   aba ~250 ms → ~100 ms, clicar C 152 ms → 72 ms sem ele. As camadas de fundo ficam mais opacas para
   manter a separação visual. Transições de 160–260 ms nos controles atrasavam o retorno visual do
   clique; controles passam a responder em até 60 ms e a troca de seção não tem mais animação. */
*,*::before,*::after{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
:where(button,a,input,select,textarea,label,summary,[role="button"],.btn,.miniopt,.qf221-item,.qf221-groupHead,.qf-gov-btn,.capture-btn){transition-duration:.06s!important}
body.qf221-ready .section.active{animation:none!important}

/* Stage 96 — recebimentos do período (EC10A/EC10B): cada carga é um registro próprio. */
.qf-receipt-bar{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;margin:10px 0 4px;padding:10px 12px;border:1px solid var(--qf-ui-border,rgba(127,154,178,.28));border-radius:12px;background:color-mix(in srgb,var(--accent,#0f9fb7) 5%,transparent)}
.qf-receipt-label{align-self:center;margin-right:4px;font-size:.78rem;font-weight:800;letter-spacing:.02em;text-transform:uppercase;opacity:.75}
.qf-receipt-bar .qf-receipt-tab{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-height:44px;padding:6px 12px;line-height:1.15}
.qf-receipt-bar .qf-receipt-tab small{font-size:.72rem;font-weight:600;opacity:.8}
.qf-receipt-bar .qf-receipt-tab.active{border-color:var(--accent,#0f9fb7);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent,#0f9fb7) 35%,transparent);background:color-mix(in srgb,var(--accent,#0f9fb7) 12%,transparent)}
.qf-receipt-bar .qf-receipt-new{align-self:center;font-weight:800}
@media print{.qf-receipt-bar{display:none!important}}

/* Stage 96: diálogo de estrutura da planilha — cabeçalho e rodapé fixos, corpo rolável; "Assinar e publicar" sempre visível. */
body .qf-sheet-admin-modal>section{display:flex!important;flex-direction:column;max-height:calc(100dvh - 32px)!important;overflow:hidden}
body .qf-sheet-admin-modal>section>header,body .qf-sheet-admin-modal>section>footer{flex:0 0 auto}
body .qf-sheet-admin-modal .qf-sheet-admin-modal-body{flex:1 1 auto;min-height:0;overflow-y:auto!important;overscroll-behavior:contain}
body .qf-sheet-admin-modal .qf-sheet-signature canvas{height:150px;min-height:150px;border:1px dashed var(--qf-ui-border,#c9d3df);border-radius:12px;background:#fff}
@media (max-width:640px){body .qf-sheet-admin-modal>section{max-height:100dvh!important;border-radius:18px 18px 0 0}}

/* Stage 96: controle de revisão da estrutura — rodapé discreto com miniatura da assinatura da RT. */
body .qf-sheet-structure-governance{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin:12px 0 4px;padding:6px 2px 0;border:0;border-top:1px dashed var(--qf-ui-border-soft,#d5dde6);border-radius:0;font-size:11.5px;line-height:1.35;color:var(--qf-ui-text-3,#64748b);text-align:right}
body .qf-sheet-structure-governance span{display:inline}
body .qf-sheet-structure-governance .qf-structure-signature{width:96px;height:26px;flex:0 0 auto;color:var(--qf-ui-text-2,#334155)}

/* Stage 96: assinatura do colaborador (EC07B/EC07C) — célula com botão Assinar, miniatura + nome depois de assinado. */
body .qf-collab-cell{min-width:190px;vertical-align:middle}
body .qf-collab-sign{display:flex;align-items:center;gap:8px;min-height:40px;padding:2px 4px}
body .qf-collab-sign.signed{flex-direction:column;align-items:flex-start;gap:1px}
body .qf-collab-sign .qf-collab-sign-svg{display:block;width:150px;height:40px;color:var(--qf-ui-text,#0f172a)}
body .qf-collab-sign small{font-size:11px;line-height:1.25;color:var(--qf-ui-text-3,#64748b)}
body .qf-collab-sign .qf-collab-sign-btn{min-height:34px;padding:4px 14px;font-weight:700;border-radius:10px}
body .qf-collab-sign.signed .qf-collab-sign-btn{min-height:26px;padding:2px 10px;font-size:12px;font-weight:600}
body .qf-collab-card .qf-collab-sign{margin-top:6px}
body .qf-collab-panel{width:min(640px,100%);max-height:calc(100dvh - 32px);display:flex;flex-direction:column;overflow:hidden}
body .qf-collab-panel>header,body .qf-collab-panel>footer{flex:0 0 auto}
body .qf-collab-body{flex:1 1 auto;min-height:0;overflow-y:auto;display:grid;gap:12px;padding:14px 18px}
body .qf-collab-name{display:grid;gap:6px;font-weight:600}
body .qf-collab-name input{width:100%;min-height:42px;padding:9px 12px;font-size:16px}
body .qf-collab-pad{display:grid;gap:6px;font-weight:600}
body .qf-collab-pad canvas{display:block;width:100%;height:auto;aspect-ratio:900/234;border:1px dashed var(--qf-ui-border,#c9d3df);border-radius:12px;background:#fff;touch-action:none;cursor:crosshair}
body .qf-collab-error{margin:0;color:#b42318;font-weight:600}
@media print{body .qf-collab-sign .qf-collab-sign-btn{display:none!important}}
body .qf-collab-cell .qf-collab-sign{justify-content:center}
body .qf-collab-cell .qf-collab-sign.signed{align-items:center;text-align:center}

/* Stage 96 — planilhas no celular. O cabeçalho (título, período, situação e ações) ocupava mais da
   metade da tela e ficava parado; só a lista rolava, em ~340 px. Agora o painel inteiro rola, a barra
   do título fica compacta no topo, "Registrar preenchimento" fica fixo no rodapé e o conteúdo usa a
   largura da tela. Vale para o preenchimento no celular, o modo computador e a visualização final. */
@media (max-width:820px){
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal>.panel,
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal>.panel.qf-dialog-panel-safe{display:block!important;height:100dvh!important;max-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;padding:0!important;border-radius:0!important;contain:none!important;transform:none!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scroll-padding-top:64px;scroll-padding-bottom:84px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .modalbar{position:sticky;top:0;z-index:6;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:10px;margin:0;padding:calc(8px + env(safe-area-inset-top,0px)) 12px 8px 14px;border-bottom:1px solid var(--qf-ui-border-soft,var(--qf-ui-border));background:var(--qf-ui-surface-raised);box-shadow:var(--qf-ui-shadow-1,none)}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .modalbar>div{flex:1 1 auto;min-width:0}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal #modalTitle{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:14px;line-height:1.32;letter-spacing:0;overflow-wrap:normal;word-break:normal}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal #modalSub{margin-top:2px;font-size:12px;line-height:1.2}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .modalbar .close{flex:0 0 auto;min-height:40px;min-width:40px;padding:0 12px;font-size:14px;border-radius:12px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .gov{display:block;margin:0;padding:12px 12px 4px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .gov .govline{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .gov .pill{display:inline-flex;align-items:center;width:auto;max-width:100%;margin:0;padding:5px 10px;font-size:12.5px;line-height:1.35;border-radius:10px;overflow-wrap:normal;word-break:normal}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .govbtns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 0}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .govbtns>.btn{min-height:42px;width:100%;padding:4px 6px;font-size:13px;line-height:1.2;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none;text-align:center;justify-content:center}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .govbtns>#registerBtn{position:fixed;left:0;right:0;bottom:0;z-index:7;width:auto;min-height:calc(56px + env(safe-area-inset-bottom,0px));margin:0;padding:0 16px env(safe-area-inset-bottom,0px);border-radius:0;font-size:16px;box-shadow:0 -6px 18px rgba(0,0,0,.18)}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .govbtns>#registerBtn[hidden],body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal:not(.show) .govbtns>#registerBtn{display:none}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .modal-body{display:block!important;overflow:visible!important;max-height:none!important;min-height:0}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .content{overflow:visible!important;padding:8px 10px calc(84px + env(safe-area-inset-bottom,0px))!important}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 10px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .tab{min-height:44px;padding:4px 6px;font-size:13px;line-height:1.2;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none;text-align:center;justify-content:center;border-radius:12px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal #sheetHost>.sheet.qf-sheet-mobile-mode{padding:0;margin:0;border:0;background:transparent;box-shadow:none}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .qf-sheet-mobile-mode>.period{display:none}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .qf-mobile-sheet-head{display:block;margin:0 0 10px;padding:12px 14px;border-radius:14px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .qf-mobile-sheet-head h2{margin:6px 0 4px;font-size:16px;line-height:1.25;overflow-wrap:normal;word-break:normal}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .qf-mobile-sheet-head p{margin:0;font-size:12.5px;line-height:1.35}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .mobile-list{gap:10px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .mobile-list>.toolbarhint{margin:0;padding:10px 12px;font-size:12.5px;line-height:1.4;border-radius:12px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .mobile-section{margin:6px 0 0;padding:10px 12px;font-size:14px;border-radius:12px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .mobile-card{gap:10px;padding:12px;border-radius:14px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .mobile-card .m-card-title-row{min-height:0;margin:0}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .mobile-card .m-card-title-row>b,body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .mobile-card>b{font-size:14.5px;line-height:1.3;overflow-wrap:normal;word-break:normal}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-choice{gap:8px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-choice>button{height:auto;min-height:48px;padding:8px 10px;font-size:14.5px;line-height:1.2;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none;text-align:center;justify-content:center;border-radius:12px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-days{gap:8px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-day{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;padding:6px 0}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-day>b{margin:0;font-size:14px;line-height:1.2}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-day .m-choice{grid-template-columns:repeat(2,minmax(0,1fr))}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-day .m-choice>button{min-height:44px;padding:6px 8px;font-size:14px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-field{gap:5px;margin:0}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-field>span{font-size:13px;line-height:1.3}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-field>:is(input,textarea,select){min-height:46px;font-size:16px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .m-field>textarea{font-family:inherit;line-height:1.4}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .sheet:not(.qf-sheet-mobile-mode){padding:6px;margin:0 0 10px}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .sheet :is(.tablewrap,.qf-responsive-table-wrap){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .sheet:not(.qf-sheet-mobile-mode) :is(.tablewrap,.qf-responsive-table-wrap):not(.official-head-wrap)>table.fit-week{min-width:760px!important}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .gov .pill:empty{display:none}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .govbtns>#registerBtn{opacity:1!important;filter:none!important}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .govbtns>#registerBtn:disabled{background:var(--qf-ui-surface-muted,var(--qf-ui-surface-soft))!important;color:var(--qf-ui-text-3)!important;border-color:var(--qf-ui-border)!important;box-shadow:0 -1px 0 var(--qf-ui-border),0 -6px 18px rgba(0,0,0,.10)}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .mobile-card .m-card-title-row>b{margin:0}
body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .mobile-card>.m-choice,body :is(#planilhas,#qfSheetPortal,#configuracaoPlanilhas) .v28-root #modal .mobile-card .m-field>.m-choice{margin:0}
}

/* Stage 96 / backend r21 — período antigo sendo carregado do servidor ao abrir a planilha. */
#sheetHost>.qf-period-loading{margin:0 0 12px;padding:10px 14px;border:1px solid var(--qf-line,#d9e1e8);border-left:4px solid var(--qf-brand,#0d838c);border-radius:10px;background:var(--qf-surface,#fff);color:var(--qf-text,#162235);font-size:.92rem}
