/* Atlas auth gate — muted “map under glass”; card stays the focus */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: #e8e4dc;
  background-image:
    radial-gradient(ellipse 90% 70% at 70% 60%, rgba(42, 74, 92, 0.09), transparent 55%),
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(61, 107, 90, 0.1), transparent 50%),
    linear-gradient(rgba(28, 27, 25, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 27, 25, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #f0ebe3 0%, #e4e0d6 45%, #dfe8e4 100%);
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
}
.auth-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 55% 50% at 50% 48%, transparent 0%, rgba(28, 27, 25, 0.18) 100%);
}
.auth-gate[hidden] { display: none !important; }

.auth-card {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 1.75rem 1.5rem 1.4rem;
  background: rgba(246, 243, 238, 0.97);
  border: 1px solid rgba(28, 27, 25, 0.14);
  box-shadow:
    0 4px 6px rgba(28, 27, 25, 0.04),
    0 20px 56px rgba(28, 27, 25, 0.14);
  backdrop-filter: blur(6px);
}

.auth-brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1.35rem;
  color: #1c1b19;
}
.auth-brand h1 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.55rem;
}
.auth-brand p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #5c574f;
  font-weight: 300;
}

.auth-social {
  display: grid;
  gap: 0.45rem;
}
.auth-btn {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.88rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(28, 27, 25, 0.14);
  background: #fff;
  color: #1c1b19;
  cursor: pointer;
  text-align: center;
  border-radius: 2px;
}
.auth-btn:hover { border-color: #2a4a5c; }
.auth-btn.primary {
  background: #2a4a5c;
  color: #f6f3ee;
  border-color: #2a4a5c;
  width: 100%;
  margin-top: 0.45rem;
}
.auth-btn.primary:hover { filter: brightness(1.05); }
.auth-otp {
  margin-top: 0.85rem;
}
#btnOtp {
  width: 100%;
  margin-top: 0.45rem;
}
#otpCode {
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0.85rem;
  color: #8a8680;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(28, 27, 25, 0.12);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5c574f;
}
.auth-field input {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(28, 27, 25, 0.14);
  background: #fff;
  color: #1c1b19;
  border-radius: 2px;
}

.auth-status {
  min-height: 1.2em;
  margin: 0.75rem 0 0.5rem;
  font-size: 0.8rem;
  color: #5c574f;
}
.auth-status.error { color: #9a4d2e; }

.auth-fine {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #8a8680;
  font-weight: 300;
}
.auth-fine a { color: #2a4a5c; }
.auth-fine.refund {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(28, 27, 25, 0.1);
  color: #5c574f;
}
.auth-fine code {
  font-size: 0.68rem;
  background: #efeae2;
  padding: 0.05rem 0.25rem;
}

/* Sign out only — separated from map toggles by border/gap in styles.css */
.map-toggles .user-bar {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  max-width: none;
}
.user-bar[hidden] { display: none !important; }

#atlasApp[hidden] { display: none !important; }
body.auth-locked #atlasApp { display: none !important; }
