/* ═══════════════════════════════════════════════════════════════
   UPBeja – Calendarização de Avaliações · style.css
═══════════════════════════════════════════════════════════════ */

:root {
  --ipb-azul:     #003878;
  --ipb-azul-med: #1a56db;
  --ipb-vermelho: #c8102e;
  --ipb-cinza:    #f4f6f9;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.ipb-navbar {
  background: linear-gradient(135deg, var(--ipb-azul) 0%, #00509e 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.ipb-navbar .nav-link          { color: rgba(255,255,255,.85) !important; font-size: .875rem; }
.ipb-navbar .nav-link:hover,
.ipb-navbar .nav-link.active   { color: #fff !important; border-bottom: 2px solid rgba(255,255,255,.7); }

/* ── Card header ────────────────────────────────────────────── */
.ipb-card-header {
  background: linear-gradient(135deg, var(--ipb-azul) 0%, #00509e 100%);
  color: #fff;
}
.ipb-card-header h5 { font-size: .95rem; }

/* ── Body ───────────────────────────────────────────────────── */
body { background: var(--ipb-cinza); font-size: .9rem; }

/* ── Flatpickr overrides ────────────────────────────────────── */
.flatpickr-day.blocked,
.flatpickr-day.flatpickr-disabled { background: #ffe0e0 !important; color: #c0392b !important; }
.flatpickr-day.has-event          { background: #d6eaff !important; font-weight: 700; }
.flatpickr-day.selected,
.flatpickr-day.selected:hover     { background: var(--ipb-azul) !important; border-color: var(--ipb-azul) !important; }

/* ── FullCalendar tweaks ────────────────────────────────────── */
#calendarContainer { min-height: 600px; }
.fc-event            { cursor: pointer; font-size: .78rem; }
.fc-toolbar-title    { font-size: 1rem !important; }
.fc .fc-button       { background: var(--ipb-azul) !important; border-color: var(--ipb-azul) !important; font-size: .8rem; }
.fc .fc-button:hover { background: #00509e !important; }
.fc .fc-button-active{ background: var(--ipb-vermelho) !important; border-color: var(--ipb-vermelho) !important; }

/* ── Tabelas ────────────────────────────────────────────────── */
.table th { font-size: .8rem; white-space: nowrap; }
.table td { font-size: .82rem; vertical-align: middle; }

/* ── Estado badges ──────────────────────────────────────────── */
.badge-pendente  { background: #ffc107; color: #000; }
.badge-aprovado  { background: #198754; color: #fff; }
.badge-rejeitado { background: #dc3545; color: #fff; }

/* ── Legenda de períodos ────────────────────────────────────── */
.periodo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px; font-size: .78rem;
  border: 1px solid rgba(0,0,0,.1);
}

/* ── Alerta de conflito ─────────────────────────────────────── */
#alertaConflito .conflito-item {
  background: #fff3cd; border-left: 4px solid #ffc107;
  padding: 8px 12px; border-radius: 4px; margin-bottom: 6px;
  font-size: .83rem;
}
#alertaConflito .conflito-critico {
  background: #f8d7da; border-left-color: #dc3545;
}

/* ── Legenda calendário ─────────────────────────────────────── */
.legenda-cor {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .8rem; padding: 3px 10px;
  border-radius: 12px; border: 1px solid rgba(0,0,0,.12);
  background: #fff;
}
.legenda-cor-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}

/* ── Stats cards ────────────────────────────────────────────── */
.stat-card {
  background: #fff; border-radius: 8px;
  padding: 1rem 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.08);
  border-left: 4px solid var(--ipb-azul);
}
.stat-card .stat-num  { font-size: 2rem; font-weight: 700; color: var(--ipb-azul); line-height: 1; }
.stat-card .stat-lbl  { font-size: .78rem; color: #6c757d; }

/* ── btn-xs (não existe no Bootstrap 5) ─────────────────────── */
.btn-xs {
  padding: 2px 7px; font-size: .75rem; border-radius: 3px; line-height: 1.4;
}

/* ── Spinner de carregamento ────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}

/* ── Sem sessão: esconde a navegação ────────────────────────── */
body.sem-sessao .navbar .navbar-collapse,
body.sem-sessao .navbar .navbar-toggler { display: none !important; }
