@import url("./common.css");

.app-shell {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 16px;
  height: var(--header-height);
  padding: 16px;
  color: var(--white);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 240px;
}

.brand img {
     width: 225px;
    height: 48px;
    object-fit: contain;
}

.session-count {
  margin: 9px 0px 0px 2px;
  color: var(--white);
  font-weight: 400;
}
.session-count span {
  color: var(--white);
  font-weight: 600;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  min-width: 0;
}

.topbar-actions .icon-button {
  border: 0;
  background: #FFFFFF4D;
  cursor: pointer;
  border-radius: 30px;
  width: 38px;
  height: 38px;
  padding: 8px;
}
.topbar-actions .icon-button img {
  width: 20px;
  height: 20px;
}

.help-link,
.profile-menu {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--white);
  font-size: 14px;
  line-height: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.profile-menu {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.help-link img,
.profile-menu img {
  width: 24px;
  height: 24px;
}
.profile-menu .header-chevron-down{
  width: 15px;
  height: 15px;
}

.workspace {
  display: flex;
  gap: 24px;
  height: calc(100vh - var(--header-height));
  padding: 16px;
  overflow: hidden;
}

.sidebar-shell {
  flex: 0 0 var(--sidebar-open);
  width: var(--sidebar-open);
  height: 100%;
  padding: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 -8px 12px -12px rgba(255, 255, 255, 0.55), inset 0 -8px 12px -12px rgba(255, 255, 255, 0.48);
  transition: flex-basis 180ms ease, width 180ms ease;
}

.sidebar-shell.glass-border {
  border: 0;
}

.app-shell.is-collapsed .sidebar-shell {
  flex-basis: var(--sidebar-closed);
  width: var(--sidebar-closed);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  list-style: none;
}

.nav-group {
  border-radius: 16px;
}

.nav-group.is-open {
  padding: 0 8px 8px;
  background: rgba(255, 255, 255, 0.3);
}

.nav-group.is-open .nav-button {
  width: calc(100% + 16px);
  margin: 0 -8px 6px;
}

.nav-button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  align-items: center;
  width: 100%;
  height: 40px;
  padding: 8px;
  border: 0;
  border-radius: 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.nav-button.is-active {
   background: #6357574d;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-button img {
  width: 24px;
  height: 24px;
}


.nav-title {
  min-width: 0;
  padding-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-angle {
  justify-self: end;
  width: 16px !important;
  height: 16px !important;
  opacity: 0.95;
}

.app-shell.is-collapsed .nav-button {
  grid-template-columns: 24px;
  justify-content: center;
  width: 100%;
}

.app-shell.is-collapsed .nav-title,
.app-shell.is-collapsed .nav-angle,
.app-shell.is-collapsed .sidebar-children {
  display: none;
}

.sidebar-children {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 0;
  padding: 0 0 0 24px;
}

.nav-group.is-open .sidebar-children {
  display: flex;
}

.child-button {
  display: block;
  width: 100%;
  min-height: 30px;
  padding: 4px 16px;
  border: 0;
  border-radius: 5px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.25);
  font-size: 14px;
  line-height: 24px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.child-button:hover,
.child-button.is-active {
  color: var(--grey4txt);
  background: var(--white);
}

.content-shell {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 24px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
}

.content-shell,
.nav-list {
  scrollbar-width: none;
}

.content-shell::-webkit-scrollbar,
.nav-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

@media (max-width: 1500px) {
  body { min-width: 1180px; }
  .workspace { gap: 16px; }
  .content-shell { padding: 18px; }
      body {
        min-width: auto;
    }
}

@media (max-width: 1024px) {
  body {
    min-width: 0;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  .app-shell {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  .topbar {
    grid-template-columns: auto auto 1fr auto;
    grid-template-rows: auto auto;
    height: auto;
    padding: 26px 12px 8px;
    gap: 10px 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 166px;
    height: 36px;
  }

  .session-count {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
  }

  .topbar-actions {
    gap: 12px;
  }

  .help-link span,
  .profile-menu span {
    display: none;
  }

  .workspace {
    min-height: 0;
    height: calc(100vh - 92px);
    padding: 0 12px 24px;
    overflow: hidden;
  }

  .app-shell[data-page="dashboard"] .content-shell {
    padding: 0;
    height: 100%;
    overflow: auto;
    border-radius: 0;
    background: transparent;
  }

  .app-shell[data-page="dashboard"].is-mobile-sidebar-open .content-shell {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .app-shell[data-page="dashboard"] .sidebar-shell {
    position: fixed;
    z-index: 30;
    top: 72px;
    left: 0;
    width: 100vw;
    max-width: none;
    height: calc(100vh - 72px);
    flex-basis: auto;
    border-radius: 0;
    transform: translateX(0);
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .app-shell[data-page="dashboard"].is-collapsed .sidebar-shell {
    width: 100vw;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
  }
}
