/* ── Overlay + Drawer ── */
.pf-overlay { position: fixed; inset: 0; background: rgba(17,19,24,.55); z-index: 1600; opacity: 0; pointer-events: none; transition: opacity .22s; }
.pf-overlay.open { opacity: 1; pointer-events: all; }

.pf-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; background: #fff; z-index: 1601; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s cubic-bezier(.4,0,.2,1); box-shadow: -4px 0 28px rgba(17,19,24,.22); border-left: 4px solid var(--bg-yellow); }
.pf-drawer.open { transform: translateX(0); }

/* ── Drawer header ── */
.pf-top { background: var(--bg-black); padding: 28px 24px 22px; color: #fff; flex-shrink: 0; position: relative; border-bottom: 3px solid var(--bg-yellow); }
.pf-close { position: absolute; top: 14px; right: 16px; background: rgba(255,255,255,.1); border: none; width: 30px; height: 30px; border-radius: 4px; font-size: 18px; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; transition: .12s; }
.pf-close:hover { background: var(--bg-yellow); color: var(--bg-black); }

.pf-avatar { width: 52px; height: 52px; border-radius: var(--bg-radius-sm); font-family: var(--font-display); font-size: 18px; font-weight: 900; display: flex; align-items: center; justify-content: center; color: #fff; border: 2px solid var(--bg-yellow); margin-bottom: 14px; }
.pf-name { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin-bottom: 3px; line-height: 1.15; letter-spacing: -.01em; }
.pf-role { font-size: 12px; opacity: .7; letter-spacing: .01em; margin-bottom: 14px; }
.pf-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-chip { background: rgba(255,255,255,.1); border-radius: 2px; padding: 4px 10px; font-size: 11px; color: #fff; }
.pf-chip-labeled { display: flex; flex-direction: column; line-height: 1.25; gap: 1px; }
.pf-chip-lbl { opacity: .55; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }

/* ── Scrollable body ── */
.pf-scroll { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }

.pf-section { margin-bottom: 24px; }
.pf-section-title { font-family: var(--font-display); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; color: var(--bg-fg2); margin-bottom: 12px; border-bottom: 1px solid var(--bg-line); padding-bottom: 6px; }

/* ── Salary section ── */
.pf-sal-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pf-sal-chip { flex: 1; min-width: 120px; background: var(--bg-app); border: 1px solid var(--bg-line); border-radius: var(--bg-radius); padding: 10px 12px; }
.pf-sal-lbl { font-size: 10px; color: var(--bg-fg3); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; margin-bottom: 4px; }
.pf-sal-val { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--bg-fg1); line-height: 1; }
.pf-sal-badge { display: inline-block; margin-top: 5px; }

/* ── Salary band bar (Variant A) ── */
.va-bar-wrap { margin-bottom: 12px; }
.va-bar-track { height: 14px; border-radius: 4px; background: var(--bg-line); position: relative; overflow: visible; }
.va-bar-zone { position: absolute; top: 0; bottom: 0; }
.va-zone-warn  { background: rgba(230,126,34,.18); border-radius: 4px 0 0 4px; }
.va-zone-ok    { background: rgba(39,174,96,.18); }
.va-zone-alert { background: rgba(231,76,60,.18); border-radius: 0 4px 4px 0; }
.va-bar-mid { position: absolute; top: -3px; bottom: -3px; width: 3px; background: #2980b9; transform: translateX(-50%); border-radius: 2px; z-index: 2; }
.va-dot { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 1px 5px rgba(0,0,0,.25); z-index: 3; transition: .15s; }
.va-dot-cur { background: #27ae60; border: 3px solid #fff; }
.va-dot-rev { background: rgba(41,128,185,.55); border: 3px solid #fff; }
.va-ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--bg-fg3); font-weight: 600; line-height: 1.3; }
.va-stat { display: flex; gap: 12px; margin: 12px 0 8px; flex-wrap: wrap; }
.va-stat-item { flex: 1; min-width: 80px; }
.va-stat-lbl { font-size: 10px; color: var(--bg-fg3); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; margin-bottom: 3px; }
.va-stat-val { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--bg-fg1); line-height: 1; }
.va-stat-sub { font-size: 11px; color: var(--bg-fg3); margin-top: 2px; }
.va-stat-badge { display: inline-block; margin-top: 4px; }
.va-cr { font-size: 11px; color: var(--bg-fg3); margin-bottom: 8px; }
.va-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.va-legend-item { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--bg-fg3); }
.va-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.va-legend-dot-cur { background: #27ae60; }
.va-legend-dot-rev { background: rgba(41,128,185,.55); }
.va-legend-dot-mid { background: #2980b9; border-radius: 2px; width: 10px; height: 3px; margin-top: 1px; }
.pf-norange { font-size: 12px; color: var(--bg-fg3); padding: 10px 0; }
.pf-override-form { margin-top: 6px; }
.pf-override-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pf-override-lbl { font-size: 11px; color: var(--bg-fg3); white-space: nowrap; }
.pf-override-sel { font-size: 12px; padding: 3px 6px; border: 1px solid var(--bg-3); border-radius: 4px; background: var(--bg-1); color: var(--bg-fg); max-width: 180px; }
.pf-btn-sm { font-size: 11px; padding: 3px 8px; border-radius: 4px; border: 1px solid var(--bg-3); background: var(--bg-2); color: var(--bg-fg); cursor: pointer; }
.pf-btn-sm--primary { background: var(--bg-accent, #2980b9); color: #fff; border-color: transparent; }
.pf-btn-sm:hover { opacity: 0.85; }

/* ── Timeline ── */
.pf-tl { position: relative; padding-left: 22px; }
.pf-tl-item { position: relative; margin-bottom: 22px; }
.pf-tl-item::before { content: ''; position: absolute; left: -17px; top: 18px; bottom: -26px; width: 2px; background: var(--bg-line); }
.pf-tl-item.pf-tl-last::before { display: none; }
.pf-tl-dot { position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--bg-yellow); box-shadow: 0 0 0 2px rgba(255,205,41,.2); }
a.pf-tl-dot { display: block; text-decoration: none; cursor: pointer; }
.pf-tl-date { font-size: 10px; color: var(--bg-fg3); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.pf-tl-etype { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.pf-tl-sal { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--bg-fg1); line-height: 1.15; letter-spacing: -.01em; }
a.pf-tl-sal { display: block; text-decoration: none; color: inherit; }
.pf-tl-delta { font-size: 12px; font-weight: 700; margin-top: 2px; }
.pf-tl-comment { font-size: 12px; color: var(--bg-fg2); margin-top: 3px; line-height: 1.4; }
.pf-tl-author { font-size: 10px; color: var(--bg-fg3); margin-top: 2px; }
.pf-tl-label { font-size: 11px; color: var(--bg-fg3); margin-top: 2px; }
.pf-tl-empty { font-size: 13px; color: var(--bg-fg3); padding: 4px 0; }

/* ── Manages section ── */
.pf-mgr-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.pf-mgr-stat { flex: 1; background: var(--bg-app); border: 1px solid var(--bg-line); border-radius: var(--bg-radius); padding: 10px 12px; text-align: center; }
.pf-mgr-num { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--bg-fg1); line-height: 1; }
.pf-mgr-lbl { font-size: 10px; color: var(--bg-fg3); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.pf-direct-list { display: flex; flex-direction: column; gap: 2px; }
.pf-direct-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--bg-radius); transition: .1s; border: 1px solid transparent; text-decoration: none; }
.pf-direct-item:hover { background: var(--bg-app); border-color: var(--bg-line); }
.pf-direct-av { width: 28px; height: 28px; border-radius: var(--bg-radius-sm); font-family: var(--font-display); font-size: 10px; font-weight: 900; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.pf-direct-info { flex: 1; min-width: 0; }
.pf-direct-name { font-size: 12px; font-weight: 600; color: var(--bg-fg1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-direct-role { font-size: 11px; color: var(--bg-fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Clickable timeline item ── */
.pf-tl-item-link { display: block; text-decoration: none; color: inherit; border-radius: 4px; transition: .12s; margin-bottom: 0; }
.pf-tl-item-link:hover .pf-tl-item { background: var(--bg-app); border-radius: 4px; }
.pf-tl-comment-preview { opacity: .7; font-style: italic; }

/* ── Timeline event show card ── */
.pf-tl-show { background: var(--bg-app); border: 1px solid var(--bg-line); border-radius: 6px; padding: 12px 14px; margin-bottom: 4px; }
.pf-tl-show-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.pf-tl-show-type { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.pf-tl-show-date { font-size: 10px; color: var(--bg-fg3); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.pf-tl-show-comment { font-size: 13px; color: var(--bg-fg2); margin-top: 8px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.pf-tl-show-close { margin-left: auto; font-size: 18px; line-height: 1; color: var(--bg-fg3); text-decoration: none; padding: 0 2px; }
.pf-tl-show-close:hover { color: var(--bg-fg1); }
.pf-tl-show-actions { display: flex; gap: 6px; margin-top: 12px; }
.rv-submit-sm { padding: 4px 10px; font-size: 10px; }

/* ── Section title with action button ── */
.pf-section-title-row { display: flex; align-items: center; justify-content: space-between; }
.pf-tl-add-btn { font-size: 11px; font-weight: 700; color: var(--bg-fg2); background: #fff; border: 1px solid var(--bg-line); border-radius: 6px; padding: 4px 10px; cursor: pointer; transition: .12s; text-decoration: none; white-space: nowrap; }
.pf-tl-add-btn:hover { border-color: var(--bg-black); color: var(--bg-fg1); }
.pf-tl-edit-link { display: inline-block; margin-top: 5px; font-size: 10px; font-weight: 700; color: var(--bg-fg3); text-decoration: none; padding: 2px 7px; border: 1px solid var(--bg-line); border-radius: 3px; transition: .1s; }
.pf-tl-edit-link:hover { border-color: var(--bg-black); color: var(--bg-fg1); }

/* ── Inline edit form ── */
.pf-tl-edit-form { padding: 8px 0 4px; }
.pf-form { display: flex; flex-direction: column; gap: 7px; }
.pf-form-field { display: flex; }
.pf-form-row { display: flex; gap: 7px; }
.pf-form-select { flex: 1; min-height: auto !important; padding: 8px 10px !important; cursor: pointer; }
.pf-form-date { flex: 1; min-height: auto !important; padding: 8px !important; }
.pf-form-sal { flex: 1; min-height: auto !important; padding: 8px !important; }
.pf-form-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; margin-top: 2px; }
.pf-form-errors { background: var(--bg-alert-soft); border: 1px solid var(--bg-alert); border-radius: 4px; padding: 7px 10px; font-size: 12px; color: var(--bg-alert); margin-bottom: 4px; }

/* ── Form controls (shared rv-* used in profile) ── */
.rv-textarea { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--bg-line); border-radius: 6px; font-size: 13px; font-family: var(--font-body); resize: vertical; min-height: 72px; color: var(--bg-fg1); background: #fff; transition: .15s; }
.rv-textarea:focus { outline: none; border-color: var(--bg-black); box-shadow: 0 0 0 2px var(--bg-yellow-soft); }
.rv-submit { padding: 6px 14px; background: var(--bg-yellow); border: none; font-size: 11px; font-weight: 800; font-family: var(--font-body); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; border-radius: 4px; transition: .12s; white-space: nowrap; }
.rv-submit:hover { background: var(--bg-yellow-dk); }
.rv-submit:disabled { opacity: .5; cursor: default; }
.rv-submit-cancel { background: #fff; color: var(--bg-fg2); border: 1px solid var(--bg-line); text-decoration: none; display: inline-flex; align-items: center; }
.rv-submit-cancel:hover { background: var(--bg-app); border-color: var(--bg-fg3); }
.rv-submit-danger { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.rv-submit-danger:hover { background: #fecaca; }

/* ── Comments ── */
.rv-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.rv-item { background: #fafaf9; border: 1px solid var(--bg-line); border-radius: 8px; padding: 11px 13px; }
.rv-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.rv-av { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 9px; font-weight: 900; color: #fff; flex-shrink: 0; }
.rv-author { font-weight: 700; font-size: 12px; color: var(--bg-fg1); }
.rv-role { font-size: 10px; color: var(--bg-fg3); background: var(--bg-line); padding: 1px 6px; border-radius: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.rv-date { font-size: 11px; color: var(--bg-fg3); margin-left: auto; }
.rv-body { font-size: 13px; color: var(--bg-fg1); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.rv-empty { font-size: 13px; color: var(--bg-fg3); padding: 4px 0 10px; }
.rv-form { display: flex; flex-direction: column; gap: 7px; }
.rv-del-btn { background: none; border: none; color: var(--bg-fg3); font-size: 13px; cursor: pointer; padding: 2px 5px; border-radius: 3px; margin-left: 4px; transition: .1s; }
.rv-del-btn:hover { color: var(--bg-alert); background: var(--bg-alert-soft); }

/* ── File attachments ── */
.rv-file-row { display: flex; align-items: center; gap: 8px; }
.rv-file-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--bg-fg2); background: var(--bg-app); border: 1px dashed var(--bg-line); border-radius: 5px; padding: 5px 10px; cursor: pointer; transition: .12s; white-space: nowrap; }
.rv-file-btn:hover { border-color: var(--bg-fg3); color: var(--bg-fg1); }
.rv-file-clear { background: none; border: none; font-size: 12px; color: var(--bg-alert); cursor: pointer; padding: 2px 6px; border-radius: 3px; }
.rv-file-clear:hover { background: var(--bg-alert-soft); }
.rv-file-attachment, .pf-tl-file { margin-top: 5px; }
.rv-file-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--bg-fg2); text-decoration: none; background: var(--bg-app); border: 1px solid var(--bg-line); border-radius: 4px; padding: 3px 8px; transition: .12s; }
.rv-file-link:hover { border-color: var(--bg-fg3); color: var(--bg-fg1); }

/* ── Salary chart ── */
.pf-chart-wrap { margin-top: 12px; margin-left: -4px; }

/* ── Approvals ── */
.apv-summary { display: flex; gap: 5px; }
.apv-count { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; }
.apv-count-ok { background: var(--bg-ok-soft); color: #16a34a; }
.apv-count-no { background: var(--bg-alert-soft); color: #dc2626; }
.apv-count-pending { background: var(--bg-line); color: var(--bg-fg3); }

.apv-my-form { background: var(--bg-app); border: 1px solid var(--bg-line); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.apv-form { display: flex; flex-direction: column; gap: 7px; }
.apv-form-row { display: flex; }
.apv-sal-input { min-height: auto !important; padding: 8px 10px !important; }
.apv-btn-row { display: flex; gap: 8px; }
.apv-btn { flex: 1; padding: 8px 12px; border: 2px solid var(--bg-line); background: #fff; border-radius: 6px; font-size: 12px; font-weight: 700; font-family: var(--font-body); cursor: pointer; transition: .12s; color: var(--bg-fg2); }
.apv-btn-approve:hover, .apv-btn-approve.apv-btn-active { border-color: var(--bg-ok); background: var(--bg-ok-soft); color: #16a34a; }
.apv-btn-reject:hover, .apv-btn-reject.apv-btn-active { border-color: var(--bg-alert); background: var(--bg-alert-soft); color: #dc2626; }
.apv-btn-pending.apv-btn-active { border-color: var(--bg-fg4); background: var(--bg-line); color: var(--bg-fg2); }

.apv-others { display: flex; flex-direction: column; gap: 4px; }
.apv-other-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--bg-line); }
.apv-other-av { width: 24px; height: 24px; border-radius: 3px; font-family: var(--font-display); font-size: 8px; font-weight: 900; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.apv-other-info { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.apv-other-name { font-size: 12px; font-weight: 600; color: var(--bg-fg1); }
.apv-other-sal { font-size: 11px; color: var(--bg-fg3); }
.apv-status-dot { font-size: 14px; font-weight: 900; flex-shrink: 0; }
.apv-status-approved { color: var(--bg-ok); }
.apv-status-rejected { color: var(--bg-alert); }
.apv-status-pending { color: var(--bg-fg4); }
