/* ===== Sidebar ===== */
.sidebar {
  width: 256px;
  background: linear-gradient(180deg, #1A1F2E 0%, #151923 100%);
  color: #A7AFC0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width var(--transition-normal), transform var(--transition-normal);
  z-index: 20;
  flex-shrink: 0;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.logo-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(59,130,246,.3);
  flex-shrink: 0;
}
.logo-title { color: #fff; font-weight: 700; font-size: 15px; }
.logo-sub { color: #6B7388; font-size: 11px; margin-top: 1px; }

/* Navigation */
.nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #4B5267;
  padding: 18px 12px 6px;
  font-weight: 700;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #8B93A7;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
}
.nav-link .ico {
  width: 22px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.nav-link:hover {
  background: rgba(255,255,255,.05);
  color: #D1D5DB;
}
.nav-link.active {
  background: linear-gradient(90deg, rgba(59,130,246,.18), rgba(139,92,246,.08));
  color: #fff;
  box-shadow: inset 3px 0 0 #3B82F6;
  font-weight: 600;
}
.nav-link.active .ico { filter: brightness(1.3); }

/* Nav badge */
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.user-name { color: #fff; font-size: 13px; font-weight: 600; }
.user-role { color: #6B7388; font-size: 11px; }

/* Mobile sidebar */
.sidebar-toggle {
  display: none;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  padding: 4px 8px;
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
}
