/* ADATASK_REFERRAL_HUB_UI_V3660 — unified referral cartable workspace.
   Three panes on desktop (categories · list · detail), list + slide-over
   detail on tablet, single column with full-screen detail on phones. */
.arh{
 --arh-bg:#f4f5fa;--arh-surface:#fff;--arh-ink:#131a2e;--arh-ink2:#344054;--arh-muted:#667085;--arh-faint:#98a2b3;
 --arh-line:#e3e6ee;--arh-line2:#eef0f5;--arh-brand:#5b4bdb;--arh-brand-ink:#4336c4;--arh-brand-soft:#efedff;
 --arh-rose:#e11d48;--arh-green:#047857;
 font-family:inherit;direction:rtl;
}
html.arh-lock,html.arh-lock body{overflow:hidden!important}
/* ADATASK_REFERRAL_HUB_MODULE_LAUNCHER_LAYER_V3707
   The global module launcher is portaled to body. While the referral cartable
   is open it must render above the cartable workspace (z-index 9990), not below it. */
html.arh-lock .adatask-module-backdrop-v1-r2{z-index:10020!important}
html.arh-lock .adatask-module-launcher-v1-r2{z-index:10021!important}
/* /ADATASK_REFERRAL_HUB_MODULE_LAUNCHER_LAYER_V3707 */
.arh *,.arh *:before,.arh *:after{box-sizing:border-box}
.arh button,.arh input,.arh select,.arh textarea{font:inherit;color:inherit;letter-spacing:normal}
.arh button{cursor:pointer}
.arh svg{flex:none;display:block}
.arh-shell{
 position:fixed;top:0;bottom:0;left:0;right:var(--arh-side,0px);z-index:9990;
 display:flex;flex-direction:column;background:var(--arh-bg);color:var(--arh-ink);
 font-size:13px;line-height:1.6;animation:arh-in .16s ease-out;
}
@keyframes arh-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@keyframes arh-spin{to{transform:rotate(360deg)}}
@keyframes arh-sh{0%{background-position:100% 0}100%{background-position:-100% 0}}

/* ---------------------------------------------------------------- header */
.arh-top{flex:none;display:flex;align-items:center;gap:16px;padding:13px 22px;background:var(--arh-surface);border-bottom:1px solid var(--arh-line)}
.arh-brand{display:flex;align-items:center;gap:11px;min-width:0}
.arh-brand-ico{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(140deg,#6f61f2,#4636c7);color:#fff;box-shadow:0 6px 16px rgba(91,75,219,.26)}
.arh-brand h1{margin:0;font-size:17px;line-height:1.4;font-weight:800;color:var(--arh-ink)}
.arh-brand p{margin:1px 0 0;font-size:11.5px;color:var(--arh-muted)}
.arh-search{flex:1;max-width:560px;margin-inline-start:auto;display:flex;align-items:center;gap:8px;height:42px;padding:0 12px;border:1px solid var(--arh-line);border-radius:12px;background:#f8f9fc;color:var(--arh-faint);cursor:text}
.arh-search:focus-within{border-color:#a99ff0;background:#fff;box-shadow:0 0 0 4px rgba(91,75,219,.1)}
.arh-search input{flex:1;min-width:0;height:100%;border:0;outline:0;background:transparent;color:var(--arh-ink);font-size:13px}
.arh-search input::-webkit-search-cancel-button{display:none}
.arh-search kbd{font:inherit;font-size:10.5px;min-width:22px;height:22px;display:grid;place-items:center;border:1px solid var(--arh-line);border-bottom-width:2px;border-radius:6px;background:#fff;color:var(--arh-muted)}
.arh-top-actions{display:flex;align-items:center;gap:6px}
.arh-sync{font-size:11px;color:var(--arh-faint);white-space:nowrap;margin-inline-end:4px}
.arh-sync.is-loading{color:var(--arh-brand);font-weight:700}
.arh-icon-btn{width:38px;height:38px;border-radius:10px;border:1px solid var(--arh-line);background:#fff;color:var(--arh-ink2);display:grid;place-items:center;transition:border-color .15s,color .15s}
.arh-icon-btn:hover{border-color:#c9c3f5;color:var(--arh-brand)}
.arh-icon-btn:focus-visible,.arh-btn:focus-visible,.arh-cat:focus-visible,.arh-kpi:focus-visible,.arh-chips button:focus-visible,.arh-seg button:focus-visible{outline:2px solid var(--arh-brand);outline-offset:2px}
.arh-close:hover{color:var(--arh-rose);border-color:#fecdd3}

/* ------------------------------------------------------------------ KPIs */
.arh-kpis{flex:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:14px 22px 0}
.arh-kpi{--k:#5b4bdb;--k-soft:#efedff;display:flex;align-items:center;gap:11px;min-width:0;padding:11px 13px;border:1px solid var(--arh-line);border-radius:14px;background:#fff;text-align:right;transition:border-color .15s,box-shadow .15s}
.arh-kpi.tone-rose{--k:#e11d48;--k-soft:#ffe8ed}
.arh-kpi.tone-amber{--k:#c2410c;--k-soft:#fff0e3}
.arh-kpi.tone-blue{--k:#1d4ed8;--k-soft:#e8efff}
.arh-kpi:hover{border-color:#cfd4e3;box-shadow:0 4px 14px rgba(16,24,40,.06)}
.arh-kpi.active{border-color:var(--k);box-shadow:0 0 0 3px var(--k-soft)}
.arh-kpi-ico{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--k-soft);color:var(--k);flex:none}
.arh-kpi-copy{display:flex;flex-direction:column;min-width:0}
.arh-kpi small{font-size:11.5px;color:var(--arh-muted);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.arh-kpi b{font-size:22px;font-weight:800;color:var(--arh-ink);line-height:1.25}
.arh-kpi em{margin-inline-start:auto;font-style:normal;font-size:10.5px;line-height:1.5;color:var(--arh-faint);text-align:left;max-width:118px}

/* ------------------------------------------------------------------ body */
.arh-body{position:relative;flex:1;min-height:0;display:grid;grid-template-columns:238px minmax(380px,1fr) minmax(400px,1.12fr);gap:14px;padding:14px 22px 18px}
.arh-rail,.arh-list-col,.arh-detail{min-height:0;border:1px solid var(--arh-line);border-radius:16px;background:#fff}
.arh-rail{overflow:auto;display:flex;flex-direction:column;gap:2px;padding:10px;scrollbar-width:thin}
.arh-rail-title{font-size:11px;font-weight:800;color:var(--arh-faint);padding:4px 8px 6px}
.arh-cat{--c:#5b4bdb;display:flex;align-items:center;gap:10px;width:100%;padding:8px 9px;border:0;border-radius:11px;background:transparent;text-align:right;color:var(--arh-ink2);transition:background .12s}
.arh-cat:hover{background:#f5f6fa}
.arh-cat.active{background:#f3f1ff;background:color-mix(in srgb,var(--c) 9%,#fff);color:var(--arh-ink)}
.arh-cat-ico{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;flex:none;color:var(--c);background:#f3f4f8;background:color-mix(in srgb,var(--c) 12%,#fff)}
.arh-cat.active .arh-cat-ico{background:var(--c);color:#fff}
.arh-cat-label{flex:1;min-width:0;display:flex;flex-direction:column;font-weight:700;font-size:12.5px;line-height:1.45}
.arh-cat-label small{font-weight:500;font-size:10.5px;color:var(--arh-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.arh-cat-badge{min-width:22px;height:22px;padding:0 6px;border-radius:99px;background:var(--arh-rose);color:#fff;font-size:11px;display:grid;place-items:center;font-weight:800}
.arh-cat-n{font-size:11.5px;color:var(--arh-faint);font-weight:700}
.arh-cat.is-empty{opacity:.5}
.arh-cat.is-empty .arh-cat-label{font-weight:600}

/* ------------------------------------------------------------------ list */
.arh-list-col{display:flex;flex-direction:column;overflow:hidden}
.arh-tools{flex:none;padding:12px 12px 8px;border-bottom:1px solid var(--arh-line2);display:flex;flex-direction:column;gap:9px}
.arh-tools-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.arh-seg{display:inline-flex;flex:none;padding:3px;border-radius:11px;background:#eff1f6}
.arh-seg button{border:0;background:transparent;padding:6px 12px;border-radius:9px;font-size:12px;font-weight:700;color:var(--arh-muted)}
.arh-seg button.active{background:#fff;color:var(--arh-brand-ink);box-shadow:0 1px 3px rgba(16,24,40,.12)}
.arh-seg b{font-weight:800;margin-inline-start:3px;font-size:11px}
.arh-chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;min-width:0}
.arh-chips::-webkit-scrollbar,.arh-mcats::-webkit-scrollbar{display:none}
.arh-chips button{flex:none;height:30px;padding:0 11px;border:1px solid var(--arh-line);border-radius:99px;background:#fff;font-size:11.5px;font-weight:600;color:var(--arh-muted)}
.arh-chips button:hover{border-color:#cfd4e3;color:var(--arh-ink2)}
.arh-chips button.active{border-color:#c9c3f5;background:var(--arh-brand-soft);color:var(--arh-brand-ink);font-weight:700}
.arh-bulk{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;font-size:11.5px;color:var(--arh-muted);min-height:26px}
.arh-bulk.is-selecting{padding:4px 10px;border-radius:9px;background:var(--arh-brand-soft)}
.arh-bulk b{color:var(--arh-ink)}
.arh-bulk button{border:0;background:none;color:var(--arh-brand-ink);font-weight:700;padding:3px 2px;font-size:11.5px}
.arh-bulk button:hover{text-decoration:underline}
.arh-check-all{display:flex;align-items:center;gap:6px;cursor:pointer}
.arh-check-all input,.arh-check input{width:15px;height:15px;margin:0;accent-color:var(--arh-brand);cursor:pointer}
.arh-count{font-weight:700}
.arh-sort{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--arh-muted)}
.arh-sort select{height:30px;border:1px solid var(--arh-line);border-radius:9px;background:#fff;padding:0 8px;font-size:11.5px;color:var(--arh-ink2)}
.arh-mcats{display:none}
.arh-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;outline:0;scrollbar-width:thin}
.arh-group{position:sticky;top:0;z-index:1;padding:6px 16px;background:#f8f9fc;font-size:11px;font-weight:800;color:var(--arh-faint);border-bottom:1px solid var(--arh-line2)}
.arh-row{--c:#5b4bdb;position:relative;display:flex;align-items:flex-start;gap:10px;padding:11px 14px 11px 12px;border-bottom:1px solid var(--arh-line2);cursor:pointer;transition:background .1s}
.arh-row:hover{background:#f8f9fd}
.arh-row.is-selected{background:#f2f0ff}
.arh-row.is-selected:before{content:"";position:absolute;top:0;bottom:0;right:0;width:3px;background:var(--arh-brand)}
.arh-check{padding-top:9px;flex:none;display:flex}
.arh-ico{flex:none;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:var(--c);background:#f3f4f8;background:color-mix(in srgb,var(--c) 11%,#fff)}
.arh-row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.arh-row-l1{display:flex;align-items:baseline;gap:8px;min-width:0}
.arh-row-title{flex:1;min-width:0;font-size:13px;font-weight:600;color:var(--arh-ink2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.arh-row.is-unread .arh-row-title{font-weight:800;color:var(--arh-ink)}
.arh-row.is-unread .arh-row-title:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--arh-brand);margin-inline-end:6px;vertical-align:middle;position:relative;top:-1px}
.arh-row-l1 time{flex:none;font-size:11px;color:var(--arh-faint);white-space:nowrap}
.arh-row.is-unread .arh-row-l1 time{color:var(--arh-brand-ink);font-weight:700}
.arh-row-l2{display:flex;align-items:center;gap:5px;min-width:0;font-size:11.5px;color:var(--arh-muted);white-space:nowrap;overflow:hidden}
.arh-who{font-weight:700;color:var(--arh-ink2);flex:none;max-width:40%;overflow:hidden;text-overflow:ellipsis}
.arh-kind{flex:none}
.arh-sub{overflow:hidden;text-overflow:ellipsis;min-width:0}
.arh-sep{color:#c8cfdb;flex:none}
.arh-row-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}
.arh-tag{display:inline-flex;align-items:center;gap:3px;height:21px;padding:0 8px;border-radius:99px;font-size:10.5px;font-weight:700;background:#f1f3f8;color:var(--arh-muted);white-space:nowrap}
.arh-tag.tone-pending{background:#fff4e5;color:#b45309}
.arh-tag.tone-progress{background:#e8f0ff;color:#1d4ed8}
.arh-tag.tone-done{background:#e6f6ef;color:#047857}
.arh-tag.tone-rejected{background:#ffe9ec;color:#be123c}
.arh-tag.tone-info{background:#eef2f6;color:#475569}
.arh-tag.pri-urgent{background:#e11d48;color:#fff}
.arh-tag.pri-high{background:#ffe4ea;color:#be123c}
.arh-tag.is-overdue{background:#fee2e2;color:#b91c1c}
.arh-tag.is-due{background:#f1efff;color:#4336c4}
.arh-av{--s:28px;width:var(--s);height:var(--s);flex:none;border-radius:50%;overflow:hidden;display:inline-grid;place-items:center;background:#ecebff;color:#4336c4;font-size:calc(var(--s) * .42);font-weight:800;line-height:1}
.arh-av{position:relative}
.arh-av.is-system{background:linear-gradient(140deg,#6f61f2,#4636c7);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.arh-av.is-portal{background:#e0f2fe;color:#0369a1}
.arh-av.is-dept{background:#e7f7ef;color:#047857}
.arh-av img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;background:#ecebff}
.arh-more{display:block;width:calc(100% - 24px);margin:12px;height:38px;border:1px dashed #cfd4e3;border-radius:10px;background:#fafbfd;color:var(--arh-brand-ink);font-weight:700}
.arh-more:hover{background:var(--arh-brand-soft)}
.arh-skel{cursor:default}
.arh-skel .arh-ico{background:#eef0f5}
.arh-skel i{display:block;height:10px;border-radius:6px;background:linear-gradient(90deg,#eef0f5 25%,#f7f8fb 50%,#eef0f5 75%);background-size:200% 100%;animation:arh-sh 1.3s linear infinite;margin:6px 0}
.arh-skel i:first-child{width:72%}
.arh-skel i:last-child{width:44%}
.arh-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px;min-height:300px;padding:30px 24px;color:var(--arh-faint)}
.arh-empty b{font-size:14px;color:var(--arh-ink);margin-top:6px}
.arh-empty p{margin:0;max-width:380px;font-size:12px;line-height:1.9;color:var(--arh-muted)}
.arh-empty button{margin-top:10px;height:36px;padding:0 14px;border:1px solid #c9c3f5;border-radius:10px;background:var(--arh-brand-soft);color:var(--arh-brand-ink);font-weight:700;font-size:12px}
.arh-empty.is-error svg{color:#e11d48}
.arh-empty-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}

/* ---------------------------------------------------------------- detail */
.arh-detail{overflow:auto;scrollbar-width:thin}
.arh-d{--c:#5b4bdb;padding:20px 22px 26px;display:flex;flex-direction:column;gap:16px}
.arh-back{display:none;align-items:center;gap:4px;align-self:flex-start;height:32px;padding:0 10px 0 12px;border:1px solid var(--arh-line);border-radius:9px;background:#fff;font-size:12px;font-weight:700;color:var(--arh-ink2)}
.arh-d-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.arh-kind-chip{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 10px;border-radius:99px;font-size:11px;font-weight:800;color:var(--c);background:#f3f4f8;background:color-mix(in srgb,var(--c) 11%,#fff)}
.arh-d-chips .arh-tag{height:24px}
.arh-d-head h2{margin:0;font-size:19px;line-height:1.6;font-weight:800;color:var(--arh-ink);overflow-wrap:anywhere}
.arh-d-head p{margin:4px 0 0;color:var(--arh-muted);font-size:12.5px}
.arh-d-actions{display:flex;flex-wrap:wrap;gap:8px;padding:12px;border-radius:14px;background:#f8f9fc;border:1px solid var(--arh-line2)}
.arh-btn{height:38px;padding:0 15px;border-radius:10px;border:1px solid var(--arh-line);background:#fff;font-size:12.5px;font-weight:700;color:var(--arh-ink2);display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:filter .12s,border-color .12s}
.arh-btn:hover:not(:disabled){border-color:#c9c3f5}
.arh-btn.is-approve{background:#059669;border-color:#059669;color:#fff}
.arh-btn.is-primary{background:var(--arh-brand);border-color:var(--arh-brand);color:#fff}
.arh-btn.is-approve:hover:not(:disabled),.arh-btn.is-primary:hover:not(:disabled){filter:brightness(1.07)}
.arh-btn.is-reject{border-color:#fecdd3;color:#be123c}
.arh-btn.is-reject:hover:not(:disabled){background:#fff1f3;border-color:#fda4b4}
.arh-btn:disabled{opacity:.55;cursor:default}
.arh-spin{width:14px;height:14px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:arh-spin .7s linear infinite}
.arh-form{padding:14px;border:1px solid #d9d4fb;border-radius:14px;background:#fbfaff;display:flex;flex-direction:column;gap:10px}
.arh-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:var(--arh-ink2)}
.arh-form textarea{width:100%;min-height:80px;resize:vertical;border:1px solid var(--arh-line);border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.8;outline:0;background:#fff;font-weight:400}
.arh-form textarea:focus{border-color:#a99ff0;box-shadow:0 0 0 3px rgba(91,75,219,.1)}
.arh-form>div{display:flex;justify-content:flex-end;gap:8px}
.arh-route{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px;padding:14px;border:1px solid var(--arh-line2);border-radius:14px;background:linear-gradient(180deg,#fbfbfe,#f5f6fa)}
.arh-route-p{display:flex;align-items:center;gap:10px;min-width:0}
.arh-route-p>span{display:flex;flex-direction:column;min-width:0}
.arh-route-p small{font-size:10.5px;color:var(--arh-faint);font-weight:600}
.arh-route-p b{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--arh-ink)}
.arh-route-p em{font-style:normal;font-size:11px;color:var(--arh-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.arh-route-arrow{color:var(--arh-brand);display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#fff;border:1px solid var(--arh-line)}
.arh-route-meta{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px 16px;padding-top:10px;border-top:1px dashed var(--arh-line);font-size:11.5px;color:var(--arh-muted)}
.arh-route-meta span{display:inline-flex;align-items:center;gap:5px}
.arh-route-meta .is-ok{color:#047857;font-weight:700}
.arh-route-meta .is-wait{color:#b45309;font-weight:700}
.arh-d-sec h3{margin:0 0 7px;font-size:12px;font-weight:800;color:var(--arh-muted)}
.arh-note{margin:0;padding:12px 14px;border-radius:12px;background:#fafafc;border-right:3px solid var(--c);white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.95;color:var(--arh-ink2)}
.arh-d-sec.is-result .arh-note{border-right-color:#059669;background:#f3fbf7}
.arh-files{display:flex;flex-wrap:wrap;gap:7px}
.arh-files a{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:7px 10px;border:1px solid var(--arh-line);border-radius:10px;background:#fff;color:var(--arh-brand-ink);font-size:12px;font-weight:700;text-decoration:none;overflow-wrap:anywhere}
.arh-files a:hover{background:var(--arh-brand-soft)}
.arh-facts{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.arh-facts div{padding:9px 11px;border:1px solid var(--arh-line2);border-radius:11px;background:#fcfcfd;min-width:0}
.arh-facts dt{font-size:10.5px;color:var(--arh-faint);font-weight:700}
.arh-facts dd{margin:2px 0 0;font-size:12.5px;font-weight:700;color:var(--arh-ink2);overflow-wrap:anywhere}
.arh-d-empty{height:100%;min-height:340px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;color:var(--arh-muted)}
.arh-d-empty>span{width:74px;height:74px;border-radius:22px;display:grid;place-items:center;background:var(--arh-brand-soft);color:var(--arh-brand);margin-bottom:14px}
.arh-d-empty b{font-size:14px;color:var(--arh-ink)}
.arh-d-empty p{margin:6px 0 16px;font-size:12px;line-height:1.9}
.arh-d-empty ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:11.5px}
.arh-d-empty kbd{font:inherit;font-size:10.5px;display:inline-grid;place-items:center;min-width:22px;height:22px;margin-inline-end:4px;border:1px solid var(--arh-line);border-bottom-width:2px;border-radius:6px;background:#fff;color:var(--arh-ink2)}

/* BPMS context/history lives inside the cartable detail; no route jump. */
.arh-bpms-history{display:grid;gap:12px}
.arh-bpms-loading,.arh-history-empty{padding:12px 14px;border:1px dashed var(--arh-line);border-radius:12px;background:#fafbfc;color:var(--arh-muted);font-size:12px;line-height:1.9;display:flex;align-items:center;gap:8px}
.arh-bpms-context{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;border:1px solid #bfdbfe;border-radius:14px;background:#eff6ff}
.arh-bpms-context>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.arh-bpms-context small{font-size:10.5px;color:#64748b;font-weight:700}
.arh-bpms-context b{font-size:12.5px;color:#1e3a8a;line-height:1.8;overflow-wrap:anywhere}
.arh-bpms-context span{font-size:10.5px;color:#64748b}
.arh-flow-list,.arh-history-list{display:grid;gap:8px}
.arh-flow-step{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;padding:10px;border:1px solid var(--arh-line2);border-radius:12px;background:#fff}
.arh-flow-index{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:#f1f5f9;color:#64748b;font-size:11px;font-weight:900}
.arh-flow-main{min-width:0}
.arh-flow-main>div{display:flex;align-items:center;justify-content:space-between;gap:8px}
.arh-flow-main b{font-size:12.5px;color:var(--arh-ink)}
.arh-flow-main em{font-style:normal;font-size:10px;font-weight:800;padding:3px 7px;border-radius:99px;background:#f1f5f9;color:#64748b;white-space:nowrap}
.arh-flow-main small{display:block;margin-top:3px;font-size:10.5px;color:var(--arh-faint)}
.arh-flow-main p{margin:7px 0 0;padding:7px 9px;border-radius:9px;background:#f8fafc;color:var(--arh-ink2);font-size:11.5px;line-height:1.8;white-space:pre-wrap}
.arh-flow-step.is-active{border-color:#93c5fd;background:#f8fbff}.arh-flow-step.is-active .arh-flow-index,.arh-flow-step.is-active em{background:#dbeafe;color:#1d4ed8}
.arh-flow-step.is-done{border-color:#bbf7d0}.arh-flow-step.is-done .arh-flow-index,.arh-flow-step.is-done em{background:#dcfce7;color:#047857}
.arh-flow-step.is-reject{border-color:#fecdd3}.arh-flow-step.is-reject .arh-flow-index,.arh-flow-step.is-reject em{background:#ffe4e6;color:#be123c}
.arh-flow-step.is-muted{opacity:.65}
.arh-history-row{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;padding:9px 10px;border:1px solid var(--arh-line2);border-radius:11px;background:#fcfcfd}
.arh-history-row>span{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:#eef2ff;color:#4f46e5}
.arh-history-row.is-comment>span{background:#ecfeff;color:#0e7490}
.arh-history-row>div>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.arh-history-row b{font-size:11.5px;color:var(--arh-ink)}.arh-history-row em{font-style:normal;font-size:10.5px;color:var(--arh-muted);font-weight:700}.arh-history-row time{font-size:10px;color:var(--arh-faint);margin-inline-start:auto}
.arh-history-row p{margin:5px 0 0;font-size:11.5px;line-height:1.8;color:var(--arh-ink2);white-space:pre-wrap}

/* ADATASK_BPMS_TREE_HISTORY_V3706: one readable start-to-current process tree. */
.arh-tree-help{margin:0 0 10px;color:var(--arh-muted);font-size:11px;line-height:1.9}
.arh-own-actions{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid #bfdbfe;border-radius:13px;background:#f8fbff}
.arh-own-actions>span{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:#dbeafe;color:#1d4ed8;flex:none}
.arh-own-actions div{min-width:0;display:flex;flex-direction:column;gap:2px}
.arh-own-actions b{font-size:12px;color:#1e3a8a}.arh-own-actions small{font-size:10.5px;color:#64748b;line-height:1.7}
.arh-process-tree{position:relative;display:grid;gap:9px;padding:2px 0}
.arh-process-tree::before{content:"";position:absolute;top:18px;bottom:18px;right:15px;width:2px;background:#e2e8f0}
.arh-process-node{position:relative;display:grid;grid-template-columns:32px minmax(0,1fr);gap:10px;align-items:start}
.arh-process-marker{position:relative;z-index:1;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#f1f5f9;border:2px solid #cbd5e1;color:#64748b;font-size:10.5px;font-weight:900}
.arh-process-card{min-width:0;padding:10px 11px;border:1px solid var(--arh-line2);border-radius:12px;background:#fff}
.arh-process-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.arh-process-title b{font-size:12.5px;color:var(--arh-ink);line-height:1.8}
.arh-process-title em{font-style:normal;font-size:10px;font-weight:800;padding:3px 7px;border-radius:999px;background:#f1f5f9;color:#64748b;white-space:nowrap}
.arh-process-card>small{display:block;margin-top:2px;color:var(--arh-faint);font-size:10.5px;line-height:1.7}
.arh-process-node.is-start .arh-process-marker{background:#eef2ff;border-color:#c7d2fe;color:#4f46e5}
.arh-process-node.is-active .arh-process-marker{background:#dbeafe;border-color:#60a5fa;color:#1d4ed8}.arh-process-node.is-active .arh-process-card{border-color:#93c5fd;background:#f8fbff}.arh-process-node.is-active .arh-process-title em{background:#dbeafe;color:#1d4ed8}
.arh-process-node.is-done .arh-process-marker{background:#dcfce7;border-color:#86efac;color:#047857}.arh-process-node.is-done .arh-process-card{border-color:#bbf7d0}.arh-process-node.is-done .arh-process-title em{background:#dcfce7;color:#047857}
.arh-process-node.is-reject .arh-process-marker{background:#ffe4e6;border-color:#fda4af;color:#be123c}.arh-process-node.is-reject .arh-process-card{border-color:#fecdd3}.arh-process-node.is-reject .arh-process-title em{background:#ffe4e6;color:#be123c}
.arh-process-node.is-waiting .arh-process-card,.arh-process-node.is-muted .arh-process-card{background:#fafafa}.arh-process-node.is-muted{opacity:.68}
.arh-step-events{display:grid;gap:6px;margin-top:9px;padding-top:8px;border-top:1px dashed #e2e8f0}
.arh-step-empty{margin-top:8px;padding:7px 9px;border-radius:8px;background:#f8fafc;color:#94a3b8;font-size:10.5px}
.arh-event-row{display:grid;grid-template-columns:24px minmax(0,1fr);gap:7px;padding:7px 8px;border-radius:9px;background:#f8fafc;border:1px solid #eef2f6}
.arh-event-dot{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;background:#eef2ff;color:#4f46e5}
.arh-event-row.is-comment .arh-event-dot{background:#ecfeff;color:#0e7490}
.arh-event-row.is-mine{background:#eff6ff;border-color:#bfdbfe;box-shadow:inset -3px 0 0 #2563eb}
.arh-event-row.is-mine .arh-event-dot{background:#dbeafe;color:#1d4ed8}
.arh-event-body{min-width:0}.arh-event-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.arh-event-head b{font-size:11px;color:var(--arh-ink)}.arh-event-head em{font-style:normal;font-size:10px;color:var(--arh-muted);font-weight:700}
.arh-event-head strong{font-size:9.5px;color:#1d4ed8;background:#dbeafe;border-radius:999px;padding:2px 6px}.arh-event-head time{font-size:9.5px;color:var(--arh-faint);margin-inline-start:auto}
.arh-event-body p{margin:5px 0 0;padding:6px 8px;border-radius:7px;background:#fff;color:var(--arh-ink2);font-size:11px;line-height:1.8;white-space:pre-wrap}
@media(max-width:720px){.arh-process-title{align-items:flex-start;flex-direction:column}.arh-event-head time{margin-inline-start:0}.arh-own-actions{align-items:flex-start}}

/* ------------------------------------------------------ toasts + popups */
.arh-toasts{position:absolute;left:22px;bottom:20px;z-index:6;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.arh-toast{pointer-events:auto;max-width:380px;padding:11px 14px;border-radius:12px;background:#1d2238;color:#fff;font-size:12.5px;font-weight:600;box-shadow:0 12px 30px rgba(16,24,40,.24);animation:arh-in .16s ease-out;transition:opacity .2s,transform .2s}
.arh-toast.is-error{background:#9f1239}
.arh-toast.out,.arh-pop.out{opacity:0;transform:translateY(6px)}
.arh-float{position:fixed;left:18px;bottom:18px;z-index:99990;display:flex;flex-direction:column;gap:10px;font-family:inherit;direction:rtl}
.arh-float .arh-toast{background:#1d2238}
.arh-pop{display:flex;align-items:center;gap:11px;width:min(390px,calc(100vw - 36px));padding:12px 12px 12px 10px;border:1px solid #e3e6ee;border-radius:14px;background:#fff;color:#131a2e;box-shadow:0 16px 40px rgba(16,24,40,.18);animation:arh-in .18s ease-out;transition:opacity .2s,transform .2s;font-size:12.5px}
.arh-pop-ico{width:38px;height:38px;border-radius:11px;flex:none;display:grid;place-items:center;background:#efedff;color:#5b4bdb}
.arh-pop>div{flex:1;min-width:0}
.arh-pop b{display:block;font-size:13px}
.arh-pop p{margin:1px 0 0;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.arh-pop button{flex:none;height:32px;padding:0 12px;border:0;border-radius:9px;background:#5b4bdb;color:#fff;font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.arh-pop button.x{width:28px;padding:0;display:grid;place-items:center;background:transparent;color:#98a2b3}
.arh-pop svg{display:block}

/* The record opened from the cartable, marked on its own page. */
/* Record opened from the cartable: same blue as the tasks page's own
   "selected" row; pulses three times, then stays until the page is left. */
@keyframes arh-focus{0%,100%{box-shadow:0 0 0 3px rgba(37,99,235,.95),0 0 0 9px rgba(37,99,235,.2)}50%{box-shadow:0 0 0 3px rgba(37,99,235,.5),0 0 0 15px rgba(37,99,235,.06)}}
.arh-focus-mark{border-radius:12px;animation:arh-focus 1.1s ease-in-out 3;box-shadow:0 0 0 3px rgba(37,99,235,.95),0 10px 26px rgba(37,99,235,.18);background-color:#EFF6FF!important;scroll-margin:90px}
@media (prefers-reduced-motion:reduce){.arh-focus-mark{animation:none}}
/* Sidebar entry while the cartable is on screen. */
#atr-sidebar-cartable-v3427.arh-side-open{background:rgba(167,139,250,.24)!important;color:#fff!important;box-shadow:inset -3px 0 0 #cbb7ff}

/* ------------------------------------------------------------ responsive */
@media (max-width:1520px){.arh-kpi em{display:none}}
@media (max-width:1360px){
 .arh-body{grid-template-columns:210px minmax(340px,1fr) minmax(360px,1fr);gap:12px;padding:12px 16px 16px}
 .arh-kpis{padding:12px 16px 0;gap:10px}
 .arh-top{padding:12px 16px}
 .arh-kpi em{display:none}
}
@media (max-width:1099px){
 .arh-body{grid-template-columns:minmax(0,1fr)}
 .arh-rail{display:none}
 .arh-mcats{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 -2px}
 .arh-mcats button{--c:#5b4bdb;flex:none;height:32px;padding:0 12px;border:1px solid var(--arh-line);border-radius:99px;background:#fff;font-size:12px;font-weight:700;color:var(--arh-muted);display:inline-flex;align-items:center;gap:5px}
 .arh-mcats button.active{border-color:var(--c);color:#fff;background:var(--c)}
 .arh-mcats b{min-width:18px;height:18px;padding:0 5px;border-radius:99px;display:inline-grid;place-items:center;background:var(--arh-rose);color:#fff;font-size:10px}
 .arh-mcats i{font-style:normal;font-size:11px;opacity:.75}
 .arh-detail{position:absolute;top:12px;bottom:16px;left:16px;width:min(580px,calc(100% - 32px));z-index:4;box-shadow:0 20px 50px rgba(16,24,40,.22);transform:translateX(calc(-100% - 40px));visibility:hidden;transition:transform .2s ease,visibility 0s linear .2s}
 .arh-show-detail .arh-detail{transform:none;visibility:visible;transition:transform .2s ease}
 .arh-back{display:inline-flex}
}
@media (max-width:720px){
 .arh-shell{font-size:12.5px}
 .arh-top{flex-wrap:wrap;gap:10px;padding:10px 12px}
 .arh-brand-ico{width:36px;height:36px}
 .arh-brand h1{font-size:15.5px}
 .arh-brand p,.arh-sync{display:none}
 .arh-top-actions{margin-inline-start:auto}
 .arh-search{order:3;flex-basis:100%;max-width:none;margin:0;height:40px}
 .arh-search kbd{display:none}
 .arh-kpis{display:flex;overflow-x:auto;scrollbar-width:none;padding:10px 12px 0;gap:8px}
 .arh-kpis::-webkit-scrollbar{display:none}
 .arh-kpi{flex:0 0 auto;min-width:148px;padding:9px 11px}
 .arh-kpi-ico{width:32px;height:32px}
 .arh-kpi b{font-size:18px}
 .arh-body{padding:10px 12px 12px}
 .arh-tools{padding:10px 10px 6px}
 .arh-seg{display:grid;grid-template-columns:1fr 1fr;flex:1}
 .arh-sort span,.arh-check,.arh-check-all{display:none}
 .arh-row{padding:11px 10px}
 .arh-row-tags{margin-top:3px}
 .arh-detail{top:0;bottom:0;left:0;right:0;width:auto;border-radius:0;border:0;position:fixed;z-index:9995}
 .arh-d{padding:14px 14px 28px}
 .arh-d-head h2{font-size:17px}
 .arh-route{grid-template-columns:1fr;justify-items:start}
 .arh-route-arrow{transform:rotate(-90deg)}
 .arh-bpms-context{flex-direction:column;align-items:stretch}
 .arh-bpms-context .arh-btn{width:100%}
 .arh-flow-main>div{align-items:flex-start;flex-direction:column}
 .arh-history-row time{margin-inline-start:0}
 .arh-facts{grid-template-columns:1fr}
 .arh-d-actions{position:sticky;top:0;z-index:2;box-shadow:0 6px 16px rgba(16,24,40,.08)}
 .arh-btn{flex:1 1 auto}
 .arh-toasts{left:12px;right:12px;bottom:12px}
 .arh-float{left:12px;right:12px;bottom:12px}
 .arh-pop{width:auto}
}
@media (prefers-reduced-motion:reduce){
 .arh-shell,.arh-toast,.arh-pop{animation:none}
 .arh-detail,.arh-show-detail .arh-detail{transition:none}
 .arh-skel i{animation:none}
}
