:root {
  --auth-ink: #27352f;
  --auth-muted: #69746f;
  --auth-line: #dfe5e1;
  --auth-paper: #fffef9;
  --auth-accent: #52705e;
  --auth-wash: #f3f6f2;
}
.auth-shell {
  min-height: calc(100vh - 10rem);
  display: grid;
  place-items: center;
  padding: 2.5rem 1rem 4rem;
  background: radial-gradient(circle at 50% 0, #edf3ed 0, transparent 38%);
}
.auth-card {
  width: min(100%, 28rem);
  padding: 2rem;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  background: var(--auth-paper);
  box-shadow: 0 18px 45px rgba(39, 53, 47, 0.08);
}
.auth-shell-wide .auth-card {
  width: min(100%, 32rem);
}
.auth-heading {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-heading h1 {
  margin: 0.25rem 0 0.35rem;
  color: var(--auth-ink);
  font-size: 1.55rem;
  letter-spacing: 0.02em;
}
.auth-heading p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.auth-kicker {
  color: var(--auth-accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.28em;
}
.auth-form {
  display: grid;
  gap: 1rem;
}
.auth-field label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--auth-ink);
  font-weight: 650;
  font-size: 0.9rem;
}
.auth-field input {
  min-height: 44px;
  background: white;
  border-color: #cbd5cf;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 3rem !important;
}
.password-toggle {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 2.5rem;
  height: 2.5rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--auth-muted);
  border-radius: 50%;
  cursor: pointer;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--auth-wash);
  color: var(--auth-ink);
  outline: 2px solid var(--auth-accent);
}
.auth-action {
  display: flex;
  min-height: 44px;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--auth-accent);
  border-radius: 7px;
  background: var(--auth-accent);
  color: white;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.auth-action:hover {
  filter: brightness(0.93);
}
.auth-action-secondary {
  background: white;
  color: var(--auth-ink);
  border-color: var(--auth-line);
}
.auth-methods {
  display: grid;
  gap: 0.65rem;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #8a938f;
  font-size: 0.78rem;
}
.auth-divider:before,
.auth-divider:after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--auth-line);
}
.google-mark {
  font:
    800 1rem Georgia,
    serif;
  color: #3c6dcf;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  font-size: 0.88rem;
}
.auth-links-centered {
  justify-content: center;
}
.auth-links a,
.auth-text-button {
  color: var(--auth-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-error,
.auth-form .errorlist {
  padding: 0.65rem;
  border: 1px solid #e2aaa6;
  border-radius: 6px;
  background: #fff2f0;
  color: #9b3029;
  font-size: 0.85rem;
}
.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem;
  border-radius: 8px;
  background: var(--auth-wash);
  color: var(--auth-ink);
  font-size: 0.86rem;
  line-height: 1.45;
  cursor: pointer;
}
.auth-consent input {
  width: 1.15rem;
  min-height: 1.15rem;
  margin-top: 0.1rem;
  flex: 0 0 auto;
}
.auth-text-button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.otp-field input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.45em;
  font-variant-numeric: tabular-nums;
}
.auth-dialog {
  width: min(90vw, 48rem);
  max-height: 80vh;
  padding: 0;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.24);
}
.auth-dialog::backdrop {
  background: rgba(24, 34, 29, 0.48);
}
.auth-dialog-close {
  position: sticky;
  float: right;
  top: 0.7rem;
  right: 0.7rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: var(--auth-ink);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}
.auth-dialog-content {
  padding: 2.5rem 2rem 2rem;
  line-height: 1.65;
}
@media (max-width: 520px) {
  .auth-shell {
    padding: 1rem 0.75rem 3rem;
    place-items: start center;
  }
  .auth-card {
    padding: 1.35rem;
    border-radius: 10px;
  }
  .auth-links {
    flex-direction: column;
    align-items: center;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .auth-card {
    animation: auth-rise 0.35s ease-out both;
  }
  @keyframes auth-rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
