:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --panel: #ffffff;
  --ink: #17211b;
  --muted: #647067;
  --line: #d8e0da;
  --accent: #0b7a53;
  --accent-strong: #075f41;
  --danger: #a83c30;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  min-height: 42px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  border-color: var(--line);
  background: #edf1ee;
  color: var(--muted);
  cursor: not-allowed;
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0 22px;
  border-bottom: 1px solid var(--line);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  letter-spacing: 0;
}

p,
.muted {
  color: var(--muted);
}

.status {
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.status.ok {
  border-color: #9ed2bd;
  color: var(--accent-strong);
}

.status.error {
  border-color: #e3afa7;
  color: var(--danger);
}

.action-band {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.menu-panel {
  grid-row: span 2;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 160px;
  padding: 16px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.list {
  display: grid;
  gap: 10px;
}

.dish,
.cart-line,
.kds-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.dish:first-child,
.cart-line:first-child,
.kds-line:first-child {
  border-top: 0;
}

.dish h3,
.kds-line h3 {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: 0;
}

.dish p,
.kds-line p {
  font-size: 14px;
}

.price,
#cartTotal,
#orderState {
  font-weight: 800;
}

.dish-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #fbfcfb;
}

.sla-green {
  border-color: #9ed2bd;
  color: var(--accent-strong);
}

.sla-amber {
  border-color: #e0be68;
  color: #755400;
}

.sla-red {
  border-color: #e3afa7;
  color: var(--danger);
}

.kds-actions {
  display: grid;
  gap: 8px;
  min-width: 96px;
}

pre {
  min-height: 120px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-radius: 6px;
  background: #101714;
  color: #d9efe5;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .app-shell {
    padding: 16px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .status {
    text-align: left;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}
