/* =====================================================================
   §28 Дизайн, утверждённый заказчиком 21.10 (подключается после app.css).
   Тёмная тема по умолчанию везде; светлая — html[data-theme="light"] (переключатель хранится в localStorage).
   1) Бэк-офис и мобильный официант — стиль Apple: графитовый акцент без оранжевого, карточки 18px, стекло, сегменты, iOS-переключатели.
      Макеты: docs/ref/back-apple, docs/ref/mobile-apple (значения из renderVals()).
   2) Касса и кухня — раскладка терминала (html[data-term]); цвета и формы Nodex — css/nodex-term.css,
      в светлой теме — прежняя классическая (html[data-term="classic"]).
   Цветными остаются только статусы.
   ===================================================================== */

/* ---------- 1. Токены бэк-офиса (без data-term) ---------- */
:root:not([data-term]) {
  --bg: #000000; --side: #111113;
  --surface: #1C1C1E; --surface-2: #2C2C2E; --surface-3: #3A3A3C; --elev: #2C2C2E;
  --ink: #FFFFFF; --ink-2: #D1D1D6; --muted: #AEAEB2;
  --line: rgba(255, 255, 255, .12); --line-strong: rgba(255, 255, 255, .22); --hair: rgba(255, 255, 255, .12);
  --fill: rgba(118, 118, 128, .24); --seg-on: #636366;
  --brand: #F2F2F7; --brand-hover: #FFFFFF; --brand-ink: #000000; --brand-text: #F2F2F7; --brand-soft: rgba(118, 118, 128, .24);
  --ribbon: rgba(118, 118, 128, .24); --ribbon-ink: #FFFFFF; --saffron: #F2F2F7; --saffron-soft: rgba(118, 118, 128, .24);
  --ok: #5BE584; --ok-soft: rgba(48, 209, 88, .18); --warn: #FFD60A; --warn-soft: rgba(255, 204, 0, .18);
  --danger: #FF8A80; --danger-soft: rgba(255, 69, 58, .2); --danger-solid: #FF453A;
  --glass: rgba(44, 44, 46, .62); --glass-edge: rgba(255, 255, 255, .14); --highlight: rgba(255, 255, 255, .10);
  --card-shadow: none; --shadow-1: none; --shadow-2: 0 24px 60px rgba(0, 0, 0, .6);
  --track-on: #30D158; --track-off: rgba(120, 120, 128, .32);
  --focus: #0A84FF; --paper: #F7F4EE;
  --chart-bar: #F2F2F7; --chart-bar-2: #636366; --chart-grid: rgba(255, 255, 255, .1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px;
  color-scheme: dark;
}
:root[data-theme="light"]:not([data-term]) {
  --bg: #F5F5F7; --side: #FBFBFD;
  --surface: #FFFFFF; --surface-2: #F2F2F7; --surface-3: #E5E5EA; --elev: #FFFFFF;
  --ink: #1D1D1F; --ink-2: #3A3A3C; --muted: #6E6E73;
  --line: rgba(60, 60, 67, .18); --line-strong: rgba(60, 60, 67, .29); --hair: rgba(60, 60, 67, .18);
  --fill: rgba(118, 118, 128, .12); --seg-on: #FFFFFF;
  --brand: #1C1C1E; --brand-hover: #000000; --brand-ink: #FFFFFF; --brand-text: #1C1C1E; --brand-soft: rgba(118, 118, 128, .12);
  --ribbon: rgba(118, 118, 128, .12); --ribbon-ink: #1D1D1F; --saffron: #1C1C1E; --saffron-soft: rgba(118, 118, 128, .12);
  --ok: #166534; --ok-soft: #DCFCE7; --warn: #854D0E; --warn-soft: #FEF3C7;
  --danger: #B91C1C; --danger-soft: #FEE2E2; --danger-solid: #D92D20;
  --glass: rgba(255, 255, 255, .72); --glass-edge: rgba(255, 255, 255, .9); --highlight: rgba(255, 255, 255, .95);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .05);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06); --shadow-2: 0 24px 60px rgba(0, 0, 0, .18);
  --track-on: #34C759; --track-off: rgba(120, 120, 128, .16);
  --focus: #0071E3;
  --chart-bar: #1C1C1E; --chart-bar-2: #D1D1D6; --chart-grid: rgba(60, 60, 67, .12);
  color-scheme: light;
}
:root:not([data-term]) body { background: var(--bg); color: var(--ink); letter-spacing: -.01em; }
:root:not([data-term]) :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Каркас: светлая/графитовая боковая панель, шапка в цвет панели */
:root:not([data-term]) .topbar { background: color-mix(in srgb, var(--side) 86%, transparent); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: .5px solid var(--hair); }
:root:not([data-term]) .sidenav { background: var(--side); border-right: .5px solid var(--hair); padding: 14px 12px 24px; }
:root:not([data-term]) .navlink, :root:not([data-term]) .nav-group > button { min-height: 38px; border-radius: 9px; font-size: .9rem; font-weight: 500; color: var(--ink); gap: 10px; padding: 0 10px; }
:root:not([data-term]) .navlink svg, :root:not([data-term]) .nav-group > button svg { width: 20px; height: 20px; color: var(--muted); }
:root:not([data-term]) .navlink:hover, :root:not([data-term]) .nav-group > button:hover { background: var(--fill); }
:root:not([data-term]) .nav-sub { border-left: .5px solid var(--hair); margin-left: 20px; }
:root:not([data-term]) .nav-sub .navlink { min-height: 34px; font-size: .86rem; color: var(--ink-2); }
:root:not([data-term]) .navlink[aria-current="page"] { background: var(--fill); color: var(--ink); font-weight: 600; box-shadow: none; position: relative; }
:root:not([data-term]) .navlink[aria-current="page"] svg { color: var(--ink); }
:root:not([data-term]) .nav-sub .navlink[aria-current="page"]::before { content: ""; position: absolute; left: -15px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 4px; background: var(--brand); }
:root:not([data-term]) .main { padding: 24px 32px 40px; max-width: 1480px; }
:root:not([data-term]) .page-head h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }
:root:not([data-term]) .wordmark span, :root:not([data-term]) .brand .wordmark span { color: var(--muted); }
:root:not([data-term]) .brand-sep { background: var(--hair); }
.theme-tgl svg { width: 20px; height: 20px; }
@media (max-width: 760px) { :root:not([data-term]) .main { padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); } :root:not([data-term]) .page-head h1 { font-size: 1.6rem; } }

/* Карточки, панели, таблицы */
:root:not([data-term]) .panel, :root:not([data-term]) .ins-card, :root:not([data-term]) .own-hero, :root:not([data-term]) .own-card,
:root:not([data-term]) .own-kpi > div, :root:not([data-term]) .kpi-row .kpi {
  background: var(--surface); border: 0; border-radius: 18px; box-shadow: var(--card-shadow);
}
:root:not([data-term]) .panel { padding: 18px 20px; }
:root:not([data-term]) .table-wrap { border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--card-shadow); }
:root:not([data-term]) table.data th { background: var(--surface); color: var(--muted); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; border-bottom: .5px solid var(--hair); padding: 12px; }
:root:not([data-term]) table.data td { border-bottom: .5px solid var(--hair); }
:root:not([data-term]) table.data tfoot td { background: var(--surface-2); border-top: .5px solid var(--line-strong); }
:root:not([data-term]) table.data tr.clickable:hover td { background: var(--fill); }
:root:not([data-term]) .fs { border: .5px solid var(--hair); border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 40%, transparent); }
:root:not([data-term]) .hint-box { background: var(--fill); border: 0; border-radius: 14px; }
:root:not([data-term]) .hint-box svg { color: var(--ink-2); }
:root:not([data-term]) .ins-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--card-shadow); }
:root:not([data-term]) .guide-card { border-left: 0; }
:root:not([data-term]) .guide-n { background: var(--brand); color: var(--brand-ink); }
:root:not([data-term]) .sub-h { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin: 18px 4px 10px; }

/* Кнопки: главное — графитовая капсула, вторичные — «жидкое стекло» */
:root:not([data-term]) .btn {
  min-height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; letter-spacing: -.01em;
  border: .5px solid var(--glass-edge); background: var(--glass); color: var(--ink);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--highlight), 0 1px 2px rgba(0, 0, 0, .06);
}
:root:not([data-term]) .btn:hover { background: color-mix(in srgb, var(--glass) 70%, var(--fill)); }
:root:not([data-term]) .btn:active { transform: scale(.97); }
:root:not([data-term]) .btn-primary { background: var(--brand); border-color: transparent; color: var(--brand-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(0, 0, 0, .12); }
:root:not([data-term]) .btn-primary:hover { background: var(--brand-hover); border-color: transparent; }
@media (hover: none) { :root:not([data-term]) .btn-primary:hover { background: var(--brand); } }
:root:not([data-term]) .btn-danger { color: var(--danger); }
:root:not([data-term]) .btn-danger:hover { background: var(--danger-soft); }
:root:not([data-term]) .btn-danger-solid, :root:not([data-term]) .btn-danger-solid:hover { background: var(--danger-solid); border-color: transparent; color: #fff; }
:root:not([data-term]) .btn-ghost { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
:root:not([data-term]) .btn-ghost:hover { background: var(--fill); }
:root:not([data-term]) .btn-sm { min-height: 34px; padding: 0 13px; font-size: .84rem; }
:root:not([data-term]) .btn-icon { width: 40px; padding: 0; }
:root:not([data-term]) .btn-sm.btn-icon { width: 34px; }

/* Поля */
:root:not([data-term]) .input, :root:not([data-term]) select.input, :root:not([data-term]) textarea.input {
  border: .5px solid var(--hair); border-radius: 11px; background: var(--fill); color: var(--ink); min-height: 40px;
}
:root:not([data-term]) .input:focus { border-color: transparent; outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 0; }
:root:not([data-term]) select.input option { background: var(--elev); color: var(--ink); }
:root:not([data-term]) .field > span, :root:not([data-term]) .field > label { color: var(--muted); font-weight: 500; font-size: .82rem; }
:root:not([data-term]) .check input { accent-color: var(--brand); }

/* Сегментированные переключатели (период, вид, тема) */
:root:not([data-term]) .seg { background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
:root:not([data-term]) .seg button { min-height: 32px; border-radius: 7px; font-size: .84rem; font-weight: 500; color: var(--ink); padding: 0 14px; white-space: nowrap; }
:root:not([data-term]) .seg button[aria-pressed="true"], :root:not([data-term]) .seg button[aria-selected="true"] { background: var(--seg-on); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* Вкладки разделов — «пилюли», выбранная графитовая (как кнопки отчётов в макете) */
:root:not([data-term]) .tabs { border-bottom: 0; gap: 8px; padding: 2px 0 4px; margin-bottom: 18px; }
:root:not([data-term]) .tab { min-height: 34px; padding: 0 14px; border: 0; margin: 0; border-radius: 17px; display: inline-flex; align-items: center; font-size: .88rem; font-weight: 500;
  background: var(--surface); color: var(--ink); box-shadow: var(--card-shadow); }
:root:not([data-term]) .tab:hover { background: var(--fill); }
:root:not([data-term]) .tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); font-weight: 600; border: 0; }

/* iOS-переключатели в Настройках */
:root:not([data-term]) .setting-check input[type="checkbox"], :root:not([data-term]) input[type="checkbox"].switch, :root:not([data-term]) .main[data-page="settings"] .check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: 16px;
  background: var(--track-off); cursor: pointer; transition: background-color .2s;
}
:root:not([data-term]) .setting-check input[type="checkbox"]::after, :root:not([data-term]) input[type="checkbox"].switch::after, :root:not([data-term]) .main[data-page="settings"] .check input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .18), 0 0 0 .5px rgba(0, 0, 0, .04); transition: transform .2s cubic-bezier(.3, .7, .4, 1.2);
}
:root:not([data-term]) .setting-check input[type="checkbox"]:checked, :root:not([data-term]) input[type="checkbox"].switch:checked, :root:not([data-term]) .main[data-page="settings"] .check input[type="checkbox"]:checked { background: var(--track-on); }
:root:not([data-term]) .setting-check input[type="checkbox"]:checked::after, :root:not([data-term]) input[type="checkbox"].switch:checked::after, :root:not([data-term]) .main[data-page="settings"] .check input[type="checkbox"]:checked::after { transform: translateX(20px); }
:root:not([data-term]) .main[data-page="settings"] .check input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }
:root:not([data-term]) .setting-check { justify-content: space-between; flex-direction: row-reverse; gap: 14px; min-height: 52px; padding: 6px 0; border-top: .5px solid var(--hair); }
:root:not([data-term]) .setting-check > span { flex: 1; display: grid; gap: 2px; }
.theme-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.theme-box h2 { font-size: 1.05rem; }

/* Статусы — единственный цвет */
:root:not([data-term]) .badge { border-radius: 9px; font-size: .75rem; padding: 3px 9px; background: var(--fill); color: var(--ink-2); }
:root:not([data-term]) .badge::before { display: none; }
:root:not([data-term]) .badge.info { background: var(--fill); color: var(--ink); }
:root:not([data-term]) .alert { border: 0; border-radius: 12px; }
:root:not([data-term]) .tag { border-radius: 9px; }

/* Окна: стеклянная подложка, скругление 22px */
:root:not([data-term]) dialog.modal { background: var(--elev); border-radius: 22px; box-shadow: var(--shadow-2); border: .5px solid var(--hair); }
:root:not([data-term]) dialog.modal::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
:root:not([data-term]) .modal-head h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
:root:not([data-term]) .modal-foot { border-top: .5px solid var(--hair); }
:root:not([data-term]) .toast { background: color-mix(in srgb, var(--elev) 88%, transparent); color: var(--ink); border: .5px solid var(--glass-edge); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border-radius: 14px; }
:root:not([data-term]) .toast.error { background: var(--danger-solid); color: #fff; }
:root:not([data-term]) .toast.ok::before { background: var(--ok); }
:root:not([data-term]) .spinner { border-top-color: var(--ink); }

/* Мелочи с оранжевым в старых стилях */
:root:not([data-term]) .mb-bar { background: var(--glass); color: var(--ink); border: .5px solid var(--glass-edge); backdrop-filter: blur(24px) saturate(190%); -webkit-backdrop-filter: blur(24px) saturate(190%);
  box-shadow: inset 0 1px 0 var(--highlight), 0 12px 32px rgba(0, 0, 0, .14); border-radius: 28px; padding: 7px 7px 7px 18px; top: auto; bottom: 16px; }
:root:not([data-term]) .mb-bar .btn { background: var(--fill); border: 0; box-shadow: none; }
:root:not([data-term]) .mb-t tr.row-sel td { background: var(--fill); }
:root:not([data-term]) .own-chart .bar { fill: var(--chart-bar); }
:root:not([data-term]) .pin-once-digits span { border-color: var(--line-strong); }
:root:not([data-term]) .rv-tl li.ev-sent::before { border-color: var(--ink); }
.pwa-btn.primary { background: #F2F2F7; color: #000; }
.pwa-btn:focus-visible, .pwa-x:focus-visible { outline-color: #0A84FF; }

/* Панель владельца — карточки как BackDashboard */
:root:not([data-term]) .own-big { font-weight: 700; letter-spacing: -.03em; }
:root:not([data-term]) .own-top li, :root:not([data-term]) .own-points li, :root:not([data-term]) .own-now li { border-top: .5px solid var(--hair); }
:root:not([data-term]) .own-alerts li { border-radius: 12px; }
:root:not([data-term]) .shell.terminal .main { max-width: none; }

/* ---------- 2. Касса и кухня: раскладка терминала, базовые тёмные цвета (поверх — css/nodex-term.css) ---------- */
:root[data-term="dark"] {
  --bg: #121214; --surface: #1C1C1E; --surface-2: #26262A; --surface-3: #2C2C2E;
  --ink: #F2F2F7; --ink-2: #D1D1D6; --muted: #9A9AA0; --line: #2C2C2E; --line-strong: #3A3A3E;
  --brand: #2BD47D; --brand-hover: #3BE38D; --brand-ink: #141414; --brand-text: #2BD47D; --brand-soft: rgba(43, 212, 125, .16);
  --saffron: #2BD47D; --saffron-soft: rgba(43, 212, 125, .16);
  --danger: #FF8A80; --danger-soft: #3A1512; --warn: #E3C66A; --warn-soft: #3A3014; --ok: #5BE584; --ok-soft: #173220;
  --focus: #4BE597; --chart-bar: #2BD47D;
  --font: Inter, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, sans-serif;
}
:root[data-term="dark"] body { background: #121214; }
:root[data-term="dark"] .ct {
  --c-canvas: #121214; --c-canvas-2: #18181A; --c-top: #1C1C1E; --c-tile: #1B4A34; --c-tile-2: #173F2C; --c-tile-hi: #173F2C;
  --c-lime: #2BD47D; --c-lime-ink: #141414; --c-bar: #1C1C1E; --c-bar-2: #26262A; --c-line: #2C2C2E; --c-ink: #F2F2F7; --c-ink-2: #9A9AA0;
}
:root[data-term="dark"] .ct-top { height: 56px; border-bottom-color: #2C2C2E; }
:root[data-term="dark"] .ct-ic { color: #F2F2F7; border-left-color: #2C2C2E; }
:root[data-term="dark"] .ct-ic:hover { background: rgba(255, 255, 255, .06); }
:root[data-term="dark"] .ct-halls { border-right: 1px solid #2C2C2E; }
:root[data-term="dark"] .ct-hall { min-height: 72px; border-bottom-color: #2C2C2E; color: #F2F2F7; }
:root[data-term="dark"] .ct-hall[aria-pressed="true"], :root[data-term="dark"] .ct-side .ct-dept[aria-pressed="true"]:not(.open) { background: #2BD47D; color: #141414; }
:root[data-term="dark"] .ct-side .ct-dept { border-bottom-color: #2C2C2E; }
:root[data-term="dark"] .ct-side .ct-dept.open[aria-pressed="true"] { background: transparent; }
:root[data-term="dark"] .ct-subs { background: transparent; }
:root[data-term="dark"] .ct-grid { gap: 2px; background: #121214; }
:root[data-term="dark"] .ct-table { margin: 0; border: 0; background: #26262A; color: #F2F2F7; }
:root[data-term="dark"] .ct-table.free:hover { background: #2E2E33; }
:root[data-term="dark"] .ct-table.void { background: none; }
:root[data-term="dark"] .ct-table.busy { background: #2BD47D; color: #141414; }
:root[data-term="dark"] .ct-table .ct-tmin { opacity: .8; }
:root[data-term="dark"] .ct-plus { background: #3A3A3E; color: #D1D1D6; }
:root[data-term="dark"] .ct-bar { height: 64px; border-top: 1px solid #2C2C2E; }
:root[data-term="dark"] .cb { border-right-color: #2C2C2E; color: #F2F2F7; }
:root[data-term="dark"] .cb.pay { background: #2BD47D; color: #141414; }
:root[data-term="dark"] .cb.pay:hover:not([disabled]) { background: #3BE38D; }
:root[data-term="dark"] .cb.hl:hover:not([disabled]) { background: #3BE38D; }
:root[data-term="dark"] .cb-n { background: #F76B15; color: #fff; }
:root[data-term="dark"] .ct-gtab { border-right-color: #1C1C1E; }
:root[data-term="dark"] .co-left { background: #1C1C1E; border-right: 1px solid #2C2C2E; }
:root[data-term="dark"] .co-head { background: #173F2C; }
:root[data-term="dark"] .co-lines { background: #1C1C1E; color: #F2F2F7; }
:root[data-term="dark"] .co-line { border-bottom-color: #2C2C2E; }
:root[data-term="dark"] .co-line:hover { background: #232326; }
:root[data-term="dark"] .co-line.sel { background: #0F2A1C; box-shadow: inset 4px 0 0 #2BD47D; }
:root[data-term="dark"] .co-n small { color: #9A9AA0; }
:root[data-term="dark"] .co-n .co-st { color: #E3C66A; }
:root[data-term="dark"] .co-line:not(.sent) .co-st { color: #F6B4AB; }
:root[data-term="dark"] .co-n .co-cmt { color: #E3C66A; }
:root[data-term="dark"] .co-empty, :root[data-term="dark"] .co-other { color: #9A9AA0; background: transparent; }
:root[data-term="dark"] .co-sum { background: #2C2C2E; border-top: 1px solid #2C2C2E; }
:root[data-term="dark"] .co-pct { background: #1C1C1E; color: #9A9AA0; border-right-color: #2C2C2E; }
:root[data-term="dark"] .co-pct b, :root[data-term="dark"] .co-total b { color: #F2F2F7; }
:root[data-term="dark"] .co-sub span { color: #9A9AA0; }
:root[data-term="dark"] .co-sub b { color: #F2F2F7; }
:root[data-term="dark"] .co-total { background: #1C1C1E; color: #F2F2F7; }
:root[data-term="dark"] .co-tools { background: #26262A; }
:root[data-term="dark"] .co-t { border-right-color: #1C1C1E; color: #F2F2F7; }
:root[data-term="dark"] .cm-nav { background: #26262A; }
:root[data-term="dark"] .cm-nb, :root[data-term="dark"] .cm-course { border-color: #1C1C1E; color: #F2F2F7; }
:root[data-term="dark"] .cm-q { background: #121214; color: #F2F2F7; border: 1px solid #3A3A3E; border-radius: 6px; }
:root[data-term="dark"] .cm-tile { background: #1B4A34; }
:root[data-term="dark"] .cm-tile.grp { background: #173F2C; }
:root[data-term="dark"] .cm-cell.stopped .cm-tile { background: #2A2A2E; color: #8E8E93; }
:root[data-term="dark"] .cm-stop { background: #3A1512; color: #F6B4AB; border-radius: 3px; }
:root[data-term="dark"] .cm-cnt { background: #2BD47D; color: #141414; }
:root[data-term="dark"] .cm-empty { color: #9A9AA0; }
:root[data-term="dark"] .ct-warn { color: #FF8A80 !important; }
/* окна кассы: оплата, отмена, скидка — в тех же тёмных цветах */
:root[data-term="dark"] dialog.modal { background: #1C1C1E; color: #F2F2F7; border: 1px solid #2C2C2E; }
:root[data-term="dark"] dialog.modal::backdrop { background: rgba(0, 0, 0, .6); }
:root[data-term="dark"] .modal-foot { border-top-color: #2C2C2E; }
:root[data-term="dark"] .btn { background: #26262A; border-color: #3A3A3E; color: #F2F2F7; }
:root[data-term="dark"] .btn:hover { background: #2E2E33; }
:root[data-term="dark"] .btn-primary, :root[data-term="dark"] .btn-primary:hover { background: #2BD47D; border-color: #2BD47D; color: #141414; }
:root[data-term="dark"] .btn-danger { color: #FF8A80; border-color: rgba(255, 138, 128, .4); background: #26262A; }
:root[data-term="dark"] .btn-danger-solid, :root[data-term="dark"] .btn-danger-solid:hover { background: #D93A2F; border-color: #D93A2F; color: #fff; }
:root[data-term="dark"] .btn-ghost { background: transparent; border-color: transparent; }
:root[data-term="dark"] .input, :root[data-term="dark"] select.input, :root[data-term="dark"] textarea.input { background: #121214; border-color: #3A3A3E; color: #F2F2F7; }
:root[data-term="dark"] .pay-m { background: #1B4A34; border-color: #1B4A34; color: #fff; }
:root[data-term="dark"] .pay-m small { color: #CDEBD9; }
:root[data-term="dark"] .pay-m[aria-checked="true"] { background: #2BD47D; border-color: #2BD47D; color: #141414; }
:root[data-term="dark"] .pay-m[aria-checked="true"] small { color: #0B5A32; }
:root[data-term="dark"] .pay-sum, :root[data-term="dark"] .numpad .key, :root[data-term="dark"] .pay-entry { background: #26262A; border-color: #3A3A3E; color: #F2F2F7; }
:root[data-term="dark"] .pay-notes .note { background: #173F2C; border-color: #173F2C; color: #fff; }
:root[data-term="dark"] #pay-go, :root[data-term="dark"] #pay-go:hover { background: #2BD47D; border-color: #2BD47D; color: #141414; }
:root[data-term="dark"] .menu-grid .act { background: #26262A; border-color: #3A3A3E; color: #F2F2F7; }
:root[data-term="dark"] .menu-grid .act.pay { background: #2BD47D; border-color: #2BD47D; color: #141414; }
:root[data-term="dark"] .cx-r span { background: #26262A; border-color: #3A3A3E; color: #F2F2F7; }
:root[data-term="dark"] .cx-r input:checked + span { background: #2BD47D; border-color: #2BD47D; color: #141414; }
:root[data-term="dark"] .cx-pad .pk, :root[data-term="dark"] .pk { color: #F2F2F7; }
:root[data-term="dark"] .pk:hover { background: #26262A; }
:root[data-term="dark"] .pct-grid .btn[aria-pressed="true"] { background: #2BD47D; border-color: #2BD47D; color: #141414; }
:root[data-term="dark"] .kfail-inline { background: #3A1512; color: #F6B4AB; }
:root[data-term="dark"] .wordmark span { color: #2BD47D; }
:root[data-term="dark"] .tag.warn { background: #3A3014; color: #E3C66A; }
/* кухонный экран */
:root[data-term="dark"] .k-card { background: #1C1C1E; border-color: #2C2C2E; }
:root[data-term="dark"] .k-card header { background: #173F2C; color: #fff; }
:root[data-term="dark"] .kitchen-head h1 { color: #F2F2F7; }

/* ---------- 2b. Полировка кассы (дизайн-ревью 22.10): контраст, касание, короткие экраны ---------- */
/* «Быстрая продажа»: тёмный текст на зелёном (раньше .cb перебивал цвет на светлый — контраст 1,4:1) */
:root[data-term="dark"] .cb.hl, :root[data-term="dark"] .cb.hl:hover:not([disabled]) { color: #141414; }
:root[data-term="dark"] .cb.hl { background: #2BD47D; }
:root[data-term="dark"] .cb.hl:hover:not([disabled]) { background: #3BE38D; }
/* единый фокус для сенсорной кассы: 3px, виден на плитках и на зелёном */
:root[data-term="dark"] :is(.cb, .ct-ic, .ct-hall, .ct-dept, .ct-table, .ct-gtab, .co-t, .cm-nb, .cm-course, .cm-tile, .cm-info, .co-line, .pay-m, .key, .pk, .note, .act, .btn, .sl-btn):focus-visible {
  outline: 3px solid #4BE597; outline-offset: -3px; }
:root[data-term="dark"] .cm-tile:focus-visible, :root[data-term="dark"] .ct-table:focus-visible { outline-color: #FFFFFF; }
/* плитки блюд: метки СТОП / количество не налезают на название; «i» тише, но с зоной касания 44px */
:root[data-term="dark"] .cm-cell.stopped .cm-tile, :root[data-term="dark"] .cm-tile:has(.cm-cnt) { padding-top: 26px; }
:root[data-term="dark"] .cm-n { line-height: 1.2; }
:root[data-term="dark"] .cm-stop { padding: 2px 6px; font-size: .66rem; letter-spacing: .04em; }
:root[data-term="dark"] .cm-info { width: 26px; height: 26px; border-width: 1.5px; border-color: rgba(255, 255, 255, .42); color: rgba(255, 255, 255, .82); font-size: .8rem; }
:root[data-term="dark"] .cm-info::after { content: ""; position: absolute; inset: -9px; }
:root[data-term="dark"] .cm-info:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .7); }
:root[data-term="dark"] .cm-cell.stopped .cm-info { border-color: rgba(255, 255, 255, .25); color: #8E8E93; }
/* подача по очереди выключена — кнопки 1/2/3 нейтральные, без зелёного «выбрано» */
:root[data-term="dark"] .cm-course[disabled], :root[data-term="dark"] .cm-course[disabled][aria-pressed="true"] { background: transparent; color: #8E8E93; opacity: 1; }
/* статусы позиций: новый/готовится — жёлтый, готово — зелёный, выдано — серый, не отправлено — розовый */
:root[data-term="dark"] .co-n .co-st.st-ready { color: #5BE584; }
:root[data-term="dark"] .co-n .co-st.st-served { color: #9A9AA0; }
:root[data-term="dark"] .co-n small { font-size: .8rem; line-height: 1.3; }
/* «Ещё», «Смена», «Объединить»: плитки-действия без подчёркивания, иконки крупнее */
:root[data-term="dark"] .menu-grid .act { text-decoration: none; border-radius: 12px; gap: 8px; font-weight: 600; }
:root[data-term="dark"] .menu-grid .act svg { width: 26px; height: 26px; color: #D1D1D6; }
:root[data-term="dark"] .menu-grid .act:hover { background: #2E2E33; }
/* окна кассы: одинаковые радиусы и кнопки */
:root[data-term="dark"] dialog.term-modal { border-radius: 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, .55); }
:root[data-term="dark"] dialog.term-modal .btn { border-radius: 10px; }
:root[data-term="dark"] .btn-danger-solid, :root[data-term="dark"] .btn-danger-solid:hover { background: #C4322A; border-color: #C4322A; }
:root[data-term="dark"] dialog.term-modal :is(.field > label, .field > span, legend, .pay-display label) { font-size: .85rem; font-weight: 500; color: #A1A1A8; }
/* отмена: причины выровнены по левому краю рядом с кружком, не в три строки */
:root[data-term="dark"] .cx-r span { justify-content: flex-start; text-align: left; padding: 6px 10px 6px 32px; border-radius: 10px; line-height: 1.2; }
:root[data-term="dark"] .cx-pad .pk { border-radius: 10px; background: #26262A; border-color: #3A3A3E; }
/* скидка: «440,00 сом · 100 %» в одну строку */
:root[data-term="dark"] .disc-modal .out-big { white-space: nowrap; font-size: 1.15rem; }
:root[data-term="dark"] .pct-grid .btn { border-radius: 10px; }
/* оплата: кнопки действий в одну строку */
:root[data-term="dark"] .pay-actions { grid-template-columns: auto auto minmax(0, 1fr); }
:root[data-term="dark"] .pay-actions .btn { white-space: nowrap; padding: 0 16px; }
:root[data-term="dark"] .pay-sum { border-radius: 14px; }
/* X-отчёт: без жёлтой «маркерной» подложки под итогом */
:root[data-term="dark"] .ledger li.total .val { box-shadow: none; color: #FFFFFF; }
:root[data-term="dark"] .ledger li { border-bottom-color: #2C2C2E; }
/* закрытие дня: три колонки выровнены по верху, подписи в одну строку */
:root[data-term="dark"] .dc-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, .75fr); gap: 16px; align-items: start; }
:root[data-term="dark"] .dc-grid > div > span, :root[data-term="dark"] .dc-grid .field label { font-size: .85rem; font-weight: 500; color: #9A9AA0; white-space: nowrap; }
:root[data-term="dark"] .dc-grid .field { margin: 0; }
:root[data-term="dark"] .dc-grid .input { width: 100%; }
/* стоп-лист: тёмные строки вместо светло-розовых */
:root[data-term="dark"] .sl-row { background: #26262A; border-radius: 10px; padding: 6px 8px 6px 12px; }
:root[data-term="dark"] .sl-row.on { background: #2E1714; box-shadow: inset 3px 0 0 #FF8A80; }
:root[data-term="dark"] .sl-row.on .sl-name b { color: #F6B4AB; text-decoration-color: rgba(246, 180, 171, .6); }
:root[data-term="dark"] .sl-name small { color: #9A9AA0; }
:root[data-term="dark"] .sl-btn { border-radius: 10px; border: 1.5px solid rgba(255, 138, 128, .55); background: transparent; color: #FF8A80; }
:root[data-term="dark"] .sl-btn:hover { background: rgba(255, 138, 128, .1); }
:root[data-term="dark"] .sl-btn.off { border-color: #2BD47D; background: #2BD47D; color: #141414; }
:root[data-term="dark"] .sl-rem input { border-radius: 10px; }
/* баннер «Бегунок не напечатан»: тот же красный, но без грубой рамки, кнопка — тёмная на красном */
:root[data-term="dark"] .kfail { background: #B3261E; border: 0; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .12); }
:root[data-term="dark"] .kfail-ic { background: rgba(255, 255, 255, .95); color: #B3261E; }
:root[data-term="dark"] .kfail-btn { min-height: 48px; border-radius: 10px; background: #FFFFFF; color: #8E1B1B; }
:root[data-term="dark"] .kfail-x { width: 48px; height: 48px; border-radius: 10px; }
/* короткие экраны (1024×600, 125% на 1366×768): окна помещаются без прокрутки */
@media (max-height: 720px) {
  :root[data-term="dark"] dialog.term-modal { max-height: calc(100dvh - 16px); }
  :root[data-term="dark"] dialog.term-modal .modal-head { padding: 12px 20px 4px; }
  :root[data-term="dark"] dialog.term-modal .modal-head h2 { font-size: 1.2rem; }
  :root[data-term="dark"] dialog.term-modal .modal-foot { padding: 10px 20px 12px; }
  :root[data-term="dark"] dialog.term-modal .btn, :root[data-term="dark"] dialog.term-modal .input { min-height: 48px; }
  :root[data-term="dark"] .pay { gap: 12px; }
  :root[data-term="dark"] .pay-sum { padding: 12px 14px; }
  :root[data-term="dark"] .pay-total { font-size: 1.8rem; }
  :root[data-term="dark"] .pay-line.big b { font-size: 1.4rem; }
  :root[data-term="dark"] .pay-input { gap: 8px; }
  :root[data-term="dark"] .pay-m { min-height: 52px; flex-direction: row; gap: 8px; }
  :root[data-term="dark"] .pay-m svg { width: 20px; height: 20px; }
  :root[data-term="dark"] .pay-display { flex-direction: row; align-items: center; gap: 12px; }
  :root[data-term="dark"] .pay-display label { flex: none; max-width: 92px; line-height: 1.2; }
  :root[data-term="dark"] .pay-entry { min-height: 52px; font-size: 1.6rem; }
  :root[data-term="dark"] .pay-notes { grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(92px, 1.5fr); }
  :root[data-term="dark"] .pay-notes .exact { grid-column: auto; }
  :root[data-term="dark"] .pay-notes .note { min-height: 48px; padding: 0 4px; font-size: .9rem; }
  :root[data-term="dark"] .numpad { gap: 6px; }
  :root[data-term="dark"] .numpad .key { min-height: 48px; font-size: 1.35rem; }
  :root[data-term="dark"] .pay-actions .btn { min-height: 52px; }
  :root[data-term="dark"] .pct-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  :root[data-term="dark"] .pct-grid .pct-100 { grid-column: auto; }
  :root[data-term="dark"] .disc-modal .form-grid { margin-top: 10px !important; row-gap: 8px; }
  :root[data-term="dark"] .chip-radio span { min-height: 44px; }
  :root[data-term="dark"] .cx-r span { min-height: 48px; }
  :root[data-term="dark"] .cx-pad .pk { min-height: 48px; }
}
/* «Отчёты кассира» и другие страницы кассы без раскладки терминала — в палитре кассы, а не бэк-офиса */
:root[data-app="front"]:not([data-term]):not([data-theme="light"]) { --bg: #121214; --side: #1C1C1E; --surface: #1C1C1E; --surface-2: #26262A; }
:root[data-app="front"]:not([data-term]):not([data-theme="light"]) body { background: #121214; }

/* ---------- 3. Вход в кассу — §50 N1 «Nodex — сеть», единственный экран входа (pages/login.js) ----------
   Герой — знак Nodex на «сети» (canvas #lw-net рисует login.js: ~30 кадров/с, пауза в скрытой вкладке, без движения при
   prefers-reduced-motion), справа тёмное стекло с PIN. Кафе — только метка «Касса N · Оазис». Не зависит от темы. */
:root[data-term="dark"] .pk { color: #F2F2F7; }
:root[data-term="dark"] .pk:hover { background: #2C2C2E; }
:root[data-term="dark"] .pk:active { background: #3A3A3E; }
:root[data-term="dark"] .pk svg { color: #9A9AA0; }
.lw {
  --n1-mark: 236px; --n1-card: 420px; --n1-key: 76px; --n1-gx: 28px; --n1-gy: 10px; --n1-num: 32px; --n1-x: 72px;
  --n1-g: #2BD47D; --n1-ink: #F4F6F5; --n1-ink-2: rgba(244, 246, 245, .72); --n1-muted: rgba(244, 246, 245, .56);
  position: relative; isolation: isolate; box-sizing: border-box; width: 100%; height: 100vh; height: 100dvh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--n1-card); grid-template-areas: "hero card"; align-items: center; column-gap: 48px;
  padding: 0 var(--n1-x); background: radial-gradient(120% 100% at 28% 50%, #0B1410 0%, #060807 55%, #040505 100%); color: var(--n1-ink);
  font-family: Inter, "Inter Display", -apple-system, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.lw *, .lw *::before, .lw *::after { box-sizing: border-box; }
.lw [hidden] { display: none !important; }
.lw p { margin: 0; }
/* фон: свечение, «сеть», зерно */
.lw-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.lw-glow { position: absolute; left: var(--n1-cx, 30%); top: var(--n1-cy, 50%); width: calc(840px * var(--n1-s, 1)); height: calc(840px * var(--n1-s, 1)); transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(43, 212, 125, .22), rgba(43, 212, 125, .05) 45%, rgba(43, 212, 125, 0)); }
.lw-net { position: absolute; left: 0; top: 0; display: block;
  -webkit-mask-image: radial-gradient(circle calc(560px * var(--n1-s, 1)) at var(--lx, 50%) var(--ly, 50%), #000 55%, transparent 100%);
  mask-image: radial-gradient(circle calc(560px * var(--n1-s, 1)) at var(--lx, 50%) var(--ly, 50%), #000 55%, transparent 100%); }
.lw-grain { position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
/* бренд Nodex */
.lw-lockup { position: absolute; left: var(--n1-x); top: 44px; height: 30px; width: auto; display: block; }
.lw-hero { grid-area: hero; position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; min-width: 0; }
.lw-mark { width: var(--n1-mark); height: var(--n1-mark); flex: none; }
.lw-mark img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 40px rgba(43, 212, 125, .35)); animation: lw-breath 6s ease-in-out infinite; will-change: transform, opacity; }
@keyframes lw-breath { 0%, 100% { opacity: .78; transform: scale(1); } 50% { opacity: 1; transform: scale(1.03); } }
.lw-pitch { position: absolute; left: 0; bottom: 56px; display: grid; gap: 10px; }
.lw-prod { font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -1.2px; }
.lw-prod span { color: var(--n1-g); }
.lw-tag { font-size: 17px; line-height: 24px; letter-spacing: -.1px; color: var(--n1-ink-2); }
.lw-foot { position: absolute; right: var(--n1-x); bottom: 22px; width: var(--n1-card); text-align: center; font-size: 12px; letter-spacing: 1.6px; color: rgba(244, 246, 245, .34); pointer-events: none; }
/* карточка PIN — тёмное стекло без размытия (под ней анимация — так дешевле для GPU) */
.lw-card { grid-area: card; width: var(--n1-card); max-width: 100%; padding: 30px 40px 32px; border-radius: 32px; display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(180deg, rgba(22, 30, 26, .9) 0%, rgba(11, 15, 13, .93) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 100px -30px rgba(0, 0, 0, .9); }
.lw-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; font-size: 13px; color: var(--n1-muted); }
.lw-cafe { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; }
.lw-cafe img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.lw-cafe span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-when { flex: none; font-variant-numeric: tabular-nums; }
.lw-title { margin: 0; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.4px; color: var(--n1-ink); text-align: center; }
.lw-dots { margin-top: 18px; display: flex; gap: 18px; align-items: center; justify-content: center; height: 14px; }
.lw-dots span { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(244, 246, 245, .28); transition: background-color .16s, border-color .16s, box-shadow .16s; }
.lw-dots span.on { border-color: var(--n1-g); background: var(--n1-g); box-shadow: 0 0 0 4px rgba(43, 212, 125, .14), 0 0 14px rgba(43, 212, 125, .6); }
.lw-dots.shake { animation: lw-shake .36s ease; }
@keyframes lw-shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.lw-hint { margin: 14px 0 0; min-height: 20px; max-width: 100%; font-size: 13px; line-height: 20px; text-align: center; color: var(--n1-muted); }
.lw-hint.err { color: #FF8A7E; font-weight: 500; }
.lw-hint-sub { color: var(--n1-muted); font-weight: 400; }
.lw input.sr-only { opacity: 0; }
/* клавиши — кольца без «коробок», нажатие — зелёное кольцо */
.lw-pad { margin-top: 14px; display: grid; grid-template-columns: repeat(3, var(--n1-key)); column-gap: var(--n1-gx); row-gap: var(--n1-gy); }
#lw .pk { width: var(--n1-key); height: var(--n1-key); min-height: 0; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; text-decoration: none;
  background: radial-gradient(120% 120% at 50% 0%, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .015) 60%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  color: var(--n1-ink); font-family: inherit; font-size: var(--n1-num); font-weight: 300; line-height: 1; letter-spacing: -.5px; font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background-color .14s, box-shadow .14s; }
#lw .pk:hover { background: rgba(255, 255, 255, .06); }
#lw .pk:active { background: rgba(43, 212, 125, .10); box-shadow: inset 0 0 0 1.5px rgba(43, 212, 125, .75), 0 0 24px -6px rgba(43, 212, 125, .6); }
#lw .pk:focus-visible { outline: 2px solid rgba(43, 212, 125, .9); outline-offset: 2px; }
#lw .pk-fn { background: transparent; box-shadow: none; color: rgba(244, 246, 245, .7); }
#lw .pk-fn:active { background: rgba(255, 255, 255, .07); box-shadow: none; }
#lw .pk svg { width: 28px; height: 28px; color: inherit; }
#lw .pk-empty { visibility: hidden; }
/* «Войти» — зелёная «пилюля» шириной с клавиатуру */
.lw-go { margin-top: 22px; width: calc(var(--n1-key) * 3 + var(--n1-gx) * 2); max-width: 100%; height: 56px; border: 0; border-radius: 28px; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 600; letter-spacing: .1px; color: #04170C; background: linear-gradient(180deg, #3BE38D 0%, #24C774 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 10px 30px -10px rgba(43, 212, 125, .55); }
.lw-go:active:not([disabled]) { background: linear-gradient(180deg, #2FD483 0%, #1FB868 100%); }
.lw-go[disabled] { opacity: .6; cursor: progress; }
.lw-go:focus-visible { outline: 2px solid rgba(43, 212, 125, .9); outline-offset: 3px; }
/* §52 «Вход заведения» — та же стеклянная карточка: поля логина и пароля вместо клавиатуры */
.lw-sub { margin: 10px 0 0; max-width: 320px; font-size: 13px; line-height: 19px; text-align: center; color: var(--n1-muted); }
.lw-fields { width: 100%; margin-top: 20px; display: grid; gap: 12px; }
.lw-field { display: grid; gap: 6px; font-size: 12px; font-weight: 500; letter-spacing: .2px; color: var(--n1-muted); }
.lw-field i { font-style: normal; opacity: .7; font-weight: 400; }
.lw-in { width: 100%; height: 46px; padding: 0 16px; border: 0; border-radius: 14px; font: inherit; font-size: 16px; color: var(--n1-ink);
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10); transition: box-shadow .14s, background-color .14s; }
.lw-in::placeholder { color: rgba(244, 246, 245, .32); }
.lw-in:focus { outline: none; background: rgba(43, 212, 125, .06); box-shadow: inset 0 0 0 1.5px rgba(43, 212, 125, .75), 0 0 0 4px rgba(43, 212, 125, .12); }
.lw-venue .lw-go { width: 100%; margin-top: 16px; }
.lw-venue .lw-hint { margin-top: 10px; }
.lw-note { margin: 14px 0 0; font-size: 12px; line-height: 17px; text-align: center; color: rgba(244, 246, 245, .45); }
.lw-wiz { width: min(440px, calc(100vw - 32px)); }
/* §56 мастер первого запуска: шаги, выбор «Импорт / Пустая», логотип */
.lw-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 11px; letter-spacing: .3px; }
.lw-steps li { padding: 4px 10px; border-radius: 999px; color: rgba(244, 246, 245, .45); background: rgba(255, 255, 255, .04); }
.lw-steps li.cur { color: #04170C; background: var(--n1-g); font-weight: 600; }
.lw-steps li.done { color: var(--n1-g); background: rgba(43, 212, 125, .10); }
.lw-file { padding: 10px 12px; height: auto; font-size: 13px; }
.lw-logo-prev { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--n1-muted); }
.lw-logo-prev img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: #fff; }
.lw-wiz-nav { width: 100%; display: flex; gap: 10px; align-items: center; }
.lw-wiz-nav .lw-go { flex: 1; }
.lw-back { height: 56px; margin-top: 16px; padding: 0 20px; border: 0; border-radius: 28px; font: inherit; font-size: 15px; color: var(--n1-ink); cursor: pointer;
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.lw-choice { width: 100%; margin-top: 18px; display: grid; gap: 10px; }
.lw-opt { display: grid; gap: 4px; text-align: left; padding: 16px 18px; border: 0; border-radius: 16px; cursor: pointer; font: inherit; color: var(--n1-ink);
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.lw-opt b { font-size: 16px; font-weight: 600; }
.lw-opt span { font-size: 12.5px; line-height: 18px; color: var(--n1-muted); }
.lw-opt:first-child { box-shadow: inset 0 0 0 1.5px rgba(43, 212, 125, .7); background: rgba(43, 212, 125, .07); }
.lw-opt:hover { background: rgba(255, 255, 255, .08); }
/* §56 демо-кафе: подсказка входа */
.lw-demo { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 20px; text-align: center; color: #FFE7A8;
  background: rgba(255, 196, 61, .10); box-shadow: inset 0 0 0 1px rgba(255, 196, 61, .35); }
.lw-demo b { color: #FFC43D; letter-spacing: .6px; }
.lw-demo code { font-family: inherit; font-weight: 600; color: #fff; }
.lw-demo-fill { margin-left: 6px; padding: 2px 10px; border: 0; border-radius: 999px; font: inherit; font-size: 12px; cursor: pointer; color: #1A1200; background: #FFC43D; }
@media (max-height: 700px) and (orientation: landscape) { .lw-fields { margin-top: 12px; gap: 8px; } .lw-in { height: 40px; } .lw-sub { margin-top: 6px; } }
/* 1280×800 и уже */
@media (max-width: 1279px) { .lw { --n1-x: 56px; column-gap: 32px; } }
/* 1024×600, 125 % на 1366×768: знак меньше, «сеть» остаётся за ним */
@media (max-height: 700px) and (orientation: landscape) {
  .lw { --n1-mark: 168px; --n1-card: 368px; --n1-key: 62px; --n1-gx: 24px; --n1-gy: 6px; --n1-num: 28px; --n1-x: 48px; }
  .lw-card { padding: 20px 32px 22px; border-radius: 28px; }
  .lw-head { margin-bottom: 12px; }
  .lw-title { font-size: 20px; line-height: 26px; }
  .lw-dots { margin-top: 12px; }
  .lw-hint { margin-top: 8px; }
  .lw-pad { margin-top: 8px; }
  .lw-go { height: 50px; margin-top: 14px; }
  .lw-lockup { top: 28px; height: 26px; }
  .lw-pitch { bottom: 36px; gap: 6px; }
  .lw-prod { font-size: 32px; line-height: 36px; }
  .lw-tag { font-size: 15px; }
  .lw-foot { bottom: 10px; }
}
/* планшет в портрете и узкие экраны: знак и «сеть» сверху, PIN под ними */
@media (orientation: portrait), (max-width: 760px) {
  .lw { --n1-mark: 180px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "card"; grid-template-rows: auto auto; align-content: center; justify-items: center;
    row-gap: 40px; padding: 96px 24px 72px; height: auto; min-height: 100vh; min-height: 100dvh; overflow: hidden auto; }
  .lw-lockup { left: 24px; top: 32px; }
  .lw-hero { align-self: auto; flex-direction: column; gap: 28px; }
  .lw-pitch { position: static; justify-items: center; text-align: center; }
  .lw-card { justify-self: center; }
  .lw-foot { position: static; grid-row: 3; width: auto; margin-top: -12px; }
}
@media (max-width: 460px) {
  .lw { --n1-key: 68px; --n1-gx: 20px; --n1-gy: 8px; --n1-num: 30px; --n1-mark: 140px; padding: 88px 16px 56px; row-gap: 28px; }
  .lw-card { padding: 24px 16px 22px; border-radius: 28px; }
  .lw-prod { font-size: 32px; line-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .lw-mark img { animation: none; opacity: 1; }
  .lw-dots span, #lw .pk { transition: none; }
  .lw-dots.shake { animation: none; }
}

/* ---------- Подключение телефона по QR (/#/enroll) — палитра мобильного ---------- */
.enr { background: #000; color: #fff; font-family: -apple-system, "SF Pro Text", Inter, Roboto, system-ui, sans-serif; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
.enr-card { background: #1C1C1E; border: 0; border-radius: 22px; padding: 24px 20px; }
.enr .wordmark span { color: #AEAEB2; }
.enr-sub { color: #AEAEB2; }
.enr-input { background: rgba(118, 118, 128, .24); border: 0; border-radius: 12px; color: #fff; }
.enr-input:focus { outline: 3px solid rgba(10, 132, 255, .6); }
.enr-go { background: #F2F2F7; color: #000; border-radius: 27px; min-height: 54px; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); }
.enr-link { color: #fff; }
.enr-spin { border-color: rgba(118, 118, 128, .4); border-top-color: #F2F2F7; }
.enr-ok { background: rgba(48, 209, 88, .18); color: #5BE584; }
.enr-bad { background: rgba(255, 69, 58, .2); color: #FFB4AB; }
:root[data-theme="light"] .enr { background: #F2F2F7; color: #000; }
:root[data-theme="light"] .enr-card { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .05); }
:root[data-theme="light"] .enr .wordmark { color: #000; }
:root[data-theme="light"] .enr-sub, :root[data-theme="light"] .enr-field label { color: #6C6C70; }
:root[data-theme="light"] .enr-input { background: rgba(118, 118, 128, .12); color: #000; }
:root[data-theme="light"] .enr-go { background: #1C1C1E; color: #fff; }
:root[data-theme="light"] .enr-link { color: #1C1C1E; }
:root[data-theme="light"] .enr-bad { background: #FEE2E2; color: #991B1B; }
:root[data-theme="light"] .enr-bad span { color: #991B1B; }

/* ---------- 4. Мобильный официант / доставщик (docs/ref/mobile-apple) ---------- */
.ma {
  --bg: #000000; --card: #1C1C1E; --card-2: #2C2C2E; --label: #FFFFFF; --secondary: #AEAEB2; --fill: rgba(118, 118, 128, .24); --seg-on: #636366;
  --bar: rgba(22, 22, 24, .82); --hair: rgba(255, 255, 255, .15); --hair-strong: rgba(255, 255, 255, .25); --shadow: none;
  --accent: #F2F2F7; --on-accent: #000000; --accent-text: #FFFFFF; --accent-soft: rgba(118, 118, 128, .24); --accent-ink: #FFFFFF;
  --warn-soft: rgba(255, 204, 0, .18); --warn-ink: #FFD60A; --ok-soft: rgba(48, 209, 88, .18); --ok-ink: #5BE584;
  --danger-soft: rgba(255, 69, 58, .2); --danger-ink: #FF8A80; --chip: #2C2C2E;
  --glass: rgba(44, 44, 46, .62); --glass-edge: rgba(255, 255, 255, .14); --highlight: rgba(255, 255, 255, .10);
  --dim: #0A0A0A; --sheet: #1C1C1E; --sheet-card: #2C2C2E; --grabber: rgba(235, 235, 245, .3);
  --tile-h: 112px; --fs: 1;
  --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom);
  position: fixed; inset: 0; background: var(--bg); color: var(--label); overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, Roboto, system-ui, sans-serif; font-size: 17px; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none;
}
:root[data-theme="light"] .ma {
  --bg: #F2F2F7; --card: #FFFFFF; --card-2: #FFFFFF; --label: #000000; --secondary: #6C6C70; --fill: rgba(118, 118, 128, .12); --seg-on: #FFFFFF;
  --bar: rgba(249, 249, 249, .85); --hair: rgba(60, 60, 67, .29); --hair-strong: rgba(60, 60, 67, .36); --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .05);
  --accent: #1C1C1E; --on-accent: #FFFFFF; --accent-text: #1C1C1E; --accent-soft: rgba(118, 118, 128, .12); --accent-ink: #1C1C1E;
  --warn-soft: #FEF3C7; --warn-ink: #854D0E; --ok-soft: #DCFCE7; --ok-ink: #166534; --danger-soft: #FEE2E2; --danger-ink: #991B1B; --chip: #FFFFFF;
  --glass: rgba(255, 255, 255, .72); --glass-edge: rgba(255, 255, 255, .9); --highlight: rgba(255, 255, 255, .95);
  --dim: #8E8E93; --sheet: #F2F2F7; --sheet-card: #FFFFFF; --grabber: rgba(60, 60, 67, .3);
}
.ma[data-font="s"] { --tile-h: 92px; --fs: .94; }
.ma[data-font="l"] { --tile-h: 132px; --fs: 1.08; }
:root[data-mobile] body { background: #000; overscroll-behavior: none; }
:root[data-mobile][data-theme="light"] body { background: #F2F2F7; }
:where(.ma) :where(button, a) { -webkit-tap-highlight-color: transparent; font: inherit; color: inherit; }
.ma :focus-visible { outline: 3px solid #0A84FF; outline-offset: 2px; }
.ma-main { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(var(--sat) + 10px) 0 calc(var(--sab) + 180px); }
.ma[data-view="menu"] .ma-main { padding-bottom: calc(var(--sab) + 110px); }
.ma[data-view="cart"] .ma-main { padding-bottom: calc(var(--sab) + 170px); background: var(--dim); }
.ma-empty { text-align: center; color: var(--secondary); margin: 40px 20px; font-size: 15px; }

/* компактная шапка, которая появляется при прокрутке (Large Title сжимается) */
.ma-top { position: absolute; z-index: 5; left: 0; right: 0; top: 0; height: calc(var(--sat) + 44px); padding-top: var(--sat); display: grid; place-items: center;
  background: var(--bar); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: .5px solid var(--hair);
  font-size: 17px; font-weight: 600; opacity: 0; transform: translateY(-6px); transition: opacity .18s, transform .18s; pointer-events: none; }
.ma.scrolled .ma-top { opacity: 1; transform: none; }
.ma[data-view="cart"] .ma-top { display: none; }

.ma-head { padding: 46px 20px 0; display: flex; flex-direction: column; gap: 14px; }
.ma-row1 { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 36px; }
.ma-sub { font-size: 15px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-lt { margin: 0; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -.4px; font-family: inherit; overflow-wrap: anywhere; }
.ma-lt.sm { font-size: 28px; line-height: 34px; letter-spacing: -.3px; }
.ma-round { appearance: none; flex: none; width: 36px; height: 36px; border-radius: 18px; border: 0; background: var(--fill); color: var(--label); display: grid; place-items: center; cursor: pointer; padding: 0; }
.ma-round svg { width: 18px; height: 18px; }
.ma-round.sm { width: 32px; height: 32px; }
.ma-round[disabled] { opacity: .35; }
.ma-back { appearance: none; border: 0; background: none; padding: 0 6px 0 0; margin-left: -6px; min-height: 44px; display: inline-flex; align-items: center; gap: 2px; font-size: 17px; color: var(--accent-text); cursor: pointer; }
.ma-back svg { width: 22px; height: 22px; }
.ma-pill { padding: 5px 11px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; max-width: 62%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 11px; background: var(--fill); color: var(--secondary); }
.ma-search svg { width: 17px; height: 17px; flex: none; }
.ma-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--label); outline: none; padding: 0; -webkit-user-select: text; user-select: text; }
.ma-search input::placeholder { color: var(--secondary); }
.ma-search input::-webkit-search-cancel-button { filter: grayscale(1); }
.ma-search:focus-within { box-shadow: 0 0 0 3px rgba(10, 132, 255, .45); }

/* сегменты iOS */
.ma-seg { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); }
.ma-seg button, .ma .theme-seg button { appearance: none; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--label); font-size: 13px; font-weight: 500; cursor: pointer; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-seg button[aria-selected="true"], .ma-seg button[aria-pressed="true"], .ma .theme-seg button[aria-pressed="true"] { background: var(--seg-on); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.ma .theme-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); }

/* секции и сгруппированные списки */
.ma-sec { padding: 18px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.ma-cap { margin: 0; padding-left: 4px; font-size: 13px; font-weight: 600; color: var(--secondary); text-transform: uppercase; letter-spacing: .3px; }
.ma-cap.danger { color: var(--danger-ink); }
.ma-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ma-card { appearance: none; width: 100%; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 0; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); text-align: left; cursor: pointer; transition: transform .12s cubic-bezier(.3, .7, .4, 1.4); }
.ma-ic { flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ma-ic small { font-size: 11px; font-weight: 600; line-height: 1.1; }
.ma-ic b { font-size: 19px; font-weight: 700; line-height: 20px; max-width: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-ic.ok { background: var(--ok-soft); color: var(--ok-ink); }
.ma-ic.plain { background: var(--fill); color: var(--label); }
.ma-ic svg { width: 24px; height: 24px; }
.ma-card-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ma-card-r { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ma-card-t { font-size: calc(17px * var(--fs)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-card-s { font-size: calc(17px * var(--fs)); font-weight: 600; flex: none; font-variant-numeric: tabular-nums; }
.ma-card-m { font-size: 14px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-chip { flex: none; padding: 3px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--fill); color: var(--label); white-space: nowrap; }
.ma-chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.ma-chip.ok { background: var(--ok-soft); color: var(--ok-ink); }
.ma-chip.danger { background: var(--danger-soft); color: var(--danger-ink); font-weight: 700; }

.ma-group { list-style: none; margin: 0; padding: 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.ma-group > li + li, .ma-group > .ma-li + .ma-li { border-top: .5px solid var(--hair); }
.ma-li { appearance: none; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 14px; border: 0; background: transparent; color: var(--label); text-align: left; text-decoration: none; font-size: 16px; }
.ma-li-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ma-li-t b { font-size: 16px; font-weight: 600; }
.ma-li-t small { font-size: 13px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-li-t small.cm { color: var(--warn-ink); }
.ma-li-link { cursor: pointer; }
.ma-li-link svg { width: 14px; height: 14px; color: var(--secondary); flex: none; }
.ma-li-link.danger { color: var(--danger-ink); }
.ma-num { font-variant-numeric: tabular-nums; }
.ma-me { padding: 14px; }
.ma-ava { width: 52px; height: 52px; border-radius: 26px; background: var(--fill); display: grid; place-items: center; font-size: 22px; font-weight: 600; flex: none; }
.ma-me .ma-li-t b { font-size: 19px; }

/* меню */
.ma-chips { display: flex; gap: 8px; padding: 14px 16px 4px; overflow-x: auto; scrollbar-width: none; scroll-padding: 0 16px; }
.ma-chips::-webkit-scrollbar { display: none; }
.ma-chips button { appearance: none; flex: none; height: 34px; padding: 0 14px; border-radius: 17px; border: 0; background: var(--chip); color: var(--label); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; cursor: pointer; }
.ma-chips button[aria-selected="true"] { background: var(--label); color: var(--bg); box-shadow: none; }
.ma-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 16px; }
.ma-dish { appearance: none; position: relative; min-height: var(--tile-h); padding: 12px; border: 0; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); color: var(--label); text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; cursor: pointer; transition: transform .12s cubic-bezier(.3, .7, .4, 1.4); }
.ma-dn { font-size: calc(15px * var(--fs)); font-weight: 600; line-height: 1.27; padding-right: 26px; overflow-wrap: anywhere; }
.ma-df { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.ma-dp { font-size: calc(15px * var(--fs)); font-weight: 600; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.ma-dplus { width: 32px; height: 32px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.ma-dplus svg { width: 15px; height: 15px; }
.ma-cnt { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--label); color: var(--bg); font-style: normal; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.ma-rem { position: absolute; left: 12px; bottom: 50px; font-style: normal; font-size: 11px; font-weight: 600; color: var(--warn-ink); }
.ma-dish.stopped { opacity: .5; cursor: not-allowed; }
.ma-dish.stopped .ma-chip { align-self: flex-start; }
.ma-card:active, .ma-dish:not(.stopped):active, .ma-table:active, .ma-new:active, .ma-cartbar:active, .ma-send:active, .ma-chips button:active { transform: scale(.97); }

/* плавающие элементы: «Новый счёт», корзина, отправка */
.ma-float { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; pointer-events: none; }
.ma-float > * { pointer-events: auto; }
.ma-new { appearance: none; position: absolute; right: 16px; bottom: calc(var(--sab) + 72px); height: 52px; padding: 0 20px 0 7px; border-radius: 26px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(190%); -webkit-backdrop-filter: blur(24px) saturate(190%); border: .5px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--highlight), 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .10);
  color: var(--label); display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -.2px; cursor: pointer; transition: transform .12s; }
.ma-new-plus { width: 38px; height: 38px; border-radius: 19px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); }
.ma-new-plus svg { width: 18px; height: 18px; }
.ma-cartbar { appearance: none; position: absolute; left: 16px; right: 16px; bottom: calc(var(--sab) + 16px); height: 62px; padding: 0 7px 0 8px; border-radius: 31px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(190%); -webkit-backdrop-filter: blur(24px) saturate(190%); border: .5px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--highlight), 0 1px 2px rgba(0, 0, 0, .06), 0 10px 30px rgba(0, 0, 0, .12);
  color: var(--label); display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: transform .12s; }
.ma-cb-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ma-cb-bag { position: relative; flex: none; width: 46px; height: 46px; border-radius: 23px; background: var(--fill); display: grid; place-items: center; }
.ma-cb-bag svg { width: 22px; height: 22px; stroke-width: 1.7; }
.ma-cb-bag i { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.ma-cb-t { display: flex; flex-direction: column; gap: 1px; text-align: left; min-width: 0; }
.ma-cb-t b { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.ma-cb-t small { font-size: 13px; color: var(--secondary); }
.ma-cb-sum { flex: none; height: 48px; padding: 0 20px; border-radius: 24px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; font-size: 17px; font-weight: 600; letter-spacing: -.2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(0, 0, 0, .12); font-variant-numeric: tabular-nums; }

/* корзина — лист поверх меню */
.ma-cart { margin-top: 44px; min-height: calc(100% - 44px); border-radius: 14px 14px 0 0; background: var(--sheet); padding-bottom: 8px; }
.ma-cart .ma-sec { padding-top: 16px; }
.ma-cart .ma-group { background: var(--sheet-card); }
.ma-grab { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--grabber); margin: 0 auto; position: relative; top: 8px; }
.ma-sh-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 18px 16px 0; }
.ma-sh-head h2 { margin: 0; font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: inherit; }
.ma-sh-head > :last-child { justify-self: end; }
.ma-sh-sp { width: 58px; }
.ma-link { appearance: none; justify-self: start; border: 0; background: none; padding: 0; min-height: 44px; font-size: 17px; color: var(--accent-text); cursor: pointer; }
.ma-line { position: relative; gap: 10px; transition: transform .2s; }
.ma-li-btn { appearance: none; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.ma-q { min-width: 18px; text-align: center; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ma-step { flex: none; display: flex; align-items: center; height: 32px; border-radius: 8px; background: var(--fill); }
.ma-step button { appearance: none; width: 46px; height: 32px; border: 0; background: transparent; color: var(--label); display: grid; place-items: center; cursor: pointer; padding: 0; }
.ma-step button:active { background: var(--fill); border-radius: 8px; }
.ma-step svg { width: 14px; height: 14px; }
.ma-step i { width: .5px; height: 18px; background: var(--hair-strong); }
.ma-sum { flex: none; min-width: 58px; text-align: right; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ma-swipe-del { position: absolute; top: 0; bottom: 0; right: 0; width: 88px; transform: translateX(100%); border: 0; background: #FF3B30; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.ma-line.open { transform: translateX(-88px); }
.ma-cmt { color: var(--accent-text); font-size: 15px; font-weight: 500; gap: 8px; }
.ma-cmt svg { width: 18px; height: 18px; color: currentColor; }
.ma-sent { cursor: pointer; }
.ma-st { flex: none; display: grid; place-items: center; }
.ma-st svg { width: 16px; height: 16px; }
.ma-st.ok { color: var(--ok-ink); }
.ma-st.warn { color: var(--warn-ink); }
.ma-x { flex: none; font-size: 15px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.ma-sent .ma-sum { font-weight: 400; }
.ma-foot { margin: 0; padding: 0 4px; font-size: 13px; color: var(--secondary); }
.ma-sendbar { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(var(--sab) + 16px); display: flex; flex-direction: column; gap: 12px;
  background: var(--bar); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-top: .5px solid var(--hair); }
.ma-total { display: flex; justify-content: space-between; align-items: baseline; }
.ma-total span { font-size: 17px; color: var(--secondary); }
.ma-total b { font-size: 28px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.ma-send { appearance: none; height: 54px; border: 0; border-radius: 27px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 17px; font-weight: 600; letter-spacing: -.2px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(0, 0, 0, .12); transition: transform .12s; }
.ma-send i { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: rgba(127, 127, 127, .30); font-style: normal; font-size: 14px; font-weight: 700; display: grid; place-items: center; }
.ma-send.ghost { background: var(--fill); color: var(--label); box-shadow: none; }
.ma-send[disabled] { opacity: .5; }

/* нижние вкладки — полупрозрачная панель с размытием */
.ma-tabs { position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; height: calc(var(--sab) + 58px); padding: 8px 24px var(--sab); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--bar); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-top: .5px solid var(--hair); }
.ma-tabs button { appearance: none; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; color: var(--secondary); font-size: 10px; font-weight: 500; cursor: pointer; padding: 0; }
.ma-tabs button svg { width: 26px; height: 26px; }
.ma-tabs button[aria-current="page"] { color: var(--accent-text); font-weight: 600; }
.ma[data-view="menu"] .ma-tabs, .ma[data-view="cart"] .ma-tabs { display: none; }

/* нижние листы (выбор стола, действия) */
dialog.ma-sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 560px; max-height: calc(100dvh - 54px); padding: 0 0 calc(env(safe-area-inset-bottom) + 12px);
  border: 0; border-radius: 14px 14px 0 0; background: #1C1C1E; color: #fff; overflow: hidden; display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, Roboto, system-ui, sans-serif; letter-spacing: -.01em;
  --card: #2C2C2E; --label: #FFFFFF; --secondary: #AEAEB2; --fill: rgba(118, 118, 128, .24); --seg-on: #636366; --hair: rgba(255, 255, 255, .15); --shadow: none;
  --accent: #F2F2F7; --on-accent: #000; --accent-text: #FFFFFF; --grabber: rgba(235, 235, 245, .3); --danger-ink: #FF8A80; }
dialog.ma-sheet[open] { animation: ma-up .28s cubic-bezier(.2, .9, .3, 1); }
dialog.ma-sheet.out { animation: ma-down .16s ease-in forwards; }
dialog.ma-sheet.full { height: calc(100dvh - 54px); }
dialog.ma-sheet::backdrop { background: rgba(0, 0, 0, .55); }
:root[data-theme="light"] dialog.ma-sheet { background: #F2F2F7; color: #000; --card: #FFFFFF; --label: #000; --secondary: #6C6C70; --fill: rgba(118, 118, 128, .12); --seg-on: #FFFFFF;
  --hair: rgba(60, 60, 67, .29); --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .05); --accent: #1C1C1E; --on-accent: #fff; --accent-text: #1C1C1E; --grabber: rgba(60, 60, 67, .3); --danger-ink: #B91C1C; }
:root[data-theme="light"] dialog.ma-sheet::backdrop { background: rgba(0, 0, 0, .3); }
@keyframes ma-up { from { transform: translateY(100%); } }
@keyframes ma-down { to { transform: translateY(100%); } }
.ma-sh-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
dialog.ma-sheet .ma-sh-head { padding-top: 14px; }
dialog.ma-sheet .ma-seg, dialog.ma-sheet .ma-seg button { color: var(--label); }
.ma-acts { display: flex; flex-direction: column; }
.ma-act { appearance: none; min-height: 54px; border: 0; background: var(--card); color: var(--accent-text); font: inherit; font-size: 17px; cursor: pointer; }
.ma-act + .ma-act { border-top: .5px solid var(--hair); }
.ma-act.danger { color: var(--danger-ink); }
.ma-legend { display: flex; gap: 16px; font-size: 13px; color: var(--secondary); }
.ma-legend span { display: flex; align-items: center; gap: 6px; }
.ma-legend i { width: 10px; height: 10px; border-radius: 5px; }
.ma-legend i.free { background: var(--card); border: 1px solid var(--hair); }
.ma-legend i.busy { background: var(--accent); }
.ma-tgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ma-table { appearance: none; height: 92px; padding: 12px; border: 0; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); color: var(--label); text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: transform .12s cubic-bezier(.3, .7, .4, 1.4); }
.ma-table b { font-size: 22px; font-weight: 700; line-height: 1.1; }
.ma-table small { font-size: 12px; color: var(--secondary); }
.ma-table.busy { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.ma-tb { display: flex; flex-direction: column; gap: 1px; }
.ma-tb span { font-size: 14px; font-weight: 600; }
.ma-table.busy small { color: inherit; opacity: .9; }

/* остальные окна на телефоне (модификаторы, комментарий, отмена с PIN, неотправленные) — тоже нижним листом */
:root[data-mobile] dialog.modal { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100% !important; max-width: 560px !important; height: auto !important;
  max-height: calc(100dvh - 54px) !important; border-radius: 14px 14px 0 0 !important; border: 0; padding-bottom: env(safe-area-inset-bottom); animation: ma-up .28s cubic-bezier(.2, .9, .3, 1); }
:root[data-mobile] dialog.modal::before { content: ""; flex: none; display: block; width: 36px; height: 5px; border-radius: 3px; background: rgba(127, 127, 132, .45); margin: 8px auto 0; }
:root[data-mobile] dialog.modal .modal-foot { border-top: 0; }
:root[data-mobile] dialog.modal .modal-foot .btn { min-height: 50px; flex: 1 1 auto; }
:root[data-mobile] .toasts { bottom: calc(150px + env(safe-area-inset-bottom)) !important; left: 16px; right: 16px; }
:root[data-mobile] .kfail-host { top: calc(8px + env(safe-area-inset-top)); }

@media (min-width: 601px) {
  .ma { max-width: 560px; margin: 0 auto; border-left: .5px solid var(--hair); border-right: .5px solid var(--hair); }
}
@media (prefers-reduced-motion: reduce) {
  .ma *, dialog.ma-sheet { transition: none !important; animation: none !important; }
}
:root[data-term="dark"] .toast { background: #2C2C2E; color: #F2F2F7; border: 1px solid #3A3A3E; }
:root[data-term="dark"] .toast.error { background: #D93A2F; color: #fff; }
/* светлая касса: без оранжевого — «К оплате» зелёная, как в тёмной */
:root[data-term="classic"] .cb.pay, :root[data-term="classic"] #pay-go, :root[data-term="classic"] .menu-grid .act.pay { background: #2BD47D; border-color: #2BD47D; color: #141414; }
:root[data-term="classic"] .cb.pay:hover:not([disabled]) { background: #3BE38D; }
.ma-acts-r { display: flex; gap: 8px; flex: none; }
/* «Отправить на кухню» / сумма корзины — светлая заливка и чёрный текст в тёмной теме (макет Cart) */
.ma .ma-send:not(.ghost), .ma .ma-cb-sum, .ma .ma-new-plus { background: var(--accent); color: var(--on-accent); }

/* ---------- Остатки оранжевого из старых слоёв ---------- */
:root:not([data-term]) .lg-now { background: var(--chart-bar); }
:root:not([data-term]) .client-chip svg, :root:not([data-term]) .tl-comment { color: var(--warn); }
:root:not([data-term]) .wordmark span { color: var(--muted); }
:root[data-term] .pay-btn.cash, :root[data-term] .act.pay { background: #2BD47D; border-color: #2BD47D; color: #141414; }
:root[data-term] .pay-m[aria-checked="true"] { border-color: #2BD47D; }
:root[data-term] .pay-entry:focus { border-color: #2BD47D; }
#pay-go.ready { box-shadow: 0 0 0 3px rgba(43, 212, 125, .45); }
:root[data-term] .dish-qty { background: #2BD47D; color: #141414; }
:root[data-term="classic"] .co-n .co-cmt, :root[data-term="classic"] .wordmark span, :root[data-term="classic"] .pin-brand .wordmark span { color: #4A4F57; }
:root[data-term="dark"] .table-btn.busy .t-time { color: #0B5A32; }
:root[data-term="dark"] .table-btn.busy { background: #2BD47D; border-color: #2BD47D; }
:root .enr .wordmark span { color: #AEAEB2; } :root[data-theme="light"] .enr .wordmark span { color: #6C6C70; }
/* плитки состояния принтеров — карточки со статусным цветом (как BackSettings) */
:root:not([data-term]) .pg-tile { border: 0; border-radius: 16px; background: var(--ok-soft); color: var(--ok); box-shadow: var(--card-shadow); padding: 10px 12px; }
:root:not([data-term]) .pg-tile.slow { background: var(--warn-soft); color: var(--warn); }
:root:not([data-term]) .pg-tile.offline { background: var(--danger-soft); color: var(--danger); }
:root:not([data-term]) .pg-name { color: var(--ink); }
:root[data-term="dark"] .pg-tile { border-color: #2C2C2E; background: #173220; color: #5BE584; }
:root[data-term="dark"] .pg-tile.slow { background: #3A3014; color: #E3C66A; }
:root[data-term="dark"] .pg-tile.offline { background: #3A1512; color: #FF8A80; }
/* «Прошлый день не закрыт» — заметный жёлтый баннер (Закрытие дня, X-отчёт) */
.day-warn { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: #FFD60A; color: #2B2200; font-weight: 600; line-height: 1.35; border: 2px solid #C9A800; }
.day-warn-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #2B2200; color: #FFD60A; display: grid; place-items: center; font-weight: 900; }
.pin-hint-sub { display: inline-block; margin-top: 4px; font-weight: 500; font-size: .88rem; opacity: .9; }
/* §30 Вход «Оазис Официант» — только по QR */
.qrl .enr-card { justify-items: center; text-align: center; gap: 14px; padding: 28px 22px; }
.qrl-logo { width: 132px; height: 132px; border-radius: 50%; background: #fff; padding: 6px; }
.qrl h1 { font-size: 1.6rem; letter-spacing: -.02em; }
.qrl-text { font-size: 1.05rem; line-height: 1.45; }
.qrl-scan { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; }
.qrl-help { text-align: left; width: 100%; padding: 12px 14px; border-radius: 14px; background: rgba(118, 118, 128, .24); font-size: .95rem; }
.qrl-help ol { margin: 6px 0; padding-left: 20px; display: grid; gap: 4px; }
:root[data-theme="light"] .qrl-help { background: rgba(118, 118, 128, .12); }
/* Корень «/» — выбор программы */
.chooser-body { margin: 0; min-height: 100dvh; background: #000; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif; }
:root[data-theme="light"] .chooser-body { background: #F5F5F7; color: #1D1D1F; }
.chooser { max-width: 560px; margin: 0 auto; padding: calc(32px + env(safe-area-inset-top)) 16px 32px; display: grid; gap: 22px; }
.ch-head { display: flex; align-items: center; gap: 16px; }
.ch-head img { border-radius: 50%; background: #fff; padding: 4px; }
.ch-head h1 { margin: 0; font-size: 2rem; letter-spacing: -.02em; }
.ch-head h1 span { font-weight: 300; color: #AEAEB2; }
.ch-head p { margin: 2px 0 0; color: #AEAEB2; }
.ch-list { display: grid; gap: 12px; }
.ch-card { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 18px; background: #1C1C1E; color: inherit; text-decoration: none; transition: transform .12s; }
.ch-card:active { transform: scale(.98); }
.ch-card:hover { background: #2C2C2E; }
.ch-card img { border-radius: 14px; flex: none; }
.ch-card span { display: grid; gap: 3px; }
.ch-card b { font-size: 1.15rem; }
.ch-card small { color: #AEAEB2; font-size: .9rem; }
:root[data-theme="light"] .ch-card { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05); }
:root[data-theme="light"] .ch-card:hover { background: #F2F2F7; }
:root[data-theme="light"] .ch-card small, :root[data-theme="light"] .ch-head p { color: #6E6E73; }
/* §33 вызовы гостей: плашка вверху и список */
.calls-pill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: fixed; z-index: 1200; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); max-width: calc(100vw - 24px);
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 22px; background: #FFD60A; color: #1C1C1E;
  font: 600 .95rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); cursor: pointer; animation: calls-in .3s ease-out; }
.calls-pill i { font-style: normal; padding: 1px 8px; border-radius: 10px; background: #1C1C1E; color: #FFD60A; font-size: .8rem; }
.calls-dot { width: 10px; height: 10px; border-radius: 50%; background: #FF3B30; animation: calls-blink 1s infinite; }
@keyframes calls-in { from { transform: translate(-50%, -20px); opacity: 0; } }
@keyframes calls-blink { 50% { opacity: .3; } }
.calls-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.calls-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.calls-list li.bill { box-shadow: inset 4px 0 0 #FFD60A; }
.calls-list li span { display: grid; gap: 2px; }
.calls-list li small { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .calls-pill, .calls-dot { animation: none; } }
/* §33 QR-наклейки на столы (A4) */
@page qrsheet { size: A4 portrait; margin: 8mm; }
@media print {
  #print-area.qr-print { width: auto !important; padding: 0 !important; color: #000; font-family: Arial, Helvetica, sans-serif; }
  #print-area.qr-print .qs-sheet { page: qrsheet; display: grid; gap: 4mm; }
  #print-area.qr-print.per-6 .qs-sheet { grid-template-columns: repeat(2, 1fr); }
  #print-area.qr-print.per-12 .qs-sheet { grid-template-columns: repeat(3, 1fr); }
  #print-area.qr-print.per-20 .qs-sheet { grid-template-columns: repeat(4, 1fr); }
  #print-area.qr-print .qs { break-inside: avoid; border: .6pt dashed #888; border-radius: 4mm; padding: 4mm; display: grid; justify-items: center; gap: 2mm; text-align: center; }
  #print-area.qr-print.per-6 .qs { min-height: 88mm; }
  #print-area.qr-print.per-12 .qs { min-height: 64mm; }
  #print-area.qr-print.per-20 .qs { min-height: 52mm; padding: 2.5mm; }
  #print-area.qr-print .qs-top { display: flex; align-items: center; gap: 2mm; }
  #print-area.qr-print .qs-top img { width: 12mm; height: 12mm; }
  #print-area.qr-print .qs-top span { display: grid; text-align: left; }
  #print-area.qr-print .qs-top b { font-size: 11pt; }
  #print-area.qr-print .qs-top small { font-size: 7.5pt; color: #444; }
  #print-area.qr-print .qs-qr svg { display: block; width: 100%; height: auto; }
  #print-area.qr-print.per-6 .qs-qr { width: 52mm; } #print-area.qr-print.per-12 .qs-qr { width: 36mm; } #print-area.qr-print.per-20 .qs-qr { width: 28mm; }
  #print-area.qr-print .qs-t { font-size: 13pt; } #print-area.qr-print .qs-t b { font-size: 20pt; }
  #print-area.qr-print.per-20 .qs-t b { font-size: 15pt; }
  #print-area.qr-print .qs-cap { font-size: 7pt; color: #333; }
}
/* §33 фото блюд и KG-поля в Офисе */
.ph-box { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.ph-prev { width: 140px; height: 105px; border-radius: 14px; overflow: hidden; background: var(--fill, var(--surface-2)); display: grid; place-items: center; color: var(--muted); font-size: .85rem; flex: none; }
.ph-prev img { width: 100%; height: 100%; object-fit: cover; }
.ph-acts { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; flex: 1; min-width: 200px; }
.ph-acts label.btn { cursor: pointer; }
.is-busy { opacity: .6; pointer-events: none; }
.kg-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mb-ph { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.ph-bulk td { vertical-align: middle; }
.ph-thumb img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.tr-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.tr-gap { flex: 1; }
.tr-t td { vertical-align: top; }
.tr-t .input { min-width: 180px; }
.tr-ru { display: block; max-width: 320px; }
.tr-modal .tr-t textarea { min-height: 40px; }
.tk-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Кухня: цех в шапке карточки, читаемый чип «Новый» (AA) — дополнение к 2b ---------- */
.k-card header .k-ws { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .18); color: inherit; white-space: nowrap; }
.k-item .badge.k-st.info { background: #DDF6E8; color: #0B5A32; }
:root[data-term="dark"] .k-item .badge.k-st.info { background: #173F2C; color: #FFFFFF; }
:root[data-term="dark"] .k-item .badge.k-st.warn { background: #3A3014; color: #F2D27A; }
:root[data-term="dark"] .k-item .badge.k-st.ok { background: #173220; color: #7BE39A; }
.k-card header { flex-wrap: wrap; row-gap: 2px; }
.k-card header .k-num, .k-card header .k-timer { white-space: nowrap; flex: none; }
.k-card header .k-table { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-card header .k-ws { order: 5; flex-basis: 100%; padding: 0; background: none; font-size: .8rem; font-weight: 600; opacity: .9; }

/* ---------- §36 Сотрудник сам задаёт PIN ---------- */
.cp-card { max-width: 400px; display: grid; gap: 10px; }
.cp-card .login-logo { margin: -4px auto 0; }
.cp-title { text-align: center; }
.cp-fields { display: grid; gap: 8px; }
.cp-field { appearance: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 14px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--line-strong); background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; }
.cp-field[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.cp-lbl { font-size: .9rem; font-weight: 600; }
.cp-dots { display: flex; gap: 8px; }
.cp-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); }
.cp-dots i.on { background: var(--ink); border-color: var(--ink); }
.cp-hint { margin: 0; font-size: .85rem; color: var(--muted); text-align: center; }
.cp-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cp-pad .pk { min-height: 54px; border-radius: 14px; background: var(--surface-2); color: var(--ink); font-size: 1.5rem; font-weight: 500; }
.cp-pad .pk:hover { background: var(--surface-3); }
.cp-pad .pk svg { width: 24px; height: 24px; }
.cp-err:empty { display: none; }
.cp-err { margin: 0; text-align: center; }
.cp-tip { font-weight: 500; color: var(--muted); }
@media (max-height: 860px) { .cp-card .login-logo { display: none; } .cp-card { gap: 8px; padding-top: 18px; } .cp-pad .pk { min-height: 46px; } .cp-wrap { padding-top: 10px; padding-bottom: 10px; } }
.ma-notice { margin: 8px 4px 20px; font-size: 1.05rem; line-height: 1.45; color: var(--ma-label, inherit); }
/* §38 больше 4 залов — лента с прокруткой, названия целиком */
.ma-seg.scroll { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ma-seg.scroll::-webkit-scrollbar { display: none; }
.ma-seg.scroll button { flex: 0 0 auto; padding: 0 12px; overflow: visible; }
/* §38 Стартовый экран «Официант»: камера в приложении + код */
.qrl-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; font-size: 1.1rem; }
.qrl-btn.alt { background: rgba(118, 118, 128, .24); color: #fff; box-shadow: none; }
.qrl-btn[disabled] { opacity: .45; cursor: not-allowed; }
:root[data-theme="light"] .qrl-btn.alt { background: rgba(118, 118, 128, .14); color: #000; }
.qrl-note { margin: -4px 0 0; font-size: .92rem; line-height: 1.4; color: #FFD60A; }
:root[data-theme="light"] .qrl-note { color: #8A6100; }
.qrl-code { width: 100%; display: grid; gap: 8px; text-align: left; }
.qrl-code label { font-size: .95rem; opacity: .85; }
.qrl-in { width: 100%; min-height: 64px; text-align: center; font-size: 2rem !important; letter-spacing: .18em !important; }
dialog.qrs { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; }
dialog.qrs::backdrop { background: #000; }
.qrs-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qrs-frame { position: absolute; left: 50%; top: 42%; width: min(70vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 24px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); outline: 3px solid #fff; }
.qrs-hint { position: absolute; left: 16px; right: 16px; top: calc(42% + min(35vw, 150px) + 18px); margin: 0; text-align: center; font-size: 1.05rem; text-shadow: 0 1px 3px #000; }
.qrs-close { position: absolute; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); }
.qr-or { margin: 10px 0 0; text-align: center; font-size: .95rem; }
.qr-box .qr-code { font-size: 2.4rem; letter-spacing: .14em; text-align: center; }
/* §38 Отчёты «По сменам» / «По времени» — только раскладка, цвета из темы (office-v4b) */
.r38-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 0 0 16px; }
.r38-kpis.sm { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 8px; }
.r38-kpi { display: grid; gap: 4px; align-content: start; padding: 14px 16px !important; margin: 0 !important; }
.r38-kpi > span { font-size: .85rem; opacity: .7; }
.r38-kpi > b { font-size: 1.35rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.r38-kpis.sm .r38-kpi > b { font-size: 1.15rem; }
.r38-kpi > small { font-size: .8rem; opacity: .7; }
.r38-h { margin: 0 0 4px; font-size: 1.05rem; }
.r38-row { cursor: pointer; }
.r38-row:hover td, .r38-row:focus-visible td { background: rgba(10, 132, 255, .07); }
.r38-row:focus-visible { outline: 2px solid #0A84FF; outline-offset: -2px; }
.r38-minus { color: #D70015; }
.r38-plus { color: #248A3D; }
:root[data-theme="dark"] .r38-minus { color: #FF6961; }
:root[data-theme="dark"] .r38-plus { color: #30D158; }
.r38-detail h3 { margin: 18px 0 8px; font-size: 1rem; }
.r38-chart { margin-bottom: 8px; }
.r38-tper { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.r38-tper .seg { flex-wrap: nowrap; }
.r38-tper .seg small { opacity: .65; font-size: .75em; margin-left: 2px; }
.r38-tper input[type="datetime-local"] { min-width: 210px; }
.r38-tper .period-x { margin-left: auto; }
@media (max-width: 600px) { .r38-tper .seg { overflow-x: auto; max-width: 100%; } .r38-tper .field, .r38-tper input[type="datetime-local"] { min-width: 0; width: 100%; } .r38-kpis { grid-template-columns: 1fr 1fr; } }
#print-area.a4 .r38-kpis { display: flex; flex-wrap: wrap; gap: 6px 18px; }
#print-area.a4 .r38-kpi { padding: 0 !important; border: 0; box-shadow: none; background: none; }
.r38-tper .field { flex: 0 0 auto; }
.r38-tper .field:has(input[type="datetime-local"]) { flex: 0 0 230px; }
.r38-tper input[type="datetime-local"] { width: 100%; min-width: 0; }
.r38-tper .seg { flex: 0 0 auto; width: auto; overflow: visible; }
@media (max-width: 600px) { .r38-tper .field:has(input[type="datetime-local"]) { flex: 1 1 100%; } .r38-tper .seg { overflow-x: auto; max-width: 100%; } }
/* §38 мягкие напоминания: смена дольше рабочего дня, «проведите Закрытие дня» */
.shift-dot.warn { background: #FF9F0A; box-shadow: 0 0 0 3px rgba(255, 159, 10, .25); }
.shift-over { color: #C77700; font-weight: 600; }
:root[data-theme="dark"] .shift-over, :root[data-term] .shift-over { color: #FFB340; }
.day-remind { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 159, 10, .14); color: inherit; font-weight: 600; }
/* §39 Настройки → «Экран входа» (раскладка; цвета карточек — из темы офиса) */
.ls-panel { margin-top: 16px; }
.ls-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ls-head h2 { margin: 0 0 2px; }
.ls-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.ls-main { display: grid; gap: 16px; min-width: 0; }
.ls-styles { border: 0; padding: 0; margin: 0; }
.ls-styles legend { font-weight: 600; margin-bottom: 8px; }
.ls-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ls-card { position: relative; display: grid; gap: 4px; padding: 8px 8px 10px; border-radius: 14px; border: 1.5px solid rgba(120, 120, 128, .25); cursor: pointer; }
.ls-card:has(input:checked) { border-color: #0A84FF; box-shadow: 0 0 0 3px rgba(10, 132, 255, .18); }
.ls-card:has(input:focus-visible) { outline: 2px solid #0A84FF; outline-offset: 2px; }
.ls-card input { position: absolute; opacity: 0; pointer-events: none; }
.ls-card b { font-size: .92rem; } .ls-card small { font-size: .78rem; opacity: .7; line-height: 1.3; }
.ls-mini { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; background: #140E0A; }
.ls-mini .m-ph { position: absolute; inset: 0 45% 0 0; background: linear-gradient(135deg, #6B4A2E, #2A1C12); }
.ls-mini .m-pad { position: absolute; right: 8%; top: 18%; width: 30%; height: 64%; border-radius: 6px; background: rgba(244, 235, 223, .14); }
.ls-mini .m-chips { position: absolute; left: 8%; bottom: 12%; width: 34%; height: 10%; border-radius: 6px; background: repeating-linear-gradient(90deg, #2BD47D 0 22%, transparent 22% 33%); }
.ls-mini[data-s="p1"] .m-ph { inset: 0; background: linear-gradient(135deg, #7A5A3A, #20160F); }
.ls-mini[data-s="p1"] .m-pad { background: rgba(255, 255, 255, .22); backdrop-filter: blur(4px); }
.ls-mini[data-s="p2"] { background: #1C1D20; } .ls-mini[data-s="p2"] .m-ph { display: none; } .ls-mini[data-s="p2"] .m-pad { background: #2C2D31; right: 35%; }
.ls-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ls-m { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; }
.ls-m-prev { width: 112px; height: 84px; border-radius: 12px; overflow: hidden; background: #140E0A; display: grid; place-items: center; }
.ls-m-prev img { width: 100%; height: 100%; object-fit: cover; }
.ls-m-prev.logo img { width: 72px; height: 72px; object-fit: contain; }
.ls-m-body { display: grid; gap: 4px; }
.ls-m-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.ls-texts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ls-texts .ls-wide, .ls-texts .ls-save { grid-column: 1 / -1; }
.ls-thumb-wrap { margin: 0; position: sticky; top: 12px; display: grid; gap: 6px; }
.ls-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #140E0A; color: #F4EBDF; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.ls-thumb .t-photo { position: absolute; inset: 0 40% 0 0; width: 60%; height: 100%; object-fit: cover; filter: brightness(.5) sepia(.4); }
.ls-thumb .t-tint { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 14, 10, .2), rgba(20, 14, 10, .6) 40%, #140E0A 64%); }
.ls-thumb .t-brand { position: absolute; left: 7%; top: 14%; width: 50%; display: grid; gap: 2px; justify-items: start; }
.ls-thumb .t-logo { width: 30px; height: 30px; border-radius: 50%; object-fit: contain; background: #fff; margin-bottom: 4px; }
.ls-thumb .t-brand b { font: 600 15px/1.1 Georgia, serif; } .ls-thumb .t-brand small { font-size: 8px; opacity: .8; } .ls-thumb .t-brand em { font-style: normal; font-size: 7px; opacity: .6; }
.ls-thumb .t-pad { position: absolute; right: 7%; top: 14%; width: 30%; display: grid; gap: 6px; justify-items: center; }
.ls-thumb .t-dots { display: flex; gap: 3px; } .ls-thumb .t-dots i { width: 4px; height: 4px; border-radius: 50%; border: 1px solid rgba(244, 235, 223, .6); }
.ls-thumb .t-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 100%; }
.ls-thumb .t-keys i { aspect-ratio: 1.4; border-radius: 4px; background: rgba(244, 235, 223, .12); }
.ls-thumb .t-chips { display: flex; gap: 3px; } .ls-thumb .t-chips i { width: 14px; height: 6px; border-radius: 3px; background: #2BD47D; }
.ls-thumb[data-s="p1"] .t-photo { inset: 0; width: 100%; } .ls-thumb[data-s="p1"] .t-tint { background: rgba(20, 14, 10, .35); }
.ls-thumb[data-s="p1"] .t-pad { padding: 6px; border-radius: 8px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.ls-thumb[data-s="p2"] { background: #1C1D20; } .ls-thumb[data-s="p2"] .t-tint { display: none; }
dialog.ls-look { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #140E0A; }
dialog.ls-look::backdrop { background: rgba(0, 0, 0, .7); }
.ls-look-stage { position: absolute; inset: 0; }
.ls-look-bar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 999px; background: rgba(28, 28, 30, .86); color: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); z-index: 5; }
@media (max-width: 900px) { .ls-grid { grid-template-columns: 1fr; } .ls-thumb-wrap { position: static; max-width: 360px; } .ls-texts { grid-template-columns: 1fr; } }
.ls-warn { color: #B25000; font-weight: 600; } :root[data-theme="dark"] .ls-warn { color: #FFB340; }
.qr-locked { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(255, 159, 10, .16); color: #8A5300; font-weight: 600; text-align: center; } :root[data-theme="dark"] .qr-locked { color: #FFB340; }
.badge.r38-nc { background: rgba(255, 159, 10, .14); color: #9A6A1E; } :root[data-theme="dark"] .badge.r38-nc { color: #E0B068; } .badge.r38-cl { opacity: .7; }
/* §43 Меню официанта: плитки категорий, «Назад / Домой» (тёмная по умолчанию, светлая поддерживается, без оранжевого) */
.ma { --lime: #2BD47D; --lime-ink: #04170C; }
.iw-head { padding-top: calc(var(--sat) + 6px); }
.iw-bar { display: flex; align-items: center; gap: 6px; min-height: 48px; }
.iw-btn { appearance: none; border: 0; background: var(--fill); color: var(--label); height: 40px; padding: 0 12px 0 8px; border-radius: 12px; display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 600; cursor: pointer; }
.iw-btn svg { width: 20px; height: 20px; }
.iw-btn[aria-current="page"] { background: var(--card-2); opacity: .6; }
.iw-sp { flex: 1; }
.iw-ic { appearance: none; border: 0; background: var(--fill); color: var(--label); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.iw-ic svg { width: 21px; height: 21px; }
.iw-ic[aria-pressed="true"] { background: var(--label); color: var(--bg); }
.iw-where { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 6px; min-width: 0; }
.iw-where b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-where span { color: var(--secondary); font-size: 15px; white-space: nowrap; }
.iw-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 8px 16px calc(var(--sab) + 96px); }
.iw-cat { appearance: none; position: relative; min-height: 110px; padding: 12px 12px 10px 16px; border: 0; border-radius: 16px; background: var(--card); color: var(--label); text-align: left; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; box-shadow: var(--shadow); }
.iw-cat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--cc); }
.iw-cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--cc) 34%, transparent), transparent 70%); pointer-events: none; }
.iw-cat b { position: relative; z-index: 1; font-size: calc(17px * var(--fs)); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.iw-cat small { position: relative; z-index: 1; color: var(--secondary); font-size: 13px; }
.iw-cat:active { transform: scale(.97); }
.iw-dishes { padding-bottom: calc(var(--sab) + 96px); }
.iw-cart { appearance: none; position: absolute; left: 12px; right: 12px; bottom: calc(var(--sab) + 12px); height: 60px; padding: 0 18px; border: 0; border-radius: 18px;
  background: var(--lime); color: var(--lime-ink); display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35); font-size: 17px; }
.iw-cart:active { transform: scale(.98); }
.iw-cart-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.iw-cart-l svg { width: 22px; height: 22px; flex: none; }
.iw-cart-l b { font-weight: 700; }
.iw-cart-l i { font-style: normal; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--lime-ink); color: var(--lime); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.iw-cart-l small { font-size: 13px; font-weight: 600; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-cart-sum { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
:root[data-theme="light"] .iw-cart { box-shadow: 0 6px 18px rgba(0, 0, 0, .14); }

/* ---------- §40 Новый знак Nodex (кольцо + «nodex» + «POS»): одна разметка wordmark() для шапки, Офиса и подключения телефона ---------- */
.wordmark.nx { --nx-green: #2BD47D; display: inline-flex; align-items: center; line-height: 1; color: var(--ink, #F2F2F7); }
.wordmark.nx .nx-lockup { display: block; height: 1.45em; width: auto; overflow: visible; }
.wordmark.nx .nx-p { opacity: .6; }
:root[data-theme="light"] .wordmark.nx, :root[data-term="classic"] .wordmark.nx { --nx-green: #12A05A; }
.enr .wordmark.nx { color: #F2F1EE; }
:root[data-theme="light"] .enr .wordmark.nx { color: #0B0D0C; }
.qrl-logo.nodex { background: #0B0F0C; padding: 18px; }
/* §44 «Nodex Владелец» — в стиле приложения официанта (.ma), только свои блоки */
.ow-login { display: grid; place-items: center; overflow-y: auto; }
.ow-lg { width: min(360px, 100%); padding: calc(var(--sat) + 24px) 24px calc(var(--sab) + 24px); display: grid; justify-items: center; gap: 10px; text-align: center; }
.ow-mark { width: 64px; height: 64px; border-radius: 16px; background: #0B0F0C; padding: 10px; }
.ow-lg h1 { margin: 6px 0 0; font-size: 24px; letter-spacing: -.02em; }
.ow-sub { margin: 0; color: var(--secondary); }
.ow-dots { display: flex; gap: 12px; height: 18px; align-items: center; margin: 14px 0 2px; }
.ow-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--secondary); }
.ow-dots i.on { background: var(--label); border-color: var(--label); }
.ow-dots.shake { animation: owshake .35s; }
@keyframes owshake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.ow-err { min-height: 20px; margin: 0; color: var(--danger-ink); font-size: 14px; }
.ow-link { appearance: none; border: 0; background: none; color: var(--accent-text); text-decoration: underline; font: inherit; margin-top: 6px; cursor: pointer; }
.ow-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; margin-top: 4px; }
.ow-k { appearance: none; width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--fill); color: var(--label); font-size: 30px; font-weight: 400; cursor: pointer; display: grid; place-items: center; }
.ow-k.fn { background: none; } .ow-k svg { width: 28px; height: 28px; } .ow-k:active { background: var(--seg-on); }
.ow-go { appearance: none; margin-top: 14px; width: 100%; height: 54px; border: 0; border-radius: 27px; background: var(--lime, #2BD47D); color: #04170C; font-size: 17px; font-weight: 700; cursor: pointer; }
.ow-go[disabled] { opacity: .4; }
.ow .ma-main { padding-bottom: calc(var(--sab) + 84px); }
.ow-bell { position: relative; } .ow-bell i { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #FF453A; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ow-hero { display: grid; gap: 2px; padding: 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.ow-hero span { color: var(--secondary); font-size: 14px; } .ow-hero b { font-size: 34px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; } .ow-hero small { color: var(--secondary); font-size: 13px; line-height: 1.45; }
.ow-hero.sm b { font-size: 26px; } .ow-hero.sm { margin-bottom: 10px; }
.ow-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ow-kpi { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); min-width: 0; }
.ow-kpi span { color: var(--secondary); font-size: 13px; } .ow-kpi b { font-size: 22px; font-variant-numeric: tabular-nums; } .ow-kpi small { color: var(--secondary); font-size: 12px; line-height: 1.35; }
.ow-kpi.bad b { color: var(--danger-ink); }
.ow-d { font-weight: 700; } .ow-d.up { color: var(--ok-ink); } .ow-d.down { color: var(--danger-ink); }
.ow-chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding: 12px 10px 22px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); margin-bottom: 10px; }
.ow-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.ow-bar { display: block; width: 100%; min-height: 1px; border-radius: 4px 4px 1px 1px; background: var(--lime, #2BD47D); }
.ow-wk { position: absolute; left: 0; right: 0; height: 2px; background: var(--secondary); opacity: .7; }
.ow-col small { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--secondary); white-space: nowrap; }
.ow-n { flex: none; width: 24px; height: 24px; border-radius: 12px; background: var(--fill); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ow-tb { flex: none; min-width: 40px; height: 36px; padding: 0 6px; border-radius: 10px; background: var(--lime, #2BD47D); color: #04170C; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.ow-r { display: grid; justify-items: end; gap: 2px; } .ow-r small, .ma-num.neg, .ow small.neg { color: var(--danger-ink); } .ow small.pos { color: var(--ok-ink); }
.ow-pad-x { padding: 0 16px; display: grid; gap: 10px; margin-bottom: 4px; }
.ow-seg { --n: 5; } .ow-seg button { font-size: 12px; }
.ow-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.ow-chips button { appearance: none; flex: none; height: 32px; padding: 0 14px; border-radius: 16px; border: 0; background: var(--fill); color: var(--label); font-size: 14px; font-weight: 500; cursor: pointer; }
.ow-chips button[aria-pressed="true"] { background: var(--label); color: var(--bg); }
.ow .ma-li .ma-li-t small { display: block; color: var(--secondary); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.ow-alert { box-shadow: inset 3px 0 0 #FF9F0A; }
.ow-tabs button span { font-size: 10px; }
.ow-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); padding-left: 6px; padding-right: 6px; }
.ow-tabs button[aria-current="page"] { color: var(--label); }
.tm-owner-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; } .tm-owner-row .field { min-width: 220px; } .qr-for { margin: 0 0 6px; text-align: center; }
.iw-ic.off { opacity: .4; }
.ow .ow-kpi b.pos { color: var(--ok-ink); }
/* §42 одинаковые PIN — янтарное предупреждение (Доступ, панель владельца) */
.pin-dup { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 159, 10, .14); color: #7A4B00; font-weight: 600; line-height: 1.45; }
:root[data-theme="dark"] .pin-dup { color: #FFC266; }
.pin-dup-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #FF9F0A; color: #1A1000; display: grid; place-items: center; font-weight: 800; }
.pin-dup-u { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.ow-src { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 55%; } .ow-src i { font-style: normal; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 10px; background: var(--fill); color: var(--secondary); white-space: nowrap; }
/* «Дизайн» Классика / Mono — только раскладка новых элементов (оформление Mono — css/mono.css дизайнера) */
.ui-pick { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ui-pick-sel { min-height: 32px; border-radius: 8px; padding: 0 8px; font: inherit; color: inherit; background: transparent; border: 1px solid rgba(120, 120, 128, .35); max-width: 100%; }
.nav-ui { margin-top: 8px; justify-content: space-between; }
.ma-ui-pick { padding: 0 16px; justify-content: space-between; font-size: 15px; }
.ma-ui-pick .ui-pick-sel { min-height: 40px; background: var(--card); border-color: var(--hair); }
.ui-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.ui-card { position: relative; display: grid; gap: 4px; padding: 10px; border-radius: 14px; border: 1.5px solid rgba(120, 120, 128, .25); cursor: pointer; }
.ui-card:has(input:checked) { border-color: currentColor; }
.ui-card input { position: absolute; opacity: 0; }
.ui-card:has(input:focus-visible) { outline: 2px solid #0A84FF; outline-offset: 2px; }
.ui-card small { opacity: .7; }
.ui-prev { display: grid; grid-template-columns: 1fr 2fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 70px; padding: 6px; border-radius: 9px; }
.ui-prev i { border-radius: 5px; } .ui-prev i:first-child { grid-row: span 2; }
.ui-prev-classic { background: #ECEEF0; } .ui-prev-classic i { background: #fff; } .ui-prev-classic i:first-child { background: #0F7B6C; }
.ui-prev-mono { background: #fff; border: 1px solid #000; } .ui-prev-mono i { background: #000; } .ui-prev-mono i:nth-child(2) { background: #fff; border: 1px solid #000; }
/* ---------- Bento (bentogrids.com): «Главная» владельца и «Панель владельца» ----------
   Хуки: .bento (сетка) · .bento-tile (плитка) · .bento-xl (2×2, выручка) · .bento-m (средняя) · .bento-s (малая) ·
   .bento-wide (во всю ширину, график) · .bento-top (2 колонки, топ-3) · .bento-l (подпись) · .bento-v (число) · .bento-big ·
   .bento-sub (подстрочник) · .bento-spark/.bento-sparksvg (спарклайн) · .bento-list (топ) · .bento-tap (плитка-кнопка).
   Цвета — токены --bento-*, чтобы mono.css мог перекрасить. 4 колонки на широком экране, 2 — на телефоне; без дыр (grid-auto-flow: dense). */
.bento { --bento-gap: 12px; --bento-radius: 18px; --bento-bg: var(--card, #fff); --bento-ink: inherit; --bento-muted: var(--secondary, #6C6C70); --bento-accent: #2BD47D;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row dense; gap: var(--bento-gap); margin-bottom: 16px; }
.bento-tile { appearance: none; border: 0; font: inherit; text-align: left; color: var(--bento-ink); min-width: 0; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--bento-radius); background: var(--bento-bg); box-shadow: var(--shadow, 0 1px 2px rgba(0, 0, 0, .05)); }
.bento-tap { cursor: pointer; }
.bento-xl { grid-column: span 2; grid-row: span 2; }
.bento-m, .bento-s { grid-column: span 1; }
.bento-wide { grid-column: 1 / -1; }
.bento-top { grid-column: span 2; }
.bento-l { font-size: 13px; color: var(--bento-muted); }
.bento-v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.bento-xl .bento-v, .bento-big { font-size: 40px; }
.bento-sub { font-size: 12px; color: var(--bento-muted); line-height: 1.35; }
.bento-spark { margin-top: auto; height: 56px; color: var(--bento-accent); }
.bento-sparksvg { width: 100%; height: 100%; display: block; }
.bento-list { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.bento-list li { display: flex; justify-content: space-between; gap: 8px; } .bento-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bento-wide .ow-chart { margin: 4px 0 0; box-shadow: none; padding-left: 0; padding-right: 0; background: none; }
.bento .own-chart { min-height: 160px; }
:root[data-area="office"] .bento { --bento-bg: rgba(255, 255, 255, .78); --bento-accent: #0F7B6C; }
:root[data-area="office"][data-theme="dark"] .bento { --bento-bg: #1C1C1E; --bento-accent: #2BD47D; }
@media (max-width: 760px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-xl, .bento-top, .bento-wide { grid-column: 1 / -1; grid-row: auto; }
  .bento-v { font-size: 22px; } .bento-xl .bento-v, .bento-big { font-size: 34px; }
}
/* в приложении владельца колонка узкая (телефон) — всегда 2 колонки */
.ow .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ow .bento-xl, .ow .bento-top, .ow .bento-wide { grid-column: 1 / -1; grid-row: auto; }
.ow .bento .bento-v { font-size: 22px; } .ow .bento .bento-xl .bento-v { font-size: 34px; }
:root[data-area="office"] #own-body > .bento { grid-column: 1 / -1; margin: 0; }
.nav-ui .ui-pick-sel { flex: 1 1 auto; min-width: 0; }
/* ---------- §49 ИИ-помощник: заказы из чатов (касса), «Сообщения», настройки ---------- */
.chat-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; margin-right: 6px; vertical-align: -5px; flex: none; color: #fff; }
.chat-ic svg { width: 15px; height: 15px; }
.chat-whatsapp { background: #25D366; } .chat-telegram { background: #229ED9; }
.ct-dept .chat-pend { background: #FF453A; color: #fff; animation: mo-pop 600ms var(--mo-ease, ease) 2; }
.chat-sub { color: #FF9F0A; }
.chat-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 18px; }
.chat-new { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: #26262A; color: #F2F2F7; box-shadow: inset 0 0 0 2px #FF9F0A; }
:root[data-term="classic"] .chat-new { background: #fff; color: #1C1C1E; }
.chat-new-h { display: flex; align-items: center; gap: 6px; } .chat-new-h b { font-size: 17px; }
.chat-new-n { opacity: .7; } .chat-new-sum { margin-left: auto; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chat-new-d { margin: 0; display: grid; gap: 4px; font-size: 14px; }
.chat-new-d div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; } .chat-new-d dt { opacity: .65; } .chat-new-d dd { margin: 0; overflow-wrap: anywhere; }
.chat-new-d a { color: inherit; }
.chat-new-acts { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.chat-new-acts .btn { min-height: 52px; font-size: 17px; font-weight: 700; }
.chat-yes { background: #2BD47D !important; color: #04170C !important; border-color: transparent !important; }
/* «Сообщения» */
.msg { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; min-height: calc(100vh - 220px); }
.msg-side, .msg-chat { min-width: 0; border-radius: 16px; background: var(--card, var(--surface)); color: var(--ink, inherit); box-shadow: var(--card-shadow, 0 1px 2px rgba(0, 0, 0, .05)); }
/* 29.10 тёмная тема бэк-офиса: --card не задан — панели брали светло-серый запасной цвет */
:root[data-theme="dark"] .msg-side, :root[data-theme="dark"] .msg-chat { background: var(--surface); }
:root[data-theme="dark"] .msg-b.from-bot { background: rgba(10, 132, 255, .22); }
.msg-side { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.msg-q { width: 100%; }
.msg-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 2px; align-content: start; }
.msg-row { appearance: none; width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 12px; cursor: pointer; position: relative; }
.msg-row:hover, .msg-row.on { background: rgba(120, 120, 128, .12); }
.msg-row.human { box-shadow: inset 3px 0 0 #FF9F0A; }
.msg-row-b { display: grid; gap: 2px; min-width: 0; flex: 1; }
.msg-row-t { display: flex; justify-content: space-between; gap: 8px; } .msg-row-t time { font-size: 12px; opacity: .6; white-space: nowrap; }
.msg-row-m { font-size: 13px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-row-f { display: flex; flex-wrap: wrap; gap: 4px; } .msg-row-f:empty { display: none; }
.msg-unread { position: absolute; right: 10px; bottom: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #FF453A; color: #fff; font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.msg-chat { display: flex; flex-direction: column; min-height: 420px; overflow: hidden; }
.msg-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(120, 120, 128, .2); flex-wrap: wrap; }
.msg-head-t { display: grid; flex: 1; min-width: 0; } .msg-head-t small { opacity: .65; }
.msg-back { display: none; }
.msg-flag { margin: 0; padding: 8px 14px; background: rgba(255, 159, 10, .14); font-size: 13px; font-weight: 600; }
.msg-bubbles { list-style: none; margin: 0; padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 200px; }
.msg-b { max-width: 78%; padding: 8px 12px; border-radius: 16px; background: rgba(120, 120, 128, .14); align-self: flex-start; }
.msg-b p { margin: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; } .msg-b time, .msg-who { font-size: 11px; opacity: .6; }
.msg-b.from-bot { background: rgba(10, 132, 255, .12); }
.msg-b.from-staff { align-self: flex-end; background: #0F7B6C; color: #fff; } .msg-b.from-staff .msg-who, .msg-b.from-staff time { opacity: .8; }
.msg-reply { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(120, 120, 128, .2); align-items: flex-end; }
.msg-reply .input { flex: 1; min-width: 0; resize: vertical; }
.msg-empty { padding: 16px; opacity: .65; text-align: center; list-style: none; }
@media (max-width: 760px) {
  .msg { grid-template-columns: 1fr; min-height: 0; }
  .msg.has-chat .msg-side { display: none; } .msg:not(.has-chat) .msg-chat { display: none; }
  .msg-back { display: inline-flex; } .msg-b { max-width: 88%; }
}
/* Настройки → ИИ-помощник */
.ai-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; } .ai-head h2 { margin: 0 0 4px; }
.ai-on { flex: none; font-weight: 600; }
.ai-panel .fs { margin: 14px 0 0; } .ai-panel legend { display: flex; align-items: center; font-weight: 600; }
.ai-line { margin: 6px 0 0; } .ai-st { font-size: 13px; font-weight: 600; } .ai-st.ok { color: #248A3D; } .ai-st.bad { color: #C93400; }
.ai-save { margin-top: 14px; }
.ai-test { margin-top: 18px; border-radius: 14px; border: 1px solid rgba(120, 120, 128, .25); overflow: hidden; }
.ai-test h3, .ai-test > p { margin: 0; padding: 10px 14px 0; }
.ai-bubbles { max-height: 320px; min-height: 120px; }
.ai-cart { font-size: 12px; font-weight: 600; opacity: .85; }
.chat-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: auto; border-radius: 9px; background: #FF453A; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; }
.ai-wait { margin: 6px 14px 0; font-weight: 600; color: #C77700; }
/* «Сообщения»: высота по окну — прокручиваются список и переписка внутри, страница не уезжает под плавающую шапку */
.msg { height: calc(100dvh - 210px); min-height: 420px; }
.msg-side, .msg-chat { min-height: 0; }
.msg-side { overflow: hidden; }
.msg-list { flex: 1; min-height: 0; }
.msg-bubbles { min-height: 0; }
@media (max-width: 760px) { .msg { height: calc(100dvh - 190px); min-height: 360px; } }

/* §52 Доступ → Устройства */
.dev-venue-h { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.dev-venue-f { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; margin: 12px 0 8px; }
.dev-venue-f > div:last-child, .dev-venue-out { grid-column: 1 / -1; }
.dev-acts { white-space: nowrap; text-align: right; }
@media (max-width: 760px) { .dev-venue-f { grid-template-columns: 1fr; } .dev-venue-h { flex-direction: column; } }

/* 29.10 Настройки → Telegram: «Что присылать» — каждый переключатель на своей строке */
.tg-what { display: grid; gap: 10px; justify-items: start; }
.tg-what .check { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
/* §52 высокая карточка «Первая настройка» на экранах до 820 px — подпись внизу не наезжает на карточку */
@media (max-height: 820px) { .lw:has(.lw-venue) .lw-foot { display: none; } }
/* QA C-6: на телефоне вызов гостя не закрывает «Назад / Домой» и поиск — плашка внизу слева, над нижними вкладками
   (справа остаётся место для кнопки «Новый счёт») */
@media (max-width: 600px) {
  .calls-pill { top: auto; bottom: calc(92px + env(safe-area-inset-bottom)); left: 12px; transform: none; max-width: calc(100vw - 120px); animation-name: calls-in-m;
    white-space: normal; text-overflow: clip; text-align: left; line-height: 1.25; padding: 8px 14px; } /* QA2: текст «зовёт официанта» не обрезается */
  @keyframes calls-in-m { from { transform: translateY(20px); opacity: 0; } }
}

/* QA: тост не закрывает кнопки окна — при открытом окне тосты сверху по центру */
body:has(dialog[open]) .toasts { top: calc(16px + env(safe-area-inset-top)); bottom: auto; right: 50%; transform: translateX(50%); }
