:root{--bg:#f4eee7;--surface:#fffdfa;--surface-2:#f8f2eb;--line:#e8ddd1;--text:#2a1f17;--muted:#86766a;--brand:#7a4a2b;--brand-2:#96603b;--brand-ink:#fff;--brand-soft:#f1e4d6;--accent:#c4893a;--danger:#b3402a;--danger-soft:#fbe9e4;--ok:#2f7a4a;--ok-soft:#e4f3e9;--info:#2a6390;--info-soft:#e5eff8;--warn:#92600f;--warn-soft:#fff2dc;--shadow:0 1px 2px #3c230f0f, 0 4px 14px #3c230f0f;--radius:16px;--radius-sm:10px;--tabbar-h:64px;--font:"IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;font-family:var(--font);color:var(--text);background:var(--bg);-webkit-tap-highlight-color:transparent}@media (prefers-color-scheme:dark){:root{--bg:#15100d;--surface:#201913;--surface-2:#2a211a;--line:#3a2e25;--text:#f1e8de;--muted:#a8988a;--brand:#d39a68;--brand-2:#e2ad7f;--brand-ink:#1b120b;--brand-soft:#382819;--accent:#e0aa5c;--danger:#ec7c63;--danger-soft:#3d1f18;--ok:#7fc795;--ok-soft:#1c3324;--info:#8cc0ea;--info-soft:#1a2b3a;--warn:#f0c070;--warn-soft:#3a2c15;--shadow:0 1px 2px #0000004d, 0 4px 14px #00000040;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*{box-sizing:border-box}html,body{background:var(--bg);margin:0}body{min-height:100dvh;font-size:16px;line-height:1.5}h1,h2,h3,h4{margin:0 0 12px;line-height:1.3}h2{font-size:22px}h3{font-size:17px}h4{color:var(--muted);margin-top:18px;font-size:15px}a{color:var(--brand)}code{background:var(--surface-2);border-radius:6px;padding:1px 5px;font-size:.9em}img{max-width:100%}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}button,a.btn{font:inherit;white-space:nowrap;cursor:pointer;background:var(--brand);min-height:44px;color:var(--brand-ink);border:0;border-radius:12px;justify-content:center;align-items:center;gap:6px;padding:10px 18px;font-weight:600;text-decoration:none;transition:transform 80ms,background .15s;display:inline-flex}button:active,a.btn:active{transform:scale(.97)}button:disabled{opacity:.5;cursor:default;transform:none}button.secondary{background:var(--brand-soft);color:var(--brand)}button.danger{background:var(--danger);color:#fff}button.link{color:var(--brand);background:0 0;min-height:36px;padding:6px 10px;font-weight:600}button.link.danger{color:var(--danger);background:0 0}a.btn.wa{color:#fff;background:#1f8f4e}.big-btn{border-radius:var(--radius);width:100%;min-height:56px;margin-bottom:10px;font-size:18px}input,select,textarea{font:inherit;border:1.5px solid var(--line);background:var(--surface);width:100%;min-height:46px;color:var(--text);border-radius:12px;padding:10px 12px;font-size:16px;transition:border-color .15s}input:focus,select:focus,textarea:focus{border-color:var(--brand);outline:none}input[type=checkbox]{width:20px;height:20px;min-height:0;accent-color:var(--brand)}label{color:var(--muted);flex-direction:column;gap:6px;font-size:14px;font-weight:500;display:flex}label>input,label>select,label>textarea{color:var(--text)}label.check{color:var(--text);flex-direction:row;align-items:center;gap:8px}.shell{min-height:100dvh;padding-bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom,0px) + 12px)}.shell.no-tabs{padding-bottom:0}.appbar{z-index:10;padding:calc(env(safe-area-inset-top,0px) + 10px) 16px 10px;background:color-mix(in srgb, var(--bg) 88%, transparent);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--line);align-items:center;gap:10px;display:flex;position:sticky;top:0}.appbar .logo{background:var(--brand);width:36px;height:36px;color:var(--brand-ink);letter-spacing:.5px;border-radius:10px;flex:none;place-items:center;font-size:14px;font-weight:700;display:grid}.appbar .title{flex:1;min-width:0}.appbar .title strong{letter-spacing:.5px;color:var(--brand);font-size:16px;display:block}.appbar .title span{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;font-size:12px;display:block;overflow:hidden}.icon-btn{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:50%;flex:none;width:42px;height:42px;min-height:0;padding:0}.icon-btn svg,.tab svg,.more-grid svg{stroke:currentColor;fill:none;stroke-width:1.9px;stroke-linecap:round;stroke-linejoin:round;width:22px;height:22px}.content{max-width:960px;margin:0 auto;padding:16px}.tabbar{inset-inline:0;z-index:15;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom,0px);display:flex;position:fixed;bottom:0;box-shadow:0 -4px 16px #0000000d}.tab{min-height:var(--tabbar-h);color:var(--muted);background:0 0;border-radius:0;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:3px;padding:6px 2px;font-size:12px;font-weight:600;text-decoration:none;display:flex;position:relative}.tab:active{transform:none}.tab.active{color:var(--brand)}.tab.active:before{content:"";background:var(--brand);border-radius:0 0 3px 3px;width:36px;height:3px;position:absolute;top:0}.tab .dot{top:6px;background:var(--danger);color:#fff;border-radius:10px;place-items:center;min-width:19px;height:19px;padding:0 5px;font-size:11px;display:grid;position:absolute;inset-inline-start:calc(50% + 6px)}@media (width>=900px){.tabbar{inset-inline:auto;border:1px solid var(--line);border-radius:18px 18px 0 0;width:560px;left:50%;transform:translate(-50%)}}.more-grid{grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px;display:grid}.more-grid a{background:var(--surface-2);color:var(--text);text-align:center;border-radius:14px;flex-direction:column;align-items:center;gap:6px;padding:14px 6px;font-size:14px;font-weight:600;text-decoration:none;display:flex}.more-grid a.active{background:var(--brand-soft);color:var(--brand)}.more-grid svg{width:26px;height:26px;color:var(--brand)}.center-page{place-items:center;min-height:100dvh;padding:16px;display:grid}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:14px;padding:16px}.narrow{flex-direction:column;gap:14px;width:100%;max-width:400px;display:flex}.brand{color:var(--brand);letter-spacing:.5px}.brand.big{text-align:center;margin:0;font-size:30px}.login-logo{background:var(--brand);width:76px;height:76px;color:var(--brand-ink);letter-spacing:1px;border-radius:22px;place-items:center;margin:0 auto;font-size:26px;font-weight:700;display:grid}.page-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;display:flex}.page-head h2{margin:0}.toolbar{flex-wrap:wrap;gap:8px;margin-bottom:10px;display:flex}.filters{flex-wrap:wrap;gap:8px;margin-bottom:14px;display:flex}.filters input{flex:2;min-width:170px}.filters select{flex:1;min-width:130px}.filters label.check{flex:none}.form{flex-direction:column;gap:14px;display:flex}.grid3{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));align-items:end;gap:12px;display:grid}.two-col{grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:14px;display:grid}.muted{color:var(--muted);font-size:14px}.center{text-align:center}.error{color:var(--danger);background:var(--danger-soft);border-radius:12px;margin:8px 0;padding:10px 12px}.success{color:var(--ok);background:var(--ok-soft);border-radius:12px;margin:8px 0;padding:10px 12px;font-weight:600}.neg{color:var(--danger)}.pos{color:var(--ok)}.small{margin-inline-start:8px;font-size:13px;font-weight:500}.total{margin:4px 0;font-size:18px;font-weight:700}.stat-inline{padding-bottom:10px}.badge{background:var(--danger);color:#fff;border-radius:10px;margin-inline-start:6px;padding:1px 7px;font-size:11px}.stats{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:14px;display:grid}.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);flex-direction:column;gap:4px;padding:14px;display:flex}.stat span{color:var(--muted);font-size:13px}.stat strong{font-size:20px}.list{margin:0;padding:0;list-style:none}.list li{border-bottom:1px solid var(--line);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;padding:11px 0;display:flex}.list li:last-child{border-bottom:0}.list li.net{color:var(--brand);font-size:18px;font-weight:700}.list a{font-weight:600;text-decoration:none}.table-wrap{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:14px;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:15px}th,td{border-bottom:1px solid var(--line);text-align:start;white-space:nowrap;padding:11px 12px}th{background:var(--surface-2);color:var(--muted);font-size:13px;font-weight:600}tr:last-child td{border-bottom:0}tr.low td{background:var(--warn-soft)}tr.muted td{color:var(--muted)}td.actions{flex-wrap:wrap;gap:2px;display:flex}td input,td select{min-width:90px;min-height:40px;padding:7px 9px}@media (width<=700px){.table-wrap{box-shadow:none;background:0 0;border:0;overflow:visible}.table-wrap table,.table-wrap tbody,.table-wrap tr,.table-wrap td{width:100%;display:block}.table-wrap thead{display:none}.table-wrap tr{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:10px;padding:8px 14px}.table-wrap tr.low{border-color:var(--accent)}.table-wrap tr.low td{background:0 0}.table-wrap td{white-space:normal;text-align:end;border:0;justify-content:space-between;align-items:center;gap:12px;padding:7px 0;display:flex}.table-wrap td:before{content:attr(data-label);color:var(--muted);text-align:start;flex:none;font-size:13px}.table-wrap td:not([data-label]):before,.table-wrap td[data-label=""]:before{display:none}.table-wrap td:first-child{font-size:16px;font-weight:700}.table-wrap td.actions{border-top:1px solid var(--line);justify-content:flex-start;margin-top:6px;padding-top:8px}.table-wrap td[colspan]{text-align:center;justify-content:center}.table-wrap td>input,.table-wrap td>select{max-width:62%}}.modal-backdrop{z-index:40;background:#140c0673;justify-content:center;align-items:flex-end;animation:.15s ease-out fade;display:flex;position:fixed;inset:0}.modal{background:var(--surface);width:100%;max-width:760px;max-height:92dvh;padding:8px 16px calc(20px + env(safe-area-inset-bottom,0px));border-radius:22px 22px 0 0;animation:.2s ease-out slide-up;overflow:auto}.modal:before{content:"";background:var(--line);border-radius:3px;width:42px;height:5px;margin:4px auto 10px;display:block}.modal-head{background:var(--surface);z-index:1;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px;padding:4px 0;display:flex;position:sticky;top:-8px}.modal-head h3{margin:0}@media (width>=760px){.modal-backdrop{align-items:center;padding:16px}.modal{border-radius:22px}}@keyframes fade{0%{opacity:0}}@keyframes slide-up{0%{opacity:.6;transform:translateY(40px)}}.scan-page{max-width:560px;margin:0 auto}.scan-row{gap:8px;margin:12px 0;display:flex}.scan-row input{flex:1}.reader{border-radius:var(--radius);background:#000;width:100%;margin-bottom:8px;overflow:hidden}.labels{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;display:grid}.label{text-align:center;color:#000;break-inside:avoid;background:#fff;border:1px dashed #bbb;border-radius:8px;padding:8px}.label-name{margin-bottom:4px;font-size:14px;font-weight:600}.label svg{max-width:100%;height:auto}.status{background:var(--brand-soft);color:var(--brand);white-space:nowrap;border-radius:20px;padding:3px 10px;font-size:12px;font-weight:600;display:inline-block}.status.st-new{background:var(--info-soft);color:var(--info)}.status.st-in_production{background:var(--warn-soft);color:var(--warn)}.status.st-ready{background:var(--ok-soft);color:var(--ok)}.status.st-delivered{background:var(--surface-2);color:var(--muted)}.status.st-cancelled{background:var(--danger-soft);color:var(--danger)}.jobs{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;display:grid}.job{border-inline-start:5px solid var(--info);flex-direction:column;gap:10px;margin:0;display:flex}.job.st-in_production{border-inline-start-color:var(--accent)}.job.late{border-inline-start-color:var(--danger)}.job-head{justify-content:space-between;align-items:start;gap:8px;display:flex}.job-head h3{margin:0;font-size:17px}.job ul{margin:0;padding-inline-start:20px}.job .notes{background:var(--surface-2);white-space:pre-wrap;border-radius:10px;padding:10px;font-size:14px}.job .toolbar{margin:0}.job .toolbar button{flex:1}.period{justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px;display:flex}.period strong{text-align:center;flex:1}.period button{min-width:44px;padding:0}.cal{grid-template-columns:repeat(7,1fr);gap:6px;max-width:460px;margin:0 auto;display:grid}.cal .wd{text-align:center;color:var(--muted);font-size:12px}.cal .d{aspect-ratio:1;background:var(--surface-2);min-height:0;color:var(--text);border:0;border-radius:10px;place-items:center;padding:0;font-size:15px;font-weight:600;display:grid}.cal .d.abs{background:var(--danger);color:#fff}.cal .d.half{background:var(--danger-soft);color:var(--danger);box-shadow:inset 0 0 0 2px var(--danger)}.cal .d.future{opacity:.45}.cal .d.today:not(.abs):not(.half){background:var(--brand);color:var(--brand-ink)}.legend{color:var(--muted);flex-wrap:wrap;justify-content:center;gap:16px;margin-top:12px;font-size:13px;display:flex}.legend i{vertical-align:middle;border-radius:3px;width:12px;height:12px;margin-inline-end:5px;display:inline-block}.lg-present{background:var(--surface-2);border:1px solid var(--line)}.lg-abs{background:var(--danger)}.lg-half{background:var(--danger-soft);box-shadow:inset 0 0 0 2px var(--danger)}.chat-list{margin:0;padding:0;list-style:none}.chat-list a{border-bottom:1px solid var(--line);color:var(--text);align-items:center;gap:12px;padding:12px 4px;text-decoration:none;display:flex}.avatar{background:var(--brand-soft);width:48px;height:48px;color:var(--brand);border-radius:50%;flex:none;place-items:center;font-size:18px;font-weight:700;display:grid}.avatar.team{background:var(--brand);color:var(--brand-ink);border-radius:14px}.avatar svg{stroke:currentColor;fill:none;stroke-width:1.9px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}.chat-main{flex:1;min-width:0}.chat-main b{display:block}.chat-main span{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;font-size:14px;display:block;overflow:hidden}.chat-end{color:var(--muted);flex-direction:column;align-items:flex-end;gap:6px;font-size:12px;display:flex}.unread{background:var(--brand);color:var(--brand-ink);border-radius:12px;place-items:center;min-width:22px;height:22px;padding:0 6px;font-size:12px;font-weight:700;display:grid}.chat-page{background:var(--bg);flex-direction:column;height:100dvh;display:flex}.chat-head{padding:calc(env(safe-area-inset-top,0px) + 8px) 12px 8px;background:var(--surface);border-bottom:1px solid var(--line);align-items:center;gap:10px;display:flex}.chat-head .avatar{width:40px;height:40px;font-size:16px}.chat-head .chat-main b{font-size:16px}.msgs{flex-direction:column;flex:1;gap:6px;padding:12px;display:flex;overflow-y:auto}.day{color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:20px;align-self:center;margin:10px 0 4px;padding:3px 12px;font-size:12px}.msg{background:var(--surface);border-radius:16px;word-wrap:break-word;max-width:82%;box-shadow:var(--shadow);border-start-start-radius:4px;align-self:flex-start;padding:8px 12px 6px;position:relative}.msg.mine{background:color-mix(in srgb, var(--brand) 22%, var(--surface));border-start-start-radius:16px;border-start-end-radius:4px;align-self:flex-end}.msg p{white-space:pre-wrap;margin:0}.msg .who{color:var(--accent);margin-bottom:2px;font-size:13px;font-weight:700;display:block}.msg .meta{color:var(--muted);text-align:end;justify-content:flex-end;align-items:center;gap:6px;margin-top:3px;font-size:11px;display:flex}.msg .seen{color:var(--ok)}.msg img{object-fit:cover;cursor:zoom-in;background:var(--surface-2);border-radius:10px;width:100%;min-height:120px;max-height:320px;margin:2px 0 6px;display:block}.msg .del{min-height:0;margin-top:4px;padding:2px 8px;font-size:12px}.composer{padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));background:var(--surface);border-top:1px solid var(--line);align-items:flex-end;gap:8px;display:flex}.composer textarea{resize:none;border-radius:22px;flex:1;min-height:44px;max-height:130px;padding:10px 16px;line-height:1.4}.composer .icon-btn{width:44px;height:44px}.composer .send{border-radius:50%;flex:none;width:44px;height:44px;min-height:0;padding:0}.composer .send svg{fill:currentColor;stroke:none;width:20px;height:20px;transform:scaleX(-1)}.viewer{z-index:60;background:#000;place-items:center;display:grid;position:fixed;inset:0}.viewer img{max-width:100%;max-height:100%}.viewer button{top:calc(12px + env(safe-area-inset-top,0px));color:#fff;background:#ffffff26;position:absolute;inset-inline-start:12px}.invoice{max-width:820px;margin:0 auto;padding:24px}.invoice-head{border-bottom:2px solid var(--brand);flex-wrap:wrap;justify-content:space-between;gap:16px;margin-bottom:12px;padding-bottom:12px;display:flex}.invoice-head h1{margin:0;font-size:26px}.invoice-head p,.invoice-meta p{margin:2px 0}.invoice-meta h2{margin:0 0 4px;font-size:20px}.invoice-to{background:var(--surface-2);border-radius:10px;margin-bottom:8px;padding:10px 12px}.invoice table{margin:8px 0 12px}.invoice th,.invoice td{white-space:normal}.invoice-sum{max-width:360px;margin-inline-start:auto}.invoice-sum div{border-bottom:1px solid var(--line);justify-content:space-between;gap:12px;padding:5px 0;display:flex}.invoice-sum .grand{font-size:17px;font-weight:700}.invoice-foot{color:var(--muted);justify-content:space-between;margin-top:48px;display:flex}.invoice-foot div{border-top:1px solid var(--line);text-align:center;min-width:140px;padding-top:6px}@media print{:root{--bg:#fff;--surface:#fff;--surface-2:#fff;--line:#ddd;--text:#000;--muted:#555;--brand:#7a4a2b;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}.no-print,.appbar,.tabbar{display:none!important}.shell{padding:0}body,.content{background:#fff;padding:0}.card,.stat{box-shadow:none}.invoice{border:0;max-width:none;padding:0}.invoice-to,.label{border:1px solid #ddd}}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
