/* =========================================================
   POCO · core/poco.css  (U3 · Design System v2)
   ---------------------------------------------------------
   แหล่งเดียวของหน้าตาแอป: index.html และ harness ทุกตัวลิงก์ไฟล์นี้
   ส่วนที่ 1–8 = มาตรฐานใหม่ (ใช้กับหน้าจอใหม่ทั้งหมด)
   ส่วนที่ 9   = คลาสเดิม (อัปเกรด/จับคู่/หน้าตัวอย่าง + markup เดิมของแท็บ สั่งของ/ของเสีย/ประวัติ) · U4 ลบส่วนที่ Stockr ไม่ใช้แล้ว
   ส่วนที่ 9b  = Stockr U4 (หน้าสต๊อกตาม mockup รอบ 3 · หน้าบาร์นับทีละใบ · นำเข้าจาก Excel)
   จอ: มือถือ < 768 = Dock ล่าง · แท็บเล็ต 768–1199 = rail 96px · PC ≥ 1200 = sidebar 248px
   หน้าบาร์ (body[data-role="bar"]) = Dock ล่างทุกขนาดจอ
========================================================= */

/* ---------- 1) TOKENS ---------- */
:root{
  /* แบรนด์ = โครง (Dock/เมนูที่เลือก, โปโกะ, แถบความคืบหน้า, จุดแจ้งเตือน) ไม่ใช่สถานะ */
  --c-brand:#E63946; --c-brand-strong:#C81E2C; --c-brand-tint:#FFE3E5;
  /* หมึก = ปุ่ม primary, แท็บที่เลือก, การ์ด hero */
  --c-ink:#231F20; --c-ink-2:#4A4447; --c-muted:#6B6468;
  --c-bg:#F4F1EE; --c-surface:#FFFFFF; --c-surface-2:#ECE6E1; --c-line:#E2DBD5;
  /* สถานะ (ต้องมีคำ/ป้าย/ไอคอนกำกับเสมอ) */
  --c-success:#17794A; --c-success-tint:#E2F4EA;
  --c-warning:#B54708; --c-warning-tint:#FFEDD5; --c-warning-fill:#F79009;
  --c-danger:#B4232F;  --c-danger-tint:#FDE7E8;
  --c-info:#1D5FD1;    --c-info-tint:#E5EEFF;
  /* บนพื้นหมึก */
  --on-ink:#FFFFFF; --on-ink-muted:#CFC7C2; --on-ink-panel:#332E2F; --on-ink-line:#3A3436;
  --on-ink-success:#5FD39A; --on-ink-warning:#FFB067; --on-ink-danger:#FF8A8F; --on-ink-info:#8AB4FF;
  /* สีกลุ่มโมดูล (ไอคอนขาวบนสีกลุ่ม) */
  --g-stock:#7A4A2A; --g-people:#5C3BC4; --g-money:#3D4F63; --g-growth:#A3218F; --g-core:#231F20;

  --font:'Anuphan', system-ui, sans-serif;
  --font-say:'Mitr', 'Anuphan', system-ui, sans-serif;
  --font-mono:'IBM Plex Mono', ui-monospace, monospace;   /* รหัส SOP เท่านั้น */
  --m-stockr:#F28C38; --m-recipr:#2FB58E; --m-staffr:#8C7BF0; --m-taskr:#3E9BEA; --m-ledgr:#E3A71A;

  --r-10:10px; --r-16:16px; --r-24:24px; --r-32:32px; --r-pill:999px;
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px; --s-6:24px; --s-8:32px; --s-10:40px;
  --tap:44px; --tap-bar:56px; --tap-count:72px;
  --shadow-float:0 8px 24px rgba(35,31,32,.16);

  --nav-rail:96px; --nav-side:248px; --dock-h:76px;
  --t-press:60ms; --t-ui:160ms; --ease-out:cubic-bezier(.2,.8,.2,1);
  /* M0 Motion & Elevation tokens (transform + opacity only · นุ่มนวล ไม่มีเงาแข็ง) */
  --t-fast:120ms; --t-base:200ms; --t-slow:320ms;
  --ease-smooth:cubic-bezier(.22,1,.36,1);
  --ease-spring:cubic-bezier(.34,1.36,.64,1);
  --shadow-soft:0 2px 10px rgba(35,31,32,.06);
  --shadow-lift:0 6px 20px rgba(35,31,32,.10);
}

/* ---------- 2) BASE ---------- */
*{ box-sizing:border-box; margin:0; padding:0; }
html,body{ min-height:100%; }
body{
  background:var(--c-bg); color:var(--c-ink);
  font-family:var(--font); font-size:16px; line-height:1.5;
  -webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent;
}
button,input,select,textarea{ font:inherit; color:inherit; }
button{ background:none; border:none; cursor:pointer; }
a{ color:inherit; }
img{ max-width:100%; }
:focus-visible{ outline:2px solid var(--c-info); outline-offset:2px; }
[hidden]{ display:none !important; }
.ph{ font-size:20px; line-height:1; }
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---------- 3) TYPE ---------- */
.num{ font-variant-numeric:tabular-nums; }
.mono{ font-family:var(--font-mono); }
.t-display{ font-size:40px; line-height:48px; font-weight:700; }
.t-title-1{ font-size:28px; line-height:34px; font-weight:700; }
.t-title-2{ font-size:22px; line-height:28px; font-weight:700; }
.t-title-3{ font-size:18px; line-height:24px; font-weight:600; }
.t-body{ font-size:16px; line-height:24px; }
.t-small{ font-size:14px; line-height:20px; }
.t-label{ font-size:12px; line-height:16px; font-weight:600; letter-spacing:.3px; }
.t-muted{ color:var(--c-muted); }
.num-xl{ font-size:44px; line-height:48px; font-weight:700; letter-spacing:-1px; font-variant-numeric:tabular-nums; }
.num-l{ font-size:28px; line-height:32px; font-weight:700; font-variant-numeric:tabular-nums; }
.num-m{ font-size:18px; line-height:24px; font-weight:600; font-variant-numeric:tabular-nums; }
.tone-success{ color:var(--c-success); } .tone-warning{ color:var(--c-warning); }
.tone-danger{ color:var(--c-danger); }   .tone-info{ color:var(--c-info); }
@media (min-width:768px){ .t-title-1{ font-size:32px; line-height:40px; } }

/* ---------- 4) COMPONENTS ---------- */
/* Button: secondary (ค่าเริ่มต้น) · primary/ink = 1 ปุ่มต่อหน้า · white (บนหมึก) · ghost */
.btn{
  min-height:var(--tap); padding:0 16px; border:0; border-radius:var(--r-pill);
  background:var(--c-surface-2); color:var(--c-ink);
  font-size:14px; font-weight:600; white-space:nowrap;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  transition:transform var(--t-press) ease, background var(--t-ui) ease; user-select:none; text-decoration:none;
}
.btn:active{ transform:scale(.97); }
.btn .ph{ font-size:18px; }
.btn-primary,.btn-ink{ background:var(--c-ink); color:#FFF; }
.btn-white{ background:#FFF; color:var(--c-ink); }
.btn-ghost{ background:transparent; color:var(--c-ink-2); }
.btn-ghost:hover{ background:var(--c-surface-2); }
.btn-lg{ min-height:var(--tap-bar); font-size:16px; padding:0 20px; }
.btn-xl{ min-height:var(--tap-count); font-size:20px; font-weight:700; padding:0 24px; }
.btn-block{ width:100%; }
.btn-icon{ width:var(--tap); padding:0; }
.btn[disabled]{ opacity:.45; pointer-events:none; }

/* Card (bento) · ไม่มีเงา/เส้นขอบ */
.card{ background:var(--c-surface); border-radius:var(--r-24); padding:var(--s-5); display:flex; flex-direction:column; gap:var(--s-3); min-width:0; }
.card-tint-success{ background:var(--c-success-tint); } .card-tint-warning{ background:var(--c-warning-tint); }
.card-tint-danger{ background:var(--c-danger-tint); }   .card-tint-info{ background:var(--c-info-tint); }
.card-soft{ background:var(--c-bg); }
a.card{ text-decoration:none; color:inherit; } a.card:active{ transform:scale(.99); }
.card-head{ display:flex; justify-content:space-between; align-items:center; gap:var(--s-2); }
.card-head h2,.card-head h3{ font-size:18px; line-height:24px; font-weight:600; }

/* InkHero · 1 ใบต่อหน้า: ป้ายสถานะสีทึบ + ตัวเลขสีสถานะ + โปโกะเปลี่ยนท่า */
.hero{ background:var(--c-ink); color:var(--on-ink); border-radius:var(--r-32); padding:var(--s-6); display:flex; flex-direction:column; gap:10px; min-width:0; }
.hero-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:var(--s-3); }
.hero-main{ display:flex; flex-direction:column; gap:var(--s-2); align-items:flex-start; min-width:0; }
.hero-label{ font-size:12px; line-height:16px; font-weight:600; letter-spacing:.3px; color:var(--on-ink-muted); }
.hero-num{ font-size:44px; line-height:48px; font-weight:700; letter-spacing:-1px; font-variant-numeric:tabular-nums; margin-top:2px; }
.hero-unit{ font-size:18px; font-weight:600; margin-left:6px; color:var(--on-ink-muted); letter-spacing:0; }
.hero-pose{ width:72px; height:auto; flex:0 0 auto; }
.hero[data-tone="success"] .hero-num{ color:var(--on-ink-success); }
.hero[data-tone="warning"] .hero-num{ color:var(--on-ink-warning); }
.hero[data-tone="danger"]  .hero-num{ color:var(--on-ink-danger); }
.hero[data-tone="info"]    .hero-num{ color:var(--on-ink-info); }
.hero-sub{ font-size:14px; color:var(--on-ink-muted); }
.hero-minis{ display:grid; grid-template-columns:1fr; gap:var(--s-2); margin-top:auto; padding-top:8px; }
.hero-mini{ background:var(--on-ink-panel); border-radius:var(--r-16); padding:11px 14px; display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:10px; min-width:0; width:100%; text-align:left; color:inherit; }
button.hero-mini{ cursor:pointer; }
button.hero-mini:hover{ background:rgba(255,255,255,.12); }
.hero-mini-lbl{ display:inline-flex; align-items:center; gap:8px; font-size:13px; line-height:18px; color:var(--on-ink-muted); font-weight:500; min-width:0; }
.hero-mini-dot{ width:8px; height:8px; border-radius:50%; flex:0 0 auto; }
.hero-mini-right{ display:inline-flex; align-items:center; gap:6px; flex:0 0 auto; min-width:0; }
.hero-mini strong{ font-size:15px; line-height:20px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.hero-mini-note{ font-size:12px; line-height:16px; color:var(--on-ink-muted); }
.hero-mini-go{ display:inline-flex; color:var(--on-ink-muted); font-size:14px; }
@media (max-width:767px){ .hero-mini-note::before{ content:'· '; color:var(--on-ink-muted); } }
@media (min-width:768px){
  .hero{ padding:28px; } .hero-num{ font-size:56px; line-height:60px; } .hero-pose{ width:96px; }
  .hero-minis{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .hero-mini{ flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:2px; padding:10px 12px; }
  .hero-mini-lbl{ font-size:12px; line-height:16px; }
  .hero-mini-dot, .hero-mini-go{ display:none; }
  .hero-mini-right{ flex-direction:column; align-items:flex-start; gap:2px; width:100%; }
  .hero-mini strong{ font-size:16px; line-height:22px; }
  .hero-mini-note{ max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}

/* Badge (ป้ายสถานะ) · solid ใช้บนหมึก */
.badge{ display:inline-flex; align-items:center; gap:6px; padding:2px 10px; border-radius:var(--r-pill); font-size:12px; line-height:20px; font-weight:600; white-space:nowrap; background:var(--c-surface-2); color:var(--c-ink-2); }
.badge::before{ content:''; width:7px; height:7px; border-radius:50%; background:currentColor; }
.badge-success{ background:var(--c-success-tint); color:var(--c-success); }
.badge-warning{ background:var(--c-warning-tint); color:var(--c-warning); }
.badge-danger{ background:var(--c-danger-tint); color:var(--c-danger); }
.badge-info{ background:var(--c-info-tint); color:var(--c-info); }
.badge-solid{ padding:4px 12px; line-height:16px; font-weight:700; color:#FFF; }
.badge-solid::before{ display:none; }
.badge-solid.badge-success{ background:var(--c-success); } .badge-solid.badge-warning{ background:var(--c-warning); }
.badge-solid.badge-danger{ background:var(--c-danger); }   .badge-solid.badge-info{ background:var(--c-info); }
.tag{ display:inline-flex; padding:0 8px; border-radius:var(--r-10); background:var(--c-surface-2); color:var(--c-ink-2); font-size:12px; line-height:20px; font-weight:600; white-space:nowrap; }
.count-dot{ min-width:20px; padding:0 6px; border-radius:var(--r-pill); background:var(--c-brand-strong); color:#FFF; font-size:12px; line-height:20px; font-weight:700; text-align:center; font-variant-numeric:tabular-nums; }
.count-dot.is-danger{ background:var(--c-danger); }

/* Tabs (แท็บในโมดูล) · Chips (ตัวกรอง) */
.tabs{ display:flex; gap:4px; padding:4px; background:var(--c-surface-2); border-radius:var(--r-pill); }
.tabs > button{ flex:1 1 0; height:40px; padding:0 8px; border-radius:var(--r-pill); font-size:14px; font-weight:600; white-space:nowrap; display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.tabs > button[aria-pressed="true"],.tabs > button[aria-selected="true"]{ background:var(--c-ink); color:#FFF; }
.chips{ display:flex; gap:var(--s-2); overflow-x:auto; scrollbar-width:none; }
.chip{ height:36px; padding:0 14px; border-radius:var(--r-pill); background:var(--c-surface); font-size:14px; font-weight:600; white-space:nowrap; flex:0 0 auto; }
.chip[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }
.chip-arch{ background:var(--c-warning-tint); color:var(--c-warning); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--c-warning) 28%, transparent); }
.chip-arch[aria-pressed="true"]{ background:var(--c-warning); color:#FFF; box-shadow:none; }

/* Stat (กดกรองได้) */
.stat{ background:var(--c-surface); border-radius:var(--r-24); padding:var(--s-4); display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; text-align:left; }
.stat-label{ font-size:12px; line-height:16px; font-weight:600; letter-spacing:.3px; color:var(--c-ink-2); }
.stat-value{ font-size:28px; line-height:32px; font-weight:700; font-variant-numeric:tabular-nums; }
.stat-unit{ font-size:14px; font-weight:500; color:var(--c-muted); margin-left:4px; }
.stat[aria-pressed="true"]{ box-shadow:inset 0 0 0 2px var(--c-ink); }

/* ฟอร์ม · ค้นหา · Stepper (หน้าบาร์ใช้ 72) */
.field{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.field-label{ font-size:12px; line-height:16px; font-weight:600; letter-spacing:.3px; color:var(--c-muted); }
.input{ height:var(--tap); padding:0 14px; border:0; border-radius:var(--r-16); background:var(--c-surface); font-size:16px; min-width:0; width:100%; }
.input:focus{ outline:2px solid var(--c-ink); outline-offset:0; }
.search{ display:flex; align-items:center; gap:var(--s-2); height:var(--tap); padding:0 14px; background:var(--c-surface); border-radius:var(--r-16); min-width:0; }
.search .ph{ color:var(--c-muted); font-size:18px; }
.search input{ flex:1 1 auto; border:0; background:transparent; font-size:16px; outline:none; min-width:0; }
.search:focus-within{ outline:2px solid var(--c-ink); }
.stepper-72{ display:grid; grid-template-columns:var(--tap-count) minmax(0,1fr) var(--tap-count); gap:var(--s-2); }
.stepper-72 > button{ height:var(--tap-count); border-radius:var(--r-24); background:var(--c-surface-2); font-size:32px; font-weight:700; }
.stepper-72 > button:last-child{ background:var(--c-ink); color:#FFF; }
.stepper-72 > input{ height:var(--tap-count); border:0; border-radius:var(--r-24); background:#FFF; box-shadow:inset 0 0 0 2px var(--c-line); text-align:center; font-size:32px; font-weight:700; width:100%; font-variant-numeric:tabular-nums; }

/* Progress · แถวรายการ · ตาราง */
.progress-bar{ height:12px; border-radius:var(--r-pill); background:var(--c-surface-2); overflow:hidden; }
.progress-bar > span{ display:block; height:100%; border-radius:inherit; background:var(--c-brand); transition:width var(--t-ui) var(--ease-out); }
.hero .progress-bar{ background:var(--on-ink-line); }
.rows > * + *{ border-top:1px solid rgba(35,31,32,.10); }
.row{ display:flex; align-items:center; gap:var(--s-3); padding:12px 0; min-width:0; }
.row-main{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; }
.row-main small{ font-size:13px; line-height:18px; color:var(--c-muted); }
.table{ width:100%; border-collapse:collapse; font-size:14px; }
.table th{ text-align:left; font-size:12px; line-height:16px; font-weight:600; letter-spacing:.3px; color:var(--c-muted); padding:10px 12px; }
.table td{ padding:12px; border-top:1px solid rgba(35,31,32,.10); font-variant-numeric:tabular-nums; }
.table .r{ text-align:right; }

/* ไอคอนโมดูล (สีกลุ่ม) · โปโกะ */
.mod-ic{ --size:24px; width:var(--size); height:var(--size); flex:0 0 auto; border-radius:calc(var(--size) * .32); background:var(--g, var(--g-core)); color:#FFF; display:inline-flex; align-items:center; justify-content:center; }
.mod-ic .ph{ font-size:calc(var(--size) * .58); }
.mod-ic-28{ --size:28px; } .mod-ic-32{ --size:32px; } .mod-ic-44{ --size:44px; }
.pose{ display:block; height:auto; flex:0 0 auto; }

/* EmptyState */
.empty-state{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:var(--s-3); padding:48px 16px; }
.empty-state .pose{ width:112px; }
.empty-state h1,.empty-state h2{ font-size:22px; line-height:28px; font-weight:700; }
.empty-state p{ color:var(--c-muted); max-width:36ch; }

/* Toast (FIX-07: รองรับปุ่มย้อนกลับ + โปโกะ) */
.toast{
  position:fixed; left:50%; bottom:calc(var(--dock-h) + 28px + env(safe-area-inset-bottom)); z-index:60;
  transform:translate(-50%,8px); opacity:0; pointer-events:none;
  background:var(--c-ink); color:#FFF; border-radius:var(--r-16); padding:12px 18px; font-size:14px; font-weight:600;
  box-shadow:var(--shadow-float); max-width:calc(100vw - 32px);
  display:flex; align-items:center; gap:12px;
  transition:opacity var(--t-ui) ease, transform var(--t-ui) var(--ease-out);
}
.toast.show{ opacity:1; transform:translate(-50%,0); }
.toast.show.has-action{ pointer-events:auto; padding:10px 12px 10px 14px; border-radius:var(--r-24); }
.toast-pose{ width:44px; height:44px; object-fit:contain; flex:0 0 auto; }
.toast-body{ display:flex; flex-direction:column; gap:2px; min-width:0; flex:1 1 auto; }
.toast-body small{ font-size:12px; font-weight:500; color:var(--on-ink-muted); }
.toast-act{
  flex:0 0 auto; min-height:44px; padding:0 16px; border-radius:var(--r-pill);
  background:#FFF; color:var(--c-ink); font-size:14px; font-weight:700; white-space:nowrap;
}
.toast-act:active{ transform:scale(.97); }

/* เลย์เอาต์ในหน้า */
.stack{ display:flex; flex-direction:column; gap:var(--s-3); min-width:0; }
.grid-2{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--s-3); }
.grid-auto{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:var(--s-3); }
@media (min-width:768px){ .stack{ gap:var(--s-4); } .grid-4-t{ grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (min-width:1200px){ .stack{ gap:var(--s-5); } }

/* ---------- 5) SHELL: เมนูหลัก 3 ขนาดจอ ----------
   โครง: <nav class="appnav"> (router วาด) + .shell-main (topbar + #app)
   .appnav-pins  = หน้าหลัก + ปัก 4 + "ทั้งหมด"  → มือถือ (Dock) / แท็บเล็ต (rail)
   .appnav-groups = หน้าหลัก + โมดูลที่ใช้อยู่แบ่งกลุ่ม + "เพิ่มฟีเจอร์ (อีก N)" → PC (sidebar) */
body[data-auth="ready"]{ padding-bottom:calc(var(--dock-h) + 40px + env(safe-area-inset-bottom)); }
.appnav{ z-index:20; }
.appnav-logo,.appnav-branch,.appnav-groups,.appnav-foot{ display:none; }
.appnav-pins{ display:flex; gap:2px; }
.nav-item{
  flex:1 1 0; min-width:0; position:relative;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  padding:8px 0; border-radius:var(--r-24); color:#BDB4AF; text-decoration:none;
  font-size:12px; line-height:16px; font-weight:600; white-space:nowrap;
}
.nav-item .ph{ font-size:22px; }
.nav-item span{ overflow:hidden; text-overflow:ellipsis; max-width:100%; padding:0 2px; }
.nav-item[aria-current="page"]{ background:var(--c-brand); color:#FFF; }
.nav-item:active{ transform:scale(.96); }
.nav-item .count-dot{ position:absolute; top:4px; right:18%; }
.nav-sep{ display:none; }

/* มือถือ + หน้าบาร์ทุกจอ: Dock หมึกลอยล่าง */
.appnav{
  position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom));
  padding:6px; background:var(--c-ink); border-radius:var(--r-32); box-shadow:var(--shadow-float);
  max-width:640px; margin:0 auto;
}
.shell-main{ min-width:0; }
#app{ max-width:720px; margin:0 auto; padding:var(--s-4) var(--s-4) var(--s-6); }

/* แท็บเล็ต: rail 96px (เจ้าของ) */
@media (min-width:768px){
  body[data-role="owner"][data-auth="ready"]{ padding-bottom:0; padding-left:var(--nav-rail); }
  body[data-role="owner"] .appnav{
    left:0; top:0; bottom:0; right:auto; width:var(--nav-rail); max-width:none; margin:0;
    background:var(--c-surface); border-radius:0; box-shadow:none;
    display:flex; flex-direction:column; align-items:center; gap:6px; padding:24px 0 20px; overflow-y:auto;
  }
  body[data-role="owner"] .appnav-logo{ display:block; width:64px; margin-bottom:16px; }
  body[data-role="owner"] .appnav-pins{ flex-direction:column; align-items:center; gap:6px; }
  body[data-role="owner"] .nav-item{ flex:0 0 auto; width:72px; padding:10px 0; border-radius:20px; color:var(--c-ink-2); gap:4px; }
  body[data-role="owner"] .nav-item[aria-current="page"]{ color:#FFF; }
  body[data-role="owner"] .nav-sep{ display:block; width:48px; height:1px; background:var(--c-line); margin:6px 0; }
  body[data-role="owner"] .appnav-foot{ display:flex; margin-top:auto; }
  #app{ max-width:960px; padding:32px 32px 48px; }
  .toast{ bottom:32px; }
  /* หน้าบาร์ แท็บเล็ตแนวตั้ง: Dock ล่างแบบกว้าง ตัวหนังสือข้างไอคอน */
  body[data-role="bar"] .appnav{ left:40px; right:40px; bottom:28px; padding:10px; border-radius:36px; max-width:none; }
  body[data-role="bar"] .appnav-pins{ gap:6px; }
  body[data-role="bar"] .nav-item{ flex-direction:row; height:64px; gap:10px; border-radius:28px; font-size:18px; }
  body[data-role="bar"] .nav-item .ph{ font-size:24px; }
  body[data-role="bar"] .toast{ bottom:calc(var(--dock-h) + 48px); }
/* UX-fix A1 (FIX-01/05): หน้าบาร์ เว้นที่ล่างพ้น Dock (Dock สูง ~84 ลอย 28) · ปุ่ม/แท็บ >= 56 · ชิป 48 */
body[data-role="bar"][data-auth="ready"]{ padding-bottom:calc(var(--dock-h) + 84px + env(safe-area-inset-bottom)); }
body[data-role="bar"] .mod-stockr .btn, body[data-role="bar"] .mod-stockr .btn-ghost, body[data-role="bar"] .mod-stockr .tabs > button{ min-height:var(--tap-bar); }
body[data-role="bar"] .mod-stockr .tabs > button{ height:auto; font-size:16px; }
body[data-role="bar"] .mod-stockr .stk-tabs{ max-width:none; }
body[data-role="bar"] .mod-stockr .chip{ height:auto; min-height:48px; font-size:15px; }
/* FIX-05: ปุ่มแบ่งส่วน (ได้ของแล้ว / สั่งแล้ว รอส่ง) + หัววันในประวัติ ก็ต้องแตะง่ายเท่าปุ่มอื่นหน้าบาร์ */
body[data-role="bar"] .mod-stockr .segment > button, body[data-role="bar"] .mod-stockr [data-lg-day]{ min-height:var(--tap-bar); }
body[data-role="bar"] .mod-stockr *{ scroll-margin-bottom:180px; }
}

/* Redesign ข้อ 4 (24 พ.ย.): หน้าบาร์บน PC (จอกว้าง + เมาส์) Dock เล็กลง กึ่งกลาง ไม่ยืดเต็มจอ
   แท็บเล็ตแนวนอน/จอสัมผัส (pointer:coarse) และมือถือ คงแบบเดิม · ปุ่มยังสูง 56 (tap-bar) */
@media (min-width:1200px) and (hover:hover) and (pointer:fine){
  body[data-role="bar"] .appnav{ left:0; right:0; bottom:20px; width:min(640px, calc(100vw - 80px)); margin:0 auto; padding:6px; border-radius:var(--r-32); }
  body[data-role="bar"] .appnav-pins{ gap:4px; }
  body[data-role="bar"] .nav-item{ height:56px; gap:8px; border-radius:var(--r-24); font-size:15px; }
  body[data-role="bar"] .nav-item .ph{ font-size:20px; }
  body[data-role="bar"][data-auth="ready"]{ padding-bottom:calc(56px + 64px); }
  body[data-role="bar"] .toast{ bottom:96px; }
}

/* PC: sidebar 248px (เจ้าของ) */
@media (min-width:1200px){
  body[data-role="owner"][data-auth="ready"]{ padding-left:var(--nav-side); }
  body[data-role="owner"] .appnav{ width:var(--nav-side); align-items:stretch; gap:4px; padding:24px 20px 24px; }
  body[data-role="owner"] .appnav-logo{ width:96px; margin:0 8px 20px; }
  body[data-role="owner"] .appnav-branch{
    display:flex; align-items:center; justify-content:space-between; height:48px; margin-bottom:12px; padding:0 14px;
    border-radius:var(--r-16); background:var(--c-surface-2); font-size:14px; font-weight:600;
  }
  body[data-role="owner"] .appnav-pins{ display:none; }
  body[data-role="owner"] .appnav-groups{ display:flex; flex-direction:column; gap:4px; }
  body[data-role="owner"] .side-item{
    height:44px; display:flex; align-items:center; gap:12px; padding:0 10px; border-radius:14px;
    font-size:15px; font-weight:600; color:var(--c-ink); text-decoration:none; text-align:left; width:100%;
  }
  body[data-role="owner"] .side-item:hover{ background:var(--c-bg); }
  body[data-role="owner"] .side-item[aria-current="page"]{ background:var(--c-brand); color:#FFF; }
  body[data-role="owner"] .side-item .side-ic{ width:28px; display:inline-flex; justify-content:center; }
  body[data-role="owner"] .side-item .ph{ font-size:22px; }
  body[data-role="owner"] .side-group{ font-size:12px; line-height:16px; font-weight:600; letter-spacing:.3px; color:var(--c-muted); padding:14px 10px 4px; }
  body[data-role="owner"] .side-more{ margin-top:14px; background:var(--c-bg); }
  body[data-role="owner"] .side-more small{ margin-left:auto; font-size:12px; color:var(--c-muted); font-variant-numeric:tabular-nums; }
  body[data-role="owner"] .appnav-foot{ flex:0 0 auto; align-items:center; gap:10px; padding:12px 8px 4px; border-top:1px solid var(--c-line); }
  body[data-role="owner"] .foot-user{ display:flex; flex-direction:column; flex:1 1 auto; min-width:0; }
  body[data-role="owner"] .foot-user strong{ font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  body[data-role="owner"] .foot-user small{ font-size:12px; line-height:18px; color:var(--c-muted); }
  #app{ max-width:1280px; padding:32px 40px 48px; }
}
.foot-user{ display:none; }
@media (min-width:1200px){ body[data-role="owner"] .foot-user{ display:flex; } }
.foot-gear{ width:44px; height:44px; border-radius:var(--r-pill); background:var(--c-surface-2); display:inline-flex; align-items:center; justify-content:center; }
@media (min-width:1200px){ .foot-gear{ background:transparent; width:40px; height:40px; } }

/* ---------- 6) TOPBAR (ชื่อร้าน · สถานะเชื่อมต่อ · ปุ่มเจ้าของ) ---------- */
.topbar{ position:sticky; top:0; z-index:10; background:color-mix(in srgb, var(--c-bg) 92%, transparent); backdrop-filter:blur(8px); }
.topbar-inner{ max-width:1280px; margin:0 auto; padding:10px 16px; display:flex; align-items:center; gap:10px; min-height:60px; }
.topbar-logo{ height:22px; width:auto; }
.topbar-shop{ display:flex; flex-direction:column; min-width:0; }
.shopbar-name{ font-size:14px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shopbar-trial{ font-size:12px; color:var(--c-muted); white-space:nowrap; }
.shopbar-trial.warn{ color:var(--c-warning); font-weight:600; }
.topbar .spacer{ flex:1; }
.topbar-actions{ display:none; gap:4px; align-items:center; }
#signOutBtn{ color:var(--c-muted); position:relative; margin-left:6px; padding-left:14px; }
#signOutBtn::before{ content:''; position:absolute; left:0; top:50%; transform:translateY(-50%); width:1px; height:18px; background:var(--c-line); }
#signOutBtn:hover{ color:var(--c-danger); background:var(--c-danger-tint); }
body[data-role="bar"] #signOutBtn{ margin-left:0; padding-left:16px; }
body[data-role="bar"] #signOutBtn::before{ display:none; }
.conn{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--c-muted); white-space:nowrap; }
.conn::before{ content:''; width:8px; height:8px; border-radius:50%; background:var(--c-muted); }
.conn[data-state="online"]{ color:var(--c-success); } .conn[data-state="online"]::before{ background:var(--c-success); }
.conn[data-state="offline"]{ color:var(--c-danger); }  .conn[data-state="offline"]::before{ background:var(--c-danger); }
.mode-switch{ display:inline-flex; gap:2px; padding:3px; background:var(--c-surface-2); border-radius:var(--r-pill); font-size:12px; font-weight:600; }
.mode-switch button{ padding:0 10px; min-height:30px; border-radius:var(--r-pill); white-space:nowrap; }
/* มือถือ: ออนไลน์ = ซ่อนทั้งจุด (ปกติไม่ต้องบอก) · กำลังเชื่อมต่อ/ออฟไลน์ = จุด + คำ (สีต้องมีคำกำกับ) */
@media (max-width:767px){ .conn{ font-size:11px; gap:4px; white-space:nowrap; } .conn[data-state="online"]{ display:none; } .topbar-inner{ gap:8px; } .topbar-shop{ flex:1 1 auto; } }
.mode-switch button[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }
@media (min-width:768px){
  .topbar-inner{ padding:12px 20px; gap:8px; }
  .topbar-actions{ display:flex; }
  body[data-role="owner"] .topbar-logo{ display:none; }
}
@media (min-width:1200px){ .topbar-inner{ padding:12px 40px; gap:10px; } }
/* เครื่องหน้าบาร์จริง (จับคู่แล้ว) = ไม่มีปุ่มสลับมุมมอง · เจ้าของที่ "ดูแบบหน้าบาร์" ยังสลับกลับได้ */
body[data-device="bar"] .mode-switch, body[data-device="bar"] .shopbar-trial,
body[data-role="bar"] #pairBtn, body[data-role="bar"] #upgradeBtn{ display:none; }

/* ---------- 7) DIALOG / ลิ้นชัก (แอปทั้งหมด · จับคู่ · อัปเกรด ใช้ร่วมกัน) ----------
   มือถือ = แผ่นเลื่อนขึ้นจากล่าง · ≥768 = กล่องกลางจอ */
.drawer{ position:fixed; inset:0; z-index:40; background:rgba(35,31,32,.55); opacity:0; transition:opacity var(--t-ui) ease; }
.drawer.open{ opacity:1; }
.drawer-panel{
  position:absolute; left:0; right:0; bottom:0; max-height:88vh; overflow:auto; overscroll-behavior:contain;
  background:var(--c-surface); border-radius:var(--r-32) var(--r-32) 0 0;
  padding:10px 20px calc(24px + env(safe-area-inset-bottom));
  transform:translateY(24px); transition:transform var(--t-ui) var(--ease-out);
}
.drawer-panel::before{ content:''; display:block; width:40px; height:5px; border-radius:var(--r-pill); background:var(--c-line); margin:0 auto 10px; }
.drawer.open .drawer-panel{ transform:none; }
@media (min-width:768px){
  .drawer-panel{ left:50%; top:50%; bottom:auto; right:auto; width:min(600px, calc(100vw - 64px)); max-height:86vh;
    border-radius:var(--r-32); padding:24px 28px 28px; transform:translate(-50%,-46%); }
  .drawer.open .drawer-panel{ transform:translate(-50%,-50%); }
  .drawer-panel::before{ display:none; }
}
.drawer-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.drawer-head h2{ font-size:22px; line-height:28px; font-weight:700; }
.drawer-hint{ font-size:14px; line-height:20px; color:var(--c-muted); margin-bottom:12px; }
.drawer-close{ width:44px; height:44px; border-radius:var(--r-pill); background:var(--c-surface-2); font-size:20px; display:inline-flex; align-items:center; justify-content:center; }

/* ลิ้นชัก "แอปทั้งหมด" */
.ad-search{ background:var(--c-bg); margin-bottom:12px; }
.ad-group{ display:flex; flex-direction:column; margin-bottom:12px; }
.ad-group h3{ display:flex; align-items:center; gap:8px; font-size:12px; line-height:16px; font-weight:600; letter-spacing:.3px; color:var(--c-ink-2); padding:4px 0; }
.ad-group h3::before{ content:''; width:10px; height:10px; border-radius:3px; background:var(--g); }
.ad-list{ list-style:none; }
.ad-row{ display:flex; align-items:center; gap:12px; padding:10px 0; }
.ad-list > li + li{ border-top:1px solid rgba(35,31,32,.10); }
.ad-open{ flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:12px; text-align:left; min-height:var(--tap); }
.ad-text{ display:flex; flex-direction:column; min-width:0; }
.ad-name{ font-size:16px; line-height:22px; font-weight:600; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.ad-brand{ font-size:12px; font-weight:500; color:var(--c-muted); }
.ad-desc{ font-size:13px; line-height:18px; color:var(--c-muted); }
.ad-row.is-soon .ad-open{ opacity:.6; }
.ad-row.is-locked .ad-name .ph{ font-size:14px; color:var(--c-muted); }
.pin-btn{ height:40px; padding:0 12px; border-radius:var(--r-pill); background:var(--c-surface-2); font-size:13px; font-weight:600; display:inline-flex; align-items:center; gap:4px; white-space:nowrap; flex:0 0 auto; }
.pin-btn .ph{ font-size:16px; }
.pin-btn[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }
.ad-row .btn{ min-height:40px; flex:0 0 auto; }
.ad-settings{ background:var(--c-bg); border-radius:var(--r-24); padding:8px 16px; margin-top:4px; }
.ad-settings h3{ font-size:12px; line-height:16px; font-weight:600; letter-spacing:.3px; color:var(--c-ink-2); margin:8px 0 0; }
.ad-set{ width:100%; display:flex; align-items:center; gap:12px; padding:12px 0; font-size:16px; font-weight:600; text-align:left; min-height:var(--tap); }
.ad-settings .ad-set + .ad-set{ border-top:1px solid rgba(35,31,32,.10); }
.ad-set .ph-caret-right{ margin-left:auto; color:var(--c-muted); font-size:18px; }
.ad-set small{ margin-left:auto; font-size:12px; color:var(--c-muted); font-weight:500; }
.ad-empty{ padding:16px 0; color:var(--c-muted); font-size:14px; }

/* ---------- 8) LOGIN + หน้าหลัก + หน้าที่ยังไม่สร้าง ---------- */
body:not([data-auth="ready"]) #shell,
body:not([data-auth="ready"]) .drawer,
body:not([data-auth="ready"]) #pairDlg,
body:not([data-auth="ready"]) #upsellDlg{ display:none; }
body[data-auth="ready"] .login{ display:none; }

.login{ max-width:440px; margin:0 auto; padding:48px 20px 24px; display:flex; flex-direction:column; align-items:center; gap:20px; }
.login-logo{ width:140px; }
.login-pose{ width:104px; margin-bottom:-28px; position:relative; z-index:1; }
.login-card{ width:100%; background:var(--c-surface); border-radius:var(--r-32); padding:40px 24px 24px; display:flex; flex-direction:column; gap:8px; }
.login-card h1{ font-size:22px; line-height:28px; font-weight:700; }
.login-card p{ color:var(--c-muted); font-size:15px; margin-bottom:12px; }
.login-card .btn{ min-height:var(--tap-bar); font-size:16px; gap:10px; }
.login-kicker{ font-size:12px; line-height:16px; font-weight:600; letter-spacing:.3px; color:var(--c-brand-strong); }
.login-error{ margin-top:8px; padding:10px 14px; border-radius:var(--r-16); background:var(--c-danger-tint); color:var(--c-danger); font-size:14px; font-weight:600; }
.login-note{ margin-top:12px; padding-top:14px; border-top:1px solid var(--c-line); font-size:13px; color:var(--c-muted); }
.login-tagline{ font-size:13px; color:var(--c-muted); text-align:center; }
.login-wait{ text-align:center; color:var(--c-muted); padding:24px 0; }
body[data-auth="loading"] .login-card, body[data-auth="loading"] .login-pose{ display:none; }
body:not([data-auth="loading"]) .login-wait{ display:none; }
.btn-link{ display:inline; margin-left:4px; color:var(--c-ink); font-weight:600; text-decoration:underline; text-underline-offset:3px; min-height:auto; padding:0; }
.code-input{
  width:100%; min-height:var(--tap-count); padding:8px 12px; text-align:center; border:0; border-radius:var(--r-24);
  box-shadow:inset 0 0 0 2px var(--c-line); background:var(--c-bg);
  font-size:32px; font-weight:700; letter-spacing:.2em; text-transform:uppercase; font-variant-numeric:tabular-nums;
}
.code-input::placeholder{ color:var(--c-line); }

.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; padding:4px 4px 2px; margin-bottom:var(--s-4); }
.page-head h1{ font-size:28px; line-height:34px; font-weight:700; }
.page-head p{ color:var(--c-muted); font-size:14px; line-height:20px; }
.page-head .btn{ gap:6px; white-space:nowrap; }
@media (min-width:768px){ .page-head h1{ font-size:32px; line-height:40px; } }

/* หน้าหลัก: การ์ดสรุปจากแต่ละโมดูล (Modules[id].summary) */
.home-cards{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--s-3); }
@media (min-width:768px){ .home-cards{ grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--s-4); } }
@media (min-width:1200px){ .home-cards{ gap:var(--s-5); } }
.home-top{ display:flex; flex-direction:column; gap:var(--s-3); min-width:0; }
@media (min-width:768px){ .home-top{ gap:var(--s-4); } }
@media (min-width:1200px){ .home-top{ display:grid; grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr); gap:var(--s-5); align-items:stretch; } .home-top.is-solo{ grid-template-columns:1fr; } }
.home-top[aria-busy="true"] .hero{ opacity:.85; }
/* แถวรายการใน hero */
.hero-rows{ display:flex; flex-direction:column; margin-top:4px; }
.hero-row{ display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 0; font-size:16px; line-height:24px; font-weight:600; }
.hero-row + .hero-row{ border-top:1px solid var(--on-ink-line); }
.hero-row .is-danger{ color:var(--on-ink-danger); }
.hero-row .badge{ margin-left:6px; vertical-align:middle; }
.hero-row-more{ font-weight:500; color:var(--on-ink-muted); font-size:14px; }
.hero-actions{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:8px; }
.hero-actions .btn{ min-height:48px; font-size:15px; }
/* เริ่มต้นร้าน (FIX-10 / VD-04: ถอดโปโกะซ้ำ · ยุบขั้นเสร็จแล้ว) */
.home-setup-head{ display:flex; justify-content:space-between; align-items:center; gap:12px; }
.setup-pct{ font-size:13px; font-weight:700; color:var(--c-brand-strong); background:var(--c-surface-2); padding:4px 10px; border-radius:var(--r-pill); }
.setup-done-wrap summary{ cursor:pointer; font-size:13px; font-weight:600; color:var(--c-muted); list-style:none; padding:4px 0; }
.setup-done-wrap summary::-webkit-details-marker{ display:none; }
.setup-done-wrap summary::before{ content:'▸ '; }
.setup-done-wrap[open] summary::before{ content:'▾ '; }
.seg-bar{ display:flex; gap:4px; }
.seg-bar span{ flex:1 1 0; height:8px; border-radius:var(--r-pill); background:var(--c-surface-2); }
.seg-bar span.on{ background:var(--c-brand); }
.setup-list{ list-style:none; }
.setup-list li + li{ border-top:1px solid rgba(35,31,32,.10); }
.setup-item{ width:100%; min-height:var(--tap); display:flex; align-items:center; gap:10px; padding:8px 0; text-align:left; font-size:15px; font-weight:600; }
.setup-item .ph{ font-size:22px; color:var(--c-ink-2); }
.setup-item.is-done{ color:var(--c-muted); font-weight:500; text-decoration:line-through; cursor:default; }
.setup-item.is-done .ph{ color:var(--c-success); }
.setup-next{ margin-left:auto; font-size:12px; font-weight:700; color:var(--c-brand-strong); }
.home-trial .num-l .num{ font-size:inherit; }
/* ทางลัดโมดูล */
.launch-grid{ display:grid; grid-template-columns:1fr; gap:var(--s-2); }
@media (min-width:768px){ .launch-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--s-3); } }
@media (min-width:1200px){ .launch-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
.launch{ display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:var(--r-24); background:var(--c-surface); text-align:left; min-width:0; }
.launch:hover{ box-shadow:inset 0 0 0 2px var(--c-line); }
.launch-text{ display:flex; flex-direction:column; min-width:0; flex:1 1 auto; }
.launch-text strong{ font-size:16px; line-height:22px; }
.launch-text small{ font-size:13px; line-height:18px; color:var(--c-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.launch > .ph{ color:var(--c-muted); font-size:18px; }
.launch.is-add{ background:var(--c-bg); box-shadow:inset 0 0 0 2px var(--c-line); }
.sum-card{ border-radius:var(--r-24); padding:var(--s-4); display:flex; flex-direction:column; align-items:flex-start; gap:8px; min-width:0; background:var(--c-surface); text-align:left; }
.sum-card[data-tone="danger"]{ background:var(--c-danger-tint); } .sum-card[data-tone="warning"]{ background:var(--c-warning-tint); }
.sum-card[data-tone="success"]{ background:var(--c-success-tint); } .sum-card[data-tone="info"]{ background:var(--c-info-tint); }
.sum-mod{ display:inline-flex; align-items:center; gap:6px; font-size:12px; line-height:16px; font-weight:600; letter-spacing:.3px; }
.sum-label{ font-size:12px; line-height:16px; font-weight:600; color:var(--c-ink-2); }
.sum-value{ font-size:28px; line-height:32px; font-weight:700; font-variant-numeric:tabular-nums; }
.sum-card[data-tone="danger"] .sum-value{ color:var(--c-danger); } .sum-card[data-tone="warning"] .sum-value{ color:var(--c-warning); }
.sum-card[data-tone="success"] .sum-value{ color:var(--c-success); } .sum-card[data-tone="info"] .sum-value{ color:var(--c-info); }
.sum-unit{ font-size:14px; font-weight:500; color:var(--c-muted); margin-left:4px; }
.sum-note{ font-size:13px; line-height:18px; color:var(--c-ink-2); }
.sum-card.is-launch .sum-value{ font-size:18px; line-height:24px; }
.sum-card.is-add{ background:var(--c-bg); box-shadow:inset 0 0 0 2px var(--c-line); }

/* โหลดโมดูล (dynamic import) */
.mod-loading{ display:flex; flex-direction:column; align-items:center; gap:12px; padding:64px 16px; color:var(--c-muted); }
.mod-loading .pose{ width:88px; animation:poco-bob 1s ease-in-out infinite alternate; }
@keyframes poco-bob{ from{ transform:translateY(0); } to{ transform:translateY(-6px); } }
/* เปิดหน้าไม่สำเร็จ (BUG-02) + ลองใหม่ตอนเปิดร้าน (BUG-03) */
.mod-failed-actions{ display:flex; flex-wrap:wrap; justify-content:center; gap:var(--s-3); }
.mod-failed-actions .btn{ min-height:var(--tap-bar); min-width:140px; }
.login-retry{ margin-top:8px; }

/* =========================================================
   9) LEGACY COMPAT — คลาสเดิม (Stockr / อัปเกรด / จับคู่ / หน้าตัวอย่าง)
   ตรรกะเดิมไม่แตะ · ตัวแปรเดิมชี้ไปสีใหม่ · เลิกเทปกระดาษ/เส้นสมุด
   U4 จะย้าย Stockr ไปใช้ส่วนที่ 4 แล้วลบส่วนนี้ทีละก้อน
========================================================= */
:root{
  --bg-paper:var(--c-bg); --bg-card:var(--c-surface); --bg-surface:var(--c-surface-2);
  --ink-primary:var(--c-ink); --ink-muted:var(--c-muted); --brand-accent:var(--c-brand);
  --status-ok:var(--c-success); --status-warn:var(--c-warning); --status-danger:var(--c-danger);
  --tape:var(--c-surface-2); --tape-ink:var(--c-ink); --rule-blue:rgba(35,31,32,.10); --margin-red:var(--c-brand);
  --line:1.5px solid var(--c-line); --radius:16px; --row:44px;
  --font-text:var(--font); --font-num:var(--font);
}
.num{ text-align:right; }
.tape{ display:inline-flex; align-items:center; padding:2px 12px; border-radius:var(--r-pill); background:var(--c-surface-2); color:var(--c-ink); font-weight:600; }
.btn-locked{ background:var(--c-surface-2); color:var(--c-muted); }
.subhead{ font-size:18px; line-height:24px; font-weight:600; margin:8px 0 12px; }
.empty{ padding:48px 8px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:10px; }
.empty h1{ font-size:22px; font-weight:700; }
.empty p{ color:var(--c-muted); }
.status-ok{ color:var(--c-success); } .status-warn{ color:var(--c-warning); } .status-danger{ color:var(--c-danger); }

/* ตัวอย่างหน้าบาร์/เจ้าของเดิม + Stockr: การ์ดไม่มีเส้นขอบ */
.progress{
  display:flex; align-items:center; gap:10px;
  font-size:14px; color:var(--ink-muted); margin-bottom:20px;
}
.progress-track{ flex:1; height:8px; border:var(--line); border-radius:999px; overflow:hidden; background:var(--bg-card); }
.progress-fill{ height:100%; background:var(--c-brand); transition:width var(--t-ui) var(--ease-out); }

.item{
  background:var(--bg-card);
  border:0; border-radius:var(--r-24);
  padding:18px 16px 16px;
  margin-bottom:16px;
  position:relative;
}
.item-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:14px; }
.item-tape{ font-size:17px; background:none; padding:0; font-weight:700; }
.item-qty{ font-size:40px; font-weight:600; line-height:1; }
.item-unit{ font-family:var(--font-text); font-size:15px; color:var(--ink-muted); font-weight:500; margin-left:6px; }
.item-note{ font-size:14px; color:var(--ink-muted); margin-bottom:12px; }
.item-note.warn{ color:var(--status-warn); font-weight:600; }
.item.counted{ background:var(--c-success-tint); }

.stepper{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.stepper .btn{ padding:0; font-family:var(--font-num); font-size:17px; }

.segment{ display:grid; grid-template-columns:repeat(4,1fr); border:var(--line); border-radius:var(--radius); overflow:hidden; margin-bottom:10px; }
.segment button{ min-height:var(--tap); font-family:var(--font-num); font-weight:500; background:var(--bg-surface); }
.segment button + button{ border-left:var(--line); }
.segment button[aria-pressed="true"]{ background:var(--ink-primary); color:var(--bg-paper); }
.segment button:active{ transform:translateY(2px); }

.ledger{ background:var(--c-surface); border-radius:var(--r-24); padding:4px 20px; margin-bottom:12px; }
.ledger-head{ height:var(--row); display:flex; align-items:center; justify-content:space-between; font-size:12px; font-weight:600; letter-spacing:.3px; color:var(--c-muted); }
.ledger-row{ min-height:var(--row); display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid var(--rule-blue); }
.ledger-row .num{ font-size:16px; }
.ledger-row.loss .num{ color:var(--c-danger); }
.ledger-row.total{ min-height:calc(var(--row) * 1.4); border-top:2px solid var(--c-ink); }
.ledger-row.total strong{ font-size:17px; }
.ledger-row.total .num{ font-size:26px; font-weight:700; }
.vault-locked .secret{ filter:blur(6px); user-select:none; }
.ledger-actions{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:28px; }
.mini-list{ background:var(--c-surface); border-radius:var(--r-24); padding:0 20px; }
.mini-row{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; }
.mini-row + .mini-row{ border-top:1px solid var(--rule-blue); }
.mini-row small{ display:block; color:var(--c-muted); font-size:13px; }

/* ตรายาง (ใช้ตอนยืนยัน) */
.stamp-layer{
  position:fixed; inset:0; z-index:40;
  display:grid; place-items:center;
  pointer-events:none;
}
.stamp{
  color:var(--margin-red);
  border:4px solid currentColor;
  outline:1.5px solid currentColor; outline-offset:4px;
  border-radius:10px;
  padding:10px 26px 8px;
  text-align:center;
  background:rgba(244,241,238,.55);
  mix-blend-mode:multiply;
  /* ผิวหมึกไม่เต็ม เหมือนตรายางจริง */
  -webkit-mask-image:radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.75) 75%, #000 90%);
          mask-image:radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.75) 75%, #000 90%);
  transform:rotate(-8deg);
  opacity:0;
}
.stamp-word{ font-size:56px; font-weight:700; line-height:1.1; letter-spacing:.02em; }
.stamp-meta{ font-family:var(--font-num); font-size:16px; font-weight:500; }
.stamp.go{ animation:stamp-in 1400ms var(--ease-out) forwards; }
@keyframes stamp-in{
  0%   { opacity:0; transform:rotate(-8deg) scale(1.7); }
  14%  { opacity:.95; transform:rotate(-8deg) scale(.94); }
  22%  { transform:rotate(-8deg) scale(1.02); }
  30%  { transform:rotate(-8deg) scale(1); }
  80%  { opacity:.95; transform:rotate(-8deg) scale(1); }
  100% { opacity:0; transform:rotate(-8deg) scale(1); }
}
/* ทั้งหน้ากระเทือนเล็กน้อยตอนตรายางกระแทก */
.thud{ animation:thud 180ms ease-out 180ms; }
@keyframes thud{ 0%{transform:translateY(0)} 40%{transform:translateY(3px)} 100%{transform:translateY(0)} }

.pair-code-box{ border:var(--line); border-radius:var(--radius); background:var(--bg-card); padding:20px 12px; text-align:center; margin-bottom:12px; }
.pair-code{ font-size:44px; font-weight:600; letter-spacing:.12em; line-height:1.1; }
.pair-timer{ margin-top:6px; font-size:14px; color:var(--ink-muted); }
.pair-uid{ font-size:12px; color:var(--ink-muted); margin-left:6px; }
.pair-empty{ padding:14px 0; color:var(--ink-muted); font-size:14px; border-bottom:1px solid var(--rule-blue); }

/* ---------- Vault-Blur + หน้าต่างอัปเกรด (Step 8) ---------- */
body[data-vault="locked"] .secret{ filter:blur(6px); user-select:none; }
.vault-banner{
  display:grid; gap:4px 12px; grid-template-columns:1fr auto; align-items:center;
  border:var(--line); border-left:6px solid var(--status-danger); border-radius:var(--radius);
  background:var(--bg-card); padding:12px 14px; margin-bottom:20px;
}
.vault-banner[hidden]{ display:none; }
.vault-banner strong{ grid-column:1; color:var(--status-danger); }
.vault-banner span{ grid-column:1; font-size:14px; color:var(--ink-muted); }
.vault-banner .btn{ grid-column:2; grid-row:1 / span 2; }
@media (max-width:480px){ .vault-banner{ grid-template-columns:1fr; } .vault-banner .btn{ grid-column:1; grid-row:auto; } }

.demo-note{ font-size:13px; color:var(--status-warn); font-weight:600; margin-bottom:12px; }
.upsell-cycle{ grid-template-columns:1fr 1fr; margin-bottom:12px; }
.upsell-cycle button{ font-family:var(--font-text); }
.pkg-list{ list-style:none; display:grid; gap:8px; margin-bottom:8px; }
.pkg{
  width:100%; display:grid; grid-template-columns:auto 1fr auto; align-items:baseline; gap:4px 12px;
  min-height:var(--tap); padding:12px 14px; text-align:left;
  border:var(--line); border-radius:var(--radius); background:var(--bg-card);
}
.pkg:active{ transform:translateY(2px); }
.pkg[aria-checked="true"]{ background:var(--ink-primary); color:var(--bg-paper); }
.pkg-name{ font-weight:700; font-size:17px; }
.pkg-note{ font-size:14px; opacity:.8; }
.pkg-price{ font-size:14px; white-space:nowrap; }
.pkg-price .num{ font-size:17px; font-weight:600; }
.branch-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.branch-row .btn{ width:var(--tap); padding:0; font-size:20px; }
.branch-count{ font-size:24px; font-weight:600; min-width:2ch; text-align:center; }
.branch-row small{ flex-basis:100%; color:var(--ink-muted); font-size:13px; }
.upsell-total{ margin:20px 0 16px; }
.btn[disabled]{ opacity:.45; pointer-events:none; }

.qr-box{ text-align:center; border:var(--line); border-radius:var(--radius); background:var(--bg-card); padding:16px; margin-bottom:16px; }
.qr-img{ position:relative; width:220px; max-width:100%; margin:0 auto 8px; }
.qr-img svg{ width:100%; height:auto; display:block; }
.qr-demo{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%) rotate(-8deg);
  border:3px solid var(--status-danger); color:var(--status-danger); background:var(--bg-card);
  font-weight:700; font-size:18px; padding:4px 12px; border-radius:6px; white-space:nowrap;
}
.qr-amount{ font-size:15px; }
.qr-amount .num{ font-size:32px; font-weight:600; }
.qr-to{ font-weight:600; }
.qr-what{ font-size:13px; color:var(--ink-muted); margin-top:4px; }
.pay-steps{ margin:0 0 16px 20px; display:grid; gap:6px; font-size:15px; }
[data-upsell-line]{ gap:8px; margin-bottom:8px; }

/* ---------- ฟอร์ม + Stockr เจ้าของ (Step 11) ---------- */
.subhead-note{ font-size:13px; font-weight:500; color:var(--ink-muted); margin-left:6px; }
.stk-list{ list-style:none; border-top:var(--line); margin-bottom:16px; }
.page-head .btn{ gap:6px; white-space:nowrap; }

.stk-form .subhead{ margin-top:24px; }
.fld{ display:block; margin-bottom:12px; }
.fld-label{ display:block; font-size:14px; font-weight:600; margin-bottom:4px; }
.fld-box{ display:flex; align-items:center; border:var(--line); border-radius:var(--radius); background:var(--bg-card); }
.fld-box:focus-within{ outline:2px solid var(--c-ink); outline-offset:2px; }
.fld-box input{ flex:1; min-width:0; min-height:var(--tap); padding:8px 12px; border:none; background:transparent; font:inherit; color:inherit; outline:none; }
.fld-box input[type="number"]{ font-family:var(--font-num); text-align:right; font-variant-numeric:tabular-nums; }
.fld-unit{ padding:0 12px; color:var(--ink-muted); font-size:14px; }
.fld-hint{ display:block; margin-top:4px; font-size:13px; color:var(--ink-muted); }
.fld-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:420px){ .fld-row{ grid-template-columns:1fr; } }
.fld-check{ display:flex; gap:10px; align-items:flex-start; padding:10px 0; font-size:15px; cursor:pointer; }
.fld-check input{ width:22px; height:22px; margin-top:2px; accent-color:var(--ink-primary); flex:none; }
.form-actions{ display:grid; gap:8px; margin-top:24px; }

/* ---------- หน้าบาร์นับของ (Step 12) ---------- */
.item-actions{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:4px; }
.item-actions .btn{ font-size:15px; }
.fld-box select{ flex:1; min-width:0; min-height:var(--tap); padding:8px 36px 8px 12px; border:none; background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23231F20' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance:none; -moz-appearance:none; appearance:none; font:inherit; color:inherit; outline:none; }

/* ---------- นับแยกขนาด + ตรวจยอดผิดปกติ (Step 12 รอบ 2) ---------- */
.item-prev{ font-size:14px; color:var(--ink-muted); margin:-4px 0 12px; }
.pack-row{ display:grid; grid-template-columns:1fr var(--tap) 96px var(--tap); gap:8px; align-items:center; margin-bottom:8px; }
.pack-row.pack-rem{ grid-template-columns:1fr 152px var(--tap); }
.pack-name{ font-weight:600; display:flex; flex-direction:column; line-height:1.3; }
.pack-name small{ font-weight:400; font-size:13px; color:var(--ink-muted); }
.pack-row .btn{ padding:0; font-size:22px; }
.pack-input{
  width:100%; min-height:var(--tap); text-align:right; font-size:22px; font-weight:600; padding:4px 10px;
  border:var(--line); border-radius:var(--radius); background:var(--bg-paper); color:var(--ink-primary);
}
.pack-input::placeholder{ color:var(--rule-blue); }
.pack-unit{ color:var(--ink-muted); text-align:center; }
.item-foot{ display:flex; justify-content:space-between; align-items:center; margin:12px 0 8px; padding-top:10px; border-top:1px dashed var(--ink-muted); }
.item-total .num{ font-size:18px; font-weight:600; }

.pack-edit{ margin-bottom:4px; }
.pack-edit-title{ display:block; font-size:13px; color:var(--ink-muted); margin-bottom:4px; }
.fld-row-3{ grid-template-columns:1.2fr 1fr 1fr; }
@media (max-width:520px){ .fld-row-3{ grid-template-columns:1fr 1fr; } .fld-row-3 .fld:first-child{ grid-column:1 / -1; } }

.review-list{ list-style:none; }
.review-row{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:start; padding:10px 0; border-top:1px solid var(--rule-blue); }
.review-main{ display:flex; flex-direction:column; gap:2px; }
.review-main small{ font-size:13px; color:var(--ink-muted); }
/* FIX-02: ช่องราคาใน "รอยืนยันราคา" ดันปุ่มล้นการ์ดที่ 375 → ให้ช่องหดได้ · มือถือปุ่มเต็มแถวใต้ช่องราคา */
.review-main{ min-width:0; }
.review-main .fld, .review-main .fld-box, .review-main .fld-box > input{ min-width:0; }
.review-main .fld-box > input{ width:100%; }
@media (max-width:600px){ .review-row{ grid-template-columns:minmax(0,1fr); } .review-row > .btn{ width:100%; min-height:48px; } }


/* ---------- Stockr Step 13: แท็บ รับของ / ของเสีย / ประวัติ ---------- */
.rx-orders, .rx-list, .lg-list{ list-style:none; }
.rx-order{ display:grid; grid-template-columns:1fr auto; gap:8px 12px; padding:12px 0; border-top:1px solid var(--rule-blue); }
.rx-order-main{ display:flex; flex-direction:column; gap:2px; }
.rx-order-main small{ font-size:13px; color:var(--ink-muted); }
.rx-order-main small.status-danger{ color:var(--status-danger); font-weight:600; }
.rx-order-btns{ display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.rx-confirm{ grid-column:1 / -1; }
.rx-list{ border-top:var(--line); margin-bottom:8px; }
.rx-row{ padding:12px 0; border-bottom:1px solid var(--rule-blue); }
.rx-row.is-filled{ background:linear-gradient(to right, var(--tape) 0 4px, transparent 4px); padding-left:12px; }
.rx-row-head{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; margin-bottom:8px; }
.rx-row-head small{ font-size:13px; color:var(--ink-muted); }
.rx-suggest{ font-size:13px; min-height:32px; }
.segment.rx-status{ grid-template-columns:1fr 1fr; margin-bottom:8px; }
.rx-status button{ font-family:var(--font-text); font-size:14px; min-height:40px; }
.rx-line{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:8px; }
.rx-qty{ display:grid; grid-template-columns:var(--tap) 88px var(--tap); gap:6px; }
.rx-qty .btn{ padding:0; font-size:22px; }
.rx-pack{ flex:1; min-width:170px; }
.rx-custom{ flex:1; min-width:150px; }
.rx-custom input{ font-family:var(--font-num); text-align:right; }
.rx-price{ margin-bottom:4px; }
.rx-sum{ font-size:15px; margin:4px 0 8px; }
.rx-sum .num{ font-weight:600; }
.ws-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:12px; margin-top:16px; }
.ws-pick{ min-height:64px; border:var(--line); border-radius:var(--radius); background:var(--bg-card); padding:18px 8px 10px; text-align:left; }
.ws-pick:active{ transform:translateY(2px); }
.ws-pick .tape{ font-size:15px; }
.ws-reasons{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.ws-reasons .btn{ min-height:56px; font-size:16px; }
.ws-reasons .btn:last-child:nth-child(odd){ grid-column:1 / -1; }
/* FIX-06 (VD-01): ช่องใส่จำนวนของเสีย + หน่วย (ml/g) อยู่ในกรอบเดียวกัน ไม่ทับขอบ */
.prep-qty-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.prep-qty-box{ width:190px; max-width:100%; min-height:64px; border-radius:var(--r-20) !important; background:#FFF !important; box-shadow:inset 0 0 0 2px var(--c-line); padding:0 4px 0 8px; }
.prep-qty-box input{ min-height:60px; font-size:26px; font-weight:700; text-align:right; }
.prep-qty-box .fld-unit{ font-size:17px; font-weight:600; color:var(--c-muted); padding:0 12px 0 6px; white-space:nowrap; }
body[data-role="bar"] .lg-confirm{ background:var(--c-warning-tint); border-radius:var(--r-20); padding:16px; margin-top:8px; }
body[data-role="bar"] .lg-confirm p{ color:var(--c-ink); font-weight:500; margin-bottom:12px; }
body[data-role="bar"] .rx-qty .btn{ min-width:var(--tap-bar); min-height:var(--tap-bar); padding:0; }
.item-note[hidden]{ display:none; }
.lg-day{ border-top:var(--line); }
.lg-day:last-child{ border-bottom:var(--line); }
.lg-day-head{ width:100%; min-height:var(--tap); display:flex; align-items:center; gap:8px; text-align:left; font-weight:600; }
.lg-count{ margin-left:auto; font-weight:400; font-size:13px; color:var(--ink-muted); }
.lg-row{ display:grid; grid-template-columns:48px 1fr auto; gap:4px 10px; align-items:center; padding:10px 0; border-top:1px solid var(--rule-blue); }
.lg-time{ font-size:13px; color:var(--ink-muted); }
.lg-main{ display:flex; flex-direction:column; min-width:0; }
.lg-main small{ font-size:13px; color:var(--ink-muted); }
.lg-qty{ text-align:right; white-space:nowrap; font-size:14px; }
.lg-qty small{ color:var(--ink-muted); }
.lg-act{ grid-column:2 / -1; display:flex; justify-content:flex-end; }
.lg-act .btn{ min-height:36px; padding:0 14px; font-size:14px; }
.lg-rv{ font-size:13px; color:var(--ink-muted); }
.lg-row.is-reverted .lg-main strong, .lg-row.is-reverted .lg-qty{ text-decoration:line-through; color:var(--ink-muted); }
.lg-row.is-out .lg-qty strong{ color:var(--status-danger); }
.lg-confirm{ grid-column:1 / -1; padding:8px 0 0; }
.lg-confirm p{ font-size:15px; margin-bottom:8px; }
@media (min-width:600px){ .lg-act{ grid-column:auto; } .lg-row{ grid-template-columns:48px 1fr auto auto; } }

/* Step 13 รอบ 2: ตัวกรองหน้ารายการ (แบบเดิม) · วันนัดส่ง · สถิติซัพ · ตัวกรองประวัติ */
.rx-extra{ margin-top:4px; }
.rx-extra .fld{ margin-bottom:4px; }
.rx-stats{ margin-bottom:20px; }
.sup-list{ list-style:none; border-top:var(--line); }
.sup-row{ display:flex; flex-direction:column; gap:2px; padding:10px 0; border-bottom:1px solid var(--rule-blue); font-size:14px; }
.sup-row strong{ font-size:15px; }
.rx-tips{ margin-top:12px; border:var(--line); border-left:6px solid var(--status-warn); border-radius:var(--radius); background:var(--bg-card); padding:4px 14px; }
.rx-order-btns .btn-ghost{ min-height:36px; font-size:14px; }
.lg-filters{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:6px; }
.lg-filters .fld-box:first-child{ grid-column:1 / -1; }
@media (min-width:600px){ .lg-filters{ grid-template-columns:repeat(3, 1fr); } .lg-filters .fld-box:first-child{ grid-column:auto; } }
.lg-hint{ margin-bottom:12px; }
.lg-hint .btn-ghost{ min-height:28px; font-size:13px; }
.lg-act{ gap:8px; flex-wrap:wrap; align-items:center; }
.ws-report{ margin-bottom:16px; }

#upsellDlg .chips, .segment{ border:0; background:var(--c-surface-2); padding:4px; gap:4px; border-radius:var(--r-pill); }
.segment button{ border-radius:var(--r-pill); background:transparent; border:0 !important; font-family:var(--font); font-weight:600; }
.segment button[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }
.rx-tips,.vault-banner{ border:0 !important; border-radius:var(--r-24) !important; }
.vault-banner{ background:var(--c-danger-tint) !important; }
.rx-tips{ background:var(--c-info-tint) !important; }

/* =========================================================
   9b) STOCKR U4 · หน้าสต๊อกตาม mockup รอบ 3 (ใช้ components ส่วนที่ 4)
   เจ้าของ: hero ต้องสั่ง · tint ส้ม ยอดนับรอตรวจ · tint ฟ้า รอยืนยันราคา · stat กดกรอง · มือถือรายการ / PC ตาราง + แผงขวา
   หน้าบาร์: hero ความคืบหน้า + การ์ดนับทีละใบ stepper 72 · นำเข้าจาก Excel
========================================================= */
.t-strong{ font-weight:600; }
.tone-success{ color:var(--c-success); } .tone-warning{ color:var(--c-warning); }
.tone-danger{ color:var(--c-danger); }   .tone-info{ color:var(--c-info); }
.stk-page{ padding-bottom:var(--s-6); }
.stk-tabs{ max-width:560px; }
.stk-tabs .count-dot{ margin-left:2px; }
.select{ height:var(--tap); padding:0 36px 0 14px; border:0; border-radius:var(--r-16); background:var(--c-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23231F20' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance:none; -moz-appearance:none; appearance:none; font-size:16px; min-width:0; width:100%; color:var(--c-ink); }
.select:focus{ outline:2px solid var(--c-ink); }

/* hero ต้องสั่ง */
.stk-hero .hero-rows{ margin-top:0; }
.hero-row-q{ font-size:14px; font-weight:500; color:var(--on-ink-muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
button.hero-row{ width:100%; color:inherit; text-align:left; }
.hero-link{ align-self:center; padding:10px 12px; font-size:14px; font-weight:600; color:#FFF; text-decoration:underline; text-underline-offset:3px; }
.stk-hero .btn-white{ margin-top:6px; }

/* stat + มูลค่า */
.stat-note{ font-size:13px; line-height:18px; color:var(--c-muted); }
.stat-tint-danger{ background:var(--c-danger-tint); } .stat-tint-warning{ background:var(--c-warning-tint); }
.stat-tint-success{ background:var(--c-success-tint); } .stat-tint-info{ background:var(--c-info-tint); }
.stat-tint-danger .stat-note{ color:var(--c-danger); font-weight:600; } .stat-tint-warning .stat-note{ color:var(--c-warning); font-weight:600; }
.stk-value{ gap:4px; }
.stk-value-num{ font-size:28px; line-height:32px; font-weight:700; font-variant-numeric:tabular-nums; }

/* ยอดนับรอตรวจ */
.stk-review .rows > li{ padding:12px 0; display:flex; flex-direction:column; gap:4px; }
.stk-rv-top,.stk-rv-foot{ display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.stk-rv-acts{ display:inline-flex; align-items:center; gap:6px; flex-wrap:wrap; }
.stk-head-acts{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
/* FIX-11 (VD-05): รายงานของเสีย Design System v2 (InkHero + Bento 2 คอลัมน์ + แถบสัดส่วน %) */
.wr-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.wr-head-left{ display:flex; flex-direction:column; gap:4px; min-width:0; flex:1 1 240px; }
.wr-month{ max-width:240px; }
.wr-top{ display:grid; grid-template-columns:1fr; gap:var(--s-4); align-items:stretch; }
.wr-bento{ display:grid; grid-template-columns:1fr; gap:var(--s-4); align-items:start; }
@media (min-width:768px){ .wr-bento{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (min-width:1000px){ .wr-top{ grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); } }
.wr-card{ gap:14px; }
.wr-card h3 small{ font-size:13px; font-weight:500; }
.wr-bars{ display:flex; flex-direction:column; gap:12px; }
.bar-row{ display:flex; flex-direction:column; gap:6px; }
.bar-top{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; font-size:14px; }
.bar-top > span{ min-width:0; }
.bar-top > strong{ white-space:nowrap; flex:0 0 auto; }
.bar-track{ height:10px; border-radius:var(--r-pill); background:var(--c-surface-2); overflow:hidden; }
.bar-fill{ height:100%; border-radius:inherit; transition:width var(--t-ui) var(--ease-out); }
/* FIX-09 (VD-03): แท็บสั่งของ PC Bento 2 คอลัมน์ + ปุ่มคัดลอกส่ง LINE + ยุบชื่อผู้สั่ง */
.rx-owner-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.rx-who-line{ display:inline-flex; align-items:center; gap:6px; flex-wrap:wrap; }
.rx-who-box{ width:180px; }
.rx-who-chg{ min-height:32px; padding:0 8px; font-size:13px; }
.rx-owner-acts{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.btn-line{ background:var(--c-success-tint); color:var(--c-success); }
.btn-line:hover{ filter:brightness(.97); }
.rx-bento{ display:grid; grid-template-columns:1fr; gap:var(--s-5); align-items:start; }
@media (min-width:1200px){ .rx-bento{ grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:20px; } }
.rx-bento-main,.rx-bento-side{ min-width:0; }
.stk-review small{ font-size:13px; line-height:18px; color:var(--c-ink-2); }
.stk-review .t-strong{ font-size:14px; line-height:20px; }

/* ตัวกรอง */
.stk-tools{ display:grid; grid-template-columns:1fr 1fr; gap:var(--s-2); }
.stk-tools .search{ grid-column:1 / -1; }
@media (min-width:768px){ .stk-tools{ grid-template-columns:minmax(0,1fr) 200px 200px; } .stk-tools .search{ grid-column:auto; } }
.chips .chip .ph{ margin-right:4px; }

/* รายการ (มือถือ/แท็บเล็ต) */
.stk-list-card{ gap:var(--s-2); }
.stk-items{ list-style:none; }
.stk-item{ width:100%; display:flex; gap:var(--s-3); align-items:flex-start; padding:14px 0; text-align:left; color:inherit; }
.stk-item:active{ transform:scale(.99); }
.stk-item-main{ flex:1 1 auto; display:flex; flex-direction:column; gap:2px; min-width:0; }
.stk-item-name{ font-size:16px; line-height:24px; font-weight:600; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.stk-item-run{ font-size:14px; line-height:20px; color:var(--c-ink-2); }
.stk-item-main small{ font-size:13px; line-height:18px; color:var(--c-muted); }
.stk-item-side{ display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex:0 0 auto; }
.stk-item-qty{ font-size:18px; line-height:24px; font-weight:700; white-space:nowrap; }
.stk-item-qty small{ font-size:14px; font-weight:500; color:var(--c-muted); }
.stk-none{ padding:16px 0; }

/* PC: stat 5 ช่อง · ตาราง + คอลัมน์ขวา 380 */
.stk-stats-5{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:var(--s-4); }
.stk-split{ display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:var(--s-6); align-items:start; }
.stk-side{ position:sticky; top:16px; }
/* Redesign ข้อ 2 (24 พ.ย.): แผงรายละเอียด PC เคยติดใต้ topbar (sticky ทั้งคู่) → หัวแผง/ตัวเลขคงเหลือถูกตัด
   เลื่อนลงให้พ้น topbar */
.stk-side.has-detail{ top:calc(var(--topbar-h, 72px) + 12px); }
/* รอบ 2 (24 พ.ย.): เดิมจำกัดความสูง = จอ แล้วเลื่อนในแผง → ผู้ใช้เห็นท้ายแผงขาด (ไม่รู้ว่าเลื่อนในแผงได้)
   แผงที่สูงกว่าจอ = ไม่ติดหนึบ เลื่อนไปพร้อมหน้า อ่านได้จนจบ (JS ใส่ .is-tall หลังวาด · สต๊อก + สูตร) */
.stk-side.has-detail.is-tall{ position:static; }
/* มือถือ/แท็บเล็ต: หน้ารายละเอียดวัตถุดิบ (ปุ่มกลับอยู่บน · ไม่ต้องมีปุ่ม X ซ้ำ) */
.stk-detail-page{ max-width:640px; margin:0 auto; }
.stk-back{ align-self:flex-start; min-height:48px; padding-left:8px; }
.stk-detail-page .stk-detail .card-head .btn-icon{ display:none; }
.stk-detail-page .stk-detail-actions .btn{ flex:1 1 0; min-height:52px; }
.stk-t-top{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); gap:var(--s-4); align-items:start; }
.stk-t-cards{ align-items:start; }
.stk-table td,.stk-table th{ padding:12px 8px; vertical-align:middle; }
.stk-table tbody tr{ cursor:pointer; }
.stk-table tbody tr:hover td{ background:var(--c-bg); }
.stk-table tbody tr[aria-selected="true"] td{ background:var(--c-surface-2); }
.stk-td-name{ display:flex; flex-direction:column; text-align:left; color:inherit; }
.stk-td-name strong{ font-size:16px; line-height:24px; display:flex; align-items:center; gap:6px; }
.stk-td-name small,.stk-td-sub{ display:block; font-size:12px; color:var(--c-muted); }
.stk-detail h2{ font-size:22px; line-height:28px; font-weight:700; }
.stk-detail-qty{ display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.stk-detail-qty .num{ font-size:44px; line-height:48px; font-weight:700; }
.stk-detail-qty small{ font-size:18px; color:var(--c-muted); font-weight:600; }
.kvs{ display:flex; flex-direction:column; }
.kv{ display:flex; justify-content:space-between; gap:12px; padding:8px 0; font-size:14px; border-top:1px solid rgba(35,31,32,.10); }
.kv > span:first-child{ color:var(--c-muted); flex:0 0 auto; }
.kv > span:last-child{ text-align:right; }
.stk-detail-actions{ display:flex; gap:var(--s-2); flex-wrap:wrap; }

/* ปุ่มเพิ่ม + เมนู */
.stk-add{ position:relative; }
.stk-add-menu{ position:absolute; right:0; top:calc(100% + 8px); z-index:30; width:280px; background:#FFF; border-radius:var(--r-24); box-shadow:var(--shadow-float); padding:8px; display:flex; flex-direction:column; }
.stk-add-menu button{ display:flex; gap:12px; align-items:center; text-align:left; padding:12px; border-radius:var(--r-16); min-height:56px; }
.stk-add-menu button:hover{ background:var(--c-bg); }
.stk-add-menu .ph{ font-size:24px; }
.stk-add-menu span{ display:flex; flex-direction:column; }
.stk-add-menu small{ font-size:13px; color:var(--c-muted); }
.stk-empty-actions{ display:flex; gap:var(--s-2); flex-wrap:wrap; justify-content:center; }

/* แท็บ สั่งของ/ของเสีย/ประวัติ (markup เดิม · หน้าตาใหม่) */
.mod-stockr .subhead{ font-size:18px; line-height:24px; font-weight:600; margin:0; }
.mod-stockr .card .subhead{ margin-bottom:-4px; }
.mod-stockr .item-note{ margin:0; color:var(--c-ink-2); }
.rx-wait,.rx-cost,.rx-stats{ gap:var(--s-2); }
.rx-list{ list-style:none; padding-top:4px; padding-bottom:4px; gap:0; }
.rx-list .rx-row:last-child{ border-bottom:0; }
.rx-row{ border-bottom:1px solid rgba(35,31,32,.10); }
.rx-row.is-filled{ background:none; box-shadow:inset 4px 0 0 var(--c-brand); padding-left:14px; }
.sup-list{ border-top:0; }
.mod-stockr .review-row{ border-top:1px solid rgba(35,31,32,.10); }
.mod-stockr .review-list .review-row:first-child{ border-top:0; }
/* รับของรอบใหม่ (22 พ.ย.): หน้าบาร์เห็นแค่ของที่สั่ง · ของเสียหาย · ของนอกรายการ + เงินที่จ่าย */
.rx-row:not(.is-filled) .rx-paid{ display:none; }
.rx-wait-bar .rx-orders{ list-style:none; padding-top:4px; padding-bottom:4px; }
.rx-orders .rx-order:first-child{ border-top:0; }
.mod-stockr .rx-order{ border-top:1px solid rgba(35,31,32,.10); }
body[data-role="bar"] .rx-order-btns .btn-ink{ min-height:var(--tap-bar); padding:0 20px; }
.rx-dmg{ display:flex; flex-direction:column; gap:8px; padding:12px; margin:4px 0 8px; border-radius:var(--r-16); background:var(--c-danger-tint); }
.rx-dmg .chips{ margin:0; flex-wrap:wrap; overflow:visible; }
.rx-dmg-open{ min-height:40px; font-size:14px; color:var(--c-danger); margin-bottom:8px; gap:6px; }
.rx-claims{ gap:var(--s-2); }
.mod-stockr .review-row.rx-claim{ grid-template-columns:minmax(0,1fr); }
.rx-claim-acts{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.rx-claim .rx-confirm{ grid-column:1 / -1; }
.rx-adhoc-open{ min-height:var(--tap-bar); justify-content:center; gap:8px; }
@media (max-width:600px){
  .rx-order{ grid-template-columns:minmax(0,1fr); }
  .rx-order-btns{ align-items:stretch; }
  .rx-claim-acts .btn{ flex:1 1 auto; }
}
.ws-pick{ border:0; border-radius:var(--r-24); background:var(--c-surface); padding:16px; min-height:72px; font-weight:600; }
.ws-pick .tape{ background:none; padding:0; font-size:16px; }
.mod-stockr .item{ background:var(--c-surface); border-radius:var(--r-24); padding:var(--s-5); margin:0; display:flex; flex-direction:column; gap:var(--s-3); }
.mod-stockr .item-top,.mod-stockr .item-prev,.mod-stockr .item-foot{ margin:0; }
.mod-stockr .item-foot{ border-top:1px solid rgba(35,31,32,.10); }
.mod-stockr .pack-row{ grid-template-columns:1fr var(--tap-bar) 104px var(--tap-bar); margin:0; }
.mod-stockr .pack-row .btn{ min-height:var(--tap-bar); border-radius:var(--r-16); }
.mod-stockr .pack-row .btn:last-of-type{ background:var(--c-ink); color:#FFF; }
.mod-stockr .pack-input{ min-height:var(--tap-bar); border:0; box-shadow:inset 0 0 0 2px var(--c-line); border-radius:var(--r-16); background:#FFF; text-align:center; }
.lg-day{ background:var(--c-surface); border:0 !important; border-radius:var(--r-24); padding:4px 20px; }
.lg-day + .lg-day{ margin-top:0; }
.lg-filters .fld-box,.mod-stockr .fld-box{ border:0; border-radius:var(--r-16); background:var(--c-surface); }
.mod-stockr .ledger{ margin:0; }
.stk-list{ border-top:0; margin:0; background:var(--c-surface); border-radius:var(--r-24); padding:0 20px; }

/* ฟอร์มเพิ่ม/แก้ (markup เดิม) */
.stk-form{ max-width:720px; }
.stk-form .subhead{ margin:24px 0 10px; }
.stk-form .fld-box{ border:0; background:var(--c-surface); border-radius:var(--r-16); }

/* ---------- หน้าบาร์: นับทีละใบ ---------- */
.bar-head{ flex-wrap:wrap; }
.bar-who{ height:var(--tap-bar); padding:0 20px 0 8px; border-radius:var(--r-pill); background:#FFF; display:inline-flex; align-items:center; gap:10px; font-size:16px; font-weight:600; }
.bar-who-ic{ width:40px; height:40px; border-radius:50%; background:var(--c-surface-2); display:inline-flex; align-items:center; justify-content:center; font-size:20px; }
.bar-who-change{ color:var(--c-muted); font-weight:500; margin-left:auto; padding-left:8px; }
.bar-who-form{ width:100%; }
@media (max-width:767px){ .bar-who{ width:100%; } }
.bar-progress{ padding:16px 20px; }
.bar-progress-in{ display:flex; align-items:center; gap:16px; }
.bar-progress-pose{ width:56px; }
.bar-progress-top{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; font-size:16px; }
@media (min-width:768px){ .bar-progress{ padding:20px 24px; } .bar-progress-pose{ width:64px; } .bar-progress-top{ font-size:18px; } }
.bar-card{ border-radius:var(--r-32); padding:20px; gap:18px; scroll-margin-top:76px; }
@media (min-width:768px){ .bar-card{ padding:28px; gap:22px; } }
.bar-card-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
@media (max-width:767px){ .bar-card-head{ flex-direction:column; } }
.bar-card-name{ font-size:26px; line-height:32px; font-weight:700; }
@media (min-width:768px){ .bar-card-name{ font-size:32px; line-height:40px; } }
.bar-card-prev{ font-size:14px; }
.bar-steppers{ display:grid; gap:16px; }
@media (min-width:768px){ .bar-steppers{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; } }
.bar-rem{ display:flex; align-items:center; gap:12px; }
.bar-rem input{ height:var(--tap-count); flex:1 1 auto; min-width:0; border:0; border-radius:var(--r-24); background:#FFF; box-shadow:inset 0 0 0 2px var(--c-line); padding:0 24px; font-size:32px; font-weight:700; }
.bar-rem span{ font-size:20px; font-weight:600; color:var(--c-muted); }
.bar-frac > button{ height:var(--tap-bar); font-size:16px; }
.bar-total{ border-radius:var(--r-24); padding:16px 20px; display:flex; justify-content:space-between; align-items:center; gap:8px; background:var(--c-bg); }
.bar-total strong{ font-size:16px; } .bar-total small{ font-size:14px; color:var(--c-muted); }
.bar-total-num{ font-size:28px; font-weight:700; white-space:nowrap; font-variant-numeric:tabular-nums; }
.bar-total-num small{ font-size:18px; }
.bar-total[data-tone="success"]{ background:var(--c-success-tint); } .bar-total[data-tone="success"] [data-cmp],.bar-total[data-tone="success"] .bar-total-num{ color:var(--c-success); font-weight:600; }
.bar-total[data-tone="warning"]{ background:var(--c-warning-tint); } .bar-total[data-tone="warning"] [data-cmp],.bar-total[data-tone="warning"] .bar-total-num{ color:var(--c-warning); font-weight:600; }
@media (min-width:768px){ .bar-total-num{ font-size:32px; } .bar-total strong{ font-size:18px; } }
.bar-card-actions{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.bar-submit .ph{ font-size:22px; }
.bar-card.counted{ box-shadow:inset 0 0 0 2px var(--c-success-tint); }
.bar-next{ padding:8px 24px; gap:0; }
.bar-next .card-head{ padding:14px 0 4px; }
.bar-pick{ width:100%; text-align:left; color:inherit; padding:14px 0; }
.bar-pick strong{ font-size:16px; }
.bar-done{ padding:8px 24px; gap:0; }
.bar-done summary{ display:flex; justify-content:space-between; align-items:center; padding:14px 0; cursor:pointer; font-weight:600; list-style:none; }
.bar-done summary::-webkit-details-marker{ display:none; }

/* ---------- นำเข้าจาก Excel ---------- */
.imp-page{ max-width:880px; min-width:0; }
/* FIX-02: ชิปกรองแถว (ทั้งหมด/พร้อม/ต้องแก้/ชื่อซ้ำ) ถูกตัดที่ 375 → ขึ้นบรรทัดใหม่แทนเลื่อน */
.imp-page .chips{ flex-wrap:wrap; overflow:visible; max-width:100%; }
.imp-drop{ display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:8px; min-height:180px; padding:24px; border-radius:var(--r-24); background:var(--c-bg); box-shadow:inset 0 0 0 2px var(--c-line); cursor:pointer; }
.imp-drop .ph{ font-size:44px; color:var(--c-success); }
.imp-drop small{ font-size:13px; color:var(--c-muted); }
.imp-drop.is-over,.imp-drop:hover{ box-shadow:inset 0 0 0 2px var(--c-ink); background:var(--c-surface-2); }
.imp-drop:focus-within{ outline:2px solid var(--c-ink); }
.imp-error{ display:flex; gap:8px; align-items:flex-start; padding:12px 16px; border-radius:var(--r-16); background:var(--c-danger-tint); color:var(--c-danger); font-size:14px; font-weight:600; }
.imp-error .ph{ font-size:18px; margin-top:1px; }
.imp-stats{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--s-3); }
.imp-bulk{ display:flex; gap:var(--s-2); align-items:center; flex-wrap:wrap; }
.imp-rows{ list-style:none; }
.imp-row{ padding:12px 0 12px 14px; display:flex; flex-direction:column; gap:4px; box-shadow:inset 4px 0 0 var(--c-success); }
.imp-row.imp-bad{ box-shadow:inset 4px 0 0 var(--c-danger); }
.imp-row.imp-dup{ box-shadow:inset 4px 0 0 var(--c-warning); }
.imp-row-top{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.imp-line{ font-size:12px; color:var(--c-muted); min-width:52px; text-align:left; }
.imp-row-sub{ font-size:13px; line-height:18px; color:var(--c-ink-2); }
.imp-reasons{ font-size:13px; line-height:18px; padding-left:18px; color:var(--c-ink-2); }
.imp-choice{ max-width:340px; }
.imp-none{ padding:16px 0; }
.imp-actions{ display:grid; gap:var(--s-2); }
@media (min-width:768px){ .imp-actions{ grid-template-columns:2fr 1fr; } }

/* ---------- 9c) ของเตรียม (P0-2b · ใช้ components ส่วนที่ 4) ---------- */
.prep-row{ display:flex; gap:12px; align-items:center; padding:12px 0; }
/* Redesign ข้อ 3 (24 พ.ย.): ดึงของเตรียมจากเบสในหน้าสูตร (กรอกครั้งเดียว)
   รอบ 2: การ์ด "รอดึง" หน้าตาต่างจาก "ที่ใช้อยู่" ชัดเจน (พื้นฟ้าอ่อน เส้นขอบฟ้า แถวเป็นกล่องขาว ป้ายจำนวน) */
.prep-from{ background:var(--c-info-tint); box-shadow:inset 0 0 0 1.5px rgba(29,95,209,.35); border:0; }
.prep-from .card-head h3{ display:flex; align-items:center; gap:6px; color:var(--c-info); }
.prep-from-count{ font-size:13px; font-weight:700; padding:4px 10px; border-radius:var(--r-pill); background:#FFF; color:var(--c-info); }
.prep-from-lead{ font-size:14px; line-height:20px; color:var(--c-ink-2); }
.prep-from .rows{ border-top:0; }
.prep-from-row{ background:#FFF; border-radius:var(--r-16); padding:10px 12px; margin-top:8px; border-bottom:0 !important; flex-wrap:wrap; }
.prep-from-acts{ display:flex; gap:6px; flex:0 0 auto; margin-left:auto; }
.prep-from-toggle{ align-self:flex-start; color:var(--c-info); }
/* เลิกใช้แล้ว: ลิงก์เล็กท้ายหน้า ไม่แย่งที่ */
.prep-old{ display:flex; flex-direction:column; gap:6px; padding:0 4px; }
.prep-old-toggle{ align-self:flex-start; display:inline-flex; align-items:center; gap:4px; font-size:14px; color:var(--c-muted); padding:8px 0; min-height:44px; }
/* ปุ่มของเตรียม (หัวหน้าสต๊อก) ให้เด่นขึ้น: พื้นขาว ขอบ + ไอคอนสีกลุ่มสต๊อก */
.stk-prep-btn{ box-shadow:inset 0 0 0 1.5px var(--c-line); font-weight:700; }
.stk-prep-btn .ph{ color:var(--g-stock); font-size:20px; }
.prep-from-note{ gap:6px; }
.prep-from-note > strong{ display:flex; align-items:center; gap:6px; color:var(--c-info); }
.prep-from-note > span{ font-size:14px; color:var(--c-ink-2); }
.prep-from-miss{ display:flex; flex-direction:column; gap:4px; margin-top:4px; font-size:14px; }
.prep-from-miss ul{ margin:0; padding-left:20px; color:var(--c-ink-2); }
.prep-ings{ gap:var(--s-2); }
/* ฟอร์มของเตรียม v2: ตาราง วัตถุดิบ | ใช้เท่าไร | ต้นทุน | ลบ (หัวตารางครั้งเดียว) */
.prep-ing{ display:grid; grid-template-columns:minmax(0,1fr) 150px 88px 44px; gap:8px; align-items:center; }
.prep-ing .fld-box{ min-width:0; }
.prep-ing .fld-box > select, .prep-ing .fld-box > input{ min-width:0; width:100%; }
.prep-ing-head{ font-size:13px; font-weight:600; color:var(--c-muted); margin-bottom:-6px; }
.prep-ing-head span:nth-child(3), .prep-ing-cost{ text-align:right; }
.prep-ing-cost{ font-size:14px; color:var(--c-ink-2); }
.prep-ing-del{ min-height:44px; }
.prep-unit-pick{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.prep-unit-own{ flex:1 1 160px; max-width:220px; }
.prep-yield{ margin:-4px 0 0; font-size:14px; color:var(--c-ink-2); }
.prep-yield strong{ color:var(--c-ink); }
@media (max-width:600px){
  .prep-ing-head{ display:none; }
  .prep-ing{ grid-template-columns:minmax(0,1fr) auto 44px; padding-bottom:8px; border-bottom:1px solid var(--c-line); }
  .prep-ing > .fld-box:first-child, .prep-ing > .combo:first-child{ grid-column:1 / 3; }
  .prep-ing-del{ grid-row:1; grid-column:3; }
  .prep-ing > .fld-box:nth-child(2){ grid-column:1; }
  .prep-ing-cost{ grid-column:2 / 4; }
  .prep-unit-own{ max-width:none; }
}
.ws-pick-prep{ display:flex; flex-direction:column; gap:4px; box-shadow:inset 4px 0 0 var(--c-mod-goods, #7A4A2A); }
.ws-pick-prep small{ font-size:13px; font-weight:500; color:var(--c-muted); }
.prep-quick{ margin:8px 0; }
.mod-stockr .prep-qty-input{ width:120px; }
.prep-quick button{ min-height:56px; }
.prep-ded{ list-style:none; display:grid; gap:6px; margin:4px 0 8px; }
.prep-ded li{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:0 12px; padding:10px 14px; border-radius:var(--r-16); background:var(--c-surface); }
.prep-ded small{ grid-column:1 / -1; font-size:13px; color:var(--c-muted); }
.lg-row-prep .lg-main small.t-muted{ font-size:13px; }

/* ---------- 9d) ฟอร์มวัตถุดิบรอบใหม่ (การ์ด 4 ขั้น · ขนาดบรรจุแบบตาราง · หมวด/ที่เก็บแบบเลือก · ปุ่มบันทึกติดจอ) ---------- */
.frm{ display:grid; gap:var(--s-3); padding-bottom:96px; }
.frm .page-head{ margin-bottom:0; }
.frm-card{ display:grid; gap:14px; }
.frm-card .fld{ margin-bottom:0; }
/* การ์ดเป็นสีขาว → ช่องกรอก/ชิป ใช้สีพื้นหลังหน้า ให้เห็นขอบชัด */
.frm .frm-card .fld-box, .frm .frm-card .chip, .frm .frm-card .frm-switch{ background:var(--c-bg); }
.frm .frm-card .chip[aria-pressed="true"], .frm .frm-radio .chip:has(input:checked){ background:var(--c-ink); color:#FFF; }
.frm-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.frm-head h2{ font-size:18px; line-height:24px; font-weight:700; margin:0; }
.frm-no{ width:28px; height:28px; border-radius:50%; display:inline-grid; place-items:center; flex:none;
  background:#7A4A2A; color:#FFF; font-size:14px; font-weight:700; }          /* สีกลุ่ม ของ & สูตร */
.frm-later{ font-size:12px; font-weight:600; color:var(--c-muted); background:var(--c-bg); border-radius:var(--r-pill); padding:2px 10px; }
.frm-lead{ font-size:14px; color:var(--c-ink-2); margin:-4px 0 0; }
.frm-lead .ph{ vertical-align:-2px; }
.frm-row-name{ grid-template-columns:minmax(0,2fr) minmax(0,1fr); }
.frm-radio{ flex-wrap:wrap; }
.frm-radio .chip{ display:inline-flex; align-items:center; cursor:pointer; }
.frm-radio .chip input{ position:absolute; opacity:0; pointer-events:none; }
.frm-radio .chip:has(input:focus-visible){ outline:2px solid var(--c-info); outline-offset:2px; }
.frm-switch{ display:flex; gap:12px; align-items:center; padding:12px 14px; border-radius:var(--r-16); cursor:pointer; }
.frm-switch input{ position:absolute; opacity:0; pointer-events:none; }
.frm-switch-ui{ width:48px; height:28px; border-radius:14px; background:rgba(35,31,32,.2); position:relative; flex:none; transition:background .15s; }
.frm-switch-ui::after{ content:''; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:#FFF; transition:transform .15s; }
.frm-switch input:checked + .frm-switch-ui{ background:var(--c-success); }
.frm-switch input:checked + .frm-switch-ui::after{ transform:translateX(20px); }
.frm-switch input:focus-visible + .frm-switch-ui{ outline:2px solid var(--c-info); outline-offset:2px; }
.frm-switch > span:last-child{ display:flex; flex-direction:column; }
.frm-switch small{ font-size:13px; color:var(--c-muted); }
/* หมวด / ที่เก็บ */
.frm-pick{ flex-wrap:wrap; }
.frm .frm-card .frm-pick-new{ background:transparent; box-shadow:inset 0 0 0 1.5px rgba(35,31,32,.25); color:var(--c-ink-2); }
.frm-pick-add{ display:flex; gap:8px; align-items:center; margin-top:8px; }
.frm-pick-add .fld-box{ flex:1 1 auto; max-width:320px; }
.frm-pick-warn{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:8px; padding:10px 12px; border-radius:var(--r-16);
  background:var(--c-warning-tint); color:var(--c-warning); font-size:14px; font-weight:600; }
.frm .frm-card .frm-pick-warn .chip{ background:#FFF; color:var(--c-ink); }
.frm-more summary{ cursor:pointer; list-style:none; font-size:14px; font-weight:600; color:var(--c-ink-2); }
.frm-more summary::-webkit-details-marker{ display:none; }
.frm-more summary::before{ content:'▸'; display:inline-block; margin-right:6px; transition:transform .15s; }
.frm-more[open] summary::before{ transform:rotate(90deg); }
.frm-more summary small{ font-size:13px; font-weight:500; color:var(--c-muted); }
.frm-more[open] > .fld{ margin-top:10px; }
/* ขนาดบรรจุ: ตาราง หัวคอลัมน์ครั้งเดียว · แถวหลัก (★) มีแถบสีกลุ่มด้านซ้าย */
.frm-packs{ display:grid; gap:8px; }
.frm-pack-head, .frm-pack-grid{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr) 52px 44px; gap:8px; align-items:center; }
.frm-pack-head.is-single, .frm-pack-list.is-single .frm-pack-grid{ grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr); }
.frm-pack-head.is-single > span:nth-child(n+4), .frm-pack-list.is-single .frm-c-star, .frm-pack-list.is-single .frm-c-del{ display:none; }
.frm-pack-head{ padding:0 12px; font-size:12px; font-weight:600; color:var(--c-muted); }
.frm-pack-head > span:nth-child(2){ padding-left:20px; }
.frm-pack-head .ph{ vertical-align:-1px; color:var(--c-info); }
.frm-pack-list{ display:grid; gap:8px; }
.frm-pack{ padding:10px 12px; border-radius:var(--r-16); background:var(--c-bg); box-shadow:inset 4px 0 0 transparent; }
.frm-pack.is-main{ box-shadow:inset 4px 0 0 #7A4A2A; background:#F3EBE4; }
.frm .frm-card .frm-pack .fld-box{ background:#FFF; }
.frm-cell{ display:flex; align-items:center; gap:6px; min-width:0; }
.frm-cell .fld-box{ flex:1 1 auto; min-width:0; }
.frm-pack-one, .frm-eq{ font-size:16px; font-weight:700; color:var(--c-muted); width:14px; text-align:center; flex:none; }
.frm-star{ justify-content:center; cursor:pointer; }
.frm-star input{ position:absolute; opacity:0; pointer-events:none; }
.frm-star-ui{ width:44px; height:44px; border-radius:50%; display:grid; place-items:center; font-size:22px; line-height:1; color:rgba(35,31,32,.3); background:#FFF; }
.frm-star-ui::before{ content:'☆'; }
.frm-star input:checked + .frm-star-ui{ background:#7A4A2A; color:#FFF; }
.frm-star input:checked + .frm-star-ui::before{ content:'★'; }
.frm-star input:focus-visible + .frm-star-ui{ outline:2px solid var(--c-info); outline-offset:2px; }
.frm-pack-del{ min-height:44px; width:44px; padding:0; color:var(--c-muted); }
.frm-say{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:6px 0 0 20px; font-size:13px; color:var(--c-ink-2); }
.frm-main-tag{ display:none; font-size:12px; font-weight:700; color:#7A4A2A; }
.frm-pack.is-main .frm-main-tag{ display:inline; }
.frm-add{ justify-self:start; }
.frm-add small{ font-weight:500; color:var(--c-muted); margin-left:4px; }
.frm-sum{ font-size:13px; color:var(--c-muted); margin:0; }
/* ตัวอย่างในช่องให้จางพอให้รู้ว่ายังไม่ได้กรอก */
.frm input::placeholder{ color:rgba(107,100,104,.5); font-style:normal; }
/* กล่องต้นทุนต่อหน่วย (แบบเดิมของผู้ใช้: หลอดไฟ + ตัวเลขเด่น) */
.frm-cost{ display:flex; gap:8px; align-items:flex-start; margin:0; padding:8px 12px; border-radius:var(--r-16);
  background:var(--c-warning-tint); color:var(--c-ink); font-size:14px; line-height:20px; }
.frm-cost > .ph{ font-size:18px; color:var(--c-warning); margin-top:1px; flex:none; }
.frm-cost-text{ min-width:0; }                                  /* ข้อความไหลต่อกันเป็นบรรทัดเดียว */
.frm-cost strong{ font-size:16px; color:var(--c-warning); margin-left:4px; }
.frm-cost small{ display:block; font-size:13px; color:var(--c-ink-2); }
.frm-cost.is-empty{ background:none; padding:0 2px; color:var(--c-muted); font-size:13px; }
.frm-cost.is-empty > .ph{ font-size:16px; color:var(--c-muted); }
.frm-private{ display:grid; gap:10px; padding:12px; border-radius:var(--r-16); background:var(--c-info-tint); }
.frm .frm-card .frm-private .fld-box{ background:#FFF; }
.frm-lock{ display:inline-flex; gap:6px; align-items:center; font-size:13px; font-weight:600; color:var(--c-info); }
.frm-grid-3{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px; }
/* FIX-02: ช่องกรอกมีความกว้างขั้นต่ำของเบราว์เซอร์ ดันการ์ดล้นจอ 375 → ให้หดได้ */
.frm .fld, .frm .fld-box, .frm .fld-box > input, .frm .frm-pick-add > *{ min-width:0; }
.frm .fld-box > input{ width:100%; }
@media (max-width:480px){ .frm .frm-pick-add{ flex-wrap:wrap; } .frm .frm-pick-add > input, .frm .frm-pick-add > .fld-box{ flex:1 1 100%; } }
.frm-qty .fld-box{ max-width:320px; }
/* เลิกใช้วัตถุดิบ: ปุ่มเต็มความกว้าง สีแดงอ่อน + ตัวหนา ให้เห็นว่าเป็นการกระทำที่ต้องระวัง */
.frm-archive{ justify-self:stretch; width:100%; min-height:52px; margin-top:8px; background:var(--c-danger-tint); color:var(--c-danger); font-weight:700; box-shadow:inset 0 0 0 2px var(--c-danger); }
.frm-archive:hover{ background:#FAD4D6; }
.frm-archive[data-confirm="1"]{ background:var(--c-danger); color:#FFF; box-shadow:none; }
/* แผงรายละเอียดบน PC: พื้นขาวอ่านง่าย คาดแถบสีสถานะด้านบน + กล่องข้อมูลแยกส่วนชัด */
.stk-detail{ background:#FFF; box-shadow:0 2px 12px rgba(35,31,32,.06), inset 0 0 0 1px var(--c-line); gap:14px; position:relative; overflow:hidden; }
.stk-detail[data-tone]::before{ content:''; position:absolute; top:0; left:0; right:0; height:4px; background:var(--c-line); }
.stk-detail[data-tone="danger"]::before{ background:var(--c-danger); }
.stk-detail[data-tone="warning"]::before{ background:var(--c-warning-fill); }
.stk-detail[data-tone="success"]::before{ background:var(--c-success); }
.stk-det-hero{ background:var(--c-bg); border-radius:var(--r-16); padding:12px 14px; display:flex; flex-direction:column; gap:4px; }
.stk-detail[data-tone="danger"] .stk-det-hero{ background:var(--c-danger-tint); }
.stk-detail[data-tone="warning"] .stk-det-hero{ background:var(--c-warning-tint); }
.stk-detail[data-tone="success"] .stk-det-hero{ background:var(--c-success-tint); }
.stk-detail[data-tone="danger"] .stk-det-hero .badge:not(.badge-solid),
.stk-detail[data-tone="warning"] .stk-det-hero .badge:not(.badge-solid),
.stk-detail[data-tone="success"] .stk-det-hero .badge:not(.badge-solid){ background:rgba(255,255,255,.88); }
.stk-det-sec{ background:var(--c-bg); border-radius:var(--r-16); padding:12px 14px; display:flex; flex-direction:column; gap:8px; }
.stk-det-sec-head{ font-size:12px; font-weight:700; color:var(--c-muted); letter-spacing:.2px; }
.stk-det-kpis{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.stk-det-kpi{ background:#FFF; border:1px solid var(--c-line); border-radius:12px; padding:10px 12px; display:flex; flex-direction:column; gap:2px; min-width:0; }
.stk-det-kpi span{ font-size:12px; color:var(--c-muted); }
.stk-det-kpi strong{ font-size:18px; line-height:24px; font-weight:700; color:var(--c-ink); }
.stk-det-kpi small{ font-size:11px; color:var(--c-muted); }
.stk-det-sec .kv{ padding:6px 0; border-top:1px solid rgba(35,31,32,.07); }
.stk-det-sec .kv:first-child{ border-top:0; padding-top:0; }
.stk-det-sec .kv:last-child{ padding-bottom:0; }
.stk-det-sec .row{ padding:8px 0; }
.stk-det-sec .row:first-child{ padding-top:0; }
.stk-det-sec .row:last-child{ padding-bottom:0; }
/* Toast ตามผลลัพธ์: เขียว = สำเร็จ, ส้ม = ต้องทำอะไรเพิ่ม, แดง = ไม่สำเร็จ (มีสัญลักษณ์ ✓ ! ✕ กำกับ ไม่พึ่งสีอย่างเดียว) */
.toast[data-tone="success"]{ background:var(--c-success); }
.toast[data-tone="warning"]{ background:var(--c-warning); }
.toast[data-tone="danger"]{ background:var(--c-danger); }
.toast[data-tone]:not(.has-action)::before{ font-weight:800; font-size:16px; }
.toast[data-tone="success"]:not(.has-action)::before{ content:'✓'; }
.toast[data-tone="warning"]:not(.has-action)::before{ content:'!'; }
.toast[data-tone="danger"]:not(.has-action)::before{ content:'✕'; }
.frm-bar{ position:sticky; bottom:0; z-index:20; display:grid; grid-template-columns:1fr 2fr; gap:8px;
  padding:12px 0 calc(12px + env(safe-area-inset-bottom)); background:linear-gradient(to top, var(--c-bg) 75%, rgba(244,241,238,0)); }
.frm-bar .btn{ min-height:52px; }
@media (max-width:767px){ .frm-bar{ bottom:calc(var(--dock-h, 72px) + 8px); } }
/* FIX-03: ฟอร์มเต็มหน้าบนมือถือ ซ่อน Dock · แถบบันทึกติดขอบล่างแถบเดียว */
@media (max-width:767px){
  body[data-modal-page="true"] .appnav{ display:none; }
  body[data-modal-page="true"][data-auth="ready"]{ padding-bottom:0; }
  body[data-modal-page="true"] .frm{ padding-bottom:0; }
  body[data-modal-page="true"] main{ padding-bottom:0 !important; }
  body[data-modal-page="true"] .frm-bar{ bottom:0; background:#FFF; border-top:1px solid var(--c-line); box-shadow:0 0 0 100vmax #FFF; clip-path:inset(0 -100vmax); }
}
@media (max-width:600px){
  .frm-row-name, .frm-grid-3{ grid-template-columns:1fr; }
  .frm-grid-3{ grid-template-columns:1fr 1fr; } .frm-grid-3 .fld:first-child{ grid-column:1 / -1; }
  .frm-pack-head{ display:none; }
  .frm-pack-grid{ grid-template-columns:minmax(0,1fr) 44px; }
  .frm-pack-list.is-single .frm-pack-grid{ grid-template-columns:minmax(0,1fr); }
  /* มือถือ: แถว 1 = ชื่อ + ลบ · แถว 2 = ได้เท่าไร · แถว 3 = ราคา · แถว 4 = ป้ายดาว ★ มีคำกำกับ (FIX-08 / VD-02) */
  .frm-c-name{ grid-column:1; grid-row:1; }
  .frm-c-del{ grid-column:2; grid-row:1; }
  .frm-c-yield{ grid-column:1 / -1; grid-row:2; }
  .frm-c-price{ grid-column:1 / -1; grid-row:3; }
  .frm-c-star{ grid-column:1 / -1; grid-row:4; justify-content:flex-start; }
  .frm-star-ui{ width:auto; height:36px; padding:0 14px; border-radius:var(--r-pill); font-size:13px; font-weight:700; color:var(--c-ink-2); }
  .frm-star-ui::before{ content:'☆ ตั้งเป็นซื้อบ่อยสุด'; }
  .frm-star input:checked + .frm-star-ui::before{ content:'★ ซื้อบ่อยสุด (ใช้คิดทุน)'; }
  .frm-c-price::before{ content:'ราคา'; width:14px; flex:none; font-size:0; }   /* เว้นระยะให้ตรงช่องปริมาณ */
  .frm-pack-list.is-single .frm-c-name{ grid-column:1 / -1; }
}

/* ---------- 10) ลดการเคลื่อนไหว ---------- */
@media (prefers-reduced-motion: reduce){
  .thud, .mod-loading .pose, .skel{ animation:none !important; }
  .stamp.go{ animation:stamp-fade 1200ms linear forwards !important; }
  @keyframes stamp-fade{ 0%,85%{opacity:.95} 100%{opacity:0} }
}


/* 22 พ.ย. ค้นหาในตัวเลือกรายการ + สลับ สั่งรอส่ง / ซื้อมาแล้ว */
.ops-search{ display:flex; align-items:center; gap:8px; padding:0 14px; min-height:48px; border-radius:var(--r-16); background:#FFF; box-shadow:inset 0 0 0 1px var(--c-line); }
.ops-search:focus-within{ box-shadow:inset 0 0 0 2px var(--c-ink); }
.ops-search > .ph{ font-size:18px; color:var(--c-muted); flex:none; }
.ops-search input{ flex:1; min-width:0; border:0; background:none; font:inherit; font-size:16px; color:var(--c-ink); outline:none; }
.ws-grid > .pair-empty{ grid-column:1 / -1; }
.rx-mode{ margin-bottom:6px; padding:5px; gap:6px; background:var(--c-surface); border:1.5px solid var(--c-line); box-shadow:0 2px 8px rgba(35,31,32,.06); }
.rx-mode > button{ display:inline-flex; align-items:center; justify-content:center; gap:6px; color:var(--c-ink-2); font-weight:700; transition:background var(--t-ui) ease, color var(--t-ui) ease; }
.rx-mode > button:not([aria-pressed="true"]):hover{ background:var(--c-bg); color:var(--c-ink); }
.rx-mode > button[data-rx-mode="order"][aria-pressed="true"]{ background:var(--c-info); color:#FFF; box-shadow:0 2px 6px rgba(29,95,209,.28); }
.rx-mode > button[data-rx-mode="now"][aria-pressed="true"]{ background:var(--c-success); color:#FFF; box-shadow:0 2px 6px rgba(23,121,74,.28); }
.tip-box{ border-radius:var(--r-16); background:var(--c-info-tint); border:1px solid rgba(29,95,209,.16); padding:10px 14px; font-size:14px; color:var(--c-ink-2); }
.tip-box > summary{ list-style:none; display:flex; align-items:center; gap:8px; cursor:pointer; font-weight:600; color:var(--c-ink); }
.tip-box > summary::-webkit-details-marker{ display:none; }
.tip-box > summary > .ph{ color:var(--c-info); flex:none; font-size:18px; }
.tip-box > summary > .tip-toggle{ margin-left:auto; font-size:12px; font-weight:600; color:var(--c-info); white-space:nowrap; }
.tip-box[open] > summary > .tip-toggle::before{ content:'ซ่อน'; }
.tip-box:not([open]) > summary > .tip-toggle::before{ content:'ดูตัวอย่าง'; }
.tip-body{ margin-top:8px; padding-top:8px; border-top:1px solid rgba(29,95,209,.14); display:flex; flex-direction:column; gap:4px; font-size:13px; line-height:1.55; }

/* Inline Searchable Combobox (ของเตรียม + ตัวกรองประวัติ) + Show more (300+ รายการ) */
.combo{ position:relative; min-width:0; }
.combo-box{ display:flex; align-items:center; gap:4px; width:100%; }
.combo-box > input{ flex:1; min-width:0; }
.combo-clear{ flex:none; display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; margin-right:-4px; border:0; border-radius:var(--r-pill); background:transparent; color:var(--c-muted); cursor:pointer; }
.combo-clear:hover{ background:var(--c-bg); color:var(--c-ink); }
.combo-list{ position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:40; max-height:320px; overflow-y:auto; padding:6px; border-radius:var(--r-16); background:#FFF; box-shadow:0 10px 28px rgba(24,24,27,.14), 0 0 0 1px var(--c-line); display:flex; flex-direction:column; gap:2px; }
.combo-list[hidden]{ display:none; }
.combo-tabs{ position:sticky; top:-6px; z-index:2; background:#FFF; display:flex; flex-wrap:wrap; gap:4px; padding:6px 4px 8px; margin:-2px 0 4px; border-bottom:1px solid var(--c-line); }
.combo-tab{ min-height:30px; padding:0 10px; border-radius:var(--r-pill); border:1px solid var(--c-line); background:var(--c-bg); color:var(--c-ink-2); font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; }
.combo-tab:hover{ background:var(--c-surface-2); color:var(--c-ink); }
.combo-tab[aria-pressed="true"]{ background:var(--c-ink); border-color:var(--c-ink); color:#FFF; }
.combo-group{ display:flex; flex-direction:column; gap:2px; }
.combo-group-head{ display:flex; align-items:center; gap:6px; padding:8px 10px 4px; font-size:12px; font-weight:700; color:var(--g-stock); }
.combo-group-head .ph{ font-size:15px; }
.combo-group-cnt{ margin-left:auto; padding:1px 7px; border-radius:var(--r-pill); background:var(--c-bg); color:var(--c-muted); font-size:11px; font-weight:700; }
.combo-opt{ display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:44px; padding:8px 12px; border:0; border-radius:12px; background:transparent; font:inherit; font-size:15px; color:var(--c-ink); text-align:left; cursor:pointer; }
.combo-opt:hover, .combo-opt:focus-visible{ background:var(--c-bg); outline:none; }
.combo-opt[aria-selected="true"]{ background:var(--c-surface); font-weight:700; }
.combo-opt small{ font-size:11px; font-weight:600; white-space:nowrap; padding:2px 8px; border-radius:var(--r-pill); background:var(--c-bg); color:var(--c-muted); }
.combo-opt small.combo-tag-sub{ background:#F3EBE4; color:#7A4A2A; }
.combo-opt small.combo-tag-raw{ background:var(--c-success-tint); color:var(--c-success); }
.combo-opt small.combo-tag-pack{ background:var(--c-warning-tint); color:var(--c-warning); }
.combo-opt small.combo-tag-menu{ background:var(--c-info-tint); color:var(--c-info); }
.combo-opt strong{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.combo-empty, .combo-more{ margin:0; padding:10px 12px; font-size:13px; color:var(--c-muted); text-align:center; }
.lg-filters .combo{ min-width:0; }
.lg-filters .combo-list{ min-width:240px; }
.list-more{ margin-top:10px; width:100%; }

/* Step 15a: สูตรอาหาร (Recipr) + ใบสูตร SOP + พิมพ์ PDF */
.mod-recipr .fld-box{ border:1px solid var(--c-line); border-radius:var(--r-16); background:var(--c-bg); }
.mod-recipr .fld-box:focus-within{ background:#FFF; border-color:var(--c-ink); }
.mod-recipr textarea{ width:100%; padding:10px 12px; border:0; background:none; resize:vertical; font:inherit; color:var(--c-ink); outline:none; }
.rcp-hero{ gap:14px; padding:22px; }
.rcp-hero-head{ display:flex; justify-content:space-between; align-items:center; gap:12px; }
.rcp-hero-head .hero-pose{ width:64px; }
.rcp-hero-sub{ margin:2px 0 0; font-size:15px; color:var(--on-ink-muted); font-weight:500; }
.rcp-hero-sub strong{ color:var(--on-ink); }
.rcp-hero-chs{ display:grid; grid-template-columns:1fr; gap:10px; }
.rcp-hero-ch{ background:var(--on-ink-panel); border-radius:var(--r-16); padding:13px 14px; display:grid; gap:6px; min-width:0; }
.rcp-hero-ch-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.rcp-hero-ch-lbl{ display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--on-ink-muted); }
.rcp-hero-pill{ font-size:11px; font-weight:700; padding:3px 9px; border-radius:var(--r-pill); background:rgba(255,255,255,.10); color:var(--on-ink); white-space:nowrap; }
.rcp-hero-ch[data-tone="success"] .rcp-hero-pill{ background:rgba(52,199,89,.20); color:var(--on-ink-success); }
.rcp-hero-ch[data-tone="warning"] .rcp-hero-pill{ background:rgba(255,159,10,.22); color:var(--on-ink-warning); }
.rcp-hero-ch[data-tone="danger"]  .rcp-hero-pill{ background:rgba(255,69,58,.24); color:var(--on-ink-danger); }
.rcp-hero-ch-val{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.rcp-hero-gp{ font-size:26px; line-height:30px; font-weight:700; color:var(--on-ink); }
.rcp-hero-ch[data-tone="success"] .rcp-hero-gp{ color:var(--on-ink-success); }
.rcp-hero-ch[data-tone="warning"] .rcp-hero-gp{ color:var(--on-ink-warning); }
.rcp-hero-ch[data-tone="danger"]  .rcp-hero-gp{ color:var(--on-ink-danger); }
.rcp-hero-amt{ font-size:14px; font-weight:600; color:var(--on-ink); white-space:nowrap; }
.rcp-hero-ch-meta{ font-size:12px; color:var(--on-ink-muted); }
.rcp-hero-foot{ display:flex; justify-content:space-between; align-items:center; gap:8px; padding-top:8px; border-top:1px solid var(--on-ink-line); font-size:13px; color:var(--on-ink-muted); }
.rcp-hero-foot strong{ color:var(--on-ink); font-weight:600; }
@media (min-width:768px) and (max-width:1099px){ .rcp-hero-chs{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.rcp-gp-row{ display:flex; flex-wrap:wrap; gap:12px 16px; align-items:flex-end; }
.rcp-gp-input{ width:148px; flex:none; margin-bottom:0; }
.rcp-sync-head{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; margin-top:4px; }
.rcp-sync-list{ max-height:260px; overflow-y:auto; padding-right:4px; }
.rcp-name-line{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.rcp-table th, .rcp-table td{ vertical-align:middle; white-space:nowrap; }
.rcp-table td:nth-child(2){ white-space:normal; min-width:160px; }
.rcp-th-sort{ font:inherit; font-weight:700; color:var(--c-muted); display:inline-flex; align-items:center; gap:2px; padding:4px 0; cursor:pointer; }
.rcp-th-sort:hover, .rcp-th-sort.is-on{ color:var(--c-ink); }
.rcp-ing-summary{ list-style:none; display:flex; flex-direction:column; gap:6px; margin:0; padding:0; font-size:14px; }
.rcp-ing-summary li{ display:grid; grid-template-columns:1fr auto auto; gap:10px; align-items:baseline; padding:4px 0; border-bottom:1px solid var(--c-bg); }
.rcp-det-acts, .rcp-row-acts{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.rcp-detail{ background:#FFF; box-shadow:0 2px 10px rgba(35,31,32,.05), inset 0 0 0 1px var(--c-line); gap:14px; }
.rcp-det-sec{ background:var(--c-bg); border-radius:var(--r-16); padding:12px 14px; display:flex; flex-direction:column; gap:8px; }
.rcp-det-sec-head{ display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px; font-weight:700; color:var(--c-muted); letter-spacing:.2px; }
.rcp-det-channels{ display:grid; grid-template-columns:1fr; gap:8px; }
.rcp-det-ch{ background:#FFF; border:1px solid var(--c-line); border-radius:12px; padding:10px 12px; display:flex; flex-direction:column; gap:6px; }
.rcp-det-ch-lbl{ font-size:12px; color:var(--c-muted); }
.rcp-det-ch-row{ display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.rcp-det-ch-row strong{ font-size:20px; line-height:24px; font-weight:700; }
.rcp-det-kvs{ display:flex; flex-direction:column; }
.rcp-det-kvs .kv{ padding:6px 0; border-top:1px solid rgba(35,31,32,.07); }
.rcp-det-kvs .kv:first-child{ border-top:0; padding-top:0; }
.rcp-det-kvs .rcp-det-total{ border-top:1.5px solid rgba(35,31,32,.16); padding-top:8px; margin-top:2px; font-weight:700; }
.rcp-det-kvs .rcp-det-total > span:first-child{ color:var(--c-ink); }
.rcp-detail .rcp-ing-summary li{ padding:6px 0; border-bottom:1px solid rgba(35,31,32,.07); }
.rcp-detail .rcp-ing-summary li:last-child{ border-bottom:0; padding-bottom:0; }
.rcp-det-sw{ font-size:13px; }
.rcp-det-sw th, .rcp-det-sw td{ padding:6px 6px; white-space:nowrap; }
.rcp-det-sw td:first-child{ white-space:normal; min-width:110px; }
/* Redesign ข้อ 1 (24 พ.ย.): การ์ดเมนูเรียบง่าย สูงพอดีเนื้อหา
   เดิม .rcp-mcard-main มี flex:1 1 240px ในการ์ดแนวตั้ง → basis ไปเป็น "ความสูง" 240px = ที่ว่างกลางการ์ด */
.rcp-mcard-list{ display:flex; flex-direction:column; gap:10px; }
.rcp-mcard{ display:flex; flex-direction:column; gap:10px; padding:14px; border-radius:var(--r-16); background:#FFF; border:1px solid var(--c-line); transition:border-color .15s, box-shadow .15s; cursor:pointer; min-width:0; }
.rcp-mcard:hover{ border-color:#C9C2B8; box-shadow:0 2px 8px rgba(35,31,32,.05); }
.rcp-mcard.is-selected{ border-color:var(--c-ink); box-shadow:0 0 0 1px var(--c-ink); background:#FFFEFC; }
.rcp-mcard-head{ display:flex; flex-direction:column; gap:4px; text-align:left; color:inherit; padding:0; min-width:0; width:100%; }
.rcp-mcard-title{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.rcp-mcard-title strong{ font-size:16px; line-height:22px; font-weight:700; color:var(--c-ink); }
.rcp-mtag{ display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:var(--r-pill); font-size:11px; font-weight:600; white-space:nowrap; }
.rcp-mtag .ph{ font-size:12px; }
.rcp-mtag-cat{ background:var(--c-bg); color:var(--c-ink-2); }
.rcp-mtag-deliv{ background:#FFF3E6; color:#9A4D0B; }
.rcp-mcard-sub{ font-size:13px; line-height:18px; color:var(--c-muted); text-align:left; }
.rcp-mcard-foot{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; }
.rcp-mcard-pills{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px; flex:1 1 300px; min-width:0; }
.rcp-pill{ display:flex; flex-direction:column; gap:1px; padding:6px 10px; border-radius:12px; background:var(--c-bg); min-width:0; }
.rcp-pill-lbl{ display:flex; align-items:center; gap:4px; font-size:11px; line-height:15px; color:var(--c-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rcp-pill-lbl b{ color:var(--c-ink); font-weight:700; }
.rcp-pill-lbl .ph{ font-size:12px; }
.rcp-pill-val{ display:flex; flex-wrap:wrap; align-items:baseline; gap:0 6px; font-size:13px; line-height:18px; font-weight:700; text-align:left; }
.rcp-pill-val > span{ white-space:nowrap; }
.rcp-pill-amt{ font-size:12px; font-weight:600; opacity:.85; }
.rcp-pill[data-tone="success"]{ background:var(--c-success-tint); } .rcp-pill[data-tone="success"] .rcp-pill-val{ color:var(--c-success); }
.rcp-pill[data-tone="warning"]{ background:var(--c-warning-tint); } .rcp-pill[data-tone="warning"] .rcp-pill-val{ color:var(--c-warning); }
.rcp-pill[data-tone="danger"]{ background:var(--c-danger-tint); }   .rcp-pill[data-tone="danger"] .rcp-pill-val{ color:var(--c-danger); }
.rcp-pill-off .rcp-pill-val{ color:var(--c-muted); font-weight:600; }
.rcp-mcard-acts{ display:flex; gap:6px; align-items:center; flex:0 0 auto; margin-left:auto; }
.rcp-mcard-btn{ min-height:36px; padding:4px 12px; font-size:13px; gap:4px; border-radius:10px; }
.rcp-mcard-btn .ph{ font-size:15px; }
.rcp-mcard-sop{ background:#FFF6DC; color:#7A5100; border:1px solid #F0D999; }
.rcp-mcard-sop:hover{ background:#FDECB8; }

/* ป๊อปอัพรายละเอียดเมนู (แท็บเล็ต/มือถือ): การ์ดลอยลงจากด้านบน · หน้าหลังไม่เลื่อน */
body[data-pop-open]{ overflow:hidden; }
.rcp-pop{ position:fixed; inset:0; z-index:45; display:flex; justify-content:center; align-items:flex-start;
  padding:calc(12px + env(safe-area-inset-top)) 12px 12px; }
.rcp-pop-scrim{ position:absolute; inset:0; background:rgba(35,31,32,.5); border:0; padding:0; cursor:default; animation:rcpFade .18s ease-out; }
.rcp-pop-panel{ position:relative; width:100%; max-width:560px; max-height:calc(100dvh - 24px - env(safe-area-inset-top)); overflow-y:auto; overscroll-behavior:contain;
  border-radius:var(--r-24); box-shadow:var(--shadow-float); animation:rcpDrop .22s var(--ease-out, ease-out); }
.rcp-pop-panel .rcp-detail{ margin:0; border-radius:var(--r-24); }
.rcp-pop-panel .rcp-detail .card-head{ position:sticky; top:0; z-index:1; background:#FFF; margin:calc(-1 * var(--s-5)) calc(-1 * var(--s-5)) 0; padding:var(--s-5) var(--s-5) 8px; border-radius:var(--r-24) var(--r-24) 0 0; }
@media (min-width:768px){ .rcp-pop{ padding-top:32px; } .rcp-pop-panel{ max-height:calc(100dvh - 64px); } }
@keyframes rcpDrop{ from{ transform:translateY(-24px); opacity:0; } to{ transform:none; opacity:1; } }
@keyframes rcpFade{ from{ opacity:0; } to{ opacity:1; } }
/* .rcp-pop คง animation นุ่มๆ ไว้ · ปิดได้ผ่าน html[data-motion="off"] */
.rcp-chk{ display:flex; align-items:center; gap:10px; cursor:pointer; font-size:14px; }
.rcp-chk input[type="checkbox"]{ width:18px; height:18px; accent-color:var(--c-ink); flex:none; }
.rcp-form-danger{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.rcp-sop-sheet{ padding:24px; gap:16px; }
.rcp-sop-sheet h2{ font-size:24px; margin:4px 0; }
.rcp-sop-sheet h3{ font-size:16px; margin-top:8px; }
.rcp-sop-steps{ padding-left:22px; display:flex; flex-direction:column; gap:8px; font-size:15px; line-height:1.6; }
.table-wrap{ width:100%; min-width:0; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.rcp-sw-table{ min-width:440px; }
.rcp-sw-table input{ width:64px; padding:6px 8px; border-radius:var(--r-12, 12px); background:var(--c-bg); border:1px solid var(--c-line); text-align:right; font-variant-numeric:tabular-nums; font-size:14px; }
.rcp-sw-auto{ display:grid; grid-template-columns:1fr; gap:10px; padding:12px; border-radius:var(--r-16); background:var(--c-bg); }
@media (min-width:768px){ .rcp-sw-auto{ grid-template-columns:1fr 120px 1fr auto; align-items:end; } }
.rcp-set-box{ padding:14px; border-radius:var(--r-16); background:var(--c-bg); display:flex; flex-direction:column; gap:8px; }
.rcp-pack-card{ background:#FBF6F1; border:1px solid #E5D4C5; padding:12px 16px; gap:10px; box-shadow:none; }
.rcp-pack-head{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 12px; }
.rcp-pack-title{ display:flex; align-items:center; gap:10px; min-width:0; flex:1 1 220px; }
.rcp-pack-art{ flex:none; display:flex; border-radius:10px; }
.rcp-pack-title-txt{ min-width:0; display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; }
.rcp-pack-title-txt h3{ font-size:15px; line-height:20px; font-weight:700; color:var(--c-ink); }
.rcp-pack-sub{ font-size:12px; color:var(--c-muted); }
.rcp-pack-cta{ background:#FFF; color:#7A4A2A; border:1px solid #D8BFA9; min-height:34px; padding:5px 12px; font-size:13px; }
.rcp-pack-cta:hover{ background:#F3EBE4; border-color:#7A4A2A; }
.rcp-pack-empty{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:8px 12px; border-radius:var(--r-12, 12px); background:#FFF; border:1px dashed #DFCBB8; }
.rcp-pack-flow{ display:inline-flex; flex-wrap:wrap; align-items:center; gap:4px; font-size:12px; color:var(--c-ink-2); }
.rcp-pack-flow > span{ padding:2px 8px; border-radius:var(--r-pill); background:var(--c-bg); font-weight:600; }
.rcp-pack-flow > strong{ padding:2px 8px; border-radius:var(--r-pill); background:var(--c-warning-tint); color:var(--c-warning); }
.rcp-pack-list{ display:flex; flex-direction:column; gap:6px; }
.rcp-pack-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 12px; border-radius:var(--r-12, 12px); background:#FFF; border:1px solid #ECE2D8; min-width:0; }
.rcp-pack-row-main{ min-width:0; flex:1 1 auto; display:flex; flex-direction:column; gap:2px; }
.rcp-pack-row-head{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; font-size:14px; }
.rcp-pack-price{ padding:1px 8px; border-radius:var(--r-pill); background:#F3EBE4; color:#7A4A2A; font-size:13px; font-weight:700; white-space:nowrap; }
.rcp-pack-price small{ font-size:11px; font-weight:600; margin-left:1px; }
.rcp-pack-summary{ font-size:12px; color:var(--c-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rcp-pack-edit{ min-height:32px; padding:4px 10px; font-size:13px; flex:none; }
.rcp-pack-tray{ padding:12px 14px; border-radius:var(--r-16); background:#FBF6F1; border:1.5px solid #E5D4C5; display:flex; flex-direction:column; gap:10px; }
.rcp-pack-tray.is-empty{ border-style:dashed; background:var(--c-bg); border-color:var(--c-line); padding:10px 14px; }
.rcp-pack-tray-head{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; font-size:14px; color:var(--c-ink); }
.rcp-pack-tray-head .ph{ font-size:18px; color:#7A4A2A; flex:none; }
.rcp-pack-tray-sub{ font-size:12px; color:var(--c-muted); margin-left:auto; }
.rcp-pack-btns{ display:flex; flex-wrap:wrap; gap:8px; }
.rcp-pack-btn{ display:inline-flex; flex-direction:column; align-items:flex-start; gap:2px; min-height:44px; max-width:100%; padding:8px 14px; border-radius:14px; background:#FFF; border:1.5px solid #DECBB9; text-align:left; cursor:pointer; transition:border-color .15s, background .15s, transform .06s; }
.rcp-pack-btn:hover{ border-color:#7A4A2A; background:#FFFDF9; }
.rcp-pack-btn:active{ transform:scale(.98); }
.rcp-pack-btn-name{ display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:700; color:var(--c-ink); max-width:100%; }
.rcp-pack-btn-name .ph{ font-size:16px; color:#7A4A2A; flex:none; }
.rcp-pack-btn-meta{ font-size:12px; color:var(--c-muted); font-weight:600; }
.rcp-pack-btn.is-added{ background:var(--c-success-tint); border-color:var(--c-success); }
.rcp-pack-btn.is-added .rcp-pack-btn-name{ color:var(--c-success); }
.rcp-pack-btn.is-added .rcp-pack-btn-name .ph{ color:var(--c-success); }
.rcp-pack-btn.is-added .rcp-pack-btn-meta{ color:var(--c-success); }
/* Step 16: GP & Promo Simulator */
.mod-recipr .rcp-gp-fld-box{ background:#FFF; border:1.5px solid #D1D5DB; border-radius:var(--r-16); display:flex; align-items:center; justify-content:space-between; transition:border-color var(--t-ui), box-shadow var(--t-ui); }
.mod-recipr .rcp-gp-fld-box:focus-within{ background:#FFF; border-color:var(--c-brand); box-shadow:0 0 0 3px rgba(230,57,70,.14); outline:none; }
.mod-recipr .rcp-gp-fld-box input{ text-align:left; font-variant-numeric:tabular-nums; font-weight:600; flex:1 1 auto; min-width:0; }
.mod-recipr .rcp-gp-fld-box .fld-unit{ flex:none; color:var(--c-muted); font-weight:600; }
.rcp-promo-select{ background-color:#FFF; border:1.5px solid #D1D5DB; transition:border-color var(--t-ui), box-shadow var(--t-ui); }
.rcp-promo-select:focus{ outline:none; border-color:var(--c-brand); box-shadow:0 0 0 3px rgba(230,57,70,.14); }
.rcp-eff-pill{ display:inline-flex; align-items:center; gap:6px; min-height:var(--tap); padding:0 14px; border-radius:var(--r-16); background:var(--c-warning-tint); border:1px solid #F0C78E; color:var(--c-warning); font-size:14px; font-weight:600; white-space:nowrap; }
.rcp-eff-pill .ph{ font-size:17px; flex:none; }
.rcp-seg{ display:inline-flex; flex-wrap:wrap; gap:4px; padding:4px; background:var(--c-surface-2); border-radius:var(--r-pill); width:fit-content; max-width:100%; }
.rcp-seg > button{ height:36px; padding:0 16px; border-radius:var(--r-pill); background:transparent; color:var(--c-ink-2); font-size:14px; font-weight:600; white-space:nowrap; transition:background var(--t-ui), color var(--t-ui); }
.rcp-seg > button:hover:not([aria-pressed="true"]){ background:rgba(255,255,255,.65); color:var(--c-ink); }
.rcp-seg > button[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }
.rcp-promo-chips .chip{ background:#FFF; border:1.5px solid #D6D1C4; color:var(--c-ink-2); transition:border-color var(--t-ui), background var(--t-ui), color var(--t-ui); }
.rcp-promo-chips .chip:hover:not([aria-pressed="true"]){ border-color:var(--c-ink-2); color:var(--c-ink); }
.rcp-promo-chips .chip[aria-pressed="true"]{ background:var(--c-ink); border-color:var(--c-ink); color:#FFF; }
.rcp-gp-impact{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; padding:10px 14px; border-radius:var(--r-16); background:var(--c-bg); }
.rcp-gp-badges{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.rcp-promo-grid{ display:grid; grid-template-columns:minmax(0, 1fr); gap:16px; align-items:start; }
@media (min-width:1024px){ .rcp-promo-grid{ grid-template-columns:minmax(0, 1fr) minmax(0, 1.2fr); } }
.rcp-promo-ctrl{ min-width:0; }
.rcp-promo-ctrl .chips{ flex-wrap:wrap; }
.rcp-promo-pair{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.rcp-promo-fld{ max-width:220px; width:100%; }
.rcp-promo-result{ display:flex; flex-direction:column; gap:12px; min-width:0; }
.rcp-promo-cmp{ display:grid; grid-template-columns:minmax(0, 1fr); gap:8px; align-items:stretch; }
@media (min-width:600px){ .rcp-promo-cmp{ grid-template-columns:minmax(0, 1fr) 28px minmax(0, 1fr); gap:8px; } }
.rcp-promo-arrow{ display:flex; align-items:center; justify-content:center; align-self:center; justify-self:center; width:28px; height:28px; border-radius:50%; background:var(--c-bg); border:1px solid var(--c-line); color:var(--c-muted); font-size:14px; }
.rcp-promo-arrow .ph{ font-size:14px; transform:rotate(90deg); }
@media (min-width:600px){ .rcp-promo-arrow .ph{ transform:none; } }
.rcp-promo-box{ background:#FFF; border:1px solid var(--c-line); border-radius:var(--r-16); display:flex; flex-direction:column; min-width:0; overflow:hidden; position:relative; }
.rcp-promo-box.is-base{ background:#FDFCFB; }
.rcp-promo-box.is-promo{ box-shadow:0 3px 12px rgba(35,31,32,.07); }
.rcp-promo-box.is-promo[data-tone="success"]{ border-color:#A5D6BC; }
.rcp-promo-box.is-promo[data-tone="warning"]{ border-color:#F0C78E; }
.rcp-promo-box.is-promo[data-tone="danger"]{ border-color:#ECB0B5; }
.rcp-promo-box-head{ display:flex; flex-wrap:nowrap; justify-content:space-between; align-items:center; gap:8px; min-height:46px; padding:10px 14px; font-size:13px; font-weight:700; color:var(--c-ink); background:#F5F2EE; border-bottom:1px solid var(--c-line); }
.rcp-promo-box.is-promo[data-tone="success"] .rcp-promo-box-head{ background:var(--c-success-tint); border-bottom-color:#CBE8D8; }
.rcp-promo-box.is-promo[data-tone="warning"] .rcp-promo-box-head{ background:var(--c-warning-tint); border-bottom-color:#F5DBBA; }
.rcp-promo-box.is-promo[data-tone="danger"] .rcp-promo-box-head{ background:var(--c-danger-tint); border-bottom-color:#F5CCCF; }
.rcp-promo-box.is-promo .rcp-promo-box-head .badge:not(.badge-solid){ background:#FFF; box-shadow:inset 0 0 0 1px rgba(35,31,32,.08); }
.rcp-promo-box-head .badge{ flex:none; }
.rcp-promo-box-title{ display:inline-flex; flex-wrap:nowrap; align-items:center; gap:6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.rcp-promo-disc{ padding:1px 7px; border-radius:var(--r-pill); background:rgba(35,31,32,.08); color:var(--c-ink); font-size:11px; font-weight:700; white-space:nowrap; flex:none; }
.rcp-promo-box-body{ padding:10px 14px; flex:1 1 auto; }
.rcp-promo-box-body .kv:last-child{ padding-bottom:0; }
.rcp-promo-foot{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding:10px 14px; border-top:1px solid var(--c-line); background:#F8F6F3; }
.rcp-promo-box.is-promo[data-tone="success"] .rcp-promo-foot{ background:#F3FBF6; border-top-color:#D7EFE1; }
.rcp-promo-box.is-promo[data-tone="warning"] .rcp-promo-foot{ background:#FFF8EF; border-top-color:#F7E3C8; }
.rcp-promo-box.is-promo[data-tone="danger"] .rcp-promo-foot{ background:#FFF4F5; border-top-color:#F7D7D9; }
.rcp-promo-foot > span:first-child{ font-size:13px; font-weight:700; color:var(--c-ink); }
.rcp-promo-foot-val{ display:flex; flex-direction:column; align-items:flex-end; gap:1px; text-align:right; }
.rcp-promo-profit{ font-size:20px; line-height:24px; font-weight:700; }
.rcp-promo-delta{ font-size:11px; line-height:15px; font-weight:600; color:var(--c-muted); }
.rcp-promo-be{ display:flex; align-items:center; gap:8px; padding:10px 14px; border-radius:var(--r-16); background:var(--c-bg); border:1px solid var(--c-line); font-size:14px; line-height:20px; color:var(--c-ink); }
.rcp-promo-be .ph{ font-size:18px; flex:none; }
.rcp-promo-be.is-ok{ background:var(--c-success-tint); border-color:var(--c-success); color:var(--c-success); }
.rcp-promo-be.is-warn{ background:var(--c-warning-tint); border-color:var(--c-warning); color:var(--c-warning); }
.rcp-promo-be.is-danger{ background:var(--c-danger-tint); border-color:var(--c-danger); color:var(--c-danger); }
.rcp-promo-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.rcp-promo-row-right{ display:flex; flex-direction:column; align-items:flex-end; gap:2px; flex:none; text-align:right; }
.rcp-promo-filters{ flex-wrap:wrap; gap:8px; overflow:visible; }
.rcp-promo-filters .chip{ display:inline-flex; align-items:center; gap:6px; background:#FFF; border:1.5px solid #D6D1C4; color:var(--c-ink-2); }
.rcp-promo-filters .chip:hover:not([aria-pressed="true"]){ border-color:var(--c-ink-2); color:var(--c-ink); }
.rcp-promo-filters .chip[aria-pressed="true"]{ background:var(--c-ink); border-color:var(--c-ink); color:#FFF; }
.rcp-fdot{ width:7px; height:7px; border-radius:50%; display:inline-block; flex:none; }
.rcp-fdot.is-success{ background:var(--c-success); }
.rcp-fdot.is-warning{ background:var(--c-warning-fill); }
.rcp-fdot.is-danger{ background:var(--c-danger); }
.chip[aria-pressed="true"] .rcp-fdot.is-success{ background:var(--on-ink-success); }
.chip[aria-pressed="true"] .rcp-fdot.is-warning{ background:var(--on-ink-warning); }
.chip[aria-pressed="true"] .rcp-fdot.is-danger{ background:var(--on-ink-danger); }
.rcp-promo-empty{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:28px 16px; text-align:center; color:var(--c-muted); font-size:14px; }
.rcp-promo-empty.is-ok{ color:var(--c-success); font-weight:600; }
.rcp-promo-empty .ph{ font-size:24px; flex:none; }
/* Step 17: ยอดขาย MTD + Rolling + 7 POS Import + Daily Use */
.mod-recipr .stk-tabs{ max-width:100%; overflow-x:auto; scrollbar-width:none; }
.mod-recipr .stk-tabs::-webkit-scrollbar{ display:none; }
.mod-recipr .stk-tabs > button{ flex:0 0 auto; padding:0 14px; }
@media (min-width:768px){ .mod-recipr .stk-tabs{ max-width:760px; } .mod-recipr .stk-tabs > button{ flex:1 1 auto; } }
/* Redesign ข้อ 1 (24 พ.ย.) มือถือ: แท็บ 5 อันเดิมเลื่อนตกขอบจอ (มองไม่เห็นว่ามีแท็บอื่น) → ขึ้นบรรทัดใหม่ เห็นครบทุกแท็บ
   + แถวเครื่องมือ (ค้นหา / เรียง / ปุ่ม) เดิมปุ่มไม่ตัดคำ ดันจอกว้างเกิน 375 → ค้นหา/เรียงเต็มแถว ปุ่มคนละครึ่ง */
@media (max-width:1199px){
  .mod-recipr .stk-tabs{ flex-wrap:wrap; overflow:visible; height:auto; max-width:none; border-radius:var(--r-24); padding:4px; gap:4px; }
  .mod-recipr .stk-tabs > button{ flex:1 1 auto; height:auto; min-height:40px; padding:6px 12px; white-space:nowrap; }
}
@media (max-width:767px){
  .mod-recipr .stk-tools .ops-search, .mod-recipr .rcp-raw-tools .select{ grid-column:1 / -1; }
  .mod-recipr .rcp-raw-tools .btn{ min-width:0; white-space:normal; line-height:18px; padding:8px 10px; font-size:14px; }
}
@media (min-width:768px){
  .mod-recipr .rcp-raw-tools{ display:flex; flex-wrap:wrap; align-items:center; }
  .mod-recipr .rcp-raw-tools .ops-search{ flex:1 1 260px; }
  .mod-recipr .rcp-raw-tools .select{ flex:0 0 240px; }
}
.rcp-sales-kpis{ display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; }
@media (min-width:640px){ .rcp-sales-kpis{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (min-width:1200px){ .rcp-sales-kpis{ grid-template-columns:repeat(4, minmax(0, 1fr)); } }
.rcp-skpi{ gap:4px; padding:16px; }
.rcp-skpi small{ font-size:15px; font-weight:600; color:var(--c-muted); }
.rcp-skpi-head{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px; }
/* Redesign ข้อ 1 (24 พ.ย.): การ์ดสรุปยอดขายมีพื้นสีตามความหมาย (เดิมขาวหมด) + ข้อความย่อยชิดซ้าย */
.rcp-skpi-sub{ text-align:left; }
.rcp-skpi[data-tone="success"]{ background:var(--c-success-tint); }
.rcp-skpi[data-tone="warning"]{ background:var(--c-warning-tint); }
.rcp-skpi[data-tone="danger"]{ background:var(--c-danger-tint); }
.rcp-skpi[data-tone="info"]{ background:var(--c-info-tint); }
.rcp-skpi[data-tone] .badge:not(.badge-solid){ background:rgba(255,255,255,.88); }
.rcp-sales-top-bar{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.rcp-sales-actions, .rcp-sales-days, .rcp-sales-days-inline{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.rcp-sales-days-fld{ width:130px; flex:none; }
.rcp-days-lbl{ font-size:14px; font-weight:600; color:var(--c-ink-2); white-space:nowrap; }
.rcp-num-box{ display:inline-flex; align-items:center; gap:6px; height:var(--tap); padding:0 12px; border-radius:var(--r-16); background:#FFF; border:1.5px solid #D6D1C4; transition:border-color var(--t-ui), box-shadow var(--t-ui); }
.rcp-num-box:focus-within{ border-color:var(--c-ink); box-shadow:0 0 0 3px rgba(35,31,32,.08); }
.rcp-num-box > input{ border:0; background:transparent; padding:0; box-shadow:none; width:100%; min-width:0; }
.rcp-num-box > input:focus{ outline:none; border:0; box-shadow:none; }
.rcp-num-box > span{ font-size:13px; color:var(--c-muted); font-weight:600; white-space:nowrap; }
.rcp-days-box{ width:104px; flex:none; }
.rcp-num-inp{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; text-align:right; font-weight:600; font-size:15px; color:var(--c-ink); background:#FFF; border:1.5px solid #D6D1C4; border-radius:10px; padding:6px 10px; transition:border-color var(--t-ui), box-shadow var(--t-ui); }
.rcp-num-inp:focus{ border-color:var(--c-ink); box-shadow:0 0 0 3px rgba(35,31,32,.08); outline:none; }
.rcp-blend-bar{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; padding:10px 14px; border-radius:var(--r-16); background:var(--c-bg); border:1px solid var(--c-line); }
.rcp-blend-bar.is-ok{ background:var(--c-success-tint); border-color:#A5D6BC; }
.rcp-blend-bar.is-warn{ background:var(--c-warning-tint); border-color:#F0C78E; }
.rcp-blend-toggle{ min-height:34px; padding:4px 10px; font-size:13px; flex:none; }
.rcp-blend-drawer{ padding:12px 14px; border-radius:var(--r-16); background:var(--c-bg); border:1px solid var(--c-line); }
.rcp-blend-msg{ display:flex; align-items:center; gap:8px; font-size:14px; line-height:20px; }
.rcp-blend-msg .ph{ font-size:18px; flex:none; }
.rcp-blend-meta{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; }
.rcp-blend-acts{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.rcp-btn-danger-txt{ color:var(--c-danger); min-height:36px; padding:4px 10px; font-size:13px; }
.rcp-btn-danger-txt:hover:not(:disabled){ background:var(--c-danger-tint); }
.btn-danger{ background:var(--c-danger); color:#FFF; }
.rcp-modal-backdrop{ position:fixed; inset:0; z-index:80; background:rgba(35,31,32,.48); display:flex; align-items:center; justify-content:center; padding:16px; }
.rcp-modal{ width:100%; max-width:440px; box-shadow:var(--shadow-float); }
.rcp-modal-acts{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:4px; }
.rcp-mix-bars{ display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; }
@media (min-width:768px){ .rcp-mix-bars{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.rcp-mix-lbl{ display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:13px; margin-bottom:4px; }
.rcp-sales-mix-track{ height:18px; width:100%; border-radius:var(--r-pill); overflow:hidden; display:flex; align-items:center; justify-content:flex-start; background:var(--c-surface-2); border:1px solid var(--c-line); }
.rcp-sales-mix-track > span{ display:block; height:100%; border-right:1px solid #FFF; }
.rcp-sales-mix-track > em{ padding:0 10px; font-style:normal; }
.rcp-mix-legend{ display:flex; flex-wrap:wrap; gap:6px 12px; font-size:12px; }
.rcp-mix-leg{ display:inline-flex; align-items:center; gap:5px; }
.rcp-mix-leg i{ width:9px; height:9px; border-radius:50%; display:inline-block; flex:none; }
.rcp-sales-qty-inp{ width:84px; }
.rcp-sales-mrow{ flex-direction:column; align-items:stretch; gap:8px; }
.rcp-sales-mrow-head{ display:flex; justify-content:space-between; align-items:center; gap:8px; }
.rcp-sales-mrow-inputs{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.rcp-matrix-grid{ display:grid; grid-template-columns:minmax(0, 1fr); gap:10px; }
@media (min-width:768px){ .rcp-matrix-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.rcp-matrix-card{ padding:14px; border-radius:var(--r-16); background:var(--c-bg); border:1px solid var(--c-line); display:flex; flex-direction:column; gap:8px; min-width:0; }
.rcp-matrix-card.is-success{ border-top:3px solid var(--c-success); }
.rcp-matrix-card.is-warning{ border-top:3px solid var(--c-warning-fill); }
.rcp-matrix-card.is-info{ border-top:3px solid var(--c-info); }
.rcp-matrix-card.is-danger{ border-top:3px solid var(--c-danger); }
.rcp-matrix-head{ display:flex; justify-content:space-between; align-items:center; gap:8px; }
.rcp-matrix-tags{ display:flex; flex-wrap:wrap; gap:6px; }
.rcp-subnav{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; }
.rcp-dropzone{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:22px 16px; border-radius:var(--r-16); border:2px dashed var(--c-line); background:var(--c-bg); cursor:pointer; text-align:center; transition:border-color var(--t-ui), background var(--t-ui); }
.rcp-dropzone .ph{ font-size:28px; color:var(--c-ink-2); }
.rcp-dropzone:hover, .rcp-dropzone.is-over{ border-color:var(--c-ink); background:#FFF; }
.rcp-mapper-grid{ display:grid; grid-template-columns:minmax(0, 1fr); gap:10px; }
@media (min-width:640px){ .rcp-mapper-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (min-width:1024px){ .rcp-mapper-grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); } }
.rcp-imp-opts{ display:flex; flex-direction:column; gap:10px; }
.rcp-sales-summary-bar{ display:flex; flex-wrap:wrap; gap:8px 16px; padding:10px 14px; border-radius:var(--r-16); background:var(--c-bg); font-size:14px; }
.rcp-surge-bar{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:12px; }
.rcp-sales-sku-row{ align-items:stretch; }
.is-muted-row td{ opacity:.45; }
.rcp-subs-card-head{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; }
.rcp-subs-search{ flex:1 1 240px; max-width:360px; min-height:44px; background:var(--c-bg); }
.rcp-subs-search:focus-within{ background:#FFF; }
.rcp-subs-table th:nth-child(1), .rcp-subs-table td:nth-child(1){ width:24%; min-width:150px; white-space:normal; }
.rcp-subs-table th:nth-child(2), .rcp-subs-table td:nth-child(2){ white-space:nowrap; min-width:120px; padding-right:16px; }
.rcp-subs-table th:nth-child(3), .rcp-subs-table td:nth-child(3){ padding-left:28px; white-space:normal; min-width:180px; }
.rcp-btn-outline{ min-height:40px; padding:0 12px; background:#FFF; border:1px solid var(--c-line); color:var(--c-ink); }
.rcp-btn-outline:hover:not(:disabled){ border-color:var(--c-ink-2); background:var(--c-bg); }
.rcp-btn-act{ min-height:40px; padding:0 12px; }
.rcp-subs-empty-search{ display:flex; flex-direction:column; align-items:center; gap:10px; padding:24px 12px; text-align:center; }
@media print{
  .appnav, .topbar, .no-print, .toast, .stamp-layer, .drawer{ display:none !important; }
  body, .shell, .shell-main, #app{ background:#FFF !important; padding:0 !important; margin:0 !important; display:block !important; }
  .rcp-sop-sheet{ box-shadow:none !important; border:1px solid #CCC; border-radius:0; }
}

/* ---------- 9e) Staffr หน้าบาร์ตอกบัตร (Step 19 · modules/staffr.js) ----------
   นุ่มนวล ขอบมน ไม่มีกรอบดำหนา · ปุ่มตัวเลข ≥72px (มือเปียกก็กดง่าย) · สีสถานะมีคำกำกับเสมอ */
.mod-staffr{ display:flex; flex-direction:column; gap:var(--s-4); }
.mod-staffr .page-head{ margin-bottom:0; }
.sfk-clock{ font-size:56px; line-height:60px; letter-spacing:-1.5px; }
.sfk-sec{ font-size:24px; letter-spacing:0; color:var(--on-ink-muted); margin-left:2px; }
@media (min-width:768px){ .sfk-clock{ font-size:72px; line-height:76px; } .sfk-sec{ font-size:28px; } }

.sfk-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--s-3); }
@media (min-width:768px){ .sfk-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--s-4); } }
@media (min-width:1200px){ .sfk-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); } }
.sfk-staff{
  min-height:112px; padding:18px 20px; border-radius:var(--r-24); background:var(--c-surface);
  display:flex; flex-direction:column; justify-content:space-between; align-items:flex-start; gap:12px; text-align:left; min-width:0;
  transition:transform var(--t-press) ease, box-shadow var(--t-ui) ease; touch-action:manipulation;
}
.sfk-staff:active{ transform:scale(.97); }
.sfk-staff.is-working{ box-shadow:inset 0 0 0 2px var(--c-success); }
.sfk-staff-name{ font-size:22px; line-height:28px; font-weight:700; overflow-wrap:anywhere; }
.sfk-staff-off{ font-size:14px; font-weight:600; color:var(--c-muted); }
.sfk-staff .badge{ max-width:100%; white-space:normal; text-align:left; }
.sfk-staff-st{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
@media (min-width:768px){ .sfk-staff{ min-height:128px; padding:22px 24px; } .sfk-staff-name{ font-size:24px; line-height:30px; } }

.sfk-panel{ width:100%; max-width:440px; margin:0 auto; display:flex; flex-direction:column; gap:var(--s-4); }
.sfk-panel-wide{ max-width:640px; }
.sfk-back{ align-self:flex-start; padding-left:8px; }
.sfk-who{ text-align:center; display:flex; flex-direction:column; gap:4px; }
.sfk-name{ font-size:32px; line-height:40px; font-weight:700; overflow-wrap:anywhere; }
.sfk-who p{ color:var(--c-muted); font-size:16px; }
@media (min-width:768px){ .sfk-name{ font-size:40px; line-height:48px; } }

.sfk-dots{ display:flex; justify-content:center; gap:20px; padding:4px 0; }
.sfk-dots span{ width:22px; height:22px; border-radius:50%; background:var(--c-surface); box-shadow:inset 0 0 0 2px var(--c-line); transition:background var(--t-ui) ease, box-shadow var(--t-ui) ease; }
.sfk-dots span.on{ background:var(--c-ink); box-shadow:none; }
.sfk-dots.is-shake{ animation:sfk-shake 360ms var(--ease-out); }
@keyframes sfk-shake{ 0%,100%{ transform:translateX(0); } 20%{ transform:translateX(-10px); } 40%{ transform:translateX(9px); } 60%{ transform:translateX(-6px); } 80%{ transform:translateX(4px); } }

.sfk-msg{ text-align:center; font-size:16px; font-weight:600; border-radius:var(--r-16); padding:12px 16px; background:var(--c-danger-tint); color:var(--c-danger); }
.sfk-msg[data-tone="warning"]{ background:var(--c-warning-tint); color:var(--c-warning); }

.sfk-pad{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.sfk-key{
  min-height:var(--tap-count); height:clamp(72px, 9vh, 88px); border-radius:var(--r-24);
  background:var(--c-surface); box-shadow:inset 0 0 0 1px var(--c-line);
  font-size:32px; font-weight:700; font-variant-numeric:tabular-nums;
  display:flex; align-items:center; justify-content:center; user-select:none; touch-action:manipulation;
  transition:transform var(--t-press) ease, background var(--t-press) ease;
}
.sfk-key:active{ transform:scale(.95); background:var(--c-surface-2); }
.sfk-key .ph{ font-size:30px; }
.sfk-key-fn{ background:var(--c-surface-2); box-shadow:none; font-size:18px; color:var(--c-ink-2); }
.sfk-key[disabled]{ opacity:.4; }
@media (min-width:768px){ .sfk-pad{ gap:16px; } }

.sfk-shifts{ display:grid; grid-template-columns:1fr; gap:12px; }
@media (min-width:768px){ .sfk-shifts{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; } }
.sfk-shift{
  min-height:96px; padding:16px 20px; border-radius:var(--r-24); background:var(--c-surface);
  box-shadow:inset 0 0 0 1px var(--c-line); text-align:left;
  display:flex; flex-direction:column; justify-content:center; gap:4px; min-width:0; touch-action:manipulation;
  transition:transform var(--t-press) ease, background var(--t-ui) ease;
}
.sfk-shift:active{ transform:scale(.98); }
.sfk-shift > *{ align-self:flex-start; text-align:left; margin:0; }
.sfk-shift strong{ font-size:20px; line-height:26px; font-weight:700; overflow-wrap:anywhere; }
.sfk-shift span{ font-size:16px; color:var(--c-ink-2); }
.sfk-shift small{ font-size:13px; font-weight:600; color:var(--c-info); }
.sfk-shift[aria-checked="true"]{ background:var(--c-ink); color:#FFF; box-shadow:none; }
.sfk-shift[aria-checked="true"] span{ color:var(--on-ink-muted); }
.sfk-shift[aria-checked="true"] small{ color:var(--on-ink-info); }
.sfk-go{ white-space:normal; text-align:center; line-height:1.2; }
.sfk-go .ph{ font-size:26px; }
.sfk-hol{ display:flex; justify-content:center; }
.sfk-note{ gap:6px; padding:16px 20px; }
.sfk-note strong{ display:flex; align-items:center; gap:6px; color:var(--c-warning); }
.sfk-note span{ font-size:15px; }

.sfk-open{ gap:0; padding:8px 24px; }
.sfk-tkwarn{ background:var(--c-warning-tint); display:grid; gap:6px; padding:14px 18px; }
.sfk-tkwarn strong{ display:flex; align-items:center; gap:8px; font-size:16px; color:var(--c-warning); }
.sfk-tkwarn ul{ margin:0; padding-left:20px; font-size:15px; display:grid; gap:2px; }
.sfk-tkwarn span{ font-size:13px; color:var(--c-ink-2); }
.sfk-open-row{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:14px 0; font-size:16px; }
.sfk-open-row + .sfk-open-row{ border-top:1px solid rgba(35,31,32,.10); }
.sfk-open-row span:first-child{ color:var(--c-muted); }
.sfk-open-row strong{ font-size:20px; text-align:right; }
.sfk-open-row strong .t-muted{ font-size:14px; font-weight:500; margin-left:6px; }

.sfk-done{ max-width:520px; width:100%; margin:0 auto; align-items:center; text-align:center; gap:10px; padding:32px 24px; }
.sfk-done-pose{ width:112px; }
.sfk-done h1{ font-size:32px; line-height:40px; font-weight:700; }
.sfk-done-time{ font-size:56px; line-height:60px; font-weight:700; letter-spacing:-1px; }
.sfk-done-who{ font-size:18px; color:var(--c-ink-2); }
.sfk-done-btn{ min-width:200px; margin-top:8px; }
/* หน้านับของ: ชื่อคนที่ตอกบัตรเข้าอยู่ (23 พ.ย.) */
.chip-onshift{ height:var(--tap); padding:0 16px; display:inline-flex; align-items:center; gap:6px; background:var(--c-success-tint); color:var(--c-success); font-size:16px; }
.chip-onshift .ph{ font-size:18px; }
.bar-who-onshift{ flex-wrap:wrap; overflow:visible; }

/* ---------- 9f) Staffr ฝั่งเจ้าของ: ทีม (Step 20a · modules/staffr-owner.js) ---------- */
.mod-staffr-owner{ display:flex; flex-direction:column; gap:var(--s-4); }
.mod-staffr-owner .page-head{ margin-bottom:0; }
.sfo-tabs{ align-self:flex-start; min-width:min(100%, 360px); }
.sfo-note{ gap:8px; align-items:flex-start; }
.sfo-note strong{ display:flex; align-items:center; gap:6px; }
.sfo-note span{ font-size:15px; }
.sfo-list{ padding:4px 20px; gap:0; }
.sfo-row{ width:100%; text-align:left; padding:14px 0; align-items:center; }
.sfo-row:active{ opacity:.7; }
.sfo-name{ font-size:18px; line-height:24px; }
.sfo-badges{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.sfo-go{ color:var(--c-muted); flex:0 0 auto; }
.sfo-form{ max-width:760px; width:100%; }
.sfo-form .card-head h2{ font-size:18px; }
.sfo-hint{ font-size:13px; line-height:18px; color:var(--c-muted); }
.sfo-pin{ max-width:200px; font-size:24px; letter-spacing:8px; text-align:center; }
.sfo-check{ display:flex; align-items:center; gap:10px; min-height:var(--tap); font-weight:600; }
.sfo-check input{ width:22px; height:22px; accent-color:var(--c-ink); }
.sfo-more summary{ display:flex; justify-content:space-between; align-items:center; gap:8px; cursor:pointer; list-style:none; }
.sfo-more summary::-webkit-details-marker{ display:none; }
.sfo-more summary h2{ font-size:18px; line-height:24px; font-weight:600; }
.sfo-more[open] summary{ margin-bottom:4px; }
.sfo-err{ border-radius:var(--r-16); padding:12px 16px; background:var(--c-danger-tint); color:var(--c-danger); font-weight:600; }
.sfo-bar{ position:sticky; bottom:calc(var(--dock-h) + 12px + env(safe-area-inset-bottom)); z-index:5; display:flex; justify-content:flex-end; gap:12px; padding:12px; border-radius:var(--r-24); background:color-mix(in srgb, var(--c-bg) 88%, transparent); backdrop-filter:blur(6px); }
@media (min-width:1200px){ .sfo-bar{ bottom:12px; } }
@media (max-width:767px){ .sfo-bar > .btn{ flex:1 1 0; } }
.sfo-leave{ gap:12px; }
.sfo-prob{ display:flex; flex-direction:column; gap:8px; padding:12px 14px; border-radius:16px; margin-top:4px; }
.sfo-prob strong{ display:flex; align-items:center; gap:6px; font-size:15px; }
.sfo-prob .chip{ min-height:44px; }
.sfo-leave strong{ display:flex; align-items:center; gap:6px; color:var(--c-warning); }
.sfo-leave-btn{ align-self:flex-start; color:var(--c-warning); }
.sfo-actions{ display:flex; gap:12px; justify-content:flex-end; flex-wrap:wrap; }
.sfo-shifts{ display:flex; flex-direction:column; gap:12px; }
.sfo-shift-row{ display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) var(--tap); gap:10px; align-items:end; }
@media (max-width:767px){ .sfo-shift-row{ grid-template-columns:minmax(0,1fr) minmax(0,1fr) var(--tap); } .sfo-shift-row > .field:first-child{ grid-column:1 / -1; } }
.sfo-shift-del{ color:var(--c-muted); }
.sfo-unit{ display:flex; align-items:center; gap:8px; }
.sfo-unit .input{ max-width:140px; }
.sfo-unit span{ color:var(--c-muted); font-weight:600; }
.sfo-hol-add{ display:flex; gap:10px; flex-wrap:wrap; }
.sfo-hol-add .input{ max-width:220px; }
.sfo-hol-list{ flex-wrap:wrap; overflow:visible; }
.sfo-hol-list .chip{ display:inline-flex; align-items:center; gap:6px; }
.sfo-hol-list .ph{ font-size:14px; }
/* ช่องกรอกในการ์ดขาว: พื้นครีม + เส้นบาง ให้เห็นว่ากรอกได้ (ไม่ใช้กรอบดำหนา) */
.sfo-form .input{ background:var(--c-bg); box-shadow:inset 0 0 0 1px var(--c-line); }
.sfo-form .input:focus{ background:#FFF; outline:2px solid var(--c-ink); }
.sfo-form .input[type="time"],.sfo-form .input[type="date"]{ padding:0 10px; min-width:0; }
/* ฟอร์มพนักงาน (24 พ.ย.): ใช้โครงฟอร์มวัตถุดิบ .frm/.frm-card/.fld-box · เลขวงกลมเป็นสีกลุ่มคน */
.frm.sfo-form{ max-width:760px; }
.sfo-form .frm-no{ background:var(--g-people); }
.sfo-row-name{ grid-template-columns:minmax(0,3fr) minmax(0,2fr); }
.fld-box input[type="date"]{ font-variant-numeric:tabular-nums; }
.fld-box input[type="date"]::-webkit-calendar-picker-indicator{ opacity:.6; cursor:pointer; }
.sfo-static{ gap:8px; min-height:var(--tap); padding:0 12px; color:var(--c-ink-2); font-weight:600; }
.sfo-static .ph{ color:var(--g-people); }
.sfo-pin-box{ max-width:220px; }
.fld-box .sfo-pin{ font-size:26px; font-weight:700; letter-spacing:10px; text-align:center; padding-left:22px; }
.fld-box .sfo-pin::placeholder{ letter-spacing:10px; color:rgba(35,31,32,.25); }
@media (max-width:420px){ .sfo-row-name{ grid-template-columns:1fr; } }

/* ---------- 9g) Staffr ตารางกะ (Step 20b · ตาม mockup ที่ผู้ใช้อนุมัติ 24 พ.ย.) ---------- */
.sfo-head{ flex-wrap:wrap; }
.sfs-actions{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.sfs-pub{ display:inline-flex; align-items:center; gap:6px; min-height:var(--tap); padding:0 14px; border-radius:var(--r-pill); background:var(--c-success-tint); color:var(--c-success); font-size:14px; font-weight:700; }
.sfs-top{ display:flex; flex-wrap:wrap; gap:16px; }
.sfs-hero{ flex:3 1 480px; min-width:0; gap:14px; }
.sfs-hero-top{ display:flex; flex-direction:column; gap:6px; }
/* ช่องย่อยในการ์ดหมึก: พื้นขาว ตัวเข้ม (ผู้ใช้ขอ 24 พ.ย. · เทาเข้มเดิมไม่เด่น) */
.sfs-tiles{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.sfs-tile{ background:#FFF; color:var(--c-ink); border-radius:18px; padding:12px 16px; display:flex; flex-direction:column; gap:2px; min-width:0; }
.sfs-tile span{ font-size:12px; font-weight:600; color:var(--c-muted); }
.sfs-tile strong{ font-size:22px; line-height:28px; font-weight:700; font-variant-numeric:tabular-nums; }
.sfs-tile strong small{ font-size:13px; font-weight:600; color:var(--c-muted); }
@media (max-width:767px){ .sfs-tiles{ grid-template-columns:1fr 1fr; } .sfs-tile:last-child{ grid-column:1 / -1; } .sfs-tile strong{ font-size:18px; line-height:24px; } }
.sfs-alerts{ flex:2 1 320px; min-width:0; background:var(--c-brand-tint); border-radius:var(--r-24); padding:18px 20px; display:flex; flex-direction:column; gap:10px; }
.sfs-alerts h2{ font-size:18px; line-height:24px; font-weight:700; }
.sfs-alert{ background:#FFF; border-radius:var(--r-16); padding:12px 14px; display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.sfs-alert strong{ font-size:15px; }
.sfs-alert span:last-child{ font-size:14px; color:var(--c-ink-2); }
/* 24 พ.ย. รอบ 3: "ยังจัดไม่ครบ" ไม่ใช่ความผิด → การ์ดโทนเบา + ปุ่มตั้งวันหยุด */
.sfs-alerts.is-soft{ background:var(--c-bg); }
.sfs-alert > span:not(.badge){ font-size:14px; color:var(--c-ink-2); }
.sfs-alert-act{ margin-top:4px; min-height:44px; }
.sfs-offbtn{ margin-left:auto; }
.sfs-offpanel{ max-width:760px; }
.sfs-offlist{ gap:10px; max-height:60vh; overflow:auto; }
.sfs-offrow{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:10px 0; border-top:1px solid rgba(35,31,32,.08); }
.sfs-offwho{ flex:0 0 120px; display:flex; flex-direction:column; min-width:0; }
.sfs-offwho small{ font-size:12px; color:var(--c-muted); }
.sfs-offdays{ flex:1 1 300px; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; min-width:0; }
.sfs-offday{ min-height:52px; border-radius:12px; background:var(--c-surface); box-shadow:inset 0 0 0 1px var(--c-line); display:flex; flex-direction:column; align-items:center; justify-content:center; padding:2px; min-width:0; }
.sfs-offday span{ font-size:12px; font-weight:700; white-space:nowrap; }
.sfs-offday small{ font-size:11px; color:var(--c-muted); }
.sfs-offday.is-on{ background:var(--c-ink); color:#FFF; box-shadow:none; }
.sfs-offday.is-on small{ color:var(--on-ink-muted); }
.sfs-offday[disabled]{ opacity:.5; }
.sfs-offday.is-weekly{ opacity:1; background:var(--c-ink); color:#FFF; box-shadow:none; background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.12) 0 6px,transparent 6px 12px); }
.sfs-offmodes{ display:flex; gap:4px; padding:4px; border-radius:999px; background:var(--c-surface); box-shadow:inset 0 0 0 1px var(--c-line); margin:8px 0; }
.sfs-offmode{ flex:1 1 0; min-height:44px; border-radius:999px; font-weight:700; font-size:14px; padding:0 8px; }
.sfs-offmode.is-on{ background:var(--c-ink); color:#FFF; }
@media (max-width:520px){ .sfs-offwho{ flex-basis:100%; } .sfs-offday span{ font-size:11px; } }
.sfs-board{ padding:16px; gap:12px; min-width:0; }
.sfs-nav{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.sfs-week{ font-size:18px; padding:0 4px; }
.sfs-legend{ display:flex; flex-wrap:wrap; gap:6px 16px; font-size:13px; color:var(--c-ink-2); }
.sfs-legend span{ display:inline-flex; align-items:center; gap:6px; }
.sfs-legend i{ width:12px; height:12px; border-radius:4px; box-shadow:inset 0 0 0 1px rgba(35,31,32,.12); }
.sfs-scroll{ overflow-x:auto; margin:0 -4px; padding:0 4px; }
.sfs-grid{ min-width:900px; display:grid; grid-template-columns:180px repeat(7,minmax(0,1fr)); gap:6px; }
.sfs-corner{ font-size:12px; font-weight:600; color:var(--c-muted); padding:8px 4px; align-self:end; }
.sfs-dh{ border-radius:14px; padding:8px 10px; background:var(--c-bg); display:flex; flex-direction:column; }
.sfs-dh span{ font-size:12px; font-weight:600; } .sfs-dh strong{ font-size:18px; } .sfs-dh small{ font-size:11px; font-weight:700; }
.sfs-dh.is-today{ background:var(--c-ink); color:#FFF; }
.sfs-who{ padding:8px 6px; display:flex; flex-direction:column; justify-content:center; gap:1px; border-top:1px solid rgba(35,31,32,.08); min-width:0; }
.sfs-who strong{ font-size:16px; overflow-wrap:anywhere; } .sfs-who small{ font-size:12px; color:var(--c-muted); } .sfs-who span{ font-size:12px; color:var(--c-ink-2); font-weight:600; }
.sfs-cell{ min-height:58px; border-radius:14px; padding:8px 10px; text-align:left; display:flex; flex-direction:column; justify-content:center; gap:2px; min-width:0; transition:transform var(--t-press) ease; }
.sfs-cell:active{ transform:scale(.96); }
.sfs-cell strong{ font-size:13px; line-height:18px; overflow-wrap:anywhere; } .sfs-cell span{ font-size:12px; opacity:.85; font-variant-numeric:tabular-nums; }
.sfs-cell.is-empty{ background:#FFF; color:var(--c-muted); box-shadow:inset 0 0 0 1px var(--c-line); align-items:center; text-align:center; }
.sfs-cell.is-empty strong{ font-size:18px; }
.sfs-count{ padding:10px 8px; font-size:13px; font-weight:700; border-top:1px solid rgba(35,31,32,.12); }
.sfs-count-l{ color:var(--c-ink-2); font-weight:600; }
.sfs-hint{ font-size:13px; color:var(--c-muted); }
/* มือถือ: ดูรายวัน */
.sfs-strip{ display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.sfs-day{ min-height:64px; border-radius:16px; background:var(--c-bg); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; }
.sfs-day span{ font-size:11px; font-weight:600; } .sfs-day strong{ font-size:17px; } .sfs-day small{ font-size:10px; color:var(--c-muted); font-weight:600; }
.sfs-day.is-today{ box-shadow:inset 0 0 0 2px var(--c-ink); }
.sfs-day.is-on{ background:var(--c-ink); color:#FFF; } .sfs-day.is-on small{ color:var(--on-ink-muted); }
.sfs-groups{ gap:10px; }
.sfs-group{ border-radius:20px; padding:12px 14px; display:flex; flex-direction:column; gap:8px; }
.sfs-group-h{ display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:15px; }
.sfs-group-h span{ font-size:13px; font-weight:600; }
.sfs-rest{ background:var(--c-bg); color:var(--c-ink); }
.sfs-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.sfs-chip{ min-height:40px; padding:0 14px; border-radius:var(--r-pill); background:#FFF; color:var(--c-ink); font-size:15px; font-weight:600; display:inline-flex; align-items:center; gap:4px; }
.sfs-chip small{ font-size:12px; color:var(--c-muted); }
.sfs-add{ background:transparent; color:inherit; box-shadow:inset 0 0 0 1px currentColor; }
/* แผ่นเลือกกะ */
.sfs-sheet{ position:fixed; inset:0; z-index:70; display:flex; align-items:flex-end; justify-content:center; }
@media (min-width:768px){ .sfs-sheet{ align-items:center; } }
.sfs-scrim{ position:absolute; inset:0; background:rgba(35,31,32,.38); border:0; }
.sfs-panel{ position:relative; width:min(480px,100%); max-height:86vh; overflow:auto; background:#FFF; border-radius:28px 28px 0 0; padding:20px; display:flex; flex-direction:column; gap:12px; box-shadow:var(--shadow-float); padding-bottom:calc(20px + env(safe-area-inset-bottom)); }
@media (min-width:768px){ .sfs-panel{ border-radius:28px; } }
.sfs-panel h2{ font-size:20px; line-height:26px; font-weight:700; }
.sfs-opts{ display:grid; gap:8px; }
.sfs-opt{ min-height:60px; border-radius:18px; padding:10px 16px; text-align:left; display:flex; flex-direction:column; justify-content:center; gap:2px; background:var(--c-bg); box-shadow:inset 0 0 0 1px rgba(35,31,32,.08); }
.sfs-opt strong{ font-size:16px; } .sfs-opt span{ font-size:13px; opacity:.85; }
.sfs-opt.is-on{ box-shadow:inset 0 0 0 3px var(--c-ink); }
.sfs-panel-foot{ display:flex; justify-content:space-between; gap:8px; }
/* หน้าบาร์: ตารางกะ + ตอกบัตรรู้กะเอง (Step 20b) */
.sfk-tabs{ min-width:min(100%, 320px); }
.sfk-tabs > button{ height:var(--tap-bar); font-size:16px; padding:0 18px; }
.sfk-today{ gap:12px; }
.sfk-today-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; }
.sfk-today-card{ border-radius:20px; padding:14px 16px; display:flex; flex-direction:column; gap:8px; min-width:0; }
.sfk-today-h{ font-size:14px; font-weight:700; }
.sfk-today-p{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.sfk-today-p strong{ font-size:24px; line-height:30px; color:var(--c-ink); }
.sfk-today-none{ font-size:14px; font-weight:600; opacity:.8; }
.sfk-tag{ font-size:12px; font-weight:700; padding:3px 10px; border-radius:var(--r-pill); background:#FFF; color:var(--c-ink-2); }
.sfk-tag.is-in{ background:var(--c-success); color:#FFF; }
.sfk-wk{ gap:12px; }
.sfk-wk-scroll{ overflow-x:auto; }
.sfk-wk-grid{ min-width:560px; display:grid; grid-template-columns:96px repeat(7,minmax(0,1fr)); gap:5px; }
.sfk-wk-dh{ border-radius:12px; padding:6px 0; background:var(--c-bg); display:flex; flex-direction:column; align-items:center; }
.sfk-wk-dh span{ font-size:12px; font-weight:600; } .sfk-wk-dh strong{ font-size:16px; }
.sfk-wk-dh.is-today{ background:var(--c-ink); color:#FFF; }
.sfk-wk-name{ display:flex; align-items:center; font-size:16px; font-weight:700; padding:0 4px; overflow-wrap:anywhere; }
.sfk-wk-cell{ min-height:52px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:700; text-align:center; padding:2px; }
.sfk-wk-cell.is-empty{ background:#FFF; color:#B8B0AB; box-shadow:inset 0 0 0 1px var(--c-surface-2); }
.sfk-wk-cell.is-today{ outline:2px solid var(--c-ink); outline-offset:-2px; }
.sfk-wk-legend{ display:flex; flex-wrap:wrap; gap:6px 14px; font-size:13px; color:var(--c-ink-2); }
/* Redesign ข้อ 5 (24 พ.ย.): บอร์ดวันนี้รวมคนที่ตอกบัตรนอกตาราง + ออกแล้ว · ตารางสัปดาห์: ชื่ออยู่กับที่ เลื่อนไปวันนี้ · แถวของฉันขึ้นก่อน */
.sfk-tag.is-out{ background:var(--c-ink); color:#FFF; }
.sfk-tag.is-off{ background:var(--c-warning-tint); color:var(--c-warning); box-shadow:inset 0 0 0 1px var(--c-warning); }
.sfk-today-note{ font-size:13px; color:var(--on-ink-muted, rgba(255,255,255,.75)); }
.sfk-me{ display:flex; flex-direction:column; gap:6px; }
.sfk-me-lbl{ display:flex; align-items:center; gap:6px; font-size:13px; color:var(--c-muted); }
.sfk-me .chip{ min-height:48px; background:var(--c-bg); padding:0 16px; }
.sfk-me .chip[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }
/* 24 พ.ย. รอบ 3: เลิกคอลัมน์ชื่อลอย (sticky) — เลื่อนข้างแล้วหัว "วันนี้" สีดำลอดออกมาเป็นเส้นดำ แก้ด้วยเงาไม่หาย
   → มือถือย่อตารางให้พอดีจอ เห็นครบ 7 วันโดยไม่ต้องเลื่อน · จอกว้างพอดีอยู่แล้ว */
.sfk-wk-name small{ display:block; font-size:11px; font-weight:700; color:var(--c-brand); }
.sfk-wk-name{ flex-direction:column; align-items:flex-start; justify-content:center; min-width:0; }
.sfk-wk-name.is-me{ color:var(--c-ink); }
.sfk-wk-cell.is-me{ box-shadow:inset 0 0 0 2px var(--c-ink); }
.sfk-wk .wk-s{ display:none; }
@media (max-width:767px){
  .sfk-wk-scroll{ overflow:visible; }
  .sfk-wk-grid{ min-width:0; grid-template-columns:minmax(52px,64px) repeat(7,minmax(0,1fr)); gap:3px; }
  .sfk-wk-dh{ border-radius:8px; padding:4px 0; }
  .sfk-wk-dh span{ font-size:11px; } .sfk-wk-dh strong{ font-size:14px; line-height:18px; }
  .sfk-wk-name{ font-size:13px; line-height:16px; padding:0 2px; }
  .sfk-wk-cell{ min-height:44px; border-radius:8px; font-size:13px; padding:1px; overflow:hidden; }
  .sfk-wk .wk-l{ display:none; } .sfk-wk .wk-s{ display:inline; }
  .sfk-wk-cell .sfk-req-dot{ top:3px; right:3px; width:6px; height:6px; }
}
/* เจ้าของ: การ์ด "วันนี้ที่ร้าน" (ตาราง + ตอกบัตรจริง) */
.sfs-now{ gap:10px; }
.sfs-now h2{ display:flex; align-items:center; gap:6px; font-size:17px; }
.sfs-now-row{ display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px 12px; }
.sfs-now-h{ flex:0 0 auto; font-size:13px; font-weight:700; padding:6px 10px; border-radius:var(--r-pill); white-space:nowrap; }
.sfs-now-ppl{ display:flex; flex-wrap:wrap; gap:6px; flex:1 1 240px; min-width:0; }
.sfs-now-p{ display:inline-flex; flex-wrap:wrap; align-items:center; gap:4px 6px; padding:6px 10px; border-radius:12px; background:var(--c-bg); font-size:14px; }
.sfs-now-p small{ font-size:12px; color:var(--c-muted); font-weight:600; }
.sfs-now-p.is-none{ opacity:.7; }
.sfk-plan{ border-radius:var(--r-32); padding:22px 24px; display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.sfk-plan-k{ font-size:13px; font-weight:700; letter-spacing:.3px; }
.sfk-plan-name{ font-size:34px; line-height:42px; font-weight:700; }
.sfk-plan-time{ font-size:20px; font-weight:600; }
.sfk-other{ align-self:center; }
/* มือถือ: การ์ดค่าแรงกะทัดรัด ให้ตารางรายวันขึ้นมาเร็ว */
@media (max-width:767px){
  .sfs-hero{ padding:18px; gap:10px; }
  .sfs-hero .hero-num{ font-size:34px; line-height:40px; }
  .sfs-hero .hero-sub{ display:none; }
  .sfs-tiles{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .sfs-tile{ padding:8px 10px; border-radius:14px; }
  .sfs-tile:last-child{ grid-column:auto; }
  .sfs-tile span{ font-size:11px; }
  .sfs-tile strong{ font-size:15px; line-height:20px; }
  .sfs-alerts{ padding:14px 16px; gap:8px; }
  .sfs-alerts h2{ font-size:16px; }
  .sfo-head .sfs-actions{ width:100%; }
  .sfo-head .sfs-actions > *{ flex:1 1 auto; justify-content:center; }
}
@media (max-width:767px){ .sfo-head .sfs-actions{ flex-wrap:nowrap; } .sfs-pub-x{ display:none; } .sfo-head .sfs-actions .btn,.sfo-head .sfs-pub{ padding:0 12px; font-size:13px; } }

/* ---------- 9h) คำขอลา / สลับกะ + เบอร์ติดต่อ (24 พ.ย. · ข้อเสนอรอบ 2 ข้อ 2A) ---------- */
/* ฟอร์มพนักงาน: ผู้ติดต่อฉุกเฉิน */
.sfo-emerg{ display:grid; gap:10px; padding:12px; border-radius:var(--r-16); background:var(--c-bg); }
.sfo-emerg-k{ display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:700; color:var(--c-ink-2); }
.sfo-emerg-k .ph{ color:var(--c-danger); }
/* แท็บตารางกะ: จำนวนคำขอรอ */
.sfo-tab-count{ display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; margin-left:6px; border-radius:var(--r-pill); background:var(--c-warning); color:#FFF; font-size:12px; font-weight:700; font-variant-numeric:tabular-nums; }
/* เจ้าของ: การ์ดคำขอ */
.sfs-reqs{ flex:1 1 100%; min-width:0; gap:10px; padding:16px 20px; }
.sfs-reqs .card-head{ flex-wrap:wrap; gap:4px 12px; }
.sfs-reqs .card-head h2{ display:flex; align-items:center; gap:8px; font-size:18px; }
.sfs-req{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 16px; padding:12px 0; border-top:1px solid rgba(35,31,32,.08); }
.sfs-req-main{ display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; flex:1 1 260px; }
.sfs-req-main strong{ font-size:16px; }
.sfs-req-main span{ font-size:14px; color:var(--c-ink-2); overflow-wrap:anywhere; }
.sfs-req-main small{ font-size:13px; color:var(--c-muted); overflow-wrap:anywhere; }
.sfs-req-act{ display:flex; gap:8px; flex:0 0 auto; }
.sfs-reqs small.sfs-req-quota{ font-size:13px; font-weight:600; color:var(--c-ink-2); }
@media (max-width:767px){ .sfs-req-act{ width:100%; } .sfs-req-act > .btn{ flex:1 1 0; } }
.sfs-cell.has-req{ box-shadow:inset 0 0 0 2px var(--c-warning); position:relative; }
.sfs-req-dot{ font-style:normal; font-size:10px; font-weight:700; color:var(--c-warning); }
/* หน้าบาร์ */
.sfk-req-bar{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; padding-top:4px; }
.sfk-req-bar small{ font-size:13px; color:var(--c-muted); flex:1 1 240px; }
.sfk-req-btn{ min-height:var(--tap-bar); }
.sfk-req-btn .ph{ font-size:22px; }
.sfk-wk-cell.has-req{ position:relative; box-shadow:inset 0 0 0 2px var(--c-warning); }
.sfk-wk-cell .sfk-req-dot, .sfk-wk-legend .sfk-req-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--c-warning); }
.sfk-wk-cell .sfk-req-dot{ position:absolute; top:5px; right:5px; }
.sfk-pending{ gap:8px; padding:16px 20px; }
.sfk-pending-row{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:6px 0; }
.sfk-pending-row strong{ font-size:16px; }
.sfk-rcard{ gap:12px; padding:18px 20px; }
.sfk-rh{ font-size:16px; line-height:22px; font-weight:700; color:var(--c-ink-2); }
.sfk-rdays{ display:flex; flex-direction:column; gap:8px; }
/* 24 พ.ย. รอบ 3: ปฏิทินรายเดือน (เดิม 14 วัน) */
.sfk-rcal-nav{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.sfk-rcal-nav strong{ font-size:18px; }
.sfk-rcal-nav .btn-icon{ min-width:var(--tap-bar); min-height:var(--tap-bar); }
.sfk-rcal{ display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; }
.sfk-rcal-dow{ text-align:center; font-size:12px; font-weight:700; color:var(--c-muted); }
.sfk-rcal-off{ min-height:var(--tap-bar); display:flex; align-items:center; justify-content:center; font-size:15px; color:#C9C1BC; }
.sfk-rcal .sfk-rday{
  position:relative; min-height:var(--tap-bar); min-width:0; border-radius:14px; background:var(--c-surface);
  box-shadow:inset 0 0 0 1px var(--c-line); color:var(--c-ink); display:flex; flex-direction:column; align-items:center; justify-content:center;
  touch-action:manipulation;
}
.sfk-rcal .sfk-rday.is-today{ box-shadow:inset 0 0 0 2px var(--c-ink); }
.sfk-rcal .sfk-rday[aria-checked="true"]{ background:var(--c-ink); color:#FFF; box-shadow:none; }
.sfk-rcal .sfk-rday small{ color:var(--c-muted); font-weight:600; min-height:12px; }
.sfk-rcal .sfk-rday[aria-checked="true"] small{ color:var(--on-ink-muted); }
.sfk-rcal-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--c-warning); }
.sfk-rcal-dot.is-approved{ background:var(--c-success); }
.sfk-rcal .sfk-rcal-dot{ position:absolute; top:5px; right:5px; }
.sfk-rcal-key{ display:flex; align-items:center; gap:6px; font-size:13px; color:var(--c-ink-2); }
.sfk-rcal-key .sfk-rcal-dot + *{ margin-left:0; }
.sfk-ropts{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; }
.sfk-ropt{
  min-height:var(--tap-bar); padding:8px 12px; border-radius:18px; background:var(--c-surface);
  box-shadow:inset 0 0 0 1px var(--c-line); font-size:17px; font-weight:700; color:var(--c-ink);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; text-align:center; min-width:0;
  touch-action:manipulation; transition:transform var(--t-press) ease, background var(--t-ui) ease;
}
.sfk-ropt:active{ transform:scale(.97); }
.sfk-ropt small{ font-size:12px; font-weight:600; color:var(--c-muted); overflow-wrap:anywhere; }
.sfk-ropt[aria-checked="true"]{ background:var(--c-ink); color:#FFF; box-shadow:none; }
.sfk-ropt[aria-checked="true"] small{ color:var(--on-ink-muted); }
.sfk-ropt[disabled]{ opacity:.45; }
.sfk-rday{ padding:6px 2px; border-radius:14px; gap:0; }
.sfk-rday span{ font-size:12px; font-weight:600; }
.sfk-rday strong{ font-size:18px; line-height:22px; }
.sfk-rday small{ font-size:10px; }
.sfk-rnow{ font-size:15px; color:var(--c-ink-2); }
.sfk-rnote .fld-box input{ font-size:16px; }
.sfk-rsum{ text-align:center; font-size:18px; font-weight:700; }
.sfk-mine{ gap:6px; padding:16px 20px; }
.sfk-mine-row{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; padding:8px 0; border-top:1px solid rgba(35,31,32,.08); }
.sfk-mine-row > span{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.sfk-mine-x{ min-height:var(--tap-bar); }
@media (max-width:420px){ .sfk-rcal{ gap:4px; } .sfk-rday strong{ font-size:16px; } .sfk-rday small{ font-size:9px; } .sfk-rcard{ padding:16px 14px; } }

/* ---------- 9i) Staffr ฝั่งเจ้าของ: แท็บเงินเดือน (Step 20c · modules/staffr-pay.js) ---------- */
/* 4 แท็บบนมือถือ: ซ่อนไอคอน ให้ชื่อแท็บพอดีจอ 375 */
@media (max-width:479px){ .sfo-tabs > button .ph{ display:none; } .sfo-tabs > button{ padding:0 4px; font-size:13px; } }
.sfp-nav{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; }
.sfp-nav-t{ display:flex; flex-direction:column; min-width:0; }
.sfp-nav-t strong{ font-size:18px; line-height:24px; }
.sfp-nav-t small{ font-size:13px; color:var(--c-muted); }
.sfp-top{ display:flex; flex-wrap:wrap; gap:var(--s-4); align-items:stretch; }
.sfp-hero{ flex:1 1 340px; min-width:0; gap:10px; }
.sfp-issues{ flex:1 1 380px; min-width:0; gap:10px; padding:16px 20px; }
.sfp-issues .card-head{ flex-wrap:wrap; gap:4px 12px; }
.sfp-issues .card-head h2{ display:flex; align-items:center; gap:8px; font-size:18px; }
.sfp-issues .card-head h2 .ph{ color:var(--c-danger); }
.sfp-issue{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 16px; padding:12px 0; border-top:1px solid rgba(35,31,32,.08); }
.sfp-issue-main{ display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; flex:1 1 220px; }
.sfp-issue-main strong{ font-size:16px; }
.sfp-issue-main span{ font-size:14px; color:var(--c-ink-2); overflow-wrap:anywhere; }
.sfp-issue-act{ display:flex; gap:8px; flex:0 0 auto; }
@media (max-width:767px){ .sfp-issue-act{ width:100%; } .sfp-issue-act > .btn{ flex:1 1 0; } }
.sfp-list{ padding:16px 20px 4px; }
.sfp-row{ gap:12px; }
.sfp-net{ font-size:18px; font-weight:700; white-space:nowrap; flex:0 0 auto; }
.sfp-back{ display:flex; }
.sfp-who{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:8px 16px; }
.sfp-who p{ font-size:14px; color:var(--c-muted); }
.sfp-who h2{ font-size:28px; line-height:34px; font-weight:700; }
.sfp-who-net{ font-size:28px; line-height:34px; font-weight:700; }
.sfp-who-net small{ font-size:15px; color:var(--c-muted); }
.sfp-cols{ display:grid; gap:var(--s-4); align-items:start; }
@media (min-width:1024px){ .sfp-cols{ grid-template-columns:minmax(0,5fr) minmax(0,7fr); } }
.sfp-pay, .sfp-days{ gap:6px; padding:16px 20px; }
.sfp-line{ display:flex; justify-content:space-between; gap:12px; padding:6px 0; font-size:15px; }
.sfp-line span{ color:var(--c-ink-2); min-width:0; overflow-wrap:anywhere; }
.sfp-line.is-minus strong{ color:var(--c-danger); }
.sfp-line.is-total{ border-top:1px solid var(--c-line); margin-top:4px; padding-top:10px; font-size:18px; }
.sfp-line.is-total span{ color:var(--c-ink); font-weight:700; }
.sfp-adj-head{ display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:10px; font-weight:700; }
.sfp-adjs{ display:flex; flex-wrap:wrap; gap:6px; }
.sfp-adjs .chip{ gap:4px; padding-right:4px; }
.sfp-adjs .btn-icon{ width:32px; height:32px; min-height:32px; }
.sfp-leave{ margin:8px 0; font-size:14px; line-height:22px; color:var(--c-ink-2); }
.sfp-leave .ph{ margin-right:6px; vertical-align:-2px; }
.sfp-day{ display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"d a" "t s"; gap:6px 12px; padding:12px 0; border-top:1px solid rgba(35,31,32,.08); align-items:center; }
@media (min-width:768px){ .sfp-day{ grid-template-columns:minmax(150px,1.2fr) 124px minmax(160px,1fr) auto; grid-template-areas:"d t s a"; gap:8px 16px; } }
.sfp-day-d{ grid-area:d; display:flex; flex-direction:column; min-width:0; }
.sfp-day-d small{ font-size:13px; color:var(--c-muted); }
.sfp-day-t{ grid-area:t; display:flex; align-items:center; }
.sfp-day-s{ grid-area:s; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; min-width:0; }
.sfp-day.is-issue{ box-shadow:inset 3px 0 0 var(--c-danger); padding-left:12px; }
.sfp-day-t .num{ font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.sfp-day-a{ grid-area:a; display:flex; gap:6px; justify-content:flex-end; }
.sfp-panel form{ gap:12px; }
.sfp-foot-r{ display:flex; gap:8px; }
.sfp-text{ width:100%; border-radius:var(--r-16); padding:12px; background:var(--c-surface-2); font:inherit; font-size:14px; line-height:20px; resize:vertical; }
.sfp-bar{ position:static; justify-content:flex-end; padding:0; background:none; backdrop-filter:none; }   /* ไม่ลอยทับรายชื่อ */
.sfp-days .btn-sm, .sfp-pay .btn-sm{ height:40px; min-height:40px; padding:0 14px; font-size:14px; }

/* ---------- 9h) Staffr รอบ 3 (25 พ.ย. · PDF "Your_paragraph_text_17") ---------- */
/* แถวพนักงาน: โควตาลา + ผ่าน/ไม่ผ่านทดลองงานบนแถว */
.sfo-rowwrap{ display:flex; flex-direction:column; min-width:0; }
.sfo-quota{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; margin-top:6px; font-size:13px; color:var(--c-ink-2); }
.sfo-quota .ph{ color:var(--c-muted); }
.sfo-quota b{ font-weight:700; color:var(--c-ink); }
.sfo-quota .is-low b{ color:var(--c-warning, #B45309); }
.sfo-quota .is-out b{ color:var(--c-danger); }
.sfo-rowprob{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; margin:0 0 12px; padding:10px 12px; border-radius:16px; background:var(--c-info-soft, #E8F0FE); font-size:14px; }
.sfo-rowprob > span:first-child{ display:inline-flex; align-items:center; gap:6px; }
.sfo-rowprob-act{ display:flex; gap:8px; }
.sfo-rowprob .btn-sm{ height:40px; min-height:40px; padding:0 14px; font-size:14px; }
@media (max-width:480px){ .sfo-rowprob-act{ width:100%; } .sfo-rowprob-act .btn{ flex:1 1 0; } }
.sfo-prob-new{ display:flex; flex-direction:column; gap:6px; padding-top:6px; border-top:1px solid rgba(35,31,32,.08); }
/* การ์ดวันนี้ที่ร้าน: พับคนเกิน */
.sfs-now-h small{ font-weight:600; opacity:.8; }
.sfs-now-more{ display:inline-flex; align-items:center; min-height:36px; padding:6px 12px; border-radius:12px; background:var(--c-ink); color:#FFF; font-size:13px; font-weight:700; }
/* เงินเดือน: มุมมอง รายคน / ตามวัน / สรุปสาย-ขาด */
.sfp-views{ display:flex; flex-wrap:wrap; gap:8px; }
.sfp-views .chip{ gap:6px; }
.sfp-byday{ gap:6px; padding:16px 20px; }
.sfp-byday .card-head{ flex-wrap:wrap; gap:8px 12px; }
.sfp-dgroup{ display:flex; flex-direction:column; padding:2px 16px 4px; margin-top:12px; border-radius:20px; background:var(--c-bg); }
.sfp-byday-hint{ margin:0 0 2px; }
.sfp-dg-chips{ margin-left:auto; display:flex; flex-wrap:wrap; gap:6px; }
.sfp-dgroup-h{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; padding:12px 0 8px; }
.sfp-dgroup-h strong{ font-size:16px; }
.sfp-dgroup .sfp-day:first-of-type{ border-top:0; }
.sfp-byday .btn-sm, .sfp-dgroup .btn-sm{ height:40px; min-height:40px; padding:0 14px; font-size:14px; }
.sfp-att-cs{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.sfp-att-c{ display:inline-flex; align-items:baseline; gap:4px; padding:4px 10px; border-radius:var(--r-pill); font-size:13px; background:var(--c-bg); color:var(--c-ink-2); }
.sfp-att-c strong{ font-size:15px; color:var(--c-ink); }
.sfp-att-c[data-tone="warning"]{ background:#FEF3C7; }
.sfp-att-c[data-tone="danger"]{ background:#FEE2E2; }
.sfp-att-c[data-tone="danger"] strong{ color:var(--c-danger); }
.sfp-att-c[data-tone="info"]{ background:#E0EAFF; }
.sfp-att-c[data-tone="success"]{ background:#DCFCE7; color:#166534; }
.sfp-att-note{ padding:8px 0 12px; }
.sfp-slip-act{ display:flex; flex-wrap:wrap; gap:8px; margin-top:4px; }
/* แผ่นใส่เวลา / ลา */
.sfp-modes{ display:flex; flex-wrap:wrap; gap:8px; }
.sfp-modes .chip{ min-height:44px; }
.sfp-mark-info{ display:flex; gap:8px; align-items:flex-start; padding:10px 12px; border-radius:14px; background:var(--c-bg); font-size:14px; line-height:20px; }
.sfp-mark-info .ph{ flex:0 0 auto; margin-top:2px; }
.sfp-mark-info.is-danger{ background:#FEE2E2; color:#7F1D1D; }
/* พรีวิว สปส. 1-10 */
.sfs-panel.sfp-panel-wide{ width:min(980px,100%); }
.sfp-panel h2 .ph{ margin-right:6px; vertical-align:-2px; }
.sfp-sso-wrap{ overflow-x:auto; border:1px solid var(--c-line); border-radius:16px; -webkit-overflow-scrolling:touch; }
.sfp-sso{ width:100%; border-collapse:collapse; font-size:14px; min-width:760px; }
.sfp-sso th{ background:var(--c-ink); color:#FFF; font-weight:700; text-align:left; padding:10px; white-space:nowrap; }
.sfp-sso td{ padding:10px; border-top:1px solid var(--c-line); white-space:nowrap; }
.sfp-sso td.num, .sfp-sso th:nth-child(n+4){ text-align:right; }
.sfp-sso tr.is-bad td{ background:#FEF2F2; }
.sfp-sso-tiles .sfs-tile{ background:var(--c-bg); }

/* สลิป PDF: ซ่อนบนจอ · ตอนพิมพ์ซ่อนทุกอย่างที่เหลือ */
.poco-print{ display:none; }
@media print{
  body.is-printing > *:not(.poco-print){ display:none !important; }
  body.is-printing .poco-print{ display:block !important; }
  body.is-printing{ background:#FFF !important; }
}
.pslip{ position:relative; color:#111; font-size:12pt; line-height:1.45; }
.pslip-wm{ position:fixed; top:40%; left:0; right:0; text-align:center; font-size:44pt; font-weight:700; color:rgba(220,38,38,.12); transform:rotate(-24deg); pointer-events:none; }
.pslip-page{ max-width:180mm; margin:0 auto; padding:8mm 0; }
.pslip-break{ break-before:page; page-break-before:always; }
.pslip h1{ font-size:20pt; text-align:center; margin:0; }
.pslip h2{ font-size:13pt; margin:0 0 8px; }
.pslip-shop{ text-align:center; color:#555; margin:2px 0 12px; }
.pslip hr{ border:0; border-top:1px dashed #999; margin:8px 0; }
.pslip-kv{ display:flex; justify-content:space-between; gap:16px; padding:2px 0; }
.pslip-kv span{ color:#333; }
.pslip-kv strong{ font-variant-numeric:tabular-nums; text-align:right; }
.pslip-kv.is-total{ font-size:16pt; padding-top:6px; }
.pslip-foot{ margin-top:14px; font-size:9pt; color:#666; text-align:center; }
.pslip-table{ width:100%; border-collapse:collapse; font-size:9.5pt; }
.pslip-table th, .pslip-table td{ border:1px solid #999; padding:4px 5px; text-align:left; vertical-align:top; }
.pslip-table th{ background:#EEE; }
.pslip-table td.num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.pslip-table tfoot td{ font-weight:700; background:#F6F6F6; }
.pslip-table tr{ break-inside:avoid; }
.sfp-dgroup.is-folded{ padding-top:2px; padding-bottom:2px; }
.sfp-dgroup-t{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; width:100%; min-height:44px; text-align:left; }
.sfp-dgroup-t .ph{ margin-left:auto; color:var(--c-muted); }
/* เงินเบิกล่วงหน้า (รอบ 3) */
.sfp-advreqs{ gap:10px; padding:16px 20px; }
.sfp-advreqs .card-head{ flex-wrap:wrap; gap:4px 12px; }
.sfp-advreqs .card-head h2{ display:flex; align-items:center; gap:8px; font-size:18px; }
.sfp-adv{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; padding:10px 0; border-top:1px solid rgba(35,31,32,.08); }
.sfp-adv-main{ display:flex; flex-direction:column; gap:2px; min-width:0; flex:1 1 220px; }
.sfp-adv-main small{ font-size:13px; color:var(--c-ink-2); overflow-wrap:anywhere; }
.sfp-adv-act{ display:flex; gap:6px; }
.sfp-adv-act .btn-sm{ height:40px; min-height:40px; padding:0 12px; font-size:14px; }
.sfp-check, .sfk-check{ display:flex; gap:10px; align-items:flex-start; font-size:15px; line-height:22px; cursor:pointer; }
.sfp-check input, .sfk-check input{ width:22px; height:22px; flex:0 0 auto; margin-top:1px; accent-color:var(--c-ink); }
.sfk-check{ padding:12px 14px; border-radius:16px; background:var(--c-bg); font-size:16px; }
.sfk-check input{ width:26px; height:26px; }
.sfk-adv-note{ text-align:center; }
.sfk-req-bar{ flex-wrap:wrap; }
.pslip-sign{ display:flex; justify-content:space-between; gap:24px; margin-top:48px; text-align:center; }
.sfp-panel .chips{ flex-wrap:wrap; overflow:visible; }
.sfp-panel .chips .chip{ white-space:normal; text-align:left; }

/* =========================================================
   11) M0 MOTION FOUNDATION (transform + opacity only)
   ---------------------------------------------------------
   รากฐาน motion กลาง: แตะเฉพาะ transform กับ opacity (GPU-friendly)
   นุ่มนวล ไม่มีกรอบดำหนาหรือเงาแข็ง · ปุ่มหน้าบาร์ >=56px / แป้น 72px คงเดิม
   ========================================================= */
@keyframes poco-fade-in{ from{ opacity:0; } to{ opacity:1; } }
@keyframes poco-view-in{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:translateY(0); } }
@keyframes poco-sheet-up{ from{ opacity:0; transform:translateY(20px); } to{ opacity:1; transform:translateY(0); } }
@keyframes poco-pop-in{ from{ opacity:0; transform:translateY(8px) scale(.97); } to{ opacity:1; transform:translateY(0) scale(1); } }
@keyframes poco-pulse{ 0%,100%{ opacity:.45; } 50%{ opacity:.9; } }

/* แรงตอบสนองตอนกด: ปุ่ม · ชิป · แถบแท็บ · เมนูหลัก */
.btn{
  transition:transform var(--t-fast) var(--ease-smooth), opacity var(--t-fast) var(--ease-smooth);
}
.btn:active:not([disabled]){ transform:scale(.96); }

.chip, .tabs > button, .segment > button, .sfs-offmode, .rcp-seg > button,
.pin-btn, .side-item, .nav-item, .sfs-chip{
  transition:transform var(--t-fast) var(--ease-smooth);
}
.chip:active:not([disabled]), .tabs > button:active:not([disabled]),
.segment > button:active:not([disabled]), .sfs-offmode:active:not([disabled]),
.rcp-seg > button:active:not([disabled]), .pin-btn:active:not([disabled]),
.side-item:active:not([disabled]), .nav-item:active:not([disabled]),
.sfs-chip:active:not([disabled]){ transform:scale(.97); }

/* แถวและรายการที่กดได้ */
button.row, a.row, .row[role="button"], .row[tabindex],
.stk-item, .sfo-row, .bar-pick, button.stat, button.sum-card,
button.launch, a.launch, .ws-pick, .sfs-opt{
  transition:transform var(--t-fast) var(--ease-smooth), opacity var(--t-fast) var(--ease-smooth);
}
button.row:active:not([disabled]), a.row:active:not([disabled]),
.row[role="button"]:active:not([disabled]), .row[tabindex]:active:not([disabled]),
.stk-item:active:not([disabled]), .sfo-row:active:not([disabled]),
.bar-pick:active:not([disabled]), button.stat:active:not([disabled]),
button.sum-card:active:not([disabled]), button.launch:active:not([disabled]),
a.launch:active:not([disabled]), .ws-pick:active:not([disabled]),
.sfs-opt:active:not([disabled]){ transform:scale(.985); opacity:.86; }

/* แป้นนับ / แป้น PIN 72px: ชัดเจนแต่ไม่หน่วง (t-press 60ms) */
.stepper-72 > button{
  touch-action:manipulation;
  transition:transform var(--t-press) var(--ease-smooth), opacity var(--t-press) var(--ease-smooth);
}
.stepper-72 > button:active:not([disabled]){ transform:scale(.93); opacity:.86; }
.sfk-key{
  transition:transform var(--t-press) var(--ease-smooth), opacity var(--t-press) var(--ease-smooth);
}
.sfk-key:active:not([disabled]){ transform:scale(.94); opacity:.86; }

/* สถานะ disabled / loading */
.btn[disabled], .chip[disabled], .stepper-72 > button[disabled],
.tabs > button[disabled], .sfk-key[disabled], .sfs-opt[disabled]{
  opacity:.45; pointer-events:none; transform:none;
}
.btn[aria-busy="true"], .is-loading{ opacity:.68; pointer-events:none; }
[aria-busy="true"]{ transition:opacity var(--t-base) var(--ease-smooth); }

/* Sheet (.sfs-sheet) · Modal · Drawer · Toast · Dropdown · View */
.sfs-scrim, .rcp-modal-backdrop{ animation:poco-fade-in var(--t-base) var(--ease-smooth) both; }
.sfs-panel{ animation:poco-sheet-up var(--t-slow) var(--ease-smooth) both; }
@media (min-width:768px){
  .sfs-panel{ animation:poco-pop-in var(--t-base) var(--ease-spring) both; }
}
.rcp-modal{ animation:poco-pop-in var(--t-base) var(--ease-spring) both; }

.drawer{ transition:opacity var(--t-base) var(--ease-smooth); }
.drawer-panel{ transition:transform var(--t-slow) var(--ease-smooth); }
@media (min-width:768px){
  .drawer-panel{ transition:transform var(--t-base) var(--ease-spring); }
}

.toast{
  transform:translate(-50%, 10px) scale(.98);
  transition:opacity var(--t-base) var(--ease-smooth), transform var(--t-base) var(--ease-spring);
}
.toast.show{ opacity:1; transform:translate(-50%, 0) scale(1); }

.stk-add-menu, .combo-list:not([hidden]){ animation:poco-pop-in var(--t-fast) var(--ease-smooth) both; }
.stk-detail-page{ animation:poco-view-in var(--t-base) var(--ease-smooth) both; }
.sfk-done{ animation:poco-pop-in var(--t-base) var(--ease-spring) both; }

/* Primitive สำหรับ M1+ และสลับมุมมอง/แท็บ */
.m-enter{ animation:poco-view-in var(--t-base) var(--ease-smooth) both; }
.m-fade{ animation:poco-fade-in var(--t-fast) var(--ease-smooth) both; }
.m-pop{ animation:poco-pop-in var(--t-base) var(--ease-spring) both; }

/* Skeleton แบบเบา (opacity-only pulse) */
.skel{ display:block; background:var(--c-surface-2); border-radius:var(--r-16); animation:poco-pulse 1.4s ease-in-out infinite; }
.skel-line{ height:14px; border-radius:var(--r-pill); }
.skel-line-lg{ height:24px; border-radius:var(--r-pill); }
.skel-line-sm{ height:12px; width:60%; border-radius:var(--r-pill); }
.skel-card{ min-height:96px; border-radius:var(--r-24); }
.skel-circle{ width:44px; height:44px; border-radius:50%; flex:0 0 auto; }
.skel-btn{ height:var(--tap); border-radius:var(--r-pill); }

/* M0.5 Interactive Motion (Duolingo × Dime · ไม่เปลี่ยน layout / ไม่เปลี่ยนดีไซน์ Mascot & Logo) */
@keyframes poco-ripple{
  from{ transform:translate(-50%,-50%) scale(0); opacity:.34; }
  to{ transform:translate(-50%,-50%) scale(2.6); opacity:0; }
}
@keyframes poco-bump{
  0%{ transform:scale(1); }
  40%{ transform:scale(1.13); }
  100%{ transform:scale(1); }
}
@keyframes poco-dot-pop{
  0%{ transform:scale(.55); }
  55%{ transform:scale(1.25); }
  100%{ transform:scale(1); }
}
@keyframes poco-bar-grow{
  from{ transform:scaleX(0); }
  to{ transform:scaleX(1); }
}
@keyframes poco-mascot-greet{
  0%{ opacity:0; transform:translateY(6px) scale(.92) rotate(-3deg); }
  50%{ opacity:1; transform:translateY(-4px) scale(1.05) rotate(3deg); }
  100%{ opacity:1; transform:translateY(0) scale(1) rotate(0deg); }
}
@keyframes poco-mascot-jump{
  0%{ transform:translateY(8px) scale(.9); opacity:0; }
  45%{ transform:translateY(-10px) scale(1.08) rotate(-4deg); opacity:1; }
  75%{ transform:translateY(2px) scale(.97) rotate(3deg); }
  100%{ transform:translateY(0) scale(1) rotate(0deg); opacity:1; }
}
@keyframes poco-toast-pop{
  0%{ opacity:0; transform:translate(-50%, 14px) scale(.94); }
  65%{ opacity:1; transform:translate(-50%, -2px) scale(1.02); }
  100%{ opacity:1; transform:translate(-50%, 0) scale(1); }
}

.m-ripple-host{ position:relative; overflow:hidden; }
.m-ripple{
  position:absolute; border-radius:50%; pointer-events:none;
  background:currentColor; animation:poco-ripple 440ms var(--ease-smooth) forwards;
  will-change:transform, opacity;
}
.m-bump{ animation:poco-bump 200ms var(--ease-spring); }

/* ฐานนุ่มแบบสัมผัสได้บนแป้น 72px (ไม่มีกรอบดำหนา/เงาแข็ง) */
.stepper-72 > button, .sfk-key{
  box-shadow:inset 0 0 0 1px var(--c-line), 0 3px 0 rgba(35,31,32,.10), var(--shadow-soft);
}
.stepper-72 > button:last-child{
  box-shadow:0 3px 0 rgba(0,0,0,.28), var(--shadow-soft);
}
.stepper-72 > button:active:not([disabled]), .sfk-key:active:not([disabled]){
  transform:translateY(3px) scale(.94);
  box-shadow:inset 0 0 0 1px var(--c-line);
}
.stepper-72 > button:last-child:active:not([disabled]){
  box-shadow:none;
}

/* จุด PIN เด้งรับทีละจุด */
.sfk-dots span.on{ animation:poco-dot-pop 220ms var(--ease-spring); }

/* Toast & Popups: เด้งเข้าจังหวะเดียวกันทั้งแอป */
.toast.show.is-pop{ animation:poco-toast-pop 260ms var(--ease-spring) both; }
.toast.show .toast-pose{ transform-origin:center bottom; animation:poco-mascot-jump 520ms var(--ease-spring); }
.rcp-pop-panel{ animation:poco-pop-in var(--t-base) var(--ease-spring) both; }

/* Mascot Animation (คงดีไซน์เดิม 100%) */
.hero-pose{ transform-origin:center bottom; animation:poco-mascot-greet 560ms var(--ease-spring) both; }
.sfk-done-pose{ transform-origin:center bottom; animation:poco-mascot-jump 620ms var(--ease-spring) both; }
.empty-state .pose{ transform-origin:center bottom; animation:poco-mascot-greet 520ms var(--ease-spring) both; }

/* กราฟแท่ง & แถบสัดส่วนค่อยๆ ยืดขึ้น */
.bar-fill, .rcp-sales-mix-track > span, .seg-bar span.on{
  transform-origin:left center;
  animation:poco-bar-grow 460ms var(--ease-smooth) both;
}

/* การ์ด Bento เข้าแบบไล่ลำดับ (จำกัด 6 ชิ้นแรก) */
.home-cards > *, .stk-stats-5 > *, .rcp-sales-kpis > *, .wr-bars > *{
  animation:poco-view-in var(--t-base) var(--ease-smooth) both;
}
.home-cards > *:nth-child(2), .stk-stats-5 > *:nth-child(2), .rcp-sales-kpis > *:nth-child(2), .wr-bars > *:nth-child(2){ animation-delay:35ms; }
.home-cards > *:nth-child(3), .stk-stats-5 > *:nth-child(3), .rcp-sales-kpis > *:nth-child(3), .wr-bars > *:nth-child(3){ animation-delay:70ms; }
.home-cards > *:nth-child(4), .stk-stats-5 > *:nth-child(4), .rcp-sales-kpis > *:nth-child(4), .wr-bars > *:nth-child(4){ animation-delay:105ms; }
.home-cards > *:nth-child(5), .stk-stats-5 > *:nth-child(5), .rcp-sales-kpis > *:nth-child(5), .wr-bars > *:nth-child(5){ animation-delay:140ms; }
.home-cards > *:nth-child(6), .stk-stats-5 > *:nth-child(6), .rcp-sales-kpis > *:nth-child(6), .wr-bars > *:nth-child(6){ animation-delay:175ms; }

/* ========== Transitions & Morphing (Crisp Spring Pop + Blur ทุกขนาดจอ · Sliding Pill · Page Slide) ========== */
.shell-main{ overflow-x:clip; }

@keyframes poco-spring-pop{ from{ opacity:0; transform:translateY(10px) scale(.92); } to{ opacity:1; transform:translateY(0) scale(1); } }
@keyframes poco-page-right{ from{ opacity:0; transform:translateX(18px); } to{ opacity:1; transform:translateX(0); } }
@keyframes poco-page-left{ from{ opacity:0; transform:translateX(-18px); } to{ opacity:1; transform:translateX(0); } }

/* Crisp Spring Pop (ทุกขนาดจอ) · เลิกใช้ backdrop blur: วัดแล้วทำให้เฟรมแรกตอนเปิด popup ค้าง ~70ms (ไม่เบลอ = 7ms) */
.sfs-panel, .rcp-pop-panel, .rcp-modal{
  animation:poco-spring-pop 260ms var(--ease-spring) both;
}
.drawer-panel{
  transform:translateY(14px) scale(.95); opacity:0;
  transition:transform 260ms var(--ease-spring), opacity 180ms ease;
}
.drawer.open .drawer-panel{ transform:translateY(0) scale(1); opacity:1; }
@media (min-width:768px){
  .drawer-panel{ transform:translate(-50%,-47%) scale(.93); }
  .drawer.open .drawer-panel{ transform:translate(-50%,-50%) scale(1); }
}

/* Sliding Pill Morph */
.m-pill-parent{ position:relative !important; }
.m-pill-parent > button{ position:relative; z-index:1; }
.m-pill-sliding{ background:transparent !important; box-shadow:none !important; }
.m-slide-pill{
  position:absolute; left:0; z-index:0; border-radius:var(--r-pill); pointer-events:none;
  transition:transform 260ms var(--ease-spring), width 260ms var(--ease-spring);
  will-change:transform, width;
}

/* Page Cross-Fade & Directional Slide */
.m-page-right{ animation:poco-page-right 260ms var(--ease-smooth) both; }
.m-page-left{ animation:poco-page-left 260ms var(--ease-smooth) both; }

/* Reduce motion overrides stay at bottom */
/* =========================================================
   Step 21 · TASKR (ภารกิจเปิด-ปิดร้าน + ตรวจมาตรฐาน QC)
   ========================================================= */
.tk-page{ display:grid; gap:var(--s-4); padding-bottom:var(--s-6); min-width:0; }
.tk-stack{ display:grid; gap:var(--s-4); min-width:0; }
.tk-muted{ font-size:14px; color:var(--c-muted); margin:0; }

/* แถบเลือกผู้ปฏิบัติงาน (หน้าบาร์ · 1 แตะ · แถวเดียว เลื่อนข้างได้เมื่อคนเยอะ) */
.tk-staff-bar{ display:flex; align-items:center; gap:10px; min-width:0; }
.tk-staff-meta{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.tk-lbl{ font-size:14px; font-weight:700; color:var(--c-ink-2); flex:none; }
.tk-staff-chips{ display:flex; flex-wrap:nowrap; gap:8px; overflow-x:auto; min-width:0; scrollbar-width:none; padding:2px 0; }
.tk-staff-chips::-webkit-scrollbar{ display:none; }
.tk-staff-chip{ min-height:48px; padding:0 16px; display:inline-flex; align-items:center; gap:8px; font-size:15px; flex:none; background:var(--c-surface); }
.tk-live-dot{ width:8px; height:8px; border-radius:50%; background:var(--c-success); flex:none; }
.tk-staff-chip[aria-pressed="true"] .tk-live-dot{ background:#6EE7B7; }

/* Progress Hero หน้าบาร์ */
.tk-hero-bar{ background:linear-gradient(145deg, var(--g-people) 0%, #482CA4 100%); color:#FFF; }
.tk-hero-bar .hero-label,.tk-hero-bar .hero-unit{ color:rgba(255,255,255,.85); }
.tk-progress-wrap{ margin-top:4px; }
.tk-progress-track{ height:10px; border-radius:var(--r-pill); background:rgba(255,255,255,.22); overflow:hidden; }
.tk-progress-fill{ display:block; height:100%; border-radius:inherit; background:#FFF; transition:width 360ms var(--ease-smooth); }
.tk-progress-fill.is-done{ background:#6EE7B7; }
.tk-celebrate{
  margin-top:10px; padding:10px 14px; border-radius:var(--r-16); background:rgba(255,255,255,.16);
  display:flex; align-items:center; gap:10px; font-size:14px; font-weight:600;
  animation:poco-spring-pop 280ms var(--ease-spring) both;
}
.tk-celebrate .ph{ font-size:20px; color:#6EE7B7; }

/* Tabs (ล้น 375px ไม่ได้ · กว้างเท่าจอ) */
.tk-owner-tabs{ max-width:100%; overflow-x:auto; scrollbar-width:none; }
.tk-tab-cnt{
  font-size:12px; font-weight:700; padding:1px 7px; border-radius:var(--r-pill);
  background:rgba(35,31,32,.10); color:var(--c-ink);
}
.tabs > button[aria-selected="true"] .tk-tab-cnt{ background:rgba(255,255,255,.22); color:#FFF; }
.tk-tab-cnt.is-urgent{ background:var(--c-danger); color:#FFF; }
/* แท็บช่วงเวลาหน้าบาร์: 4 ช่องเท่ากัน ไม่เลื่อน · ชื่อ + สถานะ 2 บรรทัด */
.mod-taskr .tk-tabs{ display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:2px; max-width:100%; overflow:visible; }
.mod-taskr .tk-tabs > button,
body[data-role="bar"] .mod-taskr .tk-tabs > button{
  flex-direction:column; gap:2px; height:auto; min-height:var(--tap-bar); padding:6px 4px; white-space:normal; min-width:0;
}
.tk-tab-name{ font-size:15px; font-weight:700; line-height:1.15; text-align:center; }
.tk-tab-sub{ font-size:12px; font-weight:600; line-height:1.1; color:var(--c-muted); white-space:nowrap; }
.tk-tab-sub.is-done{ color:var(--c-success); }
.tk-tab-sub.is-urgent{ color:var(--c-brand-strong); }
.tk-tabs > button[aria-selected="true"] .tk-tab-sub{ color:var(--on-ink-muted); }
.tk-tabs > button[aria-selected="true"] .tk-tab-sub.is-done{ color:var(--on-ink-success); }
.tk-tabs > button[aria-selected="true"] .tk-tab-sub.is-urgent{ color:var(--on-ink-danger); }
@media (max-width:400px){ .tk-tab-name{ font-size:14px; } }

/* ของฉัน / ทั้งหมด */
.tk-scope{ display:flex; align-items:center; justify-content:space-between; gap:8px 12px; flex-wrap:wrap; }
.mod-taskr .tk-scope-seg{ display:inline-grid; grid-template-columns:repeat(2, auto); }
.mod-taskr .tk-scope-seg > button,
body[data-role="bar"] .mod-taskr .tk-scope-seg > button{ min-height:48px; height:48px; padding:0 18px; flex:none; font-size:15px; }
.tk-scope-hint{ font-size:13px; color:var(--c-muted); }

/* ป้ายผู้รับผิดชอบ */
.tk-who{
  display:inline-flex; align-items:center; gap:4px; padding:2px 10px; border-radius:var(--r-pill);
  font-size:12px; font-weight:600; line-height:20px; background:var(--c-surface-2); color:var(--c-ink-2);
}
.tk-who.is-assigned{ background:var(--c-people-tint, #EEE8FF); color:var(--g-people); }
.tk-who .ph{ font-size:14px; }

/* การ์ดงานหน้าบาร์ (ปุ่ม ≥ 56px) */
.tk-task-list{ display:grid; gap:12px; }
.tk-task{ display:flex; flex-direction:column; gap:12px; padding:14px 16px; transition:background .15s, border-color .15s; }
@media (min-width:768px){ .tk-task{ flex-direction:row; align-items:center; justify-content:space-between; } }
.tk-task.is-done{ background:#F7FBF8; }
.tk-task.is-issue{ background:#FFF6F6; }
.tk-task-main{ display:flex; align-items:flex-start; gap:12px; flex:1 1 auto; min-width:0; }
.tk-check-btn{
  min-width:var(--tap-bar); min-height:var(--tap-bar); width:var(--tap-bar); height:var(--tap-bar);
  border-radius:var(--r-16); background:var(--c-surface-2); color:var(--c-ink);
  display:inline-flex; align-items:center; justify-content:center; flex:none; font-size:24px;
  transition:transform 120ms var(--ease-out), background 160ms ease;
}
.tk-check-btn:active{ transform:scale(.95); }
.tk-check-btn.is-done{ background:var(--c-success); color:#FFF; animation:poco-dot-pop 240ms var(--ease-spring); }
.tk-check-btn.is-issue{ background:var(--c-danger-tint); color:var(--c-danger); }
.tk-check-ring{ width:22px; height:22px; border-radius:50%; border:2px solid var(--c-muted); display:inline-block; }
.tk-check-num{ font-size:12px; font-weight:700; line-height:1.15; text-align:center; }

.tk-task-body{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:4px; }
.tk-task-tags{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.tk-task-rec{ font-size:12px; font-weight:600; color:var(--c-muted); }
.tk-task-title{ font-size:16px; line-height:22px; font-weight:700; margin:0; word-break:break-word; }
.tk-task.is-done .tk-task-title{ text-decoration:line-through; color:var(--c-muted); }
.tk-task-note{ font-size:13px; line-height:18px; color:var(--c-ink-2); margin:0; }
.tk-task-note.is-issue{ color:var(--c-danger); font-weight:600; }
.tk-task-by{ font-size:12px; font-weight:700; color:var(--c-success); margin:0; }
.tk-task-by.is-issue{ color:var(--c-danger); }

.tk-task-acts{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
body[data-role="bar"] .mod-taskr .tk-act-btn{ min-height:var(--tap-bar); padding:0 14px; font-size:14px; flex:1 1 auto; }
@media (min-width:768px){ body[data-role="bar"] .mod-taskr .tk-act-btn{ flex:0 0 auto; } }
.tk-issue-btn{ background:var(--c-danger-tint); color:var(--c-danger); }
.tk-issue-btn.is-active{ background:var(--c-danger); color:#FFF; }

/* ฝั่งเจ้าของ: Live / QC Audit / Setup / History */
.tk-hero-actions{ display:flex; flex-wrap:wrap; gap:8px; margin-top:4px; }
.tk-ghost-on-ink{ background:rgba(255,255,255,.14); color:#FFF; }
.tk-ghost-on-ink:hover{ background:rgba(255,255,255,.22); }
.tk-empty-acts{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }

.tk-alerts h2{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:16px; margin:0; }
.tk-alert-list{ display:grid; gap:10px; }
.tk-alert-row{
  background:var(--c-surface); border-radius:var(--r-16); padding:12px 14px;
  display:flex; flex-direction:column; gap:10px;
}
@media (min-width:768px){ .tk-alert-row{ flex-direction:row; align-items:center; justify-content:space-between; } }
.tk-alert-note{ font-size:13px; font-weight:600; color:var(--c-danger); margin:2px 0; }

.tk-live-grid{ display:grid; grid-template-columns:1fr; gap:var(--s-4); }
@media (min-width:768px){ .tk-live-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.tk-period-card{ min-width:0; }
.tk-live-rows{ margin-top:4px; }
.tk-live-item{ display:flex; align-items:flex-start; gap:10px; padding:10px 0; }
.tk-st-ic{ font-size:18px; color:var(--c-muted); flex:none; margin-top:2px; }
.tk-st-ic.is-done{ color:var(--c-success); }
.tk-st-ic.is-issue{ color:var(--c-danger); }
.tk-live-info{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.tk-live-title{ font-size:14px; font-weight:600; word-break:break-word; }
.tk-live-who{ font-size:12px; font-weight:600; color:var(--c-muted); white-space:nowrap; flex:none; }

/* Manager QC Audit */
.tk-qc-group-title{ display:flex; align-items:center; gap:8px; color:var(--g-people); margin:0; font-size:16px; }
.tk-qc-list{ display:grid; gap:10px; }
.tk-qc-item{
  background:var(--c-bg); border-radius:var(--r-16); padding:12px 14px;
  display:grid; gap:10px;
}
.tk-qc-item.is-pass{ background:#F3FBF6; }
.tk-qc-item.is-fail{ background:#FFF5F5; }
.tk-qc-top{ display:flex; flex-direction:column; gap:10px; }
@media (min-width:768px){ .tk-qc-top{ flex-direction:row; align-items:center; justify-content:space-between; } }
.tk-qc-title{ font-size:15px; font-weight:600; flex:1 1 auto; min-width:0; }
.tk-qc-btns{ display:flex; gap:8px; flex:none; }
.tk-qc-btn{ min-height:44px; padding:0 14px; }
.tk-qc-btn.is-pass{ background:var(--c-surface); color:var(--c-success); }
.tk-qc-btn.is-pass[aria-pressed="true"]{ background:var(--c-success); color:#FFF; }
.tk-qc-btn.is-fail{ background:var(--c-surface); color:var(--c-danger); }
.tk-qc-btn.is-fail[aria-pressed="true"]{ background:var(--c-danger); color:#FFF; }
.tk-qc-fail-box{ display:flex; flex-direction:column; gap:8px; }
@media (min-width:768px){ .tk-qc-fail-box{ flex-direction:row; align-items:center; } }
.tk-qc-note-box{ flex:1 1 auto; min-width:0; background:var(--c-surface); border:0; border-radius:var(--r-16); }
.tk-qc-note-view{ font-size:13px; color:var(--c-muted); margin:0; }

/* Setup & Templates */
.tk-setup-head{ display:flex; flex-direction:column; gap:12px; }
.mod-taskr .tk-setup-seg{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); overflow:visible; }
.mod-taskr .tk-setup-seg > button{ height:auto; min-height:44px; padding:6px 10px; white-space:normal; line-height:1.2; }
.tk-setup-tools{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.tk-setup-filters{ flex-wrap:wrap; }
.tk-setup-filters .chip{ min-height:40px; display:inline-flex; align-items:center; gap:6px; background:var(--c-surface-2); }
.tk-setup-filters .chip[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }
.tk-add-btn{ min-height:48px; }
.tk-tpl-list{ display:grid; gap:var(--s-5); }
.tk-tpl-group{ display:grid; gap:8px; min-width:0; }
.tk-tpl-group-head{ display:flex; align-items:baseline; gap:8px; padding:0 4px; }
.tk-tpl-group-head h2{ font-size:18px; line-height:1.3; margin:0; }
.tk-tpl-card{ padding:0; gap:0; overflow:hidden; }
.tk-tpl-row{ display:flex; align-items:center; gap:12px; padding:14px 12px 14px 20px; min-width:0; }
.tk-tpl-row + .tk-tpl-row{ border-top:1px solid var(--c-line); }
.tk-tpl-row.is-archived{ opacity:.7; }
.tk-tpl-info{ flex:1 1 auto; display:grid; gap:6px; min-width:0; }
.tk-tpl-title{ font-size:16px; font-weight:600; line-height:1.35; word-break:break-word; }
.tk-tpl-acts{ display:flex; gap:8px; flex:none; }
.tk-icon-btn{ width:44px; height:44px; border-radius:var(--r-pill); background:var(--c-surface-2); color:var(--c-ink); display:grid; place-items:center; flex:none; }
.tk-icon-btn.is-danger{ background:var(--c-danger-tint); color:var(--c-danger); }
.tk-icon-btn:disabled{ opacity:.3; cursor:default; }

/* ชุดงานสำเร็จรูป */
.tk-pack-card .card-head h2{ margin:0; font-size:18px; }
.tk-pack-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:12px; }
.tk-pack{ background:var(--c-bg); border-radius:var(--r-16); padding:14px; display:flex; flex-direction:column; gap:10px; min-width:0; }
.tk-pack p{ margin:0; font-size:13px; line-height:1.45; color:var(--c-ink-2); }
.tk-pack .btn{ margin-top:auto; min-height:44px; }
.tk-pack-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tk-lock{ color:var(--c-muted); display:inline-flex; }

/* วันนี้ · แยกตามคน */
.tk-people-card .card-head{ display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.tk-people-card .card-head h2{ margin:0; font-size:16px; }
.tk-person-list{ list-style:none; margin:0; padding:0; display:grid; gap:14px; }
.tk-person-row{ display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:4px 12px; align-items:center; }
.tk-person-name{ display:flex; align-items:center; gap:8px; min-width:0; }
.tk-person-name small{ font-size:12px; color:var(--c-muted); }
.tk-person-cnt{ grid-row:1; grid-column:2; font-weight:700; font-variant-numeric:tabular-nums; }
.tk-person-bar{ grid-column:1 / -1; height:8px; border-radius:var(--r-pill); background:var(--c-surface-2); overflow:hidden; }
.tk-person-bar span{ display:block; height:100%; border-radius:inherit; background:var(--g-people); transition:width 320ms var(--ease-smooth); }
.tk-person-row.is-done .tk-person-bar span{ background:var(--c-success); }
.tk-person-left{ grid-column:1 / -1; margin:0; font-size:13px; color:var(--c-muted); word-break:break-word; }
.tk-person-row.is-done .tk-person-left{ color:var(--c-success); font-weight:600; }

/* แผ่นเพิ่ม/แก้งาน */
.tk-sheet .tk-modal-head{ align-items:center; }
.tk-sheet .tk-modal-head h2{ margin:0; font-size:22px; }
.tk-sheet-grip{ width:44px; height:5px; border-radius:var(--r-pill); background:var(--c-line); margin:-8px auto 12px; }
@media (min-width:768px){ .tk-sheet-grip{ display:none; } }
.mod-taskr .tk-seg{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); }
.mod-taskr .tk-seg > button{ min-height:44px; padding:0 6px; }
.tk-dow-row{ display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:6px; margin-top:8px; }
.tk-dow{ height:44px; border-radius:var(--r-pill); background:var(--c-bg); color:var(--c-ink-2); font-size:14px; font-weight:600; }
.tk-dow[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }
.tk-dom{ margin-top:8px; }
.tk-type-grid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.tk-type-opt{
  min-height:64px; padding:10px 14px; border-radius:var(--r-16); background:var(--c-bg); border:2px solid transparent;
  text-align:left; display:flex; flex-direction:column; gap:2px; transition:border-color 160ms, background 160ms;
}
.tk-type-opt strong{ font-size:15px; }
.tk-type-opt span{ font-size:13px; color:var(--c-muted); }
.tk-type-opt[aria-pressed="true"]{ background:var(--c-surface); border-color:var(--c-ink); }
.tk-form-grid3{ margin-top:8px; }
.tk-who-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.tk-who-chips .chip{ min-height:44px; display:inline-flex; align-items:center; gap:6px; background:var(--c-bg); }
.tk-who-chips .chip[aria-pressed="true"]{ background:var(--g-people); color:#FFF; }
.tk-hint{ font-size:13px; color:var(--c-muted); margin:6px 0 0; }
.tk-sheet-acts{ display:grid; gap:8px; padding-top:4px; }
.tk-sheet-acts .btn-primary{ min-height:52px; }
.tk-del-link{ color:var(--c-brand-strong); }

/* History 7 วัน */
.tk-hist-kpis{ display:grid; grid-template-columns:1fr; gap:var(--s-4); }
@media (min-width:768px){ .tk-hist-kpis{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.tk-kpi{ gap:4px; }
.tk-kpi small{ font-size:13px; color:var(--c-muted); }
.tk-chart-bars{ display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:8px; align-items:end; padding-top:8px; }
.tk-chart-col{ display:flex; flex-direction:column; align-items:center; gap:4px; min-width:0; }
.tk-chart-pct{ font-size:12px; font-weight:700; font-variant-numeric:tabular-nums; }
.tk-chart-track{ width:100%; max-width:36px; height:120px; border-radius:12px 12px 6px 6px; background:var(--c-surface-2); display:flex; align-items:flex-end; overflow:hidden; }
.tk-chart-fill{ width:100%; border-radius:10px 10px 0 0; transition:height 400ms var(--ease-smooth); }
.tk-chart-fill.is-today{ background:var(--g-people); }
.tk-chart-fill.is-good{ background:var(--c-success); }
.tk-chart-fill.is-warn{ background:var(--c-warning); }
.tk-chart-day{ font-size:11px; font-weight:600; color:var(--c-muted); white-space:nowrap; }
.tk-chart-day.is-today{ color:var(--g-people); font-weight:700; }
.tk-chart-qc{ font-size:10px; font-weight:700; color:var(--g-people); white-space:nowrap; }

/* Modal & Crisp Spring Pop + Backdrop Blur */
.tk-scrim{
  position:fixed; inset:0; z-index:45; background:rgba(35,31,32,.56);
  display:flex; align-items:flex-end; justify-content:center; padding:0;
  animation:tk-scrim-in 180ms ease-out both;
}
@keyframes tk-scrim-in{ from{ opacity:0; } to{ opacity:1; } }
@media (min-width:768px){ .tk-scrim{ align-items:center; padding:20px; } }
.tk-modal{
  width:100%; max-width:480px; max-height:90vh; overflow:auto;
  border-radius:var(--r-32) var(--r-32) 0 0; padding:20px;
  animation:poco-spring-pop 260ms var(--ease-spring) both;
  will-change:transform, opacity; contain:layout paint; overscroll-behavior:contain;
}
@media (min-width:768px){ .tk-modal{ border-radius:var(--r-32); padding:24px; } }
.tk-modal-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.tk-modal-head h2{ font-size:20px; line-height:26px; font-weight:700; margin:6px 0 2px; }
.tk-modal-sub{ font-size:13px; color:var(--c-muted); margin:0; }
.tk-modal-frm{ padding-bottom:0; gap:14px; }
.tk-modal-frm .frm-bar{ position:static; padding:0; background:transparent; box-shadow:none; border:0; }
.tk-modal-frm textarea{ flex:1; min-width:0; padding:10px 12px; border:0; background:transparent; font:inherit; color:inherit; outline:none; resize:vertical; }
.fld-unit{ padding-right:12px; font-size:14px; font-weight:700; color:var(--c-muted); }
.tk-form-grid2{ display:grid; grid-template-columns:1fr; gap:10px; }
@media (min-width:500px){ .tk-form-grid2{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.tk-form-grid3{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
.tk-preset-chips{ flex-wrap:wrap; }
/* เลือกหมวด QC (ปุ่มแคปซูล · ตัวที่เลือก = พื้นดำ + ติ๊ก) */
.tk-grp-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.tk-grp-chip{
  display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 14px; border-radius:var(--r-pill);
  background:var(--c-bg); color:var(--c-ink); font-size:14px; font-weight:600; border:1.5px solid transparent;
  text-align:left; transition:background 160ms, color 160ms, border-color 160ms;
}
.tk-grp-chip small{ font-size:12px; font-weight:500; color:var(--c-muted); font-variant-numeric:tabular-nums; }
.tk-grp-chip i{ font-size:16px; flex:none; }
.tk-grp-chip .tk-grp-tick{ visibility:hidden; margin-right:-2px; }   /* จองที่ให้ติ๊กไว้ตลอด ปุ่มจะได้ไม่เปลี่ยนความกว้างตอนเลือก (กัน layout ขยับ) */
.tk-grp-chip[aria-pressed="true"] .tk-grp-tick{ visibility:visible; }
.tk-grp-chip.is-new .tk-grp-tick{ display:none; }
.tk-grp-slot{ min-height:calc(var(--tap) + 2px); display:flex; flex-direction:column; justify-content:center; }   /* จองที่ช่องพิมพ์ไว้ตลอด popup จะไม่สูง-เตี้ยสลับตอนกดหมวดใหม่ */
.tk-grp-slot .fld-box{ width:100%; }
.tk-grp-hint{ margin:0; padding:0 4px; font-size:13px; color:var(--c-muted); }
.tk-grp-chip[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }
.tk-grp-chip[aria-pressed="true"] small{ color:rgba(255,255,255,.72); }
.tk-grp-chip.is-new{ background:var(--c-surface); border:1.5px dashed var(--c-line); color:var(--g-people); }
.tk-grp-chip.is-new[aria-pressed="true"]{ background:var(--c-surface); border:1.5px solid var(--g-people); color:var(--g-people); }
.tk-num-preview{ display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:var(--r-16); font-size:13px; font-weight:600; }
.tk-num-preview.is-ok{ background:var(--c-success-tint); color:var(--c-success); }
.tk-num-preview.is-bad{ background:var(--c-danger-tint); color:var(--c-danger); }

/* ลดเฉพาะแอนิเมชันที่วนไม่หยุดหรือสั่นเมื่อเครื่องเปิด reduced-motion (คง micro-interaction นุ่มๆ ไว้ · ปิดทั้งหมดได้ที่ html[data-motion="off"]) */
@media (prefers-reduced-motion: reduce){
  .skel, .mod-loading .pose, .thud{ animation:none !important; }
  .stamp.go{ animation:stamp-fade 1200ms linear forwards !important; }
}
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after{
  animation-duration:1ms !important;
  animation-iteration-count:1 !important;
  transition-duration:1ms !important;
  scroll-behavior:auto !important;
}
html[data-motion="off"] .stamp.go{ animation:stamp-fade 1200ms linear forwards !important; }

/* =========================================================
   Ledgr (Step 22a–22c · สมุดเงินร้าน · Mockup รอบ 2 แบบ A Slate Blue)
   ========================================================= */
.mod-ledgr, .mod-closeshift{
  --ldg-acc-1:#2B5EA7;
  --ldg-acc-2:#3D77C9;
  --ldg-acc-soft:#EAF1FB;
  --ldg-bar-prev:#A8C8F6;
  --ldg-line-prev:#7BB3F0;
}
.mod-ledgr .ldg-kpi-val,
.mod-ledgr .ldg-strip-col strong,
.mod-ledgr .ldg-mini-kpi strong{ text-align:left; }

.ldg-page{ display:grid; gap:14px; }
.ldg-page .page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:0; }
.ldg-head-right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ldg-tabs{ min-width:0; max-width:100%; overflow-x:auto; flex-wrap:nowrap; scrollbar-width:none; }
.ldg-tabs::-webkit-scrollbar{ display:none; }
.mod-ledgr .ldg-tabs > button{ height:36px; padding:0 12px; white-space:nowrap; flex:none; }
.mod-ledgr .ldg-tabs > button[aria-selected="true"]{ background:var(--ldg-acc-1); color:#FFF; }
.mod-ledgr .ldg-tabs .m-slide-pill{ background:var(--ldg-acc-1) !important; }

.mod-ledgr .card{ border:0; border-radius:var(--r-24); padding:16px 18px; box-shadow:none; }
.mod-ledgr .card.is-hero{ border-color:transparent; }

.ldg-stack{ gap:14px; }
.ldg-btn-accent{ background:var(--ldg-acc-1); border:1px solid var(--ldg-acc-1); color:#FFF; min-height:38px; padding:0 16px; border-radius:var(--r-pill); font-size:13px; }
.ldg-btn-accent:hover{ filter:brightness(1.06); }
.ldg-btn-outline{ background:var(--c-surface); border:1px solid var(--c-line); color:var(--c-ink); min-height:38px; padding:0 16px; border-radius:var(--r-pill); font-size:13px; }
.ldg-btn-outline:hover{ background:var(--c-bg); }
.is-accent{ color:var(--ldg-acc-1); }
.is-pos{ color:var(--c-success); }
.is-neg{ color:var(--c-danger); }

/* Control Bar: บรรทัดเดียวบนคอม */
.mod-ledgr .ldg-ctrl-bar{ display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:10px 14px; border-radius:var(--r-24); }
.ldg-ctrl-bar .btn, .ldg-ctrl-bar .ldg-btn-accent, .ldg-ctrl-bar .ldg-btn-outline{ min-height:36px; border-radius:var(--r-pill); font-size:13px; }
.ldg-ctrl-bar .chip{ height:34px; font-size:13px; padding:0 12px; border:1px solid var(--c-line); }
.ldg-ctrl-bar .chip[aria-pressed="true"]{ border-color:var(--ldg-acc-1); }
.ldg-day-picker{ display:flex; align-items:center; gap:6px; min-width:0; max-width:100%; }
.ldg-icon-btn{ width:36px; height:36px; border-radius:var(--r-pill); border:1px solid var(--c-line); background:var(--c-bg); color:var(--c-ink); display:grid; place-items:center; cursor:pointer; flex:none; }
.ldg-icon-btn:disabled{ opacity:.35; cursor:default; }
.ldg-day-box{ flex:1 1 auto; min-width:0; padding:0; border-radius:var(--r-pill); min-height:36px; }
.ldg-day-select{ width:100%; max-width:100%; min-width:0; border:0; background:transparent; font:inherit; font-size:13px; font-weight:600; color:var(--c-ink); padding:6px 12px; min-height:36px; }
.ldg-range-chips{ gap:6px; }
.ldg-ctrl-acts{ display:flex; gap:8px; flex-wrap:wrap; }
.ldg-ym-select{ min-width:150px; flex:0 1 auto; min-height:36px; border-radius:var(--r-pill); }
.ldg-ym-select select{ padding:6px 12px; font-size:13px; min-height:36px; }
.ldg-filter-bar{ gap:6px; }

/* Row 1: 3 KPI Cards */
.ldg-kpi-row{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--s-3); }
.ldg-kpi-card{ display:grid; gap:12px; min-width:0; }
.ldg-kpi-card.is-hero{ background:linear-gradient(135deg, var(--ldg-acc-1), var(--ldg-acc-2)); border-color:transparent; color:#FFF; box-shadow:none; }
.ldg-kpi-head{ display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.ldg-kpi-title{ font-size:14px; font-weight:700; }
.ldg-kpi-tag{ font-size:11px; font-weight:600; padding:3px 9px; border-radius:999px; background:var(--c-bg); color:var(--c-muted); }
.ldg-kpi-card.is-hero .ldg-kpi-tag{ background:rgba(255,255,255,.18); color:#FFF; }
.ldg-kpi-pair{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.ldg-kpi-stat{ display:flex; align-items:center; gap:10px; min-width:0; }
.ldg-kpi-ic{ width:38px; height:38px; border-radius:999px; display:grid; place-items:center; flex:none; font-size:18px; background:var(--ldg-acc-soft); color:var(--ldg-acc-1); }
.ldg-kpi-card.is-hero .ldg-kpi-ic{ background:rgba(255,255,255,.94); color:var(--ldg-acc-1); }
.ldg-kpi-meta{ display:grid; gap:2px; min-width:0; }
.ldg-kpi-lbl{ font-size:12px; color:var(--c-muted); }
.ldg-kpi-card.is-hero .ldg-kpi-lbl{ color:rgba(255,255,255,.82); }
.ldg-kpi-val{ font-size:20px; line-height:1.15; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ldg-kpi-val.is-hero-neg{ color:#FFE1E3; }
.ldg-kpi-foot{ display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; padding-top:10px; border-top:1px dashed var(--c-line); font-size:12px; color:var(--c-muted); }
.ldg-kpi-card.is-hero .ldg-kpi-foot{ border-top-color:rgba(255,255,255,.22); color:rgba(255,255,255,.88); }

/* Row 2: 2 Side-by-Side Charts */
.ldg-charts-row{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--s-3); }
.ldg-chart-card{ display:grid; gap:12px; min-width:0; }
.ldg-chart-head{ display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.ldg-chart-head h2{ margin:0; font-size:15px; font-weight:700; }
.ldg-legend-inline{ display:flex; align-items:center; gap:10px; font-size:12px; color:var(--c-muted); flex-wrap:wrap; }
.ldg-leg-item{ display:inline-flex; align-items:center; gap:5px; }
.ldg-dot{ display:inline-block; width:9px; height:9px; border-radius:999px; }
.ldg-dot.is-cur{ background:var(--ldg-acc-1); }
.ldg-dot.is-prev{ background:var(--ldg-bar-prev); }

.ldg-bar-plot{ display:grid; grid-template-columns:44px minmax(0, 1fr); gap:8px; align-items:start; height:174px; }
.ldg-y-axis{ display:flex; flex-direction:column; justify-content:space-between; font-family:var(--font-num); font-size:11px; color:var(--c-muted); height:150px; line-height:1; }
.ldg-bar-area{ position:relative; display:flex; align-items:flex-end; justify-content:space-between; gap:6px; padding:0 6px; border-bottom:1px solid var(--c-line); height:150px; min-width:0; }
.ldg-bar-area.is-compact{ gap:2px; padding-left:2px; padding-right:2px; }
.ldg-bar-area::before{ content:""; position:absolute; inset:0; background:repeating-linear-gradient(to bottom, var(--c-line) 0 1px, transparent 1px 37.5px); opacity:.55; pointer-events:none; }
.ldg-b-group{ position:relative; z-index:1; flex:1 1 0; min-width:0; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; background:none; border:0; padding:0; font:inherit; cursor:default; }
.ldg-b-group.is-clickable{ cursor:pointer; }
.ldg-b-pair{ display:flex; align-items:flex-end; justify-content:center; gap:3px; width:100%; height:100%; }
.ldg-bar-area.is-compact .ldg-b-pair{ gap:1px; }
.ldg-b-cur{ display:block; width:46%; max-width:12px; border-radius:999px 999px 3px 3px; background:var(--ldg-acc-1); transition:height var(--t-base) var(--ease-smooth); }
.ldg-b-prev{ display:block; width:46%; max-width:12px; border-radius:999px 999px 3px 3px; background:repeating-linear-gradient(-45deg, var(--ldg-bar-prev), var(--ldg-bar-prev) 4px, rgba(255,255,255,.45) 4px, rgba(255,255,255,.45) 7px); transition:height var(--t-base) var(--ease-smooth); }
.ldg-b-group.is-selected .ldg-b-cur{ background:var(--c-brand); }
.ldg-b-lbl{ position:absolute; top:calc(100% + 5px); font-size:11px; color:var(--c-muted); white-space:nowrap; }
.ldg-b-group.is-selected .ldg-b-lbl{ color:var(--c-ink); font-weight:700; }

.ldg-line-svg-wrap{ width:100%; height:172px; }
.ldg-line-svg-wrap svg{ width:100%; height:100%; display:block; }
.ldg-chart-foot{ display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.ldg-cmp-table-card{ display:grid; gap:10px; }
.ldg-cmp-table-wrap{ margin-top:4px; }
.ldg-table tr.is-selected td{ background:var(--c-bg); font-weight:600; }

/* Row 3: Bottom Multi-Column Strip Card */
.ldg-strip-card{ padding-bottom:0; overflow:hidden; display:grid; gap:14px; }
.ldg-seg{ display:inline-flex; flex-wrap:wrap; background:var(--c-bg); padding:4px; border-radius:999px; gap:4px; }
.ldg-seg button{ border:0; background:transparent; color:var(--c-muted); font:inherit; font-size:12px; font-weight:600; padding:6px 12px; border-radius:999px; cursor:pointer; }
.ldg-seg button[aria-pressed="true"]{ background:var(--c-surface); color:var(--c-ink); box-shadow:0 1px 4px rgba(35,31,32,.08); }
.ldg-strip-cols{ display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:10px; padding-bottom:6px; }
.ldg-strip-col{ padding:4px 10px 8px; border-left:1px solid var(--c-line); display:grid; gap:4px; min-width:0; }
.ldg-strip-col:first-child{ border-left:0; padding-left:0; }
.ldg-strip-col span{ font-size:12px; color:var(--c-muted); }
.ldg-strip-col strong{ font-size:18px; font-weight:700; }
.ldg-strip-col small{ font-size:12px; color:var(--c-muted); }
.ldg-strip-foot{ display:flex; gap:8px; flex-wrap:wrap; padding-bottom:16px; }
.ldg-strip-wave{ margin:0 -18px; height:44px; display:flex; align-items:flex-end; }
.ldg-strip-wave svg{ width:100%; height:44px; display:block; }

.ldg-recon-card{ display:grid; gap:10px; padding-bottom:16px; }
.ldg-recon-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:12px; flex-wrap:wrap; }
.ldg-pending-total{ margin:4px 0 0; color:var(--ldg-acc-1); }
.ldg-recon-btn{ min-height:36px; padding:4px 12px; font-size:13px; white-space:nowrap; }
.ldg-reconciled-note{ padding-top:6px; border-top:1px dashed var(--c-line); }

/* Tab 2 (รายการ) & Tab 3 (นำเข้า) 2-Column Layouts */
.ldg-split-ledger{ display:grid; grid-template-columns:minmax(0, 1.65fr) minmax(0, 1fr); gap:var(--s-3); align-items:start; }
.ldg-split-import{ display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.35fr); gap:var(--s-3); align-items:start; }
.ldg-tx-row{ display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 12px; border-radius:var(--r-16); background:var(--c-bg); }
.ldg-tx-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.ldg-tx-ic{ width:36px; height:36px; border-radius:10px; display:grid; place-items:center; flex:none; font-size:17px; background:var(--ldg-acc-soft); color:var(--ldg-acc-1); }
.ldg-tx-ic.is-out{ background:var(--c-warning-tint); color:var(--c-warning); }
.ldg-tx-ic.is-stockr{ background:var(--c-success-tint); color:var(--c-success); }
.ldg-tx-main{ display:grid; gap:2px; min-width:0; }
.ldg-tx-main strong{ font-size:14px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.ldg-tx-main small{ font-size:12px; color:var(--c-muted); }
.ldg-tx-right{ display:grid; justify-items:end; gap:4px; flex:none; }
.ldg-tx-amt{ font-size:15px; font-weight:700; }
.ldg-tx-amt.is-in{ color:var(--ldg-acc-1); }
.ldg-tx-amt.is-out{ color:var(--c-danger); }

.ldg-kv-list{ display:grid; gap:8px; }
.ldg-kv-row{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:6px 0; border-bottom:1px dashed var(--c-line); font-size:14px; }
.ldg-kv-row:last-child{ border-bottom:0; padding-bottom:0; }
.ldg-acts-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.ldg-empty-acts{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin-top:8px; }
.ldg-day-list{ display:grid; gap:8px; }
.ldg-day-item{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; border-radius:var(--r-16); background:var(--c-bg); }
.ldg-day-main{ display:grid; gap:2px; min-width:0; }
.ldg-day-amt{ display:grid; gap:2px; text-align:right; flex:none; }
.ldg-row-right{ display:grid; gap:4px; justify-items:end; }
.ldg-inline-acts{ display:flex; gap:4px; flex-wrap:wrap; justify-content:flex-end; }
.ldg-mini-btn{ min-height:32px; padding:2px 10px; font-size:12px; }

/* Import & Modals */
.ldg-drop{ border:1.5px dashed var(--ldg-bar-prev); border-radius:var(--r-16); padding:20px 16px; text-align:center; display:grid; gap:10px; justify-items:center; background:linear-gradient(180deg, #F6F9FE, #FFFFFF); }
.ldg-drop-ic{ width:46px; height:46px; border-radius:14px; background:var(--ldg-acc-soft); color:var(--ldg-acc-1); display:grid; place-items:center; font-size:22px; }
.ldg-file-input{ position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.ldg-pick-btn{ cursor:pointer; }
.ldg-files-wrap{ width:100%; display:grid; gap:8px; text-align:left; margin-top:4px; }
.ldg-file-card{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:var(--r-16); background:var(--c-surface); border:1px solid var(--c-line); min-width:0; }
.ldg-file-ic{ width:36px; height:42px; border-radius:8px; background:var(--ldg-acc-soft); color:var(--ldg-acc-1); font-family:var(--font-num); font-size:11px; font-weight:700; display:grid; place-items:center; flex:none; }
.ldg-file-body{ flex:1; min-width:0; display:grid; gap:4px; }
.ldg-file-title{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ldg-file-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ldg-file-rm{ min-height:44px; min-width:44px; padding:0; flex:none; }
.ldg-sheet-pick{ display:flex; align-items:center; gap:8px; margin-top:4px; }
.ldg-sheet-pick .fld-box{ min-width:140px; }
.ldg-mini-kpis{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
.ldg-mini-kpi{ padding:10px 12px; border-radius:var(--r-12); background:var(--c-bg); display:grid; gap:2px; min-width:0; }
.ldg-mini-kpi span{ font-size:12px; color:var(--c-muted); }
.ldg-mini-kpi strong{ font-size:15px; font-weight:700; }

.ldg-alert{ display:flex; align-items:flex-start; gap:8px; padding:12px 14px; border-radius:var(--r-16); font-size:14px; text-align:left; width:100%; }
.ldg-alert .ph{ font-size:18px; flex:none; margin-top:2px; }
.ldg-alert.is-warning{ background:var(--c-warning-tint); color:var(--c-warning); }
.ldg-alert.is-danger{ background:var(--c-danger-tint); color:var(--c-danger); }
.ldg-alert.is-good{ background:var(--c-success-tint); color:var(--c-success); }
.ldg-pay-map{ display:grid; gap:8px; padding:10px 12px; border-radius:var(--r-16); background:var(--c-bg); }
.ldg-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.ldg-chips .chip[aria-pressed="true"]{ background:var(--ldg-acc-1); color:#FFF; }
.ldg-table-wrap{ width:100%; overflow-x:auto; }
.ldg-table{ width:100%; border-collapse:collapse; font-size:13px; }
.ldg-table th{ text-align:right; color:var(--c-muted); font-weight:600; padding:6px 4px; border-bottom:1px solid var(--c-line); white-space:nowrap; }
.ldg-table th:first-child, .ldg-table td:first-child{ text-align:left; }
.ldg-table td{ text-align:right; padding:8px 4px; border-bottom:1px dashed var(--c-line); white-space:nowrap; }
.ldg-table tr.is-kept td{ opacity:.6; }
.ldg-st{ font-weight:600; font-size:12px; }
.ldg-st.is-new{ color:var(--ldg-acc-1); }
.ldg-st.is-same{ color:var(--c-success); }
.ldg-st.is-shorter_warn{ color:var(--c-warning); }
.ldg-confirm-bar{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.ldg-toggle-row{ display:flex; justify-content:flex-end; }
.ldg-settings-modal{ max-width:540px; }
.ldg-app-edit{ display:grid; gap:8px; padding:10px 12px; border-radius:var(--r-16); background:var(--c-bg); }
.ldg-app-top{ display:grid; grid-template-columns:minmax(0,1fr) 104px; gap:8px; }
.ldg-app-bottom{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.ldg-app-bottom .fld-box{ flex:1 1 180px; min-width:0; }
.ldg-vat-chip{ display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
.ldg-vat-chip input{ accent-color:var(--ldg-acc-1); }
.ldg-settings-modal .frm-card .fld-box, .ldg-settings-modal .frm-card .frm-switch{ background:var(--c-surface); }
.ldg-settings-modal .frm-card{ background:var(--c-bg); padding:14px; border-radius:var(--r-16); }
.ldg-settings-modal .tk-modal-frm{ padding-bottom:0; }
.ldg-settings-modal .tk-modal-frm .frm-bar{ position:sticky; bottom:0; z-index:3; display:flex; justify-content:flex-end; gap:8px; background:var(--c-surface); padding:12px 0 4px; margin-top:4px; border-top:1px solid var(--c-line); }
.ldg-confirm-scrim{ position:fixed; inset:0; z-index:95; background:rgba(35,31,32,.48); display:grid; place-items:center; padding:20px; }
.ldg-confirm-pop{ width:100%; max-width:380px; border-radius:var(--r-24); padding:22px; background:var(--c-surface); box-shadow:var(--shadow-lift); display:grid; gap:14px; animation:poco-spring-pop 200ms var(--ease-spring) both; }
.ldg-confirm-head{ display:flex; align-items:flex-start; gap:12px; }
.ldg-confirm-ic{ width:40px; height:40px; border-radius:12px; background:var(--c-warning-tint); color:var(--c-warning); display:grid; place-items:center; font-size:20px; flex:none; }
.ldg-confirm-head h3{ margin:0 0 4px; font-size:17px; }
.ldg-confirm-head p{ margin:0; font-size:13px; color:var(--c-muted); line-height:1.45; }
.ldg-confirm-acts{ display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.ldg-sync-switch{ margin-top:12px; background:var(--ldg-acc-soft); }
.ldg-cat-grid{ display:flex; flex-wrap:wrap; gap:8px; }
.ldg-cat-grid .chip[aria-pressed="true"]{ background:var(--ldg-acc-1); color:#FFF; }
.ldg-two-col{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.ldg-details-more{ margin-top:6px; }
.ldg-details-more > summary{ cursor:pointer; }
.ldg-recon-preview{ margin-top:10px; padding:12px; border-radius:var(--r-16); background:var(--c-surface); border:1px solid var(--c-line); display:grid; gap:8px; }

@media (max-width:1100px){
  .ldg-kpi-row,
  .ldg-charts-row,
  .ldg-split-ledger,
  .ldg-split-import{ grid-template-columns:1fr; }
}
@media (max-width:720px){
  .ldg-strip-cols{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .ldg-strip-col{ border-left:0; padding:6px 8px; background:var(--c-bg); border-radius:var(--r-12); }
}
@media (max-width:480px){
  .ldg-confirm-bar > button{ flex:1 1 100%; }
  .ldg-app-top{ grid-template-columns:minmax(0,1fr) 88px; }
  .ldg-mini-kpis,
  .ldg-two-col{ grid-template-columns:1fr; }
}

/* =========================================================
   Closeshift (Step 23 · Ledgr Phase B หน้าบาร์ + ปิดกะเจ้าของ)
   ========================================================= */
.cs-page{ display:grid; gap:var(--s-4); padding-bottom:var(--s-6); min-width:0; }
.cs-tabs{ max-width:420px; }
.cs-tabs > button{ min-height:44px; font-weight:700; }
.cs-hero-blind{ background:linear-gradient(135deg, var(--ldg-acc-1), var(--ldg-acc-2)); color:#FFF; }
.cs-hero-blind .hero-num{ color:#FFF; }
.cs-hero-blind .hero-label,.cs-hero-blind .hero-unit,.cs-hero-note{ color:rgba(255,255,255,.88); margin:4px 0 0; }
.cs-card{ display:grid; gap:12px; min-width:0; }
.cs-mode-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.cs-sub-seg{ max-width:300px; }
.cs-sub-seg > button{ min-height:40px; padding:0 12px; font-size:13px; }
.cs-shift-chips{ display:flex; gap:6px; flex-wrap:wrap; }
.cs-shift-chips .chip{ min-height:40px; background:var(--c-bg); border:1px solid var(--c-line); }
.cs-shift-chips .chip[aria-pressed="true"]{ background:var(--ldg-acc-1); color:#FFF; border-color:var(--ldg-acc-1); }
.cs-frm{ display:grid; gap:12px; padding-bottom:0; }
.cs-big-fld{ min-height:56px; }
.cs-big-fld input{ font-size:20px; font-weight:700; }
.cs-two-col{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.cs-big-btn{ min-height:56px; font-size:16px; font-weight:700; border-radius:16px; width:100%; }
.cs-denom-grid{ display:grid; gap:8px; }
.cs-denom-row{ display:grid; grid-template-columns:108px minmax(0, 1fr) 88px; align-items:center; gap:8px; padding:6px 10px; border-radius:12px; background:var(--c-bg); }
.cs-denom-lbl{ font-size:14px; font-weight:700; }
.cs-denom-inp{ min-height:44px; background:var(--c-surface); }
.cs-denom-sub{ text-align:right; font-size:14px; color:var(--ldg-acc-1); }
.cs-sum-bar{ display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-radius:14px; background:var(--ldg-acc-soft); color:var(--ldg-acc-1); font-weight:700; }
.cs-sum-bar strong{ font-size:20px; }
.cs-runs-hint{ display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:12px; background:var(--c-warning-tint); color:var(--c-warning); font-size:13px; }
.cs-quick-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.cs-quick-chip{ min-height:44px; padding:0 14px; }
.cs-quick-chip[aria-pressed="true"]{ background:var(--ldg-acc-1); color:#FFF; border-color:var(--ldg-acc-1); }
.cs-run-list{ display:grid; gap:8px; }
.cs-run-item{ display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px; border-radius:var(--r-16); background:var(--c-bg); }
.cs-run-main{ display:grid; gap:2px; min-width:0; }
.cs-run-main small{ color:var(--c-muted); font-size:12px; }
.cs-run-amt{ font-size:16px; font-weight:700; color:var(--c-danger); flex:none; }
.cs-done-card{ display:grid; gap:14px; }
.cs-done-head{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.cs-done-pose{ width:72px; height:72px; flex:none; }
.cs-done-stats{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; }
.cs-stat{ padding:12px; border-radius:14px; background:var(--c-bg); display:grid; gap:4px; }
.cs-stat span{ font-size:12px; color:var(--c-muted); }
.cs-stat strong{ font-size:18px; }
.cs-stat.is-accent{ background:var(--ldg-acc-soft); color:var(--ldg-acc-1); }

/* Owner Ledgr Close Shift & Unpaid */
.ldg-eod-card{ display:grid; gap:12px; padding:14px; border-radius:var(--r-16); background:var(--c-bg); border:1px solid var(--c-line); }
.ldg-eod-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; flex-wrap:wrap; }
.ldg-eod-stats{ display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; }
.ldg-eod-stat{ padding:8px 10px; border-radius:12px; background:var(--c-surface); display:grid; gap:2px; min-width:0; }
.ldg-eod-stat span{ font-size:11px; color:var(--c-muted); }
.ldg-eod-stat strong{ font-size:14px; }
.ldg-eod-acts{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.ldg-phaseb-banner{ display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 16px; border-radius:16px; background:var(--c-warning-tint); color:var(--c-ink); border:1px solid rgba(217,119,6,.22); }
.ldg-phaseb-banner-acts{ display:flex; gap:8px; flex-wrap:wrap; }
.ldg-unpaid-bar{ display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 14px; border-radius:var(--r-16); background:var(--c-warning-tint); color:var(--c-warning); font-weight:600; }

/* Phase C Close Month (slate-flat theme: borderless 24px cards, pill buttons) */
.mod-ledgr .ldg-close-ctrl{ display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:10px 14px; border-radius:var(--r-24); }
.ldg-close-month-wrap{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; }
.ldg-month-inp{ min-height:36px; border-radius:var(--r-pill); padding:0 12px; width:auto; flex:none; }
.ldg-month-inp input{ padding:4px 0; font-size:13px; font-weight:600; min-height:34px; }
.ldg-close-acts{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ldg-snap-card{ display:grid; gap:12px; }
.ldg-snap-grid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.ldg-snap-box{ padding:12px 14px; border-radius:var(--r-16); background:var(--c-bg); display:grid; gap:4px; min-width:0; }
.ldg-snap-box span{ font-size:12px; color:var(--c-muted); }
.mod-ledgr .ldg-snap-box strong{ font-size:18px; font-weight:700; text-align:left; }
.ldg-split-close{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--s-3); align-items:stretch; }
.ldg-split-close > div{ display:flex; flex-direction:column; gap:var(--s-3); min-width:0; }
.ldg-split-close > div > .card:last-child{ flex:1; }
.ldg-check-grid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.ldg-check-item{ display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 12px; border-radius:var(--r-16); background:var(--c-bg); }
.ldg-check-left{ display:flex; align-items:flex-start; gap:10px; min-width:0; }
.ldg-check-ic{ width:28px; height:28px; border-radius:999px; display:grid; place-items:center; flex:none; font-size:15px; }
.ldg-check-ic.is-ok{ background:var(--c-success-tint); color:var(--c-success); }
.ldg-check-ic.is-warn{ background:var(--c-warning-tint); color:var(--c-warning); }
.ldg-coa-grid{ display:grid; gap:8px; margin-top:10px; }
.ldg-coa-row{ display:grid; grid-template-columns:minmax(0, 1fr) 118px; gap:8px; align-items:center; padding:8px 10px; border-radius:var(--r-12); background:var(--c-bg); }
.ldg-coa-row span{ font-size:13px; font-weight:600; min-width:0; }
.ldg-coa-row .fld-box{ min-height:36px; background:var(--c-surface); border-radius:10px; }
.ldg-coa-row input{ padding:6px 8px; font-size:13px; font-family:var(--font-num); }
@media (max-width:900px){
  .ldg-split-close, .ldg-check-grid{ grid-template-columns:1fr; }
}
@media (max-width:640px){
  .cs-two-col, .cs-done-stats, .ldg-snap-grid{ grid-template-columns:1fr; }
  .cs-denom-row{ grid-template-columns:86px minmax(0, 1fr) 74px; }
  .ldg-eod-stats{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .ldg-close-acts > button{ flex:1 1 auto; }
}

/* ---------- Standalone & Soft Upsell / Full-only Tag ---------- */
.pin-btn.is-full-only{ opacity:.72; background:var(--c-surface-2); border:1px dashed rgba(35,31,32,.22); color:var(--c-muted); }
.pkg-full-tag{ font-size:11px; font-weight:700; padding:2px 6px; border-radius:var(--r-pill); background:rgba(43,94,167,.12); color:#2B5EA7; margin-left:4px; }
.upsell-full-note{ font-size:12px; color:var(--c-muted); margin:8px 0 0; }
.poco-soft-upsell{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding:12px 16px; border-radius:var(--r-20, 20px); background:var(--c-info-tint); margin-top:12px;
}
.poco-soft-upsell-txt{ display:flex; align-items:center; gap:10px; font-size:13px; color:var(--c-ink); min-width:0; flex:1 1 220px; }
.poco-soft-upsell-txt .ph{ font-size:18px; color:var(--c-info); flex:none; }
.stk-eom-hist{ list-style:none; display:grid; gap:8px; margin:10px 0 0; padding:0; }
.stk-eom-hist li{ display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 14px; border-radius:var(--r-16); background:var(--c-bg); font-size:14px; }
.stk-eom-hist-l{ display:grid; gap:2px; min-width:0; }
.stk-eom-modal{ display:grid; gap:12px; }
.stk-eom-pair{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.stk-eom-box{ padding:12px 14px; border-radius:var(--r-16); background:var(--c-bg); display:grid; gap:4px; min-width:0; }
.stk-eom-box span{ font-size:12px; color:var(--c-muted); }
.stk-eom-box strong{ font-size:20px; font-weight:700; }
.stk-eom-total{ padding:14px 16px; border-radius:var(--r-20, 20px); background:var(--c-warning-tint, #FEF3C7); display:grid; gap:6px; text-align:center; }
.stk-eom-total-top{ display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap; }
.stk-eom-ym-lbl{ font-size:13px; font-weight:600; color:var(--c-muted); }
.stk-eom-grand{ font-size:28px; font-weight:700; line-height:1.15; color:var(--c-ink); }
.stk-eom-box{ text-align:center; }
.stk-eom-box strong.num, .stk-eom-total strong.num{ text-align:center; }
.stk-eom-tools{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.stk-eom-cats{ padding:12px 14px; border-radius:var(--r-16); background:var(--c-bg); display:grid; gap:8px; }
.stk-eom-cats-head{ display:grid; gap:2px; }
.stk-eom-cat-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; padding-top:8px; border-top:1px solid rgba(35,31,32,.08); }
.stk-eom-cat-row span{ font-size:13px; font-weight:600; }
.stk-eom-cat-row .chips{ margin:0; }
.stk-eom-foot{ margin-top:4px; padding-top:8px; }
.ldg-dod-bar{
  display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap;
  margin-top:8px; padding:8px 12px; border-radius:var(--r-12); background:var(--c-bg); font-size:12px;
}
.ldg-dod-bar strong.is-pos{ color:var(--c-success); }
.ldg-dod-bar strong.is-neg{ color:var(--c-danger); }
@media (max-width:480px){
  .stk-eom-pair, .stk-eom-tools{ grid-template-columns:1fr; }
}

/* =========================================================
   Step 26 · Onboarding (ตัวช่วยตั้งร้าน · Mockup v6) & การ์ดเควสหน้าหลัก
   ========================================================= */
body.is-onboarding{ padding:0 !important; }
body.is-onboarding #appnav,
body.is-onboarding .topbar{ display:none !important; }
body.is-onboarding .shell,
body.is-onboarding .shell-main,
body.is-onboarding #app,
body.is-onboarding #module-host{
  display:block; padding:0; margin:0; max-width:none; width:100%; min-height:100dvh;
}
.ob-root{ width:100%; min-height:100dvh; background:#FFF6EC; color:var(--c-ink); overflow-x:hidden; }

@keyframes ob-bob{ 0%,100%{ transform:translateY(0) rotate(0); } 50%{ transform:translateY(-8px) rotate(-3deg); } }
@keyframes ob-pop{ 0%{ transform:scale(.6); opacity:0; } 100%{ transform:scale(1); opacity:1; } }
@keyframes ob-rise{ 0%{ transform:translateY(40%); } 100%{ transform:translateY(0); } }
@keyframes ob-fadeUp{ 0%{ opacity:0; transform:translateY(14px); } 100%{ opacity:1; transform:none; } }
@keyframes ob-spin{ to{ transform:rotate(360deg); } }
@keyframes ob-breathe{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.015,.988); } }
@keyframes ob-hop{ 0%{ transform:translateY(0) scale(1); } 35%{ transform:translateY(-16px) scale(1.04,.96); } 70%{ transform:translateY(0) scale(.97,1.03); } 100%{ transform:none; } }

/* ปุ่มและช่องกรอกของ Onboarding (≥56px · ไม่มีกรอบดำหนา) */
.ob-cta{
  height:56px; border-radius:18px; background:var(--c-brand); color:#FFF; font-size:17px; font-weight:700; width:100%;
  display:inline-flex; align-items:center; justify-content:center; padding:0 20px; flex:none;
  transition:transform var(--t-base) var(--ease-spring), filter var(--t-fast) ease, box-shadow var(--t-base) ease;
}
.ob-cta:hover{ filter:brightness(1.05); box-shadow:0 10px 22px -10px rgba(230,57,70,.6); }
.ob-cta:active{ transform:scale(.97); }
.ob-cta.ob-cta-white{ background:#FFF; color:var(--c-brand); }
.ob-cta.ob-cta-ink{ background:var(--c-ink); color:#FFF; }
.ob-cta.ob-cta-ghost{ background:#FFF; color:var(--c-ink); }
.ob-field{
  width:100%; height:58px; border-radius:18px; background:#FFF6EC; padding:0 18px;
  font-size:18px; font-weight:600; border:2px solid transparent; outline:none; text-align:center;
  transition:border-color var(--t-fast) ease, background var(--t-fast) ease;
}
.ob-field:focus{ border-color:var(--c-brand); background:#FFF; }
.ob-skip{
  font-size:14px; font-weight:600; color:var(--c-muted); min-height:44px; padding:0 14px; border-radius:var(--r-pill);
  white-space:nowrap;
}
.ob-skip:hover{ background:rgba(35,31,32,.05); }

/* ---------- มือถือ (<768px) ---------- */
.ob-mob{ width:100%; min-height:100dvh; position:relative; background:#FFF6EC; }
.ob-scr{ min-height:100dvh; display:flex; flex-direction:column; padding:20px 20px 26px; position:relative; }
.ob-m-top{ display:flex; align-items:center; justify-content:space-between; min-height:44px; }
.ob-dots{ display:flex; gap:6px; align-items:center; }
.ob-dots span{ width:8px; height:8px; border-radius:99px; background:#FBEBD9; transition:width var(--t-slow) var(--ease-spring); }
.ob-dots span.on{ width:22px; background:var(--c-brand); }
.ob-m-poco{ display:block; user-select:none; pointer-events:none; }
.ob-bob{ animation:ob-bob 3.2s ease-in-out infinite; }
.ob-spacer{ flex:1; }

.ob-s-splash{ background:var(--c-brand); color:#FFF; align-items:center; text-align:center; overflow:hidden; padding-top:44px; }
.ob-s-splash .ob-m-logo{ width:156px; margin-top:16px; }
.ob-s-splash .ob-m-tag{ font-size:15px; opacity:.95; margin-top:12px; line-height:1.45; max-width:300px; }
.ob-s-splash .ob-m-tag b{ display:block; font-family:var(--font-say); font-size:18px; font-weight:500; margin-bottom:2px; }
.ob-s-splash .ob-cta{ margin-top:26px; position:relative; z-index:2; box-shadow:0 10px 24px -8px rgba(0,0,0,.25); }
.ob-s-splash .ob-hill{ position:absolute; left:-60px; right:-60px; bottom:-180px; height:400px; border-radius:50%; background:#FFF6EC; }
.ob-s-splash .ob-m-poco{ width:260px; position:absolute; left:50%; bottom:-64px; margin-left:-130px; animation:ob-rise .8s var(--ease-spring) both; }

.ob-s-name{ align-items:center; text-align:center; gap:14px; }
.ob-s-name .ob-m-top{ width:100%; }
.ob-bubble{
  font-family:var(--font-say); font-weight:500; background:#FFF; border-radius:22px; padding:14px 18px;
  font-size:17px; line-height:1.45; position:relative; animation:ob-pop .45s var(--ease-spring) both;
}
.ob-bubble::after{ content:''; position:absolute; left:50%; bottom:-9px; margin-left:-9px; border:9px solid transparent; border-bottom:0; border-top-color:#FFF; }
.ob-bubble small{ display:block; font-family:var(--font); font-weight:500; font-size:13px; color:var(--c-muted); margin-top:4px; }
.ob-s-name .ob-m-poco{ width:176px; margin-top:4px; }
.ob-s-name .ob-field{ background:#FFF; }

.ob-s-type{ gap:14px; }
.ob-m-head{ display:flex; align-items:flex-end; gap:12px; }
.ob-m-head .ob-m-poco{ width:76px; flex:none; }
.ob-s-type h2, .ob-s-kit h2{ font-family:var(--font-say); font-weight:500; font-size:24px; line-height:1.25; }
.ob-tiles{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ob-tile{
  aspect-ratio:1/1.05; border-radius:24px; color:#FFF; padding:14px; display:flex; flex-direction:column; justify-content:space-between;
  text-align:left; position:relative; overflow:hidden; transition:transform var(--t-base) var(--ease-spring), box-shadow var(--t-fast) ease;
}
.ob-tile:active{ transform:scale(.95); }
.ob-tile > svg{ width:40px; height:40px; color:#FFF; }
.ob-tile b{ font-size:16px; line-height:1.2; color:#FFF; display:block; }
.ob-tile small{ display:block; font-size:12px; opacity:.88; font-weight:500; color:#FFF; }
.ob-tile.t1{ background:#8B5A3C; color:#8B5A3C; }
.ob-tile.t2{ background:#4E9F5B; color:#4E9F5B; }
.ob-tile.t3{ background:#E46A8C; color:#E46A8C; }
.ob-tile.t4{ background:#7C8AA5; color:#7C8AA5; }
.ob-tile-chk{
  position:absolute; top:10px; right:10px; width:24px; height:24px; border-radius:50%; background:rgba(255,255,255,.3);
  display:grid; place-items:center; transition:background var(--t-fast) ease, transform var(--t-base) var(--ease-spring);
}
.ob-tile-chk svg{ width:13px; height:13px; color:var(--c-ink); opacity:0; transition:opacity var(--t-fast) ease; }
.ob-tile[aria-pressed="true"]{ box-shadow:0 0 0 4px #FFF6EC, 0 0 0 7px currentColor; transform:scale(1.02); }
.ob-tile[aria-pressed="true"] .ob-tile-chk{ background:#FFF; transform:scale(1.08); }
.ob-tile[aria-pressed="true"] .ob-tile-chk svg{ opacity:1; }

.ob-s-kit{ height:100dvh; gap:12px; padding-bottom:20px; }
.ob-kit-top{ display:flex; gap:10px; align-items:center; }
.ob-kit-top .ob-m-poco{ width:64px; flex:none; }
.ob-kit-top p{ font-size:13px; color:var(--c-muted); line-height:1.4; }
.ob-kit-scroll{ flex:1; min-height:0; overflow-y:auto; display:grid; gap:10px; align-content:start; padding-bottom:4px; }
.ob-shelf{ background:#FFF; border-radius:20px; padding:12px; display:grid; gap:8px; align-content:start; }
.ob-shelf h3{ font-size:12px; font-weight:700; letter-spacing:.3px; display:flex; justify-content:space-between; }
.ob-shelf h3 span{ color:var(--c-muted); font-weight:600; }
.ob-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.ob-chip{
  height:34px; padding:0 12px; border-radius:var(--r-pill); background:#FFF6EC; font-size:13px; font-weight:600;
  display:inline-flex; align-items:center; gap:6px; transition:transform var(--t-base) var(--ease-spring), background var(--t-fast) ease, color var(--t-fast) ease;
}
.ob-chip:active{ transform:scale(.92); }
.ob-chip[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }
.ob-chip[aria-pressed="true"]::before{ content:''; width:6px; height:6px; border-radius:99px; background:#7BE0A8; }

.ob-m-load{ height:100dvh; padding:0; background:linear-gradient(180deg, #FFF8F2 0%, #FFE6DF 56%, #FFD0CC 100%); overflow:hidden; }
.ob-m-load .ob-ld{ top:42px; gap:10px; padding:0 18px; }
.ob-m-load .ob-ld h2{ font-size:22px; }
.ob-m-load .ob-ld-sub{ font-size:13px; }
.ob-m-load .ob-lsteps{ padding:12px 14px; gap:8px; border-radius:20px; }
.ob-m-load .ob-ls{ font-size:13px; }
.ob-m-load .ob-ls i{ width:20px; height:20px; font-size:11px; }
.ob-m-load .ob-lacts{ grid-template-columns:1fr 1.4fr; }
.ob-m-load .ob-lacts .ob-cta{ height:56px; font-size:14px; border-radius:16px; }
.ob-m-load .ob-ldpoco{ width:230px; bottom:-82px; }

.ob-s-q{ height:100dvh; padding:0; overflow:hidden; }
.ob-q-hero{ background:var(--c-brand); color:#FFF; padding:32px 20px 22px; border-radius:0 0 32px 32px; position:relative; overflow:hidden; flex:none; }
.ob-q-hero .ob-m-poco{ position:absolute; right:-16px; bottom:-34px; width:132px; transition:transform var(--t-slow) var(--ease-spring); }
.ob-q-hero small{ font-size:12px; font-weight:700; opacity:.88; letter-spacing:.3px; }
.ob-q-hero h2{ font-family:var(--font-say); font-weight:500; font-size:20px; line-height:1.3; margin:4px 0 12px; max-width:230px; }
.ob-q-prog{ display:flex; align-items:center; gap:10px; max-width:190px; }
.ob-q-bar{ flex:1; height:10px; border-radius:99px; background:rgba(255,255,255,.28); overflow:hidden; }
.ob-q-bar span{ display:block; height:100%; width:0; background:#FFF; border-radius:inherit; transition:width var(--t-slow) var(--ease-spring); }
.ob-q-prog b{ font-size:14px; }
.ob-q-list{ flex:1; min-height:0; overflow-y:auto; padding:16px 16px 20px; display:grid; gap:10px; align-content:start; }
.ob-q{
  display:flex; align-items:center; gap:12px; background:#FFF; border-radius:20px; padding:12px; text-align:left; width:100%;
  transition:transform var(--t-base) var(--ease-spring), opacity var(--t-base) ease; animation:ob-pop .4s var(--ease-spring) both;
}
.ob-q:active{ transform:scale(.97); }
.ob-q-ic{ width:44px; height:44px; border-radius:14px; display:grid; place-items:center; flex:none; color:#FFF; }
.ob-q-ic svg{ width:22px; height:22px; }
.ob-q-tx{ flex:1; min-width:0; }
.ob-q-tx b{ display:block; font-size:14px; line-height:1.3; }
.ob-q-tx small{ font-size:12px; color:var(--c-muted); }
.ob-q-mod{ font-size:11px; font-weight:700; padding:2px 8px; border-radius:99px; background:#FFF6EC; white-space:nowrap; }
.ob-q.done{ opacity:.58; }
.ob-q.done .ob-q-ic{ background:#2FB58E !important; }
.ob-q.done b{ text-decoration:line-through; }
.ob-q-foot{ flex:none; padding:12px 16px 18px; background:#FFF6EC; box-shadow:0 -10px 18px -14px rgba(35,31,32,.25); }
.ob-q-foot .ob-cta{ height:56px; font-size:15px; }

/* ---------- แท็บเล็ต + PC (≥768px) ---------- */
.ob-big{ position:relative; width:100%; height:100dvh; min-height:640px; overflow:hidden; background:#FFF6EC; container-type:size; }
.ob-bg{ position:absolute; inset:0; pointer-events:none; }
.ob-blob{ position:absolute; aspect-ratio:1; color:#F7E6D2; }
.ob-blob svg{ width:100%; height:100%; display:block; }
.ob-topbar{ position:absolute; left:0; right:0; top:0; height:72px; display:flex; align-items:center; justify-content:space-between; padding:0 36px; z-index:5; }
.ob-lg{ height:24px; }
.ob-steps{ display:flex; gap:8px; align-items:center; font-size:13px; font-weight:600; color:var(--c-muted); }
.ob-steps span:not(.ob-step-lbl){ width:30px; height:6px; border-radius:99px; background:#FBEBD9; transition:background var(--t-base), width var(--t-slow) var(--ease-spring); }
.ob-steps span.on{ background:var(--c-brand); width:44px; }
.ob-steps span.done{ background:#F3A3AA; }
.ob-step-lbl{ margin-left:6px; }

.ob-headline{ position:absolute; left:0; right:0; top:70px; text-align:center; z-index:3; animation:ob-fadeUp .5s var(--ease-smooth) both; padding:0 40px; }
.ob-headline h1{ font-family:var(--font-say); font-weight:400; line-height:1.2; font-size:clamp(36px, 8.2cqh, 66px); }
.ob-headline h1 b{ font-weight:600; color:var(--c-brand); }
.ob-headline p{ font-size:clamp(15px, 1.5cqw, 20px); color:var(--c-muted); margin-top:10px; }
.ob-headline p b{ color:var(--c-ink); }

.ob-giant{
  position:absolute; left:0; right:0; margin-inline:auto; width:75cqh; top:25cqh; z-index:1;
  transform-origin:50% 100%; animation:ob-breathe 5s ease-in-out infinite; pointer-events:none;
}
.ob-giant svg{ width:100%; height:auto; display:block; overflow:visible; }
.ob-giant .pp{ transition:transform .12s linear; }
.ob-giant .bl{ transform-box:fill-box; transform-origin:center; transition:transform .08s; }
.ob-giant.blink .bl{ transform:scaleY(.12); }
.ob-big.is-rise .ob-giant{ animation:ob-rise .9s var(--ease-spring) both, ob-breathe 5s 1s ease-in-out infinite; }

.ob-belly{
  position:absolute; left:0; right:0; margin-inline:auto; bottom:2.8cqh; width:min(500px, 46cqw); z-index:4;
  background:#FFF; border-radius:30px; padding:22px; display:flex; flex-direction:column; gap:14px;
  box-shadow:0 30px 60px -24px rgba(120,20,30,.5); animation:ob-fadeUp .5s .1s var(--ease-smooth) both;
}
.ob-ttl{ font-size:15px; font-weight:700; color:var(--c-muted); }

/* จอกว้าง (ประเภทร้าน / ของตั้งต้น) */
.ob-big.is-wide .ob-belly{ width:min(920px, 76cqw); bottom:3.6cqh; }
.ob-big.is-wide .ob-giant{ width:290px; top:28cqh; left:auto; right:calc(50% - min(920px, 76cqw) / 2 + 24px); margin:0; }
.ob-big.is-wide .ob-headline{ text-align:left; left:calc(50% - min(920px, 76cqw) / 2); right:auto; padding:0; max-width:min(640px, 56cqw); top:96px; }
.ob-big.is-wide .ob-headline h1{ font-size:clamp(34px, 7cqh, 56px); }
.ob-big.is-kitscr .ob-giant{ top:8.5cqh; width:185px; animation:ob-bob 3.2s ease-in-out infinite; }
.ob-big.is-kitscr .ob-headline{ max-width:min(640px, 52cqw); }

.ob-tiles4{ display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; }
.ob-tile4{
  --tc:#8B5A3C; --tt:#F4E9E1; position:relative; border-radius:24px; background:#FFF6EC; padding:22px 14px 18px;
  display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; border:2px solid transparent;
  transition:transform var(--t-base) var(--ease-spring), background var(--t-base) ease, border-color var(--t-base) ease, box-shadow var(--t-base) ease;
}
.ob-tile4:hover{ transform:translateY(-6px); box-shadow:0 16px 28px -18px rgba(35,31,32,.35); }
.ob-tile4:active{ transform:scale(.96); }
.ob-tile4 .ob-gl{ width:76px; height:76px; border-radius:50%; background:var(--tc); color:#FFF; display:grid; place-items:center; transition:transform .45s var(--ease-spring); }
.ob-tile4 .ob-gl svg{ width:42px; height:42px; }
.ob-tile4:hover .ob-gl{ transform:scale(1.08) rotate(-6deg); }
.ob-tile4 b{ font-family:var(--font-say); font-size:18px; font-weight:500; line-height:1.2; color:var(--c-ink); display:block; }
.ob-tile4 small{ font-size:12.5px; color:var(--c-muted); margin-top:4px; display:block; }
.ob-tile4 .ob-ck{
  position:absolute; right:12px; top:12px; width:26px; height:26px; border-radius:50%; border:2px solid #E3D3C1; background:#FFF;
  display:grid; place-items:center; transition:background var(--t-fast), border-color var(--t-fast), transform var(--t-base) var(--ease-spring);
}
.ob-tile4 .ob-ck svg{ width:14px; height:14px; color:#FFF; opacity:0; transition:opacity var(--t-fast); }
.ob-tile4[aria-pressed="true"]{ background:var(--tt); border-color:var(--tc); }
.ob-tile4[aria-pressed="true"] .ob-ck{ background:var(--tc); border-color:var(--tc); transform:scale(1.1); }
.ob-tile4[aria-pressed="true"] .ob-ck svg{ opacity:1; }
.ob-tile4[aria-pressed="true"] .ob-gl{ animation:ob-pop .45s var(--ease-spring); }
.ob-tile4.c-coffee{ --tc:#8B5A3C; --tt:#F5EAE2; }
.ob-tile4.c-matcha{ --tc:#4E9F5B; --tt:#E6F3E7; }
.ob-tile4.c-bubble{ --tc:#E46A8C; --tt:#FCE8EE; }
.ob-tile4.c-other{ --tc:#6F7FA0; --tt:#E9EDF5; }

.ob-shelves{ display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; max-height:46cqh; overflow-y:auto; }
.ob-shelves .ob-shelf{ background:#FFF6EC; }
.ob-shelves .ob-chip{ height:32px; padding:0 11px; background:#FFF; }
.ob-shelves .ob-chip[aria-pressed="true"]{ background:var(--c-ink); color:#FFF; }

/* จอกำลังจัดร้าน (แบบ 2) */
.ob-big.is-loadscr{ background:linear-gradient(180deg, #FFF8F2 0%, #FFE6DF 56%, #FFD0CC 100%); }
.ob-ld{ position:absolute; left:0; right:0; top:12cqh; display:flex; flex-direction:column; align-items:center; text-align:center; gap:12px; z-index:3; padding:0 24px; }
.ob-ring{ width:52px; height:52px; border-radius:50%; border:5px solid rgba(230,57,70,.16); border-top-color:var(--c-brand); animation:ob-spin .95s linear infinite; display:grid; place-items:center; }
.ob-ring.ok{ border-color:#17794A; animation:ob-pop .45s var(--ease-spring); background:#E2F4EA; color:#17794A; }
.ob-ring svg{ width:24px; height:24px; }
.ob-ld h2{ font-family:var(--font-say); font-size:clamp(24px, 4.2cqh, 36px); font-weight:500; line-height:1.25; }
.ob-ld h2 em{ font-style:normal; color:var(--c-brand); font-weight:600; }
.ob-ld-sub{ font-size:14px; color:var(--c-muted); }
.ob-lsteps{ width:100%; max-width:400px; background:rgba(255,255,255,.9); border-radius:24px; padding:16px 18px; display:grid; gap:10px; text-align:left; box-shadow:0 18px 40px -26px rgba(120,20,30,.4); }
.ob-ls{ display:flex; align-items:center; gap:10px; font-size:14.5px; font-weight:600; color:#B4A89C; transition:color var(--t-base); }
.ob-ls i{ width:24px; height:24px; border-radius:50%; background:#F3EBE2; display:grid; place-items:center; flex:none; font-style:normal; font-size:12px; transition:background var(--t-base), color var(--t-base); }
.ob-ls.on{ color:var(--c-ink); }
.ob-ls.on i{ background:#E2F4EA; color:#17794A; animation:ob-pop .4s var(--ease-spring); }
.ob-lacts{ width:100%; max-width:400px; display:grid; grid-template-columns:1fr 1.5fr; gap:10px; }
.ob-err{ width:100%; max-width:400px; display:grid; gap:10px; color:var(--c-danger); font-size:13.5px; font-weight:600; }
.ob-ldpoco{ position:absolute; left:0; right:0; margin-inline:auto; width:340px; bottom:-150px; z-index:1; pointer-events:none; }
.ob-ldpoco > div{ animation:ob-hop .55s var(--ease-spring); }
.ob-ldpoco svg{ width:100%; height:auto; display:block; }

/* กระดานเควส */
.ob-qwrap{ position:absolute; left:min(34cqw, 420px); right:48px; top:74px; bottom:24px; z-index:4; display:flex; flex-direction:column; gap:14px; overflow-y:auto; animation:ob-fadeUp .5s var(--ease-smooth) both; }
.ob-big.is-quest .ob-giant{ left:-6cqw; right:auto; margin:0; width:min(52cqw, 640px); top:auto; bottom:-22cqh; animation:none; }
.ob-qhead{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }
.ob-qhead small{ font-size:13px; font-weight:700; color:var(--c-brand); letter-spacing:.3px; }
.ob-qhead h2{ font-family:var(--font-say); font-size:clamp(24px, 2.7cqw, 34px); font-weight:400; line-height:1.2; }
.ob-qhead h2 b{ font-weight:600; color:var(--c-brand); }
.ob-qprog{ min-width:200px; display:grid; gap:6px; justify-items:end; }
.ob-qprog b{ font-size:26px; }
.ob-qprog b small{ font-size:15px; color:var(--c-muted); font-weight:600; }
.ob-qbar{ width:200px; height:10px; border-radius:99px; background:#F0D7BF; overflow:hidden; }
.ob-qbar span{ display:block; height:100%; background:var(--c-brand); border-radius:inherit; transition:width .6s var(--ease-spring); }
.ob-qgrid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; }
.ob-qt{
  position:relative; border-radius:22px; padding:14px 16px; min-height:132px; color:#FFF; text-align:left;
  display:flex; flex-direction:column; gap:6px; overflow:hidden; isolation:isolate;
  transition:transform var(--t-base) var(--ease-spring), opacity var(--t-base), filter var(--t-base);
  animation:ob-pop .45s var(--ease-spring) both;
}
.ob-qt::before{ content:''; position:absolute; width:120%; aspect-ratio:1; border-radius:50%; background:rgba(255,255,255,.14); right:-60%; bottom:-70%; z-index:-1; }
.ob-qt:hover{ transform:translateY(-4px); }
.ob-qt-ic{ width:38px; height:38px; border-radius:12px; background:rgba(255,255,255,.22); display:grid; place-items:center; }
.ob-qt-ic svg{ width:20px; height:20px; }
.ob-qt b{ font-size:15.5px; line-height:1.25; margin-top:auto; }
.ob-qt small{ font-size:12.5px; opacity:.92; }
.ob-qt-tg{ position:absolute; right:12px; top:14px; font-size:11px; font-weight:700; background:rgba(255,255,255,.25); padding:3px 9px; border-radius:99px; }
.ob-qt.done{ filter:saturate(.25); opacity:.62; }
.ob-qt.done .ob-qt-ic{ background:#FFF; color:#2FB58E; }
.ob-qt.done b{ text-decoration:line-through; }
.ob-q-go-home{ max-width:320px; }

/* แท็บเล็ต (แนวตั้ง · max-aspect-ratio: 1/1) */
@container (max-aspect-ratio: 1/1){
  .ob-headline{ top:96px; text-align:center; left:0; right:0; max-width:none; padding:0 36px; }
  .ob-headline h1{ font-size:clamp(36px, 7.2cqw, 60px); }
  .ob-giant{ width:75cqw; top:27cqh; }
  .ob-belly{ bottom:3cqh; width:min(540px, 78cqw); padding:24px; }
  .ob-big.is-wide .ob-belly{ width:88cqw; bottom:3.5cqh; }
  .ob-big.is-wide .ob-giant{ width:34cqw; top:25cqh; right:calc(6cqw + 16px); }
  .ob-big.is-wide .ob-headline{ left:6cqw; right:auto; text-align:left; padding:0; max-width:54cqw; top:96px; }
  .ob-big.is-wide .ob-headline h1{ font-size:clamp(32px, 6cqw, 52px); }
  .ob-big.is-kitscr .ob-giant{ width:22cqw; top:11cqh; }
  .ob-tiles4{ grid-template-columns:repeat(2, 1fr); }
  .ob-tile4{ flex-direction:row; text-align:left; padding:18px; gap:14px; }
  .ob-tile4 .ob-gl{ width:64px; height:64px; flex:none; }
  .ob-tile4 small{ margin-top:2px; }
  .ob-shelves{ grid-template-columns:1fr 1fr; max-height:48cqh; }
  .ob-qwrap{ left:36px; right:36px; top:84px; bottom:24px; }
  .ob-big.is-quest .ob-giant{ left:0; right:0; margin-inline:auto; width:64cqw; bottom:-24cqw; }
  .ob-qgrid{ grid-template-columns:repeat(2, 1fr); }
  .ob-qt{ min-height:112px; }
  .ob-ld{ top:13cqh; }
  .ob-ldpoco{ width:50cqw; bottom:-16cqw; }
}

/* ---------- การ์ดเควสบนหน้าหลัก (core/home.js) ---------- */
.home-quest{
  position:relative; overflow:hidden; border-radius:28px; padding:18px; min-height:190px;
  display:flex; flex-direction:column; gap:10px;
  background:var(--c-ink); color:#FFF;
}
.hq-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; position:relative; z-index:2; }
.hq-kicker{ font-size:12px; font-weight:600; opacity:.75; }
.hq-all{ font-size:12px; font-weight:700; padding:6px 12px; border-radius:var(--r-pill); background:rgba(255,255,255,.14); color:#FFF; min-height:32px; }
.hq-title{ font-family:var(--font-say); font-size:20px; font-weight:500; line-height:1.28; max-width:66%; position:relative; z-index:2; }
.hq-title b{ font-weight:600; }
.hq-pose{ position:absolute; right:-10px; top:26px; width:108px; height:auto; pointer-events:none; }
.hq-next{
  margin-top:auto; background:rgba(255,255,255,.12); border-radius:16px; padding:10px 12px;
  display:flex; align-items:center; gap:10px; position:relative; z-index:2;
}
.hq-next i{ width:10px; height:10px; border-radius:50%; flex:none; }
.hq-next span{ font-size:13px; font-weight:600; flex:1; min-width:0; }
.hq-btn{ min-height:36px; padding:0 14px; border-radius:12px; background:#FFF; color:var(--c-ink); font-size:12.5px; font-weight:700; flex:none; }

@media (min-width:768px){
  .home-quest{ background:#FFF6EC; color:var(--c-ink); padding:22px; min-height:210px; }
  .hq-kicker{ color:var(--c-brand); opacity:1; font-weight:700; }
  .hq-all{ background:#FFF; color:var(--c-ink); }
  .hq-title{ font-size:24px; font-weight:400; max-width:70%; }
  .hq-title b{ color:var(--c-brand); font-weight:600; }
  .hq-pose{ right:12px; top:auto; bottom:-36px; width:124px; }
  .hq-next{ background:#FFF; border-radius:18px; padding:11px 14px; }
  .hq-btn{ background:var(--c-brand); color:#FFF; }
}

@media (prefers-reduced-motion:reduce){
  .ob-root *, .ob-root *::before{ animation:none !important; transition:none !important; }
}

/* ---------- Step 27 · Migration (ย้ายข้อมูลเดิม) ---------- */
.mig-page{ display:grid; gap:var(--s-4); padding-bottom:var(--s-6); min-width:0; }
.mig-drop{ padding:24px; border:2px dashed var(--c-line); background:var(--c-surface); }
.mig-drop-in{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.mig-drop-in > .ph{ font-size:32px; color:var(--c-brand); flex:none; }
.mig-drop-in > div{ flex:1 1 240px; min-width:0; display:grid; gap:4px; }
.mig-pick{ cursor:pointer; }
.mig-warn{ margin-top:10px; padding:10px 12px; border-radius:var(--r-12); background:var(--c-warning-tint); color:var(--c-warning); font-size:13px; }
.mig-err{ margin-top:10px; padding:10px 12px; border-radius:var(--r-12); background:var(--c-danger-tint); color:var(--c-danger); font-size:13px; }
.mig-grid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--s-4); }
.mig-card{ display:grid; gap:12px; min-width:0; align-content:start; }
.mig-stats{ display:grid; grid-template-columns:repeat(auto-fit, minmax(92px, 1fr)); gap:8px; }
.mig-stat{ background:var(--c-bg); border-radius:var(--r-12); padding:10px 12px; display:grid; gap:2px; min-width:0; }
.mig-stat span{ font-size:12px; color:var(--c-muted); }
.mig-stat strong{ font-size:20px; font-weight:700; }
.mig-tbl-wrap{ width:100%; overflow-x:auto; }
.mig-tbl{ width:100%; border-collapse:collapse; font-size:13px; }
.mig-tbl th{ text-align:left; color:var(--c-muted); font-weight:600; padding:6px 4px; border-bottom:1px solid var(--c-line); white-space:nowrap; }
.mig-tbl td{ padding:8px 4px; border-bottom:1px dashed var(--c-line); }
.mig-tbl th:last-child, .mig-tbl td:last-child{ text-align:right; white-space:nowrap; }
.mig-opts{ display:grid; gap:12px; }
.mig-mode{ display:flex; flex-wrap:wrap; gap:8px; }
.mig-chk{ display:flex; align-items:center; gap:10px; font-size:14px; cursor:pointer; }
.mig-chk input{ width:18px; height:18px; accent-color:var(--c-ink); flex:none; }
.mig-bar{ display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; padding-top:4px; }
.mig-done{ display:grid; gap:16px; }
.mig-done-head{ display:flex; align-items:center; gap:14px; }
.mig-done-ic{ width:48px; height:48px; border-radius:50%; background:var(--c-success-tint); color:var(--c-success); display:grid; place-items:center; font-size:26px; flex:none; }
.mig-acts{ display:flex; gap:10px; flex-wrap:wrap; }
.mig-export-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:var(--s-4); }
.mig-export-card{ display:grid; gap:12px; align-content:start; min-width:0; }
.mig-tpl-card{ display:grid; gap:14px; min-width:0; }
.mig-tpl-map{ display:grid; gap:8px; }
.mig-tpl-row{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:10px; align-items:center; padding:8px 10px; border-radius:var(--r-12); background:var(--c-bg); }
.mig-tpl-col{ font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.mig-tpl-sel{ width:100%; min-width:0; padding:8px 10px; border-radius:var(--r-12); border:1px solid var(--c-line); background:var(--c-surface); font:inherit; font-size:13px; color:var(--c-ink); }
.mig-saved-list{ display:grid; gap:8px; }
.mig-saved-item{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:10px 12px; border-radius:var(--r-12); background:var(--c-bg); }
.mig-saved-meta{ display:grid; gap:2px; min-width:0; flex:1 1 180px; }
@media (max-width:640px){ .mig-tpl-row{ grid-template-columns:1fr; } }
@media (max-width:900px){ .mig-grid{ grid-template-columns:1fr; } }

/* ---------- Step 28 · Super Admin Console (admin.html) ---------- */
.adm-body{ background:var(--c-bg); margin:0; }
.adm-wrap{ max-width:1120px; margin:0 auto; padding:24px 16px 48px; display:grid; gap:16px; min-width:0; }
.adm-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.adm-brand{ display:flex; align-items:center; gap:10px; }
.adm-brand img{ height:28px; width:auto; }
.adm-acts{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.adm-gate{ max-width:460px; margin:48px auto; display:grid; justify-items:center; text-align:center; gap:12px; padding:28px 24px; }
.adm-pose{ width:76px; height:auto; }
.adm-uid-box{ width:100%; background:var(--c-bg); border-radius:var(--r-12); padding:10px 12px; display:grid; gap:4px; word-break:break-all; }
.adm-kpis{ display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:10px; }
.adm-tools{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.adm-req, .adm-shop{ display:grid; gap:10px; min-width:0; }
.adm-req-meta{ display:flex; flex-wrap:wrap; gap:8px 16px; font-size:13px; color:var(--c-muted); align-items:center; }
.adm-req-meta strong{ color:var(--c-ink); }
.adm-req-actions{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.adm-note-inp{ flex:1 1 200px; min-width:0; padding:9px 12px; border-radius:var(--r-12); border:1px solid var(--c-line); background:var(--c-bg); font:inherit; font-size:13px; }
.adm-shop-foot{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.adm-modal-backdrop{ position:fixed; inset:0; background:rgba(35,31,32,.48); display:grid; place-items:center; padding:16px; z-index:90; overflow-y:auto; }
.adm-modal{ width:100%; max-width:560px; display:grid; gap:14px; }
.adm-form-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:10px; }
.adm-mod-chks{ display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:8px; background:var(--c-bg); border-radius:var(--r-12); padding:10px 12px; }
.adm-modal-acts{ display:flex; flex-wrap:wrap; gap:8px; padding-top:4px; }
