/*
 * قضيتي — نظام التصميم الموحد للبوابات الأربع (هوية واحدة فاتحة).
 * رمل ذهبي وورق كريمي، وحبر أزرق مخضر عميق للفعل والأختام، وأحمر هادئ للتنبيه.
 * خط «ريدكس برو» لكل النصوص، و«عارف رقعة» لاسم المنصة والعناصر الرسمية (الختم، العريضة) فقط.
 */
:root{
  color-scheme:light;
  --paper:#FAF7F0; --sheet:#FFFFFF; --sheet-2:#F4EFE4; --text:#121820; --muted:#5A6270; --rule:#E8E1D1;
  --cream:#FFF8EB; --gold:#D4AF63; --gold-2:#E9CF94; --gold-ink:#7E5F1C;
  --seal:#16323B; --seal-2:#0F252C; --seal-ink:#FFFFFF; --seal-soft:#E9F0F1; --brass:#8A6A22;
  --wax:#A3372D; --wax-soft:#F9E6E2; --good:#2F6B4F; --good-soft:#E3F0E8; --warn:#8A5A00; --warn-soft:#FBF0D9;
  --display:"Readex Pro","IBM Plex Sans Arabic",Tahoma,sans-serif; --body:"Readex Pro","IBM Plex Sans Arabic",Tahoma,"Segoe UI",sans-serif;
  --ruqaa:"Aref Ruqaa","Readex Pro",serif;
  --r:10px; --r-lg:16px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{background:var(--paper);color:var(--text);font:400 16px/1.75 var(--body);-webkit-font-smoothing:antialiased}
h1,h2,h3{margin:0;line-height:1.35;text-wrap:balance}
h1,h2{font-family:var(--display);font-weight:700}
h1{font-size:clamp(26px,3.2vw,32px)} h2{font-size:21px} h3{font-size:16.5px;font-weight:600}
p{margin:0}
a{color:var(--seal);font-weight:600;text-underline-offset:3px}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2.5px solid var(--seal);outline-offset:2px}
.num{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
.muted{color:var(--muted)} .small{font-size:14px} .hint{color:var(--muted);font-size:13.5px}
[hidden]{display:none!important}
.skip{position:absolute;inset-inline-start:8px;top:-60px;background:var(--seal);color:var(--seal-ink);padding:8px 14px;border-radius:var(--r);z-index:70;font-weight:600}
.skip:focus{top:8px}
#app{display:flex;flex-direction:column;min-height:100vh}

/* ── الشريط العلوي: كريمي بخط فاصل، واسم المنصة بالرقعة ── */
.top{background:var(--cream);color:var(--seal);display:flex;align-items:center;gap:10px 18px;padding:0 clamp(14px,3vw,28px);min-height:68px;position:sticky;top:0;z-index:20;border-bottom:1px solid var(--rule)}
.brand{display:flex;align-items:center;gap:10px;font:700 25px/1 var(--ruqaa);color:var(--seal);text-decoration:none;background:none;border:0;padding:4px;cursor:pointer;--brass:var(--gold)}
.brand svg{width:38px;height:38px;flex:none}
.userbox{display:flex;align-items:center;gap:8px;margin-inline-start:auto}
.ib{position:relative;display:inline-grid;place-items:center;width:44px;height:44px;border-radius:12px;border:1px solid transparent;background:none;color:var(--seal);cursor:pointer}
.ib:hover{background:rgba(212,175,99,.16)}
.ib svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.bell{position:relative}
.bell .count{position:absolute;top:5px;inset-inline-end:5px;min-width:18px;height:18px;border-radius:999px;background:var(--wax);color:#fff;font-size:11px;line-height:18px;padding:0 5px;text-align:center;font-weight:600}
.bell-panel{position:absolute;inset-inline-end:0;top:calc(100% + 8px);width:min(380px,calc(100vw - 24px));max-height:min(480px,calc(100vh - 100px));display:flex;flex-direction:column;overflow:hidden;background:var(--sheet);color:var(--text);border:1px solid var(--rule);border-radius:var(--r-lg);box-shadow:0 18px 40px -16px rgba(22,50,59,.35);z-index:30}
.bp-head{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 6px;padding-inline-start:16px;border-bottom:1px solid var(--rule);flex:none}
.bp-head b{font-size:15.5px;font-weight:600;color:var(--seal)}
.bp-head .bp-x{margin-inline-start:auto;width:40px;height:40px}
.bp-head .bp-x svg{width:18px;height:18px}
.bp-list{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0}
.bell-panel .n b{display:block;font-weight:600;font-size:14.5px;line-height:1.5}
.bell-panel .n .small{overflow-wrap:anywhere}
.bell-panel .n{padding:12px 14px;border-bottom:1px solid var(--rule)} .bell-panel .n:last-child{border:0}
.bell-panel .n.new{background:var(--cream)}
/* قائمة المستخدم: الصورة والاسم، وتحتها حسابي وخروج */
.um{position:relative}
.um>summary{list-style:none;display:flex;align-items:center;gap:10px;cursor:pointer;padding:4px 8px 4px 12px;border-radius:999px;min-height:48px}
.um>summary::-webkit-details-marker{display:none}
.um>summary:hover{background:rgba(212,175,99,.16)}
.um .who{display:flex;flex-direction:column;line-height:1.35;text-align:start}
.um .who span{font-weight:600;font-size:14.5px;color:var(--text)}
.um .who small{color:var(--muted);font-size:12.5px}
.um .chev{width:16px;height:16px;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.um-menu{position:absolute;inset-inline-end:0;top:calc(100% + 6px);min-width:220px;background:var(--sheet);border:1px solid var(--rule);border-radius:var(--r-lg);box-shadow:0 18px 40px -16px rgba(22,50,59,.35);padding:6px;z-index:30;display:flex;flex-direction:column}
.um-menu button{display:flex;align-items:center;gap:10px;border:0;background:none;text-align:start;padding:10px 12px;border-radius:var(--r);cursor:pointer;min-height:44px;color:var(--text)}
.um-menu button:hover{background:var(--sheet-2)}
.um-menu svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* ── الهيكل: فهرس الملف يميناً ومساحة العمل ── */
.shell{display:flex;flex:1;min-height:0}
.side{width:250px;flex:none;background:var(--sheet);border-inline-end:1px solid var(--rule);padding:18px 12px 24px;display:flex;flex-direction:column;gap:2px;position:sticky;top:68px;align-self:flex-start;height:calc(100vh - 68px);overflow-y:auto}
.side .grp{font-size:12.5px;color:var(--muted);padding:14px 14px 6px;font-weight:500}
.side .grp:first-child{padding-top:2px}
.side button{display:flex;align-items:center;gap:12px;border:0;background:none;text-align:start;padding:9px 14px;border-radius:var(--r);cursor:pointer;color:var(--text);min-height:44px;border-inline-start:3px solid transparent;font-size:15px}
.side button svg,.tabbar svg,.more-sheet svg{width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.side button:hover{background:var(--sheet-2)}
.side button[aria-current="page"]{color:var(--gold-ink);font-weight:600;background:var(--cream);border-inline-start-color:var(--gold)}
/* الشريط السفلي للجوال وقائمة «المزيد» */
.tabbar,.more-sheet{display:none}
.main{flex:1;min-width:0;padding:30px clamp(16px,3.4vw,44px) 72px;display:flex;flex-direction:column;gap:20px;max-width:1200px}
.head{display:flex;flex-direction:column;gap:4px;padding-bottom:6px}
.head p{color:var(--muted);max-width:70ch}
.head h1{font-size:clamp(24px,2.6vw,30px)}

/* ── الأوراق: بطاقات بحواف ورقية بلا ظلال ── */
.card{background:var(--sheet);border:1px solid var(--rule);border-radius:var(--r-lg);padding:20px 22px;display:flex;flex-direction:column;gap:12px}
.card>header{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;align-items:flex-start}
.card .card{background:var(--paper);padding:12px 14px}
.grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.stack{display:flex;flex-direction:column;gap:14px}
.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.meta{display:flex;flex-wrap:wrap;gap:4px 14px;color:var(--muted);font-size:14px}
.tiles{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.tile{background:var(--sheet);border:1px solid var(--rule);border-radius:var(--r-lg);padding:16px 20px}
.tile b{display:block;font-size:24px;font-weight:600}
.tile>span{color:var(--muted);font-size:14px}
.sev{border-inline-start:3px solid var(--rule)} .sev.bad{border-inline-start-color:var(--wax)} .sev.warn{border-inline-start-color:var(--brass)} .sev.good{border-inline-start-color:var(--good)} .sev.info{border-inline-start-color:var(--seal)}

/* الحالة: ختم صغير بإطار كالمطبوع، لا حبة ملونة */
.pill{display:inline-flex;align-items:center;border:1px solid transparent;border-radius:999px;padding:1px 11px;font-size:13px;font-weight:600;white-space:nowrap;line-height:1.7}
.pill.good{color:var(--good);background:var(--good-soft)} .pill.warn{color:var(--warn);background:var(--warn-soft)} .pill.bad{color:var(--wax);background:var(--wax-soft)} .pill.info{color:var(--seal);background:var(--seal-soft)} .pill.mute{color:var(--muted);background:var(--sheet-2);border-color:var(--rule)}
.chip{display:inline-block;border:1px solid var(--rule);border-radius:999px;padding:0 8px;font-size:13px;color:var(--muted);white-space:nowrap;background:var(--sheet)}
.chip.seal{border-color:var(--gold);color:var(--gold-ink);background:var(--cream);font-weight:600}

.btn{border:1.5px solid var(--rule);background:var(--sheet);color:var(--seal);border-radius:8px;padding:6px 18px;cursor:pointer;font-weight:500;white-space:nowrap;min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none}
.btn:hover{border-color:var(--seal)}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.primary{background:var(--seal);border-color:var(--seal);color:var(--seal-ink)}
.btn.primary:hover{background:var(--seal-2);border-color:var(--seal-2)}
.btn.gold{background:var(--gold);border-color:var(--gold);color:var(--seal-2);font-weight:600}
.btn.gold:hover{background:#C9A252;border-color:#C9A252}
.btn.danger{color:var(--wax);border-color:var(--wax)}
.btn.sm{padding:3px 12px;font-size:14px;min-height:34px}
.link{background:none;border:0;padding:0;color:var(--seal);cursor:pointer;font-weight:600;text-decoration:underline;text-underline-offset:3px}
.docs{margin:4px 0 0;padding-inline-start:20px;display:flex;flex-direction:column;gap:4px}
.search{max-width:440px}
.banner{border-radius:var(--r);padding:12px 16px;border:1px solid var(--rule);background:var(--sheet)}
.banner.info{background:var(--cream);border-color:var(--gold-2)} .banner.warn{background:var(--warn-soft);border-color:transparent}
.err{background:var(--wax-soft);color:var(--wax);border-radius:var(--r);padding:9px 14px;font-weight:500}
.empty{color:var(--muted);padding:22px;text-align:center;border:1px dashed var(--rule);border-radius:var(--r);background:var(--sheet)}
.tw{overflow-x:auto}
table{border-collapse:collapse;width:100%;font-size:14.5px}
th{text-align:start;color:var(--muted);font-weight:500;font-size:13.5px;white-space:nowrap}
th,td{padding:9px 10px;border-bottom:1px solid var(--rule);vertical-align:top}
tr:last-child td{border-bottom:0}
tfoot th{color:var(--text);font-size:15.5px;font-weight:600;border-top:1px solid var(--text);border-bottom:0}

/* ── النماذج ── */
form.fm{display:grid;gap:12px 14px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
section.card form.fm{border-top:1px solid var(--rule);padding-top:14px}
form.svc-row{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));align-items:end}
.f{display:flex;flex-direction:column;gap:4px;font-size:14px}
.f>span{color:var(--muted)}
.f.wide,.fm>.wide,fieldset>.wide{grid-column:1/-1}
input[type=text],input[type=search],input[type=number],input[type=datetime-local],input[type=date],input[type=tel],input[type=email],input[type=password],select,textarea{background:var(--sheet);border:1px solid var(--rule);border-radius:var(--r);padding:8px 11px;width:100%;min-width:0;min-height:42px}
input:hover,select:hover,textarea:hover{border-color:var(--muted)}
input:focus,select:focus,textarea:focus{border-color:var(--gold);outline:none;box-shadow:0 0 0 3px rgba(212,175,99,.25)}
input.ltr{direction:ltr;text-align:right}
textarea{min-height:84px;resize:vertical}
input[type=file]{font-size:13.5px;max-width:100%}
fieldset{border:1px solid var(--rule);border-radius:var(--r);padding:12px 14px;margin:0;display:grid;gap:10px 14px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
legend{font-weight:600;font-size:14px;padding:0 6px}
.check{display:flex;gap:8px;align-items:center}
.choice{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--rule);border-radius:var(--r);padding:12px 14px;background:var(--sheet)}
.choice.on{border-color:var(--gold);background:var(--cream)}

/* ── مسار الإجراءات: كل خطوة منجزة تُختم ── */
.track{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.track li{display:grid;grid-template-columns:48px 1fr;gap:12px;align-items:center;min-height:56px;position:relative}
.track li:not(:last-child)::after{content:"";position:absolute;inset-inline-start:23px;top:46px;bottom:-10px;width:2px;background:var(--rule)}
.track li.done:not(:last-child)::after{background:var(--seal);opacity:.35}
.track .mark{width:46px;height:46px;display:grid;place-items:center}
.track .mark svg{width:46px;height:46px}
.track li.done .mark svg{transform:rotate(-12deg)}
.track .n{width:30px;height:30px;border-radius:50%;border:1.5px solid var(--rule);display:grid;place-items:center;font-size:13.5px;color:var(--muted);background:var(--sheet)}
.track li.on .n{width:40px;height:40px;border:2px dashed var(--seal);color:var(--seal);font-weight:600;font-size:15px}
.track li.on .lbl{font-weight:600;color:var(--seal)}
.track li.todo .lbl{color:var(--muted)}
.track li.skipped .lbl{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--rule)}
.track .lbl small{display:block;color:var(--muted);font-size:13px;font-weight:400}

/* ── الاتصال بالطرف الآخر ── */
.party{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;background:var(--sheet);border:1px solid var(--rule);border-radius:var(--r);padding:12px 16px}
.party b{font-weight:600}

/* ── صفحات الدخول ── */
.auth{flex:1;display:flex;justify-content:center;padding:5vh 16px 48px}
.auth .card{width:min(540px,100%);padding:26px 24px;gap:16px}
.auth .card.wide{width:min(760px,100%)}

/* الصفحة الرئيسية للزائر: landing.css */

@media (max-width:860px){
  .side{display:none}
  .top{min-height:60px}
  .brand{font-size:22px} .brand svg{width:32px;height:32px}
  .um .who{display:none}
  .main{padding-bottom:110px}
  .tabbar{display:flex;position:fixed;inset-inline:0;bottom:0;z-index:25;background:var(--sheet);border-top:1px solid var(--rule);padding:6px 6px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -8px 24px -18px rgba(22,50,59,.4)}
  .tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;border:0;background:none;color:var(--muted);font-size:11.5px;line-height:1.3;padding:6px 2px;min-height:56px;border-radius:12px;cursor:pointer}
  .tabbar button[aria-current="page"]{color:var(--gold-ink);font-weight:600;background:var(--cream)}
  .more-sheet{display:flex;flex-direction:column;position:fixed;inset-inline:10px;bottom:calc(80px + env(safe-area-inset-bottom));z-index:26;background:var(--sheet);border:1px solid var(--rule);border-radius:var(--r-lg);box-shadow:0 18px 40px -12px rgba(22,50,59,.4);padding:6px}
  .more-sheet[hidden]{display:none!important}
  .more-sheet button{display:flex;align-items:center;gap:12px;border:0;background:none;text-align:start;padding:12px 14px;min-height:48px;border-radius:var(--r);color:var(--text);cursor:pointer}
  .more-sheet button[aria-current="page"]{color:var(--gold-ink);background:var(--cream);font-weight:600}
  .btn{min-height:44px}
  .btn.sm{min-height:40px}
  input[type=text],input[type=search],input[type=number],input[type=datetime-local],input[type=date],input[type=tel],input[type=email],input[type=password],select,textarea{min-height:44px}
}
@media (prefers-reduced-motion:no-preference){ .btn,.side button{transition:background-color .15s,border-color .15s,filter .15s} }

/* ───────── الصورة الشخصية: إطار نحاسي كإطار صورة البطاقة، والحروف الأولى بحبر الختم إلى أن تصل الصورة ───────── */
.ava{--s:40px;flex:none;width:var(--s);height:var(--s);border-radius:50%;display:inline-grid;place-items:center;overflow:hidden;
  background:var(--cream);color:var(--gold-ink);font-family:var(--display);font-weight:700;font-size:calc(var(--s)*.42);line-height:1;
  box-shadow:0 0 0 1.5px var(--gold),0 0 0 3.5px var(--sheet)}
.ava img{width:100%;height:100%;object-fit:cover;display:block}
.ava.sm{--s:32px} .ava.lg{--s:52px} .ava.xl{--s:88px}
.top .ava{box-shadow:0 0 0 1.5px var(--gold),0 0 0 3px var(--cream)}
.me-photo{display:flex;align-items:center;gap:16px;margin-block:4px 10px}
.row.nowrap{flex-wrap:nowrap;align-items:flex-start;gap:12px}
.chip.bad{border-color:var(--wax);color:var(--wax)}
.id-admin{display:grid;gap:10px}
.id-admin .row>div{min-width:0}
/* اختيار طريقة إثبات الهوية: زرّان متلاصقان، والمختار بحبر الختم */
.seg{display:flex;border:1px solid var(--rule);border-radius:var(--r);overflow:hidden;width:fit-content;max-width:100%}
.seg-opt{display:flex;align-items:center;gap:6px;padding:8px 16px;cursor:pointer;min-height:44px;background:var(--sheet)}
.seg-opt+.seg-opt{border-inline-start:1px solid var(--rule)}
.seg-opt input{accent-color:var(--seal)}
.seg-opt:has(input:checked){background:var(--seal-soft);color:var(--seal);font-weight:600}
.seg-opt:has(input:focus-visible){outline:2px solid var(--seal);outline-offset:-2px}

/* ═══════════ ملف القضية: غلاف الملف، ثم عمودان (الإجراءات يميناً، الأتعاب والمتابعة يساراً) ═══════════ */
.crumb{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--muted)}
.crumb .link{text-decoration:none;font-weight:500}
.cf-cover{position:relative;overflow:hidden;gap:18px;border-top:4px solid var(--gold)}
.cf-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.cf-tt{min-width:0}
.cf-ref{display:flex;flex-wrap:wrap;gap:4px 14px;color:var(--muted);font-size:13.5px;margin-bottom:4px}
.cf-cover h1{font-size:clamp(22px,2.4vw,28px);line-height:1.45}
.cf-cover .meta{margin-top:4px}
.cf-now{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px 18px;background:var(--cream);border:1px solid var(--gold-2);border-radius:var(--r);padding:12px 16px}
.cf-now-t small{display:block;color:var(--muted);font-size:12.5px}
.cf-now-t b{font-size:16.5px;color:var(--gold-ink)}
.cf-prog{height:8px;border-radius:999px;background:rgba(212,175,99,.25);overflow:hidden}
.cf-prog i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--gold),#C79A45)}
.cf-party{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px}
.cf-pn{display:flex;flex-direction:column;line-height:1.5;margin-inline-end:auto}
.cf-pn small{color:var(--muted);font-size:12.5px}
.cf-pn b{font-size:16.5px}
.cf-pa{display:flex;flex-wrap:wrap;gap:8px}
.cf-due{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;background:var(--seal);color:#fff;border-radius:var(--r);padding:12px 16px}
.cf-due small{display:block;opacity:.8;font-size:12.5px}
.cf-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr);gap:20px;align-items:start}
.cf-main,.cf-side{display:flex;flex-direction:column;gap:20px;min-width:0}
.cf-h{display:flex;align-items:center;gap:10px}
.cf-h h2{font-size:18px}
.cf-hi{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--cream);color:var(--gold-ink);flex:none}
.cf-hi .ic,.cf-file .ic,.cf-more summary .ic{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.cf-count{margin-inline-start:auto;min-width:26px;height:26px;border-radius:999px;background:var(--sheet-2);display:grid;place-items:center;font-size:13px;color:var(--muted);padding:0 8px}
.cf-act{border-top:1px solid var(--rule);padding-top:14px;display:flex;flex-direction:column;gap:12px}
section.card .cf-act form.fm{border:0;padding:0}
.cf-more{border:1px dashed var(--rule);border-radius:var(--r);background:var(--paper)}
.cf-more>summary{list-style:none;display:flex;align-items:center;gap:8px;padding:10px 14px;cursor:pointer;color:var(--seal);font-weight:500;min-height:44px}
.cf-more>summary::-webkit-details-marker{display:none}
.cf-more[open]{border-style:solid;background:var(--sheet)}
.cf-more[open]>summary{border-bottom:1px solid var(--rule)}
.cf-more>form.fm,section.card .cf-more>form.fm{padding:14px;border:0}
.cf-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.cf-list>li{padding:12px 0;border-bottom:1px solid var(--rule)}
.cf-list>li:last-child{border-bottom:0}
.cf-ev{display:flex;gap:14px;align-items:flex-start}
.cf-ev.past{opacity:.72}
.cf-date{width:54px;flex:none;border:1px solid var(--rule);border-radius:12px;text-align:center;padding:6px 0;line-height:1.2;background:var(--sheet)}
.cf-date b{display:block;font-size:20px;color:var(--seal)}
.cf-date small{font-size:12px;color:var(--muted)}
.cf-ev:not(.past) .cf-date{border-color:var(--gold);background:var(--cream)}
.cf-ev-b{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.cf-ev-t{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center}
.cf-ev-a{margin-top:6px}
.cf-ev form.fm{margin-top:8px}
.cf-doc{display:flex;align-items:center;gap:12px}
.cf-file{width:40px;height:40px;border-radius:10px;background:var(--sheet-2);display:grid;place-items:center;color:var(--seal);flex:none}
.cf-doc-b{flex:1;min-width:0}
.cf-doc-b b{font-weight:500;overflow-wrap:anywhere}
.cf-note{border-inline-start:3px solid var(--gold-2);padding-inline-start:12px!important;margin-bottom:6px}
.cf-note p{white-space:pre-line}
.cf-money{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:8px}
.cf-money>div{background:var(--paper);border:1px solid var(--rule);border-radius:var(--r);padding:10px 12px;min-width:0}
.cf-money small{display:block;color:var(--muted);font-size:12px}
.cf-money b{font-size:15px;font-weight:600;white-space:nowrap}
.cf-ms{display:grid;grid-template-columns:1fr auto;gap:6px 12px;align-items:center}
.cf-ms>*:not(.cf-ms-t):not(.cf-ms-v){grid-column:1/-1}
.cf-ms-t{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center}
.cf-ms-v{font-weight:600}
.cf-stars{display:flex;align-items:baseline;gap:6px}
.cf-stars .num{font-size:32px;font-weight:700;color:var(--gold-ink)}
.cf-log{list-style:none;margin:0;padding:0;border-inline-start:2px solid var(--rule)}
.cf-log li{position:relative;padding:4px 16px 12px;display:flex;flex-direction:column}
.cf-log li::before{content:"";position:absolute;inset-inline-start:-6px;top:10px;width:10px;height:10px;border-radius:50%;background:var(--sheet);border:2px solid var(--gold)}
.cf-log li:first-child::before{background:var(--gold)}
.cf-side .track,.cf-side form.fm{grid-template-columns:1fr}
@media (max-width:1100px){ .cf-grid{grid-template-columns:1fr} }
@media (max-width:620px){
  .cf-now{grid-template-columns:1fr}
  .cf-pa{width:100%}
  .cf-pa .btn{flex:1}
}

/* ═══════════ المحفظة: الرصيد في بطاقة بحبر عميق، وتحتها الحركات والحساب والتحويل ═══════════ */
.wl-hero{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:20px 32px;align-items:center;background:var(--seal);color:#fff;border-radius:var(--r-lg);padding:clamp(20px,3vw,32px)}
.wl-hero::after{content:"";position:absolute;inset-inline-end:-60px;top:-60px;width:220px;height:220px;border-radius:50%;border:28px solid rgba(212,175,99,.14);pointer-events:none}
.wl-main{display:flex;flex-direction:column;align-items:flex-start;gap:8px;position:relative}
.wl-main small{color:#C8D6DA;font-size:14px}
.wl-main>b{font-size:clamp(30px,3.6vw,40px);font-weight:700;line-height:1.2;color:var(--gold-2)}
.wl-hint{color:#C8D6DA;font-size:14px}
.wl-stats{position:relative;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.wl-stats>div{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);border-radius:var(--r);padding:12px 14px}
.wl-stats small{display:block;color:#C8D6DA;font-size:12.5px}
.wl-stats b{font-size:17px;font-weight:600}
.wl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:20px;align-items:start}
.wl-acc{display:flex;align-items:center;gap:12px;background:var(--paper);border:1px solid var(--rule);border-radius:var(--r);padding:12px 14px}
.wl-acc small{display:block;color:var(--muted)}
.wl-type{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.wl-type::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--muted)}
.wl-type.in::before{background:var(--good)} .wl-type.out::before{background:var(--gold)}
.wl-amt{font-weight:600;white-space:nowrap} .wl-amt.in{color:var(--good)}
@media (max-width:760px){ .wl-hero{grid-template-columns:1fr} }

/* ═══════════ طوابير المشرف: عدد العناصر بجانب العنوان، وشريط إجراء موحد أسفل كل بطاقة ═══════════ */
.h-count{display:inline-grid;place-items:center;min-width:30px;height:30px;padding:0 10px;margin-inline-start:8px;border-radius:999px;background:var(--gold);color:var(--seal-2);font-size:15px;font-weight:600;vertical-align:middle}
.stack>article.card>header h3{font-size:17.5px}
.stack>article.card>form.fm:last-child,.stack>article.card>.row:last-child:has(.btn.primary){margin:6px -22px -20px;padding:16px 22px;background:var(--paper);border-top:1px solid var(--rule);border-radius:0 0 var(--r-lg) var(--r-lg)}
section.card .stack>article.card>form.fm:last-child{border-top:1px solid var(--rule)}
/* جدول أسعار الخدمات */
form.svc-row{padding:14px 0;border-bottom:1px solid var(--rule)}
section.card form.svc-row{border-top:0;padding-top:14px}
form.svc-row:last-child{border-bottom:0}
.cf-dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin:0}
.cf-dl>div{background:var(--paper);border:1px solid var(--rule);border-radius:var(--r);padding:10px 14px;min-width:0}
.cf-dl dt{color:var(--muted);font-size:12.5px}
.cf-dl dd{margin:2px 0 0;font-weight:500;overflow-wrap:anywhere}
.f .hint{font-size:12.5px}

/* ═══════════ الأدمن: إدارة الخدمات ═══════════ */
.head.split{flex-direction:row;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
.sa-form .fm{display:grid;gap:12px 14px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.sa-row{display:flex;align-items:center;gap:12px}
.sa-b{flex:1;min-width:0}
.sa-form{display:flex;flex-direction:column;gap:20px}
.sa-form section.card .fm{border:0;padding:0}
.sa-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.sa-list:empty::before{content:"لا يوجد شيء بعد.";color:var(--muted);font-size:14px;padding:6px 0}
.sa-item{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;background:var(--paper);border:1px solid var(--rule);border-radius:var(--r);padding:10px 12px}
.sa-item>input[type=text]{flex:1 1 260px}
.sa-field{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));align-items:end}
.sa-field>.row{grid-column:1/-1;justify-content:flex-start}
.sa-save{position:sticky;bottom:0;background:var(--paper);padding:12px 0;border-top:1px solid var(--rule);z-index:5}
@media (max-width:860px){ .sa-save{bottom:76px} }
/* صلاحيات الموظف: مربعات اختيار في عمودين */
.st-perms{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px 16px}
.st-perms legend{grid-column:1/-1}

/* ═════════ تطبيق الهاتف ═════════ */
body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
/* شاشة الفتح: تظهر لحظة تحميل التطبيق والتحقق من الحساب */
.boot{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:var(--paper);color:var(--seal)}
.boot svg{width:72px;height:72px}
.boot b{font:700 34px/1 var(--ruqaa);color:var(--seal)}
.boot i{display:block;width:120px;height:2px;margin-top:10px;border-radius:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent) 0 0/60% 100% no-repeat,var(--rule);animation:boot-run 1.2s ease-in-out infinite}
@keyframes boot-run{from{background-position:-80% 0,0 0}to{background-position:180% 0,0 0}}
/* تعذر فتح الحساب بسبب الاتصال */
.boot-err{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:32px 24px calc(32px + env(safe-area-inset-bottom));text-align:center}
.boot-err .brand{cursor:default;margin-bottom:18px}
.boot-err .be-sig{width:84px;height:84px;border-radius:50%;display:grid;place-items:center;background:var(--cream);border:1px solid var(--rule);color:var(--gold-ink)}
.boot-err .be-sig svg{width:38px;height:38px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.boot-err h1{margin:6px 0 0;font-size:21px;font-weight:600;color:var(--seal)}
.boot-err p{margin:0;max-width:34ch;color:var(--muted)}
.boot-err .btn{margin-top:12px;min-height:50px;min-width:200px;font-size:16px;border-radius:12px}
/* دعوة تثبيت التطبيق (على الهاتف فقط) */
.inst{position:fixed;inset-inline:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:24;display:flex;align-items:center;gap:12px;padding:10px 10px 10px 8px;padding-inline-start:12px;background:var(--seal);color:var(--cream);border:1px solid rgba(212,175,99,.35);border-radius:18px;box-shadow:0 18px 36px -14px rgba(15,37,44,.6)}
.inst[hidden]{display:none}
body.has-tabbar .inst{bottom:calc(82px + env(safe-area-inset-bottom))}
.inst img{width:44px;height:44px;border-radius:11px;flex:none}
.inst-t{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.4}
.inst-t b{font-size:15px;font-weight:600}
.inst-t span{font-size:12.5px;color:rgba(255,248,235,.78)}
.inst-go{flex:none;min-height:44px;padding:0 18px;border:0;border-radius:11px;background:var(--gold);color:var(--seal-2);font:600 15px var(--body);cursor:pointer}
.inst-x{flex:none;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:11px;background:none;color:rgba(255,248,235,.8);cursor:pointer}
.inst-x svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.inst-go:focus-visible,.inst-x:focus-visible{outline:3px solid var(--gold-2);outline-offset:2px}
body:has(.inst:not([hidden])) .main,body:has(.inst:not([hidden])) .lp{padding-bottom:96px}
body.has-tabbar:has(.inst:not([hidden])) .main{padding-bottom:180px}
/* خطوات التثبيت على الآيفون */
.ios-inst{width:min(420px,calc(100vw - 24px));margin:auto auto calc(12px + env(safe-area-inset-bottom));border:1px solid var(--rule);border-radius:20px;padding:22px 20px 18px;background:var(--sheet);color:var(--text);box-shadow:0 24px 48px -16px rgba(15,37,44,.5)}
.ios-inst::backdrop{background:rgba(15,37,44,.55)}
.ios-inst h2{margin:0;font-size:19px;font-weight:600;color:var(--seal)}
.ios-inst p{margin:4px 0 14px;color:var(--muted);font-size:14.5px}
.ios-inst ol{list-style:none;margin:0 0 18px;padding:0;display:flex;flex-direction:column;gap:12px}
.ios-inst li{display:flex;align-items:center;gap:12px;font-size:15px}
.ios-inst .ii{width:42px;height:42px;flex:none;display:grid;place-items:center;border-radius:12px;background:var(--cream);border:1px solid var(--rule);color:var(--seal);--brass:var(--gold)}
.ios-inst .ii svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ios-inst .ii svg[viewBox="0 0 40 40"]{width:28px;height:28px;stroke:none}
.ios-inst .btn{width:100%;min-height:48px;border-radius:12px;font-size:16px}
/* انقطاع الإنترنت */
.netbar{position:fixed;inset-inline:0;top:0;z-index:50;padding:calc(8px + env(safe-area-inset-top)) 16px 8px;background:var(--wax);color:#fff;text-align:center;font-size:14px;font-weight:500}
.netbar[hidden]{display:none}
/* داخل التطبيق المثبّت */
html.standalone{-webkit-tap-highlight-color:transparent}
html.standalone body{overscroll-behavior-y:none}
html.standalone .tabbar,html.standalone .side,html.standalone .um>summary,html.standalone .more-sheet{-webkit-user-select:none;user-select:none}
@media (prefers-reduced-motion:reduce){.boot i{animation:none}}
/* إظهار كلمة المرور */
.f>.pw,.pw{position:relative;display:block;color:var(--muted)}
.pw>input{padding-inline-end:48px}
.pw-eye{position:absolute;inset-inline-end:3px;top:50%;transform:translateY(-50%);width:44px;height:40px;display:grid;place-items:center;border:0;background:none;border-radius:8px;color:var(--muted);cursor:pointer}
.pw-eye:hover,.pw-eye[aria-pressed="true"]{color:var(--seal)}
.pw-eye:focus-visible{outline:2px solid var(--gold);outline-offset:-2px}
.pw-eye svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* الإشعارات على الهاتف: لوحة بعرض الشاشة تحت الشريط العلوي، لا تخرج عن حدودها */
@media (max-width:760px){
  .bell{position:static}
  .bell-panel{position:fixed;inset-inline:10px;top:calc(66px + env(safe-area-inset-top));width:auto;max-height:calc(100vh - 66px - 96px - env(safe-area-inset-bottom));max-height:calc(100dvh - 66px - 96px - env(safe-area-inset-bottom))}
}
/* اختيار التاريخ: يوم / شهر / سنة (وساعة للمواعيد) */
.dpick{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr) minmax(0,1fr);gap:8px}
.dpick.has-time{grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr) minmax(0,1fr) minmax(0,1.1fr)}
.dpick select{padding-inline:10px 6px}
.dpick select option:disabled{color:#B8B2A4}
@media (max-width:520px){
  .dpick.has-time{grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr) minmax(0,1fr)}
  .dpick.has-time [data-dpp=t]{grid-column:1/-1}
}
/* البريد الإلكتروني: شاشة التأكيد وصفحة الأمان */
.vf-ic{margin-bottom:14px;width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:var(--cream);border:1px solid var(--rule);color:var(--gold-ink)}
.vf-ic svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.vf-change{border-top:1px solid var(--rule);padding-top:12px}
.vf-change>summary{cursor:pointer;color:var(--seal);font-weight:500;min-height:44px;display:flex;align-items:center}
.vf-change[open]>summary{margin-bottom:8px}
.row.spread{justify-content:space-between;align-items:center}
.sec-link{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.sec-link h2{margin:0 0 4px}
.lp-brand.vf-brand{cursor:default}
b[dir="ltr"],span[dir="ltr"]{unicode-bidi:isolate;overflow-wrap:anywhere;word-break:break-word}
/* زر Google */
.g-box{display:flex;flex-direction:column;align-items:stretch;gap:12px}
.g-box[hidden]{display:none}
.g-slot{display:flex;justify-content:center;min-height:44px}
.g-or{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13.5px}
.g-or::before,.g-or::after{content:"";flex:1;height:1px;background:var(--rule)}
/* خانة الملف: زر «اختر ملفاً» واسم الملف المختار، والخانة الأصلية شفافة فوقهما */
.fx{position:relative;display:flex;align-items:center;gap:10px;min-height:50px;padding:6px;border:1.5px dashed var(--rule);border-radius:var(--r);background:var(--sheet);cursor:pointer;transition:border-color .15s}
.fx:hover{border-color:var(--gold)}
.fx input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;margin:0}
.fx-btn{display:inline-flex;align-items:center;gap:6px;flex:none;padding:8px 14px;border-radius:8px;background:var(--seal-soft);color:var(--seal);font-weight:600;font-size:14px;line-height:1.3}
.fx-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.fx-name{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:14px;unicode-bidi:plaintext;text-align:start}
.fx.has{border-style:solid;border-color:var(--good);background:var(--good-soft)}
.fx.has .fx-btn{background:#fff}
.fx.has .fx-name{color:var(--text);font-weight:500}
.fx:has(input:focus-visible){outline:2.5px solid var(--seal);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.fx{transition:none}}
/* ملاحظة الخطأ بجانب خانته */
.bad-f input:not([type=checkbox]):not([type=radio]),.bad-f select,.bad-f textarea,.bad-f .fx{border-color:var(--wax)!important;box-shadow:0 0 0 3px rgba(163,55,45,.14)}
fieldset.bad-f,.bad-f.idset{border-color:var(--wax)}
.ferr{display:flex;gap:6px;align-items:flex-start;color:var(--wax);font-size:13.5px;font-weight:500;line-height:1.5}
.ferr::before{content:"!";flex:none;display:inline-grid;place-items:center;width:17px;height:17px;margin-top:1px;border-radius:50%;background:var(--wax);color:#fff;font-size:11.5px;font-weight:700}
fieldset>.ferr{grid-column:1/-1;margin-top:4px}
/* تسجيل المحامي بالخطوات: شريط الخطوات، وكل خطوة جزء من شبكة النموذج نفسها */
.wz-step{display:contents}
.wz ol{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;counter-reset:none}
.wz-s{display:flex;align-items:center;gap:8px;padding-top:10px;border-top:3px solid var(--rule);color:var(--muted);font-size:14px;font-weight:500;min-width:0}
.wz-n{flex:none;display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;border:1.5px solid var(--rule);font-size:13px;background:var(--sheet)}
.wz-t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wz-s.on{border-top-color:var(--gold);color:var(--seal);font-weight:700}
.wz-s.on .wz-n{border-color:var(--seal);background:var(--seal);color:#fff}
.wz-s.done{border-top-color:var(--seal);color:var(--seal)}
.wz-s.done .wz-n{border-color:var(--seal);color:var(--seal);background:var(--seal-soft)}
.wz-now{margin:10px 0 0;font-size:13.5px;color:var(--muted)}

/* «طلب لنفسي»: شريط وضع المحامي كمواطن */
.banner.pb{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin-bottom:16px}
.banner.pb>span{flex:1 1 260px;line-height:1.7}
