/* Base styles; the map UI ships its own layer in build step 5. */
:root {
  --navy: #1f3a56;
  --teal: #3a8b94;
  --coral: #d74e5c;
  --bg: #f6f8fa;
  --ink: #1c2733;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.auth-card {
  /* min() rather than a breakpoint: identical to max-width:22rem at viewports
     >=384px, and below that it keeps a 1rem gutter instead of the 4px a 360px
     phone was left with (and 0px at 320px, which clipped the shadow). */
  width: min(22rem, 100% - 2rem);
  margin: 12vh auto 2rem;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(31, 58, 86, 0.12);
}
.auth-logo { height: 48px; width: auto; display: block; margin-bottom: 0.75rem; }
.auth-card h1 { margin: 0 0 0.25rem; font-size: 1.3rem; color: var(--navy); }
.auth-sub { margin: 0 0 1.25rem; color: #5a6b7b; font-size: 0.9rem; }
.auth-error { color: var(--coral); font-size: 0.85rem; }
.auth-card label { display: block; margin: 0.9rem 0 0.3rem; font-size: 0.85rem; font-weight: 600; }
.auth-card input {
  width: 100%;
  padding: 0.7rem 0.75rem;
  min-height: 44px;
  border: 1px solid #cdd7e0;
  border-radius: 8px;
  font-size: 16px;   /* >=16px stops iOS zooming the page on focus (cf. map.css) */
}
.auth-card input:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.auth-card button {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.65rem;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.auth-card button:hover { background: #2a4d70; }

/* The OTP page stacks two full-width buttons; the resend one carries .secondary,
   which nothing styled — so it was navy-on-navy identical to "Log in", and a
   mis-tap threw away a code the user had just typed. Its disabled state was
   invisible too, because the explicit background overrode the UA's greying. */
.auth-card button.secondary { background: #fff; color: var(--navy); border: 1px solid #cdd7e0; }
.auth-card button.secondary:hover { background: #f1f5f9; }
.auth-card button:disabled { opacity: 0.55; cursor: default; }
.auth-card button:disabled:hover { background: var(--navy); }
.auth-card button.secondary:disabled:hover { background: #fff; }

/* Errors render as a <ul> on two pages but were only ever styled for colour, so
   they inherited the browser's 40px list indent. */
ul.auth-error { margin: 0 0 0.5rem; padding-left: 1.1rem; }

/* ---------- Keyboard focus ---------- */
/* Mirrors map.css/report.css. Inputs keep the plain :focus rule above — a text
   field should show its ring on click too; buttons and links should not. */
.auth-card button:focus-visible,
.auth-card a:focus-visible {
  outline: 3px solid rgba(58, 139, 148, 0.55);
  outline-offset: 2px;
}
