*{box-sizing:border-box}
html,body{margin:0;background:#fdfcfb;color:#4d3533;font-family:"Noto Sans Arabic","Tajawal","Cairo","Segoe UI",system-ui,-apple-system,Arial,sans-serif;font-size:15px;line-height:1.5;-webkit-text-size-adjust:100%}
body{overflow-x:hidden}
.wrap{max-width:760px;margin:0 auto;padding:16px 14px 60px}
@media(min-width:900px){.wrap{max-width:1000px}.racks{display:grid;grid-template-columns:1fr 1fr;gap:8px}.totals{grid-template-columns:repeat(4,1fr)!important}}
h1{font-size:26px;font-weight:600;margin:6px 0 4px;color:#4d3533}
h2{font-size:18px;margin:6px 0 8px}
h3{font-size:15px;margin:14px 0 6px}
.toprow{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.lastsaved{color:#73a89a;font-weight:700;font-size:14px;margin-bottom:6px}
.intro{margin:6px 0 10px;font-size:14px}
.langs{display:flex;gap:8px;margin:8px 0 14px}.langs.c{justify-content:center}
.lang{border:1px solid rgba(77,53,51,.1);background:#fff;border-radius:8px;padding:10px 18px;font:inherit;cursor:pointer;min-height:44px}
.lang.on{background:#73a89a;color:#fff;border-color:#73a89a}
.tabs{display:flex;gap:18px;border-bottom:1px solid rgba(77,53,51,.1);margin-bottom:12px}
.tab{background:none;border:0;border-bottom:2px solid transparent;padding:10px 2px;font:inherit;color:rgba(77,53,51,.7);cursor:pointer;min-height:44px}
.tab.on{color:#4d3533;border-bottom-color:#4d3533;font-weight:700}
section{margin:12px 0 18px}
.muted{color:rgba(77,53,51,.55)}.small{font-size:12.5px}
.daterow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:6px 0}
.dbig{font-size:17px;font-weight:700}
.btn,.btn2{font:inherit;border-radius:8px;cursor:pointer;min-height:42px;padding:8px 16px;border:1px solid rgba(77,53,51,.15)}
.btn{background:#2b2420;color:#fff;border-color:#2b2420;font-weight:600}
.btn.big{width:100%;min-height:46px;margin-top:8px}
.btn2{background:#fff;color:#4d3533}.btn2.sm{min-height:38px;padding:4px 12px;font-size:13px}
.btn:disabled{opacity:.6}
.cal{border:1px solid rgba(77,53,51,.1);border-radius:10px;padding:10px;margin:8px 0;background:#fff}
.calhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;gap:6px}
.calgrid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}
.cwd{font-size:12px;color:rgba(77,53,51,.6)}
.cday{position:relative;min-height:40px;border:2px solid transparent;background:#f6f2ef;border-radius:8px;font:inherit;cursor:pointer}
.cday.sel{background:#75a99b;color:#fff}.cday.nxt{border-color:#4f9b88}
.dot{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);width:5px;height:5px;border-radius:50%;background:#5b6fae}
.cday.sel .dot{background:#fff}
.gap{margin:6px 0}
.howbox{background:#f6f2ef;border-radius:10px;padding:10px 12px;margin:10px 0;font-size:12.5px}
.howbox .ind{padding-inline-start:14px}
.d{display:inline-block;width:7px;height:7px;border-radius:50%;margin-inline-end:6px}.d.b{background:#5c76ad}.d.g{background:#73a89a}
.racks{display:flex;flex-direction:column;gap:8px}
.card{background:#fff;border:1px solid rgba(77,53,51,.1);border-radius:10px;padding:10px 12px}
.card.off{background:#fdfaf3;border-color:#efe4cc}
.rhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.rname{font-weight:700}.rnum{color:#1f6a52;font-weight:800}
.badge-mod{background:#eef2f9;color:#516591;font-size:9.5px;padding:1px 6px;border-radius:6px}
.badge-run{background:#e6f3ee;color:#1f6a52;font-size:11px;padding:2px 8px;border-radius:6px}
.stbtn{font:inherit;font-size:13px;border:1px solid rgba(77,53,51,.15);background:#fff;border-radius:8px;min-height:38px;padding:4px 14px;cursor:pointer}
.stbtn.on{background:#e3f1ec;border-color:#4f9b88;color:#1f6a52;font-weight:700}
.offline{font-size:13px;color:rgba(77,53,51,.7)}
.grid3{display:grid;grid-template-columns:44px 1fr 1fr;gap:6px;align-items:center}
.colh{font-size:10.5px;font-weight:800;text-align:center}.prevc{color:#33477a}.curc{color:#1f6a52}
.rowl{font-size:12px}
.in{width:100%;height:38px;border-radius:8px;font-size:16px;text-align:end;padding:0 8px;font-family:inherit}
.in.prev{background:#eaf0fa;border:1.5px solid #a8bcdd;color:#2f4373;font-weight:600}
.in.cur{background:#eef9f4;border:1.5px solid #6fae9c;color:#14543f;font-weight:700}
.in::placeholder{color:#9aa7b8}
@media(min-width:900px){.in{height:40px}}
.ro-v{height:34px;display:flex;align-items:center;justify-content:flex-end;padding:0 8px;border-radius:8px;font-weight:700}
.ro-v.prev{background:#eaf0fa;color:#2f4373}.ro-v.cur{background:#eef9f4;color:#14543f}
.resbar{display:grid;grid-template-columns:repeat(3,1fr);background:#f1f7f5;border-radius:8px;margin-top:8px;padding:6px 0;text-align:center}
.resbar>div{border-inline-start:1px solid #d9e8e2}.resbar>div:first-child{border:0}
.resbar .lbl{display:block;font-size:10.5px;color:rgba(77,53,51,.6)}
.resbar b{font-size:15.5px;font-weight:800}.resbar small,.tv small{font-size:10px;color:rgba(77,53,51,.55)}
.c-h{color:#2f4373}.c-p{color:#1f6a52}.c-y{color:#4b4677}
.hint{color:rgba(77,53,51,.55);font-size:13px;margin-top:8px}
.totals{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tbox{background:#fff;border:1px solid rgba(77,53,51,.1);border-radius:8px;padding:8px 10px}
.tl{font-size:11px;color:rgba(77,53,51,.6)}.tv{font-size:19px;font-weight:800}
.report{direction:ltr;text-align:left;white-space:pre;overflow-x:auto;background:#eef9f4;border:1.5px solid #6fae9c;color:#14543f;border-radius:10px;padding:10px;font-size:12.5px;font-family:ui-monospace,Menlo,Consolas,monospace;user-select:text;-webkit-user-select:text;margin:8px 0}
.actrow{display:flex;align-items:center;gap:10px;margin:8px 0;flex-wrap:wrap}
.box{border-radius:10px;padding:10px 12px;margin:8px 0;font-size:14px;border:1px solid}
.box.err{background:#fdecec;border-color:#e6a8a8;color:#8a2a2a}.box.warn{background:#fff3e0;border-color:#efc78a;color:#8a5a12}.box.ok{background:#eef9f4;border-color:#6fae9c;color:#14543f}.box.info{background:#f6f2ef;border-color:rgba(77,53,51,.1)}
.hist{border-top:1px solid rgba(77,53,51,.1)}
.hrow{display:flex;width:100%;align-items:center;justify-content:space-between;gap:6px;background:none;border:0;border-bottom:1px solid rgba(77,53,51,.1);padding:10px 4px;font:inherit;cursor:pointer;text-align:start}
.hrow.sel{background:#f4f9f7}.hd{font-size:14px}.hm{display:flex;flex-direction:column;align-items:center;font-size:15px}.hm small{font-size:10px;color:rgba(77,53,51,.55)}
.hsub{display:block;font-size:11px;color:rgba(77,53,51,.6);margin-top:2px}
.pills{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 10px}
.pill{border:1px solid rgba(77,53,51,.15);background:#fff;border-radius:8px;min-height:38px;padding:4px 12px;font:inherit;cursor:pointer}.pill.on{background:#e3f1ec;border-color:#4f9b88;font-weight:700}
.login{max-width:380px;margin:40px auto;padding:0 16px}
.login label,.form label{display:block;margin:10px 0;font-size:14px}
.in2{display:block;width:100%;height:44px;border:1.5px solid rgba(77,53,51,.2);border-radius:8px;font-size:16px;padding:0 10px;margin-top:4px;font-family:inherit;background:#fff}
.mrow{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid rgba(77,53,51,.1);padding:10px 4px;flex-wrap:wrap}
.mrow select{height:38px;border-radius:8px;font:inherit;border:1px solid rgba(77,53,51,.2);background:#fff}
.mono{font-family:ui-monospace,Menlo,Consolas,monospace;word-break:break-all}
.audit{border-bottom:1px solid rgba(77,53,51,.1);padding:6px 0;font-size:13px}
#sbar{position:sticky;top:0;z-index:50}
.sbar{padding:10px 14px;font-size:14px;line-height:1.5;display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(0,0,0,.08)}
.sbar.off{background:#fff3d6;color:#6b4a00}
.sbar.pend{background:#e4efff;color:#1d3f75}
.sbar.ok{background:#e1f4ea;color:#1f6a52}
.sbar.err{background:#fde4e4;color:#8a1f1f}
.sbar.conf{background:#fde4e4;color:#6b1111;display:block}
.sbar.conf .actrow{margin-top:8px;display:flex;gap:8px;flex-wrap:wrap}

/* plant readings */
.subtabs{display:flex;gap:8px;margin:6px 0 10px}
.rrow{display:grid;grid-template-columns:1fr 132px;gap:8px;align-items:center;margin-top:6px}
.rrow .rlab{font-size:13px;font-weight:600}
.rfeed{background:#f4f9f7;border:1px solid #cfe5dc;border-radius:10px;padding:10px 12px;margin-bottom:8px}
.fxnote{background:#fdf6e8;border:1px solid #ecdcb8;color:#7a5b1e;border-radius:8px;padding:8px 10px;font-size:12px;margin:10px 0}

.rgrid{display:flex;flex-direction:column;gap:7px;margin-top:8px}
.rgrp{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;direction:ltr;padding:7px 6px 8px;border-radius:12px;border:1px solid var(--gb);background:var(--gbg);position:relative;box-shadow:inset 3px 0 0 var(--ga)}
.rgrp.g1{--ga:#2f8f74;--gb:#cfe7de;--gbg:linear-gradient(180deg,#f3fbf7,#eaf6f0);--gl:#1d6a53;--gi:#14543f}
.rgrp.g2{--ga:#4a6fbd;--gb:#d3ddf2;--gbg:linear-gradient(180deg,#f5f8fe,#ebf0fb);--gl:#2f4a8a;--gi:#243f7c}
.rgrp.g3{--ga:#d9822b;--gb:#f2dfc3;--gbg:linear-gradient(180deg,#fff9f0,#fcf1df);--gl:#9a5a14;--gi:#7d4a10}
.rcell{display:flex;flex-direction:column;gap:3px;direction:rtl;min-width:0}
.rcl{font-size:11px;line-height:1.25;font-weight:700;text-align:center;min-height:28px;display:flex;align-items:flex-end;justify-content:center;color:var(--gl)}
.rgrp .rcell .in{background:#fff;border:1.5px solid var(--gb);color:var(--gi);text-align:center;padding:0 2px;height:42px;font-weight:800;font-size:17px;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.rgrp .rcell .in:focus{outline:none;border-color:var(--ga);box-shadow:0 0 0 3px color-mix(in srgb,var(--ga) 22%,transparent)}
.rgrp .rcell .ro-v{background:#fff;border:1.5px solid var(--gb);color:var(--gi);justify-content:center;height:42px;padding:0 2px;border-radius:8px;font-weight:800}
.rgt{grid-column:1/-1;direction:rtl;text-align:center;font-size:12px;font-weight:800;color:var(--gl)}

.rgrp.g3 .rcl{min-height:0}.rgrp.g3{row-gap:4px}.rgt{margin-bottom:1px}

/* members chat */
.chatwrap .chatlist{display:flex;flex-direction:column;gap:10px;max-height:62vh;overflow-y:auto;padding:10px;border:1px solid rgba(77,53,51,.1);border-radius:12px;background:#fff;margin-top:8px}
.chatday{display:flex;justify-content:center;margin:2px 0 4px}
.chatday span{background:#f1ece7;color:rgba(77,53,51,.65);font-size:11.5px;font-weight:700;padding:3px 12px;border-radius:20px}
.cmsg{display:flex;gap:8px;align-items:flex-end;max-width:92%}
.cmsg.mine{align-self:flex-end;flex-direction:row-reverse}
.cav{width:30px;height:30px;border-radius:50%;background:#e3f1ec;color:#1f6a52;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;flex:0 0 30px}
.cbub{background:#f7f4f1;border:1px solid rgba(77,53,51,.08);border-radius:14px 14px 14px 4px;padding:7px 11px 8px;min-width:0}
.cmsg.mine .cbub{background:#e3f1ec;border-color:#cfe5dc;border-radius:14px 14px 4px 14px}
.chead{display:flex;align-items:center;gap:8px;margin-bottom:2px}
.chead b{font-size:12.5px;color:#1f6a52}
.cmsg.mine .chead b{color:#14543f}
.ctime{font-size:10.5px;color:rgba(77,53,51,.5)}
.cbody{font-size:15px;line-height:1.45;white-space:pre-wrap;word-break:break-word;color:#3a2b29}
.cdel{background:none;border:0;color:rgba(77,53,51,.35);font-size:16px;line-height:1;cursor:pointer;padding:0 2px}
.chatbar{display:flex;gap:8px;align-items:center;margin-top:10px;position:sticky;bottom:0;background:#fdfcfb;padding:8px 0}
.chatbar .in2{margin-top:0;flex:1}
.chatbar .btn{min-height:44px;padding:8px 20px}
.ubadge{background:#c0503a;color:#fff;font-size:10.5px;font-weight:800;border-radius:20px;padding:1px 6px;margin-inline-start:5px}
