:root {
  --bg: #f5f6f8; --card: #fff; --text: #1d2330; --muted: #6b7280; --line: #e3e6eb;
  --accent: #7000ff; --accent-weak: #f0e8ff; --ok: #16794c; --ok-weak: #e3f5ec;
  --warn: #9a5b00; --warn-weak: #fff4e0; --bad: #b42318; --bad-weak: #fdeceb;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #eef0f3; padding: 1px 4px; border-radius: 4px; font-size: 12px; }
pre { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 8px; overflow: auto; font-size: 12px; max-height: 480px; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; }
.topbar { display: flex; align-items: center; gap: 20px; padding: 0 20px; height: 52px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--accent); white-space: nowrap; }
.topbar nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; }
.topbar nav a { padding: 6px 10px; border-radius: 6px; color: var(--text); white-space: nowrap; }
.topbar nav a.on { background: var(--accent-weak); color: var(--accent); }
main { padding: 20px; max-width: 1280px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
label input:not([type=checkbox]), label select, label textarea { display: block; width: 100%; margin-top: 3px; color: var(--text); }
label small { display: block; }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > label { flex: 1; min-width: 120px; }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
textarea { resize: vertical; }
button { font: inherit; padding: 7px 14px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; }
button:hover { filter: brightness(1.1); }
button[disabled] { opacity: .5; cursor: default; }
button.link { background: none; color: var(--accent); padding: 0; }
button.danger { background: var(--bad); }
button.link.danger { background: none; color: var(--bad); }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0 12px; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #fafbfc; font-weight: 600; font-size: 12px; color: var(--muted); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.inactive td { opacity: .55; }
tr.err td { background: var(--bad-weak); }
.thumb { width: 48px; }
.thumb img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; display: block; }
img.preview { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; margin-bottom: 8px; }
input.price { width: 110px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input { min-width: 260px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; color: var(--text); }
.tile b { display: block; font-size: 26px; }
.tile span { color: var(--muted); }
.tile.warn { border-color: var(--warn); background: var(--warn-weak); }
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 8px 12px; border-radius: 8px; margin-bottom: 6px; }
.checklist .bad { background: var(--bad-weak); }
.checklist .warn { background: var(--warn-weak); }
.checklist .info { background: var(--accent-weak); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: var(--ok-weak); color: var(--ok); }
.flash.error { background: var(--bad-weak); color: var(--bad); }
.flash.warn { background: var(--warn-weak); color: var(--warn); }
.tag { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #eef0f3; font-size: 11px; color: var(--muted); }
.tag.ok { background: var(--ok-weak); color: var(--ok); }
.status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #eef0f3; }
.s-NEW { background: var(--warn-weak); color: var(--warn); }
.s-ACCEPTED_BY_RESTAURANT, .s-COOKING, .s-READY { background: var(--accent-weak); color: var(--accent); }
.s-TAKEN_BY_COURIER, .s-DELIVERED { background: var(--ok-weak); color: var(--ok); }
.s-CANCELLED { background: var(--bad-weak); color: var(--bad); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.warn-text { color: var(--bad); }
.pager { display: flex; gap: 8px; flex-wrap: wrap; }
.login { max-width: 360px; margin: 80px auto; }
.logout { margin: 0; }
.nowrap { white-space: nowrap; }
