:root{--navy:#163447;--blue:#1d6e98;--gold:#e7a917;--bg:#f3f6f9;--card:#fff;--line:#d7dfe7;--muted:#617385;--ok:#1f8a4c;--red:#d32f2f;--u1:#e53935;--u2:#f57c00;--u3:#f2c200;--u4:#43a047}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,"Noto Sans Hebrew",sans-serif;background:var(--bg);color:#13202c;font-size:16px;line-height:1.35;padding-bottom:calc(76px + env(safe-area-inset-bottom));overflow-x:hidden}
button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
input,textarea,select{font:inherit;font-size:17px}
a{color:var(--blue)}
.num,bdi.num{direction:ltr;unicode-bidi:isolate}
.top{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:10px;background:#fff;border-bottom:1px solid var(--line);padding:calc(8px + env(safe-area-inset-top)) 12px 8px}
.top-logo{width:44px;height:44px;border-radius:12px;object-fit:contain;background:#fff;flex:0 0 auto}
.top-logo[src=""]{display:none}
.top-title{display:flex;flex-direction:column;min-width:0;flex:1}
.top-title strong{font-size:18px;color:var(--navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-title span{font-size:13px;color:var(--muted)}
.top-btn{border:none;background:#eef3f7;border-radius:12px;width:44px;height:44px;font-size:21px}
.sync-chip{border:none;border-radius:12px;height:34px;padding:0 9px;font-size:13px;font-weight:700;background:#eef3f7;color:var(--muted);white-space:nowrap}
.sync-chip.ok{background:#e6f4ec;color:var(--ok)}.sync-chip.busy{background:#fff6dc;color:#8a5a00}.sync-chip.warn{background:#fde7e5;color:var(--red)}
main{max-width:1100px;margin:0 auto;padding:10px 10px 0}
.tools{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}
.srch input{width:100%;height:46px;border:1.5px solid var(--line);border-radius:14px;padding:0 14px;background:#fff}
.srch input:focus,.fld input:focus,.fld textarea:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(29,110,152,.18)}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.filt{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px}
.filt::-webkit-scrollbar{display:none}
.chip{border:1.5px solid var(--line);background:#fff;border-radius:999px;min-height:38px;padding:4px 12px;font-size:15px;font-weight:600;white-space:nowrap}
.chip[aria-pressed="true"]{background:var(--navy);border-color:var(--navy);color:#fff}
.sum{font-size:14px;color:var(--muted)}
.sum b{color:var(--navy)}
.thead{display:none}
.list{display:flex;flex-direction:column;gap:7px}
.row{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr) auto 50px;grid-template-areas:"n cust urg done" "n desc desc done" "n addr addr done";gap:4px 8px;align-items:center;background:var(--card);border:1px solid var(--line);border-inline-start:6px solid var(--u3);border-radius:14px;padding:9px 8px 9px 6px;min-height:64px;cursor:pointer}
.row.u1{border-inline-start-color:var(--u1);background:#fff7f6}.row.u2{border-inline-start-color:var(--u2)}.row.u3{border-inline-start-color:var(--u3)}.row.u4{border-inline-start-color:var(--u4)}
.row.flash{animation:flash 1.1s ease}
@keyframes flash{0%{box-shadow:0 0 0 3px var(--gold)}100%{box-shadow:0 0 0 0 transparent}}
.c-n{grid-area:n;align-self:start;display:flex;flex-direction:column;align-items:center;gap:2px}
.nb{min-width:36px;height:36px;border-radius:10px;background:#eef3f7;color:var(--navy);font-weight:800;display:flex;align-items:center;justify-content:center;font-size:16px;padding:0 4px}
.c-cust{grid-area:cust;min-width:0;display:flex;flex-direction:column}
.c-cust .nm{font-weight:800;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.c-cust .ph{font-size:14px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dm.today{color:var(--blue);font-weight:700}.dm.late{color:var(--red);font-weight:700}
.c-date{grid-area:date;display:none;font-size:13.5px;color:var(--muted);white-space:nowrap}
.c-date.today{color:var(--blue);font-weight:700}.c-date.late{color:var(--red);font-weight:700}
.c-desc{grid-area:desc;font-size:15px;color:#24313d;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:pre-line}
.c-addr{grid-area:addr;min-width:0;display:flex;gap:5px;align-items:center}
.c-addr:empty{display:none}
.ib{flex:0 0 auto;border:none;background:#eef3f7;border-radius:10px;height:38px;min-width:38px;justify-content:center;padding:0 9px;font-size:15px;font-weight:600;display:inline-flex;align-items:center;gap:4px;text-decoration:none;color:var(--navy);max-width:100%}
.ib.addr{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block;line-height:38px;text-align:start;max-width:max-content}
.ib.wa{background:#e3f6ea;color:#127a3c}
.c-urg{grid-area:urg;display:flex;flex-direction:column;align-items:center;gap:3px;align-self:start}
.dm{font-size:13px;color:var(--muted);white-space:nowrap}
.up{border:none;border-radius:999px;height:32px;padding:0 10px;font-size:14px;font-weight:700;white-space:nowrap;background:#fff6cc;color:#6d5400}
.up.u1{background:#fde3e1;color:#b3261e}.up.u2{background:#ffe9d2;color:#9a4b00}.up.u4{background:#e3f3e4;color:#1f6b25}
.c-done{grid-area:done;display:flex;justify-content:center;align-items:center;height:100%}
.ck{width:46px;height:46px;border-radius:12px;border:2px solid #b8c6d3;background:#fff;font-size:24px;line-height:1;display:flex;align-items:center;justify-content:center;color:#d3dce5}
.ck.on{background:var(--ok);border-color:var(--ok);color:#fff}
.row.empty{grid-template-areas:"n cust cust done";border-style:dashed;border-inline-start:6px dashed #c6d2dd;background:#fbfcfd;min-height:56px}
.row.empty .ph-empty{grid-area:cust;color:#8b9aa8;font-size:16px}
.row.empty .ck{opacity:.35}
.row.done{opacity:.62;background:#f6f8f9;border-inline-start-color:#9fb0bf}
.row.done .nm{text-decoration:line-through}
.done-wrap{margin-top:14px}
.dh{width:100%;border:none;background:#e6edf2;border-radius:12px;min-height:46px;font-weight:800;color:var(--navy);display:flex;justify-content:space-between;align-items:center;padding:0 14px;font-size:16px}
.done-wrap .list{margin-top:7px}
.empty-msg{text-align:center;color:var(--muted);padding:22px 8px}
.foot{text-align:center;color:var(--muted);font-size:13px;padding:18px 0 10px}
.bbar{position:fixed;bottom:0;inset-inline:0;z-index:30;display:flex;gap:6px;background:rgba(255,255,255,.97);border-top:1px solid var(--line);padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
.bb{flex:1;border:none;background:#eef3f7;border-radius:12px;min-height:50px;font-weight:700;font-size:15px;color:var(--navy);padding:0 4px;white-space:nowrap}
.bb.gold,.btn.gold{background:var(--gold);color:#1d1600}
#toast{position:fixed;bottom:calc(84px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%) translateY(20px);background:#13202c;color:#fff;padding:10px 16px;border-radius:12px;opacity:0;pointer-events:none;transition:.2s;z-index:200;max-width:92vw;text-align:center;font-weight:600}
#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
/* sheet */
.ov{position:fixed;inset:0;z-index:60;background:rgba(10,25,40,.45);display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--bg);width:100%;max-width:620px;max-height:94vh;max-height:94dvh;overflow-y:auto;-webkit-overflow-scrolling:touch;border-radius:18px 18px 0 0;padding:12px 14px calc(16px + env(safe-area-inset-bottom));overscroll-behavior:contain}
.sh-head{display:flex;align-items:center;gap:8px;margin-bottom:8px;position:sticky;top:-12px;background:var(--bg);padding:6px 0;z-index:2}
.sh-head h2{margin:0;font-size:20px;color:var(--navy);flex:1}
.x{border:none;background:#e3e9ef;border-radius:12px;width:44px;height:44px;font-size:20px}
.fld{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}
.fld label{font-weight:700;color:var(--navy);font-size:15px}
.fld input,.fld textarea{width:100%;min-height:50px;border:1.5px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff}
.fld textarea{min-height:74px;resize:vertical}
.fld input[type=date]{-webkit-appearance:none;appearance:none;text-align:right;display:block}
.fld .row2{display:flex;gap:6px;flex-wrap:wrap;margin-top:2px}
.uchips{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.uc{border:2px solid var(--line);background:#fff;border-radius:12px;min-height:52px;font-weight:800;font-size:16px}
.uc[aria-pressed="true"].u1{background:#fde3e1;border-color:var(--u1);color:#b3261e}
.uc[aria-pressed="true"].u2{background:#ffe9d2;border-color:var(--u2);color:#9a4b00}
.uc[aria-pressed="true"].u3{background:#fff6cc;border-color:var(--u3);color:#6d5400}
.uc[aria-pressed="true"].u4{background:#e3f3e4;border-color:var(--u4);color:#1f6b25}
.donebox{display:flex;align-items:center;gap:12px;background:#fff;border:1.5px solid var(--line);border-radius:12px;padding:10px 12px;font-weight:800;font-size:17px;margin:4px 0 12px;min-height:56px}
.donebox input{width:28px;height:28px;margin:0;accent-color:var(--ok)}
.btns{display:flex;gap:8px;flex-wrap:wrap}
.btn{border:none;background:#e3e9ef;color:var(--navy);border-radius:12px;min-height:50px;padding:0 16px;font-weight:800;font-size:16px;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none}
.btn.blue{background:var(--blue);color:#fff}
.btn.danger{background:#fde7e5;color:var(--red)}
.btn.ghost{background:transparent;border:1.5px solid var(--line)}
.btn.sm{min-height:40px;padding:0 12px;font-size:15px}
.btn.block{width:100%}
.btn.wa{background:#25d366;color:#fff}
.grow{flex:1}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:12px}
.card h3{margin:0 0 8px;font-size:17px;color:var(--navy)}
.muted{color:var(--muted);font-size:14px}
.f{font-weight:700;color:var(--navy);display:block;margin:8px 0 4px}
.inp{width:100%;min-height:48px;border:1.5px solid var(--line);border-radius:12px;padding:8px 12px;background:#fff}
.hint{font-size:13px;color:var(--muted);margin-top:3px}
.logos{display:flex;gap:8px;flex-wrap:wrap}
.lg{border:2px solid var(--line);background:#fff;border-radius:14px;width:84px;height:84px;padding:4px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;flex-direction:column;gap:2px}
.lg img{max-width:58px;max-height:52px;object-fit:contain}
.lg[aria-pressed="true"]{border-color:var(--blue);box-shadow:0 0 0 3px rgba(29,110,152,.2)}
.menu{position:fixed;z-index:70;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:6px;display:flex;flex-direction:column;gap:4px;min-width:170px}
.menu button{border:none;background:#f3f6f9;border-radius:10px;min-height:46px;font-weight:700;font-size:16px;text-align:start;padding:0 12px}
.sy-stat{font-weight:800}.sy-stat.ok{color:var(--ok)}.sy-stat.busy{color:#8a5a00}.sy-stat.warn{color:var(--red)}.sy-stat.off{color:var(--muted)}
.sy-warn{background:#fff4d6;border-radius:10px;padding:8px 10px;font-size:14px;margin:8px 0;color:#6b4a00}
.sy-msg{color:var(--red);font-weight:700;min-height:1.2em;margin:6px 0}
.pdf-stage{position:fixed;left:-20000px;top:0;background:#fff;color:#000;direction:rtl}
.pp{width:1060px;padding:0;background:#fff;color:#000;font-family:Arial,"Noto Sans Hebrew",sans-serif}
.pp .ph{display:flex;align-items:center;gap:12px;border-bottom:2px solid #163447;padding-bottom:8px;margin-bottom:8px}
.pp .ph img{width:62px;height:62px;object-fit:contain}
.pp .ph .t{flex:1}.pp .ph .t b{font-size:22px;display:block}.pp .ph .t span{font-size:14px;color:#333}
.pp .ph .r{font-size:13px;text-align:left;color:#333}
.pp table{width:100%;border-collapse:collapse;font-size:13.5px}
.pp th,.pp td{border:1px solid #333;padding:5px 6px;text-align:right;vertical-align:top}
.pp th{background:#e9eef3}
.pp td.n,.pp td.d,.pp td.u,.pp td.k{white-space:nowrap;text-align:center}
.pp tr.dn td{color:#666}
.pp .pf{font-size:11.5px;color:#555;margin-top:6px;display:flex;justify-content:space-between}
#printArea{display:none}
@media (min-width:760px){
  body{font-size:15px}
  .tools{flex-direction:row;flex-wrap:wrap;align-items:center}.srch{flex:1;min-width:280px}.sum{width:100%}
  .thead{display:grid;grid-template-columns:54px 96px minmax(0,1.3fr) minmax(0,2fr) minmax(0,1.4fr) 100px 58px;gap:8px;padding:6px 8px 6px 6px;font-size:13px;font-weight:800;color:var(--muted);border-inline-start:6px solid transparent}
  .row,.row.empty{grid-template-columns:54px 96px minmax(0,1.3fr) minmax(0,2fr) minmax(0,1.4fr) 100px 58px;grid-template-areas:"n date cust desc addr urg done";align-items:center;border-radius:10px;min-height:56px}
  .row.empty{grid-template-areas:"n cust cust cust cust cust done"}
  .c-n{align-self:center}
  .c-date{display:block}.dm{display:none}
  .c-desc{-webkit-line-clamp:3}
}
@media print{
  body{padding:0;background:#fff}
  .top,.bbar,main,#licbar,#toast,.ov,.menu{display:none!important}
  #printArea{display:block}
  #printArea .pp{width:auto}
  @page{size:A4 landscape;margin:10mm}
}
/* licence (pro edition) */
.lic-chip{display:inline-flex;align-items:center;gap:4px;border:none;background:#e6f4ec;color:var(--ok);border-radius:10px;padding:1px 8px;font-size:12px;font-weight:700;cursor:pointer;width:max-content;max-width:100%;margin-top:2px}
.lic-chip.warn{background:#fff4d6;color:#8a5a00}
.lic-chip.bad{background:#fde7e5;color:var(--red)}
#licbar{max-width:1100px;margin:0 auto;padding:0 10px}
#licbar:not(:empty){padding-top:10px}
#licbar .lb{border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:8px;font-size:15.5px;line-height:1.35}
#licbar .lb.l14{background:#fff8e1;border:1.5px solid #f0c94a}
#licbar .lb.l7{background:#ffeedd;border:2px solid #e9893a}
#licbar .lb.l3{background:#fde7e5;border:2px solid var(--red)}
#licbar .lb.exp{background:#b3261e;color:#fff;border:none;font-size:16.5px}
#licbar .lb b{font-size:17px}
#licbar .lb .actions{margin:0}
#licbar .lb.exp .btn.ghost{background:#fff;color:var(--red);border:none}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.lic-ov{position:fixed;inset:0;z-index:80;background:var(--bg);overflow-y:auto;padding:calc(18px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom))}
.lic-ov .in{max-width:460px;margin:0 auto}
.lic-ov .hero{text-align:center;margin:6px 0 14px}
.lic-ov .hero img{width:88px;height:88px;border-radius:20px}
.lic-ov h1{text-align:center;margin:8px 0 4px;color:var(--navy)}
.lic-ov textarea{width:100%;border:1.5px solid var(--line);border-radius:12px;padding:10px;direction:ltr;text-align:left;font-family:ui-monospace,Menlo,monospace;font-size:15px;min-height:96px;letter-spacing:.5px;text-transform:uppercase}
.lic-modal textarea{width:100%;border:1.5px solid var(--line);border-radius:12px;padding:10px;direction:ltr;text-align:left;font-family:ui-monospace,Menlo,monospace;font-size:15px;min-height:90px;text-transform:uppercase}
.lic-err{color:var(--red);font-weight:700;margin-top:8px}
.lic-ok{color:var(--ok);font-weight:700;margin-top:8px}
.devid{direction:ltr;unicode-bidi:isolate;font-family:ui-monospace,Menlo,monospace;font-weight:700;letter-spacing:1px}
.lic-modal{position:fixed;inset:0;z-index:85;background:rgba(10,25,40,.45);display:flex;align-items:flex-end;justify-content:center}
.lic-modal .sheetbox{background:var(--bg);width:100%;max-width:560px;max-height:92vh;overflow-y:auto;border-radius:18px 18px 0 0;padding:16px 14px calc(18px + env(safe-area-inset-bottom))}
.lic-stat{font-size:17px;font-weight:800}.lic-stat.ok{color:var(--ok)}.lic-stat.warn{color:#8a5a00}.lic-stat.bad{color:var(--red)}
.terms-ov{z-index:105}
.terms-box{background:#fff;border:1px solid #d5dde6;border-radius:14px;padding:10px 12px;max-height:52vh;overflow-y:auto;-webkit-overflow-scrolling:touch;font-size:15px;line-height:1.55;overscroll-behavior:contain}
.terms-box.terms-read{max-height:none}
.terms-ol{margin:0;padding-inline-start:22px}.terms-ol li{margin:0 0 9px}.terms-ol b{color:var(--navy)}
.terms-foot{border-top:1px dashed #c9d3dd;margin-top:8px;padding-top:8px;font-size:13px;color:#5b6b7b;text-align:center}
.terms-hint{text-align:center;font-weight:700;color:#8a5a00;margin:8px 0 4px;font-size:14px}.terms-hint.ok{color:var(--ok)}
.terms-chk{display:flex;align-items:center;gap:10px;font-weight:800;font-size:16px;margin:8px 0 12px;padding:10px 12px;border-radius:12px;background:#eef6fb}
.terms-chk input{width:24px;height:24px;flex:0 0 auto;margin:0}.terms-chk.dis{opacity:.5}
.terms-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.lic-price{background:#eef6fb;border:1.5px solid #bcd8ea;color:var(--navy);border-radius:12px;padding:9px 11px;font-weight:700;font-size:15px;line-height:1.45;margin:0 0 12px;text-align:center}
.lic-price-sm{margin:0 0 10px;font-weight:700;color:var(--navy);font-size:14.5px;line-height:1.4}
.lb .lb-price{font-weight:700}
body.lic-gated{overflow:hidden}

.hinote{margin-top:12px;background:#f3f7fa;border:1px solid var(--line);border-radius:12px;padding:10px 12px;font-size:14px;line-height:1.45;color:#25313b}
.hinote p{margin:0}
.hinote p+p{margin-top:6px}
.lic-ylink{margin-top:6px;font-size:14px}
.lic-save{margin-top:4px;font-size:14px;color:#128c4a;font-weight:800}
.lic-ylink a,.lb-price a{color:#128c4a;font-weight:800;text-decoration:underline}
