/* Sidebar - fixed left rail, 240px wide, bordered on the right. */

.sidebar {
  display: flex;
  flex-direction: column;
  width: 240px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  background: var(--color-bg-surface);
  border-right: var(--border-width) solid var(--color-border);
  padding: var(--space-6) 0;
  flex-shrink: 0;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-6) var(--space-8);
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  color: var(--color-text);
}

.sidebar__logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
}

.sidebar__logo-text {
  cursor: pointer;
  display: inline-block;
}

.sidebar__section {
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-6);
  margin-bottom: var(--space-6);
}

/* Extra gap above every section after the first - separates groups
   on spacing alone, so the label reads as a caption without a hard rule. */
.sidebar__section + .sidebar__section {
  margin-top: var(--space-4);
}

.sidebar__section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-muted);
  opacity: 0.55;
  padding: 0 var(--space-3) 0 var(--space-1);
  margin-bottom: var(--space-3);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sidebar__footer {
  margin-top: auto;
  padding: var(--space-6);
  border-top: var(--border-width) solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sidebar__footer-user {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sub-nav leaf indented under its parent (e.g. ADMIN -> USERS / PROMPTS).
   Pure visual indent; behaviour stays the same as a regular nav-item. */
.sidebar__subnav-item {
  margin-left: var(--space-4);
  font-size: var(--text-xs);
}
