:root {
  --page-bg: #f5f5f6;
  --card-bg: #ffffff;
  --card-border: #e4e7ec;
  --text-main: #12233e;
  --text-muted: #667085;
  --line: #d7dbe3;
  --chip-bg: #ffe900;
  --chip-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
  --primary: #1ea5ff;
  --primary-dark: #0f8ae0;
  --field-border: #d7dbe3;
  --focus: #111827;
  --shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text-main);
  background: var(--page-bg);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px 16px 40px;
}

.auth-shell {
  width: min(100%, 358px);
  position: relative;
}

.auth-shell--wide {
  width: min(100%, 430px);
}

.login-card {
  width: 100%;
  padding: 24px 24px 28px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 88px;
  margin: 0 auto 10px;
}

.brand-mark svg {
  width: 100%;
  height: auto;
  display: block;
}

h1 {
  margin: 0 0 24px;
  text-align: center;
  font-size: clamp(2rem, 5vw, 2.2rem);
  line-height: 1.15;
  font-weight: 800;
}

.login-form {
  display: grid;
  gap: 16px;
}

.step-content {
  display: grid;
  gap: 10px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--field-border);
  border-radius: 13px;
  background: #fff;
  padding: 13px 15px;
  font: inherit;
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.05);
}

.field input:disabled {
  background: #f8fafc;
  color: var(--text-muted);
  cursor: not-allowed;
}

.helper-link {
  justify-self: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.password-row {
  position: relative;
}

.password-row input {
  padding-right: 78px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.toggle-password:disabled,
.helper-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.submit-btn {
  justify-self: center;
  min-width: 94px;
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover,
.submit-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(30, 165, 255, 0.24);
  background: var(--primary-dark);
}

.submit-btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.submit-btn.is-loading .submit-btn__label {
  opacity: 0;
}

.submit-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.form-message {
  min-height: 1.1rem;
  margin: 0;
  text-align: center;
  font-size: 0.88rem;
  color: #c2410c;
}

.form-message.error {
  color: #b42318;
}

.form-message.success {
  color: #157347;
}

.form-message.pending {
  color: var(--primary-dark);
}

.alt-auth {
  display: grid;
  gap: 18px;
}

.alt-auth.is-hidden {
  display: none;
}

.divider {
  position: relative;
  text-align: center;
  color: #475467;
  font-weight: 700;
}

.divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid var(--line);
}

.divider span {
  position: relative;
  display: inline-block;
  padding: 0 14px;
  background: var(--card-bg);
}

.secondary-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-main);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.secondary-btn__icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1ea5ff, #8b5cf6);
  box-shadow: inset 0 0 0 3px #fff;
  border: 1px solid rgba(17, 24, 39, 0.12);
}

.footer-copy {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: #111827;
}

.footer-link {
  margin-left: 8px;
  color: #111827;
  font-weight: 800;
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible,
.helper-link:hover,
.helper-link:focus-visible {
  text-decoration: underline;
}

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

@media (max-width: 420px) {
  .auth-shell {
    width: min(100%, 340px);
  }

  .login-card {
    padding: 22px 18px 24px;
  }

  h1 {
    font-size: 1.75rem;
  }
}
