/* Sidebar lateral fixa — compartilhada entre index/admin/triagem/dashboard. */

.sidebar {
  flex-shrink: 0;
  width: 76px;
  background: var(--bg-elevado);
  border-right: 1px solid var(--linha);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  z-index: 41;
}

.sidebar-marca {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  border-bottom: 1px solid var(--linha);
  flex-shrink: 0;
}
.sidebar-marca-texto {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--acento-ink);
}

.sidebar-lista {
  list-style: none;
  margin: 0;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 3px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink-suave);
  width: 100%;
  min-width: 0;
}
.sidebar-item:hover { background: var(--bg); color: var(--ink); }
.sidebar-item.ativo {
  background: var(--acento-suave);
  color: var(--acento-ink);
}
.sidebar-item-titulo {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.sidebar-rodape {
  padding: 12px 4px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-suave);
  border-top: 1px solid var(--linha);
  flex-shrink: 0;
}

/* ------------------------------------------------------- botão hambúrguer
   Só aparece em telas estreitas — ver breakpoint abaixo. Em desktop a
   sidebar fica sempre visível e este botão some. */

.btn-hamburguer {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 4px;
}
.btn-hamburguer:hover { background: rgba(255, 255, 255, 0.22); }
.btn-hamburguer svg { display: block; }
.btn-hamburguer rect { fill: var(--topo-ink); }

.menu-fundo {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 22, 0.38);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.menu-fundo.aberto { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .btn-hamburguer { display: inline-flex; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    max-width: 84vw;
    transform: translateX(-100%);
    transition: transform 200ms cubic-bezier(0.2, 0.8, 0.3, 1);
    box-shadow: var(--sombra);
  }
  .sidebar.aberto { transform: translateX(0); }

  .sidebar-marca { justify-content: flex-start; padding: 0 16px; gap: 10px; }
  .sidebar-marca::after {
    content: "Radar de Licitações";
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
  }

  .sidebar-lista { padding: 10px; }
  .sidebar-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 11px 12px;
  }
  .sidebar-item-titulo { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .menu-fundo { transition: none; }
}
