/* NEXEI v3.5.9 - correcoes isoladas sobre a interface estavel v3.5.2. */

/* Sidebar: nenhum item muda de posicao/tamanho ao passar o mouse. */
@media (min-width:901px){
  html body:not(.page-login) .sidebar.sidebar-v352,
  html body:not(.page-login) .sidebar.sidebar-v352:hover,
  html body:not(.page-login) .sidebar.sidebar-v352:focus-within{
    width:92px!important;min-width:92px!important;max-width:92px!important;
    padding:16px 13px!important;transform:none!important;translate:none!important;transition:none!important;
  }
  html body:not(.page-login) .sidebar-v352 nav a,
  html body:not(.page-login) .sidebar-v352 nav a:hover,
  html body:not(.page-login) .sidebar-v352 nav a:focus,
  html body:not(.page-login) .sidebar-v352 nav a:focus-visible,
  html body:not(.page-login) .sidebar-v352 .brand,
  html body:not(.page-login) .sidebar-v352 .brand:hover,
  html body:not(.page-login) .sidebar-v352 .user-card-v351,
  html body:not(.page-login) .sidebar-v352 .user-card-v351:hover,
  html body:not(.page-login) .sidebar-v352 .sidebar-profile-v351,
  html body:not(.page-login) .sidebar-v352 .sidebar-profile-v351:hover,
  html body:not(.page-login) .sidebar-v352 .sidebar-avatar,
  html body:not(.page-login) .sidebar-v352 .sidebar-avatar:hover,
  html body:not(.page-login) .sidebar-v352 .sidebar-logout-v351,
  html body:not(.page-login) .sidebar-v352 .sidebar-logout-v351 button,
  html body:not(.page-login) .sidebar-v352 .sidebar-logout-v351 button:hover{
    transform:none!important;translate:none!important;scale:1!important;animation:none!important;
  }
  html body:not(.page-login) .sidebar-v352 nav a{margin:0!important;left:auto!important;top:auto!important;}
  html body:not(.page-login) .sidebar-v352 nav a:hover{margin:0!important;left:auto!important;top:auto!important;}
  html body:not(.page-login) .sidebar-v352 .user-card-v351,
  html body:not(.page-login) .sidebar-v352:hover .user-card-v351{
    left:15px!important;right:auto!important;bottom:15px!important;width:62px!important;margin:0!important;
  }
  html body:not(.page-login) .sidebar-v352 .sidebar-profile-v351,
  html body:not(.page-login) .sidebar-v352 .sidebar-profile-v351:hover{width:42px!important;height:42px!important;margin:0!important;}
  html body:not(.page-login) .sidebar-v352 .sidebar-avatar,
  html body:not(.page-login) .sidebar-v352 .sidebar-avatar:hover{width:36px!important;height:36px!important;min-width:36px!important;margin:0!important;}
  html body:not(.page-login) .sidebar-v352 .sidebar-avatar img{width:100%!important;height:100%!important;transform:none!important;}
}

/* Tooltip rico: substitui o title cru sem alterar o layout da sidebar. */
.nexei-tooltip-v352{display:none!important}
.nexei-tooltip-v359{position:fixed;z-index:2147483646;pointer-events:none;max-width:260px;min-width:150px;padding:10px 12px;border-radius:10px;background:#101828;color:#fff;box-shadow:0 12px 32px rgba(15,23,42,.30);opacity:0;visibility:hidden;transform:translateX(-4px);transition:opacity .10s ease,transform .10s ease,visibility .10s ease}
.nexei-tooltip-v359.is-visible{opacity:1;visibility:visible;transform:none}
.nexei-tooltip-v359 b{display:block;font-size:12px;line-height:1.25;margin-bottom:3px}
.nexei-tooltip-v359 span{display:block;color:#cbd5e1;font-size:10px;line-height:1.4;font-weight:500;white-space:normal}

/* Assistente sempre disponivel nas paginas autenticadas. */
body:not(.page-login):not(.page-two_factor):not(.page-forgot_password):not(.page-reset_password):not(.page-set_password):not(.page-password_expired):not(.page-select_organization) .nexei-assistant-launcher{
  display:grid!important;visibility:visible!important;opacity:1!important;z-index:2147483000!important;
}
body:not(.page-login) .nexei-assistant-modal{z-index:2147483001!important}

/* Dashboard/listagens: cada processo ocupa sua propria linha e nunca e ocultado por contain/content-visibility. */
body.page-dashboard .dashboard-results .doc-list,
body.page-documents .doc-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;overflow:visible!important}
body.page-dashboard .dashboard-results .doc-card,
body.page-documents .doc-card{display:grid!important;position:relative!important;visibility:visible!important;opacity:1!important;content-visibility:visible!important;contain:none!important;min-height:112px!important;width:100%!important;max-width:100%!important;overflow:visible!important}
body.page-dashboard .dashboard-results .doc-main{min-width:0!important;overflow:visible!important}
body.page-dashboard .dashboard-results .doc-actions{display:flex!important;visibility:visible!important}
.doc-description-v359{margin:7px 0 4px;color:#5f6f86;font-size:12px;line-height:1.45;max-width:1100px}
.doc-meta.doc-meta-vertical{display:flex!important;flex-wrap:wrap!important;gap:8px 16px!important;visibility:visible!important;opacity:1!important;overflow:visible!important}
.doc-meta.doc-meta-vertical>span{display:grid!important;gap:1px!important;min-width:130px!important;max-width:260px!important}
.doc-meta.doc-meta-vertical small{font-size:10px!important;color:#7a8798!important}
.doc-meta.doc-meta-vertical b{font-size:11px!important;color:#334155!important;white-space:normal!important;overflow-wrap:anywhere!important}

/* Perfil: o formulario nunca pode ser escondido por uma regressao de CSS. */
body.page-profile .profile-panel-v309 .profile-layout-v309{display:grid!important;grid-template-columns:270px minmax(0,1fr)!important;gap:16px!important;align-items:start!important;width:100%!important;overflow:visible!important}
body.page-profile .profile-panel-v309 .profile-hero-card{display:block!important;visibility:visible!important;opacity:1!important}
body.page-profile .profile-panel-v309 .profile-form-v309{display:grid!important;visibility:visible!important;opacity:1!important;position:relative!important;left:auto!important;right:auto!important;top:auto!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;overflow:visible!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
body.page-profile .profile-panel-v309 .profile-photo-field-v311{display:grid!important;grid-column:1/-1!important;gap:10px!important;visibility:visible!important}
body.page-profile .profile-panel-v309 .profile-meta-list{display:grid!important}
@media(max-width:1100px){body.page-profile .profile-panel-v309 .profile-form-v309{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:800px){body.page-profile .profile-panel-v309 .profile-layout-v309{grid-template-columns:1fr!important}body.page-profile .profile-panel-v309 .profile-form-v309{grid-template-columns:1fr!important}}

/* Visualizador: tres colunas estaveis, dados e botoes visiveis, sem corte. */
@media(min-width:1101px){
  body.page-view main.main{overflow:visible!important;padding:10px 12px 12px!important}
  body.page-view .topbar{margin-bottom:8px!important}
  body.page-view .viewer{display:grid!important;grid-template-columns:210px minmax(460px,1fr) minmax(360px,410px)!important;gap:10px!important;width:100%!important;max-width:100%!important;height:calc(100vh - 78px)!important;min-height:600px!important;overflow:visible!important;align-items:stretch!important}
  body.page-view .viewer>.files,body.page-view .viewer>.doc-frame,body.page-view .viewer>.details{display:block!important;visibility:visible!important;opacity:1!important;min-width:0!important;height:100%!important;max-height:100%!important}
  body.page-view .viewer>.files,body.page-view .viewer>.details{overflow:auto!important;padding:12px!important}
  body.page-view .viewer>.doc-frame{overflow:hidden!important;border-radius:14px!important}
  body.page-view .viewer>.doc-frame iframe{display:block!important;width:100%!important;height:100%!important;min-height:100%!important}
  body.page-view .details .actions{display:flex!important;flex-wrap:wrap!important;gap:6px!important;overflow:visible!important;padding:0 0 10px!important}
  body.page-view .details .actions>*{flex:0 0 auto!important;max-width:none!important}
  body.page-view .details .actions .icon-btn,body.page-view .details .actions button.icon-btn{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;padding:7px!important;overflow:visible!important}
  body.page-view .details dl,body.page-view .details .field-line,body.page-view .details .approval,body.page-view .details form,body.page-view .details section,body.page-view .details div{visibility:visible!important;opacity:1!important}
  body.page-view .viewer-close{position:fixed!important;top:64px!important;right:10px!important;z-index:2147482000!important;width:40px!important;height:40px!important;border-radius:50%!important;display:grid!important;place-items:center!important;padding:0!important}
}
@media(max-width:1100px){body.page-view .viewer{display:grid!important;grid-template-columns:180px minmax(0,1fr)!important;height:auto!important}body.page-view .viewer>.details{grid-column:1/-1!important;max-height:none!important}}

/* Evita que thumbs desaparecam por lazy rendering antigo. */
.document-thumb-image,.dashboard-document-thumb,.file-document-thumb{visibility:visible!important;opacity:1!important;content-visibility:visible!important}

/* ===== v3.5.9 hard-stop de regressões visuais ===== */
:root{--nexei-sidebar-v359:92px}
@media(min-width:901px){
  html body:not(.page-login) aside.sidebar.sidebar-v351.sidebar-v352,
  html body:not(.page-login) aside.sidebar.sidebar-v351.sidebar-v352:hover,
  html body:not(.page-login) aside.sidebar.sidebar-v351.sidebar-v352:focus-within{
    position:fixed!important;inset:0 auto 0 0!important;width:var(--nexei-sidebar-v359)!important;min-width:var(--nexei-sidebar-v359)!important;max-width:var(--nexei-sidebar-v359)!important;
    overflow:visible!important;padding:16px 13px!important;transition:none!important;transform:none!important;
  }
  html body:not(.page-login) aside.sidebar-v352 .brand-copy-v351,
  html body:not(.page-login) aside.sidebar-v352:hover .brand-copy-v351,
  html body:not(.page-login) aside.sidebar-v352 .nav-text,
  html body:not(.page-login) aside.sidebar-v352:hover .nav-text{
    display:none!important;visibility:hidden!important;opacity:0!important;width:0!important;max-width:0!important;overflow:hidden!important;
  }
  html body:not(.page-login) aside.sidebar-v352 nav,
  html body:not(.page-login) aside.sidebar-v352:hover nav{width:62px!important;margin:0 auto!important;gap:7px!important;overflow:visible!important}
  html body:not(.page-login) aside.sidebar-v352 nav a,
  html body:not(.page-login) aside.sidebar-v352 nav a:hover,
  html body:not(.page-login) aside.sidebar-v352 nav a:focus{
    width:54px!important;min-width:54px!important;max-width:54px!important;height:48px!important;min-height:48px!important;max-height:48px!important;
    margin:0!important;padding:0!important;display:grid!important;place-items:center!important;transform:none!important;translate:none!important;scale:1!important;transition:background-color .12s ease,border-color .12s ease!important;
  }
  html body:not(.page-login) aside.sidebar-v352 nav a .nav-icon,
  html body:not(.page-login) aside.sidebar-v352 nav a:hover .nav-icon{width:27px!important;height:27px!important;min-width:27px!important;margin:0!important;transform:none!important}
  html body:not(.page-login) aside.sidebar-v352 .user-card-v351,
  html body:not(.page-login) aside.sidebar-v352:hover .user-card-v351{
    position:absolute!important;left:15px!important;right:auto!important;bottom:15px!important;top:auto!important;width:62px!important;height:auto!important;margin:0!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;overflow:visible!important;opacity:1!important;visibility:visible!important;transform:none!important;
  }
  html body:not(.page-login) aside.sidebar-v352 .sidebar-profile-v351,
  html body:not(.page-login) aside.sidebar-v352 .sidebar-profile-v351:hover{position:relative!important;inset:auto!important;width:42px!important;height:42px!important;margin:0!important;transform:none!important}
  html body:not(.page-login) aside.sidebar-v352 .sidebar-logout-v351,
  html body:not(.page-login) aside.sidebar-v352:hover .sidebar-logout-v351{position:relative!important;inset:auto!important;margin:0!important;transform:none!important}
  html body:not(.page-login) aside.sidebar-v352 + main.main,
  html body:not(.page-login) aside.sidebar-v352 ~ main.main,
  html body.page-view aside.sidebar-v352 + main.main,
  html body.page-view aside.sidebar-v352 ~ main.main{
    margin-left:var(--nexei-sidebar-v359)!important;width:calc(100% - var(--nexei-sidebar-v359))!important;max-width:calc(100% - var(--nexei-sidebar-v359))!important;transition:none!important;
  }
}

/* O launcher do Assistente é global e não pode desaparecer em páginas específicas. */
html body:not(.page-login):not(.page-two_factor):not(.page-forgot_password):not(.page-reset_password):not(.page-set_password):not(.page-password_expired):not(.page-select_organization) button.nexei-assistant-launcher{
  position:fixed!important;right:16px!important;bottom:16px!important;top:auto!important;left:auto!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important;max-height:44px!important;padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;background:transparent!important;display:block!important;visibility:visible!important;opacity:1!important;overflow:hidden!important;pointer-events:auto!important;z-index:2147483601!important;transform:none!important;translate:none!important;animation:none!important;
}
html body button.nexei-assistant-launcher:hover,html body button.nexei-assistant-launcher:focus-visible{transform:none!important;translate:none!important;scale:1!important}
html body button.nexei-assistant-launcher img{position:absolute!important;left:50%!important;top:50%!important;width:52px!important;height:52px!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;object-fit:cover!important;transform:translate(-50%,-50%)!important;animation:none!important}

/* Dashboard: título/descrição + metadados sempre abaixo do título; nada pode sobrepor cartões irmãos. */
html body.page-dashboard .dashboard-results{overflow:visible!important}
html body.page-dashboard .dashboard-results .doc-list{display:flex!important;flex-direction:column!important;gap:10px!important;width:100%!important;overflow:visible!important}
html body.page-dashboard .dashboard-results .doc-card{
  flex:0 0 auto!important;display:grid!important;grid-template-columns:110px minmax(0,1fr) auto!important;gap:16px!important;align-items:center!important;min-height:136px!important;height:auto!important;max-height:none!important;position:relative!important;inset:auto!important;overflow:visible!important;transform:none!important;content-visibility:visible!important;contain:none!important;
}
html body.page-dashboard .dashboard-results .doc-card:hover{transform:none!important}
html body.page-dashboard .dashboard-results .doc-main{display:block!important;min-width:0!important;height:auto!important;max-height:none!important;overflow:visible!important}
html body.page-dashboard .dashboard-results .doc-title{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
html body.page-dashboard .dashboard-results .doc-description-v359{display:block!important;visibility:visible!important;opacity:1!important}
html body.page-dashboard .dashboard-results .doc-meta-vertical{display:flex!important;visibility:visible!important;opacity:1!important;max-height:none!important;height:auto!important;margin-top:8px!important}
html body.page-dashboard .dashboard-results .thumb{width:100px!important;height:112px!important;min-height:112px!important}

/* Perfil: toda a edição fica na mesma tela, sem painel perdido fora da viewport. */
html body.page-profile main.main{overflow:visible!important}
html body.page-profile .profile-panel-v309{overflow:visible!important}
html body.page-profile .profile-layout-v309{display:grid!important;grid-template-columns:270px minmax(0,1fr)!important;gap:16px!important;width:100%!important;max-width:100%!important;overflow:visible!important}
html body.page-profile form.profile-form-v309{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;align-content:start!important;position:static!important;float:none!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:180px!important;height:auto!important;overflow:visible!important;clip:auto!important;clip-path:none!important;visibility:visible!important;opacity:1!important;transform:none!important}
html body.page-profile form.profile-form-v309>*{visibility:visible!important;opacity:1!important}

/* Visualizador: bloqueia definitivamente o antigo modo de sidebar expansível. */
@media(min-width:901px){
  html body.page-view aside.sidebar-v352,
  html body.page-view aside.sidebar-v352:hover,
  html body.nexei-view-mode aside.sidebar-v352,
  html body.nexei-view-mode aside.sidebar-v352:hover{width:var(--nexei-sidebar-v359)!important;min-width:var(--nexei-sidebar-v359)!important;max-width:var(--nexei-sidebar-v359)!important;overflow:visible!important}
  html body.page-view aside.sidebar-v352::after,html body.nexei-view-mode aside.sidebar-v352::after{display:none!important;content:none!important}
  html body.page-view aside.sidebar-v352 .brand-copy-v351,html body.page-view aside.sidebar-v352 .nav-text,
  html body.page-view aside.sidebar-v352:hover .brand-copy-v351,html body.page-view aside.sidebar-v352:hover .nav-text{display:none!important;visibility:hidden!important;opacity:0!important;width:0!important}
  html body.page-view aside.sidebar-v352:hover nav a{width:54px!important;height:48px!important;padding:0!important;margin:0!important;justify-content:center!important;gap:0!important}
  html body.page-view aside.sidebar-v352 .user-card-v351,html body.page-view aside.sidebar-v352:hover .user-card-v351{display:flex!important;visibility:visible!important;opacity:1!important}
}
html body.page-view main.main{overflow:hidden!important}
html body.page-view .viewer{display:grid!important;grid-template-columns:210px minmax(520px,1fr) minmax(390px,450px)!important;gap:10px!important;width:100%!important;max-width:100%!important;height:calc(100vh - 78px)!important;overflow:hidden!important}
html body.page-view .viewer>.files,html body.page-view .viewer>.doc-frame,html body.page-view .viewer>.details{min-width:0!important;max-width:none!important;display:block!important;visibility:visible!important;opacity:1!important;box-sizing:border-box!important}
html body.page-view .viewer>.details{width:100%!important;overflow-y:auto!important;overflow-x:hidden!important;padding:10px 12px 24px!important}
html body.page-view .viewer>.doc-frame{height:100%!important;overflow:hidden!important}
html body.page-view .viewer>.doc-frame iframe{height:100%!important;min-height:100%!important}
html body.page-view .details .actions{display:grid!important;grid-template-columns:repeat(auto-fit,36px)!important;justify-content:start!important;align-items:center!important;gap:7px!important;width:100%!important;max-width:100%!important;margin:0 0 12px!important;padding:0 48px 0 0!important;overflow:visible!important}
html body.page-view .details .actions>*,html body.page-view .details .actions>form{width:36px!important;height:36px!important;min-width:36px!important;max-width:36px!important;margin:0!important;overflow:visible!important}
html body.page-view .details .actions a.icon-btn,html body.page-view .details .actions button.icon-btn,html body.page-view .details .actions form>button{width:36px!important;height:36px!important;min-width:36px!important;max-width:36px!important;padding:7px!important;overflow:hidden!important;border-radius:10px!important}
html body.page-view .details .actions img,html body.page-view .details .actions svg{width:20px!important;height:20px!important;max-width:20px!important;max-height:20px!important;object-fit:contain!important}
html body.page-view .viewer-close{position:fixed!important;right:10px!important;top:68px!important;z-index:2147483602!important;display:grid!important;place-items:center!important;width:38px!important;height:38px!important;padding:0!important;margin:0!important;overflow:visible!important}
.viewer-summary-v359{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0;padding:10px;border:1px solid #e1e7ef;border-radius:12px;background:#f8fafc}
.viewer-summary-v359>div{display:grid;gap:2px;min-width:0;padding:7px 8px;border-radius:9px;background:#fff;border:1px solid #edf1f6}
.viewer-summary-v359 small{font-size:9px;color:#7a8798;text-transform:uppercase;font-weight:800;letter-spacing:.03em}
.viewer-summary-v359 b{font-size:11px;color:#263247;white-space:normal;overflow-wrap:anywhere}
.viewer-base-dl-v359{display:none!important}
.viewer-fields-v359{display:grid!important;gap:0!important;visibility:visible!important;opacity:1!important;min-height:40px!important;overflow:visible!important}
.viewer-fields-v359 .field-line{display:grid!important;grid-template-columns:minmax(130px,.9fr) minmax(0,1.1fr)!important;gap:8px!important;align-items:start!important;padding:8px 0!important;visibility:visible!important;opacity:1!important}
.viewer-fields-v359 .field-line span{white-space:normal!important;overflow-wrap:anywhere!important;text-align:right!important}
@media(max-width:1350px){html body.page-view .viewer{grid-template-columns:180px minmax(430px,1fr) minmax(350px,400px)!important}.viewer-summary-v359{grid-template-columns:1fr!important}}
@media(max-width:1000px){html body.page-view main.main{overflow:auto!important}html body.page-view .viewer{grid-template-columns:1fr!important;height:auto!important}html body.page-view .viewer>.files,html body.page-view .viewer>.doc-frame,html body.page-view .viewer>.details{height:auto!important}html body.page-view .viewer>.doc-frame{min-height:70vh!important}.viewer-summary-v359{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
