:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1f3a;
  color: #f9fafb;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 111, 97, .2), transparent 38rem),
    #0b1f3a;
}

.shell {
  width: min(100%, 610px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card {
  padding: clamp(32px, 8vw, 54px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 28px;
  background: rgba(17, 24, 39, .96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 38px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.5px;
}

.brand-mark {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #ff8a5b, #f25d7b);
  box-shadow: 0 8px 24px rgba(242, 93, 123, .25);
}

.state-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 25px;
  border-radius: 23px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 111, 97, .13);
  font-size: 34px;
  font-weight: 800;
}

.state-icon.success { background: rgba(45, 212, 191, .14); color: #5eead4; }
.state-icon.ready { background: rgba(255, 111, 97, .13); color: #ffa69e; }
.state-icon.error { background: rgba(255, 111, 97, .13); color: #ffa69e; }

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, .18);
  border-top-color: #ff7a6e;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.eyebrow {
  margin: 0 0 10px;
  color: #ff8a7e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(27px, 7vw, 36px);
  line-height: 1.12;
  letter-spacing: -1px;
}

.message {
  max-width: 420px;
  min-height: 3.1em;
  margin: 15px auto 0;
  color: #aeb8c7;
  font-size: 16px;
  line-height: 1.55;
}

.account-hint {
  margin: 14px 0 0;
  color: #f9fafb;
  font-size: 14px;
  font-weight: 700;
}

.password-form {
  margin-top: 26px;
  text-align: left;
}

.password-form label {
  display: block;
  margin: 0 0 8px;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 700;
}

.password-form input {
  width: 100%;
  min-height: 52px;
  margin: 0 0 9px;
  padding: 13px 15px;
  border: 1px solid #3a475b;
  border-radius: 13px;
  outline: 0;
  color: #f9fafb;
  background: #0f1c30;
  font: inherit;
}

.password-form input:focus-visible {
  border-color: #5eead4;
  box-shadow: 0 0 0 3px rgba(94, 234, 212, .18);
}

.password-form input + .field-hint {
  margin-bottom: 20px;
}

.field-hint,
.form-error {
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.45;
}

.field-hint { color: #7f8999; }
.form-error { color: #ffa69e; }
.password-form .primary-button { margin-top: 8px; }

.actions { margin-top: 30px; }

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 52px;
  padding: 15px 22px;
  border: 0;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button { color: white; background: linear-gradient(135deg, #ff8a5b, #f25d7b); }
.secondary-button { margin-top: 10px; color: #e5e7eb; background: #263449; }
.primary-button:focus-visible,
.secondary-button:focus-visible,
.password-form input:focus-visible,
a:focus-visible { outline: 3px solid #5eead4; outline-offset: 3px; }

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: .65;
}

.safe-close { margin: 17px 0 0; color: #7f8999; font-size: 13px; }

footer {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #7f8999;
  font-size: 12px;
}

footer a { color: #aeb8c7; }

[hidden] { display: none !important; }

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

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.8s; }
}

@media (max-width: 420px) {
  .shell { padding-left: 12px; padding-right: 12px; }
  .card { border-radius: 23px; }
  .brand { margin-bottom: 30px; }
}
