@font-face {
  font-family: "Manrope";
  src: url("/auth-assets/fonts/manrope-variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

.auth-page {
  margin: 0;
  color-scheme: dark;
  color: #f3f7f4;
  background: #111917;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  line-height: 1.625;
  font-synthesis: none;
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-page h1, .auth-page p { margin: 0; }
.auth-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background: radial-gradient(ellipse at 50% 30%, rgb(181 232 200 / 8%), transparent 58%);
}
.auth-panel {
  width: 100%;
  max-width: 480px;
  padding: 40px;
  border: 1px solid rgb(182 199 191 / 35%);
  border-radius: 32px;
  background: rgb(32 58 50 / 82%);
  box-shadow: 0 24px 64px rgb(0 0 0 / 20%), inset 0 1px 0 rgb(243 247 244 / 4%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.auth-heading { margin-bottom: 32px; }
.auth-heading h1 { font-size: 36px; line-height: 1.2; font-weight: 500; letter-spacing: -1px; overflow-wrap: break-word; }
.auth-heading p { margin-top: 12px; color: #b6c7bf; }
.auth-form { display: flex; flex-direction: column; gap: 24px; }
.auth-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.auth-field label { font-size: 14px; line-height: 20px; font-weight: 600; }
.auth-field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #718b7f;
  border-radius: 12px;
  color: #f3f7f4;
  background: #15261f;
  font: inherit;
  line-height: 26px;
  transition: border-color 160ms ease-out;
}
.auth-field input:hover { border-color: #b6c7bf; }
.auth-field input:focus-visible { outline: 2px solid #b5e8c8; outline-offset: 3px; border-color: #b5e8c8; }
.auth-field input[aria-invalid="true"] { border-color: #f2b9b3; }
.password-control { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.password-toggle {
  min-height: 44px;
  padding: 8px 0 8px 12px;
  border: 0;
  border-radius: 6px;
  color: #b5e8c8;
  background: transparent;
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
  text-underline-offset: 4px;
}
.password-toggle:hover { text-decoration: underline; }
.password-toggle[hidden] { display: none; }
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 16px 24px;
  border: 0;
  border-radius: 14px;
  background: #b5e8c8;
  color: #111917;
  font: inherit;
  font-size: 14px;
  line-height: 24px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}
.auth-submit:hover { background: #d1f5dd; transform: translateY(-2px); }
.auth-submit:disabled { cursor: wait; transform: none; }
.auth-submit:focus-visible, .password-toggle:focus-visible { outline: 3px solid #f3f7f4; outline-offset: 4px; }
.auth-feedback { padding: 14px 16px; margin-bottom: 24px !important; border: 1px solid; border-radius: 12px; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.auth-error { color: #ffe1dc; background: #3b2926; border-color: #a86d65; }
.auth-error:focus { outline: 2px solid #f2b9b3; outline-offset: 3px; }
.auth-notice { color: #d1f5dd; background: #203a32; border-color: #718b7f; }
.auth-feedback .retry-note { margin-top: 8px; }
.field-error { color: #ffe1dc; font-size: 14px; line-height: 22px; }

/* Scoped authenticated-page addition: preserve its existing page styles. */
.session-actions { display: flex; align-items: center; gap: 24px; }
.session-actions form { margin: 0; }
.sign-out {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid #718b7f;
  border-radius: 10px;
  color: #b6c7bf;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
}
.sign-out:hover { color: #f3f7f4; border-color: #b5e8c8; }
.sign-out:focus-visible { outline: 3px solid #f3f7f4; outline-offset: 4px; }

@media (max-width: 760px) {
  .session-header { flex-wrap: wrap; }
  .session-actions { width: 100%; justify-content: space-between; }
}
@media (max-width: 480px) {
  .auth-shell { padding: 32px 24px; }
  .auth-panel { padding: 32px 24px; border-radius: 28px; }
  .auth-heading h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-submit, .auth-field input { transition: none; }
  .auth-submit:hover { transform: none; }
}
