:root {
  --login-purple: #6055cd;
  --login-purple-dark: #4f43bd;
  --login-orange: #f5a623;
  --login-ink: #19162f;
  --login-muted: #6f6b80;
  --login-line: #e5e2ef;
  --login-bg: #f7f5ff;
}

* {
  box-sizing: border-box;
}

.login-page {
  min-height: 100vh;
  margin: 0;
  color: var(--login-ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(96, 85, 205, 0.12), transparent 34%),
    radial-gradient(circle at 90% 85%, rgba(245, 166, 35, 0.13), transparent 30%),
    var(--login-bg);
  font-family: "Nunito Sans", sans-serif;
}

.login-shell {
  width: min(100% - 32px, 420px);
  margin: 0 auto;
  padding: 28px 0 48px;
}

.login-brand {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin: 0 auto 24px;
  color: var(--login-ink);
  font-size: 21px;
  font-weight: 800;
  text-decoration: none;
}

.login-brand img {
  border-radius: 12px;
  box-shadow: 0 7px 18px rgba(46, 37, 117, 0.18);
}

.login-card {
  border: 1px solid rgba(96, 85, 205, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  padding: 28px 22px;
  box-shadow: 0 24px 65px rgba(44, 35, 103, 0.12);
}

.login-heading {
  margin-bottom: 25px;
  text-align: center;
}

.login-eyebrow {
  margin: 0 0 6px;
  color: var(--login-purple);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-heading h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.2;
}

.login-heading > p:last-child {
  margin: 8px auto 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.5;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}

.mobile-field {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--login-line);
  border-radius: 13px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mobile-field:focus-within {
  border-color: var(--login-purple);
  box-shadow: 0 0 0 3px rgba(96, 85, 205, 0.12);
}

.country-code {
  display: flex;
  align-items: center;
  border-right: 1px solid var(--login-line);
  background: #f8f7fb;
  padding: 0 14px;
  color: #39354d;
  font-weight: 800;
}

.mobile-field input,
.profile-field {
  width: 100%;
  min-height: 50px;
  border: 0;
  outline: 0;
  padding: 12px 14px;
  color: var(--login-ink);
  background: #fff;
  font: inherit;
  font-size: 17px;
}

.profile-field {
  display: block;
  min-height: 48px;
  margin-bottom: 15px;
  border: 1px solid var(--login-line);
  border-radius: 13px;
  font-size: 15px;
}

.profile-field:focus {
  border-color: var(--login-purple);
  box-shadow: 0 0 0 3px rgba(96, 85, 205, 0.12);
}

.signup-heading {
  margin-bottom: 20px;
  text-align: center;
}

.signup-heading h2 {
  margin: 0;
  font-size: 21px;
}

.signup-heading p {
  margin: 6px 0 0;
  color: var(--login-muted);
  font-size: 13px;
}

.primary-button,
.google-button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 13px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  margin-top: 18px;
  border: 0;
  color: #fff;
  background: var(--login-purple);
  box-shadow: 0 9px 22px rgba(96, 85, 205, 0.22);
}

.primary-button:hover {
  background: var(--login-purple-dark);
}

.primary-button:disabled,
.google-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.primary-button.is-loading,
.google-button.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.primary-button.is-loading > *,
.google-button.is-loading > * {
  visibility: hidden;
}

.primary-button.is-loading::after,
.google-button.is-loading::after {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 1.1em;
  height: 1.1em;
  margin: auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: #fff;
  content: "";
  animation: login-button-spin 0.7s linear infinite;
}

.google-button.is-loading::after {
  color: var(--login-purple);
}

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

.otp-login.is-google-profile > .login-heading {
  display: none;
}

.otp-login [hidden] {
  display: none !important;
}

.otp-error {
  margin-top: 16px;
  border: 1px solid #c7d2fe;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  padding: 12px 14px;
  color: #3730a3;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.08);
}

.otp-error[data-tone="warning"] {
  border-color: #f0cf85;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.08);
}

.otp-error[data-tone="error"] {
  border-color: #fecdd3;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  color: #9f1239;
  box-shadow: 0 8px 16px rgba(225, 29, 72, 0.08);
}

.google-button {
  border: 1px solid var(--login-line);
  color: #332f43;
  background: #fff;
}

.google-button:hover {
  border-color: #c8c3da;
  background: #faf9fd;
}

.login-terms {
  margin: 20px 8px 0;
  color: var(--login-muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.login-terms a {
  color: var(--login-purple);
  font-weight: 700;
}

@media (min-width: 520px) {
  .login-shell {
    padding-top: 50px;
  }

  .login-card {
    padding: 34px;
  }
}
