/* ── Sidebar layout ─────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar__logo {
  padding: 1.25rem 1rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar__nav {
  flex: 1;
  padding: 0.75rem 0;
}
.sidebar__nav a {
  display: block;
  padding: 0.55rem 1rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar__nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.sidebar__nav a.active {
  color: #fff;
  border-left-color: var(--cyan);
  background: rgba(255,255,255,0.07);
  font-weight: 600;
}
/* Sub-entries are always unfolded: the tree is a map of the backoffice, and a
   map that hides half of itself until clicked is worth less than the space it
   saves. They read as a set under their parent, never as siblings of it. */
.sidebar__subnav {
  padding-bottom: 0.15rem;
}
.sidebar__nav a.sidebar__subitem {
  padding-top: 0.32rem;
  padding-bottom: 0.32rem;
  padding-left: 1.9rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}
.sidebar__nav a.sidebar__subitem::before {
  content: "";
  position: absolute;
  margin-left: -0.75rem;
  margin-top: 0.52rem;
  width: 0.4rem;
  height: 1px;
  background: rgba(255,255,255,0.22);
}
.sidebar__nav a.sidebar__subitem:hover { color: rgba(255,255,255,0.9); }
.sidebar__nav a.sidebar__subitem.active {
  color: #fff;
  font-weight: 600;
}

.sidebar__footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}
.sidebar__footer a { color: rgba(255,255,255,0.55); }
.sidebar__footer a:hover { color: #fff; }
.sidebar__footer .link-button { color: rgba(255,255,255,0.55); }
.sidebar__footer .link-button:hover { color: #fff; text-decoration: underline; }

.sidebar__collapse {
  margin-left: auto;
  padding: 0.1rem 0.4rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}
.sidebar__collapse:hover { color: #fff; border-color: rgba(255,255,255,0.5); }

html.sidebar-collapsed .sidebar { display: none; }
