@font-face{font-family:Montserrat;src:url('/assets/montserrat.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}
:root{--page:#121416;--surface:#1b1e21;--surface-2:#23272a;--line:#303438;--text:#f5f5f2;--muted:#979da0;--green:#79cda2;--orange:#e0aa68;--red:#e38d8d;font-family:Montserrat,-apple-system,BlinkMacSystemFont,sans-serif;color:var(--text);background:var(--page);font-synthesis:none}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;min-width:320px;background:var(--page)}
button,input,select,textarea{font:inherit}
button{cursor:pointer;touch-action:manipulation}
button:disabled{cursor:wait;opacity:.5}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--green);outline-offset:2px}
[hidden]{display:none!important}
.app-shell{max-width:720px;margin:0 auto;padding:0 18px calc(114px + env(safe-area-inset-bottom))}
.topbar{height:69px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}
.top-actions{display:flex;align-items:center;gap:5px}
.home-screen-button{border:0;background:none;color:var(--green);font-size:11px;font-weight:700;padding:10px 4px}
.wordmark{padding:0;border:0;background:none;color:var(--text);font-size:27px;font-weight:850;letter-spacing:-.09em;line-height:1}
.wordmark span{color:var(--green)}
.icon-button{border:0;background:none;color:var(--muted);font-size:28px;line-height:1;width:42px;height:42px;border-radius:10px}
.icon-button:active{transform:scale(.96)}
.view{display:none;animation:enter .2s ease both}
.view.active{display:block}
@keyframes enter{from{opacity:.45;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.hero-value{display:block;padding:24px 0 21px;font-size:clamp(39px,10vw,66px);font-weight:800;line-height:1.05;letter-spacing:-.08em;font-variant-numeric:tabular-nums}
.filter-row{display:flex;gap:26px;border-bottom:1px solid var(--line);margin-bottom:2px}
.filter-row button{border:0;border-bottom:2px solid transparent;padding:12px 0 13px;margin-bottom:-1px;background:none;color:var(--muted);font-size:12px;font-weight:700}
.filter-row button.active{color:var(--text);border-color:var(--green)}
.product-list,.sales-list{display:flex;flex-direction:column}
.product-card{width:100%;border:0;border-bottom:1px solid var(--line);background:none;color:var(--text);display:grid;grid-template-columns:68px minmax(0,1fr) auto;gap:13px;text-align:left;align-items:center;padding:13px 0;min-height:92px;transition:background .18s ease,transform .18s ease}
.product-card:active{transform:scale(.99)}
.product-card:hover{background:rgba(255,255,255,.025)}
.product-image,.image-placeholder{width:68px;height:68px;object-fit:cover;display:block;border-radius:8px;background:var(--surface-2)}
.product-image{opacity:0;transition:opacity .2s ease}
.product-image.loaded{opacity:1}
.product-image.image-placeholder{opacity:1}
.product-body{min-width:0;display:flex;flex-direction:column;gap:5px}
.product-title{font-size:13px;font-weight:710;line-height:1.35;letter-spacing:-.015em;overflow-wrap:anywhere}
.product-stock{color:var(--muted);font-size:11px;font-weight:600}
.product-price{font-size:14px;font-weight:800;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.product-qty{align-self:center;color:var(--muted);font-size:11px;font-weight:650;white-space:nowrap;font-variant-numeric:tabular-nums}
.empty{padding:32px 0;color:var(--muted);font-size:12px}
.load-error{padding-top:35px;font-weight:800;font-size:28px;line-height:1.2;letter-spacing:-.05em}
.load-error small{display:block;margin-top:18px;color:var(--muted);font-size:13px;line-height:1.5;letter-spacing:0;font-weight:500}
.sales-totals{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:26px 0 20px;border-bottom:1px solid var(--line)}
.sales-totals>div{min-width:0;display:flex;flex-direction:column;gap:7px}
.sales-totals small{font-size:11px;color:var(--muted);font-weight:600}
.sales-totals strong{font-size:clamp(23px,5vw,36px);font-weight:800;letter-spacing:-.065em;font-variant-numeric:tabular-nums;white-space:nowrap}
.sales-totals>div:last-child strong{color:var(--green)}
.sale-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 12px;border-bottom:1px solid var(--line);padding:17px 0;color:var(--text)}
.sale-main{min-width:0;display:flex;flex-direction:column;gap:6px}
.sale-main strong{font-size:12px;line-height:1.4;font-weight:700}
.sale-main span{font-size:11px;color:var(--muted)}
.sale-side{display:flex;flex-direction:column;gap:5px;text-align:right;white-space:nowrap}
.sale-side strong{font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}
.sale-side small{font-size:11px;color:var(--green);font-weight:700}
.sale-status{grid-column:1/-1;color:var(--green);font-size:10px;font-weight:750}
.sale-row.delivery .sale-status,.sale-row.delivery .sale-side strong{color:var(--orange)}
.sale-row.returned .sale-main,.sale-row.returned .sale-side{text-decoration:line-through;color:var(--muted)}
.sale-row.returned .sale-status{color:var(--muted)}
.sale-actions{grid-column:1/-1;display:flex;gap:8px;margin-top:3px}
.sale-actions button{border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);padding:10px 15px;font-size:11px;font-weight:750}
.sale-actions button:first-child{color:var(--green);border-color:rgba(121,205,162,.38)}
.sale-actions button:last-child{color:var(--muted)}
.bottom-nav{position:fixed;z-index:10;bottom:0;left:0;right:0;display:grid;grid-template-columns:1fr 66px 66px;align-items:center;gap:16px;max-width:720px;margin:auto;padding:11px 20px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(18,20,22,.96);backdrop-filter:blur(16px)}
.sales-toggle{justify-self:start;background:none;border:0;color:var(--text);padding:12px 0;font-size:13px;font-weight:750}
.action-circle{height:64px;width:64px;border:2px solid;border-radius:50%;background:none;font-size:37px;font-weight:400;line-height:1;display:grid;place-items:center;transition:transform .18s ease,background .18s ease}
.action-circle:active{transform:scale(.94)}
.action-circle.minus{border-color:var(--red);color:var(--red)}
.action-circle.plus{border-color:var(--green);color:var(--green)}
.action-circle.minus:hover{background:rgba(227,141,141,.09)}
.action-circle.plus:hover{background:rgba(121,205,162,.09)}
.sheet-backdrop{position:fixed;inset:0;z-index:30;background:rgba(0,0,0,.66);display:flex;align-items:flex-end;justify-content:center}
.sheet{position:relative;width:min(100%,560px);max-height:min(92dvh,960px);overflow:auto;overscroll-behavior:contain;background:var(--surface);border:1px solid var(--line);border-bottom:0;border-radius:19px 19px 0 0;padding:10px 20px calc(28px + env(safe-area-inset-bottom))}
.sheet-grab{width:36px;height:4px;border-radius:4px;background:#596064;margin:0 auto 22px}
.sheet-close{position:absolute;right:17px;top:17px;border:0;background:var(--surface-2);color:var(--text);border-radius:50%;height:32px;width:32px;font-size:24px;line-height:1}
.sheet h2{margin:0 35px 22px 0;font-size:23px;font-weight:800;letter-spacing:-.055em;line-height:1.2}
.sheet-photo-wrap{position:relative;margin:0 0 18px}
.sheet-photo.product-image{width:100%;height:min(34vh,270px);border-radius:10px;object-fit:contain;background:var(--surface-2)}
.sheet-photo.image-placeholder{display:block;width:100%;height:min(34vh,270px)}
.photo-more{position:absolute;right:10px;top:10px;display:grid;place-items:center;border:0;border-radius:9px;background:rgba(18,20,22,.9);color:var(--text);width:44px;height:40px;font-size:23px;line-height:1;letter-spacing:.08em}
.photo-menu{position:absolute;z-index:2;right:10px;top:56px;min-width:178px;overflow:hidden;border:1px solid #464b4e;border-radius:11px;background:#292d30;box-shadow:0 12px 30px rgba(0,0,0,.28)}
.photo-menu button,.photo-menu label{display:flex;align-items:center;width:100%;min-height:44px;border:0;border-bottom:1px solid #3a3f42;background:none;color:var(--text);padding:10px 15px;text-align:left;font-size:13px;font-weight:650;cursor:pointer}
.photo-menu button:last-child{border-bottom:0}
.photo-menu button.danger{color:var(--red)}
.photo-menu input{position:absolute;width:1px;height:1px;opacity:0}
.photo-strip{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-inline:contain;padding:0 0 15px;scrollbar-width:thin}
.photo-thumb{position:relative;flex:0 0 66px;height:68px;padding:0;border:2px solid transparent;border-radius:8px;overflow:hidden;background:var(--surface-2)}
.photo-thumb.selected{border-color:var(--green)}
.photo-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.main-mark{position:absolute;left:0;right:0;bottom:0;background:rgba(0,0,0,.78);color:#fff;font-size:8px;font-weight:750;line-height:1.1;padding:3px}
.photo-add{position:absolute;right:9px;bottom:9px;padding:8px 11px;border-radius:8px;background:rgba(18,20,22,.9);font-size:11px;font-weight:700;cursor:pointer}
.photo-add input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.edit-fields{display:flex;flex-direction:column}
.edit-line{display:flex;flex-direction:column;gap:7px;padding:12px 0;border-top:1px solid var(--line)}
.edit-line span,.field span{color:var(--muted);font-size:10px;font-weight:650}
.link-heading{display:flex;align-items:center;justify-content:space-between}
.link-heading a{color:var(--green);font-size:17px;text-decoration:none;line-height:1;padding:0 4px}
.edit-line input,.edit-line textarea{border:0;background:transparent;color:var(--text);outline:none;padding:1px 0;font-size:16px;font-weight:600;width:100%;min-width:0}
.edit-line:first-child input{font-size:18px;font-weight:780;line-height:1.25;letter-spacing:-.04em}
.edit-line input:focus,.edit-line textarea:focus{color:#fff}
.edit-line textarea{line-height:1.55;min-height:100px;overflow:hidden;resize:none;font-weight:500}
.quantity-output{display:flex;align-items:center;min-height:25px;width:max-content;border:0;background:none;color:var(--text);padding:0;text-align:left;font-size:16px;font-weight:650;font-variant-numeric:tabular-nums}
.edit-pair{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.edit-pair .edit-line{min-width:0}
.sheet-form{display:flex;flex-direction:column;gap:17px}
.field{display:flex;flex-direction:column;gap:7px;min-width:0}
.field input,.field select,.field textarea{width:100%;min-height:43px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--text);padding:10px 12px;font-size:16px;outline:none;min-width:0}
.field textarea{min-height:78px;resize:vertical;line-height:1.5}
.field input::placeholder,.field textarea::placeholder,.edit-line input::placeholder,.edit-line textarea::placeholder{color:#777e81}
.field input[type=file]{font-size:11px;padding:10px}
.file-picker{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:43px;border:1px dashed #4a5054;border-radius:9px;background:var(--surface-2);color:var(--text)!important;padding:10px 12px;font-size:12px!important;cursor:pointer}
.file-picker small{color:var(--muted);font-size:11px}
.file-picker input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.field-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.method-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.method-switch label{cursor:pointer}
.method-switch input{position:absolute;opacity:0;pointer-events:none}
.method-switch span{display:grid;place-items:center;min-height:46px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--muted);font-size:12px;font-weight:700;text-align:center}
.method-switch input:checked+span{border-color:var(--green);color:var(--green);background:rgba(121,205,162,.07)}
.method-switch label:last-child input:checked+span{border-color:var(--orange);color:var(--orange);background:rgba(224,170,104,.07)}
.primary-button{min-height:49px;width:100%;border:0;border-radius:9px;background:var(--green);color:#10241b;font-size:13px;font-weight:800;margin-top:2px}
.primary-button:active{transform:scale(.99)}
.set-button{margin-top:20px}
.set-status,.set-error{margin:18px 0;color:var(--muted);font-size:13px;line-height:1.5}
.set-error{color:var(--red)}
.set-result{display:flex;flex-direction:column;gap:12px;padding:17px 0 3px}
.copy-block{display:block;width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);padding:13px 15px;text-align:left;font-size:16px;font-weight:730;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;user-select:none;-webkit-user-select:none}
.copy-block.description{font-size:15px;font-weight:500}
.copy-block:active{transform:scale(.99);border-color:var(--green)}
.toast{position:fixed;z-index:50;left:50%;bottom:calc(102px + env(safe-area-inset-bottom));transform:translate(-50%,12px);max-width:calc(100vw - 30px);background:#eef3ef;color:#17201b;border-radius:9px;padding:10px 14px;font-size:11px;font-weight:700;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
@media(min-width:680px){.app-shell{padding-left:28px;padding-right:28px}.product-card{grid-template-columns:80px minmax(0,1fr) auto;gap:18px}.product-image,.image-placeholder{width:80px;height:80px}.product-title{font-size:14px}.product-price{font-size:15px}.product-qty{font-size:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
