/* ==========================================================================
   Sidebar — brand, main navigation and account footer
   ========================================================================== */

.side {
  width: 248px;
  flex: none;
  background: var(--color-slate-900);
  color: var(--color-slate-300);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 12px 14px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 14px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-white);
  display: grid;
  place-items: center;
  flex: none;
}

.brand-n {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-white);
  letter-spacing: -.01em;
}

.brand-s {
  font-size: var(--font-size-300);
  color: var(--color-text-subtle);
}

.nav-label {
  font-size: var(--font-size-100);
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-slate-300);
  font-size: var(--font-size-800);
  text-align: left;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--color-slate-800);
  color: var(--color-white);
}

.nav-item.on {
  background: var(--color-green-600-a18);
  color: var(--color-white);
}

.nav-item.on .i {
  color: var(--color-green-400);
}

.nav-count {
  margin-left: auto;
  min-width: 22px;
  text-align: center;
  font-size: var(--font-size-300);
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  background: var(--color-slate-800);
  color: var(--color-slate-300);
}

.nav-count.warn {
  background: var(--color-red-600);
  color: var(--color-white);
}

.side-foot {
  margin-top: auto;
  border-top: 1px solid var(--color-slate-800);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 8px 0;
}

.side-foot b {
  display: block;
  color: var(--color-white);
  font-size: var(--font-size-700);
  font-weight: 500;
}

.side-foot small {
  color: var(--color-text-subtle);
  font-size: var(--font-size-400);
}

/* Account menu (SaaS): the footer opens it on desktop and tablet; on mobile,
   where the footer is hidden, a "Log out" nav item is shown instead. */
.side-foot {
  position: relative;
  cursor: pointer;
}

.side-foot .acct-pop {
  top: auto;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  width: auto;
  cursor: default;
  color: var(--color-text);
}

.acct-item {
  font-weight: 500;
  font-size: var(--font-size-700);
}

.nav-logout {
  display: none;
}

@media (max-width: 760px) {
  .nav-logout {
    display: flex;
  }

  .side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 8px 10px;
    gap: 4px;
  }

  .brand {
    padding: 0 8px 0 0;
  }

  .brand-s,
  .nav-label,
  .side-foot {
    display: none;
  }

  .nav-item {
    width: auto;
    white-space: nowrap;
    flex: none;
  }
}
