/* Общая основа: цвета, шрифты, кнопки, поля, уведомления. */
:root {
  --bg: #f6f2ec;
  --surface: #ffffff;
  --surface-2: #faf7f3;
  --ink: #1c1a17;
  --ink-2: #48433d;
  --muted: #857d73;
  --line: #e8e0d5;
  --line-strong: #d6ccbe;

  --accent: #ff5a1f;
  --accent-hover: #e94c12;
  --accent-soft: #ffe8dd;

  --ok: #16794b;
  --ok-soft: #dcf1e4;
  --warn: #945700;
  --warn-soft: #fdefcf;
  --bad: #c4311e;
  --bad-soft: #fce2dd;
  --info: #2d56c9;
  --info-soft: #e3eafc;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(28 26 23 / 6%), 0 12px 32px rgb(28 26 23 / 8%);

  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Unbounded', 'Manrope', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgb(255 90 31 / 55%); outline-offset: 2px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 42px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgb(28 26 23 / 6%); border-color: transparent; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--bad); }
.btn-danger-ghost:hover { background: var(--bad-soft); border-color: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  flex: none; display: inline-grid; place-items: center;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgb(28 26 23 / 6%); cursor: pointer; font-size: 15px;
}
.icon-btn:hover { background: rgb(28 26 23 / 11%); }

/* ---------- Метки ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 9px; border-radius: 999px;
  background: rgb(28 26 23 / 7%); color: var(--ink-2);
  font-size: 12px; font-weight: 700; line-height: 1.7; white-space: nowrap;
}
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-info { background: var(--info-soft); color: var(--info); }

/* ---------- Поля ---------- */
.field { display: grid; gap: 6px; align-content: start; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field input:not([type='checkbox']), .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface);
  /* 16px — меньше iPhone увеличивает страницу при вводе. */
  font-size: 16px;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.check { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 44px; cursor: pointer; }
.field.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.field.check > span { font-size: 15px; color: var(--ink); }
.hint { color: var(--muted); font-size: 13px; }

/* ---------- Уведомления ---------- */
#toasts {
  position: fixed; z-index: 100; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #fff;
  font-weight: 600; box-shadow: var(--shadow); animation: toast-in .2s ease-out;
}
.toast-ok { background: var(--ok); }
.toast-warn { background: #7a4700; }
.toast-error { background: var(--bad); }
.toast.out { opacity: 0; transition: opacity .35s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Знак: «Официанта» зачёркнуто ---------- */
.logo { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.strike { position: relative; display: inline-block; }
.strike::after {
  content: ''; position: absolute; left: -3%; right: -3%; top: 52%;
  height: .12em; border-radius: 99px; background: var(--accent); transform: rotate(-4deg);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
