﻿/* ============================= */
/* COMPONENTES GLOBAIS NEPAM */
/* BOTÕES DE AÇÃO */
/* ============================= */

.btn-acao-nepam {
  width: 32px;
  height: 32px;

  border-radius: 50%;
  border: none;

  background: #c8c8c8;
  color: #111111;

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

  text-decoration: none;

  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);

  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.btn-acao-nepam i {
  font-size: 0.95rem;
  line-height: 1;
}

.btn-acao-nepam:hover {
  transform: translateY(-1px);
  background: #1c6c34;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.btn-acao-nepam:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(28, 108, 52, 0.22),
    0 10px 22px rgba(0, 0, 0, 0.18);
}

.acoes-lista-nepam {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.acoes-lista-nepam form {
  display: inline-flex;
  margin: 0;
}

/* ============================= */
/* COMPONENTES GLOBAIS NEPAM */
/* BOTÃO VOLTAR FLUTUANTE */
/* ============================= */

.btn-voltar-flutuante {
  position: fixed;

  top: 72px;
  right: 16px;

  width: 34px;
  height: 34px;

  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, 0.18);

  background: rgba(44, 138, 62, 0.16);

  color: rgba(18, 18, 18, 0.82);

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

  text-decoration: none;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08);

  z-index: 950;

  transition:
    background 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.btn-voltar-flutuante i {
  font-size: 0.82rem;
}

.btn-voltar-flutuante:hover {
  transform: translateY(-1px);

  background: rgba(44, 138, 62, 0.26);

  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.12);
}

/* ============================= */
/* BOTÕES PRINCIPAIS NEPAM */
/* ============================= */

.btn-nepam {
  height: 42px;

  padding: 0 20px;

  border: none;
  border-radius: 14px;

  background: #d6d6d6;
  color: #1f2937;

  font-size: 0.94rem;
  font-weight: 500;

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

  text-decoration: none;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

.btn-nepam:hover {
  transform: translateY(-1px);

  background: #c8c8c8;

  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.12);
}

.btn-nepam-danger {
  width: 100%;
  min-height: 40px;
  border-radius: 20px;
  background: transparent;
  color: #e03131;
  border: 2px solid #e03131;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, box-shadow .15s ease, transform .12s ease;
}

.btn-nepam-danger:hover {
  background: #8e1f1f;
  color: #ffffff;
  border-color: #8e1f1f;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(142, 31, 31, 0.30);
}


/* ============================= */
/* TOASTS GLOBAIS NEPAM */
/* ============================= */

.toast-container-nepam {
  position: fixed;
  top: calc(var(--navbar-height) + 12px);
  right: 16px;
  z-index: 11000;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nepam-toast {
  min-width: 320px;
  max-width: 460px;

  padding: 16px 18px;

  border-radius: 12px;
  border-left: 5px solid transparent;

  display: flex;
  align-items: flex-start;
  gap: 12px;

  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);

  animation: nepamToastIn 0.18s ease forwards;
}

.nepam-toast i {
  font-size: 1.15rem;
  line-height: 1.2;
  margin-top: 1px;
}

.nepam-toast-content {
  flex: 1;
  min-width: 0;
}

.nepam-toast-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

.nepam-toast-msg {
  margin-top: 2px;
  font-size: 0.84rem;
  line-height: 1.25;
}

.nepam-toast-close {
  cursor: pointer;
  opacity: 0.65;
}

.nepam-toast-close:hover {
  opacity: 1;
}

.nepam-toast-success {
  background: #eaf7e5;
  border-left-color: #2b8a3e;
  color: #245b17;
}

.nepam-toast-error {
  background: #fdeaea;
  border-left-color: #c92a2a;
  color: #9b1c1c;
}

.nepam-toast-warning {
  background: #fff3dd;
  border-left-color: #9c5300;
  color: #7a3d00;
}

.nepam-toast-info {
  background: #e8f3ff;
  border-left-color: #1c6fb8;
  color: #0f4c81;
}

@keyframes nepamToastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================= */
/* ALERTAS EM MODAIS NEPAM */
/* ============================= */

.nepam-modal-alert {
  padding: 12px 14px;
  margin-bottom: 14px;

  border-radius: 10px;
  border-left: 5px solid transparent;

  font-size: 0.9rem;
  line-height: 1.3;

  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.nepam-modal-alert i {
  font-size: 1rem;
  margin-top: 1px;
}

.nepam-modal-alert-success {
  background: #eaf7e5;
  border-left-color: #2b8a3e;
  color: #245b17;
}

.nepam-modal-alert-warning {
  background: #fff3dd;
  border-left-color: #9c5300;
  color: #7a3d00;
}

.nepam-modal-alert-error {
  background: #fdeaea;
  border-left-color: #c92a2a;
  color: #9b1c1c;
}

.nepam-modal-alert-info {
  background: #e8f3ff;
  border-left-color: #1c6fb8;
  color: #0f4c81;
}


/* ============================= */
/* FILTRO ANO */
/* ============================= */

.filtro-ano-nepam {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.filtro-ano-nepam .filtro-ano-link:first-child {
  margin-left: -10px;
}

.filtro-ano-link {
  height: 38px;

  padding: 0 14px;

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.55);

  color: #4b5563;

  text-decoration: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  backdrop-filter: blur(8px);

  transition:
    background 0.16s ease,
    transform 0.16s ease,
    color 0.16s ease;
}

.filtro-ano-link:hover {
  transform: translateY(-1px);

  background: rgba(255, 255, 255, 0.82);

  color: #111827;
}

.filtro-ano-atual {
  font-size: 1.25rem;
  font-weight: 700;

  color: #111827;

  min-width: 72px;

  text-align: center;
}



/* =========================================================
   COMPONENTE GLOBAL - CARD COM HOVER NEPAM
   Usado em:
   - Home / Módulos
   - Contatos / Cards de pessoas
========================================================= */
:root {
  --nepam-green: #1f7a3a;
  --nepam-green-soft: rgba(31, 122, 58, .14);
  --nepam-green-shadow: rgba(31, 122, 58, .22);
  --nepam-card-bg: #e2e3e6;
}

.nepam-hover-card,
.contato-card {
  position: relative;
  overflow: hidden;
  --bs-card-bg: var(--nepam-card-bg);
  background: var(--nepam-card-bg);

  transition:
    transform .12s ease,
    box-shadow .12s ease,
    background-color .12s ease;
}

.nepam-hover-card::before,
.contato-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;
}

.nepam-hover-card:hover,
.contato-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 .5rem 1.2rem rgba(0, 0, 0, .08),
    .35rem .45rem 0 var(--nepam-green-soft);
}

.nepam-hover-card:hover::before,
.contato-card:hover::before {
  opacity: 1;
}

/* ------ Cards de módulos (home.php) ------ */
.module-card {
  height: 190px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 14px;
}

.card { border: none; }

/* especificidade dupla para ganhar do .card do Bootstrap */
.card.module-card,
.card.nepam-hover-card {
  background-color: var(--nepam-card-bg);
}

.module-card .card-body {
  height: 100%;
  padding: 1.25rem 1.25rem;
  display: flex;
  align-items: center;
}

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

.module-card .badge {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
}

.module-card .module-card-content {
  width: 100%;
  min-width: 0;
}

.module-card.module-disabled .module-card-content {
  width: 100%;
}

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

/* Minha Área — destaque amarelo na home */
.module-card-minha-area:not(.module-disabled):hover .module-icon,
.module-card-minha-area:not(.module-disabled):hover .h5 {
  color: #b8860b !important;
}
.module-card-minha-area.nepam-hover-card::before {
  background: linear-gradient(135deg, rgba(255, 196, 0, .12), transparent 55%);
}
.module-card-minha-area.nepam-hover-card:hover {
  box-shadow:
    0 .5rem 1.2rem rgba(0, 0, 0, .08),
    .35rem .45rem 0 rgba(255, 196, 0, .3);
}

.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;
  transition: color .12s ease;
  margin-bottom: .35rem;
}

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

.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;
}

@media (max-width: 576px) {
  .module-card {
    height: auto;
    min-height: 170px;
  }

  .module-card .module-card-content {
    max-width: 100%;
  }
}


/* =========================================================
   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;
}

.top-logout {
  margin-left: 6px;
  opacity: 0.85;
}

.top-logout:hover {
  opacity: 1;
}

/* =========================
   TOPBAR - AÇÕES GLOBAIS
   Notificações / Resumo do Dia
========================= */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* botão circular */

.topbar-icon-btn {
  position: relative;

  width: 44px;
  height: 44px;

  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;

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

  background: rgba(255, 255, 255, 0.22);

  transition:
    background .15s ease,
    transform .15s ease;
}

.topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.topbar-icon-btn i {
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.9);
  transition: color .15s ease;
}

.topbar-icon-calendar:hover i {
  color: #74c0fc;
}

.topbar-icon-notification:hover i {
  color: #ffd43b;
}

/* contador */

.topbar-badge {
  position: absolute;

  top: -4px;
  right: -4px;

  min-width: 18px;
  height: 18px;

  padding: 0 5px;

  border-radius: 999px;

  background: #dc3545;
  color: #fff;

  font-size: 11px;
  font-weight: 700;

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

  border: 2px solid #1C6C34;
}

/* =========================
   DROPDOWN - NOTIFICAÇÕES
========================= */

.notificacoes-dropdown {
  width: 340px;

  padding: 0;

  border: none;
  border-radius: 14px;

  overflow: hidden;

  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}

/* cabeçalho */

.notificacoes-header {
  padding: 14px 16px;

  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;

  font-weight: 700;
  font-size: 0.95rem;
}

/* lista */

.notificacoes-lista {
  max-height: 360px;
  overflow-y: auto;
}

/* item */

.notificacao-item {
  display: block;

  padding: 12px 16px;

  text-decoration: none;
  color: inherit;

  border-bottom: 1px solid #f1f3f5;

  transition: background .15s ease;
}

.notificacao-item:hover {
  background: #f8f9fa;
}

/* título */

.notificacao-titulo {
  font-size: 0.9rem;
  font-weight: 600;
  color: #212529;
}

/* texto */

.notificacao-texto {
  font-size: 0.82rem;
  color: #6c757d;

  margin-top: 2px;
}

/* data */

.notificacao-data {
  font-size: 0.72rem;
  color: #adb5bd;

  margin-top: 4px;
}

/* footer */

.notificacoes-footer {
  padding: 10px 14px;

  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.notificacoes-footer a {
  font-size: 0.85rem;
  font-weight: 600;

  text-decoration: none;
}

/* =========================
   DROPDOWN - RESUMO DO DIA
========================= */

.resumo-dia-dropdown {
  width: 340px;

  padding: 0;

  border: none;
  border-radius: 14px;

  overflow: hidden;

  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}

.resumo-dia-header {
  padding: 14px 16px;

  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;

  font-weight: 700;
  font-size: 0.95rem;
}

.resumo-dia-body {
  padding: 14px 16px;
}

.resumo-dia-data {
  font-size: 20px;
  font-weight: 700;
  color: #1C6C34;

  margin-bottom: 14px;
}

.resumo-dia-section {
  margin-bottom: 14px;
}

.resumo-dia-section:last-child {
  margin-bottom: 0;
}

.resumo-dia-section-title {
  display: flex;
  align-items: center;
  gap: 6px;

  margin-bottom: 6px;

  font-size: 0.8rem;
  font-weight: 700;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.resumo-dia-section-title i {
  color: #1C6C34;
  font-size: 20px;
}

.resumo-dia-item {
  padding: 8px 10px;

  background: #f8f9fa;
  border: 1px solid #edf0f2;
  border-radius: 8px;

  font-size: 0.86rem;
  color: #343a40;

  margin-bottom: 6px;
}

.resumo-dia-footer {
  padding: 10px 14px;

  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.resumo-dia-footer a {
  font-size: 0.85rem;
  font-weight: 600;

  text-decoration: none;
}

/* =========================================================
   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;
}


/* =========================================================
   LAYOUT GLOBAL - FASE 1
========================================================= */

/* altura fixa da navbar */
:root {
  --navbar-height: 56px;
}

/* estrutura principal */
html,
body {
  height: 100%;
}

/* body NÃO rola nas páginas internas */
body:not(.login-page) {
  overflow: hidden;
}

/* navbar fixa */
.nepam-navbar {
  height: var(--navbar-height);
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* estrutura abaixo da navbar */
.app-layout {
  height: calc(100vh - var(--navbar-height));
  display: flex;
  overflow: hidden;
}

/* sidebar fixa */
.sidebar {
  width: 260px;
  min-width: 260px;

  background: #1f3d2b;
  color: #fff;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border-right: 1px solid rgba(255, 255, 255, 0.05);

  transition: width 0.22s ease, min-width 0.22s ease;

}

/* =========================
   SIDEBAR COLLAPSED
========================= */

.sidebar-collapsed {
  width: 78px;
  min-width: 78px;
}

html.sidebar-state-collapsed .sidebar {
  width: 78px;
  min-width: 78px;
  transition: none;
}

html.sidebar-state-collapsed .sidebar .sidebar-link span,
html.sidebar-state-collapsed .sidebar .sidebar-link .bi-chevron-down,
html.sidebar-state-collapsed .sidebar .alerta-alterar-senha {
  display: none;
}

/* =========================
   SIDEBAR COLLAPSED - VISUAL
========================= */

/* usuário */
.sidebar-collapsed .sidebar-user {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

/* avatar menor */
.sidebar-collapsed .sidebar-avatar {
  width: 60px;
  height: 60px;
}

/* mantém nome e matrícula, mas mais compactos */
.sidebar-collapsed .sidebar-user .fw-semibold {
  font-size: 0.78rem;
  margin-top: 4px;
}

.sidebar-collapsed .sidebar-user .small {
  font-size: 0.68rem;
}

/* esconde apenas o alerta de senha no modo compacto */
.sidebar-collapsed .alerta-alterar-senha {
  display: none;
}

/* links no modo compacto */
.sidebar-collapsed .sidebar-link {
  justify-content: center;
  align-items: center;

  width: 100%;
  height: 42px;

  padding-left: 0;
  padding-right: 0;

  gap: 0;
}

/* esconde texto */
.sidebar-collapsed .sidebar-link span {
  display: none;
}

/* esconde seta */
.sidebar-collapsed .sidebar-link .bi-chevron-down {
  display: none;
}

/* tamanho padrão dos ícones da sidebar */
.icone-sidebar {
  font-size: 24px;
}

/* ajustes do modo recolhido sidebar */
.sidebar-collapsed .sidebar-link i,
.sidebar-collapsed .sidebar-link>i:first-child {
  margin: 0;
}

/* submenu escondido */
.sidebar-collapsed .sidebar-group>.collapse {
  display: none !important;
}

/* flyout dos submenus no modo compacto */
.sidebar-flyout {
  position: fixed;
  z-index: 2000;

  min-width: 190px;

  padding: 8px;

  background: #1f3d2b;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;

  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);

  display: none;
}

.sidebar-flyout.show {
  display: block;
}

.sidebar-flyout .sidebar-sublink {
  padding: 8px 12px;
  margin: 2px 0;

  border-radius: 7px;

  color: #ffffffcc;
  font-size: 0.86rem;
}

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

/* botão sair compacto */

.sidebar-collapsed .btn-nepam-danger {
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.sidebar-collapsed .btn-nepam-danger span {
  display: none !important;
}

.sidebar-collapsed .btn-nepam-danger i {
  margin: 0;
}

.sidebar-collapsed .btn-nepam-danger i {
  margin: 0;
  font-size: 1rem;
}



/* menu rolável */
.sidebar-menu {
  flex: 1 1 auto;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  padding-bottom: 18px;
}

/* footer fixo */
.sidebar-footer {
  flex-shrink: 0;
}

/* conteúdo central rolável */
.app-content {
  flex: 1;

  overflow-y: auto;
  overflow-x: hidden;

  background: #f8f9fa;
}

/* =========================
   SCROLLBAR DA SIDEBAR
========================= */

.sidebar-menu {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.sidebar-menu::-webkit-scrollbar {
  width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.32);
}

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

/* USER */
.sidebar-user {
  font-size: 0.9rem;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


.sidebar-user .small {
  font-size: 0.75rem;
  font-style: italic;
  opacity: 0.75;
}

.sidebar-user .fw-semibold {
  margin-top: 4px;
}

.sidebar-user .sidebar-avatar {
  margin-bottom: 4px;
}

.sidebar-avatar {
  width: 86px;
  height: 86px;

  padding: 2px;

  border-radius: 50%;
  border: 3px solid #22c55e;

  background: #ffffff;

  overflow: hidden;

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

  position: relative;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.sidebar-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}



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

/* 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>i:first-child {
  width: 22px;
  min-width: 22px;
  display: inline-flex;
  justify-content: center;
}

.sidebar-link .sidebar-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.sidebar-link[aria-expanded="true"] .sidebar-chevron {
  transform: rotate(180deg);
}

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

/* Minha Área — destaque pessoal */
.sidebar-link-minha-area {
  border-left: 3px solid rgba(255, 196, 0, 0.45);
  padding-left: 9px;
  transition:
    background .18s ease,
    border-left-color .18s ease;
}

.sidebar-link-minha-area:hover {
  background: rgba(255, 196, 0, 0.14);
  border-left-color: rgba(255, 196, 0, 0.9);
  color: #fff;
}

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

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

/* Sublinks da Minha Área com acento dourado */
#menuMinhaArea .sidebar-sublink:hover {
  color: rgba(255, 210, 60, 0.95);
}

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

.sidebar-divider {
  border: none;
  height: 1px;
  margin: .2rem 0;
  background: linear-gradient(to right,
      transparent,
      rgba(255, 255, 255, 0.18),
      transparent);
}


/* submenu (itens dentro do expandido) */
.sidebar-group>.collapse {
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
  margin: 4px 6px 8px 6px;
  padding: 6px 0;
}

.sidebar-group>.collapse .sidebar-sublink {
  padding: 7px 14px 7px 34px;
  border-radius: 6px;
  margin: 1px 6px;
}

.sidebar-group>.collapse .sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
}

.sidebar-group>.collapse {
  transition: all 0.2s ease;
}

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.08);
}

.btn-sair {
  opacity: 0.85;
}


/* Alerta de TROCA DE SENHA (_partials/sidebar) */

.alerta-alterar-senha {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;

  background: #fff4e6;
  border: 1px solid #ffd8a8;
}

.alerta-alterar-senha small {
  display: block;
  margin-bottom: 8px;

  color: #9c4f00;
  font-size: 0.78rem;
  line-height: 1.3;
}

.btn-alterar-senha {
  width: 100%;

  border: 0;
  border-radius: 6px;

  padding: 8px 10px;

  background: #ffe8cc;
  color: #9c4f00;

  font-size: 0.82rem;
  font-weight: 600;

  cursor: pointer;

  transition: 0.2s;
}

.btn-alterar-senha:hover {
  background: #ffd8a8;
}

/* MODAL ALTERAR SENHA */

.modal-title {
  color: #212529 !important;
}

.modal .form-label {
  color: #212529 !important;
  font-weight: 600;
}


/* AGRUPAMENTO POR ANO / SETOR (prontuários, acompanhamento) */
/* AGRUPAMENTO POR ANO / SETOR (prontuários, acompanhamento) */

.ppgas-year-group {
  margin-bottom: 2.5rem;
}

.ppgas-year-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--nepam-verde, #1a6b3c);
  border-bottom: 2px solid var(--nepam-verde, #1a6b3c);
  padding-bottom: 8px;
  margin-bottom: 1.25rem;
}

/* ==========================================
   COMPONENTE GLOBAL
   AÇÕES FLUTUANTES EM CARD

   Usado em:
   - PPGA&S / Prontuários
   - PPGA&S / Acompanhamento Acadêmico
   - Contatos / Cards de pessoas
   - Outros cards com ação contextual
========================================== */

.card-edit-wrapper,
.card-acoes-hover {
  position: relative;
}

.card-edit-btn {
  position: absolute;
  bottom: 8px;
  right: 12px;

  width: 32px;
  height: 32px;
  border-radius: 50%;

  border: none;
  background: #c8c8c8;
  color: #111111;

  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);

  z-index: 950;

  transition:
    opacity 0.14s ease,
    visibility 0.14s ease,
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.card-acoes-hover .card-edit-btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.card-acoes-hover:hover .card-edit-btn,
.card-acoes-hover:focus-within .card-edit-btn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.card-edit-btn:hover {
  transform: translateY(-1px);
  background: #1c6c34;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.card-edit-btn:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(28, 108, 52, 0.22),
    0 10px 22px rgba(0, 0, 0, 0.18);
}

/* HOVER GLOBAL EM LISTAS */

table tbody tr:hover > td,
table tbody tr:hover > th {
  background-color: #edf2f7 !important;
  transition: background-color .12s ease;
}

.list-group-item {
  transition: background-color .12s ease;
}

.list-group-item:hover {
  background-color: #edf2f7;
}

/* ==========================================================
   RESPONSIVIDADE — TABLET (768px – 991px)
   Sidebar auto-colapsa para modo ícones (78px)
========================================================== */

@media (max-width: 991px) and (min-width: 768px) {
  .sidebar {
    width: 78px !important;
    min-width: 78px !important;
  }

  .sidebar .sidebar-link span,
  .sidebar .sidebar-link .bi-chevron-down,
  .sidebar .alerta-alterar-senha {
    display: none !important;
  }

  .sidebar .sidebar-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
  }

  .sidebar .sidebar-user {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .sidebar .sidebar-avatar {
    width: 60px;
    height: 60px;
  }

  .sidebar .sidebar-user .fw-semibold,
  .sidebar .sidebar-user .small {
    display: none;
  }

  .sidebar .sidebar-group > .collapse {
    display: none !important;
  }

  .sidebar .btn-nepam-danger {
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
  }

  .sidebar .btn-nepam-danger span { display: none !important; }
  .sidebar .btn-nepam-danger i { margin: 0; font-size: 1rem; }
}

/* ==========================================================
   RESPONSIVIDADE — MOBILE (< 768px)
   Sidebar sempre em modo ícone (78px): home = visível, demais = drawer
========================================================== */

@media (max-width: 767px) {

  /* --- Sidebar: 78px, fora da tela por padrão --- */
  .sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    height: calc(100vh - var(--navbar-height));
    z-index: 1045;
    width: 78px !important;
    min-width: 78px !important;
    transform: translateX(-78px);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }

  /* visual ícone em todo mobile */
  .sidebar .sidebar-link span,
  .sidebar .sidebar-link .bi-chevron-down,
  .sidebar .alerta-alterar-senha,
  .sidebar .sidebar-user .fw-semibold,
  .sidebar .sidebar-user .small { display: none !important; }

  .sidebar .sidebar-link { justify-content: center; padding-left: 0; padding-right: 0; gap: 0; }
  .sidebar .sidebar-user { padding-left: 8px !important; padding-right: 8px !important; }
  .sidebar .sidebar-avatar { width: 52px; height: 52px; }
  .sidebar .sidebar-group > .collapse { display: none !important; }

  .sidebar .btn-nepam-danger {
    width: 42px; height: 42px; min-height: 42px; padding: 0;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; margin: 0 auto;
  }
  .sidebar .btn-nepam-danger span { display: none !important; }
  .sidebar .btn-nepam-danger i { margin: 0; font-size: 1rem; }

  /* --- Sidebar visível (hamburguer ou home) --- */
  body.sidebar-mobile-open .sidebar {
    transform: translateX(0);
  }

  /* --- Backdrop --- */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--navbar-height);
    background: rgba(0, 0, 0, 0.48);
    z-index: 1040;
  }

  body.sidebar-mobile-open .sidebar-backdrop { display: block; }

  /* home: sem backdrop (sidebar é nav permanente) */
  body.sidebar-mobile-visivel .sidebar-backdrop { display: none !important; }

  /* --- Layout --- */
  .app-layout { overflow-x: hidden; }

  .app-content {
    width: 100vw;
    padding: 1rem !important;
    padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0px)) !important;
    margin-left: 0 !important;
  }

  /* home: conteúdo desloca 78px enquanto sidebar visível */
  body.sidebar-mobile-visivel.sidebar-mobile-open .app-content {
    margin-left: 78px !important;
    width: calc(100vw - 78px) !important;
  }

  /* --- Navbar: acima da sidebar para dropdowns não ficarem atrás --- */
  .nepam-navbar { z-index: 1050 !important; }
  .nepam-navbar .container-fluid { flex-wrap: nowrap; }
  .navbar-saudacao { display: none !important; }

  /* --- Dropdowns --- */
  .resumo-dia-dropdown,
  .notificacoes-dropdown {
    position: fixed !important;
    top: calc(var(--navbar-height) + 4px) !important;
    right: 12px !important;
    left: auto !important;
    width: calc(100vw - 24px) !important;
    max-width: 340px;
    z-index: 1050 !important;
  }

  .topbar-icon-btn { width: 38px; height: 38px; }
  .topbar-actions { gap: 6px; }

  /* --- Tabelas --- */
  .table-responsive-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ---- MODO SOMENTE LEITURA ----
     Oculta todos os botões de ação de gestão no mobile.
     Mantém apenas botões de visualização/navegação. */

  /* botões inline: editar, excluir, setas, desativar, dropdown de pasta */
  .btn-acao-nepam { display: none !important; }

  /* botões primários "Novo X" / "Nova pasta" (contêm ícone +) */
  .btn-nepam:has(.bi-plus-lg),
  .btn-nepam:has(.bi-plus) { display: none !important; }

  /* esconde coluna de ações nas tabelas para não deixar coluna vazia */
  th:last-child:empty,
  td:last-child:empty { display: none !important; }
}

