/*!
 * Fresh Air — app shell shared by the admin panel and the customer cabinet:
 * header tag, sticky sidebar (an offcanvas below lg), section nav, the
 * "who am I" block at the sidebar's foot, and the access gate.
 *
 * Colors come only from Bootstrap's --bs-* variables, so the light/dark
 * toggle shared with the rest of the site works here unchanged.
 */

:root {
  --app-header-h: 3.5rem;
}

.app-gate {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.app-tag {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.app-layout {
  display: flex;
  align-items: flex-start;
}

.app-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1.5rem 1rem 4rem;
}

@media (width >= 768px) {
  .app-main { padding: 2rem 2rem 5rem; }
}

/* ---------------------------------------------------------------
   Sidebar: an offcanvas below lg, a sticky column from lg up
   --------------------------------------------------------------- */

.app-sidebar .offcanvas-body {
  flex-direction: column;
}

@media (width >= 992px) {
  .app-sidebar {
    flex: 0 0 15rem;
    position: sticky;
    top: var(--app-header-h);
    height: calc(100vh - var(--app-header-h));
    overflow-y: auto;
    border-right: 1px solid var(--nm-rule);
  }

  .app-sidebar .offcanvas-body {
    display: flex;
    height: 100%;
    padding: 0.5rem 0.75rem 1rem;
  }
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.app-nav-title {
  margin: 1rem 0.75rem 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.app-nav-title:first-child { margin-top: 0.5rem; }

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--bs-border-radius);
  color: var(--bs-body-color);
  text-decoration: none;
}

.app-nav-link svg {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
}

.app-nav-link:hover { background: var(--bs-secondary-bg); }

.app-nav-link.active {
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
  font-weight: 600;
}

/* No backend yet: dimmed, with a padlock after the label (added by JS so
   the markup stays one line per item). */
.app-nav-link.is-locked { opacity: 0.5; }
.app-nav-link.is-locked:hover { opacity: 0.7; }
.app-nav-link .app-lock {
  width: 0.875rem;
  height: 0.875rem;
  margin-left: auto;
}

.app-me {
  margin-top: auto;
  padding: 1rem 0.75rem 0;
  border-top: 1px solid var(--nm-rule);
}

.app-me-email {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
