:root {
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  color: #24212b;
  background: #f7f6fa;
  font-synthesis: none;
  --primary: #6750a4;
  --error: #b3261e;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg { stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 48px 20px 32px;
  background: radial-gradient(ellipse at 12% 16%, #eee9f7 0, transparent 42%), radial-gradient(ellipse at 90% 84%, #eeeaf6 0, transparent 40%);
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; color: #514565; font-size: 19px; font-weight: 650; letter-spacing: -.5px; }
.brand-mark { width: 23px; height: 23px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(-8deg); }
.brand-mark span { background: var(--primary); border-radius: 3px; }
.brand-mark span:nth-child(2) { opacity: .45; }
.brand-mark span:nth-child(3) { opacity: .7; }
.auth-card { width: 100%; max-width: 440px; padding: 38px 36px 0; background: #fffdff; border: 1px solid #e9e4ef; border-radius: 28px; box-shadow: 0 12px 40px #33234e08, 0 2px 6px #33234e04; }
.welcome-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 27px; border-radius: 18px; background: #eee6ff; color: var(--primary); }
.welcome-icon svg { width: 26px; height: 26px; }
.eyebrow { margin: 0 0 10px; font-size: 10px; font-weight: 700; letter-spacing: 1.9px; color: #88759f; }
h1 { margin: 0; font-size: 29px; font-weight: 500; line-height: 1.25; letter-spacing: -.8px; }
.subtitle { margin: 12px 0 31px; color: #77717e; font-size: 14px; line-height: 1.5; }
.form-field { margin-bottom: 9px; }
.input-wrap { position: relative; height: 58px; }
.input-wrap input { width: 100%; height: 100%; padding: 17px 48px; background: transparent; border: 1px solid #aaa2b2; border-radius: 8px; color: #292330; outline: none; transition: border-color .15s, box-shadow .15s; }
.input-wrap label { position: absolute; left: 43px; top: 19px; padding: 0 5px; color: #77707f; background: #fffdff; font-size: 14px; pointer-events: none; transition: top .15s, font-size .15s, color .15s; }
.input-wrap input:focus { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.input-wrap input:focus + label, .input-wrap input:not(:placeholder-shown) + label { top: -7px; font-size: 12px; }
.input-wrap input:focus + label { color: var(--primary); }
.field-icon { position: absolute; top: 19px; left: 16px; width: 20px; height: 20px; color: #7b7286; pointer-events: none; }
.field-error { min-height: 16px; margin: 5px 0 0 14px; color: var(--error); font-size: 12px; line-height: 1.4; }
.form-field.invalid input { border-color: var(--error); }
.form-field.invalid input:focus { box-shadow: inset 0 0 0 1px var(--error); }
.form-field.invalid label, .form-field.invalid .field-icon { color: var(--error); }
.visibility-toggle { position: absolute; top: 7px; right: 5px; width: 44px; height: 44px; padding: 12px; border: 0; border-radius: 50%; background: transparent; color: #7b7286; cursor: pointer; }
.visibility-toggle:hover { background: #6750a410; }
.visibility-toggle svg { display: block; width: 20px; height: 20px; }
.eye-slash { display: none; }
.visibility-toggle[aria-pressed="true"] .eye-slash { display: block; }
.submit-button { display: flex; align-items: center; justify-content: center; gap: 13px; width: 100%; min-height: 52px; margin: 10px 0 30px; padding: 14px 20px; border: 0; border-radius: 26px; background: var(--primary); color: #fff; cursor: pointer; font-size: 14px; font-weight: 600; transition: background .15s, box-shadow .15s, transform .15s; }
.submit-button svg { width: 19px; height: 19px; }
.submit-button:hover { background: #59438f; box-shadow: 0 4px 10px #6750a430; }
.submit-button:active { transform: scale(.985); }
button:focus-visible { outline: 3px solid #a998cf; outline-offset: 4px; }
.auth-error { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 20px; padding: 14px; color: #85221c; background: #fceae8; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.auth-error[hidden] { display: none; }
.auth-error > svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.auth-error strong { font-weight: 600; }
.auth-error p { margin: 4px 0 0; font-size: 12px; }
.auth-error:focus { outline: 2px solid var(--error); outline-offset: 3px; }
.card-footer { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 22px 0; border-top: 1px solid #eeeaf2; color: #8c8495; font-size: 11px; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #a495be; }
.page-footer { margin-top: 28px; color: #968d9f; font-size: 12px; letter-spacing: .1px; text-align: center; }
.noscript { margin: 0; padding: 16px; text-align: center; color: var(--error); }
@media (max-width: 480px) {
  .page { padding: 28px 16px; }
  .brand { margin-bottom: 24px; }
  .auth-card { padding: 28px 24px 0; border-radius: 24px; }
  h1 { font-size: 26px; }
  .subtitle { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
