/* MultiBar 1.8.6 — всплывающие меню у места нажатия (как в Телеграме) */
.mb-sheet-overlay.pop { align-items: flex-start; justify-content: flex-start; background: transparent !important; }
.mb-sheet-overlay.pop .mb-sheet { position: absolute; width: auto; min-width: 190px; max-width: min(300px, calc(100vw - 16px)); padding: 6px; border-radius: 14px; border: 1px solid var(--border); box-shadow: 0 10px 34px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .14); max-height: calc(100dvh - 16px); overflow-y: auto; transform: scale(.92); opacity: 0; transition: transform .14s cubic-bezier(.2, .8, .2, 1), opacity .12s ease; }
.mb-sheet-overlay.pop.open .mb-sheet { transform: scale(1); opacity: 1; }
.mb-sheet-overlay.pop .mb-sheet-grip, .mb-sheet-overlay.pop .mb-sheet-head, .mb-sheet-overlay.pop .mb-sheet-cancel { display: none !important; }
.mb-sheet-overlay.pop .mb-sheet-items { gap: 1px; }
.mb-sheet-overlay.pop .mb-sheet-item { padding: 9px 10px; border-radius: 9px; background: transparent; gap: 10px; min-height: 40px; font-size: 14.5px; }
.mb-sheet-overlay.pop .mb-sheet-item:hover:not(:disabled) { background: rgba(var(--primary-rgb), .10); }
.mb-sheet-overlay.pop .mb-sheet-ico { width: 22px; height: 22px; flex: 0 0 22px; background: transparent !important; border-radius: 0; color: var(--text); opacity: .8; }
.mb-sheet-overlay.pop .mb-sheet-item.danger .mb-sheet-ico { color: var(--danger); opacity: 1; background: transparent !important; }
.mb-sheet-overlay.pop .mb-sheet-label small { display: none; }

/* закреплённое, «без звука» */
.chat-pinbar { display: flex; align-items: center; gap: 4px; margin: 0; padding: 4px 6px 4px 10px; border-bottom: 1px solid var(--border); background: var(--card); flex: 0 0 auto; }
.chat-pinbar[hidden] { display: none; }
.chat-pin-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: var(--primary); font: inherit; text-align: left; padding: 4px 0; cursor: pointer; }
.chat-pin-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.chat-pin-body b { font-size: 12.5px; color: var(--primary); }
.chat-pin-text { font-size: 13px; color: var(--text); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-pin-x { width: 32px; height: 32px; flex: 0 0 32px; border: 0; border-radius: 50%; background: transparent; color: var(--text); opacity: .6; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-li-mute { display: inline-flex; opacity: .55; margin-left: 4px; }
.chat-msg.flash .chat-bubble { animation: chatFlash 1.2s ease; }
@keyframes chatFlash { 0%, 60% { box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .55); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- единая ширина приложения на ПК (1.8.6): главный экран, Чаты, Накладные, Настройки, Журнал ---------- */
:root { --mb-col: 1000px; }
#app-root { max-width: var(--mb-col) !important; }
body.nav-tabs-bar .tabs { left: max(0px, calc(50% - var(--mb-col) / 2)) !important; right: max(0px, calc(50% - var(--mb-col) / 2)) !important; }
.settings-screen .settings-box { max-width: var(--mb-col) !important; }
.settings-screen .settings-body { max-width: none !important; }
#activity-log-overlay .overlay-box { max-width: var(--mb-col) !important; box-sizing: border-box; }
.nkl-screen { max-width: var(--mb-col) !important; }
@media (min-width: 860px) { .chat-screen { max-width: var(--mb-col) !important; box-sizing: border-box; } }

/* фото ТТК */
.ttk-photo-btn.has-photo { color: var(--primary); border-color: rgba(var(--primary-rgb), .55); background: rgba(var(--primary-rgb), .10); }

/* ---------- Склад → Посуда ---------- */
.inv-seg { display: flex; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 14px; background: rgba(var(--primary-rgb), .08); border: 1px solid var(--border); }
.inv-seg button { flex: 1; min-height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--text); font: inherit; font-weight: 800; font-size: 14.5px; cursor: pointer; opacity: .75; transition: background .15s ease, color .15s ease, opacity .15s ease; }
.inv-seg button.on { background: var(--primary); color: #fff; opacity: 1; box-shadow: 0 2px 8px rgba(var(--primary-rgb), .35); }
#inv-pane-main[hidden], #inv-pane-ware[hidden] { display: none !important; }
.ware-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ware-sum { font-size: 14px; opacity: .85; }
.ware-need-sum { color: #d97706; font-weight: 800; }
.ware-add { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; }
.ware-search input { width: 100%; box-sizing: border-box; min-height: 42px; padding: 9px 14px; border-radius: 21px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; margin-bottom: 10px; }
.ware-list { display: flex; flex-direction: column; gap: 8px; }
.ware-row { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--card); }
.ware-row.low { border-color: rgba(217, 119, 6, .55); background: rgba(217, 119, 6, .07); }
.ware-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ware-name { font-size: 15px; overflow-wrap: anywhere; }
.ware-main small { font-size: 12px; opacity: .65; }
.ware-need { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; color: #b45309; margin-top: 2px; }
.ware-qty { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.ware-step { width: 36px; height: 36px; border-radius: 11px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ware-step:active:not(:disabled) { transform: scale(.94); }
.ware-step:disabled, .ware-qty-in:disabled { opacity: .5; cursor: default; }
.ware-qty-in { width: 58px; height: 36px; box-sizing: border-box; text-align: center; border-radius: 11px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; font-weight: 800; padding: 0 4px; }
.ware-more { width: 34px; height: 36px; border: 0; background: transparent; color: var(--text); opacity: .6; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: 0 0 auto; }
.ware-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 16px; text-align: center; opacity: .7; }
.ware-empty span { font-size: 13px; max-width: 300px; }
.ware-form-box { max-width: 460px; }
.ware-form-body { display: flex; flex-direction: column; gap: 10px; }
.ware-f { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.ware-f > span { font-size: 12px; font-weight: 800; opacity: .65; text-transform: uppercase; letter-spacing: .03em; }
.ware-f input { min-height: 44px; box-sizing: border-box; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; width: 100%; }
.ware-f2 { display: flex; gap: 10px; }
.ware-packs { display: flex; gap: 6px; margin-top: -4px; }
.ware-packs button { min-width: 44px; min-height: 32px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-weight: 800; cursor: pointer; }
#ware-form-overlay { z-index: 12100; }

.notify-diag { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); font: 12.5px/1.45 var(--mb-font, system-ui, sans-serif); font-variant-numeric: tabular-nums; white-space: pre-wrap; overflow-wrap: anywhere; }
.notify-diag[hidden] { display: none; }

.chat-vid .chat-att-busy { flex-direction: column; gap: 6px; }
.cv-pct { font-size: 13px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
