/* ===== SIDEBAR / MENU LATERAL ===== */

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 60;
  pointer-events: none;
  transition: background 0.3s ease;
}

.sidebar-overlay.active {
  background: rgba(0, 0, 0, 0.5);
  pointer-events: all;
}

.sidebar-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: #ffffff;
  z-index: 70;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar-panel.open {
  transform: translateX(0);
}

/* Header da sidebar */
.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header .sidebar-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.sidebar-close-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  color: #6b7280;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-close-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

/* Perfil do usuário */
.sidebar-profile {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-avatar svg {
  color: white;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 21px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 15px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navegação */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.sidebar-nav-group {
  padding: 0 12px;
  margin-bottom: 8px;
}

.sidebar-nav-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
  padding: 8px 12px 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  color: #374151;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: #f3f4f6;
}

.sidebar-nav-item:active {
  background: #e5e7eb;
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  color: #6b7280;
}

.sidebar-nav-item span {
  flex: 1;
}

.sidebar-nav-item .nav-badge {
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Separador */
.sidebar-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 8px 20px;
}

/* Footer da sidebar */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
}

.sidebar-footer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  color: #ef4444;
  font-size: 17px;
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-footer-item:hover {
  background: #fef2f2;
}

.sidebar-footer-item svg {
  flex-shrink: 0;
}

/* Botão hamburger no header */
.hamburger-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hamburger-btn svg {
  width: 28px;
  height: 28px;
}

/* Versão */
.sidebar-version {
  text-align: center;
  font-size: 14px;
  color: #374151;
  padding: 8px 0 4px;
}
