/* ═══════════════════════════════════════════════════════════════════
   NEXUS HUB — DESIGN SYSTEM (MAGIKPUNK)
   Foza Studio · Cotonou, Bénin · 2026
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --nx-bg: #04040D;
  --nx-cyan: #00CEC9;
  --nx-violet: #5B4EE8;
  --nx-glass: rgba(255, 255, 255, 0.03);
  --nx-glass-border: rgba(255, 255, 255, 0.1);
  --nx-glow: 0 0 15px var(--nx-violet), 0 0 5px var(--nx-cyan);
}

/* ── SIDEBAR STRUCTURE ────────────────────────────────────────── */
.nexus-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;
  background: var(--nx-bg);
  border-right: 1px solid var(--nx-glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  z-index: 10000;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 10px 0 30px rgba(0,0,0,0.5);
  transform: translateX(-100%); /* Hidden by default */
}

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

.nx-nav {
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  gap: 8px;
}

.nx-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
}

.nx-link:hover {
  background: var(--nx-glass);
  border-color: var(--nx-glass-border);
}

.nx-link.active {
  background: rgba(91, 78, 232, 0.2);
  border-color: var(--nx-violet);
  box-shadow: 0 0 10px rgba(91, 78, 232, 0.3);
}

.nx-toggle-btn {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10001;
  background: var(--nx-violet);
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 11px;
  box-shadow: var(--nx-glow);
  transition: all 0.3s ease;
  opacity: 0.8;
}

.nx-toggle-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

.nx-toggle-btn.hidden {
  transform: translateX(-100px);
  opacity: 0;
  pointer-events: none;
}

/* ── RBAC & GATING (FLOU AFFINÉ) ────────────────────────────────── */
.nx-link.gated {
  filter: blur(1px); /* Reduced blur for readability */
  opacity: 0.6;
  cursor: not-allowed !important;
  pointer-events: none;
  position: relative;
}

.nx-badge-locked {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--nx-violet);
  background: rgba(91, 78, 232, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  border: 1px solid var(--nx-violet);
  filter: none !important; /* Ensure text is readable */
}

/* ── USER SECTION ─────────────────────────────────────────────── */
.nx-user-section {
  padding: 24px;
  border-top: 1px solid var(--nx-glass-border);
  background: rgba(0,0,0,0.2);
}

.nx-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--nx-glass);
  border: 1px solid var(--nx-glass-border);
}

.nx-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nx-violet), var(--nx-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  box-shadow: var(--nx-glow);
}

.nx-user-info {
  flex: 1;
  overflow: hidden;
}

.nx-user-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.nx-user-pm {
  font-size: 12px;
  color: var(--nx-cyan);
  font-weight: 700;
}

/* ── ANIMATIONS & GLITCH ──────────────────────────────────────── */
.glitch-single:hover {
  animation: nexusGlitch 0.2s linear 1;
  text-shadow: 2px 0 var(--nx-violet), -2px 0 var(--nx-cyan);
}

.glitch-continuous:hover {
  animation: nexusGlitch 0.2s linear infinite;
  text-shadow: 2px 0 var(--nx-violet), -2px 0 var(--nx-cyan);
}

@keyframes nexusGlitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(-2px, -1px); }
  60% { transform: translate(2px, 1px); }
  80% { transform: translate(2px, -1px); }
  100% { transform: translate(0); }
}

.nx-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
