@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url(../fonts/montserrat-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url(../fonts/montserrat-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url(../fonts/montserrat-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url(../fonts/montserrat-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-display: swap; src: url(../fonts/montserrat-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url(../fonts/montserrat-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url(../fonts/montserrat-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url(../fonts/montserrat-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url(../fonts/montserrat-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-display: swap; src: url(../fonts/montserrat-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url(../fonts/montserrat-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url(../fonts/montserrat-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url(../fonts/montserrat-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url(../fonts/montserrat-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-display: swap; src: url(../fonts/montserrat-cyrillic-800-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url(../fonts/montserrat-cyrillic-ext-400-normal.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url(../fonts/montserrat-cyrillic-ext-700-normal.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Kaushan Script'; font-weight: 400; font-display: swap; src: url(../fonts/kaushan-script-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kaushan Script'; font-weight: 400; font-display: swap; src: url(../fonts/kaushan-script-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #F7F5F2;
  --card: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #5E5A55;
  --faint: #6B655E;
  --line: #EEEAE4;
  --line2: #E2DCD4;
  --brand: #C2341F;
  --brand-ink: #9E2A1E;
  --brand-soft: #FDEDE6;
  --coral: #E2483A;
  --orange: #F7924A;
  --orange-soft: #FDE0CF;
  --green: #23772F;
  --green-soft: #E6F4E8;
  --warn: #8A3412;
  --warn-soft: #FBE9DF;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(26, 26, 26, .05), 0 6px 18px rgba(26, 26, 26, .06);
  --nav-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1.45 Montserrat, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
a { color: var(--brand); }
a:hover { color: var(--brand-ink); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 800; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.ic { display: inline-flex; flex: none; }
:focus-visible { outline: 3px solid rgba(194, 52, 31, .35); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 6px; min-width: 0; }
.logo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.logo-word { font-family: 'Kaushan Script', cursive; color: var(--coral); line-height: 1; white-space: nowrap; transform: rotate(-4deg); transform-origin: left center; }
.logo-sub { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); color: #fff; }
.btn.ghost { background: var(--card); border-color: var(--line2); color: var(--ink); }
.btn.ghost:hover { border-color: #CFC6BB; }
.btn.soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn.danger { background: #fff; border-color: #E9B8AE; color: var(--brand-ink); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.6); border-top-color: transparent; animation: spin .7s linear infinite; }
.btn.ghost.busy::after, .btn.soft.busy::after, .btn.danger.busy::after { border-color: var(--brand); border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); flex: none; }
.icon-btn:hover { background: var(--line); }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--brand); font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.lg { gap: 18px; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; gap: 10px;
  padding-top: max(10px, env(safe-area-inset-top));
}
.topbar .who { display: none; font-size: 12px; color: var(--muted); font-weight: 600; text-align: right; line-height: 1.25; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; flex: none; }
.lang button { border: 0; background: #fff; padding: 0 9px; min-height: 34px; font-size: 12px; font-weight: 800; cursor: pointer; color: var(--muted); }
.lang button.on { background: var(--ink); color: #fff; }
.layout { flex: 1; display: flex; }
.sidenav { display: none; }
.main { flex: 1; min-width: 0; padding: 16px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; width: 100%; }
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  flex: 1; min-width: 0; height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--faint); text-decoration: none; font-size: 11px; font-weight: 700;
}
.bottomnav a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.bottomnav a.on { color: var(--brand); }

@media (min-width: 640px) { .topbar .who { display: block; } }
@media (min-width: 960px) {
  .bottomnav { display: none; }
  .sidenav {
    display: flex; flex-direction: column; gap: 4px; width: 248px; flex: none; padding: 18px 12px; background: var(--ink); color: #fff;
    position: sticky; top: 0; height: 100vh; overflow: auto;
  }
  .sidenav .logo-sub { color: #C9C2BA; }
  .sidenav .nav-logo { padding: 4px 10px 18px; }
  .sidenav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: #EDE8E3; text-decoration: none; font-weight: 600; font-size: 14px; }
  .sidenav a:hover { background: rgba(255,255,255,.07); color: #fff; }
  .sidenav a.on { background: var(--brand); color: #fff; font-weight: 700; }
  .sidenav .spacer { flex: 1; }
  .sidenav .credit { color: #A9A29A; padding: 10px; }
  .sidenav .credit a { color: #F4C9B3; }
  .app.has-side .topbar .logo { display: none; }
  .main { padding: 24px 28px 48px; }
}

/* ---------- page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.kicker { font-size: 12px; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .07em; }
.page-head h1 { margin-top: 2px; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card + .card { margin-top: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.stat .lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .val { font-size: 22px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .val.red { color: var(--brand); }
.stat .val.green { color: var(--green); }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }

/* ---------- banners & badges ---------- */
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.ok { background: var(--green-soft); color: var(--green); }
.banner.info { background: var(--brand-soft); color: var(--brand-ink); }
.banner.grey { background: #EFEBE6; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: #EFEBE6; color: var(--muted); white-space: nowrap; }
.badge.red { background: var(--brand-soft); color: var(--brand-ink); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.orange { background: var(--orange-soft); color: var(--warn); }
.badge.dark { background: var(--ink); color: #fff; }

/* ---------- day chips ---------- */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 6px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 1 0 58px; min-height: 62px; border-radius: 14px; border: 1px solid var(--line2); background: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 4px; position: relative;
}
.day .d1 { font-size: 12px; font-weight: 700; color: var(--muted); }
.day .d2 { font-size: 17px; font-weight: 800; }
.day .dot { width: 6px; height: 6px; border-radius: 3px; background: transparent; margin-top: 2px; }
.day .dot.on { background: var(--brand); }
.day .dot.done { background: var(--green); }
.day.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.day.on .d1 { color: #D8D2CB; }
.day.past { background: #F3F0EC; border-style: dashed; }
.day.past .d1, .day.past .d2 { color: var(--faint); }
.day.past.on { background: var(--ink); border-style: solid; }
.day.past.on .d1, .day.past.on .d2 { color: #fff; }
.weektabs { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- segmented ---------- */
.seg { display: inline-flex; background: #EFEBE6; border-radius: 12px; padding: 3px; gap: 2px; max-width: 100%; }
.seg button { border: 0; background: transparent; min-height: 40px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

/* ---------- dishes ---------- */
.cat-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 2px 8px; }
.dish-row { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 10px; border: 2px solid var(--line); }
.dish-row + .dish-row { margin-top: 8px; }
.dish-row.sel { border-color: var(--brand); }
.dish-img { width: 76px; height: 76px; flex: none; border-radius: 12px; overflow: hidden; background: #EFEBE6; display: flex; align-items: center; justify-content: center; color: #B3A99E; }
.dish-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-img.big { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 14px; }
.dish-img.sm { width: 52px; height: 52px; border-radius: 10px; }
.dish-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dish-name { font-weight: 700; line-height: 1.25; }
.dish-meta { font-size: 13px; color: var(--muted); }
.price { font-weight: 800; color: var(--brand); white-space: nowrap; }
.price s { color: var(--faint); font-weight: 600; margin-right: 4px; }
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 640px) { .dish-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; } }
.dish-card .body .dish-name { font-size: 14px; }
@media (min-width: 640px) { .dish-card .body .dish-name { font-size: 15px; } }
.dish-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dish-card .dish-img.big { border-radius: 0; }
.dish-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }

/* ---------- stepper ---------- */
.stepper { display: inline-flex; align-items: center; gap: 2px; background: #EFEBE6; border-radius: 22px; padding: 2px; flex: none; }
.stepper.active { background: var(--brand-soft); }
.step-btn { width: 40px; height: 40px; border-radius: 20px; border: 0; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.step-btn.plus { background: var(--brand); color: #fff; }
.step-btn:disabled { opacity: .35; cursor: default; }
.step-num { min-width: 26px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- person cards (order by names) ---------- */
.person { background: #fff; border-radius: 16px; border: 1px solid var(--line); padding: 12px; }
.person + .person { margin-top: 10px; }
.person .row.nowrap .inp { min-height: 42px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 1.5px solid var(--line2); background: #fff; border-radius: 22px; min-height: 40px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-align: left; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .p { font-weight: 600; opacity: .8; }

/* ---------- sticky order bar ---------- */
.orderbar {
  position: sticky; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom)); z-index: 15; margin-top: 16px;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.orderbar .sum { flex: 1; min-width: 0; }
.orderbar .sum b { font-size: 18px; display: block; }
.orderbar .sum span { font-size: 12px; color: #D8D2CB; }
.orderbar .btn.primary { background: var(--brand); }
@media (min-width: 960px) { .orderbar { bottom: 12px; } }

/* ---------- lists & tables ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); min-height: 56px; }
.li:first-child { border-top: 0; }
.li.click { cursor: pointer; }
.li.click:hover { background: #FBFAF8; }
.li .main-t { font-weight: 700; }
.li .sub-t { font-size: 13px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 6px; white-space: nowrap; }
.tbl td { padding: 10px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl tfoot td { font-weight: 800; border-top: 2px solid var(--line2); }
.bar { height: 10px; border-radius: 5px; background: #EFEBE6; overflow: hidden; }
.bar > div { height: 100%; background: var(--brand); border-radius: 5px; }
.cook { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 4px 12px; align-items: center; }
.cook + .cook { margin-top: 12px; }
.cook .q { grid-row: span 2; text-align: right; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* company order cards in the owner summary */
.oc { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.oc + .oc { margin-top: 10px; }
.oc.none { background: #FBFAF8; }
.oc-lines { margin-top: 8px; font-size: 13px; }
.oc-lines div { padding: 3px 0; border-top: 1px dashed var(--line); }
.oc-lines div:first-child { border-top: 0; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--faint); }
.inp {
  width: 100%; min-height: 46px; border: 1.5px solid var(--line2); border-radius: 12px; padding: 10px 12px; background: #fff;
  font: inherit; font-size: 16px; color: var(--ink);
}
.inp:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(194, 52, 31, .12); }
textarea.inp { resize: vertical; min-height: 80px; }
select.inp { appearance: none; 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='%235E5A55' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 13px; color: var(--faint); }
.search .inp { padding-left: 40px; }
.photo-pick { position: relative; border: 2px dashed var(--line2); border-radius: 14px; background: #FBF8F5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; color: var(--brand); font-weight: 800; cursor: pointer; overflow: hidden; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-pick img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-pick.has { border-style: solid; padding: 0; }

/* ---------- sheet ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 100; background: rgba(26, 26, 26, 0); display: flex; align-items: flex-end; justify-content: center; transition: background .18s; }
.sheet-back.open { background: rgba(26, 26, 26, .45); }
.sheet {
  background: #fff; width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column;
  transform: translateY(24px); opacity: 0; transition: transform .18s, opacity .18s;
}
.sheet-back.open .sheet { transform: none; opacity: 1; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px 8px 18px; border-bottom: 1px solid var(--line); }
.sheet-body { padding: 16px 18px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
.lead { font-size: 16px; }
@media (min-width: 720px) {
  .sheet-back { align-items: center; }
  .sheet { width: 560px; max-height: 86vh; border-radius: 20px; }
  .sheet.wide { width: 820px; }
}

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translate(-50%, -20px); opacity: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; font-size: 14px; pointer-events: none; transition: .2s; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--brand-ink); }

/* ---------- empty & loading ---------- */
.empty { text-align: center; padding: 34px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .ic { color: #C9C0B6; }
.empty p:first-of-type { font-weight: 700; color: var(--ink); }
.loading { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.loading::after { content: ''; width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--brand); animation: spin .8s linear infinite; }

/* ---------- auth & public ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; position: relative; overflow: hidden; background: #fff; }
.auth::before { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: var(--orange); right: -170px; bottom: -190px; }
.auth::after { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: var(--orange-soft); left: -40px; top: -40px; }
.auth-box { position: relative; z-index: 1; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.auth-box h1 { font-size: 22px; }
.auth .credit { position: relative; z-index: 1; margin-top: 28px; }
.credit { font-size: 12px; color: var(--faint); text-align: center; }
.demo-box { border: 1.5px dashed var(--orange); border-radius: 14px; padding: 12px; background: #FFF8F3; }
.pub-hero { background: #fff; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.pub-hero::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: var(--orange); right: -110px; top: -140px; }
.pub-hero .in { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 18px 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.pub-main { max-width: 1080px; margin: 0 auto; padding: 16px; }

/* ---------- print-friendly fallbacks ---------- */
@media print {
  .topbar, .bottomnav, .sidenav, .orderbar, .btn, .icon-btn { display: none !important; }
  .main { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

.allergens { font-size: 12px; color: var(--warn); font-weight: 600; }
.menu-info { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; margin-bottom: 12px; }
.menu-info summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; list-style: none; }
.menu-info summary::-webkit-details-marker { display: none; }
.menu-info summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.menu-info[open] summary::after { content: '▴'; }

.install-banner { display: flex; align-items: center; gap: 10px; margin: 10px 16px 0; padding: 10px 6px 10px 14px; border-radius: 14px; background: var(--orange-soft); color: var(--warn); }
.install-banner b { color: var(--ink); }
@media (min-width: 960px) { .install-banner { display: none; } }
ol.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
ol.steps li { padding-left: 4px; }
ol.steps li::marker { font-weight: 800; color: var(--brand); }
.timeline { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tl { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 22px; font-size: 13px; font-weight: 700; background: #EFEBE6; color: var(--faint); }
.tl.done { background: var(--green-soft); color: var(--green); }
.tl.now { background: var(--ink); color: #fff; }
/* company: order status card (sent → accepted → ready → out) */
.ostatus { border: 1px solid var(--line); border-left: 4px solid var(--faint); border-radius: 14px; background: #fff; padding: 12px 14px; margin-bottom: 12px; }
.ostatus.s-sent, .ostatus.s-changed { border-left-color: #C2620F; background: #FFF8F2; }
.ostatus.s-accepted, .ostatus.s-ready { border-left-color: var(--green); background: #F5FBF6; }
.ostatus.s-out { border-left-color: var(--green); background: var(--green-soft); }
.os-head { display: flex; gap: 10px; align-items: flex-start; }
.os-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.s-accepted .os-ic, .s-ready .os-ic, .s-out .os-ic { background: var(--green-soft); color: var(--green); }
.s-out .os-ic { background: #fff; }
.os-title { font-weight: 800; font-size: 16px; line-height: 1.25; }
.os-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.os-hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.os-hint a { color: var(--brand-ink); font-weight: 700; }
.os-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; position: relative; }
.os-steps li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; position: relative; font-size: 12px; color: var(--faint); }
.os-steps li::before { content: ''; position: absolute; top: 9px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.os-steps li:first-child::before { display: none; }
.os-steps li.done::before, .os-steps li.now::before { background: var(--green); }
.os-dot { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #D8D2CA; background: #fff; display: grid; place-items: center; color: #fff; }
.os-steps li.done .os-dot { background: var(--green); border-color: var(--green); }
.os-steps li.now .os-dot { border-color: #C2620F; }
.os-steps li.now .os-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #C2620F; animation: ospulse 1.6s ease-in-out infinite; }
.os-l { font-weight: 700; }
.os-steps li.done .os-l { color: var(--ink); }
.os-steps li.now .os-l { color: var(--warn); }
.os-t { font-size: 11px; font-variant-numeric: tabular-nums; }
@keyframes ospulse { 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .os-steps li.now .os-dot::after { animation: none; } }
.status-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

/* company cash book */
.daynav { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 8px; margin-bottom: 12px; }
.daynav .icon-btn:disabled { opacity: .3; }
.cashrow { gap: 10px; align-items: center; }
.cashrow.paid .main-t { color: var(--muted); }
.paybtn { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 6px 12px; border-radius: 20px; border: 1.5px dashed #CFC7BD; background: #fff; color: var(--faint); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.paybtn.on { border: 1.5px solid var(--green); background: var(--green-soft); color: var(--green); }
.paybtn:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }
.cashperson { cursor: pointer; gap: 10px; align-items: center; }
.cashdays { padding: 4px 0 12px 12px; border-left: 3px solid var(--brand-soft); margin: 0 0 6px 6px; }
.cash-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cash-top .num { white-space: nowrap; }

/* company statistics: bar chart */
.bars { display: flex; align-items: stretch; gap: 4px; height: 170px; overflow-x: auto; padding-bottom: 2px; }
.bar-col { flex: 1 0 22px; min-width: 22px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.bar-v { font-size: 9px; font-weight: 700; color: var(--muted); white-space: nowrap; height: 12px; }
.bar-track { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; background: #F4F0EB; border-radius: 6px 6px 3px 3px; overflow: hidden; }
.bar-fill { width: 100%; background: var(--brand); border-radius: 6px 6px 0 0; }
.bar-col.planned .bar-fill { background: #F0B3A6; }
.bar-l { font-size: 10px; font-weight: 700; color: var(--faint); text-align: center; line-height: 1.15; }
.pick-person { padding: 10px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.maplink { display: inline-flex; align-items: center; gap: 3px; color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-decoration-color: #E9B8AC; text-underline-offset: 2px; }
.maplink .ic, .maplink svg { flex: none; }
.tellink { color: inherit; font-weight: 600; }
.oc-contact { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; }
