/* ================================================================
   Sidebar — Navigation, branding, connection indicator
   ================================================================ */

.sidebar {
  width: 260px;
  background: #161619;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  border-right: 1px solid rgba(255, 255, 255, .06);
}

/* Header / Branding */
.sidebar-head {
  padding: 28px 22px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.sidebar-head .logo {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #e11d48;
  position: relative;
  display: inline-block;
}
.sidebar-head .logo::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, #e11d48, transparent);
  opacity: .4;
}
.sidebar-head .tagline {
  font-size: 11px;
  color: rgba(255, 255, 255, .3);
  margin-top: 8px;
  letter-spacing: .3px;
}

/* Navigation area */
.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
}

/* Section labels */
.nav-lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .2);
  padding: 16px 12px 8px;
}

/* Nav buttons */
.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .45);
  transition: all .2s ease;
  text-align: left;
  margin-bottom: 2px;
  position: relative;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .8);
}
.nav-btn.on {
  background: rgba(225, 29, 72, .08);
  color: #e11d48;
  font-weight: 600;
}
.nav-btn.on::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  border-radius: 0 3px 3px 0;
  background: #e11d48;
  box-shadow: 0 0 8px rgba(225, 29, 72, .4);
}
.nav-btn svg {
  width: 16px; height: 16px;
  stroke-width: 1.8;
  flex-shrink: 0;
  opacity: .7;
}
.nav-btn.on svg { opacity: 1; }

/* Nav score tag */
.nav-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .4);
}
.nav-btn.on .nav-tag {
  background: rgba(225, 29, 72, .12);
  color: #e11d48;
}

/* Footer */
.sidebar-foot {
  padding: 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.conn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, .25);
}
.conn-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.conn-dot.local {
  background: #facc15;
  box-shadow: 0 0 6px rgba(250, 204, 21, .4);
}
.conn-dot.cloud {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, .4);
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  width: auto;
  height: auto;
  padding: 8px 14px;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  margin: 0 12px 10px;
  transition: all .2s ease;
  font-family: var(--font);
  font-size: 13px;
  color: rgba(255, 255, 255, .4);
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .14);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  stroke: rgba(255, 255, 255, .4);
  fill: none;
  stroke-width: 2;
  transition: stroke .2s ease;
}
.theme-toggle:hover svg {
  stroke: rgba(255, 255, 255, .7);
}

/* ----------------------------------------------------------------
   Light Theme — Sidebar overrides
   ---------------------------------------------------------------- */
[data-theme="light"] .sidebar {
  background: #ffffff;
  border-right-color: rgba(0, 0, 0, .08);
}
[data-theme="light"] .sidebar-head {
  border-bottom-color: rgba(0, 0, 0, .08);
}
[data-theme="light"] .sidebar-head .tagline {
  color: rgba(0, 0, 0, .35);
}
[data-theme="light"] .nav-lbl {
  color: rgba(0, 0, 0, .25);
}
[data-theme="light"] .nav-btn {
  color: rgba(0, 0, 0, .5);
}
[data-theme="light"] .nav-btn:hover {
  background: rgba(0, 0, 0, .04);
  color: rgba(0, 0, 0, .8);
}
[data-theme="light"] .nav-btn.on {
  background: rgba(225, 29, 72, .06);
  color: #e11d48;
}
[data-theme="light"] .nav-tag {
  background: rgba(0, 0, 0, .05);
  color: rgba(0, 0, 0, .4);
}
[data-theme="light"] .nav-btn.on .nav-tag {
  background: rgba(225, 29, 72, .1);
  color: #e11d48;
}
[data-theme="light"] .sidebar-foot {
  border-top-color: rgba(0, 0, 0, .08);
}
[data-theme="light"] .conn {
  color: rgba(0, 0, 0, .3);
}
[data-theme="light"] .theme-toggle {
  border-color: rgba(0, 0, 0, .1);
  background: rgba(0, 0, 0, .03);
  color: rgba(0, 0, 0, .45);
}
[data-theme="light"] .theme-toggle:hover {
  background: rgba(0, 0, 0, .06);
  border-color: rgba(0, 0, 0, .15);
}
[data-theme="light"] .theme-toggle svg {
  stroke: rgba(0, 0, 0, .4);
}
[data-theme="light"] .theme-toggle:hover svg {
  stroke: rgba(0, 0, 0, .7);
}

/* Light theme scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .12);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, .2);
}
