.sidebar {
  width: 160px;
  min-width: 160px;
  flex-shrink: 0;
  background: var(--bg-panel), transparent 50%;
  border-right: 1px solid #d18b3c;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  padding: 14px 18px;
  font-family: "Roboto", sans-serif;
  cursor: pointer;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: 
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.2s ease;
}

.sidebar li:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-left-color: var(--accent-muted);
}

.sidebar li.active {
  color: var(--text-primary);
  border-left-color: var(--accent);
  background: var(--bg-elevated);
  font-weight: bold;
}

.sidebar {
  transition: width 0.2s ease;
}

.sidebar.collapsed {
  width: 56px;
}

.sidebar.collapsed li {
  text-align: center;
  font-size: 0;
}

.sidebar.collapsed li::before {
  content: attr(data-section);
  font-size: 10px;
  color: var(--text-secondary);
}

.sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-main {
  flex: 1;
}

.sidebar-bottom {
  border-top: 1px solid #333;
  padding-top: 2px;
  padding-bottom: 6px;
}

.sidebar-bottom li {
  opacity: 0.85;
  font-size: 13px;
}

.sidebar-bottom li:hover {
  opacity: 1;
}

/* Copyright footer */
.sidebar-copyright {
  padding: 12px 18px 16px;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.5;
//  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-copyright-version {
  background: var(--accent);
  color: var(--bg-panel);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===============================
   HAMBURGER TOGGLE BUTTON
   =============================== */

.sidebar-toggle-btn {
  display: none;        /* hidden on desktop */
  appearance: none;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 8px;
  margin-right: 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
}

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

/* Overlay backdrop when sidebar is open on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
  display: block;
}

/* ===============================
   MOBILE RESPONSIVE SIDEBAR
   =============================== */

@media (max-width: 820px) {
  .sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -220px;
    width: 200px;
    min-width: 200px;
    height: 100vh;
    height: 100dvh;
    z-index: 999;
    transition: left 0.25s ease;
    border-right: 1px solid #d18b3c;
    background: var(--bg-panel);
    box-shadow: none;
    overflow-y: auto;
  }

  .sidebar.mobile-open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
}
