/* ─────────────────────────────────────────────────────────────────────
   HOMEi Live Manager settings on the house design system (LM-DS-1,
   mockups approved by Kamal 6-10-2026, «نفذ»):
     «أهداف الشركة» — the list with its numbers strip and the objective
       opened beside it (.lmo-page);
     «سياسات المدير اللحظي» — the rail of groups, compact rows, the save
       bar (.lmc-page + .lmp).

   Prefix `lmc` (shared) / `lmp` (policies). 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).

   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 page head ── */
body:has(:is(.lmo-page, .lmc-page)) { background: var(--lm-d-page); }
body:has(:is(.lmo-page, .lmc-page)) .fi-main-ctn { background: transparent; }
body :is(.lmo-page, .lmc-page) .fi-header-heading { font-size: 28px; font-weight: 700; line-height: 1.25; color: var(--lm-d-ink); }
body :is(.lmo-page, .lmc-page) .fi-header-subheading { margin-block-start: 4px; font-size: 14px; color: var(--lm-d-muted); max-inline-size: 90ch; }
body :is(.lmo-page, .lmc-page) .fi-header-actions-ctn .fi-btn {
    min-block-size: 44px;
    border-radius: 12px;
    padding-inline: 16px;
    background: var(--lm-d-surface);
    color: var(--lm-d-ink);
    box-shadow: inset 0 0 0 1px var(--lm-d-control-edge);
    font-weight: 700;
}
body :is(.lmo-page, .lmc-page) .fi-header-actions-ctn .fi-btn .fi-icon { color: currentColor; }
body :is(.lmo-page, .lmc-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); }

.lmc { display: flex; flex-direction: column; gap: 14px; color: var(--lm-d-ink); font-size: 14px; }
.lmc :focus-visible { outline: 2px solid var(--lm-d-info); outline-offset: 2px; }
.lmc bdi { unicode-bidi: isolate; }
.lmc-sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.lmc-ic { inline-size: 18px; block-size: 18px; flex: none; }
.lmc-ic.is-sm { inline-size: 16px; block-size: 16px; }
.lmc-ic.is-xs { inline-size: 14px; block-size: 14px; }
.lmc-dim { color: var(--lm-d-muted); font-size: 13px; }
.lmc-dim-ink { color: var(--lm-d-muted); font-weight: 600; }

/* text tones */
.lmc .is-ink { color: var(--lm-d-ink); }
.lmc .is-muted { color: var(--lm-d-muted); }
.lmc .is-ok { color: var(--lm-d-ok); }
.lmc .is-info { color: var(--lm-d-info); }
.lmc .is-warn { color: var(--lm-d-warn); }
.lmc .is-danger { color: var(--lm-d-danger); }
.lmc .is-accent { color: var(--lm-d-accent-ink); }

/* ── 2. the numbers strip (each cell filters) ── */
.lmc-strip {
    display: grid;
    grid-template-columns: repeat(var(--lmc-cols, 5), 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);
    overflow: hidden;
}
.lmc-strip-c {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 12px 18px; min-inline-size: 0;
    border: 0; border-inline-start: 1px solid var(--lm-d-divider);
    background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.lmc-strip-c:first-child { border-inline-start: 0; }
.lmc-strip-c:hover { background: var(--lm-d-hover); }
.lmc-strip-c.is-sel { background: var(--lm-d-accent-soft); box-shadow: inset 0 -3px 0 var(--lm-d-accent); }
.lmc-k-l { font-size: 13px; color: var(--lm-d-muted); white-space: nowrap; }
.lmc-k-v { font-size: 26px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.lmc-k-s { font-size: 12.5px; color: var(--lm-d-muted); line-height: 1.5; }

/* ── 3. the ruled card and its toolbar ── */
.lmc-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;
    min-inline-size: 0;
}
.lmc-tb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-block-end: 1px solid var(--lm-d-divider); }
.lmc-tb.is-second { padding-block-start: 0; border-block-start: 0; }
.lmc-tb:has(+ .lmc-tb.is-second) { border-block-end: 0; }
.lmc-pills, .lmc-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.lmc-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;
}
.lmc-pill b { font-variant-numeric: tabular-nums; }
.lmc-pill:hover { border-color: var(--lm-d-control-edge); }
.lmc-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); }
.lmc-pill.is-on b { color: var(--lm-d-tab-on-count); }
.lmc-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;
}
.lmc-chip b { color: var(--lm-d-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.lmc-chip:hover { background: var(--lm-d-chip-bg); }
.lmc-chip.is-on { background: var(--lm-d-info-soft); border-color: var(--lm-d-info-soft); color: var(--lm-d-info); }
.lmc-chip.is-on b { color: var(--lm-d-info); }
.lmc-chip.is-filter { background: var(--lm-d-accent-soft); border-color: var(--lm-d-accent-line); color: var(--lm-d-accent-ink); }
.lmc-search {
    margin-inline-start: auto; inline-size: min(280px, 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);
}
.lmc-search input { flex: 1; min-inline-size: 0; block-size: 34px; border: 0; outline: 0; box-shadow: none; padding: 0; background: transparent; color: var(--lm-d-ink); font: inherit; font-size: 13.5px; }
.lmc-search input:focus { box-shadow: none; }
.lmc-search:focus-within { border-color: var(--lm-d-accent); box-shadow: 0 0 0 3px var(--lm-d-accent-soft); }
.lmc-select { position: relative; margin-inline-start: auto; display: inline-flex; align-items: center; }
.lmc-select select {
    appearance: none; block-size: 38px; padding-block: 0; padding-inline: 12px 34px;
    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: 13.5px; font-weight: 700; background-image: none;
}
.lmc-select .lmc-ic { position: absolute; inset-inline-end: 10px; pointer-events: none; color: var(--lm-d-subtle); inline-size: 16px; block-size: 16px; }

/* ── 4. the objective rows, grouped by level ── */
.lmc-gh { display: flex; align-items: center; gap: 8px; padding: 9px 16px; background: var(--lm-d-page); border-block: 1px solid var(--lm-d-divider); font-size: 14px; }
.lmc-gh-end { margin-inline-start: auto; font-size: 12.5px; color: var(--lm-d-muted); }
.lmc-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 120px minmax(0, 1.4fr) 150px 32px;
    gap: 14px; align-items: center;
    padding: 10px 16px; border-block-end: 1px solid var(--lm-d-divider);
    cursor: pointer;
}
.lmc-row:hover { background: var(--lm-d-hover); }
.lmc-row.is-open { background: var(--lm-d-row-hl); box-shadow: inset -3px 0 0 var(--lm-d-accent); }
[dir='ltr'] .lmc-row.is-open { box-shadow: inset 3px 0 0 var(--lm-d-accent); }
.lmc-row > div { min-inline-size: 0; }
.lmc-row-m b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lmc-row-m small { display: flex; align-items: center; gap: 6px; color: var(--lm-d-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lmc-row-t { text-align: end; font-variant-numeric: tabular-nums; }
.lmc-row-t b { display: block; font-size: 15px; white-space: nowrap; }
.lmc-row-t small { color: var(--lm-d-muted); font-size: 12px; }
.lmc-row-s { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.lmc-row-s small { font-size: 12px; color: var(--lm-d-muted); }
.lmc-bar-l { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-block-end: 5px; font-size: 12.5px; white-space: nowrap; }
.lmc-bar-l b { font-size: 14px; font-variant-numeric: tabular-nums; }
.lmc-bar-l span { color: var(--lm-d-muted); overflow: hidden; text-overflow: ellipsis; }
.lmc-track { position: relative; block-size: 8px; border-radius: 99px; background: var(--lm-d-quiet-bg); }
.lmc-track.is-lg { block-size: 10px; }
.lmc-track i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; background: var(--lm-d-subtle); }
.lmc-track i.is-ok { background: var(--lm-d-ok); }
.lmc-track i.is-info { background: var(--lm-d-info); }
.lmc-track i.is-danger { background: var(--lm-d-danger); }
.lmc-track u { position: absolute; inset-block: -3px; inline-size: 2px; margin-inline-start: -1px; border-radius: 2px; background: var(--lm-d-ink); }
.lmc-why { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; color: var(--lm-d-muted); line-height: 1.5; }
.lmc-why a { color: var(--lm-d-info); font-weight: 700; white-space: nowrap; }
.lmc-av { inline-size: 30px; block-size: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--lm-d-info-soft); color: var(--lm-d-info); font-size: 12.5px; font-weight: 700; }
.lmc-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; }
.lmc-tag::before { content: ''; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
.lmc-tag.is-ok { background: var(--lm-d-ok-soft); color: var(--lm-d-ok); }
.lmc-tag.is-info { background: var(--lm-d-info-soft); color: var(--lm-d-info); }
.lmc-tag.is-warn { background: var(--lm-d-warn-soft); color: var(--lm-d-warn); }
.lmc-tag.is-danger { background: var(--lm-d-danger-soft); color: var(--lm-d-danger); }
.lmc-tag.is-accent { background: var(--lm-d-accent-soft); color: var(--lm-d-accent-ink); }
.lmc-tag.is-quiet { background: var(--lm-d-quiet-bg); color: var(--lm-d-muted); }
.lmc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px; font-size: 12.5px; color: var(--lm-d-muted); }
.lmc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lmc-legend i { inline-size: 10px; block-size: 10px; border-radius: 3px; display: inline-block; }
.lmc-legend i.is-ok { background: var(--lm-d-ok); }
.lmc-legend i.is-info { background: var(--lm-d-info); }
.lmc-legend i.is-danger { background: var(--lm-d-danger); }
.lmc-legend u { inline-size: 2px; block-size: 12px; background: var(--lm-d-ink); display: inline-block; }
.lmc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; text-align: center; color: var(--lm-d-muted); }
.lmc-empty b { color: var(--lm-d-ink); font-size: 15px; }

/* ── 5. the list and the panel beside it ── */
.lmc-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.lmc-split.has-open { grid-template-columns: minmax(0, 1fr) 380px; }
.lmc-split:not(.has-open) .lmc-panel { display: none; }
.lmc-panel {
    position: sticky; inset-block-start: 84px;
    display: flex; flex-direction: column;
    max-block-size: calc(100dvh - 120px);
    background: var(--lm-d-surface);
    border: 1px solid var(--lm-d-border); border-block-start: 3px solid var(--lm-d-accent);
    border-radius: 16px; box-shadow: 0 1px 2px var(--lm-d-shadow);
    overflow: hidden;
}
.lmc-p-h { padding: 14px 18px 12px; border-block-end: 1px solid var(--lm-d-divider); }
.lmc-p-t { display: flex; align-items: flex-start; gap: 8px; font-size: 18px; font-weight: 700; line-height: 1.4; }
.lmc-p-t > span { flex: 1; min-inline-size: 0; }
.lmc-p-x { inline-size: 32px; block-size: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--lm-d-border); background: var(--lm-d-surface); color: var(--lm-d-muted); cursor: pointer; }
.lmc-p-s { margin-block-start: 2px; font-size: 13px; color: var(--lm-d-muted); line-height: 1.6; }
.lmc-p-b { flex: 1 1 auto; min-block-size: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px; display: flex; flex-direction: column; gap: 14px; }
/* the panel's body scrolls: its blocks keep their height (the bar would shrink to nothing) */
.lmc-p-b > * { flex: none; }
.lmc-p-f { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-block-start: 1px solid var(--lm-d-divider); }
.lmc-p-f .fi-btn, .lmc-p-f .lmc-btn { min-block-size: 40px; border-radius: 10px; font-weight: 700; }
.lmc-p-f .fi-btn.fi-color-primary { background: var(--lm-d-accent); color: var(--lm-d-on-accent); }
.lmc-p-f .fi-btn.fi-color-danger { background: var(--lm-d-surface); color: var(--lm-d-danger); box-shadow: inset 0 0 0 1px var(--lm-d-gap-edge); }
.lmc-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.lmc-big b { font-size: 32px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.lmc-big span { font-size: 13px; color: var(--lm-d-muted); }
.lmc-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lmc-kv > div { background: var(--lm-d-page); border: 1px solid var(--lm-d-divider); border-radius: 10px; padding: 8px 10px; min-inline-size: 0; }
.lmc-kv small { display: block; font-size: 12px; color: var(--lm-d-muted); }
.lmc-kv b { font-size: 14px; font-variant-numeric: tabular-nums; }
.lmc-note { border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.6; }
.lmc-note.is-warn { background: var(--lm-d-warn-soft); color: var(--lm-d-warn); }
.lmc-sec h4 { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; }
.lmc-sec h4 small { margin-inline-start: auto; font-size: 12px; font-weight: 600; color: var(--lm-d-muted); }
.lmc-li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 7px 0; border-block-end: 1px dashed var(--lm-d-divider); font-size: 13px; }
.lmc-li:last-child { border-block-end: 0; }
.lmc-li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmc-li b { font-variant-numeric: tabular-nums; }
.lmc-li small { font-size: 12px; color: var(--lm-d-muted); }
.lmc-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.6; }
.lmc-hist small { display: block; font-size: 12px; color: var(--lm-d-muted); }
.lmc-notes { margin: 0; font-size: 13px; white-space: pre-line; color: var(--lm-d-muted); }
.lmc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-block-size: 40px; padding-inline: 14px; 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; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.lmc-btn:hover { background: var(--lm-d-hover); }
.lmc-btn.is-primary { background: var(--lm-d-accent); border-color: var(--lm-d-accent); color: var(--lm-d-on-accent); }
.lmc-btn.is-ghost { background: transparent; color: var(--lm-d-tab-on-ink); border-color: var(--lm-d-tab-on-count); }

/* ── 6. the policies: the rail, the rows, the save bar ── */
.lmp-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.lmp-main { min-inline-size: 0; }
.lmp-rail { position: sticky; inset-block-start: 84px; display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--lm-d-surface); border: 1px solid var(--lm-d-border); border-radius: 16px; }
.lmp-rail h5 { margin: 10px 10px 4px; font-size: 12px; font-weight: 700; color: var(--lm-d-subtle); }
.lmp-rail-a {
    display: flex; align-items: center; gap: 8px; min-block-size: 38px; padding-inline: 10px;
    border: 0; border-radius: 10px; background: transparent; color: var(--lm-d-ink);
    font: inherit; font-size: 14px; text-align: start; text-decoration: none; cursor: pointer;
}
.lmp-rail-a:hover { background: var(--lm-d-hover); }
.lmp-rail-a.is-on { background: var(--lm-d-tab-on-bg); color: var(--lm-d-tab-on-ink); font-weight: 700; }
.lmp-rail-t { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmp-rail-n { font-size: 12px; color: var(--lm-d-muted); font-variant-numeric: tabular-nums; }
.lmp-rail-a.is-on .lmp-rail-n { color: var(--lm-d-tab-on-count); }
.lmp-rail-a.is-door .lmc-ic { color: var(--lm-d-subtle); }
.lmp-dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--lm-d-accent); flex: none; }
.lmp-across { padding: 8px 18px; font-size: 12.5px; font-weight: 700; color: var(--lm-d-muted); background: var(--lm-d-page); border-block-end: 1px solid var(--lm-d-divider); }

/* the form inside the card: no Filament gaps between the groups and rows */
.lmp .fi-sc-form, .lmp .fi-sc-form > .fi-sc { gap: 0 !important; }
.lmp .fi-sc { row-gap: 0; }
.lmp-group.is-hidden, .lmp-row.is-hidden { display: none !important; }
.lmp-gh { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px 12px; border-block-end: 1px solid var(--lm-d-divider); }
.lmp-gh h3 { margin: 0; font-size: 19px; font-weight: 700; color: var(--lm-d-ink); }
.lmp-gh small { font-size: 13px; color: var(--lm-d-muted); }
.lmp-gh.is-across { padding-block: 10px 8px; background: var(--lm-d-page); }
.lmp-gh.is-across h3 { font-size: 15px; }
.lmp-row { padding: 11px 18px; border-block-end: 1px solid var(--lm-d-divider); align-items: center; column-gap: 16px !important; row-gap: 8px !important; }
.lmp-row.is-dirty { background: var(--lm-d-row-hl); box-shadow: inset -3px 0 0 var(--lm-d-accent); }
[dir='ltr'] .lmp-row.is-dirty { box-shadow: inset 3px 0 0 var(--lm-d-accent); }
.lmp-l b { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--lm-d-ink); line-height: 1.5; }
.lmp-l small { display: block; margin-block-start: 2px; font-size: 12.5px; line-height: 1.55; color: var(--lm-d-muted); }
.lmp-range { white-space: nowrap; }
.lmp-control { min-inline-size: 0; }
.lmp-control .fi-fo-field-wrp-label { display: none; }
.lmp-v { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.lmp-v .lmc-tag { min-block-size: 24px; font-size: 12px; padding-inline: 8px; }
.lmp-v small { font-size: 12px; color: var(--lm-d-muted); }

/* the authority tiers: one segmented row */
.lmp-control .fi-fo-toggle-buttons.fi-inline { display: flex; flex-wrap: nowrap; gap: 2px; padding: 3px; border: 1px solid var(--lm-d-border); border-radius: 10px; background: var(--lm-d-page); }
.lmp-control .fi-fo-toggle-buttons.fi-inline > * { flex: 1 1 0; min-inline-size: 0; }
.lmp-control .fi-fo-toggle-buttons .fi-btn { inline-size: 100%; justify-content: center; min-block-size: 32px; padding-inline: 6px; border-radius: 8px; box-shadow: none; background: transparent; color: var(--lm-d-muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.lmp-control .fi-fo-toggle-buttons input:checked + .fi-btn { background: var(--lm-d-surface); color: var(--lm-d-ink); font-weight: 700; box-shadow: 0 1px 2px var(--lm-d-shadow), inset 0 0 0 1px var(--lm-d-control-edge); }

.lmp-save {
    position: sticky; inset-block-end: 12px; z-index: 5;
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    margin: 12px; padding: 12px 16px;
    background: var(--lm-d-ink); color: var(--lm-d-tab-on-ink);
    border-radius: 14px; box-shadow: 0 10px 30px var(--lm-d-sheet-shadow);
}
.lmp-save b { display: block; font-size: 14px; }
.lmp-save small { display: block; font-size: 12.5px; color: var(--lm-d-tab-on-count); }
.lmp-save-end { margin-inline-start: auto; display: flex; gap: 8px; }
/* HR-POLICY-DS-1: «ساري من» + the reason, inside the save bar of «قيم اللايحة» */
.lmp-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lmp-when label { display: flex; align-items: center; gap: 8px; }
.lmp-when label span { font-size: 12.5px; color: var(--lm-d-tab-on-count); white-space: nowrap; }
.lmp-when input { block-size: 34px; padding-inline: 10px; border: 1px solid var(--lm-d-control-edge); border-radius: 9px; background: var(--lm-d-surface); color: var(--lm-d-ink); font: inherit; font-size: 13px; }
.lmp-when label.is-wide input { inline-size: 220px; }
.lmp-when-err { flex-basis: 100%; font-size: 12.5px; color: var(--lm-d-accent-soft); }

/* ── 7. narrower screens: the panel becomes a bottom sheet; the rail a row of chips ── */
@media (max-width: 1279.98px) {
    .lmc-row { grid-template-columns: minmax(0, 1.4fr) 100px minmax(0, 1.3fr) 130px; }
    .lmc-row-o { display: none; }
    /* the list needs its width: under 1280 the objective opens as a bottom sheet */
    .lmc-split.has-open { grid-template-columns: minmax(0, 1fr); }
    .lmc-split.has-open .lmc-panel {
        position: fixed; inset-inline: 0; inset-block: auto 0; z-index: 30;
        max-block-size: 82dvh; border-radius: 18px 18px 0 0;
        box-shadow: 0 -10px 40px var(--lm-d-sheet-shadow);
    }
}
@media (max-width: 1023.98px) {
    .lmc-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lmc-strip-c:nth-child(4) { border-inline-start: 0; }
    .lmc-strip-c:nth-child(n + 4) { border-block-start: 1px solid var(--lm-d-divider); }
    .lmp-wrap { grid-template-columns: minmax(0, 1fr); }
    .lmp-rail { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .lmp-rail h5 { display: none; }
    .lmp-rail-a { flex: none; border: 1px solid var(--lm-d-border); }
}
@media (max-width: 640px) {
    .lmc-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lmc-strip-c:first-child { grid-column: 1 / -1; }
    .lmc-strip-c:nth-child(n) { border-inline-start: 0; border-block-start: 1px solid var(--lm-d-divider); }
    .lmc-strip-c:first-child { border-block-start: 0; }
    .lmc-strip-c:nth-child(odd):not(:first-child) { border-inline-start: 1px solid var(--lm-d-divider); }
    .lmc-pills, .lmc-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-inline-size: 100%; }
    .lmc-tb { padding: 10px 12px; }
    .lmc-search, .lmc-select, .lmc-select select { inline-size: 100%; margin-inline-start: 0; }
    .lmc-pill, .lmc-chip, .lmc-btn { min-block-size: 44px; }
    .lmc-gh { padding: 9px 12px; }
    .lmc-gh-end { display: none; }
    .lmc-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 12px; }
    .lmc-row-bar { grid-column: 1 / -1; }
    .lmc-row-s { grid-column: 1 / -1; flex-direction: row; align-items: center; }
    .lmp-row { padding: 12px; }
    .lmp-save { margin: 8px; }
    .lmp-save-end { inline-size: 100%; margin: 0; }
    .lmp-when, .lmp-when label.is-wide { inline-size: 100%; }
    .lmp-when label.is-wide input { flex: 1; inline-size: auto; min-inline-size: 0; }
    .lmp-save-end .lmc-btn { flex: 1; }
    .lmp-control .fi-fo-toggle-buttons .fi-btn { font-size: 12px; padding-inline: 4px; }
}
