/* ─────────────────────────────────────────────────────────────────────
   HOMEi HR agent — «قواعد المتابعة» and «مقترحات المتابعة» (HR-AGENT phase 1,
   design approved by Kamal 2026-10-01 on the house design system: the rules
   list, the rule form v4, the proposals list).

   Prefix `fu`. 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).
   Scoped by `.fu-page` (the page class) and `.fu`.

   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 ground and the head ── */
body:has(.fu-page) { background: var(--lm-d-page); }
body:has(.fu-page) .fi-main-ctn { background: transparent; }
.fu-page .fi-header-heading { font-size: 28px; font-weight: 700; line-height: 1.25; color: var(--lm-d-ink); }
.fu-page .fi-header-subheading { margin-block-start: 4px; font-size: 14px; color: var(--lm-d-muted); }

.fu { display: flex; flex-direction: column; gap: 14px; color: var(--lm-d-ink); }
.fu :focus-visible { outline: 2px solid var(--lm-d-info); outline-offset: 2px; }
.fu .fu-num { font-variant-numeric: tabular-nums; }
.fu bdi { unicode-bidi: isolate; }

/* the page's header actions (Filament): outline buttons, the main decision is the orange */
.fu-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;
}
.fu-page .fi-header-actions-ctn .fi-btn .fi-icon { color: currentColor; }
.fu-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); }
.fu-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); }

/* ── 2. text tones (words and figures only) ── */
.fu .is-ink { color: var(--lm-d-ink); }
.fu .is-muted { color: var(--lm-d-muted); }
.fu .is-ok { color: var(--lm-d-ok); }
.fu .is-warn { color: var(--lm-d-warn); }
.fu .is-danger { color: var(--lm-d-danger); }
.fu .is-accent { color: var(--lm-d-accent-ink); }
.fu .is-info { color: var(--lm-d-info); }

/* ── 3. the numbers strip (KPI row): label · big figure · one line under it ── */
.fu-strip {
    display: grid;
    grid-template-columns: repeat(var(--fu-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);
}
.fu-strip-c { padding: 12px 18px; border-inline-start: 1px solid var(--lm-d-divider); min-inline-size: 0; }
.fu-strip-c:first-child { border-inline-start: 0; }
a.fu-strip-c, button.fu-strip-c { color: inherit; text-decoration: none; background: none; border-block: 0; border-inline-end: 0; text-align: start; font: inherit; cursor: pointer; }
a.fu-strip-c:hover, button.fu-strip-c:hover { background: var(--lm-d-hover); }
.fu-k-l { font-size: 13px; color: var(--lm-d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-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; }
.fu-k-s { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* A page that draws its own title row — «مساحتي» with its state chip beside it. */
.fu-ph { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.fu-ph-t { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.3; color: var(--lm-d-ink); }

/* ── 4. the card with the blue rule (the page's main surface) ── */
.fu-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;
}
.fu-card--plain { border-block-start-width: 1px; border-block-start-color: var(--lm-d-border); }
.fu-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);
}
.fu-card-t { font-size: 20px; font-weight: 700; margin: 0; }
.fu-card-t span { font-size: 14px; font-weight: 500; color: var(--lm-d-muted); }
.fu-card-b { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }

/* ── 5. view pills (the page's views / tabs): navy when on ── */
.fu-pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fu-pill {
    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;
    cursor: pointer;
    text-decoration: none;
}
.fu-pill:hover { border-color: var(--lm-d-control-edge); }
.fu-pill.is-on { background: var(--lm-d-tab-on-bg); border-color: var(--lm-d-tab-on-bg); color: var(--lm-d-tab-on-ink); }
.fu-pill-n { font-variant-numeric: tabular-nums; }
.fu-dot { inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--lm-d-info); flex: none; }
.fu-dot.is-accent { background: var(--lm-d-accent); }
.fu-dot.is-ok { background: var(--lm-d-ok); }
.fu-dot.is-danger { background: var(--lm-d-danger); }
.fu-pill.is-on .fu-dot { background: var(--lm-d-accent); }

/* ── 6. status chips with counts (filters on the list's toolbar row) ── */
.fu-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fu-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;
}
.fu-chip b { color: var(--lm-d-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.fu-chip:hover { background: var(--lm-d-chip-bg); }
.fu-chip.is-on { background: var(--lm-d-info-soft); border-color: var(--lm-d-info-soft); color: var(--lm-d-info); }
.fu-chip.is-on b { color: var(--lm-d-info); }

/* ── 7. toolbar: search (the panel-wide dictation mic attaches itself) + a small segmented toggle ── */
.fu-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 18px; border-block-end: 1px solid var(--lm-d-divider); }
.fu-search { margin-inline-start: auto; inline-size: min(320px, 100%); block-size: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--lm-d-control-edge); border-radius: 10px; background: var(--lm-d-surface); color: var(--lm-d-muted); }
.fu-search .fu-ic { inline-size: 16px; block-size: 16px; flex: none; }
.fu-search input { flex: 1; min-inline-size: 0; block-size: 34px; border: 0; outline: 0; background: transparent; color: var(--lm-d-ink); font: inherit; font-size: 13.5px; }
.fu-search input::placeholder { color: var(--lm-d-muted); }
.fu-search:focus-within { border-color: var(--lm-d-accent); box-shadow: 0 0 0 3px var(--lm-d-accent-soft); }
.fu-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--lm-d-border); border-radius: 10px; background: var(--lm-d-surface); }
.fu-seg button { block-size: 30px; 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; }
.fu-seg button:hover { color: var(--lm-d-ink); }
.fu-seg button.is-on { background: var(--lm-d-chip-bg); color: var(--lm-d-ink); font-weight: 700; }

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

/* a Filament table flattened into the card */
:is(.fu-list, .fu-doc-main) .fi-ta-ctn { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
:is(.fu-list, .fu-doc-main) .fi-ta-header-ctn { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding-inline: 18px 12px; border-block-end: 1px solid var(--lm-d-divider); }
:is(.fu-list, .fu-doc-main) .fi-ta-header-ctn > * { border: 0; }
:is(.fu-list, .fu-doc-main) .fi-ta-header { padding: 10px 0; flex: 1 1 auto; min-inline-size: 0; }
:is(.fu-list, .fu-doc-main) .fi-ta-header-toolbar { padding: 8px 0; flex: 0 0 auto; border: 0; }
:is(.fu-list, .fu-doc-main) .fi-ta-search-field { max-inline-size: 260px; }
:is(.fu-list, .fu-doc-main) .fi-ta-header-cell { background: var(--lm-d-surface); color: var(--lm-d-ink); font-size: 13.5px; font-weight: 700; padding-inline: 8px; white-space: nowrap; }
:is(.fu-list, .fu-doc-main) .fi-ta-cell { padding-inline: 8px; color: var(--lm-d-ink); }
:is(.fu-list, .fu-doc-main) .fi-ta-row:hover > td { background: var(--lm-d-hover); }
.fu-list .fi-ta-row { cursor: pointer; }
.fu-list .fi-ta-row.fu-row-open > td { background: var(--lm-d-row-hl); }
.fu-list .fi-ta-row.fu-row-open > td:first-child { box-shadow: inset -3px 0 0 var(--lm-d-accent); }
[dir='ltr'] .fu-list .fi-ta-row.fu-row-open > td:first-child { box-shadow: inset 3px 0 0 var(--lm-d-accent); }
:is(.fu-list, .fu-doc-main) .fi-ta-actions .fi-btn:is(.fi-color-success, .fi-color-primary) { background: var(--lm-d-accent); color: var(--lm-d-on-accent); }

/* a hand-built table (when the list is not a Filament table) */
.fu-table { inline-size: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.fu-table th { text-align: start; padding: 10px 12px; color: var(--lm-d-ink); font-weight: 700; font-size: 13.5px; border-block-end: 1px solid var(--lm-d-border); white-space: nowrap; }
.fu-table td { padding: 10px 12px; border-block-end: 1px solid var(--lm-d-divider); color: var(--lm-d-ink); vertical-align: middle; }
.fu-table tbody tr { cursor: pointer; }
.fu-table tbody tr:hover > td { background: var(--lm-d-hover); }
.fu-table tbody tr.is-open > td { background: var(--lm-d-row-hl); }
.fu-table tbody tr.is-open > td:first-child { box-shadow: inset -3px 0 0 var(--lm-d-accent); }
[dir='ltr'] .fu-table tbody tr.is-open > td:first-child { box-shadow: inset 3px 0 0 var(--lm-d-accent); }
.fu-table td.is-name { font-weight: 700; }
.fu-table tfoot td { background: var(--lm-d-info-soft); font-weight: 700; border: 0; }
.fu-dim { color: var(--lm-d-muted); font-size: 12.5px; }

/* ── 9. the panel (the opened item): head · own scroll · buttons pinned at the foot ── */
.fu-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; }
.fu-p { display: flex; flex-direction: column; min-block-size: 0; flex: 1 1 auto; }
.fu-p-h { padding: 14px 18px 12px; border-block-end: 1px solid var(--lm-d-divider); }
.fu-p-t { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.fu-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); font: inherit; font-size: 13px; cursor: pointer; }
.fu-p-s { margin-block-start: 2px; font-size: 13px; color: var(--lm-d-muted); }
.fu-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: 12px; }
.fu-p-f { padding: 12px 18px; border-block-start: 1px solid var(--lm-d-divider); display: flex; gap: 8px; }
.fu-p-f > .fu-btn { flex: 1 1 0; justify-content: center; }

/* ── 10. status tag (a dot + a word) ── */
.fu-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; }
.fu-tag::before { content: ''; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
.fu-tag.is-info { background: var(--lm-d-info-soft); color: var(--lm-d-info); }
.fu-tag.is-ok { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }
.fu-tag.is-warn { background: var(--lm-d-warn-soft); color: var(--lm-d-warn); }
.fu-tag.is-danger { background: var(--lm-d-danger-soft); color: var(--lm-d-danger); }
.fu-tag.is-accent { background: var(--lm-d-accent-soft); color: var(--lm-d-accent-ink); }
.fu-tag.is-quiet { background: var(--lm-d-quiet-bg); color: var(--lm-d-muted); }

/* ── 11. the stages of a record ── */
.fu-steps { display: flex; justify-content: space-between; position: relative; margin: 0; padding: 4px 0 0; list-style: none; }
.fu-steps::before { content: ''; position: absolute; inset-block-start: 12px; inset-inline: 14px; border-block-start: 2px solid var(--lm-d-divider); }
.fu-steps li { position: relative; flex: 1; text-align: center; font-size: 12px; color: var(--lm-d-muted); }
.fu-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); }
.fu-steps li.is-done i { background: var(--lm-d-ok); border-color: var(--lm-d-ok); }
.fu-steps li.is-now { color: var(--lm-d-ink); font-weight: 700; }
.fu-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); }
.fu-steps li.is-stop { color: var(--lm-d-danger); font-weight: 700; }
.fu-steps li.is-stop i { background: var(--lm-d-danger); border-color: var(--lm-d-danger); }

/* ── 12. figures inside a panel / card ── */
.fu-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fu-money > div { border: 1px solid var(--lm-d-border); border-radius: 10px; padding: 8px 10px; display: grid; min-inline-size: 0; }
.fu-money span { font-size: 12px; color: var(--lm-d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-money b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fu-net { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--lm-d-ok-soft); color: var(--lm-d-ok); font-size: 13.5px; font-weight: 700; }
.fu-net b { font-variant-numeric: tabular-nums; }
.fu-sec { font-size: 14px; font-weight: 700; margin-block-end: 6px; }
.fu-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-block-end: 1px solid var(--lm-d-divider); font-size: 13.5px; }
.fu-line:last-child { border-block-end: 0; }
.fu-line b { font-variant-numeric: tabular-nums; }
.fu-note { border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.6; border: 1px solid var(--lm-d-divider); }
.fu-note.is-info { background: var(--lm-d-info-soft); color: var(--lm-d-info); }
.fu-note.is-warn { background: var(--lm-d-warn-soft); color: var(--lm-d-warn); }
.fu-note.is-danger { background: var(--lm-d-danger-soft); color: var(--lm-d-danger); }
.fu-note.is-ok { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }

/* ── 13. buttons: one orange primary per area, the rest outline ── */
.fu-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;
}
.fu-btn:hover { background: var(--lm-d-hover); }
.fu-btn.is-primary { background: var(--lm-d-accent); border-color: var(--lm-d-accent); color: var(--lm-d-on-accent); }
.fu-btn.is-primary:hover { filter: brightness(0.96); }
.fu-btn.is-danger { color: var(--lm-d-danger); border-color: var(--lm-d-gap-edge); }
.fu-btn.is-sm { min-block-size: 36px; padding-inline: 14px; font-size: 13.5px; }
.fu-btn.is-icon { inline-size: 42px; padding: 0; justify-content: center; }
.fu-btn:disabled { opacity: .6; cursor: default; }
.fu-btn-ico, .fu-ic { inline-size: 18px; block-size: 18px; flex: none; }

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

/* ── 15. a record page (Filament view/edit): ruled main card, tabs as pills ── */
.fu-doc-page .fi-page-content { gap: 16px; }
.fu-doc-page .fi-section { border-radius: 16px; box-shadow: 0 1px 2px var(--lm-d-shadow); }
.fu-doc-page .fi-section-header-heading { color: var(--lm-d-ink); font-weight: 700; }
.fu-doc-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);
}
.fu-doc-main .fi-tabs { gap: 8px; padding: 12px 16px; border-block-end: 1px solid var(--lm-d-divider); justify-content: flex-start; background: transparent; box-shadow: none; border-radius: 0; }
.fu-doc-main .fi-tabs .fi-tabs-item { min-block-size: 42px; padding-inline: 16px; border-radius: 21px; border: 1px solid var(--lm-d-border); background: var(--lm-d-surface); color: var(--lm-d-ink); font-weight: 700; }
.fu-doc-main .fi-tabs .fi-tabs-item .fi-tabs-item-label { color: inherit; }
.fu-doc-main .fi-tabs .fi-tabs-item .fi-icon { color: var(--lm-d-muted); }
.fu-doc-main .fi-tabs .fi-tabs-item.fi-active { background: var(--lm-d-tab-on-bg); border-color: var(--lm-d-tab-on-bg); color: var(--lm-d-tab-on-ink); }
.fu-doc-main .fi-tabs .fi-tabs-item.fi-active :is(.fi-tabs-item-label, .fi-icon) { color: var(--lm-d-tab-on-ink); }
.fu-doc-main .fi-sc-tabs-tab { padding: 16px; }
.fu-doc-main .fi-sc-tabs-tab .fi-section { box-shadow: none; }

/* ── 16. under 1024px: the page scrolls, the panel becomes a bottom sheet ── */
@media (max-width: 1023.98px) {
    .fu-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fu-strip-c:nth-child(3n + 1) { border-inline-start: 0; }
    .fu-strip-c:nth-child(n + 4) { border-block-start: 1px solid var(--lm-d-divider); }
    .fu-split, .fu-split.has-open { grid-template-columns: minmax(0, 1fr); }
    .fu-split.has-open .fu-list { border-inline-end: 0; }
    .fu-panel { display: none; }
    .fu-split.has-open .fu-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);
    }
    .fu-card-h { align-items: stretch; }
    .fu-pills, .fu-doc-main .fi-tabs { flex-wrap: nowrap; overflow-x: auto; padding-block-end: 2px; scrollbar-width: none; }
    .fu-page .fi-header-heading { font-size: 22px; }
}
@media (max-width: 640px) {
    .fu-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fu-strip-c:nth-child(n) { border-inline-start: 0; border-block-start: 1px solid var(--lm-d-divider); }
    .fu-strip-c:nth-child(-n + 2) { border-block-start: 0; }
    .fu-strip-c:nth-child(2n) { border-inline-start: 1px solid var(--lm-d-divider); }
    .fu-k-v { font-size: 22px; }
    .fu-search { inline-size: 100%; margin-inline-start: 0; block-size: 44px; }
    .fu-money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* touch: every control at least 44px tall on a phone */
    .fu-pill, .fu-chip, .fu-btn, .fu-seg button, .fu-p-x { min-block-size: 44px; }
    .fu-p-x { inline-size: 44px; }
    .fu-table thead { display: none; }
    .fu-table, .fu-table tbody, .fu-table tr, .fu-table td { display: block; inline-size: 100%; }
    .fu-table tbody tr { padding: 10px 12px; border-block-end: 1px solid var(--lm-d-divider); }
    .fu-table td { padding: 2px 0; border: 0; }
    .fu-table td[data-label]::before { content: attr(data-label) ' · '; color: var(--lm-d-muted); font-size: 12.5px; }
}

/* ── 17. the page bits of the approved mockups ── */
.fu-crumb { font-size: 13px; color: var(--lm-d-muted); margin-block-end: 6px; }
.fu-crumb a { color: inherit; text-decoration: none; }
.fu-crumb span { margin-inline: 6px; }
.fu-ic { inline-size: 18px; block-size: 18px; flex: none; }
.fu-ic-sm { inline-size: 15px; block-size: 15px; flex: none; }
.fu-table td { vertical-align: top; }
.fu-name { font-weight: 700; }
.fu-sub { display: block; margin-block-start: 2px; font-size: 12.5px; color: var(--lm-d-muted); font-weight: 400; }

/* the rule panel */
.fu-kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: 13.5px; }
.fu-kv dt { color: var(--lm-d-muted); }
.fu-kv dd { margin: 0; color: var(--lm-d-ink); }
.fu-quote { border: 1px solid var(--lm-d-border); border-inline-start: 3px solid var(--lm-d-info); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.7; background: var(--lm-d-hover); white-space: pre-line; }
.fu-var { display: inline-block; padding-inline: 6px; border-radius: 6px; background: var(--lm-d-info-soft); color: var(--lm-d-info); font-weight: 600; font-size: 12.5px; }
.fu-ver { display: flex; gap: 10px; padding: 8px 0; border-block-end: 1px solid var(--lm-d-divider); font-size: 13.5px; }
.fu-ver:last-child { border-block-end: 0; }
.fu-ver-n { flex: none; inline-size: 30px; block-size: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--lm-d-quiet-bg); color: var(--lm-d-muted); }
.fu-ver.is-now .fu-ver-n { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }
.fu-money.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* the rule form */
.fu-form { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.fu-steps { display: flex; flex-direction: column; }
.fu-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 16px 18px; border-block-end: 1px solid var(--lm-d-divider); }
.fu-step:last-child { border-block-end: 0; }
.fu-step-n { inline-size: 30px; block-size: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--lm-d-tab-on-bg); color: var(--lm-d-tab-on-ink); font-weight: 700; font-size: 14px; }
.fu-step-t { font-size: 16px; font-weight: 700; margin: 3px 0 2px; }
.fu-step-d { font-size: 13px; color: var(--lm-d-muted); margin: 0 0 12px; }
.fu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fu-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fu-field { display: flex; flex-direction: column; gap: 5px; min-inline-size: 0; }
.fu-field.is-wide { grid-column: 1 / -1; }
.fu-field .fu-seg { align-self: flex-start; }
.fu-label { font-size: 13px; font-weight: 600; color: var(--lm-d-ink); }
.fu-hint { font-size: 12px; color: var(--lm-d-muted); }
.fu-error { font-size: 12.5px; font-weight: 600; color: var(--lm-d-danger); }
.fu-input { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-block-size: 40px; padding-inline: 12px; border: 1px solid var(--lm-d-control-edge); border-radius: 10px; background: var(--lm-d-surface); color: var(--lm-d-ink); font: inherit; font-size: 14px; inline-size: 100%; }
select.fu-input, input.fu-input { block-size: 40px; }
.fu-input:focus { outline: 0; border-color: var(--lm-d-accent); box-shadow: 0 0 0 3px var(--lm-d-accent-soft); }
textarea.fu-input { display: block; min-block-size: 92px; padding-block: 10px; line-height: 1.9; resize: vertical; }
.fu-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; padding: 12px; border-radius: 12px; background: var(--lm-d-page); border: 1px solid var(--lm-d-border); }
.fu-sentence .fu-input { inline-size: auto; min-block-size: 36px; block-size: 36px; font-weight: 600; }
.fu-sentence .fu-input.is-num { inline-size: 72px; text-align: center; }
.fu-chipline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fu-pick { display: inline-flex; align-items: center; gap: 6px; min-block-size: 30px; padding-inline: 10px; border-radius: 999px; background: var(--lm-d-chip-bg); border: 1px solid var(--lm-d-border); font: inherit; font-size: 13px; font-weight: 600; color: var(--lm-d-ink); cursor: pointer; }
.fu-tok { display: inline-block; padding-inline: 6px; margin-inline: 1px; border-radius: 6px; background: var(--lm-d-info-soft); color: var(--lm-d-info); font-weight: 700; }
.fu-pick.is-add { background: var(--lm-d-surface); border-style: dashed; color: var(--lm-d-muted); }
.fu-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fu-opt { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 12px; border: 1px solid var(--lm-d-border); border-radius: 12px; background: var(--lm-d-surface); text-align: start; font: inherit; color: inherit; cursor: pointer; }
.fu-opt i { inline-size: 18px; block-size: 18px; border-radius: 50%; border: 2px solid var(--lm-d-control-edge); margin-block-start: 2px; }
.fu-opt b { display: block; font-size: 14px; }
.fu-opt > div > span { display: block; font-size: 12.5px; color: var(--lm-d-muted); margin-block-start: 2px; line-height: 1.6; }
.fu-opt.is-on { border-color: var(--lm-d-accent); background: var(--lm-d-row-hl); box-shadow: inset 0 0 0 1px var(--lm-d-accent); }
.fu-opt.is-on i { border: 5px solid var(--lm-d-accent); }
.fu-opt.is-locked { background: var(--lm-d-page); cursor: not-allowed; }
.fu-opt.is-locked b { color: var(--lm-d-muted); }
.fu-lock { display: inline-flex; align-items: center; gap: 4px; margin-block-start: 6px; font-size: 12px; font-weight: 700; color: var(--lm-d-warn); }
.fu-mini { display: inline-flex; align-items: center; gap: 4px; min-block-size: 26px; padding-inline: 8px; margin-inline: 2px; border: 1px solid var(--lm-d-control-edge); border-radius: 8px; background: var(--lm-d-surface); color: var(--lm-d-ink); font: inherit; font-weight: 700; font-size: 12.5px; }
input.fu-mini { inline-size: 64px; text-align: center; }
/* A number with its unit inside the box — «24 ساعة», «4 ساعات», «3 أيام شغل» (approved form). */
.fu-unit { justify-content: flex-start; gap: 6px; cursor: text; }
.fu-mini.fu-unit input { inline-size: 3ch; text-align: center; }
.fu-unit input { inline-size: 5ch; min-inline-size: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-align: start; appearance: textfield; -moz-appearance: textfield; }
.fu-unit input::-webkit-outer-spin-button, .fu-unit input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fu-unit input:focus { outline: 0; }
.fu-unit:focus-within { border-color: var(--lm-d-accent); box-shadow: 0 0 0 3px var(--lm-d-accent-soft); }
.fu-aside { display: flex; flex-direction: column; gap: 12px; }
.fu-aside .fu-card-b { gap: 10px; }
.fu-big { font-size: 26px; font-weight: 700; line-height: 1.2; }
.fu-big small { font-size: 14px; font-weight: 600; color: var(--lm-d-muted); }
.fu-who { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-block-end: 1px solid var(--lm-d-divider); font-size: 13.5px; }
.fu-who:last-child { border-block-end: 0; }
.fu-actions { display: flex; flex-direction: column; gap: 8px; }
.fu-actions .fu-btn { justify-content: center; }
.fu-field.is-changed .fu-input { border-color: var(--lm-d-accent); box-shadow: 0 0 0 3px var(--lm-d-accent-soft); }
.fu-was { font-size: 12px; font-weight: 700; color: var(--lm-d-accent-ink); }
.fu-change { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--lm-d-accent-soft); border: 1px solid var(--lm-d-accent-line); font-size: 13px; }
.fu-change b { color: var(--lm-d-accent-ink); }
.fu-seg button.is-disabled { color: var(--lm-d-muted); opacity: .6; cursor: not-allowed; }

/* the proposal panel */
.fu-clock { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 10px 12px; background: var(--lm-d-warn-soft); color: var(--lm-d-warn); font-size: 13px; line-height: 1.6; }
.fu-clock b { display: block; font-size: 15px; }
.fu-clock span { color: var(--lm-d-ink); }
.fu-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fu-day { border: 1px solid var(--lm-d-gap-edge); background: var(--lm-d-danger-soft); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; color: var(--lm-d-danger); }
.fu-day b { display: block; font-size: 13.5px; color: var(--lm-d-ink); white-space: nowrap; }
/* HR-AGENT-PICK-1: a day of «تأكيد الغياب» the approver can untick. */
.fu-day-pick { display: block; cursor: pointer; position: relative; padding-inline-start: 30px; }
.fu-day-pick input { position: absolute; inset-inline-start: 9px; top: 9px; width: 15px; height: 15px; accent-color: var(--lm-d-danger); }
.fu-day-pick:has(input:not(:checked)) { background: var(--lm-d-surface); color: var(--lm-d-ink-3); border-style: dashed; }
.fu-day-pick:has(input:not(:checked)) b { text-decoration: line-through; color: var(--lm-d-ink-3); }
.fu-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.fu-checks li { display: flex; gap: 8px; align-items: flex-start; }
.fu-checks svg { color: var(--lm-d-ok); margin-block-start: 3px; }
.fu-link { color: var(--lm-d-info); font-weight: 600; text-decoration: none; font-size: 13px; }
.fu-p-f { flex-wrap: wrap; }
.fu-p-f > .fu-btn.is-wide { flex-basis: 100%; }
.fu-reason { display: flex; flex-direction: column; gap: 8px; inline-size: 100%; }

@media (max-width: 1023.98px) {
    .fu-form { grid-template-columns: minmax(0, 1fr); }
    .fu-grid.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .fu-grid, .fu-grid.is-3, .fu-opts { grid-template-columns: minmax(0, 1fr); }
    .fu-step { grid-template-columns: minmax(0, 1fr); padding-inline: 14px; }
    .fu-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fu-pick, .fu-opt, .fu-input { min-block-size: 44px; }
}

/* ── «حائط التقدير» (Kamal 1-10-2026, mockup approved): this month's recognitions, the first one large ── */
.rw { max-inline-size: 760px; }
.rw-head { display: flex; justify-content: flex-end; }
.rw-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }
.rw-list { display: grid; gap: 12px; }
.rw-card { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--lm-d-border); background: var(--lm-d-surface); }
.rw-card.is-hero { padding: 18px; border-radius: 16px; background: var(--lm-d-accent-soft); border-color: var(--lm-d-accent-line); }
.rw-who { display: flex; gap: 12px; align-items: center; }
.rw-who b { display: block; font-size: 15px; color: var(--lm-d-ink); }
.rw-who span { font-size: 12.5px; color: var(--lm-d-muted); }
.rw-av { inline-size: 40px; block-size: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; background: var(--lm-d-chip-bg); color: var(--lm-d-ink); }
.rw-card.is-hero .rw-av { inline-size: 48px; block-size: 48px; font-size: 17px; background: var(--lm-d-accent); color: var(--lm-d-on-accent); }
.rw-card.is-hero .rw-who b { font-size: 16px; }
.rw-quote { margin: 0; font-size: 14px; line-height: 1.75; color: var(--lm-d-ink); }
.rw-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rw-tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--lm-d-surface); color: var(--lm-d-accent-ink); border: 1px solid var(--lm-d-accent-line); }
.rw-date { font-size: 12px; color: var(--lm-d-subtle); }
.rw-hide { margin-inline-start: auto; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--lm-d-muted); cursor: pointer; }
.rw-hide:hover { color: var(--lm-d-danger); }
.rw-months { display: grid; gap: 4px; }
.rw-month { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px; font-size: 13px; color: var(--lm-d-muted); border-block-end: 1px solid var(--lm-d-divider); }
.rw-month b { font-size: 14px; color: var(--lm-d-ink); }
.rw-note { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--lm-d-quiet-bg); color: var(--lm-d-muted); font-size: 13px; line-height: 1.7; }
