:root {
    --pos-navbar-h: 48px;
    --pos-taskbar-h: 44px;
    --pos-window-header-h: 36px;

    --pos-desktop-bg: #e8edf4;
    --pos-window-bg: var(--bs-body-bg);
    --pos-window-border: var(--bs-border-color);
    --pos-window-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .18);
    --pos-window-header-bg: var(--bs-tertiary-bg);
    --pos-window-header-color: var(--bs-body-color);
    --pos-window-header-active-bg: var(--bs-primary);
    --pos-window-header-active-color: #fff;

    --pos-tile-bg: var(--bs-body-bg);
    --pos-tile-hover-bg: var(--bs-primary-bg-subtle);
    --pos-tile-icon: var(--bs-primary);

    --pos-deleted-bg: var(--bs-danger-bg-subtle);
    --pos-deleted-color: var(--bs-danger-text-emphasis);
    --pos-selected-bg: var(--bs-primary-bg-subtle);

    /* РМК (часть 5) */
    --pos-font-pos: 16px;
    --pos-font-total: 2.25rem;
}

[data-bs-theme="dark"] {
    --pos-desktop-bg: #10141a;
    --pos-window-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .65);
    --pos-window-header-active-bg: #1f4fa3;
}

html, body { height: 100%; }

.pos-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.pos-navbar {
    flex: 0 0 var(--pos-navbar-h);
    height: var(--pos-navbar-h);
    background: var(--bs-body-bg);
}

/* ---------- Рабочий стол ---------- */
.pos-desktop {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;
    background: var(--pos-desktop-bg);
    z-index: 0;
    isolation: isolate;
}

.pos-launcher {
    position: absolute;
    inset: 0;
    padding: 1.25rem;
    overflow: auto;
    z-index: 0;
}

.pos-group-btn { font-weight: 500; }
.pos-group-btn:not(.active) { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); color: var(--bs-body-color); }

.pos-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin-top: 1.25rem;
}
.pos-tiles[hidden] { display: none; }

.pos-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 118px;
    padding: 1rem .75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    background: var(--pos-tile-bg);
    color: var(--bs-body-color);
    text-align: center;
    font-weight: 500;
    transition: background-color .15s, border-color .15s, transform .15s;
}
.pos-tile i { font-size: 2rem; color: var(--pos-tile-icon); }
.pos-tile:hover,
.pos-tile:focus-visible {
    background: var(--pos-tile-hover-bg);
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    outline: none;
}

/* ---------- Окна ---------- */
.pos-window {
    position: absolute;
    display: flex;
    flex-direction: column;
    min-width: 360px;
    min-height: 220px;
    background: var(--pos-window-bg);
    border: 1px solid var(--pos-window-border);
    border-radius: .5rem;
    box-shadow: var(--pos-window-shadow);
    overflow: hidden;
}
.pos-window:focus { outline: none; }
.pos-window.is-minimized { display: none; }
.pos-window.is-maximized {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
    border-width: 0;
}

.pos-window__header {
    display: flex;
    flex: 0 0 var(--pos-window-header-h);
    align-items: center;
    gap: .5rem;
    height: var(--pos-window-header-h);
    padding: 0 .25rem 0 .75rem;
    background: var(--pos-window-header-bg);
    color: var(--pos-window-header-color);
    border-bottom: 1px solid var(--pos-window-border);
    cursor: move;
    user-select: none;
    touch-action: none;
}
.pos-window.is-active .pos-window__header {
    background: var(--pos-window-header-active-bg);
    color: var(--pos-window-header-active-color);
}
.pos-window.is-maximized .pos-window__header { cursor: default; }

.pos-window__icon { font-size: 1rem; }
.pos-window__title { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: .9rem; }
.pos-window__controls { display: flex; gap: 2px; }
.pos-window__btn {
    padding: .15rem .45rem;
    border: 0;
    border-radius: .25rem;
    color: inherit;
    line-height: 1;
}
.pos-window__btn:hover,
.pos-window__btn:focus-visible { background: rgba(0, 0, 0, .1); color: inherit; }
.pos-window.is-active .pos-window__btn:hover,
.pos-window.is-active .pos-window__btn:focus-visible { background: rgba(255, 255, 255, .22); }
.pos-window__btn--close:hover,
.pos-window__btn--close:focus-visible { background: var(--bs-danger) !important; color: #fff !important; }

.pos-window__body {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
}
.pos-window__content { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.pos-window__loading { display: flex; flex: 1; align-items: center; justify-content: center; }

.pos-window__resize { position: absolute; z-index: 3; }
.pos-window__resize--n  { top: -3px; left: 8px; right: 8px; height: 7px; cursor: n-resize; }
.pos-window__resize--s  { bottom: -3px; left: 8px; right: 8px; height: 7px; cursor: s-resize; }
.pos-window__resize--e  { right: -3px; top: 8px; bottom: 8px; width: 7px; cursor: e-resize; }
.pos-window__resize--w  { left: -3px; top: 8px; bottom: 8px; width: 7px; cursor: w-resize; }
.pos-window__resize--ne { right: -3px; top: -3px; width: 12px; height: 12px; cursor: ne-resize; }
.pos-window__resize--nw { left: -3px; top: -3px; width: 12px; height: 12px; cursor: nw-resize; }
.pos-window__resize--se { right: -3px; bottom: -3px; width: 14px; height: 14px; cursor: se-resize; }
.pos-window__resize--sw { left: -3px; bottom: -3px; width: 12px; height: 12px; cursor: sw-resize; }
.pos-window.is-maximized .pos-window__resize { display: none; }

body.pos-dragging,
body.pos-dragging * { user-select: none !important; }

/* ---------- Панель задач ---------- */
.pos-taskbar {
    display: flex;
    flex: 0 0 var(--pos-taskbar-h);
    align-items: center;
    gap: .5rem;
    height: var(--pos-taskbar-h);
    padding: 0 .5rem;
    background: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
}
.pos-taskbar__items {
    display: flex;
    flex: 1 1 auto;
    gap: .25rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}
.pos-task {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .4rem;
    max-width: 220px;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}
.pos-task:hover { border-color: var(--bs-primary); color: var(--bs-body-color); }
.pos-task.active { background: var(--bs-primary-bg-subtle); border-color: var(--bs-primary); font-weight: 500; }
.pos-task.is-minimized { opacity: .65; font-style: italic; }
.pos-task__title { min-width: 0; }
.pos-taskbar__clock { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Общие элементы ---------- */
.help-tip { margin-left: .25rem; color: var(--bs-secondary-color); font-size: .85em; cursor: help; }
.help-tip:focus-visible { outline: 2px solid var(--bs-primary); border-radius: 50%; }

.text-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem .75rem; border-bottom: 1px solid var(--bs-border-color); }
.toolbar .form-control,
.toolbar .form-select { width: auto; }

#toast-container { z-index: 2000; }
.toast { min-width: 280px; }

/* ---------- Таблицы (POS.grid) ---------- */
.pos-grid-container { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.pos-grid-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.pos-grid thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bs-tertiary-bg);
    white-space: nowrap;
    font-weight: 600;
}
.pos-grid th.sortable { cursor: pointer; }
.pos-grid th.sortable:hover { color: var(--bs-primary); }
.pos-grid tbody tr:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
.pos-grid tr.is-selected > * { --bs-table-bg-state: var(--pos-selected-bg); }
.pos-grid tr.row-deleted > * { --bs-table-bg-state: var(--pos-deleted-bg); color: var(--pos-deleted-color); }
.pos-grid tr.row-disabled > * { color: var(--bs-secondary-color); }
.pos-grid-check { width: 2.25rem; }
.pos-grid-footer { flex: 0 0 auto; background: var(--bs-body-bg); }
.pos-grid-empty { padding: 2rem !important; text-align: center; color: var(--bs-secondary-color); }

/* ---------- Адаптация содержимого окон под ширину окна ---------- */
.pos-window__content { container-type: inline-size; }

/* ---------- Выбор кассы ---------- */
.pos-kkm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.pos-kkm-card { display: flex; flex-direction: column; align-items: stretch; gap: .25rem; padding: 1rem; text-align: left; }

/* ---------- РМК ---------- */
.pos-rmk { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; font-size: var(--pos-font-pos); }

.pos-rmk__navzone {
    display: flex;
    flex: 0 0 24px;
    align-items: center;
    gap: .4rem;
    height: 24px;
    padding: 0 .75rem;
    font-size: .75rem;
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
    border-bottom: 1px dashed var(--bs-border-color);
    cursor: zoom-in;
    user-select: none;
}
.pos-rmk__navzone:hover { color: var(--bs-primary); }

.pos-rmk__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--bs-border-color);
}
.pos-rmk__kkm { font-size: 1.05rem; }
.pos-rmk__shift { margin-right: auto; }

.pos-rmk__loading,
.pos-rmk__noshift,
.pos-rmk__error {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.pos-rmk__main { display: grid; flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; }
.pos-rmk__left { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--bs-border-color); }

.pos-rmk__search { position: relative; padding: .75rem; border-bottom: 1px solid var(--bs-border-color); }
.pos-rmk__results {
    position: absolute;
    top: calc(100% - .5rem);
    left: .75rem;
    right: .75rem;
    z-index: 20;
    max-height: 360px;
    overflow: auto;
}
.pos-rmk__result { display: flex; align-items: center; justify-content: space-between; gap: .75rem; text-align: left; }
.pos-rmk__result-name { flex: 1 1 auto; min-width: 0; }
.pos-rmk__result.is-disabled { opacity: .6; cursor: not-allowed; }

.pos-rmk__cart { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; }
.pos-rmk__table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bs-tertiary-bg);
    font-size: .85rem;
    white-space: nowrap;
}
.pos-rmk__table td { font-size: var(--pos-font-pos); }
.pos-rmk__table tbody tr { cursor: default; }
.pos-rmk__table tr.is-selected > * { --bs-table-bg-state: var(--pos-selected-bg); }
.pos-rmk__table tr.is-flash > * { animation: pos-flash .7s ease-out; }
@keyframes pos-flash { from { box-shadow: inset 0 0 0 9999px var(--bs-success-bg-subtle); } }
.pos-rmk__qty { width: 6.5rem; text-align: right; }
.pos-rmk__empty { padding: 3rem 1rem; text-align: center; color: var(--bs-secondary-color); }

.pos-rmk__side { display: flex; flex-direction: column; gap: .75rem; padding: .75rem; overflow: auto; background: var(--bs-tertiary-bg); }
.pos-rmk__total-box { padding: .75rem; text-align: right; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .5rem; }
.pos-rmk__total { font-size: var(--pos-font-total); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pos-rmk__paybtn { display: flex; align-items: center; justify-content: space-between; font-size: 1rem; }
.pos-rmk__last { padding: .75rem; border-radius: .5rem; background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.pos-rmk__change { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pos-rmk__keys li { margin-bottom: .2rem; }
.pos-drafts:not(:empty) { padding: .25rem .5rem .5rem; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-warning-bg-subtle); max-height: 40%; overflow: auto; }
.pos-drafts .table { background: transparent; margin-bottom: 0; }

@container (max-width: 760px) {
    .pos-rmk__main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
    .pos-rmk__left { border-right: 0; border-bottom: 1px solid var(--bs-border-color); }
    .pos-rmk__keys { display: none; }
}

/* ---------- Оплата ---------- */
.pos-pay__total { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pos-pay__change { font-size: 1.75rem; font-weight: 700; }

/* ---------- Печать отчёта из модального окна ---------- */
@media print {
    .pos-body { display: block; height: auto; overflow: visible; }
    body.modal-open > :not(.modal) { display: none !important; }
    .modal { position: static !important; display: block !important; }
    .modal-dialog { max-width: 100% !important; margin: 0 !important; }
    .modal-content { border: 0 !important; box-shadow: none !important; }
    .modal-footer,
    .modal-header .btn-close,
    .modal-backdrop { display: none !important; }
}
/* ---------- Окна, построенные в JS ---------- */
.pos-win-fill { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.toolbar .tb-search { min-width: 220px; }
.toolbar .tb-date { width: 9.5rem; }
.toolbar .tb-datetime { width: 12.5rem; }

.pos-checks { max-height: 320px; overflow: auto; }
.pos-json {
    max-height: 60vh;
    overflow: auto;
    padding: .75rem;
    font-size: .8rem;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--bs-tertiary-bg);
    border-radius: .375rem;
}

.qty-neg { color: var(--bs-danger); font-weight: 600; }
.qty-pos { color: var(--bs-success); }

/* ---------- Подбор товара в формах ---------- */
.pos-picker { position: relative; }
.pos-picker__list { position: absolute; top: 100%; left: 0; right: 0; z-index: 1100; max-height: 260px; overflow: auto; }

/* ---------- Карточки с вкладками ---------- */
.pos-card-panels { flex: 1 1 auto; min-height: 0; overflow: auto; }

/* ---------- Дерево видов номенклатуры ---------- */
.pos-tree-wrap { flex: 1 1 auto; min-height: 0; padding: .5rem; overflow: auto; }
.pos-tree-wrap.drop-root { outline: 2px dashed var(--bs-primary); outline-offset: -4px; }
.pos-tree,
.pos-tree ul { margin: 0; padding: 0; list-style: none; }
.pos-tree ul { margin-left: .9rem; padding-left: 1.2rem; border-left: 1px dashed var(--bs-border-color); }
.pos-tree__row {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .35rem;
    border: 1px solid transparent;
    border-radius: .35rem;
}
.pos-tree__row[draggable="true"] { cursor: grab; }
.pos-tree__row:hover { background: var(--bs-tertiary-bg); }
.pos-tree__row.is-inactive .pos-tree__name { color: var(--bs-secondary-color); text-decoration: line-through; }
.pos-tree__row.is-dragging { opacity: .45; }
.pos-tree__row.drop-inside { background: var(--bs-primary-bg-subtle); border-color: var(--bs-primary); }
.pos-tree__row.drop-before { box-shadow: inset 0 3px 0 var(--bs-primary); }
.pos-tree__row.drop-after { box-shadow: inset 0 -3px 0 var(--bs-primary); }
.pos-tree__toggle { padding: 0 .2rem; color: inherit; }
.pos-tree__actions { display: flex; gap: .25rem; opacity: 0; transition: opacity .1s; }
.pos-tree__row:hover .pos-tree__actions,
.pos-tree__row:focus-within .pos-tree__actions { opacity: 1; }
@media (hover: none) { .pos-tree__actions { opacity: 1; } }

/* ---------- Цены и документы ---------- */
.pos-gp-input { width: 7.5rem; margin-left: auto; }
.pos-gp-pct { width: 5.5rem; margin-left: auto; }
.pos-gp-value { width: 8rem; }
.pos-preview-wrap { max-height: 50vh; overflow: auto; }
.pos-chip { display: inline-flex; align-items: center; gap: .35rem; }
.pos-chip .btn-close { width: .55em; height: .55em; padding: .15em; }

.pos-doc { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.pos-doc__head { padding: .75rem; border-bottom: 1px solid var(--bs-border-color); }
.pos-doc__add { position: relative; padding: .75rem; border-bottom: 1px solid var(--bs-border-color); }
.pos-doc__add > .pos-picker__list { top: calc(100% - .5rem); left: .75rem; right: .75rem; }
.pos-doc__source { flex: 0 0 auto !important; width: auto !important; max-width: 16rem; }
.pos-doc__lines { flex: 1 1 auto; min-height: 120px; overflow: auto; }
.pos-doc__lines thead th { position: sticky; top: 0; z-index: 1; background: var(--bs-tertiary-bg); white-space: nowrap; }
.pos-doc__lines tr.is-flash > * { animation: pos-flash .7s ease-out; }
.pos-doc__num { width: 7.5rem; margin-left: auto; text-align: right; }
.pos-doc__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    padding: .75rem;
    border-top: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}
.pos-doc__total { margin-right: auto; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pos-doc__pay { flex: 0 1 380px; min-width: 260px; }
/* ---------- Вставка таблицы из Excel ---------- */
.pos-paste__input { position: relative; }
.pos-paste__zone {
    min-height: 9rem; border: 2px dashed var(--bs-border-color); border-radius: .5rem; outline: none;
    color: transparent; caret-color: transparent; overflow: hidden; position: relative; z-index: 1;
}
.pos-paste__zone:focus { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .04); }
.pos-paste__hint {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: var(--bs-secondary-color); pointer-events: none; padding: 1rem; z-index: 2;
}
.pos-paste__preview { max-height: 55vh; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: .375rem; }
.pos-paste__preview table { font-size: .8125rem; white-space: nowrap; }
.pos-paste__preview thead th { position: sticky; top: 0; background: var(--bs-body-bg); z-index: 1; }
.pos-paste__preview .pos-paste__head th { top: 2.1rem; font-weight: 600; background: var(--bs-tertiary-bg); }
.pos-paste__preview select { min-width: 9rem; }
.pos-paste__preview select.is-mapped { border-color: var(--bs-success); font-weight: 600; }
.pos-paste__preview td.is-mapped { background: rgba(var(--bs-success-rgb), .06); }
.pos-paste__preview td { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; }
.pos-paste__rownum { color: var(--bs-secondary-color); width: 2.5rem; text-align: right; }
tr.pos-paste__skip td { opacity: .45; text-decoration: line-through; }
.pos-resolve { max-height: 52vh; overflow: auto; }
.pos-resolve__action { min-width: 22rem; }

/* ---------- Поступление: инструменты, подсветка изменённых цен ---------- */
.pos-doc__tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .25rem .75rem .5rem; }
.pos-doc__lines tr.is-selected > td { background: rgba(var(--bs-primary-rgb), .08); }
.pos-doc__lines tr.is-price-changed > td { background: rgba(var(--bs-danger-rgb), .10); }
.pos-doc__lines tr.is-price-changed input[data-f="price"] { border-color: var(--bs-danger); color: var(--bs-danger); font-weight: 600; }

/* ---------- Импорт номенклатуры ---------- */
.pos-import__table { flex: 1 1 auto; overflow: auto; padding: 0 .75rem .75rem; min-height: 0; }

/* ---------- Зарплата ---------- */
.pos-salary__summary { display: flex; flex-wrap: wrap; gap: .5rem; padding: .5rem .75rem; border-bottom: 1px solid var(--bs-border-color); }
.pos-salary__card { border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .35rem .75rem; min-width: 11rem; }
.pos-salary__card.is-total { border-color: var(--bs-success); background: rgba(var(--bs-success-rgb), .06); }
.pos-salary__card.is-negative { border-color: var(--bs-danger); background: rgba(var(--bs-danger-rgb), .06); }
.pos-salary__card.is-pending { border-color: var(--bs-warning); background: rgba(var(--bs-warning-rgb), .08); }
.pos-salary__types { margin-left: auto; min-width: 14rem; }
.pos-salary__comment { display: inline-block; max-width: 24rem; white-space: normal; }
.pos-salary__retail { max-height: 55vh; overflow: auto; }

/* ---------- Выбор из справочника с поиском (POS.combo) ---------- */
.pos-combo { position: relative; display: flex; align-items: stretch; min-width: 12rem; }
.pos-combo .pos-combo__input { flex: 1 1 auto; padding-right: 1.9rem; text-overflow: ellipsis; }
.pos-combo.has-add .pos-combo__input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pos-combo .pos-combo__add { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.pos-combo__clear {
    position: absolute; top: 50%; transform: translateY(-50%); right: .4rem; z-index: 3;
    border: 0; background: transparent; color: var(--bs-secondary-color); padding: 0 .2rem; line-height: 1; font-size: .75rem;
}
.pos-combo.has-add .pos-combo__clear { right: 2.9rem; }
.pos-combo__clear:hover { color: var(--bs-danger); }
.pos-combo__list { position: absolute; top: 100%; left: 0; min-width: 100%; max-width: 32rem; z-index: 1100; max-height: 300px; overflow: auto; }
.pos-combo__list .list-group-item { font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-combo__list .is-current:not(.active) { font-weight: 600; }
.toolbar .pos-combo { width: auto; min-width: 11rem; max-width: 16rem; }
.toolbar .pos-combo .form-control { width: 100%; }

/* ---------- Каталог: номенклатура + дерево видов ---------- */
.pos-catalog { display: flex; flex: 1 1 auto; min-height: 0; }
.pos-catalog__main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; }
.pos-catalog__main > .toolbar { flex: 0 0 auto; }
.pos-catalog__crumbs { flex: 0 0 auto; min-height: 1.9rem; padding: .25rem .75rem; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.pos-catalog__side { display: flex; flex-direction: column; flex: 0 0 300px; min-height: 0; border-left: 1px solid var(--bs-border-color); }
.pos-catalog__side-head { padding: .5rem; border-bottom: 1px solid var(--bs-border-color); }
.pos-catalog__tree-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; padding: .25rem .5rem; }
.pos-catalog__tree .pos-tree__row { cursor: pointer; }
.pos-catalog__tree .pos-tree__row.is-current { background: var(--bs-primary-bg-subtle); border-color: var(--bs-primary); }
.pos-catalog__tree .pos-tree__row.drop-inside { outline: 2px dashed var(--bs-primary); }
.pos-catalog--modal { height: 65vh; border: 1px solid var(--bs-border-color); border-radius: .375rem; }
.pos-grid tbody tr[draggable="true"] { cursor: grab; }

/* ---------- Поступление: групповое редактирование строк ---------- */
.pos-doc__bulk { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .4rem .75rem; background: var(--bs-primary-bg-subtle); border-top: 1px solid var(--bs-border-color); }
.pos-doc__lines tr.is-picked > td { background: rgba(var(--bs-primary-rgb), .12); }

/* ---------- Движения товаров ---------- */
.pos-grid tr.row-in > td:nth-child(5) { background: rgba(var(--bs-success-rgb), .06); }
.pos-grid tr.row-out > td:nth-child(6) { background: rgba(var(--bs-danger-rgb), .06); }

/* ---------- Инвентаризация ---------- */
.pos-inventory { display: flex; flex: 1 1 auto; min-height: 0; }
.pos-inventory__side { flex: 0 0 320px; overflow: auto; padding: .5rem .75rem; border-right: 1px solid var(--bs-border-color); }
.pos-inventory__tree ul { margin-left: .4rem; }
.pos-inventory__node { margin: .1rem 0; }
.pos-inventory__list { flex: 1 1 auto; overflow: auto; padding: .5rem .75rem; }
.pos-inventory__list tbody tr:nth-child(even) > td { background: rgba(var(--bs-primary-rgb), .05); }

/* ---------- Ценники и редактор шаблонов ---------- */
.pos-tags { display: flex; flex: 1 1 auto; min-height: 0; }
.pos-tags__main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; }
.pos-tags__side { flex: 0 0 340px; overflow: auto; padding: .75rem; border-left: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.pos-tags__num { width: 5.5rem; }
.pos-tag { position: relative; overflow: hidden; box-sizing: border-box; background: #fff; color: #000;
           font-family: Arial, Helvetica, sans-serif; outline: 1px dashed #aaa; }
.pos-tag__el { position: absolute; box-sizing: border-box; overflow: hidden; line-height: 1.1; display: block; word-break: break-word; }
.pos-tag__el.is-line { border-top: .3mm solid #000; height: 0 !important; }
.pos-tag__el.is-rect { border: .3mm solid #000; }
.pos-tag__el svg { display: block; }
.pos-tpl { display: flex; flex: 1 1 auto; min-height: 0; }
.pos-tpl__stage { flex: 1 1 auto; overflow: auto; padding: 2rem; background: repeating-conic-gradient(var(--bs-tertiary-bg) 0 25%, var(--bs-body-bg) 0 50%) 0 0 / 16px 16px; }
.pos-tpl__canvas { position: relative; background: #fff; box-shadow: 0 0 0 1px #888, 0 4px 16px rgba(0,0,0,.2); outline: none; }
.pos-tpl__canvas:focus-visible { box-shadow: 0 0 0 2px var(--bs-primary), 0 4px 16px rgba(0,0,0,.2); }
.pos-tpl__tag { position: absolute; left: 0; top: 0; outline: none; pointer-events: none; }
.pos-tpl__box { position: absolute; border: 1px dashed rgba(13,110,253,.45); cursor: move; }
.pos-tpl__box:hover { border-color: var(--bs-primary); }
.pos-tpl__box.is-current { border: 1px solid var(--bs-primary); background: rgba(13,110,253,.08); }
.pos-tpl__grip { position: absolute; right: -4px; bottom: -4px; width: 9px; height: 9px; background: var(--bs-primary); cursor: nwse-resize; border-radius: 2px; }
.pos-tpl__props { flex: 0 0 300px; overflow: auto; padding: .75rem; border-left: 1px solid var(--bs-border-color); }

/* ---------- macOS-inspired оболочка ---------- */
:root {
    --bs-primary: #0a84ff;
    --bs-primary-rgb: 10, 132, 255;
    --bs-link-color: #0878e8;
    --bs-link-hover-color: #0066cc;
    --pos-navbar-h: 52px;
    --pos-taskbar-h: 50px;
    --pos-window-header-h: 42px;
    --pos-desktop-bg: #e9edf3;
    --pos-window-border: rgba(35, 45, 60, .16);
    --pos-window-shadow: 0 18px 48px rgba(28, 39, 56, .2), 0 2px 8px rgba(28, 39, 56, .1);
    --pos-window-header-bg: rgba(246, 247, 249, .94);
    --pos-window-header-color: #242832;
    --pos-window-header-active-bg: rgba(246, 247, 249, .96);
    --pos-window-header-active-color: #242832;
    --pos-tile-hover-bg: rgba(10, 132, 255, .08);
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --bs-primary: #0a84ff;
    --bs-primary-rgb: 10, 132, 255;
    --bs-link-color: #58aaff;
    --bs-link-hover-color: #8bc4ff;
    --pos-desktop-bg: #20242b;
    --pos-window-border: rgba(255, 255, 255, .12);
    --pos-window-shadow: 0 22px 54px rgba(0, 0, 0, .5), 0 2px 10px rgba(0, 0, 0, .3);
    --pos-window-header-bg: rgba(48, 50, 56, .96);
    --pos-window-header-color: #f3f4f6;
    --pos-window-header-active-bg: rgba(48, 50, 56, .98);
    --pos-window-header-active-color: #f3f4f6;
    --pos-tile-hover-bg: rgba(10, 132, 255, .16);
}

html { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; }
body { letter-spacing: -.012em; }

.pos-navbar,
.pos-taskbar {
    position: relative;
    z-index: 10;
    background: color-mix(in srgb, var(--bs-body-bg) 88%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    backdrop-filter: blur(18px) saturate(1.35);
}
.pos-navbar { border-color: var(--pos-window-border) !important; padding-inline: 1rem !important; }
.pos-navbar .navbar-brand { letter-spacing: -.025em; }
.pos-taskbar { padding-inline: .75rem; border-color: var(--pos-window-border); }

.pos-desktop {
    background:
        radial-gradient(ellipse at 14% 8%, rgba(255, 255, 255, .72), transparent 42%),
        radial-gradient(ellipse at 88% 90%, rgba(119, 171, 230, .2), transparent 46%),
        var(--pos-desktop-bg);
}
[data-bs-theme="dark"] .pos-desktop {
    background:
        radial-gradient(ellipse at 14% 8%, rgba(91, 107, 132, .18), transparent 44%),
        radial-gradient(ellipse at 88% 90%, rgba(24, 89, 160, .18), transparent 46%),
        var(--pos-desktop-bg);
}

.pos-launcher { padding: clamp(1rem, 2.5vw, 2rem); }
.pos-group-btn,
.pos-tiles .btn { border-radius: 999px; }
.pos-tile {
    min-height: 126px;
    border-color: color-mix(in srgb, var(--bs-border-color) 72%, transparent);
    border-radius: 1rem;
    box-shadow: 0 3px 12px rgba(30, 44, 64, .055);
    transition: background-color .18s, border-color .18s, transform .18s, box-shadow .18s;
}
.pos-tile:hover,
.pos-tile:focus-visible {
    box-shadow: 0 9px 22px rgba(30, 44, 64, .12);
    transform: translateY(-3px);
}

.pos-window {
    border-color: var(--pos-window-border);
    border-radius: 12px;
    box-shadow: var(--pos-window-shadow);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    backdrop-filter: blur(24px) saturate(1.3);
}
.pos-window.is-maximized { border-radius: 0; }
.pos-window__header {
    gap: .55rem;
    padding-inline: .75rem;
    border-bottom-color: var(--pos-window-border);
    cursor: default;
}
.pos-window.is-active .pos-window__header { background: var(--pos-window-header-active-bg); color: var(--pos-window-header-active-color); }
.pos-window__controls { order: -1; gap: 7px; align-items: center; margin-right: .3rem; }
.pos-window__btn {
    position: relative;
    width: 13px;
    height: 13px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .14);
    border-radius: 50%;
    background: #c7c9ce;
    color: #34363b;
    box-shadow: inset 0 1px rgba(255, 255, 255, .48);
}
.pos-window__btn[aria-label="Открыть в новой вкладке"] { order: 3; background: #c7c9ce; }
.pos-window__btn[aria-label="Свернуть"] { order: 1; background: #ffbd2e; }
.pos-window__btn[aria-label="Развернуть"] { order: 2; background: #28c840; }
.pos-window__btn--close { order: 0; background: #ff5f57; }
.pos-window__btn i { opacity: 0; font-size: 7px; transition: opacity .12s; }
.pos-window__btn:hover i,
.pos-window__btn:focus-visible i { opacity: 1; }
.pos-window__btn:hover,
.pos-window__btn:focus-visible,
.pos-window.is-active .pos-window__btn:hover,
.pos-window.is-active .pos-window__btn:focus-visible { filter: brightness(.93); color: #34363b; }
.pos-window__title { text-align: center; font-size: .875rem; font-weight: 600; }
.pos-window__icon { color: var(--bs-primary); }
[data-bs-theme="dark"] .pos-window__btn { border-color: rgba(0, 0, 0, .22); }
[data-bs-theme="dark"] .pos-window:not(.is-active) .pos-window__btn { background: #676a70; }

.pos-task { border-radius: 999px; padding-inline: .7rem; }
.pos-task.active { box-shadow: inset 0 0 0 1px rgba(10, 132, 255, .12); }

.btn { --bs-btn-border-radius: .6rem; transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn-primary {
    --bs-btn-bg: #0a84ff;
    --bs-btn-border-color: #0a84ff;
    --bs-btn-hover-bg: #0074e8;
    --bs-btn-hover-border-color: #0074e8;
    --bs-btn-active-bg: #0066cc;
    --bs-btn-active-border-color: #0066cc;
    --bs-btn-disabled-bg: #0a84ff;
    --bs-btn-disabled-border-color: #0a84ff;
    box-shadow: 0 1px 2px rgba(0, 74, 150, .18);
}
.btn-primary:active { transform: translateY(1px); }
.form-control,
.form-select,
.input-group-text { border-radius: .6rem; }
.form-control:focus,
.form-select:focus { box-shadow: 0 0 0 .2rem rgba(10, 132, 255, .17); }
.card,
.modal-content,
.toast { border-radius: .9rem; }
.modal-content { box-shadow: 0 18px 50px rgba(0, 0, 0, .2); }
.table > :not(caption) > * > * { border-color: color-mix(in srgb, var(--bs-border-color) 78%, transparent); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (max-width: 600px) {
    :root { --pos-navbar-h: 48px; --pos-taskbar-h: 44px; }
    .pos-navbar { padding-inline: .65rem !important; }
    .pos-window { border-radius: 10px; }
    .pos-window__controls { gap: 5px; }
}

/* ---------- Центрирование и визуальный ритм ---------- */
.pos-navbar { position: relative; justify-content: flex-start; }
.pos-navbar .navbar-brand {
    position: absolute !important;
    left: 1rem !important;
    right: auto !important;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(52vw, 34rem);
    margin: 0;
    transform: none;
}
.pos-navbar > .d-flex { position: static; z-index: auto; flex: 0 0 auto; min-width: 0; margin-left: auto; flex-wrap: nowrap; }
.pos-launcher { display: flex; flex-direction: column; align-items: center; }
.pos-launcher > .alert { width: min(100%, 64rem); margin: auto; }
.pos-groups {
    justify-content: center;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: .35rem;
    border: 1px solid var(--pos-window-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bs-body-bg) 78%, transparent);
    box-shadow: 0 4px 14px rgba(31, 43, 61, .07);
}
.pos-group-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-width: 7.5rem;
    min-height: 36px;
    padding: .4rem .85rem;
    color: var(--bs-secondary-color);
    font-size: .925rem;
    line-height: 1.2;
    white-space: nowrap;
}
.pos-group-btn.active {
    color: #fff;
    background: var(--bs-primary);
    box-shadow: 0 2px 6px rgba(0, 87, 180, .2);
}
.pos-group-btn:not(.active) { border-color: transparent; background: transparent; }
.pos-groups.nav-pills .pos-group-btn { border-radius: 999px; }
.pos-groups.nav-pills .pos-group-btn:not(.active):hover,
.pos-groups.nav-pills .pos-group-btn:not(.active):focus-visible {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .11);
    border-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(var(--bs-primary-rgb), .1);
}
.pos-groups.nav-pills .pos-group-btn.active:hover,
.pos-groups.nav-pills .pos-group-btn.active:focus-visible {
    color: #fff;
    background: #0074e8;
    box-shadow: 0 2px 8px rgba(0, 87, 180, .3), 0 0 0 3px rgba(var(--bs-primary-rgb), .13);
}
.pos-tiles {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 190px));
    justify-content: center;
    width: min(100%, 1100px);
    margin: 1.5rem auto 0;
    gap: clamp(.75rem, 1.5vw, 1.15rem);
}
.pos-tile { width: 100%; min-height: 132px; padding: 1.1rem; line-height: 1.35; }
.pos-tile i { font-size: 1.9rem; }

.pos-window__header { position: relative; justify-content: center; }
.pos-window__icon { display: none; }
.pos-window__title {
    position: absolute;
    left: 50%;
    width: min(45%, 34rem);
    transform: translateX(-50%);
    pointer-events: none;
}
.pos-window__controls { position: relative; z-index: 1; align-self: center; margin-right: auto; }
.pos-window__controls .pos-window__btn[aria-label="Открыть в новой вкладке"] { margin-left: .45rem; }
.pos-taskbar__items { justify-content: center; }
.pos-taskbar__clock { min-width: 10rem; text-align: right; }
.pos-taskbar > #minimize-all { flex: 0 0 auto; }

.toolbar { justify-content: center; padding: .7rem 1rem; gap: .6rem; }
.pos-salary__summary,
.pos-doc__tools { justify-content: center; }
.pos-doc__total { text-align: center; }
.pos-window__body > .modal-header,
.modal-header { position: relative; justify-content: center; }
.modal-header .btn-close { position: absolute; right: 1rem; }

@media (max-width: 760px) {
    .pos-groups { width: 100%; overflow-x: auto; justify-content: flex-start; }
    .pos-group-btn { min-width: 6.5rem; padding-inline: .7rem; }
    .pos-tiles { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
    .pos-window__title { width: min(48%, 24rem); }
    .pos-taskbar__clock { min-width: auto; }
}
@media (max-width: 900px) {
    .pos-navbar .navbar-brand { max-width: 48vw; }
    .pos-navbar .navbar-brand [data-company-name],
    .pos-navbar > .d-flex > .small { display: none !important; }
}
@media (max-width: 520px) {
    .pos-navbar .navbar-brand { max-width: 42vw; font-size: .9rem !important; }
    .pos-navbar .navbar-brand [data-company-name] { display: none !important; }
    .pos-taskbar { gap: .35rem; padding-inline: .4rem; }
    .pos-taskbar__items { justify-content: flex-start; }
    .pos-task { max-width: 150px; }
    .pos-taskbar__clock { font-size: .7rem !important; }
    .toolbar { justify-content: flex-start; }
}
@media (max-width: 390px) {
    #logout-form .btn { width: 2.25rem; overflow: hidden; padding-inline: 0; font-size: 0; }
    #logout-form .btn i { font-size: 1rem; }
}

/* РМК: отдельные кнопки и спокойные поверхности в стиле macOS. */
.pos-rmk {
    --rmk-control-top: #fff;
    --rmk-control-bottom: #f1f2f5;
    --rmk-control-border: rgba(30, 35, 45, .18);
    --rmk-control-text: #30333b;
    --rmk-control-shadow: 0 1px 2px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .6);
    --rmk-danger: #bc3038;
}
[data-bs-theme="dark"] .pos-rmk {
    --rmk-control-top: #505158;
    --rmk-control-bottom: #414249;
    --rmk-control-border: rgba(255, 255, 255, .14);
    --rmk-control-text: #f0f0f3;
    --rmk-control-shadow: 0 2px 3px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
    --rmk-danger: #ff858b;
}
.pos-rmk__head { gap: .75rem 1rem; padding: .8rem 1rem; }
.pos-rmk__toolbar { display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pos-rmk__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pos-rmk .btn {
    border: 1px solid var(--rmk-control-border);
    border-radius: 9px;
    background: linear-gradient(var(--rmk-control-top), var(--rmk-control-bottom));
    color: var(--rmk-control-text);
    box-shadow: var(--rmk-control-shadow);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    font-weight: 500;
    letter-spacing: -.015em;
    transition: filter .12s ease, box-shadow .12s ease, transform .12s ease;
}
.pos-rmk .btn:hover:not(:disabled) { filter: brightness(1.08); }
.pos-rmk .btn:active:not(:disabled) { filter: brightness(.94); transform: translateY(1px); }
.pos-rmk .btn:focus-visible {
    outline: 3px solid rgba(10, 132, 255, .65);
    outline-offset: 2px;
    box-shadow: var(--rmk-control-shadow);
}
.pos-rmk .btn:disabled { opacity: .45; box-shadow: none; }
.pos-rmk .btn-primary,
.pos-rmk [data-role="special-discount"][aria-pressed="true"] {
    background: linear-gradient(#329bff, #087bea);
    border-color: #1682ed;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 89, 200, .2), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.pos-rmk .btn-outline-danger { color: var(--rmk-danger); }
.pos-rmk__actions .btn,
.pos-rmk__toolbar > .btn { padding: .42rem .75rem; font-size: .875rem; white-space: nowrap; }
.pos-rmk__actions .btn i { margin-right: .2rem; opacity: .85; }
.pos-rmk__side { gap: .85rem; padding: 1rem; }
.pos-rmk__side > .btn,
.pos-rmk__side > .d-grid > .btn { min-height: 42px; padding: .55rem .8rem; }
.pos-rmk__total-box { border-radius: 12px; padding: 1rem; }
.pos-rmk [data-role="customer-box"] { gap: .45rem !important; }
.pos-rmk [data-role="customer-box"] label { color: var(--bs-secondary-color); font-size: .85rem; font-weight: 500; }
.pos-rmk [data-role="customer-box"] .input-group {
    border: 1px solid var(--rmk-control-border);
    border-radius: 9px;
    background: var(--bs-body-bg);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
.pos-rmk [data-role="customer-box"] .input-group:focus-within { outline: 3px solid rgba(10, 132, 255, .45); outline-offset: 1px; }
.pos-rmk [data-role="customer-phone"] { border: 0; background: transparent; box-shadow: none; border-radius: 9px 0 0 9px; min-height: 42px; }
.pos-rmk [data-role="customer-clear"] { background: transparent; border: 0; box-shadow: none; border-radius: 0 9px 9px 0; color: var(--bs-secondary-color); padding-inline: .8rem; }
.pos-rmk [data-role="customer-status"]:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .pos-rmk .btn { transition: none; } }

/* Единое оформление окна кассы. */
.pos-rmk {
    --rmk-canvas: #eceef2;
    --rmk-panel: #fafbfc;
    --rmk-inset: #fff;
    --rmk-line: rgba(35, 40, 55, .11);
    --rmk-panel-shadow: 0 3px 12px rgba(30, 40, 60, .05);
    background: var(--rmk-canvas);
    color: var(--rmk-control-text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}
[data-bs-theme="dark"] .pos-rmk {
    --rmk-canvas: #24252a;
    --rmk-panel: #303137;
    --rmk-inset: #292a30;
    --rmk-line: rgba(255, 255, 255, .09);
    --rmk-panel-shadow: 0 3px 14px rgba(0, 0, 0, .12);
}
.pos-window:has(.pos-rmk) { border-radius: 16px; }
.pos-rmk__navzone {
    justify-content: center;
    text-align: center;
    padding: .4rem 1rem;
    border-bottom: 1px solid var(--rmk-line);
    background: var(--rmk-panel);
    font-size: .75rem;
}
.pos-rmk__head {
    justify-content: center;
    gap: .65rem 1.25rem;
    padding: 1rem;
    background: linear-gradient(var(--rmk-panel), var(--rmk-canvas));
    border-bottom: 0;
    text-align: center;
}
.pos-rmk__kkm { font-weight: 500; }
.pos-rmk__shift { margin-right: 0; }
.pos-rmk__toolbar, .pos-rmk__actions { justify-content: center; }
.pos-rmk__toolbar { padding-top: .3rem; }
.pos-rmk__main { gap: 1rem; padding: 0 1rem 1rem; grid-template-columns: minmax(0, 1fr) 300px; }
.pos-rmk__left, .pos-rmk__side {
    border: 1px solid var(--rmk-line);
    border-radius: 14px;
    background: var(--rmk-panel);
    box-shadow: var(--rmk-panel-shadow);
    overflow: hidden;
}
.pos-rmk__side { overflow-y: auto; text-align: center; padding: 1rem; }
.pos-rmk__search { padding: 1rem; border-bottom: 1px solid var(--rmk-line); }
.pos-rmk__search > .input-group {
    border: 1px solid var(--rmk-line);
    border-radius: 10px;
    background: var(--rmk-inset);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
}
.pos-rmk__search > .input-group:focus-within { outline: 3px solid rgba(10, 132, 255, .4); outline-offset: 2px; }
.pos-rmk__search .input-group-text,
.pos-rmk__search .form-control,
.pos-rmk__search .btn {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--rmk-control-text);
    font-size: .95rem;
    min-height: 44px;
}
.pos-rmk__search .form-control { text-align: center; padding-inline: .35rem; }
.pos-rmk__search .input-group-text { color: var(--bs-secondary-color); }
.pos-rmk__results { border-radius: 12px; overflow-y: auto; border: 1px solid var(--rmk-line); }
.pos-rmk__result { padding: .75rem 1rem; }
.pos-rmk__table { --bs-table-bg: transparent; --bs-table-border-color: var(--rmk-line); }
.pos-rmk__table thead th { background: var(--rmk-panel); color: var(--bs-secondary-color); font-weight: 600; font-size: .75rem; padding: .8rem .5rem; }
.pos-rmk__table th,
.pos-rmk__table td { text-align: center !important; vertical-align: middle; }
.pos-rmk__table td { padding: .8rem .5rem; }
.pos-rmk__table td .d-flex { justify-content: center !important; }
.pos-rmk__table .form-select { max-width: 260px; margin-inline: auto; text-align: center; border-radius: 8px; background-color: var(--rmk-inset); }
.pos-rmk__qty { text-align: center; border-radius: 8px; background: var(--rmk-inset); }
.pos-rmk__empty { min-height: 230px; padding: 4rem 1.5rem; max-width: 560px; margin: auto; line-height: 1.65; }
.pos-rmk__empty i { opacity: .45; }
.pos-rmk__total-box {
    text-align: center;
    padding: 1.3rem .75rem;
    background: var(--rmk-inset);
    border-color: var(--rmk-line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.pos-rmk__total { margin: .45rem 0; letter-spacing: -.045em; font-weight: 600; }
.pos-rmk [data-role="customer-box"] { padding-block: .35rem; }
.pos-rmk [data-role="customer-box"] .input-group { background: var(--rmk-inset); }
.pos-rmk [data-role="customer-phone"] { text-align: center; padding-left: 2.5rem; }
.pos-rmk [data-role="customer-status"] { line-height: 1.5; }
.pos-rmk__last { text-align: center; }
@container (max-width: 900px) {
    .pos-rmk__main { gap: .65rem; padding-inline: .65rem; grid-template-columns: minmax(0, 1fr) 260px; }
    .pos-rmk__head { padding-inline: .65rem; }
    .pos-rmk__side, .pos-rmk__search { padding: .75rem; }
}
@container (max-width: 760px) {
    .pos-rmk__main { grid-template-columns: 1fr; grid-template-rows: minmax(220px, 1fr) auto; overflow-y: auto; }
    .pos-rmk__left { min-height: 300px; }
    .pos-rmk__side { overflow: visible; }
    .pos-rmk__head { gap: .5rem; }
    .pos-rmk__kkm, .pos-rmk__shift { width: 100%; }
}

/* Компактная панель оплаты: основные действия помещаются по высоте окна. */
.pos-rmk__side { gap: .5rem; padding: .65rem; }
.pos-rmk__side > * { flex-shrink: 0; }
.pos-rmk__total-box { padding: .6rem .75rem; }
.pos-rmk__total { font-size: clamp(1.9rem, 3.2vh, 2.5rem); margin: .2rem 0; line-height: 1.05; }
.pos-rmk__total-box .small { font-size: .8rem; line-height: 1.3; }
.pos-rmk__side > .btn,
.pos-rmk__side > .d-grid > .btn { min-height: 34px; padding: .35rem .65rem; font-size: .9rem; line-height: 1.3; }
.pos-rmk__side > .d-grid { gap: .4rem !important; }
.pos-rmk [data-role="customer-box"] { padding-block: .1rem; gap: .3rem !important; }
.pos-rmk [data-role="customer-box"] label { font-size: .8rem; line-height: 1.3; }
.pos-rmk [data-role="customer-phone"] { min-height: 34px; padding-block: .35rem; font-size: .9rem; line-height: 1.3; }
.pos-rmk [data-role="customer-clear"] { padding-block: .25rem; }
.pos-rmk [data-role="customer-status"] { font-size: .75rem; line-height: 1.3; }
.pos-rmk__last { padding: .5rem; font-size: .8rem; }

/* Страничная навигация с общим верхним меню. */
.pos-sections {
    display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: .3rem; padding: .4rem .8rem; position: relative; z-index: 30;
    border-bottom: 1px solid var(--pos-window-border);
    background: var(--pos-window-header-bg);
}
.pos-section { position: relative; }
.pos-section summary, .pos-section-home {
    display: flex; align-items: center; gap: .45rem; list-style: none; cursor: pointer;
    padding: .5rem .8rem; border-radius: 8px; color: var(--bs-body-color); text-decoration: none;
    font-size: .875rem; font-weight: 500;
}
.pos-section summary::-webkit-details-marker { display: none; }
.pos-section summary:hover, .pos-section[open] summary, .pos-section.is-current summary, .pos-section-home:hover { background: var(--pos-tile-hover-bg); color: var(--bs-link-color); }
.pos-section summary:focus-visible, .pos-section-home:focus-visible, .pos-section-menu a:focus-visible { outline: 3px solid rgba(10,132,255,.5); outline-offset: 1px; }
.pos-section-chevron { font-size: .6rem; opacity: .6; }
.pos-section-menu {
    position: absolute; top: calc(100% + .35rem); left: 50%; transform: translateX(-50%);
    width: max-content; min-width: 220px; max-width: min(340px, calc(100vw - 24px)); max-height: 65vh; overflow-y: auto;
    padding: .35rem; border: 1px solid var(--pos-window-border); border-radius: 12px;
    background: var(--bs-body-bg); box-shadow: var(--pos-window-shadow);
}
.pos-section-menu a { display: flex; align-items: center; gap: .6rem; border-radius: 7px; color: var(--bs-body-color); text-decoration: none; padding: .6rem .75rem; font-size: .875rem; }
.pos-section-menu a:hover, .pos-section-menu a.active { background: var(--pos-tile-hover-bg); color: var(--bs-link-color); }
.pos-site { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; min-width: 0; background: var(--pos-desktop-bg); }
.pos-page-heading { display: flex; flex: 0 0 auto; align-items: center; gap: .8rem; padding: .65rem 1rem; border-bottom: 1px solid var(--pos-window-border); background: var(--pos-window-header-bg); }
.pos-page-title { font-size: 1rem; font-weight: 600; margin: 0; line-height: 1.4; }
.pos-page-heading .btn { border-radius: 8px; font-size: .8rem; }
.pos-page-host { display: flex; flex: 1 1 auto; min-height: 0; min-width: 0; overflow: auto; position: relative; }
.pos-page-host[aria-busy="true"] { cursor: progress; }
.pos-page__content { container-type: inline-size; min-width: 0; background: var(--bs-body-bg); }
.pos-home { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; overflow: hidden; background: #182330; }
.pos-home-splash { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.pos-home-access { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); width: min(90%, 680px); text-align: center; }
.pos-site [hidden], .pos-page-heading[hidden], .pos-page-host[hidden] { display: none !important; }
@media (max-width: 600px) {
    .pos-sections { justify-content: flex-start; padding: .3rem; gap: .1rem; }
    .pos-section summary, .pos-section-home { padding: .45rem .5rem; font-size: .8rem; }
    .pos-section-menu { position: fixed; top: auto; left: .5rem; right: .5rem; transform: none; width: auto; max-width: none; }
    .pos-page-heading { padding: .5rem .65rem; }
}

/* Общий стиль страниц, форм и диалогов. */
:root {
    --pos-surface: #fafbfc;
    --pos-surface-inset: #fff;
    --pos-control-top: #fff;
    --pos-control-bottom: #f0f1f4;
    --pos-control-line: rgba(35, 40, 55, .17);
    --pos-control-ink: #30333b;
    --pos-control-shadow: 0 1px 2px rgba(0, 0, 0, .07), inset 0 1px 0 rgba(255, 255, 255, .65);
    --pos-tone-danger: #bc3038;
    --pos-tone-warning: #886000;
    --pos-tone-success: #20753d;
}
[data-bs-theme="dark"] {
    --pos-surface: #303137;
    --pos-surface-inset: #292a30;
    --pos-control-top: #505158;
    --pos-control-bottom: #414249;
    --pos-control-line: rgba(255, 255, 255, .14);
    --pos-control-ink: #f0f0f3;
    --pos-control-shadow: 0 2px 3px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .08);
    --pos-tone-danger: #ff858b;
    --pos-tone-warning: #f0c16c;
    --pos-tone-success: #86d39a;
}
.pos-body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; }
.pos-body .btn {
    border-radius: 8px;
    border: 1px solid var(--pos-control-line);
    background: linear-gradient(var(--pos-control-top), var(--pos-control-bottom));
    color: var(--pos-control-ink);
    box-shadow: var(--pos-control-shadow);
    font-weight: 500;
    font-size: .875rem;
    line-height: 1.35;
    padding: .43rem .8rem;
    letter-spacing: -.012em;
    text-align: center;
    transition: filter .12s ease, box-shadow .12s ease;
}
.pos-body .btn:hover:not(:disabled) { filter: brightness(1.07); color: var(--pos-control-ink); }
.pos-body .btn:active:not(:disabled) { filter: brightness(.94); }
.pos-body .btn:focus-visible { outline: 3px solid rgba(10,132,255,.55); outline-offset: 2px; box-shadow: var(--pos-control-shadow); }
.pos-body .btn:disabled { opacity: .45; box-shadow: none; }
.pos-body .btn.btn-sm { font-size: .8rem; padding: .32rem .65rem; }
.pos-body .btn.btn-lg { font-size: 1rem; padding: .65rem 1rem; }
.pos-body .btn.btn-primary,
.pos-body .btn.btn-outline-primary.active,
.pos-body .btn-check:checked + .btn,
.pos-body .btn.btn-primary:hover,
.pos-body .btn[aria-pressed="true"] {
    background: linear-gradient(#329bff, #087bea);
    border-color: #1682ed;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,89,200,.16), inset 0 1px 0 rgba(255,255,255,.2);
}
.pos-body .btn.btn-danger, .pos-body .btn.btn-danger:hover { background: linear-gradient(#e75960, #cc3540); border-color: #c5343e; color: #fff; }
.pos-body .btn.btn-success, .pos-body .btn.btn-success:hover { background: linear-gradient(#36a75d, #278346); border-color: #278346; color: #fff; }
.pos-body .btn.btn-outline-danger, .pos-body .btn.btn-outline-danger:hover { color: var(--pos-tone-danger); }
.pos-body .btn.btn-outline-success, .pos-body .btn.btn-outline-success:hover { color: var(--pos-tone-success); }
.pos-body .btn.btn-outline-warning, .pos-body .btn.btn-outline-warning:hover { color: var(--pos-tone-warning); }
.pos-body .btn-group { gap: .3rem; flex-wrap: wrap; justify-content: center; }
.pos-body .btn-group > .btn { border-radius: 8px !important; margin-left: 0 !important; }
.pos-body .input-group > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.pos-body .btn i { vertical-align: -.05em; }
.pos-page-heading { display: grid; grid-template-columns: minmax(82px, 1fr) minmax(0, 4fr) minmax(82px, 1fr); align-items: center; min-height: 54px; }
.pos-page-heading > .btn { justify-self: start; }
.pos-page-title { grid-column: 2; text-align: center; overflow-wrap: anywhere; font-size: 1.05rem; }
.pos-page__content { background: var(--pos-surface); }
.pos-page-host .toolbar { justify-content: center; align-items: center; gap: .55rem; padding: .8rem 1rem; background: var(--pos-surface); border-color: var(--pos-control-line); }
.pos-page-host .toolbar > .ms-auto { margin-left: 0 !important; }
.pos-page-host .toolbar > .me-auto { margin-right: 0 !important; }
.pos-page-host .toolbar .btn { white-space: normal; }
.pos-page-host .form-control, .pos-page-host .form-select,
.pos-body .modal .form-control, .pos-body .modal .form-select {
    border-color: var(--pos-control-line); border-radius: 8px; background-color: var(--pos-surface-inset);
    color: var(--pos-control-ink); font-size: .875rem; padding-block: .45rem;
}
.pos-page-host input.form-control, .pos-page-host select.form-select,
.pos-body .modal input.form-control, .pos-body .modal select.form-select { text-align: center; }
.pos-page-host .form-control:focus, .pos-page-host .form-select:focus,
.pos-body .modal .form-control:focus, .pos-body .modal .form-select:focus { border-color: #329bff; box-shadow: 0 0 0 3px rgba(10,132,255,.18); }
.pos-page-host .form-control.is-invalid, .pos-body .modal .form-control.is-invalid { border-color: var(--bs-danger); }
.pos-page-host .form-label, .pos-body .modal .form-label { display: block; text-align: center; font-size: .8rem; font-weight: 500; margin-bottom: .4rem; color: var(--bs-secondary-color); }
.pos-page-host .form-text, .pos-body .modal .form-text { font-size: .75rem; line-height: 1.5; text-align: center; }
.pos-page-host .input-group-text, .pos-body .modal .input-group-text { border-color: var(--pos-control-line); background: var(--pos-surface); font-size: .875rem; }
.pos-page-host [data-module="general"] form { max-width: 940px; margin-inline: auto; }
.pos-page-host .table, .pos-body .modal .table { --bs-table-bg: transparent; --bs-table-border-color: var(--pos-control-line); }
.pos-page-host .table th, .pos-page-host .table td,
.pos-body .modal .table th, .pos-body .modal .table td { text-align: center !important; vertical-align: middle; padding: .65rem .6rem; }
.pos-page-host .table thead th, .pos-body .modal .table thead th { background: var(--pos-surface); color: var(--bs-secondary-color); font-size: .75rem; font-weight: 600; }
.pos-page-host .table td { font-size: .875rem; }
.pos-page-host .table td > .d-flex { justify-content: center !important; }
.pos-page-host .table .pos-gp-input, .pos-page-host .table .pos-gp-pct { margin-inline: auto; }
.pos-grid-footer { justify-content: center !important; flex-wrap: wrap; padding: .6rem !important; background: var(--pos-surface); }
.pos-page-host .nav-tabs { justify-content: center; gap: .35rem; padding: .5rem .7rem 0; border-color: var(--pos-control-line); }
.pos-page-host .nav-tabs .nav-link { font-size: .875rem; border-radius: 8px 8px 0 0; color: var(--bs-secondary-color); }
.pos-page-host .nav-tabs .nav-link.active { background: var(--pos-surface-inset); color: var(--bs-link-color); border-color: var(--pos-control-line); border-bottom-color: var(--pos-surface-inset); }
.pos-doc__head, .pos-doc__add { padding: 1rem; background: var(--pos-surface); border-color: var(--pos-control-line); }
.pos-doc__tools, .pos-doc__bulk { justify-content: center; gap: .55rem; padding: .7rem; }
.pos-page-host h2, .pos-page-host h3, .pos-page-host h4 { text-align: center; }
.pos-page-host .card { border-radius: 12px; border-color: var(--pos-control-line); background: var(--pos-surface-inset); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.pos-page-host .alert { border-radius: 10px; font-size: .875rem; }
.pos-body .modal-content { background: var(--pos-surface); color: var(--pos-control-ink); border: 1px solid var(--pos-control-line); border-radius: 16px; box-shadow: var(--pos-window-shadow); overflow: visible; }
.pos-body .modal-header { justify-content: center; padding: 1rem 3rem; border-color: var(--pos-control-line); border-radius: 16px 16px 0 0; }
.pos-body .modal-title { text-align: center; font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.pos-body .modal-body { padding: 1.25rem; }
.pos-body .modal-footer { justify-content: center; gap: .5rem; padding: .85rem 1rem; border-color: var(--pos-control-line); }
.pos-body .modal-footer > * { margin: 0; }
.pos-body .modal-fullscreen > .modal-content { border-radius: 0; border: 0; }
.pos-body .modal-fullscreen .modal-header { border-radius: 0; }
.pos-body .modal .form-check { width: fit-content; margin-inline: auto; }
.pos-body .modal .form-check-label { font-size: .875rem; }
/* Составные поля сохраняют общую рамку и не увеличивают высоту кассы. */
.pos-page-host .pos-rmk [data-role="customer-phone"], .pos-page-host .pos-rmk__search .form-control { background: transparent; border: 0; box-shadow: none; }
.pos-page-host .pos-rmk [data-role="customer-phone"] { padding-block: .35rem; }
.pos-page-host .pos-rmk__search .input-group-text { background: transparent; border: 0; }
.pos-page-host .pos-rmk__search .btn, .pos-page-host .pos-rmk [data-role="customer-clear"] { background: transparent; border: 0; box-shadow: none; }
@media (max-width: 600px) {
    .pos-page-heading { grid-template-columns: 82px minmax(0, 1fr) 82px; padding-inline: .55rem; }
    .pos-page-title { font-size: .95rem; }
    .pos-page-host .toolbar { gap: .4rem; padding: .6rem; }
    .pos-page-host .toolbar .form-control, .pos-page-host .toolbar .pos-combo { max-width: 100%; min-width: 0; }
    .pos-body .modal-body { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .pos-body .btn { transition: none; } }
.pos-page-host form > .d-flex, .pos-page-host form.d-flex { justify-content: center; flex-wrap: wrap; }
.pos-page-host [data-module] > .d-flex.flex-wrap { justify-content: center; }
.pos-page-host [data-module] > .d-flex.flex-wrap > .ms-auto { margin-left: 0 !important; }
.pos-page-host form > .form-check { width: fit-content; margin-inline: auto; }
.pos-body .modal-body > p { text-align: center; }
.pos-body .btn[aria-pressed="true"]:hover, .pos-body .btn-check:checked + .btn:hover { color: #fff; }
.stock-operation-qty { width: 8rem; max-width: 100%; margin-inline: auto; }
.stock-operation-search { width: 85%; margin-inline: auto; }
.stock-operation-search .pos-picker__list { max-height: min(55vh, 560px); }
@media (max-width: 600px) {
    .stock-operation-search { width: 100%; }
    .stock-operation-search .pos-picker__list { max-height: 45vh; }
}
.pos-quantity { display: inline-flex; align-items: stretch; width: 10rem; max-width: 100%; margin-inline: auto; vertical-align: middle; }
.pos-body .pos-quantity > .pos-quantity__input { flex: 1 1 0; width: 0; min-width: 3.2rem; margin: 0; text-align: center; border-radius: 0; position: relative; z-index: 1; appearance: textfield; }
.pos-quantity__input::-webkit-inner-spin-button, .pos-quantity__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pos-body .pos-quantity > .pos-quantity__button { flex: 0 0 2rem; width: 2rem; padding: .3rem; font-size: 1.1rem; line-height: 1; }
.pos-body .pos-quantity > .pos-quantity__button:first-child { border-radius: 8px 0 0 8px; margin-right: -1px; }
.pos-body .pos-quantity > .pos-quantity__button:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.pos-quantity > .pos-quantity__input:focus { z-index: 2; }
.pos-body .pos-quantity > .pos-quantity__button:focus-visible { z-index: 3; }

/* Общие детали страниц: карточки документов, сводки и составные поля. */
.pos-document-heading { justify-content: center; text-align: center; }
.pos-document-heading > .ms-auto { margin-left: 0 !important; justify-content: center; flex-wrap: wrap; }
.pos-page-host dl.row { text-align: center; }
.pos-doc__foot { justify-content: center; background: var(--pos-surface); border-color: var(--pos-control-line); }
.pos-doc__total { margin-right: 0; }
.pos-doc__num { margin-inline: auto; text-align: center; }
.pos-salary__summary { align-items: stretch; border-color: var(--pos-control-line); padding: .8rem; }
.pos-salary__card { text-align: center; border-radius: 12px; padding: .65rem 1rem; background: var(--pos-surface-inset); }
.pos-salary__card .text-num { text-align: center; }
.pos-salary__types { margin-left: 0; align-self: center; }
.pos-sync-summary { width: min(100%, 960px); margin-inline: auto; text-align: center; overflow-wrap: anywhere; }
.pos-group-price-controls > .form-select { width: auto; max-width: 100%; }
.pos-group-price-controls > input.form-control { width: 13rem; max-width: 100%; }
.pos-group-discount { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; }
.pos-group-discount > .d-grid { width: 15rem; max-width: 100%; }
.pos-group-discount:has(.pos-discount-compact) { flex-wrap: nowrap; gap: .6rem; }
.pos-discount-compact { display: inline-flex; align-items: center; gap: .5rem; }
.pos-discount-compact > .form-select { width: 12.5rem; min-width: max-content; flex: 0 0 auto; }
.pos-discount-compact > .pos-quantity { width: 7.5rem; flex: 0 0 auto; }
.pos-discount-compact .pos-quantity__input { min-width: 2.5rem !important; }
.pos-discount-compact.is-fixed .pos-quantity__button { display: none; }
.pos-body .pos-discount-compact.is-fixed .pos-quantity__input { border-radius: 8px; }
.pos-discount-compact.is-fixed > .pos-quantity { width: calc(7ch + 1.5rem); }
.pos-price-changes .toolbar { column-gap: .6rem; }
.pos-group-prices.is-discount .pos-gp-retail-column { display: none; }
.pos-price-changes .toolbar > input[type="number"] { width: calc(7ch + 1.5rem); max-width: 100%; }
.pos-price-changes .pos-catalog__crumbs { text-align: center; }
.pos-site:has(.pos-price-changes) > .pos-page-heading { min-height: 40px; padding-block: .25rem; }
.pos-site:has(.pos-price-changes) > .pos-page-heading .pos-page-title { font-size: .95rem; }
.pos-page-host .pos-price-changes .toolbar { padding: .35rem .75rem; row-gap: .35rem; }
.pos-page-host .pos-price-changes .toolbar .form-control,
.pos-page-host .pos-price-changes .toolbar .form-select { padding-block: .3rem; font-size: .8125rem; }
.pos-body .pos-price-changes .toolbar .btn { padding-block: .3rem; font-size: .8125rem; }
.pos-page-host .pos-price-changes .table th,
.pos-page-host .pos-price-changes .table td { padding: .32rem .5rem; line-height: 1.25; }
.pos-page-host .pos-price-changes .table td { font-size: .8125rem; }
.pos-price-changes .table .form-check-input { width: .95rem; height: .95rem; margin-top: 0; vertical-align: middle; }
.pos-price-changes .pos-catalog__tree-wrap { padding: .2rem .3rem; }
.pos-price-changes .pos-tree__row { gap: .3rem; padding: .22rem .3rem; font-size: .8125rem; line-height: 1.25; }
.pos-price-changes .pos-tree__name { min-width: 0; overflow-wrap: anywhere; }
.pos-body .pos-price-changes .pos-tree__toggle { flex: 0 0 1.4rem; width: 1.4rem; height: 1.4rem; padding: 0; font-size: .7rem; border-radius: 5px; box-shadow: none; }
.pos-price-changes .pos-tree__row > .bi { flex: 0 0 auto; font-size: .85rem; }
.pos-price-changes .pos-tree__row > .badge { padding: .2em .35em; font-size: .65rem; }
.pos-price-changes .pos-tree ul { margin-left: .45rem; padding-left: .65rem; }
.pos-price-changes .pos-grid-footer { padding: .25rem .5rem !important; gap: .4rem !important; font-size: .75rem; }
.pos-body .pos-price-changes .pos-grid-footer .btn { min-height: 26px; padding: .2rem .45rem; font-size: .75rem; border-radius: 6px; }
.pos-price-changes .pos-grid-footer .small { font-size: .75rem; }
.pos-site:has(.pos-price-log) > .pos-page-heading { min-height: 40px; padding-block: .25rem; }
.pos-site:has(.pos-price-log) > .pos-page-heading .pos-page-title { font-size: .95rem; }
.pos-page-host .pos-price-log .toolbar { padding: .35rem .75rem; gap: .4rem; }
.pos-page-host .pos-price-log .toolbar .form-control { padding-block: .3rem; font-size: .8125rem; }
.pos-page-host .pos-price-log .table th, .pos-page-host .pos-price-log .table td { padding: .32rem .5rem; line-height: 1.25; }
.pos-page-host .pos-price-log .table td { font-size: .8125rem; }
.pos-price-log .pos-grid-footer { padding: .25rem .5rem !important; gap: .4rem !important; font-size: .75rem; }
.pos-body .pos-price-log .pos-grid-footer .btn { min-height: 26px; padding: .2rem .45rem; font-size: .75rem; border-radius: 6px; }
.pos-price-log .pos-grid-footer .small { font-size: .75rem; }
.pos-price-value { appearance: textfield; -moz-appearance: textfield; }
.pos-price-value::-webkit-inner-spin-button, .pos-price-value::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Название магазина, разделы и действия пользователя в одной компактной шапке. */
.pos-app-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; height: auto; min-height: 52px; flex: 0 0 auto; flex-wrap: nowrap; }
.pos-app-header .navbar-brand { position: static !important; left: auto !important; right: auto !important; margin: 0; min-width: 0; text-decoration: none; }
.pos-app-header .navbar-brand:focus-visible { outline: 3px solid rgba(10,132,255,.55); outline-offset: 3px; border-radius: 6px; }
.pos-app-header .pos-sections { min-width: 0; padding: 0; border: 0; background: transparent; flex-wrap: nowrap; gap: .15rem; }
.pos-app-header .pos-section summary { padding: .5rem .65rem; white-space: nowrap; }
.pos-user-actions { justify-self: end; white-space: nowrap; }
.pos-app-header .pos-user-actions { gap: .35rem !important; }
.pos-app-header .pos-user-identity { font-size: .75rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.pos-body .pos-app-header .pos-user-actions .btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; font-size: .8rem; border-radius: 7px; }
@media (max-width: 1250px) { .pos-app-header .pos-user-identity { display: none !important; } }
@media (max-width: 760px) {
    .pos-app-header { gap: .35rem; padding-inline: .5rem !important; }
    .pos-app-header .pos-section-label, .pos-app-header .pos-section-chevron { display: none; }
    .pos-app-header .pos-section summary { padding: .55rem; }
    .pos-app-header .pos-sections { gap: 0; }
    .pos-app-header .pos-user-actions { gap: .3rem !important; }
    .pos-app-header .pos-user-actions .btn { padding-inline: .5rem; }
}
.pos-body .modal .toolbar { justify-content: center; }
.pos-body .modal .toolbar > .ms-auto { margin-left: 0 !important; }
.pos-body .modal .nav-tabs { justify-content: center; gap: .35rem; border-color: var(--pos-control-line); }
.pos-body .modal .nav-tabs .nav-link { border-radius: 8px 8px 0 0; color: var(--bs-secondary-color); font-size: .875rem; }
.pos-body .modal .nav-tabs .nav-link.active { background: var(--pos-surface-inset); color: var(--bs-link-color); border-color: var(--pos-control-line); border-bottom-color: var(--pos-surface-inset); }
.pos-page-host input.form-control.text-end, .pos-body .modal input.form-control.text-end { text-align: center !important; }
.pos-page-host .input-group > .form-control:not(:last-child), .pos-body .modal .input-group > .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pos-page-host .input-group > .form-control:not(:first-child), .pos-body .modal .input-group > .form-control:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.pos-body .modal .table td > .d-flex { justify-content: center !important; }
.pos-auth { height: auto; min-height: 100vh; overflow: auto; }
.pos-auth .card { border-radius: 16px; border-color: var(--pos-control-line); background: var(--pos-surface); }
.pos-auth .form-label { display: block; text-align: center; font-size: .875rem; color: var(--bs-secondary-color); }
.pos-auth .form-control { text-align: center; border-radius: 8px; border-color: var(--pos-control-line); background: var(--pos-surface-inset); color: var(--pos-control-ink); font-size: 1rem; }
.pos-auth .form-control:focus { border-color: #329bff; box-shadow: 0 0 0 3px rgba(10,132,255,.18); }
.pos-import-summary { max-width: 960px; margin-inline: auto; }
.pos-import-summary > .fw-semibold { text-align: center; margin-bottom: .4rem; }
.pos-tags__side { border-color: var(--pos-control-line); background: var(--pos-surface-inset); }
.pos-tags__preview > .small { text-align: center; }
.pos-tags__preview > .pos-tag { margin-inline: auto; }
@media (max-width: 600px) {
    .pos-sections { justify-content: center; }
    .pos-doc__pay { min-width: 0; flex-basis: 100%; }
    .pos-document-heading > .d-flex { max-width: 100%; }
    .pos-body .modal .toolbar .pos-combo { min-width: 0; max-width: 100%; }
    .pos-tags { flex-direction: column; overflow: auto; }
    .pos-tags__main { flex: 0 0 auto; min-height: 240px; }
    .pos-tags__side { flex: 0 0 auto; border-left: 0; border-top: 1px solid var(--pos-control-line); }
}

/* Компактный список чеков, в том числе при переходе из смены. */
.pos-site:has(.pos-receipts) > .pos-page-heading { min-height: 40px; padding-block: .25rem; }
.pos-site:has(.pos-receipts) > .pos-page-heading .pos-page-title { font-size: .95rem; }
.pos-page-host .pos-receipts .toolbar { padding: .35rem .75rem; gap: .4rem; }
.pos-page-host .pos-receipts .toolbar .form-control,
.pos-page-host .pos-receipts .toolbar .form-select { padding-block: .3rem; font-size: .8125rem; }
.pos-page-host .pos-receipts .table th,
.pos-page-host .pos-receipts .table td { padding: .32rem .5rem; line-height: 1.25; font-size: .8125rem; }
.pos-receipts .pos-grid-footer { padding: .25rem .5rem !important; gap: .4rem !important; font-size: .75rem; }
.pos-body .pos-receipts .pos-grid-footer .btn { min-height: 26px; padding: .2rem .45rem; font-size: .75rem; border-radius: 6px; }
.pos-receipts .pos-grid-footer .small { font-size: .75rem; }
