/* =====================================================================
   รอบ 81a: ร้านอาหาร — ผังโต๊ะ (/restaurant) · บิลโต๊ะ (/restaurant/tab/{id}) · จอครัว (/restaurant/kitchen)
   ตั้งค่า (/restaurant/setup) · ใบครัว (KitchenTicketPrint, html[data-print="kitchen"])
   - prefix คลาส rt- · สีจากตัวแปรใน :root (app.css / dark.css) → โหมดมืดใช้ได้เลย
   - ใช้บนมือถือพนักงานเสิร์ฟเป็นหลัก: จุดเปลี่ยนมือถือ 760px เหมือนทุกไฟล์ ห้ามเลื่อนแนวนอนที่ 390px
   ===================================================================== */

/* รอบ 98: โครงหน้าร้านอาหาร (.fit.rt-fit) — จอคอม ≥1025px: fit.css ล็อกความสูง .fit = จอ และ .main overflow:hidden
   แต่หน้าร้านอาหารไม่มี .fit-body → เนื้อหาที่ยาวกว่าจอถูกตัด (เลื่อนไม่ได้) และแถวชิปที่เลื่อนข้าง (overflow-x:auto ⇒ min-height 0)
   ถูกบีบเหลือ ~3px · แก้: ลูกของ .rt-fit ไม่หด + ทั้งหน้าเลื่อนในกรอบของตัวเอง (แบบ .fit-body.scroll) */
.rt-fit > * { flex: none; }
.rt-set-tabs, .rt-zones, .rtqb-tabs, .rtq-cats { flex-shrink: 0; min-height: max-content; }
@media screen and (min-width: 1025px) {
  .content > .fit.rt-fit { overflow-y: auto; overscroll-behavior: contain; margin: 0 -8px; padding: 2px 8px 16px; }
}

.rt-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--chip); color: var(--muted); white-space: nowrap; }
.rt-pill.is-busy { background: var(--brand-soft); color: var(--brand-strong); }
.rt-pill.is-billing { background: var(--warn-soft); color: var(--warn-text, #7a5300); }
.rt-pill.is-ready { background: var(--ok-soft); color: var(--ok); }
.rt-pill.is-off { background: var(--danger-soft); color: var(--danger); }

/* ---------- ผังโต๊ะ ---------- */
.rt-zones { padding: 2px 0; }
.rt-zones .chip { min-height: 38px; display: inline-flex; align-items: center; cursor: pointer; font: inherit; }
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.rt-tcard {
  position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; min-height: 96px; padding: 10px 12px 12px;
  border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rt-tcard:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 6px 18px rgba(var(--brand-rgb), .14); transform: translateY(-1px); }
.rt-tcard:active { transform: none; }
.rt-tcard:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rt-tcard-name { font-size: 1.12rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.rt-tcard-sub { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.rt-tcard-total { margin-top: auto; font-weight: 800; font-size: 1.02rem; }
.rt-tcard-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.rt-tcard-badges:empty { display: none; }
/* รอบ 98: ป้ายในการ์ดโต๊ะ (จอง/ช่องทาง/รหัสโต๊ะ/QR) ไม่ยืดเต็มความกว้างการ์ด (การ์ดเป็น flex column) */
.rt-tcard > :is(.rt-resv-badge, .rt-ch-chip, .rt-qr-code, .rt-qr-badges) { align-self: flex-start; max-width: 100%; }
/* ป้าย "รอคิดเงิน" บนการ์ดสีเหลือง — เดิมสีเดียวกับพื้นการ์ดจนมองไม่เห็นเป็นป้าย */
.rt-tcard.is-billing .rt-pill.is-billing { background: #D9A21B; color: #1d1a17; }
/* รอบ 100c: ป้าย ⏱ สีเหลืองบนการ์ดสีเหลือง — ให้เห็นเป็นป้าย */
.rt-tcard.is-billing .rt-pill.rt-late:not(.is-red) { background: color-mix(in srgb, #D9A21B 30%, var(--surface)); }
/* ตัวเลขในชิป (เช่น "กำลังทำ 4") — Blazor ตัดช่องว่างระหว่างข้อความกับ <span> ทิ้ง */
:is(.rt-zones, .rtqb-tabs) .chip .num { margin-left: .35em; }
.rt-tcard.is-free .rt-tcard-sub { color: var(--ok); font-weight: 600; }
.rt-tcard.is-busy { border-color: color-mix(in srgb, var(--brand) 70%, var(--line)); background: var(--brand-tint); }
.rt-tcard.is-billing { border-color: #D9A21B; background: var(--warn-soft); }
.rt-tcard.is-ready { box-shadow: 0 0 0 3px var(--ok-soft); border-color: var(--ok); }
.rt-tcard.is-resv { border-style: dashed; border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.rt-tcard.is-resv .rt-tcard-sub { color: var(--muted); }
/* บิลกลับบ้าน (ไม่มีรูปโต๊ะ) — ชื่อเป็นหัวการ์ด */
.rt-tcard > .rt-tcard-name + .rt-tcard-sub { margin-top: -2px; }

/* รอบ 100c: รูปโต๊ะมองจากด้านบน + เก้าอี้ (<RtTableArt>) — ชื่อโต๊ะอยู่กลางโต๊ะ
   สีตามสถานะ: ว่าง = เขียวอ่อน · มีลูกค้า = สีร้าน (เก้าอี้ทึบ = คนนั่ง) · รอคิดเงิน = เหลือง · มีจอง = ขอบประ + นาฬิกา */
.rt-art { position: relative; display: block; width: 100%; aspect-ratio: 160 / 100; margin: 0 0 2px; }
.rt-art > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rt-art-top { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.rt-art-ch { fill: var(--surface); stroke: color-mix(in srgb, var(--muted) 45%, transparent); stroke-width: 1.6; }
.rt-art-ch.on { fill: var(--brand); stroke: var(--brand); }
.rt-art.is-free .rt-art-top { fill: var(--ok-soft); stroke: color-mix(in srgb, var(--ok) 40%, transparent); }
.rt-art.is-busy .rt-art-top { fill: var(--brand-soft); stroke: var(--brand); }
.rt-art.is-busy .rt-art-ch:not(.on) { stroke: color-mix(in srgb, var(--brand) 50%, transparent); }
.rt-art.is-billing .rt-art-top { fill: color-mix(in srgb, #D9A21B 26%, var(--surface)); stroke: #D9A21B; }
.rt-art.is-billing .rt-art-ch.on { fill: #D9A21B; stroke: #D9A21B; }
.rt-art.is-billing .rt-art-ch:not(.on) { stroke: color-mix(in srgb, #D9A21B 60%, transparent); }
.rt-art.is-resv .rt-art-top { fill: var(--brand-tint); stroke: var(--brand); stroke-dasharray: 6 4; }
.rt-art.is-resv .rt-art-ch { stroke-dasharray: 3 2; stroke: color-mix(in srgb, var(--brand) 55%, transparent); }
.rt-art-name {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 70%;
  font-size: 1.08rem; font-weight: 800; line-height: 1.15; text-align: center; color: var(--ink);
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rt-art.is-round .rt-art-name { max-width: 36%; }
.rt-art-name.is-long { font-size: .8rem; }
.rt-art.is-busy .rt-art-name { color: var(--brand-strong); }
.rt-art.is-billing .rt-art-name { color: var(--warn-text, #6b4a00); }
.rt-art-more { position: absolute; right: 0; bottom: 0; padding: 0 6px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: .72rem; font-weight: 800; }
.rt-art-clock { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff; box-shadow: 0 0 0 2px var(--surface); }
.rt-art-clock.is-late { background: var(--danger); }
/* ป้ายจองในการ์ด: ขึ้นบรรทัดใหม่ได้ 2 บรรทัด (ไม่ตัด "…" กลางชื่อ/เวลา) */
.rt-tcard .rt-resv-badge { white-space: normal; border-radius: 10px; line-height: 1.3; padding: 3px 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* คำอธิบายสี */
.rt-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--muted); }
.rt-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.rt-lg { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid; }
.rt-lg.is-free { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.rt-lg.is-busy { background: var(--brand); border-color: var(--brand); }
.rt-lg.is-billing { background: #D9A21B; border-color: #D9A21B; }
.rt-lg.is-resv { background: var(--brand-tint); border-color: var(--brand); border-style: dashed; }
.rt-sec-title { margin: 6px 0 0; font-size: 1rem; font-weight: 700; color: var(--muted); }
.rt-empty-note { padding: 18px; }
/* รอบ 81i: แถบ "กำลังใช้ข้อมูลตัวอย่าง" บนผังโต๊ะ (สไตล์ .ob-dash-demo ของ onboarding.css) */
.rt-demo-strip { margin: 0 0 10px; }

/* ---------- บิลโต๊ะ ----------
   รอบ 100b: โครงเดียวกับหน้าขาย (.posb / .posb-catalog / .posb-sticky / <PosHero> / .posb-cats / .posb-grid / .posb-cart / .posb-bar ของ app.css + pos2.css)
   ที่นี่มีแค่ส่วนของบิลโต๊ะ: การ์ดเมนูแบบปุ่มรูป (.rt-mi), ชิปบนแถบสี (.rt-hero), รายการในการ์ดบิล (.rt-cart*, .rt-cl*) */
/* รอบ 100: การ์ดเมนูหน้าตาเดียวกับหน้าขาย — ใช้ .posb-tile/.posb-img/.posb-name/.posb-stock/.posb-unit/.posb-badge ของ app.css (+ dark.css)
   ที่นี่เพิ่มแค่: รูปเป็นปุ่ม (แตะรูป = สั่ง/เลือกหน่วย), ป้ายชุด/คงเหลือ */
.rt-mi { position: relative; }
.rt-mi > .posb-img { width: 100%; padding: 0; border: 0; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rt-mi > .posb-img:disabled { cursor: not-allowed; }
.rt-mi .posb-badge.rt-mi-combo { top: auto; bottom: 6px; background: var(--brand); color: #fff; }
.rt-mi .posb-badge.rt-mi-left { background: var(--warn-soft); color: var(--warn-text, #7a5300); }
.rt-mi .posb-unit strong { white-space: nowrap; }

/* ชิปบนแถบสี (สถานะ/ลูกค้า/เวลา/QR/รหัสโต๊ะ) — ขาวโปร่งบนสีร้าน (โหมดมืดมือถือ แถบเป็นสีพื้น ก็ยังอ่านได้) */
.rt-hero .posb-hero-meta > :is(.rt-pill, .rt-guests-btn, .rt-seat-time, .rt-ch-chip, .rt-qr-code) {
  display: inline-flex; align-items: center; gap: 4px; min-height: 30px; max-width: 100%; padding: 0 11px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.32); background: rgba(255,255,255,.16); color: #fff;
  font: inherit; font-size: .82rem; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rt-hero .posb-hero-meta > button { cursor: pointer; }
.rt-hero .posb-hero-meta > button:hover { background: rgba(255,255,255,.28); border-color: rgba(255,255,255,.6); }
.rt-hero .posb-hero-meta > .rt-pill { background: #fff; border-color: #fff; color: var(--brand-strong, var(--brand)); }
.rt-hero .posb-hero-meta > .rt-pill.is-billing { background: #D9A21B; border-color: #D9A21B; color: #1d1a17; }
.rt-hero .posb-hero-meta > .rt-qr-code strong { font-size: 1rem; letter-spacing: .12em; }
.rt-hero .posb-hero-meta > .rt-seat-time { font-weight: 600; }

/* การ์ดบิล (.posb-cart): หัวข้อส่วน · บรรทัดรายการแบบตะกร้า (ชื่อ | − n + | ยอด) · ส่วนเสริม/รายการในชุดเยื้องใต้จาน */
.rt-cart-lines > li.rt-cl-sec { border-bottom: 0; padding: 4px 0 0; font-size: .78rem; font-weight: 700; color: var(--muted); }
.rt-cart-lines > li.rt-cl-sec.is-new { color: var(--brand-strong, var(--brand)); }
.rt-cart-lines > li:has(+ li.rt-cl-addon) { border-bottom: 0; padding-bottom: 0; }
.rt-cart-lines > li.rt-cl-addon {
  flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px;
  margin-top: -4px; padding-left: 14px; font-size: .86rem; color: var(--muted);
}
.rt-cart-lines > li.rt-cl-addon .rt-cl-tools { flex-basis: 100%; }
.rt-cart-lines > li.r97-call-row { flex-direction: row; border-bottom: 0; padding: 0 0 4px; }
.rt-cl-cname { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rt-cl .posb-line-name small { line-height: 1.35; overflow-wrap: anywhere; }
.rt-cl .posb-line-name:is(span) { cursor: default; }
.rt-cl .rt-pos-fixed { min-width: 44px; }
.rt-cl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rt-cl-tools .btn.small { min-height: 32px; padding: 0 12px; border-radius: 999px; font-weight: 700; }
.rt-cl-link { border: 0; background: none; padding: 0; font: inherit; font-size: .82rem; font-weight: 600; color: var(--brand-strong, var(--brand)); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.rt-cl.is-cancelled, .rt-cart-lines > li.rt-cl-addon.is-cancelled { opacity: .6; }
.rt-cl.is-cancelled .posb-line-name > span:first-child, .rt-cl-addon.is-cancelled .rt-cl-cname { text-decoration: line-through; }
.rt-cart .r97-course-sel { min-height: 32px; }
/* QR รอยืนยันในการ์ดบิล */
.rt-cart-qr { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rt-cart-qr li { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-weight: 600; }
.rt-cart-qr li.rt-cl-addon { padding-left: 12px; font-weight: 500; font-size: .88rem; }
.rt-cl-qname { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
/* ท้ายการ์ด: ยอด · ค่าบริการ · ปุ่มใหญ่ (.posb-pay-btn) · ปุ่มรองแบบแคปซูล (เหมือนปุ่ม "พักบิล" หน้าขาย) */
.rt-line-note { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.rt-cart-svc { margin-top: -4px; font-size: .9rem; color: var(--muted); }
.rt-cart-hint { margin: 0; }
.rt-send strong { min-width: 52px; text-align: center; }
.rt-cart-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-cart-acts .btn { flex: 1 1 0; min-height: 44px; padding: 0 14px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.rt-msg { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-actions .btn { flex: 1 1 auto; min-height: 44px; }
.rt-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rt-more .btn { min-height: 46px; }
.rt-pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.rt-pick-list label, .rt-pick-list button { width: 100%; }
.rt-pick { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.rt-pick.on { border-color: var(--brand); background: var(--brand-tint); }
.rt-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--chip); }
.rt-seg button { min-height: 40px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.rt-seg button.on { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-strong); }
.rt-unit-pick { display: flex; flex-direction: column; gap: 8px; }
.rt-unit-pick .btn { display: flex; justify-content: space-between; min-height: 48px; }

/* ---------- จอครัว ---------- */
.rt-kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: start; }
.rt-kt { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; }
.rt-kt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rt-kt-title { font-size: 1.35rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.rt-kt-meta { font-size: .8rem; color: var(--muted); }
.rt-kt-age { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.rt-kt.age-warn { border-color: #D9A21B; }
.rt-kt.age-warn .rt-kt-age { color: var(--warn-text, #B07A00); }
.rt-kt.age-late { border-color: var(--danger); }
.rt-kt.age-late .rt-kt-age { color: var(--danger); }
.rt-ki-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rt-ki {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.rt-ki-qty { flex: none; min-width: 34px; font-size: 1.15rem; font-weight: 800; }
.rt-ki-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rt-ki-name { font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.rt-ki-note { font-size: .85rem; color: var(--danger); font-weight: 600; overflow-wrap: anywhere; }
.rt-ki-st { flex: none; font-size: .75rem; font-weight: 700; color: var(--muted); }
.rt-ki.is-cooking { border-color: var(--brand); background: var(--brand-tint); }
.rt-ki.is-cooking .rt-ki-st { color: var(--brand-strong); }
.rt-ki.is-ready { border-color: var(--ok); background: var(--ok-soft); }
.rt-ki.is-ready .rt-ki-st { color: var(--ok); }
.rt-ki.is-cancelled { cursor: default; opacity: .65; }
.rt-ki.is-cancelled .rt-ki-name { text-decoration: line-through; }
.rt-kt .btn { min-height: 46px; }
.rt-kds-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rt-kds-tools select { min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; max-width: 100%; }

/* ---------- ตั้งค่า ---------- */
.rt-set-tabs { padding: 2px 0; }
.rt-set-tabs .chip { min-height: 38px; cursor: pointer; font: inherit; }
.rt-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.rt-out label { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.rt-out label.on { border-color: var(--brand); background: var(--brand-tint); }
.rt-out small { display: block; color: var(--muted); }
/* รอบ 99: โซน + โต๊ะ — กลุ่มตามโซน, โต๊ะเป็นการ์ดตาราง (แตะ = แก้ไข, ปุ่มถังขยะ = ลบ) */
.rt-tg-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rt-tg-tools > .rt-tg-search { flex: 1 1 200px; max-width: 320px; min-width: 0; min-height: 42px; padding: 8px 12px; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-left: auto; }
.rt-tg-tools > .rt-tg-search:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.rt-tg { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); min-width: 0; }
.rt-tg-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.rt-tg-head h3 { margin: 0; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.rt-tg-count { color: var(--muted); font-size: .85rem; }
.rt-tg-acts { display: inline-flex; gap: 6px; margin-left: auto; }
.rt-tg-acts .btn.small { min-height: 34px; padding: 4px 12px; }
.rt-tg.is-off .rt-tg-head h3, .rt-tg.is-off .rt-tgrid { opacity: .6; }
.rt-tg-empty { margin: 0; }
.rt-tgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.rt-tc { position: relative; min-width: 0; }
.rt-tc-main { width: 100%; min-height: 84px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px;
  padding: 10px 12px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .12s, background .12s; }
.rt-tc-main:hover { border-color: var(--brand); background: var(--brand-tint); }
.rt-tc-main:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.rt-tc-name { font-size: 1.2rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; padding-right: 30px; }
.rt-tc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rt-tc-seats { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.rt-tc.is-off .rt-tc-main { border-style: dashed; background: var(--chip); }
.rt-tc.is-off .rt-tc-name { color: var(--muted); }
.rt-tc-del { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.rt-tc-del:hover { background: var(--danger-soft); color: var(--danger); }
.rt-tc-del:focus-visible { outline: 2px solid var(--danger); outline-offset: 0; }
.rt-tc-del:disabled { opacity: .4; cursor: default; }
/* รอบ 99: รายการชื่อ + แก้ไข (สถานีครัว / กลุ่มตัวเลือก / ช่องทางขาย) = การ์ด แตะทั้งใบ = แก้ไข */
.rt-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.rt-cards > li { min-width: 0; display: flex; }
.rt-card { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; text-align: left;
  font: inherit; color: var(--ink); cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .12s, background .12s; }
.rt-card:hover { border-color: var(--brand); background: var(--brand-tint); }
.rt-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.rt-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.rt-card-top strong { overflow-wrap: anywhere; }
.rt-card small { overflow-wrap: anywhere; }
.rt-card-edit { margin-top: auto; padding-top: 4px; align-self: flex-end; font-size: .8rem; font-weight: 700; color: var(--brand-strong); }
.rt-card.is-off { border-style: dashed; background: var(--chip); }
.rt-card.is-off strong { color: var(--muted); }
@media (max-width: 760px) {
  .rt-tgrid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
  .rt-tc-main { min-height: 76px; padding: 8px 10px; }
  .rt-tc-name { font-size: 1.05rem; }
  .rt-tg-tools > .rt-tg-search { flex-basis: 100%; max-width: none; margin-left: 0; font-size: 16px; }
  .rt-tg-tools > .btn { flex: 1 1 auto; }
  .rt-tg-acts { margin-left: 0; }
  .rt-cards { grid-template-columns: 1fr; }
}
.rt-cats { display: flex; flex-wrap: wrap; gap: 6px; max-height: 40vh; overflow-y: auto; }
.rt-cats label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.rt-cats label.on { border-color: var(--brand); background: var(--brand-tint); }
/* รอบ 98: แถว "ช่องชื่อ + ปุ่มเพิ่ม" (จุดสั่ง QR เคาน์เตอร์ / จอเรียกคิว) — ช่องเดิมไม่มีสไตล์ (กรอบสี่เหลี่ยมของเบราว์เซอร์) ปุ่มยืดเต็มแถว */
.rt-addrow { align-items: center; }
.rt-addrow > input { flex: 1 1 220px; max-width: 360px; min-width: 0; min-height: 44px; padding: 9px 12px; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rt-addrow > input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.rt-addrow > .btn { flex: 0 0 auto; }
@media (max-width: 760px) {
  .rt-addrow > input { flex-basis: 100%; max-width: none; font-size: 16px; }
  .rt-addrow > .btn { flex: 1 1 auto; }
}
.rt-batch { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; align-items: end; }

@media (max-width: 760px) {
  .rt-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .rt-tcard { min-height: 88px; padding: 9px 10px 10px; border-radius: 14px; }
  .rt-tcard-name { font-size: 1rem; }
  .rt-tcard:hover { transform: none; }

  .rt-more { grid-template-columns: minmax(0, 1fr); }

  .rt-kds { grid-template-columns: minmax(0, 1fr); }
  .rt-kds-tools { width: 100%; }
  .rt-kds-tools select { flex: 1 1 100%; font-size: 16px; }
}
@media (max-width: 400px) {
  .rt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   ใบครัว (ไม่มีราคา ตัวใหญ่) — ซ่อนบนจอ พิมพ์เมื่อ html[data-print="kitchen"] (print.js mysaasPrintKitchen)
   ม้วน 80mm / 58mm ตาม html[data-paper] (ค่าของเครื่องเดียวกับใบเสร็จ) · หลายใบ (หลายสถานี) = ขึ้นหน้าใหม่ทุกใบ
   ===================================================================== */
.rt-kprint { display: none; }
@page rtk80 { size: 80mm auto; margin: 2mm 4mm; }
@page rtk58 { size: 58mm auto; margin: 2mm 5mm; }
@media print {
  html[data-print="kitchen"]:has(.rt-kprint), html[data-print="kitchen"]:has(.rt-kprint) body {
    margin: 0 !important; padding: 0 !important; height: auto !important; overflow: visible !important;
    background: #fff !important; color: #000 !important; page: rtk80;
  }
  html[data-print="kitchen"][data-paper="58"]:has(.rt-kprint), html[data-print="kitchen"][data-paper="58"]:has(.rt-kprint) body { page: rtk58; }
  html[data-print="kitchen"]:has(.rt-kprint) body *:not(:has(.rt-kprint)):not(.rt-kprint):not(.rt-kprint *) { display: none !important; }
  html[data-print="kitchen"]:has(.rt-kprint) body *:has(.rt-kprint) {
    display: block !important; position: static !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
    width: auto !important; max-width: none !important; height: auto !important; min-height: 0 !important; overflow: visible !important;
    background: none !important; box-shadow: none !important; transform: none !important;
  }
  html[data-print="kitchen"] .rt-kprint { display: block !important; }
}
.rt-kp { width: 72mm; color: #000; background: #fff; font-family: var(--font); font-size: 15pt; line-height: 1.3; }
html[data-paper="58"] .rt-kp { width: 48mm; font-size: 12.5pt; }
.rt-kp + .rt-kp { break-before: page; page-break-before: always; }
.rt-kp-head { display: flex; flex-direction: column; gap: 1mm; padding-bottom: 2mm; border-bottom: .6mm dashed #000; text-align: center; }
.rt-kp-big { font-size: 1.8em; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.rt-kp-cancel { font-size: 1.5em; font-weight: 800; border: .6mm solid #000; padding: 1mm; }
.rt-kp-meta { font-size: .72em; }
.rt-kp-lines { list-style: none; margin: 0; padding: 2mm 0; display: flex; flex-direction: column; gap: 2mm; }
.rt-kp-line { display: flex; gap: 2mm; align-items: flex-start; }
.rt-kp-qty { flex: none; min-width: 9mm; font-weight: 800; }
.rt-kp-name { flex: 1 1 auto; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.rt-kp-unit { font-size: .75em; font-weight: 600; }
.rt-kp-note { display: block; font-size: .8em; font-weight: 600; }
.rt-kp-line.is-cancelled .rt-kp-name { text-decoration: line-through; }
.rt-kp-foot { padding-top: 1.5mm; border-top: .6mm dashed #000; font-size: .7em; text-align: center; }

/* ---------- หน้าขาย: เลขคิวในป๊อปอัปใบเสร็จ (บนจอเท่านั้น) ---------- */
.rt-queue { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rt-queue strong { font-size: 1.4rem; }
@media print { .rt-queue { display: none !important; } }

/* รอบ 81f: ปุ่มจำนวนลูกค้าบนหัวบิลโต๊ะ (แตะ = แก้) — แสดงทุกขนาดจอ */
.rt-guests-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--line); background: var(--chip); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.rt-guests-btn:hover { border-color: var(--brand); }

/* รอบ 81f: เลขคิวบนใบเสร็จลูกค้า (ReceiptView, .print-only — หน้าพิมพ์ซ้ำ .reprint แสดงบนจอด้วย) — สลิป 80/58 = กลาง ตัวใหญ่ (em ตามขนาดม้วน), A4 = ชิดซ้าย */
.rt-r-queue { justify-content: center; text-align: center; margin: 2px 0 4px; padding: 3px 0; border-top: 1px dashed currentColor; border-bottom: 1px dashed currentColor; }
.rt-r-queue strong { font-size: 1.8em; font-weight: 800; line-height: 1.15; letter-spacing: .02em; }
@media print {
  html[data-print="a4"] .rt-r-queue { justify-content: flex-start; text-align: left; border: 0; padding: 0; margin: 2mm 0; }
  html[data-print="a4"] .rt-r-queue strong { font-size: 16pt; }
}

/* ===== รอบ 81b: ตัวเลือกเมนู ===== */
.rt-line-opts { font-size: .82rem; color: var(--brand-strong); font-weight: 600; overflow-wrap: anywhere; }
.rt-ki-addon { padding: 0 12px 0 46px; font-size: .95rem; font-weight: 600; overflow-wrap: anywhere; }
.rt-ki-addon.is-cancelled { text-decoration: line-through; opacity: .65; }
.rt-optpick { display: flex; flex-direction: column; gap: 12px; }
.rt-optgroup { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 10px; margin: 0; min-width: 0; }
.rt-optgroup legend { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 0 4px; }
.rt-optgroup.is-need { border-color: var(--brand); }
.rt-optchips { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-optchips .chip small { margin-left: 4px; }
.rt-opt-edit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rt-opt-edit li { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto auto; gap: 6px; align-items: center; }
.rt-opt-edit li.is-off input[type="text"] { opacity: .6; }
.pos-opt-line { display: block; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .rt-opt-edit li { grid-template-columns: minmax(0, 1fr) 96px; }
}
.rt-kp-addon .rt-kp-name { font-size: 1em; padding-left: 4mm; }

/* =====================================================================
   รอบ 81c: หน้า QR สั่งที่โต๊ะ (ลูกค้า — static SSR, มือถือก่อน 390px, สว่างเสมอ) prefix rtq-
   ===================================================================== */
.rtq { min-height: 100vh; background: var(--bg, #f7f3ef); color: var(--text, #222); accent-color: var(--brand); }
.rtq-main { max-width: 640px; margin: 0 auto; padding: 0 12px 96px; display: flex; flex-direction: column; gap: 12px; }
.rtq-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; margin: 0 -12px; padding: 10px 12px;
  background: var(--brand); color: #fff; }
.rtq-head .lang-switch { background: rgba(0,0,0,.18); }
.rtq-head .lang-switch a { color: #fff; }
/* รอบ 98: ภาษาที่เลือก — เดิมตัวขาวบนพื้นขาว (กฎ a ด้านบนทับ .lang-switch a.on) */
.rtq-head .lang-switch a.on { background: #fff; color: var(--brand); }
.rtq-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; background: #fff; }
.rtq-logo-txt { display: grid; place-items: center; color: var(--brand-strong); font-weight: 800; }
.rtq-brand { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.rtq-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtq-brand small { opacity: .9; font-weight: 600; }
.rtq-card { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.rtq-closed { text-align: center; margin-top: 24px; }
.rtq-closed h1 { font-size: 1.25rem; margin: 0; }
.rtq-alert { border-radius: 10px; padding: 10px 12px; background: var(--brand-tint); font-size: .95rem; overflow-wrap: anywhere; }
.rtq-alert.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.rtq-alert.error { background: var(--danger-soft, #fde8e8); color: var(--danger); font-weight: 600; }
.rtq-calls { display: flex; gap: 8px; flex-wrap: wrap; }
.rtq-calls form { flex: 1 1 140px; }
.rtq-btn { width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--brand); background: #fff; color: var(--brand-strong);
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; }
.rtq-btn.primary { background: var(--brand); color: #fff; }
/* รอบ 98: ลิงก์ที่ใช้หน้าตาปุ่ม (อัปเดตสถานะคิว) — เดิมเป็น inline ขีดเส้นใต้ ความสูงไม่ถึง */
a.rtq-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.rtq-cats { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.rtq-cats a { flex: none; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: inherit; text-decoration: none; font-weight: 600; font-size: .9rem; }
.rtq-sec { display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 70px; }
.rtq-h { font-size: 1.25rem; margin: 0; overflow-wrap: anywhere; }
.rtq-h2 { font-size: 1.05rem; margin: 4px 0 0; }
.rtq-menu, .rtq-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rtq-mi { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.rtq-mi.is-out { opacity: .6; }
.rtq-mi-img { width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; background: var(--brand-tint); display: grid; place-items: center;
  font-weight: 800; color: var(--brand-strong); font-size: 1.3rem; }
.rtq-mi-img img { width: 100%; height: 100%; object-fit: cover; }
.rtq-mi-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rtq-mi-body strong { overflow-wrap: anywhere; }
.rtq-add { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 1.5rem; font-weight: 700;
  display: grid; place-items: center; text-decoration: none; cursor: pointer; line-height: 1; }
.rtq-out { flex: none; font-size: .8rem; font-weight: 700; color: var(--muted); }
.rtq-back { color: var(--brand-strong); text-decoration: none; font-weight: 600; }
.rtq-desc { margin: 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.rtq-price { font-size: 1.15rem; font-weight: 800; margin: 0; }
.rtq-form { display: flex; flex-direction: column; gap: 12px; }
.rtq-group { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rtq-group legend { font-weight: 700; padding: 0 4px; }
.rtq-group legend small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.rtq-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.rtq-opt input { width: 20px; height: 20px; flex: none; }
.rtq-opt span:first-of-type { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rtq-qty { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }
.rtq-qty select { font: inherit; font-size: 16px; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); }
.rtq-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name total" "step step"; gap: 4px 10px; align-items: center;
  border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.rtq-lines li .rtq-line-name { grid-area: name; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.rtq-lines li .rtq-line-total { grid-area: total; font-weight: 700; }
.rtq-lines li .rtq-step, .rtq-lines li .rtq-st { grid-area: step; justify-self: start; }
.rtq-lines li.rtq-addon { padding-left: 14px; border-bottom: 0; padding-bottom: 0; color: var(--muted); }
.rtq-line-opts { color: var(--brand-strong); font-weight: 600; }
.rtq-step { display: inline-flex; align-items: center; gap: 10px; }
.rtq-step form { display: inline; }
.rtq-step button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.rtq-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; }
.rtq-total strong { font-size: 1.25rem; }
.rtq-muted { color: var(--muted); margin: 0; }
.rtq-st { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-tint); }
.rtq-st.is-pending { background: #fff4d6; color: #8a5a00; }
.rtq-st.is-ready { background: var(--ok-soft); color: var(--ok); }
.rtq-st.is-served { background: #eee; color: #555; }
.rtq-st.is-cancelled { background: #eee; color: #888; text-decoration: line-through; }
.rtq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- พนักงาน: ป้าย QR บนผังโต๊ะ / บิลโต๊ะ ---------- */
.rt-qr-badges { display: flex; flex-wrap: wrap; gap: 4px; }
/* รอบ 98: สีจากตัวแปร (โหมดมืด: เดิมพื้นครีมสว่าง — หัวข้อ/ปุ่ม ghost ในกล่องมองไม่เห็น) */
.rt-qr-badge { font-size: .72rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-text, #8a5a00); }
.rt-qr-badge.is-call { background: var(--danger); color: #fff; }
.rt-qr-box { border: 2px solid #f0b429; background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.rt-qr-box .rt-actions { flex-wrap: wrap; }
/* รอบ 99: QR ของโต๊ะ / จุดสั่ง QR / จอเรียกคิว = การ์ดตาราง (เดิมเป็นแถวยาวเต็มจอ) */
.rt-qr-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.rt-qr-rows.is-mid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.rt-qr-rows.is-wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.rt-qr-rows li { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 8px; min-width: 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.rt-qr-rows li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.rt-qr-rows li > .btn { align-self: flex-start; }
.rt-qr-rows li .rt-actions { gap: 6px; }
.rt-qr-rows li .rt-actions .btn { flex: 1 1 auto; min-height: 38px; }
.rt-qr-rows li.is-off { border-style: dashed; background: var(--chip); }
.rt-qr-rows li.is-off strong { color: var(--muted); }
@media (max-width: 760px) {
  .rt-qr-rows { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
  .rt-qr-rows.is-mid, .rt-qr-rows.is-wide { grid-template-columns: 1fr; }
}
.rt-qr-rows code { font-size: .75rem; overflow-wrap: anywhere; }

/* ---------- ใบพิมพ์ QR ทุกโต๊ะ (A4, 6 ใบต่อหน้า) — html[data-print="rtqr"] (print.js mysaasPrintRtQr) ---------- */
.rt-qrprint { display: none; }
@page rtqrA4 { size: A4 portrait; margin: 10mm; }
@media print {
  html[data-print="rtqr"]:has(.rt-qrprint), html[data-print="rtqr"]:has(.rt-qrprint) body {
    margin: 0 !important; padding: 0 !important; height: auto !important; overflow: visible !important; background: #fff !important; color: #000 !important; page: rtqrA4;
  }
  html[data-print="rtqr"]:has(.rt-qrprint) body *:not(:has(.rt-qrprint)):not(.rt-qrprint):not(.rt-qrprint *) { display: none !important; }
  html[data-print="rtqr"]:has(.rt-qrprint) body *:has(.rt-qrprint) {
    display: block !important; position: static !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
    width: auto !important; max-width: none !important; height: auto !important; min-height: 0 !important; overflow: visible !important;
    background: none !important; box-shadow: none !important; transform: none !important;
  }
  html[data-print="rtqr"] .rt-qrprint { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 6mm; }
}
.rt-qrcard { break-inside: avoid; page-break-inside: avoid; border: .4mm dashed #888; border-radius: 3mm; padding: 5mm; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2mm; color: #000; background: #fff; font-family: var(--font); height: 84mm; box-sizing: border-box; }
.rt-qrcard-shop { font-size: 11pt; font-weight: 700; }
.rt-qrcard-table { font-size: 22pt; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.rt-qrcard svg { width: 46mm; height: 46mm; }
.rt-qrcard-hint { font-size: 9pt; }

/* รอบ 81c (รีวิว M3): รหัสโต๊ะ */
.rt-qr-code { display: inline-flex; gap: 4px; align-items: baseline; padding: 2px 8px; border-radius: 8px; background: var(--warn-soft); color: var(--warn-text, #8a5a00); font-weight: 700; }
.rt-qr-code strong { font-size: 1.25rem; letter-spacing: .12em; }
.rt-qr-code.small strong { font-size: 1rem; }
.rtq-code-form { display: flex; gap: 8px; }
.rtq-code-form input { flex: 1 1 auto; min-width: 0; font-size: 22px; letter-spacing: .3em; text-align: center; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); }
.rtq-code-form .rtq-btn { width: auto; padding: 0 18px; }

/* ---------- รอบ 81e: การ์ด "ร้านอาหารวันนี้" บนสุดของหน้าแรก (RtTodayCard) ---------- */
.rt-today {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-width: 0;
  padding: 12px 16px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius);
}
.rt-today-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rt-today-ico {
  flex: none; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--brand-soft); color: var(--brand);
}
.rt-today-stats { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; min-width: 0; }
.rt-today-stat {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--chip); color: var(--ink); text-decoration: none; min-width: 0;
}
.rt-today-stat strong { font-size: 1.1rem; }
.rt-today-stat span { font-size: .85rem; color: var(--muted); }
.rt-today-stat:hover { background: var(--brand-soft); }
.rt-today-stat.is-warn { background: var(--warn-soft); }
.rt-today-stat.is-alert { background: var(--danger-soft); }
.rt-today-stat.is-alert strong { color: var(--danger); }
.rt-today-acts { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 760px) {
  .rt-today { padding: 10px 12px; }
  .rt-today-acts { width: 100%; }
  .rt-today-acts .btn { flex: 1 1 0; justify-content: center; }
}

/* =====================================================================
   รอบ 81g: วัตถุดิบ — ป้าย "หมด"/"เหลือ n" ของจานแบบสูตร (บิลโต๊ะ / QR) + หน้า /restaurant/cost (prefix rtc-)
   ===================================================================== */
.rtc-left { align-self: flex-start; display: inline-flex; padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  background: var(--warn-soft); color: var(--warn-text, #7a5300); white-space: nowrap; }
.rtc-left.is-out { background: var(--danger-soft); color: var(--danger); }

.rtc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-items: start; }
.rtc-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rtc-h { margin: 0; font-size: 1rem; font-weight: 700; }
.rtc-big { margin: 0; font-size: 1.6rem; font-weight: 800; }
.rtc-value { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--danger); }
.rtc-link { font-size: .9rem; font-weight: 600; }
.rtc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rtc-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 6px 10px; border-radius: 10px; background: var(--chip); min-width: 0; }
.rtc-list li.is-warn { background: var(--warn-soft); }
.rtc-list li.is-out { background: var(--danger-soft); }
.rtc-name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.rtc-pct { font-weight: 800; }
.rtc-sub { flex-basis: 100%; }
.rtc-links { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.rtc-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rtc-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.rtc-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.rtc-row-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .9rem; min-width: 0; }
.rtc-found { display: flex; flex-wrap: wrap; gap: 6px; }
.rtc-found .chip { cursor: pointer; font: inherit; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.rtc-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border-radius: 10px; background: var(--chip); }
.rtc-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.rtc-form-row .field { flex: 1 1 140px; min-width: 0; }
.rtc-unit-fixed { padding-bottom: 10px; }
.rtc-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .rtc-cards { grid-template-columns: minmax(0, 1fr); }
  .rtc-actions .btn { flex: 1 1 0; justify-content: center; }
}

/* ---------- รอบ 81h: ค่าบริการ / แยกจ่าย-หารบิล / ชุดเมนู / เตือนออเดอร์ช้า ---------- */
.rt-kt.age-warn { background: var(--warn-soft); }
.rt-kt.age-late { background: var(--danger-soft); }
.rt-pill.rt-late { background: var(--warn-soft); color: var(--warn-text, #7a5300); }
.rt-pill.rt-late.is-red { background: var(--danger-soft); color: var(--danger); }
/* รอบ 98: ช่องตัวเลขสั้น (% / นาที) ไม่ยืดเต็มจอ 1600px — คอลัมน์กว้างสุด 280px */
.rt-svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 280px)); gap: 10px 16px; }
.rt-ki-combo { font-style: italic; }
.rt-pos-fixed { display: inline-flex; align-items: center; min-width: 64px; justify-content: center; color: var(--muted); font-size: .9rem; }
.rt-split { margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.rt-split-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rt-split-head input { width: 80px; }
.rt-split-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rt-split-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.rt-split-list select { min-width: 0; width: 100%; }
.rt-split-who { font-weight: 700; white-space: nowrap; }
@media (max-width: 760px) {
    .rt-split-list li { grid-template-columns: minmax(0, 1fr) auto; }
    .rt-split-list li select { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- รอบ 81j: ตัวแก้สูตร/ของเตรียม/ชุดเมนูในฟอร์มสินค้า (เดิมไม่มีสไตล์ — แถวเป็นรายการจุดชิดกัน) · ช่องเลือกของชุด · แยกบางจำนวน ---------- */
.rt-recipe { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rt-recipe-rows { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rt-recipe-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.rt-recipe-name { flex: 1 1 140px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.rt-recipe-rows input[type="number"] { width: 84px; flex: none; }
.rt-recipe-rows select { width: auto; max-width: 180px; min-width: 0; flex: 0 1 auto; }
.rt-recipe-rows .btn { flex: none; margin-left: auto; }
.rt-recipe > input[type="search"], .rtj-slot input[type="search"] { width: 100%; max-width: 100%; }
.rt-recipe-found { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-recipe-found .chip, .rt-optchips .chip { white-space: normal; max-width: 100%; text-align: left; overflow-wrap: anywhere; }
.rtj-slot { border: 1px dashed rgba(var(--brand-rgb), .45); border-radius: 12px; padding: 6px 10px 10px; margin: 4px 0 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rtj-slot legend { font-weight: 700; font-size: .85rem; padding: 0 4px; color: var(--brand-strong); }
.rtj-slot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rtj-slot-head input { flex: 1 1 180px; min-width: 0; }
.rt-optchips .chip.is-out { opacity: .55; text-decoration: line-through; }
.rt-optchips .chip.is-out small { text-decoration: none; }
.rtq-opt.is-out { opacity: .6; }
.rtq-qty select { max-width: 60%; }
.rt-split-qty { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 4px 4px 0; }
.rt-split-qty .muted { margin-right: auto; }
.rt-split-qty .rt-step { width: 40px; height: 40px; flex: none; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.rt-split-qty .rt-step:disabled { opacity: .4; cursor: default; }
@media (max-width: 760px) {
  .rt-recipe-rows input[type="number"] { width: 72px; }
  .rt-recipe-name { flex-basis: 100%; }
}

/* ---------- รอบ 81k: จองโต๊ะ · ช่องทางขาย ---------- */
.rt-resv-day { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.rt-resv-date { width: auto; min-width: 0; max-width: 180px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.rt-resv-when { font-weight: 800; font-size: 1.05rem; }
.rt-resv-who { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.rt-resv-note { white-space: normal; }
.rt-resv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.rt-resv-grid .field, .rt-resv-grid input, .rt-resv-grid select { min-width: 0; }
.rt-resv-table .actions-cell { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.rt-resv-badge { display: inline-block; max-width: 100%; font-size: .74rem; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-resv-badge.is-late { background: var(--danger-soft); color: var(--danger); }
.rt-resv-box { border: 1px dashed var(--brand); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rt-ch-chip { display: inline-block; max-width: 100%; padding: 1px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-text, #7a5300);
  font-weight: 700; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.rt-ch-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rt-ch-hold { max-width: 220px; }
.rt-r-channel { margin: 2px 0 4px; }
/* รอบ 100: ใบเสร็จของบิลโต๊ะ — โต๊ะ · ลูกค้า / เวลาเข้า–ออก (บรรทัดละเรื่อง) */
.rt-r-table { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px; }
@media (max-width: 760px) {
  .rt-resv-table td.actions-cell { justify-content: flex-start; padding-top: 8px; }
  .rt-resv-table td.actions-cell .btn { flex: 1 1 auto; }
  .rt-resv-table .rt-resv-who { align-items: flex-end; text-align: right; }
}
@media print {
  .rt-r-channel, .rt-r-table { margin: 1mm 0; }
}

/* ===== รอบ 96: ร้านเล็ก — จอเรียกคิว (rtd-) · หน้าคิวพนักงาน (rtqb-) · คิวของลูกค้าในหน้า QR (rtq-q*) · ช่วงเวลา (r96-) ===== */
/* จอเรียกคิว (TV) — สว่างเสมอ เต็มจอ ตัวเลขใหญ่ อ่านได้จากระยะไกล */
.rtd { min-height: 100vh; background: #1d1a17; color: #fff; font-family: var(--font); }
.rtd-screen { min-height: 100vh; display: flex; flex-direction: column; }
.rtd-head { display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: var(--brand); color: #fff; }
.rtd-logo { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #fff; flex: none; }
.rtd-brand { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.rtd-brand strong { font-size: clamp(1.1rem, 2.6vw, 2rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtd-brand small { font-size: clamp(.9rem, 1.6vw, 1.2rem); opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtd-clock { font-size: clamp(1.4rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: .02em; }
.rtd-sound { font: inherit; font-weight: 700; border: 2px solid #fff; background: rgba(255,255,255,.15); color: #fff; border-radius: 999px;
  padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.rtd-sound[hidden] { display: none; }
.rtd-cols { flex: 1 1 auto; display: grid; grid-template-columns: 1fr 1.4fr; gap: 0; min-height: 0; }
.rtd-col { padding: 16px 24px; min-width: 0; }
.rtd-col h2 { margin: 0 0 12px; font-size: clamp(1.2rem, 3vw, 2.4rem); font-weight: 800; }
.rtd-col-cook { background: #2a2622; }
.rtd-col-cook h2 { color: #f2d6b8; }
.rtd-col-ready { background: #0f3b23; }
.rtd-col-ready h2 { color: #9be3b4; }
.rtd-nums { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 14px; align-content: flex-start; }
.rtd-nums li { font-weight: 800; line-height: 1.1; border-radius: 14px; padding: 6px 14px; min-width: 2.4em; text-align: center; }
.rtd-col-cook .rtd-nums li { font-size: clamp(1.6rem, 4.2vw, 3.6rem); background: rgba(255,255,255,.08); color: #fff; }
.rtd-col-ready .rtd-nums li { font-size: clamp(2.2rem, 6.4vw, 5.6rem); background: rgba(255,255,255,.12); color: #fff; }
.rtd-col-ready .rtd-nums li.is-new { background: #fff; color: #0f3b23; animation: rtd-blink 1s ease-in-out 0s 6; }
@keyframes rtd-blink { 50% { background: #9be3b4; } }
.rtd-nums:empty::after { content: "—"; font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 800; opacity: .25; }
.rtd-closed { max-width: 560px; margin: 0 auto; padding: 80px 16px; text-align: center; }
.rtd-closed h1 { font-size: 1.6rem; margin: 0 0 8px; }
@media (max-width: 760px) {
  .rtd-head { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .rtd-cols { grid-template-columns: 1fr; }
  .rtd-col { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) { .rtd-col-ready .rtd-nums li.is-new { animation: none; } }

/* หน้าคิวของพนักงาน — สามคอลัมน์ (มือถือ = แท็บ) */
/* รอบ 98: .m-scroll-row (mobile.css ลิงก์ท้ายสุด) ตั้ง display:flex ทับ display:none → แท็บโผล่บนจอคอม — ใช้ selector ที่เจาะจงกว่า */
.rtqb-tabs, .rtqb-tabs.m-scroll-row { display: none; gap: 6px; margin-bottom: 8px; }
.rtqb { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.rtqb-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; }
.rtqb-col-ready { border-color: var(--ok); }
.rtqb-h { margin: 0; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 8px; }
.rtqb-sub { margin: 0; font-size: .85rem; color: var(--warn-text, #7a5300); background: var(--warn-soft); border-radius: 8px; padding: 6px 8px; }
.rtqb-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; background: var(--bg); }
.rtqb-card.is-pending { border-style: dashed; border-color: #D9A21B; background: var(--warn-soft); }
.rtqb-card.is-ready { border-color: var(--ok); background: var(--ok-soft); }
.rtqb-card.is-picked { opacity: .75; }
.rtqb-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.rtqb-no { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.rtqb-meta { color: var(--muted); font-size: .82rem; min-width: 0; overflow-wrap: anywhere; }
.rtqb-sum { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.rtqb-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.rtqb-col > p.muted { margin: 0; padding: 18px 8px; text-align: center; }
@media (max-width: 760px) {
  .rtqb-tabs, .rtqb-tabs.m-scroll-row { display: flex; }
  .rtqb { grid-template-columns: 1fr; }
  .rtqb-col { display: none; }
  .rtqb-col.is-on { display: flex; }
  .rtqb-acts .btn { flex: 1 1 auto; }
}

/* หน้า QR ของลูกค้า: คิวของคุณ (จุดสั่ง QR เคาน์เตอร์) */
.rtq-qtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rtq-qtop .rtq-btn { width: auto; min-height: 36px; padding: 0 12px; font-size: .9rem; }
.rtq-qcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.rtq-qcard.is-pending { border-color: #D9A21B; background: #fffaf0; }
.rtq-qcard.is-ready { border-color: var(--ok); background: var(--ok-soft); }
.rtq-qcard.is-served, .rtq-qcard.is-cancelled { opacity: .7; }
.rtq-qhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rtq-qlabel { font-weight: 700; color: var(--muted); }
.rtq-qno { font-size: 2.4rem; line-height: 1; font-weight: 800; color: var(--brand-strong); }
.rtq-qstate { font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--brand-tint); }
.rtq-qcard.is-ready .rtq-qstate { background: var(--ok); color: #fff; }

/* ช่วงเวลา: ชิปวัน + ช่วงเวลาขายในฟอร์มสินค้า + ช่วงเวลาประจำวันของโปร */
.r96-days { display: flex; gap: 6px; flex-wrap: wrap; }
.r96-days .chip { min-width: 2.6em; }
.r96-hour-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.r96-hour-times { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.r96-hour-times .field { flex: 1 1 120px; min-width: 0; }
.r96-hour-times input, .r96-daily input[type="time"] { width: 100%; }
.r96-daily { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; min-width: 0; }
.rtqs-main { min-width: 0; }
.rtqs-link { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }

/* ===== รอบ 100: หัวบิลโต๊ะ — เวลาเข้าโต๊ะ/นั่งมา (แสดงบนมือถือด้วย ไม่ใช่ .fit-count) · ปุ่ม/ป๊อปอัป QR โต๊ะ ===== */
.rt-seat-time { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.rt-tqr-btn { gap: 6px; border-style: solid; }
.rt-tqr { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.rt-tqr-svg { width: min(280px, 70vw); height: auto; aspect-ratio: 1; padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.rt-tqr p { margin: 0; }
.rt-tqr-code { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 18px; border-radius: 12px; background: var(--warn-soft); color: var(--warn-text, #7a5300); font-weight: 700; }
.rt-tqr-code strong { font-size: 1.8rem; letter-spacing: .14em; line-height: 1.2; }
.rt-tqr-code .muted { color: inherit; opacity: .8; font-weight: 500; }
.rt-tqr .rt-actions { justify-content: center; width: 100%; }
/* รอบ 100b: แถบบิลด้านล่าง (มือถือ/แท็บเล็ต) — ป้ายออเดอร์ QR รอยืนยัน/ลูกค้าเรียก (สีเตือน) */
.rt-bar-qr .held-badge { background: #D9A21B; color: #1d1a17; }

/* ===== รอบ 101: จองโต๊ะในผังโต๊ะ — ปุ่มหัวหน้า, หน้าต่างโต๊ะ (ไม่มา/ยกเลิก/จองโต๊ะนี้), แผงการจอง (rt-rv-), ฟอร์มจอง (rt-rvf-) ===== */
.rt-resv-open { display: inline-flex; align-items: center; gap: 6px; }
.rt-resv-box.is-late { border-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 55%, transparent); }
.rt-resv-info { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.rt-resv-info a { font-weight: 700; }
.rt-resv-boxnote { overflow-wrap: anywhere; }
.rt-resv-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-resv-acts .btn { flex: 0 1 auto; }
.rt-resv-confirm { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.rt-resv-confirm p { margin: 0; font-weight: 600; }
.rt-resv-this { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 6px; border-style: dashed; }

.rt-rv { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rt-rv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rt-rv-top .rt-resv-day { margin: 0; }
.rt-rv-count { margin: 0; }
.rt-rv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rt-rv-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.rt-rv-item.is-late { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: color-mix(in srgb, var(--danger-soft) 40%, var(--surface)); }
.rt-rv-item.is-dim { opacity: .62; }
.rt-rv-when { display: flex; flex-direction: column; line-height: 1.2; }
.rt-rv-when strong { font-size: 1.15rem; font-weight: 800; }
.rt-rv-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rt-rv-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.rt-rv-name strong { overflow-wrap: anywhere; }
.rt-rv-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .88rem; color: var(--muted); }
.rt-rv-meta a { font-weight: 700; }
.rt-rv-cust { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: .82rem; }
.rt-rv-cust-tag { font-weight: 700; color: var(--brand-strong); overflow-wrap: anywhere; }
.rt-rv-noshow { font-weight: 700; color: var(--danger); }
.rt-rv-note { overflow-wrap: anywhere; }
.rt-rv-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.rt-rv-acts .btn { flex: 1 1 auto; justify-content: center; }

.rt-rvf-pick { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
.rt-rvf-cust { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand-soft); min-width: 0; }
.rt-rvf-cust-ico { font-size: 1.2rem; }
.rt-rvf-cust-name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.rt-rvf-hint { margin: -6px 0 0; }
@media (max-width: 760px) {
  .rt-rv-item { grid-template-columns: 54px minmax(0, 1fr); padding: 10px; }
  .rt-resv-acts .btn { flex: 1 1 auto; justify-content: center; }
}

/* รอบ 102: ลูกค้าของบิล — ชิปบนแถบสีบิลโต๊ะ (ชื่ออย่างเดียว ยาว = ตัด …) + ชื่อในหน้าต่างโต๊ะของผังโต๊ะ */
.rt-hero .posb-hero-meta > :is(.rt-cust-btn, .rt-cust-chip) { max-width: min(240px, 100%); }
.rt-cust-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-pick > span:first-child { min-width: 0; }
.rt-pick-cust { display: block; margin-top: 2px; color: var(--brand-strong, var(--brand)); font-weight: 700; overflow-wrap: anywhere; }

/* รอบ 117a (C6): รับเงินในหน้าบิลโต๊ะ <RtTabPay> */
.rtpay { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rtpay-due { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--brand-tint); }
.rtpay-due strong { font-size: 1.6rem; }
.rtpay-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.rtpay-warn { background: var(--warn-soft); color: var(--ink); }
.rtpay-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rtpay-line { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.rtpay-methods { display: flex; flex-wrap: wrap; gap: 6px; }
.rtpay-amt { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rtpay-amt input { flex: 1 1 120px; min-width: 0; font-size: 1.1rem; }
.rtpay-amt select { flex: none; width: auto; }
.rtpay-acc { width: 100%; }
.rtpay-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.rtpay-short { color: var(--danger); font-weight: 600; }
.rtpay-chg { color: var(--ok); font-weight: 600; }
.rtpay-acts { flex-wrap: wrap; }
.rtpay-done { display: flex; flex-direction: column; gap: 10px; }
.rtpay-change { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); }
.rtpay-change strong { font-size: 1.8rem; }
.rtpay-err { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- รอบ 118: โอนจ่าย + แนบสลิป (หน้า QR โต๊ะ rtq- · ป๊อปอัปรับเงิน rtpay- · ป้ายผังโต๊ะ) ---------- */
.rtq-pay { scroll-margin-top: 70px; }
.rtq-pay-due { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--brand-tint); }
.rtq-pay-due strong { font-size: 1.6rem; }
.rtq-pay-accs { display: flex; flex-direction: column; gap: 8px; }
.rtq-pay-acc { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 0; }
.rtq-pay-qr { width: 140px; max-width: 45%; height: auto; border-radius: 8px; background: #fff; flex: none; }
.rtq-pay-acc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.rtq-pay-no { font-size: 1.1rem; font-weight: 700; letter-spacing: .02em; }
.rtq-pay-form { display: flex; flex-direction: column; gap: 10px; }
.rtq-field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; min-width: 0; }
.rtq-field input, .rtq-field select { font: inherit; font-size: 16px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); padding: 6px 10px; background: var(--surface, #fff); color: inherit; width: 100%; max-width: 100%; box-sizing: border-box; }
.rtq-field input[type="file"] { padding: 8px; }
.rtq-slip-st { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.rtq-slip-note { flex-basis: 100%; font-weight: 500; }

.rt-qr-badge.is-slip { background: var(--brand); color: #fff; }
.rt-slip-box { border-color: var(--brand); background: var(--brand-tint); }

.rtpay-slip { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 2px solid var(--brand); border-radius: var(--radius-sm); background: var(--brand-tint); min-width: 0; }
.rtpay-slip-img { flex: none; display: block; width: 120px; }
.rtpay-slip-img img { width: 100%; height: auto; border-radius: 8px; display: block; background: #fff; }
.rtpay-slip-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.rtpay-slip-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.rtpay-flag { font-size: .75rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--danger); color: #fff; }
.rtpay-slip .rtpay-warn { padding: 4px 8px; border-radius: 8px; }
.rtpay-reject { display: flex; flex-direction: column; gap: 8px; }
.rtpay-reject-btn { color: var(--danger); border-color: var(--danger); }
.rtpay-share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
@media (max-width: 760px) {
  .rtpay-slip { flex-direction: column; }
  .rtpay-slip-img { width: 100%; max-width: 260px; }
}
