/* Админ-панель Giotto. Цвета и компоновка по макетам ТЗ: тёмно-синяя боковая панель, светлая рабочая область,
   карточки со скруглениями, выезжающие справа окна редактирования. */
:root {
  /* фирменный синий — цвет логотипа #252958 и шкала в его тоне (решение владельца 28.10.2026; giotto/docs/DESIGN-SYSTEM.md) */
  --navy: #1B1E43;
  --navy-2: #3F4588;
  --brand: #252958;
  --blue: #3F4588;
  --blue-600: #252958;
  --bg: #F3F6FA;
  --card: #fff;
  --line: #DCE4EE;
  --line-2: #E8EEF5;
  --text: #0F2740;
  --muted: #536E8D;
  --green: #0E9F55;
  --green-bg: #E3F6EB;
  --red: #E00018;
  --red-bg: #FDEAEA;
  --red-solid: #E00018;       /* заливка опасных кнопок и счётчика уведомлений */
  --amber: #A66A00;
  --amber-bg: #FFF1CF;
  --gray-bg: #EEF2F7;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(37, 41, 88, .08);
  color-scheme: light;
  /* семантические цвета: в тёмной теме переопределяются в конце файла */
  --surface: #fff;            /* карточки, таблицы, окна */
  --surface-2: #FAFCFE;       /* заголовок таблицы, лёгкие подложки */
  --hover: #FAFCFF;           /* строка таблицы при наведении */
  --field: #fff;              /* поля ввода */
  --active-bg: #ECEFFC;       /* выбранный пункт меню */
  --btn-bg: #252958;          /* основная кнопка: цвет логотипа, наведение — шаг 800 */
  --btn-bg-hover: #1B1E43;
  --seg-on: #252958;          /* выбранный сегмент переключателя */
  --focus-ring: rgba(63, 69, 136, .18);
  --chip-blue-bg: #ECEFFC;
  --chip-blue-fg: #3F4588;
  --chip-purple-bg: #EFEAFE;
  --chip-purple-fg: #5B3FC4;
  --check-on-bg: #ECEFFC;
  --toggle-off: #C5D2E2;
  --drag: #9AB0C9;
  --danger-line: #F3C2C8;
  --info-bg: #ECEFFC;
  --info-fg: #252958;
  --info-line: #BAC2E8;
  --warn-fg: #6B4E00;
  --warn-line: #F1D68B;
  --err-fg: #8E0012;
  --err-line: #F4B7BF;
  --drop-bg: #F7F9FF;
  --drop-hover: #ECEFFC;
  --drop-line: #BAC2E8;
  --avatar-lg: #252958;
  --overlay: rgba(19, 22, 51, .45);
  --shadow-pop: 0 16px 40px rgba(27, 30, 67, .18);
  --shadow-drawer: -16px 0 40px rgba(27, 30, 67, .2);
  --toast-bg: #0F2740;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: var(--blue); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1 1 auto; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.sp { height: 14px; }
.mt { margin-top: 16px; }

/* ---- каркас ----------------------------------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px 14px; }
.brand { padding: 4px 10px 22px; }
/* логотип — файлы giotto/brand (28.10.2026): белый на тёмно-синей боковой панели, двухцветный на светлом; не перекрашивать */
.brand__logo { display: block; height: 38px; width: auto; }
.brand__tag { margin-top: 4px; font-size: 9px; letter-spacing: .32em; text-transform: uppercase; opacity: .7; padding-left: 2px; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; overflow: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #E7F0FF; font-weight: 500; transition: background .15s; }
.nav a:hover { background: rgba(255, 255, 255, .08); }
.nav a.active { background: var(--navy-2); color: #fff; }
.nav__sep { height: 1px; background: rgba(255, 255, 255, .12); margin: 10px 8px; }
.userbox { position: relative; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 8px; padding-top: 12px; }
.userbtn { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #fff; padding: 8px; border-radius: 10px; text-align: left; }
.userbtn:hover { background: rgba(255, 255, 255, .08); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #5D7897; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: 0 0 auto; }
.avatar--lg { width: 42px; height: 42px; background: var(--avatar-lg); color: #fff; }
.userbtn .grow { min-width: 0; }
.userbtn .grow > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { position: absolute; z-index: 60; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); min-width: 210px; padding: 6px; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0; background: none; border-radius: 8px; color: var(--text); text-align: left; }
.menu button:hover, .menu a:hover { background: var(--bg); }
.userbox .menu { bottom: 62px; left: 4px; right: 4px; }

.main { padding: 22px 30px 60px; min-width: 0; }
.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.pagehead h1 { font-size: 28px; font-weight: 800; color: var(--brand); letter-spacing: -.015em; }
.pagehead p { color: var(--muted); margin-top: 4px; }
.head-tools { display: flex; align-items: center; gap: 12px; }
.branch { position: relative; }
.branch__btn { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 210px; font-weight: 500; color: var(--brand); }
.branch__btn .grow { text-align: left; }
.branch .menu { top: 48px; right: 0; min-width: 260px; max-height: 60vh; overflow: auto; }
.menu button.active { background: var(--active-bg); font-weight: 600; }
.bell { position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand); }
.bell__dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red-solid); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.notes { width: 380px; max-height: 70vh; overflow: auto; right: 0; top: 50px; padding: 8px; }
.note { display: flex; gap: 10px; padding: 10px; border-radius: 10px; }
.note + .note { border-top: 1px solid var(--line-2); }
.note__icon { flex: 0 0 auto; margin-top: 2px; }
.note--error .note__icon { color: var(--red); }
.note--warning .note__icon { color: var(--amber); }

/* ---- общие элементы -------------------------------------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card__title { font-size: 16px; font-weight: 700; color: var(--brand); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; background: var(--btn-bg); color: #fff; font-weight: 600; transition: background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--btn-bg-hover); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn--ghost { background: var(--surface); color: var(--brand); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg); }
.btn--danger { background: var(--surface); color: var(--red); border-color: var(--danger-line); }
.btn--danger:hover { background: var(--red-bg); }
.btn--sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn--icon { padding: 8px; width: 34px; height: 34px; }
.iconbtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; color: var(--brand); }
.iconbtn:hover { background: var(--bg); }
.iconbtn--danger { color: var(--red); }
.iconbtn[disabled] { opacity: .45; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gray-bg); color: var(--muted); white-space: nowrap; }
.chip--green { background: var(--green-bg); color: var(--green); }
.chip--red { background: var(--red-bg); color: var(--red); }
.chip--stop { background: var(--muted); color: var(--surface); } /* «закончилось»: стоп-лист серый — это не ошибка (DESIGN-SYSTEM); 5,3:1 и 6,4:1 в тёмной теме */
.chip--amber { background: var(--amber-bg); color: var(--amber); }
.chip--blue { background: var(--chip-blue-bg); color: var(--chip-blue-fg); }
.chip--purple { background: var(--chip-purple-bg); color: var(--chip-purple-fg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status--green { color: var(--green); } .status--red { color: var(--red); } .status--amber { color: var(--amber); } .status--gray { color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--brand); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--red); }
.input, .select, .textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.textarea { min-height: 84px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235D7897' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
.input[disabled], .select[disabled], .textarea[disabled] { background: var(--bg); color: var(--muted); }
.input--search { padding-left: 38px; background: var(--field); }
.searchbox { position: relative; flex: 1 1 260px; min-width: 200px; }
.searchbox > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.diet-label { display: inline-flex; align-items: center; gap: 6px; }
.diet-icons { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; color: var(--brand); }
.menu.icon-grid { display: grid; grid-template-columns: repeat(5, 38px); gap: 4px; min-width: 0; }
.menu.icon-grid button { width: 38px; height: 38px; padding: 0; justify-content: center; color: var(--brand); }
.menu.icon-grid button.on { background: var(--active-bg); }
.icon-pick { color: var(--brand); }
.diet-tbl td { vertical-align: middle; }
.diet-tbl .input { min-width: 120px; }
.diet-wrap { overflow-x: auto; } /* сетка значков открывается поверх страницы (position: fixed) — прокрутка таблицы её не обрезает */
@media (max-width: 760px) { .diet-tbl .input { min-width: 90px; } }
/* экран приветствия планшета: превью 3:5 */
.welcome-thumb { width: 120px; aspect-ratio: 3 / 5; border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); flex: 0 0 auto; }
.welcome-thumb img, .welcome-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.welcome-thumb--sm { width: 54px; border-radius: 8px; }
.welcome-thumb--none { display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); font-size: 11px; text-align: center; padding: 4px; }
.welcome-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.welcome-item { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; user-select: none; }
.check input { accent-color: var(--blue); margin: 0; }
.check.on { border-color: var(--blue); background: var(--check-on-bg); }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle__track { width: 40px; height: 22px; border-radius: 11px; background: var(--toggle-off); position: relative; transition: background .15s; flex: 0 0 auto; }
.toggle__track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.toggle input:checked + .toggle__track { background: var(--btn-bg); }
.toggle input:checked + .toggle__track::after { transform: translateX(18px); }
.seg { display: inline-flex; background: var(--gray-bg); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 16px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--seg-on); color: #fff; }
.seg button .dot { margin-left: 6px; color: var(--amber); }

/* ---- таблицы -------------------------------------------------------------------------------------------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .select { width: auto; min-width: 190px; }
.tablewrap { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--brand); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tr.dim td { opacity: .55; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .acts { display: flex; gap: 6px; justify-content: flex-end; }
.tbl .name { font-weight: 600; color: var(--brand); }
.tbl .sub { font-size: 12px; color: var(--muted); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb { width: 56px; height: 42px; border-radius: 8px; overflow: hidden; background: var(--gray-bg); flex: 0 0 auto; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb--sm { width: 40px; height: 32px; border-radius: 6px; }
.thumb--lg { width: 96px; height: 72px; }
.thumb--empty { display: grid; place-items: center; color: var(--muted); } /* нет фото: позиция iiko не связана с блюдом или у блюда нет фото */
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-top: 1px solid var(--line-2); }
.pager .pages { display: flex; gap: 6px; }
.pager .pages button { min-width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; color: var(--brand); }
.pager .pages button.on { background: var(--btn-bg); border-color: var(--btn-bg); color: #fff; }
.drag { cursor: grab; color: var(--drag); display: inline-grid; place-items: center; }
tr.dragging, .li.dragging { opacity: .4; }
tr.over td, .li.over { box-shadow: inset 0 2px 0 var(--blue); }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--brand); font-size: 16px; margin-bottom: 6px; }

/* ---- боковое окно, модальное окно, уведомления ----------------------------------------------------------------- */
.backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 80; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 81; box-shadow: var(--shadow-drawer); display: flex; flex-direction: column; animation: slide .2s ease-out; }
.drawer--wide { width: min(760px, 100vw); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 8px; }
.drawer__head h2 { font-size: 20px; color: var(--brand); }
.drawer__body { padding: 8px 22px 20px; overflow: auto; flex: 1 1 auto; }
.drawer__foot { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface); }
.tabs { display: flex; gap: 22px; padding: 0 22px; border-bottom: 1px solid var(--line-2); }
.tabs button { border: 0; background: none; padding: 12px 0; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--blue); border-bottom-color: var(--blue); }
.modal { position: fixed; z-index: 90; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, 94vw); max-height: 90vh; overflow: auto; background: var(--surface); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 24, 52, .3); padding: 22px; animation: pop .15s ease-out; }
.modal--wide { width: min(760px, 94vw); }
.modal--xl { width: min(1100px, 96vw); }
.modal--xl .tbl select.input { width: 100%; min-width: 220px; }
.modal h2 { font-size: 19px; color: var(--brand); margin-bottom: 10px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--toast-bg); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); min-width: 260px; max-width: 420px; display: flex; gap: 10px; align-items: flex-start; animation: pop .15s ease-out; }
.toast--ok { background: #0B6B3A; } .toast--err { background: #A8001A; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: translate(-50%, -48%) scale(.98); opacity: 0; } to { opacity: 1; } }
.toast { animation: fade .15s; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 60px; text-align: center; color: var(--muted); }

/* ---- главная ------------------------------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi { padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.kpi__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.kpi__icon--green { background: var(--green-bg); color: var(--green); }
.kpi__icon--blue { background: var(--chip-blue-bg); color: var(--blue); }
.kpi__icon--red { background: var(--red-bg); color: var(--red); }
.kpi__icon--purple { background: var(--chip-purple-bg); color: var(--chip-purple-fg); }
.kpi__label { font-size: 13px; font-weight: 600; color: var(--brand); }
.kpi__value { font-size: 28px; font-weight: 800; color: var(--brand); line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi__sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.progress { height: 8px; border-radius: 4px; background: var(--gray-bg); overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: #12B76A; border-radius: 4px; }
.two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.two--side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; }
.stat__label { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.stat__value { font-size: 28px; font-weight: 800; color: var(--brand); margin-top: 6px; font-variant-numeric: tabular-nums; }
.delta { font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.delta--up { color: var(--green); } .delta--down { color: var(--red); }
.rank { list-style: none; margin: 6px 0 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.rank .n { width: 20px; height: 20px; border-radius: 50%; background: var(--gray-bg); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.rank .v { margin-left: auto; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 4px; background: var(--blue); opacity: .85; }
.bars { flex: 1; background: var(--gray-bg); border-radius: 4px; height: 8px; overflow: hidden; }
.recent { display: flex; flex-direction: column; }
.recent .li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.recent .li:last-child { border: 0; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; background: var(--amber-bg); color: var(--warn-fg); border: 1px solid var(--warn-line); }
.banner--red { background: var(--red-bg); color: var(--err-fg); border-color: var(--err-line); }
.banner--blue { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-line); }
.overview th, .overview td { white-space: nowrap; }

/* ---- меню заведения: панель публикации -------------------------------------------------------------------------- */
.publish { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; }
.publish__info { flex: 1 1 280px; }
.publish__ver { font-weight: 700; color: var(--brand); }
.li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); margin-bottom: 8px; }
.li .name { font-weight: 600; color: var(--brand); }
.drop { border: 2px dashed var(--drop-line); background: var(--drop-bg); border-radius: 12px; padding: 22px; text-align: center; color: var(--blue); cursor: pointer; }
.drop:hover, .drop.over { background: var(--drop-hover); }
.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.gal { position: relative; width: 112px; height: 84px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--gray-bg); cursor: grab; }
.gal.main { border-color: var(--blue); }
.gal img { width: 100%; height: 100%; object-fit: cover; }
.gal button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; border: 0; display: grid; place-items: center; }
.gal .tag { position: absolute; left: 4px; bottom: 4px; background: var(--btn-bg); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.inherit { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.override-mark { color: var(--amber); font-weight: 600; }
.code { font: 700 34px 'Inter', monospace; letter-spacing: .16em; color: var(--brand); text-align: center; padding: 16px; background: var(--bg); border-radius: 14px; }
/* коды привязки нескольких планшетов сразу: название слева, код справа, крупно и моноширинно — их переписывают на планшеты */
.codes { max-height: 46vh; overflow: auto; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.codes__row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line-2); }
.codes__row:last-child { border-bottom: 0; }
.codes__code { font: 700 20px 'Inter', monospace; letter-spacing: .12em; color: var(--brand); }
/* «Планшеты» в списке филиалов — ссылка сразу на вкладку планшетов */
.tablets-link { color: inherit; text-decoration: none; white-space: nowrap; }
.tablets-link:hover { color: var(--brand); text-decoration: underline; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #252958, #131633); padding: 20px; }
.login__card { width: min(420px, 100%); background: var(--surface); border-radius: 18px; padding: 32px; box-shadow: 0 30px 70px rgba(0, 10, 30, .4); }
.login__logo { display: flex; justify-content: center; margin-bottom: 4px; }
.login__logo img { display: block; height: 52px; width: auto; }
.login__logo--sm img { height: 40px; }
.logo-on-dark { display: none !important; }
:root[data-theme="dark"] .logo-on-light { display: none !important; }
:root[data-theme="dark"] .logo-on-dark { display: block !important; }
.login__tag { text-align: center; font-size: 10px; letter-spacing: .32em; color: var(--muted); margin: 4px 0 22px; text-transform: uppercase; }
.login .err-box { background: var(--red-bg); color: var(--red); padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; }
.demo-hint { margin-top: 16px; padding: 12px; background: var(--bg); border-radius: 10px; font-size: 12.5px; color: var(--muted); }
.demo-hint button { border: 0; background: none; color: var(--blue); padding: 0; text-decoration: underline; }

@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .two, .two--side { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .main { padding: 16px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---- дополнения ------------------------------------------------------------------------------------------ */
.btn--red { background: var(--red-solid); border-color: var(--red-solid); }
.btn--red:hover { background: #B80014; }
.menu a.active, .menu button.active { background: var(--active-bg); font-weight: 600; }
.name .chip { vertical-align: middle; margin-left: 4px; }
.tbl td .row.wrap { align-items: center; }
.li.over { box-shadow: inset 0 2px 0 var(--blue); }
code { background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.drawer__body .banner { margin-bottom: 12px; }
.tablewrap .tbl .acts { flex-wrap: nowrap; }

.tbl th.wrap { white-space: normal; line-height: 1.25; }
.tbl .sub { max-width: 260px; }

.demo-sim { margin-bottom: 14px; border: 1px dashed var(--drop-line); background: var(--drop-bg); }
.themebtn { cursor: pointer; }

/* ---- тёмная тема ------------------------------------------------------------------------------------------------------------------
   Переключатель — кнопка с луной/солнцем справа вверху; выбор хранится в браузере. Фирменный синий на тёмном фоне заменён более
   ярким, заливки и подсказки переведены на полупрозрачные цвета, фотографии не меняются. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --navy: #060F1D;
  --navy-2: #2D3263;
  --brand: #D4D9F2;
  --blue: #909AD6;
  --blue-600: #BAC2E8;
  --bg: #0A1424;
  --card: #111F35;
  --line: #2A3F5C;
  --line-2: #1E3250;
  --text: #E4ECF7;
  --muted: #8DA4C3;
  --green: #4AD991;
  --green-bg: rgba(34, 197, 94, .16);
  --red: #FF6B7D;
  --red-bg: rgba(255, 80, 100, .16);
  --red-solid: #D92D43;
  --amber: #FFC24D;
  --amber-bg: rgba(255, 184, 0, .15);
  --gray-bg: #182B45;
  --shadow: 0 6px 18px rgba(0, 0, 0, .35);
  --surface: #111F35;
  --surface-2: #0E1A2E;
  --hover: #162A45;
  --field: #0D192B;
  --active-bg: #262B55;
  --btn-bg: #6069B9;
  --btn-bg-hover: #6F78C8;
  --seg-on: #6069B9;
  --focus-ring: rgba(144, 154, 214, .3);
  --chip-blue-bg: rgba(96, 105, 185, .24);
  --chip-blue-fg: #BAC2E8;
  --chip-purple-bg: rgba(160, 130, 255, .18);
  --chip-purple-fg: #C2B1FF;
  --check-on-bg: rgba(96, 105, 185, .18);
  --toggle-off: #3A5372;
  --drag: #6F89AB;
  --danger-line: rgba(255, 107, 125, .45);
  --info-bg: rgba(96, 105, 185, .16);
  --info-fg: #D4D9F2;
  --info-line: rgba(144, 154, 214, .38);
  --warn-fg: #FFD98A;
  --warn-line: rgba(255, 194, 77, .35);
  --err-fg: #FFB5BF;
  --err-line: rgba(255, 107, 125, .4);
  --drop-bg: rgba(96, 105, 185, .08);
  --drop-hover: rgba(96, 105, 185, .15);
  --drop-line: #4A5190;
  --avatar-lg: #3F4588;
  --overlay: rgba(0, 6, 16, .66);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, .55);
  --shadow-drawer: -16px 0 40px rgba(0, 0, 0, .5);
  --toast-bg: #1D3556;
}
:root[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238DA4C3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .tbl tr.dim td { opacity: .5; }
:root[data-theme="dark"] .login { background: linear-gradient(160deg, #0E1027, #252958); }
:root[data-theme="dark"] .toast { border: 1px solid var(--line); }

/* ---- аналитика гостей: время суток, клики, планшеты ------------------------------------------------------------------------------ */
.reloading { opacity: .55; transition: opacity .2s; pointer-events: none; }  /* пока данные обновляются, прежний вид остаётся на месте */
.rank--tall li { align-items: center; padding: 7px 0; }
.rank--tall .rank__text { flex: 0 1 44%; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rank--tall .rank__name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank--tall .rank__sub { font-size: 11.5px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank--tall .bars { flex: 1 1 60px; min-width: 40px; }
.rank--tall .v { min-width: 44px; text-align: right; margin-left: 0; font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--blue) 14%, var(--surface)); overflow: hidden; margin-bottom: 8px; }
.meter > div { height: 100%; border-radius: 3px; background: var(--blue); }
.two--clicks { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.two--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.srow { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.srow > span:first-child { flex: 0 0 44%; min-width: 0; }
.srow .bars { flex: 1 1 60px; }
.srow b { min-width: 44px; text-align: right; color: var(--brand); font-variant-numeric: tabular-nums; }
.srow .muted { min-width: 46px; text-align: right; }
.tbl tfoot td { border-top: 1px solid var(--line); border-bottom: 0; background: var(--surface-2); }
.tbl td.heat { min-width: 66px; }
.tbl td.heat--peak { font-weight: 700; }

.dpgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 1500px) { .dpgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .dpgrid { grid-template-columns: minmax(0, 1fr); } }
.dp__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dp__title { font-size: 20px; font-weight: 800; color: var(--brand); }
.dp__nums { margin: 6px 0 10px; font-size: 13px; }
.dp__nums b { font-size: 26px; font-weight: 800; color: var(--brand); margin-right: 4px; font-variant-numeric: tabular-nums; }
.dp__lift { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }

/* столбчатая диаграмма по часам: один цвет, столбцы не толще 24px, закругление только сверху, тонкие сплошные линии шкалы */
.hchart { --h: 230px; position: relative; padding: 18px 0 0 40px; }
.hchart__y { position: absolute; left: 0; top: 18px; height: var(--h); width: 34px; }
.hchart__y span { position: absolute; right: 6px; transform: translateY(50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hchart__plot { position: relative; height: var(--h); display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); }
.hchart__grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line-2); pointer-events: none; }
.hchart__grid:first-child { border-top-color: var(--line); }
.hchart__slot { position: relative; display: flex; align-items: flex-end; justify-content: center; outline: none; border-radius: 6px 6px 0 0; cursor: default; }
.hchart__slot:hover, .hchart__slot:focus-visible { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-2); }
.hchart__bar { display: block; width: calc(100% - 4px); max-width: 24px; min-height: 2px; background: var(--blue); border-radius: 4px 4px 0 0; transition: filter .15s; }
.hchart__slot:hover .hchart__bar, .hchart__slot:focus-visible .hchart__bar { filter: brightness(1.15); }
.hchart__val { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--text); pointer-events: none; white-space: nowrap; }
.hchart__ticks, .hchart__bands { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); margin-top: 6px; }
.hchart__ticks { font-size: 10.5px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.hchart__bands { gap: 2px; margin-top: 4px; }
.hchart__bands span { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); border-top: 2px solid var(--line); padding-top: 4px; }
.ctip { position: fixed; z-index: 90; pointer-events: none; min-width: 170px; background: var(--toast-bg); color: #fff; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; box-shadow: var(--shadow-pop); }
.ctip__title { opacity: .72; margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.ctip__row { display: flex; align-items: center; gap: 7px; padding: 1px 0; }
.ctip__row b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ctip__row span:last-child { opacity: .82; }
.ctip__key { flex: 0 0 auto; width: 10px; height: 3px; border-radius: 2px; background: #7DB2FF; }
@media (max-width: 1280px) { .two--clicks, .two--even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .hchart__ticks span:nth-child(even) { visibility: hidden; } }

/* ---- показатели: плитки, столбцы по дням (в том числе с красной частью для жалоб), легенда -------------------------- */
.kpis--6 { grid-template-columns: repeat(3, 1fr); }
.kpis--4 { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 1600px) { .kpis--6 { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 1280px) { .kpis--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .kpis--6 { grid-template-columns: 1fr 1fr; } }
.dchart { padding-left: 58px; }
.dchart .hchart__y { width: 52px; }
.dchart .hchart__plot, .dchart .hchart__ticks { grid-template-columns: repeat(var(--n, 24), minmax(0, 1fr)); }
.dchart__stack { display: flex; flex-direction: column-reverse; width: calc(100% - 4px); max-width: 28px; min-height: 2px; border-radius: 4px 4px 0 0; overflow: hidden; transition: filter .15s; }
.dchart__stack i { display: block; width: 100%; }
.dchart__stack .is-base { background: var(--blue); }
.dchart__stack .is-bad { background: var(--red); }
.hchart__slot:hover .dchart__stack, .hchart__slot:focus-visible .dchart__stack { filter: brightness(1.15); }
.dchart__tick { display: flex; justify-content: center; white-space: nowrap; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 10px; }
.lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.srow__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.srow__sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

/* Ответ ИИ-аналитика (Markdown) */
.md { line-height: 1.6; font-size: 15px; }
.md h2, .md h3, .md h4, .md h5 { color: var(--brand); margin: 22px 0 8px; line-height: 1.3; }
.md h2 { font-size: 20px; }
.md h3 { font-size: 17px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.md h4 { font-size: 15px; }
.md h5 { font-size: 14px; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 22px; }
.md li { margin-bottom: 7px; }
.md code { background: var(--gray-bg); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.md blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid var(--blue); background: var(--info-bg); border-radius: 0 10px 10px 0; }
.md hr { border: 0; border-top: 1px solid var(--line-2); margin: 16px 0; }

/* ---- отзывы гостей ------------------------------------------------------------------------------------------- */
.navbadge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(255, 255, 255, .18); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.navbadge--red { background: var(--red-solid); }
.rstars { display: inline-flex; gap: 1px; vertical-align: middle; }
.rstar svg { fill: var(--star-off, #D7E0EA); stroke: var(--star-off, #D7E0EA); }
.rstar.on svg { fill: var(--star, #F2B01E); stroke: var(--star, #F2B01E); }
:root { --star: #F2B01E; --star-off: #D7E0EA; }
:root[data-theme="dark"] { --star: #FFC84A; --star-off: rgba(255, 255, 255, .16); }
.tbl tr.clickable { cursor: pointer; }
.tbl td.review-cell { max-width: 420px; white-space: normal; line-height: 1.4; }
.review-text { white-space: pre-wrap; line-height: 1.55; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); margin-bottom: 10px; }
.review-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.review-meta span { display: inline-flex; align-items: center; gap: 5px; }
.review-contact { padding: 12px 14px; margin-bottom: 14px; box-shadow: none; }
.hist { display: flex; flex-direction: column; gap: 6px; }
.hist__row { display: grid; grid-template-columns: 90px 1fr; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.qr-item { align-items: flex-start; }
.qr-item .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 190px; }
.qr-thumb { width: 80px; height: 80px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; flex: 0 0 auto; object-fit: contain; }
.qr-thumb--off { display: grid; place-items: center; color: var(--muted); background: var(--gray-bg); }
.hchart__bar.is-neg, .bar--neg { background: var(--red-solid); }
.stats--6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) { .stats--6 { grid-template-columns: repeat(3, 1fr); } }
/* ---- цвета бейджей («Настройки → Бейджи», решение владельца 29.10.2026): список, палитра, поле HEX и предпросмотр планшета ---------------------- */
.bc { display: grid; grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); gap: 20px; align-items: start; }
.bc-list { display: flex; flex-direction: column; gap: 2px; padding-right: 16px; border-right: 1px solid var(--line-2); }
.bc-list__head { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 12px 0 4px; }
.bc-list__head:first-child { margin-top: 0; }
.bc-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.bc-item:hover { background: var(--hover); }
.bc-item.on { background: var(--active-bg); }
.bc-item__name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-item__state { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bc-edit { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; min-width: 0; }
.bc-edit__main { min-width: 0; }
.bc-edit__side { position: sticky; top: 16px; min-width: 0; }  /* предпросмотр рядом с палитрой: виден, пока выбираешь цвет */
.bc-edit__side .label { display: block; margin: 0 0 8px; }
.bc-edit__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; font-size: 16px; }
.bc-edit .label { display: block; margin: 12px 0 6px; }
.bc-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-preset { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.bc-preset:hover { border-color: var(--blue); }
.bc-preset.on { border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring); }
.bc-preset__dot { display: inline-grid; place-items: center; min-width: 32px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 750; background: var(--badge-bg); color: var(--badge-fg); box-shadow: inset 0 0 0 1px var(--badge-line, transparent); }
.bc-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.bc-edit .bc-row .label { margin: 0; min-width: 120px; }
.bc-hex { display: flex; align-items: center; gap: 8px; }
.bc-hex .input { width: 110px; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.input--bad, .input--bad:focus { border-color: var(--red); }
.bc-picker { width: 46px; height: 38px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); cursor: pointer; }
.bc-palette { margin-top: 8px; }
.bc-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 5px; }
.bc-swatches__name { width: 124px; font-size: 12px; color: var(--muted); }
.bc-sw { width: 24px; height: 24px; padding: 0; border: 1px solid rgba(15, 39, 64, .16); border-radius: 7px; cursor: pointer; transition: transform .12s; }
.bc-sw:hover { transform: scale(1.12); }
.bc-sw.on { outline: 2px solid var(--blue); outline-offset: 2px; }
:root[data-theme="dark"] .bc-sw { border-color: rgba(255, 255, 255, .22); }
.bc-contrast { margin-top: 14px; font-size: 13px; }
.bc-contrast.is-low { color: var(--warn-fg); }
.bc-edit .banner { margin: 10px 0 0; }

/* предпросмотр планшета: цвета тем и размеры — из web/guest/app.css (1rem планшета = var(--u)); обе темы рядом и не зависят от темы панели.
   Свои цвета — те же переменные --badge-bg, --badge-fg, --badge-line, что на планшете (web/shared/badge-colors.js) */
.bcp {
  --u: 14px;
  --t-accent: #252958; --t-on-accent: #fff; --t-card: #fff; --t-ink: #252958; --t-muted: #536E8D; --t-chip: #EEF3F9; --t-line: #E7EDF4;
  --t-promo: #C8102E; --t-chef: #8A5A00; --t-from: #FFFFFF; --t-to: #F3F6FA; --t-ph: #EDF1F6;
  color: var(--t-ink);
}
.bcp--dark {
  --t-accent: #6069B9; --t-card: #0F2748; --t-ink: #EAF2FF; --t-muted: #9DB3CF; --t-chip: rgba(255, 255, 255, .09); --t-line: rgba(255, 255, 255, .08);
  --t-promo: #E5334B; --t-chef: #B8821D; --t-from: #071B37; --t-to: #04142B; --t-ph: #10284A;
}
.bc-preview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.bc-preview .bcp { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--t-from) 0%, var(--t-to) 100%); }
.bcp--bare { display: inline-flex; flex: 0 0 auto; }
.bcp__label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t-muted); margin-bottom: 10px; }
.bcp__card { position: relative; display: flex; flex-direction: column; width: calc(var(--u) * 13.5); max-width: 100%; background: var(--t-card); border: 1px solid var(--t-line); border-radius: calc(var(--u) * 1.15); overflow: hidden; box-shadow: 0 12px 20px -14px rgba(0, 40, 90, .3); }
.bcp--dark .bcp__card { box-shadow: 0 12px 20px -14px rgba(0, 0, 0, .75); }
.bcp__ph { aspect-ratio: 5 / 4; background: var(--t-ph); }
.bcp__ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bcp__body { padding: calc(var(--u) * .8) calc(var(--u) * .9) calc(var(--u) * .9); }
.bcp__name { font-weight: 650; font-size: calc(var(--u) * .93); line-height: 1.27; min-height: 2.54em; color: var(--t-ink); overflow-wrap: break-word; }
.bcp__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding-top: calc(var(--u) * .55); }
.bcp__price { font-weight: 750; font-size: calc(var(--u) * 1.04); white-space: nowrap; }
.bcp__price small { font-size: .64em; font-weight: 650; letter-spacing: .05em; opacity: .62; }
.bcp__weight { color: var(--t-muted); font-size: calc(var(--u) * .74); white-space: nowrap; }
.bcp-badge {
  position: absolute; top: calc(var(--u) * .7); left: calc(var(--u) * .7); z-index: 2; background: var(--badge-bg, var(--t-accent)); color: var(--badge-fg, var(--t-on-accent));
  font-weight: 750; font-size: calc(var(--u) * .7); line-height: normal; letter-spacing: .08em; padding: calc(var(--u) * .4) calc(var(--u) * .8); border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--badge-line, transparent), 0 calc(var(--u) * .3) calc(var(--u) * .8) rgba(0, 20, 60, .28);
}
.bcp-badge--promo { background: var(--badge-bg, var(--t-promo)); color: var(--badge-fg, #fff); }
.bcp-badge--chef { background: var(--badge-bg, var(--t-chef)); color: var(--badge-fg, #fff); }
.bcp-badge--inline { position: static; display: inline-block; font-size: calc(var(--u) * .9); padding: calc(var(--u) * .48) calc(var(--u) * 1.1); box-shadow: inset 0 0 0 1px var(--badge-line, transparent); }
.bcp-diet { position: absolute; top: calc(var(--u) * .7); right: calc(var(--u) * .7); z-index: 2; display: flex; }
.bcp-diet__i {
  box-sizing: border-box; width: calc(var(--u) * 1.9); height: calc(var(--u) * 1.9); border-radius: 50%; display: grid; place-items: center;
  background: var(--badge-bg, var(--t-card)); color: var(--badge-fg, var(--t-ink)); border: 1px solid var(--badge-line, var(--t-line));
}
.bcp-chip {
  display: inline-flex; align-items: center; gap: calc(var(--u) * .45); background: var(--badge-bg, var(--t-chip)); color: var(--badge-fg, var(--t-ink)); font-weight: 650;
  font-size: calc(var(--u) * .9); line-height: 1.1; padding: calc(var(--u) * .45) calc(var(--u) * 1) calc(var(--u) * .45) calc(var(--u) * .8); border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--badge-line, transparent);
}
.bcp__page { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--t-line); }
.bcp__kicker { display: flex; flex-wrap: wrap; gap: 6px; }
.bcp__title { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: calc(var(--u) * 1.5); line-height: 1.1; margin-top: 8px; color: var(--t-ink); overflow-wrap: break-word; }
.bcp--bare .bcp-badge--inline { font-size: 10.5px; padding: 4px 9px; }
.bcp--bare .bcp-diet__i { width: 26px; height: 26px; }
@media (max-width: 1360px) { .bc-edit { grid-template-columns: minmax(0, 1fr); } .bc-edit__side { position: static; } .bc-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .bc { grid-template-columns: minmax(0, 1fr); } .bc-list { padding-right: 0; border-right: 0; } }
@media (max-width: 640px) { .bc-preview { grid-template-columns: minmax(0, 1fr); } }

/* ---- удаление филиала: последствия в диалоге и блок в карточке (красная только сама кнопка) --------------------------- */
.conseq { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.conseq li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.conseq li > .ico { color: var(--muted); margin-top: 2px; }
.removal { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-top: 18px; border: 1px solid var(--line-2); border-radius: 12px; }
@media (max-width: 640px) { .removal { flex-direction: column; align-items: stretch; } }
