:root {
  color-scheme: dark;
  font-family: "Roboto", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #020827;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.setra-login-page {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: #fff;
  background: #020827;
  font-family: "Roboto", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.setra-background {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(17, 80, 184, .38), transparent 29%),
    radial-gradient(circle at 89% 48%, rgba(0, 90, 210, .3), transparent 37%),
    radial-gradient(circle at 12% 77%, rgba(66, 17, 145, .25), transparent 32%),
    #020827 url("../images/setra-login-bg.svg") center top / cover no-repeat;
}

.setra-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 3, 20, .17), transparent 18%, transparent 82%, rgba(0, 3, 20, .2)),
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 2, 20, .18) 100%);
}

.setra-login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: max(100svh, 910px);
  padding: 63px 0 149px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.setra-login-only .setra-login-shell {
  padding-bottom: 85px;
}

.setra-logo-card {
  width: min(52vw, 223px);
  aspect-ratio: .955;
  flex: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(193, 218, 255, .72);
  border-radius: 34px;
  background: #fff;
  box-shadow:
    0 0 3px #fff,
    0 0 19px rgba(43, 135, 255, .95),
    0 15px 25px rgba(0, 18, 67, .58);
}

.setra-logo-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.setra-login-card {
  width: calc(100% - 70px);
  max-width: 430px;
  min-height: 423px;
  margin-top: 42px;
  padding: 37px 25px 17px;
  border: 1px solid #2678ed;
  border-radius: 31px;
  background:
    radial-gradient(circle at 14% 4%, rgba(37, 58, 119, .5), transparent 31%),
    radial-gradient(circle at 85% 100%, rgba(7, 23, 72, .68), transparent 42%),
    linear-gradient(145deg, rgba(8, 21, 60, .95), rgba(1, 8, 35, .97));
  box-shadow:
    inset 0 1px 23px rgba(62, 114, 230, .14),
    0 22px 42px rgba(0, 3, 29, .44),
    0 0 9px rgba(20, 93, 230, .17);
}

.login-heading {
  margin-bottom: 11px;
  text-align: center;
}

.login-heading h1 {
  margin: 0 0 6px;
  color: #fff;
  font-size: clamp(30px, 8.3vw, 37px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.5px;
  text-shadow: 0 3px 10px rgba(0, 0, 0, .4);
}

.login-heading p {
  margin: 0;
  color: #c6c9d4;
  font-size: clamp(17px, 4.7vw, 20px);
  font-weight: 400;
  line-height: 1.35;
}

.login-alert {
  margin: -9px 0 15px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 139, 139, .55);
  border-radius: 12px;
  color: #ffe7e7;
  background: rgba(124, 18, 35, .35);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.saved-account-field {
  width: 100%;
  height: 49px;
  margin-bottom: 15px;
  padding: 0 13px 0 15px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(118, 163, 224, .75);
  border-radius: 9px;
  background: linear-gradient(96deg, #f7f9fd 0%, #eef3fa 100%);
  box-shadow:
    0 4px 10px rgba(0, 0, 25, .22),
    inset 0 1px 3px rgba(255, 255, 255, .85);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.saved-account-field:focus-within {
  border-color: #3b91f8;
  box-shadow:
    0 0 0 3px rgba(40, 137, 255, .2),
    0 5px 13px rgba(0, 0, 25, .28);
}

.quick-account-select {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  color: #5d6675;
  background: transparent;
  appearance: none;
  cursor: pointer;
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 400;
}

.quick-account-select:disabled {
  color: #9399a4;
  cursor: default;
  opacity: 1;
}

.quick-account-select option {
  color: #26334a;
  background: #fff;
}

.select-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  color: #7b8493;
  pointer-events: none;
}

.select-chevron svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.saved-account-field:has(.quick-account-select:disabled) .select-chevron {
  opacity: .42;
}

.setra-field {
  width: 100%;
  height: 53px;
  margin-bottom: 18px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #cfdbed;
  border-radius: 9px;
  background: linear-gradient(96deg, #fff 0%, #fafafa 70%, #f5f6fa 100%);
  box-shadow:
    0 0 0 1px rgba(82, 143, 232, .32),
    0 5px 11px rgba(0, 0, 25, .25),
    inset 0 1px 4px rgba(255, 255, 255, .8);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.setra-field:focus-within {
  border-color: #3b91f8;
  box-shadow:
    0 0 0 3px rgba(40, 137, 255, .2),
    0 6px 15px rgba(0, 0, 25, .3);
  transform: translateY(-1px);
}

.field-icon {
  width: 23px;
  height: 24px;
  flex: 0 0 23px;
  display: grid;
  place-items: center;
  color: #104b9e;
}

.field-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: currentColor;
}

.setra-field input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  color: #1e2634;
  background: transparent;
  font-size: clamp(14px, 3.6vw, 16px);
  font-weight: 400;
}

.setra-field input::placeholder {
  color: #8b8d97;
  opacity: 1;
}

.password-toggle {
  width: 30px;
  height: 36px;
  margin-right: -3px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  outline: 0;
  color: #8e919d;
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: #1556a5;
}

.password-toggle svg {
  grid-area: 1 / 1;
  width: 25px;
  height: 25px;
  display: block;
  fill: currentColor;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open {
  display: none;
}

.password-toggle.is-visible .eye-closed {
  display: block;
}

.forgot-link {
  width: max-content;
  margin: 3px auto 15px;
  display: block;
  color: #1f9dff;
  font-size: clamp(14px, 3.5vw, 15px);
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: color .2s ease;
}

.forgot-link:hover,
.forgot-link:focus-visible {
  color: #72c5ff;
  text-decoration: underline;
}

.login-btn {
  position: relative;
  width: 100%;
  height: 58px;
  padding: 0 20px;
  display: grid;
  place-items: center;
  border: 1px solid #ffe688;
  border-radius: 16px;
  color: #2c2007;
  background:
    radial-gradient(circle at 17% 0%, rgba(255, 242, 175, .94), transparent 32%),
    linear-gradient(105deg, #ffcd55 0%, #ffbd27 51%, #f8ab12 100%);
  box-shadow:
    0 5px 14px rgba(0, 0, 0, .34),
    0 0 15px rgba(255, 181, 21, .18),
    inset 0 1px 0 rgba(255, 255, 255, .72);
  cursor: pointer;
  font-size: clamp(21px, 5.4vw, 24px);
  font-weight: 500;
  line-height: 1;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.login-btn:hover {
  filter: brightness(1.05);
  box-shadow:
    0 7px 17px rgba(0, 0, 0, .38),
    0 0 20px rgba(255, 181, 21, .25),
    inset 0 1px 0 rgba(255, 255, 255, .8);
  transform: translateY(-1px);
}

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

.login-btn:disabled {
  cursor: wait;
}

.login-btn.is-loading span {
  visibility: hidden;
}

.login-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(44, 32, 7, .35);
  border-top-color: #2c2007;
  border-radius: 50%;
  animation: login-spin .7s linear infinite;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

.signup-prompt {
  margin: 26px 0 0;
  color: #f1f2f7;
  font-size: clamp(14px, 3.5vw, 15px);
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}

.signup-prompt a {
  margin-left: 3px;
  color: #ffbd28;
  font-weight: 500;
  text-decoration: none;
}

.signup-prompt a:hover,
.signup-prompt a:focus-visible {
  color: #ffd76f;
  text-decoration: underline;
}

.setra-signup-shell {
  min-height: max(100svh, 910px);
  padding-bottom: 72px;
}

.setra-signup-card {
  min-height: 0;
  padding-top: 31px;
  padding-bottom: 22px;
}

.signup-heading {
  margin-bottom: 18px;
}

.signup-heading h1 {
  font-size: clamp(28px, 7.8vw, 35px);
}

.signup-alert:empty {
  display: none;
}

.signup-field {
  margin-bottom: 16px;
}

.signup-field-note {
  margin: -8px 3px 14px 38px;
  color: #9da9c2;
  font-size: 11px;
  line-height: 1.35;
}

.signup-password-meta {
  margin: -8px 3px 14px 38px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.signup-password-meta .password-field-note {
  min-width: 0;
  flex: 1;
  margin: 0;
}

.generate-password-btn {
  min-height: 36px;
  align-self: flex-end;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(63, 205, 255, .8);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #087fd4 0%, #1257d8 55%, #5331c8 100%);
  box-shadow: 0 7px 18px rgba(15, 92, 218, .35), inset 0 1px 0 rgba(255, 255, 255, .2);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.generate-password-btn:hover,
.generate-password-btn:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(15, 92, 218, .44), inset 0 1px 0 rgba(255, 255, 255, .25);
  outline: 2px solid rgba(25, 184, 238, .25);
  outline-offset: 2px;
}

.generate-password-btn:active {
  transform: translateY(0);
}

.generate-password-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: currentColor;
}

.referral-field input[readonly] {
  color: #687386;
  cursor: default;
}

.signup-btn {
  height: 58px;
  margin-top: 2px;
  font-size: clamp(19px, 5vw, 22px);
}

.signup-login-prompt {
  margin-top: 24px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (min-width: 600px) {
  .setra-login-shell {
    padding-top: 54px;
  }

  .setra-login-card {
    max-width: 400px;
  }
}

@media (max-width: 374px) {
  .setra-login-shell {
    min-height: 820px;
    padding-top: 42px;
    padding-bottom: 95px;
  }

  .setra-login-only .setra-login-shell {
    padding-bottom: 40px;
  }

  .setra-logo-card {
    width: 190px;
    border-radius: 29px;
  }

  .setra-login-card {
    width: calc(100% - 34px);
    margin-top: 31px;
    padding: 27px 20px 24px;
    border-radius: 27px;
  }

  .login-heading {
    margin-bottom: 19px;
  }

  .setra-field {
    height: 51px;
    margin-bottom: 15px;
    padding-inline: 13px;
  }

  .forgot-link {
    margin-bottom: 19px;
  }

  .login-btn {
    height: 55px;
  }

  .signup-prompt {
    margin-top: 19px;
  }

  .setra-signup-shell {
    min-height: max(100svh, 800px);
    padding-bottom: 56px;
  }

  .setra-signup-card {
    margin-top: 31px;
    padding: 26px 20px 22px;
  }

  .signup-heading {
    margin-bottom: 16px;
  }

  .signup-field {
    margin-bottom: 14px;
  }

  .signup-field-note {
    margin-bottom: 12px;
    margin-left: 34px;
  }

  .signup-password-meta {
    margin-left: 34px;
    margin-bottom: 12px;
  }

  .signup-password-meta .password-field-note {
    margin: 0;
  }

  .signup-btn {
    margin-top: 1px;
  }

  .signup-login-prompt {
    margin-top: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
