:root {
  --bg: #080d0a;
  --bg2: #0b1310;
  --panel: #101a15;
  --panel2: #142019;
  --line: #24352b;
  --text: #e9f2ec;
  --muted: #8fa398;
  --accent: #27c46b;
  --accent2: #16a34a;
  --gold: #f0c96a;
  --red: #ef4444;
  --blue: #6aa8ff;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 50% -12%, #15301f 0%, var(--bg) 58%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px, 5vw, 54px); line-height: 1.05; letter-spacing: -.03em; }
h2 { font-size: 19px; letter-spacing: -.01em; }
h3 { font-size: 16px; letter-spacing: -.01em; }
em { color: var(--accent); font-style: normal; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 22px 18px 60px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  background: rgba(8, 13, 10, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: -.01em; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2fbf68, #0f7a43);
  color: #04120a; font-weight: 900; font-size: 13px; letter-spacing: -.04em;
}
.brand small { display: block; color: var(--muted); font-size: 9.5px; letter-spacing: .16em; font-weight: 700; }
.topbar .spacer { flex: 1; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a, .nav button {
  border: 1px solid transparent; background: none; color: var(--muted);
  text-decoration: none; padding: 8px 11px; border-radius: 9px; font-size: 13px; font-weight: 600;
}
.nav a:hover, .nav button:hover { color: var(--text); background: var(--panel); }
.who { color: var(--muted); font-size: 12.5px; }
.who b { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  border-radius: 11px; padding: 11px 15px; font-weight: 700; font-size: 14px;
  transition: background .15s, border-color .15s, transform .06s;
}
.btn:hover { background: #1a2a21; border-color: #35503f; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, #2fbf68, #16a34a); border-color: transparent; color: #04120a; }
.btn.primary:hover { background: linear-gradient(135deg, #39d276, #1cb354); }
.btn.ghost { background: transparent; }
.btn.red { background: #3a1518; border-color: #6b2327; color: #ffb4b4; }
.btn.blue { background: #12304f; border-color: #26507f; color: #cfe4ff; }
.btn.tiny { padding: 7px 10px; font-size: 12px; border-radius: 8px; }
.btn.big { padding: 14px 20px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- cards / layout ---------- */
.card {
  background: linear-gradient(180deg, #122019, #0e1712);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head .spacer { flex: 1; }
.grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-top: 16px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-weight: 700; }
input, textarea, select {
  width: 100%; background: #0a130e; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; font-size: 14px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: #2c7a4b; box-shadow: 0 0 0 3px rgba(39, 196, 107, .12); }
textarea { resize: vertical; min-height: 74px; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.check input { width: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 620px) { .split { grid-template-columns: 1fr; } }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.02fr .98fr; gap: 26px; align-items: center; padding: 30px 0 8px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 16px; } }
.eyebrow { color: var(--gold); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 800; margin-bottom: 12px; }
.hero p.lede { color: #b9c9bf; font-size: 16px; max-width: 520px; margin-top: 16px; line-height: 1.6; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-note { color: var(--muted); font-size: 12px; margin-top: 12px; }
.demo-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px dashed #6d5c22; background: #1a1606; color: #f5de9a;
  border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-top: 14px;
}
.demo-banner b { color: #ffe9a8; }

/* ---------- assistant ---------- */
.assistant { display: flex; flex-direction: column; gap: 12px; }
.assistant-top { display: flex; align-items: center; gap: 12px; }
.assistant-top .spacer { flex: 1; }
.orb {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #5df29a, #16a34a 55%, #0b3d23);
  box-shadow: 0 0 0 0 rgba(39, 196, 107, .35);
  position: relative;
}
.orb.listening { animation: pulse 1.25s infinite; }
.orb.speaking { animation: pulse .7s infinite; }
.orb.thinking { animation: pulse 1.8s infinite; filter: saturate(.4); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(39, 196, 107, .42); }
  70% { box-shadow: 0 0 0 14px rgba(39, 196, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(39, 196, 107, 0); }
}
.status { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.transcript {
  height: 250px; overflow: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #09110d;
}
.transcript .t-agent, .transcript .t-user {
  max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5;
}
.transcript .t-agent { background: #13251b; border: 1px solid #234330; align-self: flex-start; }
.transcript .t-user { background: #10263d; border: 1px solid #22466d; align-self: flex-end; }
.transcript .t-sys { color: var(--muted); font-size: 12px; align-self: center; text-align: center; }
.transcript .t-tool { color: var(--gold); font-size: 11.5px; align-self: center; }
.ptt {
  width: 100%; border: none; border-radius: 14px; padding: 17px;
  font-weight: 800; font-size: 16px; color: #04120a;
  background: linear-gradient(135deg, #35cf77, #16a34a);
  box-shadow: 0 10px 26px rgba(22, 163, 74, .25);
  touch-action: none; user-select: none;
}
.ptt.holding { background: linear-gradient(135deg, #f0c96a, #d9a521); color: #211a04; }
.ptt:disabled { opacity: .45; box-shadow: none; }
.textrow { display: flex; gap: 8px; }
.textrow input { flex: 1; }
.voice-note { color: #6f8477; font-size: 11.5px; line-height: 1.5; }

/* ---------- cart ---------- */
.cartbox { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.cart-store { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.cart-store b { color: var(--text); }
.cart-line { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed #1d2c23; }
.cart-line:last-child { border-bottom: none; }
.cart-qty { flex: none; width: 30px; color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }
.cart-name { flex: 1; min-width: 0; font-size: 14px; }
.cart-name small { display: block; color: var(--muted); font-size: 12px; }
.cart-price { font-variant-numeric: tabular-nums; color: #cfe0d5; font-size: 14px; white-space: nowrap; }
.totals { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); padding-top: 4px; }
.totals.total { color: var(--text); font-weight: 800; font-size: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.paybox {
  margin-top: 12px; padding: 13px; border-radius: 12px;
  border: 1px solid #2c5b3e; background: #0e2016;
  display: flex; flex-direction: column; gap: 9px;
}
.paybox .orderid { color: var(--muted); font-size: 11.5px; font-family: ui-monospace, monospace; }
.paybox .paytotal { font-size: 20px; font-weight: 800; }
.empty { color: var(--muted); font-size: 13.5px; padding: 10px 0; }

/* ---------- stores ---------- */
.storelist { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; max-height: 420px; overflow: auto; }
.store-card { border: 1px solid var(--line); background: #0b1410; border-radius: 12px; padding: 12px; }
.store-card .top { display: flex; gap: 8px; align-items: flex-start; }
.store-card .name { font-weight: 800; font-size: 14.5px; }
.store-card .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.store-card .desc { color: #a9bcb0; font-size: 12.5px; margin-top: 7px; line-height: 1.5; }
.store-card .actions { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.menu-list { margin-top: 10px; border-top: 1px dashed #1d2c23; padding-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.menu-item { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.menu-item span:last-child { color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.badge.open { background: #0e2b1b; color: #6ee7a0; border: 1px solid #1d5234; }
.badge.closed { background: #241b16; color: #f0a58c; border: 1px solid #4a2c22; }
.badge.status { background: #14233a; color: #9ecbff; border: 1px solid #24456f; }
.badge.status.paid { background: #2b2410; color: #f5de9a; border-color: #5b4a1c; }
.badge.status.accepted { background: #102a3c; color: #93d8ff; border-color: #1f4a66; }
.badge.status.ready { background: #12301f; color: #7ef0a7; border-color: #225a38; }
.badge.status.completed { background: #1b1f1d; color: #aab8b0; border-color: #333c37; }
.badge.status.cancelled { background: #2b1416; color: #ffb0b0; border-color: #5e2428; }

/* ---------- orders list ---------- */
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: #0b1410; }
.order-card .oh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-card .oh .spacer { flex: 1; }
.order-card .store { font-weight: 800; font-size: 14.5px; }
.order-card .when { color: var(--muted); font-size: 11.5px; }
.order-card .items { color: #b8c9bf; font-size: 12.5px; margin-top: 7px; line-height: 1.5; }
.order-card .money { font-weight: 800; margin-top: 8px; }
.customer-box { margin-top: 8px; font-size: 12px; color: var(--muted); }
.customer-box b { color: #cfe0d5; }

/* ---------- paid / status ---------- */
.paid-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.paid-head .spacer { flex: 1; }
.big-status { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.steps { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.step { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.step .dot { width: 10px; height: 10px; border-radius: 50%; background: #2b3831; flex: none; }
.step.done { color: var(--text); }
.step.done .dot { background: var(--accent); }
.step.now .dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(240, 201, 106, .15); }

/* ---------- merchant ---------- */
.merchant-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { border: 1px solid var(--line); background: #0b1410; border-radius: 12px; padding: 12px; }
.stat .k { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.tabs button { border: 1px solid transparent; background: none; color: var(--muted); padding: 9px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; }
.tabs button:hover { background: var(--panel); color: var(--text); }
.tabs button.active { background: var(--panel2); border-color: var(--line); color: var(--text); }
.menu-editor { display: flex; flex-direction: column; gap: 8px; }
.menu-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: #0b1410; }
.menu-row .mi-name { flex: 1; min-width: 0; }
.menu-row .mi-name small { display: block; color: var(--muted); font-size: 12px; }
.menu-row .mi-price { color: var(--gold); font-weight: 800; white-space: nowrap; }
.menu-row.off { opacity: .5; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #1b2921; }
.table th { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.auth-wrap { display: flex; justify-content: center; padding: 40px 0; }
.auth-card { width: min(460px, 100%); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; border: 1px solid var(--line); background: #0b1410; color: var(--muted); padding: 10px; border-radius: 9px; font-weight: 700; }
.auth-tabs button.active { background: var(--panel2); color: var(--text); border-color: #35503f; }

/* ---------- modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(3, 7, 5, .72); display: grid; place-items: center; padding: 18px; }
.modal-card { width: min(440px, 100%); max-height: 90vh; overflow: auto; background: #0f1a14; border: 1px solid #2a4033; border-radius: 18px; box-shadow: var(--shadow); padding: 22px; }
.modal-x { float: right; border: none; background: none; color: var(--muted); font-size: 22px; line-height: 1; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; background: #e9f2ec; color: #07110c; padding: 11px 17px; border-radius: 999px; font-size: 13px; font-weight: 800; z-index: 80; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.error { color: #ff9b9b; font-size: 13px; min-height: 18px; }
.okmsg { color: #7ef0a7; font-size: 13px; min-height: 18px; }
.loading { color: var(--muted); font-size: 13px; }
