/* Shared sidebar layout and navigation styling for every application page. */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-shell > .sidebar {
  display: flex;
  flex: 0 0 244px;
  flex-direction: column;
  width: 244px;
  min-height: 100vh;
  padding: 1.25rem 0.75rem;
  box-sizing: border-box;
  border-right: 1px solid #e4e2de;
  background: #f1f0ed;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem 1.25rem;
  color: #2f2f2f;
  font-weight: 700;
}

.sidebar-brand-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #7b3f00;
  color: #fff;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar .sidebar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.6rem 0.65rem;
  border-radius: 7px;
  color: #4d4a46;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
}

.sidebar .sidebar-link:hover {
  background: #e7e5e1;
  color: #2f2f2f;
}

.sidebar .sidebar-link.active {
  background: #e2dfda;
  color: #000;
  font-weight: 700;
}

.sidebar .sidebar-label {
  margin: 1.1rem 0.65rem 0.4rem;
  color: #87837d;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.sidebar .sidebar-settings {
  margin-top: auto;
}

@media (min-width: 601px) {
  .app-shell > .sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow-y: auto;
  }

  .sidebar > * { flex-shrink: 0; }
}

.sidebar .sidebar-account {
  justify-content: center;
  gap: 0.75rem;
  color: #000;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.sidebar-account-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  background: #fff;
}

@media (max-width: 700px) {
  .app-shell {
    display: block;
  }

  .app-shell > .sidebar {
    width: 100%;
    min-height: 0;
    padding: 0.75rem;
    border-right: 0;
    border-bottom: 1px solid #e4e2de;
  }

  .sidebar-brand {
    padding-bottom: 0.6rem;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .sidebar .sidebar-link {
    padding: 0.45rem 0.55rem;
  }

  .sidebar .sidebar-label {
    display: none;
  }

  .sidebar .sidebar-settings {
    margin-top: 0.5rem;
  }
}
