/* ── Navbar2 Styles ─────────────────────────────────────────── */
.n2 {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 62px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.25s;
}
[data-theme="dark"] .n2 {
  background: rgba(15, 23, 42, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.n2.n2-shadow {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.n2-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Brand */
.n2-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}
.n2-brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
}
.n2-brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.3px;
}
[data-theme="dark"] .n2-brand-name {
  color: #f8fafc;
}
.n2-brand-dot {
  color: #2563eb;
}

/* Desktop links */
.n2-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.n2-link {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
  transition:
    background 0.18s,
    color 0.18s;
  white-space: nowrap;
}
[data-theme="dark"] .n2-link {
  color: #cbd5e1;
}
.n2-link:hover,
.n2-tools-btn:hover {
  background: #f3f4f6;
  color: #111827;
}
[data-theme="dark"] .n2-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
}
.n2-active {
  color: #2563eb !important;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.08);
}
[data-theme="dark"] .n2-active {
  color: #60a5fa !important;
  background: rgba(96, 165, 250, 0.1);
}

.n2-badge {
  background: #2563eb;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
}
.n2-chevron {
  transition: transform 0.25s;
  color: #9ca3af;
}
.n2-mega-wrap.open .n2-chevron {
  transform: rotate(180deg);
}
[data-theme="dark"] .n2-chevron {
  color: #64748b;
}

/* Mega menu */
.n2-mega-wrap {
  position: relative;
}
.n2-mega {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  padding: 20px;
  width: 780px;
  max-width: 96vw;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.22s,
    transform 0.22s;
  z-index: 100;
}
[data-theme="dark"] .n2-mega {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.n2-mega-wrap.open .n2-mega {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.n2-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.n2-col-hd {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9ca3af;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
[data-theme="dark"] .n2-col-hd {
  color: #64748b;
}
.n2-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}
[data-theme="dark"] .n2-item {
  color: #cbd5e1;
}
.n2-item:hover {
  background: #f3f4f6;
  color: #111827;
}
[data-theme="dark"] .n2-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}
.n2-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* Actions */
.n2-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.n2-theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid #e5e7eb;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 0.9rem;
  transition: all 0.2s;
}
[data-theme="dark"] .n2-theme-btn {
  border-color: #334155;
  color: #94a3b8;
}
.n2-theme-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}
[data-theme="dark"] .n2-theme-btn:hover {
  background: rgba(37, 99, 235, 0.12);
}
.n2-icon-sun {
  display: none;
}
[data-theme="dark"] .n2-icon-moon {
  display: none;
}
[data-theme="dark"] .n2-icon-sun {
  display: block;
}

/* Hamburger */
.n2-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid #e5e7eb;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.2s;
}
[data-theme="dark"] .n2-ham {
  border-color: #334155;
}
.n2-ham span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: #6b7280;
  border-radius: 2px;
  transition: all 0.25s;
}
.n2-ham.open span:nth-child(1) {
  transform: rotate(45deg) translate(4.5px, 4.5px);
}
.n2-ham.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.n2-ham.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4.5px, -4.5px);
}

/* Overlay */
.n2-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.n2-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Drawer */
.n2-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 100vw;
  background: #fff;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
[data-theme="dark"] .n2-drawer {
  background: #0f172a;
}
.n2-drawer.open {
  transform: translateX(0);
}
.n2-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
[data-theme="dark"] .n2-drawer-top {
  border-bottom-color: #1e293b;
}
.n2-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid #e5e7eb;
  background: transparent;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
}
[data-theme="dark"] .n2-drawer-close {
  border-color: #334155;
  color: #94a3b8;
}
.n2-drawer-nav {
  padding: 12px 12px 24px;
}
.n2-drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s;
}
[data-theme="dark"] .n2-drawer-link {
  color: #cbd5e1;
}
.n2-drawer-link:hover {
  background: #f3f4f6;
}
[data-theme="dark"] .n2-drawer-link:hover {
  background: rgba(255, 255, 255, 0.06);
}
.n2-drawer-link i {
  color: #9ca3af;
  width: 16px;
  text-align: center;
}

.n2-drawer-section {
  margin-top: 4px;
}
.n2-drawer-sec-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #374151;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
[data-theme="dark"] .n2-drawer-sec-btn {
  color: #cbd5e1;
}
.n2-drawer-sec-btn:hover {
  background: #f3f4f6;
}
[data-theme="dark"] .n2-drawer-sec-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}
.n2-drawer-sec-btn span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.n2-drawer-sec-btn span i {
  color: #9ca3af;
  width: 16px;
  text-align: center;
}
.n2-drawer-chev {
  font-size: 0.75rem;
  color: #9ca3af;
  transition: transform 0.25s;
}
.n2-drawer-section.open .n2-drawer-chev {
  transform: rotate(180deg);
}

.n2-drawer-group {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 12px;
}
.n2-drawer-section.open .n2-drawer-group {
  max-height: 600px;
}
.n2-drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 0.82rem;
  color: #4b5563;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}
[data-theme="dark"] .n2-drawer-item {
  color: #94a3b8;
}
.n2-drawer-item:hover {
  background: #f3f4f6;
  color: #111827;
}
[data-theme="dark"] .n2-drawer-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}
.n2-drawer-item.n2-active {
  color: #2563eb !important;
  background: #eff6ff;
  font-weight: 600;
}
[data-theme="dark"] .n2-drawer-item.n2-active {
  color: #60a5fa !important;
  background: rgba(37, 99, 235, 0.12);
}
.n2-drawer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .n2-links {
    display: none;
  }
  .n2-ham {
    display: flex;
  }
}
