:root {
  --bg: #eeeef1;
  --surface: #f6f6f8;
  --card: #ffffff;
  --ink: #16181d;
  --ink-2: #5f646d;
  --ink-3: #9a9ea6;
  --line: #ececee;
  --brand: #3b7be8;
  --brand-300: #5b93ee;
  --brand-soft: #f2f6fe;
  --ok: #1f8a4c;
  --ok-soft: #e8f6ee;
  --no: #c2412d;
  --no-soft: #fcebe8;
  --wait: #a86b00;
  --wait-soft: #fdf3e1;
  --r-lg: 24px;
  --r-md: 14px;
  --r-pill: 999px;
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- layout ---------- */
.app {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 16px;
  min-height: 100vh;
  padding: 16px;
  max-width: 1240px;
  margin: 0 auto;
}
.sidebar {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 22px 14px;
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.brand { margin: 0 8px 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand::before {
  content: ""; width: 22px; height: 22px; border-radius: 7px; flex: none;
  background:
    radial-gradient(circle at 30% 30%, var(--ink) 0 3px, transparent 3.5px),
    radial-gradient(circle at 70% 30%, var(--brand-300) 0 3px, transparent 3.5px),
    radial-gradient(circle at 30% 70%, var(--brand-300) 0 3px, transparent 3.5px),
    radial-gradient(circle at 70% 70%, var(--ink) 0 3px, transparent 3.5px);
}
.brand .kicker { display: none; }
.brand h1 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -.3px; }
.brand p { margin: 0; width: 100%; color: var(--ink-3); font-size: 12px; padding-left: 32px; margin-top: -8px; }

.dinner-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dinner-btn {
  width: 100%; text-align: left; border: 0; background: transparent;
  border-radius: var(--r-md); padding: 10px 12px; cursor: pointer;
  display: grid; gap: 1px; transition: background .15s;
}
.dinner-btn:hover:not(.active) { background: var(--surface); }
.dinner-btn.active { background: var(--surface); }
.dinner-btn.active .d-title { color: var(--ink); }
.dinner-btn .d-date { font-size: 11px; color: var(--ink-3); }
.dinner-btn .d-date::first-letter { text-transform: uppercase; }
.dinner-btn.active .d-date { color: var(--brand); }
.dinner-btn .d-title { font-size: 14px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.dinner-btn .d-sub { font-size: 12px; color: var(--ink-3); }
.dinner-btn .d-meta { font-size: 11px; color: var(--ink-3); }

.sidebar-foot { margin-top: auto; padding: 16px 10px 0; font-size: 12px; color: var(--ink-3); }

.main {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 36px 40px 48px;
  min-width: 0;
}

/* ---------- header ---------- */
.d-head .kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-2); background: var(--surface);
  border-radius: var(--r-pill); padding: 4px 12px 4px 10px;
}
.d-head .kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.d-head h2 { font-weight: 600; font-size: 34px; line-height: 1.1; margin: 14px 0 4px; letter-spacing: -1px; }
.d-head .sub { color: var(--ink-2); margin: 0; font-size: 15px; }
.d-head .chefs { margin-top: 6px; color: var(--ink-2); font-size: 13px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 22px 0 4px; }
.stat {
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px 14px; font-size: 12px; color: var(--ink-2); display: grid;
}
.stat b { color: var(--ink); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; order: -1; letter-spacing: -.5px; }

/* ---------- cards & forms ---------- */
.card {
  background: var(--surface); border-radius: var(--r-lg); padding: 22px;
}
.section-title { font-size: 17px; font-weight: 600; margin: 34px 0 12px; letter-spacing: -.3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
input[type=text], input[type=email], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-size: 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 72px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-300); box-shadow: 0 0 0 3px var(--brand-soft); }
.actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.btn {
  border: 0; border-radius: var(--r-pill); padding: 0 22px; height: 42px; font-size: 14px; font-weight: 500; cursor: pointer;
  background: var(--ink); color: #fff; transition: opacity .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { opacity: .88; }
.btn[disabled] { opacity: .5; cursor: wait; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--no); border: 1px solid var(--line); }
.hint { font-size: 12px; color: var(--ink-3); margin-right: auto; }

/* ---------- requests ---------- */
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.req {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: start;
}
.req .item { font-weight: 600; font-size: 15px; letter-spacing: -.2px; }
.req .qty { color: var(--ink-2); font-weight: 400; }
.req .notes { grid-column: 1 / -1; color: var(--ink-2); font-size: 13px; white-space: pre-wrap; }
.req .meta { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.req .admin-note { grid-column: 1 / -1; font-size: 13px; background: var(--surface); border-radius: 10px; padding: 8px 12px; color: var(--ink-2); }
.right { text-align: right; display: grid; gap: 4px; justify-items: end; }
.price { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

.tag {
  display: inline-flex; align-items: center; background: var(--tag-bg, var(--brand-soft)); color: var(--tag-fg, var(--brand));
  border-radius: var(--r-pill); padding: 2px 10px; font-size: 12px; font-weight: 500;
}
.tag::before { content: "@"; opacity: .6; margin-right: 1px; }

.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--r-pill); padding: 3px 10px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.in_attesa { background: var(--wait-soft); color: var(--wait); }
.pill.disponibile { background: var(--ok-soft); color: var(--ok); }
.pill.non_disponibile { background: var(--no-soft); color: var(--no); }

.empty {
  background: var(--surface); border-radius: var(--r-md); padding: 28px; text-align: center; color: var(--ink-3); font-size: 13px;
}

/* ---------- gate / messages ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.gate .card { background: var(--card); max-width: 420px; width: 100%; text-align: center; padding: 36px 28px; }
.gate h1 { font-size: 26px; font-weight: 600; letter-spacing: -.8px; margin: 12px 0 8px; }
.gate p { color: var(--ink-2); margin: 0 0 6px; }
.gate .kicker { display: inline-block; font-size: 12px; color: var(--ink-2); background: var(--surface); border-radius: var(--r-pill); padding: 4px 12px; }
.gate form { margin-top: 18px; display: grid; gap: 10px; text-align: left; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--r-pill); font-size: 13px;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--no); }

.hidden { display: none !important; }

/* ---------- admin specifics ---------- */
.admin-req { grid-template-columns: 1fr; }
.admin-controls { display: grid; grid-template-columns: 1.2fr .8fr 2fr auto; gap: 8px; align-items: end; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.admin-controls label { font-size: 11px; }
.admin-controls input, .admin-controls select { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: var(--r-pill); padding: 5px 14px; font-size: 12px; cursor: pointer; color: var(--ink-2);
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.badge { background: var(--brand-300); color: #fff; border-radius: var(--r-pill); font-size: 10px; padding: 1px 7px; font-weight: 600; margin-left: auto; }


/* ---------- list header, chef tags ---------- */
.chef-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chef-tags .tag::before { content: ""; margin: 0; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.list-head .section-title { margin: 0; }

/* ---------- dialog / sheet ---------- */
.sheet {
  border: 0; padding: 0; border-radius: var(--r-lg); width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px); background: var(--card); color: var(--ink);
}
.sheet::backdrop { background: rgba(22, 24, 29, .35); backdrop-filter: blur(2px); }
.sheet form { padding: 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 16px; }
.sheet-head h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.4px; }
.sheet-sub { margin: 2px 0 0; color: var(--ink-3); font-size: 12px; }
.icon-btn {
  border: 0; background: var(--surface); width: 34px; height: 34px; border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-2); flex: none;
}
.icon-btn:hover { background: var(--line); }
.chef-pick { border: 0; margin: 0 0 14px; padding: 0; }
.chef-pick legend { font-size: 12px; color: var(--ink-2); font-weight: 500; padding: 0; margin-bottom: 8px; }
.chef-options { display: flex; flex-wrap: wrap; gap: 6px; }
.chef-opt { display: inline-flex; cursor: pointer; }
.chef-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chef-opt span {
  display: inline-flex; align-items: center; border: 1px solid transparent; background: var(--tag-bg, var(--surface)); color: var(--tag-fg, var(--ink-2));
  border-radius: var(--r-pill); padding: 7px 14px; font-size: 13px; font-weight: 500; transition: all .15s;
}
.chef-opt span::before { content: "@"; opacity: .5; margin-right: 1px; }
.chef-opt:hover span { border-color: var(--tag-fg, var(--brand-300)); }
.chef-opt input:checked + span { background: var(--tag-fg, var(--brand)); border-color: var(--tag-fg, var(--brand)); color: #fff; }
.chef-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }

@media (max-width: 860px) {
  .sheet {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0;
    max-height: 92dvh;
  }
  .sheet form { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .sheet .actions .hint { width: 100%; }
  .sheet .actions .btn { flex: 1; }
  .list-head .btn { height: 38px; padding: 0 16px; }
}

/* ---------- single-line request rows ---------- */
.req-row {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px 14px; white-space: nowrap; cursor: default; font-size: 14px;
}
.req-row:hover { border-color: #dcdce0; }
.req-row:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.req-row { overflow: hidden; }
.req-row > * { flex: none; }
.req-row .tag, .req-row .item, .req-row .qty { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.req-row .tag, .req-row .item, .req-row .qty { flex-shrink: 0; }
.req-row .item { font-weight: 600; letter-spacing: -.2px; max-width: 32%; overflow: hidden; text-overflow: ellipsis; }
.req-row .qty { color: var(--ink-2); max-width: 16%; overflow: hidden; text-overflow: ellipsis; }
.req-row .qty::before { content: "·"; margin-right: 8px; color: var(--ink-3); }
.req-row .notes { flex: 1 1 0; min-width: 0; color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.req-row .notes b { font-weight: 500; color: var(--ink-2); }
.req-row .date { color: var(--ink-3); font-size: 12px; }
.req-row .price { font-weight: 600; font-variant-numeric: tabular-nums; }
.req-row.open { flex-wrap: wrap; white-space: normal; }
.req-row.open .item, .req-row.open .qty { max-width: none; }
.req-row.open .notes { flex-basis: 100%; order: 10; white-space: pre-wrap; }

.req-row .row-actions { display: inline-flex; gap: 2px; margin-left: 2px; }
.row-btn {
  border: 0; background: transparent; color: var(--ink-3); width: 30px; height: 30px; border-radius: 50%;
  display: inline-grid; place-items: center; cursor: pointer; transition: background .15s, color .15s;
}
.row-btn:hover { background: var(--surface); color: var(--ink); }
.row-btn.danger:hover { background: var(--no-soft); color: var(--no); }
.row-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.edit-hint { font-size: 12px; color: var(--wait); background: var(--wait-soft); border-radius: 10px; padding: 8px 12px; margin: 12px 0 0; }

/* ---------- activity log ---------- */
.log-wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.back-link { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.back-link:hover { color: var(--ink); }
.log-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.log-head h2 { font-size: 30px; font-weight: 600; letter-spacing: -1px; margin: 0 0 4px; }
.log-head .sub { color: var(--ink-2); margin: 0; max-width: 560px; font-size: 13px; }
.log-tools { display: flex; gap: 8px; }
.log-filters { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 24px 0 12px; }
.log-filters .filters { margin: 0; }
.log-selects { display: flex; gap: 8px; flex-wrap: wrap; }
.log-selects select, .log-selects input { width: auto; min-width: 180px; padding: 8px 12px; font-size: 14px; border-radius: var(--r-pill); }
.log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.log-row { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 4px; background: var(--card); }
.log-row.created { border-left-color: var(--ok); }
.log-row.edited { border-left-color: var(--wait); }
.log-row.deleted { border-left-color: var(--no); }
.log-row.restored { border-left-color: var(--brand); }
.log-main { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; }
.log-main .item { font-weight: 600; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.log-dinner { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.log-time { margin-left: auto; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }
.act { font-size: 11px; font-weight: 600; border-radius: var(--r-pill); padding: 2px 9px; flex: none; background: var(--surface); color: var(--ink-2); }
.act.created { background: var(--ok-soft); color: var(--ok); }
.act.edited { background: var(--wait-soft); color: var(--wait); }
.act.deleted { background: var(--no-soft); color: var(--no); }
.act.restored { background: var(--brand-soft); color: var(--brand); }
.log-detail { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.log-detail:empty { display: none; }
.chg b { font-weight: 500; color: var(--ink-3); margin-right: 2px; }
.chg s { color: var(--no); text-decoration-color: rgba(194, 65, 45, .5); }
.chg ins { color: var(--ok); text-decoration: none; font-weight: 500; }
.muted { color: var(--ink-3); }
.log-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); min-height: 34px; }
.log-meta .btn { white-space: nowrap; flex: none; }
.ip { font-variant-numeric: tabular-nums; }
.log-foot { color: var(--ink-3); font-size: 12px; text-align: center; margin: 16px 0 0; }
.admin-links { display: grid; gap: 6px; }
.admin-links a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 13px; padding: 8px 10px; border-radius: 10px; }
.admin-links a:hover { background: var(--surface); color: var(--ink); }

/* ---------- admin: supplier lines ---------- */
.offers-box { margin-top: 10px; padding: 12px; background: var(--surface); border-radius: 12px; display: grid; gap: 8px; }
.offers-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.offers-head .hint { font-weight: 400; margin: 0; }
.offers { display: grid; gap: 8px; }
.offers:empty { display: none; }
.offers-box > .btn { justify-self: start; }
.offer { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.offer-photo { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--surface); border: 1px dashed #d6d7dc; display: grid; place-items: center; cursor: pointer; }
.offer-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.offer-photo .ph { font-size: 11px; color: var(--ink-3); text-align: center; line-height: 1.2; padding: 4px; }
.offer.uploading .offer-photo { opacity: .6; cursor: wait; }
.offer-fields { display: grid; grid-template-columns: 1.1fr 1.3fr .7fr .7fr; gap: 6px; min-width: 0; }
.offer-fields input { padding: 7px 10px; font-size: 14px; border-radius: 8px; min-width: 0; }
.offer-fields .offer-note { grid-column: 1 / -1; }
.offer-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.offer-pick input { width: 16px; height: 16px; accent-color: var(--ok); }
.admin-controls { grid-template-columns: 1fr 2fr auto auto; }
.req-total { display: grid; justify-items: end; font-size: 11px; color: var(--ink-3); padding-bottom: 4px; }
.req-total b { font-size: 17px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.req-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.unsaved { visibility: hidden; font-size: 12px; color: var(--wait); font-weight: 500; }
.req[data-dirty] { border-color: #f0d9a6; }
.req[data-dirty] .unsaved { visibility: visible; }

/* ---------- chef page: offer details ---------- */
.req-row .photo-dot { color: var(--ink-3); display: inline-flex; }
.req-row .opts { font-size: 11px; color: var(--ink-3); background: var(--surface); border-radius: var(--r-pill); padding: 2px 8px; }
.req-row .offer-list { display: none; }
.req-row.open .offer-list { display: grid; flex-basis: 100%; order: 11; gap: 6px; margin-top: 4px; }
.offer-view { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 10px; padding: 6px 10px 6px 6px; font-size: 13px; white-space: normal; }
.offer-view.chosen { background: var(--ok-soft); }
.offer-view a { flex: none; display: block; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--card); }
.offer-view img { width: 100%; height: 100%; object-fit: cover; display: block; }
.offer-view .ov-main { flex: 1; min-width: 0; }
.offer-view .ov-main b { font-weight: 600; }
.offer-view .ov-note { color: var(--ink-2); font-size: 12px; }
.offer-view .ov-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.offer-view .ov-chosen { font-size: 11px; color: var(--ok); font-weight: 600; }

/* ---------- per-chef accounting ---------- */
.chef-split-wrap { margin-top: 22px; }
.chef-split-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; flex-wrap: wrap; }
.chef-split-head h3 { white-space: nowrap; }
.chef-split-head h3 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -.2px; }
.chef-split-head .hint { margin: 0; }
.chef-split { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.chef-card {
  text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-md);
  padding: 10px 12px; display: grid; gap: 2px; cursor: pointer; border-top: 3px solid var(--tag-fg, var(--line));
  transition: background .15s, box-shadow .15s;
}
.chef-card:hover { background: var(--surface); }
.chef-card.on { background: var(--tag-bg, var(--surface)); box-shadow: 0 0 0 2px var(--tag-fg, var(--ink)) inset; }
.chef-card .cc-name { font-size: 13px; font-weight: 600; color: var(--tag-fg, var(--ink)); }
.chef-card .cc-total { font-size: 20px; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.chef-card .cc-meta { font-size: 11px; color: var(--ink-3); }
.filter-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); margin: -4px 0 10px; }
.filter-note button { border: 0; background: var(--surface); border-radius: var(--r-pill); padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--ink-2); }

/* ---------- units in admin lines ---------- */
.offer-fields { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.offer-fields [data-k=supplier], .offer-fields [data-k=product] { grid-column: span 3; }
.offer-fields .unit-field, .offer-fields .offer-note { grid-column: span 2; }
.unit-field select { max-width: 92px; }
.unit-field { display: flex; min-width: 0; }
.unit-field input { flex: 1 1 0; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.unit-field select { flex: none; width: auto; padding: 7px 6px; font-size: 13px; border-radius: 0 8px 8px 0; border-left: 0; background: var(--surface); color: var(--ink-2); }
.offer-side { display: grid; justify-items: end; gap: 6px; min-width: 120px; }
.line-total { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.line-total.warn { color: var(--no); }
.offer-view .ov-calc { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; padding: 10px; gap: 10px; }
  .sidebar { position: static; height: auto; padding: 16px 10px 10px; border-radius: 20px; }
  .brand { margin-bottom: 12px; }
  .dinner-list {
    grid-auto-flow: column; grid-auto-columns: minmax(170px, 62%); overflow-x: auto;
    scroll-snap-type: x mandatory; padding-bottom: 4px; gap: 6px;
  }
  .dinner-list li { scroll-snap-align: start; }
  .dinner-btn { border: 1px solid var(--line); }
  .dinner-btn.active { border-color: var(--surface); }
  .sidebar-foot { display: none; }
  .main { padding: 24px 16px 32px; border-radius: 20px; }
  .d-head h2 { font-size: 27px; }
  .log-wrap { padding: 10px; }
  .log-head h2 { font-size: 24px; }
  .log-selects, .log-selects select, .log-selects input { width: 100%; }
  .log-main { flex-wrap: wrap; white-space: normal; }
  .log-time { margin-left: 0; width: 100%; }
  .req-row { gap: 8px; padding: 10px 12px; font-size: 13px; }
  .req-row .date { display: none; }
  .req-row .item { max-width: none; }
  .req-row .qty { max-width: 22%; }
  .req-row .notes { display: none; }
  .req-row.open .notes { display: block; }
  .req-row .tag { flex-shrink: 1; max-width: 34%; }
  .req-row .qty { flex-shrink: 3; }
  .req-row .item { flex-shrink: 1; }
  .req-row .row-actions { display: none; }
  .req-row.open .row-actions { display: inline-flex; margin-left: auto; }
  .req-row .price { margin-left: auto; }
  .req-row .pill { margin-left: auto; }
  .req-row .price + .pill { margin-left: 0; }
  .req-row .pill { padding: 3px 8px; }
  .req-row .row-actions { gap: 0; margin-left: 0; }
  .row-btn { width: 28px; height: 28px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .stat { padding: 8px 10px; font-size: 11px; }
  .stat b { font-size: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: 20px; }
  .admin-controls { grid-template-columns: 1fr 1fr; }
  .offer { grid-template-columns: 56px 1fr auto; }
  .offer-photo { width: 56px; height: 56px; }
  .offer-fields { grid-template-columns: 1fr 1fr; grid-column: 2 / -1; }
  .offer-fields [data-k=supplier], .offer-fields [data-k=product], .offer-fields .unit-field { grid-column: 1 / -1; }
  .offer-side { grid-column: 1 / 3; justify-items: start; min-width: 0; }
  .offer-side .line-total { text-align: left; }
  .chef-split { grid-template-columns: 1fr 1fr; }
  .offer > .row-btn { grid-column: 3; grid-row: 2; justify-self: end; }
  .req-total { justify-items: start; }
  .admin-controls .note-field { grid-column: 1 / -1; }
  .admin-controls .btn { grid-column: 1 / -1; }
}
