/* ─────────────────────────────────────────────────────────────────────
   HOMEi HR — four inner screens on the house design system (HR-DS-4,
   mockups approved by Kamal 30-9-2026):
     «الحضور اليومي» (.hs-att-page) · «تعديل موظف» (.hs-emp-page)
     «تفاصيل الطلب» (.hs-req-page) · «الطلبات» (.hs-reqs-page)

   Prefix `hs` (HR screens). Colours: the house tokens (--lm-d-* in
   tokens.css, with their dark mirror) — no colour literal here, the
   ratchet holds this sheet at zero. Text never under 12px. Logical
   properties only (RTL/LTR).

   DO NOT TOUCH the HR section strip (filament/hr/section-tabs:
   .hr-strip / .mcp-tab, styled in project-360.css). Kamal 30-9: «متغيرش
   التصميم دا خالص» — nothing in this sheet selects it.

   Registered as a Filament asset: a change here ships nothing until
   `php artisan filament:assets` is run and public/css/app/ is committed.
   ──────────────────────────────────────────────────────────────────── */

/* ── 1. the page head (Filament) ── */
body .hs-page .fi-header-heading { font-size: 28px; font-weight: 700; line-height: 1.25; color: var(--lm-d-ink); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
body .hs-page .fi-header-subheading { margin-block-start: 4px; font-size: 14px; color: var(--lm-d-muted); }
body .hs-page .fi-header-actions-ctn .fi-btn {
    min-block-size: 44px;
    border-radius: 12px;
    padding-inline: 16px;
    background: var(--lm-d-surface);
    color: var(--lm-d-ink);
    box-shadow: inset 0 0 0 1px var(--lm-d-control-edge);
    font-weight: 700;
}
body .hs-page .fi-header-actions-ctn .fi-btn .fi-icon { color: currentColor; }
body .hs-page .fi-header-actions-ctn .fi-btn:is(.fi-color-primary, .fi-color-success) { background: var(--lm-d-accent); color: var(--lm-d-on-accent); box-shadow: 0 4px 12px var(--lm-d-accent-soft); }
body .hs-page .fi-header-actions-ctn .fi-btn.fi-color-danger { color: var(--lm-d-danger); box-shadow: inset 0 0 0 1px var(--lm-d-gap-edge); }

.hs { display: flex; flex-direction: column; gap: 14px; color: var(--lm-d-ink); }
.hs :focus-visible { outline: 2px solid var(--lm-d-info); outline-offset: 2px; }
.hs-num, .hs .hs-num { font-variant-numeric: tabular-nums; }
.hs bdi { unicode-bidi: isolate; }
.hs-ic { inline-size: 18px; block-size: 18px; flex: none; }
.hs-dim { color: var(--lm-d-muted); font-size: 12.5px; }

/* text tones (words and figures only) */
:is(.hs, .hs-page) .is-ink { color: var(--lm-d-ink); }
:is(.hs, .hs-page) .is-muted { color: var(--lm-d-muted); }
:is(.hs, .hs-page) .is-dim { color: var(--lm-d-subtle); }
:is(.hs, .hs-page) .is-ok { color: var(--lm-d-ok); }
:is(.hs, .hs-page) .is-warn { color: var(--lm-d-warn); }
:is(.hs, .hs-page) .is-danger { color: var(--lm-d-danger); }
:is(.hs, .hs-page) .is-accent { color: var(--lm-d-accent-ink); }
:is(.hs, .hs-page) .is-info { color: var(--lm-d-info); }

/* ── 2. the numbers strip ── */
.hs-strip {
    display: grid;
    grid-template-columns: repeat(var(--hs-cols, 6), minmax(0, 1fr));
    background: var(--lm-d-surface);
    border: 1px solid var(--lm-d-border);
    border-radius: 16px;
    box-shadow: 0 1px 2px var(--lm-d-shadow);
}
.hs-strip-c { padding: 12px 18px; border-inline-start: 1px solid var(--lm-d-divider); min-inline-size: 0; }
.hs-strip-c:first-child { border-inline-start: 0; }
.hs-k-l { font-size: 13px; color: var(--lm-d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-k-v { font-size: 26px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--lm-d-ink); }
.hs-k-v.is-text { font-size: 20px; line-height: 1.6; }
.hs-k-s { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--lm-d-muted); }

/* ── 3. the ruled card (the page's main surface) ── */
.hs-card {
    background: var(--lm-d-surface);
    border: 1px solid var(--lm-d-border);
    border-block-start: 3px solid var(--lm-d-info);
    border-radius: 16px;
    box-shadow: 0 1px 2px var(--lm-d-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-inline-size: 0;
}
.hs-card.is-plain { border-block-start-width: 1px; border-block-start-color: var(--lm-d-border); }
.hs-card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px; border-block-end: 1px solid var(--lm-d-divider); }
.hs-card-t { font-size: 20px; font-weight: 700; margin: 0; color: var(--lm-d-ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.hs-card-t span { font-size: 14px; font-weight: 500; color: var(--lm-d-muted); }
.hs-card-b { padding: 14px 18px; display: flex; flex-direction: column; gap: 14px; }

/* ── 4. view pills (navy when on) and tabs inside a card ── */
.hs-pills, .hs-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hs-tabs { padding: 12px 16px; border-block-end: 1px solid var(--lm-d-divider); }
:is(.hs-pill, .hs-tab) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-block-size: 40px;
    padding-inline: 16px;
    border-radius: 20px;
    border: 1px solid var(--lm-d-border);
    background: var(--lm-d-surface);
    color: var(--lm-d-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}
:is(.hs-pill, .hs-tab) .hs-ic { inline-size: 16px; block-size: 16px; color: var(--lm-d-muted); }
:is(.hs-pill, .hs-tab) b { font-size: 12.5px; font-weight: 700; color: var(--lm-d-muted); background: var(--lm-d-chip-bg); border-radius: 999px; padding-inline: 7px; line-height: 20px; font-variant-numeric: tabular-nums; }
:is(.hs-pill, .hs-tab):hover { background: var(--lm-d-hover); }
:is(.hs-pill, .hs-tab).is-on { background: var(--lm-d-tab-on-bg); border-color: var(--lm-d-tab-on-bg); color: var(--lm-d-tab-on-ink); }
:is(.hs-pill, .hs-tab).is-on .hs-ic { color: var(--lm-d-tab-on-ink); }
:is(.hs-pill, .hs-tab).is-on b { background: transparent; color: var(--lm-d-tab-on-count); }

/* ── 5. status chips with counts ── */
.hs-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hs-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-block-size: 34px;
    padding-inline: 12px;
    border: 1px solid var(--lm-d-border);
    border-radius: 10px;
    background: var(--lm-d-page);
    color: var(--lm-d-muted);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}
.hs-chip b { color: var(--lm-d-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.hs-chip .hs-ic { inline-size: 14px; block-size: 14px; }
.hs-chip:hover { background: var(--lm-d-chip-bg); }
.hs-chip.is-on { background: var(--lm-d-info-soft); border-color: var(--lm-d-info-soft); color: var(--lm-d-info); }
.hs-chip.is-on b { color: var(--lm-d-info); }

/* ── 6. segmented switch ── */
.hs-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--lm-d-border); border-radius: 10px; background: var(--lm-d-surface); flex: none; }
.hs-seg button { block-size: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--lm-d-muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.hs-seg button:hover { color: var(--lm-d-ink); }
.hs-seg button.is-on { background: var(--lm-d-chip-bg); color: var(--lm-d-ink); font-weight: 700; }
.hs-seg button .hs-ic { inline-size: 16px; block-size: 16px; }

/* ── 7. the split: the list (start) and the item opened beside it (end) ── */
.hs-split { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.hs-split.has-open { grid-template-columns: minmax(0, 1fr) 360px; }
.hs-split:not(.has-open) .hs-panel { display: none; }
body .hs-list { min-inline-size: 0; }
.hs-split.has-open .hs-list { border-inline-end: 1px solid var(--lm-d-divider); }

/* a Filament table flattened into the card */
body .hs-list .fi-ta-ctn { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
body .hs-list .fi-ta-header-ctn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-inline: 18px; border-block-end: 1px solid var(--lm-d-divider); }
body .hs-list .fi-ta-header-ctn > * { border: 0; }
body .hs-list .fi-ta-header { padding: 10px 0; flex: 1 1 auto; min-inline-size: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body .hs-list .fi-ta-header-toolbar { padding: 8px 0; flex: 0 1 auto; border: 0; margin-inline-start: auto; }
body .hs-list .fi-ta-search-field { inline-size: min(320px, 100%); }
body .hs-list .fi-ta-search-field .fi-input-wrp { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--lm-d-control-edge); background: var(--lm-d-surface); }
body .hs-list .fi-ta-header-cell { background: var(--lm-d-surface); color: var(--lm-d-ink); font-size: 13.5px; font-weight: 700; padding-inline: 12px; white-space: nowrap; }
body .hs-list .fi-ta-header-cell .fi-ta-header-cell-label { color: var(--lm-d-ink); }
body .hs-list .fi-ta-cell { padding-inline: 12px; color: var(--lm-d-ink); }
body .hs-list .fi-ta-cell .fi-ta-text-item { color: var(--lm-d-ink); }
body .hs-list .fi-ta-row > td { border-block-end: 1px solid var(--lm-d-divider); }
body .hs-list .fi-ta-row:hover > td { background: var(--lm-d-hover); }
body .hs-list .fi-ta-row { cursor: pointer; }
body .hs-list .fi-ta-row.hs-row-open > td { background: var(--lm-d-row-hl); }
body .hs-list .fi-ta-row.hs-row-open > td:first-child { box-shadow: inset -3px 0 0 var(--lm-d-accent); }
body[dir='ltr'] .hs-list, [dir='ltr'] body .hs-list .fi-ta-row.hs-row-open > td:first-child { box-shadow: inset 3px 0 0 var(--lm-d-accent); }
body .hs-list .fi-ta-actions { gap: 6px; }
body .hs-list .fi-ta-actions .fi-icon-btn { inline-size: 34px; block-size: 34px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--lm-d-border); background: var(--lm-d-surface); color: var(--lm-d-muted); }
body .hs-list .fi-ta-actions .fi-icon-btn.fi-color-danger { color: var(--lm-d-danger); box-shadow: inset 0 0 0 1px var(--lm-d-gap-edge); }
body .hs-list .fi-ta-actions .fi-icon-btn:hover { background: var(--lm-d-hover); color: var(--lm-d-ink); }
body .hs-list .fi-pagination { padding-inline: 18px; }
body .hs-list .fi-pagination-item.fi-active .fi-pagination-item-btn { color: var(--lm-d-accent-ink); box-shadow: inset 0 0 0 1px var(--lm-d-accent); }

/* ── 8. the panel (the opened item) ── */
.hs-panel { position: sticky; inset-block-start: 12px; display: flex; flex-direction: column; background: var(--lm-d-surface); max-block-size: calc(100dvh - 120px); min-block-size: 420px; }
.hs-p { display: flex; flex-direction: column; min-block-size: 0; flex: 1 1 auto; }
.hs-p-h { padding: 14px 18px 12px; border-block-end: 1px solid var(--lm-d-divider); }
.hs-p-t { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--lm-d-ink); }
.hs-p-x { margin-inline-start: auto; inline-size: 32px; block-size: 32px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--lm-d-border); background: var(--lm-d-surface); color: var(--lm-d-muted); cursor: pointer; }
.hs-p-x .hs-ic { inline-size: 16px; block-size: 16px; }
.hs-p-s { margin-block-start: 2px; font-size: 13px; color: var(--lm-d-muted); }
.hs-p-b { flex: 1 1 auto; min-block-size: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px; display: flex; flex-direction: column; gap: 14px; }
.hs-p-f { padding: 12px 18px; border-block-start: 1px solid var(--lm-d-divider); display: flex; flex-wrap: wrap; gap: 8px; }
.hs-p-f > .hs-btn { flex: 1 1 0; justify-content: center; }

/* ── 9. status tag (a dot + a word) ── */
.hs-tag { display: inline-flex; align-items: center; gap: 6px; min-block-size: 26px; padding-inline: 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; line-height: 1.4; }
.hs-tag::before { content: ''; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; flex: none; }
.hs-tag.is-info { background: var(--lm-d-info-soft); color: var(--lm-d-info); }
.hs-tag.is-ok { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }
.hs-tag.is-warn { background: var(--lm-d-warn-soft); color: var(--lm-d-warn); }
.hs-tag.is-danger { background: var(--lm-d-danger-soft); color: var(--lm-d-danger); }
.hs-tag.is-accent { background: var(--lm-d-accent-soft); color: var(--lm-d-accent-ink); }
.hs-tag.is-quiet { background: var(--lm-d-quiet-bg); color: var(--lm-d-muted); }
body .hs-page .fi-header-heading .hs-tag { font-size: 13px; min-block-size: 28px; }
.hs-mini { display: flex; flex-wrap: wrap; gap: 4px; }
.hs-mini .hs-tag { min-block-size: 24px; font-size: 12px; padding-inline: 8px; }

/* ── 10. a person in a row / a card ── */
.hs-av { display: inline-grid; place-items: center; flex: none; inline-size: 40px; block-size: 40px; border-radius: 10px; font-weight: 700; font-size: 15px; background: var(--lm-d-info-soft); color: var(--lm-d-info); }
.hs-av.is-lg { inline-size: 52px; block-size: 52px; border-radius: 14px; font-size: 18px; }
.hs-av.is-warn { background: var(--lm-d-warn-soft); color: var(--lm-d-warn); }
.hs-av.is-accent { background: var(--lm-d-accent-soft); color: var(--lm-d-accent-ink); }
.hs-person { display: flex; align-items: center; gap: 10px; min-inline-size: 0; }
.hs-person-t { min-inline-size: 0; display: flex; flex-direction: column; }
.hs-person-t b { font-weight: 700; line-height: 1.35; color: var(--lm-d-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-person-t small { font-size: 12.5px; color: var(--lm-d-muted); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-place { display: flex; flex-direction: column; font-size: 13.5px; color: var(--lm-d-muted); }
.hs-place small { font-size: 12px; color: var(--lm-d-subtle); }

/* ── 11. stages ── */
.hs-steps { display: flex; justify-content: space-between; position: relative; margin: 0; padding: 4px 0 0; list-style: none; }
.hs-steps::before { content: ''; position: absolute; inset-block-start: 12px; inset-inline: 14px; border-block-start: 2px solid var(--lm-d-divider); }
.hs-steps li { position: relative; flex: 1; text-align: center; font-size: 12.5px; color: var(--lm-d-muted); }
.hs-steps li i { display: block; inline-size: 16px; block-size: 16px; margin: 0 auto 4px; border-radius: 50%; background: var(--lm-d-surface); border: 2px solid var(--lm-d-control-edge); }
.hs-steps li.is-done i { background: var(--lm-d-ok); border-color: var(--lm-d-ok); }
.hs-steps li.is-now { color: var(--lm-d-ink); font-weight: 700; }
.hs-steps li.is-now i { background: var(--lm-d-accent); border-color: var(--lm-d-accent); box-shadow: 0 0 0 4px var(--lm-d-accent-soft); }
.hs-steps li.is-stop { color: var(--lm-d-danger); font-weight: 700; }
.hs-steps li.is-stop i { background: var(--lm-d-danger); border-color: var(--lm-d-danger); }

/* ── 12. figures and lines ── */
.hs-sec { font-size: 14px; font-weight: 700; margin-block-end: 6px; color: var(--lm-d-ink); display: flex; align-items: center; gap: 6px; }
.hs-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-block-end: 1px solid var(--lm-d-divider); font-size: 13.5px; color: var(--lm-d-ink); }
.hs-line:last-child { border-block-end: 0; }
.hs-line > span { color: var(--lm-d-muted); }
.hs-line b { font-variant-numeric: tabular-nums; text-align: end; }
.hs-note { border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.6; border: 1px solid var(--lm-d-divider); display: flex; flex-direction: column; gap: 4px; }
.hs-note.is-info { background: var(--lm-d-info-soft); color: var(--lm-d-info); }
.hs-note.is-warn { background: var(--lm-d-warn-soft); color: var(--lm-d-warn); }
.hs-note.is-danger { background: var(--lm-d-danger-soft); color: var(--lm-d-danger); }
.hs-note.is-ok { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }
.hs-note.is-quiet { background: var(--lm-d-hover); color: var(--lm-d-muted); }
.hs-note.is-row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.hs-punch, .hs-money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hs-punch > div, .hs-money > div { border: 1px solid var(--lm-d-border); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; min-inline-size: 0; }
.hs-punch span, .hs-money span { font-size: 12px; color: var(--lm-d-muted); }
.hs-punch b { font-size: 17px; font-weight: 700; }
.hs-money b { font-size: 15px; font-weight: 700; }
.hs-punch small { font-size: 12px; color: var(--lm-d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.hs-kv > div { border: 1px solid var(--lm-d-border); border-radius: 12px; padding: 10px 12px; min-inline-size: 0; }
.hs-kv span { display: block; font-size: 12px; color: var(--lm-d-muted); }
.hs-kv b { display: block; margin-block-start: 2px; font-size: 15px; font-weight: 700; color: var(--lm-d-ink); overflow-wrap: anywhere; }
.hs-kv > div.is-wide { grid-column: 1 / -1; }
.hs-panel .hs-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hs-kv > div.is-wide b { font-weight: 500; font-size: 14px; line-height: 1.7; }
.hs-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hs-facts > div { border: 1px solid var(--lm-d-border); border-radius: 10px; padding: 8px 10px; min-inline-size: 0; }
.hs-facts span { display: block; font-size: 12px; color: var(--lm-d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-facts b { display: block; font-size: 14px; color: var(--lm-d-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-hist { display: flex; flex-direction: column; }
.hs-hist > div { display: flex; gap: 12px; padding: 9px 0; border-block-end: 1px solid var(--lm-d-divider); font-size: 13.5px; color: var(--lm-d-ink); }
.hs-hist > div:last-child { border-block-end: 0; }
.hs-hist > div > div { min-inline-size: 0; }
.hs-hist i { inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--lm-d-dot); margin-block-start: 7px; flex: none; }
.hs-hist i.is-ok { background: var(--lm-d-ok); }
.hs-hist i.is-danger { background: var(--lm-d-danger); }
.hs-hist i.is-info { background: var(--lm-d-info); }
.hs-hist i.is-now { background: var(--lm-d-accent); box-shadow: 0 0 0 3px var(--lm-d-accent-soft); }
.hs-hist small { display: block; color: var(--lm-d-muted); font-size: 12px; }
.hs-hist q { display: block; quotes: none; margin-block-start: 4px; color: var(--lm-d-muted); font-size: 13px; }
.hs-link { color: var(--lm-d-accent-ink); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.hs-link:hover { text-decoration: underline; }

/* ── 13. buttons: one orange primary per area, the rest outline ── */
.hs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-block-size: 42px;
    padding-inline: 16px;
    border-radius: 10px;
    border: 1px solid var(--lm-d-control-edge);
    background: var(--lm-d-surface);
    color: var(--lm-d-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}
.hs-btn:hover { background: var(--lm-d-hover); }
.hs-btn.is-primary { background: var(--lm-d-accent); border-color: var(--lm-d-accent); color: var(--lm-d-on-accent); }
.hs-btn.is-primary:hover { filter: brightness(0.96); }
.hs-btn.is-danger { color: var(--lm-d-danger); border-color: var(--lm-d-gap-edge); }
.hs-btn.is-sm { min-block-size: 36px; padding-inline: 14px; font-size: 13.5px; }
.hs-btn:disabled { opacity: .6; cursor: default; }
.hs-stack { display: flex; flex-direction: column; gap: 8px; }
.hs-stack > .hs-btn { justify-content: center; }

/* ── 14. record pages: main card + aside ── */
.hs-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.hs-aside { display: flex; flex-direction: column; gap: 14px; position: sticky; inset-block-start: 12px; min-inline-size: 0; }
.hs-who { display: flex; align-items: center; gap: 12px; }
.hs-who b { display: block; font-size: 16px; line-height: 1.3; color: var(--lm-d-ink); }
.hs-who small { display: block; font-size: 12.5px; color: var(--lm-d-muted); }
.hs-reason { border: 1px solid var(--lm-d-divider); border-radius: 12px; padding: 12px 14px; background: var(--lm-d-hover); font-size: 14px; line-height: 1.7; color: var(--lm-d-ink); white-space: pre-line; }

/* ── 15. «تعديل موظف»: the form as one ruled card, sections split by rules, the aside beside it ── */
body .hs-emp-page .fi-page-content { gap: 16px; }
body .hs-emp-grid > .fi-sc { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
body .hs-emp-grid > .fi-sc > .fi-grid-col { grid-column: auto; min-inline-size: 0; }
body .hs-emp-grid > .fi-sc > .fi-grid-col:last-child { position: sticky; inset-block-start: 12px; }
body .hs-emp-page .hs-emp-main {
    background: var(--lm-d-surface);
    border: 1px solid var(--lm-d-border);
    border-block-start: 3px solid var(--lm-d-info);
    border-radius: 16px;
    box-shadow: 0 1px 2px var(--lm-d-shadow);
    overflow: clip;
}
body .hs-emp-page .hs-emp-main > .fi-sc { gap: 0; }
body .hs-emp-page .hs-emp-main > .fi-sc > .fi-grid-col { padding-inline: 18px; }
body .hs-emp-page .hs-emp-main .fi-section { border: 0; border-radius: 0; box-shadow: none; outline: 0; background: transparent; }
body .hs-emp-page .hs-emp-main > .fi-sc > .fi-grid-col + .fi-grid-col .fi-section { border-block-start: 1px solid var(--lm-d-divider); }
body .hs-emp-page .hs-emp-main .fi-section-header { padding-inline: 0; padding-block: 18px 4px; }
body .hs-emp-page .hs-emp-main .fi-section-header-heading { font-size: 16px; font-weight: 700; color: var(--lm-d-ink); }
body .hs-emp-page .hs-emp-main .fi-section-header-description { font-size: 12.5px; color: var(--lm-d-muted); }
body .hs-emp-page .hs-emp-main .fi-section-content-ctn { border: 0; }
body .hs-emp-page .hs-emp-main .fi-section-content { padding-inline: 0; padding-block: 10px 18px; }
body .hs-emp-page .hs-emp-main .fi-fo-field-label-content { font-size: 13.5px; font-weight: 700; color: var(--lm-d-ink); }
body .hs-emp-page .hs-emp-main .fi-input-wrp { border-radius: 10px; min-block-size: 44px; box-shadow: inset 0 0 0 1px var(--lm-d-control-edge); background: var(--lm-d-surface); }
body .hs-emp-page .hs-emp-main .fi-input-wrp.fi-disabled { background: var(--lm-d-page); }
body .hs-emp-page .hs-emp-main .fi-fo-field-wrp-helper-text,
body .hs-emp-page .hs-emp-main .fi-sc-text { font-size: 12.5px; color: var(--lm-d-muted); line-height: 1.5; }
body .hs-emp-page .hs-emp-main .fi-toggle.fi-toggle-on { background: var(--lm-d-accent); }
/* compact, as the approved design: title and its hint on one line, tight rows */
body .hs-emp-page .hs-emp-main .fi-section-header { padding-block: 12px 0; }
body .hs-emp-page .hs-emp-main .fi-section-header-text-ctn { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
body .hs-emp-page .hs-emp-main .fi-section-content { padding-block: 8px 12px; }
body .hs-emp-page .hs-emp-main .fi-section-content > .fi-sc, body .hs-emp-page .hs-emp-main .fi-section-content .fi-sc { gap: 10px 16px; }
body .hs-emp-page .hs-emp-main .fi-fo-field { gap: 4px; }
body .hs-emp-page .hs-emp-main .hs-emp-switches { padding-block-start: 26px; }
body .hs-emp-page .hs-emp-main .hs-emp-switches > .fi-sc { gap: 6px; }
.hs-emp-aside { gap: 14px; }

/* ── 16. «تفاصيل الطلب» and «الطلبات» ── */
body .hs-req-page .fi-page-content, body .hs-reqs-page .fi-page-content { gap: 14px; }
body .hs-req-page .fi-sc-section:has(.hs-req), body .hs-req-page .fi-section:has(.hs-req) { border: 0; box-shadow: none; background: transparent; }
body .hs-req-page .fi-section:has(.hs-req) > .fi-section-content-ctn > .fi-section-content { padding: 0; }
.hs-step-meta { display: block; font-size: 12.5px; color: var(--lm-d-muted); }
.hs-chain { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.hs-chain > li { display: flex; gap: 12px; padding: 12px 0; border-block-end: 1px solid var(--lm-d-divider); }
.hs-chain > li:last-child { border-block-end: 0; }
.hs-chain .hs-chain-dot { inline-size: 28px; block-size: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 700; background: var(--lm-d-quiet-bg); color: var(--lm-d-muted); }
.hs-chain .is-done .hs-chain-dot { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }
.hs-chain .is-current .hs-chain-dot { background: var(--lm-d-accent-soft); color: var(--lm-d-accent-ink); box-shadow: 0 0 0 3px var(--lm-d-accent-soft); }
.hs-chain .is-rejected .hs-chain-dot { background: var(--lm-d-danger-soft); color: var(--lm-d-danger); }
.hs-chain .hs-chain-dot .hs-ic { inline-size: 14px; block-size: 14px; }
.hs-chain b { display: block; font-size: 14px; color: var(--lm-d-ink); }
body .hs-reqs-page .hs-list .fi-ta-header-cell:last-child, body .hs-reqs-page .hs-list .fi-ta-actions-header-cell { text-align: end; }
body .hs-list .fi-ta-actions .fi-btn { min-block-size: 36px; border-radius: 9px; font-weight: 700; font-size: 13.5px; }
body .hs-list .fi-ta-actions .fi-btn.hs-row-approve { background: var(--lm-d-accent); color: var(--lm-d-on-accent); box-shadow: none; }
body .hs-list .fi-ta-actions .fi-btn.hs-row-approve .fi-icon { color: var(--lm-d-on-accent); }
body .hs-list .fi-ta-actions .fi-btn.hs-row-reject { background: var(--lm-d-surface); color: var(--lm-d-danger); box-shadow: inset 0 0 0 1px var(--lm-d-gap-edge); }
body .hs-list .fi-ta-actions .fi-btn.hs-row-reject .fi-icon { color: var(--lm-d-danger); }
body .hs-list .fi-ta-actions .fi-btn.hs-row-view { background: var(--lm-d-surface); color: var(--lm-d-muted); box-shadow: inset 0 0 0 1px var(--lm-d-border); padding-inline: 8px; }
body .hs-list .fi-ta-actions .fi-btn.hs-row-view .fi-icon { color: var(--lm-d-muted); }
.hs-cell-2 { display: flex; flex-direction: column; font-size: 14px; color: var(--lm-d-ink); }
.hs-cell-2 small { font-size: 12.5px; color: var(--lm-d-muted); }
.hs-money-line { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13.5px; color: var(--lm-d-muted); }
.hs-money-line b { color: var(--lm-d-ink); font-variant-numeric: tabular-nums; }

body .hs-list .fi-ta-filter-indicators { padding-inline: 18px; border-block-end: 1px solid var(--lm-d-divider); }
body .hs-list .fi-ta-filter-indicators .fi-badge { border-radius: 10px; background: var(--lm-d-info-soft); color: var(--lm-d-info); font-weight: 600; min-block-size: 30px; padding-inline: 10px; box-shadow: none; }
body .hs-list .hs-tool-btn { min-block-size: 38px; border-radius: 10px; }

/* ── 17. empty state ── */
.hs-empty { display: grid; place-content: center; justify-items: center; gap: 6px; padding: 32px 24px; text-align: center; color: var(--lm-d-muted); font-size: 13px; }
.hs-empty b { color: var(--lm-d-ink); font-size: 15px; }
.hs-empty .hs-ic { inline-size: 36px; block-size: 36px; color: var(--lm-d-subtle); }

/* ── 18. under 1024px: the page scrolls, the panel becomes a bottom sheet ── */
@media (max-width: 1023.98px) {
    .hs-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hs-strip-c:nth-child(3n + 1) { border-inline-start: 0; }
    .hs-strip-c:nth-child(n + 4) { border-block-start: 1px solid var(--lm-d-divider); }
    .hs-split, .hs-split.has-open { grid-template-columns: minmax(0, 1fr); }
    .hs-split.has-open .hs-list { border-inline-end: 0; }
    .hs-panel { display: none; }
    .hs-split.has-open .hs-panel {
        display: flex;
        position: fixed;
        inset-inline: 0;
        inset-block: auto 0;
        z-index: 45;
        min-block-size: 0;
        max-block-size: 82dvh;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -10px 40px var(--lm-d-sheet-shadow);
    }
    .hs-grid { grid-template-columns: minmax(0, 1fr); }
    .hs-aside, body .hs-emp-page .hs-emp-aside { position: static; }
    .hs-card-h { align-items: stretch; }
    .hs-pills, .hs-tabs, .hs-chips { flex-wrap: nowrap; overflow-x: auto; padding-block-end: 2px; scrollbar-width: none; }
    body .hs-page .fi-header-heading { font-size: 22px; }
}
@media (max-width: 640px) {
    .hs-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hs-strip-c:nth-child(n) { border-inline-start: 0; border-block-start: 1px solid var(--lm-d-divider); }
    .hs-strip-c:nth-child(-n + 2) { border-block-start: 0; }
    .hs-strip-c:nth-child(2n) { border-inline-start: 1px solid var(--lm-d-divider); }
    .hs-k-v { font-size: 22px; }
    .hs-k-v.is-text { font-size: 16px; }
    body .hs-list .fi-ta-search-field { inline-size: 100%; }
    .hs-pill, .hs-tab, .hs-chip, .hs-btn, .hs-seg button, .hs-p-x { min-block-size: 44px; }
    .hs-p-x { inline-size: 44px; }
    .hs-kv, .hs-facts { grid-template-columns: minmax(0, 1fr); }
    /* a phone reads each row as a card: one table, one query, the same actions */
    body .hs-list .fi-ta-table thead { display: none; }
    body .hs-list .fi-ta-table, body .hs-list .fi-ta-table tbody, body .hs-list .fi-ta-row, body .hs-list .fi-ta-row > td { display: block; inline-size: 100%; }
    body .hs-list .fi-ta-row { padding: 10px 14px; border-block-end: 1px solid var(--lm-d-divider); }
    body .hs-list .fi-ta-row > td { border: 0; padding: 2px 0; }
    body .hs-list .fi-ta-row > td:empty { display: none; }
    body .hs-list .fi-ta-row > td .fi-ta-col, body .hs-list .fi-ta-row > td .fi-ta-text { padding: 0; }
    body .hs-list .fi-ta-row > td.fi-ta-actions-cell { padding-block-start: 8px; }
    body .hs-list .fi-ta-row > td.fi-ta-actions-cell .fi-ta-actions { justify-content: flex-start; }
    body .hs-list .fi-ta-row.hs-row-open > td:first-child { box-shadow: none; }
    body .hs-list .fi-ta-row.hs-row-open { box-shadow: inset -3px 0 0 var(--lm-d-accent); }
}
