:root {
  --nav-primary: #667eea;
  --nav-secondary: #764ba2;
}

.navbar-custom {
  background: linear-gradient(135deg, var(--nav-primary), var(--nav-secondary));
  padding: 12px 0;
}

.navbar-custom .navbar-brand {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.navbar-custom .navbar-brand:hover {
  color: #fff;
  opacity: 0.92;
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-page-title {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 500;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-menu-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.nav-menu-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.nav-menu-btn i {
  font-size: 20px;
}

.nav-dropdown {
  position: absolute;
  right: 0;
  top: 50px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  min-width: 220px;
  max-width: min(92vw, 280px);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 8px 0;
  display: none;
  z-index: 1200;
}

.nav-dropdown.show {
  display: block;
}

.nav-dropdown-user {
  padding: 12px 16px;
  color: #888;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}

.nav-dropdown-section {
  padding: 8px 0 4px;
}

.nav-dropdown-section + .nav-dropdown-section {
  border-top: 1px solid #f0f0f0;
  margin-top: 4px;
}

.nav-dropdown-section-title {
  padding: 6px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #999;
  letter-spacing: 0.04em;
  text-transform: none;
}

.nav-dropdown a,
.nav-dropdown button {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.nav-dropdown a:hover,
.nav-dropdown button:hover {
  background: #f5f7fa;
}

.nav-dropdown a.active {
  color: var(--nav-primary);
  font-weight: 600;
  background: #f5f7ff;
}

.nav-dropdown i {
  margin-right: 10px;
  width: 16px;
  flex-shrink: 0;
}

.nav-dropdown-divider {
  height: 1px;
  background: #eee;
  margin: 8px 0;
}

.page-back-bar {
  background: #fff;
  border-bottom: 1px solid #eef0f4;
  padding: 10px 0;
  margin-bottom: 0;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
}

.page-back-link:hover {
  color: #764ba2;
}

.page-back-link i {
  font-size: 16px;
}

body.has-page-back .container.py-4:first-of-type,
body.has-page-back .desktop-content > .container.py-4:first-of-type {
  padding-top: 1.25rem !important;
}
