:root {
  --navy: #163852;
  --pink: #ee9ab2;
  --bg: #f4f1ee;
  --card: #fff;
  --text: #1a2330;
  --muted: #6b7280;
  --line: #e6e1dc;
  --ok: #1f7a4d;
  --warn: #b45309;
  --bad: #b42318;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app { max-width: 720px; margin: 0 auto; min-height: 100vh; padding-bottom: 88px; }

.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--navy); color: #fff;
  padding: 14px 16px 12px;
}
.top h1 { margin: 0; font-size: 18px; font-weight: 700; }
.top p { margin: 4px 0 0; font-size: 12px; opacity: .75; }
.shops { display: flex; gap: 8px; margin-top: 12px; }
.shops button {
  border: 0; border-radius: 999px; padding: 7px 12px;
  background: rgba(255,255,255,.12); color: #fff; font-weight: 600;
}
.shops button.active { background: var(--pink); color: var(--navy); }

.list { padding: 12px; display: grid; gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px;
}
.card[data-open] { cursor: pointer; }
.card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card-head strong { font-size: 16px; }
.meta { color: var(--muted); font-size: 13px; margin: 6px 0 10px; line-height: 1.45; }
.meta .mail { color: var(--navy); font-weight: 600; text-decoration: none; }
.items { margin: 0; padding: 0; display: grid; gap: 6px; }
.items.is-detail { gap: 12px; }
.item-line { font-weight: 700; font-size: 14px; }
.item-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.poke { display: grid; gap: 7px; }
.poke-row {
  display: grid;
  grid-template-columns: minmax(118px, 38%) 1fr;
  gap: 8px;
  align-items: start;
}
.poke-label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.poke-label svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  stroke: var(--navy);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.poke-vals { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f3eef1;
  color: var(--text);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.3;
}
.chip b { color: var(--navy); font-size: 11px; }
.poke-row.is-empty .chip { background: #f3f4f6; color: var(--muted); }

@media (max-width: 420px) {
  .poke-row { grid-template-columns: 1fr; gap: 4px; }
}

.badge {
  display: inline-block; border-radius: 999px; padding: 3px 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.badge.accepting, .badge.processing { background: #fff3d6; color: var(--warn); }
.badge.completed { background: #dcfce7; color: var(--ok); }
.badge.cancelled { background: #fee2e2; color: var(--bad); }
.badge.pickup { background: #e0e7ff; color: #3730a3; }
.badge.delivery { background: #fce7f3; color: #9d174d; }
.badge.online { background: #dcfce7; color: var(--ok); }
.badge.cod, .badge.delivery-pay { background: #fff3d6; color: var(--warn); }

.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.actions button, .btn {
  border: 0; border-radius: 10px; padding: 10px 12px; font-weight: 700; cursor: pointer;
}
.btn-ok { background: var(--ok); color: #fff; }
.btn-next { background: var(--navy); color: #fff; }
.btn-bad { background: #fff; color: var(--bad); border: 1px solid #fecaca; }
.btn-wide { width: 100%; background: var(--pink); color: var(--navy); }

.login { padding: 48px 20px; }
.login h2 { margin: 0 0 8px; }
.login input {
  width: 100%; margin: 12px 0; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px; font-size: 16px;
}
.err { color: var(--bad); font-size: 13px; min-height: 18px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 10px 0 14px;
}
.nav button {
  border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 700;
}
.nav button.on { color: var(--navy); }

.totals {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
}
.totals-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.totals-row.is-total {
  margin-top: 4px;
  color: var(--text);
  font-size: 15px;
}
.totals-row strong { font-variant-numeric: tabular-nums; }

.notes {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf8f6;
}
.notes summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after { content: "▾"; color: var(--muted); font-weight: 400; }
.notes[open] summary::after { content: "▴"; }
.notes summary span {
  margin-left: auto;
  margin-right: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  color: var(--muted);
}
.notes ul { margin: 0; padding: 0 12px 12px; list-style: none; display: grid; gap: 10px; }
.notes li p { margin: 0; font-size: 13px; line-height: 1.45; }
.notes li small { color: var(--muted); font-size: 11px; }

.detail { padding: 16px; }
.back { background: none; border: 0; color: var(--navy); font-weight: 700; padding: 0 0 12px; }
