html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f7f8fb;
}

#web-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
}

#webApp {
  width: 100%;
  height: 100%;
}

.app-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  box-sizing: border-box;
  padding: 24px;
  background: #f7f8fb;
  color: #232d6d;
  font: 16px/1.5 "Segoe UI", Arial, sans-serif;
}

.app-loader[hidden],
.app-loader button[hidden] {
  display: none;
}

.app-loader-card {
  width: min(100%, 380px);
  text-align: center;
}

.app-loader-brand {
  margin: 0 0 16px;
  color: #657083;
  font-size: 14px;
  font-weight: 600;
}

.app-loader h1 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.3;
}

.app-loader p {
  margin-top: 0;
}

.app-loader-track {
  height: 6px;
  margin: 24px 0;
  overflow: hidden;
  border-radius: 3px;
  background: #dce1ef;
}

.app-loader-track span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: #303b8f;
  animation: app-loading 1.5s ease-in-out infinite;
}

@keyframes app-loading {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}

.app-loader[data-state="error"] .app-loader-track {
  display: none;
}

.app-loader button {
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #303b8f;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.app-loader button:focus-visible {
  outline: 3px solid #303b8f;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .app-loader-track span {
    animation: none;
    width: 100%;
    opacity: 0.6;
  }
}

.web-version-switcher {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 16px;
  border-bottom: 1px solid #dce1ef;
  background: #f5f7fc;
  color: #232d6d;
  font: 14px/1.4 "Segoe UI", Arial, sans-serif;
}

.web-version-switcher a {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #303b8f;
  border-radius: 8px;
  color: #303b8f;
  background: #fff;
  font-weight: 600;
  text-decoration: none;
}

.web-version-switcher a:hover {
  background: #e8ecf8;
}

.web-version-switcher a:focus-visible {
  outline: 3px solid #303b8f;
  outline-offset: 2px;
}
