html:has(body.login-page) {
  min-height: 100%;
  background: #f8fafc;
}

body.login-page {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background-color: #f8fafc;
  background-image: url("/static/images/login/tradepilot-login-background.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: #10243d;
}

.login-shell {
  width: min(100%, 720px);
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-content: center;
  gap: 24px;
  margin: 0 auto;
  padding: 34px 24px 28px;
}

.login-branding {
  align-self: end;
  display: grid;
  justify-items: center;
  color: #10243d;
  text-align: center;
}

.login-brand-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
}

.login-symbol-frame {
  width: 92px;
  height: 76px;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
}

.login-symbol {
  width: 154px;
  height: 154px;
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  transform: translate(-50%, -45%);
}

.login-branding h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.login-branding p {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 0;
  color: #65758a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.login-branding p span {
  width: 34px;
  height: 1px;
  display: block;
  background: #75a7f6;
}

.login-card {
  width: min(470px, calc(100vw - 36px));
  display: grid;
  gap: 18px;
  padding: 28px 38px;
  border: 0;
  background: transparent;
}

.login-notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #b9d2c9;
  border-radius: 7px;
  background: #edf6f3;
  color: #244c43;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  word-break: keep-all;
}

.login-field {
  min-width: 0;
  min-height: 54px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  border: 1px solid #ccd5df;
  border-radius: 8px;
  background: rgba(255, 255, 255, .8);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.login-field:focus-within {
  border-color: #4b81e6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 220, .12);
}

.login-field-label {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.login-field > img {
  width: 21px;
  height: 21px;
  opacity: .82;
}

.login-field input {
  min-width: 0;
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #1e3148;
  font-size: 15px;
  font-weight: 650;
}

.login-field input::placeholder {
  color: #98a4b3;
  opacity: 1;
}

.login-submit {
  min-height: 54px;
  margin-top: 2px;
  border-radius: 8px;
  background: #165edb;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(22, 94, 219, .18);
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.login-submit:hover {
  background: #0e50c7;
  box-shadow: 0 10px 22px rgba(22, 94, 219, .24);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:focus-visible {
  outline: 3px solid rgba(22, 94, 219, .25);
  outline-offset: 2px;
}

.login-trust-message {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-top: 11px;
  padding-top: 8px;
  color: #8995a3;
  text-align: center;
}

.login-security-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-security-status img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: .8;
}

.login-security-status strong {
  color: #718095;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.login-trust-message p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  word-break: keep-all;
}

.login-trust-message small {
  color: #9ca7b4;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2.6px;
  text-transform: uppercase;
}

.login-footer {
  align-self: end;
  color: #718095;
  font-size: 11px;
  text-align: center;
}

@media (max-height: 760px) and (min-width: 641px) {
  .login-shell {
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: 18px;
    padding-top: 24px;
    padding-bottom: 20px;
  }

  .login-symbol-frame {
    width: 76px;
    height: 63px;
  }

  .login-symbol {
    width: 126px;
    height: 126px;
  }

  .login-branding h1 {
    font-size: 43px;
  }

  .login-branding p {
    margin-top: 11px;
  }

  .login-card {
    gap: 12px;
    padding-top: 22px;
    padding-bottom: 21px;
  }

  .login-trust-message {
    margin-top: 4px;
    padding-top: 6px;
  }
}

@media (max-width: 640px) {
  body.login-page {
    background-position: center;
  }

  .login-shell {
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: 22px;
    padding: 30px 18px 22px;
  }

  .login-symbol-frame {
    width: 73px;
    height: 61px;
  }

  .login-symbol {
    width: 121px;
    height: 121px;
  }

  .login-branding h1 {
    font-size: 42px;
  }

  .login-branding p {
    gap: 8px;
    margin-top: 13px;
    font-size: 10px;
    letter-spacing: 1.7px;
  }

  .login-branding p span {
    width: 19px;
  }

  .login-card {
    width: min(100%, 430px);
    gap: 14px;
    padding: 25px 20px 22px;
  }

  .login-field,
  .login-submit {
    min-height: 52px;
  }

  .login-field input {
    min-height: 50px;
    font-size: 16px;
  }

  .login-trust-message {
    margin-top: 5px;
    padding-top: 7px;
  }

  .login-security-status strong {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-field,
  .login-submit {
    transition: none;
  }
}
