/* ================= Меню гостя ================= */
body.guest { padding-bottom: 150px; }
body.no-scroll { overflow: hidden; }

.g-top {
  position: sticky; top: 0; z-index: 10;
  background: rgb(246 242 236 / 92%);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.g-head { display: flex; align-items: center; gap: 12px; max-width: 640px; margin: 0 auto; padding: 12px 16px 8px; }
.g-head-text { flex: 1; min-width: 0; }
.g-place { font-family: var(--font-display); font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-table { color: var(--muted); font-size: 13px; }
.g-cats { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; padding: 4px 16px 12px; overflow-x: auto; scrollbar-width: none; }
.g-cats::-webkit-scrollbar { display: none; }
.g-cat { flex: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 700; font-size: 14px; text-decoration: none; }
.g-cat:hover { border-color: var(--ink-2); }

.g-menu { max-width: 640px; margin: 0 auto; padding: 4px 16px 0; }
.g-section { padding-top: 18px; scroll-margin-top: 110px; }
.g-section h2 { font-family: var(--font-display); font-size: 20px; margin: 0 0 12px; }

.g-dish { display: flex; gap: 14px; margin-bottom: 10px; padding: 14px; border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.g-dish-art { flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 14px; background: linear-gradient(145deg, #fff3ea, #ffdcc9); font-size: 44px; }
.g-dish-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.g-dish h3 { font-size: 16px; font-weight: 800; }
.g-dish p { color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
.g-dish-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.g-dish-meta:empty { display: none; }
.g-dish-buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.g-dish-buy > b { font-size: 17px; }

.stepper { display: inline-flex; align-items: center; height: 36px; border-radius: 999px; background: var(--ink); color: #fff; flex: none; }
.stepper button { width: 38px; height: 36px; border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper span { min-width: 18px; text-align: center; font-weight: 800; }

.g-foot { padding: 28px 0 8px; text-align: center; color: var(--muted); font-size: 12.5px; }
.g-empty, .g-loading { padding: 48px 16px; text-align: center; color: var(--muted); }
.g-error { display: grid; gap: 12px; justify-items: center; max-width: 420px; margin: 18vh auto 0; padding: 0 16px; text-align: center; }
.g-error-icon { font-size: 52px; }
.g-error h1 { font-family: var(--font-display); font-size: 22px; }
.g-error p { color: var(--ink-2); }

.g-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; gap: 8px;
  padding: 18px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, rgb(246 242 236 / 0%));
}
.g-bar > * { width: 100%; max-width: 608px; margin: 0 auto; }
.g-bar-cart { justify-content: space-between; min-height: 56px; padding: 0 22px; font-size: 16px; box-shadow: 0 10px 26px rgb(255 90 31 / 32%); }
.g-bar-order {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); font-weight: 700; cursor: pointer; text-align: left;
}
.g-bar-order b { color: var(--accent-hover); white-space: nowrap; }
.g-bar-order b.ok { color: var(--ok); }
.g-bar-order.is-pending { border-color: var(--accent); background: var(--accent-soft); }

#sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(28 26 23 / 45%); animation: fade .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; gap: 14px; align-content: start;
  max-width: 640px; max-height: 92vh; max-height: 92dvh; margin: 0 auto;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain;
  border-radius: 24px 24px 0 0; background: var(--bg);
  animation: sheet-up .24s ease-out;
}
.sheet-grip { width: 44px; height: 5px; margin: 4px auto 0; border-radius: 9px; background: var(--line-strong); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-family: var(--font-display); font-size: 20px; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }

.g-lines { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.g-lines li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); }
.g-line-emoji { font-size: 28px; }
.g-line-name { flex: 1; min-width: 0; font-weight: 700; }
.g-line-name small { display: block; color: var(--muted); font-weight: 600; }
.g-total { display: flex; align-items: baseline; justify-content: space-between; font-size: 17px; font-weight: 700; }
.g-total b { font-family: var(--font-display); font-size: 22px; }
.g-hint { color: var(--muted); font-size: 13px; text-align: center; }
.g-left { text-align: left; }

.g-order { display: grid; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface); }
.g-order.is-cancelled { opacity: .6; }
.g-order.is-pending { box-shadow: inset 0 0 0 2px var(--accent); }
.g-order .g-pay { padding: 0; }
.g-order-head { display: flex; align-items: center; justify-content: space-between; }
.g-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.g-steps li { padding-top: 8px; border-top: 4px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; }
.g-steps li.done { border-color: var(--ok); color: var(--ink-2); }
.g-steps li.now { border-color: var(--accent); color: var(--ink); }
.g-order-items { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.g-order-items li { display: flex; justify-content: space-between; gap: 12px; }

.g-pay { display: grid; gap: 16px; padding: 16px; border-radius: var(--radius); background: var(--surface); }
.g-tip-title { margin-bottom: 8px; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 46px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--surface); font-weight: 800; line-height: 1.2; cursor: pointer;
}
.chip small { color: var(--muted); font-size: 12px; font-weight: 600; }
.chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip.on small { color: rgb(255 255 255 / 70%); }
.field-inline { grid-template-columns: auto 1fr; align-items: center; gap: 12px; margin-top: 10px; }
.g-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-paid-note { padding: 16px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok); font-weight: 800; text-align: center; }
.g-success { display: grid; gap: 12px; padding: 24px 0 8px; text-align: center; }
.g-success-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: var(--ok); color: #fff; font-size: 36px; font-weight: 800; }
.g-success h2 { font-family: var(--font-display); font-size: 24px; }

/* ================= Панель заведения ================= */
body.admin #toasts { left: auto; right: 20px; transform: none; }

.a-loading { padding: 40vh 16px 0; color: var(--muted); text-align: center; }
.a-login { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: var(--ink); }
.a-login-card { display: grid; gap: 14px; width: min(400px, 100%); padding: 28px; border-radius: 24px; background: var(--bg); }
.a-login-card .logo { font-size: 16px; }
.a-login-card h1 { font-family: var(--font-display); font-size: 22px; }

.a-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.a-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 18px; height: 100vh; padding: 18px 12px; background: var(--ink); color: #fff; }
.a-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; min-width: 0; }
.a-brand img { flex: none; width: 36px; height: 36px; border-radius: 10px; }
.a-brand b { display: block; font-size: 14px; line-height: 1.25; }
.a-brand small { color: rgb(255 255 255 / 55%); font-size: 12px; }
.a-nav { display: grid; gap: 2px; }
.a-tab {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px;
  border: 0; border-radius: 12px; background: transparent; color: rgb(255 255 255 / 72%);
  font-weight: 700; text-align: left; cursor: pointer;
}
.a-tab:hover { background: rgb(255 255 255 / 7%); color: #fff; }
.a-tab.on { background: rgb(255 255 255 / 13%); color: #fff; }
.a-tab-icon { width: 22px; text-align: center; }
.a-badge { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; line-height: 22px; text-align: center; }
.a-badge-warn { background: #f2b544; color: var(--ink); }
.a-logout { margin-top: auto; padding: 10px; border: 0; background: transparent; color: rgb(255 255 255 / 55%); font-weight: 700; text-align: left; cursor: pointer; }
.a-logout:hover { color: #fff; }

.a-main { display: grid; gap: 18px; align-content: start; min-width: 0; padding: 26px 28px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.page-head-text { flex: 1; min-width: 260px; }
.page-head h1 { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.page-head p { max-width: 72ch; margin-top: 6px; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.demo-note { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: #7d2c07; font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.kpi small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.kpi b { font-size: 24px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi.warn b { color: var(--warn); }
.kpi.bad b { color: var(--bad); }

.card { min-width: 0; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.card-title { margin-bottom: 12px; font-size: 16px; font-weight: 800; }
.card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-2.gap { gap: 18px; }
.muted { color: var(--muted); }
.pad { padding: 8px 0; }
.note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--info-soft); color: #1f3d8f; font-weight: 600; }
.inline-select { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.inline-select select, .note select { min-height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 14px; }

/* Таблицы */
.tbl-wrap { margin: 0 -16px; padding: 0 16px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.dim td { background: #fcfaf7; }
.tbl tr.row-out td:first-child { box-shadow: inset 3px 0 var(--bad); }
.tbl tr.row-low td:first-child { box-shadow: inset 3px 0 #f2b544; }
.tbl.compact td { padding: 7px 10px; }
.row-actions { text-align: right; white-space: nowrap; }
.dish-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.dish-emoji { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); font-size: 24px; }
.dish-cell small { display: block; color: var(--muted); font-size: 12px; }
.fc { font-weight: 800; }
.fc-ok { color: var(--ok); }
.fc-warn { color: var(--warn); }
.fc-bad { color: var(--bad); }
.tag { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-2); font-size: 12px; white-space: nowrap; }
.tag-bad { border-color: transparent; background: var(--bad-soft); color: var(--bad); font-weight: 700; }
.dishes-cell { min-width: 200px; max-width: 360px; }
.a-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.a-group-head h3 { font-size: 17px; font-weight: 800; }

/* Доска заказов */
.board { display: grid; grid-template-columns: repeat(3, minmax(230px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; }
.board-col { display: grid; gap: 10px; align-content: start; min-height: 160px; padding: 10px; border-radius: var(--radius); background: rgb(28 26 23 / 5%); }
.board-col > header { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.board-col h3 { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 800; }
.board-col h3::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.board-new h3::before { background: var(--accent); }
.board-cooking h3::before { background: var(--info); }
.board-ready h3::before { background: var(--ok); }
.board-served h3::before { background: #f2b544; }
.count { color: var(--muted); font-weight: 800; }
.board-empty { padding: 20px 0; color: var(--muted); font-size: 13px; text-align: center; }
.ocard { display: grid; gap: 8px; padding: 12px; border-left: 4px solid transparent; border-radius: 14px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.board-new .ocard { border-left-color: var(--accent); }
.ocard > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.ocard > header b { font-size: 16px; }
.ocard-table { padding: 0 7px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; }
.ocard time { margin-left: auto; color: var(--muted); font-size: 12px; }
.ocard.late time { color: var(--bad); font-weight: 800; }
.ocard ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.ocard-comment { padding: 6px 8px; border-radius: 8px; background: var(--warn-soft); color: #6b4200; font-size: 13px; font-weight: 600; }
.ocard > footer { display: flex; align-items: center; justify-content: space-between; font-weight: 800; }
.ocard-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.a-alerts { display: grid; gap: 8px; }
.a-call { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); font-weight: 600; }
.a-call .btn { margin-left: auto; }
.a-signal { padding: 10px 14px; border: 0; border-radius: var(--radius-sm); background: var(--bad-soft); color: #7a1e12; font-weight: 700; text-align: left; cursor: pointer; }
.a-signal-low { background: var(--warn-soft); color: #6b4200; }
.a-closed summary { padding: 6px 0; font-weight: 800; cursor: pointer; }

.feed { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.feed li { display: grid; grid-template-columns: 24px 1fr auto; align-items: start; gap: 8px; }
.feed time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.seg { display: inline-flex; gap: 2px; justify-self: start; padding: 3px; border-radius: 999px; background: rgb(28 26 23 / 6%); }
.seg-btn { padding: 7px 14px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; cursor: pointer; }
.seg-btn.on { background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / 10%); }

.dish-alerts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.dish-alert { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); }
.dish-alert > span { font-size: 26px; }
.dish-alert small { display: block; font-size: 12.5px; }
.dish-alert.bad { background: var(--bad-soft); }
.dish-alert.bad small { color: var(--bad); }
.dish-alert.warn { background: var(--warn-soft); }
.dish-alert.warn small { color: var(--warn); }
.qty-input { display: inline-flex; align-items: center; gap: 6px; }
.qty-input input { width: 84px; min-height: 34px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 14px; text-align: right; }
.buy-check { width: 18px; height: 18px; accent-color: var(--accent); }
.empty { display: grid; justify-items: center; gap: 8px; padding: 30px 16px; text-align: center; }
.empty-icon { font-size: 40px; }
.empty p { max-width: 52ch; color: var(--muted); }

/* Столы и QR */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.qr-card { display: grid; justify-items: center; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 var(--line); text-align: center; }
.qr-img { width: 180px; height: 180px; image-rendering: pixelated; }
.qr-num { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.qr-waiter { width: 100%; text-align: left; }
.qr-actions { display: flex; gap: 6px; }
.qr-print-brand, .qr-print-hint { display: none; }

/* Официанты */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.staff { display: grid; gap: 14px; }
.staff-head { display: flex; align-items: center; gap: 12px; }
.staff-head > div:nth-child(2) { flex: 1; min-width: 0; }
.staff-head small { display: block; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-hover); font-size: 18px; font-weight: 800; }
.staff-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.staff-stats small { display: block; color: var(--muted); font-size: 12px; }
.staff-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }

/* Отчёты: столбики выручки. Одна серия — без легенды, подписаны только
   лучший день и сегодня; остальное — в подсказке и таблице. */
.chart { margin: 0; }
.chart-body { display: grid; grid-template-columns: 60px minmax(0, 1fr); height: 250px; padding-top: 24px; }
.chart-y { position: relative; }
.chart-y span { position: absolute; right: 10px; transform: translateY(50%); color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-plot { position: relative; display: flex; gap: 2px; }
.chart-grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.chart-col { position: relative; z-index: 1; flex: 1; display: flex; align-items: flex-end; justify-content: center; height: 100%; border-radius: 8px 8px 0 0; outline: none; }
.chart-col.is-hover { background: rgb(28 26 23 / 4%); }
.chart-col:focus-visible { box-shadow: inset 0 0 0 2px rgb(255 90 31 / 50%); }
.chart-bar { position: relative; width: min(24px, 60%); min-height: 1px; border-radius: 4px 4px 0 0; background: var(--accent); transition: filter .15s; }
.chart-col.is-hover .chart-bar { filter: brightness(1.1); }
.chart-val { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.chart-x { display: flex; gap: 2px; padding: 8px 0 0 60px; color: var(--muted); font-size: 12px; }
.chart-x span { flex: 1; min-width: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.chart-tip { position: absolute; z-index: 3; top: -24px; display: grid; gap: 1px; min-width: 150px; padding: 8px 12px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow); text-align: center; transform: translateX(-50%); pointer-events: none; }
.chart-tip b { font-size: 16px; }
.chart-tip span { color: rgb(255 255 255 / 78%); font-size: 12.5px; }
.chart-tip small { color: rgb(255 255 255 / 62%); font-size: 11.5px; }
.chart-table { margin-top: 14px; }
.chart-table summary { color: var(--ink-2); font-weight: 700; cursor: pointer; }
.meter { display: grid; gap: 6px; margin-bottom: 16px; }
.meter-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.meter-top span:first-child { font-weight: 700; }
.meter-top span:last-child { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meter-track { height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: var(--accent); }
.settings { display: grid; gap: 4px; }

/* Модальное окно */
#modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgb(28 26 23 / 45%); animation: fade .15s; }
.modal { position: relative; display: flex; flex-direction: column; width: min(520px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); border-radius: 22px; background: var(--bg); box-shadow: 0 30px 80px rgb(0 0 0 / 25%); animation: pop .18s ease-out; }
.modal-wide { width: min(780px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.modal-head h2 { font-size: 19px; font-weight: 800; }
.modal-body { display: grid; gap: 14px; padding: 10px 20px 16px; overflow-y: auto; }
.modal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.spacer { flex: 1; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.recipe { display: grid; gap: 8px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface); }
.recipe-head { display: flex; align-items: center; justify-content: space-between; }
.recipe-head h4 { font-size: 15px; }
.recipe-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 32px 36px; align-items: center; gap: 8px; }
.recipe-row select, .recipe-row input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 15px; }
.recipe-row input { text-align: right; }
.recipe-unit { color: var(--muted); font-weight: 700; }
.recipe-calc { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 10px; border-top: 1px dashed var(--line-strong); color: var(--ink-2); font-size: 14px; }

@media (max-width: 900px) {
  .a-layout { grid-template-columns: minmax(0, 1fr); }
  .a-side { z-index: 30; flex-direction: row; align-items: center; gap: 6px; height: auto; padding: 8px 10px; overflow-x: auto; }
  .a-brand { padding: 0; }
  .a-brand div { display: none; }
  .a-nav { display: flex; gap: 2px; }
  .a-tab { width: auto; padding: 8px 10px; white-space: nowrap; }
  .a-badge { margin-left: 2px; }
  .a-logout { margin: 0; white-space: nowrap; }
  .a-main { padding: 18px 16px 64px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: repeat(3, minmax(250px, 82vw)); margin: 0 -16px; padding: 0 16px 6px; }
  .page-head h1 { font-size: 22px; }
}

@media print {
  body.admin { background: #fff; }
  .a-side, .page-head, .note, .qr-waiter, .qr-actions, #toasts, #modal { display: none !important; }
  .a-layout { display: block; }
  .a-main { padding: 0; }
  .qr-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .qr-card { break-inside: avoid; border: 1px dashed #bbb; border-radius: 0; box-shadow: none; padding: 28px; }
  .qr-print-brand, .qr-print-hint { display: block; }
  .qr-print-brand { font-weight: 800; }
  .qr-print-hint { color: #555; font-size: 13px; }
}
