/* site/pages-people.css — Page areas: people and VB Admin screens (HR, schedule, payroll, fines, collections, loyalty, QA fixes, people picker). Order: wwwroot/README.md. */
/* === area: phr === */
.hr-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hr-steps li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; white-space: normal; } /* long step messages (the VPN manual step) wrap instead of being clipped by table.list td */
.hr-steps form.inline, form.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.match-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 360px; }
.match-form select { flex: 1 1 180px; min-width: 0; }
.hours-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.hours-grid label { display: grid; gap: 4px; font-weight: 700; }
.hours-grid input { width: 100%; min-width: 0; }
.tf-card { max-width: 520px; }
.tf-steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.tf-qr { margin: 8px 0; }
.tf-key { font-size: 15px; letter-spacing: .08em; word-break: break-all; }
/* One-time recovery codes, shown once after enrolment: two columns of monospaced codes on a quiet surface. */
.tf-codes { margin: 0; padding: 12px 16px 12px 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tf-codes code { font-size: 15px; letter-spacing: .06em; }
.tf-recovery summary { cursor: pointer; color: var(--link); font-size: 13px; }
.tf-recovery[open] summary { margin-bottom: 8px; }
/* «Журнал каси → Конфлікти синхронізації»: the server's reason is the point of the row — it wraps and keeps room. */
table.pos-conflicts .reason { min-width: 220px; white-space: normal; }
table.pos-conflicts .kind { min-width: 180px; }
table.pos-conflicts .badge { white-space: normal; }
.audit-changes { margin-top: 8px; }
.audit-changes td { white-space: normal; }
/* Long option texts (store, FOP and employee names) must not widen the form past the content area. */
.phr-form .fields > *, .phr-form .fields label { min-width: 0; }
.phr-form select, .phr-form input:not([type=checkbox]):not([type=radio]) { width: 100%; min-width: 0; max-width: 100%; }
.phr-form .fields .checks { align-self: end; }

/* === area: psched === */
/* «Персонал → Графік / Табель»: a month matrix — store (or person) × day, the first column sticky, colour per person. */
.psched-month { min-width: 120px; text-align: center; }
.psched-views { margin-right: 4px; }
.psched-scroll { overflow-x: auto; max-width: 100%; }
.psched-matrix { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; font-size: 12px; line-height: 16px; }
.psched-matrix th, .psched-matrix td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; background: var(--surface); }
.psched-matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--text-2); font-weight: 700; }
.psched-matrix .psched-name { position: sticky; left: 0; z-index: 1; width: 220px; min-width: 220px; max-width: 220px; padding: 6px 8px; text-align: left; font-weight: 400; }
.psched-matrix thead .psched-name { z-index: 3; }
.psched-store { display: flex; align-items: center; gap: 4px; font-weight: 700; color: var(--heading); }
.psched-store .trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.psched-meta { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; margin-top: 2px; font-size: 12px; }
.psched-fill { display: inline-flex; margin: 0; }
.psched-key { width: 24px; height: 24px; min-height: 0; padding: 0; color: var(--faint); }
.psched-key.on { color: var(--accent); }
.psched-key svg { width: 14px; height: 14px; }
.psched-day { width: 64px; min-width: 64px; max-width: 64px; padding: 4px 2px; text-align: center; }
.psched-day span { display: block; font-size: 13px; color: var(--heading); }
.psched-day small { display: block; font-size: 11px; font-weight: 400; }
.psched-matrix .we { background: var(--surface-2); }
.psched-matrix .p-today { box-shadow: inset 0 -2px 0 var(--accent); }
.psched-cell { position: relative; height: 34px; width: 64px; max-width: 64px; text-align: center; overflow: hidden; }
.psched-btn { display: block; width: 100%; height: 100%; min-height: 34px; padding: 2px 3px; border: 0; background: transparent; color: var(--text);
    font: inherit; font-size: 12px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psched-matrix.read-only .psched-btn { cursor: default; }
.store-create-form .required-mark { color: var(--danger); }
.store-create-form .validation-summary:not(:empty) { margin: 0 0 16px; color: var(--danger); font-size: 13px; font-weight: 700; }
.psched-btn:hover { background: var(--accent-soft); }
.psched-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.psched-cell.free .psched-btn { color: var(--faint); }
.psched-cell.is-assigned .psched-btn { border-color: transparent; font-weight: 700; }
.psched-cell.is-free .psched-btn { color: #16875d; background: #eaf8f2; border-color: #a7dec9; }
.psched-cell.tone-blue .psched-btn { background: #eaf2ff; border-color: #b8ceff; color: #2454b7; }
.psched-cell.tone-violet .psched-btn { background: #f1ecff; border-color: #d2c1ff; color: #6540bb; }
.psched-cell.tone-amber .psched-btn { background: #fff3d5; border-color: #efd397; color: #80520d; }
.psched-cell.tone-teal .psched-btn { background: #e7f8f6; border-color: #a9ded8; color: #13786f; }
.psched-cell.tone-orange .psched-btn { background: #fff0e7; border-color: #f2c4a8; color: #a04f1f; }
.psched-note { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); pointer-events: none; }
.psched-legend .psched-note { position: static; display: inline-block; vertical-align: middle; }
.psched-legend svg { width: 14px; height: 14px; vertical-align: middle; }
.psched-legend { margin: 8px 16px 12px; }
.psched-total { width: 64px; min-width: 64px; padding: 4px 8px; text-align: right; white-space: nowrap; }
.psched-total.short { color: var(--warn); font-weight: 700; }
.psched-ts .ts { font-variant-numeric: tabular-nums; }
.psched-ts .ts.worked { color: var(--heading); font-weight: 700; }
.psched-ts .ts.absent { color: var(--danger); font-weight: 700; }
.psched-ts .ts.flagged { box-shadow: inset 0 0 0 2px var(--warn-border); }
.psched-ts .psched-group th, .psched-ts .psched-group td { background: var(--surface-2); font-weight: 700; color: var(--heading); }
.psched-ts .ts .psched-btn { font-size: 14px; color: var(--ok); font-weight: 700; }
.psched-add { margin-top: 16px; }
.psched-add-forms { display: grid; gap: 12px; padding: 8px 0; }
.psched-add-forms .picker-row { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.psched-add-forms label { display: grid; gap: 4px; min-width: 0; flex: 1 1 280px; max-width: 520px; }
.psched-add-forms select { width: 100%; min-width: 0; }
.psched-card .psched-assign, .psched-card .psched-comment, .psched-card .psched-hours-form { display: grid; gap: 8px; margin-bottom: 12px; }
.psched-card label { display: grid; gap: 4px; font-weight: 700; }
.psched-card select, .psched-card textarea, .psched-card input:not([type=hidden]) { width: 100%; min-width: 0; }
.psched-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.psched-comments { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.psched-comments li { padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; align-items: flex-start; gap: 10px; }
.psched-comments li.is-system { background: var(--surface-2); }
.psched-comment-avatar { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; }
.psched-comment-content { min-width: 0; display: grid; gap: 3px; }
.psched-comment-main { white-space: pre-wrap; }
.psched-comment-separator { color: var(--muted); }
.psched-comment-detail { color: var(--muted); white-space: pre-wrap; }
.psched-comment-time { color: var(--muted); font-size: 12px; }
.psched-comments .psched-comment-empty { border: 0; color: var(--muted); padding: 4px 0; }
.cashier-activity-feed { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.cashier-activity-feed li { padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; align-items: flex-start; gap: 10px; }
.cashier-activity-feed li.is-system { background: var(--surface-2); }
.cashier-activity-avatar { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; }
.cashier-activity-content { min-width: 0; display: grid; gap: 3px; }
.cashier-activity-detail, .cashier-activity-time { color: var(--muted); }
.cashier-activity-empty { color: var(--muted); }
.employee-directory-workspace .employee-directory-toolbar { align-items: end; flex-wrap: wrap; gap: 12px; }
.employee-directory-workspace .employee-directory-toolbar .search { flex: 1 1 300px; }
.employee-page-size { display: grid; gap: 4px; min-width: 150px; color: var(--muted); font-size: 12px; }
.employee-directory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.employee-directory-actions .btn { white-space: nowrap; }
.employee-name-link { border: 0; padding: 0; background: transparent; color: var(--accent); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.employee-directory-filter-options, .employee-directory-column-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.employee-directory-filter-options fieldset { display: grid; align-content: start; gap: 8px; max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.employee-directory-filter-options legend { padding: 0 4px; font-weight: 700; }
.employee-directory-filter-options fieldset > input[type=search] { position: sticky; top: 0; }
.employee-directory-workspace [data-employee-list-pagination] { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; }
.employee-directory-workspace [data-employee-list-pagination] .pager-pages { display: flex; gap: 4px; }
.employee-directory-workspace [data-employee-list-pagination] button { min-width: 34px; min-height: 34px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; }
.employee-directory-workspace [data-employee-list-pagination] button[aria-current=page] { background: var(--accent); border-color: var(--accent); color: white; }
.employee-directory-workspace [data-employee-list-pagination] button:disabled { opacity: .45; cursor: default; }
.employee-detail-groups { display: grid; gap: 12px; }
[data-schedule-workspace] .schedule-picker-results { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
[data-schedule-workspace] .schedule-picker-option { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; }
[data-schedule-workspace] .schedule-picker-option:hover, [data-schedule-workspace] .schedule-picker-option[aria-selected=true] { background: var(--accent-soft); border-color: var(--accent); }
[data-schedule-workspace] .schedule-picker-option:disabled { opacity: .55; cursor: not-allowed; }
[data-schedule-region-filter] select[multiple] { min-width: 150px; min-height: 68px; }
.store-finance-settings { margin-top: 16px; }
.store-finance-settings [data-store-finance-content] { display: grid; gap: 12px; }
.store-finance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.store-finance-grid > label { display: grid; gap: 4px; min-width: 0; }
.store-finance-grid > label.check { display: flex; gap: 8px; align-items: center; min-height: 40px; }
.store-finance-grid input:not([type=checkbox]), .store-finance-grid select { width: 100%; min-width: 0; }
.store-finance-methods { display: grid; gap: 12px; }
.store-finance-panel, .store-finance-method { margin: 0; }
.store-list-workspace .page-head { align-items: flex-start; }
.store-list-workspace .page-head .actions { flex-wrap: wrap; justify-content: flex-end; }
.store-list-workspace .card-bar { flex-wrap: wrap; }
.store-list-workspace .card-bar .search { flex: 1 1 320px; }
.store-list-workspace .card-bar .search input { width: 100%; }
.store-list-workspace [data-store-list-pagination] { display: flex; align-items: center; gap: 8px; }
.store-list-workspace [data-store-list-filter-options] fieldset { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.store-list-workspace [data-store-list-filter-options] legend { padding: 0 4px; font-weight: 700; }
.psched-flags { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.psched-kpis { margin-bottom: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.psched-telegram .picker-row { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.psched-telegram label { display: grid; gap: 4px; font-weight: 700; }
.psched-unresolved { margin-top: 16px; }
.psched-my .card-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* === end area: psched === */
/* === area: ppay === */
/* «Персонал → Зарплата»: inline forms, the breakdown panel, payout tables, the reconcile. */
.inline-form { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.ppay-new, .ppay-create { margin-bottom: 16px; }
.ppay-inline { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 12px; }
.ppay-inline label { display: grid; gap: 4px; font-weight: 700; min-width: 0; }
.ppay-inline label.check { display: inline-flex; font-weight: 400; }
.ppay-inline .ppay-wide { flex: 1 1 280px; }
.ppay-inline select, .ppay-inline input:not([type=checkbox]) { min-width: 0; max-width: 100%; }
.ppay-warn { margin-left: 6px; }
.ppay-card section { margin-top: 12px; }
.ppay-card h3 { display: flex; justify-content: space-between; gap: 8px; }
.ppay-lines td:first-child { white-space: normal; }
.ppay-minus td.num { color: var(--danger); }
.ppay-total { margin: 16px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 16px; text-align: right; }
.ppay-payer select { max-width: 220px; }
.ppay-amount { width: 110px; text-align: right; }
.ppay-accounts span { display: block; font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.ppay-pad { margin: 8px 16px 12px; }
.ppay-names { white-space: normal; font-size: 12px; }
.ppay-form-table input, .ppay-form-table select { width: 100%; min-width: 0; }
.ppay-date { display: inline-grid; gap: 4px; font-weight: 700; }
.ppay-reject input { width: 160px; }
.ppay-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ppay-months label { display: grid; gap: 4px; }
.ppay-months input { width: 100%; }
.ppay-small { font-size: 14px; line-height: 20px; }
.ppay-why summary { cursor: pointer; color: var(--link); }
.ppay-reasons { margin: 8px 0 0; padding-left: 18px; white-space: normal; }
.ppay-reasons li { margin-bottom: 4px; }
.ppay-my { max-width: 900px; }
.ppay-settings label { display: grid; gap: 4px; }
.ppay-card .list { width: 100%; table-layout: fixed; }
.ppay-card .list th.num, .ppay-card .list td.num { width: 120px; }
.ppay-card .list td { white-space: normal; overflow-wrap: anywhere; }
.ppay-card .psched-flags, .ppay-card .psched-flags * { white-space: normal; }
.ppay-note { white-space: normal; min-width: 220px; font-size: 12px; }
/* === end area: ppay === */
/* === area: pfines === */
/* «Персонал → Штрафи і надбавки»: totals, imported number under ours, the create form, the bot link, the card's correction form. */
.pfines-kpis { margin-bottom: 16px; }
.pfines-legacy { display: block; font-size: 12px; font-weight: 400; }
.pfines-form { max-width: 900px; }
.pfines-form select[multiple] { min-height: 180px; }
.pfines-form .seg-field { border: 0; padding: 0; margin: 0 0 12px; }
.pfines-form .seg-field legend { font-weight: 700; margin-bottom: 4px; }
.pfines-link { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pfines-link code { overflow-wrap: anywhere; font-size: 12px; }
.pfines-bot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pfines-card section { margin-top: 12px; }
.pfines-correct .fields label { min-width: 0; }
.pfines-correct select, .pfines-correct input { max-width: 100%; }
/* === end area: pfines === */

/* === area: pcoll === */
/* Collections: the matrix cells by status, a mismatch, the scan and allocation forms. */
.pcoll-mismatch { color: var(--danger); font-weight: 700; }
.pcoll-legend { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-left: auto; font-size: 12px; }
.pcoll-cell { display: inline-block; min-width: 72px; padding: 2px 6px; border-radius: var(--radius-badge); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
a.pcoll-cell:hover, a.pcoll-cell:focus-visible { border-color: var(--accent); }
.pcoll-accepted { background: var(--ok-soft); border-color: var(--ok-border); }
.pcoll-mismatch.pcoll-cell { background: var(--danger-soft); border-color: var(--danger); color: var(--text); font-weight: 400; }
.pcoll-registered { background: var(--info-soft); border-color: var(--accent); }
.pcoll-red { background: var(--warn-soft); border-color: var(--warn-border); }
.pcoll-matrix th, .pcoll-matrix td { white-space: nowrap; }
.pcoll-matrix td.name { max-width: 220px; }
.pcoll-scan { display: grid; gap: 6px; max-width: 420px; }
.pcoll-scan input { font-size: 18px; letter-spacing: 2px; }
.pcoll-bag { margin-top: 12px; }
.pcoll-accept, .pcoll-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 12px; }
.pcoll-actions form { display: inline-flex; gap: 8px; align-items: center; }
.pcoll-allocate .num-input, .num-input { width: 110px; text-align: right; }
.label-like { display: block; font-weight: 700; margin-bottom: 4px; }
@media (max-width: 640px) {
  .pcoll-legend { margin-left: 0; }
  .pcoll-cell { min-width: 0; }
}
.pcoll-accept input[name=actual] { width: 160px; }
.pcoll-filters input[type=date] { width: auto; }
.collections-admin { display: grid; gap: 16px; }
.collections-admin .page-head { margin-bottom: 0; }
.collections-admin .card-bar { align-items: center; }
.collections-filters { display: grid; gap: 8px; padding: 16px; }
.collections-filters > input { width: min(100%, 440px); }
.collections-status-filter { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 0; padding: 0; border: 0; }
.collections-status-filter legend { margin-bottom: 6px; color: var(--text-2); font-size: 12px; font-weight: 700; }
.collections-status-filter label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.collections-admin table td { vertical-align: middle; }
.collections-admin .collections-detail { display: grid; gap: 16px; }
.collections-admin .doc-meta { margin: 0; }
.collections-admin details > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; cursor: pointer; }
.collections-admin details > summary strong { color: var(--heading); }
.collections-admin form.collections-filters { margin: 0; }
.collections-detail-block form { display: grid; gap: 10px; }
.collections-settings-controls form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.collections-settings-controls form:first-child { align-items: end; }
.collections-week-limit, .collections-settings-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.collections-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.collections-detail-block { display: grid; gap: 10px; min-width: 0; }
.collections-detail-block h3 { margin: 0; font-size: 15px; }
.collections-detail-block textarea { width: 100%; min-height: 84px; resize: vertical; }
.collections-detail-block input[type=number], .collections-settings-controls input[type=number] { width: min(100%, 260px); }
.collections-settings-controls { padding: 16px 0; }
.collections-settings-controls > div { display: grid; gap: 6px; }
.collections-admin [hidden] { display: none !important; }
@media (max-width: 720px) { .collections-detail-grid { grid-template-columns: 1fr; } .collections-admin .page-head { align-items: flex-start; } }
/* === end area: pcoll === */

/* === area: ployal === */
.ployal-wallet dd { min-width: 0; overflow-wrap: anywhere; }
.ployal-wallet dd .hint, .mailing-form fieldset > .hint { display: block; white-space: normal; }
/* === end area: ployal === */

/* === area: prest7 === */
.card > .card-body, section.card.flush > .card-body { padding: 12px 20px; }
.pr7-upload { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 12px; }
.pr7-templates select, .pr7-templates input { min-width: 0; max-width: 100%; }
.pr7-templates td { vertical-align: top; }
.pr7-templates td > select, .pr7-templates td > input { display: block; width: 100%; min-width: 90px; }
.pr7-templates td > * + select, .pr7-templates td > * + input { margin-top: 8px; }
.pr7-ocr { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; margin: 6px 0 0; padding: 8px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 12px; }
.pr7-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.pr7-checklist { list-style: none; margin: 0 0 12px; padding: 0; }
.pr7-checklist li { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.pr7-checklist li > span:nth-child(2) { flex: 1; min-width: 0; }
.task-inline-form { display: inline-flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 10px; }
.task-inline-form label, .task-edit-form label { display: grid; gap: 6px; min-width: min(100%, 260px); }
.task-inline-form input, .task-edit-form textarea { width: 100%; }
.task-edit-form { display: grid; gap: 10px; margin-top: 16px; }
.pr7-checklist .task-inline-form { margin-top: 0; }
.position-create > summary { display: inline-flex; list-style: none; }
.position-create > summary::-webkit-details-marker { display: none; }
.position-create[open] > .card-bar { margin-top: 16px; }
.position-day-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; grid-column: 1 / -1; }
.position-day-grid input { width: 100%; }
.position-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; grid-column: 1 / -1; }
.position-flags label { display: inline-flex; align-items: center; gap: 8px; }
.position-flags input[type=checkbox] { width: auto; }
.position-edit-form { display: grid; gap: 10px; min-width: 340px; max-width: 620px; padding: 14px; }
.position-edit-form > label { display: grid; gap: 5px; }
.position-edit-form input { width: 100%; }
.position-edit-form .position-day-grid { grid-template-columns: repeat(4, minmax(64px, 1fr)); }
.position-days { min-width: 210px; font-size: 12px; font-variant-numeric: tabular-nums; }
.employee-checklist-id { display: block; color: var(--muted); font-size: 12px; }
.employee-checklist-run { min-width: 190px; max-width: 420px; }
.employee-checklist-run > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; cursor: pointer; }
.employee-checklist-meta { margin: 8px 0; color: var(--muted); font-size: 12px; }
.employee-checklist-run > .alert { margin: 8px 0; }
.employee-checklist-steps { display: grid; gap: 8px; margin: 10px 0 0; padding-left: 24px; }
.employee-checklist-steps li { padding-left: 2px; }
.employee-checklist-steps li > div { display: inline-block; vertical-align: top; max-width: calc(100% - 110px); }
.employee-checklist-steps p { margin: 2px 0 0; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.pr7-comment { border-top: 1px solid var(--line); padding: 10px 0; }
.pr7-comment p { margin: 4px 0; }
.pr7-state td { vertical-align: top; }
.pr7-state .inline-form { display: block; margin-top: 6px; }
table.list.pr7-state { table-layout: fixed; width: 100%; min-width: 0; }
.pr7-state th:nth-child(1) { width: 52%; }
.pr7-state th:nth-child(2) { width: 220px; }
.pr7-state td { white-space: normal; overflow-wrap: anywhere; }
.pr7-state select { width: 100%; }
.pr7-state code { white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
.pr7-form { display: grid; gap: 20px; }
.fields .span-3 { grid-column: 1 / -1; }
.pr7-status { min-width: 180px; white-space: normal; }
.pr7-status .field-error { display: inline; font-size: 12px; }
/* === end area: prest7 === */
/* === area: pvbqa === */
/* «не менше» / «менше» must stay readable at 1366 px. */
.ppay-form-table td:first-child select { min-width: 9.5em; }
/* The employee card: the same person in the schedule, hours, fines and payroll. */
.pvbqa-related { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 14px; }
.pvbqa-related a { display: inline-flex; align-items: center; gap: 4px; }
.pvbqa-related svg { width: 16px; height: 16px; }
/* «Перенесення → Стан»: the long «Потрібно: …» lines ran under the state select. */
table.list.pr7-state td, table.list.pr7-state td.name, table.list.pr7-state td .muted { white-space: normal; overflow-wrap: anywhere; }
/* «Відшкодування»: approve / reject fit at 1366 px (the reject button was cut off). */
table.list td.pvbqa-actions { white-space: normal; min-width: 260px; }
td.pvbqa-actions .inline-form { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
td.pvbqa-actions .ppay-reject input { width: 140px; }
/* «Нова оренда»: a fieldset grows to its content (min-width: min-content), so the payment lines widened the whole page; scroll them instead. */
fieldset:has(.pr7-templates), .pr7-form > * { min-width: 0; }
.pr7-templates td > select { min-width: 120px; }
/* «Реферали»: the source wraps and approve / reject stack, so the state is not cut off at 1366 px. */
table.list td.pvbqa-wrap { white-space: normal; min-width: 8rem; }
table.list td.pvbqa-stack { white-space: normal; }
td.pvbqa-stack > form, td.pvbqa-stack > details { display: block; margin: 2px 0; }
/* «VPN-профілі»: the revoke reason was squeezed to «При…». */
select.pvbqa-reason { min-width: 12rem; }
/* «Первинні документи»: the date filters say what they are and stay compact; the ФОП is readable. */
.pvbqa-date-label { align-self: center; font-size: 14px; color: var(--muted); }
#doc-from, #doc-to { width: auto; flex: 0 0 auto; }
table.list td.pvbqa-fop { min-width: 9rem; }
/* === end area: pvbqa === */
/* === area: pqafix === */
/* Searchable people picker (select[multiple][data-people-picker] enhanced by site.js): VB ERP Multiselect with tokens. */
.mpick-field { display: grid; gap: 4px; min-width: 0; }
.mpick-field > label { font-weight: 700; }
.mpick { position: relative; display: grid; gap: 8px; min-width: 0; }
.mpick-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; order: 2; }
.mpick-chips[hidden] { display: none; }
.mpick > input { order: 1; }
.mpick-chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 28px; padding: 2px 4px 2px 10px;
  border: 1px solid var(--selected-border); border-radius: var(--radius-sm); background: var(--selected); color: var(--heading); font-size: 14px;
}
.mpick-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpick-remove {
  display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--text-2); font: inherit; font-size: 18px; line-height: 1; cursor: pointer;
}
.mpick-remove:hover { background: var(--surface-3); color: var(--heading); }
.mpick-remove:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.mpick-list {
  position: absolute; z-index: 50; top: calc(var(--control-h) + 4px); left: 0; right: 0; max-height: min(50vh, 320px); overflow-y: auto;
  margin: 0; padding: 4px 0; list-style: none; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop);
}
.mpick-list[hidden], .mpick-option[hidden], .mpick-empty[hidden] { display: none; }
.mpick-option {
  display: flex; align-items: baseline; gap: 12px; min-height: 32px; padding: 6px 16px 6px 40px; position: relative;
  font-size: 14px; font-weight: 400; cursor: pointer;
}
.mpick-option small { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.mpick-option::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface);
}
.mpick-option[aria-selected="true"] { background: var(--selected); color: var(--heading); }
.mpick-option[aria-selected="true"]::before {
  background: var(--accent); border-color: var(--accent);
  -webkit-mask: none; box-shadow: inset 0 0 0 2px var(--surface);
}
.mpick-option.active { background: var(--row-hover); box-shadow: inset 0 0 0 1px var(--border-strong); }
.mpick-option[aria-selected="true"].active { background: var(--selected); box-shadow: inset 0 0 0 1px var(--selected-border); }
.mpick-empty { padding: 8px 16px; color: var(--muted); font-size: 14px; }
.mpick-invalid .mpick > input { border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger); }
.mpick-field .field-error[hidden] { display: none; }
/* Payout ФОП form: one «Зберегти» for every balance */
.savebar.ppay-pad { margin: 0; }
/* === end area: pqafix === */

[data-employee-operations] dialog.modal form { padding: 20px; }
[data-employee-operations] dialog.modal .card-bar { padding: 0 0 8px; }
[data-employee-operations] dialog.modal .card-bar h2 { margin: 0; }
[data-employee-operations] .employee-checklist { display: grid; gap: 10px; border: 1px solid var(--line, #d8dee8); border-radius: 12px; padding: 14px; }
[data-employee-operations] .employee-checklist legend { padding: 0 6px; font-weight: 650; }
[data-employee-operations] .form-grid { align-items: start; }
[data-employee-operations] .doc-meta { margin: 0; }
.fop-picker-field { min-width: 0; }
.fop-picker-field > input { width: 100%; }
.fop-picker-field > select[hidden] { display: none !important; }

/* Employee position catalog controls mirror the source workspace: searchable rows,
   multi-select facets, persistent column choices and ten-row pagination. */
.position-workspace [hidden] { display: none !important; }
.position-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.position-search { display: grid; gap: 4px; flex: 1 1 260px; max-width: 420px; }
.position-search input { width: 100%; }
.position-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.position-filter, .position-columns-menu { position: relative; }
.position-filter > summary, .position-columns-menu > summary { list-style: none; cursor: pointer; }
.position-filter > summary::-webkit-details-marker, .position-columns-menu > summary::-webkit-details-marker { display: none; }
.position-filter > summary { display: inline-flex; min-height: var(--control-h); align-items: center; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; }
.position-filter[open] > summary, .position-filter > summary:hover { background: var(--surface-2); }
.position-filter > .position-filter-search, .position-filter > .position-filter-options, .position-filter > [data-position-filter-clear], .position-columns-menu > fieldset {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; min-width: 240px; max-width: min(320px, calc(100vw - 32px));
  padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-pop);
}
.position-filter > .position-filter-search { top: calc(100% + 4px); }
.position-filter > .position-filter-options { top: calc(100% + 52px); max-height: min(42vh, 280px); overflow: auto; padding: 4px; }
.position-filter > [data-position-filter-clear] { position: static; display: block; width: 100%; margin-top: 4px; }
.position-filter-search input { width: 100%; }
.position-filter-option, .position-columns-menu fieldset label { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 6px; font-weight: 400; cursor: pointer; }
.position-filter-option:hover, .position-columns-menu fieldset label:hover { background: var(--row-hover); }
.position-filter-option input, .position-columns-menu fieldset input { width: auto; margin: 0; }
.position-inactive-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-h); font-size: 14px; font-weight: 600; }
.position-inactive-toggle input { width: auto; margin: 0; }
.position-columns-menu > fieldset { top: calc(100% + 4px); right: 0; left: auto; display: grid; gap: 2px; margin: 0; }
.position-columns-menu > fieldset legend { padding: 0 5px; font-weight: 700; }
.position-result-count { min-height: 18px; padding: 0 16px 10px; color: var(--muted); font-size: 13px; }
.position-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.position-pagination > span { min-width: 100px; text-align: center; color: var(--text-2); font-size: 14px; }
.position-no-results td { padding: 24px; text-align: center; color: var(--muted); }
.position-workspace table.list td[data-position-column="name"] { min-width: 180px; }
@media (max-width: 720px) {
  .position-toolbar { align-items: stretch; }
  .position-search { flex-basis: 100%; max-width: none; }
  .position-filters { flex: 1 1 100%; }
  .position-columns-menu { margin-left: auto; }
}
