/* ==========================================================================
   RecruitHRM account screens: log in, sign up, password reset, 2FA, verify
   Split layout: black hiring-story panel left, white form right.
   ========================================================================== */

:root {
  --black:      #0a0d0b;
  --black-2:    #121713;
  --black-3:    #1c231e;
  --line-dark:  rgba(255,255,255,.09);
  --green:      #47af4d;
  --green-ink:  #1f8a3a;
  --green-deep: #176d2d;
  --green-tint: #eaf6eb;
  --white:      #ffffff;
  --paper:      #f5f7f5;
  --text:       #101a13;
  --text-2:     #4a5a4f;
  --text-3:     #7a887e;
  --line:       #dfe5e0;
  --on-dark:    #c9d3cc;
  --on-dark-2:  #8d9a91;
  --red:        #b42318;
  --red-tint:   #fef3f2;
  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --body:    'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--body); font-size: 16px; line-height: 1.55; color: var(--text);
  background: var(--white); -webkit-font-smoothing: antialiased;
}
a { color: var(--green-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; }

/* ── Story panel ─────────────────────────────────────────────────────────── */
.auth-story {
  position: relative; overflow: hidden;
  background: var(--black); color: var(--white);
  padding: 44px 56px; display: flex; flex-direction: column;
}
.auth-story::before {
  content: ""; position: absolute; pointer-events: none;
  width: 720px; height: 720px; left: -260px; bottom: -360px;
  background: radial-gradient(circle, rgba(71,175,77,.22), transparent 62%);
}
.auth-logo img { height: 56px; width: auto; }
.auth-story-body { position: relative; margin: auto 0; padding: 48px 0; }
.auth-story h2 {
  font-family: var(--display); font-weight: 800; letter-spacing: -.025em; line-height: 1.08;
  font-size: clamp(2rem, 3.2vw, 2.9rem); margin-bottom: 14px; max-width: 14ch;
}
.auth-story-lead { color: var(--on-dark); font-size: 1.05rem; max-width: 40ch; margin-bottom: 36px; }

/* Hiring timeline: one candidate's journey to "Hired" */
.journey-card {
  background: var(--black-2); border: 1px solid var(--line-dark); border-radius: 16px;
  padding: 20px; max-width: 400px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
}
.jc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line-dark); margin-bottom: 16px; }
.jc-av { width: 42px; height: 42px; border-radius: 50%; background: #9ee3a3; color: var(--black); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.jc-head strong { display: block; font-size: .98rem; }
.jc-head div span { display: block; font-size: .8rem; color: var(--on-dark-2); }
.jc-badge { margin-left: auto; font-size: .74rem; font-weight: 700; color: var(--black); background: var(--green); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.jc-steps { list-style: none; display: grid; gap: 0; }
.jc-steps li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; position: relative; padding-bottom: 14px; font-size: .86rem; color: var(--on-dark); }
.jc-steps li:last-child { padding-bottom: 0; }
.jc-steps li::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%; background: rgba(71,175,77,.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%2347af4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 13px;
}
.jc-steps li:not(:last-child)::after { content: ""; position: absolute; left: 10.5px; top: 24px; bottom: 2px; width: 1px; background: var(--line-dark); }
.jc-steps li:last-child { color: var(--white); font-weight: 600; }
.jc-steps li:last-child::before { background-color: var(--green); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230a0d0b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.jc-steps time { font-size: .76rem; color: var(--on-dark-2); font-weight: 400; }

.auth-quote { position: relative; border-top: 1px solid var(--line-dark); padding-top: 22px; font-size: .92rem; color: var(--on-dark); max-width: 46ch; }
.auth-quote cite { display: block; font-style: normal; color: var(--on-dark-2); font-size: .82rem; margin-top: 8px; }

/* ── Form side ───────────────────────────────────────────────────────────── */
.auth-main { display: flex; flex-direction: column; padding: 32px 48px; background: var(--white); }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: .92rem; color: var(--text-2); }
.auth-top .mobile-logo { display: none; }
.auth-top .mobile-logo img { height: 42px; width: auto; }
.auth-top-links { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.auth-top-links a { color: var(--text-2); font-weight: 500; }
.auth-top-links a.strong { color: var(--green-ink); font-weight: 600; }

.auth-form-wrap { width: 100%; max-width: 440px; margin: auto; padding: 48px 0; }
.auth-form-wrap.wide { max-width: 560px; }
.auth-title { font-family: var(--display); font-weight: 800; font-size: 2.1rem; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 10px; }
.auth-sub { color: var(--text-2); margin-bottom: 32px; }
.auth-foot { text-align: center; color: var(--text-2); font-size: .94rem; margin-top: 26px; }
.auth-legal { text-align: center; color: var(--text-3); font-size: .8rem; padding-top: 16px; }

.section-label { font-size: .82rem; font-weight: 700; color: var(--text); margin: 6px 0 12px; display: flex; align-items: center; gap: 10px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Fields (".form-group" kept: the form helper places errors there) */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-group > label, .field-label { display: flex; justify-content: space-between; align-items: baseline; font-size: .88rem; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.field-label a { font-weight: 500; font-size: .86rem; }
.form-control {
  display: block; width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #9aa69e; }
.form-control:hover { border-color: #c4cdc6; }
.form-control:focus { outline: none; border-color: var(--green-ink); box-shadow: 0 0 0 4px var(--green-tint); }
.form-control.is-invalid, .has-error .form-control { border-color: var(--red); }
.form-control.is-invalid:focus, .has-error .form-control:focus { box-shadow: 0 0 0 4px var(--red-tint); }
.invalid-feedback, .help-block { display: block; color: var(--red); font-size: .85rem; margin-top: 6px; font-weight: 500; }
.hint { display: block; color: var(--text-3); font-size: .82rem; margin-top: 6px; }

.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 70px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font: inherit; font-size: .82rem; font-weight: 600; color: var(--text-2);
  background: none; border: 0; padding: 6px 8px; border-radius: 6px; cursor: pointer;
}
.pw-toggle:hover { color: var(--text); background: var(--paper); }

.input-affix { display: flex; align-items: stretch; }
.input-affix .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-affix .affix { display: flex; align-items: center; padding: 0 14px; background: var(--paper); border: 1.5px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0; color: var(--text-2); font-size: .92rem; white-space: nowrap; }
.input-affix .affix-left { flex: 0 0 auto; order: -1; border-left: 1.5px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; padding: 0 4px 0 14px; max-width: 58%; overflow: hidden; text-overflow: ellipsis; }
.input-affix .affix-left + .form-control { border-radius: 0 10px 10px 0; padding-left: 4px; border-left: 0; }
.input-affix:focus-within .affix { border-color: var(--green-ink); }
.input-affix .affix-left + .form-control:focus { box-shadow: none; }
.input-affix:focus-within { border-radius: 10px; box-shadow: 0 0 0 4px var(--green-tint); }
.has-error .input-affix .affix { border-color: var(--red); }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--text-2); cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--green-ink); cursor: pointer; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 22px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  font: inherit; font-weight: 600; font-size: 1rem; padding: 13px 20px; border-radius: 10px;
  border: 1.5px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s, transform .1s;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-primary, .btn-green { background: var(--green-ink); color: var(--white); }
.btn-primary:hover, .btn-green:hover { background: var(--green-deep); }
.btn-light { background: var(--white); color: var(--text); border-color: var(--line); }
.btn-light:hover { border-color: #c4cdc6; background: var(--paper); }

.alert { border-radius: 10px; padding: 12px 14px; font-size: .92rem; margin-bottom: 20px; border: 1px solid transparent; }
.alert-success { background: var(--green-tint); color: var(--green-deep); border-color: #cbe9cd; }
.alert-danger, .alert-error { background: var(--red-tint); color: var(--red); border-color: #fecdca; }
.alert-info { background: #f2f6fb; color: #23415f; border-color: #d6e2ef; }

.g-recaptcha { margin-bottom: 18px; }

.otp-input { text-align: center; letter-spacing: .5em; font-size: 1.6rem; font-weight: 700; padding: 14px; font-variant-numeric: tabular-nums; }
.qr-box { display: grid; place-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; background: var(--white); }
.secret { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; background: var(--paper); border-radius: 10px; padding: 10px 12px; text-align: center; font-size: .9rem; word-break: break-all; margin-bottom: 22px; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 10px; margin-bottom: 22px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: .93rem; color: var(--text-2); }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--green-tint); color: var(--green-ink); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }

.status-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 22px; }
.status-icon.ok { background: var(--green-tint); color: var(--green-ink); }
.status-icon.bad { background: var(--red-tint); color: var(--red); }
.status-icon svg { width: 30px; height: 30px; }

.is-hidden { display: none !important; }

/* sweetalert / toast from the form helper: brand the confirm button */
.sweet-alert button.confirm { background-color: var(--green-ink) !important; box-shadow: none !important; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-top .mobile-logo { display: block; }
  .auth-main { padding: 20px 24px; }
}
@media (max-width: 520px) {
  .auth-main { padding: 16px; }
  .auth-form-wrap { padding: 32px 0; }
  .auth-title { font-size: 1.75rem; }
  .form-row { grid-template-columns: 1fr; }
  .auth-top-links .hide-sm { display: none; }
}

/* Resend activation email */
.resend-form { margin-top: 4px; }
.resend-status { font-size: .9rem; margin-top: 10px; min-height: 1.3em; }
.resend-status.is-ok { color: var(--green-deep); }
.resend-status.is-error { color: var(--red); }
.resend-panel { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.resend-panel h2 { font-family: var(--display); font-size: 1.1rem; margin-bottom: 6px; }
.resend-panel p.lead { color: var(--text-2); font-size: .93rem; margin-bottom: 14px; }
.btn + .btn, .btn + .resend-form, .resend-form + .btn { margin-top: 10px; }

/* Company setup step (after first login) */
.setup-steps { list-style: none; display: flex; gap: 6px; margin-bottom: 28px; counter-reset: st; }
.setup-steps li { flex: 1; font-size: .78rem; font-weight: 600; color: var(--text-3); padding-top: 10px; border-top: 3px solid var(--line); counter-increment: st; }
.setup-steps li::before { content: counter(st) ". "; }
.setup-steps li.done { color: var(--green-ink); border-top-color: var(--green); }
.setup-steps li.done::before { content: "\2713  "; }
.setup-steps li.current { color: var(--text); border-top-color: var(--green-ink); }
.optional { font-weight: 500; color: var(--text-3); font-size: .8rem; margin-left: 4px; }
textarea.form-control { resize: vertical; min-height: 72px; }
select.form-control { appearance: auto; padding-right: 10px; }
.file-input { padding: 9px 10px; }
.file-input::file-selector-button { font: inherit; font-size: .88rem; font-weight: 600; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 6px 12px; margin-right: 12px; cursor: pointer; }
