/* ============================================================
   WalkSpy — auth screens (login / register / password reset)
   Self-contained. Everything is namespaced under .wauth so it
   never collides with the legacy signup, btn, or form-control
   rules in style.css. Fonts (Syne, IBM Plex Sans) come from the
   auth layout head.
   ============================================================ */

.wauth {
  --a-navy-1: #191c39;
  --a-navy-2: #0b0d1a;
  --a-teal:   #16acbe;
  --a-teal-2: #33c9d8;
  --a-amber:  #ff6a2b;
  --a-ink:    #14162d;
  --a-body:   #40454f;
  --a-muted:  #828a96;
  --a-line:   #e6e9ee;
  --a-field:  #f4f6f8;
  --a-white:  #ffffff;
  --a-page:   #eceff3;

  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  background: var(--a-page);
  color: var(--a-ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Stage: the dark "map" panel ---------- */
.wauth__stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 38px 46px 44px;
  color: #eaf7f9;
  background:
    radial-gradient(130% 90% at 82% 8%, rgba(22, 172, 190, 0.22), transparent 58%),
    linear-gradient(158deg, var(--a-navy-1), var(--a-navy-2));
}

/* faint street grid, faded toward the edges */
.wauth__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 100% at 62% 42%, #000 52%, transparent 100%);
          mask-image: radial-gradient(120% 100% at 62% 42%, #000 52%, transparent 100%);
}
.wauth__stage > * { position: relative; z-index: 1; }

.wauth__stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wauth__mark {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}
.wauth__mark .dot { color: var(--a-teal); }

.wauth__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c3ecf1;
}
.wauth__live b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--a-amber);
  box-shadow: 0 0 0 0 rgba(255, 106, 43, 0.55);
  animation: wauth-pulse 2s infinite;
}

/* the route map fills the middle of the stage */
.wauth__map {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}
.wauth__map svg { width: 100%; max-width: 340px; height: auto; }

.wauth__route {
  fill: none;
  stroke: var(--a-teal);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(22, 172, 190, 0.55));
  stroke-dasharray: 720;
  stroke-dashoffset: 720;
  animation: wauth-draw 3s cubic-bezier(0.65, 0, 0.35, 1) 0.25s forwards;
}
.wauth__waypoint { fill: var(--a-navy-2); stroke: var(--a-teal); stroke-width: 3; }
.wauth__start    { fill: none; stroke: #6b7891; stroke-width: 3; }
.wauth__walker   { fill: var(--a-amber); }
.wauth__walker-ring {
  fill: none;
  stroke: var(--a-amber);
  stroke-width: 2;
  transform-origin: 340px 60px;
  animation: wauth-ring 2s ease-out infinite;
}

.wauth__copy { max-width: 26ch; margin-top: 8px; }
.wauth__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--a-teal-2);
  margin: 0 0 12px;
}
.wauth__headline {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(25px, 2.6vw, 36px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 12px;
}
.wauth__sub {
  font-size: 15px;
  line-height: 1.6;
  color: #a7b1c2;
  margin: 0;
}

/* ---------- Form panel ---------- */
.wauth__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 30px;
  background: var(--a-white);
}
.wauth__card { width: 100%; max-width: 400px; }

.wauth__mark--dark { color: var(--a-ink); margin-bottom: 30px; display: inline-block; }
.wauth__mark--dark .dot { color: var(--a-teal); }

.wauth__title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--a-ink);
}
.wauth__lead { font-size: 15px; color: var(--a-muted); margin: 0 0 26px; }
.wauth__lead a { color: var(--a-teal); font-weight: 600; text-decoration: none; }
.wauth__lead a:hover { text-decoration: underline; }

.wauth__notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #e9f7f9;
  border: 1px solid #bfe6ec;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #0e6b78;
  margin: 0 0 22px;
}
.wauth__notice svg { flex: none; margin-top: 1px; }

.wauth__field { margin-bottom: 16px; }
.wauth__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--a-ink);
  margin-bottom: 7px;
}
.wauth__input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--a-ink);
  background: var(--a-field);
  border: 1.5px solid transparent;
  border-radius: 11px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.wauth__input::placeholder { color: #aab2bd; }
.wauth__input:hover { background: #eef1f4; }
.wauth__input:focus {
  outline: none;
  background: var(--a-white);
  border-color: var(--a-teal);
  box-shadow: 0 0 0 4px rgba(22, 172, 190, 0.15);
}
.wauth__input.is-invalid { border-color: #e0524b; background: #fdf3f3; }

/* show/hide password toggle (injected by auth.js) */
.wauth__pw { position: relative; display: block; }
.wauth__pw .wauth__input { padding-right: 48px; }
.wauth__pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #97a0ac;
  cursor: pointer;
  border-radius: 9px;
  transition: color 0.15s, background 0.15s;
}
.wauth__pw-toggle:hover { color: var(--a-teal); background: #eef1f4; }
.wauth__pw-toggle:focus-visible { outline: 2px solid var(--a-teal); outline-offset: 1px; }

.wauth .errorMsg {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  font-style: normal;
  color: #d6453d;
}

.wauth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 22px;
}
.wauth__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--a-body);
  cursor: pointer;
  user-select: none;
}
.wauth__check input { width: 17px; height: 17px; accent-color: var(--a-teal); }
.wauth__link { font-size: 13.5px; color: var(--a-teal); font-weight: 600; text-decoration: none; }
.wauth__link:hover { text-decoration: underline; }

.wauth__consent {
  list-style: none;
  margin: 2px 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wauth__consent li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--a-body);
}
.wauth__consent input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--a-teal); }
.wauth__consent a { color: var(--a-teal); font-weight: 600; text-decoration: none; }
.wauth__consent .errorMsg { grid-column: 1 / -1; }

.wauth__btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--a-teal), #0f8fa0);
  box-shadow: 0 8px 20px rgba(22, 172, 190, 0.28);
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}
.wauth__btn:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(22, 172, 190, 0.36); }
.wauth__btn:active { transform: translateY(1px); }
.wauth__btn:focus-visible { outline: 3px solid rgba(22, 172, 190, 0.5); outline-offset: 2px; }

.wauth__foot { margin-top: 26px; font-size: 12.5px; color: var(--a-muted); }
.wauth__foot a { color: var(--a-muted); text-decoration: none; }
.wauth__foot a:hover { text-decoration: underline; color: var(--a-ink); }

/* ---------- Animations ---------- */
@keyframes wauth-draw { to { stroke-dashoffset: 0; } }
@keyframes wauth-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 106, 43, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(255, 106, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 106, 43, 0); }
}
@keyframes wauth-ring {
  0%   { transform: scale(0.55); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .wauth { display: block; min-height: 0; }
  .wauth__stage { padding: 26px 24px 26px; }
  .wauth__map { padding: 4px 0; }
  .wauth__map svg { max-width: 190px; }
  .wauth__copy { max-width: none; }
  .wauth__headline { font-size: 24px; }
  .wauth__sub { display: none; }
  .wauth__panel { padding: 34px 22px 44px; }
  .wauth__mark--dark { margin-bottom: 22px; }
}
@media (max-width: 900px) and (min-height: 720px) {
  .wauth__sub { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .wauth__route { animation: none; stroke-dashoffset: 0; }
  .wauth__live b { animation: none; }
  .wauth__walker-ring { animation: none; opacity: 0.35; }
  .wauth__btn { transition: none; }
}
