/* ═══════════════════════════════════════════
   NAVBAR.CSS — Navigation Bar
   CyberEduc
═══════════════════════════════════════════ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  background: rgba(10, 12, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition-s);
}

/* ── Logo ── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--green);
  letter-spacing: -2px;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.03em;
}

/* ── Nav Links ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-3);
}

.nav-links a.active {
  color: var(--green);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--green);
  border-radius: 50%;
}

/* ── Auth Buttons ── */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-auth .btn-ghost {
  padding: 8px 18px;
  font-size: 14px;
}

.nav-auth .btn-primary {
  padding: 8px 18px;
  font-size: 14px;
}

/* ── Burger (mobile) ── */
.nav-burger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .navbar {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 16px;
  }

  .nav-auth {
    display: none;
  }

  .nav-burger {
    display: block;
  }
}



/* ══════════════════════════
   Add this at the end of navbar.css
   NAV USER (logged in state)
══════════════════════════ */

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  padding: 4px 8px;
  border-radius: var(--radius);
}

.nav-user:hover {
  background: var(--bg-3);
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}

.nav-user-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

/* ══════════════════════════
   NAV USER BUTTON (logged in)
══════════════════════════ */

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 16px 4px 4px;
  cursor: pointer;
  transition: var(--transition);
}

.nav-user-btn:hover {
  border-color: var(--green);
  background: var(--green-glow-s);
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}

.nav-user-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

/* ══════════════════════════
   SIDEBAR OVERLAY
══════════════════════════ */

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

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

/* ══════════════════════════
   SIDEBAR
══════════════════════════ */

.sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  background: var(--bg-2);
  border-right: 1px solid var(--border-light);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.sidebar.active {
  left: 0;
}

/* ── Sidebar Header ── */

.sb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}

.sb-user {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sb-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.sb-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.sb-email {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.sb-level {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  margin-top: 2px;
}

.sb-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: var(--transition);
}

.sb-close:hover {
  color: var(--text);
}

/* ── Sidebar Navigation ── */

.sb-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.sb-link:hover {
  background: var(--bg-3);
  color: var(--text);
}

.sb-link-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sb-link--danger {
  color: var(--red);
}

.sb-link--danger:hover {
  background: rgba(255, 68, 85, 0.08);
  color: var(--red);
}

.sb-link--logout {
  color: var(--text-muted);
}

.sb-link--logout:hover {
  background: rgba(255, 68, 85, 0.08);
  color: var(--red);
}

/* ── Sidebar Divider ── */

.sb-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 20px;
}

/* ── Sidebar Section Label ── */

.sb-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 16px 26px 4px;
}

/* ── Sidebar Footer ── */

.sb-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.sb-footer span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* ══════════════════════════
   RESPONSIVE
══════════════════════════ */

@media (max-width: 768px) {
  .sidebar {
    width: 280px;
    left: -280px;
  }

  .nav-user-name {
    display: none;
  }

  .nav-user-btn {
    padding: 4px;
    border: none;
  }
}

/* Fix submenu layout */
.sb-submenu {
  display: flex;
  flex-direction: column;
  padding: 4px 0 4px 48px;
  gap: 0;
}

.sb-sublink {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.sb-sublink:hover {
  background: var(--bg-3);
  color: var(--text);
}

.sb-sublink.sb-link--danger {
  color: var(--red);
}

.sb-sublink.sb-link--danger:hover {
  background: rgba(255, 68, 85, 0.08);
}

/* Lucide icons in sidebar */
.sb-icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
  flex-shrink: 0;
}

.sb-link .sb-icon {
  color: var(--text-muted);
}

.sb-link:hover .sb-icon {
  color: var(--text);
}

.sb-link--danger .sb-icon {
  color: var(--red);
}

.sb-link--logout .sb-icon {
  color: var(--text-muted);
}

.sb-link--logout:hover .sb-icon {
  color: var(--red);
}