/* Ordeli — one stylesheet, no build step.
   Brand (Nov 2026): clean & friendly. Warm-grey ground, white cards, near-black ink; Ordeli orange only for the
   main action, status and highlights. Thai text in Anuphan, the wordmark and big numbers in Fredoka.
   Mascot "Deli" (orange chat-bubble cat) lives in /img/deli-*.svg and shows up on empty / success / error states. */
:root {
  --bg: #f6f4f1;
  --paper: #ffffff;
  --sunk: #efebe7;
  --ink: #1f1b18;
  --muted: #6b635d;
  --line: #ece7e2;
  --line-strong: #ddd5ce;
  --brand: #ff8a3d;
  --brand-hover: #f57a2b;
  --brand-ink: #b54e0b;
  --brand-soft: #ffe9d9;
  --on-brand: #2a1405;
  --ok: #1f7a4a;
  --ok-soft: #ddf3e6;
  --yellow: #ffd24a;
  --yellow-soft: #fff3c4;
  --blue: #1f4e8c;
  --blue-soft: #e2edfb;
  --red: #b3261e;
  --red-soft: #fce4e1;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(31, 27, 24, .05);
  --shadow: 0 2px 6px rgba(31, 27, 24, .05), 0 10px 28px rgba(31, 27, 24, .07);
  --shadow-lg: 0 18px 50px rgba(31, 27, 24, .16);
  --font: "Anuphan", "Sukhumvit Set", "Leelawadee UI", system-ui, sans-serif;
  --font-brand: "Fredoka", "Anuphan", system-ui, sans-serif;
  --tabbar: 68px;
  color-scheme: light;
  accent-color: var(--brand-ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--font); font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.005em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
a { color: var(--brand-ink); text-underline-offset: 2px; }
small, .small { font-size: .88rem; }
.muted { color: var(--muted); }
.error { color: var(--red); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); font: 600 1.6rem var(--font-brand); }
.wordmark { font: 600 1.45rem/1 var(--font-brand); letter-spacing: -.01em; color: var(--ink); }
.wordmark b { font-weight: 600; color: #f2711c; }
.num, .bill-no, .kpi strong, .dish-price, .pc-price { font-family: var(--font-brand); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 0 1.2em; border-radius: 14px; border: 1.5px solid transparent;
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 4px 14px rgba(255, 138, 61, .3); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--sunk); }
.btn-danger { background: var(--red); color: #fff; }
.btn-armed { background: var(--yellow); border-color: var(--yellow); }
.btn-sm { min-height: 38px; padding: 0 .9em; font-size: .92rem; border-radius: 11px; }
.btn-sm.btn-primary { box-shadow: none; }
.btn-block + .btn-block, .btn-block + .btn, .btn + .btn-block { margin-top: 10px; }
.dlg-done { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 4px 0 6px; }
.dlg-done img { width: 104px; height: auto; }
.dlg-done h2 { margin: 4px 0 0; font-size: 1.35rem; }
.dlg-done p { margin: 0 0 12px; color: var(--muted); max-width: 36ch; }
.dlg-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sunk); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.dlg-x:hover { background: var(--line); }
.dlg { position: relative; }
.btn-lg { min-height: 56px; padding: 0 1.6em; font-size: 1.08rem; border-radius: 16px; }
.btn-block { width: 100%; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 16px; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5em; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 9px; }
.topbar-end { display: flex; align-items: center; gap: 8px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand); font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu-pop {
  position: absolute; right: 0; top: 46px; min-width: 230px; padding: 6px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.menu-pop a, .menu-pop button {
  display: block; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 10px;
  font: 500 1rem var(--font); color: var(--ink); text-align: left; text-decoration: none; cursor: pointer;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--sunk); }
.menu-who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-weight: 600; }
.menu-who small { display: block; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }

/* ---------- page layout ---------- */
.page { min-height: calc(100vh - 60px); }
.wrap { max-width: 760px; margin: 0 auto; padding: 28px 16px 48px; }
.wrap-narrow { max-width: 520px; }
.wrap-wide { max-width: 1100px; }
.page-title { font-size: 1.6rem; }
.back { display: inline-block; margin-bottom: 12px; font-weight: 500; }
.back::before { content: "‹ "; }
.empty { text-align: center; padding: 48px 16px; }
/* Deli greets every empty / not-found / error state (no markup needed) */
.empty::before, .empty-line::before {
  content: ""; display: block; width: 132px; height: 122px; margin: 0 auto 14px;
  background: url("/img/deli-wave.svg") center / contain no-repeat;
}
.empty-line::before { width: 92px; height: 85px; margin-bottom: 8px; }
.empty.is-oops::before, .empty:has(.error)::before { background-image: url("/img/deli-oops.svg"); }
.empty.is-wait::before { background-image: url("/img/deli-wait.svg"); }
.empty.is-happy::before { background-image: url("/img/deli-happy.svg"); }
.conv-empty::before { width: 150px; height: 138px; }
.empty-start { background: var(--paper); border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); margin-top: 16px; }
.empty-start p { max-width: 42ch; margin-inline: auto; }

/* ---------- landing ---------- */
.hero {
  max-width: 1100px; margin: 0 auto; padding: 48px 16px 32px;
  display: grid; gap: 40px; align-items: center; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
}
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -.01em; max-width: 18ch; text-wrap: balance; }
.phrase { white-space: nowrap; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46ch; }
.hero .btn-lg { margin-top: 8px; }
.hero .muted { margin-top: 10px; }

.ticket {
  margin: 0; justify-self: center; width: min(360px, 100%); background: var(--paper); padding: 22px 22px 34px;
  border-radius: 6px 6px 0 0; transform: rotate(-1.5deg); box-shadow: 0 18px 40px rgba(23, 33, 30, .12);
  /* torn receipt edge */
  -webkit-mask: radial-gradient(circle 9px at 50% 100%, #0000 98%, #000) 0 0 / 18px 100% repeat-x;
          mask: radial-gradient(circle 9px at 50% 100%, #0000 98%, #000) 0 0 / 18px 100% repeat-x;
}
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 2px dashed var(--line); }
.ticket-head span { color: var(--muted); font-size: .92rem; }
.ticket-items { list-style: none; margin: 0; padding: 12px 0; border-bottom: 2px dashed var(--line); }
.ticket-items li { display: grid; grid-template-columns: 1fr 2ch 4ch; gap: 8px; padding: 3px 0; }
.ticket-items li span:nth-child(2) { color: var(--muted); text-align: right; }
.ticket-items b { text-align: right; font-weight: 500; }
.ticket-total { display: flex; justify-content: space-between; padding: 10px 0 14px; font-size: 1.15rem; font-weight: 700; }
.ticket-steps { list-style: none; margin: 0; padding: 0; }
.ticket-steps li { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 0; color: var(--muted); flex-wrap: wrap; }
.ticket-steps li small { flex-basis: 100%; padding-left: 30px; margin-top: -4px; color: var(--ok); }
.ticket-steps .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); flex: none; }
.ticket-steps .is-done { color: var(--ink); }
.ticket-steps .is-done .dot { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 3px var(--paper); }
.ticket-steps .is-now { color: var(--ink); font-weight: 700; }
.ticket-steps .is-now .dot { background: var(--yellow); border-color: var(--ink); animation: stamp .5s .4s both cubic-bezier(.3, 1.6, .5, 1); }
@keyframes stamp { from { transform: scale(0); } to { transform: scale(1); } }

.points { max-width: 1100px; margin: 0 auto; padding: 8px 16px 64px; display: grid; gap: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.points > div { border-top: 3px solid var(--brand); padding-top: 14px; }
.points h2 { font-size: 1.08rem; }
.points p { color: var(--muted); margin: 0; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: .95rem; }
.opt { font-style: normal; font-weight: 400; color: var(--muted); font-size: .88rem; }
input, textarea, select {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: 13px;
  background: var(--paper); color: var(--ink); font: 400 1rem var(--font); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a39a93; }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input:disabled { background: var(--bg); color: var(--muted); }
.hint { color: var(--muted); }
.hint-ok { color: var(--ok); font-weight: 600; }
.hint-bad { color: var(--red); font-weight: 600; }
.slug-input { display: flex; align-items: stretch; }
.slug-prefix { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; background: var(--bg); color: var(--muted); }
.slug-input input { border-radius: 0 12px 12px 0; }
.readonly { min-height: 48px; display: flex; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--bg); color: var(--muted); }
.radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; font-weight: 500; }
.radio input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--brand); }

/* ---------- lists & tags ---------- */
.shop-list, .rows, .team { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.shop-row, .row, .team li {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm);
}
.shop-row:hover { border-color: var(--brand); }
.shop-row-main, .row-main { display: grid; flex: 1; min-width: 0; }
.team li > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.team small { color: var(--muted); overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 0 12px; color: var(--muted); font-size: .9rem; }
.row-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.shop-mark {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 1.15rem;
}
.shop-mark.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 1rem; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; background: var(--sunk); color: var(--ink); font-size: .83rem; font-weight: 600; white-space: nowrap; }
.tag-jade { background: var(--ok-soft); color: var(--ok); }
.tag-brand { background: var(--brand-soft); color: var(--brand-ink); }
.tag-yellow { background: var(--yellow-soft); color: #6b4f00; }
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-red { background: var(--red-soft); color: var(--red); }

/* ---------- shop back office ---------- */
.shop-shell { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
.shop-main { max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; }
.shop-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-head h1 { margin: 0; font-size: 1.45rem; }
.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 15; display: grid; grid-template-columns: repeat(6, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.tab { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 600; }
.tab svg { padding: 3px 14px; box-sizing: content-box; border-radius: 99px; transition: background .15s; }
.tab.active { color: var(--ink); }
.tab.active svg { stroke-width: 2.3; background: var(--brand-soft); color: var(--brand-ink); }
@media (min-width: 900px) {
  /* slim icon rail: more room for chats and bills */
  .shop-shell { display: grid; grid-template-columns: 84px minmax(0, 1fr); padding-bottom: 0; }
  .tabs { position: sticky; top: 60px; height: calc(100vh - 60px); display: flex; flex-direction: column; gap: 4px; padding: 12px 8px; border-top: 0; border-right: 1px solid var(--line); background: transparent; }
  .tab { display: grid; justify-items: center; gap: 3px; padding: 10px 4px; border-radius: 12px; font-size: .78rem; text-align: center; }
  .tab svg { padding: 6px 14px; }
  .tab.active { background: transparent; }
  .shop-main { margin: 0; padding: 28px 32px 48px; }
}
.banner { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.banner-ghost { background: var(--yellow-soft); }
.banner-red { background: var(--red-soft); color: var(--red); }
.empty-tab { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 36px 20px; }
.empty-tab p:not(.small) { max-width: 46ch; margin: 0 auto 10px; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; }
.pct { font-weight: 700; color: var(--brand-ink); font-size: 1.2rem; }
.bar { height: 10px; border-radius: 99px; background: var(--bg); overflow: hidden; margin: 4px 0 16px; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li > span:last-child { display: grid; }
.checklist small { color: var(--muted); }
.check { flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line); }
.checklist .is-done .check { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--ok); }
.checklist .is-done strong { text-decoration: line-through; text-decoration-color: var(--muted); }
.plan-now { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 1.1rem; }
.plan-now span { color: var(--muted); font-size: 1rem; }

/* ---------- super admin ---------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pills { display: flex; gap: 8px; overflow-x: auto; margin: 4px 0 20px; padding-bottom: 2px; }
.pill { flex: none; padding: 8px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.pill.active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.todo { border-left: 6px solid var(--yellow); }
.todo-clear { border-left-color: var(--brand); }
.todo ul { margin: 0; padding-left: 1.1em; }
.todo p { margin: 0; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); margin-bottom: 16px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; box-shadow: var(--shadow-sm); }
.kpi span { color: var(--muted); font-weight: 500; }
.kpi strong { font-size: 2rem; line-height: 1.2; }
.kpi small { color: var(--muted); }
.toolbar { display: grid; gap: 12px; margin-bottom: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font: 600 .92rem var(--font); cursor: pointer; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--ink); }
.chip b { color: var(--muted); font-weight: 500; margin-left: 4px; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.active b { color: #e9d6c8; }
@media (max-width: 640px) {
  .row { flex-wrap: wrap; }
  .row-main { flex-basis: calc(100% - 50px); }
  .row-tags { justify-content: flex-start; padding-left: 50px; }
  .row [data-manage] { margin-left: 50px; }
}

/* ---------- dialog & toast ---------- */
.dlg-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(31, 27, 24, .42); backdrop-filter: blur(2px); display: grid; place-items: end center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(16px); opacity: .6; } }
.dlg {
  width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--paper);
  border-radius: 26px 26px 0 0; padding: 18px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg); animation: rise .2s cubic-bezier(.2, .9, .3, 1);
}
@media (min-width: 640px) { .dlg-backdrop { place-items: center; } .dlg { border-radius: 26px; padding: 22px 24px 26px; } }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dlg-head h2 { margin: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 12px 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.dlg-sec { display: grid; gap: 10px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.dlg-sec h3 { margin: 0; }
.dlg-sec .btn { justify-self: start; }
.day-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.dlg-danger h3 { color: var(--red); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 18px); z-index: 60; transform: translate(-50%, 20px);
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
  font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--red); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .points { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ======================= prototype steps 2–8 ======================= */
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }
.tab-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
#billSearch, #convSearch, #menuSearch { margin: 10px 0; }
.empty-line { padding: 24px 8px; text-align: center; }
.more { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 14px; }
.more > summary { cursor: pointer; font-weight: 600; color: var(--brand-ink); }
.more[open] > summary { margin-bottom: 6px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.wrap-actions { flex-wrap: wrap; justify-content: flex-start; border-top: 1px solid var(--line); padding-top: 14px; }
.danger-text { color: var(--red); }
.inline-form { display: flex; gap: 8px; margin: 10px 0; }
.inline-form input, .inline-form select { flex: 1; }
.link-box { padding: 12px; background: var(--bg); border-radius: 12px; overflow-wrap: anywhere; font-size: .92rem; }
.tag-blue { background: #e1eefb; color: #1d4f86; }
.tag-gray { background: var(--bg); color: var(--muted); }

/* tab badges */
.tab { position: relative; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.tabs .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
@media (min-width: 900px) { .tabs .badge { top: 4px; left: calc(50% + 4px); } }

/* switch (sold out / on sale) */
.switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font: 600 .88rem var(--font); color: var(--red); padding: 6px; flex: none; }
.switch span { width: 46px; height: 28px; border-radius: 99px; background: #d9d3d1; position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch.on { color: var(--brand-ink); }
.switch.on span { background: var(--brand); }
.switch.on span::after { transform: translateX(18px); }
.switch em { font-style: normal; min-width: 4.5em; text-align: left; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; }
.switch-row input { width: 22px; min-height: 22px; height: 22px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.switch-row span { display: grid; }
.switch-row small { color: var(--muted); }

/* menu tab */
.menu-group { margin: 18px 0; }
.menu-group h2 { font-size: 1.05rem; }
.menu-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.menu-item { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.menu-item.is-out { background: #fbf6f3; }
.menu-item.is-out .mi-text strong { color: var(--muted); }
.menu-item-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.menu-item-main img, .thumb-ph { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.thumb-ph { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 1.2rem; }
.mi-text { display: grid; min-width: 0; }
.photo-pick { display: block; cursor: pointer; }
.photo-box { display: grid; place-items: center; height: 160px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--brand-ink); font-weight: 600; overflow: hidden; background: var(--bg); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.small-photo .photo-box { width: 110px; height: 110px; }
.opts h3 { margin: 6px 0 0; }
.opt-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 0 0 10px; display: grid; gap: 8px; }
.opt-head, .choice { display: flex; gap: 6px; }
.choice input[name=cprice] { max-width: 90px; }
.opt-flags { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cat-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.cat-list li { display: flex; gap: 6px; }
.checklist.plain li { display: block; }

/* storefront */
.page-public { min-height: 100vh; }
.store-hero { max-width: 760px; margin: 0 auto; padding: 0 0 4px; }
.store-cover {
  height: 120px; border-radius: 0 0 28px 28px;
  background: radial-gradient(circle at 18% 30%, rgba(255, 255, 255, .5) 0 8%, transparent 9%),
              radial-gradient(circle at 82% 70%, rgba(255, 255, 255, .35) 0 6%, transparent 7%),
              linear-gradient(135deg, #ffb27a, #ff8a3d 55%, #f2711c);
}
@media (min-width: 780px) { .store-cover { border-radius: 0 0 32px 32px; height: 150px; } }
.sf-card { margin: -44px 12px 0; padding: 16px 16px 14px; background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); display: grid; gap: 12px; position: relative; }
.store-id { display: flex; align-items: center; gap: 14px; }
.store-name { flex: 1; min-width: 0; display: grid; gap: 4px; }
.store-id h1 { margin: 0; font-size: 1.4rem; line-height: 1.25; }
.store-logo { width: 68px; height: 68px; border-radius: 20px; object-fit: cover; flex: none; margin-top: -40px; border: 4px solid var(--paper); box-shadow: var(--shadow); background: var(--paper); }
.store-logo-ph { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 1.6rem; }
.store-lang { align-self: flex-start; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: .84rem; font-weight: 600; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.is-open { background: var(--ok-soft); color: var(--ok); }
.status-pill.is-closed { background: var(--red-soft); color: var(--red); }
.open-dot::before, .closed-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--ok); }
.closed-dot::before { background: var(--red); }
.store-about { margin: 0; color: var(--muted); font-size: .95rem; }
.store-follow { display: flex; gap: 8px; flex-wrap: wrap; }
.sf-card .banner { margin: 0; }
.cat-chips { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; background: rgba(246, 244, 241, .94); backdrop-filter: blur(10px); max-width: 760px; margin: 0 auto; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips .chip { flex: none; display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.cat-chips .chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.store-menu { max-width: 760px; margin: 0 auto; padding: 0 16px 150px; }
.store-cat { scroll-margin-top: 70px; }
.store-cat h2 { margin: 22px 4px 10px; font-size: 1.15rem; }
.dish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 700px) { .dish-list { grid-template-columns: 1fr 1fr; } }
.dish { width: 100%; height: 100%; display: flex; gap: 12px; align-items: stretch; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; text-align: left; font: inherit; color: inherit; cursor: pointer; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .1s; }
.dish:hover:not(:disabled) { box-shadow: var(--shadow); }
.dish:active:not(:disabled) { transform: scale(.99); }
.dish-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dish-text strong { font-size: 1.02rem; line-height: 1.35; }
.dish-text small { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.dish-price { margin-top: auto; padding-top: 6px; font-size: 1.12rem; color: var(--ink); }
.dish-price .per { font: 500 .85rem var(--font); color: var(--muted); }
.dish-price .was, s.was { color: var(--muted); font: 400 .88rem var(--font); }
.dish-flag { font-style: normal; color: var(--red); font-weight: 600; font-size: .85rem; }
.dish-media { position: relative; flex: none; width: 104px; min-height: 40px; align-self: center; }
.dish-media img { width: 104px; height: 104px; border-radius: 16px; object-fit: cover; display: block; }
.dish.no-img .dish-media { width: 40px; align-self: flex-end; }
.dish-add { position: absolute; right: -4px; bottom: -4px; width: 38px; height: 38px; border-radius: 50%; background: var(--paper); color: var(--brand-ink); display: grid; place-items: center; font-size: 1.5rem; font-weight: 500; box-shadow: 0 2px 8px rgba(31, 27, 24, .18); border: 1.5px solid var(--brand); }
.dish.no-img .dish-add { position: static; }
.dish.is-out { opacity: .55; cursor: not-allowed; }
.store-foot { max-width: 760px; margin: 0 auto; padding: 8px 16px 130px; text-align: center; color: var(--muted); display: grid; gap: 6px; justify-items: center; }
.store-foot p { margin: 0; }
.powered { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; text-decoration: none; }
.powered img { border-radius: 6px; }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); pointer-events: none; }
.cart-btn { pointer-events: auto; width: 100%; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 18px 0 12px; border: 0; border-radius: 20px; background: var(--ink); color: #fff; font: 600 1.05rem var(--font); cursor: pointer; box-shadow: var(--shadow-lg); animation: rise .25s cubic-bezier(.2, .9, .3, 1); }
.cart-btn b { margin-left: auto; font: 600 1.15rem var(--font-brand); }
.cart-n { min-width: 36px; height: 36px; border-radius: 12px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font: 600 1rem var(--font-brand); }
.chat-fab { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 21; display: flex; align-items: center; gap: 6px; border: 0; border-radius: 99px; padding: 6px 16px 6px 8px; background: var(--paper); color: var(--ink); font: 600 .95rem var(--font); box-shadow: var(--shadow-lg); cursor: pointer; }
.chat-fab img { display: block; }
.chat-fab.lifted { bottom: calc(92px + env(safe-area-inset-bottom)); }
.sheet-img { width: calc(100% + 40px); margin: -18px -20px 12px; height: 200px; object-fit: cover; border-radius: 20px 20px 0 0; }
.pick-group { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.pick-group legend { font-weight: 700; margin-bottom: 6px; }
.req { font-style: normal; color: var(--red); font-size: .82rem; font-weight: 600; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pick-row input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--brand); }
.pick-row span { flex: 1; }
.pick-row:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.qty-row { display: flex; align-items: center; justify-content: center; gap: 18px; }
.qty-row strong { min-width: 2ch; text-align: center; font-size: 1.2rem; }
.qty-row.sm { gap: 8px; }
.qty-row.sm strong { font-size: 1rem; }
.qty-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); font-size: 1.3rem; cursor: pointer; }
.qty-row.sm .qty-btn { width: 34px; height: 34px; font-size: 1.1rem; }
.seg { display: flex; gap: 6px; background: var(--bg); padding: 4px; border-radius: 14px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; min-height: 44px; border-radius: 10px; font-weight: 600; cursor: pointer; text-align: center; padding: 0 6px; }
.seg input:checked + span { background: var(--paper); box-shadow: 0 1px 4px rgba(23,33,30,.12); color: var(--brand-ink); }
.seg input:focus-visible + span { outline: 3px solid var(--yellow); }
.map { height: 240px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.cart-lines, .bill-lines ul, .bill-lines-adm { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.cart-lines li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.cart-lines li > div:first-child { display: grid; }
.bill-lines li > span, .bill-lines-adm li > span { display: block; }
.bill-lines li small, .bill-lines-adm li small { display: block; }
.cart-lines small, .bill-lines small, .bill-lines-adm small, .k-card small { color: var(--muted); font-size: .85rem; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 0; margin: 8px 0; }
.sum dt { padding-right: 12px; }
.sum dd { margin: 0; text-align: right; }
.sum .total { font-weight: 700; font-size: 1.15rem; padding-top: 6px; border-top: 1px solid var(--line); }

/* chat bubbles (shop + customer) */
.msgs { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 12px 4px; }
.dlg .msgs { height: 50vh; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); align-self: flex-start; }
.msg p, .msg .msg-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg img { max-width: 220px; max-height: 260px; border-radius: 10px; display: block; }
.msg img.sticker { max-width: 110px; }
.msg small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.msg.me { align-self: flex-end; background: var(--brand-soft); color: var(--ink); border-color: #ffd2b0; }
.msg.me small { color: var(--muted); }
.msg.me a { color: var(--brand-ink); }
.msg.sys { align-self: center; background: var(--yellow-soft); border-color: transparent; font-size: .9rem; }
.composer { display: flex; gap: 6px; align-items: flex-end; padding-top: 8px; border-top: 1px solid var(--line); }
.composer input[name=text], .composer textarea { flex: 1; min-height: 44px; resize: none; }
.attach { font-size: 1.3rem; }
.chat-alt { display: flex; gap: 6px; }

/* bill page (customer) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bill-page { padding-top: 14px; display: grid; gap: 14px; }
.bill-page > * { margin: 0; }
.bill-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bill-shop { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.bill-shop > span:last-child { display: grid; line-height: 1.3; }
.bill-shop small { color: var(--muted); font-size: .85rem; }
.bill-hero { display: flex; align-items: center; gap: 12px; }
.bill-hero img { flex: none; }
.bill-say { position: relative; margin: 0; padding: 14px 16px; background: var(--paper); border-radius: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); font-weight: 600; line-height: 1.5; }
.bill-say::before { content: ""; position: absolute; left: -7px; top: 50%; width: 14px; height: 14px; background: var(--paper); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 14px 6px 12px; margin: 0; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.stepper li { display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: .8rem; position: relative; text-align: center; line-height: 1.3; }
.stepper li::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--paper); z-index: 1; }
.stepper .is-done { color: var(--ink); }
.stepper .is-done::before, .stepper .is-now::before { background: var(--brand); }
.stepper .is-done .dot { background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a1405' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--brand); }
.stepper .is-now { color: var(--ink); font-weight: 700; }
.stepper .is-now .dot { background: var(--paper); border: 5px solid var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.bill-status { text-align: center; font-weight: 600; margin: 10px 0 16px; }
.pay-box { text-align: center; padding: 22px 20px; }
.pay-label { margin: 0; color: var(--muted); font-weight: 600; }
.pay-amt { margin: 0 0 14px; font: 600 2.6rem/1.1 var(--font-brand); letter-spacing: -.01em; }
.pay-box .facts { text-align: left; }
.qr { display: grid; place-items: center; margin: 0 auto 10px; width: 252px; padding: 6px; background: #fff; border-radius: 18px; border: 1px solid var(--line); }
.qr svg { width: 240px; height: 240px; }
.qr-img { display: block; max-width: 280px; width: 100%; margin: 0 auto 8px; border-radius: 16px; }
.trust { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; padding: 10px; margin: 10px 0 16px; background: var(--sunk); border-radius: 14px; font-size: .88rem; }
.slip-btn { cursor: pointer; }
.bill-lines { padding: 18px 18px 14px; }
.bill-lines ul { gap: 12px; }
.bill-lines li b { font-family: var(--font-brand); font-weight: 600; }
.tell { text-align: center; margin: 4px 0; }
.tell p { margin-bottom: 8px; }
.tell-btns { display: flex; gap: 10px; justify-content: center; }
.btn-line { background: #06c755; color: #fff; }
.btn-fb { background: #0866ff; color: #fff; }
.pin-share { display: grid; gap: 10px; justify-items: start; }
.pin-share p { margin: 0; }
.deli-hello { display: grid; justify-items: center; gap: 6px; padding: 8px 0 4px; text-align: center; color: var(--muted); font-size: .92rem; }
.deli-hello p { margin: 0; max-width: 30ch; }

/* receipt (print friendly) */
.receipt-wrap { padding: 20px 16px 40px; }
.receipt { max-width: 380px; margin: 0 auto; background: #fff; padding: 22px; border-radius: 6px; box-shadow: 0 10px 30px rgba(23,33,30,.1); font-size: .92rem; }
.receipt header { text-align: center; border-bottom: 1px dashed #bbb; padding-bottom: 10px; }
.receipt h1 { font-size: 1.2rem; margin: 0; }
.receipt h2 { font-size: 1rem; margin: 10px 0 0; }
.receipt header p { margin: 0; }
.rc-meta, .rc-sum { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 10px 0; }
.rc-meta dd, .rc-sum dd { margin: 0; text-align: right; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt th, .receipt td { padding: 4px 0; text-align: right; vertical-align: top; }
.receipt th:first-child, .receipt td:first-child { text-align: left; }
.receipt td small { display: block; color: #666; }
.receipt thead { border-bottom: 1px solid #ddd; }
.rc-sum { border-top: 1px dashed #bbb; padding-top: 8px; }
.rc-sum .total { font-weight: 700; font-size: 1.1rem; }
.rc-paid { text-align: center; font-weight: 700; }
.receipt footer { text-align: center; color: #666; }
.receipt.is-void { position: relative; }
.receipt.is-void::after { content: "VOID"; position: absolute; inset: 40% 0 auto; text-align: center; font-size: 3rem; color: rgba(184,50,36,.25); transform: rotate(-20deg); font-weight: 700; }
.receipt-actions { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
@media print {
  body { background: #fff; }
  .no-print, .topbar { display: none !important; }
  .receipt { box-shadow: none; max-width: 80mm; padding: 0; }
}

/* bills tab */
.bill-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 10px; }
.bill-card { background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--radius); display: grid; }
.bill-card.tone-yellow { border-left-color: var(--yellow); }
.bill-card.tone-jade { border-left-color: var(--ok); }
.bill-card.tone-blue { border-left-color: #4a8fd6; }
.bill-card.tone-red { border-left-color: var(--red); opacity: .75; }
.bill-main { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.bill-no { font-weight: 700; font-size: 1.05rem; }
.bill-who { display: grid; min-width: 0; }
.bill-amt { display: grid; justify-items: end; gap: 4px; }
.bill-next { margin: 0 14px 12px; }
.slips { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.slip { margin: 0; width: 140px; }
.slip img { width: 140px; height: 200px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.slip-check { font-size: .82rem; font-weight: 600; }
.check-ok { color: var(--ok); }
.check-duplicate { color: var(--red); }
.check-no_qr, .check-quota { color: #8a6d00; }
.bill-lines-adm li, .bill-lines li { display: flex; justify-content: space-between; gap: 10px; }
/* bill editor: photo menu (left) + the bill (right) */
.dlg.dlg-wide { width: min(1080px, 100%); }
.ed-cols { display: grid; gap: 16px; margin-top: 10px; }
.ed-menu { display: grid; gap: 8px; align-content: start; min-width: 0; }
.alb-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.alb-tabs .chip { flex: none; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: 38vh; overflow-y: auto; padding: 2px; }
.pick-card { position: relative; display: grid; gap: 2px; align-content: start; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 6px; font: inherit; cursor: pointer; }
.pick-card:hover { border-color: var(--brand); }
.pick-card.in-bill { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.pick-card.is-out { opacity: .55; }
.pc-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; font-weight: 700; color: var(--brand-ink); font-size: 1.4rem; }
.pc-name { font-size: .86rem; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-price { font-size: .82rem; color: var(--brand-ink); font-weight: 700; }
.pc-price s { color: var(--muted); font-weight: 400; }
.pc-n { position: absolute; top: 2px; right: 2px; min-width: 24px; height: 24px; border-radius: 99px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: .8rem; }
.pc-out { position: absolute; top: 8px; left: 8px; }
.ed-bill { min-width: 0; }
.edit-lines { list-style: none; padding: 0; display: grid; gap: 8px; margin: 0 0 12px; }
.edit-lines li { display: grid; grid-template-columns: 36px 1fr 76px auto; gap: 6px; align-items: center; }
.edit-lines li.muted { display: block; }
.ln-img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; background: var(--brand-soft); display: grid; place-items: center; font-weight: 700; color: var(--brand-ink); }
.ln-main { display: grid; min-width: 0; }
.ln-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-save { display: flex; gap: 8px; }
.ed-save .btn { flex: 1; }
@media (min-width: 900px) {
  .ed-cols { grid-template-columns: 1.15fr 1fr; align-items: start; }
  .pick-grid { max-height: 62vh; }
  .ed-bill { position: sticky; top: 0; }
}
.nudge { animation: nudge .3s; }
@keyframes nudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .nudge { animation: none; } }

/* kitchen screen */
.kitchen-page { min-height: calc(100vh - 60px); padding: 12px 16px 40px; background: #2a1d16; color: #fdf3ec; }
.kitchen-head { display: flex; align-items: center; gap: 12px; }
.kitchen-head h1 { margin: 0; flex: 1; }
.kitchen-head .btn-quiet { color: #f2f5f4; }
.kitchen-head span { font-size: 1.6rem; font-weight: 700; }
.kitchen-cols { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-top: 12px; }
@media (max-width: 720px) { .kitchen-cols { grid-template-columns: 1fr; } }
.k-list { display: grid; gap: 12px; }
.k-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 14px; border-top: 8px solid var(--yellow); }
.k-card.cooking { border-top-color: #4a8fd6; }
.k-card header { display: flex; gap: 10px; align-items: baseline; }
.k-card header strong { font-size: 1.5rem; flex: 1; }
.k-card ul { list-style: none; padding: 0; margin: 10px 0; font-size: 1.15rem; display: grid; gap: 6px; }
.k-card li b { display: inline-block; min-width: 1.8em; }
.k-note { background: var(--yellow-soft); padding: 8px 10px; border-radius: 10px; font-weight: 600; }

/* inbox */
.shop-main-chat { max-width: none; padding: 0; }
.inbox { display: grid; grid-template-columns: 1fr; height: calc(100vh - 60px - var(--tabbar)); height: calc(100dvh - 60px - var(--tabbar) - env(safe-area-inset-bottom)); }
/* The chat screen never scrolls as a page: only the message list scrolls, so the header and the
   typing box stay put (iPad/iPhone Safari otherwise drags the whole page and the box slides away). */
html:has(.inbox), body:has(.inbox) { height: 100%; overflow: hidden; overscroll-behavior: none; }
.inbox, .inbox-list, .conv, .msgs { min-height: 0; }
.msgs { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.conv-head, .conv-bills, .composer, .conv > form, .conv > .qr-pop { flex: none; }
.inbox-list { overflow-y: auto; padding: 12px 12px 20px; }
.inbox .conv { display: none; }
.inbox.has-open .inbox-list { display: none; }
.inbox.has-open .conv { display: flex; }
@media (min-width: 900px) {
  .inbox { grid-template-columns: 340px 1fr; height: calc(100vh - 60px); height: calc(100dvh - 60px); }
  .inbox .conv, .inbox.has-open .conv { display: flex; }
  .inbox.has-open .inbox-list { display: block; }
  .inbox-list { border-right: 1px solid var(--line); }
  .conv-back { display: none; }
}
.conv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.conv-row { display: flex; gap: 10px; padding: 10px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.conv-row:hover { background: var(--paper); }
.conv-row.active { background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.conv-row.unread strong { font-weight: 700; }
.av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.av-ph { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.conv-text { flex: 1; min-width: 0; display: grid; }
.conv-top, .conv-bottom { display: flex; gap: 6px; align-items: center; min-width: 0; }
.conv-top strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.conv-top small { color: var(--muted); }
.conv-bottom .last { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .92rem; }
.ch { font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--bg); color: var(--muted); flex: none; }
.ch-line { background: #e3f8ec; color: #067a37; }
.ch-messenger { background: #e5efff; color: #0a4fbf; }
.ch-web { background: var(--yellow-soft); color: #6b4f00; }
.conv { flex-direction: column; min-height: 0; background: var(--bg); padding: 0 12px 10px; }
.conv-empty { margin: auto; }
.conv-head { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.conv-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.conv-who > span { display: grid; }
.conv-acts { display: flex; gap: 6px; }
.conv .msgs { flex: 1; }
.qr-pop { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 6px; max-height: 240px; overflow-y: auto; display: grid; }
.qr-pop button { text-align: left; border: 0; background: none; padding: 8px; border-radius: 8px; font: inherit; cursor: pointer; display: grid; }
.qr-pop button:hover { background: var(--bg); }
.qr-pop span { color: var(--muted); font-size: .85rem; }
/* bills of the open chat, under its header */
.conv-bills { border-bottom: 1px solid var(--line); padding: 6px 0; display: grid; gap: 6px; }
.cb-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cb-main { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 6px 10px; font: inherit; cursor: pointer; text-align: left; }
.cb-main b { margin-left: auto; }
.cb-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; max-height: 30vh; overflow-y: auto; }
.cb-list button { width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; border: 0; border-radius: 10px; background: var(--paper); padding: 6px 10px; font: inherit; cursor: pointer; text-align: left; }
.warn-text { color: var(--brand-ink); text-decoration: underline dotted; cursor: help; }
.mini-bills { list-style: none; padding: 0; display: grid; gap: 6px; }
.mini-bills button { width: 100%; display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 8px 10px; font: inherit; cursor: pointer; }
.mini-bills b { margin-left: auto; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; }
.tag-chip input { width: 16px; min-height: 16px; height: 16px; }
.tc-jade { border-color: var(--brand); }
.tc-yellow { border-color: #d4a800; }
.tc-red { border-color: var(--red); }
.tc-blue { border-color: #4a8fd6; }
.tc-purple { border-color: #8a5bd6; }

/* shop settings */
.set-list { display: grid; gap: 8px; }
.set-list a { display: grid; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.set-list a:hover { border-color: var(--brand); }
.set-list small, .checklist a small { color: var(--muted); }
.checklist a { display: grid; color: var(--ink); text-decoration: none; }
.sec-title { margin: 6px 0 14px; }
.store-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 4px 4px 4px 0; }
.hours input[type=time] { min-height: 40px; padding: 4px 8px; }
.seg-3 span, .seg-4 span { font-size: .92rem; }
.seg-4 { flex-wrap: wrap; }
.seg-4 label { flex: 1 1 45%; }
.tier-list { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; }
.tier-list li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tier-list input { width: 76px; }
.place-hits { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 4px; }
.place-hits button { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 8px 10px; font: inherit; cursor: pointer; }
.guide { padding-left: 1.2em; display: grid; gap: 6px; }
.ok-line { color: var(--ok); font-weight: 700; }
.tag-edit { list-style: none; padding: 0; display: grid; gap: 8px; }
.tag-edit li { display: grid; grid-template-columns: 1fr 110px auto; gap: 6px; }
.plan-table, .app-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .92rem; }
.plan-table th, .plan-table td, .app-table th, .app-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.app-table input { min-height: 40px; padding: 6px 8px; }

/* stats */
.kpi-hi { border-color: var(--brand); background: var(--brand-soft); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; align-items: stretch; position: relative; min-width: 0; padding-bottom: 18px; }
.bar-col span { display: block; border-radius: 4px 4px 0 0; }
.b-own { background: var(--brand); }
.b-apps { background: #ffc9a3; }
.bar-col small { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--muted); }
.hours-bars { height: 120px; }
.legend { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .88rem; }
.legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.lg-own { background: var(--brand); }
.lg-apps { background: #ffc9a3; margin-left: 10px; }
.hbars { list-style: none; padding: 0; display: grid; gap: 8px; }
.hbars li { display: grid; grid-template-columns: 7.5em 1fr 6.5em; gap: 8px; align-items: center; }
.hbars b { text-align: right; }
.hb { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.hb i { display: block; height: 100%; background: var(--brand); }
.top { padding-left: 1.3em; display: grid; gap: 6px; }
.top li span { margin-right: 8px; }
.top small { color: var(--muted); margin-left: 6px; }
.stats-grid { margin-bottom: 0; }

/* LINE "check connection" report */
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.checks { list-style: none; padding: 12px 14px; margin: 12px 0 0; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; }
.checks li { line-height: 1.5; font-weight: 500; }
.checks li.hint { font-weight: 400; }
.check-bad { color: var(--red); }

/* LINE connection guide */
.lg { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 14px; counter-reset: none; }
.lg-step { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--paper); }
.lg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 1.02rem; }
.lg-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; }
.lg-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; line-height: 1.6; }
.lg-list b { color: var(--brand-ink); }
.lg-copy { display: flex; gap: 8px; margin: 8px 0; }
.lg-copy input { flex: 1; min-width: 0; font-size: .85rem; }
.lg-fig { margin: 12px 0 0; }
.lg-fig svg, .lg-fig img { width: 100%; height: auto; display: block; }
.lg-fig figcaption { font-size: .78rem; color: var(--muted); margin-top: 4px; text-align: center; }
.lg-again { margin-top: 14px; }
.lg-again summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; }
.lg-form { border-top: 1px dashed var(--line); padding-top: 14px; }

/* Phone width: nothing may push the page sideways — no sideways scroll, no double-tap zoom
   (tapping + quickly zoomed the page on iPhone, then it slid left/right). Pinch zoom still works. */
html, body { overflow-x: clip; overscroll-behavior-x: none; touch-action: manipulation; }
@supports not (overflow-x: clip) { html, body { overflow-x: hidden; } }
.seg label { position: relative; min-width: 0; }
.seg input { width: 1px; height: 1px; min-height: 0; left: 0; top: 0; }
.hours { table-layout: fixed; }
.hours td:first-child { width: 38%; }
.hours input[type=time] { width: 100%; min-width: 0; padding: 4px 6px; }
.panel, .form, .field { min-width: 0; }
img, svg, video { max-width: 100%; }
.store-follow { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px; max-width: 760px; margin: 4px auto 12px; }
.btn-line { background: #06c755; color: #fff; border-color: #06c755; }
.btn-line small { opacity: .85; font-weight: 500; }

/* Facebook pages */
.btn-fb { background: #1877f2; color: #fff; border-color: #1877f2; }
.fb-pages { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.fb-pages li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.fb-pages li strong { flex: 1; min-width: 120px; }
.fb-pages img, .fb-ph { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.fb-ph { display: grid; place-items: center; background: #e7f0fd; color: #1877f2; font-weight: 700; }
.fb-pick { margin-top: 12px; }

/* Plan page */
.meter { margin: 10px 0; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: .92rem; }
.bar-warn span { background: #e8a33d; }
.bar-over span { background: var(--red); }
.notice { background: var(--brand-soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plan-table th { vertical-align: bottom; }
.plan-price { font-weight: 400; font-size: .85rem; margin-top: 4px; line-height: 1.35; }
.plan-cur { background: var(--brand-soft); }

/* Bill card in chats (mirrors the LINE Flex card) */
.bcard { width: min(280px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); text-align: left; }
.bcard-head { padding: 8px 12px; font-weight: 600; font-size: .9rem; }
.bcard-body { padding: 10px 12px; }
.bcard-title { display: block; font-size: 1.05rem; }
.bcard-body small { color: var(--muted); }
.bcard ul { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: .88rem; }
.bcard li { display: flex; justify-content: space-between; gap: 8px; }
.bcard li span:last-child { white-space: nowrap; }
.bcard-total { font-weight: 700; font-size: 1rem; }
.bcard-btn { display: block; text-align: center; padding: 10px; font-weight: 600; text-decoration: none; border-top: 1px solid var(--line); color: var(--ink); }
.bcard-btn.is-pay { background: var(--brand); color: var(--on-brand); }
.msg .bcard + small, .msg .bcard { margin-top: 2px; }

/* Customers tab */
.cust-tools { display: grid; gap: 10px; margin-bottom: 8px; }
.cust-tools .chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.cust-tools .chip { flex: none; }
.cust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cust-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; font: inherit; color: inherit; cursor: pointer; }
.cust-list button:hover { border-color: var(--brand); }
.cust-main { flex: 1; min-width: 0; display: grid; }
.cust-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-main small, .cust-stat small { color: var(--muted); font-size: .8rem; }
.cust-stat { display: grid; text-align: right; flex: none; }

/* Settings home */
.store-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.store-url { display: block; font-weight: 600; word-break: break-all; }
.set-group { margin: 22px 4px 8px; font-size: .85rem; color: var(--muted); text-transform: none; letter-spacing: .02em; }
@media (max-width: 380px) { .tab { font-size: .74rem; } }

/* Location in chat */
.loc-card { display: grid; gap: 2px; padding: 8px 10px; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.loc-card a { font-weight: 600; }
.loc-card small { color: var(--muted); }
.msg.has-card { background: transparent; border: 0; padding: 0; box-shadow: none; }
.msg.has-card > small { padding: 0 4px; }
.dish-price .was { color: var(--muted); font-weight: 400; margin-right: 2px; }
.rider-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 12px 0; background: var(--bg); }
.rider-box h3 { margin: 0 0 6px; font-size: .95rem; }
.rider-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 12px 0; background: var(--bg); }
.rider-box h3 { margin: 0 0 6px; font-size: .95rem; }

/* Page365 importer */
.imp-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.imp-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.imp-list li.is-off { opacity: .55; }
.imp-pick { padding-top: 18px; }
.imp-photo { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--bg); display: grid; place-items: center; font-size: .7rem; color: var(--muted); text-align: center; }
.imp-photo img { width: 100%; height: 100%; object-fit: cover; }
.imp-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.imp-main small { color: var(--muted); }
.imp-ctrls { display: flex; gap: 6px; flex-wrap: wrap; }
.imp-ctrls select { max-width: 100%; min-width: 0; flex: 1 1 140px; font-size: .85rem; padding: 4px 6px; }
@media (max-width: 520px) { .hide-sm { display: none; } }
.hint, .panel p { overflow-wrap: anywhere; }
.menu-shop { padding: 8px 12px 2px; color: var(--muted); font-size: .85rem; }
.menu-shop strong { color: var(--ink); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.tk-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tk-list button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 10px 12px; font: inherit; cursor: pointer; }
.tk-list button > span:first-child { flex: 1; display: grid; min-width: 0; }
.tk-list button.unread { border-color: var(--brand); }
.tk-thread { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; padding: 8px 0; }
.tk-thread .msg { max-width: 85%; }
.chip input[hidden] + * { margin: 0; }
.tk-thread .msg.me { justify-self: end; } .tk-thread .msg.them { justify-self: start; }
.chips + .tk-list { margin-top: 12px; }

/* ======================= Brand v2 polish (Nov 2026) ======================= */
/* chats */
.inbox-list { background: var(--paper); }
@media (min-width: 900px) { .inbox-list { background: var(--paper); } }
.conv-row { padding: 10px 12px; border-radius: 14px; transition: background .12s; }
.conv-row:hover { background: var(--sunk); }
.conv-row.active { background: var(--brand-soft); box-shadow: none; }
.conv-row.unread .conv-top strong::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: middle; }
.av { width: 46px; height: 46px; }
.ch { border-radius: 99px; padding: 1px 8px; }
.conv { padding: 0 14px 12px; }
.conv-head { background: var(--bg); padding: 12px 0; }
.msgs { gap: 6px; padding: 14px 2px; }
.msg { border: 0; border-radius: 20px 20px 20px 6px; padding: 9px 14px; box-shadow: var(--shadow-sm); }
.msg.me { border-radius: 20px 20px 6px 20px; background: #ffe2cc; }
.msg.sys { box-shadow: none; border-radius: 16px; padding: 8px 14px; }
.msg.has-card { background: transparent; box-shadow: none; padding: 0; }
.composer { border-top: 0; background: var(--paper); border-radius: 22px; padding: 6px; box-shadow: var(--shadow); align-items: center; }
.composer input[name=text], .composer textarea { border: 0; min-height: 42px; box-shadow: none; padding: 10px 8px; }
.composer input[name=text]:focus, .composer textarea:focus { box-shadow: none; }
.composer .btn-primary { border-radius: 16px; }
.conv-bills { border-bottom: 0; }
.cb-main { border-radius: 14px; box-shadow: var(--shadow-sm); }
/* bills */
.bill-card { border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm), inset 5px 0 0 var(--tone, var(--line-strong)); overflow: hidden; transition: box-shadow .15s; }
.bill-card:hover { box-shadow: var(--shadow), inset 5px 0 0 var(--tone, var(--line-strong)); }
.bill-card.tone-yellow { --tone: var(--yellow); }
.bill-card.tone-jade { --tone: #3fb37a; }
.bill-card.tone-blue { --tone: #4a8fd6; }
.bill-card.tone-red { --tone: var(--red); }
.bill-main { padding: 14px 16px 12px 20px; }
.bill-next { margin: 0 16px 14px 20px; }
.bill-amt strong, .bill-amt b { font-family: var(--font-brand); font-weight: 600; font-size: 1.1rem; }
/* menu (shop) */
.menu-item { border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow-sm); }
.menu-item-main img, .thumb-ph { border-radius: 14px; }
/* settings & misc cards */
.set-group, .store-card-set { border-radius: var(--radius); }
.seg { background: var(--sunk); }
.pick-row { border-radius: 14px; }
.pick-row:has(input:checked) { border-color: var(--brand); background: #fff4ec; }
.qty-btn { border-color: var(--line-strong); }
.qty-btn:hover { border-color: var(--ink); }
.banner { border-radius: 14px; }
.shop-head h1 { font-size: 1.5rem; }
.page-title { font-size: 1.7rem; }
/* tab bar: badge sits on the icon pill */
.tabs .badge { top: 4px; left: calc(50% + 8px); box-shadow: 0 0 0 2px var(--paper); }
/* landing */
.eyebrow { display: inline-block; margin-bottom: 12px; padding: 6px 14px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: .95rem; }
.hero-art { position: relative; justify-self: center; width: min(380px, 100%); }
.hero-deli { position: absolute; z-index: 2; right: -24px; top: -64px; width: 140px; height: auto; transform: rotate(6deg); filter: drop-shadow(0 10px 18px rgba(31, 27, 24, .18)); }
@media (max-width: 520px) { .hero-deli { right: -6px; top: -54px; width: 110px; } }
.hero { padding-top: 64px; }
.ticket { border-radius: 10px 10px 0 0; box-shadow: var(--shadow-lg); }
.points > div { border-top: 0; background: var(--paper); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.status-picks { border: 0; padding: 0 0 0 4px; margin: 0; display: grid; gap: 6px; }
.status-picks legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.status-picks:disabled { opacity: .5; }
/* customer address (address page + bill waiting for its fee) */
.addr-page { max-width: 560px; margin: 0 auto; padding: 14px 16px 40px; display: grid; gap: 14px; }
.addr-page > * { margin: 0; }
.addr-box h2 { margin-bottom: 4px; }
.addr-box > p { margin-bottom: 14px; }
.addr-saved { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--brand); border-radius: 18px; background: #fff7f0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.addr-saved > span:nth-child(2) { flex: 1; display: grid; min-width: 0; }
.addr-saved small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.addr-saved-ic { font-size: 1.6rem; }
.addr-saved-go { font-size: 1.8rem; color: var(--brand-ink); }
.addr-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; margin: 14px 0; }
.addr-or::before, .addr-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.addr-map-wrap { position: relative; }
.addr-map { height: 240px; border-radius: 18px; overflow: hidden; background: var(--sunk); border: 1px solid var(--line); }
.addr-gps { white-space: nowrap; position: absolute; z-index: 500; left: 50%; bottom: 40px; transform: translateX(-50%); box-shadow: var(--shadow); }
.addr-hint { margin: 6px 2px 0; font-size: .85rem; color: var(--muted); }
.addr-done { padding-top: 70px; }
.center { text-align: center; }
.follow-line { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #e9f9ef; color: var(--ink); text-decoration: none; border: 1px solid #c4ecd2; }
.follow-line > span { flex: 1; display: grid; }
.follow-line small { color: var(--muted); }
.follow-line b { background: #06c755; color: #fff; padding: 8px 12px; border-radius: 12px; font-size: .9rem; white-space: nowrap; }
.bcard-img { display: block; width: 100%; aspect-ratio: 191 / 100; object-fit: cover; }
.addr-search { display: flex; gap: 8px; margin-bottom: 8px; }
.addr-search input { flex: 1; min-width: 0; }
.addr-back { margin-top: 18px; }
.merge-sec summary { cursor: pointer; padding: 6px 0; list-style-position: inside; }
.merge-sec .rows { margin-top: 10px; }
.cust-pin { margin: -4px 0 4px; font-size: .95rem; }
/* chat header v2: name never squeezed; actions as icon buttons; bill tools in their own row */
.conv-head { gap: 8px; padding: 10px 0 8px; border-bottom: 0; }
.conv-who { gap: 10px; }
.conv-who > span { min-width: 0; }
.conv-who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.05rem; }
.conv-who .av { width: 40px; height: 40px; flex: none; }
.conv-who .ch { justify-self: start; }
.conv-acts { flex: none; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 11px; justify-content: center; border-radius: 13px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font: 600 .9rem var(--font); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { flex: none; }
.conv-tools { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 8px; border-bottom: 1px solid var(--line); flex: none; }
.conv-tools > .btn { flex: none; }
.conv-tools .conv-bills { flex: 1 1 260px; min-width: 0; padding: 0; display: block; position: static; }
.conv-tools .conv-bills[hidden] { display: none; }
.conv-tools .cb-row { flex-wrap: nowrap; }
.cb-main { flex: 1 1 auto; min-width: 0; padding: 5px 10px; min-height: 38px; gap: 8px; }
.cb-main > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cb-main b { margin-left: 6px; }
.cb-more { flex: none; }
.cb-list { position: absolute; z-index: 6; left: 0; right: 0; top: 100%; margin-top: 4px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); max-height: 50vh; }
.mk-bill svg, .conv-tools .btn svg { width: 18px; height: 18px; }
.chat-mode { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; margin: 0; }
@media (max-width: 520px) {
  .conv-tools .btn-ghost { padding: 0 .7em; }
}

/* v0.8.3 — bill history, cart address, merge suggestion, quick-reply photos */
.chip-hist { border-style: dashed; }
.hist-bar { display: grid; gap: 10px; margin: 4px 0 12px; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.hist-bar .chips { margin: 0; }
.hist-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hist-dates label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.hist-dates input { min-height: 44px; }
.hist-sum { margin: 0; font-size: .95rem; }
.hist-sum b { color: var(--brand-ink); }
.cart-addr { display: grid; gap: 10px; }
.cart-addr h3 { margin: 4px 0 0; font-size: 1rem; }
.cart-addr .addr-form { gap: 12px; }
.addr-saved { position: relative; }
.addr-saved.is-on .addr-saved-go { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; }
.link-btn { background: none; border: 0; padding: 6px 2px; font: inherit; font-weight: 600; color: var(--brand-ink); cursor: pointer; text-align: left; }
.addr-other { justify-self: start; }
.merge-suggest { margin: 14px 0 4px; padding: 12px 14px; border-radius: 16px; background: #fff7f0; border: 1.5px solid var(--brand); }
.merge-suggest p { margin: 0 0 6px; }
.merge-suggest .rows { margin: 0; }
.btn.is-confirm { color: #fff; }
.qr-pics { display: flex; gap: 10px; flex-wrap: wrap; }
.qr-pic { position: relative; width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--sunk); border: 1px solid var(--line); flex: none; }
.qr-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-pic button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(31,27,24,.75); color: #fff; font-size: .8rem; cursor: pointer; }
.qr-pic-add { display: grid; place-items: center; border: 2px dashed var(--line); background: var(--paper); cursor: pointer; color: var(--muted); }
.qr-pic-add span { display: grid; place-items: center; font-size: 1.4rem; line-height: 1; }
.qr-pic-add small { font-size: .72rem; margin-top: 4px; }
.qr-tray { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; overflow-x: auto; background: var(--paper); border-top: 1px solid var(--line); }
.qr-tray .qr-pic { width: 56px; height: 56px; border-radius: 10px; }
.qr-tray .qr-pic button { width: 22px; height: 22px; top: 2px; right: 2px; }
.qr-tray small { flex: none; }
.msg a + a img, .msg > a ~ a > img { margin-top: 4px; }
.addr-saved-opt:not(.is-on) { border-color: var(--line); background: var(--paper); }
.addr-saved-opt:not(.is-on) .addr-saved-go { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); font-size: 0; }
.cart-addr .hint, #checkout > .hint { margin: 0; }
.hist-dates label, .hist-dates input { min-width: 0; width: 100%; }
.attach.is-on { background: var(--brand-soft); color: var(--brand-ink); }
.qr-pop .qr-head { margin: 6px 8px 2px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.qr-pop .qr-photo strong { font-weight: 600; }
.qr-pop .qr-set { display: block; padding: 8px; font-size: .88rem; color: var(--brand-ink); font-weight: 600; }
.qr-pop .qr-n { font-weight: 500; color: var(--muted); }
.qr-pop { max-height: min(320px, 45dvh); }

/* v0.8.4 — desktop: customer beside the chat */
.conv-side { display: none; }
@media (min-width: 1200px) {
  .inbox { grid-template-columns: 320px minmax(0, 1fr) 300px; }
  .inbox:not(.has-open) { grid-template-columns: 320px minmax(0, 1fr) 0; }
  .inbox.has-open .conv-side { display: block; overflow-y: auto; min-height: 0; padding: 14px; border-left: 1px solid var(--line); background: var(--paper); }
}
.side-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; margin-bottom: 12px; }
.side-card h3 { margin: 0; font-size: .95rem; }
.side-who { display: flex; gap: 10px; align-items: center; }
.side-who > div { display: grid; min-width: 0; }
.side-who small { font-size: .8rem; }
.side-facts { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0; }
.side-facts dt { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.side-facts dd { margin: 0; overflow-wrap: anywhere; font-size: .92rem; }
.side-card .mini-bills button { font-size: .85rem; }

/* v0.8.4 — bills board on computers */
.shop-main:has(.bills-board) { max-width: 1440px; }
.view-seg { margin-left: auto; min-width: 200px; }
.view-seg span { min-height: 36px; font-size: .9rem; }
.bills-board #billGroups .chip:not(.chip-hist) { display: none; }
.bills-board #billSearch { max-width: 420px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; margin-top: 4px; }
.board-col { background: var(--sunk); border-radius: 18px; padding: 10px; min-height: 240px; }
.board-col header { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; }
.board-col h3 { margin: 0; font-size: .98rem; }
.board-col header b { min-width: 28px; height: 24px; display: grid; place-items: center; border-radius: 12px; background: #fff; font-size: .85rem; }
.col-todo header b { background: var(--brand); color: #fff; }
.board .bill-list { gap: 10px; max-height: calc(100dvh - 300px); overflow-y: auto; padding: 2px; }
.board .bill-main { grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 12px; }
.board .bill-amt { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.board .bill-next { margin: 0 12px 12px; }
.board-empty { padding: 18px 8px; text-align: center; list-style: none; }

/* v0.8.4 — settings home: status on each card, two columns on computers */
.set-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.set-st { font-size: .8rem; font-weight: 600; color: var(--jade, #1f7a54); background: var(--jade-soft, #e6f4ec); padding: 2px 10px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-st.todo { color: #6b4f00; background: var(--yellow-soft); }
.set-list a.is-todo { border-color: #f1d27a; }
@media (min-width: 1000px) {
  .shop-main:has(.set-list) { max-width: 1040px; }
  .set-list { grid-template-columns: 1fr 1fr; }
}
.side-card .mini-bills button { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.side-card .mini-bills small { flex-basis: 100%; color: var(--muted); }
.bills-board .board { margin-top: 12px; }
@media (max-width: 699px) { #billGroups { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } #billGroups .chip { flex: none; } }

/* v0.8.5 — notifications on the phone */
.callout { padding: 12px 14px; border-radius: 14px; background: var(--sunk); margin: 12px 0; }
.callout.warn { background: var(--yellow-soft); color: #5a4300; }
.steps-list { display: grid; gap: 10px; padding-left: 1.4em; margin: 10px 0 14px; }
.steps-list li { padding-left: 4px; line-height: 1.55; }
.push-state { font-weight: 700; margin: 14px 0; padding: 10px 14px; border-radius: 12px; background: var(--sunk); }
.push-state.on { background: #e6f4ec; color: #1f7a54; }
.check-rows { display: grid; gap: 8px; margin: 6px 0 16px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.check-row span { display: grid; gap: 2px; }
.check-row small { color: var(--muted); }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.push-nudge { display: flex; align-items: center; gap: 6px; margin: 0 12px 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: #fff7f0; border: 1px solid #ffd8bd; font-size: .9rem; }
.push-nudge a { flex: 1; color: var(--brand-ink); font-weight: 600; text-decoration: none; }

/* =====================================================================================
   v0.9 — "Pro density": smaller, calmer, more professional. One place that sets the scale
   for the whole back office (later rules above stay valid; these sizes win).
   ===================================================================================== */
:root { --radius: 14px; --radius-sm: 10px; --tabbar: 58px; --topbar: 52px; }
body { font-size: 15px; line-height: 1.55; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: .95rem; }
small, .small { font-size: .84rem; }
.hint { font-size: .84rem; }

.btn { min-height: 40px; padding: 0 1em; border-radius: 10px; font-size: .94rem; border-width: 1px; }
.btn-sm { min-height: 32px; padding: 0 .75em; font-size: .85rem; border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 0 1.3em; font-size: 1rem; border-radius: 12px; }
.btn-primary { box-shadow: 0 1px 2px rgba(181, 78, 11, .22), inset 0 -1px 0 rgba(0, 0, 0, .06); }
.btn-ghost { border-color: var(--line-strong); }

input, textarea, select { min-height: 40px; padding: 8px 12px; border-width: 1px; border-radius: 10px; font-size: .95rem; }
textarea { min-height: 76px; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px var(--brand-soft); }
.form { gap: 14px; }
.field { gap: 4px; }
.field > span { font-size: .86rem; }

.chip { min-height: 32px; padding: 0 12px; font-size: .85rem; }
.chips { gap: 6px; }
.tag { height: 22px; padding: 0 8px; font-size: .75rem; }
.seg { padding: 3px; border-radius: 10px; gap: 3px; }
.seg span { min-height: 34px; border-radius: 8px; font-size: .9rem; }

.panel { padding: 16px; margin-bottom: 12px; border-radius: var(--radius); }
.kpi { padding: 12px 14px; border-radius: var(--radius); }
.kpi span { font-size: .84rem; }
.kpi strong { font-size: 1.45rem; }
.kpis { gap: 8px; margin-bottom: 12px; }

/* top bar: shorter, the current shop sits in it (no big title on every page) */
.topbar { height: var(--topbar); padding: 0 12px; gap: 10px; }
.page { min-height: calc(100vh - var(--topbar)); }
.wordmark { font-size: 1.28rem; }
.avatar { width: 32px; height: 32px; font-size: .9rem; }
.menu-pop { top: 40px; }
.menu-pop a, .menu-pop button { padding: 9px 12px; font-size: .92rem; }
.top-shop { flex: 1; min-width: 0; display: flex; }
.shop-pill { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-width: 0; height: 34px; padding: 0 10px 0 4px; border-radius: 999px; background: var(--sunk); color: var(--ink); text-decoration: none; font-size: .9rem; }
.shop-pill:hover { background: var(--line); }
.shop-pill strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.shop-pill img, .shop-pill-mark { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; }
.shop-pill-mark { display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: .8rem; }
.shop-pill svg { flex: none; color: var(--muted); }
@media (max-width: 559px) { .topbar:has(.shop-pill) .wordmark { display: none; } }

/* bottom tabs / side rail */
.tab { font-size: .7rem; gap: 1px; }
.tab svg { width: 22px; height: 22px; padding: 3px 12px; }
.tabs .badge { font-size: .68rem; }
.shop-main { padding: 14px 14px 32px; }
@media (min-width: 900px) {
  .shop-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .tabs { top: var(--topbar); height: calc(100vh - var(--topbar)); padding: 10px 6px; }
  .tab { padding: 8px 2px; font-size: .7rem; }
  .tab svg { padding: 5px 12px; }
  .shop-main { padding: 20px 28px 40px; }
}
.inbox { height: calc(100vh - var(--topbar) - var(--tabbar)); height: calc(100dvh - var(--topbar) - var(--tabbar) - env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .inbox { height: calc(100vh - var(--topbar)); height: calc(100dvh - var(--topbar)); } }
.tab-actions { gap: 6px; margin-bottom: 10px; }

/* lists */
.bill-card { border-radius: 12px; }
.bill-main { gap: 10px; padding: 10px 12px 10px 16px; }
.bill-no { font-size: .95rem; }
.bill-amt strong { font-size: 1.02rem; }
.bill-next { min-height: 36px; margin: 0 12px 10px 16px; }
.bill-list { gap: 8px; }
.set-list a { padding: 12px 14px; border-radius: 12px; }
.av { width: 40px; height: 40px; }
.conv-row { padding: 8px 10px; border-radius: 12px; gap: 10px; }
.conv-who .av { width: 34px; height: 34px; }
.icon-btn { min-width: 36px; height: 36px; padding: 0 9px; border-radius: 10px; font-size: .85rem; }
.icon-btn svg { width: 18px; height: 18px; }
.composer { border-radius: 16px; padding: 4px; }
.composer input[name=text], .composer textarea { min-height: 38px; padding: 8px 6px; }
.composer .btn-primary { border-radius: 12px; min-height: 36px; }
.composer .attach { min-height: 36px; width: 36px; padding: 0; }
.msg { font-size: .94rem; }
.dlg-head h2 { font-size: 1.05rem; }
.empty-tab { border-radius: 16px; padding: 28px 18px; }
.ptr { position: fixed; top: calc(env(safe-area-inset-top) - 36px); left: 50%; z-index: 90; transform: translate(-50%, 0); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); box-shadow: var(--shadow); color: var(--muted); font-weight: 700; pointer-events: none; transition: color .15s; }
.ptr.ready { color: var(--brand-ink); }
.ptr.spin .ptr-ic { animation: ptrSpin .6s linear infinite; }
@keyframes ptrSpin { to { transform: rotate(360deg); } }

/* chat list: filters + archive */
.inbox-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.inbox-chips .chip { flex: none; }
.chip-filter { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.chip-filter svg { width: 15px; height: 15px; }
.chip-filter b { min-width: 18px; height: 18px; border-radius: 9px; background: var(--brand); color: #fff; font-size: .7rem; display: grid; place-items: center; margin: 0; }
.flt-panel { display: grid; gap: 6px; padding: 10px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.flt-h { margin: 2px 0 0; font-size: .78rem; font-weight: 700; color: var(--muted); }
.icon-btn.is-on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }

/* bills: search + actions in one row, compact history, smaller action button */
.bills-top { flex-wrap: nowrap; align-items: center; }
.bills-top input[type=search] { flex: 1; min-width: 0; }
.bills-top .btn { flex: none; }
.btn-icon svg { flex: none; }
@media (max-width: 559px) { .hide-sm { display: none !important; } .btn-icon { width: 40px; padding: 0; } }
.bill-groups { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.bill-groups .chip { flex: none; }
.chip-hist { border-style: solid; }
.hist-bar { gap: 8px; padding: 10px; margin: 0 0 10px; border-radius: 12px; }
.hist-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hist-row select { width: auto; min-width: 130px; flex: none; }
.hist-row .hist-dates { display: flex; align-items: center; gap: 6px; flex: 1 1 240px; min-width: 0; }
.hist-row .hist-dates[hidden] { display: none; }
.hist-row .hist-dates input { flex: 1; min-width: 0; width: auto; }
.hist-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.hist-sum span { display: grid; padding: 6px 10px; border-radius: 10px; background: var(--bg); font-size: .78rem; color: var(--muted); line-height: 1.3; }
.hist-sum b { font: 600 1.05rem var(--font-brand); color: var(--ink); }
.hist-sum span:nth-child(2) b { color: var(--brand-ink); }
.bill-card { display: flex; flex-wrap: wrap; }
.bill-card .bill-main { flex: 1 1 100%; }
.bill-card .bill-next { margin: -4px 12px 10px auto; min-height: 32px; padding: 0 14px; font-size: .86rem; border-radius: 8px; }
.board .bill-next { margin: 0 12px 10px auto; }
.bill-who .meta { font-size: .8rem; }

/* customers + stats: compact */
.cust-tools { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.cust-tools input { flex: 1; min-width: 0; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; }
.chips-scroll .chip { flex: none; }
.cust-list { gap: 0 !important; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cust-list li + li { border-top: 1px solid var(--line); }
.cust-list button { padding: 10px 12px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.cust-list .avatar { width: 34px; height: 34px; }
.stats-top { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.stats-top .chips { flex: 1; min-width: 0; margin: 0; }
@media (max-width: 699px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi strong { font-size: 1.2rem; } .kpi small { font-size: .74rem; } }
.panel h2 { font-size: .98rem; margin-bottom: 10px; }

/* shop picker (dashboard) */
.dash { max-width: 980px; }
.dash-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 22px 18px; margin: 8px 0 18px; border-radius: 20px;
  background: radial-gradient(120% 140% at 100% 0, #ffe2cc 0, #fff4ec 42%, #fff 100%); border: 1px solid #f6e3d6; }
.dash-hero h1 { font-size: 1.5rem; margin: 2px 0 4px; }
.dash-hero p { margin: 0; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: var(--brand-ink); text-transform: uppercase; margin: 0; }
.dash-deli { width: 92px; height: auto; flex: none; filter: drop-shadow(0 8px 16px rgba(255, 138, 61, .25)); }
.shop-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.shop-card { position: relative; display: grid; gap: 4px; align-content: start; min-height: 168px; padding: 16px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.shop-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #f3cdb2; }
.shop-card.is-last { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow-sm); }
.shop-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.shop-card-logo { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; }
.shop-card-ph { display: grid; place-items: center; background: linear-gradient(135deg, #ff9d5c, #f2711c); color: #fff; font: 600 1.3rem var(--font-brand); }
.shop-card-name { font-size: 1.08rem; line-height: 1.3; }
.shop-card-meta { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-card-left { font-size: .78rem; color: var(--ok); font-weight: 600; }
.shop-card-left.warn { color: #9a6700; }
.shop-card-last { position: absolute; top: -9px; left: 16px; padding: 1px 8px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; }
.shop-card-go { margin-top: auto; padding-top: 10px; font-size: .84rem; font-weight: 600; color: var(--brand-ink); }
.plan-badge { padding: 2px 9px; border-radius: 99px; font-size: .72rem; font-weight: 700; letter-spacing: .01em; }
.plan-free { background: var(--sunk); color: var(--muted); }
.plan-classic { background: linear-gradient(135deg, #fff1e6, #ffdcc2); color: var(--brand-ink); }
.plan-premium { background: linear-gradient(135deg, #2e1f16, #5a3a26); color: #ffd7b8; }
.plan-vip { background: linear-gradient(135deg, #1f1b18, #3b2f22); color: #f5d27a; }
.shop-card-new { place-content: center; justify-items: center; text-align: center; border-style: dashed; background: transparent; box-shadow: none; }
.shop-card-plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-size: 1.4rem; margin-bottom: 6px; }
.dash-admin { display: inline-block; margin-top: 18px; font-size: .9rem; font-weight: 600; }
@media (max-width: 559px) { .dash-hero { padding: 16px; } .dash-hero h1 { font-size: 1.25rem; } .dash-deli { width: 68px; } .shop-card { min-height: 0; } }

/* contact Ordeli */
.sup-tabs { margin-bottom: 12px; }
.sup-tabs b { font-weight: 600; color: var(--brand-ink); }
.sup-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sup-cat { position: relative; }
.sup-cat input { position: absolute; opacity: 0; pointer-events: none; }
.sup-cat span { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper); font-size: .8rem; font-weight: 600; text-align: center; cursor: pointer; }
.sup-cat i { font-style: normal; font-size: 1.2rem; }
.sup-cat input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.sup-cat input:focus-visible + span { outline: 3px solid var(--brand); }
.sup-form .grid-2 { gap: 10px; }
.tk-thread .msg img { max-width: 220px; border-radius: 10px; display: block; margin-bottom: 4px; }

/* super admin */
.pill-n { margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: .7rem; display: inline-grid; place-items: center; }
.dot-live { width: 10px; height: 10px; border-radius: 50%; background: #22a45d; box-shadow: 0 0 0 4px #ddf3e6; flex: none; margin: 0 4px; }
.act-live { animation: actPulse 2s ease-in-out infinite; }
@keyframes actPulse { 50% { opacity: .6; } }
.sa-sort { display: flex; justify-content: flex-end; margin: 6px 0; font-size: .85rem; color: var(--muted); }
.sa-sort select { width: auto; min-height: 32px; margin-left: 6px; font-size: .85rem; }
.row-dim { opacity: .55; }
.code-txt { font-family: ui-monospace, Menlo, monospace; letter-spacing: .06em; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 599px) { .grid-3 { grid-template-columns: 1fr 1fr; } }

/* team list */
.team li { display: flex !important; align-items: center; gap: 10px; flex-wrap: nowrap; }
.team-who { flex: 1; min-width: 0; display: grid; }
.team-who strong, .team-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team select { width: auto; flex: none; min-width: 0; max-width: 42%; }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.avatar-sm.pending { background: var(--sunk); color: var(--muted); }
.team-pending { border-style: dashed !important; }
.sup-tabs span { white-space: nowrap; }
.sup-tabs b { margin-left: 4px; }
.join-card { max-width: 420px; margin: 40px auto; padding: 28px 22px; display: grid; justify-items: center; gap: 10px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.join-card h1 { margin: 0; font-size: 1.4rem; }
.join-card .join-mark { width: 56px; height: 56px; border-radius: 16px; }
.join-card .join-role { margin: 0; color: var(--muted); }
.join-card .btn-block { margin-top: 6px; }
.join-card .hint { margin: 4px 0 0; }

/* plan purchase */
.buy-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
