:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #1d1b18;
  --muted: #76706a;
  --line: #e7e2db;
  --accent: #c4502e;
  --accent-ink: #fff;
  --ok: #2e7d4f;
  --warn: #b06a00;
  --err: #b5302a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0 0 16px; }
h2 { font-size: 19px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* --- кнопки --- */
.btn {
  display: inline-block; cursor: pointer;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 500; text-decoration: none;
}
.btn:hover { text-decoration: none; border-color: #d0c9c0; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
button.link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 15px; }

/* --- формы --- */
label { display: block; margin: 12px 0; font-size: 14px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  width: 100%; margin-top: 4px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 15px; color: var(--ink);
  background: var(--surface);
}
label.chk, label.del { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); margin: 0 14px 0 0; }
label.chk input, label.del input { width: auto; margin: 0; }
.flash { padding: 10px 14px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.flash.ok { background: #eaf5ee; color: var(--ok); }
.flash.err { background: #fcebea; color: var(--err); }

/* --- admin layout --- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar .brand { font-weight: 700; font-size: 18px; color: var(--ink); }
.topbar nav { display: flex; gap: 16px; align-items: center; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--ink); text-decoration: none; }
.inline { display: inline; margin: 0; }
.container { max-width: 920px; margin: 0 auto; padding: 24px 20px 60px; }
.auth-page .container { max-width: 420px; margin-top: 6vh; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.narrow { max-width: 460px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.status { list-style: none; padding: 0; margin: 0 0 12px; }
.status li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.ok { color: var(--ok); } .warn { color: var(--warn); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* --- редактор меню --- */
.dish { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; background: var(--surface); }
.dish-head { display: flex; justify-content: space-between; align-items: center; }
.dish-num { font-weight: 700; color: var(--muted); }
.dish-thumb { height: 28px; border-radius: 4px; vertical-align: middle; margin-left: 6px; }
.dish .kz { background: #fbf3ee; border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.dish .req { color: var(--accent); }
.dish .row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.dish .row label { margin: 8px 0; }
.otherlangs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 12px; }
.langcol h4 { margin: 8px 0 4px; font-size: 13px; color: var(--muted); }
.catrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 12px; }
details summary { cursor: pointer; color: var(--accent); margin: 8px 0; }
.confirm-form { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }

/* --- landing --- */
.landing { background: linear-gradient(160deg, #fbf3ee, var(--bg)); min-height: 100vh; }
.hero { max-width: 640px; margin: 0 auto; padding: 12vh 24px; }
.hero h1 { font-size: 44px; margin-bottom: 12px; }
.hero .lead { font-size: 19px; color: var(--ink); }
.bullets { margin: 20px 0; padding-left: 20px; color: var(--ink); }
.bullets li { margin: 6px 0; }
.cta { display: flex; gap: 12px; margin-top: 24px; }

/* --- гостевое меню --- */
body.guest { background: var(--bg); padding-bottom: 90px; }
.guest-empty { max-width: 480px; margin: 18vh auto; text-align: center; padding: 0 20px; }
.guest-top {
  position: sticky; top: 0; z-index: 5;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.guest-top .venue { font-size: 20px; font-weight: 700; }
.langs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.lang-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 15px;
}
.lang-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.menu { max-width: 680px; margin: 0 auto; padding: 8px 14px; }
.cat { margin: 22px 0 8px; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dish-card {
  display: flex; gap: 12px; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
}
.dish-photo { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.dish-info { flex: 1; min-width: 0; }
.dish-name { font-weight: 600; font-size: 16px; }
.dish-desc { color: var(--muted); font-size: 14px; margin-top: 3px; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #f0ece6; color: var(--muted); }
.tag.halal { background: #e8f4ec; color: var(--ok); }
.tag.veg { background: #eef6e6; color: #4f7a2e; }
.dish-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.dish-price { font-weight: 600; white-space: nowrap; }

.stepper { display: flex; align-items: center; gap: 6px; }
.step {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); font-size: 18px; cursor: pointer; line-height: 1;
}
.stepper .qty { min-width: 20px; text-align: center; font-weight: 600; }
.btn.add { padding: 8px 14px; }
.stepper.small .step { width: 30px; height: 30px; }

/* кнопка заказа */
.order-fab {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 20;
  display: none; align-items: center; gap: 10px;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 14px 22px; border-radius: 999px; font-size: 16px; font-weight: 600;
  box-shadow: var(--shadow);
}
.order-fab .badge { background: #fff; color: var(--accent); border-radius: 999px; padding: 1px 9px; font-size: 14px; }

/* шторки */
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; }
.sheet.hidden { display: none; }
.sheet-inner {
  background: var(--surface); width: 100%; max-width: 680px; margin: 0 auto;
  border-radius: 18px 18px 0 0; padding: 18px 16px 24px; max-height: 86vh; overflow-y: auto;
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.icon-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.order-item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.oi-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.oi-name { font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sheet-foot { margin-top: 14px; }
.total { font-weight: 600; margin-bottom: 10px; }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .btn { flex: 1; text-align: center; }

/* карточка заказа */
.card-view .order-card {
  background: #fbf3ee; border-radius: var(--radius); padding: 16px; margin-top: 8px;
}
.card-row { padding: 8px 0; border-bottom: 1px dashed #e3d6cc; }
.card-line { font-size: 18px; font-weight: 600; }
.card-prefs { color: var(--accent); font-size: 15px; margin-top: 2px; }
