/*
 * Client portal, People's shared components (canvas "Client Portal Redesign"): page heading, breadcrumb, buttons, the table
 * card with its toolbar, filters, search, header, rows, footer and pager, its loading, empty, no-result and error states, callouts,
 * the reason dialog and the edit drawer. Loaded on every portal page by workerHrPortalHead(), after client_portal.css.
 *
 * Every colour a tenant can set comes from the custom properties workerHrPortalNavStyle() writes from Theme Style
 * (WorkerHrPortalNavColors::accent): --ido-portal-accent and its partners. The values after the commas are only fallbacks.
 */

.worker-hr-portal-page {
    font-family: var(--ido-font-portal, "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
    color: var(--ido-portal-text, #111827);
}


/* ---- The page frame (board "Portal shell at 1440" and "Portal frame: anatomy and decisions") ------------------------------------ */

/*
 * The portal's own pages sit on the page background, content at a preset width: list 1280, record 1240, each with a 24px gutter and
 * 24px above. Only the pages that set the body class (the controller's 'bodyclass'); other client pages keep the theme's container.
 * The footer is the shell's one line in the page flow (idoworker-theme.css). A page drawn with ido_ui_page(frame portal)
 * (`ido-portal-page`) owns its width and gutter: the theme's container steps aside and the page frame does the rest.
 */
body.customers.worker-hr-portal-frame { background: var(--ido-surface-page); }
/* `#wrapper > #content` (two ids) is the theme's 30 px margin: this must out-rank it. 16 under the bar, 24 under the page. */
body.customers.worker-hr-portal-frame #wrapper > #content { margin-top: 0; padding: var(--ido-space-4) 0 var(--ido-space-5); }
/* A kit page frame brings its own 16 top padding. */
body.customers.worker-hr-portal-frame #wrapper > #content:has(.ido-page--portal) { padding-top: 0; }
body.customers.worker-hr-portal-frame #content > .container { width: 100%; max-width: 1280px; padding: 0 var(--ido-space-5); }
body.customers.worker-hr-portal-frame.is-record #content > .container { max-width: 1288px; }
body.customers.worker-hr-portal-frame #content > .container > .row { margin-left: 0; margin-right: 0; }
body.customers.worker-hr-portal-frame #content > .container:empty { display: none; }
@media (max-width: 575px) {
    body.customers.worker-hr-portal-frame #content > .container { padding: 0 var(--ido-space-4); }
    body.customers.worker-hr-portal-frame #content { padding-top: var(--ido-space-4); }
}
body.customers.worker-hr-portal-frame.ido-portal-page #content { padding: 0; }
body.customers.worker-hr-portal-frame.ido-portal-page #content > .container { max-width: none; padding: 0; }

/* ---- Page heading and breadcrumb -------------------------------------------------------------- */

.worker-hr-portal-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
}

.worker-hr-portal-page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ido-portal-text, #111827);
}

.worker-hr-portal-page-subtitle {
    margin: 4px 0 0;
    max-width: 700px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ido-portal-text-muted, #6b7280);
}

.worker-hr-portal-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--ido-portal-text-muted, #6b7280);
}

.worker-hr-portal-breadcrumb a {
    font-weight: 500;
    color: var(--ido-portal-accent-text, #86266f);
    text-decoration: none;
}

.worker-hr-portal-breadcrumb a:hover,
.worker-hr-portal-breadcrumb a:focus { color: var(--ido-portal-accent-text, #a93593); text-decoration: underline; }
.worker-hr-portal-breadcrumb [aria-current="page"] { font-weight: 400; color: var(--ido-portal-text-soft, #374151); }
.worker-hr-portal-breadcrumb svg { flex: none; color: #9ca3af; }

/* A section inside a tab (Documents): its heading and one line on what it holds. */
.worker-hr-portal-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
.worker-hr-portal-section-heading { margin: 0; font-size: 16px; font-weight: 600; color: var(--ido-portal-text, #111827); }
.worker-hr-portal-section-note { margin: 4px 0 0; font-size: 13px; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-details .worker-hr-portal-card { margin-bottom: 0; border-radius: 12px; }
.worker-hr-portal-details .worker-hr-portal-empty { padding: 40px 16px; }

/* ---- Buttons --------------------------------------------------------------------------------- */

.worker-hr-portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: var(--ido-portal-text, #111827);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.worker-hr-portal-btn:hover,
.worker-hr-portal-btn:focus { background: #f9fafb; color: var(--ido-portal-text, #111827); text-decoration: none; }

.worker-hr-portal-btn.is-primary {
    border-color: var(--ido-portal-accent, #a93593);
    background: var(--ido-portal-accent, #a93593);
    color: var(--ido-portal-on-accent, #ffffff);
    font-weight: 600;
}

.worker-hr-portal-btn.is-primary:hover,
.worker-hr-portal-btn.is-primary:focus {
    border-color: var(--ido-portal-accent-hover, #86266f);
    background: var(--ido-portal-accent-hover, #86266f);
    color: var(--ido-portal-on-accent, #ffffff);
}

.worker-hr-portal-btn.is-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.worker-hr-portal-btn.is-icon { width: 32px; height: 32px; padding: 0; border-color: #e5e7eb; border-radius: 8px; color: #374151; }
.worker-hr-portal-btn[disabled],
.worker-hr-portal-btn.is-disabled { color: #d1d5db; border-color: #e5e7eb; background: #ffffff; cursor: not-allowed; pointer-events: none; }

.worker-hr-portal-page :is(a, button, input, select, textarea, summary):focus-visible,
.worker-hr-portal-drawer :is(a, button, input, select, textarea):focus-visible,
.worker-hr-portal-dialog :is(a, button, input, textarea):focus-visible {
    outline: 2px solid var(--ido-portal-accent-text, #a93593);
    outline-offset: 2px;
}

/* ---- Callouts ------------------------------------------------------------------------------- */

.worker-hr-portal-callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 20px;
    padding: 14px 18px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.5;
}

.worker-hr-portal-callout-text { display: flex; align-items: center; gap: 10px; min-width: 0; }
.worker-hr-portal-callout-text svg { flex: none; }
.worker-hr-portal-callout a { color: inherit; font-weight: 600; text-decoration: underline; }
.worker-hr-portal-callout.is-warning { border-color: #fde68a; background: #fffbeb; color: #78350f; }
.worker-hr-portal-callout.is-warning .worker-hr-portal-btn { border-color: #f59e0b; color: #78350f; }

/* ---- The table card -------------------------------------------------------------------------- */

.worker-hr-portal-card {
    position: relative;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid var(--ido-portal-line, #e5e7eb);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    overflow: hidden;
}

.worker-hr-portal-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ido-portal-line, #e5e7eb);
}

.worker-hr-portal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.worker-hr-portal-filter {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    height: 48px;
    margin-bottom: -1px;
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--ido-portal-text-soft, #374151);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.worker-hr-portal-filter:hover,
.worker-hr-portal-filter:focus { color: var(--ido-portal-text, #111827); text-decoration: none; }

.worker-hr-portal-filter[aria-pressed="true"],
.worker-hr-portal-filter[aria-current="page"] {
    border-bottom-color: var(--ido-portal-accent-text, #86266f);
    color: var(--ido-portal-accent-text, #86266f);
    font-weight: 600;
}

/* The count: a quiet pill, tinted with the tenant's soft accent on the open tab. */
.worker-hr-portal-filter-count {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--ido-portal-text-muted, #6b7280);
    font-size: 12px;
    font-weight: 600;
}
.worker-hr-portal-filter[aria-pressed="true"] .worker-hr-portal-filter-count,
.worker-hr-portal-filter[aria-current="page"] .worker-hr-portal-filter-count { background: var(--ido-portal-accent-soft, #fdf2fa); color: var(--ido-portal-accent-text, #86266f); }

.worker-hr-portal-search { position: relative; display: block; width: 300px; max-width: 100%; margin: 0; }
.worker-hr-portal-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #6b7280; pointer-events: none; }

.worker-hr-portal-search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--ido-portal-line, #e5e7eb);
    border-radius: 10px;
    background: #f9fafb;
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    color: var(--ido-portal-text, #111827);
    box-shadow: none;
}

.worker-hr-portal-search input::placeholder { color: var(--ido-portal-text-muted, #6b7280); font-weight: 400; opacity: 1; }

[dir="rtl"] .worker-hr-portal-search svg { left: auto; right: 12px; }
[dir="rtl"] .worker-hr-portal-search input { padding: 0 36px 0 12px; }

.worker-hr-portal-scroll { overflow-x: auto; }

.worker-hr-portal-grid { width: 100%; margin: 0; border-collapse: collapse; font-size: 13px; }

.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th {
    height: 44px;
    padding: 0 16px;
    border-bottom: 1px solid var(--ido-portal-line, #e5e7eb);
    background: #f9fafb;
    color: var(--ido-portal-text-muted, #6b7280);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    white-space: nowrap;
    vertical-align: middle;
}

.worker-hr-portal-card .worker-hr-portal-grid > tbody > tr > td {
    height: 56px;
    padding: 0 16px;
    border-top: 0;
    border-bottom: 1px solid var(--ido-portal-line, #e5e7eb);
    color: var(--ido-portal-text-soft, #374151);
    font-size: 13px;
    vertical-align: middle;
    /* Break between words only: "anywhere" let the browser squeeze a column to one letter wide. */
    overflow-wrap: break-word;
}

.worker-hr-portal-card .worker-hr-portal-grid > tbody > tr:hover > td { background: #f9fafb; }
.worker-hr-portal-grid .is-end { text-align: right; white-space: nowrap; }
.worker-hr-portal-grid .is-nowrap { white-space: nowrap; }

/* DataTables' own sort arrows give way to one quiet glyph; the header text stays the button DataTables listens to. */
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting,
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting_asc,
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting_desc { cursor: pointer; background: #f9fafb; background-image: none; padding-right: 32px; position: relative; }
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting::before,
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting::after,
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting_asc::before,
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting_desc::before { content: none; display: none; }
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting_asc::after,
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting_desc::after {
    content: "";
    display: block;
    position: absolute;
    right: 12px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    opacity: 1;
    transform: translateY(-25%) rotate(45deg);
}
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting_desc::after { transform: translateY(-75%) rotate(225deg); }
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting_asc,
.worker-hr-portal-card .worker-hr-portal-grid > thead > tr > th.sorting_desc { color: var(--ido-portal-text, #111827); }

.worker-hr-portal-pill.is-sm { white-space: nowrap; }

.worker-hr-portal-count-chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #78350f;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

a.worker-hr-portal-count-chip:hover,
a.worker-hr-portal-count-chip:focus { background: #fde68a; color: #78350f; text-decoration: none; }
.worker-hr-portal-none { color: #9ca3af; }

.worker-hr-portal-file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.worker-hr-portal-file-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
}
.worker-hr-portal-file-name { font-weight: 600; color: var(--ido-portal-text, #111827); }
.worker-hr-portal-file-version { font-size: 12px; color: var(--ido-portal-text-muted, #6b7280); }

/* ---- Footer and pager ------------------------------------------------------------------------- */

.worker-hr-portal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    min-height: 56px;
    padding: 0 16px;
    border-top: 0;
    font-size: 13px;
    color: var(--ido-portal-text-muted, #6b7280);
}

.worker-hr-portal-footer strong { color: var(--ido-portal-text-soft, #374151); font-weight: 600; }
.worker-hr-portal-footer-info { white-space: nowrap; }
.worker-hr-portal-info-short { display: none; }
/* Rows per page and the pager share the right-hand side; with one page the selector still sits there, not under the count. */
.worker-hr-portal-footer-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 16px; margin-left: auto; }

.worker-hr-portal-length { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 400; color: var(--ido-portal-text-muted, #6b7280); white-space: nowrap; }

/* Its own small control, not a full-width form field: room for "50" and the arrow, nothing more. */
.worker-hr-portal-length select {
    display: inline-block;
    width: 68px;
    min-width: 68px;
    height: 32px;
    margin: 0;
    padding: 0 28px 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    -webkit-appearance: none;
    appearance: none;
    color: var(--ido-portal-text, #111827);
    font: inherit;
    font-size: 13px;
    line-height: 30px;
    box-shadow: none;
    cursor: pointer;
}

[dir="rtl"] .worker-hr-portal-length select { padding: 0 12px 0 30px; background-position: left 12px center; }

.worker-hr-portal-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

.worker-hr-portal-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--ido-portal-line-strong, #d1d5db);
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.worker-hr-portal-page-btn:hover,
.worker-hr-portal-page-btn:focus { border-color: #d1d5db; color: var(--ido-portal-text, #111827); text-decoration: none; }

.worker-hr-portal-page-btn.is-step { padding: 0 12px; }
.worker-hr-portal-page-btn[aria-current="page"] {
    border-color: color-mix(in srgb, var(--ido-portal-accent, #a93593) 30%, #ffffff);
    background: var(--ido-portal-accent-soft, #fdf2fa);
    color: var(--ido-portal-accent-text, #86266f);
    font-weight: 600;
}

.worker-hr-portal-page-btn[aria-disabled="true"],
.worker-hr-portal-page-btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.worker-hr-portal-page-gap { min-width: 24px; text-align: center; color: #9ca3af; }
.worker-hr-portal-page-of { display: none; }

/* ---- Empty, no result, error ------------------------------------------------------------------ */

.worker-hr-portal-empty { padding: 56px 24px; text-align: center; }

.worker-hr-portal-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #6b7280;
}

.worker-hr-portal-empty.is-first .worker-hr-portal-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--ido-portal-accent-soft, #fdf2fa);
    color: var(--ido-portal-accent-text, #a93593);
}

.worker-hr-portal-empty.is-error .worker-hr-portal-empty-icon { background: #fee2e2; color: #b91c1c; }
.worker-hr-portal-empty-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--ido-portal-text, #111827); }
.worker-hr-portal-empty-text { max-width: 400px; margin: 6px auto 0; font-size: 14px; line-height: 1.5; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-empty .worker-hr-portal-btn { margin-top: 16px; }

/* ---- Loading and refreshing ------------------------------------------------------------------- */

@keyframes worker-hr-portal-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

.worker-hr-portal-skeleton { display: block; border-radius: 6px; background: linear-gradient(90deg, #f3f4f6 0, #e5e7eb 50%, #f3f4f6 100%); background-size: 800px 100%; animation: worker-hr-portal-shimmer 1.4s linear infinite; }
.worker-hr-portal-skeleton-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid #f3f4f6; }
.worker-hr-portal-skeleton-lines { flex: 1; display: grid; gap: 8px; }
.worker-hr-portal-status-line { margin: 0; padding: 14px 20px; font-size: 14px; color: var(--ido-portal-text-muted, #6b7280); }

.worker-hr-portal-card.is-refreshing .worker-hr-portal-grid tbody { opacity: 0.55; transition: opacity 0.15s ease; }

.worker-hr-portal-card.is-refreshing::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ido-portal-accent, #a93593) 0 35%, var(--ido-portal-accent-soft, #fdf2fa) 35% 100%);
    background-size: 200% 100%;
    animation: worker-hr-portal-shimmer 1.2s linear infinite;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .worker-hr-portal-skeleton,
    .worker-hr-portal-card.is-refreshing::before { animation: none; }
}

/* DataTables' own processing box and controls are replaced by the card's states and footer. */
.worker-hr-portal-card .dataTables_processing,
.worker-hr-portal-card .dataTables_length,
.worker-hr-portal-card .dataTables_filter,
.worker-hr-portal-card .dataTables_info,
.worker-hr-portal-card .dataTables_paginate { display: none !important; }
.worker-hr-portal-card .dataTables_wrapper { padding: 0; }
.worker-hr-portal-card table.dataTable { margin: 0 !important; border-collapse: collapse !important; }
.worker-hr-portal-card .dataTables_empty { display: none; }

[hidden] { display: none !important; }

/* ---- Change requests: approvals bar, details row ------------------------------------------------- */

.worker-hr-portal-steps { display: flex; gap: 3px; margin-bottom: 6px; }
.worker-hr-portal-steps span { width: 22px; height: 6px; border-radius: 3px; background: #d1d5db; }
.worker-hr-portal-steps span.is-approved { background: #16a34a; }
.worker-hr-portal-steps span.is-rejected { background: #dc2626; }
.worker-hr-portal-steps span.is-skipped { background: #e5e7eb; }
.worker-hr-portal-steps-text { font-size: 12px; color: var(--ido-portal-text-soft, #374151); }
.worker-hr-portal-cell-note { display: block; font-size: 12px; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-cell-strong { display: block; font-weight: 500; color: var(--ido-portal-text, #111827); }

.worker-hr-portal-disclose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--ido-portal-line, #e5e7eb);
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
}

.worker-hr-portal-disclose svg { transition: transform 0.15s ease; }
.worker-hr-portal-disclose[aria-expanded="true"] svg { transform: rotate(90deg); }
[dir="rtl"] .worker-hr-portal-disclose svg { transform: scaleX(-1); }
[dir="rtl"] .worker-hr-portal-disclose[aria-expanded="true"] svg { transform: rotate(90deg); }
.worker-hr-portal-card .worker-hr-portal-grid > tbody > tr.is-open > td { border-bottom: 0; }
.worker-hr-portal-card .worker-hr-portal-grid > tbody > tr.worker-hr-portal-details-row > td { padding: 4px 20px 18px 56px; background: #f9fafb; }
.worker-hr-portal-card .worker-hr-portal-grid > tbody > tr.worker-hr-portal-details-row:hover > td { background: #f9fafb; }

.worker-hr-portal-details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; font-size: 13px; }
.worker-hr-portal-details-label { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-details-grid p { margin: 0; color: var(--ido-portal-text, #111827); }
.worker-hr-portal-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.worker-hr-portal-actions form { display: inline; margin: 0; }

/* ---- Dialog (a reason) and drawer (the edit form) ------------------------------------------------ */

.worker-hr-portal-dialog .modal-dialog { width: 460px; max-width: calc(100% - 32px); margin: 15vh auto 0; }
.worker-hr-portal-dialog .modal-content,
.worker-hr-portal-drawer .modal-content { border: 0; border-radius: 14px; box-shadow: 0 20px 48px rgba(15, 23, 42, 0.25); font-family: var(--ido-font-portal, "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif); }
.worker-hr-portal-dialog .modal-header,
.worker-hr-portal-drawer .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 8px; border-bottom: 0; }
.worker-hr-portal-dialog .modal-title { font-size: 17px; font-weight: 700; }
.worker-hr-portal-dialog .modal-body { padding: 0 22px 16px; }
.worker-hr-portal-dialog .modal-footer,
.worker-hr-portal-drawer .modal-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--ido-portal-line, #e5e7eb); background: #f9fafb; border-radius: 0 0 14px 14px; }
.worker-hr-portal-dialog textarea { min-height: 84px; border: 1px solid #d1d5db; border-radius: 10px; resize: vertical; }
.worker-hr-portal-dialog-text { margin: 0 0 14px; font-size: 13px; color: var(--ido-portal-text-muted, #6b7280); }

.worker-hr-portal-close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    color: #374151;
    opacity: 1;
    cursor: pointer;
}

/* The edit form as a panel on the right: same Bootstrap modal, same focus trap, Esc and backdrop. */
.modal.worker-hr-portal-drawer .modal-dialog {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 600px;
    max-width: 100%;
    margin: 0;
    transform: translateX(24px);
    transition: transform 0.2s ease-out;
}

.modal.worker-hr-portal-drawer.in .modal-dialog { transform: none; }
.modal.worker-hr-portal-drawer form { height: 100%; }
.modal.worker-hr-portal-drawer .modal-content { display: flex; flex-direction: column; height: 100%; border-radius: 0; box-shadow: -16px 0 40px rgba(15, 23, 42, 0.18); }
.modal.worker-hr-portal-drawer .modal-header { padding: 22px 28px; border-bottom: 1px solid var(--ido-portal-line, #e5e7eb); }
.modal.worker-hr-portal-drawer .modal-body { flex: 1; overflow-y: auto; padding: 20px 28px 28px; }
.modal.worker-hr-portal-drawer .modal-footer { justify-content: space-between; padding: 16px 28px; border-radius: 0; background: #ffffff; }
.worker-hr-portal-drawer-kicker { margin: 0 0 4px; font-size: 13px; color: var(--ido-portal-text-muted, #6b7280); }
.modal.worker-hr-portal-drawer .modal-title { font-size: 20px; font-weight: 700; }
[dir="rtl"] .modal.worker-hr-portal-drawer .modal-dialog { right: auto; left: 0; transform: translateX(-24px); }
[dir="rtl"] .modal.worker-hr-portal-drawer.in .modal-dialog { transform: none; }

@media (prefers-reduced-motion: reduce) { .modal.worker-hr-portal-drawer .modal-dialog { transition: none; } }

.worker-hr-portal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 20px; padding: 0; list-style: none; font-size: 12px; color: var(--ido-portal-text-soft, #374151); }
.worker-hr-portal-legend li { display: inline-flex; align-items: center; gap: 6px; }

.worker-hr-portal-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.worker-hr-portal-dot.is-direct { background: #16a34a; }
.worker-hr-portal-dot.is-approval { background: #d97706; }

.worker-hr-portal-sections { display: block; }
.worker-hr-portal-fieldset { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }

.worker-hr-portal-fieldset > legend {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    width: auto;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ido-portal-text-muted, #6b7280);
}

.worker-hr-portal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.worker-hr-portal-form-grid .form-group { min-width: 0; margin-bottom: 12px; }
.worker-hr-portal-form-grid .form-group.is-wide { grid-column: 1 / -1; }
.worker-hr-portal-form-grid .control-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--ido-portal-text, #111827); }

.worker-hr-portal-drawer .form-control,
.worker-hr-portal-drawer .bootstrap-select > .dropdown-toggle { min-height: 42px; border-color: #d1d5db; border-radius: 10px; box-shadow: none; }
.worker-hr-portal-drawer .form-control[disabled],
.worker-hr-portal-drawer .bootstrap-select.disabled > .dropdown-toggle { background: #f9fafb; border-color: #e5e7eb; color: #6b7280; }
.worker-hr-portal-drawer .form-group.is-changed .form-control,
.worker-hr-portal-drawer .form-group.is-changed .bootstrap-select > .dropdown-toggle { border-color: var(--ido-portal-accent, #a93593); box-shadow: 0 0 0 3px var(--ido-portal-accent-soft, #fdf2fa); }
.worker-hr-portal-was { display: block; margin-top: 6px; font-size: 12px; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-note { margin: 0; padding: 14px 16px; border: 1px solid var(--ido-portal-line, #e5e7eb); border-radius: 12px; background: #f9fafb; font-size: 13px; line-height: 1.5; color: var(--ido-portal-text-soft, #374151); }
.worker-hr-portal-summary-line { margin: 0; font-size: 13px; color: var(--ido-portal-text-soft, #374151); }
.worker-hr-portal-summary-line strong { color: var(--ido-portal-text, #111827); }
.worker-hr-portal-footer-actions { display: flex; gap: 8px; }

/* ---- Phone -------------------------------------------------------------------------------- */

@media (max-width: 767px) {
    .worker-hr-portal-toolbar { flex-direction: column; align-items: stretch; }
    .worker-hr-portal-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .worker-hr-portal-filter { flex: none; height: 36px; }
    .worker-hr-portal-search { width: 100%; }
    .worker-hr-portal-search input { height: 44px; font-size: 15px; }

    .worker-hr-portal-form-grid { grid-template-columns: minmax(0, 1fr); }
    .modal.worker-hr-portal-drawer .modal-header,
    .modal.worker-hr-portal-drawer .modal-body,
    .modal.worker-hr-portal-drawer .modal-footer { padding-left: 18px; padding-right: 18px; }
    .worker-hr-portal-grid > tbody > tr.worker-hr-portal-details-row > td { padding: 4px 16px 16px; }
}

/* ---- The list at every width (board "Employees list": columns leave first at 834, cards under 480) ------------------------------ */
@media (max-width: 1023px) {
    .worker-hr-portal-info-long { display: none; }
    .worker-hr-portal-info-short { display: inline; }
    .worker-hr-portal-step-text { display: none; }
    .worker-hr-portal-page-btn.is-step { padding: 0; }
    .worker-hr-portal-pager .worker-hr-portal-page-btn:not(.is-step):not([aria-current="page"]),
    .worker-hr-portal-pager .worker-hr-portal-page-gap { display: none; }
}
@media (max-width: 479px) {
    .worker-hr-portal-length > span:first-child { display: none; }
    .worker-hr-portal-search input { height: 40px; font-size: 13px; }
}

@media (max-width: 575px) {
    /* Count and size on the first line, the arrows with "Page n of m" under them (board "The pager, at every width"). */
    .worker-hr-portal-footer { padding: 12px 16px; }
    .worker-hr-portal-footer-right { display: contents; }
    .worker-hr-portal-footer-info { order: 1; }
    .worker-hr-portal-length { order: 2; margin-left: auto; }
    .worker-hr-portal-pager { order: 3; width: 100%; justify-content: space-between; }
    .worker-hr-portal-pager .worker-hr-portal-page-btn:not(.is-step),
    .worker-hr-portal-pager .worker-hr-portal-page-gap { display: none; }
    .worker-hr-portal-pager .worker-hr-portal-page-btn.is-step { min-width: 40px; height: 40px; }
    .worker-hr-portal-page-of { display: inline; font-size: 13px; font-weight: 600; color: var(--ido-portal-text, #111827); }
}

/* ---- The change confirmation in the portal ---------------------------------------------------------- */

/*
 * People's own confirmation (term_confirm_modal: when it applies, why, evidence) opens after the drawer. It is shared with the
 * admin screens, so only its look changes here, and only on portal pages: the portal's corners, type and tenant-coloured buttons.
 */
body.customers .people-term-confirm-modal .modal-content { border: 0; border-radius: 14px; box-shadow: 0 20px 48px rgba(15, 23, 42, 0.25); font-family: var(--ido-font-portal, "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif); }
body.customers .people-term-confirm-modal .modal-header { padding: 20px 22px 8px; border-bottom: 0; }
body.customers .people-term-confirm-modal .modal-title { font-size: 18px; font-weight: 700; }
body.customers .people-term-confirm-modal .modal-body { padding: 8px 22px 16px; }
body.customers .people-term-confirm-modal .modal-footer { padding: 14px 22px; border-top: 1px solid var(--ido-portal-line, #e5e7eb); background: #f9fafb; border-radius: 0 0 14px 14px; }
body.customers .people-term-confirm-modal .form-control { border-color: #d1d5db; border-radius: 10px; box-shadow: none; }
body.customers .people-term-confirm-modal .btn { height: 40px; padding: 0 16px; border-radius: 10px; font-weight: 500; }
body.customers .people-term-confirm-modal .btn-primary { border-color: var(--ido-portal-accent, #a93593); background: var(--ido-portal-accent, #a93593); color: var(--ido-portal-on-accent, #ffffff); font-weight: 600; }
body.customers .people-term-confirm-modal .btn-primary:hover,
body.customers .people-term-confirm-modal .btn-primary:focus { border-color: var(--ido-portal-accent-hover, #86266f); background: var(--ido-portal-accent-hover, #86266f); color: var(--ido-portal-on-accent, #ffffff); }

/* ============================================================================================================================
 * Prototype v3 (canvas "Client portal": Employees list and filters, Documents at scale, Employee header, Request a change).
 * Every colour is a portal role (the tenant's accent, text, line); sizes are the foundations scale (12 13 14 16 24, spacing 4 8 12 16 24).
 * ========================================================================================================================== */

/* ---- Select (portal_select.js): a button and a listbox; the native select stays underneath, hidden --------------------------- */
.worker-hr-portal-select { position: relative; display: inline-flex; align-items: center; max-width: 100%; }
.worker-hr-portal-select-native { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.worker-hr-portal-select-btn {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 120px; max-width: 240px; height: 40px; padding: 0 12px;
    border: 1px solid var(--ido-portal-line-strong, #d1d5db); border-radius: 10px; background: #ffffff; color: var(--ido-portal-text, #111827);
    font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; box-shadow: none;
}
.worker-hr-portal-select.is-sm .worker-hr-portal-select-btn { height: 36px; min-width: 76px; border-radius: 8px; }
.worker-hr-portal-select-btn:hover { border-color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-select-btn:focus-visible,
.worker-hr-portal-select-clear:focus-visible { outline: 2px solid var(--ido-portal-accent, #a93593); outline-offset: 1px; }
.worker-hr-portal-select-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worker-hr-portal-select.is-placeholder .worker-hr-portal-select-text { color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-select.has-value .worker-hr-portal-select-btn {
    border-color: var(--ido-portal-accent, #a93593); background: var(--ido-portal-accent-soft, #fdf2fa); color: var(--ido-portal-accent-text, #86266f); padding-right: 36px;
}
.worker-hr-portal-select-caret { display: inline-flex; flex: none; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-select-clear {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
    border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
}
.worker-hr-portal-select-clear:hover { background: rgba(0, 0, 0, 0.06); }
.worker-hr-portal-select-menu {
    position: fixed; z-index: 1060; max-height: 320px; overflow: auto; padding: 4px; background: #ffffff; border: 1px solid var(--ido-portal-line, #e5e7eb);
    border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}
.worker-hr-portal-select-menu ul { margin: 0; padding: 0; list-style: none; }
.worker-hr-portal-select-menu li { padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--ido-portal-text, #111827); cursor: pointer; }
.worker-hr-portal-select-menu li.is-active,
.worker-hr-portal-select-menu li:hover { background: var(--ido-portal-accent-soft, #fdf2fa); }
.worker-hr-portal-select-menu li[aria-selected="true"] { font-weight: 600; color: var(--ido-portal-accent-text, #86266f); }
.worker-hr-portal-select-menu li.is-empty { cursor: default; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-select-search { width: 100%; height: 36px; margin: 0 0 4px; padding: 0 12px; border: 1px solid var(--ido-portal-line-strong, #d1d5db); border-radius: 8px; font: inherit; font-size: 14px; }
.worker-hr-portal-length .worker-hr-portal-select-btn,
.worker-hr-portal-length .worker-hr-portal-select.has-value .worker-hr-portal-select-btn {
    height: 32px; min-width: 68px; padding: 0 10px 0 12px; border-color: var(--ido-portal-line-strong, #d1d5db); background: #ffffff; color: var(--ido-portal-text, #111827); font-size: 13px;
}

/* ---- Tabs row and the People-look toolbar ------------------------------------------------------------------------------------ */
.worker-hr-portal-tabbar {
    display: block;
    padding: 0 16px;
    background: #ffffff;
}
.worker-hr-portal-tabbar .worker-hr-portal-filters {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 24px;
    height: 48px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    border-bottom: 1px solid var(--ido-portal-line, #e5e7eb);
}
.worker-hr-portal-search.is-form { flex: 0 1 280px; }
.worker-hr-portal-search.is-block { width: 100%; max-width: none; margin-bottom: 12px; }
.worker-hr-portal-link, .worker-hr-portal-link-button { padding: 0; border: 0; background: none; color: var(--ido-portal-link, var(--ido-portal-accent-text, #86266f)); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.worker-hr-portal-link:hover, .worker-hr-portal-link-button:hover { text-decoration: underline; }
.worker-hr-portal-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 20px 12px; border-bottom: 1px solid var(--ido-portal-line, #e5e7eb); font-size: 13px; }
.worker-hr-portal-applied-label { color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-chip.is-applied {
    display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--ido-portal-accent-soft, #fdf2fa);
    color: var(--ido-portal-accent-text, #86266f); font-size: 13px; font-weight: 500;
}
.worker-hr-portal-chip.is-applied button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; line-height: 1; cursor: pointer; }

/* ---- Documents at scale ----------------------------------------------------------------------------------------------------- */
.worker-hr-portal-docs-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.worker-hr-portal-rail { padding: 12px; border-right: 1px solid var(--ido-portal-line, #e5e7eb); max-height: 560px; overflow: auto; }
.worker-hr-portal-rail-item {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 2px; padding: 8px 12px; border: 0; border-radius: 8px;
    background: transparent; color: var(--ido-portal-text-soft, #374151); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.worker-hr-portal-rail-item:hover { background: var(--ido-portal-surface-2, #f9fafb); }
.worker-hr-portal-rail-item[aria-pressed="true"] { background: var(--ido-portal-accent-soft, #fdf2fa); color: var(--ido-portal-accent-text, #86266f); font-weight: 600; }
.worker-hr-portal-rail-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worker-hr-portal-docs-list { min-width: 0; }
.worker-hr-portal-select.is-docs-category { display: none; }
.worker-hr-portal-file { display: flex; align-items: center; gap: 8px; min-width: 0; }
.worker-hr-portal-file-name { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; text-align: left; }
.worker-hr-portal-file-sub { display: block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--ido-font-mono, "IBM Plex Mono", ui-monospace, monospace); font-size: 12px; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-cell-main { display: block; }
.worker-hr-portal-cell-sub { display: block; font-size: 12px; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-status { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 13px; font-weight: 500; }
.worker-hr-portal-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.worker-hr-portal-status.is-danger { color: #991b1b; }
.worker-hr-portal-status.is-warning { color: #92400e; }
.worker-hr-portal-sheet { position: fixed; inset: 0; z-index: 1070; display: flex; align-items: center; justify-content: flex-end; background: rgba(15, 23, 42, 0.4); }
.worker-hr-portal-sheet[hidden] { display: none; }
.worker-hr-portal-sheet-panel {
    width: 420px; max-width: 100%; height: 100%; overflow: auto; padding: 24px; background: #ffffff; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.worker-hr-portal-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.worker-hr-portal-sheet-head h2 { margin: 0; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.worker-hr-portal-sheet-status { margin: 8px 0 0; font-size: 13px; font-weight: 500; color: #92400e; }
.worker-hr-portal-sheet-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.worker-hr-portal-sheet-facts dt { font-size: 13px; font-weight: 400; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-sheet-facts dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.worker-hr-portal-sheet-facts .is-wide { grid-column: 1 / -1; }
.worker-hr-portal-sheet-facts .is-mono { font-family: var(--ido-font-mono, "IBM Plex Mono", ui-monospace, monospace); font-size: 13px; }
.worker-hr-portal-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.worker-hr-portal-sheet-open { overflow: hidden; }

/* ---- Employee header: code, compact bar -------------------------------------------------------------------------------------- */
.worker-hr-portal-code { font-family: var(--ido-font-mono, "IBM Plex Mono", ui-monospace, monospace); font-size: 13px; font-weight: 400; color: var(--ido-portal-text-muted, #6b7280); white-space: nowrap; }
.worker-hr-portal-compact {
    position: fixed; z-index: 1030; top: 0; left: 0; right: 0; height: 56px; background: #ffffff; border-bottom: 1px solid var(--ido-portal-line, #e5e7eb);
    padding-top: env(safe-area-inset-top, 0px);
}
.worker-hr-portal-compact[hidden] { display: none; }
.worker-hr-portal-compact-inner { display: flex; align-items: center; gap: 12px; max-width: 1280px; height: 56px; margin: 0 auto; padding: 0 24px; }
.worker-hr-portal-compact-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; }
.worker-hr-portal-compact-action { margin-left: auto; flex: none; }
.worker-hr-portal-compact .worker-hr-portal-code { margin-left: 0; }
@media (max-width: 575px) {
    .worker-hr-portal-compact, .worker-hr-portal-compact-inner { height: 48px; }
    .worker-hr-portal-compact-inner { padding: 0 16px; }
    .worker-hr-portal-compact .worker-hr-portal-code { display: none; }
    .worker-hr-portal-compact-action .worker-hr-portal-btn { width: 36px; padding: 0; font-size: 0; }
    .worker-hr-portal-compact-action .worker-hr-portal-btn svg { margin: 0; }
}
@media (prefers-reduced-motion: no-preference) {
    .worker-hr-portal-compact { animation: worker-hr-portal-compact-in 0.15s ease; }
}
@keyframes worker-hr-portal-compact-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- Employee tabs: sub-headings, pending box, pencil ------------------------------------------------------------------------- */
.worker-hr-portal-subsection { margin: 0 0 16px; padding: 24px; background: #ffffff; border: 1px solid var(--ido-portal-line, #e5e7eb); border-radius: 16px; }
.worker-hr-portal-subsection:last-child { margin-bottom: 0; }
.worker-hr-portal-subsection-head { margin-bottom: 16px; }
.worker-hr-portal-subsection-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--ido-portal-text, #111827); }
.worker-hr-portal-subsection-note { margin: 4px 0 0; font-size: 13px; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-never-shown { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.worker-hr-portal-value-line { display: inline-flex; align-items: center; gap: 8px; }
.worker-hr-portal-pencil {
    display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent;
    color: var(--ido-portal-text-muted, #6b7280); cursor: pointer; opacity: 0;
}
/* In a section card the pencil sits at the end of the label line (board "Employee page": 24 px, on hover and focus, always on touch). */
.worker-hr-portal-fields .worker-hr-portal-pencil { position: absolute; top: 0; right: 0; border-radius: 8px; }
.worker-hr-portal-pencil:hover { background: var(--ido-portal-surface-2, #f9fafb); color: var(--ido-portal-text, #111827); }
.worker-hr-portal-field:hover .worker-hr-portal-pencil,
.worker-hr-portal-pencil:focus-visible { opacity: 1; }
@media (hover: none) { .worker-hr-portal-pencil { opacity: 1; } }
.worker-hr-portal-pending {
    display: block; margin-top: 8px; padding: 8px 12px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: var(--ido-portal-text-soft, #374151); font-size: 13px; line-height: 1.45;
}
/* The chip rides on the label line, the box says what was asked under the value (board "Change requests: states"). */
.worker-hr-portal-field.has-pending { position: relative; }
.worker-hr-portal-pending-chip { display: inline-flex; align-items: center; height: 20px; margin-right: 8px; padding: 0 8px; border-radius: 999px; background: #eff6ff; color: #1e40af; font-size: 12px; font-weight: 600; white-space: nowrap; }
.worker-hr-portal-pending-text { display: inline; }
.worker-hr-portal-pending-link { margin-left: 4px; font-weight: 600; color: #1e3a8a; text-decoration: none; }
.worker-hr-portal-fieldset input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.worker-hr-portal-fieldset input[type="number"]::-webkit-outer-spin-button,
.worker-hr-portal-fieldset input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Request a change: steps, picker, review --------------------------------------------------------------------------------- */
.worker-hr-portal-wizard-steps { display: flex; gap: 16px; margin: 0; padding: 12px 24px; list-style: none; border-bottom: 1px solid var(--ido-portal-line, #e5e7eb); font-size: 13px; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-wizard-steps li { display: inline-flex; align-items: center; gap: 8px; }
.worker-hr-portal-wizard-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ido-portal-surface-2, #f3f4f6); font-weight: 600; }
.worker-hr-portal-wizard-steps li.is-current { color: var(--ido-portal-text, #111827); font-weight: 600; }
.worker-hr-portal-wizard-steps li.is-current .worker-hr-portal-wizard-num,
.worker-hr-portal-wizard-steps li.is-done .worker-hr-portal-wizard-num { background: var(--ido-portal-accent, #a93593); color: var(--ido-portal-on-accent, #ffffff); }
.worker-hr-portal-picker-heading { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--ido-portal-text-soft, #374151); }
.worker-hr-portal-picker-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--ido-portal-line, #e5e7eb); border-radius: 12px; margin-bottom: 8px; }
.worker-hr-portal-picker-row.is-locked { background: var(--ido-portal-surface-2, #f9fafb); color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-picker-box { flex: none; margin: 0; }
.worker-hr-portal-picker-label { display: flex; flex: 1; min-width: 0; flex-direction: column; margin: 0; font-weight: 400; cursor: pointer; }
.worker-hr-portal-picker-name { font-size: 14px; font-weight: 600; }
.worker-hr-portal-picker-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-picker-tag { flex: none; font-size: 12px; font-weight: 500; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-picker-count { margin: 12px 0 0; font-size: 13px; color: var(--ido-portal-text-soft, #374151); }
.worker-hr-portal-now { margin: 0 0 4px; font-size: 13px; color: var(--ido-portal-text-muted, #6b7280); }
.worker-hr-portal-review-list { margin: 0 0 16px; padding: 0; list-style: none; }
.worker-hr-portal-review-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px; border: 1px solid var(--ido-portal-line, #e5e7eb); border-radius: 12px; margin-bottom: 8px; }
.worker-hr-portal-review-name { flex: 1 1 140px; font-size: 14px; }
.worker-hr-portal-review-before { color: var(--ido-portal-text-muted, #6b7280); text-decoration: line-through; margin-right: 8px; }
.worker-hr-portal-review-arrow { margin-right: 8px; }
.worker-hr-portal-review-outcome { flex-basis: 100%; font-size: 13px; color: var(--ido-portal-text-soft, #374151); }
.worker-hr-portal-review-outcome.is-approval { color: #1e40af; }
.worker-hr-portal-review-own { flex-basis: 100%; }
.worker-hr-portal-review-label { display: block; margin: 8px 0 4px; font-size: 13px; font-weight: 400; }
.worker-hr-portal-review-error { flex-basis: 100%; margin: 0; font-size: 13px; color: #991b1b; }
.worker-hr-portal-problems { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; font-size: 13px; }
.worker-hr-portal-problems ul { margin: 8px 0 0; padding-left: 16px; }
.worker-hr-portal-problems p { margin: 4px 0 0; }
.worker-hr-portal-review-sentence { margin: 0 0 12px; font-size: 13px; color: var(--ido-portal-text-soft, #374151); }
.worker-hr-portal-answer { margin: 0; padding: 0; border: 0; }
.worker-hr-portal-answer-mode { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; font-size: 14px; }
.worker-hr-portal-answer-mode label { margin: 0; font-weight: 400; }
.worker-hr-portal-count { display: block; text-align: right; font-size: 12px; color: var(--ido-portal-text-muted, #6b7280); }

/* ---- Folds: the toolbar is one line; narrower than a tablet the rail is a select and the cards stack ---------------------------- */
@media (max-width: 991px) {
    .worker-hr-portal-docs-body { grid-template-columns: minmax(0, 1fr); }
    .worker-hr-portal-rail { display: none; }
    .worker-hr-portal-select.is-docs-category { display: inline-flex; }
    .worker-hr-portal-select.is-inline-filter { display: none; }
    .worker-hr-portal-applied { display: none; }
}
@media (max-width: 767px) {
    .worker-hr-portal-sheet-panel { width: 100%; height: auto; max-height: 85vh; margin-top: auto; border-radius: 16px 16px 0 0; }
    .worker-hr-portal-sheet { align-items: flex-end; }
    .worker-hr-portal-wizard-steps { padding: 12px 16px; gap: 8px; }
}
@media (max-width: 575px) {
    .worker-hr-portal-select.is-docs-sort { display: none; }
    .worker-hr-portal-subsection { padding: 16px; }
    .worker-hr-portal-sheet-facts { grid-template-columns: 1fr; }
}
@media (max-width: 479px) {
    .worker-hr-portal-footer { flex-direction: column; align-items: stretch; }
    .worker-hr-portal-pager .worker-hr-portal-page-btn:not(.is-step):not([aria-current="page"]),
    .worker-hr-portal-pager .worker-hr-portal-page-gap { display: none; }
    .worker-hr-portal-page-of { display: inline; font-size: 13px; color: var(--ido-portal-text-soft, #374151); }
}
@media (prefers-reduced-motion: reduce) {
    .worker-hr-portal-compact { animation: none; }
}

/* The compact header's status: a dot and a word, in the status text colours of the foundations. */
.worker-hr-portal-compact-status { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 13px; font-weight: 500; color: var(--ido-portal-text-soft, #374151); }
.worker-hr-portal-compact-status .worker-hr-portal-pill-dot { background: currentColor; }
.worker-hr-portal-compact-status.is-success { color: #065f46; }
.worker-hr-portal-compact-status.is-warning { color: #92400e; }
.worker-hr-portal-compact-status.is-danger { color: #991b1b; }
.worker-hr-portal-compact-status.is-info { color: #1e40af; }

/* Touch targets (portal audit p5): on a tablet or a phone the small controls of the portal pages are 40 high at least, or have a
   40 high hit area. The layout does not move: padding is cancelled by an equal negative margin where the control sits in a row. */
@media (max-width: 834px), (pointer: coarse) {
  body.ido-portal .ido-field__input { min-height: 40px; }
  body.ido-portal .ido-breadcrumb__back { display: inline-flex; align-items: center; min-height: 40px; }
  body.ido-portal .ido-list-rows__toggle { min-width: 40px; min-height: 40px; }
  body.ido-portal .ido-dt-person__name,
  body.ido-portal .ido-breadcrumb__link { display: inline-block; padding: 11px 0; margin: -11px 0; }
}

/* The list search is 40 high at every width (board: search 300 x 40; the DataTables input drew 38). */
body.ido-portal .dataTables_filter input.form-control { min-height: 40px; }
