/* chat-order.css — โหมด "ทำออเดอร์" ในแผงขวาของหน้าแชท (Temp/91_order_in_chat_mockup.html แบบ A ที่ Mai เคาะ 2026-09-20)
   ต่อจาก style.css + chat.css + chat-quote.css (ห้ามแก้ 3 ไฟล์นั้น) · ธีม A/B/C ใช้ตัวแปรเดิม (--sec/--sec-ink จาก chat.css)
   หัวแผง/ท้ายแผง/กล่องเนื้อ ใช้คลาส cq-head / cq-body ของ chat-quote.css ร่วม · ที่เหลือ scope ใต้ .co / .tools.order-mode · ใช้ได้ที่ความกว้าง 380-720px */

/* เปิดโหมด → ซ่อนแท็บ/เนื้อหาเดิมของแผงขวาทั้งหมด (DOM ยังอยู่ chat.js วาดต่อได้เงียบ ๆ) — กติกาเดียวกับ chat-quote.css บรรทัด 6-7 */
.tools.order-mode > .tabs, .tools.order-mode > .body, .tools.order-mode > .rail-tabs, .tools.order-mode > .topbtns { display: none !important; }
.tools.order-mode > .co { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ---- หัวแผง (สีน้ำเงินตามธีม) · หลังสร้าง = เขียว ---- */
.co .cq-head.co-head .t small + small { opacity: .75; margin-top: 1px; }
.co .cq-head.done { background: var(--accent-strong); }
.co .cq-head .muted2 { font-weight: 500; opacity: .85; }
.co .cq-head .cq-st { max-width: 40%; overflow: hidden; text-overflow: ellipsis; }

/* แถบเครดิต iShip (แดง) */
.co-credit { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--danger-soft); color: var(--danger-ink); font-size: var(--fs-xs); border-bottom: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); flex: none; }
.co-credit b { font-weight: 800; }
.co-credit .dotr { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.co-credit .sp { flex: 1; }
.co-credit .ibtn { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger-ink); background: var(--surface); text-decoration: none; }

/* ---- stepper ---- */
.co-steps { display: flex; padding: 10px 14px 6px; flex: none; }
.co-steps .stp { flex: 1; display: flex; align-items: center; gap: 7px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); position: relative; cursor: pointer; white-space: nowrap; min-width: 0; }
.co-steps .stp .n { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-weight: 800; font-size: var(--fs-xs); flex: none; }
.co-steps .stp::after { content: ""; flex: 1; height: 2px; background: var(--border); margin: 0 10px; border-radius: 2px; min-width: 8px; }
.co-steps .stp:last-child { flex: 0 0 auto; }
.co-steps .stp:last-child::after { display: none; }
.co-steps .stp.done { color: var(--ok-ink); } .co-steps .stp.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.co-steps .stp.done::after { background: var(--ok); }
.co-steps .stp.on { color: var(--accent-strong); } .co-steps .stp.on .n { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.co-steps .stp:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.tools:not(.wide) .co-steps .stp:not(.on) { font-size: 0; }   /* แผงแคบ: เหลือเลขวงกลม ยกเว้นขั้นที่อยู่ */
.tools:not(.wide) .co-steps .stp:not(.on) .n { font-size: var(--fs-xs); }

/* ---- เนื้อแผง ---- */
.co .co-body { gap: 10px; }
/* tooltip ⓘ ที่ซ่อนอยู่ (visibility:hidden) ยังกินความกว้างของกล่องเลื่อน → แผงแคบมีแถบเลื่อนแนวนอนโผล่ — ในแผงนี้ซ่อนด้วย display จนกว่าจะชี้ */
.co .ihint::after { display: none; }
.co .ihint:hover::after, .co .ihint:focus::after, .co .ihint.open::after { display: block; }
.co .co-step { display: flex; flex-direction: column; gap: 10px; }
.co .co-step[hidden] { display: none; }
.co .co-step > * { flex: none; min-width: 0; }
.co .a-title { font-size: var(--fs-md); font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.co .a-title .muted { font-weight: 500; font-size: var(--fs-xs); }
.co .a-title .sp { flex: 1; }
.co .small { font-size: var(--fs-xs); }
.co .bad { color: var(--danger-ink); font-weight: 700; }
.co .ok { color: var(--ok-ink); font-weight: 700; }
.co .chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.co .tag.xs { font-size: var(--fs-xs); padding: 0 6px; }
.co .warnchip { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 0 6px; color: var(--warn-ink); font-size: var(--fs-xs); }
.co-note { font-size: var(--fs-xs); border-radius: 8px; padding: 6px 10px; background: var(--info-soft); color: var(--info-ink); line-height: 1.45; }
.co-note.warn { background: var(--warn-soft); color: var(--warn-ink); }
.co-note.ok { background: var(--ok-soft); color: var(--ok-ink); }
.co-note .lnk { color: inherit; }
.co .seg2.sm { height: 28px; margin-bottom: 0; }
.co .seg2.sm button { height: 22px; line-height: 22px; padding: 0 10px; font-size: var(--fs-xs); }
.tools .co .btn.sm { height: 28px; padding: 0 10px; font-size: var(--fs-xs); width: auto; }
.tools .co .btn.lg { height: 40px; padding: 0 18px; font-size: var(--fs-md); box-shadow: 0 6px 16px rgba(4,120,87,.22); }
.co input, .co select, .co textarea { font: inherit; }

/* ---- ขั้น 1: ตารางรายการ (1 บรรทัดต่อรายการ · เหมือน mockup .itbl) ---- */
.co-lines { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.co-lines .lh, .co-lines .ln { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) 64px 112px 84px; gap: 8px; align-items: center; padding: 4px 10px; border-bottom: 1px solid var(--border); min-width: 0; }
.co-lines .lh { font-size: var(--fs-xs); color: var(--text-3); font-weight: 700; background: var(--surface-2); padding: 6px 10px; }
.co-lines .lh span:nth-child(n+4), .co-lines .ln .r { text-align: right; }
.co-lines .ln { min-height: 42px; font-size: var(--fs-xs); background: var(--surface); }
.co-lines .ln:last-child { border-bottom: 0; }
.co-lines .ln.sum { background: var(--surface-2); font-weight: 700; min-height: 34px; }
.co-lines .ln.fee { background: var(--surface-2); }
.co-lines .ln.disc { background: var(--surface-2); }   /* ส่วนลดท้ายบิลตามใบเสนอ FA (530) — แสดงก่อนบรรทัดรวม */
.co-lines .ln.disc .tot { color: var(--danger-ink); }
.co-lines .ln.sum small.muted { font-weight: 500; font-size: var(--fs-xs); }
.co-lines .ln.now { background: color-mix(in srgb, var(--danger) 5%, var(--surface)); box-shadow: inset 3px 0 0 var(--danger); }
.co-lines .no { font-size: var(--fs-xs); color: var(--text-3); text-align: right; }
.co-lines .thumb { width: 30px; height: 30px; border-radius: 7px; flex: none; }
.co-lines .thumb .ph { font-size: var(--fs-md); }
.co-lines .thumb.svc { cursor: default; font-size: var(--fs-md); }
.co-lines .tx { min-width: 0; display: flex; flex-direction: column; }
.co-lines .t { font-weight: 700; font-size: var(--fs-xs); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-lines .c { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-lines .r { white-space: nowrap; font-variant-numeric: tabular-nums; }
.co-lines .r small { color: var(--text-3); font-size: var(--fs-xs); }
.co-lines .tot { font-weight: 800; }
.co-lines .win { width: 100%; height: 28px; border: 1px solid var(--danger); border-radius: 8px; padding: 0 8px; text-align: right; background: var(--input-bg); color: var(--text); font-size: var(--fs-xs); }
.co-lines .win:focus { outline: none; box-shadow: 0 0 0 3px var(--ring); border-color: var(--accent); }
.tools:not(.wide) .co-lines .lh, .tools:not(.wide) .co-lines .ln { grid-template-columns: 22px 30px minmax(0, 1fr) 56px 96px; }
.tools:not(.wide) .co-lines .lh span:nth-child(6), .tools:not(.wide) .co-lines .tot { display: none; }

/* ยอดเก็บเงิน */
.co-pay { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-xs); }
.co-pay .cod { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); }
.co-pay .cod input { width: 96px; height: 28px; border: 1px solid var(--input-border); border-radius: 8px; padding: 0 8px; text-align: right; background: var(--input-bg); color: var(--text); font-variant-numeric: tabular-nums; }

/* สลิปโอนเงิน */
.co-slip { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: start; background: var(--surface); }
.co-slip .sh { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 800; }
.co-slip .sh .req { color: var(--danger); font-weight: 800; }
.co-slip .slipimg { width: 120px; height: 150px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 34px; color: var(--text-3); position: relative; overflow: hidden; }
.co-slip .slipimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-slip .slipimg .t { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: var(--fs-xs); color: var(--text-2); background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-slip .slipimg.none { background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, var(--surface) 8px 16px); border-style: dashed; border-color: var(--danger); font-size: var(--fs-2xl); }
.co-slip .sm { display: grid; gap: 6px; align-content: start; font-size: var(--fs-xs); min-width: 0; }
.co-slip .st.bad { display: inline-flex; align-items: center; gap: 6px; color: var(--danger-ink); background: var(--danger-soft); border-radius: 8px; padding: 5px 9px; font-weight: 700; font-size: var(--fs-xs); }
.co-slip .st.bad::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.co-slip .st.ok { display: inline-flex; align-items: center; gap: 6px; color: var(--ok-ink); font-weight: 700; }
.co-slip .ibtn { text-decoration: none; }
.co-pics { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 6px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2); }
.co-pics .pk { width: 64px; height: 84px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow: hidden; cursor: pointer; padding: 0; color: inherit; }
.co-pics .pk:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.co-pics .pk .ph { width: 100%; height: 64px; display: grid; place-items: center; font-size: var(--fs-lg); color: var(--text-3); background: var(--surface-2); }
.co-pics .pk .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-pics .pk small { font-size: var(--fs-xs); color: var(--text-3); line-height: 20px; white-space: nowrap; }

/* ---- ขั้น 2: ขนส่ง ---- */
.fromqt { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; background: var(--ok-soft); color: var(--ok-ink); font-size: var(--fs-xs); flex-wrap: wrap; }
.fromqt .ibtn { margin-left: auto; background: var(--surface); }
.co .ship { display: grid; gap: 5px; }
.co .shp { display: grid; grid-template-columns: 18px 28px minmax(0, 1fr) auto 84px; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 5px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-2); font-size: var(--fs-xs); font: inherit; cursor: pointer; }
.co .shp:hover { border-color: var(--border-strong); }
.co .shp[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.co .shp.na { opacity: .55; cursor: not-allowed; }
.co .shp .rd { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; }
.co .shp[aria-pressed="true"] .rd { border-color: var(--accent-strong); }
.co .shp[aria-pressed="true"] .rd::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-strong); }
.co .shp .lg { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 900; background: #fff; border: 1px solid var(--border); object-fit: contain; }
.co .shp .lg.mono { background: var(--neutral); color: var(--neutral-ink); }
.co .shp .nm { font-weight: 700; display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.co .shp .nm small { font-weight: 500; color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
.co .shp .days { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.co .shp .pr { font-weight: 800; font-size: var(--fs-md); text-align: right; font-variant-numeric: tabular-nums; }
.co .shp .pr.na { font-size: var(--fs-xs); font-weight: 600; color: var(--warn-ink); white-space: normal; line-height: 1.2; }
.tools:not(.wide) .co .shp { grid-template-columns: 18px 28px minmax(0, 1fr) 76px; } .tools:not(.wide) .co .shp .days { display: none; }
.co-manual { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: flex-end; }
.co-manual label { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-xs); color: var(--text-3); min-width: 0; }
.co-manual label.grow { flex: 1; min-width: 200px; }
.co-manual input { height: 30px; border: 1px solid var(--input-border); border-radius: 8px; padding: 0 8px; font-size: var(--fs-xs); background: var(--input-bg); color: var(--text); width: 100%; }

/* ซอยพัสดุ — การ์ดต่อกล่อง 3 คอลัมน์ตาม mockup .srow */
.co-splits { display: grid; gap: 5px; }
.co-splits .srow { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 5px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font-size: var(--fs-xs); color: var(--text-2); }
.co-splits .srow .k { font-weight: 800; color: var(--text); }
.co-splits .srow .who { display: flex; gap: 4px 10px; flex-wrap: wrap; min-width: 0; line-height: 1.6; }
.co-splits .srow .who b { color: var(--text); font-weight: 600; }
.co-splits .srow .al { white-space: nowrap; }
.co-splits .srow .w { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.co-splits .srow .w b { color: var(--text); }
.co-splits .srow .box { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.co-splits .srow select { height: 24px; border: 1px solid var(--input-border); border-radius: 7px; font-size: var(--fs-xs); background: var(--input-bg); color: var(--text); padding: 0 4px; max-width: 150px; }
.co-splits .srow .qin { width: 52px; height: 22px; border: 1px solid var(--input-border); border-radius: 6px; text-align: right; font-size: var(--fs-xs); padding: 0 4px; background: var(--input-bg); color: var(--text); }
.co-splits .srow .bwin { width: 44px; height: 22px; border: 1px solid var(--input-border); border-radius: 6px; text-align: right; font-size: var(--fs-xs); padding: 0 4px; background: var(--input-bg); color: var(--text); }
.co-splits .srow .del { border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: var(--fs-sm); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.co-splits .srow .del:hover { background: var(--danger-soft); color: var(--danger); }
.co-splits .srow.sum { background: var(--surface-2); border-style: dashed; }
.tools:not(.wide) .co-splits .srow { grid-template-columns: 52px minmax(0, 1fr); }
.tools:not(.wide) .co-splits .srow .w, .tools:not(.wide) .co-splits .srow .box { grid-column: 2; justify-self: end; text-align: right; }

/* ---- ขั้น 3: ผู้รับ ---- */
.co .fcard { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.co .fcard > .fh { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--surface-2); font-size: var(--fs-sm); min-height: 36px; flex-wrap: wrap; }
.co .fcard > .fh b.tt { font-weight: 800; white-space: nowrap; color: var(--accent-strong); }
.co .fcard > .fh .sp { flex: 1; }
.co .fcard > .fb { padding: 8px 12px; display: grid; gap: 7px; border-top: 1px solid var(--border); }
.co .kv2 { display: grid; grid-template-columns: 78px minmax(0, 1fr) 78px minmax(0, 1fr); gap: 3px 10px; font-size: var(--fs-xs); align-items: baseline; }
.co .kv2 .k { color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
.co .kv2 .v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co .kv2 .v.wide { grid-column: 2 / -1; white-space: normal; }
.tools:not(.wide) .co .kv2 { grid-template-columns: 78px minmax(0, 1fr); } .tools:not(.wide) .co .kv2 .v.wide { grid-column: 2; }
.co .addr { display: grid; gap: 5px; }
.co .arow { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: var(--fs-xs); color: var(--text-2); font: inherit; cursor: pointer; }
.co .arow[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.co .arow .star { color: #d97706; font-size: var(--fs-md); }
.co .arow .star.off { color: var(--border-strong); }
.co .arow .tx { min-width: 0; line-height: 1.35; font-size: var(--fs-xs); color: var(--text-3); }
.co .arow .tx b { display: block; font-weight: 700; font-size: var(--fs-xs); color: inherit; white-space: normal; }
.co .arow[aria-pressed="true"] .tx b { color: var(--text); }
.co .arow small { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.co .fld { display: grid; gap: 3px; font-size: var(--fs-xs); color: var(--text-3); }
.co .fld input, .co .fld textarea { height: 30px; border: 1px solid var(--input-border); border-radius: 8px; padding: 0 9px; font-size: var(--fs-xs); background: var(--input-bg); color: var(--text); width: 100%; min-width: 0; }
.co .fld input:focus, .co .fld textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.co .fld input[readonly] { background: var(--surface-2); color: var(--text-2); }
.co .fld input.bad { border-color: var(--danger); color: var(--danger-ink); }
.co .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.tools:not(.wide) .co .g2 { grid-template-columns: 1fr; }
.co .pastebox { display: grid; gap: 6px; padding: 8px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2); }
.co .pastebox textarea { height: auto; min-height: 60px; padding: 6px 9px; resize: vertical; border: 1px solid var(--input-border); border-radius: 8px; background: var(--input-bg); color: var(--text); font-size: var(--fs-xs); }

/* ---- ขั้น 4: สรุป + ลำดับที่ระบบจะทำ ---- */
.co .review { display: grid; gap: 6px; }
.co .rv { display: grid; grid-template-columns: 22px 66px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: var(--fs-xs); background: var(--surface); }
.co .rv .ic { font-size: var(--fs-md); } .co .rv .k { color: var(--text-3); } .co .rv .v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co .rv .v b { font-weight: 700; }
.co .seq { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.co .seq .sqh { padding: 7px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.co .seq .sq { display: grid; grid-template-columns: 22px 30px 88px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--border); font-size: var(--fs-xs); }
.co .seq .sq:last-of-type { border-bottom: 0; }
.co .seq .sq .n { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 800; }
.co .seq .sq .ic { font-size: var(--fs-lg); text-align: center; }
.co .seq .sq .sys { font-weight: 800; }
.co .seq .sq .v { color: var(--text-2); min-width: 0; line-height: 1.35; }
.co .seq .sq .v b { color: var(--text); }
.co .seq .sqw { padding: 6px 12px; background: var(--warn-soft); color: var(--warn-ink); font-size: var(--fs-xs); border-top: 1px solid var(--border); }
.tools:not(.wide) .co .seq .sq { grid-template-columns: 22px 30px minmax(0, 1fr); } .tools:not(.wide) .co .seq .sq .sys { display: none; }

/* ---- แถบล่าง: [บันทึกร่าง] ..... [ยอดรวม] ..... [← ย้อน][ถัดไป →] ---- */
.co-foot { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--border); background: var(--surface); flex: none; }
.co-foot .tot { text-align: center; font-size: var(--fs-xs); color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-foot .tot b { font-size: var(--fs-lg); color: var(--accent-strong); font-weight: 800; }
.co-foot .nav { display: flex; gap: 6px; align-items: center; }
.co-foot .warnsm { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--text-3); text-align: right; margin-top: -2px; }
.tools .co-foot .btn { height: 34px; padding: 0 14px; font-size: var(--fs-sm); border-radius: 9px; width: auto; white-space: nowrap; }   /* chat.css ตั้ง .tools .btn.accent เต็มแถว — ในท้ายแผงต้องไม่เต็ม */
.tools .co-foot .btn.lg { height: 40px; padding: 0 16px; font-size: var(--fs-sm); }
.co-foot .btn.ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.co-foot .btn:disabled { opacity: .55; cursor: not-allowed; }
.tools:not(.wide) .co-foot { grid-template-columns: auto 1fr; }
.tools:not(.wide) .co-foot .nav { grid-column: 1 / -1; justify-content: flex-end; }
.tools:not(.wide) .co-foot .tot { text-align: right; }

/* ---- หลังส่งเข้าคิว (รอบ 1: ข้อความ + ปุ่ม — หน้าสถานะจริงทำรอบ 3) ---- */
.co-done { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 20px 10px; }
.co-done .big { font-size: 40px; }
.co-done .msg { font-size: var(--fs-sm); line-height: 1.55; color: var(--text-2); max-width: 420px; }
.co-done .msg b { color: var(--text); font-size: var(--fs-md); }
.co-done .ibtn { text-decoration: none; }

/* ---- แถวใบเสนอราคาในแท็บ "ใบเสนอ/บิล" (chat.js quoteActs/pdfIco) ---- */
.tools .tbl .ibtn.pdfi, .tools .crow .ibtn.pdfi { width: 24px; padding: 0; justify-content: center; font-size: var(--fs-xs); color: var(--text-3); }
.tools .tbl .ibtn.pdfi:hover, .tools .crow .ibtn.pdfi:hover { color: var(--text); }
.tools .tbl td .btn.sm, .tools .crow .btn.sm { height: 26px; padding: 0 9px; font-size: var(--fs-xs); width: auto; display: inline-flex; vertical-align: middle; }
.tools .btn.ghost.sm { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }
.tools .btn.ghost.sm:hover { background: var(--surface-2); }
.tools tr.dim td, .tools .crow.dim { opacity: .55; }

/* โซนวางสลิป (ลากจากแชท) */
[data-co="slipbox"] { border: 2px dashed transparent; border-radius: 10px; transition: border-color .15s, background .15s; }
[data-co="slipbox"].drop { border-color: var(--accent); background: var(--accent-soft); }
.co-dropHint { font-size: var(--fs-xs); color: var(--text-2); padding: 4px 8px; border: 1px dashed var(--border); border-radius: 8px; }

/* ---- สลิป 1-3 รูป (Mai 2026-09-20): แถวรูปย่อ 3 ช่อง · รูปแรก = ส่ง BS · ✕ มุมขวาบน · ปุ่ม "ใช้รูปนี้ส่ง BS" บนรูป 2-3 ---- */
.co-slip .sh .sp { flex: 1; }
.co-slips { display: flex; gap: 8px; flex-wrap: wrap; }
.co-slips .sl { position: relative; width: 112px; height: 140px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; }
.co-slips .sl img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-slips .sl .ph { font-size: var(--fs-3xl); color: var(--text-3); }
.co-slips .sl small { position: absolute; left: 0; right: 0; bottom: 0; font-size: var(--fs-xs); color: var(--text-2); background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 2px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-slips .sl .bsl { position: absolute; left: 5px; top: 5px; z-index: 1; }   /* ห้ามใช้ .lb — ใน chat.css คือ lightbox เต็มจอ (วงรีเขียวทับรูป 2026-09-20) */
.co-slips .sl.bs { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok-soft); }
.co-slips .sl .x { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--text) 70%, transparent); color: #fff; font-size: var(--fs-xs); line-height: 20px; cursor: pointer; padding: 0; }
.co-slips .sl .x:hover { background: var(--danger); }
.co-slips .sl .mk { position: absolute; left: 4px; right: 4px; bottom: 18px; border: 0; border-radius: 6px; background: color-mix(in srgb, var(--text) 75%, transparent); color: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 700; padding: 2px 4px; cursor: pointer; opacity: 0; transition: opacity .12s; }
.co-slips .sl:hover .mk, .co-slips .sl:focus-within .mk { opacity: 1; }
.co-slips .sl.empty { border-style: dashed; border-color: var(--border-strong); cursor: pointer; background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, var(--surface) 8px 16px); }
.co-slips .sl.empty.none { border-color: var(--danger); }
.co-slips .sl.empty .ph { font-size: var(--fs-2xl); }
.co-slips .sl.empty small { position: static; background: transparent; }
.co-slips .sl.empty:hover { border-color: var(--accent); }
.tools:not(.wide) .co-slips .sl { width: 92px; height: 116px; }

/* ยอดในสลิป (อ่านอัตโนมัติจาก OCR ของแชท) */
.co-slipamt:empty { display: none; }
.co-slipamt .amt { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; padding: 4px 9px; border-radius: 8px; }
.co-slipamt .amt.ok { color: var(--ok-ink); background: var(--ok-soft); }
.co-slipamt .amt.diff { color: var(--warn-ink); background: var(--warn-soft); }
.co-slipamt .amt.skip, .co-slipamt .amt.busy { color: var(--text-3); background: var(--surface-2); font-weight: 500; }


/* ---- พัสดุ: การ์ดต่อกล่องแบบตาราง มีรูป SKU รายบรรทัด (Mai 2026-09-20 รอบ 3 — สีต้องชัด) ---- */
.co-parcels { display: flex; flex-direction: column; gap: 10px; }
.co .co-parcel { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-left: 4px solid var(--accent-strong); border-radius: 12px; background: var(--surface); overflow: hidden; }
.co .co-parcel .phead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 12px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; font-size: var(--fs-sm); }
.co .co-parcel .phead small { font-weight: 600; font-size: var(--fs-xs); opacity: .8; margin-left: 1px; }
.co .co-parcel .phead .dot { opacity: .5; }
.co .co-parcel .phead .pw2, .co .co-parcel .phead .psh { font-variant-numeric: tabular-nums; }
.co .ptbl { margin: 8px 10px 0; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); }
.co .ptbl .ph, .co .ptbl .pr { display: grid; grid-template-columns: minmax(0, 1fr) 176px 80px 28px; gap: 8px; align-items: center; padding: 4px 8px; border-bottom: 1px solid var(--border); min-width: 0; }
.co .ptbl .ph { font-size: var(--fs-xs); color: var(--text-3); font-weight: 700; background: var(--surface-2); }
.co .ptbl .ph span:nth-child(n+2), .co .ptbl .pw { text-align: right; }
.co .ptbl .pr { min-height: 46px; font-size: var(--fs-xs); }
.co .ptbl .pr:last-child { border-bottom: 0; }
.co .ptbl .pr.z { grid-template-columns: 1fr; color: var(--text-3); font-size: var(--fs-xs); min-height: 36px; }
.co .ptbl .pi { display: flex; align-items: center; gap: 8px; min-width: 0; }
.co .ptbl .pi .thumb.sm { width: 36px; height: 36px; flex: none; }
.co .ptbl .pi .thumb.svc { cursor: default; }
.co .ptbl .pi .tx { min-width: 0; display: flex; flex-direction: column; }
.co .ptbl .pi .t { font-weight: 700; font-size: var(--fs-xs); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co .ptbl .pi .c { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co .ptbl .pq { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.co .ptbl .pq .step { height: 28px; border: 1px solid var(--input-border); border-radius: 999px; background: var(--input-bg); display: inline-flex; align-items: center; overflow: hidden; }
.co .ptbl .pq .step button { height: 28px; width: 26px; font: inherit; font-size: var(--fs-md); font-weight: 700; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.co .ptbl .pq .step button:hover:not(:disabled) { background: var(--surface-2); }
.co .ptbl .pq .step button:disabled { opacity: .3; cursor: default; }
.co .ptbl .pq .step input { height: 28px; width: 52px; border: 0; background: transparent; text-align: center; font: inherit; font-size: var(--fs-xs); font-weight: 700; color: var(--text); outline: none; }
.co .ptbl .pq .lnk { font-size: var(--fs-xs); }
.co .ptbl .pw { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: var(--fs-xs); }
.co .ptbl .padd { display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; padding: 5px 8px; border-top: 1px solid var(--border); font-size: var(--fs-xs); background: var(--warn-soft); color: var(--warn-ink); }
.co .ptbl .padd .k { font-size: var(--fs-xs); font-weight: 700; }
.co .ptbl .padd .lnk { color: var(--warn-ink); }
.co .co-parcel .pf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 12px 9px; font-size: var(--fs-xs); color: var(--text-2); }
.co .co-parcel .pf .sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.co .co-parcel .pf .sp { flex: 1; }
.co .co-parcel .pf .bwin { width: 52px; height: 24px; border: 1px solid var(--input-border); border-radius: 6px; text-align: right; font-size: var(--fs-xs); padding: 0 4px; background: var(--input-bg); color: var(--text); }
.co .co-parcel .pf select { height: 26px; border: 1px solid var(--input-border); border-radius: 7px; font-size: var(--fs-xs); background: var(--input-bg); color: var(--text); padding: 0 4px; max-width: 150px; }
.co .co-parcel .pf .del { border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); background: var(--surface); color: var(--danger-ink); border-radius: 7px; height: 26px; padding: 0 8px; font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; white-space: nowrap; }
.co .co-parcel .pf .del:hover { background: var(--danger-soft); }
.co .co-parcel .pf .del.off { opacity: .35; cursor: not-allowed; }
.tools:not(.wide) .co .ptbl .ph, .tools:not(.wide) .co .ptbl .pr { grid-template-columns: minmax(0, 1fr) 150px; }
.tools:not(.wide) .co .ptbl .ph span:nth-child(3), .tools:not(.wide) .co .ptbl .pw { display: none; }
.tools:not(.wide) .co .ptbl { margin: 8px 8px 0; }
/* แถบเหลือง "ยังไม่ได้จัดลงกล่อง" เข้ม ตัวหนา */
.co-note.warn.strong { background: #fde68a; color: #78350f; border: 1px solid #f59e0b; font-weight: 700; }
.tools .co .btn.ghost.sm { background: var(--surface); border: 1px solid var(--accent-strong); color: var(--accent-strong); }
.tools .co .btn.ghost.sm:hover { background: var(--accent-soft); }

/* ---- ขั้น 3: การ์ดออกบิล = หัวม่วง-น้ำเงินเข้ม ตัวขาว + ตัวการ์ดพื้นม่วงอ่อน · จัดส่ง = หัวเขียวเข้ม ตัวขาว + พื้นเขียวอ่อน (Mai 2026-09-20 "สียังไม่ชัด") ---- */
.co .fcard.bill { --fc: #4338ca; --fc-soft: #eef0ff; border: 1px solid color-mix(in srgb, var(--fc) 40%, var(--border)); border-left: 5px solid var(--fc); background: var(--fc-soft); }
.co .fcard.ship { --fc: var(--accent-strong); --fc-soft: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--fc) 40%, var(--border)); border-left: 5px solid var(--fc); background: color-mix(in srgb, var(--fc-soft) 60%, var(--surface)); }
.co .fcard.bill > .fh, .co .fcard.ship > .fh { background: var(--fc); color: #fff; }
.co .fcard.bill > .fh b.tt, .co .fcard.ship > .fh b.tt { color: #fff; font-size: var(--fs-sm); }
.co .fcard.bill > .fh .muted, .co .fcard.ship > .fh .muted, .co .fcard.bill > .fh .small, .co .fcard.ship > .fh .small { color: rgba(255,255,255,.85); }
.co .fcard.bill > .fh .lnk, .co .fcard.ship > .fh .lnk { color: #fff; }
.co .fcard.bill > .fh .tag, .co .fcard.ship > .fh .tag { background: rgba(255,255,255,.18); color: #fff; border-color: transparent; }
.co .fcard.bill > .fh .ok, .co .fcard.ship > .fh .ok { color: #fff; }
.co .fcard.bill > .fh .bad, .co .fcard.ship > .fh .bad { color: #fde68a; }
.co .fcard.bill > .fb, .co .fcard.ship > .fb { border-top: 0; }
.co .fcard.bill .kv2 .v, .co .fcard.ship .fld { color: var(--text); }

/* กล่องเสนอแผน (ซอยอัตโนมัติ / แผนจากใบเสนอ) */
.co-auto { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); display: grid; gap: 6px; font-size: var(--fs-xs); }
.co-auto.on { border-style: solid; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--accent-soft); }
.co-auto .ah { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.co-auto .abs { display: grid; gap: 3px; }
.co-auto .ab { font-size: var(--fs-xs); padding: 3px 8px; border-radius: 7px; background: var(--surface); }
.co-auto .ar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.co-auto .ar .sp { flex: 1; }
.co-auto .cap { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text-3); }
.co-auto .cap input { width: 64px; height: 24px; border: 1px solid var(--input-border); border-radius: 6px; text-align: right; font-size: var(--fs-xs); padding: 0 5px; background: var(--input-bg); color: var(--text); }

/* ปุ่มเพิ่มพัสดุใต้การ์ด · ซอยอัตโนมัติสีเหลืองเข้ม · แถวสรุปน้ำหนักอยู่บนตาราง (Mai 2026-09-20) */
.co-addrow { display: flex; justify-content: flex-end; margin-top: 6px; }
.btn.amber { background: #d97706; border-color: #d97706; color: #fff; } .btn.amber:hover { background: #b45309; }
.btn.outline { background: transparent; color: var(--accent-strong); border: 1px solid var(--accent); }
.co-parcel .pf { border-bottom: 1px solid var(--border); border-top: 0; margin-bottom: 4px; }
.co .ptbl .prm { border: 0; background: none; color: var(--text-3); font-size: var(--fs-md); cursor: pointer; padding: 4px; border-radius: 6px; justify-self: end; }
.co .ptbl .prm:hover:not(:disabled) { background: rgba(220,38,38,.12); color: #b91c1c; } .co .ptbl .prm:disabled { opacity: .3; cursor: default; }
.co .btn.gray { background: #9ca3af; border-color: #9ca3af; color: #fff; cursor: not-allowed; opacity: .9; }
.co-addrow { justify-content: space-between; align-items: center; gap: 10px; }
.co-psum { font-size: var(--fs-sm); color: var(--text-2); padding: 6px 10px; background: var(--surface-2); border-radius: 8px; }
.co-psum b { color: var(--text); }
.co-foot .btn.ghost.cancel { color: #b91c1c; border-color: #fecaca; margin-right: 6px; }

/* ================= หน้าสถานะหลังสร้าง (รอบ 3 — Temp/91_order_in_chat_mockup.html ปุ่ม "หลังสร้าง") ================= */
.co .cq-head .cq-st.ok { background: #fff; color: var(--accent-strong); }
.co .cq-head .cq-st.bad { background: var(--danger); color: #fff; }
.co .co-st-title { font-size: var(--fs-xs); margin-top: 2px; }
.co .co-st-title .ibtn { height: 24px; padding: 0 8px; }
/* แถบความคืบหน้าบรรทัดเดียว ○─○─○─○ */
.co .pst { display: flex; align-items: center; min-height: 44px; padding: 0 4px; }
.co .ps { flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0; }
.co .ps::after { content: ""; flex: 1; height: 2px; background: var(--border); margin: 0 10px; border-radius: 2px; min-width: 6px; }
.co .ps:last-child { flex: 0 0 auto; } .co .ps:last-child::after { display: none; }
.co .ps .m { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 800; color: #fff; background: var(--ok); flex: none; }
.co .ps .tx { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; overflow: hidden; }
.co .ps .tx b { font-size: var(--fs-xs); font-weight: 800; white-space: nowrap; }
.co .ps .tx small { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; display: block; max-width: 100%; }
.co .ps > .rs { flex: none; margin-left: -2px; }
.co .ps.ok::after { background: var(--ok); }
.co .ps.run .m { background: var(--accent-strong); box-shadow: 0 0 0 4px var(--accent-soft); animation: co-pulse 1.2s ease-in-out infinite; }
.co .ps.run .tx b { color: var(--accent-strong); }
@keyframes co-pulse { 0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); } 50% { box-shadow: 0 0 0 6px var(--accent-soft); } }
.co .ps.bad .m { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.co .ps.bad .tx b { color: var(--danger-ink); } .co .ps.bad .tx small { color: var(--danger-ink); font-weight: 700; }
.co .ps.bad::after { background: var(--danger-soft); }
.co .ps.bad.unk .m { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.co .ps.bad.unk .tx b, .co .ps.bad.unk .tx small { color: var(--warn-ink); }
.co .ps.wait .m, .co .ps.skip .m { background: var(--surface-2); color: var(--text-3); border: 1.5px solid var(--border-strong); font-size: var(--fs-xs); }
.co .ps.wait .tx b, .co .ps.skip .tx b { color: var(--text-3); }
.co .ps.skip .m { border-style: dashed; }
.co .ps.photo .m { font-size: var(--fs-sm); }
.co .ps .rs { font-size: var(--fs-xs); font-weight: 800; color: #fff; background: var(--danger); border-radius: 999px; padding: 1px 7px; line-height: 1.4; border: 0; cursor: pointer; font-family: inherit; text-decoration: none; white-space: nowrap; }
.co .ps .rs:hover { filter: brightness(1.08); }
.co .ps .rs.full { background: var(--warn); }
.tools:not(.wide) .co .ps .tx small { display: none; }   /* แผงแคบ: เหลือชื่อขั้น + ปุ่ม · เหตุผลเต็มอยู่ในแถบเตือนใต้แถบ */
.tools:not(.wide) .co .ps::after { margin: 0 4px; min-width: 4px; }
.tools:not(.wide) .co .ps { gap: 5px; } .tools:not(.wide) .co .ps .tx b { font-size: var(--fs-xs); }
.tools:not(.wide) .co .ps.bad { flex: 1.8; }   /* ขั้นที่มีปัญหาได้ที่กว้างขึ้นให้ชื่อ + ปุ่มอยู่ครบ */
.tools:not(.wide) .co .ps.photo .tx { display: none; }   /* จุดที่ 4 เหลือแค่ไอคอน 📷 (tooltip บอก) */
/* การ์ดเอกสาร / พัสดุ */
.co .dcard { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.co .dcard .dh { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 800; min-height: 34px; }
.co .dcard .dh .muted { font-weight: 500; font-size: var(--fs-xs); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co .dcard .dh .ibtn { margin-left: auto; height: 24px; padding: 0 8px; font-size: var(--fs-xs); flex: none; }
.co .dcard .dh .dh-acts { margin-left: auto; display: flex; gap: 4px; flex: none; }   /* หลายปุ่มในหัวกล่อง (พิมพ์ + บันทึกไฟล์) */
.co .dcard .dh .dh-acts .ibtn { margin-left: 0; }
/* เลขเอกสาร/เลขออเดอร์/เลขพัสดุเป็นลิงก์เปิดระบบปลายทาง (FA · BigSeller · หน้าติดตาม) — สีลิงก์เดียวกับ a.docno ของ chat.css · ⓘ บอกว่าเปิดที่ไหน */
.co .drow .tx b a.docno { color: var(--link); text-decoration: underline; text-underline-offset: 3px; font-weight: 800; }
.co .drow .tx b a.docno:hover { filter: brightness(.85); }
.co .drow .tx b .ihint { margin-left: 3px; font-weight: 500; }
.co .drow { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 10px; border-bottom: 1px solid var(--border); font-size: var(--fs-xs); min-height: 38px; }
.co .drow:last-child { border-bottom: 0; }
.co .drow.dim { color: var(--text-3); background: repeating-linear-gradient(135deg, var(--surface) 0 10px, var(--surface-2) 10px 20px); }
.co .drow.dim .tx b { color: var(--text-2); font-weight: 600; }
.co .drow .ic { font-size: var(--fs-md); text-align: center; }
.co .drow .tx { min-width: 0; display: flex; flex-direction: column; }
.co .drow .tx b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co .drow .tx small { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co .drow .acts { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.co .drow .acts .ibtn { height: 24px; padding: 0 7px; font-size: var(--fs-xs); text-decoration: none; }
.co .drow .acts .ibtn:disabled { opacity: .45; cursor: not-allowed; }
.co .drow .acts .ibtn.dgr { color: var(--danger-ink); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.co .drow .acts .ibtn.dgr:hover:not(:disabled) { background: var(--danger-soft); }
.co .drow.prow { grid-template-columns: 62px minmax(0, 1fr) auto auto; }
.co .drow.prow .k { font-weight: 800; white-space: nowrap; }
.co .drow.prow .stt { justify-self: start; }
.co .tag.blue { background: #dbeafe; color: #1e40af; border-color: transparent; }
/* กล่องรูปแพค (533): รูปย่อ ≤3 ต่อกล่อง hover ซูมมาตรฐาน (.thumb ของ ui.js) · ช่องรอโหลด/โหลดไม่ได้ */
.co .drow.pkrow .pkpics { gap: 4px; flex-wrap: nowrap; }
.co .drow.pkrow .thumb { width: 34px; height: 34px; flex: none; border-radius: 7px; }
.co .drow.pkrow .thumb img { object-fit: cover; }
.co .drow.pkrow .thumb.ld { cursor: default; animation: co-pulse 1.2s ease-in-out infinite; } .co .drow.pkrow .thumb.ld .ph, .co .drow.pkrow .thumb.bad .ph { font-size: var(--fs-xs); }
.co .drow.pkrow .thumb.bad { cursor: default; opacity: .45; }
.co .dcard .dh .dh-acts .ibtn.accent { background: var(--accent-strong); color: #fff; border-color: transparent; }
.co .dcard .dh .dh-acts .ibtn.accent:hover:not(:disabled) { filter: brightness(1.08); }
.tools:not(.wide) .co .drow.prow { grid-template-columns: 52px minmax(0, 1fr) auto; }
.tools:not(.wide) .co .drow.prow .acts { grid-column: 2 / -1; justify-content: flex-start; }
.tools:not(.wide) .co .drow .acts .ibtn { padding: 0 6px; }
/* สรุปล่าง */
.co .dsum { display: flex; gap: 6px 14px; flex-wrap: wrap; padding: 6px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-size: var(--fs-xs); color: var(--text-2); align-items: center; }
.co .dsum b { color: var(--text); font-weight: 800; }
.co .dsum b.g { font-size: var(--fs-lg); color: var(--accent-strong); }
.co .dsum b.bad { color: var(--danger-ink); }
.co .dsum b .muted { font-weight: 500; }
.co .co-note a { color: inherit; font-weight: 700; }

/* แถบล่าง 1 บรรทัด: [ยกเลิกร่าง][บันทึกร่าง] … ยอด … [ย้อน][ถัดไป/สร้าง] (Mai 2026-09-20 "ปุ่มใหญ่ไป") */
.co-foot .left { display: flex; gap: 6px; align-items: center; }
.tools .co-foot .btn { height: 32px; padding: 0 12px; font-size: var(--fs-xs); }
.tools .co-foot .btn.ghost.cancel { padding: 0 10px; }
@media (max-width: 560px) { .co-foot { grid-template-columns: 1fr auto; } .co-foot .tot { grid-column: 1 / -1; text-align: left; } }
/* ยกเลิกทั้งชุด (Mai 2026-09-21): ปุ่มแดงท้ายหน้าสถานะ ไม่เด่นเกิน · แถบ "ยกเลิกแล้ว" + สรุปต่อระบบ ✓/✗ · ตัวเลือกเหตุผลด่วนในกล่องยืนยัน */
.co .co-cancel-all { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border); }
.tools .co .co-cancel-all .btn.ghost.sm.cancel { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger-ink); background: var(--surface); }
.tools .co .co-cancel-all .btn.ghost.sm.cancel:hover:not(:disabled) { background: var(--danger-soft); }
.co .co-note.co-cancelled { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.co .co-note .cjs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.co .co-note .cj { font-size: var(--fs-xs); font-weight: 600; }
.co .co-note .cj.ok { color: #c2410c; }   /* ยกเลิกสำเร็จ = ส้ม ไม่ใช่เขียว (Mai 2026-09-21 — เขียวดูเหมือนงานปกติ) */
.co .co-note .cj.bad { color: var(--danger-ink); }
dialog.dlg .co-reasons { margin-top: 2px; flex-wrap: wrap; }
dialog.dlg .co-reasons .ibtn { height: 26px; font-size: var(--fs-xs); }

/* ไทม์ไลน์การแพคต่อกล่อง (537) — ใต้แถวกล่องในการ์ด "รูปแพค" */
.co .plg { margin: 2px 0 8px 12px; border: 1px dashed var(--border); border-radius: 8px; padding: 6px 10px; font-size: var(--fs-xs); background: var(--surface-2); }
.co .plg-h { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 4px; }
.co .plg-h .sp { flex: 1; }
.co .plg-row { display: grid; grid-template-columns: 66px 78px 1fr; gap: 8px; padding: 1px 0; color: var(--text-2); }
.co .plg-row .t { font-variant-numeric: tabular-nums; color: var(--text); }
.co .plg-row .d { font-size: var(--fs-xs); white-space: nowrap; }
.co .plg-row.hi .x { color: var(--text); font-weight: 600; }
.co .plg-row.odd .x { color: #c2410c; font-weight: 600; }
.co .plg-row.odd .t { color: #c2410c; }
.co .plg-row .oddtag { font-size: var(--fs-xs); background: #fff3e6; border: 1px solid #fdba74; border-radius: 6px; padding: 0 5px; margin-left: 4px; }

/* ปุ่มกลุ่ม "พิมพ์/เอาไฟล์" ให้สะดุดตา (Mai 2026-09-22 เลือกแบบ ข ส้ม) — เป็นสีรอง ปุ่มหลัก (บันทึกชุด A+B) ยังเด่นกว่า */
.ibtn.prn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn-ink); background: var(--warn-soft); font-weight: 700; }
.ibtn.prn:hover:not(:disabled) { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 18%, var(--warn-soft)); }
.ibtn.prn:disabled { opacity: .5; }

/* ปริ้นแพคแมนในหน้าแชท (chat-print.js · 29 ต.ค. 69) — ปุ่ม Chrome ทางสำรองเล็กจาง · กล่องลอยชิปเครื่อง+สถานะงาน */
.ibtn.cp-alt { opacity: .7; font-size: var(--fs-xs); }
.ibtn.cp-alt:hover { opacity: 1; }
.ibtn.cp-busy { pointer-events: none; opacity: .75; }
.cp-pr { position: fixed; left: 16px; bottom: 16px; z-index: 900; display: none; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.12); font-size: var(--fs-sm); }
.cp-pr.on { display: flex; }
.cp-pr-t { font-weight: 600; color: #1d4ed8; }
.cp-pr-x { border: 0; background: none; cursor: pointer; color: #64748b; padding: 4px; }
