.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 0;
}

.topbar {
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  z-index: 100;
}

.topbar-inner {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: auto minmax(0, 1fr);
  margin: 0 auto;
  padding: 0 34px;
  width: 100%;
  backdrop-filter: blur(16px);
}

.site-navigation {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.mobile-menu-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  display: none;
  height: 44px;
  justify-content: center;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  width: 44px;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle[aria-expanded="true"] {
  background: rgba(7, 93, 242, 0.08);
  border-color: rgba(7, 93, 242, 0.24);
  color: var(--accent);
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0;
}

.brand-logo {
  object-fit: contain;
  object-position: left center;
}

.nav {
  align-items: center;
  display: flex;
  justify-content: center;
}

.nav a {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: var(--fw-title);
  gap: 8px;
  position: relative;
  text-transform: uppercase;
  transition: 0.22s ease;
}

.nav a i {
  color: #091327;
  font-size: 0.92rem;
  transition: 0.22s ease;
}

.nav a.active,
.nav a:hover {
  border-color: rgba(7, 93, 242, 0.18);
  box-shadow: none;
  color: var(--accent);
  transform: none;
}

.nav a.active i,
.nav a:hover i {
  color: var(--accent);
}

.nav a.active::after,
.nav a:hover::after {
  display: none;
}

.nav-actions {
  align-items: center;
  display: flex;
}

.notification-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(219, 228, 238, 0.95);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(12, 24, 43, 0.05);
  color: var(--ink);
  display: inline-flex;
  height: 54px;
  justify-content: center;
  position: relative;
  width: 54px;
}

.notification-toggle i {
  color: var(--accent);
  font-size: 1.05rem;
}

.notification-toggle span {
  align-items: center;
  background: #ff3d57;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: var(--fw-title);
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  position: absolute;
  right: -7px;
  top: -7px;
}

.notification-item {
  background: #f6f9fd;
  border: 1px solid rgba(219, 228, 238, 0.9);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 4px;
  padding: 12px;
}

.notification-item.unread {
  background: rgba(7, 93, 242, 0.08);
  border-color: rgba(7, 93, 242, 0.18);
}

.notification-item strong {
  font-size: 0.88rem;
}

.notification-item small {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-actions .button,
.user-menu-link,
.nav-action-link {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: var(--fw-title);
  gap: 8px;
  min-height: 46px;
  padding: 0 14px;
  text-transform: uppercase;
  transition: 0.22s ease;
}

.user-menu-link,
.nav-action-link {
  background: #fff;
  border: 1px solid rgba(219, 228, 238, 0.95);
  box-shadow: 0 8px 22px rgba(12, 24, 43, 0.05);
  color: var(--ink);
  min-width: 118px;
}

.user-menu-link {
  padding-left: 10px;
}

.account-menu {
  position: relative;
}

.account-dropdown {
  border: 1px solid var(--line);
  display: grid;
  opacity: 0;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  transform: translateY(-8px);
  transition: 0.2s ease;
  visibility: hidden;
  z-index: 160;
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.account-dropdown a,
.account-dropdown button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  font-size: 0.76rem;
  font-weight: var(--fw-title);
  gap: 10px;
  grid-template-columns: auto 1fr auto;
  min-height: 40px;
  padding: 0 10px;
  text-align: left;
  text-transform: uppercase;
  width: 100%;
}

.account-dropdown i {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.account-dropdown strong {
  align-items: center;
  background: #ff3d57;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  justify-content: center;
}

.account-dropdown-item {
  position: relative;
}

.account-notification-preview {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 6px;
  min-width: 290px;
  opacity: 0;
  padding: 10px;
  pointer-events: none;
  position: absolute;
  right: calc(100% + 10px);
  top: 0;
  transform: translateX(8px);
  transition: 0.18s ease;
  visibility: hidden;
  z-index: 170;
}

.has-notification-preview:hover .account-notification-preview,
.has-notification-preview:focus-within .account-notification-preview {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
}

.account-notification-preview::after {
  content: "";
  height: 100%;
  position: absolute;
  right: -12px;
  top: 0;
  width: 12px;
}

.account-dropdown .account-notification-item {
  grid-template-columns: auto 1fr;
  min-height: 0;
  padding: 9px 10px;
  text-transform: none;
}

.account-notification-item.unread {
  background: #f4f8ff;
  border-color: rgba(7, 93, 242, 0.16);
}

.account-notification-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-notification-item b {
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-notification-item small {
  font-size: 0.68rem;
  font-weight: var(--fw-item-title);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown form {
  margin: 0;
}

.nav-action-link i,
.nav-actions .button i {
  align-items: center;
  display: inline-flex;
  font-size: 0.92rem;
  justify-content: center;
}

.nav-action-link i {
  background: rgba(7, 93, 242, 0.09);
  border-radius: 7px;
  color: var(--accent);
  height: 28px;
  width: 28px;
}

.nav-badge {
  align-items: center;
  background: #ff3d57;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: var(--fw-title);
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  position: absolute;
  right: -7px;
  top: -7px;
}

.user-menu-link .nav-badge {
  font-style: normal;
}

.nav-actions .button:hover,
.user-menu-link:hover,
.nav-action-link:hover {
  border-color: rgba(7, 93, 242, 0.18);
  box-shadow: 0 10px 22px rgba(12, 24, 43, 0.07);
  color: var(--accent);
  transform: none;
}

.nav-actions .button.primary:hover {
  color: #fff;
  box-shadow:
    inset 0 -9px 18px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 30px rgba(7, 93, 242, 0.26);
}

.user-menu-link img,
.user-menu-link span {
  border-radius: 50%;
  height: 30px;
  width: 30px;
}

.user-menu-link img {
  object-fit: cover;
}

.user-menu-link span {
  align-items: center;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  font-weight: var(--fw-title);
  justify-content: center;
}

@media (max-width: 1180px) {
  .topbar-inner {
    gap: 10px 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 14px;
  }

  .brand {
    justify-content: flex-start;
    min-width: 0;
  }

  .brand-logo {
    height: 56px;
    width: 132px;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .site-navigation {
    display: none;
    gap: 12px;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;

  }

  .site-navigation.is-open {
    display: grid;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .nav {
    align-items: stretch;
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav a {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .nav-actions {
    align-items: stretch;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    padding-top: 12px;
  }

  .nav-actions .auth-widget {
    display: contents;
  }

  .nav-actions .button,
  .nav-actions .user-menu-link,
  .nav-actions .nav-action-link {
    justify-content: center;
    min-width: 0;
    width: 100%;
  }

  .account-menu {
    grid-column: 1 / -1;
  }

  .account-dropdown {
    box-shadow: none;
    margin-top: 8px;
    min-width: 0;
    opacity: 1;
    position: static;
    transform: none;
    visibility: visible;
  }

  .account-notification-preview {
    display: none;
  }

  .admin-action-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar {
    width: min(100% - 20px, 1920px);
  }

  .nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .account-notification-preview {
    margin-top: 6px;
    min-width: 0;
    position: static;
    right: auto;
    transform: none;
  }

  .has-notification-preview:hover .account-notification-preview,
  .has-notification-preview:focus-within .account-notification-preview {
    transform: none;
  }

  .account-notification-preview::after {
    display: none;
  }
}

.page {
  flex: 1 0 auto;
  min-height: 520px;
}

.page-inner,
.content-container,
.page > .eyebrow,
.page > h1,
.page > .lead,
.page > .grid,
.page > .table-panel,
.page > .actions,
.page > .notice {
  margin-left: auto;
  margin-right: auto;
  width: min(100% - 48px, var(--container));
}

.page-inner {
  padding: 48px 0;
}

.page > .eyebrow {
  padding-top: 48px;
}

.page > .actions {
  padding-bottom: 48px;
}

/* Footer */
.footer {
  flex-shrink: 0;
  background:
    linear-gradient(90deg,
      rgba(255,255,255,0.99) 0%,
      rgba(255,255,255,0.985) 50%,
      rgba(242,247,255,0.9) 78%,
      rgba(236,244,255,0.84) 100%);
  border: 1px solid rgba(219, 228, 238, 0.95);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(12, 24, 43, 0.06), inset 0 1px 0 rgba(255,255,255,0.7);
  margin: 28px auto 24px;
  overflow: hidden;
  position: relative;
  width: min(100% - 48px, var(--container));
}

.footer::before {
  background:
    linear-gradient(90deg,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,0.98) 48%,
      rgba(255,255,255,0.72) 67%,
      rgba(255,255,255,0.28) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.76));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.footer::after {
  background: url("../images/hero-counterstrike.webp") right center / auto 118% no-repeat;
  content: "";
  filter: saturate(1.1) contrast(1.03);
  inset: -24px 0 -24px 0;
  opacity: 0.32;
  pointer-events: none;
  position: absolute;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 50%, rgba(0,0,0,0.18) 61%, #000 80%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, transparent 50%, rgba(0,0,0,0.18) 61%, #000 80%, #000 100%);
  z-index: 0;
}

.footer-glow {
  background: radial-gradient(circle at 88% 54%, rgba(7,93,242,0.20), transparent 36%);
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.footer-main {
  align-items: start;
  display: grid;
  gap: clamp(34px, 4vw, 78px);
  grid-template-columns: 1.25fr 0.78fr 0.85fr 0.95fr 1.62fr;
  margin: 0 auto;
  max-width: none;
  padding: 42px 48px 34px;
  position: relative;
  width: 100%;
  z-index: 2;
}

.footer-brand {
  align-items: center;
  display: inline-flex;
  gap: 0;
  margin-bottom: 14px;
}

.footer-logo {
  height: 52px;
  object-fit: contain;
  width: 92px;
}

.footer h3 {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: var(--fw-title);
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer p,
.footer a {
  color: var(--text);
  display: block;
  font-size: 0.8rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.footer-brand-col p {
  max-width: 310px;
}

.footer a:hover {
  color: var(--accent);
}

.footer-community-active::after {
  content: "";
  height: 14px;
  left: 0;
  bottom: 100%;
  position: absolute;
  right: 0;
  top: auto;
}

.footer-active-popover {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(219, 228, 238, 0.95);
  border-radius: 9px;
  box-shadow: 0 14px 34px rgba(12, 24, 43, 0.14);
  bottom: calc(100% + 8px);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  left: auto;
  max-width: min(190px, 72vw);
  opacity: 0;
  padding: 6px;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: auto;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  transition-delay: 0.08s;
  visibility: hidden;
  width: max-content;
  z-index: 20;
}

.footer-community-active:hover .footer-active-popover,
.footer-community-active:focus-within .footer-active-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
  visibility: visible;
}

.footer-active-popover a,
.footer-active-popover img,
.footer-active-popover span {
  border-radius: 50%;
  height: 24px;
  margin: 0;
  width: 24px;
}

.footer-active-popover a {
  color: inherit;
  display: inline-flex;
  flex: 0 0 auto;
  line-height: 1;
  max-width: none;
  overflow: visible;
  text-align: left;
  text-overflow: clip;
  white-space: normal;
}

.footer-active-popover img {
  display: block;
  object-fit: cover;
}

.footer-active-popover span {
  align-items: center;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  font-size: 0.62rem;
  font-weight: var(--fw-title);
  justify-content: center;
  max-width: none;
  overflow: visible;
  text-align: center;
  white-space: nowrap;
}

.footer-active-popover p {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.footer-social a {
  align-items: center;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-size: 1rem;
  height: 40px;
  justify-content: center;
  margin: 0;
  transition: 0.2s ease;
  width: 40px;
}

.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.footer-divider {
  border-top: 1px solid rgba(219, 228, 238, 0.9);
  height: 0;
  position: relative;
  z-index: 2;
}

.footer-bottom {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.72rem;
  justify-content: space-between;
  margin: 0 auto;
  min-height: 58px;
  padding: 0 48px;
  position: relative;
  width: 100%;
  z-index: 2;
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 1280px) {
  .footer-main {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .footer {
    width: min(100% - 28px, var(--container));
  }

  .page-inner,
  .content-container,
  .page > .eyebrow,
  .page > h1,
  .page > .lead,
  .page > .grid,
  .page > .table-panel,
  .page > .actions,
  .page > .notice {
    width: min(100% - 28px, var(--container));
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-main,
  .footer-bottom {
    padding-left: 18px;
    padding-right: 18px;
  }

  .footer-bottom {
    flex-direction: column;
    justify-content: center;
    padding-bottom: 12px;
    padding-top: 12px;
    text-align: center;
  }
}
