/* ========================================================================== 
   PIMS ENTERPRISE UI V1.1 — AJUSTES VISUAIS PONTUAIS
   Escopo deliberadamente restrito aos pontos aprovados em 07/08/2026.
   Nenhuma regra operacional, relatório, cálculo ou estrutura de dados.
   ========================================================================== */

/* 1) ALOCAÇÃO — total por processo legível + engrenagem com contraste. */
body[data-current-menu="determinar-frente"] #menuHost .process-head .det-process-head-actions > .badge.gray{
  min-height:24px!important;
  padding:4px 9px!important;
  border:1px solid rgba(255,255,255,.34)!important;
  border-radius:999px!important;
  background:rgba(3,45,31,.34)!important;
  color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10)!important;
  font-size:10.5px!important;
  line-height:1!important;
  font-weight:850!important;
  letter-spacing:.01em!important;
  text-shadow:0 1px 1px rgba(0,0,0,.14)!important;
  opacity:1!important;
}
body[data-current-menu="determinar-frente"] #menuHost .process-head .det-process-order-button{
  width:29px!important;
  min-width:29px!important;
  max-width:29px!important;
  height:29px!important;
  min-height:29px!important;
  max-height:29px!important;
  flex-basis:29px!important;
  border:1px solid rgba(255,255,255,.62)!important;
  border-radius:8px!important;
  background:#f8fffb!important;
  color:#0b503b!important;
  box-shadow:0 3px 8px rgba(0,35,24,.18),inset 0 1px 0 #fff!important;
  opacity:1!important;
}
body[data-current-menu="determinar-frente"] #menuHost .process-head .det-process-order-button .det-process-order-svg{
  width:15px!important;
  min-width:15px!important;
  max-width:15px!important;
  height:15px!important;
  min-height:15px!important;
  max-height:15px!important;
  stroke:currentColor!important;
  opacity:1!important;
}
body[data-current-menu="determinar-frente"] #menuHost .process-head .det-process-order-button:hover{
  background:#e8f5ee!important;
  border-color:#bfe2cf!important;
  color:#073d2d!important;
  box-shadow:0 4px 10px rgba(0,35,24,.22)!important;
}

/* 2) DISPONIBILIDADE — retirar o vão residual abaixo dos filtros. */
body[data-current-menu="disponibilidade"] #menuHost .disponibilidade-page{
  gap:6px!important;
  justify-content:flex-start!important;
}
body[data-current-menu="disponibilidade"] #menuHost .disp-filters{
  margin:0!important;
  margin-bottom:0!important;
}
body[data-current-menu="disponibilidade"] #menuHost #dispResumo.disp-summary{
  margin:0!important;
  padding:0!important;
  min-height:0!important;
  align-self:stretch!important;
}
body[data-current-menu="disponibilidade"] #menuHost #dispDrillInfo.hidden{
  display:none!important;
  margin:0!important;
  padding:0!important;
  min-height:0!important;
  height:0!important;
  flex:0 0 0!important;
}
body[data-current-menu="disponibilidade"] #menuHost .disp-table-shell{
  margin-top:0!important;
}

/* 3) FALHAS ACOMPANHADAS > HISTÓRICO — auditoria em cards claros e legíveis. */
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] > .fac-card{
  overflow:hidden!important;
  border:1px solid #d9e5df!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 6px 18px rgba(15,61,46,.055)!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-card-header{
  min-height:62px!important;
  padding:13px 16px!important;
  border-bottom:1px solid #e2ebe6!important;
  background:linear-gradient(180deg,#fbfdfc,#f6faf8)!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-card-header > div > span{
  margin-bottom:4px!important;
  color:#2f7f5d!important;
  font-size:8px!important;
  font-weight:900!important;
  letter-spacing:.10em!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-card-header h3{
  color:#123f31!important;
  font-size:15px!important;
  font-weight:800!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-card-header > b{
  padding:5px 9px!important;
  border:1px solid #d6e6de!important;
  background:#edf6f1!important;
  color:#174f3a!important;
  font-size:9px!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit{
  display:grid!important;
  gap:8px!important;
  margin:0!important;
  padding:10px!important;
  background:#f7faf8!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-row{
  display:grid!important;
  grid-template-columns:125px 110px 90px 145px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:center!important;
  min-height:58px!important;
  padding:10px 12px!important;
  border:1px solid #e0e9e4!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:0 2px 7px rgba(15,61,46,.035)!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-row:hover{
  border-color:#c8ddd2!important;
  background:#fbfefc!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-row time{
  color:#51665c!important;
  font-size:9px!important;
  font-weight:800!important;
  font-variant-numeric:tabular-nums!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-action-chip{
  min-height:23px!important;
  align-items:center!important;
  padding:4px 8px!important;
  border:1px solid #cde4d8!important;
  background:#edf7f2!important;
  color:#176747!important;
  font-size:7.5px!important;
  font-weight:900!important;
  letter-spacing:.025em!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-row > strong{
  color:#123f31!important;
  font-size:10px!important;
  font-weight:900!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-row > span:not(.fac-action-chip){
  color:#53675e!important;
  font-size:9px!important;
  font-weight:750!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-detail{
  gap:3px!important;
  padding-left:12px!important;
  border-left:2px solid #d7e8df!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-detail strong{
  color:#173e2f!important;
  font-size:9.5px!important;
  line-height:1.25!important;
  font-weight:800!important;
}
body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-detail small{
  color:#72817a!important;
  font-size:8px!important;
  line-height:1.2!important;
  font-weight:700!important;
}
@media(max-width:1180px){
  body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-row{
    grid-template-columns:110px 100px 90px minmax(0,1fr)!important;
  }
  body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-row > span:not(.fac-action-chip){display:none!important}
}
@media(max-width:760px){
  body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-row{
    grid-template-columns:1fr auto!important;
    gap:7px 10px!important;
    align-items:start!important;
  }
  body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-row > strong{grid-column:1!important}
  body[data-current-menu="falhas-acompanhadas"] #menuHost [data-fac-panel="historico"] .fac-audit-detail{
    grid-column:1/-1!important;
    padding:8px 0 0!important;
    border-left:0!important;
    border-top:1px solid #e3ebe7!important;
  }
}

/* 4) CONSULTAS GERAIS — somente o cabeçalho da grade em verde. */
body[data-current-menu="consultas-gerais"] #menuHost #tabelaConsultas.consultas-table thead th{
  background:#0b503b!important;
  color:#fff!important;
  border-color:#2f6d58!important;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.10)!important;
}
body[data-current-menu="consultas-gerais"] #menuHost #tabelaConsultas.consultas-table thead th:hover{
  background:#0d5b42!important;
  color:#fff!important;
}

/* 5) STATUS PIMS — ONLINE pulsante, sem apagar a leitura. */
#sidebarPrincipal #statusPimsEstado.status-pill.online{
  position:relative!important;
  overflow:visible!important;
  background:#dcfce7!important;
  color:#075f2d!important;
  border:1px solid rgba(125,238,165,.78)!important;
  box-shadow:0 0 0 0 rgba(88,239,135,.36)!important;
  animation:pimsOnlinePulseV11 1.45s ease-in-out infinite!important;
}
#sidebarPrincipal #statusPimsEstado.status-pill.online::before{
  content:"";
  width:5px;
  height:5px;
  margin-right:4px;
  border-radius:50%;
  display:inline-block;
  vertical-align:1px;
  background:#16a34a;
  box-shadow:0 0 0 2px rgba(22,163,74,.15);
}
@keyframes pimsOnlinePulseV11{
  0%,100%{transform:scale(1);filter:brightness(1);box-shadow:0 0 0 0 rgba(88,239,135,.22)}
  50%{transform:scale(1.045);filter:brightness(1.08);box-shadow:0 0 0 4px rgba(88,239,135,.10),0 0 12px rgba(88,239,135,.22)}
}

/* 6) ROTAÇÃO DA MOAGEM — ícone gira somente quando o valor recebido é != 0. */
#sidebarPrincipal #statusMoagemCard.is-rotating .status-moagem-icon-p19 svg{
  transform-origin:50% 50%!important;
  animation:pimsMoagemSpinV11 1.7s linear infinite!important;
}
#sidebarPrincipal #statusMoagemCard.is-rotating .status-moagem-icon-p19{
  box-shadow:0 0 0 2px rgba(110,242,131,.08),0 0 10px rgba(110,242,131,.10)!important;
}
@keyframes pimsMoagemSpinV11{to{transform:rotate(360deg)}}

@media(prefers-reduced-motion:reduce){
  #sidebarPrincipal #statusPimsEstado.status-pill.online,
  #sidebarPrincipal #statusMoagemCard.is-rotating .status-moagem-icon-p19 svg{
    animation:none!important;
  }
}
