:root {
  --bg: #0f172a; --panel: #1e293b; --panel2: #0b1220; --line: #334155;
  --text: #e2e8f0; --muted: #94a3b8; --brand: #6366f1; --brand2: #4f46e5;
  --ok: #34d399; --err: #f87171;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 18px; }
.powered { color: var(--muted); font-size: 13px; margin-right: auto; }
.cart-btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 600; }
.badge { background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 4px; }

.steps { display: flex; gap: 8px; list-style: none; margin: 0; padding: 16px 20px; flex-wrap: wrap; }
.steps li { color: var(--muted); font-size: 13px; padding: 6px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); }
.steps li.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.steps li.done { color: var(--ok); border-color: var(--ok); }

.container { max-width: 760px; margin: 0 auto; padding: 8px 20px 60px; }
.view { display: none; }
.view.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
h1 { font-size: 22px; margin: 8px 0 18px; }

.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.card .emoji { font-size: 38px; }
.card .name { font-weight: 700; margin: 8px 0 2px; }
.card .desc { color: var(--muted); font-size: 13px; min-height: 34px; }
.card .price { font-weight: 800; font-size: 18px; margin: 8px 0; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); font-size: 18px; cursor: pointer; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }
.add { width: 100%; margin-top: 10px; }

.lines { display: flex; flex-direction: column; gap: 10px; }
.line { display: flex; align-items: center; gap: 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.line .l-emoji { font-size: 26px; }
.line .l-name { font-weight: 600; }
.line .l-meta { color: var(--muted); font-size: 13px; }
.line .l-sub { margin-left: auto; font-weight: 700; }
.line .l-rm { background: transparent; border: 0; color: var(--err); cursor: pointer; font-size: 18px; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }

.total-row { display: flex; justify-content: space-between; align-items: center;
  margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.total { font-size: 22px; font-weight: 800; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.form input, .form textarea { background: var(--panel2); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; color: var(--text); font-size: 15px; }
.customer-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin: 14px 0; font-size: 14px; }
.customer-card b { color: var(--text); }

.actions { display: flex; gap: 10px; margin-top: 20px; }
button.primary { background: var(--brand); color: #fff; border: 0; border-radius: 10px;
  padding: 12px 18px; font-weight: 700; cursor: pointer; font-size: 15px; }
button.primary:hover { background: var(--brand2); }
button.primary:disabled { opacity: .5; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 18px; cursor: pointer; font-size: 15px; }

.paybox { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.paybox h2 { margin: 0 0 6px; }
.paybox .muted { color: var(--muted); }
.paybox pre { background: var(--panel2); border-radius: 10px; padding: 14px; overflow: auto;
  font-size: 12px; color: #cbd5e1; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.pending { background: rgba(99,102,241,.2); color: #a5b4fc; }
.pill.ok { background: rgba(52,211,153,.2); color: var(--ok); }
.note { background: rgba(99,102,241,.08); border: 1px dashed var(--brand);
  border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #c7d2fe; margin-top: 14px; }
