
/* =========================================================
   NKIF WELCOME GATE
   Black, White & Grey Theme
   Updated for New EJS + JavaScript Role Selector
   Desktop: Two Columns | Mobile: Stacked Layout
========================================================= */

/* =========================================================
   1. THEME
========================================================= */

:root {
    --nkif-navy: #111111;
    --nkif-navy-dark: #000000;
    --nkif-navy-hover: #333333;
    --nkif-brand-navy: #222222;

    --nkif-gold: #bdbdbd;
    --nkif-gold-light: #e5e5e5;
    --nkif-gold-dark: #555555;

    --nkif-white: #ffffff;
    --nkif-text: #171717;
    --nkif-muted: #666666;
    --nkif-border: #d4d4d4;
    --nkif-light: #f5f5f5;
    --nkif-danger: #a00000;

    --nkif-radius: 0;
}

/* =========================================================
   2. RESET AND GLOBAL STYLES
========================================================= */

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

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: clip;
    overflow-y: auto;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: clip;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--nkif-text);
    -webkit-font-smoothing: antialiased;
}

.welcome-body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--nkif-text);
    background: var(--nkif-white);
    overflow-x: clip;
    overflow-y: auto;
}

.welcome-body button,
.welcome-body input,
.welcome-body select,
.welcome-body textarea {
    font-family: Arial, Helvetica, sans-serif;
}

.welcome-body button {
    -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   3. MAIN LAYOUT
========================================================= */

.welcome-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: stretch;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow: visible;
    border-top: 4px solid #bdbdbd;
    background: #ffffff;
}

/* =========================================================
   4. LEFT PANEL — BRANDING
========================================================= */

.welcome-branding {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    min-width: 0;
    min-height: 100%;
    padding: 42px clamp(24px, 3.5vw, 58px);
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(
            145deg,
            rgba(0, 0, 0, 0.96) 0%,
            rgba(25, 25, 25, 0.94) 55%,
            rgba(45, 45, 45, 0.96) 100%
        ),
        url("/images/ship.jpg") center / cover no-repeat;
}

.welcome-branding::before {
    position: absolute;
    z-index: -1;
    right: -120px;
    bottom: -145px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.welcome-branding::after {
    position: absolute;
    z-index: -1;
    right: -70px;
    bottom: -100px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

/* =========================================================
   5. LOGO AND BRAND NAME
   Preserves original logo appearance
========================================================= */

.welcome-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.welcome-brand img,
.welcome-brand img.welcome-logo {
    display: block;
    flex: 0 0 85px;
    width: 100px;
    height: 100px;
    min-width: 85px;
    margin: 0;
    padding: 0;
    object-fit: contain;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    clip-path: none !important;
}

.welcome-brand-name {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.6;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.welcome-brand-motto {
    margin: 6px 0 0;
    color: #e5e5e5;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.7;
    letter-spacing: 1.5px;
}

/* =========================================================
   6. BRANDING MESSAGE
========================================================= */

.welcome-copy {
    width: 100%;
    max-width: 600px;
    margin: 68px 0 55px;
}

.eyebrow {
    margin: 0;
    color: #555555;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.7;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.welcome-branding .eyebrow {
    color: #d9d9d9;
}

.welcome-copy h1 {
    margin: 17px 0 25px;
    color: #ffffff;
    font-size: clamp(42px, 5vw, 68px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    overflow-wrap: break-word;
}

.welcome-copy h1 span {
    color: #d9d9d9;
}

.welcome-description {
    max-width: 550px;
    margin: 0;
    color: #d5d5d5;
    font-size: 15px;
    line-height: 1.8;
}

/* =========================================================
   7. BRANDING HIGHLIGHTS
========================================================= */

.welcome-highlight {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 23px;
}

.welcome-highlight > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 1px solid #555555;
    border-radius: 0;
    color: #ffffff;
    background: #333333;
    font-size: 12px;
    font-weight: 800;
}

.welcome-highlight strong {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
}

.welcome-highlight p {
    margin: 5px 0 0;
    color: #d0d0d0;
    font-size: 12px;
    line-height: 1.8;
}

/* =========================================================
   8. LEFT PANEL FOOTER
========================================================= */

.welcome-footer-note {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #d0d0d0;
    font-size: 11px;
    line-height: 1.8;
}

/* =========================================================
   9. RIGHT PANEL — REGISTRATION FORM
========================================================= */

.welcome-form-area {
    display: block;
    align-self: stretch;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    padding: 42px clamp(24px, 3.3vw, 56px) 55px;
    overflow: visible;
    background: #ffffff;
}

.welcome-form-area > * {
    width: 100%;
    max-width: 790px;
    margin-right: auto;
    margin-left: auto;
}

/* Keep the actual form and its fields within the panel */
.welcome-form,
.welcome-form form {
    min-width: 0;
    width: 100%;
}

/* =========================================================
   10. FORM HEADING
========================================================= */

.form-heading h2 {
    margin: 9px 0 15px;
    color: #111111;
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.2px;
}

.form-heading > p:last-child {
    margin: 0;
    color: #666666;
    font-size: 14px;
    line-height: 1.8;
}

/* =========================================================
   11. JOB SEEKER / EMPLOYER SELECTOR
========================================================= */

.welcome-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    margin-top: 28px;
    margin-bottom: 28px;
    padding: 5px;
    border: 1px solid #d4d4d4;
    border-radius: 0;
    background: #eeeeee;
}

.welcome-toggle button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 0;
    color: #555555;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease;
}

.welcome-toggle button:hover:not(.active) {
    color: #000000;
    background: #dddddd;
}

.welcome-toggle button.active,
.welcome-toggle button[aria-pressed="true"] {
    border-color: #111111;
    color: #ffffff;
    background: #111111;
    box-shadow: none;
}

/* =========================================================
   12. FORM SECTION HEADINGS
========================================================= */

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 18px;
}

.section-heading > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 29px;
    width: 29px;
    height: 29px;
    border: 1px solid #d4d4d4;
    border-radius: 0;
    color: #333333;
    background: #eeeeee;
    font-size: 12px;
    font-weight: 800;
}

.section-heading h3 {
    margin: 0;
    color: #111111;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.6;
}

/* =========================================================
   13. FORM GRID AND FIELDS
========================================================= */

.welcome-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 19px 16px;
    width: 100%;
}

.welcome-field {
    min-width: 0;
    width: 100%;
}

.full-width {
    grid-column: 1 / -1;
}

.welcome-field label {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
}

.welcome-field input,
.welcome-field select,
.welcome-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #d4d4d4;
    border-radius: 0;
    outline: none;
    color: #171717;
    background: #ffffff;
    font-size: 13px;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.welcome-field input::placeholder,
.welcome-field textarea::placeholder {
    color: #888888;
    opacity: 1;
}

.welcome-field select {
    cursor: pointer;
}

.welcome-field textarea {
    min-height: 100px;
    resize: vertical;
}

.welcome-field input:focus,
.welcome-field select:focus,
.welcome-field textarea:focus {
    border-color: #555555;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.welcome-field input:disabled,
.welcome-field select:disabled,
.welcome-field textarea:disabled,
.welcome-field [disabled] {
    color: #888888;
    background: #eeeeee;
    cursor: not-allowed;
}

/* =========================================================
   14. JOB SEEKER / EMPLOYER FIELD VISIBILITY
   JavaScript controls which group is visible.
========================================================= */

.job-only,
.employer-only {
    min-width: 0;
    width: 100%;
}

/* Do not override the hidden attribute used by EJS/JavaScript */
.job-only[hidden],
.employer-only[hidden],
[hidden] {
    display: none !important;
}

/* When a role field is placed inside the standard form grid */
.welcome-fields > .job-only,
.welcome-fields > .employer-only {
    grid-column: 1 / -1;
}

/* =========================================================
   15. UPDATED SEARCHABLE MULTI-ROLE SELECTOR
========================================================= */
/* =========================================================
   NKIF ROLE DROPDOWN — COMPACT, INLINE & IN CONTAINER
========================================================= */

/* Dropdown wrapper */
.role-dropdown-field {
    position: relative;
    width: 100%;
    min-width: 0;
    margin-top: 8px;
    overflow: visible;
}

.role-dropdown {
    position: relative;
    width: 100%;
    min-width: 0;
}

/* Dropdown trigger */
.role-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #bdbdbd;
    border-radius: 0;
    background: #ffffff;
    color: #222222;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.role-dropdown-trigger:hover,
.role-dropdown-trigger:focus-visible {
    border-color: #555555;
    outline: 2px solid rgba(0, 0, 0, 0.06);
}

.role-dropdown-trigger .dropdown-arrow {
    flex-shrink: 0;
    font-size: 11px;
}

/* Dropdown stays in the normal page flow.
   It will push following content down instead of overlaying it. */
.role-dropdown-panel {
    position: static;
    display: block;
    width: 100%;
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #d4d4d4;
    border-top: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    overscroll-behavior: contain;
}

.role-dropdown-panel[hidden],
.role-dropdown-panel[hidden="hidden"] {
    display: none !important;
}

/* Search field */
.role-dropdown-panel input[type="search"],
.role-dropdown-panel input[id$="RoleSearch"],
.role-dropdown-panel input[id$="roleSearch"] {
    display: block;
    width: 100%;
    min-height: 36px;
    margin: 0 0 8px;
    padding: 8px 10px;
    border: 1px solid #d4d4d4;
    border-radius: 0;
    background: #ffffff;
    color: #171717;
    font-size: 12px;
    outline: none;
}

.role-dropdown-panel input[type="search"]:focus {
    border-color: #555555;
}

/* Select All / Clear All */
.role-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 7px 0;
}

.role-actions button {
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #bdbdbd;
    border-radius: 0;
    background: #eeeeee;
    color: #222222;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.role-actions button:hover {
    background: #111111;
    color: #ffffff;
}

/* Selected-role count */
.role-count {
    margin: 6px 0 8px;
    color: #444444;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

/* Role list */
.role-list {
    display: grid;
    gap: 6px;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
}

/* Categories */
.role-category {
    min-width: 0;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid #dddddd;
    border-radius: 0;
    background: #ffffff;
}

.role-category legend {
    max-width: 100%;
    padding: 0 5px;
    color: #222222;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Role options: compact, single-column list */
.role-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    width: 100%;
}

/* Checkbox and role name on the SAME LINE */
.role-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: 100%;
    min-width: 0;
    min-height: 28px;
    margin: 0;
    padding: 4px 5px;
    border: 1px solid transparent;
    border-radius: 0;
    background: #ffffff;
    color: #222222;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    cursor: pointer;
}

.role-option:hover {
    border-color: #dddddd;
    background: #f5f5f5;
}

.role-option:has(input:checked) {
    border-color: #cccccc;
    background: #eeeeee;
}

/* Prevent global input styles from stretching checkboxes */
.role-option input[type="checkbox"] {
    display: inline-block;
    flex: 0 0 15px;
    width: 15px;
    min-width: 15px;
    max-width: 15px;
    height: 15px;
    min-height: 15px;
    margin: 0;
    padding: 0;
    border: initial;
    box-shadow: none;
    accent-color: #111111;
    cursor: pointer;
}

/* Role label text */
.role-option span {
    display: inline-block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow-wrap: anywhere;
}

/* Validation */
.role-error,
#jobRoleError,
#employerRoleError {
    margin: 6px 0 0;
    color: #a00000;
    font-size: 12px;
    line-height: 1.5;
}

.role-error[hidden],
#jobRoleError[hidden],
#employerRoleError[hidden] {
    display: none !important;
}

/* Mobile */
@media (max-width: 600px) {
    .role-dropdown-panel {
        max-height: 260px;
        padding: 6px;
    }

    .role-category {
        padding: 5px 6px;
    }

    .role-option {
        min-height: 27px;
        padding: 4px;
        font-size: 12px;
    }

    .role-options {
        grid-template-columns: minmax(0, 1fr);
    }
}

.role-dropdown-trigger:hover {
    border-color: #777777;
}

.role-dropdown-trigger:focus,
.role-dropdown-trigger:focus-visible {
    border-color: #555555;
    outline: 2px solid rgba(0, 0, 0, 0.08);
    outline-offset: 1px;
}

.role-dropdown-trigger[aria-expanded="true"] {
    border-color: #555555;
}

/* Placeholder / selected-role summary */
.role-dropdown-trigger .role-summary,
.role-dropdown-trigger [id$="RoleSummary"],
.role-dropdown-trigger [id$="roleSummary"] {
    min-width: 0;
    overflow: hidden;
    color: #555555;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-dropdown-trigger .dropdown-arrow {
    flex: 0 0 auto;
    color: #333333;
    font-size: 11px;
    transition: transform 0.2s ease;
}

.role-dropdown-trigger[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown panel */
.role-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    width: 100%;
    max-height: 420px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #d4d4d4;
    border-top: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    overscroll-behavior: contain;
}

.role-dropdown-panel[hidden] {
    display: none !important;
}

/* Search input inside the dropdown */
.role-dropdown-panel input[type="search"],
.role-dropdown-panel .role-search,
.role-dropdown-panel input[id$="RoleSearch"],
.role-dropdown-panel input[id$="roleSearch"] {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid #d4d4d4;
    border-radius: 0;
    outline: none;
    color: #171717;
    background: #ffffff;
    font-family: inherit;
    font-size: 13px;
}

.role-dropdown-panel input[type="search"]:focus,
.role-dropdown-panel .role-search:focus {
    border-color: #555555;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.07);
}

/* Select All and Clear All */
.role-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.role-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid #bdbdbd;
    border-radius: 0;
    color: #222222;
    background: #f1f1f1;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.role-actions button:hover {
    border-color: #111111;
    color: #ffffff;
    background: #111111;
}

.role-actions button:focus-visible {
    outline: 2px solid #555555;
    outline-offset: 2px;
}

/* Optional explanatory text */
.role-help,
.role-description {
    margin: 7px 0 10px;
    color: #666666;
    font-size: 12px;
    line-height: 1.6;
}

/* Selected role count */
.role-count {
    margin: 8px 0 12px;
    color: #333333;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
}

/* Scrollable list of categories */
.role-list {
    display: grid;
    gap: 9px;
    min-width: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
}

/* Each role category */
.role-category {
    min-width: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid #dedede;
    border-radius: 0;
    background: #ffffff;
}

.role-category legend {
    max-width: 100%;
    padding: 0 6px;
    color: #222222;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Role options inside each category */
.role-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-width: 0;
}

/* Individual role checkbox */
.role-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 0;
    color: #222222;
    background: #ffffff;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.role-option:hover {
    border-color: #d4d4d4;
    background: #f5f5f5;
}

.role-option:has(input:checked) {
    border-color: #bdbdbd;
    background: #eeeeee;
}

.role-option input[type="checkbox"] {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    min-height: 15px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: #111111;
    cursor: pointer;
}

.role-option span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Role validation messages */
.role-error,
.employer-roles .role-error,
#jobRoleError,
#employerRoleError {
    margin: 8px 0 0;
    color: #a00000;
    font-size: 12px;
    line-height: 1.6;
}

.role-error[hidden],
#jobRoleError[hidden],
#employerRoleError[hidden] {
    display: none !important;
}

/* =========================================================
   16. LEGACY EMPLOYER ROLE FIELD COMPATIBILITY
   Keeps older EJS fields styled if still present.
========================================================= */

.employer-roles {
    width: 100%;
    min-width: 0;
    margin-top: 18px;
}

.employer-roles > label {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
}

.employer-roles input[type="text"] {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d4d4d4;
    border-radius: 0;
    color: #171717;
    background: #ffffff;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.employer-roles input[type="text"]:focus {
    border-color: #555555;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.employer-roles input[type="text"]:disabled {
    background: #eeeeee;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Older checkbox-grid markup, if present */
.role-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.role-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #d4d4d4;
    border-radius: 0;
    color: #222222;
    background: #ffffff;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}

.role-checkbox:hover {
    border-color: #777777;
    background: #f5f5f5;
}

.role-checkbox input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: #111111;
}

/* =========================================================
   17. SUBMIT BUTTON
========================================================= */

.welcome-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    margin-top: 28px;
    padding: 14px 20px;
    border: 1px solid #111111;
    border-radius: 0;
    color: #ffffff;
    background: #111111;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.welcome-submit:hover {
    border-color: #444444;
    background: #444444;
    box-shadow: none;
    transform: translateY(-2px);
}

.welcome-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.welcome-submit span {
    color: #e5e5e5;
    font-size: 23px;
    line-height: 1;
}

.welcome-privacy {
    margin-top: 14px;
    color: #777777;
    font-size: 11px;
    line-height: 1.8;
    text-align: center;
}

/* =========================================================
   18. VALIDATION ERRORS
========================================================= */

.form-error {
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 13px 15px;
    border: 1px solid #dddddd;
    border-left: 4px solid #777777;
    border-radius: 0;
    color: #8b0000;
    background: #f5f5f5;
    font-size: 12px;
    line-height: 1.7;
}

[hidden] {
    display: none !important;
}

/* =========================================================
   19. DESKTOP — TWO COLUMNS
========================================================= */

@media (min-width: 851px) {
    .welcome-layout {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
        align-items: stretch;
    }

    .welcome-branding,
    .welcome-form-area {
        min-width: 0;
        min-height: 100%;
    }
}

/* =========================================================
   20. TABLET — STACK PANELS
========================================================= */

@media (max-width: 850px) {
    .welcome-layout {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        height: auto;
        overflow: visible;
    }

    .welcome-branding {
        min-height: auto;
        padding: 32px 28px;
    }

    .welcome-copy {
        max-width: 700px;
        margin: 42px 0 38px;
    }

    .welcome-copy h1 {
        font-size: clamp(36px, 6vw, 49px);
        letter-spacing: -1.2px;
    }

    .welcome-footer-note {
        margin-top: 0;
    }

    .welcome-form-area {
        min-height: 0;
        padding: 38px 28px 48px;
        overflow: visible;
    }

    .welcome-form-area > * {
        max-width: 680px;
    }

    .role-dropdown-panel {
        max-height: 65vh;
    }
}

/* =========================================================
   21. MOBILE
========================================================= */

@media (max-width: 600px) {
    .role-checkbox-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .role-dropdown-panel {
        max-height: 60vh;
        padding: 9px;
    }

    .role-category {
        padding: 8px;
    }

    .role-actions {
        gap: 7px;
    }

    .role-actions button {
        flex: 0 0 auto;
        padding: 8px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .welcome-branding {
        padding: 24px 18px;
    }

    .welcome-brand {
        gap: 12px;
    }

    .welcome-brand img,
    .welcome-brand img.welcome-logo {
        flex-basis: 65px;
        width: 65px;
        height: 65px;
        min-width: 65px;
    }

    .welcome-brand-name {
        font-size: 11px;
        letter-spacing: 0.4px;
    }

    .welcome-brand-motto {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .welcome-copy {
        margin: 32px 0 28px;
    }

    .welcome-copy h1 {
        font-size: clamp(33px, 9vw, 39px);
        letter-spacing: -0.8px;
    }

    .welcome-description {
        font-size: 13px;
        line-height: 1.8;
    }

    .welcome-highlight {
        gap: 10px;
        margin-top: 18px;
    }

    .welcome-highlight strong {
        font-size: 12px;
    }

    .welcome-highlight p {
        font-size: 11px;
    }

    .welcome-footer-note {
        padding-top: 15px;
        font-size: 10px;
    }

    .welcome-form-area {
        padding: 30px 18px 40px;
    }

    .form-heading h2 {
        font-size: 34px;
    }

    .form-heading > p:last-child {
        font-size: 12px;
    }

    .welcome-toggle {
        margin-top: 22px;
        margin-bottom: 24px;
    }

    .welcome-toggle button {
        min-height: 45px;
        padding: 9px 5px;
        font-size: 11px;
    }

    .section-heading {
        margin: 23px 0 16px;
    }

    .welcome-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .welcome-field,
    .full-width {
        grid-column: 1 / -1;
    }

    .welcome-field label {
        font-size: 12px;
    }

    .welcome-field input,
    .welcome-field select,
    .welcome-field textarea {
        min-height: 46px;
        font-size: 13px;
    }

    .welcome-submit {
        min-height: 50px;
        margin-top: 24px;
    }

    .role-dropdown-trigger {
        min-height: 46px;
        padding: 11px 12px;
        font-size: 12px;
    }

    .role-option {
        padding: 8px 6px;
        font-size: 12px;
    }

    .role-count {
        font-size: 11px;
    }
}

/* =========================================================
   22. SMALL MOBILE
========================================================= */

@media (max-width: 360px) {
    .welcome-brand img,
    .welcome-brand img.welcome-logo {
        flex-basis: 55px;
        width: 55px;
        height: 55px;
        min-width: 55px;
    }

    .welcome-brand-name {
        font-size: 10px;
    }

    .welcome-copy h1 {
        font-size: 32px;
    }

    .form-heading h2 {
        font-size: 30px;
    }

    .welcome-form-area {
        padding-right: 15px;
        padding-left: 15px;
    }

    .role-dropdown-panel {
        padding: 7px;
    }
}

/* =========================================================
   23. ACCESSIBILITY
========================================================= */

.welcome-toggle button:focus-visible,
.welcome-submit:focus-visible,
.role-dropdown-trigger:focus-visible,
.role-option:focus-within {
    outline: 2px solid #555555;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* =========================================================
   24. FINAL LOGO OVERRIDE
   Preserves original no-circle logo styling
========================================================= */

.welcome-brand img,
.welcome-brand img.welcome-logo {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    clip-path: none !important;
    padding: 0 !important;
}

/* Dropdown wrapper */
.role-dropdown-field,
.role-dropdown {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    overflow: visible;
}

/* Dropdown button */
.role-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #bdbdbd;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.role-dropdown-trigger .role-summary,
.role-dropdown-trigger [id$="RoleSummary"] {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-dropdown-trigger .dropdown-arrow {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.role-dropdown-trigger[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* IMPORTANT:
   Static positioning keeps the list in the normal page flow.
   It cannot cover the submit button or other form fields. */
.role-dropdown-panel {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    display: block;
    width: 100%;
    max-height: 210px;
    margin: 0;
    padding: 7px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #d4d4d4;
    border-top: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overscroll-behavior: contain;
}

/* Keep closed dropdown hidden */
.role-dropdown-panel[hidden],
.role-dropdown-panel[hidden="hidden"] {
    display: none !important;
}

/* Search input */
.role-dropdown-panel input[type="search"],
.role-dropdown-panel input[id$="RoleSearch"] {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    margin: 0 0 6px;
    padding: 7px 9px;
    border: 1px solid #d4d4d4;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-size: 12px;
}

/* Select All and Clear All */
.role-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0;
}

.role-actions button {
    min-height: 27px;
    padding: 5px 8px;
    border: 1px solid #bdbdbd;
    border-radius: 0;
    background: #eee;
    color: #222;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.role-actions button:hover {
    background: #111;
    color: #fff;
}

/* Selected role count */
.role-count {
    margin: 5px 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

/* Compact category list */
.role-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
}

/* Category container */
.role-category {
    min-width: 0;
    margin: 0;
    padding: 5px 7px;
    border: 1px solid #dedede;
    border-radius: 0;
    background: #fff;
}

.role-category legend {
    max-width: 100%;
    padding: 0 4px;
    color: #222;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

/* Role options */
.role-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
    width: 100%;
    min-width: 0;
}

/* Checkbox and role text on the SAME LINE */
.role-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: 100%;
    min-width: 0;
    min-height: 25px;
    margin: 0;
    padding: 3px 4px;
    border: 1px solid transparent;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    cursor: pointer;
}

.role-option:hover {
    background: #f3f3f3;
    border-color: #ddd;
}

.role-option:has(input[type="checkbox"]:checked) {
    background: #eee;
    border-color: #ccc;
}

/* Prevent general form-input CSS from stretching checkboxes */
.role-option input[type="checkbox"] {
    display: inline-block !important;
    position: static !important;
    flex: 0 0 15px;
    width: 15px !important;
    min-width: 15px;
    max-width: 15px;
    height: 15px !important;
    min-height: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: initial;
    box-shadow: none !important;
    accent-color: #111;
    cursor: pointer;
}

/* Role name */
.role-option span {
    display: inline-block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow-wrap: anywhere;
}

/* Validation messages */
#jobRoleError,
#employerRoleError,
.role-error {
    margin: 5px 0 0;
    color: #a00000;
    font-size: 11px;
    line-height: 1.4;
}

/* Keep submit button and following fields in normal layout */
.welcome-submit {
    position: relative;
    z-index: 1;
    margin-top: 18px;
}

/* Mobile */
@media (max-width: 600px) {
    .role-dropdown-panel {
        max-height: 180px;
        padding: 6px;
    }

    .role-category {
        padding: 4px 6px;
    }

    .role-option {
        min-height: 24px;
        padding: 3px;
        font-size: 11px;
    }

    .role-actions button {
        min-height: 26px;
        padding: 4px 7px;
    }
}

/* =========================================================
   NKIF ROLE DROPDOWN — STICKY SEARCH & ACTIONS
========================================================= */

/* Dropdown remains in normal page flow */
.role-dropdown-panel {
    position: static !important;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 240px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d4d4d4;
    border-top: 0;
    background: #fff;
    box-shadow: none;
}

/* Hidden dropdown must stay hidden */
.role-dropdown-panel[hidden] {
    display: none !important;
}

/* Sticky header area */
.role-dropdown-panel .role-dropdown-sticky,
.role-dropdown-panel .role-controls-sticky {
    position: sticky;
    top: 0;
    z-index: 5;
    flex-shrink: 0;
    padding: 8px;
    border-bottom: 1px solid #ddd;
    background: #fff;
}

/* Search input */
.role-dropdown-panel input[type="search"],
.role-dropdown-panel input[id$="RoleSearch"] {
    display: block;
    width: 100%;
    min-height: 34px;
    margin: 0 0 6px;
    padding: 7px 9px;
    border: 1px solid #ccc;
    border-radius: 0;
    background: #fff;
    font-size: 12px;
}

/* Select All and Reset buttons */
.role-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 6px;
}

.role-actions button {
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #bbb;
    border-radius: 0;
    background: #eee;
    color: #222;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.role-actions button:hover {
    background: #111;
    color: #fff;
}

/* Selected-role count stays with the controls */
.role-count {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

/* Only the roles area scrolls */
.role-list {
    display: grid;
    flex: 1 1 auto;
    gap: 5px;
    min-height: 0;
    max-height: none;
    padding: 7px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Compact categories */
.role-category {
    margin: 0;
    padding: 4px 6px;
}

.role-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
}

/* Checkbox beside role text */
.role-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    min-height: 25px;
    padding: 3px 4px;
}

.role-option input[type="checkbox"] {
    flex: 0 0 15px;
    width: 15px !important;
    min-width: 15px;
    height: 15px !important;
    min-height: 15px !important;
    margin: 0 !important;
}

/* Mobile */
@media (max-width: 600px) {
    .role-dropdown-panel {
        max-height: 220px;
    }

    .role-dropdown-panel .role-dropdown-sticky,
    .role-dropdown-panel .role-controls-sticky {
        padding: 6px;
    }

    .role-list {
        padding: 5px;
    }
}
