/* Login and sign-up pages: full white page, one centred column.
   Colours come from the tokens in css/theme.css, so dark mode follows automatically. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.auth { background: var(--pt-surface); color: var(--pt-ink); font-family: var(--pt-font); -webkit-font-smoothing: antialiased; line-height: 1.5; }
.auth a { color: inherit; }


/* ---------- Page column ---------- */
.auth-main { display: flex; flex-direction: column; min-height: 100vh; padding: 24px 40px; max-width: 1240px; margin: 0 auto; }
@media (max-width: 560px) { .auth-main { padding: 16px; } }

.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-brand { display: inline-flex; align-items: center; }
.auth-brand img { height: 28px; width: auto; display: block; }
.logo-for-dark { display: none !important; }
[data-theme="dark"] .logo-for-light { display: none !important; }
[data-theme="dark"] .logo-for-dark { display: block !important; }
.auth-switch { font-size: 14px; color: var(--pt-muted); text-align: right; }
.auth-switch a { color: var(--pt-ink); font-weight: 500; text-decoration: none; margin-left: 4px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--pt-border); white-space: nowrap; }
.auth-switch a:hover { background: var(--pt-surface-2); }
@media (max-width: 420px) { .auth-switch span { display: none; } }

.auth-body { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 0 48px; }
@media (max-width: 560px) { .auth-body { align-items: flex-start; padding: 36px 0 24px; } }
.auth-card { width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 560px; }

.auth-eyebrow { font-family: var(--pt-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pt-muted); margin: 0 0 12px; }
.auth-card h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.05; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 12px; }
.auth-lede { color: var(--pt-muted); font-size: 16px; margin: 0 0 32px; }

/* ---------- Fields ---------- */
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 480px) { .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.field label, .field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.field label a { font-weight: 500; color: var(--pt-green); text-decoration: none; font-size: 13.5px; }
.field label a:hover { text-decoration: underline; }
.field .opt { color: var(--pt-muted); font-weight: 400; }

.input { position: relative; }
.input input { width: 100%; height: 50px; padding: 0 16px; border: 1px solid var(--pt-border); border-radius: 14px; background: var(--pt-surface); color: var(--pt-ink); font: inherit; font-size: 15.5px; transition: border-color 0.2s, box-shadow 0.2s; }
.input input::placeholder { color: var(--pt-muted); opacity: 0.75; }
.input input:focus { outline: none; border-color: var(--pt-green); box-shadow: 0 0 0 4px rgba(var(--pt-lime-rgb), 0.18); }
.input.has-toggle input { padding-right: 50px; }
.pw-toggle { position: absolute; top: 0; right: 0; width: 50px; height: 50px; display: grid; place-items: center; border: 0; background: none; color: var(--pt-muted); cursor: pointer; border-radius: 14px; font-size: 15px; }
.pw-toggle:hover { color: var(--pt-ink); }
.hint { font-size: 13px; color: var(--pt-muted); margin-top: 6px; }

.field.has-error input { border-color: #D64545; }
.field.has-error input:focus { box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.14); }
.field-error { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #C23B3B; margin-top: 6px; }
[data-theme="dark"] .field-error { color: #FF8A8A; }

.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.strength i { height: 4px; border-radius: 4px; background: var(--pt-surface-2); transition: background 0.2s; }
.strength[data-level="1"] i:nth-child(-n+1) { background: #E5796B; }
.strength[data-level="2"] i:nth-child(-n+2) { background: #E8A55A; }
.strength[data-level="3"] i:nth-child(-n+3) { background: #9DD36A; }
.strength[data-level="4"] i { background: var(--pt-green); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--pt-muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--pt-green); flex: none; cursor: pointer; }
.check a { color: var(--pt-ink); text-decoration: underline; text-underline-offset: 2px; }
.check-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 24px; }
.check-block { margin: 6px 0 24px; }
.check-block.has-error .check { color: #C23B3B; }

.ref-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; margin: 0 0 18px; font: inherit; font-size: 14px; font-weight: 500; color: var(--pt-green); cursor: pointer; }
.ref-toggle i { font-size: 11px; transition: transform 0.2s; }
.ref-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.ref-panel[hidden] { display: none; }
.invite { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: -8px 0 24px; border-radius: 14px; background: var(--pt-lime-soft); color: var(--pt-on-lime); font-size: 14px; }
.invite b { font-weight: 500; }

/* ---------- Button ---------- */
.auth-btn { width: 100%; height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px; background: var(--pt-lime); color: var(--pt-on-lime-fill); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; transition: background 0.2s, transform 0.1s; }
.auth-btn:hover { background: var(--pt-lime-deep); }
.auth-btn:active { transform: scale(0.99); }
.auth-btn:disabled { cursor: default; opacity: 0.85; }
.auth-btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: auth-spin 0.7s linear infinite; display: none; }
.auth-btn.busy .spin { display: inline-block; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-alt { text-align: center; font-size: 14px; color: var(--pt-muted); margin: 24px 0 0; }
.auth-alt a { color: var(--pt-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.auth-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--pt-muted); }
.auth-foot a { text-decoration: none; }
.auth-foot a:hover { color: var(--pt-ink); }

/* ---------- Sign-up steps ---------- */
.steps { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; font-size: 13.5px; color: var(--pt-muted); }
.steps span { display: inline-flex; align-items: center; gap: 8px; }
.steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 500; background: var(--pt-surface-2); color: var(--pt-muted); }
.steps .on { color: var(--pt-ink); }
.steps .on b { background: var(--pt-ink-bg); color: #fff; }
.steps .done b { background: var(--pt-lime); color: var(--pt-on-lime-fill); }
.steps hr { flex: 0 0 32px; border: 0; border-top: 1px solid var(--pt-border); margin: 0; }
.step[hidden] { display: none; }
.step { animation: step-in 0.25s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Step 1: two choice cards, each one soft colour */
.choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 0 0 28px; }
@media (max-width: 560px) { .choices { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.choice { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 22px; border-radius: 22px; border: 2px solid transparent; cursor: pointer; font: inherit; color: inherit; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.choice:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(16, 24, 40, 0.08); }
.choice:focus-visible { outline: 3px solid rgba(var(--pt-lime-rgb), 0.5); outline-offset: 2px; }
.choice.work { background: var(--pt-card-green); color: var(--pt-card-green-ink); }
.choice.hire { background: var(--pt-card-blue); color: var(--pt-card-blue-ink); }
.choice .ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 19px; background: rgba(255, 255, 255, 0.6); margin-bottom: 12px; }
.choice.work .ic { color: var(--pt-card-green-label); }
.choice.hire .ic { color: var(--pt-card-blue-label); }
.choice strong { font-size: 18px; font-weight: 500; }
.choice small { font-size: 14px; opacity: 0.78; line-height: 1.45; }
.choice .tick { position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: rgba(255, 255, 255, 0.7); color: transparent; border: 1.5px solid rgba(0, 0, 0, 0.12); transition: background 0.15s, color 0.15s; }
.choice[aria-checked="true"].work { border-color: var(--pt-card-green-label); }
.choice[aria-checked="true"].hire { border-color: var(--pt-card-blue-label); }
.choice[aria-checked="true"] .tick { background: var(--pt-ink-bg); color: #fff; border-color: transparent; }
.choice-error { font-size: 13.5px; color: #C23B3B; margin: -16px 0 18px; }

.chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 16px; margin: 0 0 24px; border-radius: 16px; font-size: 14.5px; }
.chosen.work { background: var(--pt-lime-soft); color: var(--pt-card-green-ink); }
.chosen.hire { background: #EEF3FF; color: var(--pt-card-blue-ink); }
[data-theme="dark"] .chosen.work, [data-theme="dark"] .chosen.hire { background: var(--pt-surface-2); color: var(--pt-ink); }
.chosen span { display: inline-flex; align-items: center; gap: 10px; }
.chosen button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px; }

/* ---------- Toast ---------- */
.auth-toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--pt-ink-bg); color: #fff; font-size: 14.5px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.auth-toast.show { opacity: 1; transform: translate(-50%, 0); }
.auth-toast .fa-circle-check { color: var(--pt-lime-light); }
.auth-toast .fa-circle-exclamation { color: #FF8A8A; }

@media (prefers-reduced-motion: reduce) { .step { animation: none; } .choice:hover { transform: none; } .auth-toast, .auth-btn, .ref-toggle i { transition: none; } .auth-btn .spin { animation-duration: 2s; } }

/* css/theme.css makes every button a pill and fixes input borders with !important; undo that where these pages need it */
.auth .choice { border-radius: 22px !important; }
html body.auth .field.has-error .input input { border-color: #D64545 !important; }
html body.auth .field .input input:focus { border-color: var(--pt-green) !important; }

/* ---------- Continue with Google ---------- */
.auth-google { width: 100%; height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--pt-border); background: var(--pt-surface); color: var(--pt-ink); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; text-decoration: none; border-radius: 999px !important; transition: background 0.2s; }
.auth-google:hover { background: var(--pt-surface-2); }
.auth-google svg { width: 20px; height: 20px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--pt-muted); font-size: 13.5px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--pt-border); }
.auth-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 0 0 22px; border-radius: 14px; background: #FFF3EC; color: #7A1E0A; font-size: 14.5px; }
.auth-alert.ok { background: var(--pt-lime-soft); color: var(--pt-on-lime); }
[data-theme="dark"] .auth-alert { background: rgba(224, 138, 95, 0.14); color: #FFD8C2; }
.auth-socials { display: grid; gap: 10px; }
