:root {
  --bg: #f7f2ea;
  --card: #ffffff;
  --ink: #241f1b;
  --muted: #8c8073;
  --accent: #7c5738;
  --accent-dark: #5c3f27;
  --line: #e7ddcf;
  --ok: #4c7a4c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

header.topbar {
  position: sticky;
  top: 0;
  background: var(--card);
  color: var(--ink);
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

header.topbar h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

header.topbar .tagline {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

header.topbar .sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 120px;
}

.category {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 20px 0 8px;
}

.item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.item .name {
  font-weight: 600;
  font-size: 15px;
}

.item .desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 3px 0;
  max-width: 320px;
}

.item .price {
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  margin-top: 4px;
}

.item {
  align-items: flex-start;
}

.item .qty-control {
  flex-shrink: 0;
  margin-left: 12px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-control button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 16px;
  cursor: pointer;
}

.qty-control button.add {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.qty-control .qty {
  min-width: 18px;
  text-align: center;
  font-weight: 600;
}

.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent-dark);
  color: #fff;
  padding: 14px 20px;
  display: none;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.cart-bar.visible { display: flex; }

.cart-bar .total { font-weight: 700; }
.cart-bar .cta { font-weight: 600; }

.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
}

.sheet-overlay.open { display: flex; }

.sheet {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 16px 16px 0 0;
  padding: 20px;
  max-height: 80vh;
  overflow-y: auto;
}

.sheet h2 {
  margin-top: 0;
  font-size: 17px;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  padding: 14px 0;
  font-size: 16px;
}

button.primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  margin-top: 8px;
  cursor: pointer;
}

.status-page {
  max-width: 420px;
  margin: 60px auto;
  text-align: center;
  padding: 0 20px;
}

.status-page .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin: 12px 0;
}

.status-steps {
  display: flex;
  justify-content: space-between;
  margin: 24px 0;
  font-size: 12px;
  color: var(--muted);
}

.status-steps .step.done {
  color: var(--ok);
  font-weight: 700;
}

.order-summary {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-top: 16px;
}

/* Dashboard */
.board {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.order-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.order-card .meja {
  font-weight: 800;
  font-size: 16px;
}

.order-card .time {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.order-card ul {
  margin: 8px 0;
  padding-left: 18px;
  font-size: 14px;
}

.order-card .total {
  font-weight: 700;
  margin: 8px 0;
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
}

.badge.baru { background: #b0413e; }
.badge.diproses { background: #c07a2b; }
.badge.diantar { background: #3b6fb5; }
.badge.selesai { background: var(--ok); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
}
