:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #292235;
  background: #f7f5fa;
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

button, input { font: inherit; }

.layout { display: grid; grid-template-columns: minmax(320px, 0.9fr) minmax(480px, 1.1fr); min-height: 100vh; }

.intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(30px, 5vw, 76px);
  color: #fff;
  background: radial-gradient(circle at 15% 80%, #9d6bd1 0, transparent 35%), linear-gradient(150deg, #422062, #6e3f98 65%, #573184);
}

.brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #ffffff85; border-radius: 12px; background: #ffffff26; font-weight: 700; }
.intro-copy { max-width: 500px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #e6d7f5; }
.intro h1 { margin: 18px 0; font-size: clamp(40px, 5vw, 68px); line-height: 1.08; letter-spacing: -0.045em; }
.intro p { max-width: 430px; font-size: 18px; line-height: 1.6; color: #f0e7f8; }
.intro-foot { font-size: 14px; color: #dfd0ed; }

.form-side { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; padding: 40px 24px; }
.card { width: min(100%, 490px); padding: clamp(28px, 4vw, 48px); background: #fff; border: 1px solid #e9e3ef; border-radius: 18px; box-shadow: 0 20px 60px #3b235318; }
.step-label { margin-bottom: 36px; color: #7449a0; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.state h2 { margin: 0 0 12px; font-size: 30px; line-height: 1.2; letter-spacing: -0.03em; }
.state p { line-height: 1.55; }
.lead { margin: 0 0 30px; color: #655a70; }
.state[hidden], [hidden] { display: none !important; }

form { display: flex; flex-direction: column; }
label { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
input { width: 100%; height: 48px; margin-bottom: 22px; padding: 0 14px; color: #292235; background: #fff; border: 1px solid #cfc4db; border-radius: 8px; outline: none; }
input:focus { border-color: #7449a0; box-shadow: 0 0 0 3px #7449a022; }
input[readonly] { color: #5d5268; background: #f7f5fa; }
.password-field { position: relative; }
.password-field input { padding-right: 90px; margin-bottom: 5px; }
.show-password { position: absolute; top: 0; right: 4px; height: 48px; padding: 0 10px; border: 0; background: transparent; color: #684293; cursor: pointer; font-size: 13px; font-weight: 700; }
.show-password:focus-visible { outline: 2px solid #684293; outline-offset: -4px; }
.hint { margin: 0 0 24px; color: #746b7e; font-size: 13px; }
.form-error { margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; color: #962c3d; background: #fff0f2; font-size: 14px; }

.primary-button { display: grid; place-items: center; min-height: 48px; width: 100%; padding: 12px 16px; color: #fff; background: #674094; border: 0; border-radius: 8px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background 0.15s ease; }
.primary-button:hover { background: #56327f; }
.primary-button:disabled { opacity: 0.65; cursor: wait; }
.primary-button:focus-visible { outline: 3px solid #ae84d6; outline-offset: 3px; }
.expires { margin: 24px 0 0; color: #746b7e; font-size: 13px; }
.support-note { width: min(100%, 490px); margin: 0; color: #786d82; text-align: center; font-size: 13px; }
.spinner { width: 36px; height: 36px; margin-bottom: 24px; border: 3px solid #e6d9f1; border-top-color: #674094; border-radius: 50%; animation: spin 0.8s linear infinite; }
.result-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 24px; border-radius: 50%; font-size: 26px; font-weight: 700; }
.result-icon.success { color: #1d7551; background: #e4f5ec; }
.result-icon.error { color: #934553; background: #fdecef; }
.link-button { margin-top: 26px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .intro { min-height: 240px; gap: 32px; padding: 28px 24px; }
  .intro h1 { font-size: 36px; margin: 12px 0; }
  .intro p { font-size: 15px; margin: 0; }
  .intro-foot { display: none; }
  .form-side { justify-content: flex-start; padding: 28px 16px 50px; }
  .card { box-shadow: 0 10px 35px #3b235312; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  .primary-button { transition: none; }
}
