:root{--primary:#0F766E;--primary-dark:#0B5A54;--primary-light:#14B8A6;--soft:#E3F3F0;--bg:#F2F8F7;--card:#FFFFFF;--text:#12302E;--muted:#5F7D7A;--line:#D5E7E4;--danger:#C0392B;--radius:18px}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{font-family:'Tajawal',system-ui,sans-serif;background:var(--bg);color:var(--text);direction:rtl;line-height:1.7;min-height:100vh}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer;border:0}
[hidden]{display:none!important}
.wrap{max-width:1100px;margin:0 auto;padding:0 16px}
.hero{background:linear-gradient(135deg,var(--primary-dark),var(--primary) 55%,var(--primary-light));color:#fff;padding:28px 0 64px;border-radius:0 0 32px 32px}
.hero .row{display:flex;align-items:center;gap:14px}
.hero .row>div:nth-child(2){flex:1;min-width:0}
.logo{width:56px;height:56px;border-radius:16px;background:rgba(255,255,255,.18);display:grid;place-items:center;font-size:28px;flex:none}
.hero h1{font-size:26px;font-weight:800;line-height:1.3}
.hero p{opacity:.9;font-size:15px}
.adminlink{margin-right:auto;flex:none;background:rgba(255,255,255,.2);color:#fff;border:1px solid rgba(255,255,255,.35);border-radius:12px;padding:9px 14px;font-weight:700;font-size:14px;white-space:nowrap}
.adminlink:hover{background:rgba(255,255,255,.32)}
.search{margin-top:-30px;position:relative}
.search input{width:100%;padding:16px 50px 16px 18px;border-radius:16px;border:1px solid var(--line);font:inherit;font-size:16px;background:#fff;box-shadow:0 8px 24px rgba(15,118,110,.12);outline:none}
.search input:focus{border-color:var(--primary)}
.search span{position:absolute;right:18px;top:50%;transform:translateY(-50%);font-size:18px;opacity:.6}
.syncbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;font-size:13px;color:var(--muted)}
.syncbar .st{flex:1;min-width:180px}
.pill{background:#fff;border:1px solid var(--line);color:var(--primary-dark);border-radius:999px;padding:6px 12px;font-weight:700;font-size:13px}
.hint2{font-size:12.5px;color:var(--muted);margin-top:6px}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 0}
.chip{padding:9px 16px;border-radius:999px;background:#fff;border:1px solid var(--line);color:var(--primary-dark);font-weight:700;font-size:14.5px}
.chip.on{background:var(--primary);color:#fff;border-color:var(--primary)}
.count{margin:18px 0 12px;color:var(--muted);font-size:14px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(310px,100%),1fr));gap:16px;padding-bottom:40px}
.card{min-width:0;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;display:flex;flex-direction:column;gap:12px;box-shadow:0 2px 10px rgba(15,118,110,.06)}
.card .top{display:flex;gap:12px;align-items:flex-start}
.badge{width:42px;height:42px;border-radius:12px;background:var(--soft);color:var(--primary);display:grid;place-items:center;font-weight:800;flex:none}
.card h3{font-size:18px;font-weight:800;line-height:1.45}
.meta{font-size:12.5px;color:var(--muted)}
.by{font-size:13px;color:var(--primary-dark);font-weight:700;margin-top:2px}
.thumbs{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.thumbs img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px;cursor:pointer;background:var(--soft)}
.axes{list-style:none;display:flex;flex-direction:column;gap:6px;counter-reset:ax}
.axes li{counter-increment:ax;display:flex;gap:9px;font-size:14.5px;align-items:flex-start}
.axes li::before{content:counter(ax);flex:none;width:22px;height:22px;border-radius:50%;background:var(--primary);color:#fff;font-size:12px;font-weight:700;display:grid;place-items:center;margin-top:3px}
.axes li.hide{display:none}
.more{background:none;color:var(--primary);font-weight:700;font-size:13.5px;text-align:right;padding:0}
.actions{display:flex;gap:8px;margin-top:auto;padding-top:4px}
.btn{flex:1;padding:11px 14px;border-radius:12px;font-size:15px;font-weight:700;text-align:center;display:inline-block}
.btn.primary{background:var(--primary);color:#fff}
.btn.primary:hover{background:var(--primary-dark)}
.btn.ghost{background:var(--soft);color:var(--primary-dark)}
.btn.ghost:hover{background:#d3ece8}
.btn.danger{background:#FDECEA;color:var(--danger)}
.btn:disabled{opacity:.55;cursor:wait}
.empty,.loading{text-align:center;color:var(--muted);padding:50px 10px}
.toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:#12302E;color:#fff;padding:11px 18px;border-radius:14px;font-size:14.5px;z-index:90;max-width:90vw;text-align:center}
.lb{position:fixed;inset:0;background:rgba(5,25,23,.88);display:none;align-items:center;justify-content:center;z-index:60;padding:12px}
.lb.on{display:flex}
.lb img{max-width:100%;max-height:92vh;border-radius:12px}
.x{background:var(--soft);color:var(--primary-dark);width:38px;height:38px;border-radius:12px;font-size:18px}
.lbx{position:absolute;top:14px;left:14px}
.lbn{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:46px;border-radius:50%;background:rgba(255,255,255,.9);color:var(--primary-dark);font-size:26px}
.lbp{left:14px}.lbq{right:14px}
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:0 2px 10px rgba(15,118,110,.06)}
.login{max-width:420px;margin:-30px auto 40px;position:relative}
label{display:block;font-weight:700;font-size:14.5px;margin:14px 0 6px}
input[type=text],input[type=password],input[type=date],textarea,select{width:100%;padding:13px 14px;border:1px solid var(--line);border-radius:12px;font:inherit;font-size:15.5px;background:#fff;outline:none}
textarea{min-height:150px;resize:vertical}
input:focus,textarea:focus,select:focus{border-color:var(--primary)}
.hint{font-size:12.5px;color:var(--muted);margin-top:4px}
.file{border:2px dashed var(--line);border-radius:14px;padding:16px;text-align:center;background:var(--bg);cursor:pointer;color:var(--muted)}
.file.has{border-color:var(--primary);color:var(--primary-dark);background:var(--soft);font-weight:700}
.msg{margin-top:12px;padding:11px 14px;border-radius:12px;font-size:14.5px;display:none}
.msg.err{display:block;background:#FDECEA;color:var(--danger)}
.msg.ok{display:block;background:var(--soft);color:var(--primary-dark)}
.bar2{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:-30px 0 18px;position:relative}
.bar2 .who{flex:1;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 16px;font-weight:700;box-shadow:0 8px 24px rgba(15,118,110,.12)}
.two{display:grid;grid-template-columns:1fr 1.2fr;gap:18px;align-items:start;padding-bottom:40px}
.row-item{display:flex;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.row-item:last-child{border:0}
.row-item .t{flex:1;font-weight:700}
.row-item .t small{display:block;color:var(--muted);font-weight:400}
.sm{padding:8px 12px;border-radius:10px;font-size:13.5px;font-weight:700}
.tag{display:inline-block;background:var(--soft);color:var(--primary-dark);border-radius:8px;padding:0 8px;font-size:12px;font-weight:700;margin-left:6px}
details.sec{margin-top:14px;background:var(--bg);border:1px dashed var(--line);border-radius:12px;padding:10px 14px}
details.sec summary{cursor:pointer;font-weight:700;color:var(--primary-dark);font-size:14.5px}
.pvs{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:10px}
.pv{position:relative}
.pv img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px;background:var(--soft)}
.pv button{position:absolute;top:-6px;left:-6px;width:22px;height:22px;border-radius:50%;background:var(--danger);color:#fff;font-size:12px}
.spin{display:inline-block;width:14px;height:14px;border:2px solid #fff;border-top-color:transparent;border-radius:50%;animation:s .7s linear infinite;vertical-align:-2px;margin-left:6px}
@keyframes s{to{transform:rotate(360deg)}}
.tabbar{display:none;position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);z-index:40;padding:6px 8px calc(6px + env(safe-area-inset-bottom));gap:6px;box-shadow:0 -4px 16px rgba(15,118,110,.1)}
.tabbar button{flex:1;padding:11px 8px;border-radius:12px;background:transparent;color:var(--muted);font-weight:700;font-size:14px}
.tabbar button.on{background:var(--soft);color:var(--primary-dark)}
@media (min-width:1100px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}#formPanel{position:sticky;top:12px}}
@media (max-width:820px){.two{grid-template-columns:1fr}.hero h1{font-size:21px}}
@media (max-width:720px){
  .wrap{padding:0 12px}
  .hero{padding:16px 0 50px;border-radius:0 0 24px 24px}
  .logo{width:44px;height:44px;font-size:22px;border-radius:13px}
  .hero h1{font-size:19px}.hero p{font-size:13px}
  .adminlink{padding:8px 10px;font-size:12.5px}
  .search{position:sticky;top:8px;z-index:20;margin-top:-26px}
  .chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .chips::-webkit-scrollbar{display:none}
  .chip{flex:none}
  .grid{grid-template-columns:1fr;gap:12px}
  .card{padding:14px}.card h3{font-size:17px}
  .btn{min-height:48px;padding:13px 12px;font-size:16px}
  .sm{min-height:40px;padding:9px 12px}
  input[type=text],input[type=password],input[type=date],textarea,select{font-size:16px}
  .lbn{width:40px;height:40px;font-size:22px}
  .panel{padding:16px;border-radius:16px}
  .two{padding-bottom:96px}
  .bar2{margin-top:-26px}.bar2 .who{flex-basis:100%}.bar2 .btn{flex:1}
  .row-item{flex-wrap:wrap}.row-item .t{flex-basis:100%}
  .tabbar{display:flex}
  body.tab-add #listPanel{display:none}
  body.tab-list #formPanel{display:none}
}
.logo.img{background:none;width:64px;height:64px}
.logo.img img{width:100%;height:100%;object-fit:contain;display:block}
@media (max-width:720px){.logo.img{width:50px;height:50px}}

.card{position:relative}
.card:has(.edit-btn) .top{padding-left:92px}
.edit-btn{position:absolute;top:12px;left:12px;width:36px;height:36px;border-radius:50%;background:#e3f4f1;color:#0f6f63;display:flex;align-items:center;justify-content:center;text-decoration:none;font-size:1rem;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.edit-btn.del-btn{left:56px;background:#fde8e8}
.add-fab{position:fixed;bottom:20px;left:20px;z-index:50;background:#0f6f63;color:#fff;padding:12px 18px;border-radius:999px;font-weight:700;text-decoration:none;box-shadow:0 4px 14px rgba(0,0,0,.28);display:flex;gap:6px;align-items:center;font-family:inherit}

#chips{display:none}
body.has-side{padding-left:56px}
#side{position:fixed;top:0;bottom:0;left:0;width:56px;background:#fff;border-right:1px solid #e2ece9;box-shadow:2px 0 8px rgba(0,0,0,.06);z-index:70;overflow:hidden;transition:width .2s;display:flex;flex-direction:column;padding:8px 6px;gap:4px;direction:ltr}
.si{display:flex;align-items:center;gap:12px;height:44px;border:0;background:none;border-radius:12px;padding:0 9px;cursor:pointer;font:inherit;color:#1f2d2b;white-space:nowrap;text-align:left;width:100%}
.si .ic{font-size:1.35rem;width:26px;text-align:center;flex:none}
.si .nm{opacity:0;transition:opacity .15s;font-size:.95rem;font-weight:600}
.si.on{background:#e3f4f1}
.si.menu .ic{color:#555}
body.side-open #side{width:240px}
body.side-open .si .nm{opacity:1}
#sideBd{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.25);z-index:65;display:none}
body.side-open #sideBd{display:block}
.add-fab{left:72px!important}.gfab{left:72px!important}

.syncbar{margin-top:14px;margin-bottom:6px}
.syncbar+.search{margin-top:0}

body.has-side{padding-left:64px}
#side{width:64px;padding:10px 8px;gap:6px;background:#fff;border-right:0;box-shadow:0 0 0 1px rgba(15,111,99,.08),4px 0 24px rgba(15,60,55,.08);transition:width .25s cubic-bezier(.4,0,.2,1),box-shadow .25s}
body.side-open #side{width:264px;box-shadow:0 0 0 1px rgba(15,111,99,.08),8px 0 40px rgba(15,60,55,.2)}
#side .sh{display:flex;align-items:center;gap:10px;height:48px;margin-bottom:6px;flex:none}
#side .hb{width:46px;height:46px;flex:none;border:0;border-radius:14px;background:#f1f7f6;color:#0f6f63;font-size:1.25rem;cursor:pointer;display:flex;align-items:center;justify-content:center;font-family:inherit}
#side .hb:hover{background:#e3f1ee}
#side .brand{display:flex;align-items:center;gap:8px;opacity:0;transition:opacity .2s;white-space:nowrap;font-weight:800;color:#0f4f47;font-size:1rem}
#side .brand img{width:30px;height:30px}
body.side-open #side .brand{opacity:1}
#side .sl{font-size:.72rem;letter-spacing:.06em;color:#8aa39f;padding:10px 12px 4px;height:30px;white-space:nowrap;opacity:0;transition:opacity .2s;font-weight:700;flex:none}
body.side-open #side .sl{opacity:1}
#side .si{position:relative;height:50px;padding:0 5px;gap:12px;border-radius:14px;transition:background .15s;flex:none}
#side .si:hover{background:#f1f7f6}
#side .si .ic{width:38px;height:38px;border-radius:12px;background:#eef5f3;display:flex;align-items:center;justify-content:center;font-size:1.3rem}
#side .si.on{background:#e3f4f1}
#side .si.on .ic{background:#fff;box-shadow:0 1px 4px rgba(15,111,99,.25)}
#side .si.on::before{content:'';position:absolute;left:-8px;top:12px;bottom:12px;width:4px;border-radius:0 4px 4px 0;background:#0f6f63}
#side .si .nm{font-size:.96rem;font-weight:700;color:#173f3a}
#sideBd{background:rgba(10,40,36,.35)}
.add-fab{left:80px!important}.gfab{left:80px!important}
@media (max-width:720px){
body.has-side{padding-left:56px}
#side{width:56px;padding:10px 5px}
body.side-open #side{width:min(264px,82vw)}
#side .hb{width:44px}
#side .si{padding:0 3px}
.add-fab{left:68px!important}.gfab{left:68px!important}
}

.hero .syncbar{margin:12px 0 30px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hero .syncbar .st{color:#e8fffb;font-size:.85rem;font-weight:600}
.hero .syncbar .pill{background:rgba(255,255,255,.18);color:#fff;border:1px solid rgba(255,255,255,.4);box-shadow:none}

/* v12: compact hero + mobile drawer + queue badge */
.hero{padding:14px 0 16px!important}
.hero .syncbar{margin:10px 0 0!important}
.search{margin-top:16px!important}
.hmb{display:none}
.qbadge{background:#f59e0b;color:#fff;min-width:26px;height:26px;border-radius:13px;display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;padding:0 8px;box-shadow:0 2px 8px rgba(0,0,0,.3);border:2px solid #fff}
.qbadge[hidden]{display:none}
@media (max-width:720px){
.hero{padding:12px 0 14px!important;border-radius:0 0 20px 20px}
.search{margin-top:12px!important}
body.has-side{padding-left:0!important}
#side{width:min(264px,82vw)!important;transform:translateX(-105%);transition:transform .25s cubic-bezier(.4,0,.2,1)!important;box-shadow:none!important}
body.side-open #side{transform:none;box-shadow:6px 0 28px rgba(15,60,55,.25)!important}
.add-fab{left:16px!important}.gfab{left:16px!important}
.hmb{display:flex;align-items:center;justify-content:center;width:42px;height:42px;flex:none;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.18);color:#fff;border-radius:12px;font-size:22px;cursor:pointer;font-family:inherit;padding:0}
.hero .adminlink{font-size:12px!important;padding:8px 10px!important}
}

/* v13: queue popup */
.qbadge{cursor:pointer;font-family:inherit;line-height:1}
.qm-bd{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.4);z-index:200;display:flex;align-items:center;justify-content:center;padding:12px}
.qm{background:#fff;width:min(460px,100%);max-height:80vh;overflow:auto;border-radius:20px;padding:16px;direction:rtl;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.qm-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:1.05rem}
.qm-x{border:0;background:#eef3f2;border-radius:10px;width:34px;height:34px;font-size:16px;cursor:pointer}
.qm-r{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:1px solid #e5eeec}
.qm-t{flex:1;min-width:0;font-weight:600;line-height:1.5}
.qm-t small{display:block;color:#b00020;font-weight:500;margin-top:2px}
.qm-c{flex:none;border:0;background:#fdeaea;color:#b00020;border-radius:10px;padding:8px 12px;font:inherit;font-weight:700;cursor:pointer}
.qm-f{margin-top:12px}
.qm-go{width:100%;border:0;background:#0f766e;color:#fff;border-radius:12px;padding:12px;font:inherit;font-weight:800;cursor:pointer}
.qm-go:disabled{opacity:.6}
@media (max-width:720px){.qm-bd{align-items:flex-end;padding:0}.qm{width:100%;border-radius:20px 20px 0 0}}

/* v14: login moved to sidebar, welcome in hero */
.hero .adminlink{display:none!important}
.welcome{background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.4);color:#fff;border-radius:14px;padding:8px 14px;font-size:14px;font-weight:700;white-space:nowrap}
.welcome small{opacity:.85;font-weight:600;margin-right:6px}
#side .si.lg{margin-top:auto;text-decoration:none;border-top:1px solid #e5eeec;border-radius:12px;height:50px}
@media (max-width:720px){.welcome{font-size:12px;padding:6px 10px}.welcome small{display:none}}

/* v15: mobile header column, user menu */
.hctl{display:flex;flex-direction:column;align-items:center;gap:8px;flex:none}
.welcome{cursor:pointer}
.welcome::after{content:' ▾';opacity:.85}
.um{padding:14px}
.um-h{display:flex;align-items:center;gap:8px;font-size:1.05rem;padding:6px 4px 12px}
.um-h small{color:#5b6b68;margin-right:auto}
.um-b{display:block;width:100%;text-align:center;text-decoration:none;border:0;background:#eef6f4;color:#0b4f48;border-radius:12px;padding:12px;font:inherit;font-weight:700;margin-top:8px;cursor:pointer}
.um-out{background:#fdeaea;color:#b00020}
.um-x{background:none;color:#5b6b68;font-weight:600}
@media (max-width:720px){
.hero .row{align-items:flex-start}
.hctl{align-items:stretch}
.welcome{max-width:96px;white-space:normal;text-align:center;line-height:1.3;font-size:11px;padding:6px 8px}
}

/* v16: hamburger flush to far left */
@media (max-width:720px){.hctl{align-items:flex-end!important}.hctl .hmb{align-self:flex-end}}


/* GS v1 */
body.gs-on .search,body.gs-on #chips,body.gs-on #count,body.gs-on #list,body.gs-on #iosHint{display:none!important}
.gsv{display:none}
body.gs-on .gsv{display:block}
.gh{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 8px}
.gh h2{margin:0;font-size:20px;color:var(--primary-dark)}
.gcnt{font-weight:700;color:var(--muted);font-size:14px}
.gtool{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.gsearch{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:0 12px}
.gsearch input{flex:1;border:0;outline:0;background:transparent;padding:12px 0;font:inherit;color:var(--text)}
.gfil{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.gfil select{border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 10px;font:inherit;color:var(--text);max-width:100%}
.gseg{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden;background:#fff}
.gseg button{border:0;background:transparent;padding:8px 14px;font:inherit;font-weight:700;color:var(--primary-dark)}
.gseg button.on{background:var(--primary);color:#fff}
.gqbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#FFF4E5;border:1px solid #F5C77E;color:#8a5a00;border-radius:12px;padding:8px 12px;margin-bottom:10px;font-weight:700}
.gl{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.ggh{grid-column:1/-1;font-weight:800;color:var(--primary-dark);background:var(--soft);border-radius:12px;padding:8px 12px;margin-top:6px}
.ggh span{background:var(--primary);color:#fff;border-radius:999px;padding:1px 9px;font-size:12px;margin-inline-start:6px}
.gc{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;box-shadow:0 2px 8px rgba(15,118,110,.07)}
.gi{position:relative;aspect-ratio:4/3;background:var(--soft);cursor:pointer;overflow:hidden}
.gi img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .25s}
.gi img.ok{opacity:1}
.gph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:44px;opacity:.35}
.gi img.ok~.gph{display:none}
.gbd{padding:12px 14px 4px;cursor:pointer}
.gt{font-weight:800;color:var(--text);line-height:1.5}
.gsub{color:var(--muted);font-size:13px;margin-top:3px}
.gmeta{display:flex;flex-wrap:wrap;gap:10px;color:var(--muted);font-size:13px;margin-top:6px}
.gbg{display:flex;flex-wrap:wrap;gap:6px;padding:6px 14px}
.gb{display:inline-flex;border-radius:999px;padding:3px 10px;font-size:12.5px;font-weight:700;border:0}
.gb.gy{background:#DDF5E8;color:#0b6b3a}.gb.gn{background:#FBE3E0;color:#a12a1d}.gb.gw{background:#FFF1D6;color:#8a5a00}.gb.gu{background:#E8EEFB;color:#2f4a8a}.gb.gk{background:#F1E6FA;color:#6a2c91;cursor:pointer}
.gac{display:flex;flex-wrap:wrap;gap:6px;padding:6px 12px 12px}
.ga{border:1px solid var(--line);background:#fff;color:var(--primary-dark);border-radius:999px;padding:6px 12px;font:inherit;font-weight:700;font-size:13px}
.ga.ok{background:var(--primary);color:#fff;border-color:var(--primary)}
.ga.del{color:var(--danger);border-color:#f0c6c1}
.gmorew{text-align:center;margin:16px 0 80px}
.gfab{position:fixed;left:18px;bottom:20px;width:56px;height:56px;border-radius:50%;border:0;background:var(--primary);color:#fff;font-size:30px;box-shadow:0 6px 18px rgba(15,118,110,.4);z-index:30}
body.gs-modal .gfab{display:none}
.gsm{position:fixed;inset:0;background:rgba(10,30,28,.55);z-index:80;display:flex;align-items:flex-end;justify-content:center}
.gsm[hidden]{display:none}
.gm-box{background:#fff;width:min(720px,100%);max-height:92vh;display:flex;flex-direction:column;border-radius:20px 20px 0 0;overflow:hidden}
@media(min-width:760px){.gsm{align-items:center}.gm-box{border-radius:20px;max-height:88vh}}
.gm-h{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line);font-size:16px}
.gm-x{border:0;background:var(--soft);border-radius:50%;width:34px;height:34px;font-size:16px;flex:none}
.gm-b{padding:14px 16px;overflow:auto}
.gkv{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;margin:10px 0}
.gkv div{background:var(--bg);border-radius:12px;padding:8px 10px;font-weight:700}
.gkv i{display:block;font-style:normal;font-weight:500;color:var(--muted);font-size:12px}
.gsec{font-weight:800;color:var(--primary-dark);margin:14px 0 6px}
.gpre{white-space:pre-wrap;line-height:1.8;background:var(--bg);border-radius:12px;padding:10px 12px}
.gimgs{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.gim{aspect-ratio:1;background:var(--soft);border-radius:12px;overflow:hidden;cursor:pointer}
.gim img{width:100%;height:100%;object-fit:cover}
.gslb{position:fixed;inset:0;background:rgba(0,0,0,.88);z-index:95;display:flex;align-items:center;justify-content:center}
.gslb[hidden]{display:none}
.gslb img{max-width:96vw;max-height:92vh}
.gform label{display:block;font-weight:700;margin:10px 0;color:var(--text)}
.gform input:not([type=checkbox]):not([hidden]),.gform select,.gform textarea{display:block;width:100%;margin-top:5px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;font:inherit;background:#fff;color:var(--text)}
.gform small{font-weight:500;color:var(--muted);margin-inline-start:6px}
.gokc{color:#0b6b3a}
.g2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.gpv{display:flex;flex-wrap:wrap;gap:8px}
.gck{display:inline-flex!important;align-items:center;gap:6px;margin:0!important;background:var(--bg);border-radius:999px;padding:6px 12px;font-weight:600!important}
.gslots{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px}
.gslot{text-align:center}
.gsp{aspect-ratio:1;border:2px dashed var(--line);border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:28px;color:var(--muted);overflow:hidden;cursor:pointer;background:#fff}
.gsp img{width:100%;height:100%;object-fit:cover}
.gx{margin-top:4px;font-size:12px!important;padding:3px 8px!important}
.gmsg{color:var(--danger);font-weight:700;min-height:22px;margin-top:8px}
.gsave{display:flex;gap:10px;align-items:center;position:sticky;bottom:-14px;background:#fff;padding:10px 0}
.gbtn{background:var(--primary);color:#fff;border:0;border-radius:14px;padding:12px 22px;font:inherit;font-weight:800;flex:1}
.gbtn:disabled{opacity:.6}
.gqi{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:8px}
.gerr{color:var(--danger);font-size:13px;margin-top:4px}

.gfil select{width:auto!important;flex:1 1 140px;min-width:130px}
.gtool .gsearch{width:100%}
/* NF v1 */
.nfb{position:relative;width:42px;height:42px;border-radius:50%;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.18);color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none;margin-inline-end:8px;padding:0;font-family:inherit}
.nfb svg{width:22px;height:22px}
.nfb:hover{background:rgba(255,255,255,.3)}
.nfb.on svg{animation:nfr 1.2s ease 1}
.nfc{position:absolute;top:-5px;right:-5px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#e53935;color:#fff;font-size:11px;font-weight:800;line-height:20px;text-align:center;box-shadow:0 0 0 2px #0f6f63}
.nfc[hidden]{display:none}
@keyframes nfr{0%,100%{transform:rotate(0)}15%{transform:rotate(18deg)}30%{transform:rotate(-16deg)}45%{transform:rotate(12deg)}60%{transform:rotate(-8deg)}}
.nfp{position:fixed;z-index:400;display:none;flex-direction:column;max-height:72vh;background:#fff;color:#16302d;border-radius:16px;box-shadow:0 14px 44px rgba(0,0,0,.3);overflow:hidden;direction:rtl;font-family:inherit}
.nfp button{font-family:inherit;cursor:pointer}
.nfh{display:flex;align-items:center;gap:8px;padding:14px 16px 8px;font-size:17px}
.nfsp{flex:1}
.nfl{border:0;background:none;color:#0f6f63;font-weight:700;font-size:13px}
.nfx{border:0;background:#eef3f2;border-radius:50%;width:30px;height:30px;color:#456}
.nft,.nfs{display:flex;gap:6px;padding:4px 16px 8px;flex-wrap:wrap}
.nft button,.nfs button{border:0;background:#eef3f2;color:#35524e;border-radius:999px;padding:6px 14px;font-size:13px;font-weight:700}
.nft button.on,.nfs button.on{background:#0f6f63;color:#fff}
.nfb2{overflow:auto;padding:0 8px 8px;flex:1}
.nfd{font-size:12px;font-weight:800;color:#7a8f8c;padding:10px 10px 4px}
.nfi{display:flex;align-items:flex-start;gap:10px;width:100%;text-align:right;border:0;background:none;border-radius:12px;padding:10px;position:relative}
.nfi:hover{background:#f1f7f6}
.nfi.un{background:#e8f5f2}
.nfa{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:17px;flex:none}
.nfa.nn{background:#d7f0e4}.nfa.ne{background:#fdecc8}
.nfm{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
.nfw{font-size:13.5px;color:#2a3f3c}
.nft2{font-size:14px;font-weight:800;line-height:1.45;color:#102523}
.nfq{display:flex;flex-wrap:wrap;gap:6px;font-size:11.5px;color:#6b807d}
.nfq i{font-style:normal;background:#eef3f2;border-radius:6px;padding:1px 7px}
.nfdot{width:10px;height:10px;border-radius:50%;background:#1e88e5;flex:none;margin-top:6px}
.nfe{padding:36px 10px;text-align:center;color:#7a8f8c;font-size:14px}
.nff{padding:8px 14px 12px;border-top:1px solid #e3ecea}
.nfp2{width:100%;border:1px dashed #0f6f63;background:#f3faf8;color:#0f6f63;border-radius:10px;padding:9px;font-weight:700}

/* NF v1.1 موضع الجرس */
.row>.nfb{margin:0 0 0 12px;align-self:center}
@media (max-width:720px){.hctl{display:grid;grid-template-columns:auto auto;justify-content:start;align-items:center;gap:8px}.hctl .welcome{grid-column:1/-1;justify-self:start}.hctl .nfb{order:-1;margin:0}}

/* SY v1 + موضع الأيقونات */
.hico{display:flex;align-items:center;gap:8px;flex:none}
.row>.hico{margin:0 0 0 12px;align-self:center}
.hico .nfb{margin:0;order:2}
.hico .syb{order:1}
@media (max-width:720px){.hctl .hico{order:-1}}
#qbadge{display:none!important}
.syb{position:relative;width:42px;height:42px;border-radius:50%;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.18);color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none;padding:0;font-family:inherit}
.syb svg{width:21px;height:21px}
.syb:hover{background:rgba(255,255,255,.3)}
.syb.run svg{animation:sysp 1s linear infinite}
@keyframes sysp{to{transform:rotate(360deg)}}
.syd{position:absolute;bottom:1px;left:1px;width:11px;height:11px;border-radius:50%;box-shadow:0 0 0 2px #0f6f63;background:#43d17a}
.syb.pend .syd{background:#ffb300}.syb.err .syd{background:#e53935}.syb.off .syd{background:#9aa5a3}
.syc{position:absolute;top:-5px;right:-5px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#ff9800;color:#fff;font-size:11px;font-weight:800;line-height:20px;text-align:center;box-shadow:0 0 0 2px #0f6f63}
.syb.err .syc{background:#e53935}
.syc[hidden]{display:none}
.sys{display:flex;align-items:center;gap:10px;margin:2px 16px 8px;padding:10px 12px;border-radius:12px;background:#eaf7ef}
.sys.pend{background:#fff4dc}.sys.err{background:#fde8e7}.sys.off{background:#eceff0}
.sysd{width:11px;height:11px;border-radius:50%;background:#2fb764;flex:none}
.sys.pend .sysd{background:#ffb300}.sys.err .sysd{background:#e53935}.sys.off .sysd{background:#8a9795}
.syst{display:flex;flex-direction:column;gap:1px;font-size:13.5px}
.syst i{font-style:normal;font-size:12px;color:#5d7370}
.syh{margin:0 16px 8px;font-size:12.5px;color:#6b807d}
.syi{display:flex;align-items:flex-start;gap:10px;padding:10px;border-radius:12px}
.syi:hover{background:#f1f7f6}
.syi.er{background:#fff3f2}
.syer{font-size:12px;color:#c62828}
.sycx{border:1px solid #e3b5b2;background:#fff;color:#c62828;border-radius:999px;padding:5px 12px;font-size:12.5px;font-weight:700;flex:none}
.sycx:hover{background:#fde8e7}
.syf{display:flex;gap:8px}
.sygo,.syrf{flex:1;border-radius:10px;padding:10px;font-weight:800;font-size:13.5px}
.sygo{border:0;background:#0f6f63;color:#fff}
.sygo:disabled{background:#b8cbc8;cursor:not-allowed}
.syrf{border:1px solid #0f6f63;background:#fff;color:#0f6f63}
.nfe small{color:#8da09d}

/* SY v1.1 */
#st,#refresh{display:none!important}
.syncbar:not(:has(#install:not([hidden]))){display:none!important}

/* FIX grid v1 */.grid>*{min-width:0}.lb{z-index:2000!important}.lbn{z-index:2001}/* FIX hdr v3 */@media(max-width:720px){.hero .row{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;width:100%;box-sizing:border-box;gap:10px 12px;align-items:center}.hero .row>.logo{grid-column:1;grid-row:1}.hero .row>div:nth-child(2){grid-column:2/4;grid-row:1;min-width:0}.hero .row>.adminlink{grid-column:1/-1;grid-row:3}.hero .hico{grid-column:1/3;grid-row:2;justify-self:start;order:0;display:flex;gap:8px}.hero .hctl{grid-column:3!important;grid-row:2!important;justify-self:end;order:0;margin:0!important;display:flex!important;align-items:center;gap:8px;flex-wrap:nowrap;position:static!important}.hero .hctl .welcome{white-space:nowrap;max-width:48vw;overflow:hidden;text-overflow:ellipsis}.hero .row>div:nth-child(2) p{white-space:normal!important;overflow-wrap:anywhere}.hero .hctl .welcome{max-width:150px!important;font-size:11px!important;padding:6px 8px!important}.hero .hctl{flex-direction:row!important;flex-wrap:nowrap!important;width:auto!important}.hero .hctl .welcome{width:auto!important;flex:none!important;grid-column:auto!important}.hero .hctl{grid-column:1/-1!important;grid-row:2!important;justify-self:stretch!important;width:100%!important}.hero .hctl .welcome{order:0!important;max-width:118px!important}.hero .hctl .hico{order:1!important;margin-inline-start:auto!important}.hero .hctl .hmb{order:2!important;margin:0!important}.hero .row>div:nth-child(2) p{display:none!important}.hero .hctl{gap:6px!important}.hero h1{white-space:nowrap}}
/* FIX hdr v4: الترحيب على الموبايل ياخد المساحة الفاضية وبنفس ارتفاع الأزرار */
@media(max-width:720px){.hero .hctl{align-items:center!important}.hero .hctl .welcome{flex:1 1 auto!important;max-width:none!important;min-width:0!important;height:42px!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:4px;font-size:13px!important;padding:0 12px!important;border-radius:12px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.hero .hctl .welcome b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.hero .hctl .hico{margin-inline-start:0!important}}
@media(max-width:720px){.hero .hctl .welcome .whi{display:none}.hero .hctl .welcome::after{display:none}.hero .hctl .welcome{padding:0 10px!important}}
@media(max-width:375px){.hero .hctl{gap:4px!important}.hero .hctl .welcome{font-size:12px!important;padding:0 8px!important}}

.tci{width:100%;height:100%;display:block;border-radius:inherit;object-fit:contain}.si .ic .tci{width:30px;height:30px;border-radius:9px}#side .si .ic .tci{width:38px;height:38px;border-radius:12px}
