/* Estilos Globais */
body {
    padding-top: 70px; /* Altura da navbar */
    padding-bottom: 60px; /* Altura do footer */
    background-image: url('../img/background3.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Poppins', sans-serif; /* Define a nova fonte padrão */
}

/* Container de vidro para o painel */
.card-glass-container {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
}

/* Estilo da Navbar */
.navbar-custom {
    background-color: #023373; /* Cor Primária Oficial */
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
    color: #ffffff;
    display: flex;
    align-items: center; /* Alinha ícone e texto verticalmente */
    gap: 0.5rem; /* Espaçamento entre ícone e texto */
}

.navbar-custom .nav-link.active {
    font-weight: bold;
}

/* Dropdown de Usuário na Navbar */
.user-dropdown .user-avatar {
    font-size: 1.5rem; /* Tamanho do ícone ajustado */
    margin-right: 10px;
}
.user-dropdown .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.user-dropdown .user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-dropdown .user-role {
    font-size: 0.75rem;
    opacity: 0.8;
}

.user-dropdown {
    display: flex;
    align-items: center;
}

.user-menu {
    border-radius: .5rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
    border: none;
}


/* Estilo do Footer */
.footer-custom {
    background-color: #023373; /* Cor Primária Oficial */
    color: #ffffff;
    padding: 1rem 0;
}

/* Título do painel administrativo com barra colorida */
.panel-title {
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 4px solid #049DD9;
    font-size: 1.5rem; /* Tamanho da fonte ajustado */
}

/* Botão customizado com efeito 3D */
.btn-12 {
  border: none;
  box-shadow: none;
  width: 210px;
  height: 40px;
  line-height: 42px;
  -webkit-perspective: 230px;
  perspective: 230px;
  display: inline-block;
  position: relative;
}
.btn-12 span {
  top: 0;
  left: 0;
  background: linear-gradient(0deg, rgba(0,172,238,1) 0%, rgba(2,126,251,1) 100%);
  display: block;
  position: absolute;
  width: 100%;
  height: 40px;
  box-shadow: inset 2px 2px 2px 0px rgba(255,255,255,.5),
    7px 7px 20px 0px rgba(0,0,0,.1),
    4px 4px 5px 0px rgba(0,0,0,.1);
  border-radius: 5px;
  margin: 0;
  text-align: center;
  box-sizing: border-box;
  transition: all .3s;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
}
.btn-12 span i {
  color: #fff !important;
}
.btn-12 span:nth-child(1) {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  -webkit-transform: rotateX(90deg);
  -moz-transform: rotateX(90deg);
  transform: rotateX(90deg);
  transform-origin: 50% 50% -20px;
}
.btn-12 span:nth-child(2) {
  -webkit-transform: rotateX(0deg);
  -moz-transform: rotateX(0deg);
  transform: rotateX(0deg);
  transform-origin: 50% 50% -20px;
}
.btn-12:hover span:nth-child(1) {
  box-shadow: inset 2px 2px 2px 0px rgba(255,255,255,.5),
    7px 7px 20px 0px rgba(0,0,0,.1),
    4px 4px 5px 0px rgba(0,0,0,.1);
  -webkit-transform: rotateX(0deg);
  -moz-transform: rotateX(0deg);
  transform: rotateX(0deg);
}
.btn-12:hover span:nth-child(2) {
  box-shadow: inset 2px 2px 2px 0px rgba(255,255,255,.5),
    7px 7px 20px 0px rgba(0,0,0,.1),
    4px 4px 5px 0px rgba(0,0,0,.1);
  -webkit-transform: rotateX(-90deg);
  -moz-transform: rotateX(-90deg);
  transform: rotateX(-90deg);
}

/* Texto com cor da marca */
.text-custom {
    color: #049DD9 !important;
}

/* Cards com altura igual */
.card-stretch {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-stretch .card-body {
    flex: 1;
}

/* Overlay de Carregamento Global */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 51, 115, 0.97); /* Cor Primária Oficial com transparência */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.no-scroll {
    overflow: hidden;
}

/* Nova regra para ícones dentro do .btn-12: tornam-se brancos */
.btn-12 span i.text-custom {
    color: #fff !important;
}

/* Toast notifications */
.toast-container .toast {
  background-color: rgba(2, 51, 115, 0.95); /* Cor primária com opacidade */
  color: #fff;
  border: none;
  border-radius: 0.25rem;
  min-width: 250px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-radius: 0.25rem;
  color: #fff;
  background-color: #333; /* Cor padrão */
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateX(-120%); /* Começa totalmente à esquerda, fora da tela */
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}
.toast-container .toast .toast-header {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 600;
}
.toast-container .toast .btn-close {
  filter: invert(1);
  opacity: 0.7;
}
.toast-container .toast-body {
  padding: 0.5rem 1rem;
}
.toast-container {
  bottom: 60px !important; /* Eleva 60px acima do rodapé */
  z-index: 11000; /* Acima do overlay */
}

/* Botão para fechar o toast */
.toast-close-button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    margin-left: 1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.toast-close-button:hover {
    opacity: 1;
}

/* Toast slide animations */
.toast-container .toast {
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}
.toast-container .toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast-container .toast.hide {
  transform: translateX(100%);
  opacity: 0;
}

/* Mapeamento de categorias Flask/Bootstrap para cores de fundo */
.toast.toast-success {
    background-color: #198754;
}
.toast.toast-danger {
    background-color: #dc3545;
}
.toast.toast-warning {
    background-color: #ffc107;
    color: #000;
}
.toast.toast-info {
    background-color: #0dcaf0;
}

/* Botões na Navbar */
.btn-nav {
  background-color: #049DD9;
  color: #fff;
  border: none;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.3s;
}
.btn-nav:hover {
  background-color: #2B49A3; /* Tom de destaque no hover */
}

/* Efeito de destaque "glow" para botões e campos de busca */
@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(4, 157, 217, 0.7); }
  50%    { box-shadow: 0 0 15px rgba(4, 157, 217, 1); }
}

.glow-button {
  animation: glow 2s infinite ease-in-out;
}

/* Opcional: destacar link de chat ou outros links na navbar */
.nav-chat-highlight {
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  animation: glow 2s infinite ease-in-out;
}

/* Override de largura do botão 3D em cards para evitar overflow */
.card-stretch .btn-12 {
    width: 100%;
    max-width: 210px;
    margin: 0 auto;
    display: block;
    box-sizing: border-box;
}
