/* Decisions 263-266 (Kareem, 30 November: anything repeated on the site is one shared piece, used everywhere; before changing
   the look of something, every place with the same thing changes with it). The look of the shared pieces, once.
   The colours are tokens: the light value here, the dark one taken from the dark sheet's own palette (workspace-dark.css
   sets --surface-subtle, --line, --muted … on :root), so the dark mode follows with no rule of its own. */
:root{
 --empty-bg:var(--surface-subtle,#f6f9fa);
 --empty-ink:var(--muted,#5f7380);
 --search-bg:var(--surface-raised,#fff);
 --search-line:var(--line,#d6e0e4);
 --search-ink:var(--ink,#182f3e);
 --search-icon:var(--muted,#6b7d89);
 --search-focus:var(--teal,#087f78);
 /* The states' colours (decision 266): light here, dark from the dark palette («كحلي هادي»). */
 --state-run-bg:var(--info-bg,#eaf1ff);--state-run-ink:var(--info,#3f5f96);--state-run-line:var(--info-bg,#d3e0f7);
 --state-wait-bg:var(--warn-bg,#fff3dc);--state-wait-ink:var(--warn,#7a5200);--state-wait-line:var(--warn-line,#f0d9a6);
 --state-done-bg:var(--good-bg,#e4f5ee);--state-done-ink:var(--good,#1b7356);--state-done-line:var(--good-line,#bfe3d2);
 --state-stop-bg:var(--bad-bg,#fdecec);--state-stop-ink:var(--bad,#a83a3a);--state-stop-line:var(--bad-line,#f1c5c5);
 /* Decision 284, the AI agent's mark: violet, apart from every state's colour; dark from the dark palette's --agent-*. */
 --agent-mark-bg:var(--agent-bg,#ece8fb);--agent-mark-ink:var(--agent-ink,#5b4bb7);--agent-mark-line:var(--agent-line,#d6cdf7);
 --state-local-bg:var(--surface-raised,#eef0f7);--state-local-ink:var(--info,#3b4a8a);--state-local-line:var(--surface-raised,#d5dbef);
}

/* ---- Decision 264, the empty note («مفيش … لسه»): templates/parts/empty.html ({% empty_note %}), KSDParts.empty (shared-parts.js).
   As 32-23 chose: one muted line under the heading, now the same on every page (it was 7 markups: .empty, .findempty,
   .sideEmpty, .stmtEmpty, .sectionnote, a bare <p> or a .meta line). */
.empty,.workspace-page .empty{display:block;box-sizing:border-box;max-width:100%;margin:8px 0;padding:12px 16px;border:0;border-radius:8px;
 background:var(--empty-bg);color:var(--empty-ink);font-size:14px;line-height:1.6;text-align:start}
.workspace-page .panel>.empty{margin:12px 22px 16px}
/* The compact note: the same muted words with no box, inside a row that keeps its height (the card's stages strip, the
   chat's «معلومات الرسالة»). */
.empty.emptyCompact,.workspace-page .empty.emptyCompact{display:inline;margin:0;padding:0;border-radius:0;background:none;font-size:inherit;line-height:inherit}
.empty :is(p,b){margin:0}
.empty a{color:var(--teal,#087f78)}

/* ---- Decision 265, the search box: templates/parts/search_box.html ({% search_box %}), KSDParts.searchBox (shared-parts.js).
   One look on every page (it was 7: the projects, the archive, the clients, the quiet clients, the gallery, the forward
   window's two and the chat's side panel): the icon at the start, the box 40px high (44 on a phone, phone.css), the
   browser's own clear button. Where it stands in its row is the row's business (the page's own sheet); its look is here. */
.searchBox[hidden]{display:none}
.searchBox{position:relative;display:flex;align-items:center;flex:1 1 220px;min-width:0;max-width:100%;box-sizing:border-box}
.searchBox>.searchIcon{position:absolute;inset-inline-start:12px;top:50%;width:17px;height:17px;margin-top:-8.5px;fill:none;
 stroke:var(--search-icon);stroke-width:2;stroke-linecap:round;pointer-events:none}
.searchBox>.searchInput,.workspace-page .searchBox>.searchInput{box-sizing:border-box;width:100%;min-width:0;max-width:none;height:40px;margin:0;
 padding:8px 12px;padding-inline-start:38px;border:1px solid var(--search-line);border-radius:10px;background:var(--search-bg);
 color:var(--search-ink);font:inherit;font-size:14px;line-height:1.4}
.searchBox>.searchInput::placeholder{color:var(--search-icon)}
.searchBox>.searchInput:focus{outline:2px solid var(--search-focus);outline-offset:0;border-color:var(--search-focus)}

/* ---- Decision 266, the state pill (جاري، متوقف، جاهز للتسليم، تم التسليم، ملغي، في الأرشيف المحلي): templates/parts/state_pill.html
   ({% state_pill project %}), the card, the project page and the client's page alike: one size (22px high, the card's row,
   decision 183: it wraps, never «…») and one colour per tone (state_tone, core/templatetags/parts.py). */
.statePill{display:inline-block;box-sizing:border-box;max-width:100%;min-width:0;margin:0;padding:1px 8px;border:1px solid var(--state-line);
 border-radius:6px;background:var(--state-bg);color:var(--state-ink);font-size:12px;font-weight:400;line-height:18px;text-align:start;
 white-space:normal;overflow-wrap:anywhere;vertical-align:middle}
.statePill small{color:inherit;font-size:inherit}
.statePill small::before{content:" · "}
.statePill--run{--state-bg:var(--state-run-bg);--state-ink:var(--state-run-ink);--state-line:var(--state-run-line)}
.statePill--wait{--state-bg:var(--state-wait-bg);--state-ink:var(--state-wait-ink);--state-line:var(--state-wait-line)}
.statePill--done{--state-bg:var(--state-done-bg);--state-ink:var(--state-done-ink);--state-line:var(--state-done-line)}
.statePill--stop{--state-bg:var(--state-stop-bg);--state-ink:var(--state-stop-ink);--state-line:var(--state-stop-line)}
.statePill--local{--state-bg:var(--state-local-bg);--state-ink:var(--state-local-ink);--state-line:var(--state-local-line)}

/* ---- Decision 284, the AI agent's mark («instinct ✦ وكيل ذكي»): templates/parts/agent_badge.html, written by {% who person %}
   (templates/parts/who.html) wherever its name shows: a chat bubble, the project's log, «سجل العمليات», a payment, a round,
   a task, a card's last message; the scripts clone the page's own copy (workspace/base.html). One size everywhere (the
   text's, a little smaller), never wrapped inside. */
.agentWho{display:inline-flex;flex-wrap:nowrap;align-items:baseline;gap:5px;color:var(--agent-mark-ink);font-weight:600;max-width:100%}
.agentMark{display:inline-flex;align-items:center;gap:3px;box-sizing:border-box;margin:0;padding:0 7px;border:1px solid var(--agent-mark-line);
 border-radius:999px;background:var(--agent-mark-bg);color:var(--agent-mark-ink);font-size:.8em;font-weight:700;line-height:1.6;white-space:nowrap;vertical-align:baseline}
.agentMarkIcon{font-size:.9em;line-height:1}
/* Inside a line that styles every span of its own (a card's last message: public-preview.css makes each a block under
   650px), the mark stays one line: «instinct ✦ وكيل ذكي» never breaks into three. Only its shape; its size stays the line's. */
.workspace-page :is(.agentWho,.agentMark){display:inline-flex;white-space:nowrap}
.sender.agentSender{color:var(--agent-mark-ink)}

/* ---- Decision 288, the lists' tabs: «المنتهية / المؤرشفة / الملغية» over the finished lists (decision 241, links with
   aria-current) and «مشاريعي / مشاريع زمايلك» on a tablet and a phone (templates/workspace/side_tabs.html, buttons with
   aria-selected). One look for both (it was finished.css's alone, loaded with the finished lists only). */
.finishedTabs{display:flex;gap:8px;margin-block-end:12px;max-width:100%}
.finishedTab{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;
 color:var(--ink);font:inherit;text-decoration:none;white-space:nowrap}
.finishedTab:is([aria-current="page"],[aria-selected="true"]){border-color:var(--teal);color:var(--teal)}
.finishedTab b{min-width:24px;padding-inline:4px;border-radius:9px;background:#edf3f4;text-align:center}
@media (max-width:760px){
 .finishedTabs{overflow-x:auto;padding:3px 2px}
 .finishedTab{flex:none;min-height:44px;box-sizing:border-box}
}
