/* ============ SIDEBAR ============ */
.sidebar {
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--line);
}
.brand-logo {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #8b5cf6);
  border-radius: 9px;
  font-size: 22px;
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(91, 141, 239, 0.3);
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: var(--text-2); margin-top: 1px; }

.sidebar-section { padding: 14px 10px 4px; }
.sidebar-section-title {
  font-size: 10px; text-transform: uppercase;
  color: var(--text-3); letter-spacing: 0.08em;
  padding: 0 10px 8px; font-weight: 600;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-1);
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 1px;
  transition: background 0.1s, color 0.1s;
  position: relative;
}
.nav-item:hover { background: var(--bg-2); color: var(--text-0); }
.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand-2);
  font-weight: 500;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px;
  width: 3px; background: var(--brand); border-radius: 0 2px 2px 0;
}
.nav-icon { font-size: 14px; width: 16px; text-align: center; opacity: 0.8; }
.nav-badge {
  margin-left: auto;
  background: var(--bg-3);
  color: var(--text-1);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px; text-align: center;
}
.nav-badge.red { background: var(--danger-soft); color: var(--danger); }

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
}

/* Language picker — pinned to the very bottom of the sidebar */
.lang-section { padding: 12px 12px 14px; border-top: 1px solid var(--line); }
.lang-section .sidebar-section-title { padding: 0 2px 8px; }
.lang-toggle {
  display: flex; gap: 3px; padding: 3px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
}
.lang-toggle button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 12px; font-weight: 500; padding: 6px 4px;
  border: none; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-2);
  transition: background .15s, color .15s;
}
.lang-toggle button.active { background: var(--brand); color: #fff; }
.lang-toggle button:not(.active):hover { color: var(--text-0); background: var(--bg-3); }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--bg-2);
  cursor: pointer;
  user-select: none;
}
.user-chip:hover { background: var(--bg-3); }
.user-chip-logout {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  width: 28px; height: 28px;
  border-radius: 6px;
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: all .15s;
}
.user-chip-logout:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.user-chip-logout[title]:hover::after {
  content: attr(title);
  position: absolute;
  background: var(--bg-3);
  color: var(--text-0);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 36px;
  white-space: nowrap;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #f472b6, #a78bfa);
  display: grid; place-items: center; color: white; font-weight: 600; font-size: 12px;
}
.user-name { font-size: 12px; font-weight: 500; }
.user-role { font-size: 10px; color: var(--text-2); }

