/**
 * auth.css — shared visual system for the public auth pages (login, forgot,
 * reset). Mirrors register.astro's dark "device enrolment" card look so the
 * whole unauthenticated auth flow (Touch ID + email/password) reads as one
 * product, without duplicating the same ~150 lines of CSS into three pages.
 */

@import url('https://fonts.googleapis.com/css2?family=Questrial&display=swap');

:root {
  --auth-font: 'Questrial', 'Century Gothic', 'Futura', 'Gill Sans', sans-serif;
  --auth-navy: #1a1a2e;
  --auth-accent: #e94560;
  --auth-accent-hover: #f1577a;
  --auth-gold: #f5a623;
  --auth-green: #1f9d57;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  font-family: var(--auth-font);
  background: linear-gradient(160deg, #1a1a2e 0%, #24243e 55%, #2d2d4a 100%);
  color: var(--auth-navy);
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  min-height: 100dvh;
}

input, button { font-size: 16px; font-family: var(--auth-font); }
a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ── Card ── */
.auth-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 22px;
  padding: clamp(1.75rem, 5vw, 2.75rem);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.auth-eyebrow {
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--auth-gold);
  margin-bottom: 0.85rem;
}

.auth-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
}

.auth-tick {
  width: 76px;
  height: 76px;
  margin: 0 auto 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--auth-green);
  color: #fff;
  border-radius: 50%;
  font-size: 2.4rem;
  line-height: 1;
}

.auth-card h1 { font-size: 1.65rem; font-weight: 400; margin-bottom: 0.5rem; color: var(--auth-navy); }
.auth-sub { color: #555; font-size: 1rem; line-height: 1.5; margin-bottom: 0.5rem; }

.auth-warn {
  background: #fff5e6;
  color: #9a6700;
  border: 1px solid #f5d493;
  padding: 0.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin: 1rem 0 0;
  text-align: left;
}

.auth-form { margin-top: 1.5rem; text-align: left; }

.auth-label {
  display: block;
  font-size: 0.85rem;
  color: #444;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0.9rem 0 0.35rem;
}

.auth-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--auth-navy);
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.auth-input:focus { border-color: var(--auth-accent); background: #fff; }
/* Visible replacement for the removed default outline — keyboard/programmatic focus only. */
.auth-input:focus-visible { box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.28); }

.auth-hint { margin-top: 0.35rem; font-size: 0.8rem; color: #888; }

.auth-error {
  margin-top: 1rem;
  color: #c0392b;
  font-size: 0.92rem;
  background: #fdecea;
  border: 1px solid #f5c6cb;
  padding: 0.7rem;
  border-radius: 10px;
  text-align: left;
}

/* ── Buttons ── */
.auth-btn {
  margin-top: 1.5rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 56px;
  background: var(--auth-accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease;
}
.auth-btn:hover { background: var(--auth-accent-hover); }
.auth-btn:disabled { background: #c7a3ad; cursor: default; }
.auth-btn:focus-visible { outline: 3px solid var(--auth-gold); outline-offset: 2px; }

/* ── Divider between Touch ID and email/password ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
  color: #999;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* ── Secondary links / toggles ── */
.auth-links {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.auth-link {
  color: #888;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  align-self: flex-start;
}
.auth-link:hover { color: #555; border-bottom-color: #999; }
.auth-link:focus-visible { outline: 3px solid var(--auth-gold); outline-offset: 2px; border-radius: 4px; }

.auth-toggle {
  background: none;
  border: none;
  padding: 0;
  color: #888;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: left;
}
.auth-toggle:hover { color: #555; }
.auth-toggle:focus-visible { outline: 3px solid var(--auth-gold); outline-offset: 2px; border-radius: 4px; }

.auth-back {
  display: inline-block;
  margin-top: 1.5rem;
  color: #888;
  font-size: 0.9rem;
  text-decoration: none;
}
.auth-back:hover { color: #555; }
.auth-back:focus-visible { outline: 3px solid var(--auth-gold); outline-offset: 2px; border-radius: 4px; }
