:root {
  --bg: #f5f5f5; --panel: #fff; --line: #e2e2e2; --text: #1a1a1a; --muted: #6b6b6b;
  --accent: #f39a2b; --accent-dark: #d97f12; --accent-soft: #fff1df; --calc: #eaf6ec;
  --side: #111; --side-hover: #262626; --shadow: 0 2px 6px rgba(0,0,0,.12); --link: #c46a00;
  --red: #d93025; --red-soft: #fde8e6; --orange: #e8710a; --orange-soft: #fef1e4;
  --yellow: #b58900; --yellow-soft: #fff8db; --green: #188038; --green-soft: #e6f4ea;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 28px; font-weight: 500; margin: 6px 0 12px; }
h2 { font-size: 15px; font-weight: bold; text-transform: uppercase; margin: 26px 0 12px; padding-bottom: 4px; border-bottom: 2px solid var(--accent); }
h2 .st { text-transform: none; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hint { color: var(--muted); margin: 0 0 16px; max-width: 900px; }
.hint ol { margin: 4px 0 0; padding-left: 20px; }

.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--side); color: #fff; padding: 18px 0 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { color: #fff; font-weight: bold; font-size: 24px; letter-spacing: .02em; padding: 0 20px 12px; }
.side .clock { display: flex; align-items: center; gap: 6px; padding: 0 20px 16px; }
.side .clock .d { background: #262626; border-radius: 6px; padding: 4px 8px; font-size: 18px; font-variant-numeric: tabular-nums; }
.side .clock .date { font-size: 12px; line-height: 1.15; color: #ddd; margin-left: 8px; }
.side .btn-new { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 14px 18px; padding: 11px 14px;
  background: var(--accent); color: #fff; font-size: 16px; border-radius: 30px; border: 3px solid #4a2a05; }
.side .btn-new:hover { background: var(--accent-dark); text-decoration: none; }
.side .sect { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8a8a8a; padding: 14px 20px 4px; }
.side a:not(.btn-new) { display: flex; align-items: center; gap: 14px; color: #fff; padding: 9px 20px; font-size: 15px; }
.side a .ic { width: 22px; height: 22px; }
.side a:not(.btn-new):hover { background: var(--side-hover); text-decoration: none; }
.side a.on { background: var(--side-hover); color: var(--accent); }
.main { padding: 0 28px 40px; min-width: 0; }
.top { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; padding: 10px 0; margin-bottom: 14px; }
.top .chip { display: flex; align-items: center; gap: 10px; background: #ececec; border-radius: 6px; padding: 8px 14px; min-height: 52px; }
.top .chip .ic { color: var(--accent); }
.top .chip small { display: block; font-size: 12px; color: var(--muted); }
.top .chip select { border: none; background: transparent; font-weight: bold; padding: 2px 0; max-width: 320px; }
.top form { display: inline; margin: 0; }
.top .chip.exit button { display: flex; align-items: center; gap: 8px; border: none; background: none; font: inherit; cursor: pointer; color: var(--text); padding: 0; }
.top .stats { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.top .stat { background: #ececec; border-radius: 6px; padding: 7px 12px; text-align: center; min-width: 92px; }
.top .stat b { display: block; font-size: 16px; }
.top .stat small { font-size: 12px; color: var(--muted); }
.top .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: bold; font-size: 18px;
  display: flex; align-items: center; justify-content: center; flex: none; }
.demo { background: var(--yellow-soft); border: 1px solid #f1d98a; padding: 6px 10px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }

.panel { background: var(--panel); border: none; box-shadow: var(--shadow); border-radius: 6px; padding: 16px; margin-bottom: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid transparent; box-shadow: var(--shadow); border-radius: 6px; padding: 12px 14px; }
.tile .k { color: var(--muted); font-size: 13px; }
.tile .v { font-size: 24px; font-weight: bold; margin-top: 2px; }
.tile.bad { border-color: var(--red); background: var(--red-soft); }
.tile.good { border-color: #9fd3ae; background: var(--green-soft); }

table { border-collapse: collapse; width: 100%; background: var(--panel); }
th, td { border: 1px solid var(--line); padding: 5px 8px; vertical-align: top; }
th { background: #f0f0f0; font-weight: bold; text-align: center; font-size: 14px; position: sticky; top: 0; }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.calc { background: var(--calc); }
tr.grp td { background: #f7f8fa; font-weight: bold; }
.scroll { overflow-x: auto; max-width: 100%; }
.tbl-wrap { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }

.st { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 13px; white-space: nowrap; }
.st.red, tr.red td.flag { background: var(--red-soft); color: var(--red); }
.st.orange { background: var(--orange-soft); color: var(--orange); }
.st.yellow { background: var(--yellow-soft); color: var(--yellow); }
.st.ok { background: var(--green-soft); color: var(--green); }
td.neg { color: var(--red); font-weight: bold; }
td.pos { color: var(--green); }

.sig { border-left: 5px solid; padding: 10px 14px; margin-bottom: 8px; background: var(--panel); border-radius: 0 6px 6px 0; }
.sig.red { border-color: var(--red); background: var(--red-soft); }
.sig.orange { border-color: var(--orange); background: var(--orange-soft); }
.sig.yellow { border-color: #e0b100; background: var(--yellow-soft); }
.sig b { margin-right: 6px; }
.sig .rub { float: right; font-weight: bold; }

form.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid #b9c0c8; border-radius: 5px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid #ffc98a; border-color: var(--accent); }
textarea { width: 100%; min-height: 160px; font-family: Menlo, Consolas, monospace; font-size: 14px; }
input.q { width: 90px; text-align: right; }
input.bad, select.bad { border: 2px solid var(--red) !important; background: var(--red-soft); }   /* незаполненные поля прихода (12.11.2026) */
.btn { display: inline-block; font: inherit; font-weight: 500; padding: 8px 18px; border-radius: 6px; border: none;
       background: #fff; color: var(--text); cursor: pointer; box-shadow: var(--shadow); }
.btn:hover { text-decoration: none; background: #f3f3f3; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 3px 10px; font-weight: normal; font-size: 13px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > .col { flex: 1 1 380px; min-width: 0; }

.msg { padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; }
.msg.success { background: var(--green-soft); }
.msg.error, .errors { background: var(--red-soft); color: #8a1c14; }
.msg.warning, .warns { background: var(--yellow-soft); }
.msg.info { background: #e8f0fe; color: #1a3a6b; }
.errors, .warns { padding: 8px 12px 8px 28px; border-radius: 6px; }
.muted { color: var(--muted); }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 7px 14px; border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; }
.tabs a.on { background: var(--panel); border-color: var(--line); border-bottom: 2px solid var(--accent); color: var(--text); font-weight: bold; margin-bottom: -1px; }
.tabs a.on.tab-create { background: var(--accent); border-color: var(--accent-dark); border-bottom: 2px solid var(--accent-dark); color: #fff; }   /* «Создать приход» активна — ярко-оранжевая (10.11.2026) */
.tabs a.tab-create.always, .tabs a.on.tab-create.always { background: var(--accent); border-color: var(--accent-dark); border-bottom: 2px solid var(--accent-dark); color: #fff; }   /* «Внести продажи» — ярко-оранжевая всегда (11.11.2026) */

.login { max-width: 360px; margin: 12vh auto; }
.login input { width: 100%; margin-bottom: 12px; }

/* Карточки-кнопки разделов (как плитки настроек FAKT) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 8px; }
.card { display: flex; align-items: center; gap: 12px; background: var(--panel); box-shadow: var(--shadow); border-radius: 6px;
        padding: 16px 18px; color: var(--text); font-weight: 500; font-size: 15px; position: relative; }
.card .ic { color: var(--accent); width: 24px; height: 24px; }
.card:hover { text-decoration: none; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.card.soon { background: #e4e4e4; color: #9a9a9a; box-shadow: none; pointer-events: none; }
.card.soon .ic { color: #a8a8a8; }
.card.soon::after { content: "скоро"; position: absolute; top: 6px; right: 8px; font-size: 10px; color: #d9465f; font-weight: normal; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .main { padding: 0 16px 32px; }
  .top .stats { margin-left: 0; }
}

/* Календарь (calendar.js) */
.period { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; }
.cal, .range { position: relative; display: inline-block; }
.cal-field { display: inline-flex; align-items: center; gap: 8px; min-width: 150px; padding: 9px 12px; font: inherit; font-weight: 500;
  background: #fff; border: 1px solid #c9c9c9; border-radius: 6px; cursor: pointer; color: var(--text); }
.cal-field.wide { min-width: 250px; }
.cal-field em { font-style: normal; color: var(--muted); margin-left: auto; font-size: 12px; }
.cal-field .ic { color: var(--accent); }
.cal-field:hover, .cal-field:focus { border-color: var(--accent); outline: none; }
.cal-field.empty span { color: var(--muted); font-weight: normal; }
.cal-pop { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: 310px; background: #fff; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.24); padding: 12px; }
.cal-pop.range-pop { width: auto; display: flex; gap: 12px; }
.cal-side { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-right: 10px; min-width: 140px; }
.cal-side button { border: none; background: none; text-align: left; padding: 7px 8px; border-radius: 6px; font: inherit; cursor: pointer; color: var(--text); }
.cal-side button:hover { background: var(--accent-soft); }
.cal-main { width: 300px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.cal-head > button:not(.cal-title) { border: none; background: #f0f0f0; border-radius: 6px; width: 34px; height: 34px; font-size: 20px; cursor: pointer; }
.cal-head > button:hover { background: var(--accent-soft); }
.cal-title { flex: 1; border: none; background: none; font: inherit; font-weight: bold; font-size: 15px; text-align: center; padding: 6px; border-radius: 6px; }
button.cal-title { cursor: pointer; }
button.cal-title:hover { background: #f0f0f0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 3px; }
.cal-grid.big { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cal-grid.big button { height: 48px; border-radius: 8px; }
.cal-grid i { font-style: normal; text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0 4px; }
.cal-grid i.we { color: #d9465f; }
.cal-grid button { border: none; background: none; height: 36px; font: inherit; cursor: pointer; color: var(--text); border-radius: 6px; }
.cal-grid button:hover { background: #f0f0f0; }
.cal-grid button.out { color: #b5b5b5; }
.cal-grid button.future { color: #cfcfcf; cursor: default; }
.cal-grid button.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-grid button.mark { background: var(--accent); color: #fff; font-weight: bold; }
.cal-grid button.in { background: #ffd5a1; border-radius: 0; }
.cal-grid button.sel { background: var(--accent); color: #fff; font-weight: bold; }
.cal-grid button.sel.lo { border-radius: 6px 0 0 6px; }
.cal-grid button.sel.hi { border-radius: 0 6px 6px 0; }
.cal-grid.big button.in { background: #ffd5a1; border-radius: 8px; }
.cal-hint { font-size: 13px; color: var(--muted); margin-top: 8px; min-height: 16px; }
.cal-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }

/* Встроенный календарь (инвентаризация) */
.cal-inline { background: #fff; box-shadow: var(--shadow); border-radius: 10px; padding: 16px; max-width: 460px; }
.cal-inline .cal-grid button { height: 52px; font-size: 16px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); margin: 10px 0; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }

@media (max-width: 760px) {
  .cal-pop.range-pop { flex-direction: column; left: 0; }
  .cal-side { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 8px; }
}

/* Шапка: поиск точки и цифры */
.top .chip.search { flex: 1 1 340px; max-width: 560px; }
.top .chip.search form { flex: 1; display: flex; }
.top .chip.search input[type=search] { flex: 1; border: none; background: #fff; border-radius: 6px; padding: 9px 12px; font-size: 15px; min-width: 0; }
.top a.stat { color: var(--text); }
.top a.stat:hover { text-decoration: none; background: #e2e2e2; }
.top .stat.bad { background: var(--red-soft); }
.top .stat.bad b { color: var(--red); }
.top .stat.good b { color: var(--green); }

/* Поле периода — жёлтая плашка, как ячейки выбора периода в складской таблице */
.cal-field.yellow { background: #fff2cc; border: 2px solid #d6b656; border-radius: 3px; font-weight: bold; color: #1a1a1a;
  justify-content: center; min-width: 120px; padding: 8px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.cal-field.yellow .ic { display: none; }
.cal-field.yellow em { margin-left: 6px; color: #8a6d1a; }
.cal-field.yellow:hover, .cal-field.yellow:focus { border-color: var(--accent); background: #ffeab0; }
.cal-field.yellow.empty span { color: #6b5a20; }

/* Партнёры, рестораны, карточка доступа */
form.mini { display: inline-flex; gap: 4px; align-items: center; margin: 2px 0; }
/* «Мои рестораны» (12.11.2026, владелец): у всех таблиц доступов одинаковые колонки — статус и действия не «пляшут» */
.access-tbl { table-layout: fixed; }
.access-tbl td { vertical-align: middle; }
.access-tbl th { text-align: left; }
.acc { margin-bottom: 4px; }
.panel.rest.off { opacity: .6; }
.access-card { background: #fff; border: 2px solid var(--accent); border-radius: 10px; padding: 18px 22px; max-width: 620px; margin-bottom: 20px; box-shadow: var(--shadow); }
.ac-head { font-size: 18px; font-weight: bold; margin-bottom: 8px; }
.ac-warn { background: var(--yellow-soft); padding: 6px 10px; border-radius: 6px; margin-bottom: 10px; }
.ac-tbl { width: auto; }
.ac-tbl td { border: none; padding: 4px 14px 4px 0; font-size: 16px; }
.ac-tbl .mono { font-family: Menlo, Consolas, monospace; font-size: 20px; letter-spacing: .04em; }
.ac-steps { margin: 12px 0; padding-left: 20px; }
.ac-tip { color: var(--muted); font-size: 14px; }
@media print {
  .side, .top, .no-print, .msg, .demo { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; }
  .access-card { box-shadow: none; border: 1px solid #000; }
}

/* Период — красными точками, как в FAKT (08.10.2026): под каждым днём точка, начало и конец — в красном кружке */
:root { --dot: #e0313e; }
.cal-grid button { position: relative; }
.cal-grid button.in, .cal-grid.big button.in { background: none; border-radius: 6px; }
.cal-grid button.in::after, .cal-grid button.sel::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--dot); }
.cal-grid button.sel, .cal-grid button.sel.lo, .cal-grid button.sel.hi {
  background: none; color: var(--dot); font-weight: bold; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--dot); }
.cal-grid button.in:hover { background: #f0f0f0; }
.cal-grid.big button.in::after { bottom: 6px; }
/* дни инвентаризаций — оранжевый кружок (не путать с периодом) */
.cal-grid button.mark { background: var(--accent-soft); color: var(--text); border-radius: 50%; box-shadow: inset 0 0 0 2px var(--accent); }
.cal-grid button.mark.sel { color: var(--dot); box-shadow: inset 0 0 0 2px var(--dot), inset 0 0 0 4px var(--accent-soft); }
.cal-inline .cal-grid button.mark { background: var(--accent); color: #fff; }

/* ===== Календарь как в FAKT (экран «ABC анализ блюд», 08.10.2026) — перекрывает стили выше =====
   Выбранный день/период — розовым; оранжевым подсвечиваются только дни инвентаризаций (mark) */
:root { --pink: #ee5a8b; --pink-dark: #e2407a; }
.cal-field, .cal-field.wide { background: #e9e9e9; border: none; border-radius: 8px; min-height: 52px; padding: 10px 18px;
  font-weight: normal; font-size: 15px; color: var(--text); gap: 10px; box-shadow: none; }
.cal-field:hover, .cal-field:focus, .cal-field[aria-expanded="true"] { background: #cfcfcf; outline: none; }
.cal-field .ic { color: var(--accent); width: 18px; height: 18px; }
.cal-field em { display: none; }
.cal-pop, .cal-pop.range-pop { display: block; width: 386px; padding: 18px 16px 10px; border-radius: 6px; box-shadow: 0 6px 22px rgba(0,0,0,.2); }
.cal-main { width: auto; }
.cal-head { margin-bottom: 18px; }
.cal-head > button:not(.cal-title) { background: none; width: 36px; height: 36px; font-size: 26px; color: #444; }
.cal-head > button:not(.cal-title):hover { background: #f2f2f2; border-radius: 50%; }
.cal-title { font-size: 17px; font-weight: bold; }
.cal-grid { row-gap: 4px; column-gap: 4px; justify-items: center; }
.cal-grid i, .cal-grid i.we { color: #9a9a9a; font-size: 14px; padding-bottom: 10px; }
.cal-grid button { width: 46px; height: 46px; border-radius: 50%; font-size: 16px; color: #222; padding: 0; }
.cal-grid button:hover { background: #fbe1ea; }
.cal-grid button::after { display: none !important; }
.cal-grid button.today { box-shadow: none; color: var(--pink); font-weight: bold; }
.cal-grid button.in, .cal-grid button.sel, .cal-grid button.sel.lo, .cal-grid button.sel.hi,
.cal-grid.big button.in { background: var(--pink); color: #fff; font-weight: normal; box-shadow: none; border-radius: 50%; }
.cal-grid button.in.today, .cal-grid button.sel.today { background: var(--pink-dark); color: #fff; }
.cal-grid button.future { color: #c4c4c4; }
.cal-grid button.mark { background: none; color: #222; box-shadow: inset 0 0 0 2px var(--accent); }
.cal-grid button.mark.in, .cal-grid button.mark.sel { background: var(--pink); color: #fff; box-shadow: inset 0 0 0 3px var(--accent); }
.cal-grid.big { justify-items: stretch; }
.cal-grid.big button { width: auto; height: 52px; border-radius: 26px; }
.cal-hint { text-align: center; min-height: 18px; margin-top: 6px; }
.cal-foot { justify-content: flex-end; gap: 18px; margin-top: 14px; padding: 0 6px; }
.cal-foot button.txt { border: none; background: none; color: var(--accent); font: inherit; font-size: 14px; text-transform: uppercase;
  letter-spacing: .02em; padding: 8px 4px; cursor: pointer; }
.cal-foot button.txt:hover { color: var(--accent-dark); }
.cal-foot button[data-all], .cal-foot button[data-today] { margin-right: auto; }
/* инвентаризация — большой встроенный календарь */
.cal-inline .cal-grid button { width: 52px; height: 52px; }
.cal-inline .cal-grid button.mark { background: var(--pink); color: #fff; box-shadow: none; }
@media (max-width: 460px) {
  .cal-pop, .cal-pop.range-pop { width: calc(100vw - 32px); }
  .cal-grid button { width: 38px; height: 38px; font-size: 15px; }
}

/* Компактный календарь (08.10.2026: «поменьше, не на всю страницу») */
.cal-field, .cal-field.wide { min-height: 40px; padding: 7px 14px; font-size: 14px; }
.cal-pop, .cal-pop.range-pop { width: 284px; padding: 12px 12px 6px; }
.cal-head { margin-bottom: 8px; }
.cal-head > button:not(.cal-title) { width: 28px; height: 28px; font-size: 20px; }
.cal-title { font-size: 14px; padding: 4px; }
.cal-grid { row-gap: 3px; column-gap: 2px; }
.cal-grid i, .cal-grid i.we { font-size: 12px; padding-bottom: 4px; }
.cal-grid button { width: 32px; height: 32px; font-size: 13px; }
.cal-grid.big button { height: 38px; border-radius: 19px; font-size: 13px; }
.cal-hint { font-size: 11px; min-height: 14px; margin-top: 4px; }
.cal-foot { gap: 12px; margin-top: 6px; }
.cal-foot button.txt { font-size: 12px; padding: 6px 2px; }
.cal-inline { max-width: 330px; padding: 12px; }
.cal-inline .cal-grid button { width: 38px; height: 38px; font-size: 14px; }
@media (max-width: 460px) {
  .cal-pop, .cal-pop.range-pop { width: 284px; }
  .cal-grid button { width: 32px; height: 32px; font-size: 13px; }
}

/* ===== Таблицы и панель фильтров как в FAKT («ABC анализ блюд», 08.10.2026) ===== */
table:not(.ac-tbl) { border-collapse: separate; border-spacing: 0; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
table:not(.ac-tbl) th { background: #f0a33a; color: #1a1a1a; font-weight: bold; font-size: 14px; border: none;
  border-right: 1px solid rgba(0,0,0,.06); padding: 12px 14px; text-align: left; position: sticky; top: 0; z-index: 1; }
table:not(.ac-tbl) td { border: none; border-bottom: 1px solid #e6e7eb; padding: 12px 14px; vertical-align: middle; }
table:not(.ac-tbl) tr:nth-child(even) td { background: #f1f2f5; }
table:not(.ac-tbl) tr:nth-child(even) td.calc { background: #e3f1e6; }
table:not(.ac-tbl) td.n { text-align: center; }
table:not(.ac-tbl) td.c { text-align: center; color: #333; width: 48px; }
table:not(.ac-tbl) tr.grp td { background: #fff3e0; font-weight: bold; }
table:not(.ac-tbl) tr.grp-head th { background: #e8912a; text-align: center; padding: 6px 14px; font-size: 13px; }
.tbl-wrap { border: none; border-radius: 8px; box-shadow: var(--shadow); }
.tbl-wrap > table { box-shadow: none; }
/* панель фильтров — серая полоса с подписями слева от полей */
form.inline[method="get"] { background: #ececee; border-radius: 10px; padding: 10px 18px; align-items: center; gap: 22px; }
form.inline[method="get"] > div { display: flex; align-items: center; gap: 10px; }
form.inline[method="get"] > div > label { color: #9a9a9a; font-size: 15px; margin: 0; max-width: 110px; line-height: 1.15; }
form.inline[method="get"] .cal-field { background: #fff; }
form.inline[method="get"] .cal-field:hover { background: #f4f4f4; }
form.inline[method="get"] .btn:not(.primary) { background: #d0d0d3; box-shadow: none; text-transform: uppercase; font-size: 13px; padding: 12px 20px; }
.fakt-out { margin: 0 0 0 auto; color: #9a9a9a; font-size: 15px; }
.fakt-out b { color: #e0313e; font-weight: normal; }

/* ===== Размеры как в FAKT (08.10.2026) — замерено по скриншоту FAKT при масштабе Chrome 67 % и пересчитано
   в его настоящие размеры. Смотреть CRM-склад тоже при 67 % (Cmd −), тогда экраны совпадают. Перекрывает стили выше.
   Прежний вид — backups/design_2026-10-08_fakt67/app.css ===== */
:root { --bg: #fafafa; --side: #040404; --side-hover: #191919; --accent: #f09637; --accent-dark: #d97f12; }
.layout { grid-template-columns: 315px 1fr; }
.side { padding: 22px 0 28px; }
.side .brand { font-size: 32px; padding: 0 22px 16px; }
.side .clock { padding: 0 22px 22px; gap: 8px; }
.side .clock .d { font-size: 22px; padding: 6px 10px; border-radius: 8px; background: #191919; }
.side .clock .date { font-size: 14px; }
.side .btn-new { margin: 0 18px 26px; padding: 0 16px; height: 52px; font-size: 20px; border-radius: 30px; border-width: 3px; }
.side .btn-new .ic { width: 22px; height: 22px; stroke-width: 2.4; }
.side .sect { font-size: 12px; padding: 16px 22px 6px; }
.side a:not(.btn-new) { gap: 28px; padding: 13px 16px; font-size: 18px; min-height: 57px; }
.side a .ic { width: 32px; height: 32px; stroke-width: 1.7; }
.main { padding: 0 24px 40px; }
.main > .panel, .main form.panel { padding: 18px 20px; }

/* таблицы — 14 px, высокие строки, полоса через строку, тонкая линия между строками */
table:not(.ac-tbl) { font-size: 14px; border-radius: 6px; }
table:not(.ac-tbl) th { font-size: 14px; padding: 16px 16px; }
table:not(.ac-tbl) td { padding: 20px 16px; line-height: 18px; border-bottom: 1px solid #d4d5d8; color: #000; }
table:not(.ac-tbl) tr:nth-child(odd) td { background: #f1f3f6; }
table:not(.ac-tbl) tr:nth-child(even) td { background: #fff; }
table:not(.ac-tbl) tr:nth-child(odd) td.calc { background: #e6f1e8; }
table:not(.ac-tbl) tr:nth-child(even) td.calc { background: #f2f9f3; }
table:not(.ac-tbl) td.c { width: 56px; }
table:not(.ac-tbl) td .muted, table:not(.ac-tbl) td small { color: #888686; }
table:not(.ac-tbl) td select, table:not(.ac-tbl) td input { font-size: 14px; }

/* кнопки и поля под тот же размер */
.btn { font-size: 15px; padding: 12px 24px; border-radius: 6px; }
.btn.sm { font-size: 13px; padding: 5px 12px; }
input, select { font-size: 15px; padding: 9px 10px; }

/* ===== Продажи как в FAKT «ABC анализ блюд» / «по внешним коннекторам» (08.10.2026) =====
   Ширина колонок — по скриншоту FAKT: категория шире всех, затем блюдо и каналы, средняя цена, остальные узкие. */
table.fakt-abc { table-layout: fixed; min-width: 860px; }
table.fakt-abc col.w-n { width: 60px; min-width: 60px; }   /* трёхзначные № помещаются без переноса (12.11.2026) */
table.fakt-abc col.w-dish { width: 20%; }
table.fakt-abc col.w-cat { width: 30%; }
table.fakt-abc col.w-price { width: 11%; }
table.fakt-abc col.w-qty { width: 11%; }
table.fakt-abc col.w-rub { width: 12%; }
table.fakt-abc.with-ch col.w-dish { width: 16%; }
table.fakt-abc.with-ch col.w-cat { width: 24%; }
table.fakt-abc.with-ch col.w-price { width: 10%; }
table.fakt-abc.with-ch col.w-qty { width: 9%; }
table.fakt-abc.with-ch col.w-rub { width: 9%; }
table.fakt-abc.with-ch col.w-ch { width: 22%; }
table.fakt-abc.no-money col.w-qty { width: 15%; }
table.fakt-abc th, table.fakt-abc td { overflow-wrap: anywhere; }
table.fakt-abc td.c { width: auto; white-space: nowrap; overflow-wrap: normal; }
table.fakt-abc td.n { overflow-wrap: normal; }
table.fakt-abc td.ch { padding-top: 10px; padding-bottom: 10px; line-height: 25px; }
table.fakt-abc td.ch b { font-weight: bold; color: #000; }
table.fakt-abc td.ch span { color: #9a9a9a; margin-left: 4px; }
.tab-pane[hidden] { display: none; }
.sales-tabs a, .tabs a { cursor: pointer; font-size: 15px; }

/* Сортировка по клику на заголовок (sort.js), стрелка как у «Выручка ↓» в FAKT */
table.sortable th[data-sort] { cursor: pointer; user-select: none; white-space: normal; }
table.sortable th[data-sort]:hover { background: #e8912a; }
table.sortable th.sorted-desc::after { content: " ↓"; }
table.sortable th.sorted-asc::after { content: " ↑"; }
.rev-tiles { grid-template-columns: repeat(auto-fit, minmax(240px, 320px)); }

/* Накладная: ручной ввод (08.10.2026) */
table.manual { box-shadow: none; width: 100%; }                    /* таблица на всю ширину — без прогалов (10.11.2026) */
table.manual td { padding: 4px 6px; background: #fff !important; }
table.manual th { padding: 10px 8px; }
table.manual input { width: 100%; }
table.manual input.q { width: 100%; text-align: right; }
table.manual td:first-child input { min-width: 0; }
table.manual td:nth-child(3), table.manual td:nth-child(4), table.manual td:nth-child(5) { width: 90px; }   /* фасовка, количество, сумма — одинаковые (10.11.2026) */
table.manual td:nth-child(2) .sug-wrap { display: block; width: 100%; }   /* поле поиска ингредиента — на всю ширину ячейки, без дыры */
table.manual td:nth-child(2) .sug-wrap input { width: 100%; min-width: 0; }
form.wo-create { display: block; padding: 14px 16px; }                        /* вкладка «Создать списание» (11.11.2026) */
.wo-strip { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wo-strip:last-child { border-bottom: none; }
.wo-strip > div { min-width: 0; }
.wo-strip label { display: block; margin-bottom: 4px; }
.wo-strip input, .wo-strip select { width: 100%; min-width: 0; }
.wo-strip .sug-wrap { display: block; width: 100%; }                     /* обёртка подсказок — блочная, иначе «Что списали» не растягивается и остаётся дыра (11.11.2026) */
.wo-strip .wo-date { flex: 0 0 170px; }
.wo-strip .wo-what { flex: 3 1 0; }
.wo-strip button.wo-go { flex: 0 0 auto; }
.wo-kind { display: flex; gap: 8px; align-items: center; flex: 1 1 auto; }
.wo-kind b { margin-right: 2px; }
.chip-btn.kind-dish { background: var(--yellow-soft); border: 2px solid #e0b100; color: #7a5c00; }          /* «Блюдо» — жёлтая */
.chip-btn.kind-dish.on { background: #ffd54a; color: #4a3600; font-weight: 700; }                            /* выбрано — ярко-жёлтая */
.chip-btn.kind-ing { background: #fff; border: 2px solid var(--accent); color: var(--accent-dark); }         /* «Ингредиент» — белая с оранжевой окантовкой */
.chip-btn.kind-ing.on { background: var(--accent); border-color: var(--accent-dark); color: #fff; font-weight: 700; }   /* выбрано — оранжевая */
h2.wo-title { text-align: center; }                                       /* заголовок таблицы отчётов — по центру (11.11.2026) */

table.order-tbl th, table.order-tbl td { vertical-align: middle; }
table.order-tbl td.n, table.order-tbl th.n { text-align: center; }
table.order-tbl input.q { text-align: center; }
tr.ignored td { color: #9a9a9a; text-decoration: none; }

/* ===== Адаптивная вёрстка (08.10.2026): компьютер, ноутбук, планшет, телефон; масштаб браузера (Cmd + / −)
   меняет ширину окна в CSS-пикселях — те же правила срабатывают и при увеличении/уменьшении страницы.
   ≥ 1440 px — вид как в FAKT (меню 315 px); 1100–1439 — меню уже; 900–1099 — меню иконками;
   < 900 — меню выезжает по кнопке ☰; < 600 — телефон. Копия до — backups/responsive_2026-10-08/ ===== */
.menu-btn, .side-backdrop { display: none; }
.main { padding-left: clamp(12px, 2vw, 28px); padding-right: clamp(12px, 2vw, 28px); }
h1 { font-size: clamp(21px, 1rem + 1vw, 28px); overflow-wrap: anywhere; }
input, select, textarea { max-width: 100%; }
img, svg { max-width: 100%; }
.tbl-scroll { overflow-x: auto; max-width: 100%; margin-bottom: 0; -webkit-overflow-scrolling: touch; border-radius: 6px; }
.tbl-wrap { max-width: 100%; }
.ac-tbl .mono { overflow-wrap: anywhere; }

/* ноутбук: меню уже, пункты мельче */
@media (max-width: 1439px) {
  .layout { grid-template-columns: 260px 1fr; }
  .side .brand { font-size: 26px; padding: 0 18px 12px; }
  .side .clock { padding: 0 18px 16px; }
  .side .clock .d { font-size: 18px; padding: 4px 8px; }
  .side .clock .date { font-size: 12px; }
  .side .btn-new { margin: 0 14px 18px; height: 46px; font-size: 17px; }
  .side .sect { padding: 12px 18px 4px; }
  .side a:not(.btn-new) { gap: 16px; padding: 10px 16px; font-size: 16px; min-height: 46px; }
  .side a .ic { width: 26px; height: 26px; }
  table:not(.ac-tbl) th { padding: 12px 12px; }
  table:not(.ac-tbl) td { padding: 14px 12px; }
}

/* узкий ноутбук / планшет горизонтально: меню — только иконки (подсказка — при наведении) */
@media (max-width: 1099px) and (min-width: 900px) {
  .layout { grid-template-columns: 76px 1fr; }
  .side { padding: 14px 0; }
  .side .brand, .side .clock { display: none; }
  .side .btn-new { font-size: 0; gap: 0; width: 50px; height: 50px; padding: 0; margin: 0 auto 14px; border-radius: 50%; }
  .side .sect { font-size: 0; padding: 0; height: 1px; background: #2a2a2a; margin: 8px 14px; }
  .side a:not(.btn-new) { font-size: 0; gap: 0; justify-content: center; padding: 10px 0; min-height: 50px; }
  .side a .ic { width: 26px; height: 26px; }
}

/* планшет и телефон: меню выезжает слева по кнопке ☰ */
@media (max-width: 899px) {
  .layout { display: block; }
  .side { position: fixed; z-index: 200; top: 0; left: 0; bottom: 0; height: 100vh; height: 100dvh; width: min(300px, 86vw);
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: 4px 0 24px rgba(0,0,0,.35); }
  body.menu-open .side { transform: none; }
  body.menu-open { overflow: hidden; }
  .side-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.45); }
  body.menu-open .side-backdrop { display: block; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px;
    border: none; border-radius: 8px; background: var(--side); color: #fff; cursor: pointer; padding: 0; }
  .menu-btn .ic { width: 26px; height: 26px; }
  .top { align-items: center; gap: 8px; }
  .top .chip { min-height: 48px; padding: 6px 10px; }
  .top .chip.search { order: 1; flex: 1 1 200px; max-width: none; }
  .top .chip.exit { order: 2; }
  .top .avatar { order: 3; width: 44px; height: 44px; font-size: 16px; }
  .top .stats { order: 4; width: 100%; margin-left: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px; }
  .top .stat { min-width: 0; padding: 6px 8px; }
  /* шапки таблиц прилипают только внутри своей прокрутки */
  table:not(.ac-tbl) th { position: static; }
  .tbl-wrap table:not(.ac-tbl) th { position: sticky; }
  table.fakt-abc { min-width: 780px; }
  table.fakt-abc.with-ch { min-width: 980px; }
  table.fakt-abc th, table.fakt-abc td { overflow-wrap: normal; word-break: normal; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tabs a { white-space: nowrap; }
  .sig .rub { float: none; display: block; margin-top: 4px; }
}

/* телефон */
@media (max-width: 599px) {
  body { font-size: 15px; }
  h2 { font-size: 14px; margin: 20px 0 10px; }
  .main { padding: 0 12px 28px; }
  .top { padding: 8px 0; margin-bottom: 10px; }
  .top .chip.exit button { font-size: 0; gap: 0; }
  .top .chip.exit .ic { width: 22px; height: 22px; }
  .top .chip.search input[type=search] { font-size: 16px; padding: 8px 10px; }
  .top .stats { grid-template-columns: repeat(2, 1fr); }
  .top .stat b { font-size: 15px; }
  .panel, .main > .panel, .main form.panel { padding: 12px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wo-summary { grid-template-columns: 1fr; gap: 8px; }
  .tile { padding: 10px; }
  .tile .v { font-size: 18px; overflow-wrap: anywhere; }
  .tiles.health .tile .v { font-size: 20px; }          /* крупные цифры «Состояния точки» и на телефоне */
  .rev-tiles { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .card { padding: 12px; font-size: 14px; gap: 8px; }
  .row > .col, .row > .col[style] { flex: 1 1 100% !important; }
  /* поля и кнопки — под палец, поля во всю ширину; 16 px — чтобы iPhone не увеличивал страницу при вводе */
  input, select, textarea { font-size: 16px; }
  input:not([type=checkbox]):not([type=radio]):not(.q), select { width: 100%; }
  table input:not([type=checkbox]):not([type=radio]), table select { width: auto; min-width: 90px; }
  table.manual input { width: 100%; min-width: 70px; }
  .btn { min-height: 44px; padding: 11px 18px; margin: 0 4px 8px 0; }
  .btn.sm { min-height: 34px; margin-bottom: 4px; }
  form.inline, form.inline[method="get"] { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 12px; }
  form.inline[method="get"] > div { flex-direction: column; align-items: stretch; gap: 4px; }
  form.inline[method="get"] > div > label { max-width: none; font-size: 13px; }
  form.mini { flex-wrap: wrap; }
  .period { flex-direction: column; align-items: stretch; }
  .cal, .range { display: block; }
  .cal-field, .cal-field.wide { width: 100%; min-width: 0; }
  .fakt-out { margin: 0; }
  /* календарь — по центру экрана, чтобы не уезжал за край */
  .cal-pop, .cal-pop.range-pop { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(320px, calc(100vw - 24px)); }
  .cal-grid button { width: 36px; height: 36px; font-size: 14px; }
  .cal-inline { max-width: none; }
  table:not(.ac-tbl) { font-size: 13px; }
  table:not(.ac-tbl) th { padding: 10px 8px; font-size: 12px; }
  table:not(.ac-tbl) td { padding: 10px 8px; }
  table:not(.ac-tbl) td.c { width: 36px; }
  .tbl-wrap { max-height: 75vh; }
  .ac-tbl td { font-size: 14px; }
  .ac-tbl .mono { font-size: 17px; }
  .access-card { padding: 14px; }
  .login { margin: 6vh 12px; }
}
/* шапка на ноутбуке/планшете — поиск ужимается, чтобы «Выйти» и аватар оставались в одной строке */
@media (max-width: 1279px) and (min-width: 900px) {
  .top .chip.search { flex: 1 1 200px; }
  .top .stat { min-width: 74px; padding: 7px 8px; }
  .top .chip.exit { padding: 8px 10px; }
  .top .chip.exit button { font-size: 0; gap: 0; }
}
/* телефон: строка полей формы — каждое поле во всю ширину; ручной ввод накладной — шире название */
@media (max-width: 599px) {
  .panel > .inline > div, form > .inline > div { flex: 1 1 100%; }
  .panel > .inline .cal-field { width: 100%; }
  table.manual td:first-child { width: 50%; }
  table.manual input, table.manual input.q { min-width: 0; padding: 8px 6px; }
  table.manual td { padding: 4px 3px; }
}
@media print { .menu-btn, .side-backdrop { display: none !important; } }

/* ===== Логотип FAKT внизу меню (09.10.2026) — как в FAKT: под последним пунктом, прижат к низу меню.
   Меню — колонка; пункты не сжимаются, логотип уходит вниз (margin-top: auto). Копия до — backups/fakt_logo_2026-10-09/ ===== */
.side { display: flex; flex-direction: column; }
.side > * { flex-shrink: 0; }
.side .fakt-logo { margin-top: auto; padding: 28px 20px 0 18px; line-height: 0; }
.side .fakt-logo img { display: block; width: 262px; max-width: 100%; height: auto; }
@media (max-width: 1439px) { .side .fakt-logo img { width: 218px; } }
@media (max-width: 1099px) and (min-width: 900px) { .side .fakt-logo { display: none; } }
@media (max-width: 899px) { .side .fakt-logo { padding: 24px 18px 8px; } .side .fakt-logo img { width: 230px; } }
@media print { .side .fakt-logo { display: none; } }
/* Логотип СУШИСЕТ вверху меню (09.10.2026) — как в FAKT */
.side .brand { line-height: 0; padding-left: 20px; padding-right: 16px; padding-top: 4px; }
.side .brand img { display: block; width: 270px; max-width: 100%; height: auto; }
@media (max-width: 1439px) { .side .brand img { width: 240px; } }

/* ===== Меню без прокрутки, как в FAKT (09.10.2026): высота пункта зависит от высоты окна —
   все пункты (у офиса сети их больше всего: 16 + 3 раздела) помещаются на экран; на больших экранах — прежний вид.
   --side-fixed — высота шапки меню (логотип, часы, кнопка) и логотипа FAKT внизу. Копия до — backups/menu_fit_2026-10-09/ ===== */
.side { --side-fixed: 345px; --ic: 32px; --row: clamp(22px, calc((100vh - var(--side-fixed)) / var(--rows, 19.5)), 57px); }
@media (max-width: 1439px) { .side { --ic: 26px; --row: clamp(22px, calc((100vh - var(--side-fixed)) / var(--rows, 19.5)), 46px); } }
.side a:not(.btn-new) { min-height: var(--row); padding-top: 0; padding-bottom: 0; }
.side a .ic { width: min(var(--ic), calc(var(--row) - 6px)); height: min(var(--ic), calc(var(--row) - 6px)); }
.side .sect { padding-top: calc(var(--row) * .3); padding-bottom: calc(var(--row) * .08); }
/* невысокое окно (ноутбук, крупный масштаб): шапка меню компактнее */
@media (max-height: 900px) {
  .side { --side-fixed: 250px; padding-top: 14px; padding-bottom: 12px; }
  .side .brand { padding-bottom: 10px; }
  .side .brand img { width: 220px; }
  .side .clock { padding-bottom: 12px; }
  .side .clock .d { font-size: 18px; padding: 3px 8px; }
  .side .clock .date { font-size: 12px; }
  .side .btn-new { height: 42px; margin-bottom: 12px; font-size: 17px; }
  .side .fakt-logo { padding-top: 12px; }
  .side .fakt-logo img { width: 200px; }
}
@media (max-height: 780px) {
  .side { --side-fixed: 215px; padding-top: 10px; padding-bottom: 8px; }
  .side .brand { padding-bottom: 6px; }
  .side .brand img { width: 190px; }
  .side .clock { padding-bottom: 8px; }
  .side .clock .d { font-size: 15px; padding: 2px 6px; }
  .side .btn-new { height: 36px; margin-bottom: 8px; font-size: 15px; }
  .side a:not(.btn-new) { font-size: 15px; }
  .side .sect { font-size: 10px; }
  .side .fakt-logo { padding-top: 8px; }
  .side .fakt-logo img { width: 170px; }
}

/* ===== Контроль закупочной цены (09.10.2026): строка с подорожанием сверх допуска — жёлтая, галочка «цена верная» ===== */
tr.price-jump td { background: #fff6d6; }
.price-ok { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: bold; white-space: nowrap; cursor: pointer; }
.price-ok input { width: 18px; height: 18px; }

/* ===== Улучшения 09.10.2026: возвраты, перемещения, что докупить, цены поставщиков, себестоимость блюд ===== */
.side .badge { background: var(--accent); color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 7px; margin-left: 6px; line-height: 1.4; }
.transfer-in { border-left: 4px solid var(--accent); }
.transfer-in ul { margin: 8px 0 12px 18px; padding: 0; }
tr.best td { background: #e9f7ec; }
tr.alert td { background: #fdecea; }
details > summary { cursor: pointer; margin: 18px 0 8px; font-weight: bold; }
.xls-btn { display: inline-flex; align-items: center; gap: 6px; }
.xls-btn .ic { width: 16px; height: 16px; }
@media print { details { display: none; } .tbl-scroll { overflow: visible; } }
main h1 + .xls-btn { margin: -6px 0 14px; }

/* ===== Инвентаризация с телефона (09.10.2026) ===== */
.inv-tools { position: sticky; top: 0; z-index: 5; background: var(--bg, #fafafa); padding: 8px 0 10px; }
.inv-tools input[type=search] { width: 100%; max-width: 520px; height: 46px; font-size: 17px; padding: 0 14px; border-radius: 10px; border: 1px solid #ccc; box-sizing: border-box; }
.inv-groups { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; -webkit-overflow-scrolling: touch; }
.chip-btn { flex: none; border: 1px solid #ddd; background: #fff; border-radius: 20px; padding: 8px 14px; font-size: 15px; cursor: pointer; white-space: nowrap; }
.chip-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.inv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 28px; padding-bottom: 90px; }
.inv-group h2 { margin: 18px 0 6px; }
.inv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eee; cursor: text; }
.inv-row .nm { flex: 1; min-width: 0; }
.inv-row .val { display: flex; align-items: center; gap: 6px; flex: none; }
.inv-row input.q { width: 110px; height: 44px; font-size: 18px; text-align: right; border-radius: 8px; }
.inv-row input.q:not(:placeholder-shown) { background: #fff; }
.inv-row .u { width: 34px; color: #888; font-size: 14px; }
.inv-bar { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end;
  background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.08); padding: 10px 14px; margin: 0 -14px; }
.inv-bar .inv-count { margin-right: auto; font-size: 16px; }
.inv-bar .btn { height: 46px; }
@media (max-width: 599px) {
  .inv-list { grid-template-columns: 1fr; }
  .inv-row { font-size: 16px; }
  .inv-row input.q { width: 96px; }
}
@media (max-width: 599px) {
  .inv-bar { flex-wrap: nowrap; gap: 8px; padding: 8px 12px; margin: 0 -12px; }
  .inv-bar .inv-count { font-size: 14px; }
  .inv-bar #inv-draft { display: none; }
  .inv-bar .btn { height: 44px; padding: 0 12px; }
}
/* подсветка строк сильнее «зебры» таблиц */
table tr.alert td { background: #fdecea !important; }
table tr.best td { background: #e9f7ec !important; }
table tr.price-jump td { background: #fff6d6 !important; }

/* Главная (09.10.2026): длинные списки — в окне с прокруткой, без «топ-N» */
.dash-box { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.dash-box table { margin: 0; }
a.tile { color: inherit; text-decoration: none; display: block; }
@media (max-width: 600px) { .dash-box { max-height: 300px; } }
/* «Состояние точки» на главной (12.10.2026): жёлтая плитка «проверить», зелёный итог, пояснение под цифрой.
   12.11.2026 (владелец): шрифты плиток крупнее — название и пояснение читаются с экрана без напряжения */
.tile.warn { border-color: #e0b100; background: var(--yellow-soft); }
.sig.green { border-color: var(--green); background: var(--green-soft); }
.tiles.health .tile { padding: 14px 16px; }
.tiles.health .tile .k { font-size: 14px; }
.tiles.health .tile .v { font-size: 26px; margin-top: 4px; }
.tiles.health .tile .hk { font-size: 14px; line-height: 1.4; margin-top: 8px; color: var(--text); }

/* Списание по шагам (13.10.2026): блюдо / ингредиент → раздел → позиция; кнопки переносятся по строкам (телефон) */
.wo-pick .chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.wo-pick .chip-row[hidden] { display: none; }   /* иначе display:flex перебивает атрибут hidden — шаги 2 и 3 видны пустыми */
.wo-pick .chip-row > span { display: contents; }
.wo-pick .chip-row b { margin-right: 4px; }

/* поиск в списке по 2–3 буквам (pick.js, 26.10.2026) */
.pick-find{width:220px;margin:4px 0}
.pick-info{font-size:12px}

/* Подсказки по 2–3 буквам в полях «продукт / что списали / поставщик» (pick.js, data-suggest; 27.10.2026) */
.sug-wrap{position:relative;display:inline-block;max-width:100%}
.sug-list{position:absolute;z-index:60;left:0;top:100%;min-width:100%;max-width:90vw;max-height:280px;overflow:auto;background:#fff;
  border:1px solid #d0d0d0;border-radius:6px;box-shadow:0 6px 18px rgba(0,0,0,.12);margin-top:2px;text-align:left}
.sug-item{padding:7px 10px;cursor:pointer;white-space:nowrap}
.sug-item:hover,.sug-item.on{background:#fff1e6}
.sug-none{padding:7px 10px;color:#888}
@media (max-width:600px){.sug-item,.sug-none{padding:12px 10px;white-space:normal}}

/* Сверка: сумма в ₽ под количеством (27.10.2026) */
.rubs{font-size:11px;color:#777;white-space:nowrap}
tr.total td{border-top:2px solid #bbb;font-weight:600}

/* Цены поставщиков — одна узкая таблица: строка продукта, под ней поставщики (владелец 27.10.2026) */
.sp-table{width:auto;max-width:100%}
.sp-table .sp-head td{background:var(--panel);border-top:2px solid var(--line);padding-top:8px}
.sp-table .sp-sup{padding-left:22px}
.sp-table tbody[hidden]{display:none}

/* Сеть: выбор точек (27.10.2026) */
details.pts{position:relative}
details.pts[open]>summary~*{display:block}
details.pts .chk{display:block;white-space:nowrap;padding:3px 0}

/* «+ Новое перемещение» — кнопка, по нажатию раскрывается форма (27.10.2026) */
details.new-doc{margin:10px 0 16px}
details.new-doc>summary{display:inline-block;list-style:none;cursor:pointer;margin-bottom:8px}
details.new-doc>summary::-webkit-details-marker{display:none}

/* Интерфейс по демонстрации 06.11.2026 */
.wide-text { width: 100%; max-width: none; }
.period-form select { min-width: 220px; padding-left: 10px; padding-right: 10px; }
.period-form .cmp-field select { min-width: 0; padding-right: 30px; }   /* 12.11.2026 (владелец): галочка выпадающего списка — внутри белого поля, не на сером фоне */
.period-form .period-note { flex: 1 1 100%; margin: 2px 0 0; font-size: 14px; color: #6b6b70; line-height: 1.4; }
.cmp-field { display: flex; align-items: center; gap: 8px; }
.cmp-field label { max-width: none !important; margin: 0; white-space: nowrap; }
table.manual { font-size: 17px; }
table.manual th, table.manual td { font-size: 17px; }
table.manual input, table.manual select { font-size: 16px; padding: 8px 8px; }
.btn.del-row { width: 46px; height: 46px; min-width: 46px; padding: 0; font-size: 34px; line-height: 40px; font-weight: 700; }
/* Выпадающий список ингредиента не должен обрезаться таблицей и панелями (09.11.2026) */
.pick-wrap { position: relative; }
.pick-wrap:focus-within { z-index: 3000; }
.pick-wrap .sug-list { z-index: 3000; min-width: 280px; max-width: 420px; max-height: 320px; overflow-y: auto; font-size: 16px; }
.tbl-scroll:has(.pick-wrap:focus-within) { overflow: visible; z-index: 3000; position: relative; }
#manual td { overflow: visible; }
.sales-entry { font-size: 15px; }
table.fakt { font-size: 17px; }
table.fakt .btn.sm { font-size: 15px; padding: 10px 18px; }
.hot { color: var(--red); font-weight: 700; }
.btn.wo-del { border: 2px solid var(--accent); color: var(--accent-dark); font-size: 14px; font-weight: 700; padding: 8px 14px; }
.wo-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; align-items: stretch; }
.wo-summary .tiles { display: contents; }
.wo-summary > form.inline[method="get"] { margin: 0; height: 100%; box-sizing: border-box; }
.inventory-tbl .btn { font-size: 14px; font-weight: 700; padding: 9px 16px; }
.inventory-tbl .btn.danger { border: 2px solid var(--red); }
.inv-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inv-toolbar .inv-reconcile { margin-left: auto; }
.inv-last { background: var(--yellow-soft); color: var(--text); }
/* Календарь (12.11.2026, владелец): шапка «Начало / Конец» у периода; месяцы с данными; ссылка в подвале выпадушки */
.cal-sel { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cal-sel div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 2px; font-size: 15px; }
.cal-sel div + div { border-top: 1px solid var(--line); }
.cal-sel b { font-size: 16px; }
.inventory-tbl .btn { font-size: 15px; padding: 10px 18px; }
.inventory-tbl, .tbl-wrap table { font-size: 15px; }

/* Этап 1 (09.11.2026): таблица сверки план/факт — крупные шрифты */
table.tbl-reconcile { font-size: 16px; }
table.tbl-reconcile th { font-size: 15px; padding: 18px 16px; }
table.tbl-reconcile td { padding: 22px 16px; line-height: 22px; }
table.tbl-reconcile td .rubs { font-size: 14px; }

/* Этап 2 (11.11.2026): сверка — строки поуже, чтобы таблица проще пролистывалась (владелец) */
table.tbl-reconcile th { padding: 8px 12px; }
table.tbl-reconcile td { padding: 8px 12px; line-height: 18px; }
table.tbl-reconcile td .rubs { font-size: 13px; }
/* Этап 2 (11.11.2026): сверка — панель «период» и кнопка «Скачать в Excel» рядом; инструкция к таблице всегда открыта */
.recon-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 8px 0 4px; }
.recon-bar .xls-slot .xls-btn { margin: 0; }
/* Продажи и ABC (12.11.2026, владелец): одна полоса — календарь, выручка за период, «вывод: N дней», «Скачать в Excel» */
.abc-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 8px 0 4px; }
.abc-bar form.inline { margin-bottom: 0; }
.abc-rev label { margin-bottom: 2px; }
.abc-rev b { font-size: 24px; }
.abc-bar .xls-slot .xls-btn { margin: 0; }
.k-title { margin: 0 0 6px; }

/* Этап 3 (12.11.2026): сверка — шапка закреплена при прокрутке, минусовые тёмно-красным, инструкция сворачиваемая */
table.tbl-reconcile thead th { position: sticky; top: 0; z-index: 2; }
table.tbl-reconcile .neg, table.tbl-reconcile .rubs.neg { color: #b71c1c; font-weight: 700; }
details.panel summary { cursor: pointer; }
details.panel summary::-webkit-details-marker { color: var(--accent); }
/* sticky-шапка: overflow:hidden на таблице ломает position:sticky — заменяем на clip (12.11.2026) */
table.tbl-reconcile { overflow: clip; }
