/* Auth pages — login vs register must read differently */

.auth-page {
  margin: 0;
  min-height: 100dvh;
  color: #1a2b4a;
}
.auth-scene {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
}
.auth-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.auth-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.auth-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(247, 244, 239, 0.82) 0%, rgba(247, 244, 239, 0.45) 42%, rgba(247, 244, 239, 0.08) 68%, transparent 82%),
    linear-gradient(180deg, rgba(18, 28, 40, 0.18) 0%, transparent 30%, rgba(18, 28, 40, 0.28) 100%);
}
.auth-veil--register {
  background:
    linear-gradient(245deg, rgba(247, 244, 239, 0.86) 0%, rgba(247, 244, 239, 0.5) 40%, rgba(247, 244, 239, 0.1) 66%, transparent 82%),
    linear-gradient(180deg, rgba(18, 28, 40, 0.16) 0%, transparent 28%, rgba(18, 28, 40, 0.3) 100%);
}
.auth-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding:
    max(14px, env(safe-area-inset-top, 0px))
    max(18px, env(safe-area-inset-right, 0px))
    0
    max(18px, env(safe-area-inset-left, 0px));
}
.auth-brand {
  font-family: "Noto Serif TC", serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a2b4a;
  text-decoration: none;
}
.auth-link {
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  color: #1a2b4a;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 10px 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font: inherit;
  cursor: pointer;
}
.auth-eyebrow {
  margin: 0 0 8px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: #1a2b4a;
  border-radius: 999px;
  padding: 6px 12px;
}
.auth-page--register .auth-eyebrow {
  background: #2f5d4a;
}
.auth-dock {
  position: absolute;
  z-index: 3;
  left: max(18px, env(safe-area-inset-left, 0px));
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
  top: auto;
  max-width: 26rem;
}
.auth-dock h1 {
  font-family: "Noto Serif TC", serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin: 0 0 8px;
  color: #1a2b4a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.auth-lead {
  margin: 0 0 16px;
  color: #243656;
  line-height: 1.55;
}
.auth-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 48px rgba(18, 28, 40, 0.18);
}
.auth-card--register {
  border-top: 4px solid #2f5d4a;
}
.auth-page--login .auth-card {
  border-top: 4px solid #1a2b4a;
}
.auth-card label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #1a2b4a;
}
.auth-card label + input { margin-bottom: 12px; }
.auth-card input {
  width: 100%;
  border: 1px solid rgba(26, 43, 74, 0.16);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: #1a2b4a;
}
.auth-card input:focus {
  outline: none;
  border-color: #1a2b4a;
  box-shadow: 0 0 0 3px rgba(26, 43, 74, 0.12);
}
.auth-card button.primary {
  width: 100%;
  margin-top: 6px;
  background: #1a2b4a;
  color: #fff;
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
}
.auth-page--register .auth-card button.primary {
  background: #2f5d4a;
}
.auth-card button.primary:hover { filter: brightness(0.92); }
.auth-switch {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: #5c6b7a;
}
.auth-switch a {
  color: #1a2b4a;
  font-weight: 700;
  text-decoration: none;
}
.auth-card .status {
  margin-top: 10px;
  min-height: 1.2em;
  font-size: 14px;
  color: #5c6b7a;
}
.auth-card .status.error { color: #a12622; font-weight: 600; }
.auth-card .status.ok { color: #1f565c; font-weight: 600; }

.auth-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  margin: 0;
  padding: 14px 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, rgba(18, 28, 40, 0.55));
  color: rgba(247, 244, 239, 0.88);
  text-align: center;
  font-size: 12px;
}
.auth-footer .footer-copy { margin: 0 0 8px; }
.auth-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 14px;
}
.auth-footer a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

@media (min-width: 768px) {
  .auth-dock--login {
    left: max(48px, 7vw);
    right: auto;
    bottom: 14%;
    max-width: 28rem;
  }
  .auth-dock--register {
    left: auto;
    right: max(48px, 7vw);
    bottom: 14%;
    max-width: 28rem;
  }
}
