:root {
  --bg-sidebar: #0b0e24;
  --text-muted: #8fa0dd;
  --text-dim: #506199;
  --accent-purple: #6366f1;
  --accent-blue: #2563eb;
}

/* --- SIDEBAR --- */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  transform: translateX(-110%);
  transition: transform 0.28s ease;
  z-index: 1200;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 20px 0 80px rgba(0, 0, 0, 0.4);
  font-family: 'Inter', sans-serif;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar.scrolled {
  box-shadow: -20px 0 80px rgba(0, 0, 0, 0.45);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1100;
}

.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-auth-actions {
  display: none;
}

.sidebar-toggle {
  position: fixed;
  top: 18px;
  left: 18px;
  width: 42px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1300;
  cursor: pointer;
  outline: none;
  transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.sidebar-toggle .lines {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: background-color 0.2s ease;
}

.sidebar-toggle .lines::before,
.sidebar-toggle .lines::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform 0.18s ease;
}

.sidebar-toggle .lines::before { top: -7px; }
.sidebar-toggle .lines::after { top: 7px; }

.sidebar-toggle[aria-expanded='true'] .lines {
  background: transparent;
}

.sidebar-toggle[aria-expanded='true'] .lines::before {
  transform: translateY(7px) rotate(45deg);
}

.sidebar-toggle[aria-expanded='true'] .lines::after {
  transform: translateY(-7px) rotate(-45deg);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 32px;
  padding-left: 12px;
  font-family: 'Inter', sans-serif;
}

.logo-icon {
  color: var(--accent-purple);
  filter: drop-shadow(0 0 8px var(--accent-purple));
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
  border-left: 3px solid var(--accent-purple);
}

/* Sidebar Robot Card */
.ai-box {
  background: linear-gradient(135deg, #0f1642 0%, #080b26 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  position: relative;
  margin-top: auto;
  font-family: 'Inter', sans-serif;
}

.ai-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background: #172265;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent-blue);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

.ai-box h4 {
  font-size: 15px;
  margin-bottom: 6px;
  color: #fff;
}

.ai-box p {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.4;
}

.chat-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.2s;
}

.chat-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Avoid header overlap on narrow screens */
@media (max-width: 1400px) {
  body:not(.home-page) header,
  body:not(.home-page) .navbar,
  body:not(.home-page) .nav-container {
    padding-left: 70px !important;
  }
}

@media (min-width: 901px) {
  .mobile-only-nav {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .mobile-auth-actions {
    position: fixed;
    top: 16px;
    left: 70px;
    right: 14px;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    max-width: calc(100vw - 84px);
  }

  .mobile-auth-actions a,
  .mobile-auth-actions button {
    min-height: 38px;
    border-radius: 10px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    background: rgba(9, 11, 28, 0.92);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font: 700 12px/1 'Inter', sans-serif;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    pointer-events: auto;
  }

  .mobile-auth-actions .mobile-signup {
    border-color: transparent;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
  }
}

@media (max-width: 380px) {
  .mobile-auth-actions {
    right: 9px;
    gap: 5px;
  }

  .mobile-auth-actions a,
  .mobile-auth-actions button {
    padding-inline: 9px;
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  body:not(.home-page) header,
  body:not(.home-page) .navbar,
  body:not(.home-page) .nav-container {
    padding-top: 72px !important;
    padding-left: 0 !important;
  }
}

@media (max-width: 900px) {
  .home-page .site-header .sidebar-toggle.menu-toggle {
    position: static;
    top: auto;
    left: auto;
    display: inline-flex;
    width: 44px;
    height: 44px;
    min-width: 44px;
    align-self: center;
    justify-self: end;
  }
}
.site-brand-logo{width:38px;height:38px;border-radius:10px;object-fit:cover;object-position:center;display:block;flex:0 0 auto;box-shadow:0 0 18px rgba(59,130,246,.28)}.logo-container>.site-brand-logo{width:34px;height:34px;border-radius:9px}
