/*
 * WRYEDGE DIRECT Admin
 * Auth UI v0.1.0-alpha2
 */

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.wd-auth-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;

  font-family: var(--wd-font-body);

  background:
    radial-gradient(
      circle at 50% 8%,
      #152c4d 0,
      #0b1730 35%,
      #071225 72%,
      #050d1a 100%
    );

  color: #ffffff;
}

.auth-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-grid {
  position: absolute;
  inset: 0;

  opacity: 0.022;

  background-image:
    linear-gradient(
      rgba(255,255,255,0.7) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,0.7) 1px,
      transparent 1px
    );

  background-size: 54px 54px;

  mask-image:
    radial-gradient(
      circle at center,
      black 0,
      transparent 72%
    );
}

.auth-glow {
  position: absolute;

  border-radius: 50%;

  filter: blur(100px);

  opacity: 0.14;
}

.auth-glow-one {
  width: 460px;
  height: 460px;

  top: -290px;
  left: calc(50% - 230px);

  background: #b21f1f;
}

.auth-glow-two {
  width: 600px;
  height: 600px;

  bottom: -430px;
  right: -250px;

  background: #294a78;
}

.auth-layout {
  position: relative;
  z-index: 2;

  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 34px 20px;
}

.auth-card {
  position: relative;

  width: 100%;
  max-width: 470px;

  padding: 38px 38px 27px;

  overflow: hidden;

  background:
    linear-gradient(
      180deg,
      rgba(18,39,69,0.97),
      rgba(8,24,45,0.985)
    );

  border:
    1px solid rgba(255,255,255,0.105);

  border-radius: 24px;

  box-shadow:
    0 30px 100px rgba(0,0,0,0.38),
    0 0 0 1px rgba(178,31,31,0.06),
    0 0 50px rgba(178,31,31,0.035);
}

.auth-card::before {
  content: "";

  position: absolute;

  left: 15%;
  right: 15%;
  top: 0;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(194,37,37,0.75),
      transparent
    );

  opacity: 0.8;
}

.auth-brand {
  text-align: center;

  margin-bottom: 23px;
}

.auth-logo {
  display: block;

  width: 225px;
  max-height: 72px;

  margin: 0 auto;

  object-fit: contain;
}

.auth-admin-label {
  margin-top: 6px;

  padding-left: 0.28em;

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 0.28em;

  color: #a8b4c5;
}

.auth-heading {
  text-align: center;

  margin-bottom: 27px;
}

.auth-heading h1 {
  margin: 0 0 8px;

  font-size: 30px;
  line-height: 1.2;

  font-weight: 750;

  letter-spacing: -0.65px;
}

.auth-heading p {
  max-width: 340px;

  margin: 0 auto;

  color: #9eacc0;

  font-size: 13px;
  line-height: 1.55;
}

.masked-email {
  margin-top: 8px;

  color: #ffffff;

  font-size: 13px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 17px;
}

.form-group label {
  display: block;

  margin: 0 0 7px;

  color: #d8e0ec;

  font-size: 12px;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  height: 51px;

  padding: 0 15px;

  border:
    1px solid rgba(255,255,255,0.14);

  border-radius: 11px;

  outline: none;

  background: #edf2fa;

  color: #111827;

  font-size: 14px;

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
}

.form-group input:hover {
  background: #f3f6fb;
}

.form-group input:focus {
  background: #ffffff;

  border-color: #c22525;

  box-shadow:
    0 0 0 3px rgba(194,37,37,0.16);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;

  top: 50%;
  right: 8px;

  transform: translateY(-50%);

  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;

  border-radius: 8px;

  background: transparent;

  cursor: pointer;

  transition:
    background .18s ease;
}

.password-toggle:hover {
  background: rgba(11,23,48,0.065);
}

.eye-icon {
  position: relative;

  display: block;

  width: 17px;
  height: 12px;

  border:
    1.7px solid #76879d;

  border-radius:
    70% 20% 70% 20%;

  transform: rotate(45deg);
}

.eye-icon::after {
  content: "";

  position: absolute;

  width: 4px;
  height: 4px;

  left: 50%;
  top: 50%;

  transform:
    translate(-50%, -50%);

  border-radius: 50%;

  background: #76879d;
}

.eye-icon.is-visible::after {
  width: 6px;
  height: 6px;

  background: #b21f1f;
}

.auth-primary-button {
  width: 100%;
  height: 51px;

  margin-top: 6px;

  border: 0;

  border-radius: 11px;

  background:
    linear-gradient(
      135deg,
      #c92828,
      #aa1818
    );

  color: #ffffff;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  box-shadow:
    0 11px 30px rgba(178,31,31,0.24);

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    opacity .18s ease,
    filter .18s ease;
}

.auth-primary-button:hover {
  transform: translateY(-1px);

  filter: brightness(1.04);

  box-shadow:
    0 15px 36px rgba(178,31,31,0.31);
}

.auth-primary-button:active {
  transform: translateY(0);
}

.auth-primary-button:disabled {
  opacity: .55;

  cursor: default;

  transform: none;

  filter: none;
}

.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  margin-top: 22px;

  color: #94a3b7;

  font-size: 11px;
}

.security-dot {
  width: 7px;
  height: 7px;

  flex: 0 0 7px;

  border-radius: 50%;

  background: #38bc70;

  box-shadow:
    0 0 0 4px rgba(56,188,112,0.105),
    0 0 12px rgba(56,188,112,0.25);
}

.auth-message {
  min-height: 20px;

  margin-top: 17px;

  padding: 0 5px;

  text-align: center;

  color: #9eacc0;

  font-size: 12px;
  line-height: 1.5;
}

.auth-message.error {
  color: #ff9d9d;
}

.auth-message.success {
  color: #72dc99;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  margin-top: 18px;

  padding-top: 18px;

  border-top:
    1px solid rgba(255,255,255,0.075);

  text-align: center;

  color: #718198;

  font-size: 10px;

  letter-spacing: 0.045em;
}

.auth-footer-divider {
  color: #45566c;
}

.hidden {
  display: none !important;
}

.auth-link-button {
  display: block;

  margin: 18px auto 0;

  padding: 6px 9px;

  border: 0;

  border-radius: 7px;

  background: transparent;

  color: #9eacc0;

  font-size: 12px;

  cursor: pointer;

  transition:
    color .18s ease,
    background .18s ease;
}

.auth-link-button:hover {
  color: #ffffff;

  background:
    rgba(255,255,255,0.04);
}

.otp-group {
  display: grid;

  grid-template-columns:
    repeat(6, minmax(0, 1fr));

  gap: 9px;

  margin: 9px 0 20px;
}

.otp-input {
  width: 100%;
  height: 56px;

  padding: 0;

  border:
    1px solid rgba(255,255,255,0.14);

  border-radius: 10px;

  outline: none;

  background: #edf2fa;

  color: #111827;

  text-align: center;

  font-size: 22px;
  font-weight: 700;

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.otp-input:hover {
  background: #f3f6fb;
}

.otp-input:focus {
  background: #ffffff;

  border-color: #c22525;

  box-shadow:
    0 0 0 3px rgba(194,37,37,0.16);
}

@media (max-width: 540px) {

  .auth-layout {
    padding: 18px 14px;
  }

  .auth-card {
    padding: 30px 22px 24px;

    border-radius: 20px;
  }

  .auth-logo {
    width: 195px;
  }

  .auth-heading h1 {
    font-size: 27px;
  }

  .otp-group {
    gap: 5px;
  }

  .otp-input {
    height: 49px;

    font-size: 19px;
  }

}


/*
 * WRYEDGE DIRECT Admin
 * Authenticator UI additions v0.3.0
 */

#recoveryCode {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
}

#totpStage .auth-link-button {
  margin-top: 15px;
}

#totpStage .auth-security-note {
  margin-top: 18px;
}


/*
 * Auth visibility foundation v0.3.1
 */

.auth-stage.hidden,
#totpCodeMode.hidden,
#recoveryCodeMode.hidden {
  display: none !important;
}


/*
 * Authenticator OTP visual alignment v0.3.2
 */

#totpInputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 26px;
}

#totpInputs .totp-input {
  width: 58px;
  height: 58px;

  padding: 0;

  border:
    2px solid transparent;

  border-radius: 10px;

  outline: none;

  background: #eef3fb;

  color: #071a33;

  font-family: inherit;
  font-size: 22px;
  font-weight: 750;

  line-height: 58px;
  text-align: center;

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

#totpInputs .totp-input:focus {
  border-color: #d32626;

  background: #ffffff;

  box-shadow:
    0 0 0 3px
    rgba(211,38,38,0.12);
}

@media (max-width: 520px) {

  #totpInputs {
    gap: 7px;
  }

  #totpInputs .totp-input {
    width: 46px;
    height: 52px;
    line-height: 52px;
    font-size: 20px;
  }

}
