.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  background: linear-gradient(180deg, rgba(12, 14, 22, 0.92), rgba(9, 10, 16, 0.92));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 18px;
}
.brand .mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--brand-glow);
  letter-spacing: -0.04em;
}
.brand b {
  display: block;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand span {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0;
}
.nav-label {
  padding: 16px 12px 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 600;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 14.5px;
  position: relative;
  transition: 0.18s;
}
.nav a svg {
  width: 19px;
  height: 19px;
  flex: none;
  opacity: 0.75;
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-decoration: none;
}
.nav a.on {
  background: linear-gradient(90deg, rgba(255, 61, 127, 0.16), rgba(255, 61, 127, 0.04));
  color: #fff;
}
.nav a.on svg {
  opacity: 1;
  color: var(--brand);
}
.nav a.on::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad);
}
.nav a .pill {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.side-foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 8px;
}
.usercard {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.usercard .name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}
.usercard .role {
  font-size: 12px;
  color: var(--muted);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 32px;
  background: rgba(6, 7, 11, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.top h1 {
  font-size: 19px;
  font-weight: 600;
}
.top .crumb {
  color: var(--dim);
  font-size: 13px;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 13px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 500;
}
.burger {
  display: none;
}
.view {
  padding: 30px 32px 64px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  animation: rise 0.4s var(--ease);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.page-h {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-h h2 {
  font-size: 26px;
  letter-spacing: -0.025em;
}
.page-h p {
  color: var(--muted);
  margin-top: 4px;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    transform: translateX(-102%);
    transition: transform 0.3s var(--ease);
    box-shadow: var(--shadow-2);
  }
  .shell.nav-open .side {
    transform: none;
  }
  .scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(3, 4, 8, 0.6);
    backdrop-filter: blur(3px);
  }
  .burger {
    display: inline-flex;
  }
  .top,
  .view {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* Sign-in ---------------------------------------------------------------------------------------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(440px, 100%);
  padding: 40px 36px 34px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}
.login-card .mark {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 34px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 16px 44px -12px var(--brand-glow);
}
.login-card h1 {
  font-size: 28px;
  letter-spacing: -0.03em;
}
.login-card p {
  color: var(--muted);
  max-width: 320px;
}
.login-card .btn {
  --h: 46px;
  width: 100%;
  font-size: 15px;
}
.login-card small {
  color: var(--dim);
}

/* The page heading below already names the page; on wide screens the top bar
   keeps only the live server pill so the title is not shown twice. */
@media (min-width: 981px) {
  .top #page-title {
    visibility: hidden;
    width: 0;
    overflow: hidden;
  }
}
