:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  color: #102139;
  background: #edf2f7;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(74, 211, 194, .18), transparent 27rem),
    radial-gradient(circle at 88% 85%, rgba(59, 89, 189, .15), transparent 30rem),
    #edf2f7;
}

button, input { font: inherit; }

.auth-shell {
  width: min(1080px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 0;
  display: grid;
  grid-template-columns: 1fr 470px;
  gap: 72px;
  align-items: center;
}

.intro { padding: 34px 0 34px 18px; }

.brand-mark {
  position: relative;
  width: 54px;
  height: 54px;
  margin-bottom: 48px;
  border-radius: 17px;
  background: #102139;
  box-shadow: 0 16px 34px rgba(16, 33, 57, .18);
}

.brand-mark span {
  position: absolute;
  left: 14px;
  width: 25px;
  height: 4px;
  border-radius: 9px;
  background: white;
}

.brand-mark span:nth-child(1) { top: 15px; }
.brand-mark span:nth-child(2) { top: 25px; width: 17px; }
.brand-mark span:nth-child(3) { top: 35px; width: 21px; }
.brand-mark i { position: absolute; right: 8px; top: 25px; width: 14px; height: 14px; border-radius: 50%; background: #4ad3c2; }

.eyebrow, .step-label {
  margin: 0 0 15px;
  color: #347f78;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-size: clamp(42px, 5.2vw, 68px);
  line-height: 1.08;
  letter-spacing: -.055em;
}

.intro-copy {
  max-width: 520px;
  margin: 28px 0;
  color: #68778a;
  font-size: 16px;
  line-height: 1.8;
}

.trust-list { display: flex; flex-wrap: wrap; gap: 12px 20px; color: #526176; font-size: 14px; }
.trust-list span { display: flex; align-items: center; gap: 7px; }
.trust-list i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #226a63; background: #d9f3ee; font-size: 11px; font-style: normal; font-weight: 900; }

.auth-card {
  position: relative;
  min-height: 570px;
  padding: 44px 44px 30px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(137, 153, 173, .22);
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 30px 80px rgba(44, 62, 88, .16);
  backdrop-filter: blur(18px);
}

.panel-state { flex: none; }

.panel-state h2 { margin: 0 0 12px; font-size: 30px; letter-spacing: -.035em; }
.panel-copy { margin: 0 0 28px; color: #718095; line-height: 1.65; }

.auth-form { display: grid; gap: 17px; }
.auth-form label { display: grid; gap: 8px; color: #4b5a6f; font-size: 13px; font-weight: 700; }
.auth-form input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid #d6dde7;
  border-radius: 12px;
  outline: none;
  color: #102139;
  background: #f9fbfd;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth-form input:focus { border-color: #4770d8; background: white; box-shadow: 0 0 0 4px rgba(71, 112, 216, .11); }

.primary, .secondary {
  height: 51px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 800;
}
.primary { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; padding: 0 20px; color: white; background: #183157; box-shadow: 0 10px 22px rgba(24, 49, 87, .2); }
.primary:hover { background: #244774; }
.primary:disabled { cursor: wait; opacity: .65; }
.primary b { font-size: 19px; }
.secondary { padding: 0 18px; color: #213958; background: #e8eef5; }
.link-button { text-decoration: none; }

.instructions { margin: 20px 0; padding-left: 22px; color: #617086; font-size: 14px; line-height: 1.65; }
.instructions li + li { margin-top: 7px; }
.secret-box { display: flex; align-items: center; gap: 10px; margin: 22px 0; padding: 13px 14px; border: 1px dashed #9eacc0; border-radius: 12px; background: #f3f7fa; }
.secret-box code { flex: 1; overflow-wrap: anywhere; color: #193e69; font-size: 14px; font-weight: 800; letter-spacing: .08em; }
.secret-box button { border: 0; border-radius: 9px; padding: 8px 11px; cursor: pointer; color: #245b6d; background: #dcefea; font-weight: 800; }

.recovery-codes { margin: 20px 0; padding: 18px 22px; border-radius: 14px; color: #17385f; background: #eff4f8; font: 700 15px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.button-row { display: grid; grid-template-columns: 1fr 1.65fr; gap: 10px; }

.warning, .form-error { padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.warning { margin-top: 18px; color: #815319; background: #fff3d9; }
.form-error { margin: 18px 0 0; color: #9a2f38; background: #fde9eb; }

.spinner { width: 42px; height: 42px; margin: 115px auto 28px; border: 4px solid #dfe7ef; border-top-color: #3157d5; border-radius: 50%; animation: spin .8s linear infinite; }
#loading-panel { min-height: 455px; text-align: center; }
#loading-panel p { color: #8290a2; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-card footer { display: flex; flex-shrink: 0; justify-content: center; align-items: center; gap: 8px; margin-top: 42px; color: #91a0b2; font-size: 12px; }
.lock-dot { width: 7px; height: 7px; border-radius: 50%; background: #4bc8b9; box-shadow: 0 0 0 4px rgba(75, 200, 185, .12); }

@media (max-width: 850px) {
  .auth-shell { grid-template-columns: 1fr; gap: 28px; padding: 28px 0; }
  .intro { padding: 10px 8px; }
  .brand-mark { margin-bottom: 28px; }
  .intro h1 { font-size: 42px; }
  .intro-copy { margin: 18px 0; }
  .auth-card { min-height: 560px; padding: 34px 26px 28px; }
}

@media (max-width: 480px) {
  .auth-shell { width: min(100% - 22px, 470px); }
  .intro h1 { font-size: 36px; }
  .trust-list { display: grid; }
  .auth-card { border-radius: 22px; }
  .button-row { grid-template-columns: 1fr; }
}
