/* สาคร เทค — หน้าตาระบบตัวอย่าง */
:root { --accent: #6d3df0; --ink: #1f2433; --muted: #6b7285; --line: #e7e9f0; --bg: #f4f6fb; --card: #fff; --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --r: 14px; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Prompt", -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
html.lang-zh body { font-family: "Noto Sans SC", "Prompt", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }

/* แถบแจ้งว่าเป็นตัวอย่าง */
.d-banner { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
    padding: .45rem 1rem; background: linear-gradient(90deg, #2b1550, #4b22a8); color: #f1ebff; font-size: .8rem; }
.d-banner-r { display: flex; align-items: center; gap: .5rem; }
.d-lang { display: inline-flex; background: rgba(255,255,255,.12); border-radius: 99px; padding: 2px; }
.d-lang a { color: #e6dcff; text-decoration: none; padding: .15rem .55rem; border-radius: 99px; font-weight: 600; font-size: .75rem; }
.d-lang a.on { background: #fff; color: #4b22a8; }
.d-share { background: #06c755 !important; }
.d-reset, .d-back, .d-share { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 99px; padding: .2rem .7rem; font-size: .75rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.d-reset:hover, .d-back:hover, .d-share:hover { background: rgba(255,255,255,.22); }

/* โครงแอป */
.d-app { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 34px); }
.d-side { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1rem .75rem; position: sticky; top: 34px; height: calc(100vh - 34px); }
.d-brand { display: flex; gap: .6rem; align-items: center; padding: .25rem .5rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: .75rem; }
.d-brand b { display: block; font-size: .95rem; line-height: 1.2; }
.d-brand small { color: var(--muted); font-size: .75rem; }
.d-logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 1.15rem; background: var(--accent); flex: none; }
.d-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.d-nav-i { display: flex; align-items: center; gap: .7rem; border: 0; background: none; padding: .62rem .75rem; border-radius: 10px; cursor: pointer; color: #4a5064; text-align: left; font-size: .92rem; }
.d-nav-i i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.d-nav-i:hover { background: #f3f1fb; }
.d-nav-i.on { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); font-weight: 600; }
.d-user { display: flex; gap: .6rem; align-items: center; padding: .75rem .5rem 0; border-top: 1px solid var(--line); }
.d-user b { display: block; font-size: .85rem; } .d-user small { color: var(--muted); font-size: .72rem; }
.d-ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; background: var(--accent); flex: none; }
.d-main { min-width: 0; padding: 1.25rem 1.5rem 2rem; }
.d-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.d-top h1 { font-size: 1.45rem; margin: 0; font-weight: 600; }
.d-top-r { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .85rem; flex-wrap: wrap; }

/* ส่วนประกอบ */
.d-grid { display: grid; gap: 1rem; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.d-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; box-shadow: 0 1px 2px rgba(20,20,60,.04); min-width: 0; }
.d-card h3 { font-size: 1rem; margin: 0 0 .75rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.d-card h3 small { font-weight: 400; color: var(--muted); font-size: .78rem; }
.kpi { display: flex; gap: .85rem; align-items: center; }
.kpi .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; flex: none; }
.kpi small { color: var(--muted); font-size: .8rem; display: block; }
.kpi b { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.kpi em { font-style: normal; font-size: .75rem; }
.ic.p { background: #efe9ff; color: #6d3df0; } .ic.g { background: #e4f7ea; color: var(--ok); } .ic.o { background: #fff2e0; color: var(--warn); } .ic.r { background: #fde8e8; color: var(--bad); } .ic.b { background: #e5f0ff; color: #2563eb; }
.up { color: var(--ok); } .down { color: var(--bad); }

.d-table-wrap { overflow-x: auto; margin: 0 -1.1rem; padding: 0 1.1rem; }
table.d-t { width: 100%; border-collapse: collapse; font-size: .9rem; }
.d-t th { text-align: left; font-weight: 500; color: var(--muted); font-size: .78rem; padding: .5rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.d-t td { padding: .62rem .6rem; border-bottom: 1px solid #f0f1f6; vertical-align: middle; }
.d-t tr:last-child td { border-bottom: 0; }
.d-t .r { text-align: right; } .d-t .c { text-align: center; }
.d-t tbody tr:hover td { background: #fafaff; }
.muted { color: var(--muted); } .small { font-size: .8rem; } .b { font-weight: 600; } .nowrap { white-space: nowrap; }

.pill { display: inline-block; padding: .12rem .55rem; border-radius: 99px; font-size: .74rem; font-weight: 500; white-space: nowrap; }
.pill.ok { background: #e4f7ea; color: #15803d; } .pill.warn { background: #fff2e0; color: #b45309; } .pill.bad { background: #fde8e8; color: #b91c1c; } .pill.info { background: #e5f0ff; color: #1d4ed8; } .pill.mute { background: #eef0f5; color: #5b6275; }

.d-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--line); background: #fff; padding: .5rem .95rem; border-radius: 10px; cursor: pointer; font-size: .88rem; text-decoration: none; color: var(--ink); white-space: nowrap; transition: transform .05s, background .15s; }
.d-btn:hover { background: #f6f5fb; } .d-btn:active { transform: translateY(1px); }
.d-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .d-btn.primary:hover { filter: brightness(1.07); }
.d-btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.d-btn.line { background: #06c755; border-color: #06c755; color: #fff; }
.d-btn.sm { padding: .3rem .65rem; font-size: .8rem; border-radius: 8px; }
.d-btn.lg { padding: .8rem 1.2rem; font-size: 1rem; }
.d-btn[disabled] { opacity: .5; cursor: not-allowed; }

.d-in, .d-sel { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .75rem; background: #fff; outline: none; }
.d-in:focus, .d-sel:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.d-field { display: block; margin-bottom: .75rem; } .d-field > span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
.d-search { position: relative; } .d-search i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); } .d-search .d-in { padding-left: 2.2rem; }
.seg { display: inline-flex; background: #eef0f5; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: .35rem .8rem; border-radius: 8px; cursor: pointer; font-size: .85rem; color: #4a5064; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* กราฟแท่ง */
.bars { display: flex; align-items: flex-end; gap: .55rem; height: 160px; padding-top: .5rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%; justify-content: flex-end; }
.bars .bar i { display: block; width: 100%; max-width: 38px; border-radius: 7px 7px 3px 3px; background: color-mix(in srgb, var(--accent) 35%, #fff); transition: height .4s; }
.bars .bar.today i { background: var(--accent); }
.bars .bar span { font-size: .7rem; color: var(--muted); }
.bars .bar b { font-size: .68rem; font-weight: 500; color: var(--muted); }

/* แถบความคืบหน้า */
.meter { height: 7px; border-radius: 99px; background: #eef0f5; overflow: hidden; } .meter i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.meter.warn i { background: var(--warn); } .meter.bad i { background: var(--bad); }

/* รายการ */
.d-list { list-style: none; margin: 0; padding: 0; }
.d-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px dashed #eceef4; }
.d-list li:last-child { border-bottom: 0; }

/* หน้าต่าง */
.d-modal-bg { position: fixed; inset: 0; background: rgba(20,16,40,.45); z-index: 50; display: grid; place-items: center; padding: 1rem; animation: fade .15s; }
.d-modal { background: #fff; border-radius: 16px; width: min(460px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: pop .18s; }
.d-modal.wide { width: min(720px, 100%); }
.d-modal-h { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.d-modal-b { padding: 1rem 1.1rem; overflow: auto; }
.d-modal-f { padding: .8rem 1.1rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.d-x { border: 0; background: none; cursor: pointer; font-size: 1rem; color: var(--muted); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: scale(.96); opacity: 0; } }

/* แจ้งเตือน */
.d-toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; }
.d-toast { background: #1f2433; color: #fff; padding: .7rem 1rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: .88rem; max-width: 340px; animation: pop .2s; transition: opacity .3s, transform .3s; }
.d-toast.ok { background: #15803d; } .d-toast.line { background: #06c755; }
.d-toast.out { opacity: 0; transform: translateY(8px); }

/* ชวนประเมินราคา */
.d-cta { margin-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.2rem; border-radius: var(--r);
    background: linear-gradient(90deg, #f3eeff, #fff); border: 1px dashed #cdbcf7; font-size: .92rem; }

/* เอกสาร (ใบส่งของ / สลิป) */
.doc { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; background: #fff; font-size: .88rem; }
.doc-h { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: .6rem; margin-bottom: .7rem; }
.doc-h b { font-size: 1.05rem; }
.doc .tot { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; border-top: 2px solid var(--ink); margin-top: .6rem; padding-top: .55rem; }

/* มือถือ */
@media (max-width: 900px) {
    .d-app { grid-template-columns: 1fr; }
    .d-side { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; padding: .4rem .5rem; border-right: 0; border-bottom: 1px solid var(--line); z-index: 20; overflow-x: auto; }
    .d-brand { border: 0; margin: 0; padding: 0 .5rem 0 0; } .d-brand > div { display: none; }
    .d-nav { flex-direction: row; } .d-nav-i { flex-direction: column; gap: .1rem; font-size: .7rem; padding: .35rem .6rem; white-space: nowrap; }
    .d-user { display: none; }
    .d-main { padding: 1rem .85rem 1.5rem; }
    .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3, .g2, .g21, .g12 { grid-template-columns: 1fr; }
    .d-banner { position: static; font-size: .72rem; } .d-banner-t { flex-basis: 100%; }
    .d-reset span, .d-back span, .d-share span { display: none; }
    .kpi b { font-size: 1.1rem; } .kpi .ic { width: 38px; height: 38px; font-size: 1.05rem; }
}

/* หน้าขาย */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.pcard { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: .7rem .75rem; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .05s; }
.pcard:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.06); } .pcard:active { transform: scale(.98); }
.pcard .pe { font-size: 1.4rem; } .pcard b { font-size: .86rem; font-weight: 600; line-height: 1.3; }
.pcard .pp { font-weight: 700; color: var(--accent); } .pcard .pp small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.pcard .ps { font-size: .72rem; color: var(--muted); } .pcard.low .ps { color: var(--bad); font-weight: 600; }
.cart { align-self: start; position: sticky; top: 50px; }
.qty { display: inline-flex; align-items: center; gap: .4rem; } .qty b { min-width: 70px; text-align: center; font-size: .88rem; }
.tot-row { display: flex; justify-content: space-between; align-items: baseline; margin: .5rem 0 .8rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.tot-row b { font-size: 1.6rem; color: var(--accent); }
@media (max-width: 900px) { .cart { position: static; } .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print { .d-banner, .d-side, .d-top, .d-cta, .d-modal-h, .d-modal-f, .d-view { display: none !important; } .d-modal-bg { position: static; background: none; } .d-modal { box-shadow: none; width: 100%; max-height: none; } }

.kpi em { display: block; margin-top: .1rem; }

/* เครื่องสแกนนิ้ว */
.fp { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 1.6rem 1rem; border-radius: 16px; border: 2px dashed color-mix(in srgb, var(--accent) 40%, #fff);
    background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 10%, #fff), #fff 70%); cursor: pointer; color: var(--accent); font-weight: 600; }
.fp svg { width: 86px; height: 86px; transition: transform .2s; }
.fp:hover svg { transform: scale(1.05); }
.fp.busy svg { animation: scanp .9s ease-in-out; } .fp.busy { border-style: solid; }
@keyframes scanp { 0% { filter: none; } 50% { filter: drop-shadow(0 0 10px currentColor); transform: scale(1.08); } 100% { filter: none; } }
tr.flash td { animation: flash 1.6s; } @keyframes flash { 0%, 40% { background: #fef9c3; } }
tr.sum td { border-top: 2px solid var(--line); background: #fafaff; }
.sl-row { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px dashed #eceef4; font-size: .86rem; }

/* มือถือ + แชต LINE */
.phone { margin: 0 auto; width: 270px; max-width: 100%; border-radius: 34px; padding: 10px; background: #111; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.phone-in { border-radius: 26px; overflow: hidden; background: #8cabd8; height: 480px; display: flex; flex-direction: column; }
.lc-top { background: #263042; color: #fff; padding: .7rem .8rem; font-size: .85rem; display: flex; gap: .5rem; align-items: center; }
.lc-body { flex: 1; overflow-y: auto; padding: .7rem; display: flex; flex-direction: column; gap: .5rem; scroll-behavior: smooth; }
.lc-msg { max-width: 82%; padding: .5rem .7rem; border-radius: 16px; font-size: .82rem; line-height: 1.45; background: #fff; align-self: flex-start; box-shadow: 0 1px 1px rgba(0,0,0,.06); animation: pop .2s; }
.lc-msg.me { align-self: flex-end; background: #06c755; color: #fff; }
.lc-big { font-size: 1.5rem; font-weight: 700; color: #06c755; margin: .2rem 0; }
.lc-btn { align-self: flex-start; background: #fff; color: #06c755; font-weight: 600; border-radius: 99px; padding: .3rem .9rem; font-size: .78rem; }
.lc-menu { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-top: 1px solid #ddd; }
.lc-menu button { border: 0; border-right: 1px solid #eee; background: #fff; padding: .55rem .2rem; font-size: .72rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .15rem; color: #333; }
.lc-menu button i { font-size: 1.15rem; color: #06c755; } .lc-menu button:hover { background: #f2fbf5; }
.lc-card { background: #fff; border-radius: 14px; overflow: hidden; width: 150px; flex: none; font-size: .78rem; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.lc-card .em { font-size: 2rem; text-align: center; padding: .4rem; background: #f6f1ea; }
.lc-card .bd { padding: .45rem .6rem; } .lc-card button { width: 100%; border: 0; border-top: 1px solid #eee; background: #fff; color: #06c755; font-weight: 600; padding: .4rem; cursor: pointer; font-size: .76rem; }
.lc-cards { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .2rem; align-self: stretch; }

/* LINE: มือถือ + จอร้าน */
.live { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.sub-h { font-size: .9rem; font-weight: 600; color: var(--muted); margin: 0 0 .6rem; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; }
.ord { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .8rem .9rem; border-top: 4px solid #cbd0dc; }
.ord.new { border-top-color: var(--bad); } .ord.making { border-top-color: var(--warn); } .ord.ready { border-top-color: var(--ok); } .ord.done { opacity: .6; }
.ord.flash { animation: flash 1.6s; } .ord-h { display: flex; justify-content: space-between; align-items: center; }
.ord ul { margin: .5rem 0 .6rem; padding-left: 0; list-style: none; font-size: .88rem; } .ord li { padding: .15rem 0; }
.lc-cards .lc-btn { border: 0; cursor: pointer; flex: none; }
@media (max-width: 900px) { .live { grid-template-columns: 1fr; } }

/* โหมดถ่ายภาพ mockup */
html.shot .d-banner, html.shot .d-cta { display: none !important; }
@media (min-width: 901px) { html.shot .d-app { min-height: 100vh; } html.shot .d-side { top: 0; height: 100vh; } }

/* ส่วนประกอบเพิ่มสำหรับระบบตัวอย่างเล็ก */
.d-alert { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .75rem 1rem; margin-bottom: 1rem; border-radius: 12px; background: #fde8e8; color: #991b1b; border: 1px solid #fecaca; animation: pop .2s; }
.d-alert i { font-size: 1.2rem; }
.d-card.is-bad { border-color: #fca5a5; box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
.big-temp { font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; } .big-temp small { font-size: 1rem; font-weight: 500; color: var(--muted); margin-left: .15rem; }
.kanban { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(200px, 1fr)); gap: .8rem; overflow-x: auto; }
.kanban .col { background: #eef0f6; border-radius: 14px; padding: .6rem; min-height: 200px; }
.kanban .col > b { display: flex; justify-content: space-between; font-size: .85rem; padding: .2rem .3rem .6rem; color: #4a5064; }
.kanban .tk { background: #fff; border-radius: 10px; padding: .6rem .7rem; margin-bottom: .5rem; border: 1px solid var(--line); font-size: .85rem; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.tile { border-radius: 12px; padding: .7rem; border: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; font-size: .82rem; }
.tile b { display: block; font-size: 1rem; } .tile.ok { border-color: #bbf7d0; background: #f0fdf4; } .tile.warn { border-color: #fde68a; background: #fffbeb; } .tile.bad { border-color: #fecaca; background: #fef2f2; } .tile.mute { background: #f4f5f8; color: var(--muted); }

/* workers / dorm / fleet / garage / farm — ส่วนเสริมเล็ก ๆ ของระบบตัวอย่างชุดนี้ */
.seg.sc { max-width: 100%; overflow-x: auto; } .seg.sc button { white-space: nowrap; flex: none; }
.legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); } .legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; border: 1px solid rgba(0,0,0,.08); }
.tile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate { display: inline-block; border: 1.5px solid #1f2433; border-radius: 6px; padding: 0 .4rem; background: #fff; font-weight: 700; font-size: .82rem; line-height: 1.5; white-space: nowrap; }
.stepper { display: flex; align-items: flex-start; margin: .6rem 0 .2rem; }
.stepper .sp { flex: 1; position: relative; text-align: center; font-size: .68rem; color: var(--muted); min-width: 0; }
.stepper .sp::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 3px; background: #e5e7ee; }
.stepper .sp:first-child::before { display: none; }
.stepper .sp i { position: relative; z-index: 1; display: block; width: 15px; height: 15px; margin: 0 auto .25rem; border-radius: 50%; background: #fff; border: 3px solid #d5d9e3; }
.stepper .sp.done::before, .stepper .sp.now::before { background: var(--accent); } .stepper .sp.done i { background: var(--accent); border-color: var(--accent); }
.stepper .sp.now i { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); } .stepper .sp.now { color: var(--ink); font-weight: 600; }
.stepper .sp span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.sig { width: 100%; height: 170px; border: 2px dashed #cbd0dc; border-radius: 12px; background: #fcfcff; touch-action: none; cursor: crosshair; display: block; }
.mbox { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; margin: .6rem 0; }
.mbox div { border-radius: 10px; padding: .35rem .45rem; background: #f0fdf4; border: 1px solid #bbf7d0; font-size: .7rem; color: var(--muted); line-height: 1.3; }
.mbox div b { display: block; font-size: 1rem; color: var(--ink); } .mbox div.warn { background: #fffbeb; border-color: #fde68a; } .mbox div.bad { background: #fef2f2; border-color: #fecaca; } .mbox div.bad b { color: var(--bad); }
.kanban.k5 { grid-template-columns: repeat(5, minmax(180px, 1fr)); }

/* seafood · lot · ice · machines · repair (ระบบตัวอย่างโรงงาน/ประมง) */
.pcard.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.sf-kg { font-size: 1.35rem; font-weight: 700; padding: .45rem .75rem; }
.lt-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.lt-tl::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--line); }
.lt-s { display: flex; gap: .8rem; padding: 0 0 1rem; position: relative; } .lt-s:last-child { padding-bottom: 0; }
.lt-d { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent); border: 2px solid #fff; z-index: 1; }
.lt-s.ok .lt-d { background: #e4f7ea; color: var(--ok); } .lt-s.wait .lt-d { background: #e5f0ff; color: #2563eb; }
.ice-tk { text-align: left; cursor: pointer; font: inherit; color: inherit; } .ice-tk.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
tr.ice-wait td { background: #fbfcff; }
.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; }
.mc { display: flex; flex-direction: column; gap: .3rem; padding: .8rem .85rem; } .mc .pill { font-size: .7rem; }
.mc-job { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mc-n { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; } .mc-n small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.mc-st { min-height: 1.3em; }
.rp-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.rp-qr .tile { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; } .rp-qr .tile > i { font-size: 1.5rem; color: var(--ink); }
.kanban .tk.rp-high { border-left: 3px solid var(--bad); }
@media (max-width: 900px) { .mc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mc-n { font-size: 1.3rem; } .rp-qr { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 901px) { .sf-buy { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
