:root {
  --bg: #F5F4F9; --card: #fff; --ink: #091027; --muted: #7E7F83; --line: #ECEBF2;
  --ok: #1E9E6A; --warn: #E08A00; --danger: #D8374B; --violet: #5A52D5;
  --shadow: 0 0 14.2px rgba(0,0,0,.05); --r: 20px; --pill: 48px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* layout */
.shell { display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; }
.top {
  display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--bg);
  position: sticky; top: 0; z-index: 20; flex-wrap: wrap;
}
.brand { font-weight: 700; letter-spacing: .04em; font-size: 20px; }
.brand small { font-weight: 400; letter-spacing: 0; color: var(--muted); font-size: 13px; margin-left: 6px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; position: relative; scrollbar-width: none; flex: 1; }
.tabs button { padding: 10px 16px; border-radius: var(--pill); white-space: nowrap; font-weight: 500; font-size: 14px; background: var(--card); box-shadow: var(--shadow); position: relative; }
.tabs button.is-active { background: var(--ink); color: #fff; }
.tabs { padding: 6px 4px; }
.tabs .dot { position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }
.me { display: flex; align-items: center; gap: 10px; font-size: 13px; }
select.sel, input.inp, textarea.inp {
  border: 0; outline: 0; background: var(--card); box-shadow: var(--shadow); border-radius: 14px; padding: 10px 14px; min-width: 0;
}
textarea.inp { width: 100%; min-height: 80px; resize: vertical; }
input.inp:focus, textarea.inp:focus, select.sel:focus { box-shadow: 0 0 0 2px var(--ink); }
.main { padding: 8px 20px 40px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: var(--pill); background: var(--card); box-shadow: var(--shadow); font-weight: 500; white-space: nowrap; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--danger { background: #FDECEE; color: var(--danger); }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); font-size: 18px; font-weight: 600; flex-shrink: 0; }
.icon-btn--dark { background: var(--ink); color: #fff; }

/* cards */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.h2 { font-size: 20px; font-weight: 600; margin: 0 0 14px; }
.h3 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.grid-waiter { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid-waiter { grid-template-columns: 1fr; } }

/* notifications */
.feed { display: flex; flex-direction: column; gap: 8px; max-height: calc(100dvh - 150px); overflow-y: auto; }
.note { display: block; text-align: left; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); border-left: 4px solid transparent; }
.note.is-unread { border-left-color: var(--ink); background: #fff; }
.note:not(.is-unread) { opacity: .6; }
.note__head { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; gap: 8px; }
.note__time { color: var(--muted); font-weight: 400; font-size: 12px; }
.note__body { font-size: 13px; margin-top: 4px; line-height: 1.35; }
.note[data-type="wait_too_long"], .note[data-type="negative_feedback"], .note[data-type="iiko_error"] { border-left-color: var(--danger); }
.note[data-type="call_waiter"], .note[data-type="bill_requested"] { border-left-color: var(--warn); }
.note[data-type="cart_ready"], .note[data-type="reorder_intent"] { border-left-color: var(--violet); }

/* tables */
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.table-card { text-align: left; padding: 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); border: 2px solid transparent; display: flex; flex-direction: column; gap: 8px; min-height: 130px; }
.table-card.is-open { border-color: var(--ink); }
.table-card__num { font-size: 26px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.table-card__guest { font-size: 13px; color: var(--muted); }
.table-card__sum { font-weight: 600; margin-top: auto; display: flex; justify-content: space-between; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--bg); width: fit-content; }
.pill[data-tone="wait"] { background: #FFF4E0; color: #A35F00; }
.pill[data-tone="work"] { background: #EEEDFF; color: var(--violet); }
.pill[data-tone="ok"] { background: #EAF8F2; color: var(--ok); }
.pill[data-tone="bad"] { background: #FDECEE; color: var(--danger); }
.overdue { color: var(--danger); font-weight: 600; font-size: 12px; }

/* order editor */
.editor { margin-top: 20px; }
.editor__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.row__opts { display: flex; gap: 6px; }
.row:first-child { border-top: 0; }
.row.is-new { background: linear-gradient(90deg, #EAF8F2, transparent 60%); margin: 0 -18px; padding: 10px 18px; }
.row__name { font-weight: 500; }
.row__meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty b { min-width: 22px; text-align: center; }
.row select { padding: 6px 8px; border-radius: 10px; }
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr auto; }
  .row .hide-sm { display: none; }
  .row__opts { grid-column: 1 / -1; order: 3; }
  .row__opts .sel { flex: 1; }
}
.error-box { background: #FDECEE; color: var(--danger); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.search-results { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 280px; overflow-y: auto; }
.search-results button { display: flex; justify-content: space-between; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.search-results button:disabled { opacity: .45; }
.footer-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.kpi b { display: block; font-size: 26px; font-weight: 600; margin-top: 6px; }
.kpi.is-bad b { color: var(--danger); }

/* tables (data) */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--bg); display: grid; place-items: center; font-size: 20px; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 12px; background: #D9D8E0; transition: background .2s; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.is-on { background: var(--ink); }
.switch.is-on.is-red { background: var(--danger); }
.switch.is-on::after { transform: translateX(18px); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 5px 4px; }
.field .inp, .field .sel { width: 100%; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.qr-card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; text-align: center; break-inside: avoid; }
.qr-card img { width: 100%; max-width: 180px; margin: 6px auto; display: block; }
.qr-card b { font-size: 18px; }
.qr-card small { display: block; font-size: 10px; color: var(--muted); word-break: break-all; }
.stars { color: #FFB400; letter-spacing: 2px; }

/* login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; }
.login .brand { text-align: center; font-size: 36px; margin-bottom: 8px; }
.login .inp { padding: 16px 20px; border-radius: var(--pill); }
.login .btn { padding: 16px; }
.hint { font-size: 12px; color: var(--muted); text-align: center; }

/* modal */
.backdrop { position: fixed; inset: 0; background: rgba(9,16,39,.3); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--bg); border-radius: 24px; padding: 22px; width: min(620px, 100%); max-height: 90dvh; overflow-y: auto; }
.toast { position: fixed; left: 50%; top: 14px; transform: translate(-50%, -150%); visibility: hidden; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 16px; z-index: 90; transition: transform .3s, visibility .3s; font-size: 14px; }
.toast.is-shown { transform: translate(-50%, 0); visibility: visible; }
.toast.is-error { background: var(--danger); }

@media print {
  .top, .no-print { display: none !important; }
  body { background: #fff; }
  .qr-card { box-shadow: none; border: 1px solid #ddd; }
}

/* Выбор блюд официантом */
.picker { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.picker__cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 10px 0 4px; padding-bottom: 2px; }
.picker__cats::-webkit-scrollbar { display: none; }
.picker__cats button { flex-shrink: 0; padding: 8px 14px; border-radius: var(--pill); background: var(--bg); font-size: 13px; font-weight: 500; white-space: nowrap; }
.picker__cats button.is-active { background: var(--ink); color: #fff; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* Телефон */
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
  .top { padding: 10px 12px; gap: 10px; }
  .tabs { order: 3; flex-basis: 100%; }
  .me { flex-wrap: wrap; margin-left: auto; }
  .me .sel { max-width: 180px; }
  .main { padding: 6px 12px 32px; }
  .card { padding: 14px; }
  .row.is-new { margin: 0 -14px; padding: 10px 14px; }
  .tables { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .feed { max-height: 40dvh; }
  .footer-actions .btn { flex: 1 1 45%; }
  .editor__head { flex-direction: column; }
  .modal { padding: 16px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
}

/* Не даём длинным рядам (категории, таблицы) раздвигать страницу на телефоне */
.grid-waiter > *, .grid-2 > *, .editor, .picker, .row > * { min-width: 0; }
html, body { overflow-x: clip; }
.row__name { overflow-wrap: anywhere; }

/* Готово на кухне — пора выносить */
.ready-box { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #FFF1D6; color: #7A4A00; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.ready-box > span { min-width: 0; overflow-wrap: anywhere; }
.row__meta .ready { color: #B26A00; }
.note[data-type="dish_ready"].is-unread { border-left: 4px solid #F0A020; }

/* Каркас не шире экрана: широкие таблицы и вкладки прокручиваются внутри, а не раздвигают страницу */
.shell { grid-template-columns: minmax(0, 1fr); }
.shell > *, .main > *, .card { min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }

/* Телефон: таблицы админки — карточками, без прокрутки вбок */
@media (max-width: 640px) {
  .brand { font-size: 18px; }
  .me { width: 100%; margin-left: 0; }
  .me .sel { flex: 1; max-width: none; }
  .toolbar > .inp, .toolbar > .sel { flex: 1 1 100%; }
  .tbl--cards, .tbl--cards tbody { display: block; }
  .tbl--cards tr:first-child:has(th) { display: none; }
  .tbl--cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tbl--cards tr:last-child { border-bottom: 0; }
  .tbl--cards td { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; max-width: 100% !important; }
  .tbl--cards td[data-label]::before { content: attr(data-label); font-size: 12px; color: var(--muted); }
  .tbl--cards td:empty { display: none; }
  .tbl--cards .td-title, .tbl--cards .td-actions { flex-basis: 100%; }
  .tbl--cards .td-title { font-weight: 600; }
  /* меню: фото + название в первой строке, переключатели ниже */
  .tbl--menu td:first-child { flex: 0 0 auto; }
  .tbl--menu td:nth-child(2) { flex: 1 1 calc(100% - 160px); min-width: 0; display: block; }
  .tbl--menu .td-actions { flex-basis: auto; margin-left: auto; }
  .tbl--menu td:nth-child(2) b { overflow-wrap: anywhere; }
  .tbl--menu td[data-label="Категория"] { display: none; }
  .tbl--menu td[data-label="Цена"]::before { content: none; }
  .tbl--menu td[data-label="Цена"] { font-weight: 600; }
}
.row__meta .served { color: var(--ok); }
.row__meta .btn--sm { padding: 4px 10px; font-size: 12px; margin-left: 4px; vertical-align: middle; }

/* ── Официант: список столов + экран стола ───────────────── */
.waiter { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.waiter__list, .waiter__table { min-width: 0; }
.waiter__table { position: sticky; top: 72px; }
@media (max-width: 900px) {
  .waiter { grid-template-columns: minmax(0, 1fr); }
  .waiter.has-open .waiter__list { display: none; }
  .waiter:not(.has-open) .waiter__table { display: none; }
  .waiter__table { position: static; }
  .hide-sm { display: none !important; }
}
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--card); border-radius: var(--pill); box-shadow: var(--shadow); align-items: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg > span { font-size: 12px; color: var(--muted); padding: 0 6px 0 8px; }
.seg button { padding: 7px 12px; border-radius: var(--pill); font-size: 13px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.seg button.is-on { background: var(--ink); color: #fff; }
.seg--wide { display: flex; width: 100%; }
.seg--tabs { margin-bottom: 14px; }
.seg--tabs button { flex: 1; padding: 10px; }
.dot-inline { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; margin-left: 4px; }
.tsection { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 4px 8px; }
.tlist { display: flex; flex-direction: column; gap: 8px; }
.tcard { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); border: 2px solid transparent; }
.tcard.is-hot { border-left: 4px solid var(--warn); }
.tcard.is-open { border-color: var(--ink); }
.tcard__num { font-size: 24px; font-weight: 600; text-align: center; overflow-wrap: anywhere; line-height: 1.1; }
.tcard__pills { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tcard__guest { font-size: 13px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard__sum { font-weight: 600; white-space: nowrap; }
.empty-note { color: var(--muted); padding: 28px 12px; text-align: center; }

.tscreen { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 16px 0; }
.tscreen__head { display: flex; align-items: center; gap: 8px; margin: 0 -4px 10px; }
.tscreen__title { flex: 1; min-width: 0; }
.back-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: var(--ink); }
.back-btn:active { background: var(--bg); }
.back-btn svg { width: 22px; height: 22px; }
@media (min-width: 901px) { .tscreen .back-btn { display: none; } }
.gbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.gbar .qty { background: var(--bg); border-radius: var(--pill); padding: 3px; }
.gbar .qty .icon-btn { background: var(--card); width: 30px; height: 30px; }
.gbar__names { display: flex; gap: 6px; flex-wrap: wrap; }
.gchip { font-size: 12px; padding: 4px 10px; border-radius: 12px; background: var(--bg); }
.gblock { padding: 10px 0 4px; border-bottom: 1px solid var(--line); }
.gblock__title { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.gblock__title b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; margin-right: 4px; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 8px 0; }
.trow + .trow { border-top: 1px dashed var(--line); }
.trow__name { font-weight: 500; overflow-wrap: anywhere; }
.trow__meta { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.trow__sum { font-size: 14px; white-space: nowrap; }
.trow__opts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.trow.is-sent .trow__name { font-weight: 400; }
.trow.is-served { opacity: .6; }
.trow.is-ready { background: #FFF6E6; margin: 0 -16px; padding: 8px 16px; }
.trow.is-new { background: linear-gradient(90deg, #EAF8F2, transparent 70%); margin: 0 -16px; padding: 10px 16px; }
.trow .qty .icon-btn { width: 32px; height: 32px; }
.sel--sm { padding: 7px 10px; font-size: 13px; border-radius: var(--pill); }
.icon-btn--dark { background: var(--ink); color: #fff; }
.tscreen__total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; font-size: 17px; }
.tbar { position: sticky; bottom: 0; margin: 0 -16px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); z-index: 5; }
.tbar__status { font-size: 12px; margin-bottom: 8px; text-align: center; }
.tbar__btns { display: flex; gap: 10px; }
.tbar__btns .grow { flex: 1; }
.tbar__btns .btn { padding: 14px 18px; }

.pick-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(9, 16, 39, .3); display: flex; align-items: flex-end; justify-content: center; animation: fade-in .2s; }
@keyframes fade-in { from { opacity: 0; } }
.pick-sheet { width: min(620px, 100%); max-height: 88dvh; display: flex; flex-direction: column; gap: 10px; background: var(--bg);
  border-radius: 24px 24px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); animation: sheet-up .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.pick-sheet__grip { width: 40px; height: 5px; border-radius: 3px; background: #D9D8E0; margin: 0 auto 4px; }
.pick-sheet__head { display: flex; justify-content: space-between; align-items: center; }
.pick-sheet .picker__cats { margin: 0; }
.pick-sheet .picker__cats button { background: var(--card); box-shadow: var(--shadow); }
.pick-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 120px; padding-bottom: 4px; }
.pick-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; gap: 10px; align-items: center; text-align: left; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--card); }
.pick-item:disabled { opacity: .45; }
.pick-item__name { overflow-wrap: anywhere; }
.pick-item__price { font-weight: 600; white-space: nowrap; }
.pick-item__add { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 500; }
.pick-item__add.has { background: var(--ok); font-size: 15px; }
.pick-item:active .pick-item__add { transform: scale(.9); }
.pick-sheet .picker__cats button.is-active { background: var(--ink); color: #fff; }
@media (max-width: 900px) {
  body.table-open .top { display: none; }
  body.table-open .main { padding-top: 8px; }
  .top .me .muted { display: none; }
}

/* Баннеры и акции */
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.banner-card { background: var(--bg); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.banner-card__img { aspect-ratio: 2 / 1; background: #F5ECF6; display: grid; place-items: center; overflow: hidden; }
.banner-card__img img { width: 100%; height: 100%; object-fit: cover; }
.banner-card__img span { color: #993CA6; font-weight: 700; padding: 12px; text-align: center; }
.banner-card__body { padding: 12px; }
.banner-preview { aspect-ratio: 2 / 1; border-radius: 14px; background: #F5ECF6; display: grid; place-items: center; overflow: hidden; color: #993CA6; }
.banner-preview img { width: 100%; height: 100%; object-fit: cover; }
[data-link][hidden] { display: none; }
.bill-box { background: #ECEBFB; color: #091027; border-radius: 14px; padding: 12px 14px; margin: 10px 0; font-size: 14px; display: grid; gap: 4px; }

/* Вкладки — отдельной строкой под шапкой, все видны сразу (на телефоне — прокрутка) */
.tabs { order: 3; flex-basis: 100%; flex-wrap: wrap; overflow: visible; }
.me { margin-left: auto; }
@media (max-width: 760px) {
  .tabs { gap: 6px; padding: 2px 0; }
  .tabs button { padding: 8px 12px; font-size: 13px; }
}
/* Формы на телефоне — в одну колонку */
@media (max-width: 520px) {
  .modal .form-grid { grid-template-columns: 1fr !important; }
}

/* Лента уведомлений и списки официанта — на всю высоту экрана, прокрутка вместе со страницей */
.feed { max-height: none; overflow: visible; }
@media (max-width: 760px) { .feed { max-height: none; } }
.gchip--edit { border: 1px dashed #C9C8D3; cursor: pointer; font: inherit; font-size: 12px; color: var(--ink); }
.gchip--edit:hover { border-color: var(--ink); }
.inp--prio { width: 76px; padding: 8px 10px; text-align: center; }
.sel--badge { min-width: 120px; }
