:root {
  color-scheme: light;
  font-family: "Nunito", system-ui, sans-serif;
  color: #101568;
  background: #f5f6ff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(330px, .9fr) minmax(500px, 1.08fr);
  align-items: center;
  gap: clamp(24px, 5vw, 84px);
  min-height: 100dvh;
  overflow: hidden;
  padding: clamp(108px, 12vh, 150px) max(7vw, 48px) clamp(80px, 9vh, 112px);
  background: url("./assets/background.png") center / cover no-repeat;
}

.brand {
  position: absolute;
  z-index: 3;
  left: max(6.5vw, 42px);
  top: clamp(28px, 5vh, 54px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #777ab8;
  font-size: clamp(12px, 1.25vw, 17px);
  font-weight: 700;
}
.brand img { width: clamp(190px, 18vw, 280px); height: auto; }
.brand span { margin-top: -6px; }
.brand b { color: #ff4778; }

.illustration { align-self: end; display: flex; justify-content: center; min-width: 0; }
.illustration img {
  display: block;
  width: min(100%, 650px);
  max-height: 69vh;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 20px 24px rgba(58, 43, 145, .12));
}

.reset-card {
  z-index: 2;
  width: min(100%, 720px);
  justify-self: start;
  padding: clamp(34px, 4vw, 56px) clamp(34px, 5vw, 66px) clamp(38px, 5vw, 58px);
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 40px;
  background: rgba(255,255,255,.89);
  box-shadow: 0 25px 70px rgba(50, 46, 135, .14), inset 0 1px rgba(255,255,255,.8);
  backdrop-filter: blur(12px);
}

.lock-badge {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: -6px auto 12px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f0efff, #fbfaff);
  box-shadow: 0 10px 25px rgba(91, 81, 235, .12);
}
.lock-badge svg { width: 44px; stroke: #6052ef; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

h1 { margin: 0; text-align: center; font-size: clamp(32px, 3vw, 46px); line-height: 1.12; font-weight: 900; }
.subtitle { margin: 10px auto 26px; max-width: 520px; text-align: center; color: #7175ad; font-size: clamp(17px, 1.55vw, 22px); line-height: 1.45; font-weight: 600; }
form { display: flex; flex-direction: column; }
label { margin: 0 0 8px; font-size: 17px; font-weight: 800; }

.password-field { position: relative; }
.password-field input {
  width: 100%; height: 66px; padding: 0 58px 0 58px;
  color: #121668; background: rgba(248,248,255,.94);
  border: 2px solid #e0e1fa; border-radius: 15px; outline: none;
  font-size: 17px; font-weight: 700; transition: border-color .2s, box-shadow .2s;
}
.password-field input::placeholder { color: #9699c3; font-weight: 600; }
.password-field input:focus { border-color: #6758f4; box-shadow: 0 0 0 4px rgba(103,88,244,.1); }
.field-icon { position: absolute; z-index: 1; left: 20px; top: 21px; width: 24px; fill: none; stroke: #8589bd; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toggle-password { position: absolute; right: 10px; top: 10px; width: 46px; height: 46px; border: 0; border-radius: 12px; color: #8589bd; background: transparent; cursor: pointer; font-size: 20px; }
.toggle-password:hover { background: #efefff; }
.helper { margin: 7px 0 24px; color: #8589bd; font-size: 14px; font-weight: 600; }
.message { min-height: 22px; margin: 10px 0 7px; text-align: center; color: #dc3b68; font-weight: 800; }

.submit-button {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  width: 100%; min-height: 64px; padding: 14px 28px;
  border: 0; border-radius: 17px; text-decoration: none;
  color: white; background: linear-gradient(100deg, #5750f3, #6551ef, #554ceb);
  box-shadow: 0 12px 25px rgba(84,75,235,.24); cursor: pointer;
  font-size: 19px; font-weight: 900; transition: transform .18s, opacity .18s;
}
.submit-button span:last-child { margin-left: auto; font-size: 28px; font-weight: 500; }
.submit-button:hover { transform: translateY(-2px); }
.submit-button:disabled { opacity: .58; cursor: wait; transform: none; }

.result-view { padding: 38px 0 8px; text-align: center; }
.result-view[hidden] { display: none; }
.result-icon { display: grid; place-items: center; width: 82px; height: 82px; margin: 0 auto 18px; border-radius: 50%; color: white; background: linear-gradient(135deg, #5e54f5, #8d7bff); font-size: 46px; font-weight: 900; }
.result-icon.error { background: linear-gradient(135deg, #ff5d88, #ff7aa0); }
.result-view p { max-width: 520px; margin: 14px auto 30px; color: #7175ad; font-size: 18px; line-height: 1.55; font-weight: 600; }
.text-link { display: inline-block; margin-top: 22px; color: #5d53ee; font-weight: 800; }

@media (max-width: 820px) {
  .page-shell {
    display: flex; flex-direction: column; justify-content: flex-start;
    gap: 0; min-height: 100dvh; padding: 96px 16px 36px;
    overflow: auto; background-position: center;
  }
  .brand { left: 20px; top: 18px; align-items: flex-start; }
  .brand img { width: 150px; }
  .brand span { display: none; }
  .illustration { width: 100%; height: 238px; align-self: auto; margin-bottom: -54px; justify-content: flex-start; }
  .illustration img { width: min(330px, 78vw); max-height: none; object-position: left bottom; }
  .reset-card { width: 100%; padding: 28px 20px 32px; border-radius: 28px; }
  .lock-badge { width: 68px; height: 68px; margin-top: -4px; }
  .lock-badge svg { width: 36px; }
  h1 { font-size: 31px; }
  .subtitle { margin-bottom: 22px; font-size: 16px; }
  .password-field input { height: 60px; font-size: 16px; }
  .field-icon { top: 18px; }
  .toggle-password { top: 7px; }
  .submit-button { min-height: 58px; font-size: 17px; }
}

@media (max-width: 390px) {
  .page-shell { padding-inline: 12px; }
  .illustration { height: 205px; }
  .reset-card { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
