/* หยกสด ERP console · design system ported 1:1 from ForDevOperation/mockups (v5, 2026-09-29)
   tokens + shell (desktop sidebar / mobile top bar) + mockup components + registry engine + legacy module styles */
:root{--bg:#f4f3ee;--ink:#1a1a18;--muted:#6b6a64;--line:#e3e1d8;--line-2:#eeede7;--line-3:#cfcdc3;--surface:#fff;--surface-2:#faf9f5;
--brand:#1e7a4a;--brand-dark:#185a3c;--brand-soft:#dcefe3;--amber:#8a5a12;--amber-soft:#fbf0d9;--amber-line:#e0c15a;--edited:#fff8dc;
--red:#a12c22;--red-soft:#fbe3e0;--red-bg:#fff6f5;--red-line:#e0a49e;--blue:#2b5f9e;--blue-soft:#e3ecf7;--neutral:#ecebe5;--neutral-ink:#4a4944;
--font:'Sarabun','Noto Sans Thai Looped','Noto Sans Thai',system-ui,sans-serif;
/* legacy aliases used by older module code */
--ink-2:#4a4944;--ink-3:#6b6a64;--paper:#f4f3ee;--card:#fff;--jade:#1e7a4a;--jade-soft:#dcefe3;--rose:#a12c22;--rose-soft:#fbe3e0;--r:8px}
*{box-sizing:border-box}html,body{margin:0}
body{background:var(--bg);color:var(--ink);font-family:var(--font);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--brand);text-decoration:none}
[hidden]{display:none!important}
label{font-size:11px;color:var(--muted);display:block;margin-bottom:3px}

/* ===== components (mockup) ===== */
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:999px;font-size:11.5px;font-weight:600;white-space:nowrap;border:0;background:var(--neutral);color:var(--neutral-ink);font-family:inherit;line-height:1.4}
.chip.g{background:var(--brand-soft);color:var(--brand)}.chip.a{background:var(--amber-soft);color:var(--amber)}.chip.r{background:var(--red-soft);color:var(--red)}.chip.n{background:var(--neutral);color:var(--neutral-ink)}.chip.b{background:var(--blue-soft);color:var(--blue)}
.chip.sm{padding:1px 7px}
button.chip{cursor:pointer}
.card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:8px 12px;box-sizing:border-box}
.card.p0{padding:0;overflow:hidden}
.hd{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:2px 0 4px}
.hd b{font-size:13.5px}
.search{display:flex;align-items:center;gap:8px;border:1px solid var(--line-3);border-radius:10px;background:var(--surface);padding:0 10px;height:36px;font-size:12.5px;color:var(--muted)}
.search input{border:0;outline:0;font:inherit;flex-grow:1;background:transparent;min-width:0;color:var(--ink)}
.li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 0;border-bottom:1px solid var(--line-2);min-height:36px}
.li:last-child{border-bottom:none}
.li.dim{opacity:.55}
.nm{font-size:13.5px;font-weight:500;line-height:1.15}
.sku{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.sub{font-size:10.5px;color:var(--muted);line-height:1.2}
.num{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.inp{width:60px;height:34px;padding:0 8px;border:1px solid var(--line-3);border-radius:9px;background:var(--surface);text-align:right;font:inherit;font-size:15px;font-variant-numeric:tabular-nums;box-sizing:border-box}
.inp.ed{background:var(--edited);border-color:var(--amber-line)}
.inp.bad{background:var(--red-soft);border-color:var(--red-line)}
.inp.sm{width:58px;height:30px;font-size:13.5px;padding:0 6px}
.inp.c{width:50px;text-align:center}
.inp[readonly]{background:var(--surface-2);color:var(--muted)}
.inp:focus,.sel:focus,.note:focus,.ta:focus,.search:focus-within{outline:2px solid var(--brand);outline-offset:-1px}
.qbtn{width:32px;height:34px;border-radius:9px;border:1px solid var(--line-3);background:var(--surface);font-size:17px;display:flex;align-items:center;justify-content:center;font-family:inherit;color:var(--ink);flex-shrink:0;cursor:pointer;padding:0}
.qbtn:disabled{opacity:.4}
.qty{display:flex;align-items:center;gap:4px}
.tabs{display:flex;gap:6px;overflow-x:auto;white-space:nowrap;scrollbar-width:none;max-width:100%;padding-bottom:2px}
.tabs::-webkit-scrollbar{display:none}
.tab{padding:6px 12px;border-radius:999px;border:1px solid var(--line-3);background:var(--surface);font-size:12.5px;font-weight:500;color:var(--ink);white-space:nowrap;flex-shrink:0;cursor:pointer;font-family:inherit}
.tab.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.seg{display:inline-flex;border:1px solid var(--line-3);border-radius:10px;overflow:hidden;background:var(--surface);align-self:flex-start;max-width:100%}
.seg a,.seg button{padding:7px 10px;font-size:11.5px;color:var(--ink);white-space:nowrap;display:flex;align-items:center;border:0;background:transparent;cursor:pointer;font-family:inherit}
.seg a.on,.seg button.on,.seg button[aria-pressed="true"]{background:var(--brand);color:#fff;font-weight:600}
.seg a.big,.seg button.big{font-size:14px;font-weight:700;padding:7px 16px}
.foot{padding:10px 16px;background:var(--surface);border-top:1px solid var(--line);display:flex;gap:8px;flex-shrink:0;align-items:center}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:48px;padding:0 10px;border-radius:12px;font-weight:700;font-size:14px;border:1px solid transparent;background:var(--brand);color:#fff;cursor:pointer;font-family:inherit;flex-grow:1;white-space:nowrap;box-sizing:border-box;min-width:0;overflow:hidden;text-overflow:ellipsis}
.btn.sec{background:var(--surface);color:var(--ink);border-color:var(--line-3);font-weight:600}
.btn.dis,.btn:disabled{background:#c9d8cf;color:#5f7367;cursor:not-allowed}
.btn.sec:disabled{background:var(--surface-2);color:var(--muted);border-color:var(--line)}
.btn.s{height:32px;font-size:12px;padding:0 10px;flex-grow:0}
.btn.danger{background:var(--red-soft);color:var(--red);border-color:var(--red-soft)}
.muted{color:var(--muted);font-size:11.5px;line-height:1.4}
.kpi{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.kpi .k{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:7px 10px}
.kpi .l{font-size:10.5px;color:var(--muted)}.kpi .v{font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}
.kpi .k.warn2{border-color:var(--amber-line);background:var(--edited)}.kpi .k.warn2 .v{color:var(--amber)}
.pos{color:var(--brand);font-weight:700}.neg{color:var(--red);font-weight:700}
table.t{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}
.t th{text-align:left;font-weight:600;font-size:10.5px;color:var(--muted);padding:5px 6px;border-bottom:1px solid var(--line);background:var(--surface-2);white-space:nowrap}
.t td{padding:3px 6px;border-bottom:1px solid var(--line-2);vertical-align:middle;height:36px;box-sizing:border-box}
.t td.n,.t th.n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.t tr.sum td{font-weight:700;background:var(--surface-2)}
.t td:first-child{white-space:normal;overflow:hidden}
.t tr.sel td,.t tr[aria-current="true"] td{background:var(--brand-soft)}
table.t.auto{table-layout:auto}
.t.auto td,.t.auto th{white-space:nowrap}
.t.auto td:first-child{white-space:nowrap}
.note{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid var(--line-3);border-radius:8px;font:inherit;font-size:13px;background:var(--surface)}
.warn{padding:8px 12px;font-size:12px;color:var(--red);background:var(--red-bg);border:1px solid var(--red-line);border-radius:10px;line-height:1.45}
.ok{padding:6px 12px;font-size:12px;color:var(--brand);background:var(--brand-soft);border:1px solid #c6dccf;border-radius:10px;line-height:1.45;display:flex;justify-content:space-between;align-items:center;gap:8px}
.info{padding:6px 12px;font-size:12px;color:var(--blue);background:var(--blue-soft);border:1px solid #c5d6ea;border-radius:10px;line-height:1.45}
.amb{padding:6px 12px;font-size:12px;color:var(--amber);background:var(--amber-soft);border:1px solid var(--amber-line);border-radius:10px;line-height:1.45}
.stop{display:flex;align-items:center;gap:10px;padding:7px 12px;border-radius:10px;background:var(--surface);border:1px solid var(--line);font-size:13.5px;cursor:pointer;text-align:left;font-family:inherit;width:100%}
.stop .no{width:24px;height:24px;border-radius:50%;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;flex-shrink:0}
.stop.done{opacity:.7}.stop.done .no{background:#9ec9b2}
.stop.cur{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}
.stop.t .no{background:var(--blue)}.stop.t.cur{border-color:var(--blue);box-shadow:0 0 0 2px var(--blue-soft)}
.week{display:flex;gap:4px}
.week a,.week button{flex:1 1 0;text-align:center;padding:5px 0;border-radius:10px;border:1px solid var(--line-3);background:var(--surface);font-size:11px;line-height:1.2;color:var(--ink);cursor:pointer;font-family:inherit}
.week a b,.week button b{display:block;font-size:14px}
.week .on{background:var(--ink);color:#fff;border-color:var(--ink)}
.week .warn2{border-color:var(--amber-line);background:var(--edited)}
.week .on.warn2{background:var(--ink);color:#fff;border-color:var(--amber-line);box-shadow:0 0 0 2px var(--edited)}
.tl{display:flex;flex-direction:column}
.tl .st{display:flex;gap:10px;font-size:12px;line-height:1.35;padding:3px 0}
.tl .dot{width:10px;height:10px;border-radius:50%;background:var(--line-3);margin-top:4px;flex-shrink:0}
.tl .st.now .dot{background:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.tl .st b{display:block;font-size:12.5px}
.sel{width:100%;min-width:0;box-sizing:border-box;-webkit-appearance:none;appearance:none;padding:7px 10px;border:1px solid var(--line-3);border-radius:8px;font:inherit;font-size:13px;background:var(--surface);color:var(--ink)}
.sel[readonly],.sel:disabled{background:var(--surface-2);color:var(--muted)}
.grid,.card.p0.grid{overflow:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.grid table{border-collapse:separate;border-spacing:0;font-size:12.5px;width:max-content;min-width:100%}
.grid th,.grid td{padding:0 6px;height:34px;border-bottom:1px solid var(--line-2);white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums;min-width:68px;box-sizing:border-box;vertical-align:middle;background:var(--surface)}
.grid th{font-size:10.5px;color:var(--muted);font-weight:600;background:var(--surface-2);border-bottom:1px solid var(--line);vertical-align:bottom;line-height:1.15;white-space:normal;height:40px;position:sticky;top:0;z-index:2}
.grid th.f,.grid td.f{position:sticky;left:0;background:var(--surface);text-align:left;min-width:118px;max-width:118px;z-index:1;white-space:normal;line-height:1.1}
.grid th.f2,.grid td.f2{position:sticky;left:118px;background:var(--surface);min-width:54px;max-width:54px;border-right:2px solid var(--line);z-index:1;font-weight:700}
.grid th.f,.grid th.f2{background:var(--surface-2);z-index:3}
.grid.cmp table{font-size:12px}
.grid.cmp th,.grid.cmp td{min-width:50px;padding:0 4px;height:32px}
.grid.cmp th.f,.grid.cmp td.f{min-width:96px;max-width:96px}
.grid.cmp th.f2,.grid.cmp td.f2{left:96px;min-width:46px;max-width:46px}
.grid th.r1,.grid td.r1{position:sticky;right:52px;background:var(--surface);border-left:2px solid var(--line);z-index:1;font-weight:700;min-width:60px}
.grid th.r2,.grid td.r2{position:sticky;right:0;background:var(--surface);z-index:1;min-width:52px}
.grid th.r1,.grid th.r2{background:var(--surface-2);z-index:3}
.grid.nostick th.r1,.grid.nostick td.r1,.grid.nostick th.r2,.grid.nostick td.r2{position:static;border-left:1px solid var(--line)}
.grid.cmp.nostick th,.grid.cmp.nostick td{min-width:46px;padding:0 3px}
.grid .cut{color:var(--red);font-weight:700}
.grid .arrow{color:#a09e96;font-size:10px}
.grid tr.sum td{font-weight:700;background:var(--surface-2)}
.grid td.gap{background:var(--red-bg);color:var(--red);font-size:11px;font-weight:700;text-align:center}
.grid td.c{text-align:center;font-size:11.5px}
.grid input.inp{width:56px;height:26px;font-size:12.5px;padding:0 5px}
.grid .hd{padding:6px 12px 0;position:sticky;left:0}
.grid.cmp .hd b{font-size:13px}
.p{display:flex;flex-direction:row;align-items:center;gap:8px;padding:6px 8px;border-radius:12px;border:1px solid var(--line);background:var(--surface);text-align:left;font-family:inherit;min-height:66px;box-sizing:border-box;position:relative;cursor:pointer}
.p .im{width:50px;height:50px;border-radius:10px;background:linear-gradient(135deg,#dfeee5,#bcd9c7);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:9.5px;color:var(--brand);font-weight:600;text-align:center;line-height:1.1;overflow:hidden}
.p .im img{width:100%;height:100%;object-fit:cover}
.p .tx{display:flex;flex-direction:column;gap:1px;min-width:0}
.p .pn{font-size:13.5px;font-weight:600;line-height:1.15}.p .pr{font-size:10.5px;color:var(--muted)}.p .st{font-size:11px;color:var(--brand);font-weight:600}
.p.inc{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}.p.low .st{color:var(--amber)}.p.out{opacity:.5}.p.out .st{color:var(--red)}
.p .cnt{position:absolute;top:-6px;right:-6px;background:var(--brand);color:#fff;border-radius:999px;font-size:11px;font-weight:700;width:20px;height:20px;display:flex;align-items:center;justify-content:center}
.p:disabled{cursor:not-allowed}
.pay{flex:1 1 0;height:38px;border-radius:10px;border:1px solid var(--line-3);background:var(--surface);font:inherit;font-size:12.5px;font-weight:600;color:var(--ink);font-family:inherit;padding:0 4px;cursor:pointer;white-space:nowrap}
.pay.main{background:var(--brand);color:#fff;border-color:var(--brand)}
.pay.free{color:var(--amber)}.pay.dmg{color:var(--red)}
.pay:disabled{opacity:.4;cursor:not-allowed}
.kv{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;padding:3px 0}
.kv b{font-variant-numeric:tabular-nums}
.ta{width:100%;box-sizing:border-box;min-height:40px;padding:6px 10px;border:1px solid var(--line-3);border-radius:8px;font:inherit;font-size:12.5px;background:var(--surface);resize:none}
.pho{border:1px dashed var(--line-3);border-radius:10px;padding:6px;text-align:center;font-size:12px;color:var(--muted);background:var(--surface-2);cursor:pointer}
.tog{width:40px;height:22px;border-radius:999px;background:var(--brand);position:relative;flex-shrink:0;border:0;cursor:pointer;padding:0;display:inline-block}
.tog:after{content:'';position:absolute;top:2px;right:2px;width:18px;height:18px;border-radius:50%;background:#fff}
.tog.off,.tog[aria-checked="false"]{background:var(--line-3)}.tog.off:after,.tog[aria-checked="false"]:after{right:auto;left:2px}
.tog:disabled{opacity:.5;cursor:not-allowed}
.row{display:flex;gap:8px;flex-wrap:wrap}.row>*{flex:1 1 0;min-width:0}
input[type=date],input[type=time],input[type=number]{min-width:0;-webkit-appearance:none;appearance:none}
.footpanel{position:sticky;bottom:0;z-index:6;background:var(--surface);border-top:1px solid var(--line);padding:10px 16px;display:flex;flex-direction:column;gap:8px}
.footpanel .fbtns{display:flex;gap:8px;justify-content:flex-end}
.footpanel .fbtns .btn{flex-grow:0;height:42px;padding:0 18px}
.footpanel .frm{display:flex;flex-direction:column;gap:6px}
.footpanel .frm b{font-size:13.5px}
.col{display:flex;flex-direction:column;gap:8px}
.pglist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.more{text-align:center;font-size:12px;color:var(--brand);font-weight:600;padding:6px 0 2px}

/* ===== shell: desktop (sidebar + white top bar) ===== */
.dk{display:flex;min-height:100vh;background:var(--bg)}
.sb{width:224px;background:var(--brand-dark);color:#dfe9e2;display:flex;flex-direction:column;padding:14px 0 12px;box-sizing:border-box;flex-shrink:0;position:sticky;top:0;height:100vh;overflow:auto;scrollbar-width:thin}
.brand{padding:4px 18px 12px;font-weight:700;font-size:15px;color:#fff}
.grp{padding:10px 18px 3px;font-size:10px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:#9ec9b2}
.it{display:block;width:100%;text-align:left;padding:5px 18px;font-size:13px;color:#dfe9e2;border:0;background:transparent;cursor:pointer;font-family:inherit;line-height:1.5}
.it:hover{color:#fff}
.it.act,.it[aria-current="true"]{background:var(--brand);color:#fff;font-weight:600;border-radius:0 16px 16px 0;margin-right:10px;width:calc(100% - 10px)}
.sbu{margin-top:auto;padding:10px 18px 0;border-top:1px solid #2b6a4b;display:flex;align-items:center;justify-content:space-between;gap:8px}
.sbu .who{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.sbu .who b{font-size:13px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sbu .who span{font-size:11px;color:#9ec9b2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sbu .out{font-size:11px;color:#9ec9b2;background:none;border:0;cursor:pointer;font-family:inherit;flex-shrink:0;padding:0}
.dnote{padding:10px 18px 0;font-size:10.5px;color:#9ec9b2;line-height:1.4}
.dk>.main{flex-grow:1;display:flex;flex-direction:column;min-width:0;min-height:100vh}
.mtop{display:none}
.top{height:54px;display:flex;align-items:center;gap:10px;padding:0 24px;background:var(--surface);border-bottom:1px solid var(--line);flex-shrink:0}
.top h1{margin:0;font-size:17px;font-weight:700;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mod{font-size:10px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:var(--brand);background:var(--brand-soft);border-radius:6px;padding:2px 6px;flex-shrink:0}
.help{width:26px;height:26px;border-radius:50%;border:1px solid var(--line-3);background:var(--surface);color:var(--muted);font:inherit;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;cursor:pointer;position:relative}
.help.dot::after{content:"";position:absolute;top:-2px;right:-2px;width:9px;height:9px;border-radius:50%;background:var(--red);border:2px solid #fff}
.topwho{margin-left:auto}
.content{padding:16px 24px;display:flex;flex-direction:column;gap:12px;flex-grow:1;min-height:0;min-width:0}
.content>*{flex-shrink:0}
.cols{display:flex;gap:14px;align-items:flex-start;min-height:0}
.cols>#main{flex-grow:1;min-width:0;display:flex;flex-direction:column;gap:12px}
.cols>#side{width:400px;flex-shrink:0}
.cols>#side:empty{display:none}
body.custom-tab .cols>#side{display:none}
.bar{padding:10px 24px;background:var(--surface);border-top:1px solid var(--line);display:flex;gap:8px;justify-content:flex-end;flex-shrink:0;position:sticky;bottom:0;z-index:5}
.bar .btn{flex-grow:0;height:42px;padding:0 18px}
.tool{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.tool .search{height:34px;width:260px;flex:0 1 260px}
.tool select{appearance:none;-webkit-appearance:none;border:0;border-radius:999px;padding:3px 22px 3px 9px;font-size:11.5px;font-weight:600;background:var(--neutral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234a4944'/%3E%3C/svg%3E") no-repeat right 8px center;color:var(--neutral-ink);cursor:pointer;font-family:inherit;max-width:180px}
.tool .seg{margin-left:auto}
.tool .cnt{color:var(--muted);font-size:11.5px}

/* ===== registry engine (app.js) mapped onto the mockup look ===== */
.tablewrap{background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:auto;max-height:calc(100vh - 190px)}
table.grid{border-collapse:collapse;width:max-content;min-width:100%;font-size:13px}
table.grid th{position:sticky;top:0;z-index:2;text-align:left;font-weight:600;font-size:10.5px;color:var(--muted);padding:5px 8px;border-bottom:1px solid var(--line);background:var(--surface-2);white-space:nowrap}
table.grid th small{display:none}
table.grid td{padding:3px 8px;border-bottom:1px solid var(--line-2);vertical-align:middle;height:34px;max-width:280px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
table.grid tbody tr{cursor:pointer}
table.grid tbody tr:hover td{background:var(--surface-2)}
table.grid tbody tr[aria-current="true"] td{background:var(--brand-soft)}
table.grid .idc{font-variant-numeric:tabular-nums;font-size:12.5px}
table.grid .num{text-align:right;font-variant-numeric:tabular-nums}
.clip{display:block;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pill{display:inline-flex;align-items:center;font-size:11.5px;font-weight:600;padding:1px 7px;border-radius:999px;background:var(--neutral);color:var(--neutral-ink);margin:0 3px 2px 0;white-space:nowrap}
.pill.on{background:var(--brand-soft);color:var(--brand)}.pill.off{background:var(--red-soft);color:var(--red)}.pill.warn{background:var(--amber-soft);color:var(--amber)}.pill.b{background:var(--blue-soft);color:var(--blue)}
.cards{display:flex;flex-direction:column;gap:8px}
.cards .card{cursor:pointer;text-align:left;width:100%;font-family:inherit;display:block;padding:8px 12px}
.cards .card[aria-current="true"]{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}
.cards .card .hd{padding:0}
.cards .card .chips{margin-top:4px}
.cards .card .pim{width:44px;height:44px;border-radius:9px;background:linear-gradient(135deg,#dfeee5,#bcd9c7);flex-shrink:0;overflow:hidden}
.cards .card .pim img{width:100%;height:100%;object-fit:cover}
.cards .card .rowc{display:flex;gap:10px;align-items:center}
.cards .card .grow{flex-grow:1;min-width:0}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:8px 12px;display:flex;flex-direction:column;gap:8px;position:sticky;top:12px;max-height:calc(100vh - 24px);overflow:auto}
.phead{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:2px 0 4px}
.phead h2{font-size:13.5px;font-weight:700;margin:0}
.phead .id{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.phead .pill{margin:0}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.fld{min-width:0}
.fld.wide,.fld.sec{grid-column:1 / -1}
.fld label{font-size:11px;color:var(--muted);display:block;margin-bottom:3px}
.fld label b{display:none}
.fld>div>div[style*="flex"]>input{width:auto;flex:1 1 0;min-width:0}
.fld .btn.sm{flex-shrink:0;height:36px;padding:0 12px;white-space:nowrap;font-size:12.5px}
.fld input,.fld textarea,.fld select{width:100%;min-width:0;box-sizing:border-box;padding:7px 10px;border:1px solid var(--line-3);border-radius:8px;font:inherit;font-size:13px;background:var(--surface);color:var(--ink)}
.fld textarea{min-height:52px;resize:vertical}
.fld input[readonly],.fld select[disabled],.fld textarea[readonly]{background:var(--surface-2);color:var(--muted)}
.fld input:focus,.fld textarea:focus,.fld select:focus{outline:2px solid var(--brand);outline-offset:-1px}
.fld.locked label{opacity:.7}
.fld .dirty{background:var(--edited);border-color:var(--amber-line)}
h3.sec{grid-column:1 / -1;font-size:12.5px;font-weight:700;margin:6px 0 0;color:var(--brand);border-top:1px solid var(--line-2);padding-top:8px}
.swrap{display:flex;align-items:center;gap:9px;height:34px}
.sw{position:relative;width:40px;height:22px;border-radius:999px;border:0;background:var(--line-3);cursor:pointer;padding:0;flex:none}
.sw::after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .12s}
.sw[aria-checked="true"]{background:var(--brand)}
.sw[aria-checked="true"]::after{transform:translateX(18px)}
.sw:disabled{opacity:.5;cursor:not-allowed}
.tagline{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.acts{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center;padding-top:6px;border-top:1px solid var(--line-2);margin-top:2px}
.acts .lead{margin-right:auto}
.acts .btn{height:32px;font-size:12px;padding:0 10px;flex-grow:0}
.acts .btn[disabled]{opacity:.45;cursor:not-allowed}
.btn.ghost{background:var(--surface);color:var(--ink);border-color:var(--line-3);font-weight:600}
.btn.sm{height:32px;font-size:12px;padding:0 10px;flex-grow:0}
.btn.iconbtn{padding:0 9px}
.rolechip{border:0;background:var(--neutral);color:var(--neutral-ink);border-radius:999px;padding:3px 9px;font-size:11.5px;font-weight:600;cursor:pointer;font-family:inherit}
.rolechip[aria-pressed="true"]{background:var(--brand-soft);color:var(--brand)}
.rolechip[aria-pressed="true"]::after{content:" ×"}
.rolechip:not([aria-pressed="true"])::before{content:"+ "}
.rolechip:disabled{opacity:.45;cursor:not-allowed}
.chipbtn{border:0;background:var(--neutral);color:var(--neutral-ink);border-radius:999px;padding:3px 9px;font-size:11.5px;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap}
.chipbtn.on,.chipbtn[aria-pressed="true"]{background:var(--brand-soft);color:var(--brand)}
.chipbtn.add,.chipbtn.b{background:var(--blue-soft);color:var(--blue)}
.chipbtn.x{background:var(--brand-soft);color:var(--brand)}
.chipbtn:disabled{opacity:.5;cursor:not-allowed}
.appchips{display:flex;flex-wrap:wrap;gap:6px}
.slots{display:flex;flex-direction:column;gap:6px}
.slotrow{display:grid;grid-template-columns:1fr 60px 1.4fr 26px;gap:6px;align-items:center}
.slotrow input{width:100%;padding:6px 8px;border:1px solid var(--line-3);border-radius:8px;font-size:12.5px}
.slotrow .x{border:0;background:var(--red-soft);color:var(--red);border-radius:999px;width:24px;height:24px;cursor:pointer}
.hint{font-size:11px;color:var(--muted);margin:3px 0 0}.hint.bad{color:var(--red)}
.empty{padding:26px;text-align:center;color:var(--muted);font-size:13px}
.err{color:var(--red);font-size:12.5px;margin:0 0 8px}
.okbar{background:var(--brand-soft);color:var(--brand);border:1px solid #c6dccf;border-radius:10px;padding:6px 12px;font-size:12px;line-height:1.45}
.warnbar{background:var(--amber-soft);color:var(--amber);border:1px solid var(--amber-line);border-radius:10px;padding:6px 12px;font-size:12px;line-height:1.45}
.okbar .chip,.warnbar .chip{cursor:pointer}
.form{background:var(--surface);border:1px solid var(--brand);border-radius:12px;padding:8px 12px;display:flex;flex-direction:column;gap:8px}
.form .g{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px}
.form label{font-size:11px;color:var(--muted);display:block;margin-bottom:3px}
.form input,.form select,.form textarea{width:100%;box-sizing:border-box;padding:7px 10px;border:1px solid var(--line-3);border-radius:8px;font:inherit;font-size:13px;background:var(--surface)}
.form .btn{height:36px;font-size:13px;flex-grow:0}
.form .fbtns{display:flex;gap:8px;justify-content:flex-end}
.thumbs{display:inline-flex;align-items:center;gap:3px}
.thumbs img{width:26px;height:26px;object-fit:cover;border-radius:6px;border:1px solid var(--line)}
.thumbs .cnt{font-size:11px;color:var(--muted);margin-left:3px}
.thumbgrid{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.thumbgrid .th{position:relative;display:inline-block}
.thumbgrid .th img{width:64px;height:64px;object-fit:cover;border-radius:10px;border:1px solid var(--line);display:block;cursor:zoom-in}
.thumbgrid .th button{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;border:1px solid var(--line-3);background:#fff;color:var(--red);cursor:pointer;line-height:1;padding:0;font-size:13px}
.addimg{display:inline-flex;align-items:center;justify-content:center;width:96px;height:64px;border:1px dashed var(--line-3);border-radius:10px;font-size:12px;color:var(--muted);cursor:pointer;text-align:center;background:var(--surface-2)}
.imgview img{max-width:100%;max-height:75vh;display:block;margin:0 auto;border-radius:10px}
.linkbtn{background:none;border:0;color:#9ec9b2;font-size:11px;cursor:pointer;font-family:inherit;padding:0}
.modal{position:fixed;inset:0;background:rgba(18,56,42,.45);display:flex;align-items:center;justify-content:center;padding:20px;z-index:80}
.modalbox{background:var(--surface);border-radius:14px;padding:16px;max-width:640px;width:100%;max-height:90vh;overflow:auto;display:flex;flex-direction:column;gap:8px}
.modalbox h2,.modalbox h3{margin:0 0 4px;font-size:15px}
.modalbox pre{background:var(--brand-dark);color:#e2efe8;padding:12px;border-radius:10px;font-size:12px;overflow:auto;white-space:pre-wrap;word-break:break-all}
.modalbox .acts{border-top:0;padding-top:4px}
.modalbox .acts .btn{height:40px;font-size:13px;flex-grow:1}
.toast{position:fixed;bottom:76px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;padding:10px 16px;border-radius:10px;font-size:13px;z-index:90;max-width:90vw}
.toast.bad{background:var(--red)}
.keyrow{display:flex;gap:10px;align-items:center;justify-content:space-between;border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:8px 12px;margin-bottom:8px;flex-wrap:wrap}
.keyrow b{font-size:13px}.keyrow b.mono{font-family:ui-monospace,Menlo,monospace;font-size:12.5px}
.keyrow .muted{font-size:11.5px}
.sysgrid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.sysgrid .panel{position:static;max-height:none}
.sysgrid .panel h3{margin:0 0 6px;font-size:13.5px}
.counts{display:flex;gap:16px;flex-wrap:wrap}.count b{display:block;font-size:18px;font-weight:700;line-height:1.1}.count span{font-size:11px;color:var(--muted)}
.audit{font-size:12.5px;width:100%;border-collapse:collapse}.audit td{vertical-align:top;padding:5px 8px;border-bottom:1px solid var(--line-2)}
.audit .mono{font-family:ui-monospace,Menlo,monospace;font-size:11.5px;white-space:pre-wrap;word-break:break-all;color:var(--muted)}
.dpcard{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:8px 12px;margin-bottom:8px}
.dpcard h3{margin:0 0 3px;font-size:13.5px}.dpcard .desc{font-size:12px;color:var(--muted);margin:0 0 8px}
.modeseg{display:inline-flex;border:1px solid var(--line-3);border-radius:10px;overflow:hidden;background:var(--surface)}
.modeseg button{border:0;background:none;padding:6px 12px;font-size:12px;cursor:pointer;font-family:inherit}
.modeseg button[aria-pressed="true"]{color:#fff}
.modeseg button[aria-pressed="true"][data-mode="manual"]{background:var(--neutral-ink)}
.modeseg button[aria-pressed="true"][data-mode="recommend"]{background:var(--amber)}
.modeseg button[aria-pressed="true"][data-mode="autopilot"]{background:var(--brand)}
.modeseg button[disabled]{opacity:.5;cursor:not-allowed}
.ovr{margin-top:8px;font-size:12.5px}.ovr table{border-collapse:collapse;width:100%}.ovr td{padding:3px 6px;border-bottom:1px solid var(--line-2)}
.ovr select{border:1px solid var(--line-3);border-radius:8px;padding:3px 6px;font-size:12px}
.stat{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11.5px;font-weight:600;background:var(--brand-soft);color:var(--brand)}
.stat.warn{background:var(--amber-soft);color:var(--amber)}
.opgrid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.opgrid .panel{position:static;max-height:none}
.opgrid .panel h3{margin:0 0 6px;font-size:13.5px}.opgrid .big{font-size:24px;font-weight:700}
.cal-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cal-head h2{font-size:15px;margin:0 8px;font-weight:700}
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.cal .dow{text-align:center;font-size:11px;color:var(--muted);padding:4px 0;font-weight:600}
.cal .day{background:var(--surface);border:1px solid var(--line);border-radius:10px;min-height:84px;padding:4px 6px;font-size:12px;position:relative}
.cal .day.out{opacity:.45}.cal .day.we{background:var(--surface-2)}.cal .day.today{outline:2px solid var(--brand);outline-offset:-2px}
.cal .day.closed{background:var(--red-soft)}
.cal .day .n{font-weight:600;font-size:12.5px}.cal .day.we .n{color:var(--red)}
.cal .chip{display:block;margin-top:3px;padding:1px 6px;border-radius:6px;font-size:11px;line-height:1.35;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.cal .chip.hol{background:var(--red-soft);color:var(--red)}.cal .chip.company{background:var(--amber-soft);color:var(--amber)}.cal .chip.special{background:#e8e6f5;color:#4a3d8a}
.cal .chip.booth{background:var(--brand-soft);color:var(--brand)}
.cal-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:11.5px;color:var(--muted)}
.cal-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;vertical-align:-1px;margin-right:4px}
.holform{display:flex;gap:8px;flex-wrap:wrap;align-items:end}
.holform label{display:block;font-size:11px;color:var(--muted)}
.holform input,.holform select{border:1px solid var(--line-3);border-radius:8px;padding:6px 8px;background:#fff;font-size:13px}
.pricerows{display:grid;grid-template-columns:auto 1fr 90px;gap:6px 8px;align-items:center}
.pricerows .tn{font-size:12.5px;color:var(--muted);white-space:nowrap}
.pricerows input{width:100%;border:1px solid var(--line-3);border-radius:8px;padding:5px 8px}
.tierlist .keyrow{padding:8px 10px}
.tierlist input{border:1px solid var(--line-3);border-radius:8px;padding:5px 8px}
.rolematrix{margin-top:4px}
.rolematrix table{border-collapse:collapse;width:100%;font-size:12px}
.rolematrix th,.rolematrix td{border:1px solid var(--line);padding:4px 6px;text-align:center;vertical-align:top}
.rolematrix thead th{background:var(--surface-2);color:var(--muted);font-weight:600;font-size:10.5px}
.rolematrix tbody th{text-align:left;background:var(--surface);font-weight:600;min-width:140px}
.rolematrix tbody th small{display:block;font-weight:400;color:var(--muted)}
.rolematrix td.w{background:var(--brand-soft);color:var(--brand);font-weight:600}.rolematrix td.f{background:var(--amber-soft);color:var(--amber);font-weight:600}.rolematrix td.r{background:var(--neutral);color:var(--neutral-ink);font-weight:600}.rolematrix td.n{color:#b3bdb7}
.rolematrix td small{display:block;font-weight:400;font-size:10.5px;color:var(--muted)}
.rolematrix .desc{text-align:left;font-weight:400;color:var(--muted);font-size:11.5px;max-width:280px}
details.rolematrix summary{cursor:pointer;font-weight:600;padding:6px 0;font-size:13px}
.gate{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.gatebox{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:32px 28px;max-width:420px;width:100%;text-align:center}
.gatebox h1{font-size:20px;margin:0 0 4px}.gatebox .btn{margin-top:16px;width:100%}
.gatemsg{margin-top:12px;font-size:13px;color:var(--red);min-height:1.4em}
.closeSide{display:none}
/* drawer (mobile menu) */
.drawer{position:fixed;inset:0;background:rgba(18,56,42,.55);z-index:70;display:flex;justify-content:flex-end}
.drawerbox{background:var(--brand-dark);color:#dfe9e2;width:min(300px,86vw);height:100%;overflow:auto;padding:10px 0 12px;display:flex;flex-direction:column;box-shadow:-4px 0 20px rgba(0,0,0,.3);border-radius:18px 0 0 18px}
.dtop{padding:6px 16px 10px;border-bottom:1px solid #2b6a4b;margin-bottom:6px;display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.dtop b{display:block;color:#fff;font-size:14px}.dtop span{font-size:11px;color:#9ec9b2;display:block}
.dtop .x{background:none;border:1px solid #4d8a68;color:#fff;border-radius:8px;height:28px;padding:0 8px;font-size:12px;cursor:pointer;font-family:inherit}
.drawerbox .grp{padding:6px 16px 2px}
.drawerbox .it{padding:6px 16px;font-size:13.5px}
.drawerbox .it.act{border-radius:0 16px 16px 0}
.drawerbox .out{margin-top:auto;font-size:11.5px;color:#9ec9b2;border-top:1px solid #2b6a4b;padding:8px 16px 0;background:none;border-left:0;border-right:0;border-bottom:0;text-align:left;cursor:pointer;font-family:inherit}
@media(min-width:961px){.drawer{display:none!important}}

/* ===== shell: mobile (390px) ===== */
@media(max-width:960px){
  body{font-size:14px}
  .dk{display:block}
  .sb{display:none}
  .dk>.main{min-height:100vh;display:flex;flex-direction:column}
  .mtop{height:56px;background:var(--brand-dark);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 14px 0 16px;flex-shrink:0;position:sticky;top:0;z-index:55}
  .mtop{gap:8px}
  .mtop .who{display:flex;flex-direction:column;line-height:1.2;min-width:0;flex-grow:1}
  .mtop .who .l1{display:flex;align-items:center;gap:6px;min-width:0}
  .mtop .who .l1 b{min-width:0}
  .mtop .who .l1 .mod{background:rgba(255,255,255,.14);color:#cfe3d8;flex-shrink:0}
  .mtop .help{border-color:#4d8a68;background:transparent;color:#fff;width:30px;height:30px;flex-shrink:0}
  .mtop .help.dot::after{border-color:var(--brand-dark)}
  .top{display:none}
  .mtop .who b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mtop .who span{font-size:11px;color:#a8c7b5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mtop .menu{border:1px solid #4d8a68;border-radius:8px;padding:6px 10px;font-size:13px;color:#fff;background:transparent;font-family:inherit;flex-shrink:0;height:32px;box-sizing:border-box;cursor:pointer}
  .top.show{height:auto;display:flex;align-items:center;gap:8px;padding:10px 16px 0;background:transparent;border:0}
  .top h1{font-size:17px;white-space:normal;line-height:1.3;flex-grow:1}
  .topwho{display:none}
  .content{padding:8px 16px 12px;gap:8px}
  .cols{flex-direction:column;gap:8px}
  .cols>#side{width:100%}
  .tool .search{width:100%;flex:1 1 100%}
  .tool .seg{display:none}
  .tool .btn{display:none}
  .tool select{max-width:46vw}
  .tablewrap{max-height:none}
  .bar{position:fixed;left:0;right:0;bottom:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom));justify-content:stretch;z-index:50}
  .footpanel{position:fixed;left:0;right:0;bottom:0;padding:8px 16px calc(10px + env(safe-area-inset-bottom));z-index:50;max-height:72vh;overflow:auto;box-shadow:0 -4px 16px rgba(0,0,0,.08)}
  .footpanel .fbtns .btn{flex-grow:1;height:48px;padding:0 10px}
  .footpanel .fbtns .btn.sec{flex-grow:0}
  .row>*{flex:1 1 42%}
  .kpi .k .v{font-size:15px}
  .bar .btn{flex-grow:1;height:48px;padding:0 10px}
  .bar .btn.sec{flex-grow:0}
  body.has-bar .content{padding-bottom:84px}
  .fields{grid-template-columns:1fr 1fr}
  #side .panel{position:fixed;inset:0;z-index:60;max-height:none;border-radius:0;border:0;padding:0 16px 96px;display:none;overflow:auto;background:var(--bg)}
  body.side-open #side .panel{display:flex}
  body.side-open{overflow:hidden}
  #side .panel .phead{position:sticky;top:0;background:var(--bg);padding:12px 0 6px;z-index:2}
  .closeSide{display:inline-flex;position:fixed;right:12px;top:10px;z-index:62;height:32px}
  body.side-open #side .acts{position:fixed;left:0;right:0;bottom:0;z-index:61;background:var(--surface);padding:10px 16px calc(10px + env(safe-area-inset-bottom));margin:0;border-top:1px solid var(--line);box-shadow:none}
  body.side-open #side .acts .btn{height:48px;font-size:14px;flex-grow:1}
  body.side-open #side .acts .btn.ghost{flex-grow:0}
  .modalbox{padding:14px}
  .keyrow{flex-direction:column;align-items:stretch}
  .kpi{grid-template-columns:1fr 1fr}
  .toast{bottom:84px}
}

/* ===== permission matrix v2 (by module) ===== */
.pm{display:flex;flex-direction:column;gap:8px}
.pm .grid table{width:100%}
.pm th.f,.pm td.f{min-width:150px;max-width:220px;text-align:left;font-weight:600}
.pm th{text-align:center;white-space:normal;line-height:1.15;min-width:52px;padding:4px 4px}
.pm td{text-align:center;min-width:52px;padding:0 4px}
.pm td.y{color:var(--brand);font-weight:700}
.pm td.w{color:var(--brand);font-weight:700}.pm td.r{color:var(--muted)}.pm td.fx{color:var(--amber);font-weight:700}.pm td.n{color:#c9c7bd}
.pm .legend{font-size:11.5px;color:var(--muted)}
@media(max-width:960px){.pm th.f,.pm td.f{min-width:118px;max-width:118px}}

/* ===== feedback round 3 (2026-09-30) ===== */
/* page-level horizontal scroll never; wide tables scroll inside .grid */
@media(max-width:960px){html{overflow-x:hidden}
  .fld input,.fld textarea,.fld select,.search input,.sel,.note,.ta,#q,.modalbox input,.modalbox textarea,.modalbox select{font-size:16px}
  #side .panel .phead{padding-right:84px}
  #regFoot [data-act="csv"]{display:none}
  .foot [data-csv]{display:none}}
#main>.panel{position:static;max-height:none;overflow:visible}
/* menu: icons + thin section dividers */
.it{display:flex;align-items:center;gap:9px}
.it svg{width:16px;height:16px;flex-shrink:0;opacity:.85;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.it.act svg{opacity:1}
.grp{border-top:1px solid rgba(255,255,255,.09);margin-top:6px;padding-top:9px}
.menu>.grp:first-child,#menu>.grp:first-child,#menuDrawer>.grp:first-child{border-top:0;margin-top:0}
.drawerbox .grp{border-top:1px solid rgba(255,255,255,.09);margin-top:4px;padding-top:8px}
/* one control row: seg / tabs on the left, date selector + small buttons on the right */
.tb{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.tb .tbl{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px}
.tb .tbl .tabs{flex:1 1 auto;min-width:0}
.tb .tbl .seg{flex-shrink:0;max-width:100%}
.tb .tbr{flex-shrink:0;display:flex;gap:6px;align-items:center;margin-left:auto}
.tb .tbr .chips{flex-wrap:nowrap}
select.chip.dsel{appearance:none;-webkit-appearance:none;padding-right:22px;background:var(--neutral) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%236b6a64' stroke-width='1.6'/></svg>") no-repeat right 8px center;cursor:pointer}
/* ? button: amber dot when the page status has a warning */
.help.dota::after{content:"";position:absolute;top:-2px;right:-2px;width:9px;height:9px;border-radius:50%;background:#e0a52a;border:2px solid #fff}
.mtop .help.dota::after{border-color:var(--brand-dark)}
/* cash ledger (POS / close) + channel tiles */
.ledger{display:flex;flex-direction:column}
.ledger .lg{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:5px 0;border-bottom:1px dashed var(--line-2);font-size:13px}
.ledger .lg b{font-variant-numeric:tabular-nums;font-size:14px}
.ledger .lg.tot{border-bottom:0;border-top:1px solid var(--line);font-weight:700;background:var(--surface-2);margin:2px -12px 0;padding:7px 12px}
.ledger .lg.tot b{color:var(--brand);font-size:15px}
.ledger .lg.in b,.ledger .lg.in .inp{margin-left:auto}
.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.tile{background:var(--surface-2);border:1px solid var(--line-2);border-radius:9px;padding:6px 8px;display:flex;flex-direction:column;gap:2px;min-width:0}
.tile span{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tile b{font-size:14px;font-variant-numeric:tabular-nums}
.tile.hi{background:var(--brand-soft);border-color:var(--brand)}
.kpi .k .v small{font-size:11px;font-weight:400;color:var(--muted)}
.li[data-tuopen]{cursor:pointer}
.li[data-tuopen]:active{background:var(--surface-2)}

/* ===== feedback round 4 (2026-09-30) ===== */
@media(max-width:960px){
  .cols{align-items:stretch}
  .cols>#main,.cols>#side{width:100%;max-width:100%;min-width:0}
  input[type=date],input[type=time],input[type=datetime-local]{min-height:40px;display:block;line-height:1.25;-webkit-appearance:none;appearance:none;width:100%;box-sizing:border-box}
  input[type=date]::-webkit-date-and-time-value,input[type=time]::-webkit-date-and-time-value{text-align:left;min-height:1.3em}
}
.tb{flex-wrap:nowrap}
.tb .tbl{overflow-x:auto;scrollbar-width:none}
.tb .tbl::-webkit-scrollbar{display:none}
/* products: reorder from the row / card */
.mv{display:inline-flex;gap:3px;flex-shrink:0;align-items:center}
.mv span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:7px;border:1px solid var(--line-3);background:var(--surface);font-size:11px;color:var(--ink);cursor:pointer;user-select:none}
.mv span:active{background:var(--brand-soft)}
th.mvc,td.mvc{width:66px;white-space:nowrap}
.cards .card .rowc .mv,.cards .card>.mv{margin-top:6px}
/* point dropdown (mobile) */
select.ptsel{font-size:16px;height:36px;padding:0 30px 0 12px;border-radius:999px;border:1px solid var(--line-3);background:var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%236b6a64' stroke-width='1.6'/></svg>") no-repeat right 11px center;font-family:inherit;font-weight:600;color:var(--ink);max-width:100%;min-width:0;flex:1 1 auto;-webkit-appearance:none;appearance:none}
/* role matrix v3: roles as rows */
.pm th{min-width:48px;max-width:64px;padding:4px 3px;font-size:10px;white-space:normal;line-height:1.15}
.pm td{min-width:48px;padding:0 3px}
.pm td.f,.pm th.f{min-width:118px;max-width:118px;line-height:1.15;font-size:12px}
.pm .rl{display:flex;flex-direction:column;gap:1px;padding:6px 0;border-bottom:1px solid var(--line-2)}
.pm .rl:last-of-type{border-bottom:0}
.pm .rl b{font-size:13px}
.pm .rl span{font-size:12px;color:var(--muted);line-height:1.45}
/* points picker (users: PC-Super / booth scope) */
.ptpick{display:flex;flex-wrap:wrap;gap:6px}
.ptpick .chip{cursor:pointer}
.ptpick .chip[aria-pressed=true]{background:var(--brand);color:#fff}
.ptpick .chip[disabled]{opacity:.5;cursor:not-allowed}

/* ===== allocation grid: equal cells + colours (2026-09-30) ===== */
.grid.cmp th,.grid.cmp td{min-width:60px;max-width:60px;width:60px;height:38px;text-align:center;padding:0 3px}
.grid.cmp.nostick th,.grid.cmp.nostick td{min-width:56px;max-width:56px;width:56px}
.grid.cmp th{font-size:10px;line-height:1.1}
.grid.cmp td.ac{font-variant-numeric:tabular-nums;font-weight:600;font-size:12.5px}
.grid.cmp td.ac small{display:block;font-size:9.5px;line-height:1;color:var(--muted);text-decoration:line-through;font-weight:400}
.grid.cmp td.ac b{display:block;line-height:1.1}
.grid.cmp td.ac-none{color:#c9c7bd;font-weight:400}
.grid.cmp td.ac-full{background:#e2f0e7;color:var(--brand)}
.grid.cmp td.ac-cut{background:#fbefcf;color:#8a5a12}
.grid.cmp td.ac-zero{background:#fbe1dd;color:var(--red)}
.grid.cmp td.ac-more{background:#e3ebf8;color:#2b5aa8}
.grid.cmp td.ac-in .inp{width:50px;height:28px;font-size:12.5px}
.grid.cmp td.ac-in.ac-cut .inp{background:#fbefcf}
.grid.cmp td.ac-in.ac-more .inp{background:#e3ebf8}
.lgd{display:inline-flex;gap:7px;font-size:10.5px;color:var(--muted);align-items:center;white-space:nowrap}
.lgd i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:3px;vertical-align:-1px}
.lgd i.ac-full{background:#b9dcc7}.lgd i.ac-cut{background:#f3d98f}.lgd i.ac-zero{background:#f3b8b0}.lgd i.ac-more{background:#b9cdf0}
.grid.cmp.nostick th.f,.grid.cmp.nostick td.f,.grid.cmp th.f,.grid.cmp td.f{min-width:96px;max-width:96px;width:96px;text-align:left}
.grid.cmp.nostick th.f2,.grid.cmp.nostick td.f2,.grid.cmp th.f2,.grid.cmp td.f2{min-width:46px;max-width:46px;width:46px}
.grid.cmp th.r1,.grid.cmp td.r1,.grid.cmp th.r2,.grid.cmp td.r2{min-width:52px;max-width:52px;width:52px}

/* product ▲▼ beside the chevron on cards (2026-09-30 night) */
.cards .card .hd .mv{flex-direction:column;gap:2px;margin:0 2px 0 4px;align-self:center}
.cards .card .hd .mv span{width:28px;height:22px;font-size:9px}

/* product ▲▼: one column at the far right of the card, centred (2026-09-30) */
.cards .card .rowc{align-items:center}
.cards .card .rowc>.mv{flex-direction:column;gap:4px;margin-left:8px;align-self:center}
.cards .card .rowc>.mv span{width:30px;height:26px;font-size:10px}

/* points picker groups (2026-10-01) */
.ptpick .pg{flex-basis:100%;font-size:11px;font-weight:700;color:var(--muted);margin-top:4px}

/* HR panel accordions + PC schedule grids (2026-10-01) */
.acc{grid-column:1/-1;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.acc summary{cursor:pointer;padding:10px 12px;display:flex;align-items:center;gap:8px;list-style:none;font-size:14px}
.acc summary::-webkit-details-marker{display:none}
.acc summary::before{content:"▸";color:var(--muted);font-size:12px;width:12px}
.acc[open] summary::before{content:"▾"}
.acc summary b{font-family:var(--font)}
.acc>.fields{padding:0 12px 12px}
.sched th,.sched td{width:54px;min-width:54px;max-width:54px;height:44px;text-align:center;padding:0 2px;white-space:normal;font-size:10.5px;line-height:1.1;vertical-align:middle}
.sched th.f,.sched td.f{width:110px;min-width:110px;max-width:110px;text-align:left;padding:0 6px}
.sched td.c{background:var(--brand-soft);color:var(--brand);font-weight:600}
.sched td.gap{background:var(--red-bg);color:var(--red);font-weight:700;font-size:10px}
.sched td.sel,.mcell.sel{outline:2px solid var(--brand);outline-offset:-2px}
.sched td div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mcal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.mcal .dow{font-size:10.5px;color:var(--muted);text-align:center;font-weight:700;padding:2px 0}
.mcell{min-height:58px;border:1px solid var(--line-2);border-radius:8px;padding:3px 4px;font-size:10.5px;line-height:1.15;background:var(--surface);cursor:pointer;overflow:hidden;text-align:left;font-family:inherit;color:var(--ink);display:block;width:100%}
.mcell b{display:block;font-size:11.5px;margin-bottom:1px}
.mcell.has{background:var(--brand-soft)}
.mcell.gap{background:var(--red-bg)}
.mcell.blank{visibility:hidden}
.mcell.today b{color:var(--brand);text-decoration:underline}
.mcell div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sched table{min-width:0;width:max-content}
@media(min-width:961px){.sched th,.sched td{width:84px;min-width:84px;max-width:84px}.sched th.f,.sched td.f{width:150px;min-width:150px;max-width:150px}}

/* ===== Self-Service HR (ForDevHR, 2026-10-03): collapsed menu group · clock card · shortcuts · steps · settings · certificate print ===== */
#menu,#menuDrawer{display:flex;flex-direction:column;flex-grow:1}
.fold{margin-top:auto;border-top:1px solid #2b6a4b;padding-top:4px}
.fh{display:flex;justify-content:space-between;align-items:center;padding:8px 18px;font-size:10px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:#cfe3d8;background:transparent;border:0;width:100%;font-family:inherit;min-height:36px;cursor:pointer}
.fh .fr{display:flex;align-items:center;gap:6px}
.fh .car{font-size:11px}
.drawerbox .fh{padding:8px 16px}
.fold .cnt,.it .cnt{font-size:10.5px;font-weight:700;background:#e0574a;color:#fff;border-radius:999px;padding:0 6px;font-style:normal;line-height:1.5}
.it .cnt{margin-left:auto}
.drawerbox .out{margin-top:4px}
.mtop .menu{position:relative}
.mtop .menu.dota::after{content:"";position:absolute;top:-4px;right:-4px;width:9px;height:9px;border-radius:50%;background:#e0a52a;border:2px solid var(--brand-dark)}
.lb{font-size:11px;color:var(--muted);margin-bottom:3px}
.ess{display:flex;flex-direction:column;gap:8px}
.ess .card{display:flex;flex-direction:column;gap:6px}
.ess .card>.hd{padding:0}
.clock{background:var(--brand-dark);color:#fff;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:10px}
.clock .sub2{font-size:11.5px;color:#a8c7b5}
.clock .big{font-size:40px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.clock .tm{display:flex;gap:8px}
.clock .tm>div{flex:1 1 0;background:rgba(255,255,255,.1);border-radius:10px;padding:7px 10px}
.clock .tm span{display:block;font-size:11px;color:#a8c7b5}
.clock .tm b{font-size:17px;font-variant-numeric:tabular-nums}
.clock .chip.w{background:rgba(255,255,255,.14);color:#fff}
.clock .where{font-size:12px;color:#cfe3d8}.clock .where.bad{color:#f3c9c4}
.clock .btn.white{background:#fff;color:var(--brand-dark);height:52px;font-size:15px}
.clock .btn.white.dis,.clock .btn.white:disabled{background:#9fb5aa;color:#2a4a3a}
.sc{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 6px;padding:6px 0}
.sc button{background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:5px;font-size:12px;color:var(--ink);min-height:66px;padding:0;font-family:inherit;cursor:pointer;text-align:center;line-height:1.2}
.sc i{width:44px;height:44px;border-radius:12px;background:var(--brand-soft);display:flex;align-items:center;justify-content:center;font-style:normal}
.sc svg{width:20px;height:20px;stroke:var(--brand);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.qbar{height:5px;border-radius:3px;background:var(--line-2);overflow:hidden;margin-top:4px}
.qbar span{display:block;height:5px;background:var(--brand)}.qbar span.a{background:#e0a52a}.qbar span.r{background:var(--red)}
.qrow{display:flex;justify-content:space-between;font-size:13px;gap:8px}
.tmv{font-variant-numeric:tabular-nums;font-size:13px;font-weight:600;white-space:nowrap}
.kvg{display:grid;grid-template-columns:96px 1fr;gap:4px 10px;font-size:13px;padding:4px 0;align-items:start}
.kvg>span{color:var(--muted);font-size:12px;padding-top:1px}
.kvg>div{min-width:0;overflow-wrap:anywhere}
.steps{display:flex;flex-direction:column}
.steps .st{display:flex;gap:10px;font-size:12px;line-height:1.35;padding:4px 0}
.steps .st .dt{width:10px;height:10px;border-radius:50%;background:var(--line-3);margin-top:4px;flex-shrink:0}
.steps .st.dn .dt{background:var(--brand)}.steps .st.now .dt{background:#e0a52a;box-shadow:0 0 0 3px var(--amber-soft)}.steps .st.no .dt{background:var(--red)}.steps .st.sk{opacity:.55}
.steps .st b{display:block;font-size:12.5px}
.btn.dng{background:var(--red-soft);color:var(--red);border-color:var(--red-soft)}
.ess .sel,.ess .ta,.ess input.sel{font-size:16px}
@media(min-width:961px){.ess .sel,.ess .ta,.ess input.sel{font-size:13.5px}}
.ess textarea.sel{min-height:64px;resize:vertical}
.ess .row>div{display:flex;flex-direction:column}
.thumbs2{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.thumbs2 .th2{position:relative}
.thumbs2 img{width:64px;height:64px;object-fit:cover;border-radius:8px;border:1px solid var(--line);display:block;cursor:pointer}
.thumbs2 .th2 button{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;border:0;background:var(--red);color:#fff;font-size:12px;line-height:1;cursor:pointer;padding:0}
.testbar{background:var(--edited);border:1px solid var(--amber-line);color:var(--amber);border-radius:10px;padding:6px 12px;font-size:12px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.testbar select{font-size:12px;border-radius:999px;border:1px solid var(--amber-line);background:#fff;padding:2px 8px;font-family:inherit}
.go{display:flex;align-items:center;gap:10px;width:100%;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px 12px;text-align:left;font-family:inherit;cursor:pointer;color:var(--ink)}
.go i{width:36px;height:36px;border-radius:10px;background:var(--brand-soft);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-style:normal}
.go svg{width:18px;height:18px;stroke:var(--brand);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.go>div{flex-grow:1;min-width:0}.go b{display:block;font-size:13.5px}.go span{font-size:11.5px;color:var(--muted);display:block;white-space:normal}.go u{text-decoration:none;color:var(--muted);font-size:16px}
.stp{display:flex;align-items:center;gap:8px;padding:5px 0;border-bottom:1px solid var(--line-2);font-size:13px}
.stp:last-child{border-bottom:0}
.stp>span:first-of-type{flex-grow:1;min-width:0}
.stp .no{width:22px;height:22px;border-radius:50%;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;font-size:11.5px;font-weight:700;font-style:normal;flex-shrink:0}
.ib{width:28px;height:28px;border-radius:8px;border:1px solid var(--line-3);background:var(--surface);font-family:inherit;cursor:pointer;padding:0;flex-shrink:0;font-size:13px}
.ib:disabled{opacity:.35;cursor:default}
.pre{font-family:ui-monospace,Menlo,monospace;font-size:12px;white-space:pre-wrap;background:var(--surface-2);border-radius:8px;padding:8px 10px;line-height:1.5}
.inp.w{width:120px}
.hd .inp{margin-left:auto}
.doc{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px 16px;font-size:13.5px;line-height:1.75;display:flex;flex-direction:column;gap:8px}
.doc p{margin:0;text-indent:24px}
.doc .sign{text-align:center;margin-top:18px}
#certPrint{display:none}
@media print{
  body>*{display:none!important}
  body>#certPrint{display:block!important;position:absolute;left:0;top:0;width:100%;background:#fff;color:#000}
  #certPrint .doc{border:0;border-radius:0;padding:0;font-size:16px;line-height:1.9;gap:14px}
  @page{size:A4;margin:22mm 20mm}
}
.ess table.t td,.ess table.t th{padding:4px 5px}
.ess .t .nm{font-size:13px}
.ess .t tr[data-prow]{cursor:pointer}
.offline{background:var(--neutral);color:var(--neutral-ink);border-radius:10px;padding:6px 12px;font-size:12px}
@media(max-width:960px){.sc{gap:10px 4px}.kvg{grid-template-columns:88px 1fr}}

/* ===== feedback 2026-10-03 (mobile): brighter green (tokens above), no overscroll past the top bar, ‹ back button, +1px type ===== */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}
#app.dk{height:100%;min-height:0}
.dk>.main{height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.gate{height:100%;min-height:0;overflow:auto}
@media(max-width:960px){.dk>.main{min-height:0}}
.mtop .back{width:32px;height:32px;border-radius:8px;border:1px solid #4d8a68;background:transparent;color:#fff;font-size:24px;line-height:1;flex-shrink:0;cursor:pointer;font-family:inherit;padding:0 0 3px;display:flex;align-items:center;justify-content:center;margin-right:-2px}
.mtop .back[hidden]{display:none}
/* type scale +1px (feedback: "ปรับ font โดยรวมให้ใหญ่ขึ้นเล็กน้อย") */
body{font-size:15px}
.chip{font-size:12.5px}.chip.sm{font-size:11.5px}
.nm{font-size:14.5px}.sku{font-size:11px}.sub{font-size:11.5px}.muted{font-size:12.5px}
.hd b{font-size:14.5px}
.tab{font-size:13.5px}.seg a,.seg button{font-size:12.5px}
.btn{font-size:15px}.btn.s{font-size:13px}
label,.lb{font-size:12px}
.sel,.note{font-size:14px}.ta{font-size:13.5px}
.kv,.kvg{font-size:14px}.kvg>span{font-size:13px}
table.t{font-size:14px}.t th{font-size:11.5px}
table.grid{font-size:14px}table.grid th{font-size:11.5px}table.grid .idc{font-size:13.5px}
.grid table{font-size:13.5px}.grid th{font-size:11.5px}
.kpi .l{font-size:11.5px}.kpi .v{font-size:17px}
.it{font-size:14px}.grp,.fh{font-size:11px}.mod{font-size:11px}
.warn,.ok,.info,.amb{font-size:13px}
.sc button{font-size:13px}
.tile span{font-size:12px}.tile b{font-size:15px}
.steps .st{font-size:13px}.steps .st b{font-size:13.5px}
.go b{font-size:14.5px}.go span{font-size:12.5px}
.stp{font-size:14px}
.p .pn{font-size:14.5px}.p .pr{font-size:11.5px}.p .st{font-size:12px}
.pay{font-size:13.5px}
.search{font-size:13.5px}
.tool select{font-size:12.5px}
.helpbox .hbody .muted{font-size:13px}
.cards .card .sku{font-size:11.5px}
.fld input,.fld select,.fld textarea{font-size:14px}
.acc summary{font-size:15px}
.ess .sel,.ess .ta,.ess input.sel{font-size:16px}
@media(min-width:961px){.ess .sel,.ess .ta,.ess input.sel{font-size:14px}}
@media(max-width:960px){.mtop .who b{font-size:16px}.mtop .who span{font-size:12px}.drawerbox .it{font-size:14.5px}.mtop .menu{font-size:14px}}

/* ===== feedback 2026-10-03 (round 2): green gradient, continuous green above the top bar, ☰ left / user right, bigger type on phones ===== */
html{background:var(--brand-dark)}
.gate{background:var(--bg)}
.mtop,.sb,.drawerbox{background:linear-gradient(165deg,#20704c 0%,#1b6243 45%,#185a3c 100%)}
.clock{background:linear-gradient(160deg,#216f4c 0%,#1a5c3e 60%,#164f36 100%)}
.it.act,.it[aria-current="true"]{background:linear-gradient(90deg,#249159,#1e7a4a)}
.mtop .who.r{text-align:right;align-items:flex-end;margin-left:auto}
.mtop .who.r .l1{justify-content:flex-end;flex-direction:row-reverse}
.mtop .menu{margin-right:2px}
.mtop .back{margin-right:0}
@media(max-width:960px){
  body{font-size:16px}
  .drawerbox .it{font-size:16px;padding:8px 16px}
  .drawerbox .grp,.drawerbox .fh{font-size:12px}
  .drawerbox .out{font-size:13.5px}
  .dtop b{font-size:16px}.dtop span{font-size:12.5px}
  .mtop .menu{font-size:15px;height:36px;padding:0 12px}
  .mtop .help{width:34px;height:34px;font-size:15px}
  .mtop .back{width:36px;height:36px;font-size:26px}
  .mtop .who b{font-size:17px}.mtop .who span{font-size:13px}
  .nm{font-size:15.5px}.sku{font-size:12px}.sub{font-size:12.5px}.muted{font-size:13.5px}
  .chip{font-size:13px}.chip.sm{font-size:12px}
  .hd b{font-size:15.5px}
  .tab{font-size:14px}.seg a,.seg button{font-size:13px}
  .btn{font-size:16px}.btn.s{font-size:13.5px}
  label,.lb{font-size:12.5px}
  .kv,.kvg{font-size:15px}.kvg>span{font-size:13.5px}
  table.t{font-size:14.5px}.t th{font-size:12px}
  .kpi .l{font-size:12px}.kpi .v{font-size:18px}
  .warn,.ok,.info,.amb{font-size:13.5px}
  .sc button{font-size:13.5px}
  .steps .st{font-size:13.5px}.steps .st b{font-size:14px}
  .go b{font-size:15.5px}.go span{font-size:13px}
  .stp{font-size:15px}
  .cards .card .nm{font-size:16px}.cards .card .sku{font-size:12.5px}
  .clock .big{font-size:44px}.clock .sub2{font-size:12.5px}.clock .tm b{font-size:18px}.clock .tm span{font-size:12px}
  .helpbox .top h1{font-size:18px}.helpbox .hbody .muted{font-size:13.5px}
  .tool select{font-size:13px}
  .search{font-size:14.5px}
  .acc summary{font-size:16px}
}

/* ===== feedback 2026-10-03 (round 3): gradient dark top-left → brighter bottom-right, continuous with the status bar; menu back on the right; no momentum overscroll ===== */
html{background:#185a3c}
.mtop{background:linear-gradient(135deg,#185a3c 0%,#1c6442 55%,#227650 100%)}
.sb,.drawerbox{background:linear-gradient(170deg,#185a3c 0%,#1b6243 50%,#20704b 100%)}
.clock{background:linear-gradient(135deg,#185a3c 0%,#1c6442 55%,#227650 100%)}
.dk>.main{overscroll-behavior:none}
.mtop .who{min-width:0;flex-grow:1;text-align:left;align-items:flex-start;margin-left:0}
.mtop .who .l1{justify-content:flex-start;flex-direction:row}
.mtop .who b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mtop .back{margin-right:2px}
