
:root{--ink:#0b1f1a;--ink2:#34453f;--mut:#6a7b74;--bg:#f5f7f6;--card:#fff;--line:#e4eae7;--line2:#eef2f0;--nav:#08241c;--nav2:#0e3a2d;--acc:#12a373;--acc2:#0b7c58;--accbg:#e6f6ef;--red:#c8372d;--redbg:#fdecea;--amb:#b8700b;--ambbg:#fff3dc;--blu:#2a5bd7;--blubg:#eaf0ff;--sh:0 1px 2px rgba(11,31,26,.05),0 4px 14px rgba(11,31,26,.05)}
*{box-sizing:border-box}html,body{margin:0}body{font-family:"Noto Sans Arabic","IBM Plex Sans Arabic","Segoe UI",system-ui,sans-serif;background:var(--bg);color:var(--ink);font-size:13.5px;font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}
svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}.shell>div{min-width:0}html,body{overflow-x:hidden}td b{white-space:nowrap}
aside{background:linear-gradient(180deg,var(--nav),#061a14);color:#b9d3c8;padding:20px 14px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}
.brand{display:flex;align-items:center;gap:10px;padding:2px 8px 22px}.mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#1fd19a,#0b7c58);display:grid;place-items:center;color:#042a1e;font-weight:800;font-size:18px}
.brand b{color:#fff;font-size:20px;letter-spacing:.2px}.brand small{display:block;font-size:11px;color:#7fa797;margin-top:-2px}
.sec{font-size:10.5px;color:#6f9786;padding:14px 12px 6px;letter-spacing:.6px}
aside a{display:flex;gap:11px;align-items:center;color:#b9d3c8;text-decoration:none;padding:9px 12px;border-radius:9px;margin-bottom:2px;font-weight:500;cursor:pointer;border:1px solid transparent}
aside a:hover{background:rgba(255,255,255,.05)}aside a.on{background:rgba(31,209,154,.12);color:#fff;border-color:rgba(31,209,154,.25)}aside a.on svg{color:#1fd19a}
.me{margin-top:auto;display:flex;gap:10px;align-items:center;padding:10px;border-radius:12px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.07)}
.av{width:34px;height:34px;border-radius:50%;background:#1b5b47;display:grid;place-items:center;color:#fff;font-weight:700}.me small{display:block;color:#7fa797;font-size:11px}.me b{color:#fff;font-size:12.5px}
.top{display:flex;align-items:center;gap:10px;padding:12px 28px;background:rgba(255,255,255,.92);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5}
.crumb{flex:1}.crumb h1{margin:0;font-size:19px;font-weight:700}.crumb span{color:var(--mut);font-size:12px}
.fld{display:flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;border-radius:10px;padding:0 10px;height:36px;color:var(--ink2);font-size:12.5px}
.fld select,.fld input{border:0;outline:0;background:transparent;font:inherit;color:inherit;height:100%}
.demo{background:var(--ambbg);color:#7a4d06;font-size:11.5px;padding:5px 28px;border-bottom:1px solid #f3dfb4}
.pg{padding:22px 28px 40px;display:none}.pg.on{display:block}
.kp{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:var(--sh)}.pad{padding:16px 18px}
.k{color:var(--mut);font-size:12px;display:flex;justify-content:space-between;align-items:center}.v{font-size:27px;font-weight:700;margin-top:6px;letter-spacing:-.3px}.v small{font-size:12px;color:var(--mut);font-weight:500;margin-right:4px}
.dl{font-size:11.5px;margin-top:6px;color:var(--mut)}.up{color:var(--acc2)}.dn{color:var(--red)}
.g{color:var(--acc2)}.r{color:var(--red)}.o{color:var(--amb)}
h3{margin:0;font-size:14.5px;font-weight:700}.ch{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid var(--line2)}.ch span{color:var(--mut);font-size:12px}
.grid2{display:grid;grid-template-columns:1.75fr 1fr;gap:16px}
table{width:100%;border-collapse:collapse}th{color:var(--mut);font-weight:600;text-align:right;padding:10px 14px;border-bottom:1px solid var(--line);font-size:11.5px;background:#fafcfb;white-space:nowrap}
td{padding:11px 14px;border-bottom:1px solid var(--line2)}tbody tr:hover td{background:#f8fbf9}tr:last-child td{border-bottom:0}
td.n{text-align:left;font-weight:600}th.n{text-align:left}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;padding:3px 10px;border-radius:20px;white-space:nowrap}.chip:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.c-g{background:var(--accbg);color:var(--acc2)}.c-r{background:var(--redbg);color:var(--red)}.c-o{background:var(--ambbg);color:var(--amb)}.c-n{background:#eef1f0;color:#4c5e57}.c-b{background:var(--blubg);color:var(--blu)}
.pr{height:6px;border-radius:6px;background:#e8eeeb;overflow:hidden;min-width:70px}.pr i{display:block;height:100%;background:var(--acc)}
.stack{height:10px;border-radius:8px;overflow:hidden;display:flex;background:#e8eeeb}.stack i{display:block}
.lg{display:flex;gap:16px;font-size:11.5px;color:var(--mut);margin-top:8px}.lg b{display:inline-block;width:8px;height:8px;border-radius:50%;margin-left:5px}
.btn{display:inline-flex;align-items:center;gap:7px;background:var(--acc2);color:#fff;border:0;border-radius:10px;height:36px;padding:0 15px;font:inherit;font-weight:600;cursor:pointer;box-shadow:0 1px 2px rgba(11,124,88,.35)}
.btn.s{background:#fff;color:var(--ink2);border:1px solid var(--line);box-shadow:none}.btn.d{background:#fff;color:var(--red);border:1px solid #f0c9c5;box-shadow:none}
.tool{display:flex;gap:10px;align-items:center;margin-bottom:14px}.sp{flex:1}
.quick{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--sh);padding:14px 16px;margin-bottom:14px;display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr 1fr auto;gap:10px;align-items:end}
.quick label{font-size:11px;color:var(--mut);display:block;margin-bottom:4px;font-weight:600}.quick .fld{width:100%}.quick .fld select,.quick .fld input{width:100%}
.note{background:var(--blubg);border:1px solid #cfdcfb;color:#1f3f95;border-radius:12px;padding:11px 14px;font-size:12.5px;line-height:1.7;display:flex;gap:10px}
.row{display:flex;justify-content:space-between;align-items:center;padding:11px 18px;border-bottom:1px solid var(--line2)}.row:last-child{border:0}.sub{color:var(--mut);font-size:11.5px;margin-top:2px}
.tl{padding:6px 18px 6px 0;margin:10px 22px 10px 0;border-right:2px solid var(--line)}.tl>div{position:relative;padding:0 16px 14px 0}.tl>div:before{content:"";position:absolute;right:-7px;top:4px;width:12px;height:12px;border-radius:50%;background:#fff;border:3px solid var(--acc)}.tl>.late:before{border-color:var(--red)}
/* edit drawer (desktop: side panel, mobile: bottom sheet) */
.scrim{display:none;position:fixed;inset:0;background:rgba(8,36,28,.35);z-index:20}
.drawer{display:none;position:fixed;top:0;bottom:0;left:0;width:420px;background:#fff;z-index:21;box-shadow:12px 0 40px rgba(0,0,0,.18);flex-direction:column}
body.edit .scrim,body.edit .drawer{display:flex}body.edit{overflow:hidden}body.edit .fab,body.edit .tabbar{visibility:hidden}.dh{padding:18px 20px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.db{padding:18px 20px;overflow:auto;flex:1 1 auto;min-height:0;overscroll-behavior:contain}.df{flex:none;padding:14px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line);display:flex;gap:10px;background:#fafcfb}.df .btn{flex:1;justify-content:center}
.f2{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}.fl label{font-size:11px;color:var(--mut);font-weight:600;display:block;margin-bottom:4px}.fl .fld{width:100%;height:40px}.fl .fld select,.fl .fld input{width:100%}
.hint{font-size:11.5px;color:var(--mut);background:#f4f7f6;border-radius:10px;padding:10px 12px;line-height:1.7}
.tabbar{display:none}.fab{display:none}.cards{display:none}
@media(max-width:900px){
 .shell{grid-template-columns:1fr}aside{display:none}.top{padding:10px 14px;flex-wrap:wrap}.crumb{flex:1 1 100%}.top .fld{flex:1}.pg{padding:14px 14px 100px}.demo{padding:5px 14px}
 .kp{grid-template-columns:1fr 1fr;gap:10px}.v{font-size:21px}.grid2{grid-template-columns:1fr}.kp .card{min-width:0}.top .fld{min-width:0}.top .fld select{width:100%}.note{min-width:0}.quick{display:none}
 .hide-m{display:none}.tbl{display:none}.cards{display:block}
 .tabbar{display:flex;position:fixed;bottom:0;right:0;left:0;background:#fff;border-top:1px solid var(--line);padding:6px 4px 12px;z-index:10}
 .tabbar a{flex:1;text-align:center;color:var(--mut);font-size:10.5px;text-decoration:none;cursor:pointer}.tabbar a svg{display:block;margin:0 auto 3px}.tabbar a.on{color:var(--acc2);font-weight:700}
 .fab{display:grid;place-items:center;position:fixed;left:16px;bottom:78px;width:54px;height:54px;border-radius:50%;background:var(--acc2);color:#fff;z-index:11;box-shadow:0 8px 20px rgba(11,124,88,.4)}.fab svg{width:24px;height:24px}
 .drawer{top:auto;left:0;right:0;width:auto;max-height:92vh;max-height:92dvh;height:auto;border-radius:20px 20px 0 0;box-shadow:0 -12px 40px rgba(0,0,0,.2)}
 .mc{padding:12px 14px;border-bottom:1px solid var(--line2);display:flex;justify-content:space-between;gap:10px;align-items:center}.mc:last-child{border:0}
 .tool .btn.s{display:none}
}

.login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(160deg,#08241c,#0e3a2d)}.login .card{width:min(380px,92vw);padding:28px}.login h1{margin:0 0 4px}.login .fl{margin-bottom:12px}
.err{background:var(--redbg);color:var(--red);border-radius:10px;padding:9px 12px;margin:10px 0;font-size:12.5px}.okm{background:var(--accbg);color:var(--acc2);border-radius:10px;padding:9px 12px;margin:10px 0;font-size:12.5px}
.warnb{background:var(--ambbg);color:#7a4d06;border-radius:10px;padding:9px 12px;margin:0 0 12px;font-size:12.5px;line-height:1.7}
.fl input,.fl select{font:inherit}.fl .fld{width:100%}.btnrow{display:flex;gap:8px;margin-top:12px}a.lnk{color:var(--acc2);cursor:pointer;font-weight:600}
.pgx{padding:22px 28px 40px}@media(max-width:900px){.pgx{padding:14px 14px 100px}table.rt{display:block;overflow-x:auto}}
.mini td,.mini th{padding:7px 10px;font-size:12px}
@media(max-width:0px){#pg table.rt th:nth-child(2),#pg table.rt td:nth-child(2),#pg table.rt th:nth-child(3),#pg table.rt td:nth-child(3),#pg table.rt th:nth-child(5),#pg table.rt td:nth-child(5){display:none}#pg .led table.rt{display:table}}
@media(max-width:0px){#pg table.rt th:nth-child(4),#pg table.rt td:nth-child(4),#pg table.rt th:nth-child(6),#pg table.rt td:nth-child(6){display:none}}

.dgrp{display:grid;grid-template-columns:.8fr 1.4fr 1fr;gap:8px}.dgrp .fld{height:40px;min-width:0}.dgrp select{width:100%}
.tbl{display:block}.cards{display:none}.mc{cursor:pointer}
@media(max-width:900px){.tbl{display:none}.cards{display:block}.mc>div:first-child{flex:1}#pg{overflow-x:hidden}.mini{display:block;overflow-x:auto}}
.mc .fld{margin-top:8px;flex:1 1 100%}

.pp{display:flex;gap:8px}.pp .fld{min-width:92px}
