:root {
  font: 15px/1.5 system-ui, sans-serif;
  color: #18243a;
  background: #eff3fc;
  --navy: #151d3b;
  --muted: #52617d;
  --line: #dce4f3;
  --blue: #394ce8;
  --blue-deep: #2f41c5;
  --tint: #eef0ff;
  --paper: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  color: white;
  background: linear-gradient(105deg, #11182f, #202952);
  border-bottom: 1px solid #39466f;
}

.topbar-inner {
  width: min(1100px, calc(100% - 40px));
  min-height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark, .card-icon {
  display: grid;
  place-items: center;
  background: #5365f2;
  color: white;
  font-weight: 800;
  border-radius: 12px;
}

.brand-mark { width: 40px; height: 40px; font-size: 21px; }
.brand strong { display: block; letter-spacing: .035em; }
.brand small { display: block; color: #c7d0f3; font-size: 11px; }
.header-label { color: #c7d0f3; font-size: 13px; }

.login-layout {
  width: min(1100px, calc(100% - 40px));
  margin: auto;
  padding: 64px 0;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 440px);
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
  flex: 1;
}

.intro h1 {
  font-size: clamp(36px, 4.5vw, 58px);
  line-height: 1.1;
  letter-spacing: -.045em;
  margin: 12px 0 20px;
  color: var(--navy);
}

.intro p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  max-width: 460px;
}

.eyebrow {
  color: var(--blue-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
}

.feature-list {
  display: grid;
  gap: 17px;
  margin-top: 40px;
  color: #354564;
  font-weight: 600;
  font-size: 14px;
}

.feature-list > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-icon {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #e4e8ff;
  color: var(--blue);
  display: grid;
  place-items: center;
}

.login-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow: 0 20px 60px #243a7314;
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 28px;
}

.card-icon { width: 48px; height: 48px; font-size: 25px; }

h2 {
  font-size: 22px;
  margin: 4px 0 0;
  letter-spacing: -.025em;
}

h3 {
  font-size: 21px;
  margin: 12px 0 7px;
  letter-spacing: -.025em;
}

.section-description {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 23px;
}

.method-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  color: var(--navy);
  font: inherit;
}

.method-button:hover:not(:disabled) {
  background: #f5f6ff;
  border-color: #aab5ff;
}

.method-button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.method-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #edf1f8;
  color: #345080;
  font-weight: 800;
}

.method-icon.local {
  background: #e9ebff;
  color: var(--blue);
}

.method-content { flex: 1; }
.method-content strong { display: block; font-size: 14px; }
.method-content small { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #354564;
  margin: 18px 0 7px;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  font: inherit;
  color: var(--navy);
  border: 1px solid #b3bfd3;
  border-radius: 9px;
  background: #fafbfe;
}

input:focus {
  outline: 2px solid #9ba6ff;
  border-color: var(--blue);
}

.primary-button {
  display: block;
  width: 100%;
  margin-top: 24px;
  min-height: 48px;
  border: 1px solid var(--blue);
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.primary-button:hover:not(:disabled) { background: var(--blue-deep); }
.primary-button:disabled { opacity: .6; cursor: wait; }

.back-button {
  background: none;
  border: 0;
  color: var(--blue-deep);
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}

.mfa-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: 22px;
  border-radius: 13px;
  background: #e5f6eb;
  color: #1b653d;
  font-size: 25px;
}

#mfa-code {
  text-align: center;
  letter-spacing: .3em;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.feedback {
  color: #a32623;
  font-size: 13px;
  margin: 15px 0 0;
}

.feedback:empty { display: none; }

.card-footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px;
}

@media (max-width: 780px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 36px 0;
  }

  .intro h1 { font-size: 36px; }
  .intro p { font-size: 14px; }
  .feature-list { display: none; }
}

@media (max-width: 420px) {
  .header-label { display: none; }
  .login-layout { width: calc(100% - 24px); }
  .login-card { padding: 22px; }
}

@media (prefers-reduced-motion: no-preference) {
  button { transition: background .15s, border-color .15s; }
}
