:root {
  --secure-access-blue: #2453ee;
  --secure-access-blue-light: #5f83ff;
  --secure-access-blue-pale: #b9c9ff;
  --secure-access-green: #4bd08a;
  --secure-access-green-light: #9ce8bf;
  --secure-access-red: #ff8d9f;
  --secure-access-ease: cubic-bezier(.22, .61, .28, 1);
  --secure-access-ease-out: cubic-bezier(.16, 1, .3, 1);
  --secure-access-spring: cubic-bezier(.34, 1.42, .42, 1);
  --secure-access-font: Inter, Arial, Helvetica, sans-serif;
  --secure-access-display: "Space Grotesk", Inter, Arial, Helvetica, sans-serif;
  --secure-access-mono: "JetBrains Mono", Consolas, monospace;
}

.secure-access,
.secure-access *,
.secure-access *::before,
.secure-access *::after {
  box-sizing: border-box;
}

.secure-access {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 68px 24px 88px;
  color: #fff;
  background: linear-gradient(150deg, #05080f, #0a1426 58%, #070f1e);
  font: 16px/1.6 var(--secure-access-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.secure-access button,
.secure-access input {
  font: inherit;
}

.secure-access button {
  border: 0;
}

.secure-access button:not(:disabled) {
  cursor: pointer;
}

.secure-access__sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.secure-access__aurora {
  position: absolute;
  top: -24%;
  left: -14%;
  width: 74%;
  height: 88%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64, 91, 209, .44), transparent 66%);
  filter: blur(46px);
  animation: secure-access-aurora 26s ease-in-out infinite;
}

.secure-access__aurora--secondary {
  top: auto;
  right: -18%;
  bottom: -32%;
  left: auto;
  width: 70%;
  height: 84%;
  background: radial-gradient(circle, rgba(36, 83, 238, .3), transparent 66%);
  animation-duration: 34s;
  animation-direction: reverse;
}

.secure-access__grid {
  position: absolute;
  inset: -12%;
  background-image:
    linear-gradient(rgba(95, 131, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 131, 255, .07) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 34%, #000 0, transparent 74%);
  animation: secure-access-grid 16s linear infinite;
}

.secure-access__stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(147, 170, 255, .9) 0 1.2px, transparent 2px),
    radial-gradient(circle at 72% 18%, rgba(147, 170, 255, .6) 0 1.2px, transparent 2px),
    radial-gradient(circle at 84% 68%, rgba(79, 211, 155, .7) 0 1.2px, transparent 2px),
    radial-gradient(circle at 34% 78%, rgba(147, 170, 255, .5) 0 1.2px, transparent 2px);
  background-size: 260px 240px, 330px 300px, 440px 380px, 380px 340px;
  animation: secure-access-stars 6s ease-in-out infinite;
}

.secure-access__beam {
  position: absolute;
  top: 0;
  left: -30%;
  width: 26%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(120, 150, 255, .11), transparent);
  animation: secure-access-beam 9s 1.2s ease-out infinite;
}

.secure-access__card {
  position: relative;
  z-index: 1;
  width: min(490px, 100%);
  padding: 40px;
  border: 1px solid rgba(132, 155, 223, .18);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(14, 26, 49, .94), rgba(8, 16, 31, .98));
  box-shadow: 0 46px 110px -40px rgba(0, 0, 0, .86), inset 0 1px rgba(255, 255, 255, .05);
  animation: secure-access-rise .8s var(--secure-access-ease-out) both;
}

.secure-access__card::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(95, 131, 255, .13), transparent 36%, transparent 66%, rgba(122, 92, 240, .1));
  pointer-events: none;
  content: "";
}

.secure-access__brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 38px;
}

.secure-access__brand strong {
  color: #f2f5ff;
  font: 700 17px/1.2 var(--secure-access-display);
  letter-spacing: -.02em;
}

.secure-access__brand span {
  color: #8fa0c0;
  font: 600 11px/1.2 var(--secure-access-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.secure-access__icon {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(95, 131, 255, .36);
  border-radius: 16px;
  color: var(--secure-access-blue-pale);
  background: linear-gradient(150deg, rgba(95, 131, 255, .24), rgba(36, 83, 238, .06));
  animation: secure-access-float 5.6s ease-in-out infinite;
}

.secure-access__icon svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.secure-access__icon i {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(95, 131, 255, .4);
  animation: secure-access-pulse 3.4s ease-in-out infinite;
}

.secure-access__kicker {
  position: relative;
  margin: 0;
  color: #93aaff;
  font: 600 12px/1.4 var(--secure-access-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.secure-access__kicker::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--secure-access-blue-light);
  content: "";
}

.secure-access__card h1 {
  position: relative;
  max-width: 408px;
  margin: 12px 0 0;
  font: 600 clamp(30px, 5vw, 41px)/1.05 var(--secure-access-display);
  letter-spacing: -.042em;
}

.secure-access__form {
  position: relative;
  width: 100%;
  margin-top: 32px;
}

.secure-access__form label {
  display: block;
  margin-bottom: 9px;
  color: #d9e1f0;
  font-weight: 650;
  transition: color .18s ease;
}

.secure-access__pin-slots {
  width: 407px;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 52px);
  justify-content: center;
  gap: 19px;
}

.secure-access__pin-digit {
  width: 52px;
  height: 62px;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(159, 176, 214, .34);
  border-radius: 13px;
  outline: 0;
  color: #d9e2f2;
  background: rgba(4, 10, 20, .72);
  font: 700 25px/1 var(--secure-access-mono);
  text-align: center;
  caret-color: var(--secure-access-blue-light);
  transition: border-color .18s, box-shadow .18s, background .18s, transform .24s var(--secure-access-spring);
  animation: secure-access-rise .4s var(--secure-access-ease-out) backwards;
}

.secure-access__pin-digit:nth-child(1) { animation-delay: .05s; }
.secure-access__pin-digit:nth-child(2) { animation-delay: .11s; }
.secure-access__pin-digit:nth-child(3) { animation-delay: .17s; }
.secure-access__pin-digit:nth-child(4) { animation-delay: .23s; }
.secure-access__pin-digit:nth-child(5) { animation-delay: .29s; }
.secure-access__pin-digit:nth-child(6) { animation-delay: .35s; }

.secure-access__pin-digit:hover {
  border-color: rgba(185, 201, 255, .62);
  background: rgba(7, 15, 29, .9);
}

.secure-access__pin-digit:focus {
  transform: translateY(-2px);
  border-color: #6f90ff;
  background: rgba(9, 18, 35, .94);
  box-shadow: 0 0 0 4px rgba(95, 131, 255, .14);
}

.secure-access__form[data-state="error"] .secure-access__pin-digit {
  border-color: var(--secure-access-red);
  box-shadow: 0 0 0 3px rgba(255, 98, 122, .1);
}

.secure-access__form[data-state="success"] label {
  color: var(--secure-access-green-light);
}

.secure-access__form[data-state="success"] .secure-access__pin-digit,
.secure-access__form[data-state="success"] .secure-access__pin-digit:focus {
  transform: none;
  border-color: var(--secure-access-green);
  color: #c9f8dd;
  background: rgba(22, 89, 61, .72);
  box-shadow: 0 0 0 3px rgba(75, 208, 138, .14), 0 12px 28px -18px rgba(75, 208, 138, .9);
  caret-color: transparent;
}

.secure-access__error {
  min-height: 23px;
  margin: 9px 0 0;
  color: #ffb6c0;
  font-weight: 600;
}

.secure-access__error:empty {
  visibility: hidden;
}

.secure-access__button {
  position: relative;
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  margin-top: 6px;
  padding: 0 22px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--secure-access-blue), #3d67f7);
  box-shadow: 0 14px 34px -14px rgba(36, 83, 238, .85);
  font-weight: 750;
  transition: transform .24s var(--secure-access-spring), background .2s, box-shadow .24s var(--secure-access-ease), opacity .2s;
}

.secure-access__button::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .22) 50%, transparent 80%);
  background-size: 220% 100%;
  background-position: -40% 0;
  opacity: 0;
  content: "";
}

.secure-access__button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px -14px rgba(36, 83, 238, .9);
}

.secure-access__button:not(:disabled):hover::after {
  opacity: 1;
  animation: secure-access-shimmer 1.1s var(--secure-access-ease) forwards;
}

.secure-access__button:not(:disabled):active {
  transform: translateY(0) scale(.985);
}

.secure-access__button:disabled {
  cursor: wait;
  opacity: .72;
}

.secure-access__button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .24s var(--secure-access-spring);
}

.secure-access__button:not(:disabled):hover svg {
  transform: translateX(4px);
}

.secure-access__form[data-state="loading"] .secure-access__button svg {
  animation: secure-access-loading .8s linear infinite;
}

.secure-access__form[data-state="success"] .secure-access__button,
.secure-access__form[data-state="success"] .secure-access__button:disabled {
  cursor: default;
  opacity: 1;
  background: linear-gradient(135deg, #218b5c, #32b976);
  box-shadow: 0 16px 36px -14px rgba(50, 185, 118, .86);
}

.secure-access__form[data-state="success"] .secure-access__button::after {
  opacity: .12;
  background: linear-gradient(100deg, transparent 15%, rgba(255, 255, 255, .4) 50%, transparent 85%);
  animation: secure-access-shimmer 1s var(--secure-access-ease) forwards;
}

.secure-access__privacy {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 26px 0 0;
  padding-top: 23px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #8fa0bd;
  font-size: 13px;
}

.secure-access__privacy svg {
  width: 18px;
  flex: none;
  fill: none;
  stroke: #4fd39b;
  stroke-width: 1.7;
}

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

@keyframes secure-access-rise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes secure-access-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  50% { transform: translate3d(0, -7px, 0) rotate(1deg); }
}

@keyframes secure-access-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(79, 211, 155, .1); }
  50% { box-shadow: 0 0 0 11px rgba(79, 211, 155, .02); }
}

@keyframes secure-access-grid {
  to { transform: translate3d(46px, 46px, 0); }
}

@keyframes secure-access-aurora {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(4%, -6%, 0) scale(1.14); }
  66% { transform: translate3d(-5%, 4%, 0) scale(.94); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes secure-access-beam {
  0% { transform: translateX(-30%) skewX(-16deg); opacity: 0; }
  12% { opacity: 1; }
  60% { opacity: .5; }
  100% { transform: translateX(520%) skewX(-16deg); opacity: 0; }
}

@keyframes secure-access-stars {
  0%, 100% { opacity: .5; }
  50% { opacity: .95; }
}

@keyframes secure-access-shimmer {
  to { background-position: 200% 0; }
}

@keyframes secure-access-loading {
  to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
  .secure-access {
    padding: 28px 12px;
  }

  .secure-access__card {
    width: 100%;
    padding: 30px 20px;
    border-radius: 24px;
  }

  .secure-access__brand {
    margin-bottom: 30px;
  }

  .secure-access__card h1 {
    font-size: clamp(29px, 9vw, 37px);
  }

  .secure-access__pin-slots {
    width: 100%;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(6px, 2vw, 10px);
  }

  .secure-access__pin-digit {
    width: 100%;
    height: 56px;
    border-radius: 11px;
    font-size: clamp(20px, 7vw, 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .secure-access *,
  .secure-access *::before,
  .secure-access *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }

  .secure-access__beam {
    display: none;
  }
}
