/* ── Navbar ── */
.navbar {
  height: 60px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border-subtle), 0 4px 16px rgba(0,0,0,0.4);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: 36px;
  text-decoration: none;
}
.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #0d9488, #0891b2);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.nav-logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 450;
  color: var(--text-muted);
  text-decoration: none;
  border: none;
  background: none;
  transition: all 0.1s;
}
.nav-link:hover { background: var(--bg-overlay); color: var(--text-secondary); }
.nav-link.active { color: var(--text-primary); font-weight: 550; background: var(--bg-overlay); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.nav-icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: none;
  background: none;
  color: var(--text-muted);
  transition: all 0.1s;
  position: relative;
}
.nav-icon-btn:hover { background: var(--bg-overlay); color: var(--text-secondary); }
.nav-divider { width: 1px; height: 20px; background: var(--border); }

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #6366f1);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.nav-avatar:hover { border-color: var(--accent); }

/* ── User dropdown ── */
.user-menu {
  position: relative;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 200;
}
.user-dropdown-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.user-dropdown-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.user-dropdown-role {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: all 0.1s;
}
.user-dropdown-item:hover { background: var(--bg-overlay); color: var(--text-primary); }
.user-dropdown-item.danger:hover { background: var(--red-bg); color: var(--red); }
.user-dropdown-item svg { flex-shrink: 0; opacity: 0.7; }

/* ── Page container ── */
.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 36px 40px 60px;
}

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius);
  transition: background 0.1s;
  order: 10; /* after other right items */
}
.nav-hamburger:hover { background: var(--bg-overlay); }
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: all 0.2s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile nav dropdown ── */
.mobile-nav {
  display: none;
  position: sticky;
  top: 60px;
  z-index: 99;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.mobile-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.1s;
}
.mobile-nav-link:hover { background: var(--bg-overlay); color: var(--text-secondary); }
.mobile-nav-link.active { color: var(--text-primary); background: var(--bg-overlay); }

/* ── Responsive breakpoints ── */
@media (max-width: 720px) {
  .navbar { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-nav { display: block; }

  .page { padding: 20px 16px 40px; }
}
