* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: #252832;
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(223, 61, 49, 0.18),
      transparent 30%
    ),
    radial-gradient(circle at 10% 90%, rgba(0, 40, 120, 0.12), transparent 35%),
    linear-gradient(135deg, #05070d, #090c15 55%, #05070d);
}

button,
input {
  font: inherit;
}

.login-shell {
  min-height: 100vh;
  min-width: 488px;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: 440px;
  min-width: 440px;
  max-width: 440px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.login-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.login-logo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #e72f27;
  color: #ffffff;
  font-size: 22px;
}

.login-brand h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
  color: #151726;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-brand p {
  margin: 5px 0 0;
  color: #777d89;
  font-size: 13px;
  font-weight: 700;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #555c68;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.login-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8dae2;
  border-radius: 8px;
  padding: 10px 12px;
  color: #252832;
  background: #fbfbfd;
  outline: none;
}

.login-form input:focus {
  border-color: #e72f27;
  box-shadow: 0 0 0 3px rgba(231, 47, 39, 0.12);
}

.login-form button {
  min-height: 46px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: #e72f27;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.login-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(231, 47, 39, 0.28);
}

.login-form button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-message {
  min-height: 18px;
  margin: 0;
  color: #3b0f0a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.login-message.success {
  color: #0f7a3a;
}

.login-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  color: #37536d;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 520px) {
  .login-card {
    padding: 22px;
  }

  .login-brand h1 {
    font-size: 21px;
  }
}

.login-card {
  background: linear-gradient(180deg, #0b0f18, #121827);
  color: #ffffff;
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.login-brand-logo {
  width: min(260px, 100%);
  max-height: 110px;
  object-fit: contain;
}

.login-brand p {
  margin: 0;
  color: #d7d8df;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.1px;
}

.login-form label {
  color: #d7d8df;
}

.login-form input {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

.login-form input:focus {
  border-color: #f2c300;
  box-shadow: 0 0 0 3px rgba(242, 195, 0, 0.14);
}

.login-form button {
  background: #df3d31;
}

.login-form button::before {
  content: "";
  width: 0;
  height: 0;
}

.login-loading .login-form button:disabled::before {
  width: 17px;
  height: 17px;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: #f2c300;
  border-radius: 50%;
  animation: loginSpin 0.8s linear infinite;
}

.login-message {
  color: #ffb4ac;
}

.login-message.success {
  color: #57d68d;
}

.login-back-link {
  color: #f2c300;
}

@keyframes loginSpin {
  to {
    transform: rotate(360deg);
  }
}

:root {
  --login-bg: #05070d;
  --login-card: #070a12;
  --login-card-2: #0b0f18;
  --login-line: rgba(255, 255, 255, 0.12);
  --login-text: #ffffff;
  --login-muted: #d7d8df;
  --login-red: #df3d31;
  --login-yellow: #f2c300;
}

body {
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(223, 61, 49, 0.12),
      transparent 28%
    ),
    linear-gradient(135deg, var(--login-bg), #070913 55%, var(--login-bg));
}

.login-card {
  width: 440px;
  min-width: 440px;
  max-width: 440px;
  height: auto;
  min-height: 752px;
  max-height: none;
  display: flex;
  flex-direction: column;
  padding: 40px 42px 36px;
  border-color: var(--login-line);
  background: linear-gradient(180deg, var(--login-card), var(--login-card-2));
  color: var(--login-text);
}

.login-card > * {
  flex-shrink: 0;
}

.login-card > .login-message {
  margin-top: 16px;
}

#offlineSetupRequired {
  margin: 1rem 0;
  line-height: 1.5;
}

.login-form[hidden],
.login-back-link[hidden] {
  display: none;
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 34px;
  text-align: center;
}

.login-brand-logo {
  width: min(334px, 100%);
  max-height: 165px;
  display: block;
  object-fit: contain;
  background: var(--login-card);
  mix-blend-mode: lighten;
}

.login-brand p {
  margin: 0;
  color: var(--login-text);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.1px;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form label {
  color: var(--login-text);
  font-size: 13px;
}

.login-form input {
  min-height: 66px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--login-text);
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 11px;
}

.login-form input:focus {
  border-color: var(--login-yellow);
  box-shadow: 0 0 0 3px rgba(242, 195, 0, 0.14);
}

.login-form button {
  min-height: 70px;
  margin-top: 4px;
  border-radius: 11px;
  background: var(--login-red);
  font-size: 17px;
}

.login-message {
  color: #ffb4ac;
}

.login-message.success {
  color: #57d68d;
}

.login-links {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 16px;
}

.login-back-link {
  margin-top: 0;
  min-height: 44px;
  color: var(--login-yellow);
  font-size: 14px;
}

.migration-cloud-return {
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid rgba(242, 195, 0, 0.45);
  border-radius: 10px;
  color: var(--login-yellow);
  background: rgba(242, 195, 0, 0.08);
  font-weight: 850;
  cursor: pointer;
}

.migration-cloud-return:hover,
.migration-cloud-return:focus-visible {
  border-color: var(--login-yellow);
  background: rgba(242, 195, 0, 0.14);
}

.migration-cloud-return[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .login-shell {
    min-width: 0;
    width: 100%;
    padding: 16px;
  }

  .login-card {
    width: 100%;
    min-width: 0;
    max-width: 440px;
    height: auto;
    min-height: min(752px, calc(100svh - 32px));
    max-height: none;
    padding: 30px 24px 26px;
  }

  .login-brand {
    margin-bottom: 24px;
  }

  .login-brand-logo {
    max-height: 130px;
  }
}
