/* Shared page width — keeps navbar/footer aligned on every page */
.site-shell__wrap,
.container {
  width: min(1180px, calc(100% - 40px));
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.site-shell__nav {
  margin-top: 18px;
  width: 100%;
  min-height: 90px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;
  padding: 18px 22px;
  overflow: visible;
  border-radius: 26px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: rgba(58, 72, 114, 0.45);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 24px 55px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.site-shell__logo {
  grid-column: 1;
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text, #f8fbff);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-shell__logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--accent, #38cadd);
  border: 1px solid rgba(56, 202, 221, 0.35);
  border-bottom: 4px solid var(--accent-shadow, #168392);
  box-shadow: 0 0 12px rgba(56, 202, 221, 0.18);
  box-sizing: border-box;
  flex: 0 0 auto;
}

.site-shell__logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-shell__links {
  grid-column: 2;
  justify-self: center;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: max-content;
  max-width: 100%;
  padding: 6px 8px;
  overflow: visible;
}

.site-shell__nav-link {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 96px;
  padding: 0 18px;
  border-radius: 999px;
  box-sizing: border-box;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted, #c7cde4);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.site-shell__nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(56, 202, 221, 0.16);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: -1;
}

.site-shell__nav-link:hover {
  color: var(--text, #f8fbff);
  border-color: rgba(56, 202, 221, 0.42);
  background: rgba(56, 202, 221, 0.1);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.14),
    0 0 14px rgba(56, 202, 221, 0.2);
}

.site-shell__nav-link:hover::before {
  opacity: 1;
}

.site-shell__nav-link:active {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.18);
}

.site-shell__nav-link:focus-visible {
  outline: 2px solid rgba(56, 202, 221, 0.55);
  outline-offset: 2px;
}

.site-shell__nav-link[aria-current="page"] {
  color: #102033;
  border-color: rgba(75, 216, 231, 0.55);
  border-bottom-width: 4px;
  border-bottom-color: #168392;
  background: linear-gradient(180deg, #4bd8e7 0%, #38cadd 100%);
  box-shadow: 0 0 16px rgba(56, 202, 221, 0.22);
}

.site-shell__nav-link[aria-current="page"]::before {
  background: rgba(255, 255, 255, 0.14);
}

.site-shell__nav-link[aria-current="page"]:hover {
  color: #102033;
  border-color: rgba(75, 216, 231, 0.65);
  border-bottom-width: 4px;
  border-bottom-color: #168392;
  background: linear-gradient(180deg, #5ee0ee 0%, #45d4e6 100%);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.28),
    0 0 18px rgba(56, 202, 221, 0.28);
}

.site-shell__auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(88, 101, 242, 0.38);
  border-bottom-width: 6px;
  border-bottom-color: #3f48b3;
  background: linear-gradient(180deg, #6b77ff 0%, #5865f2 100%);
  box-shadow: 0 0 18px rgba(88, 101, 242, 0.2);
  box-sizing: border-box;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.site-shell__auth:hover {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.16),
    0 0 20px rgba(88, 101, 242, 0.32);
}

.site-shell__auth[data-state="loading"] {
  opacity: 0.82;
}

.site-shell__auth[data-state="authenticated"] {
  border-color: rgba(56, 202, 221, 0.4);
  border-bottom-width: 6px;
  border-bottom-color: #168392;
  background: linear-gradient(180deg, #4bd8e7 0%, #38cadd 100%);
  box-shadow: 0 0 18px rgba(56, 202, 221, 0.2);
  color: #102033;
}

.site-shell__auth[data-state="authenticated"]:hover {
  box-shadow: 0 0 22px rgba(56, 202, 221, 0.28);
}

.site-shell__account {
  position: relative;
  grid-column: 3;
  justify-self: end;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  overflow: visible;
}

.site-shell__profile-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(56, 202, 221, 0.28);
  background: rgba(58, 72, 114, 0.5);
  color: var(--text, #f8fbff);
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-shell__profile-toggle:hover,
.site-shell__profile-toggle[aria-expanded="true"] {
  transform: translateY(-2px);
  border-color: rgba(56, 202, 221, 0.44);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 16px 34px rgba(0, 0, 0, 0.28), 0 0 18px rgba(56, 202, 221, 0.14);
}

.site-shell__profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.08);
}

.site-shell__profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-shell__profile-name {
  max-width: 4.5em;
  overflow: hidden;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-shell__profile-caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.7;
  flex: 0 0 auto;
}

.site-shell__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(23, 29, 49, 1);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  display: none;
  z-index: 15;
}

.site-shell__menu[data-open="true"] {
  display: grid;
  gap: 6px;
}

.site-shell__menu-link,
.site-shell__menu-button {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #dbe6ff;
  text-decoration: none;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.site-shell__menu-link:hover,
.site-shell__menu-button:hover {
  background: rgba(56, 202, 221, 0.12);
  color: var(--text, #f8fbff);
}

.site-shell__menu-button {
  color: #ffb9c5;
}

.site-shell__menu-button--neutral {
  color: #dbe6ff;
}

.site-shell__modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 6, 14, 0.72);
  z-index: 40;
}

.site-shell__modal-backdrop[data-open="true"] {
  display: flex;
}

.site-shell__modal {
  width: min(100%, 460px);
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 24, 41, 0.94);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
}

.site-shell__modal h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.site-shell__modal p {
  margin: 10px 0 0;
  color: #aebce3;
  line-height: 1.7;
}

.site-shell__modal-form {
  margin-top: 18px;
}

.site-shell__modal-label {
  display: block;
  margin-bottom: 8px;
  color: #dbe6ff;
  font-size: 13px;
  font-weight: 700;
}

.site-shell__modal-input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #f8fbff;
  font: inherit;
}

.site-shell__modal-input:focus {
  outline: 2px solid rgba(56, 202, 221, 0.5);
  outline-offset: 2px;
}

.site-shell__modal-help {
  margin-top: 8px;
  color: #8ea2d8;
  font-size: 12px;
}

.site-shell__modal-error {
  min-height: 20px;
  margin-top: 10px;
  color: #ff9aaa;
  font-size: 13px;
  font-weight: 600;
}

.site-shell__verify-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 13050;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(420px, calc(100vw - 36px));
  padding: 14px 14px 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(207, 56, 221, 0.45);
  background: linear-gradient(180deg, rgba(28, 34, 58, 0.98), rgba(16, 20, 36, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(207, 56, 221, 0.16);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.site-shell__verify-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.site-shell__verify-toast-copy {
  margin: 0;
  flex: 1 1 auto;
  color: #e8efff;
  font-size: 14px;
  line-height: 1.55;
}

.site-shell__verify-toast-link {
  color: #38cadd;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-shell__verify-toast-link:hover {
  color: #6ee4f3;
}

.site-shell__verify-toast-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbe6ff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-shell__verify-toast-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (max-width: 720px) {
  .site-shell__verify-toast {
    right: 12px;
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
  }

  body.site-shell--mobile-nav .site-shell__verify-toast {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}

.site-shell__modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.site-shell__modal-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.site-shell__modal-btn--primary {
  background: linear-gradient(180deg, #4bd8e7 0%, #38cadd 100%);
  color: #102033;
  box-shadow: 0 6px 0 #168392;
}

.site-shell__modal-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #dbe6ff;
}

.site-shell__footer {
  margin-top: 46px;
  padding: 30px 0 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.site-shell__footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.site-shell__footer-title {
  margin: 0 0 12px;
  font-size: 14px;
}

.site-shell__footer-copy,
.site-shell__footer-links a {
  color: #95a7d2;
  text-decoration: none;
  line-height: 1.95;
}

.site-shell__footer-links a:hover {
  color: var(--text, #f8fbff);
}

.site-shell__copyright {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #7485b2;
  font-size: 13px;
}

.site-shell__bottom-nav {
  display: none;
}

.site-shell__bottom-nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 56px;
  padding: 7px 6px 5px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted, #c7cde4);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 4px 0 rgba(8, 12, 24, 0.55);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.site-shell__bottom-nav-item:hover {
  color: var(--text, #f8fbff);
  border-color: rgba(56, 202, 221, 0.38);
  background: rgba(56, 202, 221, 0.14);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 6px 0 rgba(8, 12, 24, 0.5),
    0 6px 18px rgba(56, 202, 221, 0.16);
}

.site-shell__bottom-nav-item:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(8, 12, 24, 0.45);
}

.site-shell__bottom-nav-item:focus-visible {
  outline: 2px solid rgba(56, 202, 221, 0.55);
  outline-offset: 2px;
}

.site-shell__bottom-nav-item.is-active {
  color: #102033;
  border-color: rgba(75, 216, 231, 0.55);
  background: linear-gradient(180deg, #4bd8e7 0%, #38cadd 100%);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.35),
    0 4px 0 #168392,
    0 0 16px rgba(56, 202, 221, 0.22);
}

.site-shell__bottom-nav-item.is-active:hover {
  color: #102033;
  border-color: rgba(75, 216, 231, 0.65);
  background: linear-gradient(180deg, #5ee0ee 0%, #45d4e6 100%);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.35),
    0 6px 0 #168392,
    0 0 20px rgba(56, 202, 221, 0.28);
}

.site-shell__bottom-nav-item.is-active:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.2),
    0 1px 0 #168392;
}

.site-shell__bottom-nav-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.site-shell__bottom-nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-shell__bottom-nav-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
}

@media (max-width: 960px) {
  .site-shell__nav-link {
    min-width: 84px;
    padding: 0 14px;
  }

  .site-shell__footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body.site-shell--mobile-nav {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .site-shell__bottom-nav {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
    background: rgba(58, 72, 114, 0.45);
    backdrop-filter: blur(18px) saturate(1.12);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
    box-shadow:
      inset 0 1px rgba(255, 255, 255, 0.1),
      0 16px 40px rgba(0, 0, 0, 0.38);
  }

  .site-shell__nav {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 64px;
    padding: 12px 14px 16px;
    column-gap: 12px;
  }

  .site-shell__nav .site-shell__links {
    display: none;
  }

  .site-shell__logo {
    grid-column: 1;
  }

  .site-shell__account {
    grid-column: 2;
    justify-self: end;
    overflow: visible;
  }

  .site-shell__menu {
    top: calc(100% + 10px);
    bottom: auto;
    z-index: 50;
  }

  .site-shell__footer {
    margin-bottom: 12px;
  }
}

@media (max-width: 380px) {
  .site-shell__bottom-nav {
    left: 8px;
    right: 8px;
    gap: 6px;
    padding: 8px;
  }

  .site-shell__bottom-nav-item {
    min-height: 52px;
    padding: 6px 4px 4px;
    border-radius: 16px;
    font-size: 9px;
  }

  .site-shell__bottom-nav-icon,
  .site-shell__bottom-nav-icon svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 640px) {
  .site-shell__auth {
    min-height: 42px;
    padding: 0 14px;
    font-size: 12px;
  }

  .site-shell__account {
    max-width: min(100%, 220px);
  }

  .site-shell__profile-toggle {
    max-width: 100%;
  }

  .site-shell__menu {
    left: auto;
    right: 0;
    min-width: 200px;
  }

  .site-shell__copyright {
    flex-direction: column;
  }

  .site-shell__modal-actions {
    flex-direction: column;
  }
}
