/* nav.css -- the sidebar nav shell shared by all three dashboards. */

.nav {
  width: 220px;
  flex-shrink: 0;
  background: var(--plate);
  padding: var(--s-6) var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  border-right: 1px solid var(--plate-hi);
}

.nav__brand {
  font-family: var(--f-display);
  font-size: var(--t-lg);
  color: var(--legend);
}

.nav__brand span {
  color: var(--hit);
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.nav__item {
  display: block;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: var(--t-sm);
}

.nav__item--active {
  background: var(--housing);
  color: var(--legend);
}

.nav__item:hover {
  color: var(--legend);
}

.nav__footer {
  margin-top: auto;
}

.nav__footer form button {
  width: 100%;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--plate-hi);
  box-shadow: none;
}

/* Narrow screens: the 220px sidebar in a flex row leaves ~140px of content at
   360px, which the brief requires support for. Becomes a horizontally
   scrolling top bar instead. */
@media (max-width: 720px) {
  .app-shell {
    flex-direction: column;
  }

  .nav {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-3) var(--s-4);
    border-right: none;
    border-bottom: 1px solid var(--plate-hi);
  }

  .nav__brand {
    font-size: var(--t-md);
    flex-shrink: 0;
  }

  .nav__list {
    flex-direction: row;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
  }

  .nav__list::-webkit-scrollbar { display: none; }

  .nav__item {
    white-space: nowrap;
  }

  .nav__footer {
    margin-top: 0;
    flex-shrink: 0;
  }

  .nav__footer form button {
    padding: var(--s-2) var(--s-3);
  }
}
