:root {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  color: #2a211d;
  background: #fbf7f2;
  font-synthesis: none;
  --espresso: #3a2e2a;
  --caramel: #b8703d;
  --caramel-dark: #925329;
  --cream: #fbf7f2;
  --surface: #fff;
  --muted: #88776d;
  --line: #eadfd4;
  --field: #f4ede5;
  --green: #4c7a5e;
  --red: #a63d40;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
#app { min-height: 100vh; padding-bottom: 92px; }

.shell { width: min(100%, 560px); margin: 0 auto; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  justify-content: space-between; padding: 14px 18px; color: #fff;
  background: rgba(58,46,42,.96); backdrop-filter: blur(16px);
}
.brand { display: flex; gap: 11px; align-items: center; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  overflow: hidden; background: #fff; font-size: 20px;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand strong { display: block; font-size: 15px; letter-spacing: -.2px; }
.brand small { color: rgba(255,255,255,.62); font-size: 11px; }
.table-pill {
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  padding: 8px 11px; background: rgba(255,255,255,.08); color: #fff;
  font-size: 12px; font-weight: 700;
}
.live-dot { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: #7fd49d; box-shadow: 0 0 0 4px rgba(127,212,157,.12); }

.hero { padding: 22px 18px 10px; }
.hero-card {
  position: relative; overflow: hidden; padding: 22px; border-radius: 24px;
  color: #fff; background: linear-gradient(135deg, #493832, #2c211e);
  box-shadow: 0 18px 42px rgba(58,46,42,.18);
}
.hero-card::after {
  content: "☕"; position: absolute; right: -4px; bottom: -26px;
  font-size: 112px; opacity: .1; transform: rotate(-10deg);
}
.eyebrow { color: #e6b38d; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.hero h1 { margin: 8px 0 7px; font-size: 25px; line-height: 1.2; letter-spacing: -.7px; }
.hero p { margin: 0; max-width: 310px; color: rgba(255,255,255,.67); font-size: 12px; line-height: 1.55; }

.search-wrap { padding: 10px 18px 8px; }
.search {
  display: flex; align-items: center; gap: 10px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 15px; background: #fff;
  box-shadow: 0 5px 18px rgba(58,46,42,.04);
}
.search input { width: 100%; border: 0; outline: 0; padding: 14px 0; background: transparent; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 18px 14px; scrollbar-width: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 13px; color: var(--muted); background: #fff; font-size: 12px; font-weight: 700;
}
.chip.active { border-color: var(--espresso); color: #fff; background: var(--espresso); }

.section-head { display: flex; align-items: end; justify-content: space-between; padding: 8px 18px 12px; }
.section-head h2 { margin: 0; font-size: 18px; letter-spacing: -.4px; }
.section-head span { color: var(--muted); font-size: 11px; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 0 18px 24px; }
.product {
  overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: #fff;
  box-shadow: 0 7px 22px rgba(58,46,42,.045);
}
.product-image {
  position: relative; aspect-ratio: 1.25; display: grid; place-items: center;
  background: linear-gradient(145deg,#f5eadd,#eee0d2); font-size: 42px;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-count {
  position: absolute; top: 9px; right: 9px; min-width: 25px; height: 25px;
  display: grid; place-items: center; border-radius: 999px; color: #fff;
  background: var(--caramel); font-size: 11px; font-weight: 800;
}
.product-body { padding: 12px; }
.product h3 { margin: 0; min-height: 38px; font-size: 13px; line-height: 1.4; }
.product-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px; }
.price { color: var(--caramel-dark); font-weight: 800; font-size: 13px; }
.add {
  width: 34px; height: 34px; border: 0; border-radius: 11px; color: #fff;
  background: var(--caramel); font-size: 21px; line-height: 1;
}

.bottom-nav {
  position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%,560px); display: grid; grid-template-columns: repeat(3,1fr);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  background: rgba(255,255,255,.95); backdrop-filter: blur(18px);
}
.nav-item { border: 0; color: var(--muted); background: transparent; padding: 7px; font-size: 10px; font-weight: 700; }
.nav-item i { display: block; margin-bottom: 3px; font-style: normal; font-size: 20px; }
.nav-item.active { color: var(--caramel-dark); }

.cart-float {
  position: fixed; z-index: 25; left: 50%; bottom: 78px; transform: translateX(-50%);
  width: calc(min(100%,560px) - 28px); display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 0; border-radius: 17px; color: #fff; background: var(--espresso);
  box-shadow: 0 14px 35px rgba(42,33,29,.27);
}
.cart-float b { flex: 1; text-align: left; }
.cart-float span { color: rgba(255,255,255,.66); font-size: 11px; }
.count { min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--caramel); font-weight: 800; }

.page { padding: 18px; }
.page-title { margin: 6px 0 4px; font-size: 24px; }
.page-subtitle { margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.cart-line {
  display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.cart-line .thumb { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--field); font-size: 25px; }
.cart-info { flex: 1; }
.cart-info b { display: block; font-size: 13px; }
.cart-info small { color: var(--muted); font-size: 10px; }
.quantity { display: flex; gap: 9px; align-items: center; margin-top: 7px; }
.quantity button { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.summary { margin-top: 18px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.summary-row.total { padding-top: 12px; border-top: 1px solid var(--line); color: var(--espresso); font-size: 17px; font-weight: 800; }
.primary {
  width: 100%; border: 0; border-radius: 15px; padding: 15px 18px; color: #fff;
  background: var(--caramel); font-weight: 800; box-shadow: 0 9px 22px rgba(184,112,61,.22);
}
.secondary { width: 100%; border: 1px solid var(--line); border-radius: 15px; padding: 14px; background: #fff; color: var(--espresso); font-weight: 700; }
.primary:disabled { opacity: .5; cursor: wait; }

.status-card { padding: 18px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.status-top { display: flex; align-items: center; justify-content: space-between; }
.status-badge { padding: 7px 10px; border-radius: 999px; color: var(--green); background: rgba(76,122,94,.1); font-size: 10px; font-weight: 800; }
.timeline { margin: 22px 0; }
.timeline-step { display: flex; gap: 13px; min-height: 58px; color: #b9aaa0; }
.timeline-step .dot { width: 18px; height: 18px; flex: 0 0 auto; border: 4px solid #e6ddd5; border-radius: 50%; background: #fff; }
.timeline-step.done { color: var(--espresso); font-weight: 700; }
.timeline-step.done .dot { border-color: var(--green); background: var(--green); }
.service-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.waiting-banner { display: flex; gap: 12px; margin-top: 16px; padding: 13px; border-radius: 14px; color: #6d4a22; background: #fff5df; border: 1px solid #f2dfb7; }
.waiting-banner span { font-size: 21px; }
.waiting-banner b, .waiting-banner small { display: block; }
.waiting-banner b { font-size: 12px; }
.waiting-banner small { margin-top: 3px; color: #8d704d; font-size: 10px; line-height: 1.45; }
.order-lines { margin: 0 0 18px; padding: 13px 0; border-top: 1px solid var(--line); }
.order-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 11px; }
.order-lines b { white-space: nowrap; }
.paid-message, .cancel-message { margin-top: 12px; padding: 14px; border-radius: 14px; text-align: center; font-size: 12px; font-weight: 700; }
.paid-message { color: var(--green); background: rgba(76,122,94,.1); }
.cancel-message { color: var(--red); background: rgba(166,61,64,.08); }
.counter-payment-note {
  display: flex; gap: 12px; align-items: center; margin: 12px 0; padding: 14px;
  border: 1px solid #e8d5c5; border-radius: 15px; color: var(--espresso);
  background: #fff8f1;
}
.counter-payment-note > span {
  width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 12px; color: #fff; background: var(--caramel); font-size: 20px;
}
.counter-payment-note b, .counter-payment-note small { display: block; }
.counter-payment-note b { font-size: 12px; }
.counter-payment-note small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.counter-requested {
  margin: 0 0 12px; padding: 11px 13px; border-radius: 12px;
  color: var(--green); background: rgba(76,122,94,.1); font-size: 10px; font-weight: 700;
}
.secondary:disabled { opacity: .45; cursor: not-allowed; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(42,33,29,.45); backdrop-filter: blur(3px); }
.sheet {
  position: fixed; z-index: 51; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%,560px); max-height: 88vh; overflow-y: auto; padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 25px 25px 0 0; background: var(--cream);
}
.handle { width: 40px; height: 4px; margin: 2px auto 17px; border-radius: 4px; background: #d9cec4; }
.sheet h2 { margin: 0 0 5px; font-size: 21px; }
.option-title { margin: 20px 0 9px; font-size: 12px; font-weight: 800; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; font-size: 11px; }
.option.selected { color: var(--caramel-dark); border-color: var(--caramel); background: #fff7ef; font-weight: 700; }
.note { width: 100%; resize: vertical; min-height: 72px; border: 1px solid var(--line); border-radius: 13px; padding: 12px; outline: 0; background: #fff; }
.sheet-footer { display: flex; align-items: center; gap: 13px; margin-top: 20px; }
.sheet-footer .primary { flex: 1; }
.eyebrow.dark { color: var(--caramel-dark); }
.pay-option { width: 100%; display: flex; align-items: center; gap: 13px; margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; }
.pay-option > span { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--espresso); font-size: 20px; }
.pay-option div { flex: 1; }
.pay-option b, .pay-option small { display: block; }
.pay-option b { font-size: 13px; }
.pay-option small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.pay-option i { color: var(--muted); font-style: normal; font-size: 24px; }
.qr-frame { width: min(100%,340px); margin: 12px auto; padding: 10px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 35px rgba(58,46,42,.1); }
.qr-frame img { display: block; width: 100%; border-radius: 14px; }
.payment-note { color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.bank-label { display:block; margin:20px 0 8px; color:#6f5b4b; font-size:12px; font-weight:800; letter-spacing:.08em; }
.bank-select { width:100%; min-height:52px; padding:0 14px; border:1px solid #dfd5ca; border-radius:14px; background:#fff; color:#34261d; font:inherit; font-weight:700; }
.bank-open { display:flex; align-items:center; justify-content:center; margin-top:12px; text-decoration:none; }
.qr-fallback { margin:14px 0; border:1px solid #eadfd4; border-radius:14px; background:#fffaf5; }
.qr-fallback summary { padding:14px; cursor:pointer; color:#74533d; font-weight:750; }
.auto-confirm { display:flex; gap:11px; margin:14px 0; padding:13px; border-radius:14px; background:#eef8f0; color:#255b35; }
.auto-confirm > span { display:grid; flex:0 0 28px; height:28px; place-items:center; border-radius:50%; background:#2f7a46; color:#fff; font-weight:900; }
.auto-confirm b, .auto-confirm small { display:block; }
.auto-confirm small { margin-top:3px; line-height:1.45; }
.voucher-entry { display: flex; gap: 8px; margin: 12px 0; }
.voucher-entry input { flex: 1; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; text-transform: uppercase; outline: 0; }
.voucher-entry button { border: 0; border-radius: 12px; padding: 0 14px; color: #fff; background: var(--caramel); font-weight: 800; font-size: 11px; }
.voucher-applied { margin: -3px 0 12px; padding: 9px 11px; border-radius: 10px; color: var(--green); background: rgba(76,122,94,.1); font-size: 10px; font-weight: 700; }
.counter-checkout-card {
  margin: 16px 0; padding: 6px 16px; border: 1px solid var(--line);
  border-radius: 18px; background: #fff;
}
.counter-checkout-card > div {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.counter-checkout-card > div:last-child { border-bottom: 0; }
.counter-checkout-card span { color: var(--muted); font-size: 11px; }
.counter-checkout-card b { font-size: 14px; }
.counter-checkout-card .counter-checkout-total b { color: var(--caramel-dark); font-size: 20px; }
.counter-payment-methods {
  margin: 12px 0 16px; padding: 13px; border-radius: 13px;
  color: #68574e; background: var(--field); font-size: 11px; line-height: 1.55;
}

.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg,#3a2e2a,#241b18); }
.gate-card { width: min(100%,420px); padding: 26px; border-radius: 25px; background: #fff; }
.gate-card .brand-mark { margin-bottom: 18px; color: #fff; }
.gate-card h1 { margin: 0 0 7px; font-size: 24px; }
.gate-card p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.field { width: 100%; margin: 7px 0 11px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; outline: 0; }
.remote-alert { margin: 14px 0; padding: 12px; border-radius: 13px; color: #76501f; background: #fff4dc; border: 1px solid #eed8aa; font-size: 11px; line-height: 1.5; }
.gate-card .remote-help { margin: -3px 0 13px; color: var(--muted); font-size: 11px; }
.remote-gate-card { max-height: calc(100vh - 32px); overflow-y: auto; }
.remote-gate-card form label { display: block; font-size: 12px; font-weight: 700; }
.remote-confirm {
  display: flex !important; align-items: flex-start; gap: 9px;
  margin: 3px 0 16px; color: #5f514a; font-weight: 500 !important;
  line-height: 1.45;
}
.remote-confirm input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--caramel-dark); }
.remote-honeypot {
  position: absolute !important; left: -10000px !important;
  width: 1px !important; height: 1px !important; opacity: 0 !important;
}
.gate-card .remote-contact { margin: 12px 0 0; text-align: center; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
#toast { position: fixed; z-index: 80; left: 50%; bottom: 100px; transform: translate(-50%,20px); opacity: 0; pointer-events: none; min-width: 240px; max-width: calc(100% - 32px); padding: 12px 15px; border-radius: 12px; color: #fff; background: var(--espresso); font-size: 12px; text-align: center; transition: .25s; }
#toast.show { opacity: 1; transform: translate(-50%,0); }

@media (min-width: 700px) {
  body { background: #eee5dc; }
  .shell { box-shadow: 0 0 60px rgba(58,46,42,.12); background: var(--cream); }
}
