/* ===== الموارد البشرية — الرواتب ===== */
.hrp-ic{vertical-align:-3px;flex-shrink:0}
.hrp-click{cursor:pointer}
.hrp-warn{color:#92400e;font-weight:700;font-size:.76rem;display:inline-flex;align-items:center;gap:.2rem}
.hrp-neg{color:#b3261e}
.hrp-prep{align-items:flex-end}
.hrp-prep .fld{margin:0}
.hrp-prep .btn{display:inline-flex;align-items:center;gap:.35rem}

/* run header + timeline */
.hrp-run{display:flex;flex-direction:column;gap:1rem}
.hrp-run .hr-card{margin-bottom:0}
.hrp-head{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}
.hrp-head h2{margin:0;font-size:1.2rem}
.hrp-head .btn{display:inline-flex;align-items:center;gap:.25rem}
.hrp-tl{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;counter-reset:s}
.hrp-tl li{position:relative;display:flex;gap:.55rem;align-items:flex-start;padding-top:.2rem}
.hrp-tl li:not(:last-child)::after{content:"";position:absolute;top:.72rem;inset-inline-start:1.4rem;inset-inline-end:-.3rem;height:2px;background:var(--line)}
.hrp-tl li.on:not(:last-child)::after{background:#1f6f8f}
.hrp-tl__dot{width:14px;height:14px;border-radius:50%;border:2px solid #c9d1db;background:#fff;flex-shrink:0;margin-top:.15rem;position:relative;z-index:1}
.hrp-tl li.on .hrp-tl__dot{border-color:#1f6f8f;background:#1f6f8f;box-shadow:0 0 0 3px #e3f0f5}
.hrp-tl li.bad .hrp-tl__dot{border-color:#b3261e;background:#b3261e;box-shadow:0 0 0 3px #fdeeee}
.hrp-tl li div{display:flex;flex-direction:column;gap:.1rem;background:#fff;padding-inline-end:.4rem;position:relative;z-index:1}
.hrp-tl b{font-size:.85rem}
.hrp-tl small{color:var(--muted);font-size:.76rem}
.hrp-tl li:not(.on) b{color:var(--muted);font-weight:700}

/* totals */
.hrp-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:.7rem}
.hrp-kpis>div{background:#fff;border:1px solid var(--line);border-radius:14px;padding:.8rem 1rem;display:flex;flex-direction:column;gap:.2rem}
.hrp-kpis small{color:var(--muted);font-weight:700;font-size:.78rem}
.hrp-kpis b{font-size:1.2rem;font-variant-numeric:tabular-nums}
.hrp-kpis__net{background:linear-gradient(135deg,#1f6f8f,#20232a)!important;border-color:transparent!important;color:#fff}
.hrp-kpis__net small{color:#cfe3ec}

.hrp-banner{display:flex;gap:.5rem;align-items:flex-start;margin:0;padding:.7rem .9rem;border-radius:12px;background:#eaf4fb;color:#1f4f63;font-size:.86rem;line-height:1.7}
.hrp-banner--warn{background:#fff4e5;color:#7a3e06}
.hrp-banner--bad{background:#fdeeee;color:#8f1d16}
.hrp-banner .hrp-ic{margin-top:.25rem}

.hrp-actions{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center;background:#fff;border:1px solid var(--line);border-radius:14px;padding:.6rem .7rem}
.hrp-actions .btn{display:inline-flex;align-items:center;gap:.35rem}
.hrp-actions .btn[disabled]{opacity:.5;cursor:not-allowed}
.hrp-actions small{flex-basis:100%;font-size:.8rem}

/* lines table: sticky header + totals row */
.hrp-scroll{max-height:68vh;overflow:auto}
.hrp-lines thead th{position:sticky;top:0;z-index:2}
.hrp-lines tfoot td{position:sticky;bottom:0;background:#f6f8fb;border-top:2px solid var(--line);font-weight:700;z-index:1}
.hrp-lines td:nth-child(n+2):nth-child(-n+6),.hrp-lines th:nth-child(n+2):nth-child(-n+6){text-align:end;white-space:nowrap}
.hrp-flag{display:inline-flex;align-items:center;gap:.25rem;color:#92400e;font-size:.78rem;font-weight:700;max-width:220px}

/* line breakdown */
.hrp-modal{width:min(720px,100%)}
.hrp-bd{border:1px solid var(--line);border-radius:12px;padding:.2rem .9rem .6rem;margin-bottom:.8rem}
.hrp-bd .hr-section-h{margin:.7rem 0 .3rem}
.hrp-bd__r{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;padding:.45rem 0;border-bottom:1px dashed #edf0f4}
.hrp-bd__r div{display:flex;flex-direction:column;gap:.1rem;min-width:0}
.hrp-bd__r small{color:var(--muted);font-size:.76rem;line-height:1.6}
.hrp-bd__r b{white-space:nowrap}
.hrp-bd__t{display:flex;justify-content:space-between;padding-top:.5rem;font-weight:800}
.hrp-net{display:flex;justify-content:space-between;align-items:center;background:#1f6f8f;color:#fff;border-radius:12px;padding:.8rem 1rem;margin-bottom:.8rem}
.hrp-net b{font-size:1.25rem}
.hrp-meta{margin-bottom:.4rem}
.hrp-dl{display:flex;flex-direction:column;gap:.5rem;margin:.9rem 0}
.hrp-dl .btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem}

/* dashboard card */
.hrp-widget{cursor:pointer}
.hrp-widget b{font-size:1.15rem}

/* «رواتبي» */
.hrp-note{display:flex;gap:.5rem;align-items:center;margin:0 0 .8rem;padding:.6rem .8rem;background:#eaf4fb;color:#1f4f63;border-radius:10px;font-size:.86rem}
.hrp-slips{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.6rem}
.hrp-slip{display:grid;grid-template-columns:1fr auto auto;gap:1rem;align-items:center;border:1px solid var(--line);border-radius:12px;padding:.75rem .9rem;transition:border-color .15s}
.hrp-slip:hover{border-color:#bcd3de}
.hrp-slip__m,.hrp-slip__n{display:flex;flex-direction:column;gap:.1rem}
.hrp-slip small{color:var(--muted);font-size:.76rem}
.hrp-slip__n{text-align:end}
.hrp-slip .btn{display:inline-flex;align-items:center;gap:.3rem}

@media (max-width:900px){
  .hrp-kpis{grid-template-columns:repeat(2,1fr)}
  .hrp-tl{grid-template-columns:1fr 1fr;row-gap:.8rem}
  .hrp-tl li::after{display:none}
}
@media (max-width:640px){
  .hrp-scroll{max-height:none}
  .hrp-lines tfoot td{position:static}
  .hrp-lines tfoot tr{display:block;padding:.4rem 0}
  .hrp-lines tfoot td{display:flex;justify-content:space-between;border:0;padding:.3rem .7rem}
  .hrp-lines tfoot td::before{content:attr(data-label);color:var(--muted);font-size:.76rem;font-weight:700}
  .hrp-lines tfoot td:empty{display:none}
  .hrp-slip{grid-template-columns:1fr auto;gap:.5rem}
  .hrp-slip .btn,.hrp-slip>small{grid-column:1/-1;justify-content:center}
  .hrp-head h2{font-size:1.05rem}
}
