:root {
    --job-orange: #f56600;
    --job-orange-dark: #d94b00;
    --job-red: #c9252d;
    --job-red-soft: #fff1f1;
    --job-green: #18794e;
    --job-ink: #1f252d;
    --job-muted: #667085;
    --job-line: #e5e7eb;
    --job-surface: #ffffff;
    --job-canvas: #f6f7f9;
}

.job-public-page {
    margin: 0;
    min-height: 100vh;
    background: var(--job-canvas);
    color: var(--job-ink);
    font-family: "Sarabun", Tahoma, sans-serif;
}

.job-public-page *,
.job-admin-editor *,
.job-admin-page * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.job-public-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 74px;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid var(--job-line);
}

.job-brand-logo {
    display: block;
    width: min(280px, 72vw);
    height: 52px;
    object-fit: contain;
}

.job-recruitment-cover {
    width: min(1040px, calc(100% - 32px));
    margin: 18px auto 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--job-line);
    border-radius: 8px;
}

.job-recruitment-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.job-public-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 24px auto 52px;
}

.job-apply-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin-bottom: 18px;
    padding: 24px 28px;
    color: #fff;
    background: var(--job-red);
    border-left: 8px solid var(--job-orange);
    border-radius: 8px;
}

.job-apply-intro h1 {
    margin: 0 0 6px;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.25;
}

.job-apply-intro p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, .88);
    white-space: pre-line;
}

.job-apply-intro__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    color: var(--job-red);
    background: #fff;
    border-radius: 6px;
    font-weight: 700;
    white-space: nowrap;
}

.job-panel {
    background: var(--job-surface);
    border: 1px solid var(--job-line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(31, 37, 45, .06);
}

.job-consent-panel {
    padding: 28px;
}

.job-consent-panel__heading,
.job-step-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.job-icon-box {
    display: inline-grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #fff;
    background: var(--job-orange);
    border-radius: 50%;
    font-size: 21px;
}

.job-consent-panel h2,
.job-step-heading h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.job-consent-panel p,
.job-step-heading p {
    margin: 0;
    color: var(--job-muted);
    line-height: 1.65;
    white-space: pre-line;
}

.job-consent-copy {
    margin: 22px 0;
    padding: 18px 20px;
    background: #fff8f1;
    border: 1px solid #ffd9bd;
    border-left: 4px solid var(--job-orange);
    border-radius: 6px;
    line-height: 1.7;
}

.job-consent-copy strong {
    display: block;
    margin-bottom: 12px;
    color: var(--job-orange-dark);
}

.job-consent-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 24px;
}

.job-consent-list li {
    padding-left: 4px;
    line-height: 1.7;
    white-space: pre-line;
}

.job-consent-list li::marker {
    color: var(--job-orange-dark);
    font-weight: 700;
}

.job-consent-text {
    display: block;
    line-height: 1.7;
    white-space: pre-line;
}

.job-consent-actions,
.job-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.job-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.job-button--primary {
    color: #fff;
    background: var(--job-orange);
}

.job-button--primary:hover {
    color: #fff;
    background: var(--job-orange-dark);
}

.job-button--danger {
    color: #fff;
    background: var(--job-red);
}

.job-button--danger:hover {
    color: #fff;
    background: #a91f25;
}

.job-button--outline {
    color: var(--job-ink);
    background: #fff;
    border-color: #cfd4dc;
}

.job-button--outline:hover {
    color: var(--job-orange-dark);
    border-color: var(--job-orange);
}

.job-button:disabled {
    cursor: not-allowed;
    opacity: .62;
}

.job-wizard[hidden],
.job-consent-stage[hidden],
.job-closed-panel[hidden],
.job-step-panel[hidden] {
    display: none !important;
}

.job-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
    padding: 22px 24px 18px;
}

.job-progress__current {
    display: none;
}

.job-progress__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0;
    color: #8a9099;
    background: transparent;
    border: 0;
    font: inherit;
    cursor: default;
}

.job-progress__item:not(:disabled) {
    cursor: pointer;
}

.job-progress__item:disabled {
    opacity: .72;
    cursor: not-allowed;
}

.job-progress__item:focus-visible {
    outline: 3px solid rgba(244, 93, 1, .32);
    outline-offset: 4px;
    border-radius: 8px;
}

.job-progress__item:not(:last-child)::after {
    position: absolute;
    z-index: 0;
    top: 17px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    content: "";
    background: #e1e3e7;
}

.job-progress__number {
    position: relative;
    z-index: 1;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    background: #e5e7eb;
    border-radius: 50%;
    font-weight: 700;
}

.job-progress__label {
    overflow: hidden;
    max-width: 100%;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-progress__item.is-active,
.job-progress__item.is-complete {
    color: var(--job-ink);
}

.job-progress__item.is-active .job-progress__number,
.job-progress__item.is-complete .job-progress__number {
    color: #fff;
    background: var(--job-orange);
}

.job-progress__item.is-complete {
    cursor: pointer;
}

.job-progress__item.is-complete:not(:last-child)::after {
    background: var(--job-orange);
}

.job-step-panel {
    overflow: hidden;
}

.job-step-panel__header {
    padding: 24px 26px 20px;
    border-bottom: 1px solid var(--job-line);
}

.job-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
    padding: 24px 26px;
}

.job-field {
    min-width: 0;
}

.job-field--wide,
.job-field:has(textarea),
.job-field:has(input[type="file"]) {
    grid-column: 1 / -1;
}

.job-field__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.job-required {
    color: var(--job-red);
}

.job-field__help {
    margin: -2px 0 8px;
    color: var(--job-muted);
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-line;
}

.job-birth-age {
    display: block;
    margin-top: 8px;
    color: #15803d;
    font-size: 0.9rem;
    font-weight: 700;
}

.job-control,
.job-field input[type="text"],
.job-field input[type="number"],
.job-field input[type="date"],
.job-field input[type="file"],
.job-field textarea,
.job-field select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--job-ink);
    background: #fff;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    font: inherit;
    outline: none;
}

.job-field input[type="file"] {
    padding: 8px;
}

.job-field textarea {
    min-height: 112px;
    resize: vertical;
}

.job-field input:focus,
.job-field textarea:focus,
.job-field select:focus {
    border-color: var(--job-orange);
    box-shadow: 0 0 0 3px rgba(245, 102, 0, .14);
}

.job-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.job-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #d6dae0;
    border-radius: 6px;
    cursor: pointer;
}

.job-choice:has(input:checked) {
    color: var(--job-orange-dark);
    background: #fff7f0;
    border-color: var(--job-orange);
}

.job-choice input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--job-orange);
}

.job-field.is-invalid .job-field__label {
    color: var(--job-red);
}

.job-field.is-invalid input,
.job-field.is-invalid textarea,
.job-field.is-invalid select,
.job-field.is-invalid .job-choice {
    border-color: var(--job-red);
}

.job-field-error,
.field-error {
    margin-top: 7px;
    color: var(--job-red);
    font-size: 13px;
}

.job-step-panel__footer {
    padding: 18px 26px;
    background: #fbfbfc;
    border-top: 1px solid var(--job-line);
}

.validation-summary-errors {
    margin: 0 0 16px;
    padding: 14px 18px;
    color: #8f1d24;
    background: var(--job-red-soft);
    border: 1px solid #efb7ba;
    border-radius: 6px;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 20px;
}

.job-review-notice {
    display: flex;
    gap: 12px;
    margin: 24px 26px 0;
    padding: 14px 16px;
    color: #8a3d00;
    background: #fff7ef;
    border: 1px solid #ffd8b8;
    border-radius: 6px;
}

.job-review-list {
    display: grid;
    gap: 14px;
    padding: 20px 26px 26px;
}

.job-review-section {
    border: 1px solid var(--job-line);
    border-left: 4px solid var(--job-orange);
    border-radius: 6px;
}

.job-review-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    background: #fafafa;
    border-bottom: 1px solid var(--job-line);
}

.job-review-section__header h3 {
    margin: 0;
    font-size: 17px;
}

.job-review-edit {
    padding: 4px 8px;
    color: var(--job-orange-dark);
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.job-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 22px;
    padding: 15px;
}

.job-review-item dt {
    margin-bottom: 3px;
    color: var(--job-muted);
    font-size: 13px;
}

.job-review-item dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
    white-space: pre-line;
}

.job-review-item--file {
    grid-column: 1 / -1;
}

.job-review-image {
    display: block;
    width: min(100%, 420px);
    max-height: 360px;
    margin-top: 10px;
    object-fit: contain;
    object-position: left center;
    background: #f8fafc;
    border: 1px solid var(--job-line);
    border-radius: 6px;
}

.job-closed-panel {
    padding: 40px 28px;
    text-align: center;
}

.job-closed-panel .job-icon-box {
    margin: 0 auto 16px;
    background: var(--job-red);
}

.job-closed-panel h2 {
    margin: 0 0 8px;
}

.job-closed-panel p {
    margin: 0;
    color: var(--job-muted);
}

.job-result-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 74px);
    padding: 28px 16px;
}

.job-result-card {
    width: min(620px, 100%);
    padding: 42px 30px;
    text-align: center;
}

.job-result-icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    color: #fff;
    background: var(--job-orange);
    border-radius: 50%;
    font-size: 34px;
}

.job-result-card--declined .job-result-icon {
    background: var(--job-red);
}

.job-result-card h1 {
    margin: 0 0 10px;
    font-size: 28px;
}

.job-result-card p {
    margin: 0;
    color: var(--job-muted);
    font-size: 17px;
    line-height: 1.7;
}

/* Admin form editor */
.job-admin-editor {
    --bs-primary: var(--job-orange);
}

.job-admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 20px 22px;
    color: #fff;
    background: var(--job-red);
    border-left: 7px solid var(--job-orange);
    border-radius: 8px;
}

.job-admin-hero h1 {
    margin: 0 0 4px;
    font-size: 25px;
}

.job-admin-hero p {
    margin: 0;
    color: rgba(255,255,255,.84);
}

.job-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.job-admin-editor .job-admin-section {
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid var(--job-line);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(31, 37, 45, .05);
}

.job-admin-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #fff8f2;
    border-bottom: 1px solid #f1ded0;
    border-left: 5px solid var(--job-orange);
}

.job-admin-section__header h2 {
    margin: 0;
    font-size: 18px;
}

.job-admin-section__body {
    padding: 18px;
}

.job-admin-editor .form-control:focus,
.job-admin-editor .form-select:focus,
.job-admin-editor .form-check-input:focus {
    border-color: var(--job-orange);
    box-shadow: 0 0 0 .2rem rgba(245, 102, 0, .14);
}

.job-admin-editor .form-check-input:checked {
    background-color: var(--job-orange);
    border-color: var(--job-orange);
}

.job-admin-question {
    margin-bottom: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--job-line);
    border-left: 4px solid #f2a164;
    border-radius: 6px;
}

.job-admin-question__preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
}

.job-admin-question__sample {
    max-width: 760px;
}

.job-admin-question__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 7px;
    color: var(--job-muted);
    font-size: 12px;
}

.job-admin-question__sample :disabled {
    color: var(--job-ink);
    background-color: #f8fafc;
    cursor: default;
    opacity: 1;
}

.job-admin-question__editor {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--job-line);
}

.job-admin-question__editor[hidden] {
    display: none;
}

.job-admin-question:last-child {
    margin-bottom: 0;
}

.job-admin-editor .btn-job-primary {
    color: #fff;
    background: var(--job-orange);
    border-color: var(--job-orange);
}

.job-admin-editor .btn-job-primary:hover {
    color: #fff;
    background: var(--job-orange-dark);
    border-color: var(--job-orange-dark);
}

.job-admin-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 12px;
}

/* HR job application pages */
.job-admin-page {
    min-width: 0;
}

.job-admin-page-header h1,
.job-admin-page-header .h3,
.job-applicant-name,
.job-answer-value {
    overflow-wrap: anywhere;
    word-break: normal;
}

.job-admin-table-card {
    overflow: hidden;
    border-color: var(--job-line);
    border-radius: 8px;
}

.job-response-table {
    min-width: 980px;
}

.job-form-table {
    min-width: 880px;
}

.job-response-actions,
.job-admin-row-actions {
    align-items: center;
}

.job-response-actions {
    display: grid;
    gap: 8px;
    align-items: stretch;
}

.job-response-actions form {
    margin: 0;
}

.job-response-primary-action {
    justify-self: start;
    min-width: 118px;
}

.job-response-action-group {
    display: grid;
    gap: 6px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.job-response-action-group__label {
    color: #64748b;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.job-log-call-form {
    display: grid;
    grid-template-columns: minmax(148px, 1fr) auto;
    align-items: center;
    gap: 6px;
}

.job-log-call-form .form-select {
    width: 100%;
}

.job-response-workflow-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 6px;
}

.job-response-secondary-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.job-edit-interview-popover {
    z-index: 1050;
    left: 0;
    min-width: 230px;
}

.job-admin-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    grid-template-areas:
        "search search"
        "status action";
    align-items: end;
    gap: 10px;
}

.job-admin-search-field { grid-area: search; }
.job-admin-status-field { grid-area: status; }

.job-admin-filter-grid label {
    display: block;
    margin-bottom: 5px;
    color: #475569;
    font-size: .78rem;
    font-weight: 700;
}

.job-admin-filter-grid > .btn {
    grid-area: action;
    min-width: 140px;
}

.job-admin-details .card {
    overflow: hidden;
    border-color: var(--job-line);
    border-radius: 8px;
}

.job-admin-details .card-header {
    background: #fff8f2;
    border-bottom-color: #f1ded0;
}

.job-detail-profile-card {
    border-left: 4px solid var(--job-orange) !important;
    background: #fff;
}

.job-profile-thumb-link {
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.job-profile-thumb {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.job-profile-avatar-wrap {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    display: inline-block;
}

.job-profile-avatar {
    width: 76px;
    height: 92px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease;
}

.job-profile-avatar-wrap:hover .job-profile-avatar {
    transform: scale(1.04);
}

.job-photo-zoom-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.job-photo-card-img-wrap {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8fafc;
}

.job-photo-card-img-wrap img {
    max-height: 130px;
    max-width: 100%;
    object-fit: contain;
}

.job-detail-file-row {
    gap: 10px;
}

.job-applicant-pdf-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 18px;
    padding: 12px;
    background: #fff8f2;
    border: 1px solid #f1ded0;
    border-radius: 8px;
}

.job-applicant-pdf-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

@media (max-width: 720px) {
    .job-public-page {
        background: #f4f6f8;
    }

    .job-public-shell {
        width: min(100% - 16px, 1040px);
        margin-top: 8px;
        margin-bottom: 28px;
    }

    .job-public-header {
        min-height: 64px;
        padding: 7px 12px;
    }

    .job-brand-logo {
        width: min(220px, 72vw);
        height: 48px;
    }

    .job-recruitment-cover {
        width: 100%;
        margin-top: 0;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .job-apply-intro {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 18px;
        border-left-width: 5px;
    }

    .job-apply-intro h1 {
        font-size: 24px;
    }

    .job-apply-intro__badge {
        max-width: 100%;
        white-space: normal;
    }

    .job-apply-intro__badge {
        justify-self: start;
    }

    .job-consent-panel,
    .job-step-panel__header,
    .job-fields,
    .job-step-panel__footer,
    .job-review-list {
        padding-right: 18px;
        padding-left: 18px;
    }

    .job-consent-panel {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .job-consent-panel__heading,
    .job-step-heading {
        gap: 12px;
    }

    .job-consent-panel h2,
    .job-step-heading h2 {
        font-size: 20px;
        line-height: 1.35;
    }

    .job-consent-copy {
        margin: 18px 0;
        padding: 16px;
    }

    .job-consent-list {
        gap: 12px;
        padding-left: 22px;
    }

    .job-progress {
        row-gap: 12px;
        padding: 16px 8px 14px;
    }

    .job-progress__current {
        display: flex;
        grid-column: 1 / -1;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
        padding: 0 8px 4px;
        color: var(--job-muted);
        font-size: 13px;
    }

    .job-progress__current strong,
    .job-progress__current b {
        color: var(--job-ink);
    }

    .job-progress__current b {
        overflow-wrap: anywhere;
        text-align: right;
    }

    .job-progress__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .job-progress__item {
        min-height: 44px;
    }

    .job-progress__item:not(:last-child)::after {
        left: calc(50% + 18px);
        width: calc(100% - 36px);
    }

    .job-fields,
    .job-review-grid {
        grid-template-columns: 1fr;
    }

    .job-fields {
        gap: 20px;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .job-field,
    .job-field--wide {
        grid-column: 1 / -1;
        width: 100%;
    }

    .job-field__label {
        margin-bottom: 7px;
        font-size: 16px;
        line-height: 1.45;
    }

    .job-field__help {
        margin-bottom: 9px;
        font-size: 13px;
    }

    .job-field input[type="text"],
    .job-field input[type="number"],
    .job-field input[type="date"],
    .job-field input[type="file"],
    .job-field textarea,
    .job-field select {
        min-height: 50px;
        padding: 12px 14px;
        font-size: 16px;
    }

    .job-field textarea {
        min-height: 120px;
    }

    .job-choice-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .job-choice {
        width: 100%;
        min-height: 48px;
        padding: 11px 13px;
        line-height: 1.45;
    }

    .job-form-actions,
    .job-consent-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .job-button {
        width: 100%;
    }

    .job-admin-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .job-admin-hero h1 {
        font-size: 21px;
    }

    .job-admin-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .job-admin-actions .btn,
    .job-admin-question > .d-flex .btn,
    .job-admin-section__body > form > .btn {
        min-height: 44px;
        width: 100%;
    }

    .job-admin-section__header {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 14px;
    }

    .job-admin-section__body,
    .job-admin-question {
        padding: 14px;
    }

    .job-admin-question__preview {
        grid-template-columns: 1fr;
    }

    .job-question-edit-toggle {
        width: 100%;
        min-height: 44px;
    }

    .job-admin-link-row {
        grid-template-columns: 1fr;
    }
}

.job-applicant-date-mobile {
    display: none;
}

@media (max-width: 767.98px) {
    .job-admin-page-header {
        align-items: stretch !important;
        flex-direction: column;
    }

    .job-admin-page-header h1,
    .job-admin-page-header .h3 {
        font-size: 1.25rem;
        line-height: 1.35;
    }

    .job-admin-page-header > .btn,
    .job-admin-page-header > form,
    .job-admin-page-header > form .btn {
        width: 100%;
    }

    .job-summary-grid .card-body {
        min-width: 0;
        padding: 12px !important;
    }

    .job-summary-grid .d-flex {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 4px !important;
    }

    .job-admin-filter {
        padding: 12px;
    }

    .job-admin-filter .form-control,
    .job-admin-filter .form-select,
    .job-admin-filter .btn,
    .job-admin-details .form-select,
    .job-admin-details .btn {
        min-height: 44px;
    }

    .job-applicant-pdf-actions {
        grid-template-columns: 1fr;
    }

    .job-admin-current-filter {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .job-admin-table-card {
        overflow: visible;
        background: transparent;
        border: 0;
        box-shadow: none !important;
    }

    .job-admin-table-card .table-responsive {
        overflow: visible;
    }

    .job-response-table,
    .job-form-table,
    .job-response-table tbody,
    .job-form-table tbody {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .job-response-table thead,
    .job-form-table thead {
        display: none;
    }

    .job-response-table tbody tr:not(.job-empty-row) {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        grid-template-areas:
            "applicant status"
            "position  position"
            "phone     photo"
            "actions   actions";
        gap: 4px 10px;
        margin-bottom: 10px;
        padding: 12px 14px;
        background: #fff;
        border: 1px solid var(--job-line);
        border-left: 4px solid var(--job-orange);
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(31, 37, 45, .05);
    }

    .job-form-table tbody tr:not(.job-empty-row) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 12px;
        padding: 14px;
        background: #fff;
        border: 1px solid var(--job-line);
        border-left: 4px solid var(--job-orange);
        border-radius: 8px;
        box-shadow: 0 3px 12px rgba(31, 37, 45, .06);
    }

    .job-response-table tbody td,
    .job-form-table tbody td {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        text-align: left !important;
    }

    .job-form-table td[data-label]::before {
        display: block;
        margin-bottom: 3px;
        color: var(--job-muted);
        content: attr(data-label);
        font-size: .75rem;
        font-weight: 600;
    }

    .job-response-table td[data-label]::before {
        display: inline;
        margin-right: 4px;
        color: var(--job-muted);
        content: attr(data-label) ": ";
        font-size: .75rem;
        font-weight: 500;
    }

    .job-response-applicant::before,
    .job-response-status::before {
        display: none !important;
    }

    .job-response-applicant {
        grid-area: applicant;
        padding-right: 0;
    }

    .job-applicant-id {
        font-size: .76rem;
        color: #64748b;
        font-weight: 500;
    }

    .job-applicant-date-mobile {
        display: inline;
        color: #64748b;
        font-size: .75rem;
    }

    .job-applicant-name {
        font-size: .95rem;
        font-weight: 600;
        color: #0f172a;
        line-height: 1.35;
        margin-top: 1px;
        word-break: normal;
    }

    .job-response-status {
        position: static;
        grid-area: status;
        align-self: start;
        justify-self: end;
        text-align: right !important;
    }

    .job-response-position {
        grid-area: position;
        font-size: .84rem;
        font-weight: 600;
        color: #1e293b;
    }

    .job-response-phone {
        grid-area: phone;
        font-size: .8rem;
        color: #475569;
        white-space: nowrap;
    }

    .job-response-phone .btn {
        min-height: 44px;
    }

    .job-response-date {
        display: none !important;
    }

    .job-response-photo {
        grid-area: photo;
        font-size: .8rem;
        text-align: left !important;
    }

    .job-response-action-cell {
        grid-area: actions;
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px dashed #e2e8f0;
    }

    .job-form-name,
    .job-form-link,
    .job-form-action-cell {
        grid-column: 1 / -1;
    }

    .job-response-actions {
        display: grid !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .job-response-actions form {
        margin: 0 !important;
    }

    .job-response-actions .btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 44px !important;
        padding: 8px 12px !important;
        font-size: .84rem !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
    }

    .job-response-primary-action {
        width: 100%;
    }

    .job-response-action-group {
        gap: 8px;
        padding: 10px;
    }

    .job-response-action-group__label {
        font-size: .75rem;
    }

    .job-log-call-form {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center !important;
        gap: 6px;
    }

    .job-log-call-form .form-select {
        width: 100% !important;
        min-height: 44px !important;
        height: 44px !important;
        font-size: .84rem !important;
    }

    .job-response-workflow-controls {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 8px;
    }

    .job-response-workflow-controls > form,
    .job-response-workflow-controls > details,
    .job-response-workflow-controls > details > summary {
        width: 100%;
    }

    .job-response-secondary-actions {
        padding-top: 4px;
        border-top: 1px dashed #e2e8f0;
    }

    .job-response-secondary-actions,
    .job-response-secondary-actions form,
    .job-response-secondary-actions .btn {
        width: 100%;
    }

    .job-admin-row-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px !important;
    }

    .job-admin-row-actions .btn {
        min-width: 0;
        width: 100%;
        display: inline-flex;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    .job-workflow-summary {
        font-size: .72rem;
        margin-top: 2px;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .job-workflow-form {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: end !important;
        gap: 6px !important;
        margin: 0 !important;
    }

    .job-workflow-form label {
        display: grid !important;
        gap: 3px;
        margin: 0 !important;
    }

    .job-workflow-date-label {
        display: block !important;
        color: #64748b;
        font-size: .72rem;
        font-weight: 600;
    }

    .job-workflow-form input[type="date"] {
        height: 44px !important;
        width: 100% !important;
        min-width: 0;
        padding: 6px 8px !important;
        font-size: .84rem !important;
        border-radius: 6px !important;
        border: 1px solid #cbd5e1 !important;
        background-color: #f8fafc !important;
    }

    .job-workflow-form input[type="date"]:focus {
        border-color: var(--job-orange) !important;
        background-color: #fff !important;
    }

    .job-edit-interview-popover {
        right: 0;
        left: auto;
        width: min(280px, calc(100vw - 48px));
    }

    .job-admin-filter-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "search"
            "status"
            "action";
    }

    .job-admin-filter-grid > .btn {
        width: 100%;
    }

    .job-form-link .input-group {
        align-items: stretch;
        flex-wrap: nowrap;
    }

    .job-form-link .form-control,
    .job-form-link .btn {
        min-height: 44px;
    }

    .job-empty-row {
        display: block;
        background: #fff;
        border: 1px solid var(--job-line);
        border-radius: 8px;
    }

    .job-empty-row td {
        display: block;
        padding: 30px 16px !important;
    }

    .job-admin-details .card-body {
        padding: 14px;
    }

    .job-admin-details .card-header {
        padding: 12px 14px;
    }

    .job-detail-file-row {
        align-items: stretch !important;
        flex-direction: column;
    }

    .job-detail-file-row .btn {
        width: 100%;
    }

    .job-admin-details .list-group-item,
    .job-answer-value,
    .job-detail-file-row .small {
        overflow-wrap: anywhere;
    }

    .job-profile-thumb {
        width: 58px;
        height: 58px;
    }

    .job-photo-card-img-wrap {
        height: 120px;
    }

    .job-photo-card-img-wrap img {
        max-height: 110px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* Progressive motion: keeps every page usable when JavaScript is unavailable. */
.job-motion-ready [data-job-reveal] {
    animation: job-fade-up 420ms cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: var(--job-motion-delay, 0ms);
}

.job-motion-ready [data-job-animate-list] > [data-job-animate-item] {
    animation: job-list-in 360ms cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: var(--job-motion-delay, 0ms);
}

.job-motion-ready .job-step-panel.job-step-enter {
    animation: job-step-in 340ms cubic-bezier(.22, 1, .36, 1) both;
}

[data-job-count] {
    display: inline-block;
    min-width: 1ch;
    font-variant-numeric: tabular-nums;
}

@keyframes job-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes job-list-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes job-step-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.job-analytics-panel {
    padding: 18px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}

.job-analytics-header,
.job-chart header,
.job-bar-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.job-analytics-header {
    align-items: flex-start;
    margin-bottom: 14px;
}

.job-analytics-period {
    display: grid;
    min-width: 260px;
    gap: 4px;
}

.job-analytics-period label { color: #657187; font-size: .78rem; font-weight: 700; }
.job-analytics-period > div { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 7px; }

.job-analytics-header h2,
.job-chart h3 {
    margin: 0;
    color: #172033;
    letter-spacing: 0;
}

.job-analytics-header h2 { font-size: 1.2rem; }
.job-analytics-header p,
.job-chart header span,
.job-analytics-since { margin: 3px 0 0; color: #657187; font-size: .82rem; }

.job-analytics-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.job-analytics-kpi {
    min-height: 92px;
    padding: 13px 15px;
    border-left: 4px solid #334155;
    background: #f6f8fb;
}

.job-analytics-kpi--warning { border-left-color: #f59e0b; }
.job-analytics-kpi--success { border-left-color: #15965f; }
.job-analytics-kpi--today { border-left-color: #cf202b; }
.job-analytics-kpi--interview { border-left-color: #2563a8; }
.job-analytics-kpi span,
.job-analytics-kpi small { display: block; color: #657187; }
.job-analytics-kpi strong { display: block; margin: 2px 0; color: #172033; font-size: 1.65rem; }

.job-analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.job-chart {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e1e6ed;
    border-radius: 6px;
}

.job-chart--funnel { grid-column: 1 / -1; }
.job-chart--daily { grid-column: 1 / -1; }
.job-chart h3 { font-size: 1rem; }
.job-bar-list { display: grid; gap: 9px; margin-top: 12px; }
.job-bar-list--compact { gap: 7px; }
.job-bar-row { display: grid; grid-template-columns: minmax(145px, 1fr) minmax(120px, 2fr) 42px; align-items: center; gap: 9px; }
.job-bar-label { min-width: 0; font-size: .86rem; }
.job-bar-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-bar-track { height: 9px; overflow: hidden; border-radius: 2px; background: #edf1f5; }
.job-bar-track span { display: block; min-width: 0; height: 100%; background: #ef5b16; }
.job-bar-row small { color: #657187; text-align: right; }
.job-chart-empty { margin: 6px 0 0; color: #7b8799; font-size: .85rem; }

.job-column-chart {
    display: grid;
    grid-template-columns: repeat(31, minmax(22px, 1fr));
    align-items: end;
    min-height: 205px;
    margin-top: 14px;
    overflow-x: auto;
    gap: 4px;
}

.job-column-item { display: grid; grid-template-rows: 22px 150px 20px; min-width: 22px; align-items: end; text-align: center; }
.job-column-item strong { color: #172033; font-size: .72rem; }
.job-column-item small { color: #657187; font-size: .66rem; }
.job-column-track { position: relative; height: 150px; overflow: hidden; background: #f5f6f8; }
.job-column-track span { position: absolute; right: 2px; bottom: 0; left: 2px; min-height: 0; background: linear-gradient(180deg, #f45d01 0%, #cf202b 100%); }

.job-status-chart { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 18px; margin-top: 18px; }
.job-status-donut { display: grid; width: 145px; height: 145px; padding: 25px; border-radius: 50%; place-items: center; }
.job-status-donut > div { display: grid; width: 100%; height: 100%; border-radius: 50%; background: #fff; place-content: center; text-align: center; }
.job-status-donut strong { color: #172033; font-size: 1.35rem; }
.job-status-donut span { color: #657187; font-size: .75rem; }
.job-status-legend { display: grid; gap: 9px; }
.job-status-legend > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) 30px 40px; align-items: center; gap: 7px; font-size: .82rem; }
.job-status-legend i { width: 10px; height: 10px; }
.job-status-legend strong,
.job-status-legend small { text-align: right; }
.job-status-legend small { color: #657187; }

.job-response-status small { display: block; margin-top: 4px; color: #657187; font-size: .72rem; }
.job-workflow-summary { display: grid; gap: 5px; margin-top: 8px; }
.job-workflow-summary span { display: grid; grid-template-columns: minmax(90px, auto) 1fr; align-items: baseline; gap: 7px; }
.job-workflow-summary small { margin: 0; }
.job-workflow-summary strong { color: #172033; font-size: .8rem; }
.job-workflow-form { display: grid; grid-template-columns: minmax(135px, 1fr) auto; align-items: end; gap: 7px; }
.job-workflow-form label { margin: 0; color: #657187; font-size: .72rem; }
.job-workflow-form label span { display: block; margin-bottom: 3px; }
.job-workflow-dates { display: grid; gap: 12px; margin-bottom: 10px; }
.job-workflow-help { color: #657187; font-size: .78rem; line-height: 1.45; }
.job-workflow-help-panel { padding: 12px; border: 1px solid #dfe5ec; background: #f8fafc; }
.job-workflow-help-panel p { margin: 5px 0 12px; color: #657187; font-size: .82rem; line-height: 1.5; }

@media (max-width: 767.98px) {
    .job-analytics-panel { padding: 12px; }
    .job-analytics-header { display: block; }
    .job-analytics-period { min-width: 0; margin-top: 12px; }
    .job-analytics-kpis,
    .job-analytics-grid { grid-template-columns: 1fr; }
    .job-chart--funnel { grid-column: auto; }
    .job-chart--daily { grid-column: auto; }
    .job-bar-row { grid-template-columns: minmax(110px, 1fr) minmax(70px, 1.25fr) 36px; gap: 6px; }
    .job-status-chart { grid-template-columns: 1fr; justify-items: center; }
    .job-status-legend { width: 100%; }
    .job-workflow-form { grid-template-columns: 1fr; }
    .job-workflow-summary span { grid-template-columns: 1fr; gap: 1px; }
}
/* Position management and applicant-facing job details */
.job-position-list {
    display: grid;
    gap: 12px;
}

.job-position-editor {
    padding: 16px;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    background: #fff;
}

.job-position-editor--new {
    border-color: #f97316;
    background: #fffaf7;
}

.job-position-editor h3 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.job-position-editor__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.job-position-choices {
    display: grid;
    gap: 10px;
}

.job-position-choice {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.job-position-choice:has(input:checked) {
    border-color: #f15a24;
    box-shadow: 0 0 0 2px rgba(241, 90, 36, .12);
    background: #fffaf7;
}

.job-position-choice input {
    margin-top: 4px;
}

.job-position-choice__summary,
.job-position-choice__details > span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.job-position-choice__summary strong {
    color: #172033;
    font-size: 1rem;
}

.job-position-choice__summary small {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #667085;
}

.job-position-choice__details {
    display: none;
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #ebeef2;
    color: #475467;
    font-size: .9rem;
    white-space: pre-line;
}

.job-position-choice:has(input:checked) .job-position-choice__details {
    display: grid;
}

.job-position-choice__details b {
    color: #344054;
}

@media (max-width: 640px) {
    .job-position-choice__details {
        grid-template-columns: 1fr;
    }

    .job-position-editor {
        padding: 12px;
    }
}

/* Structured work experience */
.job-work-experience {
    display: grid;
    gap: 12px;
}

.job-work-experience__none {
    display: flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    font-weight: 700;
}

.job-work-experience__list {
    display: grid;
    gap: 12px;
}

.job-work-experience.is-no-experience .job-work-experience__list,
.job-work-experience.is-no-experience .job-work-experience__add {
    display: none;
}

.job-work-experience__item {
    padding: 14px;
    border: 1px solid #d9e0e8;
    border-left: 4px solid #f15a24;
    border-radius: 6px;
    background: #fff;
}

.job-work-experience__item > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.job-work-experience__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.job-work-experience__grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
    font-weight: 700;
}

.job-work-experience__wide {
    grid-column: 1 / -1;
}

.job-work-experience__add {
    justify-self: stretch;
}

.job-icon-button {
    display: inline-grid;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #ef4444;
    border-radius: 5px;
    color: #c81e2a;
    background: #fff;
    place-items: center;
}

.job-review-item dd {
    white-space: pre-line;
}

.job-work-experience-summary {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.job-work-experience-summary article {
    padding: 0.875rem;
    border: 1px solid #dbe3ec;
    border-radius: 6px;
    background: #f8fafc;
}

.job-work-experience-summary dl {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 0.35rem 0.75rem;
    margin: 0.625rem 0 0;
}

.job-work-experience-summary dt,
.job-work-experience-summary dd {
    margin: 0;
    white-space: pre-line;
}

@media (max-width: 640px) {
    .job-work-experience__grid {
        grid-template-columns: 1fr;
    }

    .job-work-experience__wide {
        grid-column: auto;
    }
}

.job-public-footer {
    margin-top: 48px;
    padding: 24px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

.job-public-footer__container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.job-public-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.job-public-footer__brand i {
    color: var(--job-orange, #ea580c);
    font-size: 1.1rem;
}

.job-public-footer__text {
    margin: 0;
    line-height: 1.5;
    color: #64748b;
}

@media (min-width: 1600px) {
    .job-public-page {
        font-size: clamp(16px, calc(14px + .12vw), 18px);
    }

    .job-recruitment-cover,
    .job-public-shell {
        width: min(1280px, calc(100% - 64px));
    }
}

@media (min-width: 2400px) {
    .job-recruitment-cover,
    .job-public-shell {
        width: min(1440px, calc(100% - 96px));
    }
}
