/*
 * «مانیتور فعالیت کارمندان» — the dashboard section, the monitor list and one
 * employee's own page (تسک ۱۴۰۵/۰۶/۰۳ بخش ۶ تا ۱۰).
 *
 * ## The four colours are declared once, here, and nowhere else
 *
 * بند ۶-۰۶ fixes what each one means and بند ۷-۴۹ forbids a screen inventing a
 * different shade for a state it shares. So every colour in this file is read
 * from one of four custom properties, and a card, a table cell and a tally in a
 * header are painted from the same four values by construction rather than by
 * three people remembering to agree.
 *
 * Three of them are the panel's own standard colours, reached through their
 * `--std-color-*` tokens so that «رنگ‌های استاندارد» can still repaint them.
 * «نارنجی» has no token of its own — the panel's palette runs green, amber, red
 * — so it is written out once, here, rather than repeated across three screens.
 */
:root {
    --emp-green: var(--std-color-success-600, #16a34a);
    --emp-yellow: var(--std-color-warning-500, #f59e0b);
    --emp-orange: #ea580c;
    --emp-red: var(--std-color-danger-600, #dc2626);
    --emp-gray: var(--std-color-gray-500, #6b7280);
}

.dark {
    --emp-green: var(--std-color-success-400, #4ade80);
    --emp-yellow: var(--std-color-warning-400, #fbbf24);
    --emp-orange: #fb923c;
    --emp-red: var(--std-color-danger-400, #f87171);
    --emp-gray: var(--std-color-gray-400, #9ca3af);
}

.fi-emp-color-green { --emp-color: var(--emp-green); }
.fi-emp-color-yellow { --emp-color: var(--emp-yellow); }
.fi-emp-color-orange { --emp-color: var(--emp-orange); }
.fi-emp-color-red { --emp-color: var(--emp-red); }
.fi-emp-color-gray { --emp-color: var(--emp-gray); }

/*
 * تسک ۳۷: one colour for every other state the monitor shows, so no state is
 * grey any more. Which state takes which tone is decided in one place,
 * `App\Support\EmployeeActivity\StatusTone`; this only says what each tone
 * looks like. The panel's palette has no violet, pink, sky, teal or slate
 * pair, so like «نارنجی» above they are written out once, here: the 600 shade
 * on a light page and the 400 on the dark one, which keeps them readable on
 * the panel's dark background without being loud.
 *
 * `neutral` is «همه» and anything unknown: no state's colour, and a hollow dot.
 */
:root {
    --emp-violet: #7c3aed;
    --emp-pink: #db2777;
    --emp-sky: #0284c7;
    --emp-teal: #0d9488;
    --emp-slate: #64748b;
    --emp-neutral: var(--std-color-gray-500, #6b7280);
}

.dark {
    --emp-violet: #a78bfa;
    --emp-pink: #f472b6;
    --emp-sky: #38bdf8;
    --emp-teal: #2dd4bf;
    --emp-slate: #94a3b8;
    --emp-neutral: var(--std-color-gray-300, #d1d5db);
}

.fi-emp-color-violet { --emp-color: var(--emp-violet); }
.fi-emp-color-pink { --emp-color: var(--emp-pink); }
.fi-emp-color-sky { --emp-color: var(--emp-sky); }
.fi-emp-color-teal { --emp-color: var(--emp-teal); }
.fi-emp-color-slate { --emp-color: var(--emp-slate); }
.fi-emp-color-neutral { --emp-color: var(--emp-neutral); }

/* The dot before a state's words — in the tallies, the filter lists and the
   table alike (تسک ۳۷). Sized to the text, centred on its line. */
.fi-emp-state-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: var(--emp-color, var(--emp-neutral));
    flex: 0 0 auto;
    vertical-align: middle;
}

.fi-emp-color-neutral .fi-emp-state-dot,
.fi-emp-color-neutral.fi-emp-state-dot {
    background-color: transparent;
    box-shadow: inset 0 0 0 1.5px var(--emp-neutral);
}

/* ── The section's header ──────────────────────────────────────────────── */

.fi-emp-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.625rem;
}

.fi-emp-head-bar {
    width: 0.25rem;
    height: 1rem;
    border-radius: 9999px;
    background-color: var(--std-color-warning-500, #f59e0b);
    flex: 0 0 auto;
}

/*
 * The title, and the size everything else in the header is measured against
 * (الزام ۶-۳۲).
 */
.fi-emp-head-label {
    font-size: 1rem;
    font-weight: 700;
}

/*
 * تسک ۱۴۰۵/۰۶/۱۶/۰۶، کارت-ظاهر-۰۰۲، ۰۰۳ و ۰۰۴: the tallies read at the size of
 * the panel's own header readings.
 *
 * بند ۶-۳۲ of the task that first drew them asked for «half the heading», which
 * is `calc(1rem / 2)` — eight pixels. Measured in a browser that is half the
 * size of «تعداد ورود شما به پنل» and «زمان ورود» in the bar above, and at eight
 * pixels the figure beside «فعال» is not a figure anybody reads. So the ratio
 * goes and the header's own size takes its place.
 *
 * Not a pixel value copied out of the browser, which کارت-ظاهر-۰۰۴ forbids
 * outright: `--std-topbar-text-size` is the variable «استانداردسازی نمای پنل»
 * already paints `.fi-agency-header` and «نام کارمند» with, so the two are one
 * value and repointing that standard moves both together. The fallback is the
 * value that standard currently carries, for a panel whose standards have not
 * been synced yet.
 *
 * Only the size changes here. The colours, the labels, the order, the counting
 * and the white rules between them are all untouched (کارت-ظاهر-۰۰۵).
 */
.fi-emp-tallies {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: var(--std-topbar-text-size, 0.8125rem);
    line-height: 1.6;
}

.fi-emp-tally {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0.5rem;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--emp-color, inherit);
    font-weight: 700;
    font-size: inherit;
    /*
     * بند ۶-۳۳: a thin white rule between one tally and the next, the height of
     * the text and no taller. Drawn as a leading border on every tally *after*
     * the first, which is why there is never a stray one past the last
     * («بین آخرین مورد و انتهای هدر خط اضافه قرار نگیرد»).
     */
    border-inline-start: 1px solid var(--std-color-color-white, #ffffff);
}

.fi-emp-tally:first-child {
    border-inline-start: 0;
    padding-inline-start: 0;
}

.fi-emp-tally-count {
    font-variant-numeric: tabular-nums;
}

.fi-emp-head-link {
    margin-inline-start: auto;
    font-size: calc(1rem / 2);
    font-weight: 700;
    color: var(--std-color-warning-600, #d97706);
}

/*
 * بند ۶-۵۵: on a narrow screen the tallies wrap instead of scrolling sideways,
 * and they keep their order, their colours and their smaller size while they do
 * it. The rule that draws the separators is on `:first-child`, which is right
 * for one line and wrong for two, so on a wrapped header the rules are dropped
 * altogether rather than left in the wrong places.
 */
@media (max-width: 640px) {
    .fi-emp-tallies {
        gap: 0.125rem 0;
    }

    .fi-emp-tally {
        border-inline-start: 0;
        padding-inline-start: 0;
        padding-inline-end: 0.75rem;
    }
}

/* ── The cards ─────────────────────────────────────────────────────────── */

/*
 * تسک ۱۴۰۵/۰۶/۱۶/۰۶، کارت-ظاهر-۰۰۷، ۰۰۸ و ۰۱۹: the cards stand on the
 * dashboard's own card grid, at the width of one of its standard cards.
 *
 * ## Which grid, and how it was found
 *
 * «واترمارک لانچ بالیگپا» — the card کارت-ظاهر-۰۰۱ names as the reference — is a
 * tile of «مانیتورینگ», and that section is a Filament grid whose column count
 * is `DenseStatCards::getCardsPerRow()` doubled: 4 columns, then 6, 8, 10, 12,
 * 14 and 16 as its own box widens, with `0.75rem` between them. The reference
 * card asks for **three** of those columns (`AgencyStatsWidget::
 * WATERMARK_CARD_SPAN`), which is what makes it one and a half tiles wide.
 *
 * So «the standard card's width» is not a number: it is three columns of that
 * grid. A row of the section's own box therefore holds `⌊columns ÷ 3⌋` of them,
 * and that — not a `14rem` minimum invented here, which is exactly the
 * hard-coded width کارت-ظاهر-۰۰۸ forbids — is what decides how many employees
 * stand side by side:
 *
 *     dashboard columns │  4   6   8  10  12  14  16
 *     employee cards    │  1   2   2   3   4   4   5
 *
 * The tracks are `1fr`, so the leftover columns of a row are shared out among
 * the cards on it rather than left as a hole at the row's end: an employee card
 * is never *narrower* than the reference card, which is the whole of
 * کارت-ظاهر-۰۰۷, and every row is full, which is کارت-ظاهر-۰۱۵. بند ۰۱۹ ranks
 * those two the same way — «اولویت: خوانایی کارت بر نمایش تعداد بیشتر».
 *
 * ## Why the breakpoints are container queries
 *
 * Because the section's are. Filament measures that grid against the box it is
 * drawn in and not against the window — with the menu open the two differ by
 * the width of the menu — so the same breakpoints are asked of the same kind of
 * box here. `.fi-emp-section` is declared the container so that the question is
 * asked of a box this file owns; measured in a browser it is the same width as
 * the section's own container at every one of the four widths the task names
 * (۱۲۱۶ / ۹۶۰ / ۷۲۰ / ۳۵۸ پیکسل), so the two grids change tier together.
 *
 * «آمار کل کارمندان» draws the same grid on a page of its own, so its wrapper is
 * declared the same way — the two screens ask the same question of the same kind
 * of box rather than one of them falling back to whatever container happens to
 * be above it.
 */
.fi-emp-section,
.fi-emp-overview {
    container-type: inline-size;
}

.fi-emp-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.75rem;
    /* کارت-کارمند-۰۱۶: every card on a row is as tall as the tallest of them,
       so a row reads as a row rather than as a broken line of boxes. */
    align-items: stretch;
}

/* @sm — the dashboard's row holds 6 columns here, so two standard cards. */
@container (min-width: 24rem) {
    .fi-emp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* @lg — 8 columns, still two. */
@container (min-width: 32rem) {
    .fi-emp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* @xl — 10 columns, three. */
@container (min-width: 36rem) {
    .fi-emp-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* @3xl — 12 columns, four, and the one tier where the two cards are the same
   width to the pixel rather than the employee's being the wider. */
@container (min-width: 48rem) {
    .fi-emp-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* @5xl — 14 columns, four. */
@container (min-width: 64rem) {
    .fi-emp-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* @7xl — 16 columns, five. */
@container (min-width: 80rem) {
    .fi-emp-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/*
 * بند ۶-۳۷: a panel with sixty employees must not make a dashboard nobody
 * reaches the bottom of — but no employee may be dropped either. So the grid
 * keeps every card and stops growing, scrolling inside itself instead.
 *
 * Three rows of the new card rather than three rows of the old one
 * (تسک ۱۴۰۵/۰۶/۱۶/۰۶): the card grew when it gained the standard tile's own
 * padding, and at the old ceiling the third row was cut through the middle.
 */
.fi-emp-grid-compact {
    max-height: 27rem;
    overflow-y: auto;
    padding-inline-end: 0.25rem;
}

/*
 * تسک ۱۴۰۵/۰۶/۱۵/۰۸، کارت-کارمند-۰۰۳: one employee, one tidy card — the picture
 * and who they are on top, what they have been doing underneath.
 *
 * A column rather than a row. The card used to be a single row of
 * picture-then-everything-else, which left the four lines of figures sharing
 * whatever width the portrait had not taken; giving them the card's full width
 * is what بند ۱۷ و ۱۸ ask for, and it is why nothing has to be squeezed.
 */
.fi-emp-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    /*
     * تسک ۱۴۰۵/۰۶/۱۶/۰۶، کارت-ظاهر-۰۰۶، ۰۰۷ و ۰۱۳: the padding, the corner and
     * the frame of «واترمارک لانچ بالیگپا» — read off that card in a browser,
     * `0.875rem 1rem` and `0.75rem`, which is what
     * `.fi-wi-stats-overview-stat` in `agency-dashboard.css` gives every tile
     * of «مانیتورینگ». The card used to be `0.625rem 0.75rem`, which is a third
     * less air than the card it stands beside.
     */
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    min-width: 0;
    text-align: start;
    /* کارت-کارمند-۰۱۶: a floor rather than a fixed height, because الزام ۶-۲۵
       can add a «حساب غیرفعال» mark to a card and a fixed height would push it
       out. It is the reference tile's own floor; the card is taller than that
       in practice, because it carries four lines. */
    min-height: 6.5rem;
    /* بند ۶-۰۷ و کارت-ظاهر-۰۱۴: the state is a stripe down the card's own edge
       — impossible to miss and impossible to mistake for the card's content.
       The reference card carries the very same 3px edge, in «مانیتورینگ»'s
       green; here it is the employee's own colour, which is the one thing about
       this card that may not become the reference's. */
    border-inline-start: 3px solid var(--emp-color, var(--emp-gray));
    /*
     * کارت-ظاهر-۰۰۵، ۰۰۶ و ۰۱۳: a background of its own, and a frame all the
     * way round.
     *
     * This is the whole of what the task calls «بلوک متن با خط کناری». The card
     * carried `bg-white shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900
     * dark:ring-white/10` in its markup — Tailwind utilities, in a panel that
     * compiles no Tailwind theme of its own. Not one of those five classes
     * exists in any stylesheet the browser is served, so the card was drawn
     * transparent, unframed and unshadowed: measured on the dashboard, its
     * `background-color` was `rgba(0, 0, 0, 0)` and its `box-shadow` was
     * `none`. What a reader saw was the page's own background with a coloured
     * stripe beside it — exactly the screenshot attached to this task.
     *
     * Written out as real declarations instead, in what the reference tile
     * actually computes to: white on the light page, `gray-900` on the dark
     * one, a hairline ring at a twentieth of `gray-950` and a tenth of white,
     * and the same small shadow beneath. Read from the panel's own
     * `--std-color-*` tokens, so «رنگ‌های استاندارد» still repaints them.
     */
    background-color: var(--std-color-color-white, #ffffff);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--std-color-gray-950, #030712) 5%, transparent),
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.dark .fi-emp-card {
    background-color: var(--std-color-gray-900, #111827);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--std-color-color-white, #ffffff) 10%, transparent),
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

/*
 * The card is an `<a>` when the reader may open the monitor, and this rule used
 * to make that anchor `display: block` — which, being written after
 * `.fi-emp-card` at the same weight, threw the card's own `display: flex` away.
 * The picture is an inline `<span>`, so it collapsed to nothing and the state's
 * mark was left floating in the corner of the card with no avatar under it;
 * that is exactly what the screenshot attached to تسک ۱۴۰۵/۰۶/۱۵/۰۸ shows.
 * The card keeps its own display now.
 */
.fi-emp-card-link {
    min-width: 0;
}

/*
 * کارت-کارمند-۰۰۴ و ۰۰۷: the picture at the leading edge — the right, in this
 * panel — with the name and the state beside it.
 */
.fi-emp-identity {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.fi-emp-ident {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    flex: 1 1 auto;
}

.fi-emp-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
}

/*
 * بند ۶-۱۲: the same size on every card, and never stretched or badly cropped.
 * `object-fit: cover` on a square box is what keeps a portrait a portrait.
 */
.fi-emp-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    object-fit: cover;
}

/* بند ۶-۱۳: an employee with no picture gets the panel's own initials, so the
   card keeps its shape rather than collapsing around a hole. */
.fi-emp-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    background-color: var(--std-color-gray-200, #e5e7eb);
    color: var(--std-color-gray-700, #374151);
}

.dark .fi-emp-initials {
    background-color: var(--std-color-gray-700, #374151);
    color: var(--std-color-gray-200, #e5e7eb);
}

/*
 * کارت-کارمند-۰۰۵ و ۰۳۰: the mark belongs to the picture, not to the card.
 *
 * It is positioned against the avatar's own box and pulled *inwards* rather
 * than outwards, so its centre lands on the circle's edge at the lower corner
 * facing the name — part of the avatar to look at, inside the avatar's bounds
 * to measure, and therefore impossible for the edge of the card to clip or for
 * a narrower screen to separate from the picture.
 */
.fi-emp-dot {
    position: absolute;
    inset-inline-end: 0.0625rem;
    bottom: 0.0625rem;
    width: 0.6875rem;
    height: 0.6875rem;
    border-radius: 9999px;
    background-color: var(--emp-color, var(--emp-gray));
    outline: 2px solid var(--std-color-color-white, #ffffff);
}

.dark .fi-emp-dot {
    outline-color: var(--std-color-gray-900, #111827);
}

/*
 * Everything read underneath the name: the figures, and the two flags that ride
 * beside the colour. It has the card's whole width now (کارت-کارمند-۰۰۹).
 */
.fi-emp-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1 1 auto;
}

/*
 * بند ۶-۱۴: the name outranks the figures beside it. بند ۶-۵۶: and a long one
 * is cut with an ellipsis rather than allowed to push the statistics out of the
 * card.
 */
.fi-emp-name {
    font-size: 0.8rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-emp-state {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--emp-color, var(--emp-gray));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-emp-meta {
    display: flex;
    flex-direction: column;
    font-size: 0.625rem;
    line-height: 1.5;
    min-width: 0;
    color: var(--std-color-gray-500, #6b7280);
}

.dark .fi-emp-meta {
    color: var(--std-color-gray-400, #9ca3af);
}

.fi-emp-meta > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* بند ۶-۵۷: a five-figure sign-in count must not break the row it sits on. */
.fi-emp-meta-number {
    font-variant-numeric: tabular-nums;
}

/*
 * بند ۶-۲۵ و ۶-۲۶: a switched-off account is marked on the card, beside the
 * colour and never instead of it — the employee keeps whatever colour their
 * history earned them.
 */
.fi-emp-flag {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0 0.3rem;
    border-radius: 0.25rem;
    font-size: 0.575rem;
    font-weight: 700;
}

.fi-emp-flag-off {
    background-color: var(--std-color-gray-200, #e5e7eb);
    color: var(--std-color-gray-700, #374151);
}

.dark .fi-emp-flag-off {
    background-color: var(--std-color-gray-700, #374151);
    color: var(--std-color-gray-100, #f3f4f6);
}

.fi-emp-flag-dormant {
    background-color: var(--std-color-danger-100, #fee2e2);
    color: var(--std-color-danger-700, #b91c1c);
}

.dark .fi-emp-flag-dormant {
    background-color: var(--std-color-danger-700, #b91c1c);
    color: var(--std-color-danger-100, #fee2e2);
}

.fi-emp-empty {
    font-size: 0.75rem;
    text-align: center;
    padding: 1rem;
    color: var(--std-color-gray-500, #6b7280);
}

/* ── The monitor list ──────────────────────────────────────────────────── */

.fi-emp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.fi-emp-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 9rem;
}

.fi-emp-field-label {
    font-size: 0.7rem;
    font-weight: 700;
}

.fi-emp-field input,
.fi-emp-field select {
    border-radius: 0.5rem;
    border: 1px solid var(--std-color-gray-300, #d1d5db);
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    background-color: var(--std-color-color-white, #ffffff);
    color: var(--std-color-gray-900, #111827);
}

.dark .fi-emp-field input,
.dark .fi-emp-field select {
    border-color: var(--std-color-gray-700, #374151);
    background-color: var(--std-color-gray-900, #111827);
    color: var(--std-color-gray-100, #f3f4f6);
}

.fi-emp-count {
    font-size: 0.7rem;
    margin-inline-start: auto;
    color: var(--std-color-gray-500, #6b7280);
}

.fi-emp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

/* بند ۷-۴۳: headings centred, like every other table in the panel, and short
   numeric cells with them. */
.fi-emp-table th {
    text-align: center;
    font-weight: 700;
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
    border-bottom: 1px solid var(--std-color-gray-200, #e5e7eb);
}

.dark .fi-emp-table th {
    border-bottom-color: var(--std-color-gray-700, #374151);
}

.fi-emp-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--std-color-gray-100, #f3f4f6);
    vertical-align: middle;
}

.dark .fi-emp-table td {
    border-bottom-color: var(--std-color-gray-800, #1f2937);
}

.fi-emp-table td.fi-emp-center {
    text-align: center;
}

.fi-emp-sort {
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.fi-emp-employee {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.fi-emp-employee .fi-emp-avatar {
    width: 1.75rem;
    height: 1.75rem;
}

.fi-emp-employee .fi-emp-initials {
    font-size: 0.625rem;
}

.fi-emp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 700;
    color: var(--emp-color, var(--emp-gray));
}

/* تسک ۳۷: the dot is a `.fi-emp-state-dot` of its own now, so it can be the same
   element in the tallies, the lists and the table. */

/* A state and «بیش از ۷ روز» beside it, on one line while there is room. */
.fi-emp-states {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.5rem;
}

/* «بیش از ۷ روز» and «حساب غیرفعال» were filled chips (red, grey); they are
   now the same dot-and-words as every other state, on a faint wash of their
   own colour so they still read as a flag. */
.fi-emp-badge.fi-emp-flag-dormant,
.fi-emp-badge.fi-emp-flag-off,
.dark .fi-emp-badge.fi-emp-flag-dormant,
.dark .fi-emp-badge.fi-emp-flag-off {
    padding: 0 0.35rem;
    border-radius: 0.25rem;
    font-size: inherit;
    color: var(--emp-color);
    background-color: color-mix(in srgb, var(--emp-color) 14%, transparent);
}

/* ── The two filters' lists (تسک ۳۷) ───────────────────────────────────── */

.fi-emp-select {
    position: relative;
}

.fi-emp-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 9rem;
    border-radius: 0.5rem;
    border: 1px solid var(--std-color-gray-300, #d1d5db);
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    background-color: var(--std-color-color-white, #ffffff);
    color: var(--std-color-gray-900, #111827);
    cursor: pointer;
    text-align: start;
}

.dark .fi-emp-select-trigger {
    border-color: var(--std-color-gray-700, #374151);
    background-color: var(--std-color-gray-900, #111827);
    color: var(--std-color-gray-100, #f3f4f6);
}

.fi-emp-select-trigger:focus-visible {
    outline: 2px solid var(--std-color-warning-500, #f59e0b);
    outline-offset: 1px;
}

.fi-emp-option-body {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

/* The chosen state keeps its colour in the field; «همه» keeps the field's own. */
.fi-emp-select-trigger:not(.fi-emp-color-neutral) .fi-emp-option-label,
.fi-emp-select-option:not(.fi-emp-color-neutral) .fi-emp-option-label {
    color: var(--emp-color);
    font-weight: 700;
}

.fi-emp-select-chevron {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: var(--std-color-gray-400, #9ca3af);
}

/*
 * Above the table's own toolbar (21, agency-tables.css) and under the panel's
 * top bar (30), so the list is never drawn beneath a row nor over an open menu.
 */
.fi-emp-select-list {
    position: absolute;
    inset-inline-start: 0;
    top: calc(100% + 0.25rem);
    z-index: 25;
    min-width: 100%;
    width: max-content;
    max-width: calc(100vw - 1.5rem);
    max-height: 18rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 0.25rem;
    list-style: none;
    border-radius: 0.5rem;
    border: 1px solid var(--std-color-gray-200, #e5e7eb);
    background-color: var(--std-color-color-white, #ffffff);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.25);
}

.dark .fi-emp-select-list {
    border-color: var(--std-color-gray-700, #374151);
    background-color: var(--std-color-gray-900, #111827);
}

.fi-emp-select-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
}

.fi-emp-select-option-active {
    background-color: var(--std-color-gray-100, #f3f4f6);
}

.dark .fi-emp-select-option-active {
    background-color: var(--std-color-gray-800, #1f2937);
}

.fi-emp-select-option[aria-selected='true'] {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--emp-color) 60%, transparent);
}

/* «جابه‌جایی ستون‌ها»: the panel's own button, at the end of the toolbar. */
.fi-emp-col-manager {
    display: flex;
    align-items: flex-end;
}

.fi-emp-col-manager [data-agency-column-manager-trigger] {
    min-height: 2rem;
}

.fi-emp-none {
    color: var(--std-color-gray-400, #9ca3af);
}

.fi-emp-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
}

.fi-emp-pager button[disabled] {
    opacity: 0.4;
    cursor: default;
}

/*
 * بند ۷-۷۳: on a telephone the table becomes a stack of labelled lines rather
 * than something to drag sideways, and nothing is dropped — the name, the state,
 * the last activity, the account and the way in are all still there.
 */
@media (max-width: 768px) {
    .fi-emp-table thead {
        display: none;
    }

    .fi-emp-table,
    .fi-emp-table tbody,
    .fi-emp-table tr,
    .fi-emp-table td {
        display: block;
        width: 100%;
    }

    .fi-emp-table tr {
        border: 1px solid var(--std-color-gray-200, #e5e7eb);
        border-radius: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.25rem 0.5rem;
    }

    .dark .fi-emp-table tr {
        border-color: var(--std-color-gray-700, #374151);
    }

    .fi-emp-table td {
        display: flex;
        justify-content: space-between;
        gap: 0.75rem;
        border-bottom: 0;
        text-align: start;
    }

    .fi-emp-table td.fi-emp-center {
        text-align: start;
    }

    .fi-emp-table td::before {
        content: attr(data-label);
        font-weight: 700;
        flex: 0 0 auto;
    }

    /* تسک ۳۷: on a phone the filters take half the line each, the list opens
       under its own field and never past the screen's edge. */
    .fi-emp-toolbar .fi-emp-select {
        flex: 1 1 9rem;
    }

    .fi-emp-select-list {
        width: 100%;
        min-width: 12rem;
    }

    .fi-emp-select[data-emp-select='accountFilter'] .fi-emp-select-list {
        inset-inline-start: auto;
        inset-inline-end: 0;
    }
}

/* ── One employee's page ───────────────────────────────────────────────── */

.fi-emp-detail-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.fi-emp-detail-head .fi-emp-avatar {
    width: 3.5rem;
    height: 3.5rem;
}

.fi-emp-detail-head .fi-emp-initials {
    font-size: 1.1rem;
}

.fi-emp-detail-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.fi-emp-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--std-color-gray-200, #e5e7eb);
    margin-bottom: 0.75rem;
}

.dark .fi-emp-tabs {
    border-bottom-color: var(--std-color-gray-700, #374151);
}

.fi-emp-tab {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--std-color-gray-500, #6b7280);
}

.fi-emp-tab-active,
.fi-emp-tab-chosen {
    color: var(--std-color-warning-600, #d97706);
    border-bottom-color: var(--std-color-warning-500, #f59e0b);
}

/* تسک ۲۶، بخش پنجم: between the click and the server's answer the tab that
   was open stops looking open, and the one chosen looks open already. */
.fi-emp-tabs-pending .fi-emp-tab-active:not(.fi-emp-tab-chosen) {
    color: var(--std-color-gray-500, #6b7280);
    border-bottom-color: transparent;
}

.fi-emp-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    padding: 0 0.25rem;
    margin-inline-start: 0.25rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    background-color: var(--std-color-gray-200, #e5e7eb);
    color: var(--std-color-gray-700, #374151);
}

.dark .fi-emp-tab-count {
    background-color: var(--std-color-gray-700, #374151);
    color: var(--std-color-gray-100, #f3f4f6);
}

.fi-emp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.5rem;
}

.fi-emp-stat {
    border-radius: 0.5rem;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--std-color-gray-200, #e5e7eb);
}

.dark .fi-emp-stat {
    border-color: var(--std-color-gray-700, #374151);
}

.fi-emp-stat-label {
    font-size: 0.65rem;
    color: var(--std-color-gray-500, #6b7280);
}

.fi-emp-stat-value {
    font-size: 0.85rem;
    font-weight: 700;
}

.fi-emp-stat-note {
    font-size: 0.6rem;
    color: var(--std-color-gray-500, #6b7280);
}

.fi-emp-notice {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    color: var(--std-color-gray-500, #6b7280);
}

/*
 * بند ۱۰-۳۹: the marks beside an activity are deliberately **not** the four
 * status colours. «ایجاد» is not «سبز», and reusing the palette would make one
 * employee's edit look like another employee's presence.
 */
.fi-emp-type {
    display: inline-flex;
    align-items: center;
    padding: 0 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    background-color: var(--std-color-gray-100, #f3f4f6);
    color: var(--std-color-gray-700, #374151);
}

.dark .fi-emp-type {
    background-color: var(--std-color-gray-800, #1f2937);
    color: var(--std-color-gray-100, #f3f4f6);
}
}

/* ------------------------------------------------------------------ *
 * «گزارش فعالیت کارمندان» (تسک ۱۴۰۵/۰۶/۰۳ بخش ۱۱)
 *
 * The report reuses the monitor's table, toolbar and pager wholesale — بند
 * ۱۲-۸۶ asks for one pattern across the panels, and a second table of its own
 * would have been a second set of answers to the same questions. What is added
 * here is only what the report has that the monitor does not: the six window
 * buttons, the totals strip, the warning line and the three data states.
 *
 * Every colour is a `--std-color-*` token with a fallback, like the rest of
 * this file, so «رنگ‌های استاندارد» can repaint the report along with
 * everything else.
 * ------------------------------------------------------------------ */

.fi-emp-report .fi-emp-tab-on {
    background-color: var(--std-color-gray-200, #e5e7eb);
    border-color: var(--std-color-gray-400, #9ca3af);
    font-weight: 700;
}

.dark .fi-emp-report .fi-emp-tab-on {
    background-color: var(--std-color-gray-700, #374151);
    border-color: var(--std-color-gray-500, #6b7280);
}

/* بند ۱۱-۵۸ و ۱۱-۴۳: a warning that has to be read before the numbers under it
   are believed, so it is not a quiet grey note. */
.fi-emp-warning {
    margin: 0.5rem 0;
    padding: 0.55rem 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid var(--std-color-warning-500, #f59e0b);
    background-color: var(--std-color-warning-50, #fffbeb);
    color: var(--std-color-warning-700, #b45309);
    font-size: 0.8125rem;
    line-height: 1.9;
}

.dark .fi-emp-warning {
    background-color: var(--std-color-gray-800, #1f2937);
    color: var(--std-color-warning-400, #fbbf24);
}

/* بند ۱۱-۶۲: the totals of the whole filtered set, above the page they are not
   the total of. */
.fi-emp-report-totals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.25rem;
    margin: 0.75rem 0 0.5rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
    background-color: var(--std-color-gray-100, #f3f4f6);
    font-size: 0.8125rem;
}

.dark .fi-emp-report-totals {
    background-color: var(--std-color-gray-800, #1f2937);
}

.fi-emp-report-totals b {
    font-weight: 700;
}

/* بند ۱۱-۳۹: the three states, told apart at a glance as well as in words. */
.fi-emp-quality-complete {
    background-color: var(--std-color-success-50, #f0fdf4);
    color: var(--std-color-success-700, #15803d);
}

.fi-emp-quality-incomplete,
.fi-emp-flag-partial {
    background-color: var(--std-color-warning-50, #fffbeb);
    color: var(--std-color-warning-700, #b45309);
}

.fi-emp-quality-no_activity {
    background-color: var(--std-color-gray-100, #f3f4f6);
    color: var(--std-color-gray-600, #4b5563);
}

.dark .fi-emp-quality-complete {
    background-color: var(--std-color-gray-800, #1f2937);
    color: var(--std-color-success-400, #4ade80);
}

.dark .fi-emp-quality-incomplete,
.dark .fi-emp-flag-partial {
    background-color: var(--std-color-gray-800, #1f2937);
    color: var(--std-color-warning-400, #fbbf24);
}

.dark .fi-emp-quality-no_activity {
    background-color: var(--std-color-gray-800, #1f2937);
    color: var(--std-color-gray-300, #d1d5db);
}

/* بند ۱۱-۹۰ … ۱۱-۹۲: on a telephone the filters stack and the table becomes
   labelled lines — nothing is dropped, which the monitor's own rules already
   arrange for `.fi-emp-table`. */
@media (max-width: 640px) {
    .fi-emp-report-totals {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .fi-emp-report .fi-emp-field,
    .fi-emp-report .fi-emp-field input,
    .fi-emp-report .fi-emp-field select {
        width: 100%;
    }
}

/* ── «آمار کل کارمندان» ────────────────────────────────────────────────── */

/*
 * The fixed card at the end of the dashboard's grid
 * (تسک ۱۴۰۵/۰۶/۱۵/۰۹، کارمندان-آمار-۰۰۷).
 *
 * Deliberately almost empty. The card already carries `.fi-emp-card`, so its
 * width, its height floor, its padding, its corner radius, its box and its
 * place in the grid are the employee card's — کارمندان-آمار-۰۰۷ asks for
 * exactly that and forbids a card of a size of its own. Nothing below sets any
 * of those; this only lays out what is inside.
 */
.fi-emp-card-overview {
    /* The state stripe belongs to a state, and this card is not an employee, so
       it takes the same standard colour the section's own heading bar does. */
    border-inline-start-color: var(--std-color-warning-500, #f59e0b);
}

.fi-emp-card-overview .fi-emp-name {
    font-weight: 700;
}

/*
 * The five figures, in the same colours the tallies use, wrapped so that a
 * narrow card stacks them rather than pushing them out of its edge
 * (کارمندان-آمار-۰۲۸).
 */
.fi-emp-overview-tallies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    line-height: 1.6;
}

.fi-emp-overview-tally {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--emp-color, inherit);
    font-weight: 700;
    min-width: 0;
}

/*
 * The page «آمار کل کارمندان» — the toolbar, the grid and the pager are the
 * monitor's own, so there is nothing here but the space between them.
 */
.fi-emp-overview .fi-emp-grid {
    margin-top: 0.75rem;
}

.fi-emp-overview .fi-emp-pager {
    margin-top: 1rem;
}

/* ══ تسک ۲۴ — مدیریت کارمندان: one standard for the list and the four tabs ══
 *
 * Every rule is scoped to a class the employee screens carry. The zebra is
 * the panel's own pair (`--agency-zebra-*`, declared on `:root` by
 * `agency-sales.css`), with a literal only as the fallback, so the employees
 * list and the two activity tables stripe exactly like the sales tables.
 */

/* ── The list (بند ۴ و ۵) ─────────────────────────────────────────────────── */

.fi-page-employee-list .fi-ta-row {
    background-color: var(--agency-zebra-odd, rgba(156, 163, 175, 0.05));
}

.fi-page-employee-list .fi-ta-row.fi-striped {
    background-color: var(--agency-zebra-even, rgba(156, 163, 175, 0.14));
}

.fi-page-employee-list .fi-ta-row:hover {
    background-color: var(--agency-zebra-hover, rgba(96, 165, 250, 0.1));
}

/* «نام», heading and cells, set right — the start of a right-to-left line. A
   long name wraps inside its own cell rather than pushing the next column. Its
   yellow is an exception row of the standards block, not a line here. */
.fi-employee-cell-start,
.fi-employee-cell-start .fi-ta-col,
.fi-employee-cell-start .fi-ta-header-cell-sort-btn,
.fi-employee-cell-start .fi-ta-text {
    text-align: start;
    justify-content: flex-start;
}

.fi-employee-cell-start .fi-ta-text {
    max-width: 16rem;
}

.fi-employee-list-name {
    unicode-bidi: plaintext;
}

/* تسک ۲۹، اقدام ۳: «شناسه گروه تلگرامی» on the left of its cell. The column
   was «end»-aligned, which is the left of a right-to-left row — but the id is
   drawn left to right, so inside it «end» landed on the right. Physical left
   here, for the cells only: the heading, the width and the order of the
   columns are as they were, and a long id breaks inside its own cell. */
.fi-employee-cell-left .fi-ta-col,
.fi-employee-cell-left .fi-ta-text,
.fi-employee-cell-left .fi-ta-text-item {
    text-align: left;
    justify-content: flex-end;
}

.fi-employee-cell-left .fi-ta-text-item {
    overflow-wrap: anywhere;
}

/* ── The strip above the four tabs (بخش سوم) ─────────────────────────────── */

.fi-page-employee-tabs .fi-emp-tabs {
    align-items: center;
    margin-bottom: 0.5rem;
}

.fi-emp-tabs-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-inline-start: auto;
    padding-block: 0.25rem;
}

/* The height of a tab: the same 0.8rem bold words in a box of the same size. */
.fi-emp-tabs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
    padding: 0 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.fi-emp-tabs-account-on {
    color: var(--emp-green);
    border-color: var(--emp-green);
    background-color: color-mix(in oklab, var(--emp-green) 14%, transparent);
}

.fi-emp-tabs-account-off {
    color: var(--emp-red);
    border-color: var(--emp-red);
    background-color: color-mix(in oklab, var(--emp-red) 14%, transparent);
}

/* The colour «بازگشت به مانیتور» already had, now with a box to be a button. */
.fi-emp-tabs-back {
    color: var(--std-color-warning-600, #d97706);
    border-color: var(--std-color-warning-600, #d97706);
}

.dark .fi-emp-tabs-back {
    color: var(--std-color-warning-400, #fbbf24);
    border-color: var(--std-color-warning-400, #fbbf24);
}

.fi-emp-tabs-back:hover {
    background-color: color-mix(in oklab, var(--std-color-warning-500, #f59e0b) 12%, transparent);
}

@media (max-width: 640px) {
    .fi-emp-tabs-actions {
        width: 100%;
        margin-inline-start: 0;
    }
}

/* ── «نمای کلی» (بند ۹ تا ۱۱) ────────────────────────────────────────────── */

/* Four to a row on a desktop, three on a laptop's narrower content, two on a
   tablet and one on a telephone — each row's cards the same width. */
.fi-emp-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 1100px) {
    .fi-emp-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .fi-emp-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .fi-emp-stats {
        grid-template-columns: minmax(0, 1fr);
    }
}

.fi-emp-stat {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0.625rem 0.75rem;
}

/* The title stronger than the notes under the figure, and three times the
   room it had between itself and the figure (0.2rem of leading → 0.6rem). */
.fi-emp-stat-label {
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    color: var(--std-color-gray-700, #374151);
}

.dark .fi-emp-stat-label {
    color: var(--std-color-gray-200, #e5e7eb);
}

.fi-emp-stat-note {
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

/* ── A moment: «۲۳ مهر ۱۴۰۵» over «۲۱:۱۳» (بند ۱۱، ۱۵، ۱۷ و ۲۱) ──────────── */

.fi-emp-moment {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    line-height: 1.35;
    white-space: nowrap;
}

.fi-emp-stat .fi-emp-moment {
    align-items: flex-start;
}

.fi-emp-moment-clock {
    font-variant-numeric: tabular-nums;
}

.fi-emp-moment-in {
    color: var(--emp-green);
}

.fi-emp-moment-out {
    color: var(--emp-red);
}

/* ── «ورود و خروج» and «فعالیت‌های اخیر» (بند ۱۳، ۱۴، ۱۶ تا ۱۹) ──────────── */

/* The count beside the filters rather than at the far edge. */
.fi-emp-toolbar-tight .fi-emp-count {
    margin-inline-start: 0.5rem;
    align-self: center;
}

/* Rows half as tall again: the cell's padding goes from 0.35rem/0.5rem to
   0.55rem/0.75rem, which with the two-line moments in them is the 1.5 × the
   task asks for. Striped with the panel's pair, the row under the pointer a
   third, bluer wash. */
.fi-emp-table-roomy td {
    padding: 0.55rem 0.75rem;
}

.fi-emp-table-roomy th {
    padding: 0.6rem 0.75rem;
}

.fi-emp-table-roomy tbody tr {
    background-color: var(--agency-zebra-odd, rgba(156, 163, 175, 0.05));
}

.fi-emp-table-roomy tbody tr:nth-child(even) {
    background-color: var(--agency-zebra-even, rgba(156, 163, 175, 0.14));
}

.fi-emp-table-roomy tbody tr:hover {
    background-color: var(--agency-zebra-hover, rgba(96, 165, 250, 0.1));
}

.fi-emp-table th.fi-emp-start,
.fi-emp-table td.fi-emp-start {
    text-align: start;
}

/* ══ تسک ۲۵_۰۲ — مدیریت کارمندان و مانیتورینگ فعالیت ═══════════════════════
 *
 * Every rule hangs off a class only the place it is about carries, so the
 * employee's own tabs, the report and the dashboard keep what they had.
 */

/* بند ۵: the employee's own small round picture before «ویرایش». In `em`, so it
   follows the heading's size wherever the standards block sets it. */
.fi-employee-heading-avatar {
    width: 1.4em;
    height: 1.4em;
    border-radius: 9999px;
    object-fit: cover;
    align-self: center;
    flex: none;
    /* The initials stand-in is drawn on nothing; the list's dark disc behind
       it, so a missing picture still reads as a picture. */
    background-color: var(--std-color-gray-800, #1f2937);
    box-shadow: 0 0 0 1px var(--std-color-gray-600, #4b5563);
}

/* بند ۷: the titles of the eight cards of «نمای کلی» in the panel's yellow.
   Their figures, notes, frames and layout are untouched. */
.fi-emp-stats .fi-emp-stat-label {
    color: var(--std-color-warning-600, #d97706);
}

.dark .fi-emp-stats .fi-emp-stat-label {
    color: var(--std-color-warning-400, #fbbf24);
}

/* بند ۸: «ورود به صفحه» green, «ویرایش» yellow, «خروج از صفحه» red — chosen by
   the type as stored (`fi-emp-type-<value>`), each a light wash under dark ink
   by day and a deep wash under light ink by night. Every other kind keeps the
   plain mark above. */
.fi-emp-type-page_enter {
    background-color: var(--std-color-success-100, #dcfce7);
    color: var(--std-color-success-800, #166534);
}

.dark .fi-emp-type-page_enter {
    background-color: var(--std-color-success-900, #14532d);
    color: var(--std-color-success-200, #bbf7d0);
}

.fi-emp-type-update {
    background-color: var(--std-color-warning-100, #fef3c7);
    color: var(--std-color-warning-800, #92400e);
}

/* By night the edit mark is the panel's own yellow under dark ink: the deep
   amber wash the other two use read as brown, not yellow, on the black page. */
.dark .fi-emp-type-update {
    background-color: var(--std-color-warning-400, #fbbf24);
    color: var(--std-color-warning-950, #451a03);
}

.fi-emp-type-page_leave {
    background-color: var(--std-color-danger-100, #fee2e2);
    color: var(--std-color-danger-800, #991b1b);
}

.dark .fi-emp-type-page_leave {
    background-color: var(--std-color-danger-900, #7f1d1d);
    color: var(--std-color-danger-200, #fecaca);
}

/* بند ۹.۲: the monitor's rows take turns in the panel's two washes — the same
   pair the employees list stripes in — with the pointer's row a third. The
   status and account colours sit on their own marks inside the cells and are
   not touched. */
.fi-emp-table-monitor tbody tr {
    background-color: var(--agency-zebra-odd, rgba(156, 163, 175, 0.05));
}

.fi-emp-table-monitor tbody tr:nth-child(even) {
    background-color: var(--agency-zebra-even, rgba(156, 163, 175, 0.14));
}

.fi-emp-table-monitor tbody tr:hover {
    background-color: var(--agency-zebra-hover, rgba(96, 165, 250, 0.1));
}

/* بند ۹.۳: each row a quarter taller. Measured on the page as drawn before
   this change, a row stood 40.19px on a desktop; a quarter more is 50.23px —
   3.14rem — set on the row, so every cell of it grows alike, the contents stay
   centred in their height and no column is pushed sideways. */
.fi-emp-table-monitor tbody tr {
    height: 3.14rem;
}

/* بند ۹.۴: the last sign-in — «۲۴ مهر ۱۴۰۵ | ۰۱:۱۵» — in the panel's green,
   date, rule and clock alike, on one line. */
.fi-emp-login-moment {
    color: var(--emp-green);
    white-space: nowrap;
}

/* بند ۹.۵: every figure of «تعداد ورود», and the «*» beside one counted from
   later than the account's first day, in the panel's yellow. */
.fi-emp-table-monitor td.fi-emp-login-count {
    color: var(--emp-yellow);
    font-weight: 700;
}

@media (max-width: 768px) {
    /* On a phone the table is a stack of labelled lines; the stack keeps its
       natural height and takes turns in the same two washes. */
    .fi-emp-table-monitor tbody tr {
        height: auto;
    }
}

/* ── تسک ۲۶، بخش پنجم: the floating mark while a tab is on its way ────────── */

/* Laid over the content below the tab strip by `agency-employee-tabs.js`,
   which measures it from the strip: fixed, so it adds no height to the page,
   pushes nothing down and moves nothing when it goes. It dims what the
   previous tab drew — that is no longer the open tab — and holds the mark in
   its middle. Under Filament's top bar (30) and the panel's own mark (40). */
.fi-emp-tab-layer {
    display: none;
    position: fixed;
    z-index: 25;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background-color: color-mix(in oklab, var(--std-color-white, #ffffff) 72%, transparent);
}

.dark .fi-emp-tab-layer {
    background-color: color-mix(in oklab, var(--std-color-gray-950, #030712) 72%, transparent);
}

.fi-emp-tab-layer.fi-emp-tab-layer-on {
    display: flex;
}

.fi-emp-tab-layer-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    max-width: min(26rem, calc(100% - 2rem));
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background-color: color-mix(in oklab, var(--std-color-gray-900, #111827) 88%, transparent);
    color: var(--std-color-white, #ffffff);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.fi-emp-tab-layer-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    border: 2px solid color-mix(in oklab, var(--std-color-white, #ffffff) 30%, transparent);
    border-top-color: var(--std-color-warning-400, #fbbf24);
    animation: fi-emp-tab-spin 0.8s linear infinite;
}

.fi-emp-tab-layer-failed .fi-emp-tab-layer-spinner {
    display: none;
}

.fi-emp-tab-layer-retry {
    padding: 0.3rem 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid var(--std-color-warning-400, #fbbf24);
    color: var(--std-color-warning-400, #fbbf24);
    background: none;
    cursor: pointer;
}

.fi-emp-tab-layer-retry[hidden] {
    display: none;
}

@keyframes fi-emp-tab-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fi-emp-tab-layer-spinner {
        animation-duration: 2.4s;
    }
}

/* One mark, not two: the panel-wide one stands down while this one is up. */
.fi-emp-tab-switching .fi-panel-loading {
    display: none !important;
}

/* ── تسک ۲۶، بخش چهارم: «نام» and «شماره موبایل» beside the picture ───────── */

/* The picture keeps its size; the row's two fields share the rest. */
.fi-employee-identity-row .fi-employee-avatar {
    position: relative;
    width: 8rem;
    margin-block-end: 0;
}

/* The picture has no label, so its row of label holds only the red «؟» of its
   history — a whole line above the picture for one character. It sits on the
   picture's corner instead, outside the circle, and the line is gone. */
.fi-employee-identity-row .fi-employee-avatar > .fi-fo-field-label-col {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    z-index: 1;
}

@media (max-width: 767px) {
    .fi-employee-identity-row .fi-employee-avatar {
        margin-inline: auto;
    }
}

/* ══ تسک ۳۰ — کارمندان: آواتار عکاس، تاریخ یک‌خطی، فعالیت‌های اخیر ══════════ */

/* بند ۶ و ۷: «۲۷ مهر ۱۴۰۵ | ۲۳:۰۹» on one line — the date at the table's own
   size, the clock two steps (2px) smaller, the rule with the same room on both
   sides. The tone colours all three, as it coloured both lines before. The
   line never breaks: below the width it needs, the table scrolls sideways (or,
   on a phone, the row becomes a card with the moment on its own line). */
.fi-emp-moment-line {
    flex-direction: row;
    align-items: baseline;
    gap: 0;
    white-space: nowrap;
}

.fi-emp-moment-line .fi-emp-moment-clock {
    font-size: calc(1em - 2px);
}

.fi-emp-moment-sep {
    margin-inline: 0.4rem;
    opacity: 0.6;
}

.fi-emp-table td[data-session-in],
.fi-emp-table td[data-session-last],
.fi-emp-table td[data-session-out],
.fi-emp-table td[data-label="تاریخ و ساعت"] {
    white-space: nowrap;
}

/* تسک ۳۳: only the table scrolls sideways, and it never scrolls up and down.
   This used to be `overflow-x: auto` on the whole tab. CSS turns the other
   axis of such a box from `visible` into `auto`, so the tab was a vertical
   scroll box as well: wherever the content ended a fraction of a pixel below
   the box (a zoom of 125%, another font), the box could scroll by that
   fraction, drew a scrollbar of its own on the left, and took the first
   wheel of every gesture over the rows while the page stood still. `hidden`
   on the other axis cannot be scrolled by a wheel or a touchpad, so a
   vertical gesture goes straight to the page; what it clips is that fraction
   of a pixel. The filters and the pager are outside it, in the page. */
.fi-emp-table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}

/* بند ۱۰: the type marks a fifth larger than they were (0.65rem → 0.78rem),
   their padding with them. Colours are the type's own and unchanged. */
.fi-emp-table .fi-emp-type {
    font-size: 0.78rem;
    padding: 0.05rem 0.42rem;
    line-height: 1.5;
    white-space: nowrap;
}

/* بند ۱۱: «آخرین فعالیت» in place of «۱», whole and on one line. */
.fi-emp-activity-index,
.fi-emp-activity-index-heading {
    white-space: nowrap;
    min-width: 6.5rem;
}

.fi-emp-latest {
    display: inline-block;
    font-weight: 700;
    color: var(--emp-green, #16a34a);
    white-space: nowrap;
}

/* بند ۳: no sign-in at all, boxed in red; any other count stays as it was.
   As tall as a line of the table's text, so the row does not grow. */
.fi-employee-login-zero {
    display: inline-flex;
    align-items: center;
    padding: 0 0.45rem;
    line-height: 1.4;
    border: 1.5px solid var(--std-color-danger-600, #dc2626);
    border-radius: 0.375rem;
    color: var(--std-color-danger-600, #dc2626);
    font-weight: 700;
    white-space: nowrap;
}

.dark .fi-employee-login-zero {
    border-color: var(--std-color-danger-400, #f87171);
    color: var(--std-color-danger-400, #f87171);
}

/* بند ۴: the photographer's face in «عکاس», the name on hover, focus or tap. */
.fi-employee-photographers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
}

.fi-employee-photographer-avatar {
    display: inline-flex;
    border-radius: 9999px;
    flex: none;
    cursor: help;
}

.fi-employee-photographer-avatar:focus-visible {
    outline: 2px solid var(--std-color-primary-500, #f59e0b);
    outline-offset: 2px;
}

.fi-employee-photographer-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    object-fit: cover;
    background-color: var(--std-color-gray-800, #1f2937);
}

/* بند ۱۲: in the heading, the photographer's face with the same camera on its
   corner — the camera's centre on the circle's edge at the lower corner, so
   half of it is on the picture and half outside. Nothing here clips: the
   wrapper is `overflow: visible` and room is kept for the outer half. */
.fi-employee-heading-photographer-avatar {
    position: relative;
    display: inline-flex;
    align-self: center;
    flex: none;
    width: 1.9em;
    height: 1.9em;
    margin-inline-end: 0.35em;
    margin-block-end: 0.25em;
    overflow: visible;
    border-radius: 9999px;
    cursor: help;
}

.fi-employee-heading-photographer-avatar:focus-visible {
    outline: 2px solid var(--std-color-primary-500, #f59e0b);
    outline-offset: 2px;
}

.fi-employee-heading-photographer-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    object-fit: cover;
    background-color: var(--std-color-gray-800, #1f2937);
    box-shadow: 0 0 0 1px var(--std-color-gray-600, #4b5563);
}

/* The circle's lower corner on the reading side of an RTL page is its
   bottom-left: centre at (50% − 35.36%, 50% + 35.36%) of the picture. */
.fi-employee-heading-photographer-avatar .fi-employee-heading-camera {
    position: absolute;
    left: 14.64%;
    top: 85.36%;
    transform: translate(-50%, -50%);
    margin: 0;
    line-height: 1;
    pointer-events: none;
}

.fi-employee-heading-photographers {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 0.5em;
}

/* ══ تسک ۳۱ — مدیریت کارمندان و رنگ نقش‌ها ═════════════════════════════════
 *
 * Every rule hangs off a class only the place it is about carries.
 */

/* بخش ۲: the two small pictures of the edit page's heading at exactly twice
   the size they were — the employee's own 1.4em → 2.8em (25.19px → 50.38px at
   the heading's 18px) and the photographer's 1.9em → 3.8em (34.19px →
   68.38px), both measured in a browser before the change. Still circles,
   still `object-fit: cover`, so nothing is stretched. The heading's pieces
   are centred on one axis instead of sharing a baseline, so each picture's
   middle is the middle of the line of text beside it. The large picture of
   the form and the list's pictures are other classes and do not move. */
.fi-page-employee-edit .fi-employee-heading {
    align-items: center;
}

.fi-page-employee-edit .fi-employee-heading-avatar {
    width: 2.8em;
    height: 2.8em;
}

.fi-page-employee-edit .fi-employee-heading-photographer-avatar {
    width: 3.8em;
    height: 3.8em;
    /* The camera's outer half hangs below the circle: room for it, in the
       same proportion as before (0.25em on a 1.9em circle) — above as well as
       below, so the room does not pull the circle's middle off the line. */
    margin-block: 0.5em;
}

/* The camera grows with the circle it sits on, so it keeps the share of the
   picture it had; its centre stays on the circle's lower edge. */
.fi-page-employee-edit .fi-employee-heading-photographer-avatar .fi-employee-heading-camera {
    font-size: 2em;
}

/* بخش ۴: the frames of the cards of «نمای کلی» half as distinct again, by one
   documented measure: the OKLab lightness gap between the frame and the
   surface it is drawn on, × 1.5, hue and chroma kept, width kept at 1px.
     night: frame zinc-700 L 0.370 on the page's L 0.141 → gap 0.229 → 0.3435
            → L 0.4845;
     day:   frame zinc-200 L 0.920 on the page's L 0.985 → gap 0.065 → 0.0975
            → L 0.8875.
   Nothing else on the card moves: size, padding, corners, wash, text. */
.fi-emp-stats .fi-emp-stat {
    border-color: oklch(0.8875 0.004 286.32);
}

.dark .fi-emp-stats .fi-emp-stat {
    border-color: oklch(0.4845 0.013 285.805);
}

/* بخش ۵: «آیتک رشتبری | ۱۱» — the name keeps its yellow, the rule and the
   count are white by night (the panel's ink by day, where white would vanish
   on the page), and the pair never breaks across two lines. */
.fi-employee-login-tally {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4em;
    margin-inline-start: 0.4em;
    white-space: nowrap;
    color: var(--std-color-gray-950, #09090b);
    font-weight: 700;
}

.dark .fi-employee-login-tally {
    color: #ffffff;
}

/* بخش ۶: a role's badge in its own colour (`RoleBadge`). The only input is
   `--role-color`; text, border and wash are derived from it exactly as
   `RoleColorPalette` derives them for its checks:
     night — text the colour, border the colour at 70%, wash the colour at 16%;
     day   — text the colour mixed 40% with black, border that at 70%, wash the
             colour at 16%.
   A wash at 16% over whatever row, hover or box is behind it is the
   composite the contrast was measured on. */
.fi-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border: 1px solid color-mix(in srgb, color-mix(in srgb, var(--role-color) 40%, black) 70%, transparent);
    border-radius: 0.375rem;
    background-color: color-mix(in srgb, var(--role-color) 16%, transparent);
    color: color-mix(in srgb, var(--role-color) 40%, black);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25rem;
    white-space: nowrap;
}

.dark .fi-role-badge {
    border-color: color-mix(in srgb, var(--role-color) 70%, transparent);
    color: var(--role-color);
}

/* A role with no usable colour: the panel's neutral badge, name still written. */
.fi-role-badge.fi-role-badge-neutral {
    border-color: var(--std-color-gray-300, #d4d4d8);
    background-color: transparent;
    color: var(--std-color-gray-700, #3f3f46);
}

.dark .fi-role-badge.fi-role-badge-neutral {
    border-color: var(--std-color-gray-600, #52525b);
    color: var(--std-color-gray-200, #e4e4e7);
}

.fi-role-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
}

/* The form's chosen roles: Filament wraps each chosen option in its own
   primary badge; here the role's badge is the badge, so the wrapper keeps only
   its «×» and lends the role badge its frame. */
.fi-employee-roles-field .fi-select-input-value-badges-ctn > .fi-badge {
    padding: 0;
    gap: 0.25rem;
    background-color: transparent;
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
}

.fi-employee-roles-field .fi-select-input-value-badges-ctn > .fi-badge .fi-badge-delete-btn {
    color: var(--std-color-gray-400, #a1a1aa);
}

/* ══ تسک ۳۲ — تکمیل مدیریت کارمندان ════════════════════════════════════════
 *
 * Every rule hangs off a class only the place it is about carries.
 */

/* بخش ۴: the role in the edit page's heading, in that role's own stored
   colour — the same `--role-color` the role's badge is drawn from, and the
   same derivation: the colour itself by night, the colour 40% over black by
   day. «ویرایش», the name and the rules are other elements and keep theirs.
   A role whose colour could not be given, and «بدون نقش», are neutral —
   never a colour that belongs to some other role. */
.fi-employee-heading-role-name {
    color: color-mix(in srgb, var(--role-color) 40%, black);
}

.dark .fi-employee-heading-role-name {
    color: var(--role-color);
}

.fi-employee-heading-role-name.fi-employee-heading-role-neutral,
.fi-employee-heading-role-name.fi-employee-heading-role-none {
    color: var(--std-color-gray-700, #3f3f46);
}

.dark .fi-employee-heading-role-name.fi-employee-heading-role-neutral,
.dark .fi-employee-heading-role-name.fi-employee-heading-role-none {
    color: var(--std-color-gray-300, #d4d4d8);
}

/* بخش ۵: a clear yellow frame round the small camera on the photographer's
   face — the camera's own box only, never the picture. Sized in em, so it
   grows and shrinks with the camera; the box keeps its centre on the circle's
   lower edge, and a dark fill keeps the yellow readable on any picture. */
.fi-employee-heading-photographer-avatar .fi-employee-heading-camera {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.08em 0.12em;
    border: max(2px, 0.08em) solid #facc15;
    border-radius: 0.3em;
    background-color: #18181b;
    box-sizing: border-box;
}

/* بخش ۷: «فعال», «ذخیره» and «لغو» on one line, centred on one axis. The
   switch's own wrapper carries no space below it, so nothing is stepped; on a
   phone too narrow for one line the row stacks (Filament's Flex from `sm`). */
.fi-employee-form-final-row {
    row-gap: 0.75rem;
}

.fi-employee-form-final-row .fi-employee-active-field {
    margin: 0;
}

.fi-employee-form-final-row .fi-ac {
    flex-wrap: wrap;
}

/* بخش ۸: «صفر» in red where an employee has never got in; any other count
   keeps the white figure of تسک ۳۱. */
.fi-employee-login-tally .fi-employee-login-tally-zero {
    color: var(--std-color-danger-600, #dc2626);
}

.dark .fi-employee-login-tally .fi-employee-login-tally-zero {
    color: #f87171;
}

/* بخش ۹: a thin red ring round the list's picture of anyone who has never got
   in. A shadow, not a border, so the 32px picture keeps its size. */
img[data-never-signed-in] {
    box-shadow: 0 0 0 2px #ef4444;
}

/* بخش ۱۰: the last sign-in, said as a day — green today, yellow yesterday,
   light blue the day before, and one fixed off-white for everything older,
   whether it is said as «N روز قبل» or as a date. A date still to come is
   orange and carries its own tooltip. Light-theme shades are the 700s of the
   same hues, so each stays readable on white. */
.fi-employee-last-login {
    font-weight: 600;
    white-space: nowrap;
}

.fi-employee-last-login-today { color: #15803d; }
.fi-employee-last-login-yesterday { color: #a16207; }
.fi-employee-last-login-day-before { color: #0369a1; }
.fi-employee-last-login-older { color: #52525b; font-weight: 500; }
.fi-employee-last-login-future { color: #c2410c; }

.dark .fi-employee-last-login-today { color: #4ade80; }
.dark .fi-employee-last-login-yesterday { color: #facc15; }
.dark .fi-employee-last-login-day-before { color: #7dd3fc; }
.dark .fi-employee-last-login-older { color: #d4d4d8; }
.dark .fi-employee-last-login-future { color: #fb923c; }

/* ══ تسک ۳۴ — عنوان و نقش‌های کارمند در دو خط ══════════════════════════════
 *
 * «ویرایش [نام]» on the first line at the heading's own size and colour; every
 * role on the second, starting exactly where «ویرایش» starts (HDR-06) — the
 * two lines are one column, aligned to its start, so the pictures and the
 * filter icon beside them do not move it. Heights are the content's own: no
 * fixed height, no positioning.
 */
.fi-page-employee-edit .fi-employee-heading-text {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    row-gap: 6px;
    min-width: 0;
    text-align: start;
}

/* 4px under the title's computed size — `1em` here is the size the heading
   draws its title at, whatever that is at this breakpoint — and never under
   12px (HDR-07); weight 600 for every role alike (HDR-08).

   `agency-page-headings.css` sets every piece of every heading to 18px, 700
   and a 24px line with `!important`, so that no local rule could make one
   heading differ from another. This line is the one place a task asks for a
   heading part to be smaller and lighter on purpose; it answers that rule in
   its own terms — `!important`, and one class more specific — and only for
   the roles line, so the title, the rest of this heading and every other
   heading in the panel keep 18px and 700. A long list wraps; nothing is cut
   or hidden (HDR-03). */
.fi-page-employee-edit .fi-employee-heading-roles {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-start;
    column-gap: 0.4em;
    row-gap: 2px;
    font-size: max(12px, calc(1em - 4px)) !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
}

.fi-page-employee-edit .fi-employee-heading-roles * {
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

.fi-page-employee-edit .fi-employee-heading-roles .fi-employee-heading-role-name {
    overflow-wrap: anywhere;
}

/* The rules between roles: white by night, as asked; by day the panel's grey,
   since white on a white page would be no rule at all. */
.fi-employee-heading-role-sep {
    color: var(--std-color-gray-500, #71717a);
}

.dark .fi-employee-heading-role-sep {
    color: #fff;
}

/* ══ تسک ۳۵ — روز هفته کنار تاریخ، و دوربین روی آواتارهای لیست ═════════════ */

/* بند ۵ و ۶ و ۴.۲: «چهارشنبه | ۲۹ مهر ۱۴۰۵ | ۱۰:۲۸». The day is read at the
   date's own size and takes the line's colour, so in «ورود و خروج» a green
   entry is green from the day to the clock and a red exit red; the second
   rule has the same room as the first. */
.fi-emp-moment-weekday {
    font-variant-numeric: normal;
}

/* «آخرین ورود» in the list: one line on a desktop, the tone of تسک ۳۲
   colouring all three parts. */
.fi-employee-last-login .fi-emp-moment-line {
    white-space: nowrap;
}


/* ══ تسک ۳۶ — دوربین روی عکاس متصل، «بدون نقش» و نشان وضعیت ════════════════ */

/* بند ۳: the camera of the heading, on the face in the list's «عکاس» column
   (the photographer the employee is attached to, or that photographer's
   stand-in) — never on the employee's own picture. Its centre sits on the
   circle's edge at the lower-left corner, as in the heading, so it overlaps
   the picture's rim and never hangs below it; the wrapper is the 32px circle
   itself, so the row and the column keep their size. A small dark box framed
   in yellow; no frame round the picture. A mark only: no pointer events, hidden
   from screen readers (the face keeps its name as its accessible name). */
.fi-employee-photographer-avatar {
    position: relative;
    width: 32px;
    height: 32px;
}

.fi-employee-photographer-avatar .fi-employee-list-camera {
    position: absolute;
    left: 14.64%;
    top: 85.36%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 1.5px;
    border: 1.5px solid #facc15;
    border-radius: 3px;
    background-color: #18181b;
    font-size: 8px;
    font-style: normal;
    line-height: 1;
    box-sizing: border-box;
    pointer-events: none;
}

/* بند ۵: one dot at the end of the heading's roles line (or of «بدون نقش») —
   green for an active account, red for an inactive one. Sized in em of that
   line, a short fixed gap before it (the line's own column gap), centred on
   the text; it wraps with the line, never over the text or the pictures. */
.fi-page-employee-edit .fi-employee-heading-roles .fi-employee-heading-status,
.fi-employee-heading-status {
    display: inline-block;
    flex: none;
    align-self: center;
    width: 0.6em;
    height: 0.6em;
    border-radius: 9999px;
    cursor: help;
}

.fi-employee-heading-status-active {
    background-color: #16a34a;
    box-shadow: 0 0 0 2px color-mix(in srgb, #16a34a 25%, transparent);
}

.fi-employee-heading-status-inactive {
    background-color: #dc2626;
    box-shadow: 0 0 0 2px color-mix(in srgb, #dc2626 25%, transparent);
}

.dark .fi-employee-heading-status-active { background-color: #22c55e; }
.dark .fi-employee-heading-status-inactive { background-color: #ef4444; }

.fi-employee-heading-status:focus-visible {
    outline: 2px solid var(--std-color-primary-500, #f59e0b);
    outline-offset: 2px;
}

/* بند ۶.۴: many long roles wrap inside the page at every width. From 768px up
   the header's text column is a flex item that kept its content's width
   (`min-width: auto`), so a long roles line ran past the page instead of
   wrapping (1,323px of roles in a 720px header). Letting that one column
   shrink is all it takes; the 375px layout, which already wrapped, and every
   other page's header are unchanged. */
.fi-page-employee-edit .fi-header > div {
    min-width: 0;
}

/* تسک ۸۱، ۸۲: the group id and, beside it, «همه | آزاد | اشغال» of its topics —
   white, green, red on a dark pill in both themes, so the three read the same
   and the pill cannot be taken for part of the id. One line, small, so the
   column does not grow for it. (This replaced the logo-coloured number.) */
.fi-employee-telegram-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.fi-employee-topic-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 1.25rem;
    padding: 0 0.4rem;
    border-radius: 9999px;
    background-color: #111827;
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25rem;
    cursor: default;
}

.fi-employee-topic-count .fi-topic-total { color: #ffffff; }
.fi-employee-topic-count .fi-topic-free { color: #4ade80; }
.fi-employee-topic-count .fi-topic-busy { color: #f87171; }
.fi-employee-topic-count .fi-topic-sep { color: rgb(255 255 255 / 0.45); font-weight: 400; }

/* تسک ۸۱: the topics of an employee's group, on the employee form. */
.fi-employee-topics-guide {
    font-size: 0.875rem;
    line-height: 1.7;
}

.fi-employee-topics-guide summary {
    margin-top: 0.5rem;
    cursor: pointer;
    font-weight: 600;
}

.fi-employee-topics-guide ol {
    margin: 0.5rem 0;
    padding-inline-start: 1.25rem;
    list-style: decimal;
}
