.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 550;
  text-decoration: none;
}

.nav-item svg {
  opacity: 0.72;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--surface);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--surface);
}

.nav-item.active svg {
  opacity: 1;
}

.nav-item.nav-plans {
  align-items: center;
}

.nav-plans-body {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 3.55rem;
  flex-direction: column;
  gap: 0.22rem;
}

.nav-plans-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-col {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100%;
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.nav-open-check {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-topbar,
.nav-scrim {
  display: none;
}

.nav-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #fff;
  cursor: pointer;
}

.nav-burger:hover,
.nav-burger:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.nav-burger-ico {
  display: block;
  width: 22px;
  height: 22px;
}

.nav-topbar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-left: auto;
  min-width: 0;
}

.nav-topbar .nav-brand {
  width: auto;
  margin-bottom: 0;
  padding: 0;
  gap: 0.85rem;
}

.nav-topbar .nav-brand-org {
  margin-left: 0;
}

.nav-topbar .nav-lockup img {
  height: 2.15rem;
}

.nav-topbar .workspace-bar-exit {
  color: rgba(255, 255, 255, 0.82);
}

.nav-topbar .seg {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-topbar .seg button {
  color: rgba(255, 255, 255, 0.52);
}

.nav-topbar .seg button.on {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 1023px) {
  .shell-app,
  #aisip-app.has-ssr-nav {
    max-width: 100%;
    overflow-x: clip;
  }

  .nav-topbar {
    display: flex;
    align-items: center;
    gap: 0.12rem;
    box-sizing: border-box;
    width: 100%;
    min-height: 3.15rem;
    padding: 0 0.4rem 0 0.12rem;
    background: #14161c;
    color: #fff;
  }

  .nav-topbar .nav-lockup img {
    height: 1.85rem;
  }

  .nav-topbar .nav-brand-home {
    display: none;
  }

  .nav-topbar .nav-brand-org {
    margin-left: 0;
  }

  .shell-app > aside.nav-col .nav-brand-org,
  #aisip-ssr-nav .ssr-aside .nav-brand-org {
    display: none;
  }

  .nav-topbar-end {
    gap: 0.35rem;
  }

  .nav-topbar .seg button {
    min-width: 1.85rem;
    padding: 0 0.42rem;
  }

  .shell-app > aside.nav-col,
  #aisip-ssr-nav .ssr-aside {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(268px, 88vw);
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  .shell-app > aside.nav-col .nav-col,
  #aisip-ssr-nav .ssr-aside-inner {
    min-height: 100%;
    height: auto;
  }

  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    margin: 0;
    background: var(--dim, rgba(17, 19, 24, 0.45));
    cursor: pointer;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  #aisip-ssr-nav:has(.nav-open-check:checked) .ssr-aside,
  #aisip-app.is-nav-open #aisip-ssr-nav .ssr-aside,
  .shell-app:has(.nav-open-check:checked) > aside.nav-col,
  .shell-app.is-nav-open > aside.nav-col {
    transform: translateX(0);
  }

  #aisip-ssr-nav:has(.nav-open-check:checked) .nav-scrim,
  #aisip-app.is-nav-open .nav-scrim,
  .shell-app:has(.nav-open-check:checked) > .nav-scrim,
  .shell-app.is-nav-open > .nav-scrim {
    display: block;
    pointer-events: auto;
    opacity: 1;
  }

  @media (prefers-reduced-motion: reduce) {
    .shell-app > aside.nav-col,
    #aisip-ssr-nav .ssr-aside,
    .nav-scrim {
      transition: none;
    }
  }
}

@media (min-width: 1024px) {
  .shell-app {
    background-image: linear-gradient(#14161c, #14161c);
    background-size: 268px 100%;
    background-repeat: no-repeat;
  }

  .shell-app > aside.nav-col {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    width: 268px;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .shell-app > .workspace {
    min-width: 0;
    grid-column: 2;
  }
}

.nav-brand {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.25rem;
  padding: 0;
  color: inherit;
}

.nav-brand-home {
  display: flex;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-decoration: none;
}

.nav-brand-home:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.nav-brand-org {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-brand-org:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.nav-brand-org-ico {
  display: block;
  width: 1.85rem;
  height: 1.85rem;
  object-fit: contain;
  opacity: 0.78;
}

.nav-brand-org:hover .nav-brand-org-ico,
.nav-brand-org:focus-visible .nav-brand-org-ico {
  opacity: 1;
}

.nav-lockup {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  height: auto;
  width: auto;
  max-width: 100%;
}

.nav-lockup img {
  display: block;
  flex-shrink: 1;
  height: 2.35rem;
  width: auto;
}

.nav-kicker {
  margin: 0 0 0.35rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}

.nav-plans-count {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}

.nav-plans-until {
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.nav-item.active .nav-plans-until,
.nav-item:hover .nav-plans-until {
  color: rgba(255, 255, 255, 0.55);
}

.nav-plans-reset {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}

.nav-item.active .nav-plans-count,
.nav-item:hover .nav-plans-count,
.nav-item.active .nav-plans-reset,
.nav-item:hover .nav-plans-reset {
  color: rgba(255, 255, 255, 0.58);
}

.nav-plans-track {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.nav-item.active .nav-plans-track,
.nav-item:hover .nav-plans-track {
  background: rgba(255, 255, 255, 0.18);
}

.nav-plans-fill {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: var(--accent-strong);
}

.nav-plans-fill.is-over {
  background: #e8a06a;
}

#aisip-app {
  position: relative;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

#aisip-ssr-nav:empty,
#aisip-ssr-nav[hidden] {
  display: none;
}

#aisip-ssr-nav:not(:empty):not([hidden]) {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 268px;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #14161c;
}

#aisip-app.has-ssr-nav {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  align-items: stretch;
  min-height: 100vh;
  background-image: linear-gradient(#14161c, #14161c);
  background-size: 268px 100%;
  background-repeat: no-repeat;
}

#aisip-app.has-ssr-nav:not(.is-hydrated) #root {
  visibility: hidden;
}

#aisip-ssr-nav .nav-col,
#aisip-ssr-nav .ssr-aside,
#aisip-ssr-nav .ssr-aside-inner {
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

.ssr-aside {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  background: #14161c;
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.ssr-aside-inner {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.ssr-head {
  flex-shrink: 0;
}

.ssr-rest {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.menu-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #5b4dff;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

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

.ssr-nav-bottom {
  margin-top: auto;
  flex-shrink: 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#aisip-app.has-ssr-nav > #root {
  min-width: 0;
  width: 100%;
  /* Fixed nav is out of flow; without this #root auto-places into the 268px
     first track and the workspace sits behind the sidebar (blank cabinet). */
  grid-column: 2;
}

.ssr-link {
  width: 100%;
  box-sizing: border-box;
  border-radius: 0.75rem;
  padding: 0.5rem 0.625rem;
  font-size: 15px;
  text-align: left;
}

.ssr-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 1023px) {
  #aisip-app.has-ssr-nav {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    background-image: none;
  }

  #aisip-app.has-ssr-nav > #root {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  #aisip-ssr-nav:not(:empty):not([hidden]) {
    position: sticky;
    top: 0;
    left: auto;
    z-index: 40;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    background: #14161c;
  }

  #aisip-ssr-nav .nav-col,
  #aisip-ssr-nav .ssr-aside,
  #aisip-ssr-nav .ssr-aside-inner {
    height: auto;
    max-height: none;
  }

  #aisip-ssr-nav .ssr-aside {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
  }
}
