/* ------ Cards de módulos (home.php) ------ */
:root{
  --nepam-green: #1f7a3a;
  --nepam-green-soft: rgba(31, 122, 58, .14);
  --nepam-green-shadow: rgba(31, 122, 58, .22);
}

.module-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  position: relative;
  overflow: hidden;
}

.module-card .card-body{
  padding: 1.25rem 1.25rem;
  min-height: 150px;            /* teste 150–170 */
  display: flex;
  align-items: center;          /* centraliza verticalmente */
}

.module-card .card-body > .d-flex{
  width: 100%;
}

/* “tint” discreto no hover */
.module-card::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(135deg, var(--nepam-green-soft), transparent 55%);
  opacity: 0;
  transition: opacity .12s ease;
  pointer-events:none;
}

.module-card:hover{
  transform: translateY(-2px);
  border-color: var(--nepam-green);

  /* profundidade: sombra real + um “toque” puxando pra baixo/direita */
  box-shadow:
    0 .5rem 1.2rem rgba(0,0,0,.08),
    .35rem .45rem 0 var(--nepam-green-soft);
}

.module-card:hover::before{
  opacity: 1;
}

/* Ícone */
.module-icon{
  font-size: 1.95rem;
  line-height: 1;
  opacity: .9;
  color: rgba(0,0,0,.55);
  transition: color .12s ease;
}

.module-icon i{
  display: inline-flex;
  line-height: 1;
}


.module-card .h5{
  font-size: 1.2rem;    /* dá mais presença */
  transition: color .12s ease;
  margin-bottom: .35rem;
}


/* No hover, o ícone e o título ficam verdes */
.module-card:hover .module-icon{
  color: var(--nepam-green);
}

.module-card:hover .h5{
  color: var(--nepam-green) !important;
}

/* Desabilitado */
.module-disabled{
  opacity: .65;
  cursor: default;
}

.module-disabled:hover{
  transform: none;
  border-color: rgba(0,0,0,.08);
  box-shadow: none !important;
}

.module-disabled:hover::before{
  opacity: 0;
}

.module-disabled:hover .module-icon,
.module-disabled:hover .h5{
  color: rgba(0,0,0,.55) !important;
}

.module-card .text-muted.small{
  font-size: .92rem;
  line-height: 1.25rem;
}

/* -------------------------------Fim dos Cards de módulos (home.php) --------------------------------------- */

/* ------ Layout Top (layout_top.php) ------ */

:root{
  --nepam-green: #1C6C34; 
}

.nepam-navbar{
  background: var(--nepam-green);
}

.nepam-navbar .navbar-brand{
  font-weight: 600;
}

.nepam-breadcrumb{
  background: rgba(0,0,0,.03);
  border-bottom: 1px solid rgba(0,0,0,.08);
  padding: .5rem 0;
}

.nepam-breadcrumb .breadcrumb a{
  text-decoration: none;
}
.nepam-breadcrumb .breadcrumb a:hover{
  text-decoration: underline;
}


/* ---------------------- Classes persolizadas para cor de alertas das linhs do Módulo Ativos ---------------------------- */


/* Estado visual - vencido */
.estado-vencido {
    border-left: 5px solid #dc3545;
}

/* Estado visual - próximo do vencimento */
.estado-proximo {
    border-left: 5px solid #ffc107;
}



/* ---------------------- Padronizar altura e container <th> dos buttons do list.view de Ativos ---------------------------- */

.btn-acao {
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1; /* remove influência do line-height padrão */
  padding-top: 0;
  padding-bottom: 0;
}

.btn-acao i {
  font-size: 14px;
  line-height: 1;
}

.action-container {
  min-width: 250px;
  justify-content: flex-end;
}


/* ---------------------- CSS para navbar layout_top ---------------------------- */

/* ESTRUTURA */
.app-layout {
  min-height: calc(100vh - 56px);
}

.sidebar {
  width: 260px;
  background: #1f3d2b;
  color: #fff;
}

.app-content {
  background: #f8f9fa;
}

/* HEADER */
.sidebar-header {
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* USER */
.sidebar-user {
  font-size: 0.9rem;
}

.sidebar-avatar {
  color: #ffffffcc;
}

/* DIVIDER */
.sidebar-divider {
  border-color: rgba(255,255,255,0.1);
}

/* LINKS */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #ffffffcc;
  text-decoration: none;
  font-size: 0.9rem;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.sidebar-sublink {
  display: block;
  padding: 6px 30px;
  font-size: 0.85rem;
  color: #ffffffaa;
  text-decoration: none;
}

.sidebar-sublink:hover {
  color: #fff;
}

/* FOOTER */
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-divider {
  border: none;           /* remove border padrão do hr */
  height: 2px;            /* controla a espessura */
  margin: 1rem 0;         /* respiro vertical */
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,0.18),
    transparent
  );
}


/* CSS AVATAR - Módulo Afastamentos (Serividores) */

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6c757d;
  color: #fff;
  font-weight: 600;
  font-size: 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}



/* =========================
   PAINEL DE AFASTAMENTOS
========================= */

.afastamento-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px;
  border-bottom:1px solid #eee;
  transition:background .15s ease;
}

.afastamento-item:hover{
  background:#fafafa;
}

.afastamento-left{
  display:flex;
  align-items:center;
  gap:14px;
  flex:1;
  min-width:0;
}

.afastamento-main{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  flex:1;
}

.afastamento-linha-topo{
display:flex;
align-items:center;
gap:32px;
flex-wrap:wrap;
}

.afastamento-info{
    display: flex;
    flex-direction: column;
}

.afastamento-info{
    display: flex;
    flex-direction: column;
    margin-bottom: 6px;
}

.afastamento-nome{
  font-weight:600;
  font-size:1rem;
  line-height:1.2;
  white-space:nowrap;
}

.afastamento-cargo{
    font-size: 0.85rem;
    font-style: italic;
    color: #6c757d;
    margin-top: 2px;
}

.afastamento-status{
  font-size:14px;
  font-weight:600;
  white-space:nowrap;
}

/* Avatar */

.afastamento-avatar-wrapper{
  padding:2px;
  border-radius:50%;
  border:3px solid transparent;
  flex-shrink:0;
}

.afastamento-avatar{
  width:52px;
  height:52px;
  border-radius:50%;
  object-fit:cover;
  display:block;
}

.afastamento-avatar-placeholder{
  width:52px;
  height:52px;
  border-radius:50%;
  background:#6b7280;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:600;
  font-size:1.2rem;
}

.afastamento-extra{
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.afastamento-extra i{
    color: #0d6efd;
}

.afastamento-alerta{
    font-size:0.8rem;
    display:flex;
    align-items:center;
    gap:6px;
    font-weight:500;
}

/* cards */

.card{
  border:1px solid #e5e7eb;
  box-shadow:0 1px 2px rgba(0,0,0,0.04);
  background:#f8f9fa;
}

.card-header{
  background:#f1f3f5;
  font-weight:600;
}


/* férias chegando */
.alerta-ferias{
  margin-top:4px;
  font-size:13px;
  background:#fef3c7;
  color:#b45309;
  padding:4px 8px;
  border-radius:6px;
  width:fit-content;
  font-weight:600;
}

/* retorno */
.alerta-retorno{
  margin-top:4px;
  font-size:13px;
  background:#fee2e2;
  color:#dc2626;
  padding:4px 8px;
  border-radius:6px;
  width:fit-content;
  font-weight:600;
}

.alerta-licenca{
  margin-top:4px;
  font-size:13px;
  background:#e0f2fe;
  color:#0369a1;
  padding:4px 8px;
  border-radius:6px;
  width:fit-content;
  font-weight:600;
}

/* Status atuais */

.status-disponivel{
  border-color:#22c55e;
}

.status-ferias{
  border-color:#2563eb;
}

.status-licenca-premio{
  border-color:#f59e0b;
}

.status-afastado{
  border-color:#dc2626;
}

.afastamento-status.status-disponivel{
  color:#16a34a;
}

.afastamento-status.status-ferias{
  color:#2563eb;
}

.afastamento-status.status-licenca-premio{
  color:#d97706;
}

.afastamento-status.status-afastado{
  color:#dc2626;
}

/* Chips */

.afastamento-chips{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.afastamento-chip{
  display:inline-flex;
  align-items:center;
  padding:6px 12px;
  border:none;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  color:#fff;
  cursor:pointer;
  white-space:nowrap;
  transition:opacity .2s ease, transform .2s ease;
}

.afastamento-chip:hover{
  opacity:.92;
  transform:translateY(-1px);
}

.chip-ferias{
  background:#2563eb;
}

.chip-licenca-premio{
  background:#f59e0b;
}

.chip-afastado{
  background:#dc2626;
}

/* =========================
   MODAL CALENDÁRIO
========================= */

.modal-calendario{
position:fixed;
inset:0;
background:rgba(0,0,0,.45);
display:none;
align-items:center;
justify-content:center;
z-index:9999;
}

.modal-conteudo{
background:#fff;
padding:20px;
border-radius:12px;
width:380px;
max-width:92vw;
box-shadow:0 10px 30px rgba(0,0,0,.18);
}

.modal-header-custom{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:12px;
font-weight:600;
}

.modal-fechar-btn{
border:none;
background:none;
font-size:22px;
cursor:pointer;
}


/* =========================
   CALENDÁRIO
========================= */

.calendario-mes{
text-align:center;
font-weight:700;
margin-bottom:10px;
font-size:18px;
}

.grid-semana{
display:grid;
grid-template-columns:repeat(7,1fr);
gap:6px;
margin-bottom:6px;
}

.semana-item{
text-align:center;
font-size:12px;
font-weight:600;
color:#6b7280;
}


.grid-calendario{
display:grid;
grid-template-columns:repeat(7,1fr);
gap:6px;
}


.dia{
min-height:36px;
display:flex;
align-items:center;
justify-content:center;
border-radius:10px;
background:#f3f4f6;
font-size:13px;
}

.dia-vazio{
background:transparent;
}


/* =========================
   CORES DOS AFASTAMENTOS
========================= */

.dia-ferias{
background:#2563eb;
color:#fff;
}

.dia-licenca-premio{
background:#f59e0b;
color:#fff;
}

.dia-afastado{
background:#dc2626;
color:#fff;
}

/* responsivo */

@media (max-width: 900px){
  .afastamento-item{
    align-items:flex-start;
  }

  .afastamento-status{
    margin-top:4px;
  }
}

/* =========================
   LEGENDA DOS AFASTAMENTOS
========================= */

.afastamento-legenda{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  font-size:13px;
}

.legenda-item{
  display:flex;
  align-items:center;
  gap:6px;
  font-weight:500;
}

.legenda-dot{
  width:10px;
  height:10px;
  border-radius:50%;
}

.legenda-item.disponivel .legenda-dot{
  background:#22c55e;
}

.legenda-item.ferias .legenda-dot{
  background:#2563eb;
}

.legenda-item.licenca .legenda-dot{
  background:#f59e0b;
}

.legenda-item.afastado .legenda-dot{
  background:#dc2626;
}

/* =========================
   DESTAQUE DO CARD PARA AFASTAMENTOS
========================= */

.afastamento-item.status-ferias{
  background:#eff6ff;
}

.afastamento-item.status-licenca-premio{
  background:#fffbeb;
}

.afastamento-item.status-afastado{
  background:#fef2f2;
}

/* =========================
   FILTROS AFASTAMENTOS
========================= */

/* Barra superior do painel */

.afastamento-topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:20px;
  margin-bottom:16px;
  flex-wrap:wrap;
}


/* filtros */

.afastamento-filtros{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-end;
}

.filtro-grupo{
  min-width:180px;
}

.filtro-acoes{
  display:flex;
  align-items:flex-end;
}

/* =========================
   TELA LIST VIEW AFASTAMENTOS
========================= */

/* linha enquanto arrasta */
.sortable-ghost {
  opacity: 0.3;
}

/* item selecionado */
.sortable-chosen {
  background: #f8f9fa;
}

/* item sendo arrastado */
.sortable-drag {
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* linha indicadora */
.sortable-ghost td {
  border-top: 3px solid #0d6efd !important;
}


/* =========================
   TELA LIST VIEW DOCUMENTOS (POPs)
========================= */


.setor-header {
    cursor: pointer;
}

.setor-header:hover {
    color: #0d6efd;
}

.setor-documentos {
    display: none;
    padding-left: 28px;
}

.setor.ativo .setor-documentos {
    display: block;
}

/* link clicável arquivos POP em PDF */

.pop-link {
    color: inherit;
}

.pop-link:hover {
    text-decoration: underline;
}

/* estrutura de pastas */

.setor-documentos ul {
    border-left: 2px solid #e4e4e4;
    margin-left: 12px;
}

.setor-documentos li {
    position: relative;
}

.setor-documentos li::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 14px;
    width: 12px;
    height: 2px;
    background: #e4e4e4;
}
