/* VerbaNote Candidate Registration - full-screen artwork + floating form */
:root {
    --vn-green: #86cf3e;
    --vn-green-dark: #579b1d;
    --vn-ink: #122019;
    --vn-muted: #66736c;
    --vn-border: rgba(255, 255, 255, .30);
    --vn-glass: rgba(255, 255, 255, .94);
    --vn-shadow: 0 28px 80px rgba(0, 0, 0, .30);
}

html, body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--vn-ink);
    background: #09110e;
    overflow-x: hidden;
    position: relative;
}

/* Full viewport image. The image is never placed inside a layout column. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image: url("../images/candidate-register-bg.webp");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    transform: translateZ(0);
}

/* Protect foreground controls without hiding the artwork. */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg,
            rgba(5, 13, 11, .06) 0%,
            rgba(5, 13, 11, .10) 43%,
            rgba(5, 13, 11, .30) 66%,
            rgba(5, 13, 11, .55) 100%),
        linear-gradient(180deg, rgba(4, 10, 8, .18) 0%, rgba(4, 10, 8, .04) 45%, rgba(4, 10, 8, .24) 100%);
    pointer-events: none;
}

.topbar {
    position: relative;
    z-index: 20;
    width: min(1600px, calc(100% - 48px));
    margin: 0 auto;
    padding: 24px 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #fff;
}

.topbar .brand {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    text-shadow: 0 2px 14px rgba(0,0,0,.25);
}

.topbar .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.08);
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .20);
}

.topbar .brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 4px;
    box-sizing: border-box;
}

.topbar a:not(.brand) {
    color: #a9ef70;
    font-weight: 800;
    text-decoration: none;
}

.registration-shell {
    position: relative;
    z-index: 5;
    width: min(1600px, calc(100% - 48px));
    min-height: calc(100vh - 92px);
    margin: 0 auto;
    padding: 24px 0 56px;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    grid-template-columns: none !important;
    gap: 0 !important;
}

/* The background image now supplies the marketing/brand visual. */
.onboarding-aside {
    display: none !important;
}

.form-panel {
    width: min(540px, 100%);
    max-width: 540px;
    margin-left: auto;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

#candidateRegistrationForm {
    position: relative;
    padding: clamp(24px, 3vw, 38px);
    border: 1px solid var(--vn-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, .91);
    box-shadow: var(--vn-shadow);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
}

#candidateRegistrationForm::before {
    content: "CANDIDATE REGISTRATION";
    display: inline-flex;
    margin-bottom: 9px;
    color: var(--vn-green-dark);
    font-size: 12px;
    line-height: 1;
    letter-spacing: .14em;
    font-weight: 800;
}

.step-heading {
    margin-bottom: 22px;
}

.step-heading > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(128, 204, 61, .14);
    color: #4d8b1a;
    font-size: 12px;
    font-weight: 800;
}

.step-heading h2 {
    margin: 0 0 6px;
    font-family: Manrope, DM Sans, sans-serif;
    font-size: clamp(25px, 2.2vw, 34px);
    line-height: 1.12;
    letter-spacing: -.03em;
    color: #111d17;
}

.step-heading p {
    margin: 0;
    color: var(--vn-muted);
}

#candidateRegistrationForm label {
    color: #24342c;
    font-weight: 700;
}

#candidateRegistrationForm input,
#candidateRegistrationForm select {
    width: 100%;
    min-height: 50px;
    box-sizing: border-box;
    border: 1px solid #d7dfda;
    border-radius: 12px;
    background: rgba(255,255,255,.92);
    color: #16231c;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#candidateRegistrationForm input:focus,
#candidateRegistrationForm select:focus {
    border-color: #78bd3a;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(120, 189, 58, .14);
}

.password-field {
    position: relative;
}

.toggle-password {
    right: 9px;
}

.form-actions {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #e3e9e5;
}

.btn.primary {
    background: linear-gradient(135deg, #7dca3c, #58a524) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(88, 165, 36, .22);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(88, 165, 36, .28);
}

.btn.secondary {
    background: #eef3ef !important;
    border-color: #dce5de !important;
    color: #304138 !important;
}

.subject-grid {
    max-height: min(42vh, 360px);
    overflow-y: auto;
    padding-right: 5px;
}

.consent-stack {
    max-height: min(48vh, 430px);
    overflow-y: auto;
    padding-right: 5px;
}

.alert {
    border-radius: 12px;
    margin-bottom: 16px;
}


/* Mobile fallback sign-in: kept inside the card so it cannot disappear with the top bar. */
.mobile-signin {
    display: none;
    margin-top: 18px;
    text-align: center;
    color: var(--vn-muted);
    font-size: 14px;
    line-height: 1.45;
}

.mobile-signin a {
    color: #238b57;
    font-weight: 800;
    text-decoration: none;
}

.mobile-signin a:hover,
.mobile-signin a:focus-visible {
    text-decoration: underline;
}

/* Keep long steps usable on shorter laptops. */
@media (max-height: 780px) and (min-width: 901px) {
    .registration-shell { align-items: flex-start; }
    #candidateRegistrationForm { margin-top: 8px; }
}

@media (max-width: 1100px) {
    body::after {
        background: rgba(5, 13, 11, .38);
    }

    .registration-shell {
        justify-content: center;
    }

    .form-panel {
        margin: 0 auto;
    }
}

@media (max-width: 720px) {
    body::before {
        background-position: 64% center;
    }

    body::after {
        background: rgba(4, 11, 9, .48);
    }

    .topbar {
        width: min(100% - 28px, 1600px);
        padding-top: 16px;
        font-size: 13px;
    }

    .topbar .brand b {
        display: none;
    }

    .registration-shell {
        width: min(100% - 24px, 1600px);
        padding: 16px 0 32px;
        align-items: flex-start;
    }

    #candidateRegistrationForm {
        padding: 22px 18px;
        border-radius: 22px;
        background: rgba(255,255,255,.97);
    }

    #candidateRegistrationForm .grid.two {
        grid-template-columns: 1fr !important;
    }

    /* Keep the mobile form compact without reducing touch-target size. */
    .step-heading {
        margin-bottom: 18px;
    }

    #candidateRegistrationForm label {
        margin-bottom: 15px;
    }

    #candidateRegistrationForm input,
    #candidateRegistrationForm select {
        min-height: 54px;
    }

    .form-actions {
        margin-top: 22px;
        padding-top: 18px;
    }

    .mobile-signin {
        display: block;
    }
}

@media (max-width: 440px) {
    .topbar > div {
        max-width: 130px;
        text-align: right;
    }

    .topbar .brand {
        gap: 8px;
    }

    .topbar .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 11px;
        font-size: 19px;
    }
}
