/* Shared app shell: sidebar + topbar for every dashboard page.
   Taken from the Projects workbench look; this file is the only place these rules live.
   Loaded after relay-example.css. */
.sidebar,
.topbar {
  --muted: #879196;
}

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 238px;
  padding: 25px 15px 14px;
  overflow-y: auto;
  scrollbar-width: none;
  border-right: 1px solid var(--line);
  background: var(--rail);
  font-size: 13px;
  line-height: 1.5;
}
.sidebar .eyebrow {
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: 1.6px;
  text-transform: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 0 12px;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 3px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--rail);
}
.brand-mark svg {
  width: 22px;
  height: 22px;
}
.main-nav {
  min-height: 0;
  flex: 0 0 auto;
  overflow: visible;
}
.sidebar .nav-section {
  margin: 24px 12px 9px;
  padding: 0;
}
.nav-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--secondary);
  font-size: 12px;
  text-align: left;
  transition:
    background 0.18s,
    color 0.18s;
}
.nav-button:hover,
.nav-button.active {
  background: var(--raised);
  color: var(--text);
}
.nav-button.active::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: -16px;
  width: 2px;
  background: var(--accent);
}
.nav-button svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.nav-button.active svg {
  color: var(--accent);
}
.nav-count {
  margin-left: auto;
  color: var(--muted);
  font: 10px var(--mono);
}
.pinned-nav .nav-button {
  min-height: 28px;
}
.sidebar .project-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin: 0 5px;
  border-radius: 2px;
  background: var(--blue);
}
.project-live-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-left: auto;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 25px;
}
.sidebar-note {
  margin: 22px 6px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--surface), transparent);
}
.sidebar-note .eyebrow {
  margin-bottom: 9px;
}
.sidebar-note .provider {
  margin: 0;
  white-space: nowrap;
}
.sidebar-note .navigation-bar__indicator {
  display: flex;
  align-items: center;
  min-height: 24px;
  padding-inline: 0;
  color: var(--secondary);
  font-size: 10px;
}
.sidebar-note .navigation-bar__indicator::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--mint);
}
.sidebar-logout {
  margin: 0;
}

/* Topbar */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: 238px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 69px;
  padding: 0 42px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 16px;
}
.breadcrumb {
  color: var(--muted);
  white-space: nowrap;
}
.breadcrumb strong {
  color: var(--secondary);
  font-weight: 500;
}
.mobile-brand {
  display: none;
}
.topbar .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}
.topbar .icon-button:hover {
  background: var(--raised);
  color: var(--text);
}
.topbar .icon-button svg {
  width: 15px;
  height: 15px;
}
/* The menu button only appears at phone width. */
.topbar .mobile-menu {
  display: none;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.demo-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--secondary);
  font-size: 10px;
  letter-spacing: 0.2px;
}
.demo-label > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #83908445;
  border-radius: 50%;
  background: #6d79704d;
  font-size: 11px;
}

@media (max-width: 1150px) {
  .topbar {
    padding-inline: 26px;
  }
  .topbar-actions {
    gap: 14px;
  }
}

@media (max-width: 760px) {
  .sidebar {
    z-index: 50;
    padding-top: 80px;
    box-shadow: 0 22px 80px #0007;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .shell {
    margin-left: 0;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg);
  }
  .topbar .mobile-menu {
    display: inline-flex;
  }
  .topbar-actions {
    gap: 10px;
  }
  .avatar {
    width: 25px;
    height: 25px;
  }
}

@media (max-width: 680px) {
  .topbar {
    height: 55px;
    padding-inline: 20px;
  }
  .breadcrumb {
    gap: 10px;
  }
  .breadcrumb > span:not(.mobile-brand) {
    display: none;
  }
  .mobile-brand {
    display: inline;
    color: var(--accent);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -2px;
  }
  .demo-label {
    display: none;
  }
}

/* Short screens: tighten the footer and trim pinned projects so the rail fits. */
@media (max-height: 900px) {
  .sidebar-bottom {
    padding-top: 8px;
  }
  .sidebar-note {
    margin: 6px;
    padding: 6px;
  }
  .pinned-nav .nav-button:nth-child(n + 4) {
    display: none;
  }
}

@media (max-height: 680px) {
  .sidebar-note {
    margin: 8px 6px;
    padding: 8px;
  }
  .pinned-nav .nav-button:nth-child(n + 2) {
    display: none;
  }
}
