/* MagicBid auth pages — shared styles (Sign in / Sign up / Verify email) */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #0e1425;
  --ink-2: #384559;
  --muted: #6b7488;
  --muted-2: #7d8a9e;
  --placeholder: #a3acbb;
  --line: #dfe4ec;
  --line-2: #e6eaf0;
  --brand: #e11826;
  --brand-hover: #c8121f;
  --brand-ring: rgba(225, 24, 38, .16);
  --panel-bg: #0c1220;
  --panel-ink: #ffffff;
  --panel-muted: #c7cfdc;
  --panel-sub: #b4bdcc;
  --radius-card: 16px;
  --radius-input: 8px;
  --radius-btn: 6px;
  --col: 600px;
  --logo-h: 79px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

/* ---------- affordances (shared) ---------- */
a, button, label[for], [role="button"] { cursor: pointer; }
a, button, input {
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.link-red { color: var(--brand); font-weight: 600; }
.link-red:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- shell / card ---------- */
.shell {
  min-height: 100vh;
  padding: 36px 48px 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card {
  width: 100%;
  max-width: 1440px;
  min-height: max(720px, calc(100vh - 88px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 28px rgba(15, 23, 42, .06);
}

/* ---------- form pane (right) ---------- */
.pane {
  display: flex;
  flex-direction: column;
  padding: 40px 60px 34px;
  background: var(--card);
}
.form-col {
  width: 100%;
  max-width: var(--col);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.pane-logo { height: var(--logo-h); width: auto; margin: 0 auto; }
.pane-title {
  margin: 44px 0 0;
  text-align: center;
  font-size: 42px;
  line-height: 50px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.pane-lead {
  margin: 6px auto 0;
  max-width: 400px;
  text-align: center;
  font-size: 18px;
  line-height: 26px;
  color: var(--muted);
}
.pane-lead strong { color: var(--ink); font-weight: 600; }

/* Google button */
.btn-google {
  margin-top: 32px;
  height: 58px;
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  font-size: 18px; font-weight: 600; color: var(--ink);
}
.btn-google svg { width: 26px; height: 26px; }
.btn-google:hover { background: #f8fafc; border-color: #c9d1dc; }
.btn-google:active { transform: translateY(1px); }

/* divider */
.or {
  margin: 40px 0 16px;
  display: flex; align-items: center; gap: 24px;
  font-size: 15px; line-height: 20px; color: var(--muted);
}
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
/* Google sign-in is hidden for now, so the form follows the intro text directly */
.pane-lead + .form-error, .pane-lead + .form-error[hidden] + form { margin-top: 32px; }

/* fields */
.field + .field { margin-top: 24px; }
.field label {
  display: block;
  margin-bottom: 9px;
  font-size: 16px; line-height: 24px; font-weight: 500;
  color: var(--ink-2);
}
.control { position: relative; }
.control input {
  width: 100%;
  height: 54px;
  padding: 0 52px 0 58px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  font-size: 17px;
  color: var(--ink);
  outline: none;
}
.control input::placeholder { color: var(--placeholder); }
.control input:hover { border-color: #c9d1dc; }
.control input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.control > svg {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; color: #4f5a6c; pointer-events: none;
}
.eye {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; background: transparent; border-radius: 8px;
  color: #4f5a6c;
}
.eye svg { width: 22px; height: 22px; }
.eye:hover { background: #f1f4f8; color: var(--ink); }

.row-right { display: flex; justify-content: flex-end; margin-top: 14px; }
.forgot { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--brand); }
.forgot:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 3px; }

.btn-primary {
  margin-top: 28px;
  height: 48px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--brand);
  color: #fff;
  font-size: 19px; font-weight: 600;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:active { transform: translateY(1px); }

.switch {
  margin: 22px 0 0;
  text-align: center;
  font-size: 16px; line-height: 24px; color: var(--muted);
}
.switch a { margin-left: 6px; }
.form-col hr { margin: 27px 0 0; border: 0; border-top: 1px solid var(--line-2); }

.legal {
  margin-top: 26px;
  display: flex; justify-content: center; align-items: center; gap: 14px;
  font-size: 15px; line-height: 22px; color: var(--muted-2);
}
.legal a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal .sep { color: #b6c0cf; }

/* ---------- sign-up tweaks (denser column) ---------- */
.signup .pane-title { margin-top: 30px; }
.signup .pane-lead { margin-top: 4px; line-height: 24px; max-width: 430px; }
.signup .btn-google { margin-top: 22px; }
.signup .or { margin: 32px 0 15px; }
.signup .field + .field { margin-top: 22px; }
.signup .btn-primary { margin-top: 26px; }
.signup .switch { margin-top: 16px; }
.signup .form-col hr { margin-top: 21px; }

/* ---------- verify email ---------- */
.verify .pane { padding-top: 50px; }
.verify .pane-title { margin-top: 70px; }
.verify .pane-lead { margin-top: 8px; font-size: 19px; line-height: 29px; max-width: 460px; }
.verify .pane-lead strong { display: block; font-size: 20px; }
.verify .pane-hint { margin: 20px auto 0; max-width: 480px; text-align: center; font-size: 18px; line-height: 26px; color: var(--muted); }
.otp {
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: repeat(6, 77px);
  gap: 18px;
}
.otp input {
  width: 77px; height: 77px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
  font-size: 29px; font-weight: 500; color: var(--ink);
  outline: none;
  caret-color: var(--brand);
}
.otp input:hover { border-color: #c9d1dc; }
.otp input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.verify .btn-primary { margin-top: 34px; height: 54px; }
.resend { margin: 24px 0 0; text-align: center; font-size: 16px; line-height: 24px; color: var(--muted); }
.resend a { margin-left: 8px; }
.countdown { margin: 15px 0 0; text-align: center; font-size: 15px; line-height: 22px; color: var(--muted); }
.countdown[hidden] { display: none; }
.verify .form-col hr { margin-top: 30px; }
.back {
  margin: 28px auto 0;
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 17px; line-height: 24px; font-weight: 500; color: var(--ink-2);
}
.back svg { width: 20px; height: 20px; transition: transform .15s ease; }
.back:hover { color: var(--brand); }
.back:hover svg { transform: translateX(-2px); }

/* ---------- inline errors (API wiring) ---------- */
.form-error { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; background: #fdf0f1; border: 1px solid #f3c2c6; color: #a3121d; font-size: 14.5px; line-height: 20px; }
.field-error { margin: 8px 0 0; font-size: 13.5px; line-height: 18px; color: #c8121f; }
.verify .field-error { text-align: center; margin-top: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .pane { padding: 36px 40px 28px; }
}
@media (max-width: 960px) {
  .shell { padding: 20px 16px 28px; }
  .card { grid-template-columns: 1fr; min-height: 0; }
  .pane { padding: 40px 24px 24px; }
  .pane-title { font-size: 34px; line-height: 42px; margin-top: 32px; }
  :root { --logo-h: 64px; }
  .otp { grid-template-columns: repeat(6, minmax(40px, 64px)); gap: 10px; width: 100%; }
  .otp input { width: 100%; height: 64px; font-size: 24px; }
}
@media (max-width: 480px) {
  .shell { padding: 0; }
  .card { border-radius: 0; box-shadow: none; }
  .pane { padding: 32px 18px 20px; }
  .pane-title { font-size: 28px; line-height: 36px; }
  .pane-lead { font-size: 16px; line-height: 24px; }
  .verify .pane-lead { font-size: 17px; line-height: 25px; }
  .verify .pane-lead strong { font-size: 18px; }
  .btn-google, .control input { height: 52px; }
  .otp { gap: 8px; }
  .otp input { height: 52px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
