/* ==========================================================================
   SISUNI Intranet - Admin CSS
   Estrutura:
   1) Base e layout geral
   2) Navbar e containers
   3) Títulos de página
   4) Cartões e atalhos
   5) Tabelas e listagens
   6) Botões e ícones
   7) Formulários e validações
   8) Toasts e mensagens flutuantes
   9) Rodapé e sticky footer
   ========================================================================== */


/* ==========================================================================
   1) Base e layout geral
   ========================================================================== */
:root {
  --intra-bg: #f7f9fc;
  --intra-card: #ffffff;
  --intra-muted: #6b7280;
}

html, body { height: 100%; }

.intra-body {
  background: var(--intra-bg);
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Sticky footer via flex no body */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.intra-main { flex: 1 0 auto; } /* conteúdo cresce empurrando o rodapé */


/* ==========================================================================
   2) Navbar e containers
   ========================================================================== */
.navbar .navbar-brand svg { vertical-align: middle; }
.navbar .nav-link svg { margin-right: .35rem; }
.container { max-width: 1200px; }

.btn-pill { border-radius: 999px; }


/* ==========================================================================
   3) Títulos de página
   ========================================================================== */
.page-title .card-body {
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  border-radius: 12px;
}
.page-title h4 {
  font-weight: 700;
}


/* ==========================================================================
   4) Cartões e atalhos
   ========================================================================== */
.card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: var(--intra-card);
}

.quick-card {
  transition: transform .15s ease, box-shadow .15s ease;
  border-radius: 14px;
}
.quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}


/* ==========================================================================
   5) Tabelas e listagens
   ========================================================================== */
.table thead th a {
  color: var(--bs-primary) !important;
  font-weight: 600;
  text-decoration: none;
}
.table thead th a:hover {
  text-decoration: underline;
}

/* Cabeçalho da coluna Ações, mesma cor dos links */
.table thead th.actions-header {
  color: var(--bs-primary);
  font-weight: 600;
  text-align: center;
}

/* Linhas mais confortáveis em telas pequenas */
.table td, .table th {
  vertical-align: middle;
}


/* ==========================================================================
   6) Botões e ícones
   ========================================================================== */
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Melhor contraste para outline em fundo claro */
.btn-outline-primary { --bs-btn-color:#0d6efd; --bs-btn-border-color:#0d6efd; }
.btn-outline-primary:hover { --bs-btn-bg:#0d6efd; --bs-btn-color:#fff; }

.btn-outline-secondary { --bs-btn-color:#6c757d; --bs-btn-border-color:#6c757d; }
.btn-outline-secondary:hover { --bs-btn-bg:#6c757d; --bs-btn-color:#fff; }


/* ==========================================================================
   7) Formulários e validações
   ========================================================================== */
.form-text { color: #475569; } /* dicas legíveis */

.required-asterisk {
  color: #dc2626;
  margin-left: .25rem;
}

/* Evita sombra vermelha exagerada do HTML5 e mantém o estilo Bootstrap */
input:invalid, select:invalid, textarea:invalid {
  box-shadow: none;
}

/* Campos pequenos opcionais */
.input-sm .form-control {
  padding-top: .4rem;
  padding-bottom: .4rem;
  font-size: .95rem;
}

/* Ícones dentro de input-group */
.input-group-text svg { display: block; }


/* ==========================================================================
   8) Toasts e mensagens flutuantes
   ========================================================================== */
.toast-wrap {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(640px, 92vw);
  pointer-events: none;
}

.toast-balloon {
  width: 100%;
  padding: 12px 14px 12px 12px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: auto;
  position: relative;
}
.toast-balloon.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  width: 24px; height: 24px; flex: 0 0 24px;
  display: inline-flex; align-items: center; justify-content: center;
}
.toast-text { flex: 1 1 auto; font-size: .95rem; }

.toast-close {
  border: 0; 
  background: transparent; 
  padding: 2px 4px;
  line-height: 1; 
  cursor: pointer; 
  color: #475569;
  pointer-events: auto;
}

.toast-ok   { border-color: #c7f9cc; background: #f0fff4; }
.toast-err  { border-color: #fecaca; background: #fff5f5; }
.toast-ok .toast-icon  { color: #16a34a; }
.toast-err .toast-icon { color: #dc2626; }


/* ==========================================================================
   9) Rodapé e sticky footer
   ========================================================================== */
.intra-footer {
  flex-shrink: 0;
  color: #0f172a;
  border-top: 1px solid #e5e7eb;
  background:
    radial-gradient(1200px 120px at 50% 0%, #eef2ff, transparent 60%),
    #ffffff;
}

.intra-footer .footer-top .fw-semibold { color: #0f172a; }
.intra-footer .text-muted { color: #64748b !important; }

.intra-footer .footer-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}
.intra-footer .footer-wave path {
  fill: #eef2ff;
}

.intra-footer .footer-bottom {
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

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

/* Balões locais de formulário um pouco mais abaixo da navbar */
.toast-wrap.form-local { top: 84px; }

/* Responsividade */
@media (max-width: 576px) {
  .toast-wrap { width: calc(100vw - 24px); }
}
