:root {
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  color: #1d1730;
  background: #edeaf4;
  color-scheme: light;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  margin: 0;
  padding: clamp(14px, 3.3vw, 52px);
  background:
    radial-gradient(ellipse at 2% 5%, #cfc8ff 0, transparent 44%),
    radial-gradient(ellipse at 96% 98%, #f9dbe6 0, transparent 40%),
    #edeaf4;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  width: min(100%, 1160px);
  min-height: min(686px, calc(100svh - 104px));
  padding: 10px;
  border: 1px solid #fff9;
  border-radius: 30px;
  background: #fbfaff;
  box-shadow: 0 25px 85px #30205223, 0 5px 24px #48377112;
}

.auth-art {
  border-radius: 21px;
  background:
    url("fluid-hero.webp") 52% 50% / cover no-repeat,
    radial-gradient(ellipse at 77% 30%, #ff5b73 0, transparent 45%),
    radial-gradient(ellipse at 28% 78%, #11c29d 0, transparent 48%),
    linear-gradient(147deg, #1d1453 8%, #5520cf 46%, #171332 100%);
}

.auth-panel {
  display: grid;
  align-items: center;
  justify-items: center;
  padding: clamp(34px, 5vw, 72px) clamp(28px, 5.2vw, 82px);
}

.auth-content { width: min(100%, 404px); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(33px, 6vh, 68px);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.025em;
}

.brand strong { font-weight: 750; }

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 22px;
  background: linear-gradient(140deg, #ad51ef, #5635db 64%, #4257e7);
  box-shadow: 0 4px 11px #6035d04d;
}

.intro { margin-bottom: 27px; }

h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 4.3vw, 52px);
  font-weight: 740;
  line-height: 1.05;
  letter-spacing: -.059em;
}

.intro p {
  margin: 0;
  color: #5d566d;
  font-size: 15px;
  line-height: 1.6;
}

.auth-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }

label {
  font-size: 14px;
  font-weight: 660;
}

input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 13px;
  border: 1px solid #d6cfe2;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
}

input:focus {
  border-color: #7049da;
  box-shadow: 0 0 0 3px #8e60e522;
  outline: 0;
}

.password-control { position: relative; }
.password-control:has(button:not([hidden])) input { padding-right: 88px; }

.password-toggle, .text-button {
  border: 0;
  background: transparent;
  color: #552bb7;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 660;
}

.password-toggle {
  position: absolute;
  inset: 5px 5px 5px auto;
  padding: 0 9px;
  border-radius: 7px;
}

.password-toggle:hover { background: #f0e9fa; }

.forgot-link {
  margin-top: -3px;
  justify-self: end;
}

.forgot-link, .text-button {
  color: #552bb7;
  font-size: 14px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-top: 3px;
  padding: 10px 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(108deg, #7334ca, #5034c4 57%, #344bb7);
  box-shadow: 0 7px 18px #5034c42c;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 680;
  text-decoration: none;
}

.primary-button:hover { filter: brightness(1.13); }
.primary-button span { font-size: 21px; line-height: 1; }
a:focus-visible, button:focus-visible { outline: 2px solid #5124a1; outline-offset: 3px; }

.form-message {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid #f3c5cf;
  border-radius: 10px;
  background: #fef1f4;
  color: #791c3a;
  font-size: 14px;
  line-height: 1.5;
}

.form-message:empty { display: none; }
.field-hint { margin: 0; color: #5d566d; font-size: 13px; }
.preview-label { margin: 23px 0 0; color: #5d566d; font-size: 13px; }
.alternative { margin-top: 18px; }
.alternative button { padding: 0; }

@media (max-width: 740px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 500px);
    min-height: 0;
    padding: 7px;
    border-radius: 22px;
  }

  .auth-art {
    min-height: clamp(112px, 23vw, 174px);
    border-radius: 16px;
    background-position: 54% 46%;
  }

  .auth-panel { padding: 25px clamp(15px, 5vw, 34px) 28px; }
  .brand { margin-bottom: 24px; }
  .intro { margin-bottom: 20px; }
  .auth-form { gap: 13px; }
}
