:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8fb;
  color: #172033;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, .11), transparent 34rem),
    #f7f8fb;
}

a { color: #4338ca; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.auth-wrap { width: min(100%, 460px); }

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
  color: #172033;
  text-decoration: none;
  font-size: 20px;
  font-weight: 750;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #4f46e5;
  box-shadow: 0 9px 20px rgba(79, 70, 229, .24);
}

.auth-card {
  padding: 30px;
  border: 1px solid #dfe3ec;
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 22px 60px rgba(23, 32, 51, .10);
}

h1 { margin: 0; font-size: 27px; line-height: 1.2; text-align: center; }
.lede { margin: 9px 0 24px; color: #647089; text-align: center; line-height: 1.55; }
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
label { font-size: 14px; font-weight: 650; }

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd2df;
  border-radius: 9px;
  background: #fff;
  color: #172033;
  font: inherit;
  outline: none;
}

input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, .13); }
.code-input { text-align: center; font: 600 24px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .28em; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; color: #4b5567; font-size: 14px; line-height: 1.45; }
.check-row input { width: 16px; min-height: 16px; margin-top: 2px; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #4f46e5;
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}

.button:hover { background: #4338ca; }
.button.secondary { border-color: #cbd2df; background: #fff; color: #283249; }
.button.secondary:hover { background: #f3f5f9; }
.button.danger { border-color: #fecaca; background: #fff; color: #b42318; }
.button.full { width: 100%; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #8590a6; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: #e3e7ef; }
.footnote { margin: 20px 0 0; color: #647089; text-align: center; font-size: 14px; }
.helper { color: #7a8499; font-size: 12px; line-height: 1.45; }

.notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #c7d2fe;
  border-radius: 9px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  line-height: 1.5;
}

.status { display: none; margin: 0 0 16px; padding: 11px 13px; border-radius: 9px; font-size: 14px; line-height: 1.45; }
.status.visible { display: block; }
.status.success { border: 1px solid #a7f3d0; background: #ecfdf5; color: #116149; }
.status.error { border: 1px solid #fecaca; background: #fef2f2; color: #a11b1b; }

.identity {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #e1e5ed;
  border-radius: 10px;
  background: #f8fafc;
}
.identity strong, .identity span { display: block; }
.identity span { margin-top: 3px; color: #647089; font-size: 14px; }

@media (max-width: 520px) {
  .auth-shell { padding: 20px 14px; }
  .auth-card { padding: 24px 20px; }
  .button-row { grid-template-columns: 1fr; }
}
