:root {
  color-scheme: only light;
  --brand: #8a80b1;
  --brand-strong: #796ea7;
  --brand-soft: #f0ebff;
  --accent: #d3af61;
  --text: #221c33;
  --muted: #645d80;
  --line: #ddd5ef;
  --error: #bb2124;
  --success-bg: #e8f7ee;
  --success-text: #1e7f43;
  --success-border: #b7e4c7;
  --error-bg: #fdecea;
  --error-text: #b02a37;
  --error-border: #f5c2c7;
}

.device-verification-card {
  max-width: 460px;
  
}
.device-code-input {
  width: 100%;
  height: 58px;
  margin: 8px 0 16px;
  border: 1px solid #ded7ec;
  border-radius: 12px;
  color: #30274b;
  background: #fff;
  font:
    700 1.5rem/1 "Space Grotesk",
    sans-serif;
  letter-spacing: 0.42em;
  text-align: center;
  outline: none;
}
.device-code-input:focus {
  border-color: #8a80b1;
  box-shadow: 0 0 0 4px rgba(138, 128, 177, 0.14);
}
.device-verify-btn {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #6f6694;
  font:
    700 0.9rem "Poppins",
    sans-serif;
  cursor: pointer;
}
.device-verify-btn:disabled,
.device-verification-footer button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}
.device-verification-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: #817893;
  font-size: 0.76rem;
}
.device-verification-footer button {
  border: 0;
  color: #645b8d;
  background: transparent;
  font:
    700 0.78rem "Poppins",
    sans-serif;
  cursor: pointer;
}
.device-back-link {
  display: block;
  margin-top: 22px;
  color: #756c91;
  font-size: 0.78rem;
  text-align: center;
  text-decoration: none;
}
@media (max-width: 640px) {
  .device-code-input {
    height: 54px;
    font-size: 1.3rem;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

input,
button,
textarea,
select {
  font: inherit;
}

body.auth-page {
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at 15% 8%,
      rgba(255, 255, 255, 0.92),
      transparent 34%
    ),
    linear-gradient(160deg, #f5f1ff 0%, #faf8ff 48%, #f1ebff 100%);
}

.auth-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 22px 16px 34px;
}

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.brand img {
  display: block;
}

.auth-link {
  text-decoration: none;
  color: var(--brand-strong);
  font-weight: 600;
  font-size: 0.92rem;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.auth-grid--single {
  grid-template-columns: 1.05fr 0.95fr;
}

.auth-side {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(145deg, #30274b 0%, #4d3f74 100%);
  color: #f8f6ff;
  padding: 30px 24px;
  box-shadow: 0 24px 48px rgba(48, 39, 75, 0.3);
}

.auth-side::before,
.auth-side::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.auth-side::before {
  width: 230px;
  height: 230px;
  top: -92px;
  right: -64px;
}

.auth-side::after {
  width: 180px;
  height: 180px;
  bottom: -84px;
  left: -56px;
}

.eyebrow {
  position: relative;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: #dacff8;
  font-weight: 600;
}

.auth-side h1 {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  font-family: "Space Grotesk", "Poppins", sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.24;
}

.auth-side p {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: #e6ddfa;
  line-height: 1.72;
  font-size: 0.93rem;
}

.auth-card {
  background: #ffffff;
  border: 1px solid rgba(221, 213, 239, 0.95);
  border-radius: 24px;
  padding: 22px 20px;
  box-shadow: 0 18px 42px rgba(79, 64, 121, 0.14);
}

.auth-form {
  width: 100%;
}

.auth-form-head h2 {
  font-family: "Space Grotesk", "Poppins", sans-serif;
  font-size: 1.4rem;
  line-height: 1.2;
  color: #2f2750;
}

.auth-form-head p {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-redirect-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(138, 128, 177, 0.22);
  border-radius: 14px;
  color: #3c3458;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.98),
      rgba(246, 242, 255, 0.98)
    ),
    #ffffff;
}

.auth-redirect-note[hidden] {
  display: none;
}

.auth-redirect-note span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-redirect-note p {
  margin: 0;
  color: #5f5777;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
}

.input-box {
  margin-top: 14px;
}

.field {
  margin-top: 12px;
}

.label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #3b3355;
}
.password-wrapper {
  position: relative;
}
.password-wrapper i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #8e85ae;
}

.password-wrapper .password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8e85ae;
  cursor: pointer;
  place-items: center;
  transform: translateY(-50%);
}

.password-wrapper .password-toggle:hover,
.password-wrapper .password-toggle:focus-visible {
  background: #f1edfa;
  color: var(--brand);
  outline: none;
}

.password-wrapper .password-toggle i {
  position: static;
  transform: none;
  color: currentColor;
}

.password-wrapper:has(.password-toggle) input {
  padding-right: 48px;
}
.input-box input {
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  width: 100%;
  padding: 12px 12px;
  font-size: 0.93rem;
  color: #2f2750;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.input-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(138, 128, 177, 0.18);
}

.field-hint {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.45;
}

.auth-page--signup .input-box input[aria-invalid="true"] {
  border-color: var(--error);
}

.auth-page--signup .input-box input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(187, 33, 36, 0.12);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 40px;
}

.toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 20px;
  height: 20px;
}

.toggle::after {
  font-family: "Font Awesome 6 Free";
  content: "\f070";
  font-weight: 900;
  -webkit-user-select: none;
  user-select: none;
  font-size: 14px;
  color: #8e85ae;
}

.toggle.slash::after {
  content: "\f06e";
}

#message {
  margin-top: 12px;
  max-height: max-content;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.85rem;
  text-align: start;
  display: none;
  transition: all 0.3s ease;
}

#message.success {
  display: block;
  background-color: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

#message.error {
  display: block;
  background-color: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.auth-page--forgot #message.pending {
  display: block;
  border: 1px solid var(--line);
  background: var(--brand-soft);
  color: var(--muted);
}

.auth-page--reset #message.pending {
  display: block;
  border: 1px solid var(--line);
  background: var(--brand-soft);
  color: var(--muted);
}

.auth-page--forgot .submit button,
.auth-page--reset .submit button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
}

.auth-page--forgot .submit button:disabled,
.auth-page--reset .submit button:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.reset-button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: reset-button-spin 0.7s linear infinite;
}

.auth-page--forgot .submit button.is-sending .reset-button-spinner,
.auth-page--reset .submit button.is-sending .reset-button-spinner {
  display: inline-block;
}

.auth-page--reset .password-wrap input {
  padding-right: 48px;
}

.auth-page--reset .toggle {
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.auth-page--reset .toggle:hover,
.auth-page--reset .toggle:focus-visible {
  background: var(--brand-soft);
}

.auth-page--reset .toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.auth-page--reset .reset-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  margin-top: 16px;
  border-radius: 8px;
  background: #30274b;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-page--reset .reset-login-link:hover {
  background: #44375f;
}

.auth-page--reset .reset-login-link[hidden] {
  display: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .reset-button-spinner { animation: none; border-right-color: currentColor; }
}

.error-email,
.error-name,
.error-password {
  font-size: 0.76rem;
  margin-top: 5px;
  color: var(--error);
}

.submit {
  width: 100%;
  padding: 18px 0 8px;
}

.submit button {
  position: relative;
  width: 100%;
  padding: 13px 10px;
  border: none;
  outline: none;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(121, 110, 167, 0.32);
  transition: transform 0.2s ease;
  /* color: #30274B; */
}

.submit button.auth-click {
  background: rgba(121, 110, 167, 0.65);
  animation: clickEffect 0.28s ease;
  -webkit-animation: clickEffect 0.28s ease;
}
@keyframes clickEffect {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(2px);
  }
  100% {
    transform: translateY(0);
  }
}

.submit button:hover {
  transform: translateY(-1px);
}

.forget-pswd {
  font-size: 0.78rem;
  font-weight: 600;
  padding-top: 7px;
}

.no-account {
  text-align: center;
  font-size: 0.8rem;
  padding-top: 8px;
  color: var(--muted);
}

.no-account a,
.forget-pswd a {
  text-decoration: none;
  color: var(--brand-strong);
  font-weight: 700;
}

@media (max-width: 960px) {
  .auth-grid,
  .auth-grid--single {
    grid-template-columns: 1fr;
  }

  .auth-side {
    padding: 24px 18px;
  }

  .auth-side h1 {
    font-size: 1.7rem;
  }
}

@media (max-width: 520px) {
  .auth-shell {
    padding: 14px 12px 24px;
  }

  .auth-header {
    margin-bottom: 12px;
  }

  .auth-link {
    font-size: 0.82rem;
  }

  .auth-card {
    border-radius: 18px;
    padding: 16px 14px;
  }

  .auth-form-head h2 {
    font-size: 1.2rem;
  }

  .input-box input {
    padding: 11px 10px;
  }

  .label {
    font-size: 0.82rem;
  }

  .submit button {
    padding: 12px 10px;
    font-size: 0.92rem;
  }

  .no-account,
  .forget-pswd {
    font-size: 0.76rem;
  }

  #message {
    font-size: 0.79rem;
  }
}

/* Focused authentication experience for Quizzora's login and sign-up flows. */
body.auth-page.auth-page--login,
body.auth-page.auth-page--signup {
  min-height: 100dvh;
  background: #f7f8fa;
}

.auth-page--login .auth-shell,
.auth-page--signup .auth-shell {
  display: flex;
  flex-direction: column;
  width: min(1100px, 100%);
  min-height: 100dvh;
  padding: 26px 24px 34px;
}

.auth-page--login .auth-header,
.auth-page--signup .auth-header {
  min-height: 42px;
  margin: 0;
  padding: 0 4px;
}

.auth-page--login .brand img,
.auth-page--signup .brand img {
  width: 116px;
  height: auto;
}

.auth-header-action {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #667085;
  font-size: 0.82rem;
}

.auth-page--login .auth-link,
.auth-page--signup .auth-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 650;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.auth-page--login .auth-link:hover,
.auth-page--signup .auth-link:hover {
  border-color: #9f95c3;
  background: #f8f6ff;
  color: #554c79;
}

.auth-page--login .auth-grid,
.auth-page--signup .auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 452px);
  flex: 1;
  align-items: center;
  gap: clamp(54px, 10vw, 142px);
  padding: 56px 48px 68px;
}

.auth-page--login .auth-side,
.auth-page--signup .auth-side {
  max-width: 460px;
  overflow: visible;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.auth-page--login .auth-side::before,
.auth-page--login .auth-side::after,
.auth-page--signup .auth-side::before,
.auth-page--signup .auth-side::after {
  display: none;
}

.auth-page--login .auth-side .eyebrow,
.auth-page--signup .auth-side .eyebrow {
  color: #08775e;
  font-size: 0.73rem;
  font-weight: 750;
}

.auth-page--login .auth-side h1,
.auth-page--signup .auth-side h1 {
  margin-top: 14px;
  color: #1d2939;
  font-size: clamp(2.1rem, 3.5vw, 3.05rem);
  font-weight: 750;
  line-height: 1.1;
}

.auth-page--login .auth-side > p:not(.eyebrow),
.auth-page--signup .auth-side > p:not(.eyebrow) {
  margin-top: 18px;
  color: #667085;
  font-size: 0.96rem;
  line-height: 1.72;
}

.auth-page--login .auth-card,
.auth-page--signup .auth-card {
  width: 100%;
  justify-self: end;
  padding: 34px 32px 30px;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

.auth-page--login .auth-card {
  min-height: 442px;
  display: flex;
  align-items: center;
}

.auth-page--login .device-verification-card {
  min-height: 0;
  display: block;
}

.auth-page--login .auth-form-head h2,
.auth-page--signup .auth-form-head h2 {
  color: #1d2939;
  font-family: "Space Grotesk", "Poppins", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.auth-page--login .auth-form-head p,
.auth-page--signup .auth-form-head p {
  margin-top: 7px;
  color: #667085;
  font-size: 0.87rem;
}

.auth-page--login .input-box,
.auth-page--signup .input-box {
  margin-top: 22px;
}

.auth-page--login .field,
.auth-page--signup .field {
  margin-top: 16px;
}

.auth-page--login .label,
.auth-page--signup .label {
  margin-bottom: 7px;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 650;
}

.auth-page--login .input-box input,
.auth-page--signup .input-box input {
  min-height: 46px;
  padding: 11px 12px;
  border-color: #cfd6df;
  border-radius: 8px;
  color: #1d2939;
  font-size: 0.9rem;
}

.auth-page--login .input-box input::placeholder,
.auth-page--signup .input-box input::placeholder {
  color: #98a2b3;
}

.auth-page--login .input-box input:focus,
.auth-page--signup .input-box input:focus {
  border-color: #756ca0;
  box-shadow: 0 0 0 3px rgba(117, 108, 160, 0.14);
}

.auth-page--login .password-wrapper .password-toggle,
.auth-page--signup .password-wrapper i {
  color: #667085;
}

.auth-page--login .forget-pswd,
.auth-page--signup .forget-pswd {
  padding-top: 8px;
}

.auth-page--login .no-account a,
.auth-page--login .forget-pswd a,
.auth-page--signup .no-account a,
.auth-page--signup .forget-pswd a {
  color: #554c79;
}

.auth-page--login .submit,
.auth-page--signup .submit {
  padding: 24px 0 9px;
}

.auth-page--login .submit button,
.auth-page--signup .submit button {
  min-height: 46px;
  padding: 11px 12px;
  border-radius: 8px;
  background: #30274b;
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 650;
}

.auth-page--login .submit button:hover,
.auth-page--signup .submit button:hover {
  background: #44375f;
  transform: translateY(-1px);
}

.auth-page--login .submit button:disabled,
.auth-page--signup .submit button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.auth-page--login .no-account,
.auth-page--signup .no-account {
  color: #667085;
  font-size: 0.8rem;
}

.auth-page--login .auth-redirect-note,
.auth-page--signup .auth-redirect-note {
  margin-top: 18px;
  padding: 11px 12px;
  border-color: #d8d1ed;
  border-radius: 8px;
  background: #faf9fe;
}

.auth-page--login .auth-redirect-note span,
.auth-page--signup .auth-redirect-note span {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 7px;
  background: #756ca0;
}

.auth-google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  padding: 10px 16px;
  border: 1px solid #cfd6df;
  border-radius: 8px;
  color: #283345;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.auth-google-button:hover,
.auth-google-button:focus-visible {
  border-color: #9e95bf;
  background: #faf9fe;
  box-shadow: 0 0 0 3px rgba(117, 108, 160, 0.12);
  outline: none;
}

.auth-google-button img { flex: none; width: 20px; height: 20px; object-fit: contain; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: #788294;
  font-size: 0.73rem;
  white-space: nowrap;
}

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

.auth-page--google-complete .auth-card { max-width: 452px; }
.auth-page--google-complete .auth-form-head strong { color: #344054; font-weight: 650; overflow-wrap: anywhere; }
.auth-google-note { color: #667085; font-size: 0.76rem; line-height: 1.55; text-align: center; }

@media (max-width: 820px) {
  .auth-page--login .auth-shell,
  .auth-page--signup .auth-shell {
    padding: 20px 18px 32px;
  }

  .auth-page--login .auth-grid,
  .auth-page--signup .auth-grid {
    display: block;
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
    padding: 52px 0 42px;
  }

  .auth-page--login .auth-side,
  .auth-page--signup .auth-side {
    display: none;
  }

  .auth-page--login .auth-card,
  .auth-page--signup .auth-card {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .auth-page--login .auth-card {
    min-height: 0;
    display: block;
  }
}

@media (max-width: 520px) {
  .auth-page--login .auth-shell,
  .auth-page--signup .auth-shell {
    padding: 16px 16px 26px;
  }

  .auth-header-action > span {
    display: none;
  }

  .auth-page--login .auth-grid,
  .auth-page--signup .auth-grid {
    padding-top: 38px;
  }

  .auth-page--login .auth-card,
  .auth-page--signup .auth-card {
    padding: 27px 20px 24px;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.07);
  }

  .auth-page--login .auth-form-head h2,
  .auth-page--signup .auth-form-head h2 {
    font-size: 1.35rem;
  }

  .auth-google-button { margin-top: 20px; }
}
