:root {
  color-scheme: light;
  --auth-ink: #19372d;
  --auth-muted: #687a72;
  --auth-green: #176b50;
  --auth-green-hover: #10563f;
  --auth-border: #dce6e0;
  --auth-paper: #f4f7f4;
}

* {
  box-sizing: border-box;
}

body.auth-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--auth-ink);
  background: var(--auth-paper);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  align-content: center;
  justify-items: center;
  padding: 36px 20px 24px;
}

.auth-panel {
  width: min(100%, 520px);
  padding: 38px 44px 42px;
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgb(25 55 45 / 7%);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: 0 auto 26px;
  color: var(--auth-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  text-decoration: none;
}

.auth-brand img {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
}

.auth-brand strong {
  color: var(--auth-green);
}

.auth-heading {
  margin-bottom: 28px;
  text-align: center;
}

.auth-kicker {
  margin: 0 0 9px;
  color: var(--auth-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.auth-heading h1 {
  margin: 0;
  color: var(--auth-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 5vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
}

.auth-form {
  display: grid;
  gap: 19px;
}

.auth-validation:empty,
.auth-field-error:empty {
  display: none;
}

.auth-validation,
.auth-field-error {
  color: #a32929;
  font-size: 0.875rem;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label {
  color: var(--auth-ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid #cbd8d0;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--auth-ink);
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.auth-field input::placeholder {
  color: #98a69f;
}

.auth-field input:focus {
  border-color: var(--auth-green);
  box-shadow: 0 0 0 3px rgb(23 107 80 / 14%);
}

.auth-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
  font-size: 0.9rem;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--auth-muted);
  cursor: pointer;
}

.auth-remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--auth-green);
}

.auth-options a {
  color: var(--auth-green);
  font-weight: 600;
  text-decoration: none;
}

.auth-options a:hover {
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 3px;
  border: 1px solid var(--auth-green);
  border-radius: 9px;
  background: var(--auth-green);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.auth-submit:hover {
  border-color: var(--auth-green-hover);
  background: var(--auth-green-hover);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-caption {
  margin: 18px 0 0;
  color: var(--auth-muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 520px) {
  .auth-shell {
    padding: 18px 14px;
  }

  .auth-panel {
    padding: 30px 22px 28px;
    border-radius: 13px;
  }

  .auth-brand {
    margin-bottom: 23px;
  }

  .auth-options {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}