.auth-page {
  --auth-text: #f7fbff;
  --auth-text-muted: rgba(228, 239, 255, 0.74);
  --auth-accent: #58d8ff;
  --auth-accent-strong: #2789ec;
  --auth-glass: rgba(10, 21, 59, 0.14);
  --auth-glass-deep: rgba(4, 12, 39, 0.5);
  --auth-border: rgba(185, 226, 255, 0.28);
  --auth-border-strong: rgba(185, 226, 255, 0.38);
  --auth-focus: rgba(104, 225, 255, 0.88);
  --auth-danger-bg: rgba(117, 25, 55, 0.55);
  --auth-danger-border: rgba(255, 174, 197, 0.68);
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 42px);
  overflow: hidden;
  isolation: isolate;
  background: #020617;
  color: var(--auth-text);
  font-family: inherit;
}

.auth-page::before,
.auth-page::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

.auth-page::before {
  inset: 0;
  background:
    radial-gradient(circle at 13% 84%, rgba(41, 97, 234, 0.24), transparent 30%),
    radial-gradient(circle at 92% 7%, rgba(83, 213, 255, 0.16), transparent 26%),
    #020617;
}

.auth-page::after {
  width: 54vw;
  height: 54vw;
  top: -27vw;
  right: -16vw;
  border: 1px solid rgba(151, 229, 255, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(95, 110, 255, 0.018), 0 0 0 88px rgba(95, 110, 255, 0.012);
}

.auth-frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  align-items: center;
  width: min(100%, 1320px);
  min-height: min(760px, calc(100dvh - clamp(32px, 6vw, 84px)));
  overflow: hidden;
  direction: ltr;
  border: 1px solid rgba(185, 226, 255, 0.24);
  border-radius: 32px;
  background: #07132e;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.auth-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 7, 26, 0.42) 0%, rgba(2, 7, 26, 0.12) 43%, rgba(3, 10, 33, 0.03) 100%),
    linear-gradient(180deg, rgba(2, 8, 27, 0.05), rgba(2, 8, 27, 0.4));
}

.auth-art,
.auth-artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.auth-art {
  z-index: 0;
}

.auth-artwork {
  object-fit: cover;
  object-position: 56% center;
}

.auth-card,
.auth-story {
  position: relative;
  z-index: 2;
  direction: rtl;
}

.auth-card {
  grid-column: 1;
  grid-row: 1;
  width: min(100% - 44px, 340px);
  justify-self: center;
  padding: 24px;
  border: 1px solid var(--auth-border-strong);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(240, 250, 255, 0.16) 0%, rgba(255, 255, 255, 0.025) 29%, transparent 55%),
    var(--auth-glass);
  box-shadow:
    0 18px 46px rgba(0, 2, 21, 0.24),
    inset 0 1px 0 rgba(242, 251, 255, 0.64),
    inset 0 -1px 0 rgba(128, 200, 255, 0.12);
  -webkit-backdrop-filter: blur(14px) saturate(132%);
  backdrop-filter: blur(14px) saturate(132%);
  animation: auth-card-enter 220ms ease-out both;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(185, 226, 255, 0.18);
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 30% at 24% 0%, rgba(241, 251, 255, 0.18), transparent 72%);
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

.auth-card-header {
  margin-bottom: 21px;
  text-align: center;
}

.auth-story-brand {
  display: flex;
  align-items: center;
}

.auth-brand-name,
.auth-intro,
.auth-story-eyebrow,
.auth-story-note,
.auth-support,
.auth-version {
  margin: 0;
}

.auth-brand-name {
  color: var(--auth-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-title {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(22px, 2vw, 25px);
  font-weight: 650;
  line-height: 1.25;
}

.auth-intro {
  margin-top: 19px;
  color: var(--auth-text-muted);
  font-size: 14px;
  line-height: 1.8;
}

.auth-fields {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-field + .auth-field {
  margin-top: 20px;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  color: rgba(246, 251, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.auth-card .auth-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(199, 232, 255, 0.27);
  border-radius: 14px;
  outline: none;
  background: rgba(236, 248, 255, 0.075);
  color: var(--auth-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.auth-card .auth-input:hover {
  border-color: rgba(199, 232, 255, 0.44);
  background: rgba(236, 248, 255, 0.12);
}

.auth-card .auth-input:focus {
  border-color: var(--auth-focus);
  background: rgba(222, 246, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(93, 222, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.auth-password-row {
  position: relative;
}

.auth-password-row .auth-input {
  padding-left: 57px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  left: 7px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: rgba(230, 246, 255, 0.84);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.auth-password-toggle svg {
  width: 20px;
  height: 20px;
}

.auth-password-toggle:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.auth-password-toggle:focus-visible,
.auth-submit:focus-visible {
  outline: 3px solid var(--auth-focus);
  outline-offset: 3px;
}

.auth-error {
  margin: 18px 0 0;
  padding: 11px 13px;
  border: 1px solid var(--auth-danger-border);
  border-radius: 14px;
  background: var(--auth-danger-bg);
  color: #fff1f4;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
}

.auth-error[hidden] {
  display: none;
}

.auth-submit {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  margin-top: 28px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(217, 248, 255, 0.56);
  border-radius: 15px;
  background: linear-gradient(110deg, #48d2f6 0%, #218ee5 55%, #7168e9 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(31, 133, 236, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.auth-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.32) 47%, transparent 74%);
  transform: translateX(-120%);
  transition: transform 360ms ease;
}

.auth-submit:hover:not(:disabled) {
  filter: saturate(1.08) brightness(1.06);
  box-shadow: 0 18px 34px rgba(31, 133, 236, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

.auth-submit:hover:not(:disabled)::before {
  transform: translateX(120%);
}

.auth-submit:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit:disabled,
.auth-submit[aria-busy="true"] {
  cursor: wait;
  filter: saturate(0.68);
  opacity: 0.8;
}

.auth-submit-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 700ms linear infinite;
}

.auth-submit[aria-busy="true"] .auth-submit-loader {
  display: inline-block;
}

.auth-submit[aria-busy="true"] .auth-submit-label {
  opacity: 0.9;
}

.auth-support {
  margin-top: 22px;
  color: rgba(228, 239, 255, 0.68);
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.auth-version {
  margin-top: 7px;
  color: rgba(216, 237, 255, 0.47);
  font-size: 11px;
  text-align: center;
}

.auth-story {
  grid-column: 2;
  grid-row: 1;
  width: min(100% - clamp(80px, 12vw, 180px), 560px);
  justify-self: center;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5.1vw, 72px) 0;
  color: var(--auth-text);
}

.auth-story-brand {
  justify-content: flex-start;
  gap: 13px;
  color: rgba(245, 251, 255, 0.88);
}

.auth-story-brand img {
  width: 64px;
  height: 64px;
  padding: 8px;
  border: 1px solid rgba(185, 226, 255, 0.48);
  border-radius: 18px;
  background: rgba(1, 8, 29, 0.78);
  box-shadow: 0 10px 26px rgba(0, 2, 20, 0.38), inset 0 1px 0 rgba(232, 247, 255, 0.2);
  object-fit: contain;
}

.auth-story-company,
.auth-story-product {
  margin: 0;
}

.auth-story-company {
  color: rgba(245, 251, 255, 0.94);
  font-size: 14px;
  font-weight: 750;
}

.auth-story-product {
  margin-top: 4px;
  color: rgba(255, 225, 160, 0.88);
  font-size: 13px;
  font-weight: 650;
}

@keyframes auth-card-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 900px) {
  .auth-page {
    padding: 20px;
  }

  .auth-frame {
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
    min-height: min(680px, calc(100dvh - 40px));
  }

  .auth-card {
    padding: 28px;
  }

  .auth-story {
    width: min(100% - 48px, 390px);
  }

}

@media (max-width: 700px) {
  .auth-page {
    min-height: 100dvh;
    padding: 14px;
  }

  .auth-frame {
    display: grid;
    min-height: calc(100dvh - 28px);
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .auth-frame::before {
    background:
      linear-gradient(180deg, rgba(2, 8, 28, 0.24), rgba(2, 8, 28, 0.74) 72%),
      linear-gradient(90deg, rgba(2, 7, 26, 0.38), rgba(2, 7, 26, 0.38));
  }

  .auth-artwork {
    object-position: 64% center;
  }

  .auth-story {
    display: none;
  }

  .auth-card {
    width: min(100% - 28px, 340px);
    margin: 64px auto 28px;
    padding: 23px 20px 20px;
    border-radius: 20px;
    background:
      linear-gradient(135deg, rgba(240, 250, 255, 0.14), rgba(255, 255, 255, 0.018) 47%),
      rgba(7, 18, 50, 0.18);
  }
}

@media (max-width: 380px) {
  .auth-card {
    width: min(100% - 20px, 340px);
    padding: 21px 17px 18px;
  }

  .auth-card-header {
    margin-bottom: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .auth-submit,
  .auth-submit::before,
  .auth-input,
  .auth-password-toggle,
  .auth-submit-loader {
    animation: none;
    transition: none;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .auth-card {
    background: rgba(6, 17, 50, 0.88);
  }

  .auth-input {
    background: rgba(3, 12, 40, 0.68);
  }
}
