/* qmaths_auth — uses the calculator's theme tokens (--accent, --bg, etc.) */

/* If the page doesn't load public-base.css, fall back to slate defaults that match the calculator's default header color. */
:root {
  --accent: #334155;
  --accent-h: #1e293b;
  --accent-gradient: linear-gradient(135deg, #1e293b, #334155);
  --bg: #f8fafc;
  --body-bg: #f1f5f9;
  --text: #0f172a;
  --border: #cbd5e1;
  --muted: #64748b;
  --card-bg: #ffffff;
  --input-bg: #ffffff;
  --hover-bg: #f1f5f9;
  --cta: #ea580c;          /* orange for primary CTA — matches calculator's "Calculate" button */
  --cta-h: #c2410c;
  --ok: #16a34a; --ok-bg: #dcfce7;
  --warn: #d97706; --warn-bg: #fef3c7;
  --err: #dc2626; --err-bg: #fee2e2;
}

* { box-sizing: border-box; }
body.auth-page {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: var(--body-bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
}

/* Topbar — same look as calculator (center title + right-side widget) */
.auth-topbar {
  background: var(--accent-gradient, var(--accent));
  color: #fff; padding: 14px 24px;
  display: flex; align-items: center;
  position: sticky; top: 0; z-index: 100;
}
.auth-topbar h1 {
  flex: 1; text-align: center;
  font-size: 18px; font-weight: 600; letter-spacing: 0.3px; margin: 0;
}
.auth-topbar h1 a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.auth-topbar svg { opacity: .8; }
.auth-topbar-slot { display: flex; align-items: center; gap: 10px; font-size: 13px; }

/* Center the card vertically */
.auth-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
}
.auth-card {
  background: var(--card-bg); padding: 32px 28px; border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(15,23,42,0.08);
  width: 100%; max-width: 420px;
}
.auth-card.wide { max-width: 480px; }
.auth-card h2 { font-size: 22px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.auth-card p.sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }

/* Google primary — colorful, prominent */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 14px 16px;
  background: linear-gradient(135deg, #4285F4 0%, #4285F4 60%, #1a73e8 100%);
  color: #fff; border: 0; border-radius: 10px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  cursor: pointer; box-shadow: 0 4px 12px rgba(66,133,244,0.25);
  transition: transform .15s, box-shadow .15s;
}
.btn-google:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(66,133,244,0.4); }
.btn-google .gicon {
  background: #fff; border-radius: 4px; padding: 6px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
}
.btn-google .gicon img { width: 18px; height: 18px; }

/* Secondary OTP — muted, neutral */
.btn-otp {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 16px; margin-top: 10px;
  background: var(--card-bg); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-weight: 500; font-size: 14px; cursor: pointer;
}
.btn-otp:hover { border-color: var(--accent); background: var(--hover-bg); }
.btn-otp:disabled { opacity: 0.5; cursor: default; }

/* Calculator-orange CTA */
.btn-cta {
  width: 100%; padding: 13px; background: var(--cta); color: #fff !important; border: 0;
  border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; margin-top: 8px;
  text-decoration: none; text-align: center; display: block; box-sizing: border-box;
}
.btn-cta:hover { background: var(--cta-h); text-decoration: none; }
.btn-cta:disabled { opacity: 0.6; cursor: default; }

/* Subtle outline */
.btn-outline {
  background: var(--card-bg); color: var(--text);
  border: 1.5px solid var(--border); padding: 10px 14px; border-radius: 8px;
  cursor: pointer; font-size: 14px;
}
.btn-outline:hover { border-color: var(--accent); }

/* Divider */
.divider { display: flex; align-items: center; margin: 18px 0; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.divider span { padding: 0 12px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text); }
.field input, .field select {
  border: 1.5px solid var(--border); padding: 11px 12px; border-radius: 8px;
  font-size: 15px; font-family: inherit; background: var(--input-bg); color: var(--text);
  transition: border-color .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field .hint { font-size: 12px; color: var(--muted); }

/* Phone input with fixed +91 prefix */
.phone-row { display: flex; align-items: stretch; }
.phone-row .prefix {
  display: flex; align-items: center; padding: 0 12px;
  background: var(--hover-bg); color: var(--muted);
  border: 1.5px solid var(--border); border-right: 0;
  border-radius: 8px 0 0 8px; font-weight: 600; font-size: 15px;
}
.phone-row input {
  flex: 1; border-radius: 0 8px 8px 0; border-left: 0 !important;
  letter-spacing: 1px; font-variant-numeric: tabular-nums;
}

/* Status chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.chip { padding: 4px 10px; font-size: 12px; border-radius: 999px; background: var(--hover-bg); color: var(--muted); }
.chip.ok { background: var(--ok-bg); color: #14532d; }
.chip.err { background: var(--err-bg); color: #7f1d1d; }
.chip.warn { background: var(--warn-bg); color: #78350f; }

/* Errors / messages */
.err { color: var(--err); font-size: 13px; min-height: 16px; margin-top: 8px; }
.msg-ok { color: #14532d; background: var(--ok-bg); padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.msg-warn { color: #78350f; background: var(--warn-bg); padding: 10px 12px; border-radius: 8px; font-size: 14px; }

.auth-footer {
  margin-top: 18px; display: flex; justify-content: space-between;
  font-size: 13px; padding-top: 14px; border-top: 1px solid var(--border);
}
.auth-footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }
.auth-footer a.muted { color: var(--muted); font-weight: 400; }

/* Result state after forgot-password lookup: empty-state / ok-state block */
.result-state {
  text-align: center;
  padding: 20px 16px 22px;
  border-radius: 10px;
  background: var(--hover-bg);
  border: 1px solid var(--border);
  margin: 4px 0 18px;
}
.result-state .result-icon {
  font-size: 38px; line-height: 1; margin-bottom: 10px;
}
.result-state h3 {
  margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--text);
}
.result-state .sub {
  margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted);
}
.result-state .sub b { color: var(--text); font-weight: 600; }
.result-state.result-empty {
  background: #fff7ed; border-color: #fed7aa;
}
.result-state.result-empty h3 { color: #9a3412; }
.result-state.result-ok {
  background: #ecfdf5; border-color: #a7f3d0;
}
.result-state.result-ok h3 { color: #065f46; }

/* Inline text button — no box, subtle hover */
.btn-text {
  background: none; border: 0; padding: 10px 4px;
  color: var(--accent); font-size: 13px; font-weight: 500; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
  width: 100%; margin-top: 10px;
}
.btn-text:hover { color: var(--accent-h); }
