:root {
  --auth-ink: #20313a;
  --auth-muted: #647680;
  --auth-paper: #ffffff;
  --auth-canvas: #f8f6ef;
  --auth-line: #d9e3e5;
  --auth-teal: #176b77;
  --auth-teal-dark: #0f5560;
  --auth-orange: #c96827;
  --auth-danger: #a9271f;
}

body.auth-page {
  display: grid;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
  height: auto;
  margin: 0;
  padding: 32px 16px;
  color: var(--auth-ink);
  background-color: var(--auth-canvas);
  background-image: none;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-align: left;
}

body.auth-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: url('../../assets/sunshinesnoutsBG.png') center / cover no-repeat;
  opacity: 0.08;
}

.auth-page .login-container,
.auth-page .register-container,
.auth-page .form-container,
.auth-page > .container {
  width: min(100%, 470px);
  max-width: 470px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 40px);
  color: var(--auth-ink);
  background: var(--auth-paper);
  border: 1px solid var(--auth-line);
  border-radius: 24px;
  box-shadow: 0 22px 65px rgba(32, 49, 58, 0.14);
  text-align: left;
}

.auth-page .register-container {
  width: min(100%, 560px);
  max-width: 560px;
}

.auth-page .logo-placeholder {
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  margin: 0 auto 22px;
  padding: 8px;
  background: #fffaf1;
  border: 1px solid #f2dfc4;
  border-radius: 50%;
}

.auth-page .logo-placeholder .logo-img {
  display: block;
  width: 96px;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.auth-page h1,
.auth-page .header h1 {
  margin: 0;
  color: var(--auth-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 6vw, 2.45rem);
  line-height: 1.1;
  text-align: center;
}

.auth-page .header {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  text-align: center;
}

.auth-page .header p,
.auth-page .auth-intro {
  margin: 10px auto 24px;
  color: var(--auth-muted);
  font-size: 0.96rem;
  text-align: center;
}

.auth-page form {
  margin-top: 22px;
}

.auth-page form label,
.auth-page .form-group label {
  display: block;
  margin: 0 0 7px;
  color: #344851;
  font-weight: 750;
}

.auth-page form label span {
  float: right;
  color: var(--auth-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.auth-page form input,
.auth-page .form-group input[type="text"],
.auth-page .form-group input[type="email"],
.auth-page .form-group input[type="password"] {
  width: 100%;
  min-height: 49px;
  margin: 0 0 17px;
  padding: 11px 13px;
  color: var(--auth-ink);
  background: #fff;
  border: 1px solid #bdcbd0;
  border-radius: 10px;
  font: inherit;
}

.auth-page form input[readonly] {
  color: #52656e;
  background: #f0f3f3;
}

.auth-page form input:focus {
  border-color: var(--auth-teal);
  box-shadow: 0 0 0 4px rgba(23, 107, 119, 0.12);
  outline: none;
}

.auth-page button[type="submit"] {
  width: 100%;
  min-height: 50px;
  margin: 6px 0 0;
  padding: 12px 18px;
  color: #fff !important;
  background: var(--auth-orange);
  border: 1px solid var(--auth-orange);
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.auth-page button[type="submit"]:hover {
  color: #fff !important;
  background: #a65018;
  transform: translateY(-1px);
}

.auth-page input:focus-visible,
.auth-page button:focus-visible,
.auth-page a:focus-visible {
  outline: 3px solid rgba(201, 104, 39, 0.38);
  outline-offset: 2px;
}

.auth-page .error,
.auth-page .success {
  margin: 18px 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
}

.auth-page .error {
  color: #84261f;
  background: #fff0ee;
  border: 1px solid #f1c1bb;
}

.auth-page .success {
  color: #175f3a;
  background: #ebf8f0;
  border: 1px solid #bde1ca;
}

.auth-page .links-section,
.auth-page .login-link,
.auth-page .back-link-container,
.auth-page .auth-footer-link {
  margin-top: 22px;
  color: var(--auth-muted);
  font-size: 0.92rem;
  text-align: center;
}

.auth-page .links-section p,
.auth-page .links-section div,
.auth-page .login-link p {
  margin: 8px 0;
}

.auth-page .links-section a,
.auth-page .login-link a,
.auth-page .back-link-container a,
.auth-page .auth-footer-link a {
  color: var(--auth-teal);
  font-weight: 750;
  text-decoration: none;
}

.auth-page .links-section a:hover,
.auth-page .login-link a:hover,
.auth-page .back-link-container a:hover,
.auth-page .auth-footer-link a:hover {
  color: var(--auth-teal-dark);
  text-decoration: underline;
}

@media (max-width: 520px) {
  body.auth-page {
    align-items: start;
    padding: 14px 10px;
  }

  .auth-page .login-container,
  .auth-page .register-container,
  .auth-page .form-container,
  .auth-page > .container {
    padding: 26px 18px;
    border-radius: 20px;
  }

  .auth-page .logo-placeholder {
    width: 92px;
    height: 92px;
  }

  .auth-page .logo-placeholder .logo-img {
    width: 76px;
  }

  .auth-page form label span {
    display: block;
    float: none;
    margin-top: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *,
  .auth-page *::before,
  .auth-page *::after {
    transition-duration: 0.01ms !important;
  }
}
