@import url('fonts/inter.css');
/* BMarket — оформление кассы и склада. Без теней-анимаций и тяжёлых эффектов: быстро рисуется на слабых ПК. */
:root{--bg:#eef0f4;--card:#fff;--line:#dde1e8;--text:#161a22;--muted:#6b7385;--acc:#f26b1d;--acc2:#d85a10;--green:#17a067;--red:#dc4545;--blue:#2b7de9;--yellow:#fff4d6;--sel:#fff1e6}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{font:15px/1.4 Inter,"Segoe UI",system-ui,Arial,sans-serif;font-feature-settings:"cv11","ss01";-webkit-font-smoothing:antialiased;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
input,select,textarea{border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:#fff;min-width:0}
input:focus,select:focus,textarea:focus{outline:2px solid var(--acc);outline-offset:-1px;border-color:transparent}
.btn{border:1px solid var(--line);background:#fff;border-radius:9px;padding:9px 16px;cursor:pointer;font-weight:600;white-space:nowrap}
.btn:hover{background:#f6f7f9}.btn:disabled{opacity:.5;cursor:default}
.btn.primary{background:var(--acc);border-color:var(--acc);color:#fff}.btn.primary:hover{background:var(--acc2)}
.btn.green{background:var(--green);border-color:var(--green);color:#fff}.btn.red{color:var(--red)}.btn.redf{background:var(--red);border-color:var(--red);color:#fff}
.btn.sm{padding:5px 10px;font-size:13px}.btn.lg{padding:14px 22px;font-size:18px}
.muted{color:var(--muted)}.small{font-size:13px}.red{color:var(--red)}.green{color:var(--green)}.right{text-align:right}.nowrap{white-space:nowrap}
.badge{display:inline-block;padding:2px 8px;border-radius:20px;font-size:12px;font-weight:600;background:#eef0f4;color:var(--muted)}
.badge.green{background:#e3f6ed;color:var(--green)}.badge.red{background:#fde8e8;color:var(--red)}.badge.or{background:#ffeede;color:var(--acc2)}.badge.A{background:#e3f6ed;color:var(--green)}.badge.B{background:#fff4d6;color:#a57a00}.badge.C{background:#fde8e8;color:var(--red)}
/* верхняя панель */
.top{display:flex;align-items:center;gap:6px;background:#1b1f2a;color:#fff;padding:0 12px;height:52px;flex-shrink:0}
.top .brand{font-weight:700;font-size:18px;margin-right:14px;white-space:nowrap}.top .brand i{font-style:normal;color:var(--acc)}
.top .tab{background:none;border:0;color:#c4c9d4;padding:8px 13px;border-radius:8px;cursor:pointer;font-weight:600;white-space:nowrap}
.top .tab:hover{background:#2a3040;color:#fff}.top .tab.on{background:var(--acc);color:#fff}
.top .sp{flex:1}.top .who{color:#c4c9d4;font-size:13px;white-space:nowrap}.top .btn{background:#2a3040;border-color:#2a3040;color:#fff;padding:6px 12px}
.tabs-scroll{display:flex;gap:4px;overflow-x:auto;scrollbar-width:thin;min-width:0;flex:0 1 auto}
/* страницы склада */
.page{padding:16px;max-width:1400px;margin:0 auto}
.bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.bar h1{font-size:22px;margin:0 12px 0 0}
.card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:14px}
table.t{width:100%;border-collapse:collapse;background:#fff}
table.t th{position:sticky;top:0;background:#f6f7f9;text-align:left;font-size:12px;color:var(--muted);font-weight:600;padding:8px;border-bottom:1px solid var(--line);white-space:nowrap}
table.t td{padding:7px 8px;border-bottom:1px solid #eef0f4;vertical-align:middle}
table.t tr.click{cursor:pointer}table.t tr.click:hover td{background:#fafbfc}
table.t input{padding:5px 7px;width:100%}
.tw{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:auto}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-bottom:12px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px}.kpi b{display:block;font-size:22px;margin-top:2px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px}.form label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted);font-weight:600}
.form .full{grid-column:1/-1}.form label.chk{flex-direction:row;align-items:center;gap:8px;color:var(--text)}
.pager{display:flex;gap:8px;align-items:center;justify-content:flex-end;margin-top:10px}
.bars{display:flex;align-items:flex-end;gap:3px;height:110px}.bars div{flex:1;background:var(--acc);border-radius:3px 3px 0 0;min-height:1px;position:relative}
.bars div span{position:absolute;bottom:-18px;left:0;right:0;text-align:center;font-size:10px;color:var(--muted)}
/* окна */
#modal{position:fixed;inset:0;background:rgba(15,18,25,.5);display:flex;align-items:center;justify-content:center;z-index:50;padding:16px}
.mbox{background:#fff;border-radius:14px;padding:18px 20px;width:560px;max-width:100%;max-height:100%;overflow:auto}
.mbox.wide{width:1100px}.mbox.mid{width:760px}.mbox h2{margin:0 0 14px;font-size:20px}
.mfoot{display:flex;gap:8px;justify-content:flex-end;margin-top:16px;flex-wrap:wrap}
#toasts{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:8px;z-index:60}
.toast{background:#1b1f2a;color:#fff;padding:11px 16px;border-radius:10px;font-weight:600;max-width:420px}.toast.err{background:var(--red)}.toast.ok{background:var(--green)}
/* поиск товара */
.pick{position:absolute;left:0;right:0;top:100%;margin-top:4px;background:#fff;border:1px solid var(--line);border-radius:10px;z-index:40;max-height:420px;overflow:auto;box-shadow:0 10px 30px rgba(0,0,0,.15)}
.pick .pi{display:grid;grid-template-columns:1fr auto 90px;gap:10px;padding:9px 12px;cursor:pointer;border-bottom:1px solid #f1f2f5;align-items:center}
.pick .pi.on,.pick .pi:hover{background:var(--sel)}.pick .pi .muted{text-align:right;font-size:13px}
/* вход */
.login{min-height:100%;display:flex;align-items:center;justify-content:center;background:#1b1f2a}
.lbox{background:#fff;border-radius:18px;padding:28px;width:320px;text-align:center}.lbox .logo{font-size:24px;font-weight:700;margin-bottom:6px}
.pindots{display:flex;gap:14px;justify-content:center;margin:18px 0}.pindots i{width:16px;height:16px;border-radius:50%;border:2px solid #c4c9d4}.pindots i.on{background:var(--acc);border-color:var(--acc)}
.pinpad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pinpad button{font-size:24px;padding:14px 0;border-radius:12px;border:1px solid var(--line);background:#f6f7f9;cursor:pointer;font-weight:600}
.pinpad button:active{background:var(--sel)}.lerr{color:var(--red);margin-top:10px;min-height:20px;font-weight:600}
/* касса */
.pos{display:flex;flex-direction:column;height:100%}
.pos-main{flex:1;display:grid;grid-template-columns:1fr 400px;gap:12px;padding:12px;min-height:0}
.receipt{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:14px;min-height:0;overflow:hidden}
.scanrow{display:flex;gap:8px;padding:10px;border-bottom:1px solid var(--line);background:#fafbfc}
.scanrow input{flex:1;font-size:20px;padding:11px 14px}
.lines{flex:1;overflow:auto}
.line{display:grid;grid-template-columns:34px 1fr 150px 120px 130px;gap:8px;align-items:center;padding:10px 12px;border-bottom:1px solid #f1f2f5;cursor:pointer}
.line.on{background:var(--sel);box-shadow:inset 4px 0 var(--acc)}.line .n{color:var(--muted);font-size:13px}
.line .nm{font-weight:600;font-size:16px}.line .pr{font-size:12px;color:var(--green);font-weight:600}
.line .q{font-size:17px;font-weight:700;text-align:center}.line .p{text-align:right;color:var(--muted)}.line .s{text-align:right;font-size:18px;font-weight:700}
.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--muted);gap:6px;font-size:17px;text-align:center;padding:20px}
.empty b{font-size:22px;color:var(--text)}
.totalbar{display:flex;align-items:center;gap:16px;padding:12px 16px;border-top:2px solid var(--line);background:#fafbfc}
.totalbar .tot{margin-left:auto;text-align:right}.totalbar .tot div{font-size:13px;color:var(--muted)}.totalbar .tot b{font-size:38px;line-height:1.1}
.side{display:flex;flex-direction:column;gap:10px;min-height:0}
.quick{flex:1;display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:78px;gap:8px;overflow:auto;align-content:start}
.quick button{border:1px solid var(--line);background:#fff;border-radius:12px;cursor:pointer;padding:6px;font-weight:600;font-size:14px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;line-height:1.2}
.quick button:active{background:var(--sel)}.quick button small{color:var(--muted);font-weight:500;margin-top:3px}
.acts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.acts button{border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px 4px;cursor:pointer;font-weight:600;font-size:14px}
.acts button small{display:block;color:var(--muted);font-weight:500;font-size:11px}
.paybtn{background:var(--green);color:#fff;border:0;border-radius:14px;padding:20px;font-size:24px;font-weight:700;cursor:pointer}
.paybtn:disabled{background:#a7d9c0;cursor:default}.paybtn small{display:block;font-size:13px;font-weight:600;opacity:.9}
.status{display:flex;gap:14px;padding:6px 14px;font-size:13px;color:var(--muted);background:#fff;border-top:1px solid var(--line)}
.status .dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--green);margin-right:5px}.status .dot.off{background:#c4c9d4}
/* оплата */
.paygrid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.methods{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-content:start}
.methods button{border:2px solid var(--line);background:#fff;border-radius:12px;padding:14px 8px;font-size:16px;font-weight:700;cursor:pointer}
.methods button.on{border-color:var(--acc);background:var(--sel)}
.due{font-size:15px;color:var(--muted)}.due b{display:block;font-size:40px;color:var(--text)}
.bigin{font-size:30px;padding:10px 14px;width:100%;text-align:right;font-weight:700}
.cashq{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:8px}.cashq button{padding:10px 4px;border:1px solid var(--line);background:#f6f7f9;border-radius:9px;cursor:pointer;font-weight:700}
.change{margin-top:12px;font-size:20px;font-weight:700}.change b{font-size:30px;color:var(--green)}
.paid-list div{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px dashed var(--line)}
.wait{text-align:center;padding:20px}.wait .spin{width:46px;height:46px;border:5px solid #eee;border-top-color:var(--acc);border-radius:50%;margin:0 auto 14px;animation:sp 1s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.done-ch{text-align:center}.done-ch b{display:block;font-size:56px;color:var(--green);margin:8px 0}
.kbd{display:inline-block;border:1px solid var(--line);border-bottom-width:2px;border-radius:5px;padding:0 5px;font-size:11px;color:var(--muted);background:#fff}
/* значки */
.ic{vertical-align:-3px;flex-shrink:0}.icl{display:inline-flex;align-items:center;gap:6px}.btn .ic{margin-right:2px}
/* документ + подбор справа (как в 1С) */
.page.wide{max-width:none}
.dlay.pp-on{display:grid;grid-template-columns:minmax(0,1fr) 440px;gap:14px;align-items:start}
.pp{display:none}.pp-on .pp{display:flex;flex-direction:column;position:sticky;top:8px;height:calc(100vh - 80px);min-height:420px;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.pp-h{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;border-bottom:1px solid var(--line);background:#f6f7f9}
.pp-s{padding:8px 10px;border-bottom:1px solid var(--line)}.pp-s .ic{color:var(--muted)}
.pp-tree{max-height:30%;overflow:auto;border-bottom:2px solid var(--line);padding:4px 0}
.pp-g{display:flex;align-items:center;gap:8px;padding:6px 12px;cursor:pointer;font-size:14px;color:var(--text)}.pp-g .ic{color:#c99a3c}.pp-g:hover{background:#f6f7f9}
.pp-g.on{background:var(--sel);font-weight:700}.pp-g .n{margin-left:auto;color:var(--muted);font-size:12px;font-weight:400}
.pp-list{flex:1;overflow:auto}.pp-t td{padding:6px 8px;font-size:14px}.pp-t tr.indoc td{background:#fffaf3}
.pp-f{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:8px 12px;border-top:1px solid var(--line);background:#f6f7f9}
@media (max-width:1250px){.dlay.pp-on{grid-template-columns:minmax(0,1fr) 360px}}
@media (max-width:900px){.dlay.pp-on{grid-template-columns:1fr}.pp-on .pp{position:static;height:520px}}
/* сенсорная касса (моноблоки 1024×768, 1366×768, 800×600, квадратные экраны) */
body.touch{touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
body.touch input,body.touch textarea{-webkit-user-select:text;user-select:text}
body.touch .btn{min-height:48px;font-size:16px;padding:10px 18px}
body.touch .btn.sm{min-height:40px}
body.touch button:active,body.touch .tile:active{transform:scale(.97)}
body.touch table.t td{padding:12px 8px}
.numpad{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:10px}
.numpad button{height:58px;font-size:26px;font-weight:700;border:1px solid var(--line);background:#f6f7f9;border-radius:12px;cursor:pointer}
.numpad button:active{background:var(--sel)}
.ptabs{display:flex;gap:6px}.ptabs button{flex:1;height:46px;border:1px solid var(--line);background:#fff;border-radius:11px;font-weight:700;font-size:15px;cursor:pointer}
.ptabs button.on{background:#1b1f2a;color:#fff;border-color:#1b1f2a}
.tiles{flex:1;display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:84px;gap:8px;overflow:auto;align-content:start;-webkit-overflow-scrolling:touch}
.tile{border:1px solid var(--line);background:#fff;border-radius:12px;cursor:pointer;padding:6px;font-weight:600;font-size:14px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;line-height:1.15;overflow:hidden}
.tile small{color:var(--muted);font-weight:500;margin-top:4px;font-size:12px}.tile.grp{background:#1b1f2a;color:#fff;border-color:#1b1f2a}.tile.grp small{color:#c4c9d4}
.tile.back{background:#eef0f4;font-size:16px}.tile b{font-size:15px;color:var(--acc2);margin-top:3px}
.lctl{grid-column:1/-1;display:flex;gap:8px;align-items:center;padding-top:8px}
.lctl button{height:48px;min-width:60px;border:1px solid var(--line);background:#fff;border-radius:11px;font-size:22px;font-weight:700;cursor:pointer}
.lctl .qv{min-width:120px;height:48px;border:2px solid var(--acc);background:#fff;border-radius:11px;font-size:18px;font-weight:700}
.lctl .del{margin-left:auto;color:var(--red);font-size:15px;padding:0 16px}.lctl .wg{font-size:15px;padding:0 14px}
.kb{display:flex;flex-direction:column;gap:6px;margin-top:10px}.kb div{display:flex;gap:6px;justify-content:center}
.kb button{flex:1;max-width:72px;height:54px;font-size:20px;font-weight:600;border:1px solid var(--line);background:#f6f7f9;border-radius:10px;cursor:pointer;text-transform:uppercase}
.kb button.w{max-width:none;flex:3;text-transform:none;font-size:16px}.kb button:active{background:var(--sel)}
.tsr{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:72px;gap:8px;margin-top:10px;min-height:152px;max-height:232px;overflow:auto}
.scanrow .btn{min-width:100px}
@media (max-width:1150px){.pos-main{grid-template-columns:1fr 340px}.line{grid-template-columns:26px 1fr 110px 90px 110px}.totalbar .tot b{font-size:32px}.tiles{grid-auto-rows:76px}}
@media (max-width:860px){.pos-main{grid-template-columns:1fr 290px;gap:8px;padding:8px}.line{grid-template-columns:1fr 90px 100px}.line .n,.line .p{display:none}.tiles{grid-template-columns:repeat(2,1fr)}.acts button{font-size:13px;padding:10px 2px}.paybtn{padding:14px;font-size:20px}.top .brand{font-size:15px}.tsr{grid-template-columns:repeat(3,1fr)}}
@media (max-height:700px){.tiles{grid-auto-rows:66px}.numpad button{height:48px}.kb button{height:46px}.line{padding:7px 10px}}
@media (max-width:1000px){.grid2,.form{grid-template-columns:1fr}}
@media (max-width:640px){.pos-main{grid-template-columns:1fr}.side{order:-1}.tiles{display:none}.paygrid{grid-template-columns:1fr}}
@media (max-width:700px){.page{padding:10px}.top .who{display:none}}
/* телефон: ничего не выходит за ширину экрана */
.grid2>*,.dmain,.dlay>*{min-width:0}
@media (max-width:1000px){.grid2{grid-template-columns:minmax(0,1fr)}}
@media (max-width:900px){.dlay.pp-on{grid-template-columns:minmax(0,1fr)}}
@media (max-width:700px){.bar>div[style*="flex:1"]{flex:1 1 100%!important;max-width:none!important}.bar h1{font-size:19px}.kpi b{font-size:18px}.mbox{padding:14px}.form{grid-template-columns:minmax(0,1fr)!important}}

/* экран входа: зелёный фон с узором из значков продуктов */
.login{background-color:#f3fbf6;background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 1600 900%22 preserveAspectRatio=%22xMidYMid slice%22%3E %3Cdefs%3E%3ClinearGradient id=%22g1%22 x1=%220%22 y1=%220%22 x2=%221%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%2322c55e%22/%3E%3Cstop offset=%22.55%22 stop-color=%22%2312b76a%22/%3E%3Cstop offset=%221%22 stop-color=%22%230891b2%22/%3E%3C/linearGradient%3E %3ClinearGradient id=%22bg%22 x1=%220%22 y1=%220%22 x2=%221%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%23f3fbf6%22/%3E%3Cstop offset=%221%22 stop-color=%22%23e3f6ec%22/%3E%3C/linearGradient%3E%3C/defs%3E %3Crect width=%221600%22 height=%22900%22 fill=%22url(%23bg)%22/%3E %3Cpolygon points=%22760,0 1600,0 1600,900 420,900%22 fill=%22url(%23g1)%22/%3E %3Cpolygon points=%22690,0 745,0 405,900 350,900%22 fill=%22%2316a34a%22 fill-opacity=%22.85%22/%3E %3Cpolygon points=%22620,0 650,0 310,900 280,900%22 fill=%22%2316a34a%22 fill-opacity=%22.35%22/%3E %3Cpolygon points=%221600,640 1600,900 1180,900%22 fill=%22%23ffffff%22 fill-opacity=%22.08%22/%3E %3Ccircle cx=%221460%22 cy=%22110%22 r=%22160%22 fill=%22%23ffffff%22 fill-opacity=%22.07%22/%3E %3Cg transform=%22translate(980 150)%22 fill=%22none%22 stroke=%22%23fff%22 stroke-width=%225%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E %3Crect x=%2240%22 y=%220%22 width=%22330%22 height=%22220%22 rx=%2216%22 fill=%22%23ffffff%22 fill-opacity=%22.14%22/%3E %3Crect x=%2262%22 y=%2222%22 width=%22286%22 height=%22150%22 rx=%226%22 fill=%22%23ffffff%22 fill-opacity=%22.18%22/%3E %3Cpath d=%22M80 50h120M80 75h160M80 100h100M80 125h140M260 50h70M260 75h50M260 100h70%22/%3E %3Cpath d=%22M175 220l-15 60h90l-15-60M140 285h130%22/%3E %3Crect x=%220%22 y=%22300%22 width=%22420%22 height=%22120%22 rx=%2212%22 fill=%22%23ffffff%22 fill-opacity=%22.14%22/%3E %3Cpath d=%22M30 330h360M170 370h80%22/%3E%3Ccircle cx=%22380%22 cy=%22390%22 r=%228%22/%3E %3Crect x=%22440%22 y=%22230%22 width=%22150%22 height=%22120%22 rx=%2214%22 fill=%22%23ffffff%22 fill-opacity=%22.14%22/%3E %3Cpath d=%22M470 230v-70h90v70M470 185h60M470 205h70M455 300h120%22/%3E %3Cpath d=%22M470 400l60-40 70 30-25 35-35-12-30 60-30-10 22-55z%22 fill=%22%23ffffff%22 fill-opacity=%22.14%22/%3E %3Cpath d=%22M600 390l40 18M600 390l45-5M600 390l38 30%22 stroke-opacity=%22.7%22/%3E %3Crect x=%22-150%22 y=%22250%22 width=%22110%22 height=%22180%22 rx=%2216%22 fill=%22%23ffffff%22 fill-opacity=%22.14%22/%3E %3Crect x=%22-135%22 y=%22268%22 width=%2280%22 height=%2250%22 rx=%225%22/%3E %3Cpath d=%22M-130 340h15M-105 340h15M-80 340h15M-130 362h15M-105 362h15M-80 362h15M-130 384h15M-105 384h15M-80 384h15%22/%3E %3Crect x=%22-190%22 y=%22150%22 width=%22150%22 height=%2295%22 rx=%2210%22 transform=%22rotate(-14 -115 197)%22 fill=%22%23ffffff%22 fill-opacity=%22.22%22/%3E %3Cpath d=%22M210 520h260l-20 60H230z%22 fill=%22%23ffffff%22 fill-opacity=%22.14%22/%3E%3Cpath d=%22M240 500h200M340 500v20M300 555h80%22/%3E %3C/g%3E%3C/svg%3E");background-size:cover;background-position:center}
.login .brand-side{display:none}
@media (min-width:1000px){.login{justify-content:flex-start;padding-left:9vw;gap:5vw}.login .brand-side{display:block;max-width:360px;color:#0f3d2e}.login .brand-side h1{font-size:46px;margin:0;line-height:1.05}.login .brand-side h1 i{font-style:normal;color:#12b76a}.login .brand-side p{font-size:19px;color:#3c6b57;margin:12px 0 0}.login .brand-side b{display:block;margin-top:26px;font-size:15px;color:#12b76a;letter-spacing:.5px;text-transform:uppercase}}
.login .lbox{box-shadow:0 24px 60px rgba(6,78,59,.35);border:1px solid rgba(255,255,255,.6)}
.login .pindots i.on{background:#17a067;border-color:#17a067}
/* ===== касса v2: чек слева, плитки с фото справа, тёмная панель итогов и кнопок внизу ===== */
.k2{background:#e9eef3}
.k2 .top{background:linear-gradient(90deg,#0f3d2e,#14532d 45%,#0e4f5c)}.k2 .top .brand i{color:#4ade80}
.k2-main{flex:1;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:10px;padding:10px 10px 0;min-height:0}
.k2-rc{display:flex;flex-direction:column;background:#fff;border-radius:14px;border:1px solid var(--line);min-height:0;overflow:hidden}
.k2-rc .scanrow{background:#f6f8fa}.k2-rc .scanrow .ic{color:var(--muted)}
.k2-head,.k2-line{display:grid;grid-template-columns:minmax(0,1fr) 150px 90px 100px 44px;gap:8px;align-items:center;padding:0 12px}
.k2-head{font-size:12px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.3px;height:34px;border-bottom:1px solid var(--line);background:#fafbfc}
.k2-head .c{text-align:center}.k2-head .r,.k2-line .p,.k2-line .s{text-align:right}
.k2-line{min-height:58px;border-bottom:1px solid #eef1f4;cursor:pointer}.k2-line.on{background:#ecfdf3;box-shadow:inset 4px 0 #12b76a}
.k2-line .nm{font-weight:600;font-size:15px;line-height:1.25;padding:6px 0}.k2-line .pr{color:var(--green);font-size:12px;font-weight:600;margin-top:2px}
.k2-step{display:flex;align-items:center;justify-content:center;gap:4px}
.k2-step button{height:40px;min-width:40px;border:1px solid var(--line);background:#f6f8fa;border-radius:10px;font-size:20px;font-weight:700;cursor:pointer;color:var(--text)}
.k2-step .q{min-width:54px;background:#fff;font-size:16px}.k2-step .kg{font-size:14px;padding:0 10px;display:inline-flex;align-items:center;gap:5px}
.k2-line .p{font-size:14px;color:var(--muted)}.k2-line .p s{display:block;font-size:12px}.k2-line .s{font-size:17px;font-weight:700}
.k2-line .del{height:40px;width:40px;border:0;background:none;color:#c0c6d0;cursor:pointer;border-radius:10px}.k2-line .del:hover,.k2-line.on .del{color:var(--red);background:#fdecec}
.k2 .empty .ic{color:#c9d3dd}
.k2-cat{display:flex;flex-direction:column;gap:8px;min-height:0}
.k2-sbar{display:flex;gap:8px}
.k2-search{flex:1;display:flex;align-items:center;gap:10px;height:48px;padding:0 14px;border:1px solid var(--line);background:#fff;border-radius:12px;color:var(--muted);font-size:16px;cursor:pointer;text-align:left}
.k2-chip{height:48px;padding:0 16px;border:1px solid var(--line);background:#fff;border-radius:12px;font-weight:700;cursor:pointer}.k2-chip.on{background:#14532d;color:#fff;border-color:#14532d}
.k2-tiles{flex:1;display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:128px;gap:8px;overflow:auto;align-content:start;padding-bottom:4px}
.k2-tile{position:relative;display:flex;flex-direction:column;border:1px solid var(--line);background:#fff;border-radius:12px;overflow:hidden;cursor:pointer;padding:0;text-align:left}
.k2-tile .t-img{flex:1;background:#f1f4f7 center/cover no-repeat}
.k2-tile .t-ph{display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:700;color:#fff;background:linear-gradient(135deg,hsl(var(--h) 62% 52%),hsl(calc(var(--h) + 30) 60% 42%))}
.k2-tile .t-nm{padding:5px 8px 7px;font-size:13px;font-weight:600;line-height:1.2;max-height:38px;overflow:hidden;color:var(--text)}
.k2-tile .t-pr{position:absolute;top:6px;right:6px;background:rgba(255,255,255,.95);color:var(--text);font-weight:700;font-size:13px;padding:2px 7px;border-radius:8px;box-shadow:0 1px 4px rgba(0,0,0,.15)}
.k2-tile.grp{align-items:center;justify-content:center;gap:8px;color:#fff;border:0;background:linear-gradient(135deg,hsl(var(--h) 55% 45%),hsl(calc(var(--h) + 35) 60% 35%))}
.k2-tile.grp .t-nm{color:#fff;text-align:center;font-size:15px;max-height:none}.k2-tile.grp .t-cnt{position:absolute;top:6px;right:8px;font-size:12px;font-weight:700;background:rgba(255,255,255,.25);padding:1px 8px;border-radius:10px}
.k2-tile.back{align-items:center;justify-content:center;gap:4px;background:#e5eaef;color:var(--text)}.k2-tile.back .t-nm{text-align:center}
.k2-bot{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:14px;margin:10px;padding:12px 14px;background:linear-gradient(135deg,#0f2a36,#14304a);border-radius:16px;color:#fff}
.k2-tot{display:grid;grid-template-columns:repeat(2,1fr);gap:2px 18px;align-content:center;font-size:13px}
.k2-tot>div{display:flex;justify-content:space-between;color:#a9b8c7}.k2-tot>div b{color:#fff;font-weight:600}
.k2-due{grid-column:1/-1;align-items:baseline;margin-top:6px;border-top:1px solid rgba(255,255,255,.15);padding-top:6px}.k2-due span{font-weight:700;letter-spacing:.5px;color:#cfe8dc!important}.k2-due b{font-size:36px!important;font-weight:700!important;color:#4ade80!important}
.k2-btns{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:54px;gap:8px}
.k2-btns button{border:0;border-radius:12px;font-weight:700;font-size:14px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;letter-spacing:.3px}
.k2-btns button:disabled{opacity:.45;cursor:default}
.kb-w{background:#fff;color:#14304a}.kb-red{background:#fde8e8;color:#c62828}.kb-or{background:#f59e0b;color:#fff}.kb-dk{background:#2a4258;color:#fff}
.kb-bank{background:#e8f0fe;color:#1d4ed8;font-size:13px!important}
.kb-pay{grid-column:span 4;background:linear-gradient(135deg,#22c55e,#12b76a);color:#fff;font-size:22px!important;letter-spacing:1px!important}
@media (max-width:1150px){.k2-head,.k2-line{grid-template-columns:minmax(0,1fr) 130px 80px 90px 40px}.k2-tiles{grid-template-columns:repeat(3,1fr);grid-auto-rows:116px}.k2-due b{font-size:30px!important}}
@media (max-width:860px){.k2-main{grid-template-columns:1fr 280px}.k2-head,.k2-line{grid-template-columns:minmax(0,1fr) 120px 84px 34px}.k2-head span:nth-child(3),.k2-line .p{display:none}.k2-tiles{grid-template-columns:repeat(2,1fr)}.k2-bot{grid-template-columns:1fr}.k2-tot{display:none}}
/* ===== склад: верхняя панель и «Сводка» ===== */
body:not(.touch) .top{background:linear-gradient(90deg,#0f3d2e,#14532d 45%,#0e4f5c)}body:not(.touch) .top .brand i{color:#4ade80}body:not(.touch) .top .tab.on{background:#22c55e}
.dash{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.dcard{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px}.dcard h3{margin:0 0 10px;font-size:15px;color:var(--muted)}
.dcard.big{grid-column:span 3;display:grid;grid-template-columns:230px 1fr;gap:20px;align-items:center;background:linear-gradient(135deg,#f0fdf4,#ecfeff)}
.ring{width:210px;height:210px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#12b76a calc(var(--p)*1%),#d1fae5 0)}
.ring>div{width:166px;height:166px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;box-shadow:0 4px 18px rgba(18,183,106,.18)}
.ring span{font-size:12px;color:var(--muted)}.ring b{font-size:22px;margin:4px 0}
.dgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.dgrid>div{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.dgrid span{display:block;font-size:12px;color:var(--muted)}.dgrid b{display:block;font-size:19px;margin-top:2px}
.dch{display:block;font-size:11px;font-weight:700;margin-top:2px}.dch.up{color:var(--green)}.dch.dn{color:var(--red)}
.dbars{display:flex;align-items:flex-end;gap:4px;height:150px;padding-bottom:18px}.dbars>div{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;position:relative}
.dbars i{display:block;background:linear-gradient(180deg,#22c55e,#0891b2);border-radius:4px 4px 0 0;min-height:2px}.dbars span{position:absolute;bottom:-17px;left:0;right:0;text-align:center;font-size:10px;color:var(--muted)}
.dbars.h i{background:linear-gradient(180deg,#f59e0b,#f26b1d)}
.dtop{display:grid;grid-template-columns:22px 1fr auto auto;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid #f1f3f5}.dtop .n{width:22px;height:22px;border-radius:50%;background:#ecfdf3;color:var(--green);font-weight:700;font-size:12px;display:grid;place-items:center}
.gph{display:flex;gap:14px;align-items:center;margin-top:14px;padding:10px;border:1px dashed var(--line);border-radius:12px}
.gimg{width:96px;height:96px;flex-shrink:0;border-radius:10px;background:#f1f4f7 center/cover no-repeat;display:grid;place-items:center;color:var(--muted);font-size:12px}
@media (max-width:1000px){.dash{grid-template-columns:1fr}.dcard.big{grid-column:auto;grid-template-columns:1fr;justify-items:center}.dgrid{grid-template-columns:repeat(2,1fr)}}
/* ===== касса: крупные кнопки для сенсора с низкой чувствительностью ===== */
body.touch .btn{min-height:56px;font-size:17px;padding:12px 20px}
body.touch .btn.lg{min-height:64px;font-size:19px;padding:14px 26px}
body.touch .btn.sm{min-height:44px}
body.touch .scanrow input{font-size:22px;padding:14px 16px}
body.touch .k2-line{min-height:72px}
body.touch .k2-line .nm{font-size:16px}
body.touch .k2-head,body.touch .k2-line{grid-template-columns:minmax(0,1fr) 196px 92px 110px 56px}
body.touch .k2-step{gap:6px}
body.touch .k2-step button{height:54px;min-width:54px;font-size:26px;border-radius:12px}
body.touch .k2-step .q{min-width:66px;font-size:19px}
body.touch .k2-step .kg{font-size:16px;padding:0 14px}
body.touch .k2-line .del{height:54px;width:54px}
body.touch .k2-search,body.touch .k2-chip{height:58px;font-size:17px}
body.touch .k2-tiles{grid-auto-rows:140px;gap:10px}
body.touch .k2-tile .t-nm{font-size:14px}
body.touch .k2-btns{grid-auto-rows:70px;gap:10px}
body.touch .k2-btns button{font-size:16px;border-radius:14px}
body.touch .kb-pay{font-size:26px!important}
body.touch .numpad{gap:10px}
body.touch .numpad button{height:76px;font-size:32px;border-radius:14px}
body.touch .kb{gap:8px}body.touch .kb div{gap:8px}
body.touch .kb button{height:68px;max-width:92px;font-size:24px;border-radius:12px}
body.touch .kb button.w{font-size:18px}
body.touch .methods button{padding:20px 10px;font-size:18px;border-radius:14px}
body.touch .cashq{gap:10px}body.touch .cashq button{padding:18px 6px;font-size:17px;border-radius:12px}
body.touch .bigin{font-size:34px;padding:14px 16px}
body.touch .paybtn{padding:24px;font-size:26px}
body.touch .pinpad{gap:10px}body.touch .pinpad button{font-size:30px;padding:20px 0;border-radius:14px}
body.touch .top .tab{padding:12px 16px;font-size:16px}
body.touch .mbox.wide{width:1180px}
@media (max-height:800px){body.touch .numpad button{height:64px}body.touch .kb button{height:58px}body.touch .k2-btns{grid-auto-rows:60px}body.touch .k2-line{min-height:64px}}
@media (max-width:1150px){body.touch .k2-head,body.touch .k2-line{grid-template-columns:minmax(0,1fr) 180px 80px 96px 50px}}
@media (max-width:860px){body.touch .k2-head,body.touch .k2-line{grid-template-columns:minmax(0,1fr) 170px 90px 50px}}
/* ===== камера-сканер и страница телефона ===== */
.cam{position:relative;background:#000;border-radius:14px;overflow:hidden;aspect-ratio:4/3;max-height:60vh}
.cam video{width:100%;height:100%;object-fit:cover;display:block}
.cam-line{position:absolute;left:8%;right:8%;top:50%;height:3px;background:#ff3b3b;box-shadow:0 0 12px #ff3b3b;border-radius:2px}
.cam-st{position:absolute;left:0;right:0;bottom:0;padding:10px;text-align:center;color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.7));font-weight:600}
.cam-log{max-height:120px;overflow:auto;margin-top:8px;font-size:14px}.cam-log div{padding:5px 0;border-bottom:1px solid #eef0f4}.cam-log div:first-child{font-weight:700;color:var(--green)}
.cam-btn{padding:8px 12px!important}
.qrbox{background:#fff;padding:8px;border:1px solid var(--line);border-radius:12px}
.sc{max-width:560px}.sc .ptabs{margin-top:4px}
.sc-big{width:100%;margin-top:6px;display:flex;align-items:center;justify-content:center;gap:12px;height:96px;border:0;border-radius:18px;background:linear-gradient(135deg,#22c55e,#0891b2);color:#fff;font-size:24px;font-weight:700;cursor:pointer}
.sc-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;margin-top:12px}
.sc-img{height:160px;border-radius:12px;background:#f1f4f7 center/contain no-repeat;margin-bottom:10px}
.sc-nm{font-size:20px;font-weight:700;line-height:1.2}.sc-pr{font-size:40px;font-weight:700;margin:10px 0 6px}.sc-pr small{font-size:15px;color:var(--muted);font-weight:600}.sc-pr s{display:block;font-size:18px;color:var(--muted);font-weight:500}
.sc-log{margin-top:14px;font-size:14px;color:var(--muted)}.sc-log div{padding:6px 0;border-bottom:1px solid #e5e9ee}
/* ===== касса: ещё крупнее (палец на неотзывчивом сенсоре) ===== */
body.touch .top{height:64px}
body.touch .top .tab,body.touch .top .btn{min-height:52px;padding:0 18px;font-size:17px;display:inline-flex;align-items:center;gap:6px;border-radius:12px}
body.touch .scanrow .btn{min-height:60px;min-width:96px}
body.touch .k2-head,body.touch .k2-line{grid-template-columns:minmax(0,1fr) 232px 96px 116px 66px}
body.touch .k2-line{min-height:82px}
body.touch .k2-line .nm{font-size:17px}
body.touch .k2-step button{height:64px;min-width:66px;font-size:30px}
body.touch .k2-step .q{min-width:74px;font-size:21px}
body.touch .k2-step .kg{height:64px;font-size:17px}
body.touch .k2-line .del{height:64px;width:64px}
body.touch .k2-search,body.touch .k2-chip{height:64px;font-size:18px;padding:0 20px}
body.touch .k2-tiles{grid-auto-rows:156px}
body.touch .k2-tile .t-nm{font-size:15px}
body.touch .k2-tile .t-pr{font-size:15px;padding:3px 9px}
body.touch .k2-btns{grid-auto-rows:84px}
body.touch .k2-btns button{font-size:18px}
body.touch .kb-pay{font-size:30px!important}
body.touch .k2-due b{font-size:42px!important}
body.touch .numpad button{height:84px;font-size:34px}
body.touch .kb button{height:76px;max-width:100px;font-size:26px}
body.touch .methods button{padding:24px 10px;font-size:19px}
body.touch .cashq button{padding:22px 6px;font-size:19px}
body.touch .mfoot .btn{min-height:64px;padding:0 26px;font-size:19px}
@media (max-height:820px){body.touch .top{height:56px}body.touch .k2-line{min-height:72px}body.touch .k2-step button{height:58px;min-width:60px}body.touch .k2-btns{grid-auto-rows:70px}body.touch .numpad button{height:66px}body.touch .kb button{height:62px}body.touch .k2-tiles{grid-auto-rows:136px}}
@media (max-width:1150px){body.touch .k2-head,body.touch .k2-line{grid-template-columns:minmax(0,1fr) 214px 82px 100px 62px}}
@media (max-width:860px){body.touch .k2-head,body.touch .k2-line{grid-template-columns:minmax(0,1fr) 200px 92px 60px}}

/* ===== шрифт Inter: строже и ровнее ===== */
table.t,.k2-line,.k2-tot,.k2-due,.kpi b,.dgrid b,.ring b,.sc-pr,.paid-list,.due b,.change,.totalbar,.pick .pi b,.t-pr{font-variant-numeric:tabular-nums}
.btn,.tab,.k2-btns button,.k2-chip,.methods button,.cashq button,.numpad button,.kb button,.pinpad button{font-weight:600;letter-spacing:-.01em}
h1,h2,h3{letter-spacing:-.02em;font-weight:700}
.top .brand{letter-spacing:-.02em}
.k2-line .nm,.k2-tile .t-nm{font-weight:500}
.k2-line .s,.k2-tile .t-pr{font-weight:700}
.kb-pay,.paybtn{font-weight:700!important;letter-spacing:.02em!important}

/* смена */
.k2 .top .tab.warn{background:#fde8e8;color:#b42318;border-color:#f3b4b4}
.sh-info{border:1px solid var(--line,#e3e6ea);border-radius:12px;padding:6px 14px;margin:4px 0 14px}
.sh-r{display:flex;justify-content:space-between;gap:16px;padding:7px 0;border-bottom:1px dashed var(--line,#e3e6ea);font-variant-numeric:tabular-nums}.sh-r:last-child{border-bottom:0}
.sh-btns{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sh-btns .btn{min-height:64px;justify-content:center}

/* блокировка и предупреждения о тарифе */
.gate{position:fixed;inset:0;z-index:9000;background:linear-gradient(135deg,#0b3d2a,#0f5a3c 55%,#12734b);display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto}
.gate-box{background:#fff;color:#151a26;border-radius:20px;max-width:620px;width:100%;padding:32px 34px;box-shadow:0 30px 80px rgba(0,0,0,.35);text-align:center}
.gate-box h1{margin:10px 0 8px;font-size:28px}.gate-box p{font-size:17px;line-height:1.5;margin:8px 0}
.gate-ic{width:84px;height:84px;border-radius:50%;margin:0 auto;display:flex;align-items:center;justify-content:center;background:#fdecea;color:#c0392b}
.gate-tel{margin:16px 0;padding:14px;border-radius:12px;background:#ecfdf3;color:#05603a;font-size:17px}.gate-tel a{font-size:24px;font-weight:700;color:#05603a;text-decoration:none;white-space:nowrap;display:inline-block;margin:4px 6px}
.gate-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:14px 0}
.gate-key{margin-top:16px;padding-top:14px;border-top:1px solid #e3e6ea;text-align:left}.gate-key .bar{margin-top:8px;display:flex;gap:8px;flex-wrap:wrap}
.gate-wait{display:flex;align-items:center;justify-content:center;gap:12px;margin:14px 0;color:#667085}.gate-wait .spin{width:26px;height:26px}
.gwarn{position:fixed;left:50%;transform:translateX(-50%);bottom:56px;z-index:8000;max-width:min(860px,calc(100% - 32px));display:flex;align-items:center;gap:10px;background:#fff4e5;color:#7a4100;border:1px solid #f5c26b;border-radius:12px;padding:10px 14px;box-shadow:0 8px 24px rgba(0,0,0,.15);font-size:15px}
.gwarn button{border:0;background:none;color:inherit;cursor:pointer;padding:6px;margin-left:auto}

/* верхняя панель кассы: на узких экранах (1024) прячем подписи, кнопка «Закрыть» всегда видна справа */
.k2 .top{min-width:0}.k2 .top>*{flex-shrink:0}.k2 .top .k2-shop,.k2 .top .k2-who{flex-shrink:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.k2 .top .k2-quit{min-height:38px;display:inline-flex;align-items:center;gap:4px;margin-left:4px;background:#dc2626;border-color:#dc2626;color:#fff}.k2 .top .k2-quit:hover{background:#b91c1c}
@media (max-width:1280px){.k2 .top .tl{display:none}.k2 .top .k2-shop{max-width:160px}.k2 .top .k2-who{max-width:120px}}
@media (max-width:900px){.k2 .top .k2-shop{display:none}}

/* склад: меню слева с группами */
.sd-wrap{display:flex;align-items:stretch;min-height:calc(100vh - 52px)}
.side{width:236px;flex-shrink:0;background:#fff;border-right:1px solid var(--line);padding:12px 10px;position:sticky;top:0;align-self:flex-start;height:calc(100vh - 52px);overflow-y:auto}
.sd-main{flex:1;min-width:0}
.sd-i,.sd-h{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:10px;color:#344054;text-decoration:none;font-weight:600;font-size:15px;border:0;background:none;cursor:pointer;text-align:left;font-family:inherit}
.sd-i:hover,.sd-h:hover{background:#f2f4f7}
.sd-i svg,.sd-h svg{flex-shrink:0;color:#667085}
.sd-i.on{background:#e7f8ef;color:#067647}.sd-i.on svg{color:#12b76a}
.sd-h span{flex:1}.sd-ch{display:flex;transition:transform .15s}.sd-g.open .sd-ch{transform:rotate(90deg)}
.sd-sub{display:none;padding:2px 0 6px 29px}.sd-g.open .sd-sub{display:block}
.sd-sub .sd-i{font-weight:500;font-size:14.5px;padding:8px 12px}
.sd-g:has(.sd-i.on)>.sd-h{color:#067647}.sd-g:has(.sd-i.on)>.sd-h svg{color:#12b76a}
.sd-burger{display:none}.sd-dim{display:none}
@media (max-width:900px){
 .sd-burger{display:inline-flex}
 .side{position:fixed;left:0;top:0;bottom:0;height:100vh;z-index:60;transform:translateX(-100%);transition:transform .2s;box-shadow:0 10px 40px rgba(0,0,0,.2)}
 body.sd-show .side{transform:none}
 body.sd-show .sd-dim{display:block;position:fixed;inset:0;background:rgba(16,24,40,.35);z-index:55}
}
