/* ============================================================
   auth.css — Watchamigo Login & Sign Up pages
   ============================================================ */

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

:root {
  --black:   #111111;
  --white:   #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100:#F3F4F6;
  --gray-200:#E5E7EB;
  --gray-300:#D1D5DB;
  --gray-400:#9CA3AF;
  --gray-500:#6B7280;
  --red:     #DC2626;
  --green:   #16A34A;
  --radius:  12px;
  --radius-full: 9999px;
}

html { font-size: 16px; }

body.auth-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Page layout ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  gap: 20px;
}

/* ── Back link ───────────────────────────────────────────── */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
  transition: color 140ms ease;
}
.auth-back:hover { color: var(--black); }

/* ── Card ────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 36px 32px 32px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* ── Header ──────────────────────────────────────────────── */
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-title  { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-sub    { font-size: 14px; color: var(--gray-500); }

/* ── Google button ───────────────────────────────────────── */
.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 140ms ease, background 140ms ease;
  margin-bottom: 20px;
}
.auth-google-btn:hover { border-color: var(--gray-300); background: var(--gray-50); }

/* ── "or" divider ────────────────────────────────────────── */
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 20px;
}
.auth-or::before,
.auth-or::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

/* ── Form fields ─────────────────────────────────────────── */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.auth-row .auth-field { margin-bottom: 0; }

.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.auth-forgot {
  font-size: 12.5px;
  color: var(--gray-400);
  text-decoration: none;
  transition: color 120ms ease;
}
.auth-forgot:hover { color: var(--black); }

.auth-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  outline: none;
  font-family: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.auth-input::placeholder { color: var(--gray-300); }
.auth-input:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(17,17,17,0.07);
}

/* Password wrapper */
.auth-pw-wrap { position: relative; }
.auth-pw-wrap .auth-input { padding-right: 44px; }

.auth-eye {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  transition: color 120ms ease;
}
.auth-eye:hover { color: var(--black); }

/* Phone input */
.auth-phone {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.auth-phone:focus-within {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(17,17,17,0.07);
}
.auth-phone-code {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--black);
  background: var(--gray-50);
  border-right: 1.5px solid var(--gray-200);
  white-space: nowrap;
  flex-shrink: 0;
}
.auth-phone .auth-input {
  border: none;
  border-radius: 0;
  box-shadow: none !important;
  flex: 1;
}

/* Password strength */
.auth-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.auth-strength-track {
  flex: 1;
  height: 4px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.auth-strength-fill {
  height: 100%;
  border-radius: var(--radius-full);
  width: 0;
  transition: width 280ms ease, background 280ms ease;
}
.auth-strength-lbl { font-size: 11.5px; font-weight: 600; white-space: nowrap; }

/* Error text */
.auth-err {
  font-size: 12px;
  color: var(--red);
  min-height: 16px;
  line-height: 1.4;
}

/* ── Checkbox ─────────────────────────────────────────────── */
.auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 20px;
}
.auth-check input { display: none; }

.auth-box {
  width: 18px; height: 18px;
  border: 1.5px solid var(--gray-300);
  border-radius: 5px;
  background: var(--white);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 140ms ease, border-color 140ms ease;
}
.auth-check input:checked + .auth-box {
  background: var(--black);
  border-color: var(--black);
}
.auth-check input:checked + .auth-box::after {
  content: '';
  display: block;
  width: 10px; height: 6px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg) translateY(-1px);
}

.auth-check-text {
  font-size: 13px;
  color: var(--black);
  line-height: 1.4;
}
.auth-check-text a { color: var(--black); font-weight: 600; text-underline-offset: 2px; }

/* ── Submit button ───────────────────────────────────────── */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 160ms ease;
  margin-bottom: 20px;
}
.auth-btn:hover    { background: #2D2D2D; }
.auth-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.auth-btn-spin { display: inline-flex; align-items: center; }

/* ── Switch link ─────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--gray-500);
}
.auth-switch a {
  color: var(--black);
  font-weight: 600;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px 24px; border-radius: 16px; }
  .auth-row  { grid-template-columns: 1fr; }
  .auth-row .auth-field { margin-bottom: 16px; }
}
