/* Workforce screen styles. Uses the shared tokens so light and dark both work. */
.wf-track { display: grid; gap: 14px; }
.wf-trow { display: flex; align-items: center; gap: 14px; }
.wf-trow .grow { display: grid; gap: 4px; }
.wf-trow small { font-size: 12px; }
.wf-buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.wf-bucket { padding: 12px 14px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); display: grid; gap: 6px; align-content: start; min-width: 0; }
.wf-bh { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 650; color: var(--ink2); }
.wf-bh b { font: 800 22px var(--head); color: var(--ink); }
.wf-bucket.bad .wf-bh b { color: var(--bad); } .wf-bucket.warn .wf-bh b { color: var(--warn); } .wf-bucket.info .wf-bh b { color: var(--info); }
.wf-bi { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.wf-bi { align-items: baseline; } .wf-bi .ellip { flex: 1; min-width: 0; max-width: none; } .wf-bi small { color: var(--ink3); white-space: nowrap; font-size: 11.5px; }
.wf-clock { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wf-clock > .att-ic { width: 44px; height: 44px; border-radius: 14px; }
.wf-clock .grow { flex: 1 1 240px; }
.wf-clock.on { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.wf-bal { display: grid; gap: 12px; }
.wf-bal-v { display: flex; align-items: baseline; gap: 8px; }
.wf-bal-v b { font: 800 30px var(--head); letter-spacing: -.03em; }
.wf-bal-v span { color: var(--ink3); font-size: 13px; }
.wf-bal-f { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink3); }
.wf-hol { display: grid; }
.wf-hrow { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.wf-hrow:last-child { border-bottom: 0; }
.wf-hd { width: 44px; flex: none; display: grid; justify-items: center; padding: 4px 0; border-radius: 10px; background: var(--surface3); font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--ink3); line-height: 1.1; }
.wf-hd b { font: 800 16px var(--head); color: var(--ink); }
.wf-net { font: 800 30px/1.1 var(--head); letter-spacing: -.03em; margin-top: 2px; }
.wf-issue { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); }
.wf-sif { margin: 0; padding: 14px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); font: 12.5px/1.6 var(--mono); overflow-x: auto; white-space: pre; color: var(--ink2); }
.wf-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.wf-dept { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); text-align: start; transition: border-color .15s, background .15s; }
.wf-dept:hover { border-color: rgba(244,122,32,.45); background: var(--surface); }
.wf-dept > div { flex: 1; min-width: 0; display: grid; }
.wf-dept small { color: var(--ink3); font-size: 12px; }
.wf-tree-wrap { overflow-x: auto; padding: 8px 0 4px; }
.wf-tree, .wf-tree ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; position: relative; }
.wf-tree ul { padding-top: 22px; }
.wf-tree { min-width: max-content; margin: 0 auto; }
.wf-tree li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 10px 0; }
.wf-tree > li { padding-top: 0; }
.wf-tree li::before, .wf-tree li::after { content: ''; position: absolute; top: 0; width: 50%; height: 22px; border-top: 1px solid var(--line-strong); }
.wf-tree li::before { inset-inline-end: 50%; border-inline-end: 1px solid var(--line-strong); }
.wf-tree li::after { inset-inline-start: 50%; }
.wf-tree > li::before, .wf-tree > li::after { display: none; }
.wf-tree li:only-child::before, .wf-tree li:only-child::after { display: none; }
.wf-tree li:only-child { padding-top: 22px; }
.wf-tree > li:only-child { padding-top: 0; }
.wf-tree li:first-child::before, .wf-tree li:last-child::after { border: 0; }
.wf-tree li:last-child::before { border-inline-end: 1px solid var(--line-strong); border-start-end-radius: 10px; }
.wf-tree li:first-child::after { border-inline-start: 1px solid var(--line-strong); border-start-start-radius: 10px; }
.wf-tree ul::before { content: ''; position: absolute; top: 0; inset-inline-start: 50%; height: 22px; border-inline-start: 1px solid var(--line-strong); }
.wf-node { display: grid; justify-items: center; gap: 3px; min-width: 150px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line2); box-shadow: var(--sh-1); text-align: center; }
.wf-node b { font-size: 14px; } .wf-node small { color: var(--ink3); font-size: 12px; margin-bottom: 4px; }
@media (max-width: 860px) {
  .wf-buckets { grid-template-columns: 1fr 1fr; }
  .wf-clock .btn { width: 100%; }
}

/* The shared side drawer (.overlay.side) also matches the sidebar rule .side, which makes it sticky and opaque.
   Restore the overlay look here so every drawer in this screen slides in from the inline end with a backdrop. */
.overlay.side { position: fixed; top: 0; height: auto; display: grid; flex-direction: initial; background: rgba(10,10,14,.42); border-inline-end: 0; overflow: visible; z-index: 60; }
[data-theme="dark"] .overlay.side { background: rgba(0,0,0,.62); }
@media (max-width: 860px) { .overlay.side { padding: 0; place-items: end stretch; } }

/* Arabic: the org chart connectors mirror with logical properties; long Arabic labels may wrap */
:lang(ar) .wf-bi small, :lang(ar) .wf-bh { white-space: normal; }
.wf-sif { direction: ltr; text-align: left; }
