.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 200;
  transition: transform .28s ease;
  overflow: hidden;
  height: 100vh;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 20px; }

.sidebar-top {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 22px 20px 0;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-bottom: 28px;
  flex-shrink: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.brand-name span { color: var(--brand-mid); }

.sidebar-search {
  position: relative;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.sidebar-top nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 14px;
}

.sidebar-top nav::-webkit-scrollbar { width: 4px; }
.sidebar-top nav::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
.sidebar-top nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 20px; }

.sidebar-search input {
  width: 100%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  padding: 9px 12px 9px 36px;
  font: 13px var(--sans);
  color: rgba(255,255,255,.6);
  outline: none;
}

.sidebar-search input::placeholder { color: rgba(255,255,255,.3); }

.sidebar-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  stroke: rgba(255,255,255,.3);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-section { margin-bottom: 4px; }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  padding: 10px 10px 5px;
}

.nav-label-btn,
.nav-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 6px 10px 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  transition: color .14s;
}
.nav-toggle:hover { color: rgba(255,255,255,.45); }

.toggle-chevron,
.nav-caret {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.nav-toggle.open .toggle-chevron,
.nav-toggle.open .nav-caret { transform: rotate(180deg); }

.nav-collapse {
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
}
.nav-collapse.open {
  max-height: 300px;
}

/* Collapsible section toggle */
.nav-toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px;
  transition: background .12s;
}
.nav-toggle:hover { background: rgba(255,255,255,.04); }

.toggle-chevron {
  width: 13px;
  height: 13px;
  stroke: rgba(255,255,255,.25);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.nav-toggle.open .toggle-chevron { transform: rotate(180deg); }

/* Collapse panel */
.nav-collapse {
  overflow: hidden;
  max-height: 0;
  transition: max-height .22s ease;
}
.nav-collapse.open {
  max-height: 400px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: rgba(255,255,255,.55);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all .14s;
  user-select: none;
  position: relative;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}

.nav-item.active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.nav-item.locked {
  color: rgba(255,255,255,.42);
}

.nav-item.locked:hover {
  background: rgba(255,255,255,.045);
  color: rgba(255,255,255,.78);
}

.nav-item .badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
}

.nav-item.active .badge { background: rgba(255,255,255,.25); }

.nav-item .lock-badge {
  background: rgba(245,158,11,.16);
  color: #fbbf24;
}

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 10px 12px;
}

/* ── Career readiness widget ── */
.career-widget {
  margin: 8px 4px 6px;
  padding: 13px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 11px;
}

.cw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cw-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}

.cw-link {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand-mid);
  text-decoration: none;
  opacity: .8;
  transition: opacity .14s;
}
.cw-link:hover { opacity: 1; }

.cw-metrics {
  display: flex;
  justify-content: space-around;
  gap: 6px;
}

.cw-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
}

.cw-ring {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cw-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.cw-ring span {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  position: relative;
}

.cw-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.cw-num.cw-gap {
  background: rgba(239,68,68,.2);
  border: 1px solid rgba(239,68,68,.35);
  color: #fca5a5;
}

.cw-label {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── SIDEBAR STATS STRIP ── */
.sb-stats {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 9px;
  padding: 10px 0;
  margin-bottom: 12px;
  overflow: hidden;
}
.sb-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.sb-stat-val {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.sb-stat-lbl {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.sb-stat-sep {
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,.09);
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px 22px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
  background: var(--ink);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 11px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-info .name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.user-info .role {
  font-size: 11px;
  color: rgba(255,255,255,.4);
}

.user-card-btn {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: none;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.user-card-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0,0,0,.35);
  }
}
