/* ReStar POS — кассовый экран. Цвета и шрифт — как в панели ReStar. */
:root {
  --bg: #f4f5f7; --card: #fff; --line: #e9ecef; --text: #212529; --muted: #868e96;
  --dark: #1f1f22; --dark-2: #2b2b30; --accent: #f76707; --accent-2: #ffa94d; --accent-soft: #fff3e0;
  --green: #2f9e44; --green-soft: #e6f6ec; --red: #e03131; --red-soft: #ffe3e3; --amber: #f08c00; --amber-soft: #fff4e6; --blue: #1c7ed6;
  --r: 12px; --top: 60px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; font-family: Poppins, 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; overflow: hidden; user-select: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
/* без «жирного» по умолчанию: <b> — полужирный, акцент — цветом и размером */
b, strong { font-weight: 500; }
[hidden] { display: none !important; }
input { font: inherit; }

/* верх */
.top { height: var(--top); background: var(--dark); color: #e9ecef; display: flex; align-items: center; gap: 16px; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 17px; white-space: nowrap; }
.brand img { height: 30px; width: auto; display: block; }
.brand .brand-mark { display: none; }
.brand b { color: var(--accent-2); }
.branch { background: var(--dark-2); border-radius: 8px; padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.top-mid { flex: 1; min-width: 0; font-size: 13px; color: #adb5bd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-mid b { color: #fff; font-weight: 400; }
.top-mid .warn24 { color: var(--accent-2); }
.top-right { display: flex; align-items: center; gap: 8px; }
.top-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: var(--dark-2); color: #f1f3f5; font-size: 13px; }
.top-btn:hover { background: #38383f; }
.top-btn i { font-size: 18px; }
.top-btn.icon { padding: 8px; }
.dot-label { display: flex; align-items: center; gap: 4px; color: #adb5bd; font-size: 18px; padding: 0 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #868e96; display: inline-block; }
.dot.on { background: #51cf66; box-shadow: 0 0 0 3px rgba(81, 207, 102, .25); }
.dot.off { background: var(--red); }
.clock { font-variant-numeric: tabular-nums; color: #ced4da; min-width: 44px; text-align: right; }

/* основная раскладка */
.pos { display: grid; grid-template-columns: 190px 1fr 380px; height: calc(100% - var(--top)); }
.cats { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 8px; }
.cat { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 12px; border-radius: 12px; margin-bottom: 4px; color: #495057; font-weight: 400; min-height: 52px; }
.cat i { font-size: 20px; color: #adb5bd; }
.cat.active { background: var(--accent-soft); color: #c2410c; }
.cat.active i { color: var(--accent); }
.cat.addon { font-weight: 400; font-size: 13px; }
.cat-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #adb5bd; margin: 12px 12px 6px; }

.menu { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.pos > * { min-height: 0; }
.grid { min-height: 0; grid-auto-rows: max-content; }
.tile .img { flex-shrink: 0; }
.search { margin: 12px 14px 4px; position: relative; }
.search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.search input { width: 100%; padding: 12px 14px 12px 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff; outline: none; }
.search input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(247, 103, 7, .12); }
.grid { flex: 1; overflow-y: auto; padding: 10px 14px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.tile { background: #fff; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; text-align: left; transition: transform .08s, box-shadow .15s; position: relative; }
.tile:active { transform: scale(.97); }
.tile:hover { box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .35); }
.tile .img { aspect-ratio: 4 / 3; background: linear-gradient(160deg, #fff3e0, #ffe8cc); display: flex; align-items: center; justify-content: center; color: #f59f00; font-size: 34px; overflow: hidden; }
.tile .img img { width: 100%; height: 100%; object-fit: cover; }
.tile .name { padding: 8px 10px 0; font-weight: 400; font-size: 13px; line-height: 1.25; min-height: 36px; }
.tile .price { padding: 4px 10px 10px; font-weight: 600; color: #c2410c; }
.tile .tag { position: absolute; top: 8px; left: 8px; background: rgba(31, 31, 34, .82); color: #fff; border-radius: 8px; font-size: 11px; padding: 2px 7px; display: flex; align-items: center; gap: 4px; }
.tile .tag.bad { background: var(--red); }
.tile.off { opacity: .5; }
.tile .qty-badge { position: absolute; top: 8px; right: 8px; background: var(--accent); color: #fff; border-radius: 12px; min-width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; padding: 0 7px; box-shadow: 0 2px 6px rgba(247, 103, 7, .4); }

/* чек */
.check { background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.check-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 16px; }
.check-head span { color: var(--muted); font-size: 13px; flex: 1; }
.link { color: var(--muted); font-size: 13px; display: flex; gap: 4px; align-items: center; }
.link:hover { color: var(--red); }
.lines { flex: 1; overflow-y: auto; padding: 6px 10px; }
.line { padding: 10px 6px; border-bottom: 1px dashed var(--line); }
.line-top { display: flex; align-items: center; gap: 8px; }
.line .t { flex: 1; min-width: 0; font-weight: 400; }
.line .s { font-weight: 500; white-space: nowrap; }
.line-sub { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.qty { display: flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 10px; }
.qty button { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; color: #495057; }
.qty button:hover { background: #e9ecef; }
.qty b { min-width: 24px; text-align: center; }
.marks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mk { font-size: 11.5px; border-radius: 8px; padding: 3px 8px; display: inline-flex; align-items: center; gap: 4px; background: #f1f3f5; color: #495057; }
.mk.ok { background: var(--green-soft); color: var(--green); }
.mk.bad { background: var(--red-soft); color: var(--red); }
.mk.wait { background: var(--amber-soft); color: var(--amber); }
.mk-btn { font-size: 12px; border-radius: 8px; padding: 3px 9px; background: var(--accent-soft); color: #c2410c; display: inline-flex; gap: 4px; align-items: center; }
.empty-check { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty-check i { font-size: 44px; display: block; color: #dee2e6; margin-bottom: 8px; }
.check-foot { border-top: 1px solid var(--line); padding: 12px 14px 14px; }
.warn { font-size: 12.5px; color: var(--amber); min-height: 0; margin-bottom: 6px; display: none; gap: 6px; }
.warn.show { display: flex; }
.warn.err { color: var(--red); }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.total span { color: var(--muted); }
.total b { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.pay-btn { height: 64px; border-radius: 12px; color: #fff; font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; }
.pay-btn i { font-size: 22px; }
.pay-btn.cash { background: linear-gradient(160deg, var(--accent-2), var(--accent)); }
.pay-btn.card { background: #364fc7; }
.pay-btn.sbp { background: #5f3dc4; }
.pay-btn:disabled { background: #dee2e6; color: #868e96; cursor: not-allowed; }

/* окна */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 20, 24, .55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: min(560px, 100%); max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 500; }
.modal-head i { color: var(--accent); font-size: 22px; }
.modal-head .x { margin-left: auto; width: 36px; height: 36px; border-radius: 10px; background: var(--bg); font-size: 20px; }
.modal-body { padding: 16px 18px; overflow-y: auto; min-height: 0; flex: 1; scrollbar-width: thin; }
.modal-foot { padding: 0 18px 18px; display: flex; gap: 10px; justify-content: flex-end; }
.btn { height: 52px; border-radius: 12px; padding: 0 18px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--bg); color: #343a40; }
.btn.primary { background: linear-gradient(160deg, var(--accent-2), var(--accent)); color: #fff; flex: 1; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.lbl { display: block; font-size: 13px; color: #495057; margin: 10px 0 6px; font-weight: 400; }
.inp { width: 100%; height: 50px; border-radius: 12px; border: 1px solid #dee2e6; padding: 0 14px; font-size: 17px; outline: none; }
.inp:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(247, 103, 7, .12); }
.big-sum { font-size: 34px; font-weight: 600; text-align: center; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.center { text-align: center; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.quick button { height: 48px; border-radius: 12px; background: var(--bg); font-weight: 500; }
.quick button:hover { background: var(--accent-soft); color: #c2410c; }
.change { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.change b { font-size: 26px; }
.change.bad { background: var(--red-soft); color: var(--red); }
.state { text-align: center; padding: 18px 8px 6px; }
.state i { font-size: 56px; }
.state .h { font-size: 20px; font-weight: 600; margin-top: 6px; }
.state.ok i { color: var(--green); }
.state.err i { color: var(--red); }
.state.wait i { color: var(--accent); animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.row-list { display: grid; gap: 8px; }
.row-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.row-item .ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: #fff; }
.row-item .b { flex: 1; min-width: 0; }
.row-item .b small { display: block; color: var(--muted); font-size: 12px; }
.grid-btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile-btn { height: 74px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 400; }
.tile-btn i { font-size: 24px; color: var(--accent); }
.tile-btn:hover { background: var(--accent-soft); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; margin: 6px 0 14px; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }

.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; }
.toast { background: #212529; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; display: flex; gap: 8px; align-items: center; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); }
.toast.err { background: var(--red); }

.lock { position: fixed; inset: var(--top) 0 0 0; background: rgba(244, 245, 247, .96); z-index: 40; display: flex; align-items: center; justify-content: center; }
.lock .card { background: #fff; border-radius: 12px; padding: 26px; width: min(440px, calc(100% - 32px)); box-shadow: 0 20px 50px -25px rgba(0, 0, 0, .4); text-align: center; }
.lock .card > i { font-size: 48px; color: var(--accent); }
.lock h2 { margin: 6px 0 4px; font-size: 22px; }
.lock .card .inp { text-align: left; }

@media (max-width: 1100px) { .pos { grid-template-columns: 150px 1fr 330px; } .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } .top-btn span { display: none; } .branch { display: none; } }
@media (max-width: 760px) {
  body { overflow: auto; }
  .pos { grid-template-columns: 1fr; height: auto; }
  .cats { display: flex; overflow-x: auto; border: 0; padding: 8px; gap: 6px; }
  .cat { white-space: nowrap; width: auto; min-height: 42px; margin: 0; }
  .cat-sep { display: none; }
  .check { border: 0; }
  .lines { max-height: 40vh; }
  .top-mid { display: none; }
  .top { gap: 8px; padding: 0 10px; }
  .top-right { gap: 4px; margin-left: auto; }
  .brand .brand-full, .clock, #btnFull { display: none; }
  .brand .brand-mark { display: block; }
  .cats { max-width: 100vw; }
}
.lock .lbl { text-align: left; }
.tile .img img ~ i { display: none; }
.tile .img { position: relative; }

/* ---------- поиск ---------- */
.search input { height: 50px; padding-right: 138px; font-size: 15px; border-radius: 12px; }
.search .search-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #adb5bd; }
.search .search-btn i { position: static; transform: none; font-size: 20px; color: inherit; }
.search .search-btn.kb { right: 6px; color: #868e96; }
.search .search-btn.kb:hover, body.vkb-open .search .search-btn.kb { color: var(--accent); background: var(--accent-soft); }
.search .search-btn.scan { right: 48px; color: #868e96; }
.search .search-btn.scan:hover { color: var(--accent); background: var(--accent-soft); }
.search .search-btn.clear { right: 90px; display: none; }
.search.has .search-btn.clear { display: flex; }
.grid-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: #495057; font-size: 13.5px; padding: 2px 2px 0; }
.grid-head i { color: var(--accent); }
.grid-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 50px 20px; }
.grid-empty i { display: block; font-size: 42px; color: #dee2e6; margin-bottom: 6px; }

/* ---------- плитки меню ---------- */
.grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.tile { border-radius: 12px; border-color: #edf0f2; box-shadow: 0 1px 0 rgba(0, 0, 0, .02); }
.tile:hover { box-shadow: 0 14px 28px -18px rgba(0, 0, 0, .45); transform: translateY(-1px); }
.tile .img img { transition: transform .35s; }
.tile:hover .img img { transform: scale(1.04); }
.tile .name { padding: 9px 11px 0; font-size: 13.5px; min-height: 38px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-foot { display: flex; align-items: baseline; gap: 6px; padding: 4px 11px 11px; margin-top: auto; }
.tile-foot .price { padding: 0; font-weight: 600; color: #c2410c; white-space: nowrap; }
.tile-foot .meta { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-left: auto; }
.tile .opt-dot { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; cursor: pointer; border-radius: 9px; background: rgba(255, 255, 255, .88); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); }
.tile .img > i { position: static; }

/* ---------- строки чека ---------- */
.line .t.editable { cursor: pointer; }
.line .t i { font-size: 13px; color: #ced4da; margin-left: 4px; vertical-align: 1px; }
.line .t:hover i { color: var(--accent); }
.line .sz { display: inline-block; font-size: 11.5px; font-weight: 500; color: #c2410c; background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; margin-left: 2px; vertical-align: 1px; }
.line-mods { margin-top: 4px; font-size: 12px; color: #495057; line-height: 1.35; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.line-mods span::before { content: "+ "; color: var(--accent); font-weight: 500; }
.line-mods em { font-style: normal; color: #9c4a0c; display: flex; gap: 4px; align-items: flex-start; }
.line-mods em i { font-size: 13px; margin-top: 1px; }
.line.flash { animation: flash .9s ease; }
@keyframes flash { 0% { background: #ffe8cc; } 100% { background: transparent; } }
.mk-demo { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.mk-demo span { flex: 1; }
.mk-demo .btn { height: 38px; font-size: 13px; white-space: nowrap; }

.toasts { z-index: 95; }
body.vkb-open .toasts { bottom: calc(var(--vkb-h, 360px) + 4px); }

/* ---------- выбор размера и добавок ---------- */
.cfg-bg { padding: 20px; backdrop-filter: blur(4px); }
.cfg { width: min(1060px, 100%); height: min(760px, calc(100vh - 40px)); display: grid; grid-template-columns: minmax(300px, 38%) 1fr; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .65); animation: cfgIn .26s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes cfgIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.cfg-hero { position: relative; background: linear-gradient(160deg, #fff3e0, #ffd8a8); display: flex; align-items: center; justify-content: center; color: #f59f00; font-size: 80px; overflow: hidden; }
.cfg-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cfg-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .78) 100%); }
.cfg-hero-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 26px 26px 28px; color: #fff; }
.cfg-cat { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: #ffc078; margin-bottom: 6px; }
.cfg-hero h3 { margin: 0; font-size: 28px; line-height: 1.12; font-weight: 600; letter-spacing: -.02em; }
.cfg-hero p { margin: 10px 0 0; font-size: 14px; line-height: 1.45; color: #e9ecef; }
.cfg-keg { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 5px 11px; backdrop-filter: blur(6px); }
.cfg-hero .x { position: absolute; top: 14px; left: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .9); color: #343a40; font-size: 22px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5); }
.cfg-main { display: flex; flex-direction: column; min-height: 0; }
.cfg-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 26px 10px; scrollbar-width: thin; }
.cfg-sec { margin-bottom: 22px; }
.cfg-h { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; margin-bottom: 10px; color: #212529; }
.cfg-h .req, .cfg-h .opt, .cfg-h .cnt { font-size: 11.5px; font-weight: 500; border-radius: 999px; padding: 2px 9px; }
.cfg-h .req { background: #fff4e6; color: #c2410c; }
.cfg-h .opt { background: #f1f3f5; color: #868e96; font-weight: 400; }
.cfg-h .cnt { background: var(--accent); color: #fff; margin-left: auto; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.seg-b { min-height: 68px; border-radius: 12px; border: 2px solid #eef0f2; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; transition: border-color .15s, background .15s, transform .08s; }
.seg-b b { font-size: 17px; font-weight: 500; }
.seg-b small { font-size: 12.5px; color: var(--muted); }
.seg-b.on { border-color: var(--accent); background: linear-gradient(170deg, #fff, #fff4e6); box-shadow: 0 10px 22px -16px rgba(247, 103, 7, .9); }
.seg-b.on small { color: #c2410c; font-weight: 500; }
.seg-b:active { transform: scale(.97); }
.seg-b:disabled { opacity: .4; cursor: not-allowed; }
.chips-r { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-r { min-height: 48px; padding: 0 16px; border-radius: 12px; border: 2px solid #eef0f2; background: #fff; font-weight: 400; display: inline-flex; align-items: center; gap: 6px; transition: border-color .15s, background .15s; }
.chip-r small { color: var(--muted); font-size: 12px; }
.chip-r i { color: var(--accent); font-size: 18px; }
.chip-r.on { border-color: var(--accent); background: #fff4e6; color: #9c4a0c; }
.adds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.add { min-height: 64px; border-radius: 12px; border: 2px solid #eef0f2; background: #fff; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; cursor: pointer; transition: border-color .15s, background .15s, transform .08s; }
.add:active { transform: scale(.98); }
.add .an { flex: 1; min-width: 0; font-weight: 400; font-size: 14px; line-height: 1.25; }
.add .an small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.add .aplus { width: 38px; height: 38px; border-radius: 12px; background: var(--bg); color: #495057; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.add.on { border-color: var(--accent); background: linear-gradient(170deg, #fff, #fff4e6); }
.add.on .an small { color: #c2410c; }
.add.off { opacity: .45; }
.actr { display: flex; align-items: center; gap: 2px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px #ffd8a8; flex-shrink: 0; }
.actr button { width: 36px; height: 38px; border-radius: 11px; color: #c2410c; font-size: 18px; }
.actr button:disabled { color: #dee2e6; }
.actr b { min-width: 18px; text-align: center; }
.quick-notes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.quick-notes button { height: 40px; padding: 0 14px; border-radius: 999px; background: var(--bg); color: #495057; font-size: 13.5px; font-weight: 400; transition: background .15s, color .15s; }
.quick-notes button.on { background: #212529; color: #fff; }
.note-inp { display: flex; align-items: center; gap: 10px; height: 52px; border-radius: 12px; border: 1px solid #dee2e6; padding: 0 14px; background: #fff; }
.note-inp:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(247, 103, 7, .12); }
.note-inp i { color: #adb5bd; font-size: 18px; }
.note-inp input { flex: 1; border: 0; outline: none; font-size: 15px; background: none; min-width: 0; }
.cfg-foot { display: flex; gap: 12px; align-items: center; padding: 14px 26px 20px; border-top: 1px solid var(--line); background: #fff; }
.qty.big button { width: 52px; height: 56px; border-radius: 12px; font-size: 22px; }
.qty.big b { min-width: 34px; font-size: 20px; }
.cfg-go { height: 60px; font-size: 17px; border-radius: 12px; justify-content: space-between; padding: 0 22px; }
.cfg-go b { font-size: 20px; font-variant-numeric: tabular-nums; }
/* клавиатура открыта (комментарий): окно встаёт над ней, фото — полосой сверху, «В чек» всегда видно */
body.vkb-open .cfg-bg { align-items: flex-start; padding-top: 12px; }
body.vkb-open .cfg { grid-template-columns: 1fr; grid-template-rows: 84px minmax(0, 1fr); height: auto; max-height: calc(100vh - var(--vkb-h, 360px) - 16px); width: min(900px, 100%); }
body.vkb-open .cfg-hero p, body.vkb-open .cfg-cat, body.vkb-open .cfg-keg { display: none; }
body.vkb-open .cfg-hero-text { padding: 0 24px 16px 76px; }
body.vkb-open .cfg-hero h3 { font-size: 21px; }
body.vkb-open .cfg-body { padding-top: 16px; }

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; } .cfg { grid-template-columns: minmax(240px, 34%) 1fr; } .cfg-hero h3 { font-size: 22px; } }
@media (max-width: 760px) {
  .cfg-bg { padding: 0; align-items: flex-end; }
  .cfg { grid-template-columns: 1fr; grid-template-rows: 190px 1fr; height: 94vh; border-radius: 12px 12px 0 0; }
  .cfg-hero-text { padding: 16px 18px; }
  .cfg-hero p { display: none; }
  .cfg-body { padding: 16px 16px 6px; }
  .cfg-foot { padding: 12px 16px 16px; }
  .adds { grid-template-columns: 1fr 1fr; }
}

/* ---------- сканирование: камера, сканер, ручной ввод ---------- */
.mk-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #f1f8f3; margin-bottom: 12px; }
.mk-head.done { background: var(--bg); }
.mk-pulse { width: 12px; height: 12px; border-radius: 50%; background: #40c057; flex-shrink: 0; box-shadow: 0 0 0 0 rgba(64, 192, 87, .5); animation: mkPulse 1.6s infinite; }
.mk-head.done .mk-pulse { animation: none; background: #adb5bd; }
@keyframes mkPulse { 70% { box-shadow: 0 0 0 10px rgba(64, 192, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(64, 192, 87, 0); } }
.mk-head-t { flex: 1; min-width: 0; }
.mk-head-t b { display: block; font-size: 15px; font-weight: 500; }
.mk-head-t small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cam-btn { height: 42px; font-size: 14px; font-weight: 400; background: #fff; border: 1px solid var(--line); flex-shrink: 0; }
.cam-btn.on { background: #212529; color: #fff; border-color: #212529; }
.cam-box:empty { display: none; }
.cam-box { margin-bottom: 12px; }
.cam { position: relative; border-radius: 12px; overflow: hidden; background: #111; aspect-ratio: 4 / 3; max-height: 44vh; margin: 0 auto; }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-frame { position: absolute; inset: 7% 18%; pointer-events: none; }
.cam-frame i { position: absolute; width: 34px; height: 34px; border: 3px solid #fff; opacity: .9; }
.cam-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.cam-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.cam-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.cam-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.cam-line { position: absolute; left: 8%; right: 8%; height: 2px; top: 10%; background: linear-gradient(90deg, transparent, #ffa94d, transparent); box-shadow: 0 0 12px #ff922b; animation: camLine 2.2s ease-in-out infinite alternate; }
@keyframes camLine { to { top: 90%; } }
.cam.hit .cam-frame i { border-color: #51cf66; }
.cam.hit { animation: camHit .5s; }
@keyframes camHit { 0% { box-shadow: inset 0 0 0 4px #51cf66; } 100% { box-shadow: inset 0 0 0 0 transparent; } }
.cam-msg { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; font-size: 13px; color: #fff; text-align: center; background: linear-gradient(0deg, rgba(0, 0, 0, .6), transparent); }
.cam.err { aspect-ratio: auto; min-height: 110px; display: flex; align-items: center; justify-content: center; background: #f8f9fa; }
.cam.err .cam-frame, .cam.err video { display: none; }
.cam.err .cam-msg { position: static; background: none; padding: 20px; color: #495057; }
.mk-list { margin: 4px 0 12px; }
.mk-manual { display: flex; align-items: center; gap: 10px; height: 48px; border-radius: 12px; border: 1px solid #dee2e6; padding: 0 14px; background: #fff; }
.mk-manual:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(247, 103, 7, .12); }
.mk-manual i { color: #adb5bd; font-size: 18px; }
.mk-manual input { flex: 1; border: 0; outline: none; font-size: 14.5px; background: none; min-width: 0; }
.mk-err { display: flex; gap: 8px; align-items: flex-start; color: var(--red); font-size: 13.5px; margin-top: 10px; }

/* позиция уже в чеке: «− N +» прямо на карточке, рамка тёплого цвета */
.tile.in { border-color: #ffc078; box-shadow: 0 0 0 1px #ffc078, 0 12px 26px -20px rgba(247, 103, 7, .6); }
.tile-qty { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); animation: tqIn .18s ease-out; }
@supports (backdrop-filter: blur(1px)) { .tile-qty { background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px) saturate(1.6); } }
@keyframes tqIn { from { opacity: 0; transform: translate(-50%, 6px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }
.tile-qty .tq { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 19px; color: #c2410c; background: #fff4e6; transition: transform .08s; }
.tile-qty .tq:active { transform: scale(.9); }
.tile-qty .tq.plus { color: #fff; background: linear-gradient(160deg, #ffa94d, #f76707); }
.tile-qty b { min-width: 24px; text-align: center; font-size: 15px; font-weight: 500; color: #212529; }
.tile .tile-qty i { position: static; font-size: 19px; color: inherit; display: block; }

/* ---------- покупатель ---------- */
.client-bar { padding: 10px 12px 4px; }
.cl-add { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; border: 1px dashed #ced4da; color: #495057; text-align: left; transition: border-color .15s, background .15s; }
.cl-add:hover { border-color: var(--accent-2); background: #fffaf5; }
.cl-add > i:first-child { font-size: 22px; color: var(--accent); }
.cl-add > i:last-child { font-size: 20px; color: #adb5bd; margin-left: auto; }
.cl-add span b { display: block; font-weight: 500; font-size: 14.5px; color: #212529; }
.cl-add span small { display: block; color: var(--muted); font-size: 12px; }
.cl-card { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 12px; background: linear-gradient(160deg, #fff8f1, #fff1e3); border: 1px solid #ffe0bd; cursor: pointer; }
.cl-ava { width: 40px; height: 40px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 500; flex-shrink: 0; }
.cl-ava.sm { width: 38px; height: 38px; font-size: 14px; }
.cl-ava.lg { width: 64px; height: 64px; font-size: 22px; }
.cl-info { flex: 1; min-width: 0; text-align: left; }
.cl-name { font-weight: 500; font-size: 14.5px; color: #212529; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cl-info small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tier { font-size: 10.5px; font-weight: 500; letter-spacing: .03em; border-radius: 999px; padding: 1px 7px; background: #f1f3f5; color: #495057; }
.tier.bronze { background: #f8e6d8; color: #8a4b1f; }
.tier.silver { background: #e9ecef; color: #495057; }
.tier.gold { background: #fff3bf; color: #946200; }
.tier.plat { background: #e5dbff; color: #5f3dc4; }
.cl-bday { color: #e64980; font-size: 15px; }
.cl-bal { text-align: right; flex-shrink: 0; }
.cl-bal b { display: block; font-size: 15px; font-weight: 500; color: #c2410c; }
.cl-bal small { color: var(--muted); font-size: 11px; }
.cl-x { width: 32px; height: 32px; border-radius: 10px; color: #868e96; font-size: 18px; flex-shrink: 0; }
.cl-x:hover { background: #fff; color: var(--red); }
.bonus-row { margin-bottom: 10px; }
.bonus-row .toggle.bonus-tg { margin: 0 0 6px; padding: 10px 12px; border-radius: 12px; }
.bonus-row .toggle b { font-weight: 500; font-size: 14px; }
.bonus-earn, .bonus-done { display: flex; align-items: center; gap: 6px; color: #2f9e44; font-size: 12.5px; }
.bonus-done { justify-content: center; margin-top: 10px; font-size: 13.5px; }
.modal.wide { width: min(880px, 100%); }
.cl-modal { display: grid; grid-template-columns: 300px 1fr; gap: 20px; min-height: 420px; }
.cl-phone { height: 56px; border-radius: 12px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .02em; margin-bottom: 12px; }
.cl-pad { gap: 8px; }
.cl-pad .key { height: 62px; font-size: 24px; border-radius: 12px; }
.cl-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.cl-name-inp { margin-bottom: 10px; }
.cl-list { display: grid; gap: 8px; align-content: start; }
.cl-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg); text-align: left; transition: background .15s; }
.cl-row:hover { background: #fff4e6; }
.cl-hint { color: #495057; font-size: 14px; line-height: 1.45; padding: 6px 2px; }
.cl-new { display: grid; gap: 10px; }
.ccard-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.ccard-name { font-size: 20px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ccard-bday { margin-top: 4px; font-size: 13px; color: #868e96; display: flex; gap: 6px; align-items: center; }
.ccard-bday.soon { color: #e64980; }
.ccard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.ccard-stats div { background: var(--bg); border-radius: 12px; padding: 12px; text-align: center; }
.ccard-stats b { display: block; font-size: 17px; font-weight: 500; }
.ccard-stats small { color: var(--muted); font-size: 12px; }
.ccard-tier { margin-bottom: 16px; }
.ccard-tier-t { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.ccard-bar { height: 8px; border-radius: 999px; background: #f1f3f5; overflow: hidden; }
.ccard-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffa94d, #f76707); }
.ccard-sec { margin-bottom: 14px; }
.ccard-favs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ccard-fav { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 12px; background: var(--bg); text-align: left; font-size: 13px; transition: background .15s; }
.ccard-fav img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.ccard-fav span { flex: 1; min-width: 0; line-height: 1.25; }
.ccard-fav i { color: var(--accent); font-size: 18px; }
.ccard-fav.done { background: #e6f6ec; }
@media (max-width: 760px) { .cl-modal { grid-template-columns: 1fr; } .ccard-stats { grid-template-columns: repeat(2, 1fr); } .ccard-favs { grid-template-columns: 1fr 1fr; } }

/* ---------- открытые счета, пречек, оплата частями ---------- */
.check-head { gap: 6px; padding: 12px 12px 12px 16px; }
.ch-title { font-size: 16px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; margin-left: -6px; border-radius: 10px; color: #212529; cursor: default; }
.ch-title.tabbed { cursor: pointer; background: #fff4e6; color: #9c4a0c; }
.ch-title.tabbed i:first-child { color: var(--accent); }
.ch-title .ch-edit { font-size: 13px; color: #d9a46b; }
.ch-actions { margin-left: auto; display: flex; gap: 4px; }
.ch-btn { height: 34px; padding: 0 10px; border-radius: 10px; font-size: 13px; color: #495057; display: inline-flex; align-items: center; gap: 5px; background: var(--bg); }
.ch-btn i { font-size: 16px; }
.ch-btn.icon { width: 34px; padding: 0; justify-content: center; background: none; color: #adb5bd; }
.ch-btn:hover:not(:disabled) { background: #fff4e6; color: #c2410c; }
.ch-btn.icon:hover { color: var(--red); background: var(--red-soft); }
.ch-btn:disabled { opacity: .4; cursor: not-allowed; }
.pay-x { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.link-btn { flex: 1 1 30%; height: 38px; border-radius: 12px; background: var(--bg); color: #495057; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.link-btn:hover:not(:disabled) { background: #fff4e6; color: #c2410c; }
.link-btn:disabled { opacity: .45; cursor: not-allowed; }
.tabs-bar { display: none; }
body.has-tabs .tabs-bar { display: flex; gap: 8px; align-items: stretch; padding: 8px 14px 10px; border-top: 1px solid var(--line); background: #fff; }
.tb-new { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 12px; border: 1px dashed #ced4da; color: #495057; font-size: 13.5px; }
.tb-new:hover { border-color: var(--accent-2); color: #c2410c; }
.tb-new.dim { opacity: .55; }
.tb-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tb-list::-webkit-scrollbar { display: none; }
.tb { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 14px; border-radius: 12px; background: var(--bg); text-align: left; min-width: 150px; transition: background .15s, box-shadow .15s; }
.tb:hover { background: #fff4e6; }
.tb.on { background: #fff; box-shadow: 0 0 0 2px var(--accent-2), 0 8px 18px -12px rgba(247, 103, 7, .7); }
.tb-l { font-weight: 500; font-size: 14px; color: #212529; display: flex; align-items: center; gap: 5px; }
.tb-l i { font-size: 14px; color: var(--accent); }
.tb-m { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.hold-t { height: 66px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px solid transparent; }
.hold-t b { font-size: 20px; font-weight: 500; }
.hold-t b.long { font-size: 14px; }
.hold-t small { font-size: 11.5px; color: var(--muted); }
.hold-t:hover { background: #fff4e6; }
.hold-t.busy { background: #fff4e6; border-color: #ffd8a8; }
.hold-t.busy small { color: #c2410c; }
.hold-t.mine { border-color: var(--accent); }
.paper { background: #fffdf8; border: 1px solid #f1e6d6; border-radius: 10px; padding: 14px 16px; box-shadow: inset 0 0 0 4px #fff, 0 10px 24px -18px rgba(0, 0, 0, .4); max-width: 360px; margin: 0 auto; }
.paper pre { margin: 0; font-family: Consolas, 'Courier New', monospace; font-size: 12.5px; line-height: 1.45; color: #212529; white-space: pre; overflow-x: auto; }
.pay-part-note { display: flex; gap: 8px; align-items: center; background: #fff4e6; color: #9c4a0c; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.sp-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.sp-even { display: flex; align-items: center; gap: 6px; }
.sp-even button { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); font-size: 15px; }
.sp-even button:hover { background: #fff4e6; color: #c2410c; }
.sp-parts { display: grid; gap: 8px; margin-bottom: 10px; }
.sp-part { display: grid; grid-template-columns: 26px auto 1fr 110px auto 36px; gap: 8px; align-items: center; background: var(--bg); border-radius: 12px; padding: 8px 10px; }
.sp-n { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #868e96; }
.sp-kinds { display: flex; gap: 4px; }
.sp-kinds button { height: 40px; padding: 0 10px; border-radius: 10px; background: #fff; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; color: #495057; }
.sp-kinds button.on { background: #212529; color: #fff; }
.sp-sum { display: flex; align-items: center; gap: 4px; background: #fff; border-radius: 10px; padding: 0 10px; height: 40px; border: 1px solid #e9ecef; }
.sp-sum input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 16px; background: none; }
.sp-sum.given input { font-size: 14px; }
.sp-sum span { color: #adb5bd; }
.sp-rest { height: 40px; padding: 0 10px; border-radius: 10px; background: #fff; font-size: 12.5px; color: #868e96; }
.sp-del { width: 36px; height: 36px; border-radius: 10px; color: #adb5bd; font-size: 18px; }
.sp-del:hover { color: var(--red); background: #fff; }
.sp-add { height: 42px; font-weight: 400; }
.si-list { display: grid; gap: 8px; }
.si-row { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 12px; padding: 8px 10px 8px 14px; border: 2px solid transparent; }
.si-row.on { background: #fff4e6; border-color: #ffd8a8; }
.si-t { flex: 1; min-width: 0; }
.si-t b { font-weight: 500; display: block; }
.si-t small { color: var(--muted); font-size: 12.5px; }
.si-row .qty { background: #fff; }
.si-all { height: 38px; font-size: 13px; font-weight: 400; background: #fff; }
.si-pay { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: 1; }
.si-pay .btn { height: 48px; flex: 0 0 auto; }
.si-sum { margin-right: auto; font-size: 14px; }
@media (max-width: 760px) { .sp-part { grid-template-columns: 26px 1fr; } .sp-kinds { grid-column: 2; } }

/* ---------- весовые позиции: ввод веса ---------- */
.wt { display: grid; grid-template-columns: 1fr 240px; gap: 16px; align-items: start; }
.wt-disp { display: flex; align-items: baseline; gap: 6px; height: 72px; padding: 0 18px; border-radius: 12px; border: 2px solid var(--accent-2); background: #fffaf5; }
.wt-disp b { font-size: 40px; font-weight: 500; line-height: 68px; font-variant-numeric: tabular-nums; }
.wt-disp span { font-size: 18px; color: var(--muted); }
.wt-disp.bad { border-color: #ffa8a8; background: #fff5f5; }
.wt-sum { margin: 8px 2px 12px; font-size: 15px; color: #c2410c; }
.wt-pre { display: flex; flex-wrap: wrap; gap: 6px; }
.wt-pre button { height: 40px; padding: 0 12px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.wt-pre button.on { background: #212529; color: #fff; }
.wt-pad .key { height: 52px; font-size: 20px; }
.tile-foot .price small { font-size: 11px; font-weight: 400; color: var(--muted); }
@media (max-width: 760px) { .wt { grid-template-columns: 1fr; } }

.wt-scale { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--bg); margin-bottom: 12px; }
.wt-read { flex: 1; min-width: 0; font-size: 14px; }
.wt-read b { font-weight: 500; font-size: 16px; }
.wt-scale .btn { height: 40px; font-size: 13.5px; font-weight: 400; background: #fff; flex: 0 0 auto; }
.wt-scale .btn.primary { background: linear-gradient(160deg, var(--accent-2), var(--accent)); color: #fff; }
.wt-scale .wt-gear { width: 40px; padding: 0; }
.wt-lamp { width: 10px; height: 10px; border-radius: 50%; background: #ced4da; flex-shrink: 0; }
.wt-lamp.wait { background: #fab005; }
.wt-lamp.ok { background: #40c057; box-shadow: 0 0 0 4px rgba(64, 192, 87, .18); }
.sc-proto { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sc-proto button { text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 2px solid transparent; }
.sc-proto button b { display: block; font-weight: 500; }
.sc-proto button small { color: var(--muted); font-size: 12px; }
.sc-proto button.on { border-color: var(--accent); background: #fff4e6; }
.sc-baud { display: flex; gap: 6px; }
.sc-baud button { height: 40px; padding: 0 14px; border-radius: 10px; background: var(--bg); }
.sc-baud button.on { background: #212529; color: #fff; }

/* касса на этом компьютере без интернета */
.top-badge.off { background: rgba(250, 176, 5, .16); color: #ffd43b; border-color: rgba(250, 176, 5, .35); }

/* дополнительная касса ждёт основную */
.main-down { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(18, 15, 13, .86); backdrop-filter: blur(6px); }
.main-down-in { max-width: 440px; text-align: center; color: #f1f3f5; display: grid; gap: 10px; padding: 24px; }
.main-down-in i { font-size: 44px; color: #ffd43b; }
.main-down-in .h { font-size: 22px; font-weight: 500; }
.main-down-in .muted { color: #adb5bd; font-size: 14px; }

/* новые заказы: кнопка в шапке, карточка, список */
.top-btn .cnt { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.top-btn.ring { background: rgba(247, 103, 7, .22); }
.top-btn.ring i { animation: ordRing 1.6s ease-in-out infinite; }
@keyframes ordRing { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-14deg); } 85% { transform: rotate(12deg); } 92% { transform: rotate(-6deg); } }
.order-card { position: fixed; top: calc(var(--top) + 12px); right: 16px; z-index: 70; width: 360px; max-width: calc(100% - 32px); background: #fff; color: var(--text); border-radius: 16px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45); border: 1px solid var(--line); padding: 16px; animation: ocIn .35s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes ocIn { from { opacity: 0; transform: translateY(-12px) scale(.98); } to { opacity: 1; transform: none; } }
.oc-head { display: flex; gap: 12px; align-items: flex-start; }
.oc-head > i { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 21px; flex-shrink: 0; }
.oc-head .t { font-size: 16px; font-weight: 500; }
.oc-head .s { color: var(--muted); font-size: 13px; }
.oc-head .x { margin-left: auto; color: var(--muted); font-size: 18px; }
.oc-items { margin: 10px 0 4px; font-size: 13.5px; }
.oc-addr { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.oc-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.ord-list { display: grid; gap: 10px; }
.ord { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ord.new { border-color: rgba(247, 103, 7, .45); background: var(--accent-soft); }
.ord-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ord-h .sp { flex: 1; }
.ord-i { margin: 6px 0 2px; font-size: 13.5px; }
.ord-c { font-size: 12.5px; }
.ord-a { display: flex; justify-content: flex-end; margin-top: 8px; }
.ost { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #f1f3f5; color: #495057; }
.ost.s0 { background: var(--accent); color: #fff; }
.ost.s1, .ost.s2 { background: #e7f5ff; color: var(--blue); }
.ost.s3, .ost.s4 { background: var(--green-soft); color: var(--green); }
.paid { font-size: 12px; color: var(--green); }

/* уведомления по делу: полоса под шапкой */
.alert-bar { position: fixed; top: var(--top); left: 50%; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 12px; max-width: min(760px, calc(100% - 32px)); margin-top: 8px; padding: 10px 12px 10px 14px; border-radius: 12px; font-size: 13.5px; box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .5); animation: ocIn .3s ease both; }
.alert-bar.warn { background: #fff4e6; color: #a04f00; border: 1px solid #ffd8a8; }
.alert-bar.bad { background: #fff5f5; color: #c92a2a; border: 1px solid #ffc9c9; }
.alert-bar > i { font-size: 20px; }
.alert-bar .tx { display: grid; }
.alert-bar .tx b { font-weight: 500; }
.alert-bar .tx span { color: #495057; font-size: 12.5px; }
.alert-bar .more { font-size: 12px; opacity: .8; white-space: nowrap; }
.alert-bar .x { font-size: 18px; color: inherit; opacity: .7; }

.modal-foot .sp { flex: 1; }

/* банковский терминал: ход оплаты в окне оплаты */
.term-state { display: flex; align-items: center; gap: 14px; margin: 16px 0 4px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); border: 1px solid #ffd8a8; }
.term-state > i { font-size: 30px; color: var(--accent); animation: termPulse 1.4s ease-in-out infinite; }
.term-state .h { font-size: 17px; font-weight: 500; color: var(--text); }
.term-err { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #fff5f5; border: 1px solid #ffc9c9; color: #c92a2a; font-weight: 400; }
.term-err.warn { background: #fff9db; border-color: #ffe066; color: #8f5a00; }
@keyframes termPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: .75; } }
@media (prefers-reduced-motion: reduce) { .term-state > i { animation: none; } }
.modal-foot { flex-wrap: wrap; } .modal-foot .btn { white-space: nowrap; }
.settle-bar { z-index: 49; } /* под окнами: пока идёт оплата в окне, кнопки полосы не нажать */
.settle-bar .btn { padding: 6px 12px; font-size: 13px; white-space: nowrap; }

/* ---------- чеки: вкладки, найти чек, возврат по позициям, «Исправить чек» (0.17.0) ---------- */
.rc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.rc-search { margin-bottom: 12px; }
.rc-row { width: 100%; text-align: left; border: 0; cursor: pointer; }
.rc-row:hover { background: var(--accent-soft); }
.rc-go { color: var(--muted); font-size: 20px; }
.rc-badge { display: inline-block; font-size: 12px; font-weight: 400; color: #495057; background: #fff; border-radius: 8px; padding: 2px 8px; margin-left: 4px; vertical-align: 1px; }
.rc-badge.warn { color: #9c4a0c; background: var(--amber-soft); }
.rc-off { opacity: .55; }
.rc-plan { display: grid; gap: 6px; margin-top: 14px; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.rc-plan div { display: flex; align-items: center; gap: 8px; }
.rc-plan i { color: var(--accent); font-size: 18px; }
.rc-plan span { flex: 1; min-width: 0; }
.rc-plan b { font-weight: 500; font-variant-numeric: tabular-nums; }
.rc-fix .tile-btn { height: auto; min-height: 96px; padding: 12px; text-align: center; }
.rc-fix .tile-btn small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.rc-pays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rc-pay { display: grid; gap: 6px; background: var(--bg); border-radius: 12px; padding: 10px; }
.rc-pay span { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.rc-pay i { color: var(--accent); font-size: 18px; }
.rc-pay .inp { height: 44px; background: #fff; }
.rc-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.rc-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.rc-back { margin-left: auto; flex: 0 0 auto; height: 34px; padding: 0 12px; border-radius: 10px; background: #fff; color: #9c4a0c; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.rc-back i { font-size: 16px; }
@media (max-width: 760px) { .rc-pays { grid-template-columns: 1fr; } }

/* ---------- предоплата и сертификаты (0.18.0) ---------- */
.prepaid-row { display: flex; align-items: center; gap: 8px; background: var(--accent-soft); color: #9c4a0c; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; font-size: 13.5px; }
.prepaid-row i { font-size: 18px; color: var(--accent); }
.prepaid-row span { flex: 1; min-width: 0; }
.prepaid-row b { font-weight: 500; font-variant-numeric: tabular-nums; }
/* в шапке счёта стола — «Предоплата»: название стола одной строкой, кнопки не переносятся */
.ch-title { white-space: nowrap; min-width: 0; }
.ch-btn { white-space: nowrap; flex: 0 0 auto; }
#checkCount { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 1360px) { #btnPrepay:not([hidden]) ~ #btnPrecheck { padding: 0 8px; } }

/* ---------- пиво: в зале или с собой (0.19.0) ---------- */
.beer-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 8px; font-size: 13.5px; }
.beer-row > i { font-size: 18px; color: var(--accent); }
.beer-row .bt { color: #495057; }
.beer-seg { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 3px; gap: 2px; }
.beer-seg button { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; color: #495057; }
.beer-seg button.on { background: #fff; color: #9c4a0c; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.beer-row small { flex-basis: 100%; color: var(--muted); font-size: 12px; }


/* ---------- сотрудники: «Нужно разрешение», права ролей, отчёт (этап «Сотрудники») ---------- */
.appr-what { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #fff4e6; margin-bottom: 4px; }
.appr-what b { font-weight: 500; font-size: 16px; }
.appr-what small { color: #9c4a0c; }
.appr .chip-r .ava { width: 28px; height: 28px; font-size: 12px; }
.warn-t { color: #c2410c; }
.rights { display: flex; flex-direction: column; gap: 6px; }
.rights-g { margin: 12px 0 2px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.right-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px; border-radius: 12px; background: var(--bg); }
.right-row .rt { flex: 1 1 220px; }
.right-row .seg-l { display: flex; gap: 6px; flex-wrap: wrap; }
.right-row .seg-l .chip-r { min-height: 38px; padding: 0 12px; font-size: 13.5px; }
.right-row .lim { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.right-row .lim .inp { width: 110px; min-height: 38px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 400; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid #eef0f2; white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid #f3f4f6; white-space: nowrap; }
.rc-badge.ok { color: #2b8a3e; background: #ebfbee; }
.row-item .ic .ava { width: 36px; height: 36px; font-size: 13px; }
.row-item .ic:has(.ava) { background: none; }

/* ---------- акции, промокод, карты «N+1» над итогом чека (этап 3) ---------- */
.promo-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 0; }
.promo-it { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 7px 10px; border-radius: 10px; background: #f3faf4; color: #2b8a3e; }
.promo-it span { flex: 1; color: var(--text, #212529); }
.promo-it b { font-weight: 500; white-space: nowrap; }
.promo-it.warn { background: #fff4e6; color: #c2410c; }
.promo-it.muted { background: var(--bg); color: var(--muted); }
.promo-it .x { border: 0; background: none; color: var(--muted); padding: 0 2px; font-size: 16px; }
.promo-add { align-self: flex-start; border: 1px dashed #d0d5db; background: none; border-radius: 10px; padding: 6px 12px; font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
