/* ── PiggyBankMath Auth Pages (login / signup) ───────────────────────────────── */

.page--auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: var(--color-parent-bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-parent-border);
  box-shadow: 0 8px 40px rgba(91, 127, 255, 0.15);
  padding: var(--space-xl);
}

.auth-brand {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.auth-brand__logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-parent-primary);
}

.auth-brand__logo span { color: var(--color-primary); }

.auth-brand__tagline {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-top: var(--space-xs);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* ── Form fields ─────────────────────────────────────────────────────────── */
.field { margin-bottom: var(--space-md); }

.field__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.field__input {
  width: 100%;
  padding: 14px var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s, background 0.15s;
}

.field__input:focus {
  outline: none;
  border-color: var(--color-parent-primary);
  background: var(--color-white);
}

.field__help {
  display: block;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ── Checkbox rows ───────────────────────────────────────────────────────── */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  line-height: 1.4;
}

.check-row input { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--color-parent-primary); }
.check-row a { color: var(--color-parent-primary); font-weight: 700; }

/* ── Messages ────────────────────────────────────────────────────────────── */
.auth-msg {
  display: none;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.auth-msg--visible { display: block; }
.auth-msg--error   { background: #FDECEC; border: 1.5px solid var(--color-danger); color: var(--color-danger); }
.auth-msg--success { background: #EDFBEE; border: 1.5px solid var(--color-success); color: var(--color-success-dark); }

/* ── Footer links ────────────────────────────────────────────────────────── */
.auth-links {
  text-align: center;
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.auth-link {
  background: none;
  border: none;
  color: var(--color-parent-primary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-link:hover { text-decoration: underline; }

.btn--loading { opacity: 0.6; pointer-events: none; }

/* ── Google sign-in + divider ────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.btn--google {
  width: 100%;
  background: var(--color-white);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  box-shadow: none;
}
.btn--google:hover { background: var(--color-bg); border-color: var(--color-text-muted); }
.btn--google svg { width: 18px; height: 18px; }
