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

body.site-shell > .site-main {
  flex: 1 0 auto;
  width: 100%;
}

.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 40;
  margin-top: auto;
  padding: 12px 24px;
  border-top: 1px solid rgba(217, 225, 235, .95);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 -10px 28px rgba(21, 42, 64, .08);
  backdrop-filter: blur(14px);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.site-footer-start {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #172033;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none !important;
}

.site-footer-brand:hover,
.site-footer-brand:focus {
  color: #0d6268;
  text-decoration: none !important;
}

.site-footer-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  border-radius: 6px;
}

.site-footer-version {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.site-footer-legal {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-footer-legal-link {
  color: #0d6268;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.site-footer-legal-link:hover,
.site-footer-legal-link:focus {
  color: #117f86;
  text-decoration: underline;
}

.legal-popup-body {
  margin: 0;
  padding: 24px;
  color: #172033;
  background: #f7f9fc;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.legal-popup-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 32px;
  border: 1px solid #d9e1eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(21, 42, 64, .10);
}

.legal-popup-content h1 {
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 850;
}

.legal-popup-content h2 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 800;
}

.legal-popup-content p {
  margin-bottom: 12px;
  line-height: 1.6;
  color: #344054;
}

body.theme-dark .site-footer {
  border-top-color: rgba(148, 163, 184, .28);
  background: rgba(15, 23, 42, .94);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, .24);
}

body.theme-dark .site-footer-brand {
  color: #f8fafc !important;
}

body.theme-dark .site-footer-brand:hover,
body.theme-dark .site-footer-brand:focus {
  color: #8de3e6 !important;
}

body.theme-dark .site-footer-version {
  color: #cbd5e1;
}

body.theme-dark .site-footer-legal-link {
  color: #8de3e6;
}

body.theme-dark .site-footer-legal-link:hover,
body.theme-dark .site-footer-legal-link:focus {
  color: #bae6fd;
}

body.theme-dark.legal-popup-body {
  background: #0f172a;
  color: #eef2f6;
}

body.theme-dark .legal-popup-content {
  border-color: rgba(148, 163, 184, .28);
  background: rgba(23, 32, 51, .96);
  color: #eef2f6;
}

body.theme-dark .legal-popup-content p {
  color: #cbd5e1;
}

@media (max-width: 767px) {
  .site-footer {
    padding: 12px 16px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-start {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .site-footer-legal {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .legal-popup-body {
    padding: 16px;
  }

  .legal-popup-content {
    padding: 20px;
  }
}
