/* IndManager 2.9.3-20 - padrão visual compartilhado do módulo Pessoas */

/* Rolagem consistente e sempre perceptível nas grades do módulo Pessoas. */
body[data-page="matriz-habilidades"] .matriz-table-wrap,
body[data-page="avaliacao"] .av-table-wrap,
body[data-page="treinamentos"] .table-wrap,
body[data-page="pdi"] .pdi-table-wrap {
  overflow: auto !important;
  scrollbar-gutter: stable both-edges;
  scrollbar-color: #94a3b8 #eef2f7;
  scrollbar-width: auto;
}
body[data-page="matriz-habilidades"] .matriz-table-wrap::-webkit-scrollbar,
body[data-page="avaliacao"] .av-table-wrap::-webkit-scrollbar,
body[data-page="treinamentos"] .table-wrap::-webkit-scrollbar,
body[data-page="pdi"] .pdi-table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
body[data-page="matriz-habilidades"] .matriz-table-wrap::-webkit-scrollbar-track,
body[data-page="avaliacao"] .av-table-wrap::-webkit-scrollbar-track,
body[data-page="treinamentos"] .table-wrap::-webkit-scrollbar-track,
body[data-page="pdi"] .pdi-table-wrap::-webkit-scrollbar-track {
  background: #eef2f7;
  border-radius: 999px;
}
body[data-page="matriz-habilidades"] .matriz-table-wrap::-webkit-scrollbar-thumb,
body[data-page="avaliacao"] .av-table-wrap::-webkit-scrollbar-thumb,
body[data-page="treinamentos"] .table-wrap::-webkit-scrollbar-thumb,
body[data-page="pdi"] .pdi-table-wrap::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border: 3px solid #eef2f7;
  border-radius: 999px;
}
body[data-page="matriz-habilidades"] .matriz-table-wrap::-webkit-scrollbar-thumb:hover,
body[data-page="avaliacao"] .av-table-wrap::-webkit-scrollbar-thumb:hover,
body[data-page="treinamentos"] .table-wrap::-webkit-scrollbar-thumb:hover,
body[data-page="pdi"] .pdi-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

@media (min-width: 901px) {
  html.embed-mode body[data-page="matriz-habilidades"] .matriz-table-wrap,
  html.embed-mode body[data-page="avaliacao"] .av-table-wrap,
  html.embed-mode body[data-page="treinamentos"] .table-wrap,
  html.embed-mode body[data-page="pdi"] .pdi-table-wrap {
    max-height: calc(100vh - 250px);
  }
}

/* Drawer lateral compartilhado: mesma linguagem visual de Oportunidades/Colaboradores. */
.people-side-modal.modal {
  position: fixed;
  display: none;
  inset: 0;
  z-index: 4000;
}
.people-side-modal.modal.show { display: block; }
.people-side-modal .modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(15, 23, 42, 0.28) !important;
  backdrop-filter: none !important;
}
.people-side-modal .modal-content {
  position: absolute !important;
  z-index: 2 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(760px, 96vw) !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: -14px 0 40px rgba(15, 23, 42, 0.17) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.people-side-modal.people-side-wide .modal-content {
  width: min(820px, 98vw) !important;
}
.people-side-modal .modal-top {
  flex: 0 0 auto;
  min-height: 66px;
  padding: 16px 18px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: #fff !important;
}
.people-side-modal .modal-title {
  font-size: 18px !important;
  line-height: 1.25;
  font-weight: 800 !important;
  color: #0f172a !important;
}
.people-side-modal .modal-title svg {
  color: #2563eb;
}
.people-side-modal .modal-close {
  width: 34px !important;
  height: 34px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #334155 !important;
  font-size: 20px !important;
  line-height: 1;
}
.people-side-modal .modal-close:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}
.people-side-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 20px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #fff !important;
  scrollbar-gutter: stable;
}
.people-side-modal .modal-body::-webkit-scrollbar { width: 11px; }
.people-side-modal .modal-body::-webkit-scrollbar-track { background: #f1f5f9; }
.people-side-modal .modal-body::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border: 3px solid #f1f5f9;
  border-radius: 999px;
}
.people-side-modal .modal-actions,
.people-side-modal .form-actions.people-drawer-actions {
  position: sticky !important;
  bottom: -18px;
  z-index: 20;
  margin: 16px -20px -18px !important;
  padding: 12px 20px 14px !important;
  border-top: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 -10px 20px rgba(15, 23, 42, 0.04);
  display: flex;
  justify-content: flex-end !important;
  gap: 8px;
  flex-wrap: wrap;
}
.people-side-modal .form-group input,
.people-side-modal .form-group select,
.people-side-modal .form-group textarea {
  background: #fff;
}
.people-side-modal .form-group input:focus,
.people-side-modal .form-group select:focus,
.people-side-modal .form-group textarea:focus {
  outline: none;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
}

/* Cards internos ficam leves, sem competir com o painel. */
.people-side-modal .summary-row,
.people-side-modal .summary-box,
.people-side-modal .eval-live-card,
.people-side-modal .criteria-card,
.people-side-modal .eval-category {
  box-shadow: none !important;
}

.people-side-modal label { font-weight: 650 !important; }
.people-side-modal :is(input, select, textarea) { font-weight: 500 !important; }

/* Linhas clicáveis seguem o padrão de Oportunidades/Colaboradores. */
.people-row-clickable { cursor: pointer; }
.people-row-clickable:hover { background: #f8fbff !important; }
.people-row-clickable:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

@media (max-width: 700px) {
  .people-side-modal .modal-content,
  .people-side-modal.people-side-wide .modal-content {
    width: 100vw !important;
  }
  .people-side-modal .modal-body { padding: 16px !important; }
  .people-side-modal .modal-actions,
  .people-side-modal .form-actions.people-drawer-actions {
    margin-left: -16px !important;
    margin-right: -16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Formulários adaptados à largura do drawer. */
body[data-page="avaliacao"] #modal-avaliacao .av-form-grid,
body[data-page="pdi"] #pdi-modal .pdi-grid,
body[data-page="treinamentos"] #tr-modal .train-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
body[data-page="avaliacao"] #modal-avaliacao .av-form-grid .span-3,
body[data-page="pdi"] #pdi-modal .pdi-grid .span-4,
body[data-page="treinamentos"] #tr-modal .train-grid .span-3 {
  grid-column: 1 / -1 !important;
}
body[data-page="avaliacao"] #modal-avaliacao .av-form-grid .span-2,
body[data-page="pdi"] #pdi-modal .pdi-grid .span-2,
body[data-page="treinamentos"] #tr-modal .train-grid .span-2 {
  grid-column: span 2 / span 2 !important;
}
body[data-page="avaliacao"] #modal-avaliacao .criteria-grid {
  grid-template-columns: 1fr !important;
}
body[data-page="pdi"] #pdi-modal .action-table-wrap,
body[data-page="pdi"] #pdi-modal .matrix-wrap {
  scrollbar-gutter: stable both-edges;
}

@media (max-width: 560px) {
  body[data-page="avaliacao"] #modal-avaliacao .av-form-grid,
  body[data-page="pdi"] #pdi-modal .pdi-grid,
  body[data-page="treinamentos"] #tr-modal .train-grid {
    grid-template-columns: 1fr !important;
  }
  body[data-page="avaliacao"] #modal-avaliacao .av-form-grid .span-2,
  body[data-page="avaliacao"] #modal-avaliacao .av-form-grid .span-3,
  body[data-page="pdi"] #pdi-modal .pdi-grid .span-2,
  body[data-page="pdi"] #pdi-modal .pdi-grid .span-4,
  body[data-page="treinamentos"] #tr-modal .train-grid .span-2,
  body[data-page="treinamentos"] #tr-modal .train-grid .span-3 {
    grid-column: 1 / -1 !important;
  }
}
/* 3.0.35 — Avaliações e PDI: usar toda a largura útil sem barras/setas fantasma. */
body[data-page="avaliacao"] .av-table-wrap,
body[data-page="pdi"] .pdi-table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
  scrollbar-gutter: auto !important;
  max-height: none !important;
}

body[data-page="avaliacao"] .av-table,
body[data-page="pdi"] .pdi-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}

body[data-page="avaliacao"] .av-table :is(th, td),
body[data-page="pdi"] .pdi-table :is(th, td) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Avaliações: distribuição proporcional das 9 colunas. */
body[data-page="avaliacao"] .av-table :is(th, td):nth-child(1) { width: 15%; }
body[data-page="avaliacao"] .av-table :is(th, td):nth-child(2) { width: 13%; }
body[data-page="avaliacao"] .av-table :is(th, td):nth-child(3) { width: 11%; }
body[data-page="avaliacao"] .av-table :is(th, td):nth-child(4) { width: 9%; }
body[data-page="avaliacao"] .av-table :is(th, td):nth-child(5) { width: 13%; }
body[data-page="avaliacao"] .av-table :is(th, td):nth-child(6) { width: 7%; }
body[data-page="avaliacao"] .av-table :is(th, td):nth-child(7) { width: 8%; }
body[data-page="avaliacao"] .av-table :is(th, td):nth-child(8) { width: 14%; }
body[data-page="avaliacao"] .av-table :is(th, td):nth-child(9) { width: 10%; text-align: center; }

/* PDI: distribuição proporcional das 7 colunas. */
body[data-page="pdi"] .pdi-table :is(th, td):nth-child(1) { width: 22%; }
body[data-page="pdi"] .pdi-table :is(th, td):nth-child(2) { width: 15%; }
body[data-page="pdi"] .pdi-table :is(th, td):nth-child(3) { width: 17%; }
body[data-page="pdi"] .pdi-table :is(th, td):nth-child(4) { width: 12%; }
body[data-page="pdi"] .pdi-table :is(th, td):nth-child(5) { width: 12%; }
body[data-page="pdi"] .pdi-table :is(th, td):nth-child(6) { width: 13%; }
body[data-page="pdi"] .pdi-table :is(th, td):nth-child(7) { width: 9%; text-align: center; }

/* Em telas realmente estreitas, preserva legibilidade e libera rolagem horizontal. */
@media (max-width: 900px) {
  body[data-page="avaliacao"] .av-table { min-width: 980px !important; }
  body[data-page="pdi"] .pdi-table { min-width: 820px !important; }
}

