/* ===== الموارد البشرية — الإجازات والسلف والمخالفات ===== */
.lv{display:flex;flex-direction:column;gap:0}
.lv-ico{width:16px;height:16px;flex-shrink:0;vertical-align:-3px}
.lv-ico--s{width:14px;height:14px;color:var(--muted)}
.lv-mt{margin-top:.8rem}
.lv-2col{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;align-items:start}
.lv-2col>.hr-card{margin-bottom:0}
.lv-2col{margin-bottom:1rem}

/* sub navigation inside a tab */
.lv-seg{display:flex;gap:.25rem;flex-wrap:wrap;margin-bottom:1rem;background:#eef1f5;border-radius:12px;padding:.25rem;width:fit-content;max-width:100%}
.lv-seg button{border:0;background:transparent;font:inherit;font-size:.83rem;font-weight:800;color:var(--muted);padding:.45rem .85rem;border-radius:9px;cursor:pointer;transition:background .15s,color .15s}
.lv-seg button:hover{color:var(--ink)}
.lv-seg button.on{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(20,30,50,.12)}
.lv-seg button:focus-visible{outline:2px solid var(--blue);outline-offset:1px}

.lv-type{display:inline-flex;align-items:center;gap:.4rem;font-weight:700}
.lv-type i{width:9px;height:9px;border-radius:3px;display:inline-block;flex-shrink:0}
.lv-count{font-size:.8rem;color:var(--muted);font-weight:700}
.btn .lv-ico{margin-inline-end:.3rem;width:15px;height:15px}

/* balance cards */
.lv-bal{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.6rem}
.lv-bal__c{position:relative;border:1px solid var(--line);border-radius:12px;padding:.75rem .85rem .7rem;display:flex;flex-direction:column;gap:.15rem;background:#fff;overflow:hidden}
.lv-bal__c::before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:3px;background:var(--c)}
.lv-bal__c small{color:var(--muted);font-weight:800;font-size:.78rem}
.lv-bal__c b{font-size:1.55rem;line-height:1.2;font-variant-numeric:tabular-nums;color:var(--ink)}
.lv-bal__c em{font-style:normal;font-size:.74rem;color:var(--muted);line-height:1.45}
.lv-bal__c.is-off{background:#fafbfc}
.lv-bal__c.is-off b{color:#9aa3b1}
.lv-bal__c.is-off b .lv-ico{width:20px;height:20px}
.lv-bal__bar{display:block;height:4px;border-radius:4px;background:#eef1f5;margin:.35rem 0 .1rem;overflow:hidden}
.lv-bal__bar i{display:block;height:100%;background:var(--c);border-radius:4px}
.lv-year{display:block;margin-top:.6rem}

.lv-lock{display:flex;gap:.7rem;align-items:flex-start;background:#fff8ec;border:1px solid #f6dfb5;border-radius:12px;padding:.8rem .9rem;margin-bottom:.8rem;color:#7a4b06}
.lv-lock>.lv-ico{width:20px;height:20px;margin-top:.1rem}
.lv-lock b{display:block;color:#5c3a05}
.lv-lock small{display:block;font-size:.83rem}
.lv-checks{list-style:none;margin:.45rem 0 0;padding:0;display:flex;flex-direction:column;gap:.25rem;font-size:.82rem}
.lv-checks li{display:flex;gap:.4rem;align-items:center;color:#8a6a35}
.lv-checks li.ok{color:#166534}

/* request form + live preview */
.lv-form{display:flex;flex-direction:column;gap:.7rem}
.lv-form textarea.in{resize:vertical;min-height:2.6rem}
.lv-form__f{display:flex;justify-content:flex-end;gap:.5rem}
.lv-hint{margin:0 0 .6rem;font-size:.85rem}
.lv-pv{background:#f6f8fb;border-radius:12px;padding:.7rem .8rem;min-height:2.6rem}
.lv-pv__nums{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}
.lv-pv__nums div{display:flex;flex-direction:column}
.lv-pv__nums small{font-size:.74rem;color:var(--muted);font-weight:700}
.lv-pv__nums b{font-size:1.05rem}
.lv-pv__nums .is-bad b{color:#b3261e}
.lv-pv__note{display:flex;gap:.35rem;align-items:center;margin-top:.5rem;color:#92400e;font-size:.8rem}
.lv-pv__bad{list-style:none;margin:.55rem 0 0;padding:0;display:flex;flex-direction:column;gap:.25rem;color:#b3261e;font-size:.83rem;font-weight:700}
.lv-pv__bad li{display:flex;gap:.35rem;align-items:flex-start}
.lv-pv__bad .lv-ico{margin-top:.15rem}
.lv-check{display:flex;gap:.45rem;align-items:center;font-size:.86rem;cursor:pointer}
.lv-checks2{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.45rem .8rem}
.lv-days{border:1px solid var(--line);border-radius:10px;padding:.5rem .8rem;display:flex;gap:.4rem 1rem;flex-wrap:wrap;margin:0}
.lv-days legend{font-size:.8rem;font-weight:800;color:var(--muted);padding:0 .3rem}
.lv-days label{display:flex;gap:.3rem;align-items:center;font-size:.85rem;cursor:pointer}

/* request cards + timeline */
.lv-reqs{display:flex;flex-direction:column;gap:.6rem}
.lv-req{border:1px solid var(--line);border-radius:12px;padding:.7rem .85rem;display:flex;flex-direction:column;gap:.5rem;background:#fff}
.lv-req header,.lv-req footer{display:flex;justify-content:space-between;align-items:center;gap:.6rem;flex-wrap:wrap}
.lv-req header>div{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.lv-req footer:empty{display:none}
.lv-req__p{margin:0;font-size:.86rem;color:#3d4450}
.lv-req .hr-tablewrap{font-size:.85rem}
.lv-req-h{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;margin-bottom:.7rem}
.lv-reason{background:#f6f8fb;border-radius:10px;padding:.55rem .75rem;margin:.6rem 0 0;font-size:.88rem;white-space:pre-wrap}
.lv-file{display:inline-flex;align-items:center;gap:.35rem;font-size:.84rem;font-weight:700;color:var(--blue-d);text-decoration:none;margin-top:.5rem}
.lv-file:hover{text-decoration:underline}
.lv-tl{list-style:none;margin:0;padding:0;display:flex;gap:.3rem;flex-wrap:wrap}
.lv-tl__s{flex:1 1 140px;display:flex;gap:.45rem;align-items:flex-start;background:#f8f9fb;border-radius:10px;padding:.45rem .55rem;font-size:.8rem;min-width:0}
.lv-tl__s b{display:block;font-size:.8rem}
.lv-tl__s small{display:block;color:var(--muted);font-size:.74rem}
.lv-tl__note{font-style:italic;color:#4b5563 !important}
.lv-tl__dot{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;background:#e5e8ee;color:#6b7280}
.lv-tl__dot .lv-ico{width:13px;height:13px;vertical-align:0}
.lv-tl__s--done .lv-tl__dot{background:#dcf3e3;color:#166534}
.lv-tl__s--bad .lv-tl__dot{background:#fde2e1;color:#b3261e}
.lv-tl__s--wait .lv-tl__dot{background:#fff1d6;color:#a35d00}
.lv-tl__s--wait{background:#fffaf0}
.lv-tl__s--todo{opacity:.6}
.lv-tl__s--skip .lv-tl__dot{background:#eceff3;color:#8a93a3}

/* month calendar (who is off) */
.lv-monthnav{display:flex;align-items:center;gap:.6rem}
.lv-monthnav h3{min-width:8.5rem;text-align:center}
.lv-monthnav .btn{padding:.3rem .45rem}
.lv-monthnav .btn .lv-ico{margin:0}
.lv-legend{display:flex;gap:.8rem;flex-wrap:wrap;font-size:.76rem;color:var(--muted);font-weight:700}
.lv-legend span{display:inline-flex;gap:.3rem;align-items:center}
.lv-legend i{width:12px;height:12px;border-radius:3px;display:inline-block}
.lv-striped{background:repeating-linear-gradient(135deg,var(--c,#9aa3b1) 0 4px,#fff 4px 7px) !important;border:1px solid var(--c,#9aa3b1) !important}
.lv-cal-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px}
.lv-cal{border-collapse:separate;border-spacing:0;font-size:.78rem;min-width:100%}
.lv-cal th,.lv-cal td{padding:0;text-align:center;border-bottom:1px solid #f0f2f6}
.lv-cal thead th{background:#f6f8fb;color:var(--muted);font-weight:800;padding:.3rem 0;min-width:26px}
.lv-cal thead th small{display:block;font-size:.66rem;font-weight:700}
.lv-cal .lv-cal__name{position:sticky;inset-inline-start:0;background:#fff;text-align:start;padding:.45rem .7rem;white-space:nowrap;font-weight:700;z-index:1;border-inline-end:1px solid var(--line);min-width:150px}
.lv-cal thead .lv-cal__name{background:#f6f8fb}
.lv-cal td{height:34px}
.lv-cal .wk{background:#fafbfc}
.lv-cal thead .wk{background:#eef1f5}
.lv-cal .td{box-shadow:inset 0 0 0 1px rgba(31,143,191,.35)}
.lv-cal thead .td{color:var(--blue-d)}
.lv-cal td.on button{display:block;width:100%;height:20px;border:0;margin:0;padding:0;background:var(--c);cursor:pointer;border-radius:0}
.lv-cal td.on button:hover{filter:brightness(1.1)}
.lv-cal td.on button:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}

.lv-pos{color:#166534}
.lv-neg{color:#b3261e}

/* dashboard widgets */
.lv-kpi{all:unset;display:block;width:100%;cursor:pointer;box-sizing:border-box}
.lv-kpi:focus-visible{outline:2px solid var(--blue);outline-offset:4px;border-radius:8px}
.lv-kpi:hover b{color:var(--blue-d)}

/* violations */
.lv-alert{display:flex;gap:.7rem;align-items:flex-start;background:#fdeeee;border:1px solid #f5c6c3;color:#7f1d1d;border-radius:12px;padding:.8rem 1rem;margin-bottom:1rem}
.lv-alert>.lv-ico{width:20px;height:20px;margin-top:.15rem;color:#b3261e}
.lv-alert ul{margin:.25rem 0 0;padding-inline-start:1.1rem;font-size:.87rem}
.lv-ack{display:inline-flex;gap:.35rem;align-items:center;font-size:.84rem;color:#166534;font-weight:700;margin:.6rem 0 0}
.lv-ackf{display:flex;gap:.4rem;align-items:center;flex:1;justify-content:flex-end}
.lv-ackf .in{max-width:240px;padding:.35rem .6rem;font-size:.84rem}
.lv .hr-table td small{line-height:1.4}

@media (max-width:860px){
  .lv-2col{grid-template-columns:1fr}
}
@media (max-width:640px){
  .lv-seg{width:100%;overflow-x:auto;flex-wrap:nowrap}
  .lv-seg button{white-space:nowrap}
  .lv-pv__nums{grid-template-columns:1fr 1fr 1fr;gap:.3rem}
  .lv-pv__nums b{font-size:.95rem}
  .lv-bal{grid-template-columns:1fr 1fr}
  .lv-tl{flex-direction:column}
  .lv-tl__s{flex-basis:auto}
  .lv-ackf{flex-wrap:wrap;justify-content:flex-start}
  .lv-ackf .in{max-width:none;flex:1}
  .lv-cal .lv-cal__name{min-width:110px;max-width:120px;overflow:hidden;text-overflow:ellipsis}
}
