/* Billdeck auth pages — same type, colour and button system as the marketing homepage. */

@font-face { font-family: "PP Neue Montreal"; src: url("fonts/PPNeueMontreal-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PP Neue Montreal"; src: url("fonts/PPNeueMontreal-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PP Neue Montreal"; src: url("fonts/PPNeueMontreal-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Recoleta"; src: url("fonts/Recoleta-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #ffffff;
  --bg-subtle: #f4f4f4;
  --bg-surface: #fbfbfb;
  --text: #0c0c0c;
  --text-muted: #484848;
  --text-soft: #888888;
  --border: #e6e6e6;
  --border-soft: #f1f1f1;
  --blue: #2563eb;
  --blue-tint: #eff4ff;
  --success: #18c76a;
  --success-soft: #f3fef6;
  --danger: #ef4444;
  --danger-soft: #fff8f8;
  --sans: "PP Neue Montreal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Recoleta", Georgia, "Times New Roman", serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html, body { height: 100%; }
body.bd-auth {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.bd-auth a { color: inherit; text-decoration: none; }
.bd-auth img, .bd-auth svg { display: block; }

/* ── Shell ─────────────────────────────────────────────── */
/* A soft dot-grid field anchored to the top, same visual language as the hero section. */
.auth-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 420px;
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.06), transparent 60%),
    url("img/hero-dot-grid.svg") top center / 1248px auto no-repeat;
  pointer-events: none;
  z-index: -1;
  opacity: .9;
}

.auth-topbar {
  padding: 24px 24px 0;
  display: flex;
  justify-content: center;
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.2px;
  font-weight: 500;
  color: var(--text);
}
.auth-logo img { width: 20px; height: 20px; }

.auth-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 1px 2px rgba(12, 12, 12, 0.04), 0 20px 48px rgba(12, 12, 12, 0.06);
}

.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.4px;
  color: var(--text);
}
.auth-head p {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--text-muted);
}
.auth-head .mark-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  margin-bottom: 12px;
}
.auth-head .mark-tick svg { width: 24px; height: 24px; }

/* ── Form ──────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--text);
}

.input {
  position: relative;
  display: flex;
  align-items: center;
}
.input > input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input > input::placeholder { color: var(--text-soft); }
.input > input:hover { border-color: #cfcfcf; }
.input > input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.input.has-toggle > input { padding-right: 44px; }
.input .toggle-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  border-radius: 6px;
}
.input .toggle-eye:hover { color: var(--text); background: var(--bg-subtle); }
.input .toggle-eye svg { width: 18px; height: 18px; }
.input .toggle-eye .eye-off { display: none; }
.input .toggle-eye[aria-pressed="true"] .eye-on { display: none; }
.input .toggle-eye[aria-pressed="true"] .eye-off { display: block; }

/* OTP input: large, tracked, centred. */
.input.otp > input {
  text-align: center;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 0.5em;
  padding-left: calc(14px + 0.25em);
  height: 56px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}
.row-between a {
  font-size: 13px;
  line-height: 18px;
  color: var(--text);
}
.row-between a:hover { text-decoration: underline; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  border: 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s ease, scale .16s var(--ease-out), border-color .15s ease;
  text-align: center;
  font-family: inherit;
  width: 100%;
}
.btn:active { scale: 0.98; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d4fd8; }
.btn-outline {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg-surface); border-color: #d6d6d6; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 0;
  height: auto;
}
.btn-ghost:hover { text-decoration: underline; }

.btn:focus-visible,
.bd-auth a:focus-visible,
.input > input:focus-visible,
.toggle-eye:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-soft);
  font-size: 13px;
  margin: 4px 0;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Alerts ────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  margin: 0;
}
.alert-danger { background: var(--danger-soft); color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: var(--success-soft); color: #047857; border: 1px solid #bbf7d0; }

/* ── Footer line ───────────────────────────────────────── */
.auth-foot {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-foot a { color: var(--text); font-weight: 500; }
.auth-foot a:hover { text-decoration: underline; }

/* ── Small screens ─────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; border-radius: 14px; }
  .auth-head h1 { font-size: 26px; line-height: 34px; }
  .auth-main { padding: 24px 16px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .input > input { transition: none; }
}
