/*
VOICE: هادئ وعملي، لمشرف في مطبخ مزدحم
IDEA: بطاقة تشغيل في المطبخ، كل مهمة بطاقة واضحة
COLOUR: هوية طابور، رمادي مخضر داكن وفيروزي، احمر وبرتقالي واخضر للحالات
TYPE: Cairo
LAYOUT: عمود واحد للجوال، شبكة للوحة الادارة
*/
:root{
  --slate:#2C4A4E;--teal:#5E8F96;--teal2:#82B2B7;--bg:#F3F6F6;--card:#fff;--ink:#1D2B2D;--mute:#647779;
  --line:#DDE5E6;--red:#C0392B;--orange:#D4875A;--gold:#C0832B;--green:#2E8B57;--soft:#E8F0F1;
  --r:14px;--sh:0 1px 2px rgba(20,40,42,.06),0 4px 14px rgba(20,40,42,.06);
}
*{box-sizing:border-box;min-width:0}
html,body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 Cairo,system-ui,sans-serif}
body{padding-bottom:calc(76px + env(safe-area-inset-bottom));overflow-x:clip}
button,input,select,textarea{font:inherit;color:inherit}
h1,h2,h3{margin:0;line-height:1.3}
h1{font-size:24px;font-weight:800}h2{font-size:19px;font-weight:700}h3{font-size:16px;font-weight:700}
small,.mute{color:var(--mute)}
a{color:var(--teal)}
.top{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:calc(10px + env(safe-area-inset-top)) 16px 10px;background:var(--slate);color:#fff}
.brand{display:flex;align-items:center;gap:10px}.brand b{display:block;font-size:16px}.brand small{color:#cfe0e2;font-size:12px}
main{max-width:1100px;margin:0 auto;padding:16px}
.tabs{position:fixed;inset:auto 0 0 0;z-index:20;display:flex;background:#fff;border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom)}
.tabs a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px;font-size:12px;
  color:var(--mute);text-decoration:none;min-height:56px;justify-content:center}
.tabs a.on{color:var(--slate);font-weight:700}
.tabs svg{width:22px;height:22px}
.card{background:var(--card);border-radius:var(--r);box-shadow:var(--sh);padding:16px;margin-bottom:12px}
.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.between{justify-content:space-between}
.grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))}
.kpis{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));margin-bottom:12px}
.kpi{background:#fff;border-radius:var(--r);padding:14px;box-shadow:var(--sh)}
.kpi b{display:block;font-size:clamp(24px,5vw,32px);font-weight:800;line-height:1.1}
.kpi span{font-size:13px;color:var(--mute)}
.btn,button.primary{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:46px;padding:0 18px;
  border:0;border-radius:12px;background:var(--slate);color:#fff;font-weight:700;cursor:pointer;text-decoration:none}
.btn.teal{background:var(--teal)}.btn.red{background:var(--red)}.btn.green{background:var(--green)}
.btn.full{width:100%}
.ghost{background:transparent;border:1px solid currentColor;border-radius:10px;padding:6px 12px;cursor:pointer;min-height:40px}
.ghost.sm{min-height:34px;padding:2px 12px;font-size:14px}
.btn:disabled,button:disabled{opacity:.5;cursor:not-allowed}
:focus-visible{outline:3px solid var(--teal2);outline-offset:2px}
label{display:block;font-size:14px;font-weight:600;margin:10px 0 4px}
input[type=text],input[type=email],input[type=password],input[type=number],input[type=date],input[type=time],input[type=tel],select,textarea{
  width:100%;min-height:46px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:16px}
textarea{min-height:84px;resize:vertical}
.chip{display:inline-flex;align-items:center;gap:4px;padding:2px 10px;border-radius:99px;font-size:12.5px;font-weight:700;
  background:var(--soft);color:var(--slate);white-space:nowrap}
.chip.red{background:#FBE7E5;color:var(--red)}.chip.orange{background:#FBEEE6;color:#A55A2E}
.chip.green{background:#E4F3EA;color:var(--green)}.chip.gold{background:#F8EEDC;color:#8A5C17}.chip.gray{background:#EEF1F1;color:var(--mute)}
.task{display:flex;gap:12px;align-items:center}
.task .ico{flex:none;width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:var(--soft);color:var(--slate)}
.task .body{flex:1}
.task .body b{display:block}
.progress{height:8px;border-radius:99px;background:var(--soft);overflow:hidden}
.progress i{display:block;height:100%;background:var(--teal);border-radius:99px;transition:width .3s}
.item{border-inline-start:4px solid var(--line)}
.item.ok{border-color:var(--green)}.item.bad{border-color:var(--red)}.item.na{border-color:var(--mute)}
.item .q{font-weight:700}
.item .desc{font-size:14px;color:var(--mute);margin-top:2px}
.section{margin:18px 4px 8px;color:var(--slate);font-weight:800}
.info{background:var(--soft);border-radius:12px;padding:12px;font-size:14px}
.yn{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.yn button,.choice{min-height:48px;border:2px solid var(--line);border-radius:12px;background:#fff;font-weight:700;cursor:pointer}
.yn button.on.yes{border-color:var(--green);background:#E4F3EA;color:var(--green)}
.yn button.on.no{border-color:var(--red);background:#FBE7E5;color:var(--red)}
.choices{display:grid;gap:8px;margin-top:10px;grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
.choice{padding:6px 10px;text-align:center}
.choice.on{border-color:var(--teal);background:var(--soft);color:var(--slate)}
.rating{display:flex;gap:6px;margin-top:10px}.rating button{flex:1;min-height:46px;border:2px solid var(--line);border-radius:10px;background:#fff;font-weight:800;cursor:pointer}
.rating button.on{background:var(--gold);border-color:var(--gold);color:#fff}
.reading{display:flex;align-items:center;gap:8px;margin-top:10px}.reading input{max-width:160px;font-size:20px;font-weight:700;text-align:center}
.photos{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.photos img{width:72px;height:72px;object-fit:cover;border-radius:10px;background:var(--soft)}
.addphoto{width:72px;height:72px;border:2px dashed var(--teal2);border-radius:10px;display:grid;place-items:center;color:var(--teal);cursor:pointer;background:#fff;font-size:12px;text-align:center}
.need{color:var(--red);font-size:13px;font-weight:700}
.tools{display:flex;gap:12px;margin-top:10px;font-size:14px;flex-wrap:wrap}
.tools button{background:none;border:0;color:var(--teal);cursor:pointer;padding:6px 0;min-height:34px}
details.help summary{cursor:pointer;color:var(--teal);font-size:14px;margin-top:6px}
.bar{position:sticky;bottom:calc(64px + env(safe-area-inset-bottom));z-index:10;background:var(--bg);padding:10px 0}
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{padding:10px 8px;border-bottom:1px solid var(--line);text-align:start;vertical-align:middle}
th{color:var(--mute);font-weight:600;font-size:13px}
td.num{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap}
.scroll{overflow-x:auto}
.meter{height:8px;border-radius:99px;background:var(--soft);min-width:70px}.meter i{display:block;height:100%;border-radius:99px}
.center{display:grid;place-items:center;min-height:60vh;text-align:center}
.spinner{width:36px;height:36px;border:4px solid var(--soft);border-top-color:var(--teal);border-radius:50%;animation:s 1s linear infinite}
@keyframes s{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation-duration:3s}.progress i{transition:none}}
.login{max-width:400px;margin:6vh auto}
.login .logo{display:grid;place-items:center;gap:6px;margin-bottom:18px;text-align:center}
.modal{position:fixed;inset:0;z-index:50;background:rgba(20,35,37,.45);display:flex;align-items:flex-end;justify-content:center}
.sheet{background:#fff;width:100%;max-width:560px;max-height:92vh;overflow:auto;border-radius:18px 18px 0 0;padding:18px 18px calc(18px + env(safe-area-inset-bottom))}
@media(min-width:700px){.modal{align-items:center}.sheet{border-radius:18px}}
.sig{width:100%;height:200px;border:2px dashed var(--teal2);border-radius:12px;touch-action:none;background:#fff}
.toast{position:fixed;inset:auto 16px calc(84px + env(safe-area-inset-bottom)) 16px;z-index:60;margin:auto;max-width:460px;
  background:var(--slate);color:#fff;padding:12px 16px;border-radius:12px;box-shadow:var(--sh);font-weight:600;text-align:center}
.toast.err{background:var(--red)}
.empty{text-align:center;color:var(--mute);padding:28px 10px}
.hidden,[hidden]{display:none!important}
.seg{display:flex;background:var(--soft);border-radius:12px;padding:4px;gap:4px;margin-bottom:12px}
.seg button{flex:1;border:0;background:transparent;border-radius:9px;min-height:40px;cursor:pointer;font-weight:600;color:var(--mute)}
.seg button.on{background:#fff;color:var(--slate);box-shadow:var(--sh)}
.hero{background:var(--slate);color:#fff;border-radius:var(--r);padding:18px;margin-bottom:12px;display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap}
.hero small{color:#cfe0e2}
.ring{--p:0;width:86px;height:86px;border-radius:50%;display:grid;place-items:center;
  background:conic-gradient(var(--teal2) calc(var(--p)*1%),rgba(255,255,255,.15) 0)}
.ring b{width:68px;height:68px;border-radius:50%;background:var(--slate);display:grid;place-items:center;font-size:19px}
@media(max-width:600px){
  main{padding:12px}
  .stack thead{display:none}.stack tr{display:grid;padding-block:10px;border-bottom:1px solid var(--line)}
  .stack td{display:flow-root;border:0;padding:3px 0;padding-inline-start:7.5em;text-align:start}
  .stack td::before{content:attr(data-l);float:inline-start;width:7em;margin-inline-start:-7.5em;color:var(--mute);font-size:13px}
  .stack td:empty{display:none}
}
