.gw-auth-screen {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #f7f8fa;
  color: #292d32;
  letter-spacing: 0;
}

.gw-auth-screen *,
.gw-auth-screen *::before,
.gw-auth-screen *::after {
  box-sizing: border-box;
}

.gw-auth-screen > main { flex: 1; }

.gw-auth-content {
  width: min(100%, 440px);
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top, 0px)) 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.gw-auth-logo {
  display: block;
  width: 220px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 8px;
  user-select: none;
  -webkit-user-drag: none;
}

.gw-auth-screen .gw-title {
  margin: 0;
  color: #292d32;
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.gw-subtitle {
  margin: -12px 0 0;
  color: #62686f;
  font-size: 0.9375rem;
  line-height: 1.65;
  text-align: center;
  overflow-wrap: anywhere;
}

.gw-fields { display: grid; gap: 20px; }
.gw-field { display: grid; gap: 8px; min-width: 0; }
.gw-field label { color: #454b52; font-size: 0.875rem; font-weight: 550; }

.gw-auth-screen .gw-field input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid #d9dde1;
  border-radius: 8px;
  background: #fff;
  color: #292d32;
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: 0 2px 3px rgb(25 32 40 / 2%);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.gw-auth-screen .gw-field input::placeholder { color: #8a9097; }
.gw-auth-screen .gw-field input:focus {
  border-color: #777f88;
  outline: none;
  box-shadow: 0 0 0 3px rgb(82 92 104 / 12%);
}
.gw-auth-screen .gw-field input[aria-invalid="true"] { border-color: #bc5555; }

.gw-auth-screen .gw-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #525252;
  color: #fff;
  font-size: 0.9375rem;
  line-height: 1.5;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.gw-auth-screen .gw-submit:hover { background: #3a3a3a; }
.gw-auth-screen .gw-submit:active { transform: translateY(1px); }
.gw-auth-screen .gw-secondary {
  border-color: #d9dde1;
  background: #fff;
  color: #454b52;
  box-shadow: 0 2px 4px rgb(25 32 40 / 3%);
}
.gw-auth-screen .gw-secondary:hover { background: #f0f2f4; }
.gw-register-action { padding-top: 20px; border-top: 1px solid #e1e4e8; }
.gw-forgot { justify-self: end; margin-top: -8px; }
.gw-text-link, .gw-link a { color: #5d646d; font-size: 0.875rem; text-underline-offset: 4px; }
.gw-text-link:hover, .gw-link a:hover { color: #292d32; text-decoration: underline; }
.gw-link { margin: 0; text-align: center; }
.gw-error { color: #a93232; font-size: 0.875rem; line-height: 1.5; overflow-wrap: anywhere; }
.gw-error ul { margin: 0; padding: 0; list-style: none; }
.gw-error-summary { padding: 12px 14px; border: 1px solid #edcece; border-radius: 8px; background: #fff5f5; }
.gw-status { padding: 12px 14px; border: 1px solid #c7dfd4; border-radius: 8px; background: #f0f8f4; color: #34644e; font-size: 0.875rem; overflow-wrap: anywhere; }

.gw-auth-screen :is(a, button):focus-visible {
  outline: 2px solid #525e6c;
  outline-offset: 5px;
}

.gw-footer {
  position: relative;
  z-index: 110;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  color: #6b7179;
  font-size: 0.8125rem;
}
.gw-footer a { padding: 8px 12px; color: inherit; text-decoration: none; border-radius: 6px; }
.gw-footer a:hover { color: #292d32; background: #eceef1; }
.gw-footer .gw-sep { width: 1px; height: 12px; background: #d8dce1; }

@media (max-height: 700px) {
  .gw-auth-content { gap: 20px; padding-top: max(20px, env(safe-area-inset-top, 0px)); }
  .gw-auth-logo { width: 168px; margin-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .gw-auth-screen *, .gw-auth-screen *::before, .gw-auth-screen *::after { transition: none !important; }
}
