:root{--primary:#0b63ce;--primary-dark:#0a4fa6;--bg:#f4f6fa;--card:#fff;--text:#1a2233;--muted:#6b778c;--border:#dde3ee;--danger:#d03a3a;--ok:#1a9d54;--warn:#c77700;--radius:14px;--nav-h:60px;color:var(--text);background:var(--bg);-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;line-height:1.45}*{box-sizing:border-box}body{background:var(--bg);min-height:100dvh;margin:0}h1{margin:.4rem 0;font-size:1.35rem}h2{margin:0;font-size:1.25rem}h3{margin:.5rem 0 0;font-size:1.05rem}p{margin:0}a{color:var(--primary)}code,pre{background:#eef2f8;border-radius:8px;padding:2px 6px;font-size:.9em}pre{padding:10px;overflow-x:auto}.muted{color:var(--muted)}.small{font-size:.85rem}.center{text-align:center;padding:1rem 0}.grow{flex:1}.app{flex-direction:column;min-height:100dvh;display:flex}.topbar{z-index:20;padding:calc(env(safe-area-inset-top) + 10px) 16px 10px;background:var(--primary);color:#fff;align-items:center;gap:10px;display:flex;position:sticky;top:0}.brand{font-weight:700}.who{opacity:.9;font-size:.85rem}.link{color:#fff;font:inherit;background:0 0;border:0;padding:6px;text-decoration:underline}.offline{color:#7a5200;background:#fff4d6;padding:8px 16px;font-size:.9rem}.content{width:100%;max-width:720px;padding:14px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 90px);flex-direction:column;flex:1;gap:12px;margin:0 auto;display:flex}.bottomnav{z-index:20;height:calc(var(--nav-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:var(--card);border-top:1px solid var(--border);display:flex;position:fixed;inset:auto 0 0}.bottomnav a{color:var(--muted);flex:1;justify-content:center;align-items:center;font-weight:600;text-decoration:none;display:flex}.bottomnav a.active{color:var(--primary);box-shadow:inset 0 3px 0 var(--primary)}.stack{flex-direction:column;gap:12px;display:flex}.row{justify-content:space-between;align-items:center;gap:10px;display:flex}.gap{gap:8px}.grid2{grid-template-columns:1fr 1fr;gap:10px;display:grid}.grid3{grid-template-columns:1fr 1.4fr auto;align-items:center;gap:8px;display:grid}.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);color:inherit;padding:14px;text-decoration:none;display:block}.card.stack,.card.row{display:flex}.list{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.call{border-inline-start:5px solid var(--border);flex-direction:column;gap:4px;display:flex}.call-new{border-inline-start-color:var(--primary)}.call-in_progress{border-inline-start-color:var(--warn)}.call-done{border-inline-start-color:var(--ok)}.call .place{font-weight:600}.desc{-webkit-line-clamp:2;white-space:pre-line;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.desc-full{white-space:pre-line}.facts{grid-template-columns:auto 1fr;gap:4px 12px;margin:0;display:grid}.facts dt{color:var(--muted)}.facts dd{margin:0}.lines{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.lines li{justify-content:space-between;gap:10px;display:flex}.lines .total{border-top:1px solid var(--border);padding-top:6px;font-weight:700}.stats{grid-template-columns:repeat(3,1fr);gap:10px;display:grid}.stats .card{flex-direction:column;padding:10px 4px;display:flex}.stats strong{font-size:1.15rem}.back{font-weight:600;text-decoration:none}.badge{white-space:nowrap;border-radius:999px;padding:2px 10px;font-size:.8rem;font-weight:700}.badge-new{color:var(--primary-dark);background:#dcebff}.badge-in_progress{color:#8a5400;background:#ffefcf}.badge-done{color:#12713c;background:#d7f3e3}.badge-cancelled{color:var(--muted);background:#e8ebf1}.chip{color:var(--primary-dark);background:#e6efff;border-radius:999px;margin-inline-start:6px;padding:1px 8px;font-size:.78rem;font-weight:600;display:inline-block}.chip.warn{color:#8a5400;background:#ffefcf}.chips{flex-wrap:wrap;gap:8px;display:flex}.btn{border:1px solid var(--border);background:var(--card);min-height:46px;color:var(--text);font:inherit;cursor:pointer;border-radius:12px;justify-content:center;align-items:center;padding:0 18px;font-weight:600;text-decoration:none;display:inline-flex}.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn.danger{color:var(--danger);border-color:var(--danger)}.btn.small{min-height:36px;padding:0 12px;font-size:.9rem}.btn.block{width:100%;display:flex}.btn:disabled{opacity:.5;cursor:default}.actions{flex-direction:column;gap:8px;display:flex}.icon-btn{color:var(--muted);background:0 0;border:0;min-width:40px;min-height:40px;font-size:1.1rem}.field,.label{flex-direction:column;gap:4px;font-size:.92rem;font-weight:600;display:flex}input,textarea,select{font:inherit;color:inherit;border:1px solid var(--border);background:#fff;border-radius:10px;width:100%;min-height:46px;padding:8px 12px}select{width:auto}textarea{resize:vertical}input:focus,textarea:focus,select:focus,.btn:focus-visible{outline:2px solid var(--primary);outline-offset:1px}.search{background:#fff}.check{align-items:center;gap:10px;font-weight:600;display:flex}.check input{width:22px;height:22px;min-height:0}.segmented{background:#e6ebf3;border-radius:12px;gap:3px;padding:3px;display:flex}.segmented button{min-height:42px;font:inherit;color:var(--muted);background:0 0;border:0;border-radius:10px;flex:1;font-weight:700}.segmented.small button{min-height:36px}.segmented button.active{color:var(--primary);background:#fff;box-shadow:0 1px 3px #00000026}.count{background:var(--primary);color:#fff;border-radius:999px;margin-inline-start:6px;padding:0 7px;font-size:.75rem}.toolbar{flex-direction:column;gap:8px;display:flex}.notice{background:#e6f2ff;border-radius:10px;padding:10px 12px}.error{color:#9b1c1c;background:#fde8e8;border-radius:10px;padding:10px 12px}.fab{inset-inline-start:18px;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);background:var(--primary);color:#fff;text-align:center;border-radius:50%;width:58px;height:58px;font-size:2rem;line-height:58px;text-decoration:none;position:fixed;box-shadow:0 4px 14px #0b63ce73}.auth-page{place-items:center;min-height:100dvh;padding:16px;display:grid}.auth-page .card{flex-direction:column;gap:12px;width:100%;max-width:420px;display:flex}.logo{border-radius:16px}.stepper{align-items:center;gap:6px;display:flex}.stepper button{border:1px solid var(--border);background:#fff;border-radius:10px;width:44px;height:44px;font-size:1.3rem}.stepper input{text-align:center;width:74px;padding:8px 4px}.line{flex-direction:column;gap:10px;display:flex}.picker{border-color:var(--primary)}.picklist{max-height:46vh;margin:0;padding:0;list-style:none;overflow-y:auto}.picklist button{text-align:start;border:0;border-bottom:1px solid var(--border);width:100%;font:inherit;background:0 0;padding:12px 4px}.price-row{text-align:start;width:100%;font:inherit}.price-row.inactive{opacity:.6}.savebar{inset:auto 0 calc(var(--nav-h) + env(safe-area-inset-bottom)) 0;z-index:15;background:var(--card);border-top:1px solid var(--border);justify-content:space-between;align-items:center;gap:12px;padding:10px 16px;display:flex;position:fixed}.savebar .btn{min-width:150px}.thumbs{flex-wrap:wrap;gap:8px;display:flex}.thumb{border:1px solid var(--border);background:#e6ebf3;border-radius:10px;width:84px;height:84px;padding:0;overflow:hidden}.thumb img,.thumb-img{object-fit:cover;border-radius:10px;width:84px;height:84px;display:block}.thumb-wrap{position:relative}.thumb-wrap .remove{top:-8px;border:1px solid var(--border);background:#fff;border-radius:50%;width:28px;min-width:28px;height:28px;min-height:28px;font-size:.8rem;position:absolute;inset-inline-end:-8px}.preview{object-fit:contain;background:#e6ebf3;border-radius:10px;width:100%;max-height:320px}.lightbox{z-index:100;background:#000000e6;place-items:center;padding:12px;display:grid;position:fixed;inset:0}.lightbox img{object-fit:contain;max-width:100%;max-height:100%}.modal{z-index:50;background:#00000073;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.modal-body{border-radius:18px 18px 0 0;width:100%;max-width:560px;max-height:92dvh;overflow-y:auto}.import-item>summary{cursor:pointer;align-items:center;gap:10px;list-style:none;display:flex}.import-item>summary::-webkit-details-marker{display:none}.import-item[open]>summary{margin-bottom:12px}.import-sum{flex-direction:column;flex:1;min-width:0;display:flex}.thumb{object-fit:cover;object-position:top;border:1px solid var(--border);border-radius:8px;flex:none;width:52px;height:52px}.parts{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.parts li{border-bottom:1px solid var(--border);justify-content:space-between;align-items:flex-start;gap:10px;padding-bottom:10px;display:flex}.part-main{flex:1;min-width:0}.part-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px;display:flex}.shopping-calls{flex-direction:column;gap:4px;margin:0;padding:0;list-style:none;display:flex}.start-btn{margin-top:6px}
