.auth-main {
  min-height: calc(100vh - 64px);
}

.auth-section {
  padding: 64px 0;
}

.auth-container {
  display: flex;
  justify-content: center;
}

.auth-card {
  width: min(100%, 520px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-2);
  padding: 28px 22px;
}

.auth-card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.auth-card h1 {
  font-family: "Lora", serif;
  letter-spacing: -0.02em;
  font-size: 32px;
  line-height: 1.1;
}

.auth-subtitle {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-label {
  font-size: 14px;
  font-weight: 600;
}

.auth-input {
  height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}

.auth-input::placeholder {
  color: #94a3b8;
}

.auth-input:focus {
  outline: 2px solid rgba(52, 84, 209, 0.2);
  border-color: rgba(52, 84, 209, 0.55);
}

.auth-form-meta {
  margin-top: 2px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

.auth-checkbox input {
  width: 14px;
  height: 14px;
}

.auth-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

.auth-submit {
  margin-top: 6px;
  height: 44px;
  background: var(--primary);
  color: var(--bg);
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.auth-switch {
  margin-top: 20px;
  font-size: 14px;
  text-align: center;
  color: var(--text-soft);
}

.auth-switch a {
  color: var(--primary);
  font-weight: 700;
}

@media (min-width: 768px) {
  .auth-section {
    padding: 88px 0;
  }

  .auth-card {
    padding: 34px 30px;
  }
}

body.auth-login-page {
  background: #f9fafb;
}

body.auth-login-page .topbar,
body.auth-login-page .footer {
  display: none;
}

.login-main {
  min-height: 100vh;
}

.login-section {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.login-container {
  width: min(100%, 448px);
  display: grid;
  justify-items: center;
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 5px;
  object-fit: cover;
}

.login-container h1 {
  margin-top: 32px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.34;
  text-align: center;
}

.login-intro {
  margin-top: 14px;
  max-width: 390px;
  color: #6a7282;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.login-social-form {
  width: 100%;
  margin: 0;
}

.login-google-btn {
  margin: 40px auto 0 auto;
  width: 100%;
  height: 52px;
  border-radius: 10px;
  border: 1px solid #d1d5dc;
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

.login-google-btn > * {
  flex: 0 0 auto;
}

.login-google-btn img {
  width: 18px;
  height: 18px;
}

.login-google-label {
  white-space: nowrap;
  letter-spacing: 0;
}

.login-divider {
  margin-top: 24px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-divider span {
  flex: 1;
  height: 1px;
  background: #d1d5dc;
}

.login-divider strong {
  color: #6a7282;
  font-size: 14px;
  letter-spacing: 0.05em;
  font-weight: 400;
}

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

.login-input {
  width: 100%;
  height: 52px;
  border-radius: 10px;
  border: 1px solid #d1d5dc;
  padding: 0 16px;
  font-size: 15px;
  color: #000;
  background: #fff;
}

.login-input::placeholder {
  color: #99a1af;
}

.login-input:focus {
  outline: 2px solid rgba(52, 84, 209, 0.18);
  border-color: rgba(52, 84, 209, 0.45);
}

.login-password-tools {
  width: 100%;
  display: flex;
  align-items: center;
  padding-top: 5px;
}

.login-password-toggle {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

.login-password-toggle span {
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.login-password-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1a73e8;
  cursor: pointer;
}

.login-password-toggle:focus-within {
  outline: 2px solid rgba(26, 115, 232, 0.2);
  outline-offset: 2px;
  border-radius: 6px;
}

.login-submit {
  margin-top: 14px;
  height: 50px;
  border-radius: 10px;
  border: 0;
  background: rgb(52 84 209);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.login-terms {
  margin-top: 32px;
  max-width: 360px;
  color: #6a7282;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.login-terms a {
  color: inherit;
  text-decoration: none;
}

.login-switch {
  margin-top: 18px;
  color: #6a7282;
  font-size: 14px;
  text-align: center;
}

.login-switch a {
  color: var(--primary);
  font-weight: 600;
}

.password-reset-page .login-container--reset {
  width: min(100%, 460px);
}

.password-reset-page .login-container--reset .login-logo {
  margin-bottom: 2px;
}

.password-reset-page .login-container--reset h1 {
  margin-top: 24px;
}

.password-reset-page .login-container--reset .login-intro {
  margin-top: 12px;
  margin-bottom: 2px;
}

.password-reset-page .login-container--reset .login-form {
  margin-top: 30px;
  gap: 14px;
}

.password-reset-page .login-container--reset .auth-field-error {
  margin-top: -6px;
  margin-bottom: 2px;
}

.password-reset-page .login-container--reset .login-submit {
  margin-top: 8px;
}

.password-reset-page .login-container--reset .login-switch {
  margin-top: 24px;
}

.login-verify-copy {
  margin-top: 14px;
  max-width: 400px;
}

.otp-input-group {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.otp-digit {
  width: 100%;
  height: 52px;
  border-radius: 10px;
  border: 1px solid #d1d5dc;
  background: #fff;
  color: #000;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  font-family: "Inter", sans-serif;
}

.otp-digit:focus {
  outline: 2px solid rgba(52, 84, 209, 0.2);
  border-color: rgba(52, 84, 209, 0.55);
}

.login-actions {
  display: flex;
  margin-top: 14px;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-actions form {
  margin: 0;
}

.login-secondary-btn {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid #d1d5dc;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  padding: 0 16px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.login-secondary-btn:hover {
  border-color: #9aa4b2;
  background: #f9fafb;
}

.login-secondary-btn:focus-visible {
  outline: 2px solid rgba(52, 84, 209, 0.25);
  outline-offset: 1px;
}

.login-secondary-btn--resend,
.login-secondary-btn--cancel {
  border-color: transparent;
  background: transparent;
  padding-inline: 6px;
  box-shadow: none;
}

.login-secondary-btn--resend:hover,
.login-secondary-btn--cancel:hover {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.login-secondary-btn--resend:focus-visible,
.login-secondary-btn--cancel:focus-visible {
  outline-offset: 3px;
}

.login-secondary-btn--resend {
  color: var(--primary);
}

.login-secondary-btn--cancel {
  color: #b42318;
}

@media (max-width: 560px) {
  .otp-input-group {
    gap: 6px;
  }

  .otp-digit {
    height: 48px;
    font-size: 20px;
  }

  .login-actions {
    width: 100%;
  }
}

.login-extra-link {
  margin-top: 14px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  text-align: center;
}

.login-extra-link a {
  color: inherit;
}

.auth-errors {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.auth-errors p {
  margin: 0;
}

.auth-errors p + p {
  margin-top: 4px;
}

.auth-field-error {
  color: #b42318;
  font-size: 12px;
  line-height: 1.3;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .login-container h1 {
    font-size: 24px;
    line-height: 1.32;
  }

  .password-reset-page .login-container--reset .login-form {
    margin-top: 24px;
    gap: 12px;
  }
}
