/* ============================================
   NAVBAR STYLES
   ============================================ */

.navbar {
  background-color: #1a1a2e;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

/* Toggle button (mobile) */
.navbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #a3a3b5;
  cursor: pointer;
  transition: all 0.2s;
}

.navbar-toggle:hover {
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

/* Nav menu */
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Nav items */
.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 14px;
  font-weight: 500;
  color: #c4c4d0;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(251,185,0,0.08);
  color: #fbb900;
}

.icon-chevron {
  transition: transform 0.2s;
  opacity: 0.6;
}

.has-dropdown.open .icon-chevron {
  transform: rotate(180deg);
}

/* Dropdowns */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #242438;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  padding: 0.5rem;
  z-index: 55;
}

.has-dropdown.open .dropdown {
  display: block;
  animation: dropdownIn 0.15s ease-out;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-item {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 14px;
  font-weight: 500;
  color: #c4c4d0;
  text-decoration: none;
  border-radius: 7px;
  transition: all 0.15s;
}

.dropdown-item:hover {
  background: rgba(251,185,0,0.1);
  color: #fbb900;
}

.dropdown-icon {
  color: #fbb900;
  opacity: 0.7;
}

/* User section (right) */
.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 0.75rem;
  padding-left: 1.25rem;
  border-left: 1px solid rgba(255,255,255,0.1);
  visibility: hidden;
}

.nav-user.loaded {
  visibility: visible;
}

.nav-user-name {
  font-size: 13px;
  font-weight: 500;
  color: #8e8ea0;
  min-width: 60px;
  text-align: right;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 13px;
  font-weight: 500;
  color: #c4c4d0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-logout:hover {
  background: rgba(220,38,38,0.15);
  border-color: rgba(220,38,38,0.3);
  color: #f87171;
}

/* ============================================
   MOBILE STYLES
   ============================================ */

@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  }

  .navbar-menu.open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 1rem;
  }

  /* Mobile dropdown */
  .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(255,255,255,0.03);
    margin-top: 0.25rem;
    padding: 0 0 0 1rem;
    animation: none;
  }

  .has-dropdown.open .dropdown {
    display: block;
  }

  .dropdown-item {
    padding: 0.75rem 1rem;
  }

  .nav-user {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-left: 0;
    padding-left: 0;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .nav-user-name {
    text-align: center;
    font-size: 14px;
    color: #a3a3b5;
    min-width: auto;
  }

  .btn-logout {
    justify-content: center;
  }
}
