/* The four user-supplied mobile screens are the visual baseline. */
.os-app[data-view="office"],.os-app[data-view="tasks"],.os-app[data-view="repo"],.os-app[data-view="task"] { --blue:var(--brand-primary);--navy:var(--brand-dark);--grad:var(--brand-primary);max-width:520px;padding:18px 14px 96px;background:var(--surface);color:var(--navy);min-height:100dvh; }
.ref-shell-header{display:flex;align-items:center;gap:12px;margin:0 0 18px;min-height:56px}.ref-shell-title{flex:1;min-width:0}.ref-shell-title h1{margin:0;font-size:clamp(20px,5.61vw,26.5px);font-weight:700;line-height:1.45}.ref-shell-title p{margin:3px 0 0;color:var(--muted);font-size:14.5px}.ref-brand{width:45px;height:45px;flex:none;border-radius:14px;background:var(--brand-tint);display:grid;place-items:center;overflow:hidden}.ref-brand img{width:100%;height:100%;object-fit:contain}.ref-logo{display:block;width:45px;height:45px;background:url('/icons/iaqar-logo.png') center/80% no-repeat}.ref-bell{border:0;background:none;position:relative;width:31px;padding:0;color:var(--navy)}.ref-bell svg{width:28px;height:28px}.ref-menu{min-width:40px;width:40px;height:40px;min-height:40px;background:var(--brand-tint);border:0;font-size:26.5px;color:var(--brand-primary);border-radius:14px}.ref-shell-header .ref-menu{order:4}.ref-shell-header .ref-bell{order:3}
.ref-bottom{position:fixed;z-index:20;bottom:0;left:50%;transform:translateX(-50%);width:calc(100% - 20px);max-width:500px;min-height:72px;padding:6px 8px max(8px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:rgba(255,255,255,.98);border:1px solid var(--brand-tint);border-radius:22px 22px 0 0;box-shadow:0 -3px 18px #d6e9f333}.ref-bottom button{border:0;background:transparent;display:flex;flex-direction:column;align-items:center;gap:5px;padding:5px 0;color:var(--muted);font-size:13.5px;font-weight:600;border-radius:16px;min-height:52px}.ref-bottom button svg{width:24px;height:24px}.ref-bottom button[aria-current="page"]{color:var(--brand-primary);background:var(--brand-tint-2);position:relative}.ref-bottom button[aria-current="page"]:before{content:"";position:absolute;top:-6px;width:58px;height:3px;border-radius:8px;background:var(--brand-primary)}.ref-bottom button[aria-current="page"] svg{stroke-width:2.7}
.ref-welcome{margin:8px 0 18px}.ref-welcome h2{font-size:26.5px;margin:0 0 5px;font-weight:700}.ref-welcome p{margin:0;color:var(--muted);font-size:19px}.ref-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 10px}.ref-stats>button{border:0;background:#fff;border-radius:14px;padding:12px 9px;color:var(--muted);text-align:center;min-width:0;box-shadow:0 4px 15px #e8f1f966}.ref-stats>button>div{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.ref-stats b{font-size:30.5px;color:var(--brand-primary);font-weight:700;line-height:1}.ref-stats span{width:35px;height:38px;border-radius:10px;display:grid;place-items:center;background:var(--brand-tint);color:var(--brand-primary)}.ref-stats svg{width:24px;height:24px}.ref-stats small{font-size:13.5px;display:block;white-space:nowrap}.ref-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.ref-heading h2,.ref-quick h2,.ref-path h2{font-size:21.5px;margin:0;font-weight:700}.ref-heading button{border:0;background:none;color:var(--brand-primary);font-size:14.5px;text-decoration:underline}.ref-today,.ref-quick{padding:12px 9px;border:0;border-radius:19px;margin-bottom:10px}.ref-home-row{width:100%;display:grid;grid-template-columns:59px minmax(0,1fr) auto auto 16px;gap:6px;align-items:center;min-height:70px;padding:6px 5px;background:white;border:1px solid var(--brand-tint);border-radius:11px;margin-top:7px;text-align:right;color:var(--navy)}.ref-row-copy b{display:block;font-size:14.5px;font-weight:700}.ref-row-copy small{display:block;font-size:13px;color:var(--muted);line-height:1.6}.ref-home-row .ref-photo{width:59px;height:57px;border-radius:9px}.ref-home-row>svg{width:16px;color: var(--ico)}.ref-time{font-size:13.5px;color:var(--muted);display:flex;align-items:center;gap:5px;white-space:nowrap}.ref-time svg{width:18px;height:18px}.ref-status{padding:4px 10px;border-radius:13px;font-size:13.5px;white-space:nowrap;align-self:start}.step-0{color:var(--brand-primary);background:var(--brand-tint)}.step-1{color:var(--brand-primary);background:var(--brand-tint)}.step-2{color:var(--brand-primary);background:var(--brand-tint)}.step-3{color:var(--brand-primary);background:var(--brand-tint)}.step-4,.step-5{color:var(--brand-primary);background:var(--brand-tint)}.ref-quick .ref-stats{margin-top:10px;margin-bottom:0}.ref-quick .ref-stats>div{background:var(--brand-tint-2);border-radius:11px;padding:10px 7px;display:flex;align-items:center;gap:5px;min-width:0}.ref-quick .ref-stats>div:last-child{background:var(--brand-tint-2)}.ref-quick .ref-stats span{width:32px;height:32px;flex:none;border-radius:50%}.ref-quick .ref-stats b{font-size:24.5px}.ref-quick .ref-stats small{font-size:13px;white-space:normal;color:var(--muted);margin-top:5px}
.ref-photo{width:74px;height:74px;flex:none;border-radius:11px;background:var(--brand-tint);overflow:hidden;display:grid;place-items:center;color:var(--brand-primary)}.ref-photo img{width:100%;height:100%;object-fit:cover}.ref-photo>svg{width:28px;height:28px}.ref-path{padding:14px 12px;margin-bottom:10px;border:0;border-radius:20px}.ref-path-heading{display:flex;justify-content:space-between;gap:10px;align-items:center}.ref-path-heading h2{font-size:19px;white-space:nowrap}.ref-path-heading>span{font-size:13px;color:var(--muted)}.ref-steps{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin-top:13px}.ref-steps>div{text-align:center;position:relative;min-width:0}.ref-steps>div:not(:last-child):after{content:"";position:absolute;width:20%;height:2px;background:var(--brand-line);top:19px;left:-12%}.ref-steps span{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--brand-tint);margin:auto;color:var(--brand-dark)}.ref-steps svg{width:20px;height:20px}.ref-steps small{display:block;font-size:13px;color:var(--muted);margin-top:7px}.ref-steps .active span{background:var(--grad);color:white;box-shadow:0 0 0 2px var(--brand-line)}.ref-steps .active small{color:var(--brand-primary);font-weight:600}.ref-filters{font-size:13.5px;color:var(--muted);margin:0 0 10px}.ref-filters>summary{cursor:pointer;display:flex;gap:8px;align-items:center;min-height:28px}.ref-filters .os-count{font-size:13px;padding:3px 7px}.ref-filters .os-chips{margin-top:8px}.ref-task-card{border:0;box-shadow:none;border-radius:16px;padding:10px;display:grid;grid-template-columns:57px minmax(0,1fr) 118px;gap:8px;min-height:88px;margin-bottom:8px;align-items:center}.ref-task-card .ref-photo{width:57px;height:59px}.ref-task-copy{position:relative;min-width:0}.ref-task-copy h3{font-size:16px;line-height:1.45;font-weight:700;margin:0 0 5px}.ref-task-copy .ref-contact{font-size:13px;display:flex;align-items:center;gap:3px}.ref-contact svg{width:16px;height:16px;color: var(--ico)}.ref-task-copy p{font-size:13px;line-height:1.45;margin:4px 0 0;color:var(--muted)}.ref-task-copy .ref-status{display:block;position:static;width:fit-content;margin-top:5px;font-size:13px;padding:2px 7px}.ref-task-actions{display:flex;flex-direction:column;gap:10px;align-items:start;min-width:0}.ref-task-actions>div{display:flex;align-items:center;gap:5px;max-width:100%}.ref-task-actions .os-btn{font-size:13px;border-radius:14px;min-height:32px;padding:7px 8px;gap:4px;box-shadow:none}.ref-task-actions .os-btn svg{width:16px;height:16px}.ref-task-actions .os-icon-btn{width:25px;height:25px;min-width:25px;min-height:25px;border:0;background:var(--brand-tint-2);color:var(--brand-primary);border-radius:50%;padding:4px}.ref-task-actions .os-icon-btn svg{width:16px;height:16px}.os-app[data-view="tasks"] .os-task-list{gap:0}.os-app[data-view="tasks"] .os-view{padding:0}
.ref-repo-tools .os-seg{margin:12px 0;border:6px solid white;border-radius:17px;min-height:48px;background:var(--brand-tint-2)}.ref-repo-tools .os-seg button{font-size:16px;min-height:37px;border-radius:12px}.ref-repo-tools .os-seg button[aria-pressed="true"]{background:var(--grad);color:white}.ref-search-card{border:0;border-radius:16px}.ref-search-card .os-search{flex-direction:row}.ref-search-card .os-input{border:0;background:var(--brand-tint-2);font-size:16px;text-align:right;min-height:40px}.ref-search-card .os-search>svg{color: var(--ico);width:24px;height:24px}.ref-record-card{padding:11px;border:0;border-radius:18px;margin-bottom:10px;box-shadow:0 3px 16px #e8f3fb77}.ref-record-open{width:100%;border:0;background:none;text-align:right;display:grid;grid-template-columns:80px minmax(0,1fr) auto;gap:8px;color:var(--navy);padding:0}.ref-record-open .ref-photo{width:80px;height:84px}.ref-record-copy h3{font-size:19px;margin:3px 0 8px;font-weight:700}.ref-record-copy p{font-size:14.5px;margin:0 0 8px;color:var(--muted);display:flex;align-items:center;gap:3px}.ref-record-copy p svg{width:16px;height:16px;flex:none}.ref-record-copy b{font-size:19px;display:block;font-weight:700}.ref-record-open .ref-status{font-size:16px;border-radius:12px;padding:9px 11px}.ref-record-meta{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:14.5px;color:var(--muted);margin-top:3px}.ref-record-meta span{display:flex;align-items:center;gap:5px}.ref-record-meta svg{width:20px;height:20px}.ref-add-record{position:sticky;bottom:88px;border:0;box-shadow:none;border-radius:16px;min-height:49px;font-size:22.5px;margin-top:10px}.ref-add-record svg{width:24px;height:24px}.os-app[data-view="repo"] .os-record-list{gap:0}
.os-app[data-view="task"]{background:var(--surface);border-radius:24px;padding:18px 15px 24px}.ref-detail-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:23px}.ref-detail-header h1{font-size:24.5px;font-weight:700;margin:0}.ref-detail-header>span svg{width:20px}.ref-detail-header .os-icon-btn{border:0;background:var(--brand-tint-2)}.ref-detail-title{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:18px}.ref-detail-title h2{font-size:23.5px;margin:0 0 6px}.ref-detail-title p{font-size:18px;margin:0;color:var(--muted)}.ref-detail-title .ref-status{font-size:18px;border-radius:13px;padding:10px 14px}.ref-property{display:grid;grid-template-columns:94px 1fr;gap:10px;border:1px solid var(--brand-tint);border-radius:17px;padding:13px;margin-bottom:15px}.ref-property .ref-photo{width:94px;height:109px}.ref-property h3{margin:0;font-size:21.5px}.ref-property p{font-size:18px;color:var(--muted);margin:6px 0}.ref-property b{font-size:21.5px}.ref-property-facts{grid-column:1/-1;display:flex;justify-content:space-around;font-size:19px;color:var(--muted);margin:3px 0}.ref-property-facts span{display:flex;align-items:center;gap:5px}.ref-property-facts svg{width:20px;height:20px}.ref-detail-tabs{margin-bottom:12px;background:var(--brand-tint-2);border-radius:16px;min-height:42px;border:1px solid var(--brand-line)}.ref-detail-tabs button{font-size:16px;min-height:39px}.ref-detail-tabs button[aria-pressed="true"]{background:var(--grad);color:white;border-radius:15px}.ref-detail-steps{border:1px solid var(--brand-tint);border-radius:15px;overflow:hidden;padding:0 10px;margin-bottom:18px}.ref-detail-step{display:grid;grid-template-columns:25px 1fr 36px;align-items:center;gap:12px;min-height:71px;position:relative;border-bottom:1px solid var(--brand-tint)}.ref-detail-step:last-child{border:0}.ref-stage-dot{width:25px;height:25px;border-radius:50%;background:var(--faint);color:#fff;display:grid;place-items:center;z-index:1}.ref-stage-dot svg{width:16px;height:16px}.ref-detail-step:not(:last-child):after{content:"";position:absolute;width:2px;right:12px;top:48px;bottom:-23px;background:var(--brand-line)}.ref-detail-step.current .ref-stage-dot{background:var(--brand-primary)}.ref-detail-step b{display:block;font-size:20px}.ref-detail-step small{display:block;color:var(--faint);font-size:14.5px;margin-top:5px}.ref-stage-icon{width:34px;height:36px;border-radius:11px;color:var(--brand-primary);background:var(--brand-tint);display:grid;place-items:center}.ref-stage-icon svg{width:20px;height:20px}.ref-follow{font-size:22.5px;min-height:52px;border-radius:17px}.ref-detail-info{min-height:200px;padding:12px;background:var(--brand-tint-2);border-radius:16px;color:var(--muted)}
@media(min-width:390px){.ref-task-card{grid-template-columns:62px minmax(0,1fr) 131px;min-height:94px}.ref-task-card .ref-photo{width:62px;height:64px}.ref-task-copy h3{font-size:17px}.ref-task-actions .os-btn{font-size:13px}.ref-record-open{grid-template-columns:87px minmax(0,1fr) auto}.ref-record-open .ref-photo{width:87px;height:90px}.ref-record-copy h3{font-size:20px}}
@media(max-width:350px){.ref-home-row{grid-template-columns:47px minmax(0,1fr) auto 12px}.ref-home-row .ref-photo{width:47px;height:47px}.ref-home-row .ref-time{grid-column:2/4;font-size:13px}.ref-home-row>svg{grid-column:4;grid-row:1}.ref-task-card{grid-template-columns:46px minmax(0,1fr) 109px;gap:5px;padding:8px}.ref-task-card .ref-photo{width:46px;height:54px}.ref-task-copy h3{font-size:13.5px}.ref-task-actions .os-btn{padding-inline:6px;font-size:13px}.ref-record-open{grid-template-columns:66px minmax(0,1fr) auto;gap:5px}.ref-record-open .ref-photo{width:66px;height:75px}.ref-record-copy h3,.ref-record-copy b{font-size:17px}.ref-record-open .ref-status{padding:7px;font-size:13.5px}.ref-bottom button{font-size:13px}}
[hidden]{display:none!important}

.ref-request{color:var(--brand-primary);background:var(--brand-tint)}

.ref-wave{display:inline-block;width:31px;height:30px;vertical-align:middle;background-image:url("/os/reference-assets/office-source.png");background-size:432px 768px;background-position:-251px -100px}

/* Reference task badges share the time row, above the action. */
.ref-task-meta{width:100%;justify-content:space-between;gap:4px!important}
.ref-task-meta .ref-status{font-size:13px;padding:3px 8px;align-self:center}
.ref-task-meta .ref-time{font-size:13px;gap:3px}
.ref-task-meta .ref-time svg{width:16px;height:16px}
.os-app[data-view="tasks"] .step-0,.os-app[data-view="tasks"] .step-1{color:var(--brand-primary);background:var(--brand-tint)}
.ref-task-actions{gap:9px}
@media(max-width:350px){.ref-task-meta .ref-status{font-size:13px;padding:3px 5px}.ref-task-meta .ref-time{font-size:13px}.ref-task-meta .ref-time svg{width:16px;height:16px}}
/* One page scroll: only the bottom navigation stays fixed. */
.os-app[data-view="office"],.os-app[data-view="tasks"],.os-app[data-view="repo"]{height:auto;min-height:100dvh;padding-bottom:calc(100px + env(safe-area-inset-bottom))}
.os-app[data-view="office"]>.os-view,.os-app[data-view="tasks"]>.os-view,.os-app[data-view="repo"]>.os-view{overflow:visible}
.ref-bottom{border-radius:22px;bottom:max(8px,env(safe-area-inset-bottom));background:#fff}
.ref-add-record{position:static;bottom:auto}
/* Repository cards use the same compact scale as daily task cards. */
.ref-record-card{padding:10px;min-height:88px;border-radius:16px;margin-bottom:8px}
.ref-record-open{grid-template-columns:57px minmax(0,1fr) auto;gap:4px 8px}
.ref-record-open .ref-photo{width:57px;height:59px;grid-row:1/3}
.ref-record-copy h3{font-size:16px;line-height:1.45;margin:0 0 2px}
.ref-record-copy p{font-size:13px;line-height:1.45;margin:0 0 2px}
.ref-record-copy b{font-size:16px;line-height:1.45}
.ref-record-open .ref-status{font-size:13px;padding:3px 8px;border-radius:13px}
.ref-record-meta{grid-column:2/-1;margin-top:0;font-size:13px;gap:5px}
.ref-record-meta svg{width:16px;height:16px}
@media(min-width:390px){.ref-record-card{min-height:94px}.ref-record-open{grid-template-columns:62px minmax(0,1fr) auto}.ref-record-open .ref-photo{width:62px;height:64px}.ref-record-copy h3{font-size:17px}}
@media(max-width:350px){.ref-record-card{padding:8px}.ref-record-open{grid-template-columns:46px minmax(0,1fr) auto;gap:4px 5px}.ref-record-open .ref-photo{width:46px;height:54px}.ref-record-copy h3{font-size:13.5px}.ref-record-open .ref-status{font-size:13px;padding:3px 5px}}
.ref-stats small{white-space:normal}
.os-app[data-view="tasks"] .ref-filters:not([open]){display:none}

/* Compact operational office header; stats removed. */
.ref-shell-title .ref-hello{margin:2px 0 0;font-size:14.5px;font-weight:600;color:var(--muted)}
.ref-menu svg{width:24px;height:24px}
.ref-time.late{color:var(--warn)}
/* Task cards: one compact main button, single line, comfortable touch height. */
.ref-task-card{cursor:pointer}
.ref-task-actions .os-btn{white-space:nowrap;min-height:36px;padding:7px 10px;font-size:13px}
.ref-task-card{grid-template-columns:57px minmax(0,1fr) auto}
@media(min-width:390px){.ref-task-card{grid-template-columns:62px minmax(0,1fr) auto}}
@media(max-width:360px){.ref-task-actions .os-btn{font-size:13px;padding:7px 8px}.ref-task-actions .os-btn svg{display:none}}
@media(max-width:350px){.ref-task-card{grid-template-columns:46px minmax(0,1fr) auto}}
/* Task detail: only what the broker needs, one main action. */
.ref-detail-facts{display:grid;gap:0;padding:4px 12px}
.ref-detail-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--brand-tint);min-width:0}
.ref-detail-row:last-child{border-bottom:0}
.ref-detail-row small{color:var(--muted);font-size:14px;font-weight:600;flex:none}
.ref-detail-row b{color:var(--brand-dark);font-size:15px;text-align:left;min-width:0;overflow-wrap:anywhere}
.ref-detail-row.late b{color:var(--warn)}
.ref-detail-row.now{display:grid;gap:4px;justify-content:stretch}
.ref-detail-row.now b{text-align:start;color:var(--brand-primary)}
.ref-detail-facts .ref-detail-step,.ref-detail-facts .ref-detail-step.current{display:flex;grid-template-columns:none;background:none;border:0;border-bottom:1px solid var(--brand-tint);border-radius:0;padding:10px 0;margin:0;box-shadow:none;min-height:0}
.ref-detail-facts .ref-detail-step:after{display:none}.ref-detail-facts .ref-detail-step b{display:inline;font-size:15px}.ref-detail-facts .ref-detail-step small{display:inline;margin:0;font-size:14px;color:var(--muted)}
/* Home task rows: time on its own line under the title, so the property line never squeezes. */
.ref-home-row{grid-template-columns:59px minmax(0,1fr) auto 16px;row-gap:3px}
.ref-home-row .ref-photo{grid-row:1/3}.ref-home-row .ref-row-copy{grid-column:2;grid-row:1}.ref-home-row .ref-status{grid-column:3;grid-row:1}
.ref-home-row .ref-time{grid-column:2/4;grid-row:2;font-size:13px}.ref-home-row>svg{grid-column:4;grid-row:1/3}
@media(max-width:350px){.ref-home-row{grid-template-columns:47px minmax(0,1fr) auto 12px}.ref-home-row .ref-time{font-size:13px}}

/* Brand: white pages, white cards with a light border and a very soft shadow. */
html,body{background:var(--surface)}
.os-app .os-card{background:var(--surface);border:1px solid var(--frame);box-shadow:var(--shadow)}
.ref-bottom{background:var(--surface);border-color:var(--frame)}
.ref-bottom button{color:var(--faint)}.ref-bottom button .os-ico{color:var(--faint)}
.ref-bottom button[aria-current="page"]{color:var(--brand-primary);background:var(--brand-tint)}.ref-bottom button[aria-current="page"] .os-ico{color:var(--brand-primary)}
.ref-bottom button[aria-current="page"]:before{background:var(--brand-primary)}
.ref-request{color:var(--brand-primary);background:var(--surface);box-shadow:inset 0 0 0 1px var(--brand-soft)}

/* «مسار الصفقة» stages are buttons: same circles and labels, plus a count badge and a pressed state. */
.ref-steps>.ref-step{appearance:none;border:0;background:none;padding:0;font:inherit;color:inherit;text-align:center;position:relative;min-width:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
/* The short connectors between the stages are drawn on the strip itself, so no stage button has overflowing content. */
.ref-steps.ref-steps-live{background-image:repeating-linear-gradient(to right,transparent 0,transparent 8%,var(--brand-line) 8%,var(--brand-line) 12%,transparent 12%,transparent 20%);background-size:calc(100% * 5 / 6) 2px;background-position:center 19px;background-repeat:no-repeat}
.ref-steps>.ref-step>span{transition:background .15s ease,color .15s ease}
.ref-steps>.ref-step:focus-visible>span{outline:3px solid var(--brand-soft);outline-offset:2px}
.ref-steps>.ref-step:active>span{background:var(--tint-strong)}
.ref-step-count{position:absolute;top:-5px;inset-inline-end:max(0px,calc(50% - 25px));min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--brand-primary);color:#fff;font-size:13px;font-weight:700;font-style:normal;line-height:20px;text-align:center;box-shadow:0 0 0 2px var(--surface)}
.ref-steps .active .ref-step-count{background:var(--brand-dark)}
.ref-stage-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 2px 10px;min-width:0}
.ref-stage-head b{font-size:14.5px;color:var(--brand-dark);min-width:0}
.ref-stage-all{border:0;background:none;color:var(--brand-primary);font:inherit;font-size:13.5px;font-weight:600;text-decoration:underline;white-space:nowrap;min-height:32px;padding:0 2px}
.ref-closed-card .ref-status.is-won{color:var(--ok);background:var(--ok-tint)}
.ref-closed-card .ref-status.is-lost{color:var(--muted);background:var(--brand-tint)}
.ref-closed-card .ref-task-copy p{margin-top:2px}

/* «العروض والطلبات»: one list; narrowing lives in «خيارات البحث» (no section tabs). */
.ref-repo-tools .ref-filters{margin:10px 2px 10px;font-size:14.5px}
.ref-repo-tools .ref-filters>summary{min-height:36px;color:var(--brand-dark);font-weight:600;list-style:none}
.ref-repo-tools .ref-filters>summary::-webkit-details-marker{display:none}
.ref-repo-tools .ref-filters>summary>svg{width:18px;height:18px;color:var(--brand-primary)}
.ref-repo-tools .ref-filters>summary .os-count{margin-inline-start:auto}
.ref-filters-on{font-size:13px;font-weight:700;color:#fff;background:var(--brand-primary);border-radius:9px;padding:1px 7px}
.ref-filter-form{margin-top:8px;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.ref-filter-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ref-filter-row .os-chips{margin:0}
.ref-record-tags{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.ref-status.ref-state{color:var(--warn);background:var(--warn-tint)}
.os-record-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.os-record-actions .os-btn{min-width:0}
@media(min-width:430px){.os-record-actions{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* بطاقة الصفقة الموحدة: one card per deal — what is needed now, its other tasks inside, and «متابعة الصفقة». */
.ref-deal-card{align-items:start}
.ref-deal-card .ref-task-copy h3{margin-bottom:4px}
.ref-deal-card .ref-contact{align-items:flex-start;line-height:1.5;overflow-wrap:anywhere}
.ref-deal-card .ref-contact svg{margin-top:2px;flex:none}
.ref-deal-foot{grid-column:1/-1;display:grid;gap:6px;padding-top:8px;border-top:1px solid var(--brand-line)}
.ref-deal-now{margin:0;font-size:13.5px;line-height:1.6;color:var(--text);overflow-wrap:anywhere}
.ref-deal-now b{color:var(--brand-dark)}
.ref-urgency{display:inline-block;margin-inline-end:6px;padding:1px 8px;border-radius:999px;font-size:13px;font-weight:700;background:#fff4de;color:#7a4700}
.ref-urgency.is-late,.ref-urgency.is-urgent{background:#fdeaea;color:#9b2c2c}
.ref-deal-more{border-radius:12px;background:var(--brand-tint-2)}
.ref-deal-more>summary{display:flex;align-items:center;gap:6px;min-height:40px;padding:6px 10px;font-size:13.5px;font-weight:700;color:var(--brand-dark);cursor:pointer;list-style:none}
.ref-deal-more>summary::-webkit-details-marker{display:none}
.ref-deal-more>summary svg{width:16px;height:16px;color:var(--brand-primary);flex:none}
.ref-deal-more>summary svg:last-child{margin-inline-start:auto;transition:transform .15s ease}
.ref-deal-more[open]>summary svg:last-child{transform:rotate(180deg)}
.ref-deal-subs{list-style:none;margin:0;padding:0 8px 8px;display:grid;gap:6px}
.ref-deal-sub{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px;border-radius:10px;background:var(--surface)}
.ref-deal-sub.is-primary{box-shadow:inset 3px 0 0 var(--brand-primary)}
.ref-deal-sub-copy{display:grid;gap:1px;min-width:0;font-size:13px;line-height:1.5}
.ref-deal-sub-copy b{font-size:13.5px;color:var(--brand-dark)}
.ref-deal-sub-copy span{color:var(--text);overflow-wrap:anywhere}
.ref-deal-sub-copy small{color:var(--muted);font-size:13px}
.ref-deal-sub-copy small.is-late,.ref-deal-sub-copy small.is-urgent{color:#9b2c2c;font-weight:700}
.ref-deal-sub .os-btn{min-height:40px;padding:6px 10px;font-size:13px;border-radius:12px;gap:4px;white-space:nowrap}
.ref-deal-sub .os-btn svg{width:16px;height:16px}
.ref-deal-follow{appearance:none;border:0;background:none;display:flex;align-items:center;gap:6px;min-height:40px;padding:4px 2px;font:inherit;font-size:13.5px;font-weight:700;color:var(--brand-primary);cursor:pointer;justify-self:start}
.ref-deal-follow svg{width:16px;height:16px}
.ref-deal-card.is-returned{box-shadow:0 0 0 2px var(--brand-primary),0 8px 22px rgba(8,47,58,.12);transition:box-shadow .3s ease}
.ref-deal-parties{margin:0;display:flex;align-items:flex-start;gap:6px;font-size:13.5px;font-weight:600;line-height:1.6;color:var(--brand-dark);overflow-wrap:anywhere}
.ref-deal-parties svg{width:16px;height:16px;flex:none;margin-top:2px;color:var(--ico)}
.ref-deal-links{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;align-items:start}
.ref-deal-links>.ref-deal-more[open]{grid-column:1/-1}
.ref-deal-links>.ref-deal-follow{justify-self:end}
.ref-deal-links>.ref-deal-follow:only-child{grid-column:1/-1;justify-self:start}

/* Header shortcuts: search · notifications (with a dot when something is new) · menu. */
.ref-shell-header{gap:8px}
.ref-shell-header .ref-search{order:2;appearance:none;border:0;background:var(--brand-tint);color:var(--brand-primary);width:40px;min-width:40px;height:40px;border-radius:14px;display:grid;place-items:center;padding:0;cursor:pointer}
.ref-shell-header .ref-search svg{width:20px;height:20px}
.ref-shell-header .ref-bell{width:40px;min-width:40px;height:40px;border-radius:14px;background:var(--brand-tint);color:var(--brand-primary);display:grid;place-items:center}
.ref-bell-dot{display:none;position:absolute;top:7px;inset-inline-start:8px;width:9px;height:9px;border-radius:50%;background:#C24A4A;box-shadow:0 0 0 2px var(--brand-tint)}
.ref-bell.has-new .ref-bell-dot{display:block}
@media (max-width:359px){.ref-shell-header{gap:6px}.ref-shell-header .ref-search,.ref-shell-header .ref-bell,.ref-shell-header .ref-menu{width:36px;min-width:36px;height:36px;min-height:36px;border-radius:12px}.ref-brand{width:40px;height:40px}}

/* ---------- «خط النسخ» on the three main screens ----------
   The sizes above are the reference layout re-set for Naskh (nothing under 13px). The rules below fix what the larger,
   taller face needs: the reason line of a deal card on its own row, readable deal facts, and steady line boxes. */
.ref-task-card>.ref-lane-reason{grid-column:1/-1;margin:0;font-size:14.5px;line-height:1.5}
.ref-shell-title h1{font-weight:700;line-height:1.45}
.ref-shell-title p,.ref-shell-title .ref-hello{font-size:14.5px;line-height:1.5}
.ref-task-copy h3{font-size:16.5px;line-height:1.5;font-weight:600;margin:0 0 4px;overflow-wrap:anywhere}
.ref-task-copy p,.ref-task-copy .ref-contact{font-size:14px;line-height:1.55}
.ref-deal-parties,.ref-deal-now{font-size:14.5px;line-height:1.7;font-weight:400}
.ref-deal-parties{font-weight:500}
.ref-deal-more>summary,.ref-deal-follow{font-size:14.5px;font-weight:600;line-height:1.45;min-height:44px}
.ref-deal-sub-copy{font-size:14px;line-height:1.6}
.ref-deal-sub-copy b{font-size:14.5px;font-weight:600}
.ref-deal-sub-copy small{font-size:13px}
.ref-deal-sub .os-btn,.ref-task-actions .os-btn{font-size:14px;font-weight:600;line-height:1.45;min-height:40px;padding:6px 12px}
.ref-status,.ref-time,.ref-urgency{line-height:1.45}
.ref-task-meta .ref-status,.ref-task-meta .ref-time{font-size:13px}
.ref-steps small{font-size:13px;line-height:1.45;margin-top:6px}
.ref-path-heading>span{font-size:13px;line-height:1.5}
.ref-bottom button{font-size:13.5px;font-weight:600;line-height:1.45;gap:3px}
.ref-record-copy h3{font-size:17px;font-weight:600;line-height:1.5}
.ref-record-copy p{font-size:14px;line-height:1.55}
.ref-record-copy b{font-size:16.5px;font-weight:700;line-height:1.5;font-variant-numeric:tabular-nums}
.ref-record-meta{font-size:13.5px;line-height:1.5}
.ref-record-open .ref-status{font-size:13px}
.ref-repo-tools .ref-filters,.ref-filters{font-size:14.5px}
.ref-detail-row small{font-size:14.5px;font-weight:400;line-height:1.6}
.ref-detail-row b,.ref-detail-facts .ref-detail-step b{font-size:15.5px;font-weight:600;line-height:1.6}
.ref-detail-facts .ref-detail-step small{font-size:14.5px}
.ref-stage-head b{font-size:15px;font-weight:600}
.ref-stage-all,.ref-heading button{font-size:14.5px;min-height:40px}
.ref-add-record,.ref-follow{font-size:19px;font-weight:600;min-height:52px}
@media(max-width:360px){.ref-task-copy h3{font-size:15.5px}.ref-record-copy h3{font-size:16px}.ref-record-copy b{font-size:15.5px}.ref-bottom button{font-size:13px}.ref-task-actions .os-btn{font-size:13.5px;padding:6px 10px}}
/* 320px: the six stage names of «مسار الصفقة» each fit their column («مستندات» is the widest). */
@media(max-width:350px){.ref-path{padding-inline:6px}.ref-steps{gap:2px}}
