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

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f3f6fa;
}

button,
input { font: inherit; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 430px);
  padding: 30px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgb(31 45 70 / 10%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e9f0;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 8px;
  background: #1267d6;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.login-brand p {
  margin: 0 0 3px;
  color: #1267d6;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-brand h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
}

.passkey-login {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 13px;
  margin-top: 24px;
}

.passkey-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  grid-row: span 2;
  place-items: center;
  border-radius: 8px;
  background: #eaf2ff;
  font-size: 21px;
}

.passkey-login h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.passkey-login p {
  margin: 0;
  color: #5f6877;
  font-size: 14px;
  line-height: 1.4;
}

.passkey-login > button {
  min-height: 48px;
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 10px 15px;
  border: 1px solid #1267d6;
  border-radius: 6px;
  background: #1267d6;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.passkey-login > button:hover { background: #0d56b5; }
.passkey-login > button:disabled { cursor: wait; opacity: 0.62; }

.passkey-login small {
  grid-column: 1 / -1;
  color: #707989;
  font-size: 12px;
  text-align: center;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 23px 0 0;
  color: #7a8290;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  height: 1px;
  flex: 1;
  background: #e3e8ef;
  content: "";
}

.setup-hint,
.unsupported-notice {
  margin: 20px 0 0;
  padding: 11px 12px;
  border: 1px solid #d7e1ee;
  border-radius: 6px;
  background: #f6f9fd;
  color: #596577;
  font-size: 13px;
  line-height: 1.45;
}

.unsupported-notice {
  border-color: #efc4c4;
  background: #fff7f7;
  color: #9b2e36;
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.login-form label {
  color: #525b6b;
  font-size: 13px;
  font-weight: 750;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #c9d3e1;
  border-radius: 6px;
  background: #ffffff;
  color: #171927;
  outline: none;
}

.login-form input:focus {
  border-color: #1267d6;
  box-shadow: 0 0 0 3px rgb(18 103 214 / 14%);
}

.login-form button {
  min-height: 46px;
  padding: 10px 15px;
  border: 1px solid #1267d6;
  border-radius: 6px;
  background: #1267d6;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.login-form button:hover { background: #0d56b5; }

.login-form button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.login-form .secondary-button {
  border-color: #c9d3e1;
  background: #ffffff;
  color: #273044;
}

.login-form .secondary-button:hover { background: #f4f7fb; }

.code-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.code-heading .text-button {
  min-height: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #1267d6;
  font-size: 13px;
}

.code-heading .text-button:hover {
  background: transparent;
  color: #0d56b5;
}

#loginCode {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.login-status {
  min-height: 22px;
  margin: 18px 0 0;
  color: #536071;
  font-size: 14px;
  line-height: 1.45;
}

.login-status.is-error { color: #b4232d; }
.login-status.is-success { color: #14734c; }

@media (max-width: 520px) {
  .login-shell { padding: 14px; }
  .login-panel { padding: 22px; }
}
