/* خط PingAR للعربي — الملفات في مجلد fonts */
@font-face{font-family:'PingAR';font-weight:400;font-display:swap;src:url('../fonts/PingAR-Regular.woff') format('woff')}
@font-face{font-family:'PingAR';font-weight:500;font-display:swap;src:url('../fonts/PingAR-Medium.woff') format('woff')}
@font-face{font-family:'PingAR';font-weight:600 700;font-display:swap;src:url('../fonts/PingAR-Bold.woff') format('woff')}

:root{
  --bg:#E9ECEB;--shell:#FFFFFF;--card:#FFFFFF;--soft:#F2F4F3;--line:#E3E7E6;--text:#111917;--mute:#5B6866;--bar:#8CC5BD;
  --accent:#0F766E;--atext:#0F766E;--canvas:#F1F4F3;--dot:#C9D1CF;--scrim:rgba(20,32,30,.45);
  --g-fg:#166534;--g-bg:#DCFCE7;--a-fg:#92400E;--a-bg:#FEF3C7;--r-fg:#3F3F46;--r-bg:#E4E4E7;--d-fg:#B91C1C;
  --shadow:0 10px 30px rgba(20,32,30,.10);
  --font:'Clash Display','PingAR','IBM Plex Sans Arabic',system-ui,-apple-system,'Segoe UI',sans-serif;
}
[data-theme=dark]{
  --bg:#0A0C0C;--shell:#111413;--card:#181C1B;--soft:#222827;--line:#2B3231;--text:#F1F5F4;--mute:#9DAAA7;
  --atext:#2DD4BF;--bar:#1F5C55;--canvas:#0E1110;--dot:#262C2B;--scrim:rgba(0,0,0,.6);
  --g-fg:#34D399;--g-bg:#0F2A20;--a-fg:#FBBF24;--a-bg:#2E2408;--r-fg:#D4D4D8;--r-bg:#2B3231;--d-fg:#FCA5A5;
  --shadow:0 10px 30px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;height:100%}
body{background:var(--bg);color:var(--text);font-family:var(--font);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}
h1,h2,h3,p{margin:0}
h1{font-size:28px;font-weight:600}h2{font-size:18px;font-weight:600}h3{font-size:16px;font-weight:600}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
img{display:block;max-width:100%}
:focus-visible{outline:2px solid var(--atext);outline-offset:2px}
[dir=rtl] .flip{transform:scaleX(-1)}
.ic{flex:none}
.mute{color:var(--mute)}.center{text-align:center}
.row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.row.wrap{flex-wrap:wrap}.row.start{justify-content:flex-start}.row.end{justify-content:flex-end}.row.top-a{align-items:flex-start}
.row.sm{font-size:13px}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border:0;border-radius:14px;background:transparent;color:var(--text);font-size:14px;white-space:nowrap}
.btn.primary{background:var(--accent);color:#fff;font-weight:600}
.btn.soft{background:var(--soft)}
.btn.dark{background:var(--text);color:var(--shell);font-weight:600}
.btn.danger{background:#B91C1C;color:#fff;font-weight:600}
.btn.warn{border:1.5px solid var(--a-fg);color:var(--a-fg);font-weight:600}
.btn.okd{background:var(--g-bg);color:var(--g-fg);font-weight:600}
.btn.ghost:hover,.btn.soft:hover{background:var(--line)}
.btn.sq{width:44px;padding:0}
.btn.sm{min-height:36px;width:36px;border-radius:10px}
.btn.xs{min-height:36px;padding:0 12px;border-radius:10px;font-size:13px}
.btn.big{min-height:52px;border-radius:16px;font-size:15px}
.danger-t{color:var(--d-fg)!important}.ok-t{color:var(--g-fg)!important}.warn-t{color:var(--a-fg)!important}
.chip{display:inline-block;font-size:12px;padding:3px 10px;border-radius:999px;white-space:nowrap}
.st-review{color:var(--r-fg);background:var(--r-bg)}.st-changes{color:var(--a-fg);background:var(--a-bg)}.st-approved{color:var(--g-fg);background:var(--g-bg)}
.tag{font-size:11px;padding:2px 8px;border-radius:999px;background:var(--line);color:var(--text)}.tag.ok{background:var(--g-bg);color:var(--g-fg)}
.seg{display:inline-flex;gap:2px;padding:4px;border-radius:14px;background:var(--soft)}
.seg button{min-height:36px;min-width:44px;padding:0 10px;border:0;border-radius:10px;background:transparent;color:var(--mute);font-size:13px;font-weight:600}
.seg button.on{background:var(--card);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.seg.wide{display:flex}.seg.wide button{flex:1}
.bar{display:block;height:6px;border-radius:999px;background:var(--soft);overflow:hidden}
.bar i{display:block;height:100%;border-radius:999px;background:var(--atext)}
.logo{display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;border-radius:12px;background:var(--accent);overflow:hidden}
.logo svg{width:82%;height:82%;overflow:visible}
.card{background:var(--shell);border:1px solid var(--line);border-radius:22px;padding:18px}

/* ---------- الشريط العلوي ---------- */
.shell{min-height:100%;padding:20px;display:flex;flex-direction:column;gap:16px;max-width:1440px;margin:0 auto}
.top{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;padding:12px 16px;border-radius:24px;background:var(--shell);border:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;font-size:17px;font-weight:600}
.tabs{display:flex;gap:4px;padding:4px;border-radius:16px;background:var(--soft)}
.tabs a{display:flex;align-items:center;gap:8px;min-height:40px;padding:0 16px;border-radius:12px;font-size:14px}
.tabs a .ic{display:none}
.tabs a.on{background:var(--accent);color:#fff;font-weight:600}
.badge{min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:var(--accent);color:#fff;font-size:12px;display:inline-flex;align-items:center;justify-content:center}
.tabs a.on .badge{background:#fff;color:var(--accent)}
.tools{flex:1 1 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px}
.search{flex:1 1 150px;max-width:260px;display:flex;align-items:center;gap:8px;height:44px;padding:0 14px;border-radius:14px;background:var(--soft);color:var(--mute)}
.search input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--text)}
.demo{font-size:12px;color:var(--a-fg);background:var(--a-bg);padding:6px 14px;border-radius:999px;align-self:center;text-align:center}

/* ---------- الرئيسية ---------- */
.page{flex:1;display:flex;flex-wrap:wrap;gap:28px;padding:28px;border-radius:28px;background:var(--shell);border:1px solid var(--line)}
.page main{flex:999 1 560px;min-width:0;display:flex;flex-direction:column;gap:22px}
.page aside{flex:1 1 280px;max-width:340px;min-width:0;display:flex;flex-direction:column;gap:16px}
.hero{display:flex;flex-wrap:wrap;gap:16px}
.ov{flex:2 1 400px;min-width:0;padding:24px;border-radius:24px;background:var(--accent);color:#fff;display:flex;flex-direction:column;gap:18px}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stats div{padding:16px 8px;border-radius:18px;background:rgba(255,255,255,.14);text-align:center;display:flex;flex-direction:column;gap:2px}
.stats span{font-size:13px}.stats b{font-size:34px;font-weight:600;line-height:1.2}
.quick{flex:1 1 220px;min-width:0;display:flex;flex-direction:column;gap:12px}
.quick button{flex:1;min-height:72px;display:flex;align-items:center;gap:14px;padding:0 18px;border:0;border-radius:22px;background:var(--soft);font-size:16px;font-weight:600;text-align:start}
.quick button:hover{background:var(--line)}
.qi{width:44px;height:44px;border-radius:14px;background:var(--card);color:var(--atext);display:flex;align-items:center;justify-content:center}
.qi.on{background:var(--accent);color:#fff}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chips button{min-height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:transparent;font-size:13px}
.chips button.on{background:var(--text);color:var(--shell);border-color:var(--text);font-weight:600}
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px}
.pcard{display:flex;flex-direction:column;gap:12px;padding:10px 10px 12px;border-radius:22px;background:var(--card);border:1px solid var(--line)}
.thumbs{display:grid;grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr;gap:4px;height:140px}
.thumbs span{border-radius:12px;background:var(--soft);overflow:hidden}
.thumbs span:first-child{grid-row:1/3}
.thumbs img{width:100%;height:100%;object-fit:cover}
.pcard>.row,.pcard>.prog{padding:0 6px}
.ptitle{flex:1;min-width:0}.ptitle p{font-size:13px;color:var(--mute)}
.ptitle h3,.ptitle p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.prog{display:flex;flex-direction:column;gap:6px}
.acts{display:flex;gap:2px}
.pnew{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border:1.5px dashed var(--mute);border-radius:22px;background:transparent;color:var(--mute)}
.pnew:hover{color:var(--text);border-color:var(--text)}
.empty{grid-column:1/-1;padding:48px 20px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:12px;border:1.5px dashed var(--mute);border-radius:22px}
.evlist{display:flex;flex-direction:column;gap:4px}
.ev,.vrow{display:flex;align-items:center;gap:12px;padding:8px;border-radius:14px}
.ev:hover{background:var(--soft)}
.evth,.vth{flex:none;width:48px;height:48px;border-radius:12px;background:var(--soft);overflow:hidden}
.evth img,.vth img{width:100%;height:100%;object-fit:cover}
.evtx{flex:1;min-width:0;display:flex;flex-direction:column;font-size:13px}
.evtx b{font-size:14px}.evtx small{color:var(--mute);font-size:12px}
.linkbox{margin-top:auto;padding:16px;border-radius:20px;background:var(--soft);display:flex;flex-direction:column;gap:10px;font-size:13px}
.linkbox b{font-size:14px}.linkbox span{color:var(--mute)}
select,.dlg input,.dlg textarea,.login input{width:100%;min-height:44px;padding:8px 12px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--text)}
.clist{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.clist .card{display:flex;flex-direction:column;gap:8px}
.crow{padding:6px 0;border-top:1px solid var(--line)}

/* ---------- النوافذ ---------- */
.dlg{width:min(440px,calc(100vw - 32px));padding:0;border:1px solid var(--line);border-radius:22px;background:var(--shell);color:var(--text);box-shadow:var(--shadow)}
.dlg::backdrop{background:var(--scrim)}
.dlg form{display:flex;flex-direction:column;gap:14px;padding:22px}
.dlg label,.login label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--mute)}
.dlg p{color:var(--mute)}.dlg p.warn{color:var(--a-fg);background:var(--a-bg);padding:10px 12px;border-radius:12px;font-size:13px}
.dlg-actions{display:flex;justify-content:flex-end;gap:8px}
.copyrow{display:flex;gap:8px}.copyrow input{flex:1;min-width:0}
#toasts{position:fixed;z-index:100;inset-inline:0;bottom:92px;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}
.toast{padding:10px 16px;border-radius:12px;background:var(--text);color:var(--shell);font-size:13px;box-shadow:var(--shadow)}
.login{min-height:100%;display:flex;align-items:center;justify-content:center;padding:20px}
.login .card{width:min(400px,100%);display:flex;flex-direction:column;gap:14px;padding:28px}

/* ---------- اللوحة ---------- */
.board{position:fixed;inset:0;overflow:hidden;background:var(--canvas)}
.canvas{position:absolute;inset:0;touch-action:none;cursor:default;background-image:radial-gradient(var(--dot) 1.2px,transparent 1.2px);background-size:24px 24px;user-select:none;-webkit-user-select:none}
.canvas.hand{cursor:grab}
.world{position:absolute;left:0;top:0;transform-origin:0 0}
.top.hbar{position:absolute;z-index:5;top:12px;inset-inline:12px;flex-wrap:nowrap;padding:8px 10px;border-radius:20px;box-shadow:var(--shadow)}
.top.hbar .l{display:flex;align-items:center;gap:10px;min-width:0}
.top.hbar .tools{flex-wrap:nowrap}
.pname{font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.progress{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--mute);white-space:nowrap}
.progress .bar{width:110px}
.it{position:absolute;border-radius:16px}
.it.image,.it.stack{cursor:pointer}
.it.image{background:var(--card);border:1px solid var(--line)}
.it.image .ph{border-radius:15px 15px 0 0;overflow:hidden;background:var(--soft)}
.it .ph img{width:100%;height:100%;object-fit:cover;pointer-events:none}
.it .meta{display:flex;align-items:center;gap:8px;padding:10px 12px;font-size:13px;color:var(--text)}
.it .nm{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.it .sp{flex:1}
.it .vb{font-size:11px;padding:1px 6px;border-radius:6px;border:1px solid var(--line);color:var(--mute)}
.it .cc{display:inline-flex;align-items:center;gap:3px;font-size:12px;color:var(--mute)}
.it.sel{outline:2px solid var(--atext);outline-offset:3px}
.it.dragging{opacity:.85;box-shadow:var(--shadow);z-index:3}
.it .rs{position:absolute;right:-7px;bottom:-7px;width:16px;height:16px;border-radius:5px;background:var(--atext);border:2px solid var(--card);cursor:nwse-resize;display:none}
.it.sel .rs{display:block}
.fan{position:relative;aspect-ratio:4/5;margin:6px 6px 0}
.fan span{position:absolute;inset:6% 4%;border-radius:16px;overflow:hidden;background:var(--soft);box-shadow:0 4px 14px rgba(0,0,0,.18)}
.fan span img{width:100%;height:100%;object-fit:cover;pointer-events:none}
.fan .f2{transform:rotate(-7deg)}.fan .f1{transform:rotate(5deg)}
.fan .cnt{position:absolute;top:10%;right:9%;display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:500;padding:4px 10px;border-radius:999px;background:#0A0C0C;color:#F1F5F4}
.it.note{background:#FDE68A;color:#1C1917;border-radius:8px;padding:14px 16px;min-height:120px;font-size:14px;line-height:1.7;box-shadow:0 4px 12px rgba(0,0,0,.12)}
.it.note .tx{white-space:pre-wrap;overflow-wrap:anywhere}
.it.title{font-size:24px;font-weight:600;white-space:nowrap;padding:4px 6px;border-radius:8px;color:var(--text)}
.drophint{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(380px,calc(100vw - 48px));padding:32px 24px;border:1.5px dashed var(--mute);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;color:var(--mute);background:transparent;z-index:2}
button.drophint:hover{border-color:var(--atext);background:var(--shell)}
.drophint .btn{margin-top:8px;pointer-events:none}
.drophint b{color:var(--text);font-weight:500}
.selbar{position:fixed;z-index:6;display:flex;gap:2px;padding:4px;border-radius:14px;background:var(--shell);border:1px solid var(--line);box-shadow:var(--shadow);max-width:calc(100vw - 16px);overflow-x:auto}
.selbar button{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 12px;border:0;border-radius:10px;background:transparent;font-size:13px;white-space:nowrap}
.selbar button:hover{background:var(--soft)}
.selbar button.on{background:var(--accent);color:#fff;font-weight:600}
.tools-bar{position:absolute;z-index:5;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:4px;padding:6px;border-radius:18px;background:var(--shell);border:1px solid var(--line);box-shadow:var(--shadow)}
.tools-bar button{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 14px;border:0;border-radius:12px;background:transparent;font-size:13px;white-space:nowrap}
.tools-bar button:hover{background:var(--soft)}
.tools-bar button.on{background:var(--accent);color:#fff;font-weight:600}
.zoom{position:absolute;z-index:5;bottom:16px;left:16px;display:flex;align-items:center;gap:2px;padding:6px;border-radius:18px;background:var(--shell);border:1px solid var(--line);box-shadow:var(--shadow);font-size:13px}
.zoom button{width:44px;height:44px;border:0;border-radius:12px;background:transparent;font-size:18px;display:inline-flex;align-items:center;justify-content:center}
.zoom button:hover{background:var(--soft)}
.zoom span{min-width:46px;text-align:center}
.zoom.inline{position:static;box-shadow:none;border:0;background:var(--soft)}

/* ---------- نافذة الكاروسيل ---------- */
.scrim{position:fixed;z-index:20;inset:0;background:var(--scrim);display:flex;padding:28px}
.sheet{flex:1;min-width:0;display:flex;flex-direction:column;gap:20px;padding:22px;border-radius:28px;background:var(--shell);border:1px solid var(--line);overflow:auto}
.sgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:18px;align-content:start;flex:1}
.scard{display:flex;flex-direction:column;gap:8px;padding:6px;border-radius:18px;border:2px solid transparent}
.scard.on{border-color:var(--atext);background:var(--soft)}
.scard .ph{position:relative;display:block;aspect-ratio:4/5;border-radius:14px;overflow:hidden;background:var(--soft)}
.scard .ph img{width:100%;height:100%;object-fit:contain}
.scard .no{position:absolute;top:8px;inset-inline-end:8px;min-width:26px;height:26px;padding:0 6px;border-radius:999px;background:#0A0C0C;color:#F1F5F4;font-size:13px;font-weight:500;display:flex;align-items:center;justify-content:center}
.mbar{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;padding:6px;border-radius:18px;background:var(--soft)}

/* ---------- عارض المراجعة ---------- */
.viewer{position:fixed;inset:0;display:flex;flex-direction:column;gap:12px;padding:12px;background:var(--bg)}
.viewer .top.hbar{position:static;box-shadow:none;flex:none}
.vbody{flex:1;min-height:0;display:flex;gap:12px}
.vmain{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}
.stage{position:relative;flex:1;min-height:0}
.scroller{position:absolute;inset:0;overflow:auto;display:flex}
.stagein{margin:auto;display:flex;gap:16px;padding:12px}
.imgwrap{position:relative;flex:none;margin:0;border-radius:12px;background:var(--soft);cursor:crosshair;box-shadow:var(--shadow)}
.imgwrap>img{width:100%;height:100%;object-fit:contain;border-radius:12px;pointer-events:none;user-select:none}
.imgwrap figcaption{position:absolute;top:10px;left:10px;font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;background:#0A0C0C;color:#F1F5F4}
.pin{position:absolute;transform:translate(0,-100%);width:32px;height:32px;border-radius:999px 999px 999px 4px;border:2px solid #fff;background:var(--accent);color:#fff;font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;padding:0;box-shadow:0 2px 8px rgba(0,0,0,.3)}
.pin.done{background:#6B7280}
.pin.hl{outline:3px solid var(--atext);outline-offset:2px}
.pin.draft{background:#B45309}
.nav{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;border-radius:999px;border:1px solid var(--line);background:var(--shell);display:flex;align-items:center;justify-content:center}
.nav:disabled{opacity:.35;cursor:default}
.nav.prev{inset-inline-start:8px}.nav.next{inset-inline-end:8px}
.strip{flex:none;display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap}
.thumbs2{display:flex;gap:8px;padding:8px;border-radius:16px;background:var(--shell);border:1px solid var(--line);overflow-x:auto;max-width:100%}
.thumbs2 a{flex:none;width:44px;height:55px;border-radius:8px;overflow:hidden;background:var(--soft)}
.thumbs2 a.on{outline:2px solid var(--atext);outline-offset:2px}
.thumbs2 img{width:100%;height:100%;object-fit:cover}
.panel{flex:none;width:380px;display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:24px;background:var(--shell);border:1px solid var(--line);min-height:0}
.plist{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:10px}
.cm,.composer{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:16px;background:var(--soft)}
.cm p{white-space:pre-wrap;overflow-wrap:anywhere}
.cm.done{opacity:.65}
.cm.hl{outline:2px solid var(--atext)}
.composer{outline:2px solid #B45309}
.composer textarea{width:100%;border:1px solid var(--line);border-radius:12px;background:var(--card);padding:10px;resize:vertical}
.pinno{flex:none;width:24px;height:24px;border-radius:999px;background:var(--accent);color:#fff;font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center}
.composer .pinno{background:#B45309}
.rp{display:flex;flex-direction:column;padding:8px 10px;border-radius:10px;background:var(--card);font-size:13px}
.hrow{display:flex;flex-wrap:wrap;gap:6px;padding:8px 10px;border-radius:12px;background:var(--soft);font-size:13px}
.gen{flex:none;display:flex;align-items:center;gap:8px;min-height:52px;padding:6px;padding-inline-start:14px;border-radius:16px;background:var(--soft)}
.gen input{flex:1;min-width:0;border:0;outline:0;background:transparent}
.decide{flex:none;display:flex;gap:8px}.decide .btn{flex:1;padding:0 10px}

/* ---------- الجوال ---------- */
@media (max-width:900px){
  .vbody{flex-direction:column;overflow:auto}
  .vmain{flex:none}.stage{flex:none;height:52vh}
  .panel{width:auto;flex:none;min-height:auto}
  .plist{overflow:visible}
  .decide{position:sticky;bottom:0;background:var(--shell);padding:8px 0}
}
@media (max-width:720px){
  h1{font-size:22px}
  .lbl{display:none}
  .shell{padding:12px 12px 96px}
  .page{padding:16px;border-radius:22px;gap:20px}
  .page aside{max-width:none}
  .tabs{position:fixed;z-index:30;bottom:12px;inset-inline:12px;justify-content:space-around;padding:6px;border-radius:22px;background:var(--shell);border:1px solid var(--line);box-shadow:var(--shadow)}
  .tabs a{flex:1;flex-direction:column;gap:2px;min-height:52px;padding:0 4px;font-size:11px;position:relative;justify-content:center;color:var(--mute)}
  .tabs a .ic{display:block}
  .tabs a.on{background:var(--soft);color:var(--atext)}
  .tabs .badge{position:absolute;top:2px;inset-inline-end:14%;min-width:18px;height:18px;font-size:11px}
  .tabs a.on .badge{background:var(--accent);color:#fff}
  .search{max-width:none;order:9;flex-basis:100%}
  .stats b{font-size:26px}.stats span{font-size:12px}.ov{padding:18px}
  .progress{display:none}
  .top.hbar .seg button{min-width:36px;padding:0 6px}
  .tools-bar{inset-inline:12px;left:12px;right:12px;transform:none;justify-content:space-between;bottom:12px}
  .tools-bar button{flex:1;flex-direction:column;gap:3px;padding:0 2px;min-height:56px;font-size:11px}
  .zoom{bottom:86px;left:12px;padding:4px}
  .zoom span{display:none}
  .scrim{padding:8px}.sheet{padding:14px;border-radius:22px}
  .sgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .viewer{padding:8px;gap:8px}
  .viewer .top.hbar{flex-wrap:wrap}
  .viewer .top.hbar .tools{flex-wrap:wrap}
  .nav{width:44px;height:44px}
  #toasts{bottom:150px}
}
@media (max-width:720px){.board .hbar .l .chip{display:none}}

/* ---------- فيديو + سحب الأدوات + تعديل النص ---------- */
.thumbs video,.evth video,.vth video,.it .ph video,.fan span video,.thumbs2 video{width:100%;height:100%;object-fit:cover;pointer-events:none;display:block}
.scard .ph video{width:100%;height:100%;object-fit:contain;pointer-events:none;display:block}
.it .ph,.scard .ph{position:relative}
.play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:999px;background:rgba(10,12,12,.75);color:#fff;display:flex;align-items:center;justify-content:center;pointer-events:none}
.imgwrap.vid{cursor:default;background:#000}
.imgwrap>video{width:100%;height:100%;border-radius:12px;display:block;background:#000}
.tbtn{border:0;display:inline-flex;align-items:center;gap:4px;min-height:24px;background:var(--accent);color:#fff;cursor:pointer}
.scard .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.dghost{position:fixed;z-index:50;pointer-events:none;transform:translate(-50%,-50%);opacity:.9;box-shadow:var(--shadow)}
.dghost.note{width:200px;min-height:100px;padding:14px;border-radius:8px;background:#FDE68A;color:#1C1917;font-size:14px}
.dghost.title{padding:6px 12px;border-radius:10px;background:var(--shell);color:var(--text);font-size:22px;font-weight:600;white-space:nowrap}
.tools-bar [data-v=note],.tools-bar [data-v=title]{cursor:grab}
.it [contenteditable],.it[contenteditable]{user-select:text;-webkit-user-select:text;cursor:text;outline:2px solid var(--atext);outline-offset:3px;border-radius:6px}
.it.title[contenteditable]{min-width:40px}

/* ---------- تعديلات مطلوبة ---------- */
.cntb{min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:var(--a-fg);color:var(--shell);font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center}
.rq{padding:14px;border-radius:18px;background:var(--a-bg);display:flex;flex-direction:column;gap:10px}
.rq small{color:var(--a-fg)}
.rq p{padding:10px 12px;border-radius:12px;background:var(--card);font-size:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;max-height:6.6em;overflow:hidden}
.rqok{display:flex;align-items:center;gap:10px;padding:14px;border-radius:18px;background:var(--g-bg);color:var(--g-fg);font-size:13px}
.evi{flex:none;width:36px;height:36px;border-radius:999px;background:var(--soft);color:var(--text);display:flex;align-items:center;justify-content:center}
.evi.k-approved{background:var(--g-bg);color:var(--g-fg)}
.evtx,.evtx span,.evtx b{overflow-wrap:anywhere}
.page aside h3{font-size:14px}

/* ---------- تحديد متعدد ---------- */
.marq{position:fixed;z-index:4;border:1.5px solid var(--atext);background:rgba(15,118,110,.12);border-radius:4px;pointer-events:none}
.selcount{display:inline-flex;align-items:center;padding:0 12px;font-size:13px;font-weight:600;white-space:nowrap}

/* ---------- اختصارات ---------- */
.tools-bar kbd{font:inherit;font-size:11px;min-width:18px;height:18px;padding:0 4px;border-radius:5px;border:1px solid var(--line);color:var(--mute);display:inline-flex;align-items:center;justify-content:center}
.tools-bar button.on kbd{border-color:rgba(255,255,255,.5);color:#fff}
@media (max-width:720px){.tools-bar kbd{display:none}}

/* ---------- تحسينات ---------- */
.badge.inv{background:#fff;color:var(--accent)}
.vsep{width:1px;height:24px;background:var(--line);margin:0 4px}
.report{max-width:960px;margin:0 auto;padding:24px;display:flex;flex-direction:column;gap:20px;background:#fff;color:#14201E;min-height:100%}
.report header{display:flex;flex-direction:column;gap:8px}
.report header p{color:#566462}
.rsum{display:flex;flex-wrap:wrap;gap:10px}
.rsum span{padding:8px 14px;border-radius:12px;background:#EEF2F1;font-size:13px}
.rsum b{font-size:16px;margin-inline-start:6px}
.report table{width:100%;border-collapse:collapse;font-size:13px}
.report th{text-align:start;font-weight:600;color:#566462;padding:10px 8px;border-bottom:1.5px solid #14201E}
.report td{padding:10px 8px;border-bottom:1px solid #DDE3E2;vertical-align:middle}
.rcell{display:flex;align-items:center;gap:10px}
.report .evth{background:#EEF2F1}
.report .st-review{color:#3F3F46;background:#E4E4E7}.report .st-changes{color:#92400E;background:#FEF3C7}.report .st-approved{color:#166534;background:#DCFCE7}
@media print{.noprint,#toasts{display:none!important}body{background:#fff}.report{padding:0;max-width:none}tr{break-inside:avoid}*{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
@media (max-width:720px){.report{padding:14px}.report th:nth-child(5),.report td:nth-child(5){display:none}}

.board{user-select:none;-webkit-user-select:none}
@media (max-width:720px){
  .board .top.hbar{flex-wrap:wrap;gap:8px}
  .board .top.hbar .l{flex:1 1 100%}
  .board .top.hbar .tools{flex-wrap:wrap;justify-content:flex-start;gap:6px}
  .board .top.hbar .btn{min-height:40px;padding:0 12px}
  .board .top.hbar .btn.sq{width:40px;padding:0}
}

/* ---------- حركة اللوجو: الختم يتختم على اللوحة ---------- */
.logo .st{transform-box:fill-box;transform-origin:50% 50%}.logo .bd{transform-box:fill-box;transform-origin:50% 50%}.logo .tk{opacity:0}
@keyframes lw-st{0%,100%{transform:none;opacity:1}18%{transform:scale(1.15) rotate(-10deg);opacity:1}26%,44%{transform:scale(1.7) rotate(-24deg);opacity:0}60%{transform:none;opacity:1}67%{transform:scale(.9)}76%{transform:none}}
@keyframes lw-bd{0%,58%,78%,100%{transform:none}67%{transform:scale(.965)}}
@keyframes lw-tk{0%,59%,84%,100%{opacity:0}64%,74%{opacity:1}}
.logo.anim .st,.brand:hover .logo .st,html.intro .logo .st{animation:lw-st 1.5s ease-in-out both}
.logo.anim .bd,.brand:hover .logo .bd,html.intro .logo .bd{animation:lw-bd 1.5s ease-in-out both}
.logo.anim .tk,.brand:hover .logo .tk,html.intro .logo .tk{animation:lw-tk 1.5s linear both}
.login2 .logo.anim .st{animation-iteration-count:infinite;animation-duration:2.4s}.login2 .logo.anim .bd{animation-iteration-count:infinite;animation-duration:2.4s}.login2 .logo.anim .tk{animation-iteration-count:infinite;animation-duration:2.4s}
@media (prefers-reduced-motion:reduce){.logo .st,.logo .bd,.logo .tk{animation:none!important}}

/* ================= الرئيسية الجديدة: بلاطات وإحصائيات ================= */
.shell{max-width:1480px;gap:18px;padding:20px 28px 24px}
.shell>.top{border-radius:999px;border:0;padding:12px 14px;flex-wrap:nowrap}
.shell>.top .brand{color:var(--atext);font-size:20px}
.shell>.top .tabs{margin:0 auto;border-radius:999px;padding:5px;background:var(--soft)}
.shell>.top .tabs a{border-radius:999px;min-height:42px;padding:0 20px}
.shell>.top .tabs a.on{background:var(--card);color:var(--text)}
.shell>.top .tabs a.on .badge{background:var(--accent);color:#fff}
.shell>.top .tools{flex:0 1 auto;flex-wrap:nowrap}
.shell>.top .search{border-radius:999px;width:200px;flex:0 1 200px;height:46px}
.shell>.top .seg,.shell>.top .btn.soft{border-radius:999px}
.btn.round{border-radius:999px}
.btn.white{background:var(--card);border-radius:999px;min-height:46px}
.hello .btn.primary{border-radius:999px;min-height:46px}
.page{border:0;border-radius:28px}
.hello{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;padding-inline-start:84px}
.hello h1{font-size:38px;font-weight:500}.hello h1 span{color:var(--mute)}
.dash{flex:1;display:flex;gap:24px;align-items:stretch;min-height:560px}
.rail{flex:none;width:60px;display:flex;flex-direction:column;justify-content:space-between;gap:14px}
.rail nav{padding:8px;border-radius:999px;background:var(--card);display:flex;flex-direction:column;gap:6px}
.rail a,.rail button{width:44px;height:44px;border:0;border-radius:999px;background:transparent;color:var(--text);display:flex;align-items:center;justify-content:center}
.rail a:hover,.rail button:hover{background:var(--soft)}
.rail a.on{background:var(--accent);color:#fff}
.dmain{flex:1;min-width:0;display:flex;flex-direction:column;gap:18px}
.drow{display:flex;gap:18px;min-height:318px}
.dcol{flex:none;width:290px;display:flex;flex-direction:column;gap:14px}
.dside{flex:none;width:300px;display:flex;flex-direction:column;gap:18px}
.tile{background:var(--card);border-radius:28px;padding:18px;display:flex;flex-direction:column;gap:14px;min-width:0}
.dcol .tile:first-child{flex:1}
.thead{display:flex;align-items:center;gap:12px}
.ttl{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.4}
.ttl b{font-size:16px;font-weight:600}.ttl small{font-size:12px;color:var(--mute)}
.tgo,.ticon{flex:none;width:40px;height:40px;border-radius:999px;background:var(--soft);color:var(--text);display:flex;align-items:center;justify-content:center}
.tgo:hover{background:var(--line)}
.ticon.amber{background:var(--a-bg);color:var(--a-fg);width:44px;height:44px}
.herocard{flex:1;padding:18px;border-radius:20px;background:var(--accent);color:#fff;display:flex;flex-direction:column;justify-content:space-between;gap:10px;font-size:13px}
.herocard b{font-size:52px;font-weight:600;line-height:1}
.tile.mini{flex:none;flex-direction:row;align-items:center;justify-content:space-between;padding:14px 20px}
.tile.mini .ttl b{font-size:26px}
.delta{font-size:12px;font-weight:600;padding:5px 10px;border-radius:999px;background:var(--g-bg);color:var(--g-fg)}
.delta.down{background:var(--a-bg);color:var(--a-fg)}
.tile.chart{flex:1}
.seg.round{border-radius:999px}.seg.round button{border-radius:999px;padding:0 18px}
.seg.round button.on{background:var(--accent);color:#fff;box-shadow:none}
.bars{flex:1;min-height:180px;display:flex;align-items:flex-end;gap:18px;padding:6px 8px 0;background-image:repeating-linear-gradient(to bottom,var(--line) 0 1px,transparent 1px 44px)}
.bcol{flex:1;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:10px}
.bcol small{font-size:12px;color:var(--mute)}
.bar2{display:block;width:100%;max-width:56px;border-radius:999px;background:repeating-linear-gradient(135deg,rgba(255,255,255,.16) 0 3px,transparent 3px 9px),var(--bar);transition:height .4s ease}
.bar2.on{background:repeating-linear-gradient(135deg,rgba(255,255,255,.16) 0 3px,transparent 3px 9px),var(--accent)}
.btip{font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;background:var(--accent);color:#fff;white-space:nowrap}
.tile.tbl{flex:1;gap:6px}
.trow{display:grid;grid-template-columns:2.2fr 1.3fr 1.2fr 1.2fr .8fr;align-items:center;gap:12px;padding:9px 14px;border-radius:14px;font-size:14px}
a.trow:hover{background:var(--soft)}
.trow.th{font-size:12px;color:var(--mute);padding-block:4px}
.tname{display:flex;align-items:center;gap:12px;min-width:0}
.tname i{flex:none;width:36px;height:36px;border-radius:999px;overflow:hidden}
.tname i img,.tname i video{width:100%;height:100%;object-fit:cover}
.tname>span{display:flex;flex-direction:column;line-height:1.3;min-width:0}
.tname b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tname small{font-size:12px;color:var(--atext)}
.dot{display:inline-flex;align-items:center;gap:7px;font-size:13px;background:transparent!important;color:var(--text)!important}
.dot::before{content:"";width:7px;height:7px;border-radius:999px;background:#A1A1AA}
.dot.st-approved::before{background:#22C55E}.dot.st-changes::before{background:#F59E0B}
.tile.rate{padding:18px 0 0;overflow:hidden;gap:6px;min-height:290px;color:var(--atext)}
.tile.rate .thead{padding:0 18px;color:var(--text)}
.ratenum{text-align:center;color:var(--text);display:flex;flex-direction:column}
.ratenum small{font-size:12px;color:var(--mute)}.ratenum b{font-size:40px;font-weight:600;line-height:1.2}.ratenum b span{color:var(--mute)}
.tile.rate>svg{flex:1;width:100%;min-height:90px;display:block}
.tile.chg{flex:1}
.bignum{font-size:46px;font-weight:600;line-height:1}
.waitbox{margin-top:auto;padding:14px;border-radius:20px;background:var(--soft);display:flex;flex-direction:column;gap:10px}
.waitbox .ttl b{font-size:14px}
.avs{display:flex;padding-inline-start:10px}
.avs i{width:40px;height:40px;border-radius:999px;color:#fff;border:3px solid var(--soft);margin-inline-start:-10px;font-style:normal;font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center}
.avs i.more{background:var(--accent);font-size:13px}
.tile .empty{border:0;padding:28px 12px}
/* ---------- شاشة الدخول ---------- */
.login2{min-height:100%;display:flex;gap:20px;padding:20px;box-sizing:border-box}
.lgform{flex:1 1 460px;display:flex;flex-direction:column;justify-content:center;gap:22px;padding:48px clamp(24px,7vw,96px);border-radius:32px;background:var(--card)}
.lgform .brand{color:var(--atext);font-size:22px}
.lgform .logo{width:52px;height:52px;border-radius:16px}
.lgtxt{display:flex;flex-direction:column;gap:8px}.lgtxt h1{font-size:34px;font-weight:500}
.lgform form{display:flex;flex-direction:column;gap:14px;max-width:420px}
.lgform label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--mute)}
.lgform input{min-height:52px;padding:0 18px;border-radius:999px;border:1px solid var(--line);background:var(--soft);color:var(--text)}
.lgform .demo{align-self:flex-start}
.lgart{flex:1.1 1 460px;position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;gap:24px;padding:48px;border-radius:32px;background:var(--accent);color:#fff}
.lgwords{display:flex;flex-direction:column;font-size:clamp(44px,5.6vw,84px);line-height:1.15;font-weight:600}
.lgwords b:nth-child(2){opacity:.75}.lgwords b:nth-child(3){opacity:.5}
.lgart ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;font-size:15px}
.lgart li{display:flex;align-items:center;gap:10px}
.lgbars{position:absolute;inset-inline-end:40px;bottom:0;height:46%;width:42%;display:flex;align-items:flex-end;gap:12px;opacity:.9}
.lgbars i{flex:1;border-radius:999px 999px 0 0;background:repeating-linear-gradient(135deg,rgba(255,255,255,.16) 0 3px,transparent 3px 9px),rgba(255,255,255,.18)}
.lgbars i.on{background:repeating-linear-gradient(135deg,rgba(15,118,110,.18) 0 3px,transparent 3px 9px),#fff}
@media (max-width:1180px){
  .dash{flex-wrap:wrap}.dside{flex:1 1 100%;width:auto;flex-direction:row}.dside .tile{flex:1}
  .shell>.top{flex-wrap:wrap;border-radius:28px}.shell>.top .tabs{margin:0}
}
@media (max-width:860px){
  .lgart{display:none}.login2{padding:12px}.lgform{padding:32px 24px;border-radius:24px}
  .drow{flex-direction:column}.dcol{width:auto;flex-direction:row}.dcol .tile{flex:1}.tile.mini{flex:1}
}
@media (max-width:720px){
  .shell{padding:12px 12px 96px}.shell>.top{border-radius:24px;padding:10px 12px}
  .shell>.top .tabs{border-radius:22px;background:var(--shell)}.shell>.top .tabs a{padding:0 2px;min-height:52px;border-radius:16px}
  .shell>.top .tabs a.on{background:var(--soft);color:var(--atext)}
  .shell>.top .tools{flex-wrap:wrap;flex:1 1 100%}.shell>.top .search{flex:1 1 100%;width:auto}
  .hello{padding-inline-start:0}.hello h1{font-size:26px}
  .rail{display:none}.dash{gap:14px}.dside{flex-direction:column}.dcol{flex-direction:column}
  .tile{border-radius:22px}
  .trow{grid-template-columns:1.6fr 1fr .7fr}.trow>:nth-child(2),.trow>:nth-child(3){display:none}
  .bars{gap:8px}
}

/* ---------- الشريط الجانبي في كل الصفحات + نص بجانب كل أيقونة ---------- */
.dash{flex:1;display:flex;gap:24px;align-items:stretch;min-height:0;flex-wrap:nowrap}
.dbody{flex:1;min-width:0;display:flex;flex-direction:column;gap:18px}
.dgrid{flex:1;display:flex;gap:24px;align-items:stretch;min-height:560px}
.hello{padding-inline-start:0}
.rail{width:178px;position:sticky;top:20px;align-self:flex-start;min-height:calc(100vh - 170px)}
.rail nav{border-radius:28px;padding:10px;gap:4px}
.rail a,.rail button{width:100%;height:46px;justify-content:flex-start;gap:12px;padding:0 14px;font:inherit;font-size:14px;white-space:nowrap}
.rail a.on{font-weight:600}
.dbody>.page{flex:1}
@media (max-width:1180px){.dgrid{flex-wrap:wrap}.dash{flex-wrap:nowrap}}
@media (max-width:980px){.rail{width:60px}.rail span{display:none}.rail a,.rail button{justify-content:center;padding:0;width:44px}.rail nav{border-radius:999px;padding:8px}}
@media (max-width:720px){.rail{display:none}.dgrid{gap:14px;min-height:0}}

.btn.pref{border-radius:999px;min-height:46px;padding:0 16px;font-weight:500}
@media (max-width:720px){.hbar .btn.pref span{display:none}.hbar .btn.pref{width:40px;padding:0}}
/* QA pass */
html[dir=rtl] .dash [dir=auto],html[dir=rtl] .report [dir=auto]{text-align:right}
html[dir=ltr] .dash [dir=auto],html[dir=ltr] .report [dir=auto]{text-align:left}
.card h3{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media (min-width:721px) and (max-width:1180px){
  .shell>.top .tools{flex:1 1 100%}.shell>.top .search{flex:1 1 auto;width:auto;max-width:none}
}
@media (max-width:720px){
  .shell>.top .tools{display:contents}
  .shell>.top .brand{margin-inline-end:auto}
  .shell>.top .search{order:9;flex:1 1 100%;max-width:none}
  .shell>.top .btn.pref{min-height:40px;padding:0 12px;font-size:13px}
  .thead{flex-wrap:wrap}
}
@media (max-width:720px){.tile.chart .ticon{display:none}.tile.chart .seg.round button{padding:0 12px;min-width:0}.tile.chart .ttl b{white-space:nowrap}}
@media (max-width:720px){.tile.chart .ttl{flex:1;min-width:0}.tile.chart .thead .seg{order:5;flex:1 1 100%;display:flex}.tile.chart .thead .seg button{flex:1}}
/* auth */
.lnk{align-self:center;border:0;background:none;color:var(--atext);font-size:13px;font-weight:500;padding:8px 10px;border-radius:999px;cursor:pointer}
.lnk:hover{text-decoration:underline}
.lgform button[disabled]{opacity:.6;pointer-events:none}
.lgswitch{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:2px 6px;font-size:13px}
.lgswitch .lnk:first-child{flex-basis:100%;text-align:center}

/* ================= موبايل — كونسبت A ================= */
.monly{display:none!important}
dialog.msheet{position:fixed;inset:auto 0 0 0;margin:0 auto;width:100%;max-width:520px;max-height:85vh;overflow:auto;border:0;border-radius:26px 26px 0 0;padding:10px 12px calc(16px + env(safe-area-inset-bottom));background:var(--shell);color:var(--text);box-shadow:0 -10px 40px rgba(0,0,0,.2)}
dialog.msheet[open]{animation:msUp .22s ease-out}
@keyframes msUp{from{transform:translateY(40px);opacity:.4}}
dialog.msheet::backdrop{background:var(--scrim)}
.msheet .grab,.panel .grab{display:block;width:44px;height:5px;border-radius:9px;background:var(--line);margin:2px auto 10px}
.msheet h3{font-size:15px;margin:2px 10px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mitem{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:0 14px;border:0;background:none;border-radius:16px;font:inherit;font-size:15px;color:inherit;text-decoration:none;text-align:start;cursor:pointer}
.mitem:hover,.mitem:active{background:var(--soft)}
.mitem .ic{color:var(--mute)}.mitem.danger-t,.mitem.danger-t .ic{color:var(--d-fg)}
.avbtn{width:40px;height:40px;flex:none;border-radius:999px;border:0;color:#fff;font:inherit;font-weight:700;font-size:16px;align-items:center;justify-content:center;cursor:pointer}
.ptl{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.msub{font-size:12px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

@media (max-width:720px){
  .monly.btn,.monly.avbtn{display:inline-flex!important}
  .msub.monly,.grab.monly{display:block!important}
  .dsk{display:none!important}

  /* ---------- الهيدر: لوجو + بحث + الحساب ---------- */
  .shell{padding:4px 14px calc(100px + env(safe-area-inset-bottom))}
  .shell>.top{flex-wrap:wrap;gap:8px;padding:8px 2px;background:none;border:0;box-shadow:none;border-radius:0}
  .shell>.top .brand{margin-inline-end:auto}
  .shell>.top .btn.pref,.shell>.top .search{display:none}
  .shell>.top.sopen .search{display:flex;order:9;flex:1 1 100%;max-width:none;background:var(--shell)}
  .shell>.top .btn.monly{width:40px;height:40px;min-height:40px;padding:0;border-radius:999px;background:var(--shell)}
  /* التابات تحت زي التطبيقات */
  .shell>.top .tabs{position:fixed;z-index:30;bottom:0;inset-inline:0;margin:0;padding:8px 8px calc(8px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;border:0;border-top:1px solid var(--line);background:var(--shell);box-shadow:0 -6px 24px rgba(20,32,30,.08)}
  .shell>.top .tabs a{min-height:50px;border-radius:16px}
  .demo{margin:0 0 6px}

  /* ---------- الرئيسية ---------- */
  .dbody:has(.dgrid){display:grid;grid-template-columns:1fr 1fr;gap:12px}
  .dbody:has(.dgrid) .dgrid,.dbody:has(.dgrid) .dmain,.dbody:has(.dgrid) .drow,.dbody:has(.dgrid) .dcol,.dbody:has(.dgrid) .dside{display:contents}
  .dbody:has(.dgrid) .hello{grid-column:1/-1;display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin:4px 0}
  .hello h1{font-size:14px;font-weight:400;color:var(--mute);line-height:1.3}
  .hello h1 span{display:block;font-size:26px;font-weight:700;color:var(--text)}
  .hello .btn{min-height:42px;padding:0 16px;border-radius:999px}
  .dbody:has(.dgrid) .tile{margin:0;border-radius:24px;min-width:0}
  .tile:has(.herocard){order:1;padding:0;background:none;border:0;box-shadow:none}
  .tile:has(.herocard) .thead{display:none}
  .tile:has(.herocard) .herocard{height:100%;margin:0;border-radius:24px;padding:16px;min-height:132px}
  .tile:has(.herocard) .herocard b{font-size:44px}
  .tile.rate{order:2;padding:16px}.tile.rate>svg{display:none}.tile.rate .thead .tgo{display:none}
  .tile.rate .ratenum b{font-size:40px}
  .tile.chg{order:3;grid-column:1/-1}
  .tile.tbl{order:4;grid-column:1/-1}
  .tile.chart{order:5;grid-column:1/-1}
  .tile.mini{order:6;grid-column:1/-1}
  .trow{grid-template-columns:1fr auto;gap:10px}.trow>:nth-child(2),.trow>:nth-child(3),.trow>:nth-child(5){display:none}.trow.th{display:none}

  /* ---------- اللوحة ---------- */
  .board .top.hbar{flex-wrap:nowrap;gap:8px;padding:8px}
  .board .top.hbar .l{flex:1 1 auto;min-width:0;flex-wrap:nowrap}
  .board .top.hbar .l>.chip,.board .top.hbar .progress{display:none}
  .board .top.hbar .pname{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px}
  .board .top.hbar .tools{flex-wrap:nowrap;gap:6px}
  .board .top.hbar .tools>*:not(.monly):not([data-act=share]):not([data-act=review]){display:none}
  .board .top.hbar .btn.monly,.board .top.hbar [data-act=share]{width:40px;min-height:40px;padding:0;border-radius:999px}
  .board .tools-bar{display:none}
  .fab{position:absolute;z-index:6;bottom:calc(20px + env(safe-area-inset-bottom));width:58px;height:58px;border-radius:999px;border:0;background:var(--accent);color:#fff;align-items:center;justify-content:center;box-shadow:0 10px 24px rgba(15,118,110,.35);cursor:pointer}
  .fab.monly{display:flex!important}
  html[dir=rtl] .fab{left:16px}html[dir=ltr] .fab{right:16px}
  .board .zoom{bottom:calc(26px + env(safe-area-inset-bottom));border-radius:999px;padding:4px}
  html[dir=rtl] .board .zoom{left:auto;right:16px}html[dir=ltr] .board .zoom{left:16px;right:auto}
  .board .zoom [data-act=undo],.board .zoom [data-act=redo],.board .zoom .vsep{display:none}
  .board .zoom span{display:inline}
  #toasts{bottom:calc(96px + env(safe-area-inset-bottom))}

  /* رابط العميل: شبكة تصاميم */
  .cgrid.monly{display:flex!important}
  .cgrid{position:absolute;z-index:4;top:64px;bottom:0;inset-inline:0;flex-direction:column;gap:14px;overflow:auto;padding:12px 16px calc(96px + env(safe-area-inset-bottom));background:var(--bg)}
  .board:has(.cgrid) .canvas,.board:has(.cgrid) .zoom,.board:has(.cgrid) .selbar,.board:has(.cgrid) .drophint,.board:has(.cgrid) .hbar [data-act=review]{display:none!important}
  .chead h2{font-size:22px;margin:0}.chead .mute{margin:4px 0 12px}
  .chead .bar{height:8px;border-radius:9px;background:var(--line);overflow:hidden}.chead .bar i{display:block;height:100%;border-radius:9px;background:var(--accent)}
  .cg{display:grid;grid-template-columns:1fr 1fr;gap:12px}
  .cgi{display:flex;flex-direction:column;gap:6px;color:inherit;text-decoration:none;min-width:0}
  .cgi .ph{position:relative;display:block;aspect-ratio:3/4;border-radius:16px;overflow:hidden;background:var(--soft)}
  .cgi .ph img,.cgi .ph video{width:100%;height:100%;object-fit:cover;display:block}
  .cgi .ph .play{position:absolute;inset:auto auto 8px 8px}
  .cgi .nm{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
  .cgi .chip{font-size:11px;padding:2px 8px}
  .cgo{position:fixed;z-index:6;bottom:calc(20px + env(safe-area-inset-bottom));inset-inline:16px}

  /* ---------- العارض ---------- */
  .viewer{padding:0;gap:0;background:#121a19}
  .viewer .top.hbar{margin:8px;flex-wrap:nowrap;gap:8px;padding:8px}
  .viewer .top.hbar .l{flex:1 1 auto;min-width:0;flex-wrap:nowrap}
  .viewer .top.hbar .l>.chip{display:none}
  .viewer .top.hbar .pname{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px}
  .viewer .top.hbar .tools{flex-wrap:nowrap}
  .viewer .top.hbar .tools>*:not(.monly){display:none}
  .viewer .top.hbar .btn.monly{width:40px;min-height:40px;padding:0;border-radius:999px}
  .viewer .vbody{gap:0}
  .viewer .vmain{padding:0 8px}
  .viewer .stage{height:56vh;border-radius:18px}
  .viewer .strip{padding:8px 0 12px;color:#cbd5d3}
  .viewer .strip .hint{color:#9fb0ad}
  .viewer .panel{border-radius:26px 26px 0 0;padding:8px 16px calc(14px + env(safe-area-inset-bottom));box-shadow:0 -10px 30px rgba(0,0,0,.25);border:0}
  .viewer .decide{flex-direction:row-reverse}
  html[dir=ltr] .viewer .decide{flex-direction:row}
  .viewer .decide .btn{min-height:50px;border-radius:999px}
}
@media (max-width:720px){
  .cgrid{top:72px}
  .tile.rate .thead small{display:none}
  .tile:has(.herocard) .herocard,.tile.rate{min-height:150px}
}
