/* PHNX590 authentication gate v2 */
body.auth-gate-active {
  --auth-cyan: #37dff6;
  --auth-blue: #267dff;
  --auth-violet: #9a4dff;
  --auth-green: #43e2a4;
  background:
    radial-gradient(circle at 18% 12%, rgba(38, 125, 255, .16), transparent 34rem),
    radial-gradient(circle at 82% 82%, rgba(154, 77, 255, .13), transparent 31rem),
    #050b16;
}

html body.auth-gate-active[data-route="account"]:not([data-route="admin"]):not([data-route="maintenance"]) > .site-taskbar,
html body.auth-gate-active[data-route="account"]:not([data-route="admin"]):not([data-route="maintenance"]) .site-footer {
  display: none !important;
}

body.auth-gate-active:not([data-route="admin"]):not([data-route="maintenance"]) {
  padding-top: 64px !important;
}

body.auth-gate-active .view[data-view="account"] {
  min-height: calc(100dvh - 64px);
  padding: clamp(16px, 3vw, 42px);
}

body.auth-gate-active .account-layout {
  position: relative;
  width: min(1380px, 100%);
  min-height: min(760px, calc(100dvh - 116px));
  margin: 0 auto;
  border-color: rgba(83, 148, 220, .32);
  border-radius: 24px;
  background: rgba(5, 13, 27, .92);
  box-shadow: 0 40px 110px rgba(0, 0, 0, .45);
  isolation: isolate;
}

body.auth-gate-active .account-layout::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(55, 223, 246, .3), transparent 28%, transparent 68%, rgba(154, 77, 255, .3));
  opacity: .7;
  pointer-events: none;
}

body.auth-gate-active .account-intro {
  padding: clamp(38px, 5vw, 76px);
  border-right-color: rgba(83, 148, 220, .22);
  background:
    linear-gradient(145deg, rgba(5, 17, 36, .86), rgba(8, 18, 38, .96)),
    #071326;
}

body.auth-gate-active .account-intro h1 span {
  color: transparent;
  background: linear-gradient(100deg, var(--auth-cyan), #a986ff);
  background-clip: text;
}

body.auth-gate-active .account-benefits li {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center !important;
  gap: 13px;
}

body.auth-gate-active .account-benefits li > i {
  width: 38px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center;
}

body.auth-gate-active .account-benefits li > span {
  min-width: 0;
  display: grid !important;
  gap: 3px;
}

body.auth-gate-active .auth-mail-icon {
  width: 56px !important;
  height: 56px !important;
  display: grid !important;
  place-items: center;
  margin: 0 auto !important;
  border: 1px solid rgba(55, 223, 246, .32) !important;
  border-radius: 16px !important;
  color: var(--auth-cyan) !important;
  background: rgba(55, 223, 246, .08) !important;
  box-shadow: 0 0 28px rgba(55, 223, 246, .12) !important;
  font-size: 22px;
}

body.auth-gate-active .auth-card {
  padding: clamp(34px, 5vw, 68px);
  background:
    radial-gradient(circle at 78% 12%, rgba(38, 125, 255, .09), transparent 19rem),
    rgba(4, 10, 21, .84);
}

.auth-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.auth-flow-steps li {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(83, 126, 174, .2);
  border-radius: 10px;
  color: #708099;
  background: rgba(7, 17, 33, .62);
  transition: border-color 180ms cubic-bezier(.23, 1, .32, 1), color 180ms ease, background-color 180ms ease, transform 160ms cubic-bezier(.23, 1, .32, 1);
}

.auth-flow-steps li > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(83, 126, 174, .28);
  border-radius: 8px;
  font-size: 10px;
}

.auth-flow-steps li > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.auth-flow-steps strong,
.auth-flow-steps small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-flow-steps strong { font-size: 10px; }
.auth-flow-steps small { font-size: 7px; }

.auth-flow-steps li.is-active {
  border-color: rgba(55, 223, 246, .54);
  color: #e8fbff;
  background: rgba(30, 147, 196, .12);
  box-shadow: 0 0 24px rgba(55, 223, 246, .08);
  transform: translateY(-1px);
}

.auth-flow-steps li.is-complete {
  border-color: rgba(67, 226, 164, .34);
  color: #70e9ba;
  background: rgba(35, 166, 116, .08);
}

.auth-flow-steps li.is-skipped {
  border-style: dashed;
  color: #66758d;
  opacity: .72;
}

.auth-code-timer {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(55, 223, 246, .26);
  border-radius: 12px;
  background: rgba(12, 28, 51, .72);
  transition: border-color 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.auth-code-timer-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(55, 223, 246, .34);
  border-radius: 12px;
  color: var(--auth-cyan);
  background: rgba(55, 223, 246, .08);
}

.auth-code-timer-icon svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.auth-code-timer-copy { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2px 10px; }
.auth-code-timer-copy small { color: #7f90aa; font-size: 8px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.auth-code-timer-copy strong { color: #f2fbff; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.auth-code-timer-copy p { grid-column: 1 / -1; margin: 2px 0 0; color: #91a1b9; font-size: 9px; }

.auth-code-timer-track {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(116, 144, 182, .14);
}

.auth-code-timer-track > i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--auth-cyan), var(--auth-blue), var(--auth-violet));
  box-shadow: 0 0 12px rgba(55, 223, 246, .38);
  transform: scaleX(1);
  transform-origin: left center;
  transition: transform 600ms linear, background-color 180ms ease;
}

.auth-code-timer.is-warning {
  border-color: rgba(255, 173, 66, .44);
  background: rgba(73, 44, 12, .2);
}

.auth-code-timer.is-expired {
  border-color: rgba(255, 82, 118, .44);
  background: rgba(75, 18, 35, .2);
}

.auth-code-timer.is-expired .auth-code-timer-icon,
.auth-code-timer.is-expired .auth-code-timer-copy strong { color: #ff718f; }

body.auth-gate-active .auth-stage {
  display: grid !important;
  gap: 18px;
  animation: auth-stage-enter 220ms cubic-bezier(.23, 1, .32, 1) both;
}

body.auth-gate-active .auth-primary,
body.auth-gate-active .auth-secondary,
body.auth-gate-active .auth-back {
  transition: transform 150ms cubic-bezier(.23, 1, .32, 1), border-color 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

body.auth-gate-active .auth-primary:active,
body.auth-gate-active .auth-secondary:active,
body.auth-gate-active .auth-back:active { transform: scale(.97); }

body.auth-gate-active .auth-stage input:focus-visible {
  border-color: var(--auth-cyan);
  box-shadow: 0 0 0 3px rgba(55, 223, 246, .1), 0 0 24px rgba(55, 223, 246, .06);
}

@keyframes auth-stage-enter {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 1081px) {
  body.auth-gate-active .account-layout { align-items: stretch !important; }
  body.auth-gate-active .account-intro {
    min-height: 100%;
    display: flex !important;
  }
  body.auth-gate-active .auth-card {
    min-height: 100%;
    display: grid !important;
    align-content: center !important;
  }
}

@media (max-width: 1080px) {
  body.auth-gate-active .view[data-view="account"] { padding: 14px; }
  body.auth-gate-active .account-layout { min-height: 0; border-radius: 18px; }
  body.auth-gate-active .account-intro { min-height: 330px; }
}

@media (max-width: 620px) {
  body.auth-gate-active:not([data-route="admin"]):not([data-route="maintenance"]) { padding-top: 56px !important; }
  body.auth-gate-active .view[data-view="account"] { min-height: calc(100dvh - 56px); padding: 8px; }
  body.auth-gate-active .account-layout { border-radius: 14px; }
  body.auth-gate-active .account-intro { min-height: 0; padding: 28px 20px; }
  body.auth-gate-active .account-intro h1 { font-size: 36px; }
  body.auth-gate-active .account-benefits { display: none; }
  body.auth-gate-active .auth-card { min-height: 520px; padding: 28px 18px; }
  .auth-flow-steps { margin-bottom: 20px; }
  .auth-flow-steps li { grid-template-columns: 24px minmax(0, 1fr); padding: 7px 6px; }
  .auth-flow-steps li > b { width: 24px; height: 24px; }
  .auth-flow-steps small { display: none; }
  .auth-code-timer { grid-template-columns: 40px minmax(0, 1fr); padding: 10px; }
  .auth-code-timer-icon { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-gate-active .auth-stage { animation: none; }
  .auth-flow-steps li,
  body.auth-gate-active .auth-primary,
  body.auth-gate-active .auth-secondary,
  body.auth-gate-active .auth-back { transition-duration: 80ms; }
}
