/* ===========================================
   StudyMate Suite — Persistent Navigation Bar
   Dark glass top bar + dropdown menus
   =========================================== */

/* ---------- Nav Container ---------- */
.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  height: 48px;
  display: flex;
  align-items: center;
  font-family: 'Inter', system-ui, sans-serif;
  user-select: none;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ---------- Body Padding ---------- */
body {
  padding-top: 48px !important;
}

/* ---------- Inner Row ---------- */
.nav-inner {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 12px;
  gap: 8px;
}

/* ---------- Hamburger ---------- */
.nav-hamburger {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.75);
  font-size: 1.15rem;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.nav-hamburger:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ---------- Brand ---------- */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-brand:hover { opacity: 0.85; }
.nav-brand i {
  color: #a5b4fc;
  font-size: 1.05rem;
}
.nav-spacer { flex: 1; }

/* ---------- User Button ---------- */
.nav-user-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-size: 1.35rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.nav-user-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ---------- Nav Icon Buttons (dark toggle, sync) ---------- */
.nav-icon-btn {
  width: 34px; height: 34px; border: none;
  background: transparent; color: rgba(255,255,255,0.55);
  font-size: 1.05rem; cursor: pointer;
  border-radius: 8px; display: flex;
  align-items: center; justify-content: center;
  transition: all 0.2s ease; flex-shrink: 0;
}
.nav-icon-btn:hover {
  background: rgba(255,255,255,0.08); color: #fff;
}

/* ---------- Dropdown Base ---------- */
.nav-dropdown {
  position: fixed;
  top: 52px;
  min-width: 220px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}
.nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu { left: 12px; }
.nav-dropdown-user { right: 12px; }

/* ---------- Dropdown Header ---------- */
.nav-dropdown-header {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  padding: 8px 12px 4px;
}

/* ---------- Nav Links ---------- */
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}
.nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.45);
}
.nav-link-active {
  background: rgba(99,102,241,0.18);
  color: #a5b4fc;
}
.nav-link-active i {
  color: #a5b4fc;
}

/* ---------- User Info ---------- */
.nav-user-info {
  padding: 8px 12px;
}
.nav-user-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}
.nav-user-email {
  color: rgba(255,255,255,0.42);
  font-size: 0.78rem;
  margin-top: 2px;
}

/* ---------- Divider ---------- */
.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
}

/* ---------- Login Button ---------- */
.nav-login-section { padding: 4px 0; }
.nav-login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.78);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
  font-family: inherit;
}
.nav-login-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.nav-login-btn i {
  color: rgba(255,255,255,0.45);
  width: 20px;
  text-align: center;
}

/* ---------- Mobile: hide brand text ---------- */
@media (max-width: 480px) {
  .nav-brand span { display: none; }
}
