/* Sign-in screens for every door (candidate, TAPS, admin, employer, partner) and their password / 2FA steps.
   Split screen: a calm brand panel with what this door is for, and the form. Uses the site tokens so the
   light display setting still works on the public candidate page. */

.auth {
    --auth-h: 100vh;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: var(--auth-h);
    background: var(--bg);
}
.auth--site { --auth-h: 640px; }

/* ---------- Brand panel ---------- */

.auth__aside {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    padding: clamp(28px, 5vw, 64px);
    background:
        radial-gradient(900px 480px at 15% 0%, rgba(214, 162, 74, 0.16), transparent 60%),
        radial-gradient(700px 420px at 100% 100%, rgba(31, 160, 181, 0.10), transparent 60%),
        #0C0C0E;
    border-right: 1px solid var(--border);
    color: #F2F1ED;
}
.auth__aside::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.2px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 70%);
    mask-image: linear-gradient(160deg, #000 0%, transparent 70%);
}
.auth__brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.auth__brand .brand { font-size: 18px; color: inherit; }
.auth__tag { background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; letter-spacing: .1em; padding: 3px 8px; border-radius: 4px; }
.auth__pitch { max-width: 30rem; }
.auth__pitch .eyebrow { display: block; margin-bottom: 14px; color: var(--accent); }
.auth__pitch h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.02; margin: 0 0 18px; color: #F2F1ED; }
.auth__pitch > p { color: #B4B4B9; font-size: 16px; margin: 0 0 26px; max-width: 34ch; }
.auth__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth__points li { position: relative; padding-left: 32px; color: #D9D8D2; font-size: 15px; line-height: 1.45; }
.auth__points li::before {
    content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
    background: rgba(214, 162, 74, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D6A24A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.auth__others { font-size: 13px; color: #9A9A9F; }
.auth__others > span { display: block; margin-bottom: 8px; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.auth__others ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.auth__others a {
    display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, .14); color: #D9D8D2; text-decoration: none; font-size: 13px;
}
.auth__others a:hover { border-color: var(--accent); color: var(--accent); }
.auth__others a[aria-current="page"] { background: rgba(214, 162, 74, .14); border-color: rgba(214, 162, 74, .5); color: var(--accent); }

/* ---------- Form side ---------- */

.auth__main { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 5vw, 64px) 24px; }
.auth__card { width: 100%; max-width: 410px; }
.auth__card .eyebrow { display: block; margin: 0 0 10px; color: var(--accent); }
.auth__card h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; text-transform: none; letter-spacing: -0.02em; margin: 0 0 10px; }
.auth__card .lede { margin: 0 0 26px; font-size: 15px; color: var(--muted); }

.auth-field { margin: 0 0 16px; }
.auth-field > label { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 7px; font-size: 13px; font-weight: 600; color: var(--ink); }
.auth-field > label a { font-weight: 500; font-size: 12.5px; }
.auth-field input {
    width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 16px;
    color: var(--ink); background: var(--panel-raised); border: 1px solid var(--border-strong); border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(214, 162, 74, .16); }
.auth-pw { position: relative; }
.auth-pw input { padding-right: 70px; }
.auth-pw__toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    min-height: 36px; padding: 0 12px; background: transparent; border: 0; border-radius: var(--radius-md);
    color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.auth-pw__toggle:hover { color: var(--accent); }
.auth-submit { width: 100%; justify-content: center; min-height: 50px; margin-top: 6px; font-size: 15px; border-radius: 10px; }
.auth-alt { margin: 22px 0 0; font-size: 14px; color: var(--muted); }
.auth-alt + .auth-alt { margin-top: 8px; }
.auth__card .form-errors, .auth__card .form-success {
    margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; font-size: 14px; border: 1px solid;
}
.auth__card .form-errors { background: rgba(232, 128, 110, .09); border-color: rgba(232, 128, 110, .4); color: #E8806E; }
.auth__card .form-errors p { color: inherit; }
.auth__card .form-success { background: rgba(95, 211, 160, .08); border-color: rgba(95, 211, 160, .35); color: #5FD3A0; }
.auth-secure { display: flex; align-items: center; gap: 8px; margin: 26px 0 0; font-size: 12.5px; color: var(--muted-dim); }
.auth-secure svg { flex: none; }

@media (max-width: 880px) {
    .auth { grid-template-columns: minmax(0, 1fr); --auth-h: auto; }
    .auth__aside { padding: 22px 20px; gap: 18px; border-right: 0; border-bottom: 1px solid var(--border); }
    .auth__pitch h2 { font-size: 26px; margin-bottom: 0; }
    .auth__pitch > p, .auth__points, .auth__others { display: none; }
    .auth__main { padding: 28px 20px 48px; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .auth-field input { transition: none; } }

/* On the public site the header already carries the brand */
.auth--site .auth__brand { display: none; }
.auth--site .auth__aside { justify-content: center; gap: 56px; }

/* The brand panel is dark in both themes: pin the tokens it uses so the light theme's darker gold and ink
   do not leak onto it. */
.auth__aside { --accent: #D6A24A; --accent-ink: #1A1408; --ink: #F2F1ED; --muted: #9A9A9F; --border: rgba(255, 255, 255, 0.12); --border-strong: rgba(255, 255, 255, 0.22); color-scheme: dark; }

/* "Continue with Google": Google's light-theme button (white, #747775 hairline, multicolour G) so it is recognised at a glance. */
.auth-or { display: flex; align-items: center; gap: 14px; margin: 22px 0 0; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .3; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; margin-top: 16px; padding: 0 16px; box-sizing: border-box;
    background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 10px; font: 500 15px/1 Roboto, Arial, sans-serif; letter-spacing: .25px; text-decoration: none; cursor: pointer; }
.google-btn:hover { background: #f2f2f2; color: #1f1f1f; }
.google-btn:focus-visible { outline: 3px solid #4285F4; outline-offset: 2px; }
.google-btn__logo { flex: none; }
.auth-alt--center { text-align: center; margin-top: 10px; }
