/* M Desk demo — content components shared by the six sidebar designs.
   Every colour is a token; each design's styles.css sets the tokens and
   builds its own sidebar. Nothing in here knows what the sidebar looks like. */
:root {
  --bg: #f3f4f6; --card: #ffffff; --ink: #17181c; --muted: #6b6f78; --line: #e6e7eb;
  --accent: #e07a2f; --accent-ink: #fff; --ok: #2f9e6a; --warn: #d9a52a; --bad: #d64545;
  --radius: 14px; --shadow: 0 1px 2px #0000000a, 0 8px 24px -16px #00000033;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.45; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

/* ── topbar (inside the content column) ── */
.top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.top h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-right: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip.warn i { background: var(--warn); }

/* ── grid ── */
.view { display: grid; gap: 16px; }
.view > * { min-width: 0; }   /* grid items default to min-width:auto and would stretch to their content */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.r2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; }
.r3 { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 16px; }
@media (max-width: 980px) { .kpis { grid-template-columns: repeat(2, 1fr); } .r2, .r3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card h3 .seg { margin-left: auto; }
.kpi b { display: block; margin-top: 8px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.kpi small.up { color: var(--ok); } .kpi small.down { color: var(--bad); }
.seg { display: inline-flex; padding: 3px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; text-transform: none; letter-spacing: 0; transition: background-color 200ms, color 200ms; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px #0002; }

/* ── charts ── */
.line-chart { width: 100%; height: 180px; margin-top: 10px; overflow: visible; }
.line-chart .area { fill: url(#areaFill); } .line-chart .ln { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.line-chart .gridl { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); }
.donut-wrap { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: center; margin-top: 8px; }
.donut { width: 130px; height: 130px; overflow: visible; }
.donut circle { fill: none; stroke-width: 20; cursor: pointer; transition: transform 240ms cubic-bezier(.22,.61,.36,1), opacity 200ms; }
.donut.pick circle:not(.out) { opacity: .4; } .donut circle.out { transform: translate(var(--dx), var(--dy)); }
.donut text { text-anchor: middle; fill: var(--ink); font-weight: 700; font-size: 15px; } .donut .sub { font-size: 8px; fill: var(--muted); font-weight: 500; letter-spacing: .08em; }
.legend { display: grid; gap: 6px; font-size: 12.5px; }
.legend div { display: flex; align-items: center; gap: 8px; cursor: pointer; transition: opacity 200ms; } .legend.pick div:not(.on) { opacity: .45; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); } .legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.hours { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 14px; border-bottom: 1px solid var(--line); }
.hours i { flex: 1; height: var(--h); background: color-mix(in srgb, var(--accent) 35%, var(--card)); border-radius: 4px 4px 0 0; transition: background-color 200ms, height 500ms cubic-bezier(.22,.61,.36,1); position: relative; }
.hours i.peak { background: var(--accent); }
.hours i::after { content: attr(data-h); position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 5px; font-size: 10px; color: var(--muted); font-style: normal; }
.hours-pad { height: 18px; }

/* ── lists ── */
.dishes { display: grid; gap: 10px; margin-top: 12px; }
.dish { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; }
.dish img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; background: var(--line); }
.dish span { display: block; font-size: 11.5px; color: var(--muted); } .dish b { font-variant-numeric: tabular-nums; }
.dish .bar { grid-column: 2 / 4; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; } .dish .bar i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 2px; transform-origin: left; animation: growx 600ms cubic-bezier(.22,.61,.36,1) both; }
@keyframes growx { from { transform: scaleX(0); } }
table.recent { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
table.recent td { padding: 9px 4px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.recent td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
table.recent tr:first-child td { border-top: 0; }
.tag { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--c, var(--muted)) 14%, transparent); color: var(--c, var(--muted)); }

/* ── orders board ── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.order { border-left: 4px solid var(--c); display: grid; gap: 10px; animation: rise 400ms cubic-bezier(.22,.61,.36,1) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.order .head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .order .head b { font-size: 15px; letter-spacing: -.01em; margin-right: 2px; } .order .head .t { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.order ul { list-style: none; font-size: 13px; color: var(--ink); display: grid; gap: 3px; } .order li { display: flex; gap: 8px; } .order li span { color: var(--muted); min-width: 22px; }
.order .foot { display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); } .order .foot b { margin-right: auto; }
.btn { height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 12px; font-weight: 600; transition: transform 120ms; } .btn:active { transform: scale(.96); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.order.done { opacity: .55; }

/* ── menu ── */
.menu-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; min-width: 0; }
.search { flex: 1 1 220px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font: inherit; color: inherit; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; min-width: 0; flex: 1 1 100%; } .cats::-webkit-scrollbar { display: none; }
.cats .chip { height: 28px; font-size: 12px; cursor: pointer; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.prod { padding: 0; overflow: hidden; display: grid; grid-template-rows: 120px auto; transition: opacity 200ms; } .prod img { width: 100%; height: 120px; object-fit: cover; display: block; }
.prod .pb { padding: 10px 12px 12px; } .prod .pb small { display: block; font-size: 11px; color: var(--muted); } .prod .pb h4 { font-size: 13.5px; font-weight: 600; line-height: 1.3; margin-top: 2px; min-height: 2.6em; }
.prod .pr { display: flex; align-items: center; margin-top: 6px; } .prod .pr b { font-variant-numeric: tabular-nums; } .prod .pr button { margin-left: auto; height: 24px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line); background: transparent; font-size: 11px; font-weight: 600; }
.prod.out img { filter: grayscale(1) brightness(.85); } .prod.out .pr button { background: var(--bad); color: #fff; border-color: transparent; }
.stub { display: grid; place-items: center; min-height: 320px; text-align: center; color: var(--muted); } .stub b { display: block; color: var(--ink); font-size: 20px; margin-bottom: 6px; }
.note { font-size: 11.5px; color: var(--muted); margin-top: 18px; }
@media (prefers-reduced-motion: reduce) { .order, .dish .bar i { animation: none; } .donut circle, .hours i { transition: none; } }
