.zs-pageShell {
  --zs-shell-bg: rgba(6, 10, 16, 0.82);
  --zs-shell-surface: rgba(11, 18, 27, 0.94);
  --zs-shell-border: rgba(255, 255, 255, 0.12);
  --zs-shell-text: #f5f7fb;
  --zs-shell-muted: rgba(228, 235, 244, 0.72);
  --zs-shell-start: #7fe7dc;
  --zs-shell-end: #41abff;
  position: fixed;
  inset: 14px 14px auto 14px;
  z-index: 12000;
  padding: 10px 12px;
  border: 1px solid var(--zs-shell-border);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 38%),
    var(--zs-shell-bg);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  color: var(--zs-shell-text);
}

.zs-pageShell__inner {
  width: min(1360px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.zs-pageShell[data-theme="kids"] {
  --zs-shell-bg: rgba(17, 10, 4, 0.9);
  --zs-shell-surface: rgba(28, 16, 6, 0.96);
  --zs-shell-start: #ff9100;
  --zs-shell-end: #f7b500;
}

.zs-pageShell[data-theme="tlt"] {
  --zs-shell-bg: rgba(18, 9, 8, 0.88);
  --zs-shell-surface: rgba(25, 10, 8, 0.95);
  --zs-shell-start: #ff8a48;
  --zs-shell-end: #d14d2b;
}

.zs-pageShell[data-theme="academy"] {
  --zs-shell-bg: rgba(8, 23, 29, 0.9);
  --zs-shell-surface: rgba(11, 35, 42, 0.96);
  --zs-shell-start: #19bba0;
  --zs-shell-end: #0e2f3d;
}

.zs-pageShell[data-theme="smartnext"] {
  --zs-shell-bg: rgba(0, 0, 0, 0.84);
  --zs-shell-surface: rgba(9, 12, 18, 0.92);
  --zs-shell-border: rgba(175, 208, 255, 0.14);
  --zs-shell-start: #75e8ff;
  --zs-shell-end: #5c7cff;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 8px clamp(18px, 3vw, 40px);
  border-width: 0 0 1px;
  border-radius: 0;
  transform: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 32%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.96), rgba(5, 9, 16, 0.86));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.zs-pageShell[data-theme="smartnext"] .zs-pageShell__inner {
  width: min(1380px, 100%);
  min-height: 62px;
  gap: clamp(14px, 2vw, 28px);
}

.zs-pageShell[data-theme="smartnext"] .zs-pageShell__brandName,
.zs-pageShell[data-theme="smartnext"] .zs-pageShell__link,
.zs-pageShell[data-theme="smartnext"] .zs-pageShell__dashboardValue,
.zs-pageShell[data-theme="smartnext"] .zs-pageShell__dashboardLabel {
  font-family: "Sora", "Manrope", sans-serif;
}

.zs-pageShell[data-theme="smartnext"] .zs-pageShell__brandMark {
  border-radius: 14px;
  border: 1px solid rgba(117, 232, 255, 0.18);
  background:
    radial-gradient(circle at 28% 28%, rgba(117, 232, 255, 0.18), transparent 52%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(8, 13, 20, 0.94));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
}

.zs-pageShell[data-theme="smartnext"] .zs-pageShell__nav {
  gap: 10px;
}

.zs-pageShell[data-theme="smartnext"] .zs-pageShell__link {
  gap: 8px;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 14px;
}

.zs-pageShell[data-theme="smartnext"] .zs-pageShell__dashboard {
  min-width: 182px;
  min-height: 46px;
  padding-inline: 13px;
  background: rgba(9, 13, 20, 0.82);
}

.zs-pageShell__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}

.zs-pageShell__brandMark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--zs-shell-start), var(--zs-shell-end));
  color: #031116;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.zs-pageShell__brandMark img {
  width: 24px;
  height: 24px;
  display: block;
}

.zs-pageShell__brandText {
  display: grid;
  gap: 1px;
}

.zs-pageShell__brandName {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.zs-pageShell__brandMeta {
  font-size: 0.68rem;
  color: var(--zs-shell-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zs-pageShell__nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.zs-pageShell__nav::-webkit-scrollbar {
  display: none;
}

.zs-pageShell__link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--zs-shell-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.zs-pageShell__linkIcon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  border-radius: 11px;
  border: 1px solid rgba(117, 232, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 44%),
    linear-gradient(135deg, rgba(117, 232, 255, 0.12), rgba(92, 124, 255, 0.08)),
    rgba(8, 12, 19, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 24px rgba(0, 0, 0, 0.22);
  color: var(--zs-shell-start);
  flex-shrink: 0;
}

.zs-pageShell__linkIcon svg,
.zs-pageShell__linkIcon i,
.zs-pageShell__linkIcon img {
  display: block;
  overflow: visible;
}

.zs-pageShell__linkIcon i {
  width: auto;
  height: auto;
  font-size: 0.95rem;
  line-height: 1;
}

.zs-pageShell__linkIcon svg,
.zs-pageShell__linkIcon img {
  width: 16px;
  height: 16px;
}

.zs-pageShell__linkIcon--logo img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.zs-pageShell__link:hover .zs-pageShell__linkIcon,
.zs-pageShell__link:focus-visible .zs-pageShell__linkIcon,
.zs-pageShell__link.is-active .zs-pageShell__linkIcon {
  border-color: rgba(117, 232, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(135deg, rgba(117, 232, 255, 0.18), rgba(92, 124, 255, 0.14)),
    rgba(10, 15, 24, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(117, 232, 255, 0.04);
}

.zs-pageShell__link:hover,
.zs-pageShell__link:focus-visible {
  color: var(--zs-shell-text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.zs-pageShell__link.is-active {
  color: var(--zs-shell-text);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--zs-shell-start) 18%, transparent), color-mix(in srgb, var(--zs-shell-end) 14%, transparent)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid color-mix(in srgb, var(--zs-shell-start) 34%, rgba(255, 255, 255, 0.12));
}

.zs-pageShell__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.zs-pageShell__dashboard,
.zs-pageShell__toggle {
  border: 1px solid var(--zs-shell-border);
  border-radius: 14px;
  background: var(--zs-shell-surface);
  color: var(--zs-shell-text);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.zs-pageShell__dashboard {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  font: inherit;
  font-weight: 600;
}

.zs-pageShell__dashboard:hover,
.zs-pageShell__dashboard:focus-visible,
.zs-pageShell__toggle:hover,
.zs-pageShell__toggle:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--zs-shell-start) 40%, rgba(255, 255, 255, 0.12));
  outline: none;
}

.zs-pageShell__avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--zs-shell-start), var(--zs-shell-end));
  color: #051016;
  font-size: 0.84rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.zs-pageShell__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.zs-pageShell__dashboardText {
  display: grid;
  text-align: left;
  line-height: 1.02;
  min-width: 0;
}

.zs-pageShell__dashboardLabel {
  font-size: 0.76rem;
  color: var(--zs-shell-muted);
}

.zs-pageShell__dashboardValue {
  font-size: 0.86rem;
  font-weight: 700;
  max-width: 158px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zs-pageShell__toggle {
  display: none;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.zs-pageShell__toggleIcon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zs-pageShell__toggleIcon svg {
  width: 100%;
  height: 100%;
  display: block;
}

body.zs-shared-shell-active {
  padding-top: var(--zs-shell-offset, 84px);
}

body.zs-shared-shell-active.zs-shared-shell--smartnext {
  padding-top: var(--zs-shell-offset, 88px);
}

body.zs-shared-shell-active > nav:first-of-type,
body.zs-shared-shell-active .navbar,
body.zs-shared-shell-active .menu,
body.zs-shared-shell-active .sub-menu-wrap,
body.zs-shared-shell-active .Zs-sub-menu-wrap,
body.zs-shared-shell-active #zsEditModal,
body.zs-shared-shell-active #zsProfileOverlay {
  display: none !important;
}

body.zs-shared-shell-active.zs-shared-shell--academy .zs-pageShell {
  --zs-shell-start: #19bba0;
  --zs-shell-end: #0e2f3d;
}

@media screen and (max-width: 1080px) {
  .zs-pageShell__inner {
    flex-wrap: wrap;
  }

  .zs-pageShell__nav {
    order: 4;
    width: 100%;
    justify-content: flex-start;
    display: none;
    padding-top: 6px;
  }

  .zs-pageShell.is-open .zs-pageShell__nav {
    display: flex;
  }

  .zs-pageShell[data-theme="smartnext"] {
    overflow: visible;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__inner {
    flex-wrap: nowrap;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__nav {
    order: unset;
    position: absolute;
    top: calc(100% + 10px);
    left: clamp(18px, 3vw, 40px);
    right: clamp(18px, 3vw, 40px);
    width: auto;
    display: none;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(175, 208, 255, 0.14);
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 28%),
      rgba(7, 11, 17, 0.96);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__nav::-webkit-scrollbar {
    display: none;
  }

  .zs-pageShell[data-theme="smartnext"].is-open .zs-pageShell__nav {
    display: flex;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__link {
    width: auto;
    min-width: max-content;
    justify-content: center;
    min-height: 42px;
    padding-inline: 16px;
    border-radius: 14px;
  }

  body.zs-shared-shell-active.zs-shared-shell--smartnext {
    padding-top: var(--zs-shell-offset, 94px);
  }

  .zs-pageShell__toggle {
    display: inline-flex;
  }
}

@media screen and (max-width: 780px) {
  .zs-pageShell {
    inset: 10px 10px auto 10px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .zs-pageShell[data-theme="smartnext"] {
    inset: 0 0 auto 0;
    width: 100%;
    padding: 10px 14px;
    border-radius: 0;
  }

  .zs-pageShell__inner {
    gap: 10px;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__inner {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    min-height: auto;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__actions {
    margin-left: auto;
    gap: 8px;
    flex: 0 0 auto;
  }

  body.zs-shared-shell-active {
    padding-top: var(--zs-shell-offset, 76px);
  }

  body.zs-shared-shell-active.zs-shared-shell--smartnext {
    padding-top: var(--zs-shell-offset, 82px);
  }

  .zs-pageShell__brandName {
    font-size: 0.94rem;
  }

  .zs-pageShell__brandMeta {
    display: none;
  }

  .zs-pageShell__brandMark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .zs-pageShell__brandMark img {
    width: 20px;
    height: 20px;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__dashboard,
  .zs-pageShell__dashboard {
    width: 36px;
    max-width: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 999px;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__dashboardText,
  .zs-pageShell__dashboardText {
    display: none;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__avatar,
  .zs-pageShell__avatar {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__toggle,
  .zs-pageShell__toggle {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
  }

  .zs-pageShell__toggleIcon {
    width: 18px;
    height: 18px;
  }

  .zs-pageShell__nav {
    gap: 6px;
  }

  .zs-pageShell__link {
    width: auto;
    justify-content: center;
  }

  .zs-pageShell[data-theme="smartnext"] .zs-pageShell__nav {
    top: calc(100% + 8px);
    left: 14px;
    right: 14px;
    padding: 8px;
    border-radius: 16px;
  }
}
