/* ================================================================
   SIDEBAR — Menu lateral moderno
   NÃO altera regras do site original; apenas posiciona o menu
   ================================================================ */

/* ── Botão hamburguer (mobile) ── */
.sidebar-toggle-float {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0B3D91, #1049A8);
  color: #fff;
  font-size: 1.3rem;
  border: none;
  box-shadow: 0 4px 16px rgba(11,61,145,.35);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.sidebar-toggle-float:hover { transform: scale(1.05); }

/* ── Overlay ── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all .25s ease;
}
.sidebar-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 12px rgba(11,61,145,.08);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(-110%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.sidebar.is-open { transform: translateX(0); }

/* Header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.sidebar-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}
.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.sidebar-brand-text strong {
  font-size: .88rem;
  color: #0B3D91;
  font-weight: 700;
}
.sidebar-brand-text small {
  font-size: .6rem;
  color: #8898aa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sidebar-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: .6rem .6rem;
  overflow-y: auto;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .75rem;
  margin-bottom: .25rem;
  border-radius: 10px;
  text-decoration: none;
  color: #475569;
  font-size: .82rem;
  font-weight: 600;
  transition: all .15s ease;
  position: relative;
}
.sidebar-link:hover {
  background: #f1f5f9;
  color: #0B3D91;
}
.sidebar-link.active {
  background: linear-gradient(135deg, #0B3D91, #1049A8);
  color: #fff;
  box-shadow: 0 3px 10px rgba(11,61,145,.22);
}
.sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.sidebar-indicator {
  position: absolute;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F7B731;
}

/* Footer */
.sidebar-footer {
  padding: .6rem;
  border-top: 1px solid #e2e8f0;
}
.sidebar-footer-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: linear-gradient(135deg,#FFF9E6,#FFF3CD);
  border: 1px solid #FDE68A;
  border-radius: 10px;
  padding: .45rem .6rem;
}
.sidebar-footer-badge span { font-size: .95rem; }
.sidebar-footer-badge small {
  font-size: .62rem;
  color: #92400E;
  font-weight: 600;
}

/* ================================================================
   DESKTOP — sidebar visível, conteúdo empurrado via padding-left
   ================================================================ */
@media (min-width: 900px) {
  .sidebar-toggle-float { display: none !important; }
  .sidebar-overlay       { display: none !important; }
  .sidebar-close         { display: none !important; }

  .sidebar {
    transform: none !important;
  }

  /* empurra todo o conteúdo do site para a direita */
  body.portal-body {
    padding-left: 240px !important;
  }
}

/* ================================================================
   MOBILE — drawer + botão hamburguer, sem padding
   ================================================================ */
@media (max-width: 899px) {
  .sidebar-toggle-float { display: flex !important; }

  body.portal-body {
    padding-left: 0 !important;
  }
}
