:root {
  --accent: #b45309;
  --brand: #0F5132;
  --brand-2: #FF7A45;
  --brand-3: #FFC857;
  --brand-cream: #F8F9E9;
  --bg: #fbf7f2;
  --card: #ffffff;
  --ink: #1f1a16;
  --muted: #6f6359;
  --line: #ece3d8;
  --soft: color-mix(in srgb, var(--accent) 10%, #fff);
  --ok: #15803d;
  --bad: #b91c1c;
  --wa: #128c4b;
  --r: 14px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.pre { white-space: pre-line; }
.loading, .empty { min-height: 60vh; display: grid; place-content: center; text-align: center; padding: 24px; color: var(--muted); }
.empty h1 { font-size: 22px; color: var(--ink); margin-bottom: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 48px; padding: 12px 18px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn.wa { background: var(--wa); }
.btn.small { width: auto; min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--bad); border: 1.5px solid currentColor; }

/* ---------- public shop ---------- */
.shop main { max-width: 720px; margin: 0 auto; padding-bottom: 96px; }
.announce { background: var(--accent); color: #fff; text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 500; }
.cover { height: 180px; background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--accent) 30%, #fff)); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-body { padding: 0 16px 8px; text-align: center; margin-top: -48px; }
.logo { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--bg); object-fit: cover; margin: 0 auto 10px; background: var(--card); }
.logo.ph, .item-img.ph { display: grid; place-content: center; font: 700 40px var(--serif); color: var(--accent); background: var(--soft); }
.hero h1 { font-size: 30px; }
.tagline { margin: 6px 0 2px; font-size: 16px; }
.meta { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.status { display: inline-block; padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.status.on { background: #dcfce7; color: var(--ok); }
.status.off { background: #fee2e2; color: var(--bad); }
.actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0 4px; }
.actions a, .actions button { flex: 1 1 calc(50% - 8px); min-width: 0; max-width: 220px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }

.menu-tools { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 12px 16px 8px; border-bottom: 1px solid var(--line); }
#q { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips button { flex: none; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 14px; }
.chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
#list { padding: 0 16px; }
.cat { font-size: 20px; margin: 22px 0 10px; }
.cat span { font: 500 13px var(--sans); color: var(--muted); }
.grid { display: grid; gap: 12px; }
.item { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.item-img { flex: none; width: 104px; height: 104px; border-radius: 10px; object-fit: cover; }
.item-img.ph { font-size: 34px; }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-top { display: flex; align-items: center; gap: 6px; min-height: 16px; }
.item h3 { font: 600 16px var(--sans); margin-top: 2px; }
.unit { color: var(--muted); font-size: 13px; }
.desc { margin: 4px 0 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 600; }
.price s { color: var(--muted); font-weight: 400; font-size: 13px; }
.item.oos { opacity: .6; }
.soldout { font-size: 13px; color: var(--bad); font-weight: 600; }
.tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); background: var(--soft); padding: 2px 7px; border-radius: 6px; }
.diet { display: inline-block; width: 14px; height: 14px; border: 1.5px solid; border-radius: 3px; position: relative; flex: none; }
.diet::after { content: ''; position: absolute; inset: 2.5px; border-radius: 50%; background: currentColor; }
.diet.veg { color: #15803d; } .diet.egg { color: #ca8a04; } .diet.nonveg { color: #b91c1c; }
.add { min-width: 84px; padding: 8px 16px; border-radius: 10px; border: 1.5px solid var(--accent); background: var(--soft); color: var(--accent); font-weight: 700; cursor: pointer; }
.stepper { display: inline-flex; align-items: center; border-radius: 10px; background: var(--accent); color: #fff; }
.stepper button { width: 34px; height: 36px; border: 0; background: none; color: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.stepper span { min-width: 18px; text-align: center; font-weight: 700; }

.info { margin: 16px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.info h2 { font-size: 20px; margin-bottom: 10px; }
.info p { margin: 0 0 10px; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: 6px 0; font-weight: 400; border-bottom: 1px solid var(--line); }
.hours td { text-align: right; }
.hours tr.today { font-weight: 600; color: var(--accent); }
.hours tr.today th { font-weight: 600; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.facts li:last-child, .hours tr:last-child > * { border-bottom: 0; }
.facts b { font-weight: 500; color: var(--muted); flex: none; }
.facts li > :last-child { text-align: right; overflow-wrap: anywhere; }
.map { width: 100%; height: 220px; border: 0; border-radius: 10px; margin: 4px 0 12px; background: var(--soft); }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 8px 16px 24px; }
.foot p { margin: 2px 0; }

.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.cart-bar button { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 688px; margin: 0 auto; padding: 15px 18px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font-size: 15px; cursor: pointer; box-shadow: 0 8px 24px rgb(0 0 0 / .18); }

.sheet { width: 100%; max-width: 560px; max-height: 92vh; margin: auto auto 0; padding: 0; border: 0; border-radius: 20px 20px 0 0; background: var(--bg); color: var(--ink); }
@media (min-width: 640px) { .sheet { margin: auto; border-radius: 20px; } }
.sheet::backdrop { background: rgb(20 15 10 / .5); }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 20px; }
.x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
#cartBody, .sheet-body { padding: 16px; }
.lines { list-style: none; margin: 0 0 12px; padding: 0; }
.lines li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lines .muted { font-size: 13px; }
.amt { min-width: 64px; text-align: right; font-weight: 600; }
.order-form { display: grid; gap: 12px; }
.seg { display: flex; gap: 6px; padding: 4px; background: var(--line); border-radius: 12px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 9px; border-radius: 9px; cursor: pointer; font-weight: 500; }
.seg input:checked + span { background: var(--card); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.tot { display: flex; justify-content: space-between; padding: 3px 0; }
.tot.grand { font-weight: 700; font-size: 17px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.warn { color: var(--bad); margin: 6px 0 0; font-size: 14px; }
.sent { text-align: center; padding: 16px 0; }
.sent .big { font-size: 18px; font-weight: 600; }

/* ---------- forms (shared) ---------- */
.fld { display: grid; gap: 5px; }
.fld > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.fld input:not([type=checkbox]):not([type=radio]):not([type=color]), .fld textarea, .fld select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.fld input:focus, .fld textarea:focus, .fld select:focus, #q:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); border-color: var(--accent); }
.fld small { color: var(--muted); font-size: 12px; }
.fld input:user-invalid, .fld textarea:user-invalid { border-color: var(--bad); }

/* ---------- owner panel ---------- */
.admin { --accent: #0F5132; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--ink); color: #fff; }
.topbar .brand { color: #fff; font: 700 18px var(--serif); text-decoration: none; }
.topbar #shopLabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .75; font-size: 14px; }
.topbar a.live { color: #fff; font-size: 14px; white-space: nowrap; }
.admin main { max-width: 820px; margin: 0 auto; padding: 16px 16px 120px; }
.demo-note { background: #fef3c7; color: #78350f; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.card h2 { font-size: 20px; margin-bottom: 4px; }
.card > p.muted { margin: 0 0 14px; font-size: 14px; }
.narrow { max-width: 400px; margin: 8vh auto 0; }
.narrow .card { display: grid; gap: 14px; }
.err { color: var(--bad); font-size: 14px; margin: 0; }
.cols { display: grid; gap: 14px; }
@media (min-width: 640px) { .cols { grid-template-columns: 1fr 1fr; } .cols .full { grid-column: 1 / -1; } }

.progress { margin-bottom: 14px; }
.progress .bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0 10px; }
.progress .bar i { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width .3s; }
.progress .todo { display: flex; flex-wrap: wrap; gap: 6px; }
.progress .todo button { padding: 5px 10px; border-radius: 99px; border: 1px dashed var(--muted); background: none; font-size: 13px; cursor: pointer; }
.progress .done-msg { color: var(--ok); font-weight: 600; margin: 0; }

.tabs { position: sticky; top: 52px; z-index: 15; display: flex; gap: 4px; overflow-x: auto; margin: 0 -16px 14px; padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs button { flex: none; padding: 8px 14px; border: 0; border-radius: 99px; background: none; font-weight: 500; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--ink); color: #fff; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label, .toggle { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.checks input, .toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.imgpick { display: flex; align-items: center; gap: 14px; }
.imgpick .prev { width: 84px; height: 84px; flex: none; border-radius: 12px; background: var(--soft) center / cover no-repeat; border: 1px solid var(--line); }
.imgpick .prev.wide { width: 150px; }
.imgpick .prev.round { border-radius: 50%; }
.imgpick .prev img, .prow .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.imgpick .prev, .prow .thumb { position: relative; overflow: hidden; }
.imgpick .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.colorrow { display: flex; align-items: center; gap: 10px; }
.colorrow input[type=color] { width: 48px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }

.hours-ed { display: grid; gap: 8px; }
.hrow { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.hrow .times { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hrow input[type=time] { padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.hrow.closed .times input[type=time] { opacity: .35; }

.plist { display: grid; gap: 8px; }
.prow { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.prow .thumb { width: 56px; height: 56px; border-radius: 8px; background: var(--soft) center / cover no-repeat; display: grid; place-content: center; font: 700 22px var(--serif); color: var(--accent); }
.prow .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .sub { font-size: 13px; color: var(--muted); }
.prow .ctl { display: flex; align-items: center; gap: 6px; }
.prow .ctl button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; font-size: 13px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #d6cfc6; transition: .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.cat-h { font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 2px; }

.qrbox { display: grid; place-items: center; gap: 10px; padding: 16px; }
.qrbox #qr { padding: 12px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }

.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; }
.savebar .btn { width: auto; min-width: 140px; }
#toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 40; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100% - 32px); }
#toast.on { opacity: 1; }
#toast.bad { background: var(--bad); }
.map.small { height: 200px; margin: 0; }

/* landing */
.landing { max-width: 560px; margin: 0 auto; padding: 12vh 16px; text-align: center; }
.landing h1 { font-size: 40px; margin-bottom: 10px; }
.landing p { color: var(--muted); font-size: 17px; }
.landing .row-actions { justify-content: center; margin-top: 24px; }
.landing .btn { width: auto; }
@media (min-width: 520px) { .actions a, .actions button { flex-basis: 0; max-width: 150px; } }
.opt-add { display: flex; align-items: center; gap: 6px; }
.opt-add select { max-width: 110px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 14px; }
.opt-add .add { min-width: 0; padding: 8px 12px; }
.add small { font-weight: 500; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.demo-ribbon { background: var(--brand); color: #fff; text-align: center; font-size: 13px; padding: 7px 12px; }
.demo-ribbon a { color: var(--brand-3); font-weight: 600; }
.foot .made a { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.topbar .brand img { height: 26px; display: block; }
.scan { margin: 16px; padding: 20px; background: var(--card); border: 2px solid var(--accent); border-radius: var(--r); text-align: center; }
.scan h2 { font-size: 22px; margin-bottom: 2px; }
.scan > p.muted { margin: 0 0 14px; }
.scan-btn { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 15px 16px; border-radius: 14px; background: var(--accent); color: #fff; text-decoration: none; text-align: left; font-size: 16px; }
.scan-btn span { font-size: 22px; } .scan-btn b { flex: 1; font-weight: 600; } .scan-btn i { font-style: normal; opacity: .8; }
.scan-btn.soft { background: var(--soft); color: var(--accent); }
.upi-id { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.upi-id button { margin-left: 6px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; font-size: 12px; }
