:root{--sab:env(safe-area-inset-bottom,0px)}
/* จอสัมผัส: เว้นขอบล่างอย่างน้อย 16px เผื่อเครื่องที่แถบโฮม/ปัดนิ้วทับจอแต่รายงาน safe-area เป็น 0 (Android เต็มจอ, เบราว์เซอร์ในแอป LINE) */
@media (pointer:coarse){:root{--sab:max(env(safe-area-inset-bottom,0px),16px)}}
html{font-size:14.4px}
@media (max-width:599px){html{font-size:clamp(13.5px,1.35vw + 8.55px,14.4px)}}   /* สเกลตามความกว้างจอ 15px (≤360) → 16px (≥430) — เดิม 17–19px ใหญ่เกิน */
/* Guru IT Service Desk — สไตล์แบน สะอาด (หัวข้อใหญ่ · การ์ดสีอ่อนไม่มีเงา · แท็บข้อความ · ปุ่ม + ลอย)
   2 โหมดสี: กลางวัน (light) · กลางคืน (dark) — สีหลักสีเดียว (น้ำเงินโลโก้) สีสถานะเป็นจุดเล็ก ๆ
   เลย์เอาต์: มือถือ = เมนูล่าง · คอมพิวเตอร์ (≥960px) = เมนูซ้าย + เนื้อหากว้าง + รายละเอียดเป็นแผงขวา */

/* ---------- กลางวัน: พื้นเทาอมฟ้า การ์ดขาว ---------- */
:root,:root[data-theme=light]{
  color-scheme:light;
  --brand-blue:#0668D3;
  --backdrop:#E9EEF4; --bg:#F3F6FA; --surface:#FFFFFF; --card:#FFFFFF; --card-2:#F1F4F8; --line:#E4E9EF;
  --text:#18212D; --text-2:#5F6875; --text-3:#858E9A; --text-ph:#67707D;   /* text-3 = ไอคอน/จุด (≥3:1) · text-ph = ข้อความจาง เช่น ตัวอย่างในช่องกรอก (≥4.5:1) */
  --primary:#0668D3; --primary-d:#0552A8; --primary-s:#E7F0FC; --btn:#0668D3; --btn-d:#0552A8; --on-btn:#FFFFFF;
  --danger:#C4320F; --danger-s:#FDECE7; --warn:#9A5500; --warn-s:#FFF3DF; --ok:#11804B; --ok-s:#E3F5EB; --gold:#F2A900;
  --scrim:rgba(15,25,40,.42); --shadow:0 12px 32px -12px rgba(15,35,65,.28);
  --toast-bg:#18212D; --toast-text:#FFFFFF;
  --internal-bg:#FFF6E5; --internal-line:#F0D49A;
  --map-bg:#E3ECF8; --map-road:#FFFFFF;
  --radius:16px;
}
/* ---------- กลางคืน ---------- */
:root[data-theme=dark]{
  color-scheme:dark;
  --backdrop:#06090D; --bg:#0D131A; --surface:#141B24; --card:#18212B; --card-2:#202B37; --line:#26313D;
  --text:#E6EDF4; --text-2:#9AA7B5; --text-3:#6C7988; --text-ph:#8592A0;
  --primary:#6AAEFF; --primary-d:#3D8BF0; --primary-s:rgba(90,162,255,.14); --btn:#2670D4; --btn-d:#1F62BD; --on-btn:#FFFFFF;
  --danger:#FF7A59; --danger-s:rgba(255,122,89,.14); --warn:#F0B057; --warn-s:rgba(240,176,87,.14); --ok:#4CC98A; --ok-s:rgba(76,201,138,.14); --gold:#F5B92E;
  --scrim:rgba(0,0,0,.62); --shadow:0 12px 30px -10px rgba(0,0,0,.65);
  --toast-bg:#E6EDF4; --toast-text:#0D131A;
  --internal-bg:rgba(240,176,87,.10); --internal-line:rgba(240,176,87,.35);
  --map-bg:#1A2633; --map-road:#26364A;
}
.rc-customer{--c:#5C7FA8}.rc-technician{--c:#4F8F9E}.rc-team_leader{--c:#5A6E8C}.rc-admin{--c:#7A828C}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%}
body{font-family:'Prompt',system-ui,sans-serif;color:var(--text);line-height:1.5;background:var(--backdrop)}
.mono{font-family:ui-monospace,Consolas,'SF Mono',monospace;font-size:.95em}
.muted{color:var(--text-2);font-weight:400}
b,strong,h1,h2,h3,th{font-weight:600}
em{font-style:normal}
svg{display:block;flex:none}
button{font-family:inherit;color:inherit}
[hidden]{display:none!important}
.sp{flex:1}
a{color:var(--primary)}
::placeholder{color:var(--text-ph)}

/* ---------- โครงแอป (มือถือ) ---------- */
.shell{max-width:640px;margin:0 auto;height:100vh;height:100dvh;background:var(--bg);position:relative;display:flex;flex-direction:column;overflow:hidden}
.scroll{flex:1;overflow-y:auto;padding:0 16px 112px;overscroll-behavior:contain}
.scroll::-webkit-scrollbar{width:0}
.side-brand{display:none}
.side-filters{display:none}
.sheet-bg{display:none}

/* หัวหน้า: หัวข้อใหญ่ซ้าย · ไอคอนขวา */
.phead{display:flex;align-items:flex-start;gap:6px;padding:calc(env(safe-area-inset-top,0px) + 18px) 0 14px}
.ph-t{flex:1;min-width:0}
.ph-t h1{margin:0;font-size:1.625rem;font-weight:500;line-height:1.3;letter-spacing:-.2px}
.ph-t small{display:block;font-size:0.8125rem;color:var(--text-2);margin-top:2px}
.ph-logo{display:block;width:96px;height:auto;margin-bottom:10px;border-radius:6px}
.logo-btn{background:none;border:0;padding:0;cursor:pointer;display:block;border-radius:6px;min-height:44px;display:flex;align-items:center}
:root[data-theme=dark] .ph-logo{background:#fff;padding:3px 6px}
.ph-a{display:flex;align-items:center;gap:2px;margin-top:2px}
.ibtn{width:44px;height:44px;border-radius:12px;border:0;background:none;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text);flex:none}
.ibtn:hover{background:var(--card-2)}
.ibtn.on{background:var(--primary-s);color:var(--primary)}
.ibtn.back{margin:-2px 2px 0 -10px}

/* ทางลัด: การ์ดสี่เหลี่ยมสีอ่อน */
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:8px;margin-bottom:22px}
.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:96px;padding:14px 8px;border:0;border-radius:var(--radius);background:var(--card);cursor:pointer;font:inherit;font-size:0.875rem;text-align:center;line-height:1.35;transition:background .15s,transform .1s}
/* ประเภทงาน (หัวหน้า): ชิปแบบเม็ดยา */
.tchips{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;margin:0 0 8px;padding:4px;background:var(--card);border-radius:14px}
.tchips::-webkit-scrollbar{display:none}
.tchips button{flex:1 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:4px;border:0;border-radius:10px;padding:8px;min-height:42px;white-space:nowrap;background:transparent;color:var(--text-2);font:inherit;font-size:0.875rem;cursor:pointer}
.tchips button b{font-weight:600;margin-left:2px}
.tchips button.on{background:var(--btn);color:var(--on-btn);font-weight:500}
.tchips button.on.hot b{color:inherit}
.tchips button.hot b{color:var(--danger)}
.tile:hover{background:var(--card-2)}
.tile:active{transform:scale(.97)}
.tile i{position:relative;color:var(--primary)}
.tile small{font-size:0.75rem;color:var(--text-2);margin-top:-6px}
.tbdg{position:absolute;top:-6px;right:-10px;background:#D93A1A;color:#fff;font-size:0.6875rem;font-weight:600;min-width:17px;height:17px;border-radius:10px;display:flex;align-items:center;justify-content:center;padding:0 4px;font-style:normal}

/* แท็บข้อความ + ไอคอนเครื่องมือ */
.tbar{display:flex;align-items:center;gap:4px;margin:4px 0 12px}
.ttabs{display:flex;gap:16px;overflow-x:auto;scrollbar-width:none;flex:1;min-width:0;padding:2px 24px 2px 0;
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent)}
.ttabs::-webkit-scrollbar{display:none}
.ttabs button{flex:none;border:0;background:none;padding:6px 0;font:inherit;font-size:0.9375rem;color:var(--text-2);cursor:pointer;white-space:nowrap;position:relative}
.ttabs button sup{font-size:0.75rem;margin-left:2px;vertical-align:super;color:inherit}
.ttabs button.on{color:var(--text);font-weight:500}
.ttabs button.on::after{content:'';position:absolute;left:0;right:0;bottom:0;height:2.5px;border-radius:2px;background:var(--primary)}
/* มือถือ: แท็บและชิปเป็นตาราง (จำนวนคอลัมน์ตามความกว้างจอ) ตัวหนังสือปรับตามจอ ไม่ตกบรรทัด */
@media (max-width:959px){
  .tbar .sp,.tbar .ibtn{display:none}
  .ttabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));overflow:visible;padding-right:0;row-gap:6px;column-gap:8px;-webkit-mask-image:none;mask-image:none}
  .ttabs button{font-size:clamp(12px,3.7vw,15px);white-space:nowrap;min-width:0;min-height:40px;padding:6px 8px;border-radius:12px;background:var(--card);display:flex;align-items:center;justify-content:center;gap:2px}
  .ttabs button.on{background:var(--primary-s);color:var(--primary);font-weight:600}
  .ttabs button.on::after{display:none}
  .ttabs button sup{margin:0 0 0 2px;padding:0 6px;border-radius:999px;background:var(--card-2);font-size:0.75rem;vertical-align:middle;line-height:1.7}
  .tchips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
  .tchips button{font-size:clamp(12px,3.6vw,14px);padding:8px 2px;gap:3px;min-width:0}
  .tchips button svg{width:15px;height:15px}
  .ph-t h1{font-size:clamp(20px,6.4vw,26px)}
  .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tile{white-space:nowrap}
}
.searchbox{margin:0 0 12px;display:flex;align-items:center;gap:8px;background:var(--card);border:1px solid transparent;border-radius:12px;padding:0 12px;color:var(--text-3)}
.searchbox:focus-within{border-color:var(--primary)}
.searchbox input{flex:1;border:0;outline:0;font:inherit;font-size:1rem;padding:11px 0;background:none;color:var(--text);min-width:0}
.empty{text-align:center;color:var(--text-2);padding:36px 20px;font-size:0.875rem;display:flex;flex-direction:column;align-items:center;gap:8px}
.empty svg{color:var(--text-3)}

/* ส่วนที่ย่อ/ขยายได้ */
.fold{margin-top:18px}
.fold-h{display:flex;align-items:center;gap:4px}
.fold-btn{flex:1;display:flex;align-items:center;gap:8px;border:0;background:none;padding:6px 0;font:inherit;cursor:pointer;text-align:left;min-height:44px}
.fold-t{font-size:1rem;font-weight:500;display:flex;align-items:center;gap:6px}
.fold-ic{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--text-2);transition:transform .2s,background .15s}
.fold-btn:hover .fold-ic{background:var(--card-2)}
.fold:not(.open) .fold-ic{transform:rotate(-90deg)}
.fold:not(.open) .fold-b{display:none}
.fold-b{padding-top:8px}
.cnt{background:var(--card-2);color:var(--text-2);font-size:0.75rem;font-weight:500;padding:1px 9px;border-radius:999px}
.cnt.hot{background:#D93A1A;color:#fff}
.card .fold{margin-top:8px}.card .fold-t{font-size:0.9375rem}

/* รายการ */
.list{display:flex;flex-direction:column;gap:10px}
.tcard{background:var(--card);border-radius:var(--radius);padding:14px 14px 12px;cursor:pointer;border:1px solid transparent;transition:background .15s}
.tcard:hover{background:var(--card-2)}
:root[data-theme=light] .tcard:hover{background:var(--surface);border-color:var(--line)}
.tcard.attn{border-color:var(--primary)}
.tc-h{display:flex;align-items:flex-start;gap:12px}
.tc-ic{width:38px;height:38px;border-radius:12px;background:var(--card-2);color:var(--primary);display:flex;align-items:center;justify-content:center;flex:none}
:root[data-theme=light] .tc-ic{background:var(--primary-s)}
.tc-ic.st-closed{color:var(--ok)} .tc-ic.st-resolved,.tc-ic.st-pending{color:var(--warn)} .tc-ic.st-new{color:var(--danger)}
.tc-t{flex:1;min-width:0}
.tc-t b{display:block;font-size:1rem;font-weight:500;line-height:1.4}
.tc-t small{display:block;font-size:0.8125rem;color:var(--text-2);margin-top:2px}
.tc-f{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:10px 0 0 50px}
.tcard .btn.block-sm{width:100%;margin-top:12px;min-height:46px;font-size:0.9375rem}
.tag{display:inline-flex;align-items:center;gap:4px;font-size:0.75rem;color:var(--text-2);background:var(--card-2);padding:2px 9px;border-radius:6px;white-space:nowrap}
:root[data-theme=light] .tag{background:var(--bg)}
.tag.warn{color:var(--danger)}
/* แบบย่อ: แถวเดียว */
.list.dense{gap:0;background:var(--card);border-radius:var(--radius);overflow:hidden}
.trow{display:flex;align-items:center;gap:12px;padding:12px 14px;cursor:pointer;min-height:58px;color:var(--text)}
.trow+.trow{border-top:1px solid var(--line)}
.trow:hover{background:var(--card-2)}
.tr-m{flex:1;min-width:0;color:var(--text)}
.tr-m b{display:block;font-size:0.9375rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-m small{display:block;font-size:0.8125rem;color:var(--text-2)}
.tr-m em{color:var(--danger)}
.tr-flag{display:inline-flex;align-items:center;gap:3px;font-size:0.75rem;font-weight:500;color:var(--primary);background:var(--primary-s);padding:3px 8px;border-radius:6px;white-space:nowrap}
.sdot{width:9px;height:9px;border-radius:50%;background:var(--text-3);flex:none}
.d-new{background:var(--danger)} .d-assigned,.d-in_progress{background:var(--primary)} .d-pending,.d-resolved{background:var(--warn)} .d-closed{background:var(--ok)}

/* ป้ายสถานะ: พื้นเทา + จุดสี */
.pill,.sbadge,.fresh{display:inline-flex;align-items:center;gap:6px;font-size:0.75rem;font-weight:500;padding:2px 10px 2px 8px;border-radius:6px;white-space:nowrap;background:var(--card-2);color:var(--text)}
:root[data-theme=light] .pill,:root[data-theme=light] .sbadge,:root[data-theme=light] .fresh{background:var(--bg)}
.pill::before,.sbadge::before,.fresh::before{content:'';width:7px;height:7px;border-radius:50%;background:var(--dot,var(--text-3));flex:none}
.p-new{--dot:var(--danger)} .p-assigned,.p-in_progress{--dot:var(--primary)} .p-pending,.p-resolved{--dot:var(--warn)} .p-closed{--dot:var(--ok)}
.s-signed{--dot:var(--ok)} .s-waiting{--dot:var(--warn)} .s-nosign{--dot:var(--text-3)}
.f-fresh{--dot:var(--ok)} .f-stale{--dot:var(--warn)} .f-lost{--dot:var(--danger)}
.prio{font-weight:500;font-size:0.75rem;color:var(--text-2);white-space:nowrap} .prio-urgent{color:var(--danger)} .prio-high{color:var(--warn)}

/* ปุ่มลอย + */
.fab{position:absolute;right:18px;bottom:calc(var(--sab) + 84px);z-index:25;width:58px;height:58px;border-radius:50%;border:0;background:var(--btn);color:var(--on-btn);
  display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;box-shadow:0 8px 20px -8px rgba(15,35,65,.35);transition:transform .12s}
.fab span{display:none}
.ftool{width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--text);font:inherit;font-size:0.8125rem;font-weight:600;cursor:pointer;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;padding:0}
.ph-a .ftool{width:44px;height:44px;font-size:0.8125rem}
.fab:hover{background:var(--btn-d)}.fab:active{transform:scale(.95)}

/* แถบเมนูล่าง (มือถือ) */
.tabbar{position:absolute;left:0;right:0;bottom:0;background:var(--surface);display:flex;justify-content:space-around;
  padding:6px 4px calc(var(--sab) + 4px);border-top:1px solid var(--line);z-index:20}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;background:none;border:0;font:inherit;font-size:0.8125rem;color:var(--text-2);padding:4px 0;cursor:pointer;min-height:54px}
.tab i{position:relative}
.tab.on{color:var(--primary)}
.tab .bdg{position:absolute;top:-4px;right:-10px;background:#D93A1A;color:#fff;font-size:0.6875rem;font-weight:600;min-width:17px;height:17px;border-radius:10px;display:flex;align-items:center;justify-content:center;padding:0 4px;font-style:normal}

/* รูปโปรไฟล์ (รูปจริง หรืออักษรตัวแรก) */
.av{border-radius:50%;flex:none;object-fit:cover;display:inline-flex;align-items:center;justify-content:center;background:var(--primary-s);color:var(--primary);font-weight:600;line-height:1}
.profile-card{text-align:center;display:flex;flex-direction:column;align-items:center;gap:4px}
.profile-card .tk-title{margin:8px 0 0}
.opt .av{margin-right:-2px}

/* ไอคอนงาน: รูปที่ลูกค้าถ่าย หรือไอคอนหมวดงานบนพื้นสีอ่อน (โทนหม่น ไม่ฉูดฉาด) */
.tc-ic.photo{padding:0;overflow:hidden;background:var(--card-2)}
.tc-ic.photo img{width:100%;height:100%;object-fit:cover}
.tcard .tc-ic{width:44px;height:44px;border-radius:12px}
.cat-printer{--cat:#3B6FB6}.cat-network{--cat:#2F8F83}.cat-account{--cat:#8A6A2E}.cat-install{--cat:#5B5FB0}.cat-repair{--cat:#A2593A}.cat-cctv{--cat:#6B5A8E}.cat-other{--cat:#5F6875}
:root[data-theme=dark] :is(.cat-printer,.cat-network,.cat-account,.cat-install,.cat-repair,.cat-cctv,.cat-other){--cat:#9DB8E0}
.tc-ic[class*=cat-]{color:var(--cat);background:color-mix(in srgb,var(--cat) 12%,var(--card))}

/* ความคืบหน้าโปรเจกต์ */
.pbar{height:6px;border-radius:4px;background:var(--card-2);overflow:hidden;margin:12px 0 0}
.pbar i{display:block;height:100%;background:var(--primary);border-radius:4px;transition:width .3s}
.pct{font-size:0.9375rem;font-weight:600;color:var(--primary);white-space:nowrap}
.pct.big{font-size:1.25rem}
/* โปรเจกต์: การ์ดสรุป + ขั้นตอนเป็นการ์ดย่อย มีวงกลมเลขและรูปหลักฐาน */
.pj-hero{padding:18px 18px 16px}
.pj-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pj-top .sp{flex:1}
.pj-hero .tk-title{margin:12px 0 0;font-size:1.25rem;line-height:1.3}
.pj-bar{height:8px;margin-top:14px}
.pj-hero .facts{margin-top:16px;padding-top:14px;border-top:1px solid var(--line);row-gap:8px}
.pj-steps{display:flex;flex-direction:column;gap:8px}
.pj-step{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px 12px 12px 14px;text-align:left;transition:background .15s}
.pj-step-main{text-align:left;display:flex;align-items:center;gap:12px;min-height:40px;cursor:pointer;position:relative}
.pj-step-main input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.pj-step-main:focus-within{outline:2px solid var(--primary);outline-offset:2px;border-radius:8px}
.pj-step-no{width:28px;height:28px;border-radius:50%;border:2px solid var(--line);display:flex;align-items:center;justify-content:center;flex:none;font-size:0.8125rem;font-weight:600;color:var(--text-2);transition:background .15s,border-color .15s}
.pj-step.done .pj-step-no{background:var(--ok);border-color:var(--ok);color:#fff}
.pj-step-t{flex:1;min-width:0;font-size:0.9375rem;line-height:1.4;overflow-wrap:anywhere}
.pj-step.done .pj-step-t{color:var(--text-2);text-decoration:line-through;text-decoration-color:var(--text-2)}
.pj-step-proof{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0 0 40px}
.proof-img{width:64px;height:64px;padding:0;border:0;border-radius:12px;overflow:hidden;cursor:zoom-in;background:var(--card);flex:none}
.proof-img img{width:100%;height:100%;object-fit:cover;display:block}
.proof-btn{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 12px;border:0;border-radius:999px;background:var(--card);color:var(--primary);font:inherit;font-size:0.8125rem;font-weight:600;cursor:pointer;white-space:nowrap}
.proof-btn:hover{background:var(--surface,var(--card))}
.proof-btn.danger{color:var(--danger);padding:0 10px}
.proof-btn:focus-within,.proof-btn:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.tc-f-wide{margin-left:56px}

/* GPS: ระยะทาง + เวลาถึงโดยประมาณ */
.eta{display:flex;align-items:center;gap:10px;margin:-2px 0 12px;padding:10px 12px;border-radius:12px;background:var(--primary-s);color:var(--primary)}
.eta b{font-size:0.9375rem;font-weight:600}

/* การแจ้งเตือน */
.ibtn.bell{position:relative}
.ibtn.bell .tbdg{top:2px;right:2px}
button.trow{width:100%;border:0;background:none;font:inherit;text-align:left}
.trow.unread .tr-m b{font-weight:600}

/* ล็อกอิน / โน้ต */
.note-txt{white-space:pre-wrap!important;overflow:visible!important;font-weight:400!important}

/* สมัครใช้งานจากลิงก์ชวน + คำขอรออนุมัติ */
.join{max-width:440px;margin:0 auto;padding:calc(env(safe-area-inset-top,0px) + 28px) 0 40px}
.join h1{margin:0;font-size:1.625rem;font-weight:500}
.join .ph-logo{display:block}
.join-photo{display:flex;flex-direction:column;align-items:center;gap:8px;margin:22px auto 6px;border:0;background:none;cursor:pointer;color:var(--text-2);font:inherit;font-size:0.8125rem}
.join-photo i{width:96px;height:96px;border-radius:50%;background:var(--card);color:var(--primary);display:flex;align-items:center;justify-content:center;overflow:hidden}
.join-photo i img{width:100%;height:100%;object-fit:cover}
.jrow{cursor:default}
.javatar{width:40px;height:40px;border-radius:50%;background:var(--card-2);color:var(--text-2);display:flex;align-items:center;justify-content:center;overflow:hidden;flex:none}
.javatar img{width:100%;height:100%;object-fit:cover}

/* หน้า "ฉัน" */
.profile{display:flex;align-items:center;gap:14px;padding:16px;border-radius:var(--radius);background:var(--card)}
.profile b{display:block;font-size:1.0625rem;font-weight:500}.profile small{font-size:0.8125rem;color:var(--text-2)}
.avatar{width:52px;height:52px;border-radius:50%;background:var(--primary-s);color:var(--primary);display:flex;align-items:center;justify-content:center;flex:none}
.avatar.sm{width:36px;height:36px;background:var(--card-2);color:var(--text-2)}
.sgroup{margin-top:20px;background:var(--card);border-radius:var(--radius);overflow:hidden}
.sgroup h4{margin:0;padding:12px 16px 4px;font-size:0.8125rem;font-weight:500;color:var(--text-2)}
.srow{width:100%;display:flex;align-items:center;gap:12px;padding:12px 16px;border:0;background:none;font:inherit;font-size:0.9375rem;text-align:left;cursor:pointer;min-height:54px;color:var(--text)}
.srow:not(.static):hover{background:var(--card-2)}
.srow+.srow,.theme-pick+.srow{border-top:1px solid var(--line)}
.srow>i{color:var(--text-2)}
.srow>span:not(.switch){flex:1}
.srow small{display:block;font-size:0.8125rem;color:var(--text-2)}
.srow>svg{color:var(--text-3)}
.srow.static{cursor:default;padding-bottom:4px;min-height:auto}
.theme-pick{display:flex;flex-wrap:wrap;gap:8px;padding:8px 16px 14px}
.theme-pick button{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;min-width:112px;min-height:44px;padding:6px 14px 6px 8px;border:1.5px solid var(--line);border-radius:12px;background:none;cursor:pointer;font:inherit;font-size:0.875rem}
.theme-pick button.on{border-color:var(--primary);color:var(--primary);font-weight:500}
.sw{width:32px;height:28px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex:none}
.sw-lang{background:var(--card-2);color:var(--text-2);font-size:0.75rem;font-weight:600;letter-spacing:.3px}
.sw-light{background:#E7F0FC;color:#0668D3}.sw-dark{background:#18212B;color:#E6EDF4}
.switch{width:44px;height:26px;border-radius:14px;background:var(--card-2);position:relative;flex:none;transition:background .15s}
.switch::after{content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform .15s}
.switch.on{background:var(--btn)}.switch.on::after{transform:translateX(18px)}
.about{display:flex;align-items:center;justify-content:center;gap:8px;margin:28px 0 0;font-size:0.8125rem;color:var(--text-2)}
.about img{border-radius:8px}

/* การ์ดทั่วไป */
.card{background:var(--card);border-radius:var(--radius);padding:16px;margin-bottom:10px}
.card h4{margin:0 0 10px;font-size:0.9375rem;font-weight:500;display:flex;align-items:center;gap:8px}
.card h4>svg{color:var(--text-2)}
.card .card{background:var(--card-2)}
.badges{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.tk-title{margin:10px 0 8px;font-size:1.1875rem;font-weight:500;line-height:1.4}
.card>.tk-title:first-child{margin-top:0}
.facts{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:0;font-size:0.875rem}
.facts dt{color:var(--text-2)}.facts dd{margin:0}
.hint{font-size:0.8125rem;color:var(--text-2);line-height:1.55}
.lead-hint{margin:0 0 10px;color:var(--text-2);font-size:0.875rem}
.int{display:inline-flex;align-items:center;gap:3px;font-size:0.75rem;font-weight:500;background:var(--card-2);color:var(--text-2);padding:2px 8px;border-radius:6px}
.row{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.row.end{justify-content:flex-end;margin-top:18px}
.row.center{justify-content:center;margin-top:8px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;font:inherit;font-size:0.875rem;font-weight:500;padding:10px 16px;min-height:44px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--text);cursor:pointer;transition:transform .08s,background .15s;text-decoration:none;white-space:nowrap}
.btn:hover{background:var(--card-2)}
.btn:active{transform:scale(.98)}
.btn.primary{background:var(--btn);border-color:var(--btn);color:var(--on-btn)}
.btn.primary:hover{background:var(--btn-d);border-color:var(--btn-d)}
.btn.soft{background:var(--primary-s);border-color:transparent;color:var(--primary)}
.btn.sm{padding:5px 12px;min-height:38px;font-size:0.8125rem;border-radius:10px}
.btn.block{width:100%;padding:14px;font-size:1rem;min-height:52px;border-radius:14px}
.btn.link{border:0;background:none;color:var(--text-2);text-decoration:underline;text-underline-offset:3px}
.btn.link:hover{color:var(--text);background:none}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn.ghost-red{color:var(--danger)}
:is(.btn,.tab,.tcard,.trow,.tile,.ibtn,.fold-btn,.srow,.fab,.tool-btn,.gimg,.mcard,.rg,.prow,.ttabs button,.theme-pick button):focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.lnk{color:var(--primary);cursor:pointer;text-decoration:underline}
.mcard{width:100%;display:flex;align-items:center;gap:12px;background:var(--card);border:0;border-radius:var(--radius);padding:12px 14px;cursor:pointer;font:inherit;text-align:left;margin:10px 0}
.mcard:hover{background:var(--card-2)}
.mcard>i{width:40px;height:40px;border-radius:12px;background:var(--card-2);color:var(--primary);display:flex;align-items:center;justify-content:center;flex:none}
.mcard.nudge>i{color:var(--gold)}
.mcard div{flex:1;min-width:0}.mcard b{display:block;font-size:0.9375rem;font-weight:500}.mcard small{color:var(--text-2);font-size:0.8125rem}
.mcard>svg{color:var(--text-3)}
.mcard.nudge{margin-top:18px}
.note{margin-top:18px;display:flex;gap:12px;padding:14px 16px;border-radius:var(--radius);background:var(--card);color:var(--text-2);font-size:0.8125rem;line-height:1.5}
.note b{display:block;font-size:0.875rem;font-weight:500;color:var(--text)}
.locked{display:flex;gap:10px;align-items:flex-start;font-size:0.875rem;color:var(--text-2);padding:12px 14px;background:var(--card-2);border-radius:12px;line-height:1.5}

/* สถานะงาน (ลูกค้า) */
.status-card .st-row{display:flex;align-items:center;gap:14px}
.st-ic{width:48px;height:48px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:var(--primary-s);color:var(--primary);flex:none}
.st-closed .st-ic{background:var(--ok-s);color:var(--ok)} .st-resolved .st-ic,.st-pending .st-ic{background:var(--warn-s);color:var(--warn)}
.status-card b{display:block;font-size:1.0625rem;font-weight:500;line-height:1.35}
.status-card small{display:block;font-size:0.8125rem;color:var(--text-2);margin-top:2px}
.techline{display:flex;align-items:center;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.techline b{font-size:0.875rem!important}.techline small{margin:0!important;font-size:0.8125rem!important}
.cprog{display:flex;gap:4px;margin:16px 0 4px}
.cp{flex:1;font-size:0.8125rem;color:var(--text-2);text-align:center}
.cp i{display:block;height:4px;border-radius:2px;background:var(--card-2);margin-bottom:6px}
.cp.done i{background:var(--primary)} .cp.now i{background:linear-gradient(90deg,var(--primary) 50%,var(--card-2) 50%)}
.cp.done,.cp.now{color:var(--text-2)}

/* ภาระงานทีม */
.load{display:flex;align-items:center;gap:12px;padding:9px 0}
.load+.load{border-top:1px solid var(--line)}
.lname{width:150px;flex:none}.lname b{display:block;font-size:0.875rem;font-weight:500}.lname small{font-size:0.8125rem;color:var(--text-2)}
.lbar{flex:1;height:6px;border-radius:4px;background:var(--card-2);overflow:hidden}
.lbar i{display:block;height:100%;background:var(--primary);border-radius:4px}
.lbar i.hi{background:var(--warn)}

/* หน้ารายละเอียด (sheet) */
.sheet{position:absolute;inset:0;background:var(--bg);z-index:30;display:flex;flex-direction:column;transform:translateX(100%);visibility:hidden;
  transition:transform .28s cubic-bezier(.2,.8,.2,1),visibility 0s linear .28s}
.sheet.open{transform:none;visibility:visible;transition:transform .28s cubic-bezier(.2,.8,.2,1),visibility 0s}
.sheet-bar{display:flex;align-items:center;gap:6px;padding:calc(env(safe-area-inset-top,0px) + 8px) 8px 8px;background:var(--bg)}
.sheet-bar h2{margin:0;font-size:1.0625rem;font-weight:500;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sheet-body{flex:1;overflow-y:auto;padding:4px 16px 40px;overscroll-behavior:contain}
.sheet .fold{margin-top:14px}

/* การสนทนา */
.thread{display:flex;flex-direction:column;gap:8px;max-height:52vh;overflow-y:auto;padding:2px;scrollbar-width:none}
.thread::-webkit-scrollbar{display:none}
/* ลูกศรบนสุดของแชท: โผล่เมื่อเลื่อนลงมาแล้วมีข้อความก่อนหน้าซ่อนอยู่ (ไม่รองรับ scroll-driven ก็ไม่แสดง) */
.thread::before{content:'▲';order:-1;position:sticky;top:0;height:0;align-self:center;font-size:0.75rem;line-height:1;color:var(--text-2);opacity:0;pointer-events:none;z-index:1;animation:more-up linear both;animation-timeline:scroll();animation-range:0 24px}
@keyframes more-up{to{opacity:1}}
.bubble{max-width:88%;align-self:flex-start;background:var(--card-2);border-radius:4px 14px 14px 14px;padding:9px 12px;font-size:0.875rem;line-height:1.55;overflow-wrap:anywhere}
:root[data-theme=light] .bubble{background:var(--bg)}
.bubble.me{align-self:flex-end;background:var(--primary-s);border-radius:14px 4px 14px 14px}
.bubble.internal{background:var(--internal-bg);border:1px dashed var(--internal-line)}
.bubble .meta{font-size:0.75rem;color:var(--text-2);margin-bottom:2px;display:flex;align-items:center;gap:3px;flex-wrap:wrap}
.bubble .gallery{margin-top:6px}
.btxt{white-space:pre-wrap}
.composer{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.seg{display:flex;background:var(--card-2);border-radius:12px;padding:3px;gap:3px;margin-bottom:6px}
.seg button{flex:1;display:flex;align-items:center;justify-content:center;gap:5px;border:0;background:none;border-radius:10px;padding:8px;font:inherit;font-size:0.8125rem;color:var(--text-2);cursor:pointer}
.seg button.on{background:var(--surface);color:var(--text);font-weight:500}
.composer.internal .seg button.on{color:var(--warn)}
.vis-hint{font-size:0.8125rem;color:var(--text-2);margin:0 2px 6px}
.composer.internal .vis-hint{color:var(--warn)}
.composer.internal textarea{background:var(--internal-bg);border-color:var(--internal-line)}
.crow{display:flex;align-items:center;gap:6px;margin-top:8px}
.crow .tool-btn{width:44px;padding:0}
.cbox{display:flex;gap:8px;align-items:flex-end}
.cbox textarea{flex:1}
.btn.send{width:44px;height:44px;padding:0;flex:none}
.cmt{padding:10px 0;border-bottom:1px solid var(--line);font-size:0.875rem;line-height:1.5}
.cmt:last-of-type{border:0}
.cmt .meta{font-size:0.75rem;color:var(--text-2);margin-bottom:3px}
/* ฟอนต์ 16px ป้องกัน iPhone ซูมหน้าจอเมื่อแตะช่องกรอก */
textarea,input,select{width:100%;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px 14px;font:inherit;font-size:1rem;color:var(--text)}
:root[data-theme=light] :is(textarea,input,select){background:var(--bg)}
.card :is(textarea,input,select){background:var(--surface)}
textarea{min-height:52px;resize:vertical;line-height:1.5}
textarea:focus,input:focus,select:focus{outline:none;border-color:var(--primary);background:var(--surface)}
.timeline{border-left:2px solid var(--line);margin:4px 0 0 6px;padding-left:16px}
.timeline>div{position:relative;padding:6px 0;font-size:0.875rem;line-height:1.5}
.timeline>div span{color:var(--text-2);font-size:0.8125rem}
.timeline>div b{font-weight:500}
.timeline>div::before{content:'';position:absolute;left:-22px;top:12px;width:10px;height:10px;border-radius:50%;background:var(--card-2);border:2px solid var(--card)}
.timeline>div:first-child::before{background:var(--primary)}
.reason{margin-top:4px;font-size:0.8125rem;background:var(--card-2);padding:6px 10px;border-radius:8px}

/* ---------- พิมพ์ด้วยเสียง / แนบรูป ---------- */
.voicebox{position:relative}
.voicebox textarea{display:block}
.listening-tag{display:none;align-items:center;gap:8px;margin-top:6px;font-size:0.8125rem;color:var(--danger);font-weight:500}
.listening-tag i{width:10px;height:10px;border-radius:50%;background:var(--danger);animation:pulse 1s infinite}
.voicebox.listening textarea{border-color:var(--danger);background:var(--surface)}
.voicebox.listening .listening-tag{display:flex}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(217,58,26,.45)}100%{box-shadow:0 0 0 10px rgba(217,58,26,0)}}
.tools{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.tools.big .tool-btn{flex:1;min-height:50px;font-size:0.9375rem}
.tool-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border:0;background:var(--card-2);color:var(--text);border-radius:12px;font:inherit;font-size:0.875rem;cursor:pointer}
:root[data-theme=light] .tool-btn{background:var(--bg)}
.tool-btn svg{color:var(--primary)}
.tool-btn span b{color:var(--text-2);font-weight:400}
.tool-btn:hover{background:var(--primary-s)}
.tool-btn.mic.on{background:var(--danger);color:#fff;animation:pulse 1s infinite}
.tool-btn.mic.on svg{color:#fff}
.thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.th{position:relative;width:76px;height:76px;border-radius:12px;overflow:hidden;background:var(--card-2)}
.th img{width:100%;height:100%;object-fit:cover}
.th button{position:absolute;top:4px;right:4px;width:26px;height:26px;border-radius:50%;border:0;background:rgba(0,0,0,.6);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:6px;margin-top:10px}
.gimg{padding:0;border:0;border-radius:10px;overflow:hidden;aspect-ratio:1;cursor:zoom-in;background:var(--card-2)}
.gimg img{width:100%;height:100%;object-fit:cover;display:block}
.lightbox{position:fixed;inset:0;z-index:120;background:rgba(0,0,0,.92);display:none;align-items:center;justify-content:center;padding:20px;cursor:zoom-out}
.lightbox.open{display:flex}
.lightbox img{max-width:100%;max-height:100%;border-radius:10px}
.lightbox .xbtn{position:absolute;top:calc(env(safe-area-inset-top,0px) + 14px);right:14px;background:rgba(255,255,255,.16);color:#fff;width:44px;height:44px}

/* ---------- Modal ---------- */
.modal{position:absolute;inset:0;z-index:50;display:flex;align-items:flex-end;pointer-events:none;visibility:hidden;transition:visibility 0s linear .26s}
.modal.open{transition:visibility 0s}
.modal-bg{position:absolute;inset:0;background:var(--scrim);opacity:0;transition:opacity .2s}
.modal-card{position:relative;width:100%;max-height:92%;overflow-y:auto;background:var(--surface);border-radius:20px 22px 0 0;padding:20px 18px calc(var(--sab) + 22px);
  transform:translateY(100%);transition:transform .26s cubic-bezier(.2,.8,.2,1);overscroll-behavior:contain}
.modal.open{pointer-events:auto;visibility:visible}.modal.open .modal-bg{opacity:1}.modal.open .modal-card{transform:none}
.mh{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.mh h3{margin:0;font-size:1.25rem;font-weight:500;flex:1}
.xbtn{width:40px;height:40px;border-radius:50%;border:0;background:var(--card-2);display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.modal-card>.btn.block{margin-top:16px}
.fl{display:block;font-size:0.875rem;font-weight:500;margin-top:14px}
.fl em{color:var(--danger)}
.fl>input,.fl>textarea,.fl>select{margin-top:6px}
label.fl+.voicebox{margin-top:6px}
.err{color:var(--danger);font-size:0.8125rem;margin-top:8px}
.err:empty{margin:0}
.catpick{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:6px}
.catpick input,.urg input{position:absolute;opacity:0}
.catpick span{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:10px;font-size:0.875rem;font-weight:400;cursor:pointer}
.catpick span svg{color:var(--text-2)}
.catpick input:checked+span,.urg input:checked+span{border-color:var(--primary);background:var(--primary-s);font-weight:500}
.catpick input:focus-visible+span,.urg input:focus-visible+span{outline:2px solid var(--primary)}
.urg{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:6px}
.urg span{display:flex;flex-direction:column;align-items:center;text-align:center;border:1px solid var(--line);border-radius:12px;padding:8px 4px;cursor:pointer;height:100%}
.urg b{font-size:0.8125rem;font-weight:500}.urg small{font-size:0.75rem;color:var(--text-2);font-weight:400;line-height:1.3}
.urgent-toggle{display:flex;align-items:center;gap:12px;margin-top:14px;border:1px solid var(--line);border-radius:14px;padding:12px 14px;cursor:pointer;min-height:56px}
.urgent-toggle input{width:22px;height:22px;margin:0;accent-color:var(--danger);flex:none}
.urgent-toggle b{display:block;font-size:0.9375rem;font-weight:500}.urgent-toggle small{font-size:0.8125rem;color:var(--text-2)}
.urgent-toggle:has(input:checked){border-color:var(--danger)}
.urgent-toggle:has(input:checked) b{color:var(--danger)}
.opts{display:flex;flex-direction:column;gap:8px}
.opt{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;padding:12px;cursor:pointer}
.opt:has(input:checked){border-color:var(--primary);background:var(--primary-s)}
.opt input{width:20px;height:20px;accent-color:var(--primary);margin:0;flex:none}
.opt b{font-size:0.9375rem;font-weight:500}.opt small{display:block;font-size:0.8125rem;color:var(--text-2)}
.tagok{font-size:0.75rem;background:var(--ok-s);color:var(--ok);padding:1px 7px;border-radius:6px;font-weight:500}
.two{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
@media(max-width:400px){.two{grid-template-columns:1fr}}
.divider{margin:18px 0 0;padding-top:12px;border-top:1px solid var(--line);font-size:0.8125rem;font-weight:500;color:var(--text-2)}

/* หน้าจอสำเร็จ / ให้คะแนน */
.done{text-align:center;padding:8px 0 4px}
.done-ic{width:72px;height:72px;margin:6px auto 12px;border-radius:50%;background:var(--ok);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 10px var(--ok-s);animation:pop .35s cubic-bezier(.2,.8,.2,1)}
@keyframes pop{from{transform:scale(.4);opacity:0}to{transform:none;opacity:1}}
.done h3{margin:0;font-size:1.3125rem;font-weight:500}
.done p{margin:6px 0 0;font-size:0.9375rem}
.next-steps{list-style:none;margin:18px 0 0;padding:14px;background:var(--card);border-radius:14px;display:flex;flex-direction:column;gap:10px;font-size:0.875rem}
.next-steps li{display:flex;align-items:center;gap:10px;color:var(--text-2)}
.next-steps li i{width:26px;height:26px;border-radius:50%;background:var(--surface);border:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:0.75rem;font-weight:600;flex:none}
.next-steps li.on{color:var(--text);font-weight:500}.next-steps li.on i{background:var(--ok);border-color:var(--ok);color:#fff}
.rate-box{text-align:center;margin-top:18px;padding:16px;border-radius:16px;background:var(--card)}
.rate-box>b{font-size:1rem;font-weight:500}
.stars{display:flex;justify-content:center;gap:4px;margin-top:10px}
.stars button{border:0;background:none;padding:4px;cursor:pointer;color:var(--text-3);border-radius:10px;transition:transform .1s}
.stars button:hover{transform:scale(1.1)}
.stars button.on{color:var(--gold)}.stars button.on svg{fill:var(--gold)}
.rate-label{font-size:0.875rem;font-weight:500;color:var(--text-2);min-height:22px;margin-top:2px}
.rate-box textarea{margin-top:10px;background:var(--surface)}
.stars-sm{display:inline-flex;gap:1px;vertical-align:middle;color:var(--card-2)}
.stars-sm i.on{color:var(--gold)}.stars-sm i.on svg{fill:var(--gold)}
.rating-card{display:flex;align-items:center;gap:12px}
.rating-card b{display:block;font-size:0.9375rem;font-weight:500}.rating-card small{font-size:0.8125rem;color:var(--text-2)}

/* รายชื่อผู้ใช้ */

/* ผู้ใช้/สิทธิ์ */
.urow{display:flex;align-items:center;gap:10px;padding:9px 0}
.urow+.urow{border-top:1px solid var(--line)}
.urow b{display:block;font-size:0.875rem;font-weight:500}.urow small{font-size:0.8125rem;color:var(--text-2)}
.role-chip{display:inline-flex;align-items:center;gap:4px;font-size:0.75rem;padding:2px 8px;border-radius:6px;white-space:nowrap;background:var(--card-2);color:var(--text-2)}
.tblwrap{overflow-x:auto;padding:8px}
.matrix{border-collapse:collapse;width:100%;font-size:0.8125rem}
.matrix th,.matrix td{padding:8px 4px;text-align:center;border-bottom:1px solid var(--line)}
.matrix tbody th{text-align:left;font-weight:400;padding-left:8px}
.matrix thead th{vertical-align:bottom}
.matrix thead .role-chip{font-size:0.75rem;white-space:normal}
.matrix td small{font-size:0.75rem;color:var(--text-2)}
.matrix .yes svg{margin:auto;color:var(--ok)}.matrix .nope{color:var(--text-ph)}

/* แผนที่จำลอง */
.mapwrap{position:relative;height:200px;border-radius:12px;overflow:hidden;
  background:linear-gradient(90deg,transparent 48%,var(--map-road) 48%,var(--map-road) 52%,transparent 52%) 0 0/120px 100%,linear-gradient(0deg,transparent 46%,var(--map-road) 46%,var(--map-road) 54%,transparent 54%) 0 0/100% 90px,var(--map-bg)}
.mapwrap svg.route{position:absolute;inset:0;width:100%;height:100%}
.route path{stroke:var(--primary)}
.pin-dest{position:absolute;transform:translate(-50%,-100%);color:var(--danger)}
.dot{position:absolute;width:18px;height:18px;border-radius:50%;background:var(--primary);border:3px solid var(--surface);transform:translate(-50%,-50%);box-shadow:0 0 0 8px var(--primary-s);transition:left .6s linear,top .6s linear}
.steps{display:flex;justify-content:space-between;margin:16px 0 4px;position:relative}
.steps::before{content:'';position:absolute;left:10%;right:10%;top:8px;height:2px;background:var(--line)}
.step{position:relative;z-index:1;flex:1;text-align:center;font-size:0.75rem;color:var(--text-2)}
.step i{display:block;width:18px;height:18px;border-radius:50%;background:var(--card);border:2px solid var(--line);margin:0 auto 5px}
.step.done i{background:var(--primary);border-color:var(--primary)} .step.now i{border-color:var(--primary);box-shadow:0 0 0 4px var(--primary-s)}
.step.now,.step.done{color:var(--text-2)}

/* Audit */
.auditline{display:flex;gap:10px;font-size:0.875rem;padding:10px 0;border-bottom:1px solid var(--line);line-height:1.5}
.auditline:last-child{border:0}
.auditline b{font-weight:500}.auditline span{color:var(--text-2)}.auditline small{color:var(--text-2);font-size:0.75rem}
.role-dot{width:8px;height:8px;border-radius:50%;background:var(--c,var(--text-3));flex:none;margin-top:7px}

.toast{position:absolute;left:50%;bottom:96px;transform:translate(-50%,20px);background:var(--toast-bg);color:var(--toast-text);padding:11px 20px;border-radius:999px;font-size:0.875rem;opacity:0;pointer-events:none;transition:.25s;z-index:130;white-space:nowrap;max-width:90%;overflow:hidden;text-overflow:ellipsis;box-shadow:var(--shadow)}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.tap{pointer-events:auto;cursor:pointer}

/* ---------- ใบรายงาน / เซ็นรับงาน ---------- */
.rsum{margin:10px 0 8px;font-size:0.875rem;line-height:1.6}
.rmeta{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:0.8125rem;color:var(--text-2);margin-top:8px}
.rmeta span{display:inline-flex;align-items:center;gap:4px}
.card.attn{box-shadow:inset 0 0 0 1.5px var(--primary)}
.signed{display:flex;align-items:center;gap:12px;margin-top:12px;padding:10px;border:1px dashed var(--line);border-radius:12px}
.signed img{width:120px;height:44px;object-fit:contain;background:#fff;border-radius:6px;flex:none}
.signed b{display:block;font-size:0.875rem;font-weight:500}.signed small{font-size:0.75rem;color:var(--text-2)}
.sitebox{display:flex;gap:10px;align-items:flex-start;padding:12px;background:var(--card-2);border-radius:12px}
:root[data-theme=light] .sitebox{background:var(--bg)}
.sitebox>i{color:var(--text-2);margin-top:2px}
.sitebox>div{flex:1;min-width:0}.sitebox b{display:block;font-size:0.875rem;font-weight:500}.sitebox small{display:block;font-size:0.8125rem;color:var(--text-2);line-height:1.5}
.note-sm{display:flex;align-items:center;gap:8px;background:var(--card);font-size:0.8125rem;font-weight:500;padding:9px 12px;border-radius:12px;margin-bottom:10px}
.mini-report{background:var(--card);border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:4px}
.mini-report b{font-size:0.9375rem;font-weight:500}.mini-report small{font-size:0.8125rem;color:var(--text-2)}
.mr-head{display:flex;justify-content:space-between;font-size:0.75rem;color:var(--text-2)}
.mr-sum{font-size:0.875rem;background:var(--surface);border-radius:10px;padding:8px 10px;margin:4px 0;line-height:1.55}
/* ช่องเซ็นเป็นกระดาษสีขาวทุกโหมด */
.sigwrap{position:relative;margin-top:6px;height:170px;border:1.5px dashed var(--line);border-radius:14px;background:#fff;overflow:hidden}
.sigwrap::after{content:'';position:absolute;left:16px;right:16px;bottom:38px;border-bottom:1px solid #E2E7EE;pointer-events:none}
.sigwrap canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair;z-index:1}
.sig-ph{position:absolute;left:0;right:0;top:44%;text-align:center;color:#A3ACB7;font-size:0.875rem;pointer-events:none}
.sigwrap.inked .sig-ph{display:none}
.sigwrap.inked{border-style:solid;border-color:var(--primary)}
.sig-clear{position:absolute;right:8px;top:8px;z-index:2;display:flex;align-items:center;gap:4px;border:1px solid #E2E7EE;background:#fff;border-radius:999px;padding:6px 12px;font:inherit;font-size:0.8125rem;color:#5E6875;cursor:pointer}
.agree-txt{margin:12px 0 0;font-size:0.8125rem;color:var(--text-2);text-align:center}

/* ---------- รายงานสรุป ---------- */
.filters{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.filters label span{display:block;font-size:0.8125rem;color:var(--text-2);margin-bottom:4px}
.filters select{padding:10px;background:var(--card)}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:8px}
.kpis.in-sheet{margin-bottom:4px;grid-template-columns:repeat(4,1fr)}
.kpi{background:var(--card);border-radius:14px;padding:12px 4px;text-align:center}
.kpi b{display:block;font-size:1.25rem;line-height:1.2;white-space:nowrap;font-weight:500}.kpi span{font-size:0.75rem;color:var(--text-2);line-height:1.3;display:block}
.prow{width:100%;display:flex;align-items:center;gap:10px;background:none;border:0;padding:10px 0;font:inherit;text-align:left;cursor:pointer}
.prow+.prow{border-top:1px solid var(--line)}
.prow>i{color:var(--text-2)}
.prow>div{flex:1;min-width:0}.prow b{display:block;font-size:0.875rem;font-weight:500}.prow small{font-size:0.8125rem;color:var(--text-2)}
.rrow{display:flex;align-items:center;gap:10px;padding:10px 0}
.rrow+.rrow{border-top:1px solid var(--line)}
.rr-main{flex:1;min-width:0;cursor:pointer}
.rr-top{display:flex;justify-content:space-between;font-size:0.75rem;color:var(--text-2)}
.rr-main b{display:block;font-size:0.875rem;font-weight:500;margin:2px 0}
.rr-main small{display:block;font-size:0.8125rem;color:var(--text-2);margin-bottom:4px}

/* ---------- พาร์ทเนอร์ ---------- */
.card.site .site-head{display:flex;align-items:center;gap:8px}
.card.site .site-head i{color:var(--text-3)}.card.site .site-head b{flex:1;font-size:0.9375rem;font-weight:500}
.addr{margin:6px 0 4px;font-size:0.875rem;line-height:1.55}
.card.site .row{margin-top:10px}

/* ---------- เอกสารพิมพ์ได้ (กระดาษขาวทุกโหมด) ---------- */
.doc{position:fixed;inset:0;z-index:100;background:var(--bg);display:none;flex-direction:column}
.doc.open{display:flex}
.doc-bar{display:flex;align-items:center;gap:8px;padding:calc(env(safe-area-inset-top,0px) + 8px) 12px 8px 8px;background:var(--bg);font-size:0.9375rem}
.doc-bar b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.doc-scroll{flex:1;overflow:auto;padding:8px 12px 48px}
.paper{background:#fff;max-width:794px;margin:0 auto;padding:36px 40px;box-shadow:var(--shadow);border-radius:4px;font-size:0.7813rem;color:#111827;line-height:1.5;color-scheme:light}
.p-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:2px solid var(--brand-blue)}
.p-logo{width:150px;height:auto}
.p-title{text-align:right}
.p-title h1{margin:0;font-size:1.25rem;font-weight:600;color:var(--brand-blue)}
.p-title>small{display:block;color:#6B7280;font-size:0.6875rem;letter-spacing:.5px;text-transform:uppercase}
.p-no{font-size:0.75rem;margin-top:2px}
.paper h2{font-size:0.8438rem;font-weight:600;color:#111827;margin:18px 0 6px}
.p-grid{width:100%;border-collapse:collapse;margin-top:12px}
.p-grid th,.p-grid td{border:1px solid #DDE2E8;padding:6px 9px;text-align:left;vertical-align:top}
.p-grid th{background:#F5F7FA;font-weight:600;width:18%;white-space:nowrap}
.p-grid small{color:#4B5563}
.p-text{border:1px solid #DDE2E8;padding:10px 12px;margin:0;min-height:56px;white-space:pre-wrap}
.p-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.p-photos img{width:100%;aspect-ratio:4/3;object-fit:cover;border:1px solid #DDE2E8}
.p-signs{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-top:28px;page-break-inside:avoid}
.p-sign{text-align:center;display:flex;flex-direction:column;align-items:center;gap:2px}
.p-sigbox{width:100%;height:84px;border-bottom:1px solid #374151;display:flex;align-items:flex-end;justify-content:center;padding-bottom:4px}
.p-sigbox img{max-width:100%;max-height:78px}
.p-sigbox.typed{font-size:1.125rem;font-style:italic;color:#374151;font-weight:500}
.p-wait{color:#9CA3AF;font-size:0.75rem;margin-bottom:24px}
.p-sign b{margin-top:6px;font-weight:600}.p-sign small{font-size:0.6875rem;color:#4B5563}.p-sign small.muted{color:#9CA3AF;font-size:0.625rem}
.p-note{margin-top:14px;font-size:0.7188rem;background:#FFF7E6;border:1px solid #F5D9A8;padding:8px 10px}
.p-foot{margin-top:28px;padding-top:8px;border-top:1px solid #E5E7EB;font-size:0.625rem;color:#9CA3AF;text-align:center}
.p-table{width:100%;border-collapse:collapse;font-size:0.7188rem}
.p-table th{background:#F5F7FA;color:#111827;font-weight:600;padding:6px;text-align:left;border-bottom:2px solid #DDE2E8}
.p-table td{border-bottom:1px solid #E5E7EB;padding:6px;vertical-align:top}
.p-table small{color:#4B5563}
.p-table .c{text-align:center}
@media(max-width:600px){
  .doc-scroll{padding:6px 8px 40px}
  .paper{padding:18px 14px;font-size:0.75rem}
  .p-head{flex-direction:column;gap:8px}.p-title{text-align:left}
  .p-logo{width:120px}.p-title h1{font-size:1.0625rem}
  .p-grid tr{display:grid;grid-template-columns:34% 66%}
  .p-grid th{width:auto;white-space:normal}
  .p-signs{gap:14px}
  .p-photos{grid-template-columns:repeat(2,1fr)}
  .p-table{font-size:0.6563rem}
}

/* =========================================================
   คอมพิวเตอร์ (≥960px): เมนูซ้าย · เนื้อหากว้าง · รายละเอียดเป็นแผงขวา · ฟอร์มกลางจอ
   ========================================================= */
@media (min-width:960px){
  .fold[data-fold="tk-status"] .fold-h{display:none}
  .fold[data-fold="tk-status"] .fold-b{display:block}
  .tbar-tk .ttabs{display:none}
  .side-filters{display:flex;flex-direction:column;gap:2px;margin:18px 10px 0;padding-top:14px;border-top:1px solid var(--line)}
  .side-filters button{display:flex;align-items:center;justify-content:space-between;gap:8px;border:0;background:none;padding:9px 12px;border-radius:10px;font:inherit;font-size:0.875rem;color:var(--text-2);cursor:pointer;text-align:start}
  .side-filters button:hover{background:var(--card-2)}
  .side-filters button.on{background:var(--primary-s);color:var(--primary);font-weight:600}
  .side-filters b{font-size:0.75rem;font-weight:600;background:var(--card-2);border-radius:999px;padding:1px 8px}
  body{background:var(--bg)}
  .shell{max-width:none;margin:0;display:grid;grid-template-columns:232px minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
  .tabbar{position:relative;grid-row:1;grid-column:1;flex-direction:column;justify-content:flex-start;gap:2px;padding:24px 12px;background:var(--surface);border-top:0;border-right:1px solid var(--line);overflow-y:auto;z-index:5}
  :root[data-theme=light] .tabbar{background:var(--card)}
  .side-brand{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin:0 10px 26px}
  .side-brand img{width:130px;height:auto;border-radius:6px}
  :root[data-theme=dark] .side-brand img{background:#fff;padding:4px 8px}
  .side-brand small{font-size:0.75rem;color:var(--text-2);letter-spacing:.4px;text-transform:uppercase}
  .tab{flex:none;flex-direction:row;gap:12px;font-size:0.9375rem;padding:9px 12px;border-radius:10px;justify-content:flex-start;min-height:44px}
  .tab:hover{background:var(--card-2);color:var(--text)}
  .tab.on{background:var(--primary-s);color:var(--primary);font-weight:500}
  .tab:last-child{margin-top:auto}
  .scroll{grid-row:1;grid-column:2;padding:0 32px 64px}
  .shell.joining{grid-template-columns:minmax(0,1fr)} .shell.joining .scroll{grid-column:1}
  .page{max-width:1080px;margin:0 auto}
  .phead{padding-top:30px;padding-bottom:18px}
  .ph-t h1{font-size:1.875rem}
  .ph-logo{display:none}
  .tiles{grid-template-columns:repeat(auto-fill,minmax(150px,180px))}
  .list{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px}
  .list.dense{display:flex}
  .sheet-bg{display:block;position:fixed;inset:0;background:var(--scrim);z-index:29;opacity:0;pointer-events:none;transition:opacity .2s}
  .sheet-bg.on{opacity:1;pointer-events:auto}
  .sheet{position:fixed;inset:0 0 0 auto;width:min(640px,100vw);transform:translateX(100%);box-shadow:var(--shadow)}
  .sheet.open{transform:none}
  .sheet-bar{padding:14px 16px 6px}
  .sheet-body{padding:4px 24px 48px}
  .sheet .list{display:flex}
  .modal{position:fixed;align-items:center;justify-content:center}
  .modal-card{width:min(540px,calc(100vw - 48px));border-radius:20px;max-height:88vh;padding:24px 26px 26px;transform:translateY(12px) scale(.98);opacity:0;transition:transform .2s,opacity .2s}
  .modal.open .modal-card{transform:none;opacity:1}
  .fab{position:fixed;right:32px;bottom:32px;width:auto;height:54px;padding:0 22px 0 18px;border-radius:27px;font-size:1rem;font-weight:500}
  .fab span{display:inline}
  .toast{position:fixed;bottom:32px;left:50%}   /* งาน/ร้องเรียน: กลางจอด้านล่าง (แชทอยู่ด้านบนขวา) */
  .filters{max-width:640px}
  .kpis{grid-template-columns:repeat(5,1fr)}
  .profile,.sgroup{max-width:640px}
  .about{max-width:640px;justify-content:flex-start}
  .rolegrid{max-width:720px}
}
@media (min-width:1400px){ .list:not(.dense){grid-template-columns:repeat(auto-fill,minmax(340px,1fr))} }

@media print{
  @page{size:A4;margin:12mm}
  html,body{height:auto;background:#fff!important}
  .shell,.lightbox{display:none!important}
  .doc{position:static;display:block!important;background:#fff}
  .doc-bar{display:none}
  .doc-scroll{padding:0;overflow:visible}
  .paper{box-shadow:none;max-width:none;margin:0;padding:0}
  .p-grid tr{display:table-row!important}
  .p-head{flex-direction:row!important}.p-title{text-align:right!important}
  .p-table th,.p-grid th{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
/* สีสถานะตามความสำคัญ: ต้องมอบหมาย (แดง) > กำลังทำ (น้ำเงิน) > รอเซ็นรับ (ส้ม) > พักงาน (เทา) · ปิดแล้ว (เขียว) */
.ttabs button[data-k=new],.side-filters button[data-k=new]{color:var(--danger)}
.ttabs button[data-k=active],.ttabs button[data-k=todo],.side-filters button[data-k=active],.side-filters button[data-k=todo]{color:var(--primary)}
.ttabs button[data-k=resolved],.side-filters button[data-k=resolved]{color:var(--warn)}
.ttabs button[data-k=pending],.side-filters button[data-k=pending]{color:var(--text-2)}
.ttabs button[data-k=closed],.side-filters button[data-k=closed]{color:var(--ok)}
.ttabs button.on,.side-filters button.on{color:var(--primary)}

/* มือถือ: หัวหน้าแถวเดียว ชื่อหน้าซ้าย กระดิ่ง/ค้นหาขวา · ภาษากับโหมดสีย้ายไปหน้า ฉัน · ชื่อยาวตัดเหลือ 2 บรรทัด */
@media (max-width:599px){.ph-t h1{font-size:1.3125rem}.ph-t h1{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}}

/* หน้าแรกลูกค้าแบบสะอาด: ทางลัดแถวเดียว และหัวข้อรายการพร้อมลิงก์ดูทั้งหมด */
.tiles.compact{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-width:560px;margin-bottom:6px}
.tiles.compact .tile{min-height:84px;padding:12px 4px;gap:6px;font-size:.8125rem}
.sec-h{display:flex;align-items:center;justify-content:space-between;margin:22px 0 6px}
.sec-h h2{margin:0;font-size:1.0625rem;font-weight:500}
.sec-h button{background:none;border:0;color:var(--primary);font:inherit;font-size:.875rem;min-height:44px;padding:0 4px;cursor:pointer}

/* ===== สไตล์กลางแบบ Huawei / Hik: พื้นเทาอ่อน การ์ดมน หัวข้อใหญ่ ชิปแคปซูล ไอคอนในกรอบสีอ่อน ===== */
:root,:root[data-theme=light]{--bg:#F2F4F7;--card-2:#F3F5F8;--radius:20px}
.ph-t h1{font-size:1.5rem;font-weight:600;letter-spacing:-.01em;line-height:1.25}
.phead{padding-top:calc(env(safe-area-inset-top,0px) + 14px)}
/* ชิปตัวกรอง: แคปซูล เลือก = พื้นอ่อนสีหลัก */
.tchips{background:none;padding:0;gap:8px;margin-bottom:12px}
.tchips button{flex:0 0 auto;border-radius:999px;background:var(--card-2);color:var(--text-2);padding:8px 16px}
.tchips button.on{background:var(--primary-s);color:var(--primary);font-weight:600}
/* การ์ดและรายการ: มนขึ้น ไม่มีเส้นขอบ ช่องไฟโปร่ง */
.tcard{border-radius:20px;padding:16px}
.list{gap:12px}
.card{border-radius:20px}
/* ทางลัด: ไอคอนอยู่ในกรอบสีอ่อน */
.tile i{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:14px;background:var(--primary-s)}
.tiles.compact .tile{min-height:92px}
/* ช่องกรอกและปุ่มหลัก */
textarea,input,select{border-radius:14px}
.btn.primary.block{border-radius:999px}
/* ปุ่มลอยเงานุ่ม */
.fab{box-shadow:0 8px 20px -8px rgba(15,35,65,.35)}
/* เมนูล่าง: ตัวที่เลือกมีพื้นแคปซูลหลังไอคอน */
.tab.on i{background:var(--primary-s);border-radius:999px;padding:2px 16px}
.tab i{display:flex;align-items:center;justify-content:center;padding:2px 16px}

/* มือถือ: ชื่อหน้าเล็กลง (ต้องอยู่ท้ายไฟล์เพื่อทับสไตล์กลาง) */
@media (max-width:599px){.ph-t h1{font-size:1.25rem}}

/* หน้าแรกช่าง: ตัวเลขสรุป 3 ช่องเสมอ */
.tech-kpis{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:4px}

/* หน้า "ฉัน": การ์ดโปรไฟล์กลางหน้า + การแสดงผลพับเก็บไว้ */
.me-card{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center;padding:22px 16px 18px;border-radius:var(--radius);background:var(--card)}
.me-card b{margin-top:10px;font-size:1.1875rem;font-weight:500}
.me-card small{font-size:.8125rem;color:var(--text-2);overflow-wrap:anywhere}
.me-card .btn{margin-top:14px}
.me-card+.sgroup{margin-top:14px}

/* งานบนมือถือ: สถานะเป็นแถวเลื่อนแคปซูลเล็ก และการ์ดงานกะทัดรัดขึ้น */
@media (max-width:959px){
  .ttabs{display:flex;gap:6px;overflow-x:auto;padding:0 0 2px;margin-bottom:4px}
  .ttabs button{flex:none;min-height:34px;padding:4px 12px;border-radius:999px;background:var(--card);font-size:0.8125rem;display:inline-flex;align-items:center;gap:4px}
  .ttabs button.on{background:var(--primary-s);color:var(--primary);font-weight:600}
  .ttabs button sup{margin:0;padding:0 5px;font-size:0.75rem;background:var(--card-2);border-radius:999px;vertical-align:middle;line-height:1.6}
  .tcard{padding:12px}
  .tcard .tc-ic{width:34px;height:34px;border-radius:10px}
  .tc-h{gap:10px}
  .tc-t b{font-size:0.9375rem}
  .tc-f{margin:8px 0 0 44px;gap:5px}
  .tcard .btn.sm{min-height:34px;padding:4px 10px}
}

/* แถวงานบนหน้าหลักช่าง: ไอคอนหรือรูปลูกค้าขนาดเล็ก */
.card .trow .tc-ic{width:32px;height:32px;border-radius:10px;flex:none}

/* การ์ดงานบนมือถือ: บรรทัดเดียวต่อหัวข้อ ตัวอักษรเล็กลง ป้ายเล็กลง */
@media (max-width:959px){
  .tcard{padding:10px 12px;border-radius:16px}
  .tcard .tc-ic{width:30px;height:30px;border-radius:10px}
  .tc-h{gap:10px;align-items:center}
  .tc-t b{font-size:0.9375rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tc-t small{font-size:0.75rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tc-f{margin:6px 0 0 40px;gap:4px}
  .tag{font-size:0.75rem;padding:1px 6px}
  .pill,.sbadge{font-size:0.75rem;padding:1px 7px 1px 6px}
  .tcard .btn.sm{min-height:32px;padding:3px 10px;font-size:0.75rem}
}

/* เช็กลิสต์ MA ในฟอร์มทำเสร็จ: แถวละอุปกรณ์ บนมือถือเรียงลงมา */
.ma-box{padding:10px 12px;margin-bottom:8px;display:flex;flex-direction:column;gap:8px}
.ma-row{display:flex;flex-direction:column;gap:4px}
.ma-row label{display:flex;align-items:center;gap:8px;font-size:0.875rem}
.ma-row input[type=text],.ma-row input:not([type]){padding:6px 10px}
.ma-chk{display:flex;flex-wrap:wrap;gap:12px;font-size:0.8125rem}
.ma-chk label{display:flex;align-items:center;gap:4px}

/* การ์ดงานบนมือถือ รอบที่สอง: เล็กลงอีก */
@media (max-width:959px){
  .tcard{padding:8px 10px}
  .tcard .tc-ic{width:26px;height:26px;border-radius:8px}
  .tc-h{gap:8px}
  .tc-t b{font-size:0.875rem}
  .tc-t small{margin-top:0}
  .tc-f{margin:4px 0 0 34px;gap:3px}
  .tcard .btn.sm{min-height:28px;padding:2px 8px;font-size:0.75rem}
}

/* ทั้งเว็บบนมือถือ — รอบจัดระเบียบ: ระยะ ขนาด และหัวข้อให้โล่งสบายตา */
@media (max-width:959px){
  /* หัวข้อส่วน: ไม่ตัดบรรทัด ตัวนับอยู่ข้างหัวข้อ */
  .sec-h{margin:16px 0 6px}
  .sec-h h2{font-size:1rem;white-space:nowrap;display:flex;align-items:center;gap:6px}
  .sec-h button{font-size:0.8125rem;white-space:nowrap;min-height:32px}
  .cnt{font-size:0.75rem;padding:0 7px;line-height:1.6}
  /* แถวในการ์ด: ไม่มีพื้นเทาซ้อน ระยะน้อยลง */
  .card .trow{padding:8px 0;min-height:0;gap:10px}
  .card .trow+.trow{border-top:1px solid var(--line)}
  .card .tr-m b{font-size:0.875rem}
  .card .tr-m small{font-size:0.75rem;line-height:1.35}
  /* ช่องสถานะงาน: แคปซูลเล็กลง */
  .ttabs button{min-height:30px;padding:3px 10px;font-size:0.8125rem}
  .fold[data-fold="tk-status"] .fold-h{display:none}
  .fold[data-fold="tk-status"] .fold-b{display:block}
  /* การ์ดเมนูลัด */
  .mcard{padding:10px 12px;margin:8px 0;border-radius:16px}
  .mcard>i{width:34px;height:34px;border-radius:10px}
  .mcard b{font-size:0.875rem}
  .mcard small{font-size:0.75rem}
  .card{padding:12px;border-radius:16px;margin-bottom:8px}
}

/* ทางลัด: เอากรอบนอกออก เหลือแค่กล่องไอคอนสี */
.tile{background:none}
.tile:hover{background:none}
.tiles.compact .tile{padding:4px 2px;min-height:0}

/* รายละเอียดงานและหน้า "ฉัน" บนมือถือ: ตัวอักษรและระยะเล็กลง ไม่ตัดหลายบรรทัด */
@media (max-width:959px){
  .status-card{padding:12px}
  .status-card .st-row{gap:10px}
  .status-card .st-row>i{width:36px;height:36px;border-radius:10px;flex:none}
  .status-card b{font-size:0.9375rem}
  .status-card small{font-size:0.75rem}
  .cprog{gap:3px;margin:12px 0 2px}
  .cp{font-size:0.75rem;line-height:1.25;text-align:center}
  .cp span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
  .sheet-bar h2{font-size:1rem}
  .srow{min-height:46px;padding:8px 12px;font-size:0.875rem;gap:10px}
  .srow small{font-size:0.75rem}
  .sgroup{margin-top:12px}
  .sgroup h4{padding:10px 12px 2px;font-size:0.75rem}
}

/* ขั้นตอนงานบนมือถือ: ช่องเท่ากันทุกขั้น ชื่อขั้นตัดลงบรรทัดใหม่ได้ ไม่ทับกัน */
@media (max-width:959px){
  .cprog{gap:6px}
  .cp{flex:1 1 0;min-width:0}
  .cp span{white-space:normal;overflow:visible;text-overflow:clip;font-size:0.75rem;line-height:1.25}
}

/* การ์ดสถานะลูกค้าบนมือถือ: เล็กลง ชื่อช่างมุมขวาบน */
@media (max-width:959px){
  .status-card{position:relative;padding:10px 12px}
  .status-card .st-row{gap:10px;padding-right:0}
  .st-ic{width:34px;height:34px;border-radius:10px}
  .status-card b{font-size:0.875rem}
  .status-card small{font-size:0.75rem}
  .st-who{position:absolute;top:8px;right:10px;display:flex;align-items:center;gap:4px;font-size:0.75rem;color:var(--text-2)}
  .cprog{margin:8px 0 0}
  .cp{font-size:0.6875rem}
  .cp i{height:3px;margin-bottom:4px}
  .fold[data-fold="d-info"] .facts{font-size:0.8125rem}
}

/* ชื่อช่างอยู่ในแถวเดียวกับสถานะ (ไม่ลอยทับ): ข้อความสถานะยืดได้ ชื่อช่างเล็กชิดขวา ตัดด้วย … */
.status-card .st-t{flex:1;min-width:0}
.status-card .st-row{align-items:flex-start}
.status-card .st-who{position:static;flex:none;max-width:36%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;color:var(--text-2);margin:2px 0 0;text-align:right}

/* ฐานตัวอักษรมือถือลดเป็น 16px แล้ว — ตัวเล็กสุดต้องไม่ต่ำกว่า 11px */
@media (max-width:959px){ .cp,.cp span{font-size:0.75rem} }

/* ตัวอักษรเล็กสุดบนมือถือไม่ต่ำกว่า 0.75rem (~11px) แม้ฐานสเกลลงตามจอ */
@media (max-width:959px){
  .tag,.pill,.sbadge,.cp,.cp span,.st-who,.cnt,.card .tr-m small,.mcard small,.srow small,.tc-t small,.status-card small{font-size:0.75rem}
}

/* หน้างาน: ไม่เว้นช่องว่างเหนือแถบสถานะ (หัวข้อพับถูกซ่อนบนมือถือแล้ว) */
@media (max-width:959px){
  .fold[data-fold="tk-status"]{margin-top:2px}
  .fold[data-fold="tk-status"] .fold-b{padding-top:0}
  .tbar{margin:0 0 8px}
}

/* ทางลัดหน้าหลัก: แถวเดียวทุกบทบาทและทุกความกว้าง (เดิมบางช่วงจอเป็น 2 คอลัมน์ ช่องว่างกว้างผิดปกติ) */
.tiles{grid-template-columns:repeat(auto-fit,minmax(84px,1fr));max-width:560px;gap:8px;margin-bottom:10px}
.tile{white-space:normal;min-height:0;padding:6px 2px}

/* ทางลัด: จำนวนช่องเท่ากับจำนวนปุ่มเสมอ (--n จาก tiles()) — จอแคบหรือซูมสูงก็ยังเป็นแถวเดียว ป้ายชื่อตัดบรรทัดแทน */
.tiles,.tiles.compact{grid-template-columns:repeat(var(--n,4),minmax(0,1fr))}
.tile{min-width:0;overflow-wrap:anywhere}
.tile i{width:40px;height:40px;border-radius:12px}
/* ตัวเลือกประเภทงาน (งานบริการ / ร้องเรียน): เตี้ยลง */
.tchips{margin-bottom:8px}
.tchips button{padding:6px 14px;min-height:36px;font-size:0.8125rem}

/* ======================================================================
   TouchFlow (ปรับจาก touchflow-DESIGN.md): พื้นขาว · น้ำเงินหลัก · แดงเล็กน้อยเฉพาะเตือน/ด่วน
   ไม่ใช้เขียว/เหลือง — "สำเร็จ" ใช้น้ำเงินเข้ม "รอ/เตือน" ใช้แดง · ไอคอนหมวดงานน้ำเงินทั้งหมด
   ====================================================================== */
:root,:root[data-theme=light]{
  --backdrop:#EEF2F7; --bg:#FFFFFF; --surface:#FFFFFF; --card:#F4F7FB; --card-2:#E9EEF5; --line:#E8ECF1;
  --ok:#0B57B0; --ok-s:#E7F0FC; --warn:#C4320F; --warn-s:#FDECE7; --gold:#0668D3;
  --internal-bg:#EEF4FD; --internal-line:#C9DBF4;
  --shadow-s:0 1px 3px rgba(0,0,0,.06); --shadow-m:0 4px 12px rgba(0,0,0,.08);
}
:root[data-theme=dark]{
  --ok:#6AAEFF; --ok-s:rgba(106,174,255,.14); --warn:#FF7A59; --warn-s:rgba(255,122,89,.14); --gold:#6AAEFF;
  --internal-bg:rgba(106,174,255,.10); --internal-line:rgba(106,174,255,.3);
  --shadow-s:none; --shadow-m:0 4px 12px rgba(0,0,0,.4);
}
.cat-printer,.cat-network,.cat-account,.cat-install,.cat-repair,.cat-cctv{--cat:var(--primary)}
.cat-other{--cat:var(--text-2)}
/* การ์ด: มุม 16 เงาบางมาก ไม่มีขอบ */
.card,.tcard,.mcard,.sgroup,.me-card,.status-card{border-radius:16px;box-shadow:var(--shadow-s)}
.card .card{box-shadow:none}
/* ช่องกรอก: สูง 48 มุม 12 ขอบเทาอ่อน · โฟกัสขอบน้ำเงินพร้อมวงแหวน 3px */
.fl :is(input,select,textarea){border:1px solid #E5E7EB;border-radius:12px;background:var(--surface)}
.fl :is(input:not([type=checkbox]):not([type=radio]),select){min-height:48px}
.fl :is(input,select,textarea):focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px rgba(6,104,211,.12)}
:root[data-theme=dark] .fl :is(input,select,textarea){border-color:var(--line)}
/* ปุ่มรอง: พื้นเทาอ่อน ตัวน้ำเงิน */
.btn.soft{background:var(--card-2);color:var(--primary)}
/* แผ่นล่าง/หน้าต่าง: มุมบน 24 */
#modalCard{border-top-left-radius:24px;border-top-right-radius:24px}
/* โลโก้เป็นตัวหนังสือ: Guru น้ำเงิน · IT แดง — รูปโลโก้ไว้ล่างสุดและเล็ก */
.wm{display:inline-block;font-weight:700;font-size:1.375rem;letter-spacing:-.4px;color:var(--primary);line-height:1}
.wm b{font-weight:700;color:#FF5A14;margin-left:3px}
.join .wm{display:block;margin:4px 0 14px}
.foot-logo{display:block;width:80px;height:auto;opacity:.8;border-radius:4px}
:root[data-theme=dark] .foot-logo{background:#fff;padding:3px 6px}
.foot-brand{display:flex;justify-content:center;margin-top:36px}
.about{justify-content:center}
.side-foot{display:none}
@media (min-width:960px){
  .side-brand .wm{font-size:1.5rem}
  .side-foot{display:block;margin:auto 10px 6px;padding-top:24px}
}

/* การ์ดงานเตี้ยลงทุกขนาดจอ */
.tcard{padding:8px 12px}
.tcard .tc-ic{width:30px;height:30px;border-radius:10px}
.tc-h{gap:10px;align-items:center}
.tc-f{margin:5px 0 0 40px;gap:4px}
.list{gap:8px}
.card .trow{padding:7px 0}

/* คอมพิวเตอร์ (≥960px): แบ่งเป็นคอลัมน์ ให้เห็นทุกส่วนโดยไม่ต้องเลื่อนหา */
@media (min-width:960px){
  .pg-home{column-count:2;column-gap:28px}
  .pg-home .phead{column-span:all}
  .pg-home>*{break-inside:avoid}
  .pg-home>.sec-h{break-after:avoid}
  .pg-tickets .list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}   /* หน้างาน: 2 คอลัมน์เสมอบนคอม (เจ้าของสั่ง 1 ธ.ค. 2026 — 3 คอลัมน์แน่นไป · คอลัมน์เดียวยาวเกิน) */
  .pg-projects .list,.pg-team .list{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:8px}
}
@media (min-width:1500px){ .pg-home{column-count:3} }

/* คอมพิวเตอร์ รอบแก้: หน้าหลักหัวหน้า/ผู้ดูแล = งานซ้าย (หลัก) · แผงข้างขวา · ทางลัดเป็นการ์ดชิดซ้าย */
@media (min-width:960px){
  .pg-home{column-count:auto;column-gap:normal;max-width:760px;margin-left:0}
  .pg-home .phead{column-span:none}
  .pg-home>*{break-inside:auto}
  .pg-home:has(.hm-side){display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:0 32px;max-width:1080px;align-items:start}
  .pg-home:has(.hm-side)>.phead,.pg-home:has(.hm-side)>.tiles{grid-column:1/-1}
  .hm-side{position:sticky;top:12px}
  .hm-side .fold:first-child{margin-top:0}
  .tiles,.tiles.compact{grid-template-columns:repeat(var(--n,3),minmax(0,170px));justify-content:start;gap:12px;max-width:none;margin-bottom:18px}
  .tile,.tiles.compact .tile{background:var(--card);border-radius:16px;box-shadow:var(--shadow-s);padding:14px 8px;min-height:92px}
  .tile:hover{background:var(--card-2)}
}

/* คอมพิวเตอร์ รอบ 3: ทางลัดเป็นการ์ดเล็กไอคอนซ้าย-ข้อความขวา · แผงข้างเริ่มบนสุดข้างทางลัด */
@media (min-width:960px){
  .pg-home:has(.hm-side)>.tiles{grid-column:auto}
  .tiles,.tiles.compact{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px}
  .tile,.tiles.compact .tile{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:12px;row-gap:0;align-items:center;text-align:left;min-height:0;padding:10px 18px 10px 12px;flex:0 0 auto}
  .tile i{grid-row:1/3;width:40px;height:40px}
  .tile span{align-self:end;font-size:0.9375rem;white-space:nowrap}
  .tile small{align-self:start;margin:0;white-space:nowrap}
  .tile:not(:has(small)) span{grid-row:1/3;align-self:center}
  .hm-side .empty{padding:14px 0}
  .hm-side .fold{margin-top:0;margin-bottom:12px}
}

/* แดชบอร์ดสรุปผล: แท่งเทียบกัน */
.tchips.dim{margin:10px 0 8px}
.dash{padding:6px 14px}
.dbar{padding:9px 0}
.dbar+.dbar{border-top:1px solid var(--line)}
.dbar .dl{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.dbar .dl b{font-size:0.875rem;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dbar .dl small{color:var(--text-2);white-space:nowrap;font-size:0.75rem}
.dtrack{height:8px;border-radius:999px;background:var(--card-2);margin-top:6px;overflow:hidden}
.dtrack i{display:block;height:100%;background:var(--primary);border-radius:999px;min-width:4px}

/* ตัวเลือกแดชบอร์ด: แถวเดียวเลื่อนได้ (5 ตัวเลือก ไม่ให้เหลือปุ่มเดี่ยวตกบรรทัด) */
.tchips.dim{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px}
.tchips.dim button{flex:0 0 auto;padding:6px 16px;min-height:36px}

/* หน้าสรุปผล: ตัวเลือกช่วงเวลาเป็นชิปเล็ก ตัวเลขสรุป 4 ช่องแถวเดียว ทุกอย่างเล็กลง */
.rfilter{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:6px 0 10px}
.rfilter .tchips{margin:0;flex:0 1 auto;display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px}
.rfilter .tchips button,.tchips.dim button{flex:0 0 auto;min-height:32px;padding:4px 12px;font-size:0.8125rem}
.rfilter .psel{min-height:32px;padding:2px 28px 2px 12px;font-size:0.8125rem;border:0;border-radius:999px;background-color:var(--card);max-width:100%}
.kpis.kpis4{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:6px}
.kpis4 .kpi{padding:8px 2px;border-radius:12px}
.kpis4 .kpi b{font-size:1.0625rem}
.kpis4 .kpi span{font-size:0.75rem}
.tchips.dim{margin:8px 0 6px}
.dash{padding:4px 12px}
.dbar{padding:7px 0}
.dtrack{height:6px;margin-top:4px}

/* ปุ่มในการ์ดข้อมูล (ดำเนินการกับงาน/ช่าง/พาร์ทเนอร์): เล็ก เรียงต่อกันหลายปุ่มต่อแถว */
.card>.row{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.card>.row .btn{min-height:34px;padding:4px 12px;font-size:0.8125rem;border-radius:10px}
.card>.row .btn svg{width:15px;height:15px}

/* ปุ่มดำเนินการของงาน: สี่เหลี่ยมจัตุรัส ไอคอนบน ข้อความสั้นล่าง เรียงต่อกัน */
.card>.row.sq{gap:8px}
.card>.row.sq .sqb{width:76px;height:76px;min-height:0;padding:6px 4px;flex-direction:column;gap:6px;border-radius:14px;font-size:0.75rem;line-height:1.2;white-space:normal;text-align:center}
.card>.row.sq .sqb svg{width:22px;height:22px}
.card>.row.sq .sqb span{display:block}

/* ปุ่มดำเนินการ: แถวปุ่มเม็ดยาว ไอคอนหน้าข้อความ กินพื้นที่น้อย (ทับกฎสี่เหลี่ยมด้านบน) */
.card>.row.sq{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-start}
.card>.row.sq .sqb{width:auto;height:34px;min-height:0;aspect-ratio:auto;padding:0 12px;flex-direction:row;gap:6px;border-radius:999px;font-size:0.8125rem;line-height:1;white-space:nowrap}
.card>.row.sq .sqb svg{width:16px;height:16px}

/* รูปในแชท = ภาพเล็ก · รูปในแท็บรายละเอียด = ภาพใหญ่เต็มความกว้าง (แตะดูเต็มจอได้ทั้งคู่) */
.bubble .gallery{grid-template-columns:repeat(auto-fill,56px);gap:4px}
.bubble .gimg{border-radius:8px}
.gallery.big{grid-template-columns:1fr;gap:10px}
.gallery.big .gimg{aspect-ratio:4/3;border-radius:14px}
@media (min-width:960px){.gallery.big{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}}

/* รูปมาก่อนข้อความ เรียงข้างกันเป็นแถว ไม่ซ้อน · แชทเป็นฟองแยกซ้าย-ขวาชัดเจน */
.bubble .gallery,.cmt .gallery{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 8px}
.bubble .gimg,.cmt .gimg{flex:0 0 auto;width:64px;height:64px;aspect-ratio:auto;border-radius:10px}
.bubble{max-width:86%;padding:10px 12px;box-shadow:var(--shadow-s)}
.bubble .meta{margin-bottom:6px;font-size:0.75rem}
.bubble.me{background:var(--primary-s);box-shadow:none}
.thread{gap:10px}
.card>.gallery:first-child,.mini-report>.gallery{margin:0 0 10px}

/* ทางลัดบนมือถือ: ไอคอนและชื่ออยู่ระดับเดียวกันทุกปุ่ม (จัดชิดบน) · ข้อความรองบรรทัดเดียว ไม่ตกบรรทัด */
@media (max-width:959px){
  .tiles{align-items:start}
  .tile{justify-content:flex-start;gap:6px}
  .tile span{line-height:1.25;overflow-wrap:normal}
  .tile small{margin-top:-4px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:0.75rem}
}

/* ฟอร์มในหน้าต่าง (ทำเสร็จ/ติดต่อ/แก้ไข ฯลฯ): เล็กลง ระยะแน่นขึ้น ปุ่มไมค์-กล้องอยู่แถวเดียว */
#modalCard .mh{margin-bottom:6px}
#modalCard .mh h3{font-size:1.125rem}
#modalCard .hint,#modalCard .mh+p{font-size:0.8125rem;line-height:1.4}
#modalCard .fl{margin-top:10px;font-size:0.8125rem}
#modalCard .fl :is(input:not([type=checkbox]):not([type=radio]),select){min-height:42px;padding:8px 12px;font-size:0.9375rem}
#modalCard textarea{min-height:0;padding:8px 12px;font-size:0.9375rem}
#modalCard .tools{display:flex;flex-wrap:nowrap;gap:6px;margin:6px 0 0}
#modalCard .tool-btn{min-height:36px;padding:4px 12px;font-size:0.8125rem;white-space:nowrap;gap:6px}
#modalCard .opt{padding:8px 10px}
#modalCard .opt b{font-size:0.875rem}
#modalCard .opt small{font-size:0.75rem}
#modalCard .row.end{margin-top:12px}
#modalCard .row.end .btn{min-height:40px;padding:6px 16px}

/* เช็กลิสต์ MA ในฟอร์ม: แถวละรายการ ช่องติ๊ก+ชื่อซ้าย หมายเหตุขวา (เครื่องผู้ใช้: ชื่อซ้าย ติ๊ก 3 ช่องขวา) */
#modalCard .ma-box{padding:8px 10px;gap:6px}
#modalCard .ma-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:8px;align-items:center}
#modalCard .ma-row label{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;margin:0;font-size:0.875rem;white-space:nowrap}
#modalCard .ma-row input[type=checkbox]{width:20px;height:20px;min-height:0;margin:0;flex:none}
#modalCard .ma-row input:not([type=checkbox]){min-height:36px;padding:4px 10px;font-size:0.875rem;width:100%}
#modalCard .ma-chk{display:flex;flex-wrap:nowrap;gap:10px;justify-content:flex-end}
#modalCard .ma-chk label{font-size:0.75rem;gap:4px}
#modalCard .ma-row:has(.ma-chk){grid-template-columns:minmax(0,1fr) auto}
#modalCard .ma-chk{gap:8px}

/* ป้ายประเภทงาน: MA น้ำเงินเข้ม ตัวขาว · แจ้งเหตุเทาปกติ */
.tag.ma{background:var(--primary);color:#fff;font-weight:600}
@media (max-width:959px){ .tchips[aria-label="ประเภทงาน"]{grid-template-columns:repeat(3,minmax(0,1fr))} }

/* ใบรายงานพิมพ์: ตารางเครื่องผู้ใช้เริ่มหน้าใหม่ และแถวไม่ถูกตัดกลางแถว */
.p-newpage{break-before:page}
.paper tr{break-inside:avoid}

/* ===== รอบปรับตามรายการปรับปรุง (แชท ปุ่มไอคอน progress bar ความกว้าง ภาษา/ธีม) ===== */
/* แชท: ข้อความของผู้ใช้ที่ล็อกอินอยู่ชิดซ้าย (.me ตัดสินจากรหัสผู้ใช้ c.by === u.id) ของคนอื่นชิดขวา */
.bubble{align-self:flex-end;border-radius:14px 4px 14px 14px}
.bubble.me{align-self:flex-start;border-radius:4px 14px 14px 14px}
/* ปุ่มที่เป็นไอคอนล้วน: ไม่มีพื้น/ขอบ/เงา เหลือพื้นอ่อนตอนชี้และวงโฟกัส (ไอคอนใช้สี currentColor เห็นทั้งสองโหมด) */
.ftool,.ph-a .ftool{background:none;border:0;box-shadow:none;border-radius:12px;width:40px;height:44px}
.ftool:hover,.xbtn:hover{background:var(--card-2)}
.xbtn{background:none}
.ftool:focus-visible,.xbtn:focus-visible,.ibtn:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
/* progress bar ทุกแบบสูง/มุม/สีเท่ากัน */
.pbar,.lbar,.dtrack{height:8px;border-radius:999px;background:var(--card-2);overflow:hidden}
.pbar i,.lbar i,.dtrack i{display:block;height:100%;border-radius:999px;background:var(--primary);transition:width .3s}
.lbar i.hi{background:var(--warn)}
.pbar{margin:10px 0 0}.dtrack{margin-top:6px}
/* ใช้ความกว้างหน้าจอเต็ม: แท็บเล็ตไม่จำกัด 640 · คอมไม่จำกัด 1080 */
@media (min-width:600px) and (max-width:959px){.shell{max-width:none}}
@media (min-width:960px){.page{max-width:none;margin:0}.pg-home{max-width:1180px}.pg-home:has(.hm-side){max-width:none}}
.sortseg{margin:6px 0 10px;max-width:420px}
.sortseg button{font-size:0.8125rem;min-height:34px}

/* ตารางงาน MA ประจำเดือน */
.ma-sch.off{opacity:.65}
.ma-sch .badges b{font-size:0.9375rem;font-weight:500;min-width:0;overflow-wrap:anywhere}

/* กลับด้านแชท: ข้อความของเราชิดขวา ของคนอื่นชิดซ้าย (ตัดสินจากรหัสผู้ใช้) */
.bubble{align-self:flex-start;border-radius:4px 14px 14px 14px}
.bubble.me{align-self:flex-end;border-radius:14px 4px 14px 14px}

/* การ์ดสถานะลูกค้า: ไอคอน+หัวข้อซ้าย · ป้ายสถานะขวาบน */
.status-card .st-r{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex:none;max-width:42%}
.spill{display:inline-flex;align-items:center;gap:6px;background:var(--primary-s);color:var(--primary);font-size:0.75rem;font-weight:600;padding:5px 12px;border-radius:999px;white-space:nowrap}
.status-card .st-who{max-width:100%}

/* การ์ดสถานะ: หัวข้อเต็มความกว้าง · แถวป้ายสถานะ/ชื่อช่างแยกลงมา · ป้ายสั้นบรรทัดเดียว */
.status-card .st-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}
.status-card .st-meta .st-who{position:static;max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;text-align:right}
.status-card .st-t b{white-space:normal;overflow-wrap:anywhere}
/* การ์ดรับเรื่องกระชับ: ไม่มีแถบขั้นตอนแล้ว ลดไอคอนและตัวอักษรลง (กฎนี้อยู่ท้ายสุดจึงทับกฎเดิมทุกจอ) */
.status-card{padding:12px 14px}
.status-card .st-ic{width:36px;height:36px;border-radius:12px}
.status-card b{font-size:0.9375rem}
.status-card small{font-size:0.75rem;margin-top:1px}
.status-card .st-meta{margin-top:8px}

/* ปุ่มเรียงงานปุ่มเดียว: แตะสลับ ความสำคัญ ⇄ วันที่แจ้ง */
.sortline{display:flex;justify-content:flex-end;margin:2px 0 8px}
.sortbtn{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:4px 12px;border:0;border-radius:999px;background:var(--card);color:var(--text-2);font:inherit;font-size:0.8125rem;cursor:pointer}
.sortbtn svg{color:var(--primary)}
.sortbtn:hover{background:var(--card-2)}

/* แถบเครื่องมือหน้างาน: เลือกสถานะ (ดรอปดาวน์) + เรียง แถวเดียว */
.tlbar{display:flex;align-items:center;gap:8px;margin:2px 0 10px}
.tlbar .sortbtn{margin-left:auto}
.statesel{position:relative;display:inline-flex;max-width:60%}
.statesel select{appearance:none;-webkit-appearance:none;border:0;border-radius:999px;background:var(--card);color:var(--text);font:inherit;font-size:0.8125rem;font-weight:500;min-height:34px;padding:4px 30px 4px 14px;cursor:pointer;max-width:100%;text-overflow:ellipsis}
.statesel::after{content:'';position:absolute;right:13px;top:50%;width:7px;height:7px;margin-top:-6px;border-right:2px solid var(--text-2);border-bottom:2px solid var(--text-2);transform:rotate(45deg);pointer-events:none}
.statesel.on select{background:var(--primary-s);color:var(--primary);font-weight:600}
.statesel.on::after{border-color:var(--primary)}
.statesel select:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
@media (max-width:959px){.tlbar .ibtn{display:none}}
@media (min-width:960px){.statesel{display:none}.tlbar .sortbtn{margin-left:0}.tlbar .ibtn{margin-left:auto}}
.statesel select,.sortbtn{background:var(--card-2)}

/* การ์ดงาน: แถวข้อมูลบรรทัดเดียว (ป้ายเป็นตัวอักษรล้วน ไม่มีกล่อง) ปุ่มดำเนินการอยู่ปลายแถวเดียวกัน ไม่ซ้อนลงบรรทัดใหม่ */
.tcard .tc-f{display:flex;flex-wrap:nowrap;align-items:center;gap:12px;margin:6px 0 0 40px;min-width:0}
.tcard .tc-f>*{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tcard .tc-f .tag,.tcard .tc-f .pill{background:none;padding:0;border-radius:0;font-size:0.75rem}
.tcard .tc-f .tag{color:var(--text-2)}
.tcard .tc-f .tag.warn{color:var(--danger)}
.tcard .tc-f .pill{font-weight:600;color:var(--text)}
.tcard .tc-f .sp{flex:1 1 0;min-width:4px}
.tcard .tc-f .btn{flex:none;overflow:visible}
.tcard>.btn.block-sm{margin-top:8px}
.tcard .tc-f .pill{flex:none;overflow:visible}

/* หัวหน้าเพจ: ถ้าปุ่มขวามากจนหัวข้อเหลือแคบกว่า 6rem ให้ปุ่มลงแถวใหม่ (ชิดขวา) แทนการบีบหัวข้อจนตัวอักษรตกบรรทัดละตัว */
.phead{flex-wrap:wrap}
.ph-t{flex:1 1 6rem}
.ph-a{margin-left:auto}

/* หัวเพจ: ปุ่มอยู่แถวเดียวกับหัวข้อเสมอ ไม่ตกลงบรรทัดใหม่ — หัวข้อหดได้ บรรทัดรองตัดด้วย … บรรทัดเดียว */
.phead{flex-wrap:nowrap}
.ph-t{flex:1 1 0;min-width:0}
.ph-t small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ph-a{flex:none;margin-left:0}
@media (max-width:359px){.ph-a .ftool,.ph-a .ibtn{width:34px}}

/* ช่องติ๊กที่ซ่อน (หมวดงาน/ความเร่งด่วน/ถนัดงาน) ต้องอยู่ในป้ายของตัวเอง ไม่งั้นกว้างเท่าหน้าต่างจนหน้าต่างเลื่อนซ้าย-ขวา */
.catpick label,.urg label{position:relative}
.catpick input,.urg input{width:1px;height:1px;left:0;top:0}
/* ปุ่มเล็กในการ์ดงานคงขนาดเดิม แต่พื้นที่แตะขยายเป็น 44px */
.tcard .tc-f .btn{position:relative}
.tcard .tc-f .btn::after{content:'';position:absolute;inset:-8px -4px}
/* ปุ่มหมวดงานสูงเท่ากันทั้งแถว แม้ชื่อบางอันขึ้นสองบรรทัด */
.catpick label{display:flex}
.catpick label span{flex:1;min-width:0}

/* ออกใบรายงาน (คอม): ฟอร์มซ้าย เช็กลิสต์ MA ขวา เห็นครบในหน้าต่างเดียว ไม่ต้องเลื่อน · มือถือเรียงลงเหมือนเดิม */
@media (min-width:1000px){
  #modalCard:has(.rs-b){width:min(1240px,calc(100vw - 48px));max-height:96vh;padding-top:18px;padding-bottom:18px}
  .rs-grid:has(.rs-b){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.1fr);gap:0 24px;align-items:start}
  .rs-b{display:contents}
  .rs-b1>.fl:first-child,.rs-b2>.fl:first-child{margin-top:0}
  #modalCard:has(.rs-b) .ma-box{padding:6px 10px;gap:4px;margin-bottom:6px}
  #modalCard:has(.rs-b) .ma-row input:not([type=checkbox]){min-height:32px}
}

/* ปฏิทินรายเดือน */
/* ปฏิทินงาน: การ์ดเดียว หัวเดือนชัด วันที่เป็นวงกลม วันที่มีนัดมีจุดนับจำนวน รายการนัดเป็นการ์ดย่อยด้านล่าง */
.calwrap{background:var(--card);border-radius:var(--radius);padding:14px 12px 12px;box-shadow:var(--shadow-s)}
.cal-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.cal-h b{font-size:1rem;font-weight:600;letter-spacing:0}
.cal-h .ibtn{width:36px;height:36px;border-radius:50%}
.cal-g{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px 2px;text-align:center}
.cal-g span{font-size:0.75rem;font-weight:600;color:var(--text-2);padding:0 0 6px}
.cal-g span:nth-child(1),.cal-g span:nth-child(7){color:var(--danger)}
.cal-c{position:relative;width:100%;max-width:40px;height:40px;margin:0 auto;border:0;border-radius:50%;background:none;color:var(--text);font:inherit;font-size:0.875rem;font-weight:500;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;transition:background .15s,color .15s}
.cal-c:hover{background:var(--card-2)}
.cal-c u{position:absolute;bottom:1px;left:50%;transform:translateX(-50%);text-decoration:none;font-size:0.6875rem;font-weight:600;color:var(--primary);background:var(--primary-s);border-radius:999px;min-width:15px;padding:0 4px;line-height:14px;text-align:center}
.cal-c.has{font-weight:600}
.cal-c.today{box-shadow:inset 0 0 0 1.5px var(--primary)}
.cal-c.sel{background:var(--primary);color:#fff;box-shadow:0 4px 12px -6px rgba(15,35,65,.35)}
.cal-c.sel u{background:#fff;color:var(--primary)}
.cal-none{text-align:center;margin:12px 0 0}
.calwrap .cal-day{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.cal-day>b{display:block;font-size:0.9375rem;font-weight:600;margin-bottom:8px}
.cal-day .trow{background:var(--card-2);border-radius:14px;padding:10px 12px;margin-top:6px;border:0;box-shadow:inset 3px 0 0 var(--primary)}
.cal-day .btn.sm{width:100%;justify-content:center;margin-top:10px;min-height:40px;border-radius:12px}

/* ใบรายงาน MA แบบ CSR (A4 หน้าเดียว) */
.csr{font-size:0.8125rem;color:#111;background:#fff}
.csr-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding-bottom:6px}
.csr-top img{width:150px;height:auto}
.csr-co{text-align:right;font-size:0.6875rem;line-height:1.35}
.csr-bar{text-align:center;font-weight:700;padding:3px 0;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.csr-bar.blue{background:#2B7CD3;color:#fff}
.csr-bar.orange{background:#F8B27A;height:14px;margin:6px 0 10px}
.csr-info{background:#F2F2F2;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.csr-info>div{padding:4px 8px;border-bottom:2px solid #fff}
.csr-t{width:100%;border-collapse:collapse;border:1px solid #9FC3E8}
.csr-t td,.csr-t th{border:1px solid #9FC3E8;padding:2px 6px;height:20px}
.csr-t th.csr-h{color:#2B7CD3;font-size:0.9375rem;text-align:center;border:0;padding-top:6px}
.csr-sub th{font-weight:700;text-align:center}
.csr-t td.c{text-align:center}
.csr-hw td:first-child,.csr-hw .csr-sub th:first-child{width:28%}.csr-hw td.c,.csr-hw .csr-sub th:nth-child(2){width:12%}
.csr-u{margin-top:-1px}.csr-u td:first-child,.csr-u .csr-sub th:first-child{width:6%}.csr-u td:nth-child(2),.csr-u .csr-sub th:nth-child(2){width:26%}.csr-u td.c:not(:first-child){width:11%}
.csr-note{margin:10px 0 0}
.csr-sign{display:grid;grid-template-columns:1fr 1fr;gap:40px;margin-top:18px;break-inside:avoid}
.csr-sh{background:#F2F2F2;font-weight:700;padding:3px 8px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.csr-sg{height:50px;border-bottom:1px dashed #666;display:flex;align-items:flex-end;justify-content:center;padding-bottom:2px}
.csr-sg img{max-height:46px;max-width:100%}
.csr-sg.typed{font-style:italic;justify-content:center}
.csr-sn{text-align:center;font-size:0.75rem;font-style:italic;margin-top:2px}
@media print{.csr{font-size:9.5pt}.csr-t td,.csr-t th{height:6mm;padding:1px 5px}.csr-sign{margin-top:8mm}}
@media (max-width:599px){.csr{font-size:0.6875rem}.csr-t td,.csr-t th{padding:2px 3px}.csr-top img{width:110px}.csr-sign{gap:16px}}

/* รหัสผูก LINE */
.line-code{font-size:1.75rem;font-weight:600;letter-spacing:.3em;text-align:center;margin:8px 0;color:var(--primary)}

/* แถบเตือน: ค้างส่งอีเมลยืนยันหลังจบงาน */
.mailban{display:flex;align-items:center;gap:8px;width:100%;margin:0 0 10px;padding:9px 12px;border:0;border-radius:12px;background:#FDECEC;color:var(--danger);font:inherit;font-size:0.8125rem;font-weight:600;text-align:left;cursor:pointer}

/* ข้อความบังคับส่งอีเมลหลังจบงาน: สีแดงให้เห็นชัด */
.mailreq{display:flex;align-items:flex-start;gap:8px;margin:12px 0 0;padding:10px 12px;border-radius:12px;background:#FDECEC;color:var(--danger);font-size:0.8125rem;font-weight:600;line-height:1.4}
.mailreq svg{flex:none;margin-top:1px}
.redt{color:var(--danger)}

/* ปุ่มส่งอีเมลยืนยัน: เด่นเป็นพิเศษ กันลืม */
.btn.big{min-height:52px;font-size:1rem;font-weight:600;gap:10px}
.btn.alert{background:var(--danger);border-color:var(--danger);color:#fff}
.btn.alert:hover{filter:brightness(.95)}
.btn.big.alert{margin-bottom:12px}

/* ใบรายงาน MA (CSR): ปรับให้ดูเป็นทางการและอ่านง่ายขึ้น — โครงเดิมไม่เปลี่ยน */
.csr{font-family:'Prompt',system-ui,sans-serif;font-size:0.8125rem;line-height:1.45;color:#1F2933}
.csr-top{padding-bottom:10px;border-bottom:1px solid #D7E3F1;margin-bottom:8px}
.csr-top img{width:140px}
.csr-co{font-size:0.6563rem;color:#52606D}
.csr-bar.blue{font-size:0.9375rem;letter-spacing:.06em;text-transform:uppercase;padding:6px 0}
.csr-meta{display:flex;justify-content:space-between;gap:12px;padding:5px 2px;font-size:0.75rem;color:#334E68;border-bottom:1px solid #D7E3F1;margin-bottom:6px}
.csr-info{border-radius:4px}
.csr-info>div{padding:5px 10px}
.csr-bar.orange{background:#F7C9A0;height:8px;margin:4px 0 8px;border-radius:2px}
.csr-t{border-color:#D7E3F1}
.csr-t td,.csr-t th{border-color:#D7E3F1;padding:3px 7px}
.csr-t td{color:#1F2933}
.csr-t th.csr-h{color:#1F5FA8;font-size:0.8438rem;letter-spacing:.04em;text-transform:uppercase;padding:6px 0 4px}
.csr-sub th{background:#EEF4FB;color:#334E68;font-size:0.75rem}
.csr-hw tr:not(.csr-sub) td:first-child{font-weight:500}
.csr-note{padding:6px 10px;border:1px solid #D7E3F1;border-radius:4px;background:#FAFCFE}
.csr-note b{color:#1F5FA8}
.csr-sh{background:#1F5FA8;color:#fff;font-size:0.75rem;letter-spacing:.05em;text-transform:uppercase;padding:4px 8px}
.csr-sg{height:54px;border-bottom:1px solid #9AA5B1}
.csr-sd{text-align:center;font-size:0.6875rem;color:#52606D;margin-top:2px}
.csr-foot{margin-top:18px;padding-top:6px;border-top:1px solid #D7E3F1;text-align:center;font-size:0.6563rem;color:#829AB1}

/* ใบรายงาน MA v3: อุปกรณ์ 2 คอลัมน์ · หมายเหตุสั้น · สีส้มเป็นสีเน้น */
.csr-hw th,.csr-hw td{padding:2px 5px}
.csr-hw td:nth-child(1),.csr-hw td:nth-child(4),.csr-hw .csr-sub th:nth-child(1),.csr-hw .csr-sub th:nth-child(4){width:24%}
.csr-hw td:nth-child(2),.csr-hw td:nth-child(5),.csr-hw .csr-sub th:nth-child(2),.csr-hw .csr-sub th:nth-child(5){width:8%}
.csr-hw td:nth-child(3),.csr-hw td:nth-child(6),.csr-hw .csr-sub th:nth-child(3),.csr-hw .csr-sub th:nth-child(6){width:18%}
.csr-hw td:nth-child(3),.csr-hw td:nth-child(6){font-size:0.6875rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:0}
.csr-note{padding:3px 8px;margin-top:6px;font-size:0.72rem;line-height:1.3}
.csr-bar.orange{background:#F28C28}
.csr-t th.csr-h{color:#E8772E;border-bottom:2px solid #F28C28}
.csr-sh{background:#E8772E}
.csr-sub th{border-bottom:2px solid #F7C9A0}

/* ใบรายงาน MA: กล่องลูกค้า 2 คอลัมน์ (ซ้ายวันที่/ชื่อ · ขวาที่อยู่) และหัวกระดาษที่อยู่บริษัทจริง */
.csr-co{text-align:right;font-size:0.6563rem;line-height:1.4;color:#52606D}
.csr-co b{color:#1F5FA8;font-size:0.75rem}
.csr-info{display:grid;grid-template-columns:1fr 1fr}
.csr-info>div{padding:0}
.csr-info>div>div{padding:5px 10px;border-bottom:2px solid #fff}
/* โลโก้ใบรายงาน MA: ตามสัดส่วนจริงของไฟล์ (ไม่ใช้ความสูงจากแอตทริบิวต์ 44px) */
.csr-top img{width:118px;height:auto}
/* ใบรายงาน MA: โลโก้ใหญ่ขึ้น · หัวตารางส่วนอุปกรณ์เป็นพื้นฟ้าอ่อน (อ่อนกว่าแถบหัวเรื่อง) */
.csr-top img{width:140px;height:auto}
.csr-t th.csr-h{background:#E6F0FB}
/* ใบรายงาน MA: หัวตารางส่วนอุปกรณ์เป็นพื้นฟ้า (อ่อนกว่าแถบหัวเรื่อง) ตัวอักษรขาว · โลโก้ใหญ่ขึ้น */
.csr-t th.csr-h{background:#5A9BE0;color:#fff}
.csr-top img{width:170px;height:auto}
/* ตรวจบนมือถือ 390px: ตัวเลขแจ้งเตือนและวันในปฏิทินเล็กเกิน 11px · ปุ่มเริ่มงานในรายการสูงไม่ถึง 44px (ขยายพื้นที่แตะ) */
.tbdg,.bdg,sup{font-size:11px}
.cal-g span{font-size:11px}
.btn.soft.sm{position:relative}
.btn.soft.sm::after{content:'';position:absolute;inset:-8px -4px}
/* ตัวเลขแจ้งเตือนบนแท็บ/กระดิ่งและปุ่มเล็กในรายการ: ขั้นต่ำ 11px (กฎเดิมเจาะจงกว่าจึงต้องซ้ำที่นี่) */
.tab .bdg,.tbdg{font-size:11px}
.btn.soft.sm{font-size:11px}
/* ตรวจทั้งเว็บ: ป้ายสั้น (แท็ก ป้ายสถานะ ปุ่ม ชื่อแท็บ ไทล์) ไม่ตัดคำกลางคำ — ถ้าไม่พอที่ให้ตัดด้วย … */
.tag,.pill,.tile s,.sortbtn,.ttabs button,.tk-tabs button,.fold-t{white-space:nowrap}
.btn.sm,.btn.soft.sm{white-space:nowrap}
.tag{max-width:100%;overflow:hidden;text-overflow:ellipsis}
/* แท็กในแถวรายการไม่ถูกบีบจนเหลือไม่กี่พิกเซล (เดิมตัดคำจนเหลือ "รีโมท" 17px) */
.trow .tag,.tr-m .tag,.tr-m small .tag{flex:none;min-width:max-content}
/* การ์ดงาน: ป้ายในแถวบรรทัดเดียวไม่ถูกบีบจนเหลือไม่กี่พิกเซล — ป้ายที่ยาวกว่าให้ตัดด้วย … แทน */
.tcard .tc-f .tag{flex:0 1 auto;min-width:min(4.5em,100%)}

/* หน้างาน: แยกแท็บยังไม่เสร็จ/เสร็จแล้ว · แท็บเสร็จแล้วไม่ต้องมีตัวกรองสถานะ */
.tlbar.no-state .statesel{display:none}
/* จอกว้าง: เนื้อหาขยายตามจอและอยู่กลางพื้นที่ที่เหลือหลังแถบเมนู (สูงสุด 1480px) */
@media (min-width:1200px){.pg-home,.pg-home:has(.hm-side){max-width:1480px;margin:0 auto}.page{max-width:1280px;margin:0 auto;padding-left:32px;padding-right:32px}}   /* หน้ารายการจำกัดความกว้างอ่านง่ายที่ 1280px กลางจอ */
/* การ์ดงาน: ป้ายหดได้ (ตัด … ) เพื่อให้ปุ่มดำเนินการอยู่ในการ์ดเสมอ — กันป้ายดันปุ่มล้นขอบ */
.tcard .tc-f .tag{min-width:0;flex:0 1 auto}
.tcard .tc-f .btn{margin-left:auto}

/* แดชบอร์ดผู้บริหาร: ตัวเลขใหญ่ อ่านได้ทันที · ต้องดูแลสีแดงเมื่อมีงาน · กราฟแท่งเรียบ */
.xkpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.xk{background:var(--card);border-radius:16px;padding:14px 12px;text-align:center}
.xk b{display:block;font-size:1.5rem;font-weight:600;letter-spacing:-.01em;color:var(--primary)}
.xk span{font-size:0.75rem;color:var(--text-2)}
.xcols{display:grid;grid-template-columns:1fr;gap:12px}
.xcard{background:var(--card);border-radius:16px;padding:14px 16px}
.xcard h3{font-size:0.875rem;font-weight:600;margin:0 0 10px;color:var(--text-2)}
.xrow{display:flex;justify-content:space-between;align-items:center;padding:9px 0;border-bottom:1px solid var(--line);font-size:0.875rem}
.xrow b{min-width:28px;text-align:center;border-radius:999px;padding:2px 8px;background:var(--card-2)}
.xrow.hot b{background:#FDECEC;color:var(--danger)}
.xchart{display:flex;gap:6px;align-items:flex-end;height:150px}
.xcol{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%}
.xbars{flex:1;width:100%;display:flex;align-items:flex-end;gap:3px}
.xbars i{flex:1;border-radius:4px 4px 0 0;min-height:2px}
.xbars i.c{background:var(--gold)}.xbars i.d{background:var(--primary)}
.xcol small{font-size:0.75rem;color:var(--text-2);white-space:nowrap}
.xleg{font-size:0.75rem;color:var(--text-2);margin:8px 0 0;display:flex;gap:8px;align-items:center}
.xleg i{display:inline-block;width:10px;height:10px;border-radius:4px;margin-right:4px}
.xleg i.c{background:var(--gold)}.xleg i.d{background:var(--primary)}
/* แดชบอร์ด: ยืมจากแบบ Flip7 เฉพาะที่เข้ากับงานบริการ — แถบสีซ้ายการ์ด เส้นประคั่นหัวข้อ · ใช้สีเดิมของเว็บ */
.xcard{border-left:4px solid var(--primary)}
.xcard.alert{border-left-color:var(--danger)}
.xcard h3{padding-bottom:8px;border-bottom:2px dashed var(--line)}
.xco{display:grid;grid-template-columns:minmax(0,1fr) 1.2fr 28px;gap:10px;align-items:center;padding:6px 0;font-size:0.8125rem}
.xco span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xbar{height:8px;border-radius:999px;background:var(--card-2);overflow:hidden}
.xbar i{display:block;height:100%;background:var(--primary);border-radius:999px}
.xco b{text-align:right}
@media (min-width:600px){.xkpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:960px){.xkpis{grid-template-columns:repeat(6,minmax(0,1fr))}.xcols{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* หน้าฉันบนคอม: กลุ่มเมนูอยู่กลางใต้การ์ดโปรไฟล์ */
@media (min-width:960px){.sgroup{margin-left:auto;margin-right:auto}}
/* หน้าฉันบนคอม: หัวข้อการแสดงผล (พับได้) อยู่กลางเช่นเดียวกับกลุ่มเมนู */
@media (min-width:960px){.fold[data-fold="me-disp"]{max-width:640px;margin-left:auto;margin-right:auto}}

/* ป้ายจำนวนแชทในรายการแจ้งเตือน: สีแดงเดียวกับป้ายกระดิ่ง */
.cnt.chat{background:#D93A1A;color:#fff}
/* แจ้งเตือนแชท: แถบแดงด้านบนจอ ไม่ทับแถบด้านล่าง */
.toast.chat{top:12px;bottom:auto;background:#D93A1A;color:#fff}
@media (min-width:960px){.toast.chat{left:auto;right:24px;transform:none}}
/* รายการแจ้งเตือนและประวัติช่าง: บรรทัดเดียว ตัดด้วย ... ไม่ให้ยาวจนอ่านยาก */
.notif-r .tr-m{min-width:0}.notif-r .tr-m b,.notif-r .tr-m small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rr-sum{margin:2px 0 4px;font-size:0.8125rem;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* จุดแดง: เดือนนี้ยังไม่ได้ไปบริษัทที่ตั้งตาราง MA */
.mdot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#D93A1A;margin-right:8px;vertical-align:middle}
/* หน้าบริษัทในมือถือ: ข้อมูลทีละบรรทัด (ชื่อเรื่องอยู่บน) ไม่บีบคอลัมน์ซ้าย และข้อความยาวตัดได้ */
@media (max-width:959px){.sheet .card .facts{grid-template-columns:1fr;gap:0 0;font-size:0.8125rem;line-height:1.35}.sheet .card .facts dt{font-size:0.75rem;margin-top:6px}.sheet .card .facts dt:first-child{margin-top:0}.sheet .card .facts dd{overflow-wrap:anywhere}}
/* หน้าบริษัทบนมือถือ: การ์ดและตัวเลขให้เล็กลง ดูโล่งขึ้น */
@media (max-width:959px){.sheet .card{padding:14px 16px}.sheet .kpis.in-sheet{gap:6px}.sheet .kpis.in-sheet .kpi{padding:10px 4px}.sheet .kpis.in-sheet .kpi b{font-size:1.125rem}}
/* แท็บในหน้าบริษัทบนมือถือ: ขึ้นบรรทัดใหม่แทนการเลื่อนซ้ายขวา ให้เห็นครบทุกปุ่ม */
@media (max-width:959px){.tk-tabs .ttabs{flex-wrap:wrap;overflow:visible;row-gap:6px}}

/* ตรวจหน้าจอทุกบทบาท: ป้าย MA ถูก `:root[data-theme=light] .tag{background:var(--bg)}` ทับ จนตัวหนังสือขาวอยู่บนพื้นขาว (มองไม่เห็นในโหมดสว่าง) และขาวบนฟ้าอ่อนในโหมดมืด */
:root .tag.ma{background:var(--btn);color:var(--on-btn);font-weight:600}
/* วันที่ที่เลือกในปฏิทินโหมดมืด: ขาวบนฟ้าอ่อน 2.3:1 → ใช้สีปุ่ม · แถวเตือนในรายงานโหมดมืด: พื้นชมพูอ่อนตายตัว + ตัวหนังสือส้มสว่าง 2.25:1 */
:root[data-theme=dark] .cal-c.sel{background:var(--btn);box-shadow:0 4px 12px -6px rgba(0,0,0,.5)}
:root[data-theme=dark] .cal-c.sel u{color:var(--btn)}
:root[data-theme=dark] .xrow.hot b{background:var(--danger-s)}
/* ขีด "–" ในตารางสิทธิ์ และบรรทัดท้ายเอกสาร: คอนทราสต์ต่ำ */
.matrix .nope{color:var(--text-2)}
.p-foot{color:#6B7280}
/* ปุ่มเล็กบนมือถือ/จอสัมผัส: สูงอย่างน้อย 40px (เดิม 28–30px กดพลาดง่าย) */
@media (pointer:coarse),(max-width:600px){.btn.sm,.btn.soft{min-height:40px}.tbar button{min-height:40px}.tcard .btn.sm{min-height:36px}a.lnk{display:inline-block;padding:7px 0}}
/* อุปกรณ์ลูกค้า: ป้ายไอคอนมุมมนหน้าแถวบริษัท/อุปกรณ์ (สีตามธีม) */
.dev-ic{width:40px;height:40px;border-radius:12px;background:var(--primary-s);color:var(--primary);display:flex;align-items:center;justify-content:center;flex:none}
.trow:hover .dev-ic{background:var(--card-2)}

/* ใบรายงาน: กล่อง Customer Address สูงเท่าฝั่งซ้าย (2 แถว) เส้นล่างตรงกัน */
.csr-info>div{display:flex;flex-direction:column}
.csr-info>div>div{flex:1}

/* แถบความคืบหน้าบนสุดขณะรอเซิร์ฟเวอร์ (ดู netBusy ใน api.ts) */
html.net-busy{cursor:progress}
html.net-busy::before{content:"";position:fixed;top:0;left:0;right:0;height:3px;background:var(--primary);transform-origin:left;z-index:9999;animation:netbar 1.2s ease-in-out infinite}
@keyframes netbar{0%{transform:scaleX(.04)}60%{transform:scaleX(.8)}100%{transform:scaleX(.98);opacity:.35}}
@media (prefers-reduced-motion:reduce){html.net-busy::before{animation:none;transform:none;opacity:.6}}
.btn:active:not(:disabled),.trow:active,.mcard:active,.tile:active,.srow:active{opacity:.75}

/* ไอคอนนำเข้านัดจาก Outlook มุมขวาบนของปฏิทิน */
.cal-r{display:flex;align-items:center;gap:2px}
.cal-h .cal-imp{color:var(--text-2)}
.cal-h .cal-imp:hover{color:var(--primary)}
/* หัวปฏิทิน 3 ช่อง: ลูกศรซ้าย | ชื่อเดือนอยู่กึ่งกลางเสมอ | ลูกศรขวา + ไอคอนนำเข้า */
.cal-h{display:grid;grid-template-columns:1fr auto 1fr}
.cal-h>.ibtn:first-child{justify-self:start}
.cal-r{justify-self:end}
/* ไอคอนไม่มีพื้นหลังซ้อน: ทางลัดหน้าหลัก, การ์ดที่มีไอคอน, ป้ายไอคอนอุปกรณ์ (ปุ่ม/การ์ดมีพื้นของตัวเองอยู่แล้ว) */
.tile i,.mcard>i,.dev-ic,.trow:hover .dev-ic{background:transparent}
/* ปุ่มทางลัด/การ์ดที่มีไอคอนอยู่แล้ว: ไม่มีพื้นหลังของปุ่ม (เห็นพื้นเมื่อเอาเมาส์วาง/กด เพื่อบอกว่ากดได้) */
.tile,.mcard{background:transparent}
.tile:hover,.mcard:hover{background:var(--card-2)}
/* (รวมกฎ .tiles.compact ที่เจาะจงกว่า และเงาของการ์ดในจอกว้าง) ทางลัดไม่มีพื้นหลังและเงา */
.tile,.tiles.compact .tile,.mcard{background:transparent;box-shadow:none}
.tile:hover,.tiles.compact .tile:hover,.mcard:hover{background:var(--card-2)}
.trash-row{gap:8px;flex-wrap:wrap}.trash-row>span{flex:1;min-width:0}.trash-row small{display:block}
.kpi.wide{grid-column:1/-1;text-align:left}.kpi.wide span{font-weight:600}
.opts.compact{max-height:200px;overflow:auto}.kindpick{grid-template-columns:repeat(2,1fr)}
/* ช่างบนมือถือ: ปุ่มขั้นตอนถัดไปค้างล่างจอ + ขยายพื้นที่แตะของปุ่มเม็ดยา/แท็บให้ถึง 44px โดยไม่เปลี่ยนขนาดที่เห็น */
.stick-act{position:sticky;bottom:0;z-index:5;margin:8px -4px 0;padding:14px 4px calc(10px + var(--sab));background:linear-gradient(to bottom,transparent,var(--bg) 35%)}
.stick-act .btn{min-height:52px;font-size:1rem;font-weight:600;box-shadow:0 6px 18px rgba(0,0,0,.18)}
@media (min-width:900px){.stick-act{display:none}}
@media (pointer:coarse){.card>.row.sq .sqb,.tk-tabs button,.tbar button{position:relative}.card>.row.sq .sqb::after,.tk-tabs button::after,.tbar button::after{content:"";position:absolute;inset:-6px 0}}

.sheet-inner:has(textarea:focus) .stick-act{display:none}
.pushline{display:flex;align-items:center;gap:4px;font-size:.8125rem;color:var(--muted,#6b7785);padding:2px 0 8px}.pushline span:first-child{display:inline-flex;align-items:center;gap:6px}.pushline .btn.link{min-height:0;padding:2px 6px;font-size:.8125rem}
.pushban{background:#FFF4E5;color:#9A5B00}
/* งานที่ยังไม่อ่าน/ใหม่: จุดแดง + แถบแดงด้านซ้าย + ชื่อหนา */
.tkun{position:relative}
.tkun::after{content:"";position:absolute;top:10px;right:10px;width:12px;height:12px;border-radius:50%;background:var(--danger,#D93025);box-shadow:0 0 0 3px rgba(217,48,37,.2)}
.trow.tkun::after{top:8px;right:8px;width:10px;height:10px}
.tcard.tkun .tc-t b,.trow.tkun .tr-m b{font-weight:600}
/* ยอดเงิน/ระยะทางรายเดือน (หน้าฉัน) */
.paycard{padding:12px}
.paynav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.paynav b{font-size:1rem}.paynav .ibtn[disabled]{opacity:.3}
.paysum{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;text-align:center}
.paysum div{background:var(--card-2);border-radius:12px;padding:8px 4px}
.paysum b{display:block;font-size:1.25rem;line-height:1.2}.paysum span{font-size:.75rem;color:var(--muted,#6b7785)}
.paylist-box{margin-top:10px;max-height:240px;overflow:auto}
.paylist{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;padding:8px 2px;border:0;border-top:1px solid var(--line);background:none;font:inherit;text-align:left;cursor:pointer}
.paylist b{font-size:.875rem;font-weight:600;display:block}.paylist small{display:block;font-size:.75rem;color:var(--muted,#6b7785)}
.paynum{text-align:right;font-weight:600;font-size:.875rem;white-space:nowrap}

/* หน้าฉัน (มือถือ): โปรไฟล์แถวเดียวกะทัดรัด ให้ยอดเงินและเมนูขึ้นมาอยู่ในจอแรก */
.me-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;column-gap:12px;row-gap:0;text-align:left;padding:12px 14px}
.me-card .avatar,.me-card>:first-child{grid-row:1/4;width:56px!important;height:56px!important;font-size:1.25rem}
.me-card b{margin:0;font-size:1.0625rem;font-weight:600}
.me-card small{grid-column:2}
.me-card .btn{grid-column:3;grid-row:1/4;margin:0;padding:0 12px;min-height:36px;font-size:.8125rem}
.sec-h{margin:14px 4px 6px;font-size:.875rem;color:var(--text-2);font-weight:600}
.me-card .btn{gap:0;padding:0 10px;min-width:40px}.me-card .btn .lbl{display:none}.me-card .btn svg{width:18px;height:18px}

/* อุปกรณ์: การ์ดกะทัดรัด */
.dev-act{margin:0 0 10px;gap:8px}
.dev-row{padding:8px 4px;gap:10px}.dev-row .dev-ic{width:34px;height:34px;border-radius:10px}.dev-row .dev-ic svg{width:18px;height:18px}
.dev-row .tr-m b{font-size:.9375rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dev-row .tr-m small{font-size:.75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dev-row .pill{font-size:.6875rem;padding:2px 8px;flex:none}
.dev-why{color:var(--danger,#D93025)!important;font-weight:600}
.dev-card{padding:4px 10px}

/* ปฏิทินแยกสี: ฟ้า = รอทำ · ส้ม = เลยกำหนด · เขียว = เสร็จแล้ว */
:root{--k-open:var(--primary,#0B63CE);--k-late:#E08A00;--k-done:#1E9E5A}
.cal-c u.k-open{background:var(--k-open);color:#fff}.cal-c u.k-late{background:var(--k-late);color:#fff}.cal-c u.k-done{background:var(--k-done);color:#fff}.cal-c u.k-ev{background:var(--card-2);color:var(--text-2)}
.cal-c.sel u{background:#fff!important;color:var(--primary)!important}
.cal-day .trow.k-open{box-shadow:inset 3px 0 0 var(--k-open)}.cal-day .trow.k-late{box-shadow:inset 3px 0 0 var(--k-late)}.cal-day .trow.k-done{box-shadow:inset 3px 0 0 var(--k-done)}
.ck{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:600;padding:2px 8px;border-radius:999px;white-space:nowrap}
.ck::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.ck-open{color:var(--k-open);background:rgba(11,99,206,.1)}.ck-late{color:var(--k-late);background:rgba(224,138,0,.12)}.ck-done{color:var(--k-done);background:rgba(30,158,90,.12)}
.cal-leg{display:flex;justify-content:center;gap:8px;margin:10px 0 0;flex-wrap:wrap}
.tag.fee{color:#1E9E5A;font-weight:600}

/* แชทส่วนตัว — หน้าตาแบบไลน์ */
.dm-list{display:flex;flex-direction:column}
.dm-li{display:flex;align-items:center;gap:12px;width:100%;padding:10px 4px;border:0;background:none;font:inherit;text-align:left;cursor:pointer;border-radius:12px}
.dm-li:hover{background:var(--card-2)}
.dm-li-m{flex:1;min-width:0}.dm-li-m b{display:block;font-size:.9375rem;font-weight:600}
.dm-li-m small{display:block;color:var(--text-2);font-size:.8125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dm-li-r{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:none}
.dm-li-r time{font-size:.6875rem;color:var(--text-2)}
.dm-badge{font-style:normal;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#06C755;color:#fff;font-size:.6875rem;font-weight:600;display:inline-flex;align-items:center;justify-content:center}
.dm-wrap{display:flex;flex-direction:column;height:min(78dvh,640px);margin:-4px -4px -8px}
.dm-head{display:flex;align-items:center;gap:10px;padding:0 0 10px;border-bottom:1px solid var(--line)}
.dm-hm{flex:1;min-width:0}.dm-hm b{display:block;font-size:1rem;font-weight:600}.dm-hm small{display:block;font-size:.75rem;color:var(--text-2)}
.dm-msgs{flex:1;overflow:auto;padding:12px 8px;background:var(--card-2);border-radius:14px;margin:10px 0;display:flex;flex-direction:column;gap:4px}
.dm-day{align-self:center;margin:10px 0 6px}.dm-day span{font-size:.6875rem;color:var(--text-2);background:rgba(0,0,0,.07);padding:2px 12px;border-radius:999px}
.dm-row{display:flex;align-items:flex-end;gap:6px;max-width:88%}
.dm-row.me{align-self:flex-end;flex-direction:row-reverse}
.dm-sp{width:34px;flex:none}
.dm-b{padding:8px 12px;border-radius:20px;background:var(--card,#fff);color:var(--text);overflow-wrap:anywhere;line-height:1.45;box-shadow:0 1px 1px rgba(0,0,0,.06);font-size:.9375rem}
.dm-row:not(.me) .dm-b{border-top-left-radius:6px}
.dm-row.me .dm-b{background:#06C755;color:#fff;border-top-right-radius:6px}
.dm-t{font-size:.625rem;color:var(--text-2);text-align:right;line-height:1.3;flex:none;padding-bottom:2px}
.dm-row:not(.me) .dm-t{text-align:left}
.dm-empty{margin:auto;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}.dm-empty small{color:var(--text-2)}
.dm-err{color:var(--danger);font-size:.8125rem;min-height:0}.dm-err:empty{display:none}
.dm-bar{display:flex;align-items:flex-end;gap:8px}
.dm-bar textarea{flex:1;resize:none;max-height:110px;border-radius:20px;padding:10px 16px;min-height:44px;line-height:1.4}
.dm-send{width:44px;height:44px;border-radius:50%;border:0;background:#06C755;color:#fff;display:flex;align-items:center;justify-content:center;flex:none;cursor:pointer;box-shadow:0 4px 12px -4px #06C755}
.dm-send:active{transform:scale(.94)}
/* หน้าหลักช่าง: สรุป ต้องทำ / นัดวันนี้ / เสร็จเดือนนี้ — แถบเล็กกะทัดรัด ตัวเลขข้างป้าย */
.tech-kpis{gap:6px;margin-bottom:8px}
.tech-kpis .kpi{display:flex;align-items:baseline;justify-content:center;gap:6px;padding:7px 4px;border-radius:12px}
.tech-kpis .kpi b{font-size:1.0625rem;font-weight:600;line-height:1}
.tech-kpis .kpi span{font-size:.75rem;line-height:1}

/* รายชื่อช่างในฟอร์มสร้างงาน: ย่อ/ขยายได้ แถวละบรรทัด */
.techsel{border:1px solid var(--line);border-radius:14px;background:var(--card);overflow:hidden}
.techsel summary{list-style:none;cursor:pointer;padding:11px 14px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem}
.techsel summary::-webkit-details-marker{display:none}
.techsel summary::after{content:"";width:8px;height:8px;border-right:2px solid var(--text-2);border-bottom:2px solid var(--text-2);transform:rotate(45deg);margin:-4px 2px 0;flex:none;transition:transform .15s}
.techsel[open] summary::after{transform:rotate(-135deg);margin-top:4px}
.techsel summary span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tech-opts{max-height:210px;overflow:auto;border-top:1px solid var(--line);padding:2px 6px}
.tchk{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:10px;cursor:pointer}
.tchk:hover{background:var(--card-2)}.tchk input{width:18px;height:18px;flex:none}
.tchk b{flex:1;min-width:0;font-size:.875rem;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tchk small{font-size:.75rem;color:var(--text-2);flex:none}
.tchk .avatar,.tchk img{flex:none}
.tchk[hidden]{display:none}

/* ฟอร์มสร้างงานบนคอม: หน้าต่างกว้าง แบ่งสองคอลัมน์ ให้เห็นทั้งฟอร์มโดยไม่ต้องเลื่อนมาก */
.create-grid{display:block}.cg-col{min-width:0}
@media (min-width:900px){
  .modal-card:has(.create-grid){width:min(1080px,calc(100vw - 64px));max-height:92vh;padding:28px 34px 30px}
  .create-grid{display:grid;grid-template-columns:1fr 1fr;column-gap:32px;align-items:start}
  .modal-card:has(.create-grid) .fl{font-size:.9375rem;margin-top:14px}
  .modal-card:has(.create-grid) .fl input,.modal-card:has(.create-grid) .fl select,.modal-card:has(.create-grid) .fl textarea{font-size:1rem}
  .modal-card:has(.create-grid) .urg{grid-template-columns:repeat(4,1fr)}
}
.kindpick{grid-template-columns:repeat(3,1fr)}
@media (min-width:900px){
  .modal-card:has(.create-grid) #fCatBox .catpick{grid-template-columns:repeat(3,1fr)}
  .modal-card:has(.create-grid) .catpick span{padding:9px 10px}
  .modal-card:has(.create-grid) .fl{margin-top:10px}
}

/* แชทส่วนตัวเต็มจอ (มือถือและคอม) + ปุ่มกลับ/ปิดใหญ่ */
.modal-card:has(.dm-full){position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;border-radius:0;padding:0;margin:0;transform:none;opacity:1;overflow:hidden;background:var(--surface)}
.dm-full{display:flex;flex-direction:column;height:100dvh;max-width:960px;margin:0 auto;width:100%;padding:0 12px calc(var(--sab) + 10px)}
.dm-full .dm-wrap,.dm-wrap.dm-full{height:100dvh;margin:0 auto}
.dm-full>.dm-list{flex:1;overflow:auto}
.dm-full .dm-head{padding:calc(env(safe-area-inset-top,0px) + 10px) 0 10px}
.dm-full .dm-head h3{font-size:1.125rem;margin:0;display:flex;align-items:center;gap:8px}
.dm-full .dm-msgs{margin:0 0 10px}
.dm-x{width:44px;height:44px;border-radius:50%;border:0;background:var(--card-2);color:var(--text);display:flex;align-items:center;justify-content:center;flex:none;cursor:pointer}
.dm-x:active{transform:scale(.94)}
@media (min-width:900px){.modal-card:has(.dm-full){border-radius:0}.dm-full{padding:0 24px 18px}.dm-row{max-width:70%}}
.helplist{margin:0 0 12px;padding-left:20px;display:flex;flex-direction:column;gap:8px;font-size:.875rem;line-height:1.5}
/* ตัวหนังสือเล็กเกินไป (<11px) อ่านยากบนมือถือ: ปุ่ม .sm, ป้ายแกนกราฟ, ปุ่มในการ์ดงานไม่ให้ตัวหนังสือชิดขอบ */
.btn.sm{font-size:max(.75rem,11.5px)}
.xcol small{font-size:max(.7188rem,11px)}
.tc-f .btn.sm,.tcard .btn.sm{min-height:34px;padding:4px 14px;font-size:max(.75rem,11.5px)}

/* ป้ายแจ้งเตือนเด้งบนหัวจอ */
#banners{position:fixed;top:calc(env(safe-area-inset-top,0px) + 10px);left:50%;transform:translateX(-50%);width:min(560px,calc(100vw - 20px));z-index:1000;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.banner{pointer-events:auto;display:flex;align-items:center;gap:12px;padding:12px 12px 12px 14px;border-radius:16px;background:var(--surface,#fff);color:var(--text);box-shadow:0 10px 30px -8px rgba(0,0,0,.35),0 0 0 1px var(--line);border-left:5px solid var(--primary,#0B63CE);cursor:pointer;animation:bnin .28s ease-out}
.banner.chat{border-left-color:#06C755}
.banner.out{opacity:0;transform:translateY(-12px);transition:opacity .25s,transform .25s}
.bn-ic{width:38px;height:38px;border-radius:50%;background:var(--primary-s,#E8F0FB);color:var(--primary,#0B63CE);display:flex;align-items:center;justify-content:center;flex:none}
.banner.chat .bn-ic{background:rgba(6,199,85,.14);color:#06A845}
.bn-m{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.bn-m b{font-size:.9375rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bn-m span{font-size:.8125rem;color:var(--text-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bn-x{width:32px;height:32px;border-radius:50%;border:0;background:var(--card-2);color:var(--text-2);display:flex;align-items:center;justify-content:center;flex:none;cursor:pointer}
@keyframes bnin{from{opacity:0;transform:translateY(-16px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.banner{animation:none}}

/* ===== คอม: หน้าแอดมิน/หัวหน้าทีมให้สะอาดขึ้น — สีน้อยลง ปุ่มสร้างงานอยู่หัวหน้า แถวทางลัดอยู่แถวเดียว ===== */
.hd-create{display:none}
@media (min-width:960px){
  .hd-create{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 16px;border-radius:20px;margin-right:6px}
  .shell.role-admin .fab,.shell.role-team_leader .fab{display:none}
  .pg-home .tiles{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;max-width:none;margin-bottom:14px}
  .pg-home .tiles .tile{flex-direction:row;justify-content:flex-start;gap:10px;min-height:56px;padding:8px 10px;text-align:left}
  .pg-home .tiles .tile i{width:36px;height:36px;border-radius:12px}
  .pg-home .tiles .tile span{font-size:.875rem;font-weight:600;white-space:nowrap}
  .pg-home .tiles .tile small{display:block;margin-top:0;font-size:.75rem}
}
/* ปฏิทิน: ใช้สองสี (ฟ้า = ยังต้องทำ · เทา = เสร็จแล้ว) จุดเล็กใต้ตัวเลข ไม่มีป้ายสี/ตัวเลขซ้อน */
.cal-g span:nth-child(1),.cal-g span:nth-child(7){color:var(--text-2)}
.cal-c u{font-size:0;width:6px;height:6px;min-width:0;padding:0;border-radius:50%;bottom:3px;line-height:0}
.cal-c u.k-open,.cal-c u.k-late{background:var(--primary);color:var(--primary)}
.cal-c u.k-done{background:#B6BEC9;color:#B6BEC9}
.cal-c u.k-ev{background:#D7DCE3;color:#D7DCE3}
.cal-c.sel u{background:#fff!important;color:#fff!important}
.cal-c.today:not(.sel){box-shadow:inset 0 0 0 1.5px var(--line)}
.cal-leg{gap:14px}
.cal-leg .ck{background:none!important;padding:0;font-weight:500;color:var(--text-2)!important}
.cal-leg .ck-open::before{background:var(--primary)}.cal-leg .ck-done::before{background:#B6BEC9}.cal-leg .ck-late{display:none}
.cal-day .trow.k-open,.cal-day .trow.k-late,.cal-day .trow.k-done{box-shadow:none}
.cal-day .ck{background:none;padding:0;font-weight:500}
.cal-day .ck-open{color:var(--primary)}.cal-day .ck-done{color:var(--text-2)}.cal-day .ck-late{color:#C77700}

/* แถบเตือนใต้หัวหน้า (ค้างส่งอีเมล / เปิดแจ้งเตือน) อยู่ในกล่องเดียวเต็มความกว้าง — เดิมแต่ละแถบกินช่องในกริดสองคอลัมน์ ทำให้ส่วนหลักและปฏิทินเลื่อนผิดที่ */
.banrow{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}.banrow .mailban{margin:0}
@media (min-width:960px){.pg-home:has(.hm-side)>.banrow{grid-column:1/-1}.banrow{flex-direction:row;flex-wrap:wrap}.banrow .mailban{width:auto;flex:0 1 auto}}
#banners{}
@media (min-width:960px){#banners{left:auto;right:24px;transform:none;top:18px}}

/* ใบเบิกค่าเดินทาง */
.cl-row{align-items:center}
.cl-th{width:44px;height:44px;border-radius:10px;object-fit:cover;flex:none;background:var(--card-2);display:flex;align-items:center;justify-content:center;color:var(--text-2)}
.cl-m{flex:1;min-width:0}.cl-m b,.cl-m small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cl-st{font-size:.6875rem;font-weight:600;display:block;text-align:right}
.st-pending{color:#C77700}.st-approved{color:var(--primary)}.st-paid{color:#1E9E5A}.st-rejected{color:var(--danger)}
.cl-kinds{grid-template-columns:repeat(4,1fr)}.cl-kinds span{justify-content:center;padding:9px 4px;font-size:.8125rem}
.paynum small.cl-st{margin-top:2px}

/* คอม: หน้าต่างป๊อปอัปกระชับ ไม่กินพื้นที่ · การแจ้งเตือนเป็นแผงมุมขวาบนใต้กระดิ่ง */
@media (min-width:900px){
  .modal-card{padding:16px 20px 18px;border-radius:14px}
  .modal-card .mh{margin-bottom:8px}
  .modal-card .mh h3{font-size:1.0625rem}
  .modal-card .fl{margin-top:8px}
  .modal:has(.notif-pop){align-items:flex-start;justify-content:flex-end}
  .modal:has(.notif-pop) .modal-bg{background:transparent}
  .modal-card:has(.notif-pop){width:380px;max-height:min(560px,calc(100vh - 90px));margin:64px 28px 0 0;padding:12px 14px 14px;border-radius:14px;box-shadow:0 12px 36px rgba(0,0,0,.22);border:1px solid var(--line,rgba(0,0,0,.08))}
  .modal-card:has(.notif-pop) .tbar{margin:0 0 6px}
  .modal-card:has(.notif-pop) .notif-r{padding:8px 6px}
}
.btn.danger-btn{background:var(--danger);border-color:var(--danger);color:#fff}

/* รายงานอุปกรณ์ (PDF) + ตัวเลือกก่อนพิมพ์ */
.dc-repair{--dc:#B42318;--dcs:#FDECEA;--dcb:#F4C7C2}.dc-replace{--dc:#C4320F;--dcs:#FDECE7;--dcb:#F5CCC0}.dc-check{--dc:#B54708;--dcs:#FFF4E5;--dcb:#F3D6AE}.dc-upgrade{--dc:#1456c9;--dcs:#EAF1FD;--dcb:#C3D6F6}
.dc-ok{--dc:#11804B;--dcs:#E3F5EB;--dcb:#BDE3CF}.dc-nospec{--dc:#6B7280;--dcs:#F1F3F5;--dcb:#D9DDE2}.dc-retired{--dc:#6B7280;--dcs:#F1F3F5;--dcb:#D9DDE2}.dc-total{--dc:#111827;--dcs:#F5F7FA;--dcb:#DDE2E8}
.ar-tag{flex:none;font-size:.64rem;font-weight:600;color:var(--dc);background:var(--dcs);border-radius:999px;padding:2px 9px;white-space:nowrap}
.ar-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.ar-chip{border:1px solid var(--line,#DDE2E8);background:var(--surface);color:var(--text);border-radius:999px;padding:5px 12px;font-size:.8rem;cursor:pointer}
.ar-chip b{margin-left:3px;color:var(--dc,var(--brand-blue))}.ar-chip:hover{background:var(--dcs,var(--surface-2,#F5F7FA))}
.ar-list{max-height:min(46vh,380px);overflow:auto;border:1px solid var(--line,#DDE2E8);border-radius:10px;margin-bottom:12px}
.ar-pick{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--line,#E5E7EB);cursor:pointer}
.ar-pick:last-child{border-bottom:0}.ar-pick input{width:18px;height:18px;flex:none}
.ar-dot{width:8px;height:8px;border-radius:50%;background:var(--dc);flex:none}
.ar-n{flex:1;min-width:0;display:flex;flex-direction:column}.ar-n b{font-size:.86rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ar-n small{color:var(--muted,#6B7280);font-size:.72rem}
.ar-pick .ar-tag,.ar-chip{--dcs:transparent}.ar-pick .ar-tag{background:var(--dcs2,transparent);border:1px solid var(--dcb)}
@media print{.keep,.ar-item{break-inside:avoid;page-break-inside:avoid}.ar-h{break-after:avoid}}

/* รายงานอุปกรณ์ — แบบทางการ: ขาว-ดำ-เทา เส้นบาง ตารางเรียบ (สีเฉพาะที่ต้องเน้น) */
.ar2-mute{color:#6B7280;font-size:.92em}
.ar2-info{width:100%;border-collapse:collapse;margin-top:14px;font-size:.74rem}
.ar2-info th,.ar2-info td{border:1px solid #9CA3AF;padding:6px 9px;text-align:left}
.ar2-info th{background:#F3F4F6;width:14%;font-weight:600;white-space:nowrap}
.paper .ar2-h{font-size:.86rem;font-weight:700;color:#111827;margin:20px 0 8px;padding-bottom:4px;border-bottom:1.5px solid #111827}
.ar2-sum{width:60%;border-collapse:collapse;font-size:.74rem}
.ar2-sum th,.ar2-sum td{border:1px solid #9CA3AF;padding:5px 9px;text-align:left}
.ar2-sum th{background:#F3F4F6;font-weight:600}.ar2-sum .n{text-align:center;width:24%}
.ar2-sum .tot td{font-weight:700;background:#F9FAFB}
.ar2-scope{margin:6px 0 0;font-size:.68rem;color:#6B7280}
.ar2-rec{margin:0;padding-left:20px;font-size:.74rem;line-height:1.55}.ar2-rec li{margin-bottom:6px}
.ar2-t{border:1px solid #9CA3AF;border-bottom:0;font-size:.68rem}
.ar2-r{display:grid;grid-template-columns:26px 1.35fr 1.1fr .9fr 1.9fr 1.25fr;gap:0;border-bottom:1px solid #9CA3AF;line-height:1.45}
.ar2-r>span{padding:6px 7px;border-left:1px solid #D1D5DB;min-width:0;overflow-wrap:anywhere}.ar2-r>span:first-child{border-left:0}
.ar2-r .c{text-align:center;padding-left:2px;padding-right:2px}
.ar2-th>span{background:#F3F4F6;font-weight:700;color:#111827}
.ar2-sn{font-family:Consolas,monospace;font-size:.95em}
.ar2-st.hot{color:#B42318}
.ar2-sign{display:grid;grid-template-columns:1fr 1fr;gap:48px;margin-top:34px;font-size:.72rem}
.ar2-sign>div{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.ar2-sign i{display:block;width:100%;height:46px;border-bottom:1px solid #374151;margin-bottom:6px}
.ar2-sign small{color:#4B5563}
@media print{.ar2-r,.ar2-sum,.ar2-sign{break-inside:avoid;page-break-inside:avoid}.ar2-h{break-after:avoid}}

/* ตัวเลขกว้างเท่ากันทุกหลัก (ยอดเงิน จำนวน เวลา เรียงตรงคอลัมน์) */
body{font-variant-numeric:tabular-nums}

/* ปฏิกิริยาต่อเมาส์ (เฉพาะจอที่มีเมาส์): การ์ดที่กดได้ยกขึ้น 2px · รูปซูมเล็กน้อยในกรอบ · ปุ่มกดแล้วยุบ (มีอยู่แล้ว) — ไม่เอียง ไม่เลื่อนตามการสกรอลล์ */
@media (hover:hover) and (pointer:fine){
  .tcard,.mcard{transition:transform .16s ease-out,background .15s,box-shadow .16s}
  .tcard:hover,.mcard:hover{transform:translateY(-2px);box-shadow:0 6px 16px -10px rgba(15,35,65,.35)}
  .tcard:active,.mcard:active{transform:none}
  .gimg img{transition:transform .2s ease-out}
  .gimg:hover img{transform:scale(1.03)}
}

/* มือถือ: ถ้าปุ่มขวามากจนหัวข้อเหลือแคบกว่า 7rem (เช่น "บริษัทลูกค้าและพาร์ทเนอร์" ของหัวหน้า) ให้ปุ่มลงแถวใหม่ชิดขวา แทนบีบหัวข้อจนตัวอักษรหักเป็นแถวตั้ง */
@media (max-width:599px){
  .phead{flex-wrap:wrap}
  .ph-t{flex:1 1 7rem;min-width:7rem}
  .ph-a{margin-left:auto}
}
/* ปุ่มกลุ่มในหน้าต่างเลือกพิมพ์รายงานอุปกรณ์: แตะง่ายบนมือถือ */
@media (max-width:599px){ .ar-chip{min-height:36px} .ar-pick{min-height:48px} }
/* ตารางในเอกสารรายงานบนมือถือ: ให้พอดีจอ ไม่ต้องเลื่อนข้างเพื่อดูคอลัมน์ท้าย */
@media (max-width:599px){ .paper .p-table{font-size:.625rem} .paper .p-table th,.paper .p-table td{padding:4px 3px} .paper .p-table td:first-child,.paper .p-table th:first-child{padding-left:0} }

/* ===== ปุ่มตอบสนองทันที: กด = ยุบ+พื้นเข้มขึ้น · กดค้าง (ตั้งแต่ ~0.35 วิ) = ยุบลึก มีกรอบสี คงไว้จนปล่อย ===== */
.btn,.ibtn,.fab,.tool-btn,.tile,.mcard,.tcard,.trow,.srow,.fold-btn,.theme-pick button,.ttabs button,.tchips button,.tk-tabs button,.ar-chip,.cal-c,.stars button{
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;
  transition:transform .1s ease-out,background-color .1s,box-shadow .12s,opacity .1s,filter .1s}
.btn:active:not(:disabled),.ibtn:active,.fab:active,.tool-btn:active,.tile:active,.fold-btn:active,.theme-pick button:active,.ttabs button:active,.tchips button:active,.tk-tabs button:active,.ar-chip:active,.cal-c:active,.stars button:active{transform:scale(.95);opacity:1}
.btn:not(.primary):not(.link):active:not(:disabled),.ibtn:active,.tool-btn:active,.ar-chip:active{background-color:var(--line)}
.btn.primary:active:not(:disabled),.fab:active{filter:brightness(.86)}
.tcard:active,.mcard:active,.trow:active,.srow:active{transform:scale(.985);background-color:var(--card-2);opacity:1}
html .is-hold{transform:scale(.93);box-shadow:0 0 0 3px var(--primary-s),inset 0 0 0 2px var(--primary);filter:brightness(.94);animation:holdin .24s ease-out both}
@keyframes holdin{from{transform:scale(.98);box-shadow:0 0 0 0 var(--primary-s),inset 0 0 0 0 var(--primary)}to{transform:scale(.93);box-shadow:0 0 0 3px var(--primary-s),inset 0 0 0 2px var(--primary)}}
.tcard.is-hold,.mcard.is-hold,.trow.is-hold,.srow.is-hold{transform:scale(.97)!important}
/* หน้าหลัก/รายการงาน: ไม่มีจุดนำหน้า — เหลือจุดแดง "ยังไม่อ่าน" มุมขวาบนจุดเดียว */
.tcard .tc-f .pill::before{display:none}
.tcard .tc-f .pill{padding-left:0}
.trow[onclick^="openTicket"]>.sdot{display:none}

/* ===== เอฟเฟกต์กดครอบคลุมทุกตัวที่กดได้ (ปุ่ม ลิงก์ ป้ายเลือก แถว/การ์ดที่มี onclick) ===== */
button:not(:disabled),[role=button],.lnk,a[href],label.opt,.catpick label,.urg label,.kindpick label,summary,[onclick]:not(.modal-bg):not(.modal){
  -webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:not(:disabled):not(.modal-bg),[role=button],label.opt,.catpick label,.urg label,.kindpick label,summary{
  transition:transform .1s ease-out,background-color .1s,box-shadow .12s,opacity .1s,filter .1s}
button:not(:disabled):active,[role=button]:active,label.opt:active,.catpick label:active,.urg label:active,.kindpick label:active,summary:active{transform:scale(.96);filter:brightness(.92)}
.trow:active,.tcard:active,.mcard:active,.srow:active,.paylist:active,.rr-main:active,.mailban:active,.dm-li:active{transform:scale(.985)}
.lnk:active,a[href]:active{opacity:.55}
.gimg:active,.proof-img:active,.join-photo:active{transform:scale(.97);filter:brightness(.9)}
.tab:active{transform:scale(.92);filter:none;background-color:var(--primary-s)}
.xbtn:active,.dm-x:active{transform:scale(.88)}
.is-hold{transform:scale(.93)!important;box-shadow:0 0 0 3px var(--primary-s),inset 0 0 0 2px var(--primary)!important;filter:brightness(.94)}
html .tcard.is-hold,html .mcard.is-hold,html .trow.is-hold,html .srow.is-hold,html .paylist.is-hold{transform:scale(.97);animation-name:holdincard}
@keyframes holdincard{from{transform:scale(.99);box-shadow:0 0 0 0 var(--primary-s),inset 0 0 0 0 var(--primary)}to{transform:scale(.97);box-shadow:0 0 0 3px var(--primary-s),inset 0 0 0 2px var(--primary)}}
/* ที่เหลือ: แถว/กล่องที่มี onclick และป้ายติ๊กเช็กลิสต์ */
[onclick]:not(.modal-bg):not(.modal):not(button):not(.trow):not(.tcard):active{opacity:.7}
label:has(input[type=checkbox]):active,label:has(input[type=radio]):active{transform:scale(.97);filter:brightness(.93)}

/* ใบเบิกค่าเดินทาง: แผงรายสัปดาห์/รายเดือน · สรุปยอด · รายการจัดกลุ่มตามวัน · ประวัติของใบเบิก */
.paynav b{text-align:center;line-height:1.25}
.cl-now{display:block;font-size:.6875rem;font-weight:500;color:var(--primary)}
.cl-seg{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px}
.cl-seg .ttabs{flex:1}
.cl-sum{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:2px 0 6px}
@media (min-width:600px){.cl-sum{grid-template-columns:repeat(4,minmax(0,1fr))}}
.cl-sum>div{background:var(--card-2);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.cl-sum b{font-size:1.125rem;font-weight:600;line-height:1.2}.cl-sum span{font-size:.75rem;color:var(--text-2)}
.cl-sum .hot b{color:var(--danger)}
.cl-gh{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:14px 2px 6px;font-size:.8125rem}
.cl-gh b{font-weight:600}.cl-gh span{color:var(--text-2);font-size:.75rem;white-space:nowrap}
.cl-thw{position:relative;flex:none;display:block;width:44px;height:44px}
.cl-thw .cl-th{width:44px;height:44px}
.cl-thw i{position:absolute;right:-4px;bottom:-4px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:var(--text);color:var(--surface);font-style:normal;font-size:.6875rem;font-weight:600;display:flex;align-items:center;justify-content:center}
.matrix tr.sel td{background:var(--primary-s)}
.cl-tl{list-style:none;margin:0 0 4px;padding:0}
.cl-tl li{position:relative;display:flex;gap:12px;padding:0 0 14px}
.cl-tl li::before{content:'';position:absolute;left:5px;top:14px;bottom:0;width:2px;background:var(--line)}
.cl-tl li:last-child{padding-bottom:0}.cl-tl li:last-child::before{display:none}
.tl-dot{flex:none;width:12px;height:12px;border-radius:50%;margin-top:4px;background:var(--text-3)}
.tl-ok{background:var(--ok)}.tl-no{background:var(--danger)}.tl-new{background:var(--primary)}
.cl-tl b{display:block;font-weight:600;font-size:.875rem}.cl-tl small{display:block;color:var(--text-2);font-size:.75rem}
.cl-tl p{margin:3px 0 0;font-size:.8125rem;color:var(--text);overflow-wrap:anywhere}

/* แบนเนอร์ชวนเปิดแจ้งเตือน: ปุ่มปิด (ซ่อน 30 วัน) */
.banwrap{position:relative;display:flex}
.banwrap .mailban{padding-right:44px;margin:0}
.ban-x{position:absolute;right:0;top:0;bottom:0;width:44px;border:0;background:none;color:var(--danger);display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:12px}
.banrow .banwrap{width:100%}
@media (min-width:960px){.banrow .banwrap{width:auto;flex:0 1 auto}}
/* หน้าแรกแอดมิน/หัวหน้าทีม: ทางลัดอยู่ใต้รายการงาน แถวเดียวกะทัดรัด */


/* ===== โมชั่นตอนกด: ระลอกคลื่นจากจุดที่แตะ · กดค้างยุบลงพร้อมกรอบสี ===== */
.btn,.tool-btn,.ar-chip,.theme-pick button,.ttabs button,.tchips button,.stars button{position:relative}
.btn,.fab,.tool-btn,.ar-chip,.theme-pick button,.ttabs button,.tchips button,.stars button{overflow:hidden}
.rip{position:absolute;border-radius:50%;background:currentColor;opacity:.18;transform:scale(0);animation:rip .55s ease-out forwards;pointer-events:none}
@keyframes rip{to{transform:scale(1);opacity:0}}
/* เครื่องที่ตั้ง "ลดการเคลื่อนไหว": ปิดแอนิเมชันใหญ่/วนซ้ำ แต่ยังให้เห็นการยุบ/เปลี่ยนสีตอนกดแบบสั้น ๆ (0.12 วิ) เพื่อรู้ว่ากดติดแล้ว */
@media (prefers-reduced-motion:reduce){
  .rip{display:none}
  button,[role=button],.btn,.ibtn,.fab,.tool-btn,.tile,.mcard,.tcard,.trow,.srow,.fold-btn,.ttabs button,.tchips button,.tk-tabs button,.ar-chip,.cal-c,.stars button,.theme-pick button,label.opt,.catpick label,.urg label,.kindpick label{
    transition:transform .12s ease-out,background-color .12s,box-shadow .12s,filter .12s,opacity .12s!important}
  html .is-hold{animation:holdin .12s ease-out both!important}
}

/* เครื่องมือ (ลิงก์/ไฟล์ไว้ใช้งาน) */
.tool-r{gap:10px;align-items:center}
.tool-r .tool-ic{flex:none;width:40px;height:40px;display:grid;place-items:center;border-radius:var(--r-md,10px);background:var(--surface-2,rgba(127,127,127,.12));color:var(--primary)}
.tool-r .tr-m{min-width:0;flex:1}
.tool-r .tr-m b,.tool-r .tr-m small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.tool-r .btn{flex:none;text-decoration:none}

/* หน้า "ฉัน": จอกว้างแบ่งเป็น 2 คอลัมน์ จอแคบเรียงต่อกันเหมือนเดิม */
.me-col{display:contents}
@media (min-width:1100px){
  .me-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px;align-items:start;margin-top:16px}
  .me-col{display:flex;flex-direction:column;gap:16px;min-width:0}
  .me-col>.sgroup{margin:0;max-width:none}
  .me-col>.sec-h:first-child{margin-top:0}
  .me-col>*{margin-top:0}
  .me-card+.me-grid{margin-top:16px}
}

/* ประวัติทั้งระบบ: ตัวกรอง */
.au-filter{display:flex;flex-direction:column;gap:10px}
.au-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.au-row .au-q{grid-column:1/-1}

/* หน้า ฉัน ของช่าง: แท็บ งานของฉัน | ตั้งค่า (แสดงทีละส่วน) */
.me-tabs{margin:14px 0 4px}
.me-tabbed{grid-template-columns:minmax(0,1fr)!important;max-width:720px}
.me-tabbed[data-tab=work] [data-p=set],.me-tabbed[data-tab=set] [data-p=work]{display:none}

/* ฟอร์มสร้างงาน: ปุ่มสร้าง/ยกเลิกติดล่างของกล่อง ไม่ต้องเลื่อนลงไปหา */
.modal-card:has(.create-grid){padding-bottom:0}
.modal-card:has(.create-grid)>.row.end{position:sticky;bottom:0;z-index:2;margin:10px -18px 0;padding:10px 18px calc(var(--sab) + 12px);background:var(--surface);border-top:1px solid var(--line)}
@media (min-width:900px){.modal-card:has(.create-grid)>.row.end{margin:12px -34px 0;padding:12px 34px 16px}}
.dpick{display:flex;gap:8px;align-items:center;position:relative}.dpick input[type=text]{flex:1;min-width:0}
.dpick input[type=date]{position:absolute;right:0;bottom:0;width:1px;height:1px;opacity:0;pointer-events:none}

.combo{position:relative}
.combo-list{position:absolute;left:0;right:0;top:100%;z-index:6;max-height:220px;overflow:auto;margin:4px 0 0;padding:4px;list-style:none;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}
.combo-list li{padding:9px 10px;border-radius:8px;cursor:pointer;font-weight:400;font-size:.9375rem}
.combo-list li.on,.combo-list li[data-id]:hover{background:var(--primary-s)}
.combo-list li.none{color:var(--text-2);cursor:default}

.trow .plan-d{display:block;font-weight:500;color:var(--primary)}.trow .plan-d.late{color:var(--danger,#c0392b)}

/* หน้ายืนยันก่อนเปลี่ยนรหัสผ่าน */
.cf-list{margin:6px 0 4px;padding-left:20px;display:grid;gap:6px;font-size:.9375rem;line-height:1.45}
.cf-chk{display:flex;gap:10px;align-items:flex-start;margin:14px 0 4px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;font-size:.9375rem;cursor:pointer}
.cf-chk input{margin-top:3px;width:18px;height:18px;flex:none}

/* หน้า อนุมัติ OT */
.ot-list{display:grid;gap:8px}
.ot-card{border:1px solid var(--line);border-radius:14px;padding:12px 14px;background:var(--surface)}
.ot-top{display:flex;justify-content:space-between;align-items:center;gap:8px}.ot-amt{font-weight:600}
.ot-meta{font-size:.8125rem;color:var(--text-2);margin-top:2px}.ot-note{font-size:.9375rem;margin-top:4px}
.paysum .hot b{color:var(--danger)}
@media (min-width:900px){.ot-list{grid-template-columns:repeat(2,1fr)}}

/* ยอดรวมเดือนนี้ (หน้า ฉัน ของช่าง) */
.mtot{display:inline-flex;flex-direction:column;align-items:flex-end;line-height:1.1;padding:4px 10px;border-radius:12px;background:var(--primary-s);color:var(--primary);align-self:center}
.mtot small{font-size:.6875rem;opacity:.85}.mtot b{font-size:.9375rem;font-weight:600}

/* ---------- แดชบอร์ดสไตล์ Purple (หน้ารายงาน) ---------- */
.pd{--pd-1:#2a78d6;--pd-2:#eb6834;--pd-3:#1baf7a;--pd-4:#eda100;--pd-5:#e87ba4;--pd-x:#8a8f98;margin:14px 0 18px}
:root[data-theme=dark] .pd{--pd-1:#3987e5;--pd-2:#d95926;--pd-3:#199e70;--pd-4:#c98500;--pd-5:#d55181;--pd-x:#7b818b}
.pd-cards{display:grid;grid-template-columns:1fr;gap:12px}
.pd-card{position:relative;overflow:hidden;border-radius:14px;padding:18px 20px 16px;color:#fff;min-height:150px;display:flex;flex-direction:column;box-shadow:0 6px 16px rgba(20,30,50,.12)}
.pd-card::before,.pd-card::after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.16);pointer-events:none}
.pd-card::before{width:190px;height:190px;right:-60px;top:-70px}.pd-card::after{width:150px;height:150px;right:-40px;bottom:-70px;background:rgba(255,255,255,.12)}
.pd-card.c1{background:linear-gradient(135deg,#ec7b3f,#d93a6a)}.pd-card.c2{background:linear-gradient(135deg,#3d8fe6,#1b57c4)}.pd-card.c3{background:linear-gradient(135deg,#1ea88f,#0c7b78)}
.pd-ic{position:absolute;right:20px;top:18px;opacity:.95}.pd-t{font-size:1.0625rem;font-weight:500;position:relative}
.pd-v{font-size:2.25rem;font-weight:600;line-height:1.1;margin:10px 0 auto;position:relative}.pd-f{font-size:.875rem;font-weight:500;position:relative;margin-top:12px}
.pd-row{display:grid;grid-template-columns:1fr;gap:12px;margin-top:12px}
.pd-panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px 18px;min-width:0}
.pd-ph{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}.pd-ph h3{margin:0;font-size:1.0625rem;font-weight:500}
.pd-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:.8125rem;color:var(--text-2)}.pd-lg{display:inline-flex;align-items:center;gap:6px}
.pd-lg i,.pd-list i{width:10px;height:10px;border-radius:50%;display:inline-block;flex:none}
.pd-d1{background:var(--pd-1)}.pd-d2{background:var(--pd-2)}.pd-d3{background:var(--pd-3)}.pd-d4{background:var(--pd-4)}.pd-d5{background:var(--pd-5)}.pd-dx{background:var(--pd-x)}
.pd-s1{fill:var(--pd-1);stroke:var(--pd-1)}.pd-s2{fill:var(--pd-2);stroke:var(--pd-2)}.pd-s3{fill:var(--pd-3);stroke:var(--pd-3)}.pd-s4{fill:var(--pd-4);stroke:var(--pd-4)}.pd-s5{fill:var(--pd-5);stroke:var(--pd-5)}.pd-sx{fill:var(--pd-x);stroke:var(--pd-x)}
.pd-svg path{stroke:none}.pd-svg{width:100%;height:auto;display:block}
.pd-grid{stroke:var(--line);stroke-width:1}.pd-ax{fill:var(--text-2);font-size:11px}.pd-big{fill:var(--text);font-size:22px;font-weight:600}
.pd-donut{display:flex;flex-direction:column;align-items:center;gap:14px}.pd-donut svg{width:min(210px,70%);height:auto}.pd-donut circle{fill:none}
.pd-list{list-style:none;margin:0;padding:0;width:100%;display:grid;gap:8px}
.pd-list li{display:grid;grid-template-columns:12px 1fr auto 34px;gap:10px;align-items:center;font-size:.875rem}
.pd-list b{font-weight:500}.pd-list small{color:var(--text-2);text-align:right}
@media (min-width:700px){.pd-cards{grid-template-columns:repeat(3,1fr)}}
@media (min-width:1000px){.pd-row{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr)}}

.dv-now{color:var(--primary);font-weight:600}

/* จุดแดงมุมขวาบนของปุ่มประเภทงาน (ตอนนี้ใช้กับ MA เมื่อมีงานเปิดอยู่) */
.tchips button{position:relative}
.tchips .rdot{position:absolute;top:3px;right:5px;width:10px;height:10px;border-radius:50%;background:var(--danger);box-shadow:0 0 0 2px var(--surface,#fff);pointer-events:none}

/* คอมพิวเตอร์ (จอใหญ่ + เมาส์): ย่อหน้าจอลง 10% — มือถือ/แท็บเล็ตไม่กระทบ */
@media (min-width:1025px) and (hover:hover) and (pointer:fine){
  html{zoom:.9}
  /* zoom ย่อหน่วย vh ด้วย จึงชดเชยให้เต็มจอเหมือนเดิม */
  .shell{height:111.12vh;height:111.12dvh}
  .modal-card:has(.dm-full){width:111.12vw;height:111.12dvh}
  .dm-full,.dm-full .dm-wrap,.dm-wrap.dm-full{height:111.12dvh}
}

/* การ์ดงาน: ป้ายในแถวล่าง (ชื่อช่าง ราคา เวลา) ต้องไม่ถูกตัดเป็น "..." — ถ้าที่ไม่พอให้ขึ้นบรรทัดใหม่ */
.tcard .tc-f{flex-wrap:wrap;row-gap:6px;column-gap:12px}
.tcard .tc-f>*,.tcard .tc-f .tag{flex:none;min-width:max-content;max-width:100%;overflow:visible;text-overflow:clip}
.tcard .tc-f .sp{flex:1 1 0;min-width:0}
.tcard .tc-f .btn{margin-left:auto}

/* จอคอม: ให้เนื้อหาใช้พื้นที่เต็มและกระจายเป็นคอลัมน์/การ์ด ไม่กระจุกอยู่ตรงกลางหรือชิดซ้าย (ทุกบทบาท) */
@media (min-width:1200px){
  .shell .page,.shell .pg-home,.shell .pg-home:has(.hm-side){max-width:1760px;margin:0;padding-left:36px;padding-right:36px}
  .shell .pg-home:has(.hm-side){grid-template-columns:minmax(0,1fr) 400px;gap:0 36px}
  /* รายการการ์ด (งาน ทีมช่าง โปรเจกต์) เรียงเป็นกริดเต็มความกว้าง */
  .shell .page .list:not(.dense){grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:14px}
  /* แถบไอคอนด้านบนหน้าหลัก: กระจายเต็มแถวเป็นการ์ด */
  .shell .pg-home .tiles{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
  /* หน้า ฉัน: ใช้สองคอลัมน์เต็มความกว้าง ไม่บีบตั้งค่าเป็นแถบแคบ */
  .shell .pg-me .me-grid{max-width:none}
  .shell .fold[data-fold="me-disp"],.shell .pg-me .sgroup{max-width:none;margin-left:0;margin-right:0}
}

/* ปุ่ม/ไอคอนไม่มีพื้นหลัง (จอคอม) — เหลือแค่ไอคอนกับตัวหนังสือ; พื้นหลังโผล่เฉพาะตอนเอาเมาส์ชี้ */
@media (min-width:960px){
  .shell .tile,.shell .tiles.compact .tile{background:transparent;box-shadow:none}
  .shell .tile:hover,.shell .tiles.compact .tile:hover{background:var(--card-2)}
  .shell .tile i,.shell .tcard .tc-ic,.shell .mcard>i,.shell .dev-ic{background:transparent}
}

/* หน้า ฉัน (จอคอม): คงรูปแบบเดิม จัดปุ่มให้เป็นระเบียบ — ปุ่มโหมดสี/ภาษาขนาดพอดี ขอบซ้ายตรงกับแถวเมนู */
@media (min-width:960px){
  .shell .pg-me .theme-pick{display:flex;flex-wrap:wrap;gap:10px;padding:6px 16px 16px}
  .shell .pg-me .theme-pick button{width:auto;min-width:112px;flex:0 0 auto;justify-content:center;padding:6px 16px 6px 10px}
  .shell .pg-me .me-card .btn{flex:none;white-space:nowrap}
  .shell .pg-me .sgroup .srow{padding-left:20px;padding-right:20px}
  .shell .pg-me .theme-pick{padding-left:20px;padding-right:20px}
}

/* หน้า ฉัน (จอคอม): ไม่ให้ยาวแนวนอนเกินไป — กว้างพอดีอ่านง่าย กึ่งกลาง */
@media (min-width:960px){
  .shell .page.pg-me{max-width:960px;margin-left:auto;margin-right:auto}
}

/* รายงานประจำเดือนของช่าง: คอลัมน์วันที่/เลขงานไม่ตกบรรทัด ความกว้างคอลัมน์คงที่ ข้อความยาวตัดคำในช่องของตัวเอง */
.p-table.mr-jobs,.p-table.mr-co{table-layout:fixed}
.p-table.mr-jobs td,.p-table.mr-co td{overflow-wrap:anywhere;word-break:normal;vertical-align:top}
.p-table .nw{white-space:nowrap;overflow-wrap:normal}
.p-table.mr-jobs th,.p-table.mr-co th{white-space:nowrap}
.p-table.mr-jobs td.c,.p-table.mr-co td.c{text-align:center}

/* ตารางสรุปผลรายงานประจำเดือน: กระชับ 2 แถว หัวข้อไม่ตกบรรทัด */
.p-grid.mr-sum{margin-top:8px}
.p-grid.mr-sum th,.p-grid.mr-sum td{padding:4px 8px;width:auto;white-space:nowrap}
.p-grid.mr-sum th{width:1%}

/* สรุปผลรายงานประจำเดือน: กริด 3 คอลัมน์ ป้ายซ้าย ค่าขวา — ไม่ใช้ตาราง จึงไม่เพี้ยน/ล้นกรอบ */
.mr-kpi{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #DDE2E8;margin-top:6px}
.mr-kpi>div{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:6px 10px;border-right:1px solid #DDE2E8;border-bottom:1px solid #DDE2E8;min-width:0}
.mr-kpi>div:nth-child(3n){border-right:0}.mr-kpi>div:nth-child(n+4){border-bottom:0}
.mr-kpi span{color:#4B5563;white-space:nowrap}
.mr-kpi b{font-weight:600;text-align:right;white-space:nowrap}
.mr-kpi .tot{background:#F5F7FA}

/* รายงานประจำเดือน: จอแคบ (มือถือ/หน้าต่างเล็ก) — สรุปผล 2 คอลัมน์ ตารางไม่ล้น */
@media (max-width:720px){
  .mr-kpi{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mr-kpi>div{border-right:1px solid #DDE2E8!important;border-bottom:1px solid #DDE2E8!important}
  .mr-kpi>div:nth-child(2n){border-right:0!important}.mr-kpi>div:nth-last-child(-n+2){border-bottom:0!important}
  .mr-kpi span,.mr-kpi b{white-space:normal}
  .p-table.mr-jobs col:nth-child(1){width:21%}.p-table.mr-jobs col:nth-child(2){width:27%}.p-table.mr-jobs col:nth-child(4){width:9%}.p-table.mr-jobs col:nth-child(5){width:15%}
  .p-table.mr-jobs th,.p-table.mr-co th{white-space:normal}
  .p-table.mr-jobs .nw{white-space:normal}
}

/* รายงานประจำเดือน: ทุกตารางกระชับ — แถวเตี้ยลง ระยะขอบน้อยลง ตัวหนังสือเล็กลงเล็กน้อย */
.paper:has(.mr-kpi){line-height:1.35}
.paper:has(.mr-kpi) h2{margin:12px 0 4px}
.paper:has(.mr-kpi) .p-grid{margin-top:8px}
.paper:has(.mr-kpi) .p-grid th,.paper:has(.mr-kpi) .p-grid td{padding:3px 8px}
.paper:has(.mr-kpi) .p-table{font-size:.69rem}
.paper:has(.mr-kpi) .p-table th{padding:3px 6px}
.paper:has(.mr-kpi) .p-table td{padding:3px 6px;line-height:1.3}
.paper:has(.mr-kpi) .mr-kpi>div{padding:3px 8px}
.paper:has(.mr-kpi) .p-signs{margin-top:16px}
.paper:has(.mr-kpi) .p-sigbox{height:52px}

/* มือถือ: เว้นที่ใต้เนื้อหาให้พ้นแถบโฮม/ท่าทางของเครื่อง (safe-area) — ปุ่มล่างสุดของหน้าและของหน้าต่างด้านข้างจะไม่ถูกบัง */
@media (max-width:959px){
  .scroll{padding-bottom:calc(112px + var(--sab))}
  .sheet-body{padding-bottom:calc(64px + var(--sab))}
  .stick-act{padding-bottom:calc(18px + var(--sab))}
  .fab{bottom:calc(var(--sab) + 92px)}
  .modal-card{padding-bottom:calc(var(--sab) + 30px)}
  .modal-card:has(.create-grid){padding-bottom:0}
}

/* หน้า ฉัน ของช่าง: กระชับ — ตัดข้อความอธิบายยาว ๆ ในการ์ดยอดเงิน/OT/ใบเบิก ลดระยะขอบ ลดความสูงปุ่มและรายการ */
.pg-me .paycard{padding:10px 12px;border-radius:14px}
.pg-me .paycard .hint{display:none}
.pg-me .paycard .paynav{margin-bottom:6px}
.pg-me .paycard .paynav .ibtn{width:36px;height:36px}
.pg-me .paysum{gap:6px}
.pg-me .paysum div{padding:5px 4px;border-radius:10px}
.pg-me .paysum b{font-size:1.0625rem}
.pg-me .paysum span{font-size:.6875rem}
.pg-me .paylist-box{margin-top:6px;max-height:150px}
.pg-me .paylist{padding:5px 2px}
.pg-me .paycard>.btn.block{min-height:38px;font-size:.875rem;padding:0 12px}
.pg-me .sec-h{margin:10px 4px 4px}
.pg-me .sgroup .srow{min-height:46px;padding-top:8px;padding-bottom:8px}
.pg-me .me-col>.sgroup{margin-top:10px}

/* ปฏิทินมุมมองรายการเลื่อนลง (agenda) แบบ MS Teams */
.cal-h .ag-month{font-size:1rem;font-weight:600;text-align:left}
.calwrap .cal-h:has(.ag-month){display:flex;gap:8px}
.cal-h .ag-today,.cal-h .ag-sw{min-height:32px;padding:0 12px;border-radius:999px;font-size:.8125rem}
.ag-scroll{max-height:62vh;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;margin-top:8px;border-top:1px solid var(--line)}
.ag-d{border-bottom:1px solid var(--line)}
.ag-h{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:10px;padding:8px 2px;background:var(--card)}
.ag-n{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:.9375rem}
.ag-w{font-size:.8125rem;font-weight:600;color:var(--text-2)}
.ag-d.today .ag-n{background:var(--primary);color:#fff}
.ag-d.today .ag-w{color:var(--primary)}
.ag-d.past .ag-n,.ag-d.past .ag-w{opacity:.65}
.ag-r{padding:0 0 10px 42px}
.ag-r .trow{background:var(--card-2);border-radius:14px;padding:10px 12px;margin-top:6px;border:0}
.ag-r .trow.k-open{box-shadow:inset 3px 0 0 var(--k-open)}.ag-r .trow.k-late{box-shadow:inset 3px 0 0 var(--k-late)}.ag-r .trow.k-done{box-shadow:inset 3px 0 0 var(--k-done)}
.ag-r .cal-none{text-align:left;margin:2px 0 8px}
@media (max-width:959px){.ag-scroll{max-height:calc(100dvh - 260px);min-height:300px}}

/* agenda: กระชับขึ้น */
.calwrap .cal-h{margin-bottom:4px}
.cal-h .ag-month{font-size:.9375rem}
.cal-h .ag-today,.cal-h .ag-sw{min-height:28px;padding:0 10px;font-size:.75rem}
.cal-h .ibtn{width:30px;height:30px}
.calwrap .cal-leg{margin:0;gap:10px;font-size:.6875rem}
.calwrap .cal-leg .ck{padding:0;background:none}
.ag-scroll{margin-top:4px}
.ag-h{padding:5px 2px;gap:8px}
.ag-n{width:26px;height:26px;font-size:.8125rem}
.ag-w{font-size:.75rem}
.ag-r{padding:0 0 6px 34px}
.ag-r .trow{padding:6px 10px;margin-top:4px;border-radius:10px;min-height:0;gap:8px}
.ag-r .trow .tr-m b{font-size:.8125rem;line-height:1.3}
.ag-r .trow .tr-m small{font-size:.6875rem;line-height:1.3;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ag-r .trow .ck{font-size:.625rem;padding:1px 6px}
.ag-r .trow svg{width:14px;height:14px}
.ag-r .cal-none{margin:0 0 4px;font-size:.75rem}
.ag-d.past:not(:has(.trow)){display:none}
@media (max-width:959px){.ag-scroll{max-height:calc(100dvh - 210px);min-height:260px}}

/* ชิปประเภทงาน/ตัวกรอง: ไม่มีพื้นหลัง · ตัวที่เลือกใช้สีหลักตัวหนา + เส้นใต้ */
.tchips button,.tchips button.on,.tchips.dim button,.rfilter .tchips button{background:transparent!important;box-shadow:none}
.tchips button:hover{background:transparent!important;color:var(--text)}
.tchips button.on{color:var(--primary);font-weight:600}
.tchips button.on::after{content:'';position:absolute;left:12px;right:12px;bottom:2px;height:2.5px;border-radius:2px;background:var(--primary)}
.tchips button.on.hot b,.tchips button.on b{color:inherit}

/* แท็บ LINE */
.lc-c{padding:12px;margin-bottom:10px}
.lc-c .hint{margin:4px 0}
.lc-d{margin:4px 0;white-space:pre-wrap;font-size:.9375rem}
.lc-c .row.end{margin-top:8px}
.lc-hint{margin:2px 4px 8px}

/* LINE: การ์ดรอยืนยัน */
.lc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,380px),1fr));gap:12px;align-items:start}
.lc-c{background:var(--card,#fff);border:1px solid var(--line,#e3e8ef);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:10px;box-shadow:0 1px 3px rgba(16,24,40,.06)}
.lc-top{display:flex;align-items:center;gap:10px}
.lc-av{flex:none;width:38px;height:38px;border-radius:50%;background:#06c755;color:#fff;font-weight:700;display:grid;place-items:center}
.lc-who{min-width:0;flex:1;display:flex;flex-direction:column}
.lc-who b{font-size:.9375rem}
.lc-who small{color:var(--muted,#667085);font-size:.8125rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lc-ph{flex:none;font-size:.8125rem;color:var(--muted,#667085)}
.lc-c .lc-s{margin:0;font-size:1.0625rem;line-height:1.35}
.lc-c .lc-d{margin:0;padding:10px 12px;background:rgba(127,127,127,.09);border-radius:10px;white-space:pre-wrap;font-size:.9375rem}
.lc-ai{margin:0;font-size:.8125rem;color:var(--muted,#667085)}
.lc-ai b{color:var(--primary,#1456c9);margin-right:4px}
.lc-pick{display:flex;flex-direction:column;gap:4px;font-size:.8125rem;font-weight:600}
.lc-pick em{font-weight:400;font-style:normal;color:#0d7a4f}
.lc-pick select{font-weight:400;font-size:1rem}
.lc-act{display:flex;gap:8px;justify-content:flex-end}
.lc-act .btn.primary{flex:1;max-width:60%;justify-content:center}

.csr-sg.typed.thname{font-style:normal;letter-spacing:0!important}
.lc-h{margin:12px 0 4px;font-size:13px;color:var(--muted);font-weight:600}.lc-h+.rsum{white-space:pre-wrap}
/* ทิกเก็ตจาก LINE: การ์ดสรุป + รายการ */
.lt-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:4px 0 14px}
.lt-st{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px 14px;display:grid;grid-template-columns:auto 1fr;grid-template-areas:"i n" "l l";align-items:center;gap:2px 10px;min-width:0}
.lt-st i{grid-area:i;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--primary-s);color:var(--primary)}
.lt-st b{grid-area:n;font-size:1.65rem;line-height:1;font-weight:700;justify-self:end}
.lt-st small{grid-area:l;color:var(--text-2);margin-top:6px}
.lt-st.g i{background:var(--ok-s);color:var(--ok)}.lt-st.o i{background:var(--warn-s);color:var(--warn)}.lt-st.r i{background:var(--danger-s);color:var(--danger)}.lt-st.n i{background:var(--card-2);color:var(--text-3)}
.lt-chips{display:flex;gap:8px;flex-wrap:wrap;margin:2px 0 12px}
.lt-chips button{border:1px solid var(--line);background:var(--card);color:var(--text-2);border-radius:99px;padding:6px 14px;font:inherit;font-size:.875rem;cursor:pointer}
.lt-chips button.on{background:var(--primary);border-color:var(--primary);color:var(--on-btn)}
.lt-chips small{opacity:.75;margin-left:4px}
.lt-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,420px),1fr));gap:10px}
.lt-c{display:flex;gap:12px;text-align:left;font:inherit;color:inherit;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:14px;cursor:pointer;min-width:0;box-shadow:0 1px 3px rgba(16,24,40,.05);transition:border-color .15s,box-shadow .15s}
.lt-c:hover{border-color:var(--primary);box-shadow:0 4px 14px -6px rgba(6,104,211,.35)}
.lt-av{flex:none;width:40px;height:40px;border-radius:50%;background:#06c755;color:#fff;font-weight:700;display:grid;place-items:center}
.lt-m{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.lt-top{display:flex;gap:10px;align-items:flex-start;justify-content:space-between}
.lt-top b{font-size:1rem;line-height:1.35;overflow-wrap:anywhere}
.lt-s{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;color:var(--text-2);font-size:.875rem}
.lt-s svg{flex:none;opacity:.7}
.lt-sol,.lt-msg{font-size:.875rem;border-radius:10px;padding:7px 10px;display:flex;gap:6px;align-items:flex-start;overflow-wrap:anywhere}
.lt-sol{background:var(--ok-s);color:var(--ok)}.lt-sol svg{flex:none;margin-top:3px}
.lt-msg{background:var(--card-2);color:var(--text-2)}
.lt-f{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;color:var(--text-3);font-size:.8125rem}
.lt-tag{font-weight:600;font-size:.75rem;padding:2px 9px;border-radius:99px}
.lt-tag.bot{background:var(--ok-s);color:var(--ok)}.lt-tag.team{background:var(--warn-s);color:var(--warn)}
@media (max-width:640px){.lt-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.lt-st b{font-size:1.4rem}}
/* แผงควบคุมเอไอ + รับงาน LINE */
.lt-c:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.lt-claim{margin-left:auto}
.mcard.lt-attn{border-color:var(--primary);background:var(--primary-s)}
.ai-p{max-width:760px;display:flex;flex-direction:column;gap:12px}
.ai-head{display:flex;align-items:center;gap:12px;padding:14px 16px}
.ai-dot{flex:none;width:12px;height:12px;border-radius:50%;background:var(--text-3)}
.ai-dot.on{background:var(--ok);box-shadow:0 0 0 4px var(--ok-s)}
.ai-ht{flex:1;min-width:0;display:flex;flex-direction:column}
.ai-ht small{color:var(--text-2)}
.ai-sw{flex:none;width:50px;height:30px;border-radius:99px;border:0;background:var(--line);position:relative;cursor:pointer;transition:background .2s}
.ai-sw i{position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:left .2s}
.ai-sw.on{background:var(--ok)}.ai-sw.on i{left:23px}
.ai-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media (max-width:640px){.ai-modes{grid-template-columns:1fr}}
.ai-m{display:flex;gap:12px;align-items:flex-start;text-align:left;font:inherit;color:inherit;background:var(--card);border:1.5px solid var(--line);border-radius:14px;padding:14px;cursor:pointer;position:relative;min-width:0}
.ai-m:disabled{opacity:.5;cursor:not-allowed}
.ai-m i{flex:none;width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:var(--card-2);color:var(--text-2)}
.ai-m div{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.ai-m small{color:var(--text-2);font-size:.85rem;line-height:1.45}
.ai-m .ai-r{flex:none;width:18px;height:18px;border-radius:50%;border:2px solid var(--line);margin-top:2px}
.ai-m.on{border-color:var(--primary);background:var(--primary-s)}
.ai-m.on i{background:var(--primary);color:var(--on-btn)}
.ai-m.on .ai-r{border-color:var(--primary);background:radial-gradient(var(--primary) 0 45%,transparent 50%)}
.ai-rec{font-size:.7rem;font-weight:600;color:var(--ok);background:var(--ok-s);border-radius:99px;padding:1px 7px;margin-left:4px;vertical-align:middle}
.ai-note{display:flex;gap:10px;align-items:flex-start;background:var(--card-2);border-radius:12px;padding:12px 14px;color:var(--text-2);font-size:.875rem}
.ai-note svg{flex:none;margin-top:2px}
.ai-p .row.end{align-items:center;gap:12px}
/* ทิกเก็ต LINE: แต่งสถิติ แท็บ และสรุปรายเดือน */
.lt-tabs .ttabs button{display:inline-flex;align-items:center;gap:6px}
.lt-tabs .ttabs button svg{opacity:.8}
.lt-stats{gap:12px}
.lt-st{display:flex;align-items:center;gap:14px;padding:16px 18px;border-left:4px solid var(--acc,var(--primary));grid-template-columns:none;grid-template-areas:none;transition:transform .15s,box-shadow .15s;--acc:var(--primary)}
.lt-st:hover{transform:translateY(-1px);box-shadow:var(--shadow)}
.lt-st i{width:46px;height:46px;border-radius:14px;flex:none}
.lt-st>div{display:flex;flex-direction:column;min-width:0}
.lt-st b{font-size:1.9rem;line-height:1.05;justify-self:auto}
.lt-st small{margin-top:2px;font-size:.85rem}
.lt-st.g{--acc:var(--ok)}.lt-st.o{--acc:var(--warn)}.lt-st.r{--acc:var(--danger)}.lt-st.n{--acc:var(--line)}
.ls-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:8px;margin-bottom:12px}
.ls-arrow{width:38px;height:38px;border-radius:10px;border:0;background:var(--card-2);color:var(--text);display:grid;place-items:center;cursor:pointer}
.ls-arrow:hover:not(:disabled){background:var(--primary-s);color:var(--primary)}
.ls-arrow:disabled{opacity:.35;cursor:default}
.ls-mo{display:flex;align-items:center;gap:8px;color:var(--primary)}
.ls-mo b{color:var(--text);font-size:1.05rem}
.ls-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.ls-k{display:flex;align-items:center;gap:8px;background:var(--card-2);border-radius:12px;padding:10px 12px;min-width:0;color:var(--c)}
.ls-k b{font-size:1.25rem;color:var(--text)}
.ls-k span{color:var(--text-2);font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ls-k.b{--c:var(--primary)}.ls-k.v{--c:#7a5af8}.ls-k.g{--c:var(--ok)}.ls-k.o{--c:var(--warn)}
.ls-warn{display:flex;align-items:center;gap:8px;background:var(--warn-s);color:var(--warn);border-radius:10px;padding:8px 12px;font-size:.875rem;margin-bottom:12px}
.ls-list{display:flex;flex-direction:column;gap:8px}
.ls-row{display:flex;align-items:center;gap:14px;width:100%;text-align:left;font:inherit;color:inherit;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px 16px;cursor:pointer;transition:border-color .15s,box-shadow .15s}
.ls-row:hover{border-color:var(--primary);box-shadow:0 4px 14px -6px rgba(6,104,211,.35)}
.ls-row>svg{flex:none;color:var(--text-3)}
.ls-rank{flex:none;width:22px;text-align:center;font-weight:700;color:var(--text-3)}
.ls-av{flex:none;width:44px;height:44px;border-radius:12px;display:grid;place-items:center;color:hsl(var(--h) 60% 42%);background:hsl(var(--h) 70% 94%)}
:root[data-theme=dark] .ls-av{color:hsl(var(--h) 70% 70%);background:hsl(var(--h) 40% 20%)}
.ls-m{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.ls-m b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ls-sub{display:flex;flex-wrap:wrap;gap:4px 14px;color:var(--text-2);font-size:.82rem}
.ls-sub span{display:inline-flex;align-items:center;gap:4px}
.ls-bar{height:6px;border-radius:99px;background:var(--card-2);overflow:hidden;max-width:420px}
.ls-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--primary),#38a1ff)}
.ls-n{flex:none;display:flex;flex-direction:column;align-items:center;min-width:54px;background:var(--primary-s);color:var(--primary);border-radius:12px;padding:6px 10px}
.ls-n b{font-size:1.35rem;line-height:1.1}
.ls-n small{font-size:.72rem}
@media (max-width:640px){.ls-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ls-rank{display:none}.ls-row{gap:10px;padding:12px}.ls-row>svg{display:none}}
/* สีเขียว/ส้มของหน้า ทิกเก็ต LINE (ธีมหลักใช้ --ok/--warn เป็นน้ำเงิน/แดง จึงกำหนดเฉพาะที่นี่) */
.lt-stats,.ls-kpis,.lt-list,.ls-list,.ai-p,.sheet-inner{--lg:#14804a;--lgs:#e4f5ec;--lo:#b45309;--los:#fdf0dd}
:root[data-theme=dark] :is(.lt-stats,.ls-kpis,.lt-list,.ls-list,.ai-p,.sheet-inner){--lg:#4cc98a;--lgs:rgba(76,201,138,.14);--lo:#f0b057;--los:rgba(240,176,87,.14)}
.lt-st.g{--acc:var(--lg)}.lt-st.g i{background:var(--lgs);color:var(--lg)}
.lt-st.o{--acc:var(--lo)}.lt-st.o i{background:var(--los);color:var(--lo)}
.ls-k.g{--c:var(--lg)}.ls-k.o{--c:var(--lo)}
.lt-tag.bot{background:var(--lgs);color:var(--lg)}.lt-tag.team{background:var(--los);color:var(--lo)}
.lt-sol{background:var(--lgs);color:var(--lg)}
.ai-dot.on{background:var(--lg);box-shadow:0 0 0 4px var(--lgs)}.ai-sw.on{background:var(--lg)}.ai-rec{color:var(--lg);background:var(--lgs)}
.lt-st{background:var(--card)}
.ls-k{background:var(--card);border:1px solid var(--line)}
.lt-f>span{display:inline-flex;align-items:center;gap:4px}
/* ไอคอนไม่มีพื้นหลัง (ตามที่ผู้ใช้ขอ) */
.lt-st i,.lt-st.g i,.lt-st.o i,.lt-st.r i,.lt-st.n i{background:none!important;width:auto;height:auto;border-radius:0}
.lt-st i svg{width:28px;height:28px}
.ai-m i,.ai-m.on i{background:none!important;width:auto;height:auto;color:var(--text-2)}
.ai-m.on i{color:var(--primary)}
.ls-av,:root[data-theme=dark] .ls-av{background:none!important;width:auto;height:auto}
.ls-arrow{background:none}
.ls-arrow:hover:not(:disabled){background:none;color:var(--primary)}
/* ป้ายบนการ์ดทิกเก็ต LINE: สถานะเป็นป้ายสีอ่อน · บอท/ทีมเป็นข้อความพร้อมไอคอน */
.lt-tabs .ttabs button,.lt-tabs .ttabs button[data-k]{color:var(--text-2)}
.lt-tabs .ttabs button.on{color:var(--primary)}
.lt-tabs .ttabs sup{font-size:.7rem;font-weight:600;background:var(--card-2);color:var(--text-2);border-radius:99px;padding:1px 7px;margin-left:2px;vertical-align:1px}
.lt-tabs .ttabs button.on sup{background:var(--primary-s);color:var(--primary)}
.lt-st-b{flex:none;font-size:.75rem;font-weight:600;line-height:1;padding:6px 10px;border-radius:8px;white-space:nowrap;background:var(--sb,var(--card-2));color:var(--sc,var(--text-2))}
.lt-st-b.s-new{--sb:#fdece7;--sc:#c4320f}
.lt-st-b.s-assigned,.lt-st-b.s-in_progress{--sb:#e7f0fc;--sc:#0552a8}
.lt-st-b.s-pending,.lt-st-b.s-resolved{--sb:#fdf0dd;--sc:#b45309}
.lt-st-b.s-closed{--sb:#e4f5ec;--sc:#14804a}
:root[data-theme=dark] .lt-st-b.s-new{--sb:rgba(255,122,89,.15);--sc:#ff9a80}
:root[data-theme=dark] .lt-st-b.s-assigned,:root[data-theme=dark] .lt-st-b.s-in_progress{--sb:rgba(106,174,255,.15);--sc:#8cc0ff}
:root[data-theme=dark] .lt-st-b.s-pending,:root[data-theme=dark] .lt-st-b.s-resolved{--sb:rgba(240,176,87,.15);--sc:#f0b057}
:root[data-theme=dark] .lt-st-b.s-closed{--sb:rgba(76,201,138,.15);--sc:#4cc98a}
.lt-tag,.lt-tag.bot,.lt-tag.team{display:inline-flex;align-items:center;gap:5px;background:none!important;padding:0;border-radius:0;font-size:.8125rem;font-weight:600}
.lt-tag.bot{color:var(--lg)}.lt-tag.team{color:var(--lo)}
.lt-f{gap:4px 16px;padding-top:2px}
.lt-f>span svg{opacity:.75}
/* สถิติหน้า ทิกเก็ต LINE: แถบเดียว แบ่ง 4 ช่อง เรียบ ๆ */
.lt-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:var(--card);border:1px solid var(--line);border-radius:14px;margin:4px 0 16px;overflow:hidden;--lg:#14804a;--lo:#b45309}
:root[data-theme=dark] .lt-strip{--lg:#4cc98a;--lo:#f0b057}
.lt-s2{display:flex;flex-direction:column;gap:4px;padding:14px 20px;min-width:0}
.lt-s2+.lt-s2{border-left:1px solid var(--line)}
.lt-s2 span{display:flex;align-items:center;gap:6px;color:var(--text-2);font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lt-s2 span svg{flex:none;color:var(--c,var(--primary))}
.lt-s2 b{font-size:1.75rem;line-height:1.1;font-weight:700}
.lt-s2.g{--c:var(--lg)}.lt-s2.o{--c:var(--lo)}.lt-s2.r{--c:var(--danger)}.lt-s2.r b{color:var(--danger)}.lt-s2.n{--c:var(--text-3)}
@media (max-width:640px){.lt-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.lt-s2:nth-child(3){border-left:0}.lt-s2:nth-child(n+3){border-top:1px solid var(--line)}.lt-s2{padding:12px 14px}}
/* หน้า ทิกเก็ต LINE: ไม่ยืดเต็มจอกว้าง */
.lt-strip{max-width:760px}
.lt-s2{padding:12px 18px}
.ls-nav{max-width:520px;padding:6px}
.ls-kpis{display:flex;flex-wrap:wrap;gap:8px;max-width:none}
.ls-k{flex:none;padding:7px 14px;border-radius:99px}
.ls-k b{font-size:1.05rem}
.ls-warn{display:inline-flex;max-width:760px}
.ls-list{max-width:760px}
.ls-bar{max-width:260px}
.lt-list{grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),480px))}
/* เมนูซ้าย: ทุกเมนูตัวหนาเท่ากัน (ไม่ใช่แค่เมนูที่เลือก) */
.tab,.tab.on{font-weight:600}
.tab{color:var(--text)}
.tab.on{color:var(--primary)}
/* แท็บหน้า ทิกเก็ต LINE: ตัวเลขไม่มีพื้นหลัง (เหมือนแท็บหน้าอื่น) */
.lt-tabs .ttabs sup,.lt-tabs .ttabs button.on sup{background:none;padding:0;margin-left:1px;font-size:.72rem;font-weight:600;vertical-align:super;color:var(--text-3)}
.lt-tabs .ttabs button.on sup{color:var(--primary)}
.chk{display:flex;gap:8px;align-items:flex-start;margin:8px 0 2px;font-size:.9rem;cursor:pointer}
.chk input{margin-top:3px;width:16px;height:16px;flex:none}
/* ทิกเก็ต LINE แบบดูง่าย: ปุ่มตัวเลขกรอง + รายการเป็นแถว */
.lr-seg{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-width:900px;margin:4px 0 14px}
.lr-seg button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;font:inherit;color:inherit;background:var(--card);border:1.5px solid var(--line);border-radius:14px;padding:12px 16px;cursor:pointer}
.lr-seg b{font-size:1.6rem;line-height:1.1}
.lr-seg span{font-size:.85rem;color:var(--text-2)}
.lr-seg .r b{color:#c4320f}.lr-seg .b b{color:var(--primary)}.lr-seg .g b{color:#14804a}
.lr-seg button.on{border-color:var(--primary);background:var(--primary-s)}
.lr-list{max-width:900px;background:var(--card);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.lr{display:flex;align-items:center;gap:14px;width:100%;text-align:left;font:inherit;color:inherit;background:none;border:0;padding:14px 16px;cursor:pointer}
.lr+.lr{border-top:1px solid var(--line)}
.lr:hover{background:var(--card-2)}
.lr-bar{flex:none;width:4px;align-self:stretch;border-radius:4px;background:var(--sc,var(--line))}
.lr-bar.s-new{--sc:#c4320f}.lr-bar.s-assigned,.lr-bar.s-in_progress{--sc:#0668d3}.lr-bar.s-pending,.lr-bar.s-resolved{--sc:#b45309}.lr-bar.s-closed{--sc:#14804a}
.lr-m{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.lr-m b{font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lr-m small,.lr-r small{color:var(--text-2);font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lr-r{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:4px;max-width:45%}
.lr em{font-style:normal;font-weight:600}.lr-bot{color:#14804a}.lr-un{color:#c4320f}
@media (max-width:640px){.lr-seg{grid-template-columns:repeat(2,minmax(0,1fr))}.lr{padding:12px}.lr-r{max-width:40%}}
/* การ์ด LINE ในหน้ารายละเอียดงาน: กะทัดรัด */
.lc2{padding:12px 14px}
.lc2-top{display:flex;align-items:center;gap:12px}
.lc2-av{flex:none;width:38px;height:38px;border-radius:50%;background:#06c755;color:#fff;font-weight:700;display:grid;place-items:center}
.lc2-who{flex:1;min-width:0;display:flex;flex-direction:column}
.lc2-who b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lc2-who small{color:var(--text-2);font-size:.82rem}
.lc2-who em{font-style:normal;font-weight:600;color:#14804a}
.lc2-chat{flex:none;background:#06c755;border-color:#06c755}
.lc2-chat:hover{background:#05b04b;border-color:#05b04b}
.lc2-x{margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.lc2-x small{color:var(--text-2);font-size:.8rem}
.lc2-x p{margin:2px 0 0;white-space:pre-wrap;font-size:.92rem}
.btn.primary.lc2-chat{background:#06c755;border-color:#06c755;color:#fff}
.btn.primary.lc2-chat:hover{background:#05b04b;border-color:#05b04b}
.lc2-tip{display:flex;gap:6px;align-items:flex-start;margin:10px 0 0;font-size:.82rem;color:var(--text-2)}
.lc2-tip svg{flex:none;margin-top:2px}
.lc2-tip .lnk{background:none;border:0;padding:0;font:inherit;color:var(--primary);text-decoration:underline;cursor:pointer}
/* =========================================================
   อ่านง่ายขึ้น (ทั้งระบบ): ตัวหนังสือใหญ่ขึ้นเล็กน้อย · สีเทาเข้มขึ้น · ปุ่มในการ์ดกดง่ายขึ้น
   ========================================================= */
@media (min-width:960px){html{font-size:17px}}
:root,:root[data-theme=light]{--text-2:#4A5462;--text-3:#6E7783;--text-ph:#5F6875}
:root[data-theme=dark]{--text-2:#B3BFCC;--text-3:#8693A2;--text-ph:#9AA6B3}
.tbdg,.bdg,sup,.cal-g span,.tab .bdg,.btn.soft.sm{font-size:12px}
.card>.row .btn{min-height:38px;padding:6px 14px;font-size:0.875rem}
.facts dt{color:var(--text-2)}
.facts dd{font-weight:500}
small,.hint{line-height:1.5}
/* แถบหัวข้อประเภทงาน (แจ้งเหตุ / MA / ร้องเรียน): ขนาดและความหนาเท่าเมนูซ้าย */
@media (min-width:960px){.tchips button{font-size:0.9375rem}}
.tchips button,.tchips button.on{font-weight:600}
/* แถบแท็บทุกที่ในระบบ: ขนาดและความหนาเท่าเมนูซ้าย · สีเดียวกันทั้งหมด (ไม่แยกสีตามสถานะ) · อันที่เลือก = สีน้ำเงิน */
.ttabs button,.ttabs button[data-k],.side-filters button,.side-filters button[data-k]{font-weight:600;color:var(--text-2)}
.ttabs button.on,.ttabs button[data-k].on,.side-filters button.on,.side-filters button[data-k].on{color:var(--primary);font-weight:600}
.ttabs button sup{font-weight:600;color:var(--text-3)}
.ttabs button.on sup{color:var(--primary)}
@media (min-width:960px){.side-filters button{font-size:0.9375rem}}
/* ส่วนของ LINE/เอไอ ให้เข้าธีมหน้าหลัก: การ์ดพื้นเดียวกัน ไม่มีเส้นขอบ มุม 16px เงาบาง */
.lr-seg button,.lr-list,.ls-nav,.ls-k,.ls-row,.lt-strip,.lt-c,.ai-head,.ai-m,.lc-c{border-color:transparent!important;border-radius:16px;box-shadow:0 1px 3px rgba(0,0,0,.06);background:var(--card)}
.lr-seg button{border:1.5px solid transparent}
.lr-seg button:hover,.ls-row:hover,.lt-c:hover,.ai-m:hover:not(:disabled){box-shadow:0 4px 14px -6px rgba(15,35,65,.25)}
.lr-seg button.on,.ai-m.on{border-color:var(--primary)!important;background:var(--primary-s)}
.lr+.lr{border-top-color:var(--line)}
.lr:hover{background:var(--primary-s)}
.lt-s2+.lt-s2{border-left-color:var(--line)}
.ls-k{border-radius:99px}
.ai-note,.ls-warn{border-radius:12px}
.lh-steps{margin:0 0 12px;padding-left:20px;display:flex;flex-direction:column;gap:10px}
.lh-steps li{line-height:1.5}
.ai-note .lnk,.hint .lnk{background:none;border:0;padding:0;font:inherit;color:var(--primary);text-decoration:underline;cursor:pointer}
.cp-ok{display:flex;align-items:center;gap:14px;background:#e4f5ec;color:#14804a;border-radius:14px;padding:14px 16px;margin:0 0 14px}
.cp-ok div{display:flex;flex-direction:column;min-width:0}
.cp-ok b{font-size:1.15rem;color:var(--text);overflow-wrap:anywhere}
.cp-ok span{font-size:.9rem}
:root[data-theme=dark] .cp-ok{background:rgba(76,201,138,.14);color:#4cc98a}

/* ===== อุปกรณ์ที่ทำในงานนี้ (ฟอร์มออกใบรายงาน) · การ์ดงาน · ประวัติเครื่อง · ใบรายงาน ===== */
.rd{margin:12px 0 4px}
.rd-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.rd-sum{font-size:13px;font-weight:600;color:var(--primary)}
.rd-q{width:100%;margin:0 0 8px}
.rd-list{max-height:min(48vh,420px);overflow:auto;border:1px solid var(--line,#DDE2E8);border-radius:12px;background:var(--card,#fff)}
.rd-row{border-bottom:1px solid var(--line,#E5E7EB)}
.rd-row:last-child{border-bottom:0}
.rd-row.on{background:var(--primary-s)}
.rd-top{display:flex;align-items:center;gap:10px;padding:9px 12px;cursor:pointer;margin:0;font-weight:400}
.rd-top input{width:18px;height:18px;flex:none;accent-color:var(--primary)}
.rd-ic{color:var(--primary);display:flex;flex:none}
.rd-n{display:flex;flex-direction:column;min-width:0;flex:1}
.rd-n b{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rd-n small{font-size:12px;color:var(--text-2,#5b6778);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rd-cnt{flex:none;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--btn);color:var(--on-btn);font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center}
.rd-acts{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 10px 40px}
.rd-act{display:inline-flex;align-items:center;gap:0;margin:0;padding:5px 11px;border-radius:999px;border:1px solid var(--line,#D5DBE4);background:var(--card,#fff);font-size:13px;font-weight:500;cursor:pointer;user-select:none;line-height:1.3}
.rd-act input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.rd-act.on{background:var(--btn);border-color:var(--btn);color:var(--on-btn)}
.rd-act:has(input:focus-visible){outline:2px solid var(--primary);outline-offset:2px}
.rd-note{flex:1 1 100%;margin-top:2px;font-size:13px}
.rd-none{display:flex;align-items:center;gap:6px;margin:4px 0 0}
.rd-done{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:6px;margin:0 0 10px}
.rd-di{display:flex;gap:8px;align-items:flex-start;padding:7px 10px;border:1px solid var(--line,#E5E7EB);border-radius:10px;min-width:0}
.rd-di i{color:var(--primary);display:flex;margin-top:2px}
.rd-di div{display:flex;flex-direction:column;min-width:0}
.rd-di b{font-size:13px;font-weight:600}
.rd-di small{font-size:12px;color:var(--text-2,#5b6778)}
.rd-hist{margin-top:10px}
.rd-hr{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:none;border:0;border-top:1px solid var(--line,#E5E7EB);padding:8px 0;color:inherit;cursor:pointer;font:inherit}
.rd-hr:first-of-type{margin-top:6px}
.rd-hr>span:nth-child(2){display:flex;flex-direction:column;flex:1;min-width:0}
.rd-hr b{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rd-hr small{font-size:12px;color:var(--text-2,#5b6778)}
.rd-hr .mono{font-size:12px;color:var(--text-2,#5b6778);flex:none}
.p-dev th{width:auto}
.p-dev th:first-child,.p-dev td.c{width:28px;text-align:center}
.p-act{display:inline}
@media print{.p-dev tr{display:table-row}}
@media (max-width:640px){.p-dev tr{display:table-row}.rd-acts{padding-left:12px}}

/* ตารางติ๊ก 3 ช่องแบบใบ CSR (แทนปุ่มเลือก 12 อย่าง) */
.rd-row{display:grid;grid-template-columns:minmax(0,1fr) repeat(3,84px);align-items:center;column-gap:4px;padding:7px 12px}
.rd-head{position:sticky;top:0;z-index:1;background:var(--card-2,var(--bg,#F5F7FA));padding:6px 12px;font-size:12px;font-weight:700;color:var(--text-2,#5b6778)}
.rd-col{background:none;border:0;padding:4px 2px;font:inherit;font-size:12px;font-weight:700;color:var(--primary);cursor:pointer;text-align:center;line-height:1.25;border-radius:6px}
.rd-col:hover{background:var(--primary-s)}
.rd-n{flex-direction:row;align-items:center;gap:10px}
.rd-n>span{display:flex;flex-direction:column;min-width:0}
.rd-tk{display:flex;justify-content:center;align-items:center;margin:0;height:36px;cursor:pointer}
.rd-tk input{width:20px;height:20px;accent-color:var(--primary);cursor:pointer}
.rd-row .rd-note{grid-column:1/-1;margin:6px 0 2px 28px;width:calc(100% - 28px)}
.p-dev td.c,.p-dev th.c{text-align:center;width:auto}
@media (max-width:640px){.rd-row{grid-template-columns:minmax(0,1fr) repeat(3,58px);padding:7px 8px}.rd-col{font-size:11px}.rd-row .rd-note{margin-left:0;width:100%}}

.rd-w10{color:var(--warn,#a35a00);font-weight:700}

.rd-u{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--text,inherit)}
.rd-u svg{color:var(--text-2,#5b6778);flex:none}
.rd-more{margin:8px 0}
.rd-more summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--primary);padding:4px 0}

.rs-b2 .rd-row{grid-template-columns:minmax(0,1fr) repeat(3,58px);padding-left:10px;padding-right:6px}
.rs-b2 .rd-col{font-size:11px}

.p-dev td:nth-child(3){min-width:92px}

.p-dev td,.p-dev th{padding:5px 8px}

.p-dev td:nth-child(2) small{white-space:nowrap}

/* ===== หน้าทิกเก็ต: โครงเดียวกับหน้าหลัก (ชิปมุมมอง · แท็บสถานะ · รายการซ้าย · แผงเดือนนี้ขวา) ===== */
@media (min-width:960px){
  .pg-line:has(.hm-side){display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:0 32px;align-items:start}
  .pg-line:has(.hm-side)>.phead,.pg-line:has(.hm-side)>.banrow,.pg-line:has(.hm-side)>.lt-views{grid-column:1/-1}
  .pg-line .lt-views{max-width:640px}
}
.pg-line .hm-main{min-width:0}
.lsd{display:flex;flex-direction:column;gap:2px}
.lsd-k{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding-bottom:10px;margin-bottom:4px;border-bottom:1px solid var(--line,#E5E7EB)}
.lsd-k div{display:flex;flex-direction:column;align-items:flex-start}
.lsd-k b{font-size:1.375rem;font-weight:600;line-height:1.2;color:var(--text)}
.lsd-k small{font-size:.8125rem;color:var(--text-2)}
.lsd-h{font-size:.8125rem;font-weight:600;color:var(--text-2);margin:6px 0 0}
.lsd .trow{padding-left:0;padding-right:0}
.lsd-n{font-weight:600;font-size:.9375rem;color:var(--text);margin-left:auto;padding-right:4px}
.lsd .btn.block{margin-top:8px}
.pg-line .ls-nav{max-width:none}
.pg-line .ls-nav,.pg-line .ls-k,.pg-line .ls-row{max-width:760px}

/* มุมมองทิกเก็ต: แท็บขีดเส้นใต้แบบประเภทงานหน้าหลัก · แถวเดียว เลื่อนได้บนมือถือ · รายการคอลัมน์เดียวอ่านไล่ง่าย */
.lt-views{display:flex!important;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start}
.lt-views button{flex:0 0 auto}
@media (max-width:959px){.lt-views button{font-size:.875rem;padding:8px 10px}.lt-views button svg{width:16px;height:16px}}
.pg-line .hm-main .list{display:flex;flex-direction:column;gap:10px}

/* หน้าสรุป: ไอคอนตัวเลขสีเดียว (ลดสีที่ไม่ได้สื่อความหมาย) · ไอคอนบริษัทในรายการสีเดียวกับหน้าหลัก */
.pg-line .ls-kpis svg{color:var(--text-2)!important}
.pg-line .ls-row svg{color:var(--primary)}

/* ตารางสรุปทิกเก็ต: บริษัท × เดือน */
.lg-wrap{padding:0;overflow-x:auto;max-width:960px}
.lg{width:100%;border-collapse:collapse;font-size:.875rem}
.lg th,.lg td{padding:9px 12px;border-bottom:1px solid var(--line,#E5E7EB);text-align:left;white-space:nowrap}
.lg thead th{font-size:.8125rem;font-weight:600;color:var(--text-2);background:var(--card-2,var(--card))}
.lg thead th.cur{color:var(--primary)}
.lg .n{text-align:right;font-variant-numeric:tabular-nums;width:72px}
.lg .z{color:var(--text-3,#9aa3af)}
.lg .t{font-weight:700;color:var(--text)}
.lg td.co{font-weight:500;white-space:normal;min-width:180px;max-width:340px}
.lg th.co,.lg td.co{position:sticky;left:0;background:var(--card);z-index:1}
.lg thead th.co{background:var(--card-2,var(--card))}
.lg tbody tr:hover td{background:var(--primary-s)}
.lg tfoot td{font-weight:700;border-bottom:0;background:var(--card-2,var(--card))}
.lg .lnk{font:inherit;font-weight:600;color:var(--primary);background:none;border:0;padding:2px 4px;cursor:pointer}

.lg tfoot td.co{background:var(--card-2,var(--card))}
.lg .lnk{text-decoration:none}
.lg .lnk:hover{text-decoration:underline}
.lg-foot{margin-top:10px;max-width:960px;align-items:center}
@media (max-width:640px){.lg td.co{min-width:130px;max-width:170px}.lg th,.lg td{padding:8px 10px}}

.lg-wrap,.lg-foot{max-width:760px}

/* ป้ายช่องทาง (LINE ฯลฯ): ไอคอนสีของช่องทาง ตัวอักษรสีปกติ */
.tag.src svg{color:var(--src,currentColor)}
.tag.src-line{--src:#06C755}

/* สรุปรายเดือน (รายบริษัท): การ์ดตัวเลขเดียว · รายชื่อบริษัทแถวเรียบในการ์ดเดียว · หน้าบริษัทในหน้าเดิม */
.ls-sum{margin-bottom:12px;max-width:760px}
.ls-sum .lsd-k{border-bottom:0;padding-bottom:0;margin-bottom:0}
.ls-co{padding:4px 16px;max-width:760px}
.ls-co .trow{gap:12px;padding:13px 0}
.ls-ic{color:var(--primary);display:flex;flex:none}
.ls-co .tr-m b{font-weight:500}
.ls-cnt{flex:none;font-size:.875rem;color:var(--text-2);white-space:nowrap}
.ls-cnt b{font-size:1rem;font-weight:700;color:var(--text);margin-right:2px}
.ls-coh{display:flex;align-items:center;gap:8px;margin:2px 0 12px;max-width:760px}
.ls-coh>div{display:flex;flex-direction:column;min-width:0}
.ls-coh b{font-size:1.0625rem;font-weight:600}
.ls-coh small{font-size:.8125rem;color:var(--text-2)}
.pg-line .ls-coh~.list{max-width:760px}

.ls-co .tr-m b{white-space:normal;overflow:visible;text-overflow:clip}

/* สรุปรายเดือน: แท็บ + ตัวเลือกเดือนเล็กแถวเดียว · ตารางเลือกช่วงเอง */
.ls-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;max-width:760px}
.ls-head .ttabs{flex:1 1 auto}
.ls-mnav{display:inline-flex;align-items:center;gap:2px;background:var(--card);border-radius:999px;padding:2px;flex:none}
.ls-mnav b{font-size:.875rem;font-weight:600;padding:0 6px;white-space:nowrap}
.ls-mnav .ibtn{width:32px;height:32px;min-height:32px}
.ls-mnav .ibtn:disabled{opacity:.35}
.lg-ctl{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:0 0 12px;max-width:960px}
.lg-pre{display:flex;flex-wrap:wrap;gap:6px}
.lg-pre button{border:0;border-radius:999px;background:var(--card);color:var(--text-2);font:inherit;font-size:.8125rem;font-weight:500;padding:6px 12px;cursor:pointer}
.lg-pre button.on{background:var(--primary-s);color:var(--primary);font-weight:600}
.lg-rng{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--text-2)}
.lg-rng label{display:flex;align-items:center;gap:6px;margin:0;font-weight:500}
.lg-rng input{font:inherit;font-size:.875rem;padding:5px 8px;border-radius:10px;border:1px solid var(--line);background:var(--card);color:var(--text);min-height:34px;width:auto}
.lg-wrap,.lg-foot{max-width:960px}
@media (max-width:640px){.lg-rng{width:100%}.lg-rng label{flex:1 1 0;min-width:0}.lg-rng input{flex:1 1 auto;min-width:0;width:100%}}

.ls-mnav .ibtn{display:inline-flex!important;align-items:center;justify-content:center}

/* มือถือ: เลิกใช้หน้าต่างที่เลื่อนขึ้นจากล่างจอ — หน้าต่างทุกอันเป็นกล่องกลางจอ (ค่อย ๆ ปรากฏ) · หน้ารายละเอียดเลื่อนเข้าจากขวาแบบเปิดหน้าใหม่ */
@media (max-width:959px){
  .modal{align-items:center;justify-content:center;padding:16px 14px calc(var(--sab) + 16px)}
  .modal-card{width:100%;max-width:540px;max-height:calc(100dvh - 48px - var(--sab));border-radius:20px;padding:20px 18px 20px;
    transform:translateY(10px) scale(.97);opacity:0;transition:transform .2s cubic-bezier(.2,.8,.2,1),opacity .2s}
  .modal.open .modal-card{transform:none;opacity:1}
  .modal-card:has(.create-grid)>.row.end{padding-bottom:12px}
}

/* ปุ่ม "ฉัน" ที่ชื่อมุมซ้ายบน: มือถือ = รูปโปรไฟล์หน้าหัวข้อหน้า · คอมพิวเตอร์ = การ์ดชื่อใต้โลโก้ในแถบซ้าย */
.me-av{flex:none;border:0;background:none;padding:0;margin:2px 6px 0 0;border-radius:50%;cursor:pointer;display:flex;align-self:flex-start;
  box-shadow:0 0 0 2px var(--surface,#fff),0 0 0 3.5px var(--line);transition:box-shadow .15s}
.me-av .av{display:flex;align-items:center;justify-content:center;border-radius:50%;object-fit:cover}
.me-av.on,.me-av:hover{box-shadow:0 0 0 2px var(--surface,#fff),0 0 0 4px var(--primary)}
.me-av:focus-visible{outline:none;box-shadow:0 0 0 2px var(--surface,#fff),0 0 0 4px var(--primary)}
.side-me{display:none}
@media (min-width:960px){
  .me-av{display:none}
  .side-me{display:flex;align-items:center;gap:10px;width:calc(100% - 4px);margin:-12px 2px 18px;padding:10px 10px 10px 10px;border:0;border-radius:14px;
    background:var(--card);color:var(--text);font:inherit;text-align:left;cursor:pointer;box-shadow:0 1px 3px rgba(15,35,65,.06)}
  .side-me:hover{background:var(--card-2,var(--card))}
  .side-me.on{background:var(--primary-s);box-shadow:inset 0 0 0 1.5px var(--primary)}
  .side-me .av{flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;object-fit:cover}
  .side-me>span{display:flex;flex-direction:column;min-width:0;flex:1}
  .side-me b{font-size:.9375rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .side-me small{font-size:.75rem;color:var(--text-2)}
  .side-me>svg{color:var(--text-3,#9aa3af);flex:none}
}

.me-av .av,.side-me .av{text-transform:uppercase;font-weight:600}

/* ===== แท็บสองชั้น: ชั้นบน (ประเภท/มุมมอง) = ขีดเส้นใต้บนเส้นแบ่ง · ชั้นล่าง (สถานะ) = ปุ่มเม็ดยา ตัวเลขในวงกลม เลข 0 จาง ===== */
.tchips{border-bottom:1px solid var(--line);border-radius:0;padding:0 0 0;margin:0 0 14px;gap:6px;overflow-x:auto}
.tchips button{flex:0 0 auto;border-radius:8px 8px 0 0;padding:10px 14px;min-height:44px;font-size:.9375rem;font-weight:600;color:var(--text-2)}
.tchips button.on{color:var(--primary)}
.tchips button.on::after{left:10px;right:10px;bottom:-1px;height:3px;border-radius:3px 3px 0 0}
.tchips button b{font-weight:700;margin-left:4px;color:inherit}
.tchips button.hot b{color:var(--danger)}
.tchips .rdot{display:none}
.ttabs{display:flex!important;flex-wrap:wrap;gap:8px;overflow:visible;padding:0;-webkit-mask-image:none;mask-image:none}
.ttabs button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:6px 14px;border-radius:999px;background:var(--card);
  color:var(--text-2);font-size:.875rem;font-weight:500;box-shadow:inset 0 0 0 1px var(--line);transition:background .15s,color .15s}
.ttabs button:hover{color:var(--text);background:var(--card-2,var(--card))}
.ttabs button.on{background:var(--primary-s);color:var(--primary);font-weight:600;box-shadow:inset 0 0 0 1.5px var(--primary)}
.ttabs button.on::after{display:none}
.ttabs button.z{opacity:.55}
.ttabs button.z:hover,.ttabs button.z.on{opacity:1}
.ttabs .tn{min-width:22px;height:22px;padding:0 7px;border-radius:11px;background:var(--card-2,#eef1f5);color:var(--text);font-size:.75rem;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;font-variant-numeric:tabular-nums;line-height:1}
.ttabs button.on .tn{background:var(--btn);color:var(--on-btn)}
@media (max-width:959px){
  .tchips{display:flex!important;grid-template-columns:none}
  .tchips button{flex:1 1 0;padding:10px 6px;font-size:clamp(13px,3.7vw,15px)}
  .ttabs button{flex:0 0 auto;font-size:clamp(13px,3.6vw,14px);padding:6px 12px;min-height:36px}
}

@media (max-width:959px){.tchips{overflow-x:auto;scrollbar-width:none}.tchips button{flex:0 0 auto;padding:10px 12px}}

/* กระชับ: แท็บบน/ปุ่มสถานะ/ทางลัด ใช้พื้นที่น้อยลง */
.tchips{margin:0 0 10px;gap:2px}
.tchips button{min-height:36px;padding:6px 12px;font-size:.875rem}
.tchips button svg{width:16px;height:16px}
.tbar{margin:0 0 10px}
.ttabs{gap:6px}
.ttabs button{min-height:28px;padding:3px 10px;font-size:.8125rem;gap:5px}
.ttabs .tn{min-width:18px;height:18px;padding:0 5px;border-radius:9px;font-size:.6875rem}
@media (min-width:960px){
  .tiles,.tiles.compact{gap:6px;margin-bottom:10px}
  .tile,.tiles.compact .tile{padding:6px 14px 6px 8px;column-gap:10px}
  .tile i{width:32px;height:32px}
  .tile i svg{width:22px;height:22px}
  .tile span{font-size:.875rem}
}
@media (max-width:959px){
  .tchips button{padding:6px 10px;min-height:36px}
  .ttabs button{min-height:30px;padding:3px 10px}
}

@media (max-width:959px){.ttabs{flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:none;padding-bottom:2px}.ttabs::-webkit-scrollbar{display:none}.ttabs button{flex:0 0 auto}}

/* ทางลัดหน้าหลัก (คอมพิวเตอร์): บรรทัดเดียว "ไอคอน ชื่อ · ตัวเลข" เตี้ยลงครึ่งหนึ่ง */
@media (min-width:960px){
  .pg-home .tiles{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:8px}
  .pg-home .tiles .tile{display:flex;flex-direction:row;align-items:center;gap:7px;min-height:0;padding:5px 12px 5px 6px;border-radius:10px}
  .pg-home .tiles .tile i{width:28px;height:28px;border-radius:8px}
  .pg-home .tiles .tile i svg{width:19px;height:19px}
  .pg-home .tiles .tile span{font-size:.875rem;font-weight:600;align-self:center;line-height:1.2}
  .pg-home .tiles .tile small{display:inline;align-self:center;margin:0;font-size:.8125rem;color:var(--text-2);white-space:nowrap}
  .pg-home .tiles .tile small::before{content:'· ';color:var(--text-3,#9aa3af)}
  .pg-home .phead{padding-bottom:8px}
}

@media (min-width:960px){.pg-home .tiles{gap:2px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.pg-home .tiles .tile{flex:0 0 auto;gap:5px;padding:4px 8px 4px 4px}.pg-home .tiles .tile small{margin-left:-1px}}

@media (min-width:960px){.pg-home .tiles .tile i{width:24px;height:24px}.pg-home .tiles .tile i svg{width:18px;height:18px}.pg-home .tiles .tile span{font-size:.8125rem}.pg-home .tiles .tile small{font-size:.75rem}.pg-home .tiles .tile small::before{content:"";}.pg-home .tiles .tile{gap:4px;padding:4px 7px 4px 3px}}

@media (min-width:960px){.pg-home .tiles .tile small{margin-left:3px}}

/* เว้นระยะระหว่างแถวปุ่มสถานะกับการ์ดงานให้โปร่งขึ้น */
.tbar{margin-bottom:18px}
@media (max-width:959px){.tbar{margin-bottom:14px}}

/* ผลวิเคราะห์ของเอไอในการ์ด LINE ของงาน */
.lc2-ai{margin-top:10px;padding:10px 12px;border-radius:12px;background:var(--internal-bg,var(--card-2,#f3f6fa));border:1px solid var(--internal-line,var(--line))}
.lc2-aih{display:flex;align-items:center;gap:6px;font-size:.75rem;font-weight:700;color:var(--text-2);margin-bottom:4px}
.lc2-aih em{font-style:normal;color:var(--ok,#14804a)}
.lc2-ai p{margin:0;font-size:.875rem;line-height:1.55;color:var(--text)}
.lc2-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.lc2-chips span{display:inline-flex;align-items:center;gap:4px;font-size:.75rem;color:var(--text-2);background:var(--card);border-radius:999px;padding:2px 9px}
.lc2-next{margin-top:6px;font-size:.8125rem;color:var(--text)}
.lc2-next b{color:var(--primary);font-weight:600;margin-right:4px}

/* แชทงาน LINE: ลูกค้าซ้าย (ขอบเขียว LINE) · ทีมงานขวา · ข้อความระบบกลาง */
.bubble.cust{border-left:3px solid #06C755}
.sysnote{align-self:center;display:flex;align-items:center;gap:6px;max-width:92%;margin:4px auto;padding:4px 10px;border-radius:999px;background:var(--card-2,#f1f4f8);color:var(--text-2);font-size:.75rem;line-height:1.4;text-align:center}
.sysnote span{white-space:pre-line}
.sysnote small{color:var(--text-3,#9aa3af);flex:none}

.thread .bubble.me:not(.internal){background:var(--primary-s)}

/* แถบซ้าย (คอมพิวเตอร์) แคบลง: 232px → 196px */
@media (min-width:960px){
  .shell{grid-template-columns:196px minmax(0,1fr)}
  .tabbar{padding:20px 10px}
  .side-brand{margin:0 8px 22px}
  .tab{gap:10px}
  .side-me{padding:8px;gap:8px}
  .side-me .av{width:34px!important;height:34px!important;font-size:14px!important}
}

/* ทางลัดหน้าหลัก: ห้ามซ่อนปุ่ม — จอแคบตัดตัวเลขย่อย ถ้ายังไม่พอให้ขึ้นบรรทัดใหม่ */
@media (min-width:960px){.pg-home .tiles{flex-wrap:wrap;overflow:visible}}
@media (min-width:960px) and (max-width:1320px){.pg-home .tiles .tile small{display:none}}

.ot-rate{all:unset;cursor:pointer;display:flex;flex-direction:column;align-items:center;width:100%;border-radius:10px}
.ot-rate:hover{background:var(--primary-s)}
.ot-rate span{display:inline-flex;align-items:center;gap:3px;color:var(--primary)}

/* ภาพรวมหน้า "สรุปผล" ของผู้ดูแล/หัวหน้าทีม: ตารางช่าง + ต้องดูแล วางคู่กันบนจอกว้าง */
.ovr-2{display:grid;grid-template-columns:1fr;gap:12px;margin-top:12px}
@media (min-width:900px){.ovr-2{grid-template-columns:1fr 1fr}}
.stt{width:100%;border-collapse:collapse;font-size:.9rem}
.stt th{font-weight:500;color:var(--text-2);text-align:center;padding:8px 6px;font-size:.75rem}
.stt td{padding:10px 6px;text-align:center;border-top:1px solid var(--line)}
.stt th:first-child,.stt td:first-child{text-align:left;padding-left:18px}
.stt tr[onclick]{cursor:pointer}
.stt td.warn{color:var(--danger,#c0392b);font-weight:600}
.stt small{display:block;color:var(--text-2);font-weight:400}

/* การ์ดตัวเลขผู้บริหาร (หน้าสรุปผล › ภาพรวม) */
.hk-ban{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline;padding:12px 16px;border-radius:14px;margin:12px 0 0;font-size:.9375rem}
.hk-ban.ok{background:var(--ok-s);color:var(--ok)}.hk-ban.warn{background:var(--warn-s);color:var(--warn)}
.hk-ban span{font-size:.8125rem;opacity:.9}
.hk-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
@media (min-width:900px){.hk-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}}
.hk{display:flex;flex-direction:column;gap:2px;text-align:left;padding:14px 14px 12px;border-radius:16px;background:var(--surface);border:1px solid var(--line);border-left:5px solid var(--primary);font:inherit;color:inherit;cursor:pointer;min-width:0}
.hk.good{border-left-color:var(--ok)}.hk.warn{border-left-color:var(--gold)}.hk.bad{border-left-color:var(--danger)}
.hk-l{font-size:.8125rem;color:var(--text-2)}
.hk-v{font-size:1.75rem;line-height:1.15;font-weight:600;letter-spacing:-.01em;white-space:nowrap}
.hk.bad .hk-v{color:var(--danger)}
.hk-d{font-size:.75rem;color:var(--text-2)}.hk-d.good{color:var(--ok)}.hk-d.bad{color:var(--danger)}
.hk-s{font-size:.75rem;color:var(--text-2);line-height:1.35}
.hk:hover{box-shadow:0 4px 14px rgba(20,30,50,.10)}

/* ===== ปุ่มและสิ่งที่กดได้: ให้เห็นชัดว่ากดได้ (ขอบ เงา สถานะ hover/กด/โฟกัส) · เพิ่มท้ายไฟล์ ไม่เปลี่ยนโครงหน้าเดิม ===== */
:root{--edge:color-mix(in srgb,var(--text) 14%,var(--line));--lift:0 1px 2px rgba(15,35,65,.08);--lift-h:0 6px 16px -8px rgba(15,35,65,.35)}
:root[data-theme=dark]{--lift:none;--lift-h:0 6px 16px -8px rgba(0,0,0,.7)}
[role=button],button:not(:disabled),[onclick]{cursor:pointer}

/* ปุ่มมาตรฐาน: ขอบเข้มขึ้น + เงาบาง = เห็นเป็นปุ่ม · ปุ่มหลักทึบมีเงาสีของตัวเอง */
.btn{border-color:var(--edge);box-shadow:var(--lift);transition:transform .08s,background .15s,border-color .15s,box-shadow .15s}
.btn:hover:not(:disabled){border-color:var(--primary);box-shadow:var(--lift-h)}
.btn.primary{font-weight:600;border-color:var(--btn);box-shadow:0 2px 8px -3px color-mix(in srgb,var(--btn) 70%,transparent)}
.btn.primary:hover:not(:disabled){border-color:var(--btn-d);box-shadow:0 6px 14px -6px color-mix(in srgb,var(--btn) 80%,transparent)}
.btn.soft{border:1px solid color-mix(in srgb,var(--primary) 28%,transparent)}
.btn.ghost-red{border-color:color-mix(in srgb,var(--danger) 40%,var(--line))}
.btn.link{box-shadow:none;border:0}
.btn:active:not(:disabled){transform:translateY(1px) scale(.985);box-shadow:none}

/* ไอคอนล้วน (ค้นหา พิมพ์ ดาวน์โหลด ฯลฯ): ใส่พื้นและขอบ ไม่ให้เป็นแค่รูปลอย */
.ibtn{background:var(--card-2);box-shadow:inset 0 0 0 1px var(--line);transition:background .15s,box-shadow .15s,transform .08s}
.ibtn:hover{background:var(--primary-s);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary) 45%,transparent);color:var(--primary)}
.ibtn.on{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary) 45%,transparent)}
.ibtn:active{transform:scale(.94)}
.ibtn:disabled{opacity:.45;cursor:not-allowed}

/* ทางลัดหน้าแรก: เป็นปุ่มสี่เหลี่ยมมีขอบ ยกขึ้นเมื่อชี้ */
.tile{box-shadow:inset 0 0 0 1px var(--line),var(--lift);transition:background .15s,transform .12s,box-shadow .15s}
.tile:hover{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--primary) 55%,transparent),var(--lift-h)}
@media (hover:hover){.tile:hover,.tcard:hover,.hk:hover{transform:translateY(-2px)}}

/* แท็บข้อความ: เป็นเม็ดยามีขอบ แยกจากข้อความธรรมดา (ตัวที่เลือกอยู่ = พื้นฟ้า) */
.ttabs button{background:var(--card-2);box-shadow:inset 0 0 0 1px var(--line);transition:background .15s,color .15s,box-shadow .15s}
.ttabs button:hover:not(.on){background:var(--primary-s);color:var(--primary)}
.ttabs button.on{background:var(--primary-s);box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--primary) 55%,transparent);color:var(--primary);font-weight:600}
.ttabs button.on::after{display:none}
.ttabs{gap:8px}
@media (min-width:960px){.ttabs button{padding:7px 16px;border-radius:999px;min-height:36px}}
.tchips button:hover:not(.on){background:var(--primary-s);color:var(--primary)}
.tchips button.on{box-shadow:0 2px 8px -3px color-mix(in srgb,var(--btn) 70%,transparent)}

/* แถวและการ์ดที่กดเปิดได้: มีขอบ ลูกศรท้ายแถว และไฮไลต์เมื่อชี้ */
.tcard{border-color:var(--line);box-shadow:var(--lift);transition:background .15s,border-color .15s,box-shadow .15s,transform .12s}
.tcard:hover{border-color:color-mix(in srgb,var(--primary) 45%,var(--line));box-shadow:var(--lift-h)}
.tcard:active{transform:scale(.99)}
.trow[onclick]::after,button.trow::after,.trow[role=button]::after{content:'';flex:none;width:18px;height:18px;margin-left:auto;background:var(--text-3);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform .15s,background .15s}
.trow[onclick]:hover::after,button.trow:hover::after,.trow[role=button]:hover::after{background:var(--primary);transform:translateX(2px)}
.rr-main{border-radius:10px;transition:background .15s}
.rr-main:hover{background:var(--card-2)}
.stt tr[onclick]:hover td{background:var(--card-2)}
.stt tr[onclick] td:first-child b{color:var(--primary)}
.hk{box-shadow:var(--lift);transition:transform .12s,box-shadow .15s,border-color .15s}
.hk:hover{border-color:color-mix(in srgb,var(--primary) 45%,var(--line));box-shadow:var(--lift-h)}
.hk:active{transform:scale(.985)}

/* ลิงก์ข้อความ: ตัวหนาขึ้นนิด ชี้แล้วเข้มขึ้น */
.lnk{font-weight:500;text-underline-offset:3px}
.lnk:hover{color:var(--primary-d);text-decoration-thickness:2px}

/* ปุ่มลอยมุมจอ */
.fab{box-shadow:0 10px 22px -8px color-mix(in srgb,var(--btn) 75%,transparent),0 0 0 4px color-mix(in srgb,var(--btn) 16%,transparent)}

/* โฟกัสคีย์บอร์ดเห็นชัดทุกที่ที่กดได้ */
:is(button,a[href],[role=button],[onclick],summary,select,.rr-main,.hk):focus-visible{outline:2.5px solid var(--primary);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.btn,.ibtn,.tile,.tcard,.hk,.ttabs button,.trow::after{transition:none!important}.tile:hover,.tcard:hover,.hk:hover{transform:none}}

/* ตัวกรองหน้าสรุปผล: ช่องเลือกมีขอบเหมือนช่องเลือกจริง วางแถวเดียวบนจอกว้าง */
.rfilter{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.rfilter .psel{flex:1 1 170px;max-width:280px;min-height:42px;padding:8px 36px 8px 14px;border:1px solid var(--edge);border-radius:12px;background-color:var(--surface);box-shadow:var(--lift);font:inherit;color:var(--text);cursor:pointer;
  appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23858E9A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:16px}
.rfilter .psel:hover{border-color:var(--primary)}
/* แถบสถานะทิกเก็ต: เม็ดยามีขอบและจุดสี กดไปหน้าทิกเก็ต */
.hk-pipe{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:12px 0;padding:2px 2px 4px}
.hk-pipe::-webkit-scrollbar{display:none}
.hk-pipe button{flex:none;display:inline-flex;align-items:center;gap:7px;padding:7px 14px;min-height:38px;border:1px solid var(--edge);border-radius:999px;background:var(--surface);box-shadow:var(--lift);font:inherit;font-size:.875rem;color:var(--text);white-space:nowrap;cursor:pointer;transition:border-color .15s,background .15s}
.hk-pipe button b{font-weight:600}
.hk-pipe button:hover{border-color:var(--primary);background:var(--primary-s)}
.hk-pipe button.z{color:var(--text-2)}

/* แก้: แถวที่มีลูกศรของตัวเองอยู่แล้วไม่ต้องเติมซ้ำ · ลูกศรช่องเลือกวาดด้วยไล่สี (แสดงทุกเบราว์เซอร์) */
.trow:has(> svg:last-child)::after,button.trow:has(> svg:last-child)::after{display:none}
.rfilter .psel{font-size:.9375rem;background-image:linear-gradient(45deg,transparent 50%,var(--text-3) 50%),linear-gradient(135deg,var(--text-3) 50%,transparent 50%);
  background-position:calc(100% - 20px) 50%,calc(100% - 14px) 50%;background-size:6px 6px,6px 6px;background-repeat:no-repeat}

/* ช่องเลือกตัวกรอง: เพิ่มน้ำหนักตัวเลือกให้ชนะกฎพื้นหลังของ input/select ทั่วไป · การ์ดช่างแต่ละคนบนมือถือใช้ 3 คอลัมน์ให้สั้นลง */
:root .rfilter select.psel{background-color:var(--surface);background-image:linear-gradient(45deg,transparent 50%,var(--text-3) 50%),linear-gradient(135deg,var(--text-3) 50%,transparent 50%);
  background-position:calc(100% - 20px) 50%,calc(100% - 14px) 50%;background-size:6px 6px,6px 6px;background-repeat:no-repeat}
.card>.xkpis{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (min-width:900px){.card>.xkpis{grid-template-columns:repeat(6,minmax(0,1fr))}}

/* แถบซ้ายกระชับ: โลโก้/โปรไฟล์/เมนูเตี้ยลง ช่องไฟแน่นขึ้น */
@media (min-width:960px){
  .shell{grid-template-columns:184px minmax(0,1fr)}
  .tabbar{padding:16px 10px;gap:2px}
  .side-brand{gap:2px;margin:0 8px 12px}
  .side-brand .wm{font-size:1.375rem;line-height:1.1}
  .side-brand small{font-size:.6875rem}
  .side-me{margin:0 0 10px;padding:6px 8px;gap:8px;border-radius:12px}
  .side-me .av{width:30px!important;height:30px!important;font-size:13px!important}
  .side-me b{font-size:.875rem;line-height:1.25}
  .side-me small{font-size:.6875rem;line-height:1.2}
  .tab{min-height:38px;padding:6px 10px;gap:10px;font-size:.875rem;border-radius:9px}
  .tab svg{width:20px;height:20px}
  .side-filters{margin:10px 6px 0;padding-top:8px}
  .side-filters button{padding:6px 10px;font-size:.8125rem}
}

@media (min-width:960px){.tab{gap:8px}.tab svg{margin:0}}
@media (min-width:960px){.tab i,.tab.on i{padding:0;background:none;border-radius:0}.tab{gap:10px}}
@media (min-width:960px){.tab{gap:6px}.tab i,.tab.on i{padding:0!important;margin:0}.tab svg{width:18px;height:18px}}

/* กราฟ 8 สัปดาห์: ไม่ล้นการ์ด · แท่ง "เปิดใหม่" กับ "เสร็จแล้ว" คนละสี · ป้ายตัวเลขเมนูซ้ายไม่ทับข้อความ */
.xcol{min-width:0}
.xcol small{font-size:.6875rem}
.xcol:nth-child(even) small{visibility:hidden}
.xcard .xbars i.c,.xcard .xleg i.c{background:var(--gold)!important}
.xcard .xbars i.d,.xcard .xleg i.d{background:var(--primary)!important}
@media (min-width:960px){
  .tab{position:relative}
  .tab i{position:static}
  .tab .bdg{top:50%;right:10px;transform:translateY(-50%)}
}
.xcard .xbars i.c,.xcard .xleg i.c{background:color-mix(in srgb,var(--primary) 38%,var(--card))!important}

/* ===== หน้าสรุปผลของผู้ดูแล: ทางการ เรียบ แบบรายงานผู้บริหาร ===== */
/* แท็บหลัก = ขีดเส้นใต้บนเส้นแบ่ง ไม่ใช่เม็ดยา */
.rpt-tabs .ttabs{gap:0;border-bottom:1px solid var(--line);flex-wrap:nowrap;overflow-x:auto}
.rpt-tabs .ttabs button,.rpt-tabs .ttabs button.on{background:transparent;box-shadow:none;border-radius:0;min-height:44px;padding:10px 16px;font-size:.9375rem;font-weight:500;color:var(--text-2);border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.rpt-tabs .ttabs button:hover:not(.on){background:var(--card-2);color:var(--text)}
.rpt-tabs .ttabs button.on{color:var(--primary);font-weight:600;border-bottom-color:var(--primary)}
.rpt-tabs .ttabs button.on::after{display:none}
/* แถบสรุป: บางๆ มีขีดสีด้านซ้าย ไม่เทสีทั้งแถบ */
.hk-ban{background:var(--surface)!important;color:var(--text)!important;border:1px solid var(--line);border-left:4px solid var(--ok);border-radius:8px;padding:10px 14px;font-size:.9375rem}
.hk-ban.warn{border-left-color:var(--danger)}
.hk-ban b{font-weight:600}.hk-ban span{color:var(--text-2);opacity:1}
/* ตัวเลขหลัก: ตารางเดียวต่อกัน คั่นด้วยเส้นบาง ไม่มีแถบสีข้างการ์ด */
.hk-grid{gap:1px;background:var(--line);border:1px solid var(--line);border-radius:10px;overflow:hidden;margin:14px 0}
.hk,.hk.good,.hk.warn,.hk.bad{border:0;border-radius:0;background:var(--surface);box-shadow:none;padding:16px 18px 14px;gap:3px}
.hk:hover{background:var(--card-2);box-shadow:none;transform:none;border:0}
.hk-l{font-size:.8125rem;font-weight:600;color:var(--text-2);letter-spacing:.01em}
.hk-v{font-size:2rem;font-weight:600;font-variant-numeric:tabular-nums;margin:2px 0}
.hk-v small{font-size:.9375rem;font-weight:500;color:var(--text-2)}
.hk.bad .hk-v{color:var(--danger)}
.hk-d{font-weight:500}
.hk-s{color:var(--text-3,var(--text-2))}
/* สถานะงาน: แถบเรียบ */
.hk-pipe{gap:0;border:1px solid var(--line);border-radius:10px;background:var(--surface);padding:0;overflow-x:auto;margin:0 0 14px}
.hk-pipe button{border:0;border-radius:0;box-shadow:none;background:transparent;min-height:42px;padding:8px 16px;border-right:1px solid var(--line);font-size:.875rem;flex:1 0 auto;justify-content:center}
.hk-pipe button:last-child{border-right:0}
.hk-pipe button:hover{background:var(--card-2);border-color:var(--line)}
/* ตัวกรอง/การ์ดย่อย */
.rfilter select.psel{border-radius:8px}
.ovr-2{align-items:start}
.pd-panel,.xcard{border-radius:10px}
.xcard{border-left-width:1px}
.card>.xkpis .kpi,.xkpis .kpi{border-radius:10px}
.page h1,.ph-t h1{letter-spacing:-.01em}

/* ===== โหมดกลางคืน: โทนเดียว (เทาน้ำเงิน) + น้ำเงินนุ่มเป็นสีเน้นเดียว · แดงเฉพาะสิ่งที่ต้องรีบจัดการ ===== */
:root[data-theme=dark]{
  --backdrop:#0B0F14; --bg:#0F1419; --surface:#131A21; --card:#171F27; --card-2:#1E2831; --line:#232D37;
  --text:#E4EAF0; --text-2:#97A3B0; --text-3:#6B7783;
  --primary:#86B6F2; --primary-s:rgba(134,182,242,.12);
  --danger:#E98A74; --danger-s:rgba(233,138,116,.12);
  --warn:#E98A74; --warn-s:rgba(233,138,116,.12);
  --ok:#86B6F2; --ok-s:rgba(134,182,242,.12); --gold:#86B6F2;
}
/* แจ้งเตือนเบราว์เซอร์: ไม่ใช่ป้ายสีครีมสว่าง */
:root[data-theme=dark] .pushban{background:var(--card);color:var(--text-2);box-shadow:inset 3px 0 0 var(--danger)}
/* หน้าสรุปผล: ตัวเลขเปลี่ยนแปลงเป็นสีกลาง · ชื่อช่างเป็นตัวหนังสือปกติ · จุดสถานะเป็นเทา */
:root[data-theme=dark] .hk-d,:root[data-theme=dark] .hk-d.good,:root[data-theme=dark] .hk-d.bad{color:var(--text-2)}
:root[data-theme=dark] .stt td a,:root[data-theme=dark] .stt td b{color:var(--text)}
:root[data-theme=dark] .stt td b{font-weight:600}
:root[data-theme=dark] .hk-pipe .sdot{background:var(--text-3)}
:root[data-theme=dark] .hk-pipe .sdot.d-new{background:var(--danger)}
:root[data-theme=dark] .hk-ban{border-left-color:var(--text-3)}
:root[data-theme=dark] .hk-ban.warn{border-left-color:var(--danger)}
:root[data-theme=dark] .hk-grid{background:var(--line)}
:root[data-theme=dark] .xcard,:root[data-theme=dark] .xcard{border-left-color:var(--line)}
:root[data-theme=dark] .rpt-tabs .ttabs button.on{color:var(--text);border-bottom-color:var(--primary)}
:root[data-theme=dark] .tbar .ttabs button.on{box-shadow:none}
:root[data-theme=dark] .stt tr[onclick] td:first-child b{color:var(--text)}
:root[data-theme=dark] .stt tr[onclick]:hover td:first-child b{color:var(--primary)}

/* ===== โหมดกลางคืนขาว-ดำ-เทา (แบบเว็บใหญ่ๆ): ไม่มีสีฟ้า/น้ำเงิน · สีเน้น = ขาว · แดงอ่อนเฉพาะสิ่งที่ต้องรีบดู ===== */
:root[data-theme=dark]{
  --backdrop:#080808; --bg:#0B0B0B; --surface:#111111; --card:#161616; --card-2:#1E1E1E; --line:#2A2A2A;
  --text:#EDEDED; --text-2:#A1A1A1; --text-3:#6E6E6E; --text-ph:#8A8A8A;
  --primary:#EDEDED; --primary-d:#FFFFFF; --primary-s:rgba(255,255,255,.08);
  --btn:#EDEDED; --btn-d:#FFFFFF; --on-btn:#0A0A0A;
  --ok:#EDEDED; --ok-s:rgba(255,255,255,.08); --gold:#EDEDED;
  --internal-bg:rgba(255,255,255,.05); --internal-line:rgba(255,255,255,.18);
  --map-bg:#161616; --map-road:#2A2A2A; --toast-bg:#EDEDED; --toast-text:#0A0A0A;
}
:root[data-theme=dark] .xcard .xbars i.c,:root[data-theme=dark] .xcard .xleg i.c{background:#6E6E6E!important}
:root[data-theme=dark] .xcard .xbars i.d,:root[data-theme=dark] .xcard .xleg i.d{background:#EDEDED!important}
:root[data-theme=dark] .fab,:root[data-theme=dark] .btn.pri,:root[data-theme=dark] .btn.primary{color:var(--on-btn)}
:root[data-theme=dark] .rpt-tabs .ttabs button.on{color:#fff;border-bottom-color:#fff}
:root[data-theme=dark] .stt tr[onclick]:hover td:first-child b{color:#fff}

/* โหมดกลางคืน: ลดความสว่างของสีขาว — ตัวหนังสือเทาอ่อน ปุ่ม/สีเน้นเป็นเทากลาง */
:root[data-theme=dark]{
  --text:#D2D2D2; --text-2:#8F8F8F; --text-3:#666666; --text-ph:#7C7C7C;
  --primary:#BDBDBD; --primary-d:#D2D2D2; --primary-s:rgba(255,255,255,.07);
  --btn:#B8B8B8; --btn-d:#CCCCCC; --on-btn:#101010;
  --ok:#BDBDBD; --gold:#BDBDBD; --toast-bg:#BDBDBD;
}
:root[data-theme=dark] .xcard .xbars i.d,:root[data-theme=dark] .xcard .xleg i.d{background:#BDBDBD!important}
:root[data-theme=dark] .xcard .xbars i.c,:root[data-theme=dark] .xcard .xleg i.c{background:#5E5E5E!important}
:root[data-theme=dark] .rpt-tabs .ttabs button.on{color:#D2D2D2;border-bottom-color:#BDBDBD}
:root[data-theme=dark] .stt tr[onclick]:hover td:first-child b{color:#D2D2D2}

/* ตัวหนาน้อยลงทั้งระบบ: ใช้ตัวปกติ (400) กับตัวกลาง (500) เท่านั้น — หัวข้อ/ตัวเลข/ปุ่ม/แท็บ ไม่ใช้ตัวหนา */
html{font-synthesis-weight:none}
b,strong,h1,h2,h3,h4,th,
.tab,.ttabs button,.tchips button,.btn,.tile,.hk-l,.hk-v,.hk-ban b,.hk-pipe b,.fold-t,.sec-h h2,.pd-ph h3,.xcard h3,.kpi b,.stt td b,.lnk,.cnt,.tn,.ph-t h1,.side-me b,.rrow b,.trow b,.tcard b,
.rpt-tabs .ttabs button,.rpt-tabs .ttabs button.on,.rfilter .psel,.fab,.chip,.sdot+b{font-weight:500}
.ph-t h1,h1{font-weight:500}
.hk-v{font-weight:500}

/* ===== โหมดกลางคืนแบบ YouTube: พื้น #0F0F0F · การ์ด/ชิป เทาโปร่ง · ตัวหนังสือ #F1F1F1/#AAA · ปุ่มหลักขาว ตัวดำ · ลิงก์ฟ้าอ่อนเท่านั้น ===== */
:root[data-theme=dark]{
  --backdrop:#0F0F0F; --bg:#0F0F0F; --surface:#0F0F0F; --card:#1A1A1A; --card-2:#272727; --line:#303030;
  --text:#F1F1F1; --text-2:#AAAAAA; --text-3:#717171; --text-ph:#8C8C8C;
  --primary:#F1F1F1; --primary-d:#FFFFFF; --primary-s:rgba(255,255,255,.10);
  --btn:#F1F1F1; --btn-d:#FFFFFF; --on-btn:#0F0F0F;
  --ok:#F1F1F1; --ok-s:rgba(255,255,255,.10); --gold:#F1F1F1;
  --danger:#FF6B6B; --danger-s:rgba(255,107,107,.14); --warn:#FF6B6B; --warn-s:rgba(255,107,107,.14);
  --toast-bg:#F1F1F1; --toast-text:#0F0F0F; --scrim:rgba(0,0,0,.7);
  --shadow:0 4px 32px rgba(0,0,0,.6);
}
/* เมนูซ้าย: พื้นเดียวกับหน้า ไม่มีเส้นแบ่งเด่น · รายการที่เลือก = แท่งเทาโปร่งมุมมน */
:root[data-theme=dark] .tabbar{background:#0F0F0F;border-right:0}
:root[data-theme=dark] .tab:hover{background:rgba(255,255,255,.10);color:var(--text)}
:root[data-theme=dark] .tab.on{background:rgba(255,255,255,.10);color:var(--text)}
:root[data-theme=dark] .side-me{background:transparent;box-shadow:none}
:root[data-theme=dark] .side-me:hover{background:rgba(255,255,255,.10)}
/* ชิป (แท็บ/ช่วงเวลา/กรอง): เทาโปร่ง · ที่เลือก = ขาว ตัวดำ */
:root[data-theme=dark] .ttabs button,:root[data-theme=dark] .tchips button,:root[data-theme=dark] .hk-pipe button{background:rgba(255,255,255,.10);box-shadow:none;color:var(--text)}
:root[data-theme=dark] .ttabs button:hover:not(.on),:root[data-theme=dark] .tchips button:hover:not(.on){background:rgba(255,255,255,.18);color:var(--text)}
:root[data-theme=dark] .ttabs button.on,:root[data-theme=dark] .tchips button.on,:root[data-theme=dark] .tchips button[aria-selected=true]{background:#F1F1F1!important;color:#0F0F0F!important;box-shadow:none}
:root[data-theme=dark] .rpt-tabs .ttabs{border-bottom:0;gap:8px;padding-bottom:4px}
:root[data-theme=dark] .rpt-tabs .ttabs button,:root[data-theme=dark] .rpt-tabs .ttabs button.on{border-bottom:0;border-radius:8px;min-height:36px;padding:6px 14px;margin:0}
:root[data-theme=dark] .rpt-tabs .ttabs button.on{background:#F1F1F1;color:#0F0F0F}
:root[data-theme=dark] .rpt-tabs .ttabs button:hover:not(.on){background:rgba(255,255,255,.18)}
/* ปุ่ม */
:root[data-theme=dark] .btn{background:rgba(255,255,255,.10);color:var(--text);box-shadow:none}
:root[data-theme=dark] .btn:hover{background:rgba(255,255,255,.18)}
:root[data-theme=dark] .btn.pri,:root[data-theme=dark] .btn.primary,:root[data-theme=dark] .fab,:root[data-theme=dark] .btn[class*="pri"]{background:#F1F1F1;color:#0F0F0F}
:root[data-theme=dark] .ibtn{background:rgba(255,255,255,.10);box-shadow:none}
:root[data-theme=dark] .ibtn:hover{background:rgba(255,255,255,.18)}
/* การ์ดและพื้นผิว */
:root[data-theme=dark] .hk-grid,:root[data-theme=dark] .hk-pipe,:root[data-theme=dark] .hk-ban,:root[data-theme=dark] .pd-panel,:root[data-theme=dark] .xcard{background:var(--card);border-color:var(--line)}
:root[data-theme=dark] .hk,:root[data-theme=dark] .hk.good,:root[data-theme=dark] .hk.warn,:root[data-theme=dark] .hk.bad{background:var(--card)}
:root[data-theme=dark] .hk:hover{background:var(--card-2)}
:root[data-theme=dark] .hk-pipe button{background:transparent}
:root[data-theme=dark] .hk-pipe button:hover{background:rgba(255,255,255,.10)}
:root[data-theme=dark] .card,:root[data-theme=dark] .tcard,:root[data-theme=dark] .tile{background:var(--card);box-shadow:none}
:root[data-theme=dark] select.psel,:root[data-theme=dark] .rfilter select.psel{background-color:#0F0F0F;border-color:var(--line)}
/* ลิงก์ = ฟ้าอ่อนแบบ YouTube (สีฟ้าสีเดียวที่เหลือ) */
:root[data-theme=dark] .lnk,:root[data-theme=dark] a.lnk{color:#3EA6FF}
:root[data-theme=dark] .rpt-tabs .ttabs button.on{color:#0F0F0F}
:root[data-theme=dark] .xcard .xbars i.d,:root[data-theme=dark] .xcard .xleg i.d{background:#F1F1F1!important}
:root[data-theme=dark] .xcard .xbars i.c,:root[data-theme=dark] .xcard .xleg i.c{background:#717171!important}
:root[data-theme=dark] .stt tr[onclick]:hover td:first-child b{color:#fff}
:root[data-theme=dark] .pushban{background:var(--card);color:var(--text-2)}
:root[data-theme=dark] .hk-grid{background:var(--line)}
:root[data-theme=dark] .pushban,:root[data-theme=dark] .pushban.warn,:root[data-theme=dark] [class*=pushban]{background:var(--card)!important;color:var(--text-2)!important}
:root[data-theme=dark] .mailban,:root[data-theme=dark] .mailban.pushban{background:var(--card)!important;color:var(--text-2)!important;box-shadow:inset 3px 0 0 var(--danger)}

/* ===== โหมดกลางคืนแบบ YouTube · หน้าหลัก ===== */
/* ทางลัด = แถวชิปแถวเดียวเลื่อนข้างได้ (เหมือนแถบหมวดของ YouTube) */
:root[data-theme=dark] .pg-home .tiles{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;margin:0 0 14px;padding:0 0 4px;scrollbar-width:none;max-width:none}
:root[data-theme=dark] .pg-home .tiles::-webkit-scrollbar{display:none}
:root[data-theme=dark] .pg-home .tiles .tile{flex:0 0 auto;flex-direction:row;min-height:36px;height:36px;padding:0 14px;gap:8px;border-radius:8px;background:rgba(255,255,255,.10);box-shadow:none;font-size:.875rem;font-weight:500;white-space:nowrap;color:var(--text)}
:root[data-theme=dark] .pg-home .tiles .tile:hover{background:rgba(255,255,255,.18);transform:none}
:root[data-theme=dark] .pg-home .tiles .tile i{width:auto;height:auto;background:none;border-radius:0;color:var(--text)}
:root[data-theme=dark] .pg-home .tiles .tile small{display:none}
/* ประเภทงาน / สถานะ = ชิปมุมมน ที่เลือก = ขาว ตัวดำ */
:root[data-theme=dark] .tchips{border-bottom:0;gap:8px;padding:0;margin:0 0 12px}
:root[data-theme=dark] .tchips button,:root[data-theme=dark] .tchips button:not(.on){background:rgba(255,255,255,.10)!important;border-radius:8px;min-height:36px;padding:6px 14px;box-shadow:none;color:var(--text)}
:root[data-theme=dark] .tchips button:hover:not(.on){background:rgba(255,255,255,.18)!important}
:root[data-theme=dark] .tchips button.on,:root[data-theme=dark] .tchips button[aria-selected=true]{background:#F1F1F1!important;color:#0F0F0F!important}
:root[data-theme=dark] .tchips button.on *,:root[data-theme=dark] .tchips button[aria-selected=true] *{color:#0F0F0F}
:root[data-theme=dark] .ttabs button.on *{color:#0F0F0F}
/* การ์ดงาน = แผ่นเรียบ ไม่มีกรอบ */
:root[data-theme=dark] .tcard,:root[data-theme=dark] .trow,:root[data-theme=dark] .calwrap,:root[data-theme=dark] .fold-b>.card{background:var(--card);border:0;box-shadow:none;border-radius:12px}
:root[data-theme=dark] .tcard:hover{background:var(--card-2)}
/* ปฏิทิน: วันที่เลือก = วงกลมขาว ตัวเลขดำ · วันนี้ = ขอบขาว · จุด = ขาว/เทา */
:root[data-theme=dark] .cal-c.sel{background:#F1F1F1;color:#0F0F0F;box-shadow:none}
:root[data-theme=dark] .cal-c.sel *{color:#0F0F0F}
:root[data-theme=dark] .cal-c.sel u{background:#0F0F0F;color:#F1F1F1}
:root[data-theme=dark] .cal-c.today{box-shadow:inset 0 0 0 1.5px #F1F1F1}
:root[data-theme=dark] .cal-c:hover{background:rgba(255,255,255,.10)}
:root[data-theme=dark] .cal-day .trow{background:rgba(255,255,255,.07);box-shadow:none}
:root[data-theme=dark] .ttabs button,:root[data-theme=dark] .hk-pipe button{border-radius:8px}
:root[data-theme=dark] .hk-pipe{border-radius:10px}

/* แถบแจ้งเตือน (โหมดกลางคืน): เทาเรียบ ไม่ใช้สีชมพู/ครีม */
html[data-theme=dark] .banwrap .mailban,html[data-theme=dark] .banwrap .mailban.pushban,html[data-theme=dark] button.mailban{background-color:#1F1F1F!important;background-image:none!important;color:#AAAAAA!important;box-shadow:none!important;transition:none!important}
html[data-theme=dark] .ban-x{color:#AAAAAA}
html[data-theme=dark] .mailreq{background:#1F1F1F;color:#AAAAAA}

/* ปุ่มรองในการ์ด (โหมดกลางคืน) = เทาโปร่ง ไม่มีกรอบ · โลโก้มุมล่างจาง */
:root[data-theme=dark] .tcard .btn,:root[data-theme=dark] .sheet .btn:not(.pri):not(.danger){background:rgba(255,255,255,.10);border-color:transparent}
:root[data-theme=dark] .side-foot img,:root[data-theme=dark] .foot-logo{opacity:.5}
/* โลโก้ Guru IT = ตัวหนา */
.side-brand .wm,.side-brand .wm b,.join .wm,.join .wm b,.phead .wm,.phead .wm b,.wm,.wm b{font-weight:700}

/* น้ำหนัก 600 ใช้หน้าตัวกลาง (500) — ตัวหนาจริง (700) ใช้เฉพาะโลโก้ */
/* thai */
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/prompt/v12/-W_8XJnvUD7dzB2Ck_kIfWMuQ5Q.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* vietnamese */
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/prompt/v12/-W_8XJnvUD7dzB2Ck_kIZmMuQ5Q.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/prompt/v12/-W_8XJnvUD7dzB2Ck_kIZ2MuQ5Q.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/prompt/v12/-W_8XJnvUD7dzB2Ck_kIaWMu.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ปฏิทิน (โหมดกลางคืน): วันที่เลือก = วงกลมเทาเข้ม ตัวเลขขาว ขอบขาวบาง — ไม่ใช่วงกลมขาวจ้า */
:root[data-theme=dark] .cal-c.sel{background:#3A3A3A;color:#F1F1F1;box-shadow:inset 0 0 0 1.5px #F1F1F1}
:root[data-theme=dark] .cal-c.sel,:root[data-theme=dark] .cal-c.sel *{color:#F1F1F1;font-weight:500}
:root[data-theme=dark] .cal-c.sel u{background:#F1F1F1;color:#0F0F0F}
:root[data-theme=dark] .cal-c.today:not(.sel){box-shadow:inset 0 0 0 1.5px #717171}

/* ===== การ์ดวิเคราะห์แบบ YouTube Studio (หน้าสรุปผล) ===== */
.ys{background:var(--surface);border:1px solid var(--line);border-radius:12px;margin:14px 0;overflow:hidden}
.ys-h{padding:18px 20px 6px}
.ys-h h3{margin:0;font-size:1.25rem;font-weight:500;letter-spacing:-.005em}
.ys-h p{margin:6px 0 0;color:var(--text-2);font-size:.9375rem}
.ys-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border-bottom:1px solid var(--line);margin-top:10px}
.ys-tabs button{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;gap:2px;padding:14px 16px 12px;border-right:1px solid var(--line);border-bottom:3px solid transparent;margin-bottom:-1px;min-width:0}
.ys-tabs button:last-child{border-right:0}
.ys-tabs button:hover{background:var(--card)}
.ys-tabs button:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
.ys-tabs button.on{border-bottom-color:var(--primary);background:var(--card)}
.ys-l{font-size:.8125rem;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ys-v{font-size:1.75rem;font-weight:500;line-height:1.25;font-variant-numeric:tabular-nums;white-space:nowrap}
.ys-tabs .hk-d{font-size:.75rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ys-chart{padding:14px 12px 0}
.ys-chart svg{display:block;width:100%;height:auto;overflow:visible}
.ys-g{stroke:var(--line);stroke-width:1}
.ys-y,.ys-x{fill:var(--text-3);font-size:12px;font-family:inherit}
.ys-ln{fill:none;stroke:var(--primary);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}
.ys-a{fill:var(--primary);opacity:.09}
.ys-p{fill:none;stroke:var(--text-3);stroke-width:1.75;stroke-dasharray:5 5;stroke-linecap:round}
.ys-tip{opacity:0;pointer-events:none;transition:opacity .08s}
.ys-col:hover .ys-tip{opacity:1}
.ys-vl{stroke:var(--text-3);stroke-width:1}
.ys-dot{fill:var(--primary);stroke:var(--surface);stroke-width:2.5}
.ys-tb{fill:var(--card-2);stroke:var(--line)}
.ys-tt{fill:var(--text-2);font-size:12px;font-family:inherit}
.ys-tv{fill:var(--text);font-size:15px;font-weight:500;font-family:inherit}
.ys-tp{fill:var(--text-2);font-size:12px;font-family:inherit}
.ys-f{display:flex;align-items:center;gap:16px;padding:6px 20px 14px;font-size:.8125rem;color:var(--text-2)}
.ys-f .lnk{margin-left:auto;font-weight:500}
.ys-lg{display:inline-flex;align-items:center;gap:6px}
.ys-lg i{display:inline-block;width:18px;height:0;border-top:2.5px solid var(--primary)}
.ys-lg i.b{border-top:2px dashed var(--text-3)}
:root[data-theme=dark] .ys{background:var(--card);border-color:var(--line)}
:root[data-theme=dark] .ys-tabs button:hover,:root[data-theme=dark] .ys-tabs button.on{background:rgba(255,255,255,.06)}
:root[data-theme=dark] .ys-ln{stroke:#F1F1F1}:root[data-theme=dark] .ys-a{fill:#F1F1F1;opacity:.08}:root[data-theme=dark] .ys-dot{fill:#F1F1F1;stroke:var(--card)}
:root[data-theme=dark] .ys-tabs button.on{border-bottom-color:#F1F1F1}
:root[data-theme=dark] .ys-lg i{border-top-color:#F1F1F1}
:root[data-theme=dark] .ys-tb{fill:#272727;stroke:#3A3A3A}
/* ตัวเลขรอง 4 ช่อง */
.hk-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:900px){.hk-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* มือถือ: แท็บตัวเลขเลื่อนข้างได้ */
@media (max-width:759px){
  .ys-tabs{display:flex;overflow-x:auto;scrollbar-width:none}.ys-tabs::-webkit-scrollbar{display:none}
  .ys-tabs button{flex:0 0 150px}
  .ys-h{padding:16px 16px 4px}.ys-v{font-size:1.5rem}
  .ys-chart{padding:12px 4px 0}.ys-f{padding:6px 16px 12px}
}

/* หน้าหลักของเมนู (หน้าหลัก/งาน/ทิกเก็ต/โปรเจกต์/ทีมช่าง): ไม่แสดงชื่อหน้า — ชื่อดูได้จากเมนูที่ไฮไลต์ · หน้าที่เปิดต่อจากหน้าอื่น (มีปุ่มย้อนกลับ) ยังมีชื่อ */
.phead.notitle .ph-t h1,.phead.notitle .ph-t small{display:none}
.phead.notitle{padding-bottom:6px;align-items:center}
.phead.notitle .ph-t{min-height:0}

/* ทางลัดหน้าหลักอยู่ในแถบหัวหน้า (แทนชื่อหน้า): ชิปเตี้ยๆ ไอคอน + ชื่อ + ตัวเลขย่อย เลื่อนข้างได้ */
.phead.has-tiles .ph-t{flex:1 1 0;min-width:0;overflow:hidden}
.phead .tiles{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;margin:0;padding:2px 2px 4px;scrollbar-width:none;max-width:none;--n:0}
.phead .tiles::-webkit-scrollbar{display:none}
.phead .tiles .tile{flex:0 0 auto;flex-direction:row;align-items:center;min-height:38px;height:38px;padding:0 12px;gap:7px;border-radius:10px;font-size:.875rem;font-weight:500;white-space:nowrap;box-shadow:none;background:var(--card-2);color:var(--text)}
.phead .tiles .tile:hover{background:var(--line);transform:none}
.phead .tiles .tile i{width:auto;height:auto;background:none;border-radius:0;color:var(--primary);display:inline-flex}
.phead .tiles .tile i svg{width:19px;height:19px}
.phead .tiles .tile small{display:inline;margin:0;font-size:.8125rem;font-weight:400;color:var(--text-2)}
:root[data-theme=dark] .phead .tiles .tile{background:rgba(255,255,255,.10)}
:root[data-theme=dark] .phead .tiles .tile:hover{background:rgba(255,255,255,.18)}
:root[data-theme=dark] .phead .tiles .tile i{color:var(--text)}
/* มือถือ: แถวทางลัดขึ้นบรรทัดที่สองเต็มความกว้าง เหลือแต่ไอคอน + ชื่อ */
@media (max-width:959px){
  .phead.has-tiles .ph-t{order:3;flex:0 0 100%;margin-top:8px}
  .phead .tiles .tile small{display:none}
}
@media (min-width:960px) and (max-width:1499px){.phead .tiles .tile small{display:none}.phead .tiles .tile{padding:0 11px}}

/* ทางลัดแถบบน: ไม่มีพื้นหลัง (ตัวหนังสือ+ไอคอนเฉยๆ) · อยู่ทุกหน้า */
.hd-tiles{margin:0 0 6px;overflow:hidden}
.hd-tiles .tiles{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:2px;margin:0;padding:0 0 2px;scrollbar-width:none;max-width:none;--n:0}
.hd-tiles .tiles::-webkit-scrollbar{display:none}
.hd-tiles .tiles .tile{flex:0 0 auto;flex-direction:row;align-items:center;min-height:38px;height:38px;padding:0 12px;gap:7px;border-radius:10px;font-size:.875rem;font-weight:500;white-space:nowrap;box-shadow:none}
.hd-tiles .tiles .tile i{width:auto;height:auto;background:none;border-radius:0;display:inline-flex}
.hd-tiles .tiles .tile i svg{width:19px;height:19px}
.hd-tiles .tiles .tile small{display:inline;margin:0;font-size:.8125rem;font-weight:400;color:var(--text-2)}
.phead .tiles .tile,.hd-tiles .tiles .tile,:root[data-theme=dark] .phead .tiles .tile,:root[data-theme=dark] .hd-tiles .tiles .tile{background:transparent}
.phead .tiles .tile:hover,.hd-tiles .tiles .tile:hover{background:var(--card-2)}
:root[data-theme=dark] .phead .tiles .tile:hover,:root[data-theme=dark] .hd-tiles .tiles .tile:hover{background:rgba(255,255,255,.10)}
.hd-tiles .tiles .tile i{color:var(--primary)}
:root[data-theme=dark] .hd-tiles .tiles .tile i{color:var(--text)}
@media (max-width:959px){.hd-tiles .tiles .tile small{display:none}}
@media (min-width:960px) and (max-width:1499px){.hd-tiles .tiles .tile small{display:none}}

/* ทางลัดแถบบน: หน้าตาเดียวกันทุกหน้า — ไอคอนใหญ่ ชื่อ+ตัวเลขย่อยอยู่บรรทัดเดียว */
.phead .tiles .tile,.hd-tiles .tiles .tile{display:inline-flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;height:42px!important;min-height:42px!important;padding:0 12px!important;width:auto!important;text-align:left!important;white-space:nowrap!important}
.phead .tiles .tile span,.hd-tiles .tiles .tile span,.phead .tiles .tile small,.hd-tiles .tiles .tile small{display:inline!important;margin:0!important;white-space:nowrap!important;line-height:1.2}
.phead .tiles .tile i svg,.hd-tiles .tiles .tile i svg{width:24px!important;height:24px!important}
.phead .tiles .tile i,.hd-tiles .tiles .tile i{flex:none;width:auto!important;height:auto!important;padding:0!important}
@media (max-width:959px){.phead .tiles .tile small,.hd-tiles .tiles .tile small{display:none!important}}
@media (min-width:960px) and (max-width:1499px){.phead .tiles .tile small,.hd-tiles .tiles .tile small{display:none!important}}
.phead .tiles .tile span,.hd-tiles .tiles .tile span,.phead .tiles .tile small,.hd-tiles .tiles .tile small{align-self:center!important;font-size:.875rem!important}
.phead .tiles .tile small,.hd-tiles .tiles .tile small{font-size:.8125rem!important;margin-left:0!important}
.phead .tiles .tile small::before,.hd-tiles .tiles .tile small::before{content:none!important}
.phead .tiles .tile span,.hd-tiles .tiles .tile span{font-weight:500!important}

/* ===== ทางลัดแถบบน (.ht): โครงใหม่ ไม่ปนกับสไตล์ .tile เดิม ===== */
.ht-row{display:flex;flex-wrap:nowrap;align-items:center;gap:4px;overflow-x:auto;scrollbar-width:none;padding:2px 0 4px}
.ht-row::-webkit-scrollbar{display:none}
.ht{all:unset;box-sizing:border-box;flex:0 0 auto;display:inline-flex;flex-direction:row;align-items:center;gap:8px;height:42px;padding:0 12px;border-radius:10px;cursor:pointer;white-space:nowrap;color:var(--text);font-size:.875rem;font-weight:500;position:relative}
.ht svg{flex:none;width:24px;height:24px;color:var(--primary)}
.ht-l{font-weight:500;line-height:1.2}
.ht-s{font-weight:400;font-size:.8125rem;color:var(--text-2);line-height:1.2}
.ht-b{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--danger);color:#fff;font-size:.6875rem;font-style:normal;display:inline-flex;align-items:center;justify-content:center}
.ht:hover{background:var(--card-2)}
.ht:focus-visible{outline:2px solid var(--primary);outline-offset:1px}
:root[data-theme=dark] .ht svg{color:var(--text)}
:root[data-theme=dark] .ht:hover{background:rgba(255,255,255,.10)}
.hd-tiles{margin:0 0 6px;overflow:hidden}
.phead.has-tiles .ph-t{flex:1 1 0;min-width:0;overflow:hidden}
@media (max-width:959px){.ht-s{display:none}.phead.has-tiles .ph-t{order:3;flex:0 0 100%;margin-top:8px}}
@media (min-width:960px) and (max-width:1499px){.ht-s{display:none}}

/* ===== แถบเมนูซ้ายแบบ YouTube: แถบไอคอนแคบ (คอมพิวเตอร์) + เมนูสามขีดเปิดรายการเต็ม ===== */
.rail-hb{all:unset;box-sizing:border-box;width:48px;height:48px;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;color:var(--text);flex:none}
.rail-hb:hover{background:var(--card-2)}
.rail-hb:focus-visible{outline:2px solid var(--primary);outline-offset:1px}
:root[data-theme=dark] .rail-hb:hover{background:rgba(255,255,255,.10)}
.set-h{font-size:1.5rem;font-weight:500;margin:6px 0 14px}
@media (max-width:959px){.rail-hb,.tab.rail-only{display:none!important}}
@media (min-width:960px){
  .hb-m{display:none!important}
  .shell{grid-template-columns:72px minmax(0,1fr)}
  .tabbar{width:72px;padding:8px 4px;gap:2px;align-items:center;overflow-x:hidden}
  .tabbar .side-brand,.tabbar .side-me,.tabbar .side-foot,.tabbar .side-filters{display:none!important}
  .tabbar .rail-hb{margin:0 0 8px}
  .tabbar .tab{flex:none;flex-direction:column!important;justify-content:center;align-items:center;gap:4px!important;width:64px;min-height:70px;height:auto;padding:12px 0 8px!important;border-radius:12px;font-size:.6875rem!important;text-align:center;margin:0!important}
  .tabbar .tab i,.tabbar .tab.on i{padding:0!important;background:none!important;display:flex;justify-content:center;width:auto}
  .tabbar .tab svg{width:24px!important;height:24px!important}
  .tabbar .tab span:not(.bdg){font-size:.6875rem;line-height:1.2;font-weight:500;white-space:nowrap}
  .tabbar .tab .bdg{top:-5px;right:-12px}
  .tabbar .tab:hover{background:var(--card-2)}
  .tabbar .tab.on{background:var(--card-2);color:var(--text)}
  :root[data-theme=dark] .tabbar .tab:hover,:root[data-theme=dark] .tabbar .tab.on{background:rgba(255,255,255,.10)}
  :root:not([data-theme=dark]) .tabbar .tab.on{color:var(--primary)}
  /* หน้างาน: ไม่มีรายการสถานะในแถบซ้ายแล้ว — ใช้ตัวกรองในหน้าเหมือนมือถือ */
  .fold[data-fold="tk-status"] .fold-h{display:flex}
  .fold[data-fold="tk-status"]:not(.open) .fold-b{display:none}
  .tbar-tk .ttabs{display:flex}
}
/* เมนูสามขีด */
.nv{position:fixed;inset:0;z-index:60;pointer-events:none}
.nv.open{pointer-events:auto}
.nv-bg{position:absolute;inset:0;background:rgba(0,0,0,.5);opacity:0;transition:opacity .2s}
.nv.open .nv-bg{opacity:1}
.nv-p{position:absolute;left:0;top:0;bottom:0;width:256px;max-width:86vw;background:var(--surface);display:flex;flex-direction:column;transform:translateX(-100%);transition:transform .22s ease;box-shadow:var(--shadow)}
.nv.open .nv-p{transform:none}
.nv-h{display:flex;align-items:center;gap:8px;padding:8px 12px;min-height:56px}
.nv-sc{flex:1;overflow-y:auto;padding:4px 12px}
.nv-i{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:18px;width:100%;height:42px;padding:0 12px;border-radius:10px;cursor:pointer;font-size:.9375rem;color:var(--text);white-space:nowrap}
.nv-i svg{flex:none}
.nv-i:hover{background:var(--card-2)}
.nv-i.on{background:var(--card-2);font-weight:500}
.nv-i:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
:root[data-theme=dark] .nv-i:hover,:root[data-theme=dark] .nv-i.on{background:rgba(255,255,255,.10)}
.nv-s{margin-left:auto;font-size:.8125rem;color:var(--text-2)}
.nv-b{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--danger);color:#fff;font-size:.75rem;font-style:normal;display:inline-flex;align-items:center;justify-content:center}
.nv-sep{height:1px;background:var(--line);margin:8px 0}
.nv-t{padding:6px 12px 4px;font-size:.8125rem;color:var(--text-2);font-weight:500}
.nv-f{padding:12px 24px 16px}
:root[data-theme=dark] .nv-p{background:#0F0F0F}
@media (prefers-reduced-motion:reduce){.nv-p,.nv-bg{transition:none}}
/* คอมพิวเตอร์: ตัวเลือกสถานะงานกลับมาแสดงในหน้า (เดิมอยู่แถบซ้าย) */
@media (min-width:960px){.statesel{display:inline-flex}.tlbar.no-state .statesel{display:none}.tlbar .ibtn{margin-left:auto}}
/* ป้ายตัวเลขบนไอคอนในแถบซ้าย */
.tabbar .tab i{position:relative}
.tabbar .tab .bdg{top:-6px;right:-14px}

/* ปุ่มมุมขวาบน (ค้นหา · สร้างงาน · แชท · แจ้งเตือน): เว้นระยะให้โปร่ง */
.phead .ph-a{gap:12px}
@media (max-width:599px){.phead .ph-a{gap:8px}}

/* ===== แอนิเมชัน (นุ่ม สบายตา · ปิดอัตโนมัติถ้าเครื่องตั้ง "ลดการเคลื่อนไหว") ===== */
:root{--ease:cubic-bezier(.2,0,0,1);--ease-in:cubic-bezier(.3,0,1,1)}
/* ไอคอนสามขีด → กากบาท */
.hbi{position:relative;display:block;width:22px;height:16px}
.hbi i{position:absolute;left:0;right:0;height:2px;border-radius:2px;background:currentColor;transition:transform .32s var(--ease),opacity .2s,top .32s var(--ease)}
.hbi i:nth-child(1){top:0}.hbi i:nth-child(2){top:7px}.hbi i:nth-child(3){top:14px}
.nv.open .hbi i:nth-child(1){top:7px;transform:rotate(45deg)}
.nv.open .hbi i:nth-child(2){opacity:0;transform:scaleX(.2)}
.nv.open .hbi i:nth-child(3){top:7px;transform:rotate(-45deg)}
.rail-hb:hover .hbi i:nth-child(2){transform:scaleX(.7)}
.nv.open .rail-hb:hover .hbi i:nth-child(2){transform:scaleX(.2)}
/* เมนูสามขีด: ฉากหลังจางเข้า · แผงเลื่อนนุ่มแบบ YouTube · รายการไล่เข้าทีละแถว */
.nv-bg{transition:opacity .28s var(--ease);backdrop-filter:blur(0);}
.nv.open .nv-bg{backdrop-filter:blur(2px)}
.nv-p{transition:transform .3s var(--ease),box-shadow .3s;will-change:transform}
.nv:not(.open) .nv-p{transition:transform .22s var(--ease-in)}
.nv-sc>*{opacity:0}
.nv.open .nv-sc>*{animation:nvIn .38s var(--ease) both}
.nv.open .nv-sc>:nth-child(1){animation-delay:82ms}
.nv.open .nv-sc>:nth-child(2){animation-delay:104ms}
.nv.open .nv-sc>:nth-child(3){animation-delay:126ms}
.nv.open .nv-sc>:nth-child(4){animation-delay:148ms}
.nv.open .nv-sc>:nth-child(5){animation-delay:170ms}
.nv.open .nv-sc>:nth-child(6){animation-delay:192ms}
.nv.open .nv-sc>:nth-child(7){animation-delay:214ms}
.nv.open .nv-sc>:nth-child(8){animation-delay:236ms}
.nv.open .nv-sc>:nth-child(9){animation-delay:258ms}
.nv.open .nv-sc>:nth-child(10){animation-delay:280ms}
.nv.open .nv-sc>:nth-child(11){animation-delay:302ms}
.nv.open .nv-sc>:nth-child(12){animation-delay:324ms}
.nv.open .nv-sc>:nth-child(13){animation-delay:346ms}
.nv.open .nv-sc>:nth-child(14){animation-delay:368ms}
.nv.open .nv-sc>:nth-child(15){animation-delay:390ms}
.nv.open .nv-sc>:nth-child(16){animation-delay:412ms}
@keyframes nvIn{from{opacity:0;transform:translateX(-14px)}to{opacity:1;transform:none}}
.nv-f{opacity:0;transition:opacity .3s .25s}.nv.open .nv-f{opacity:1}
.nv-i{transition:background .15s,transform .12s}
.nv-i:active{transform:scale(.975)}
/* เปลี่ยนหน้า: จางเข้า + เลื่อนขึ้นเล็กน้อย · การ์ดรายการไล่เข้า */
.pg-enter{animation:pgIn .34s var(--ease) backwards}
@keyframes pgIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.pg-enter .list>*,.pg-enter .hk-grid>*{animation:itemIn .42s var(--ease) backwards}
.pg-enter .list>:nth-child(1),.pg-enter .hk-grid>:nth-child(1){animation-delay:88ms}
.pg-enter .list>:nth-child(2),.pg-enter .hk-grid>:nth-child(2){animation-delay:116ms}
.pg-enter .list>:nth-child(3),.pg-enter .hk-grid>:nth-child(3){animation-delay:144ms}
.pg-enter .list>:nth-child(4),.pg-enter .hk-grid>:nth-child(4){animation-delay:172ms}
.pg-enter .list>:nth-child(5),.pg-enter .hk-grid>:nth-child(5){animation-delay:200ms}
.pg-enter .list>:nth-child(6),.pg-enter .hk-grid>:nth-child(6){animation-delay:228ms}
.pg-enter .list>:nth-child(7),.pg-enter .hk-grid>:nth-child(7){animation-delay:256ms}
.pg-enter .list>:nth-child(8),.pg-enter .hk-grid>:nth-child(8){animation-delay:284ms}
.pg-enter .list>:nth-child(9),.pg-enter .hk-grid>:nth-child(9){animation-delay:312ms}
.pg-enter .list>:nth-child(10),.pg-enter .hk-grid>:nth-child(10){animation-delay:340ms}
@keyframes itemIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
/* กดปุ่ม: ย่อเล็กน้อยแล้วเด้งกลับ · เปลี่ยนสีนุ่ม */
.btn,.ibtn,.rail-hb,.tab,.tile,.ht,.fab,.ttabs button,.tchips button,.hk-pipe button,.srow,.cal-c,.ys-tabs button{transition:background-color .16s,color .16s,box-shadow .2s,transform .14s var(--ease),opacity .16s}
.btn:active,.ibtn:active,.rail-hb:active,.tile:active,.ht:active,.ttabs button:active,.tchips button:active,.hk-pipe button:active,.ys-tabs button:active{transform:scale(.94)}
.tabbar .tab:active{transform:scale(.92)}
.fab{transition:transform .2s var(--ease),box-shadow .2s}
.fab:hover{transform:translateY(-2px) scale(1.03)}
.fab:active{transform:scale(.92)}
.tcard,.trow{transition:background-color .16s,transform .2s var(--ease),box-shadow .2s}
@media (hover:hover){.tcard:hover{transform:translateY(-2px)}}
.tcard:active,.trow:active{transform:scale(.985)}
/* แท็บตัวเลขในการ์ดวิเคราะห์: เส้นใต้เลื่อนเข้า · กราฟวาดเส้น + พื้นจางเข้า */
.ys-tabs button{background-image:linear-gradient(var(--primary),var(--primary));background-repeat:no-repeat;background-size:0 3px;background-position:0 100%;transition:background-size .3s var(--ease),background-color .16s}
.ys-tabs button.on{background-size:100% 3px;border-bottom-color:transparent}
:root[data-theme=dark] .ys-tabs button{background-image:linear-gradient(#F1F1F1,#F1F1F1)}
.ys-v{transition:color .2s}
.ys-chart.anim .ys-ln{stroke-dasharray:1;stroke-dashoffset:1;animation:ysDraw .9s var(--ease) .05s forwards}
.ys-chart.anim .ys-a{animation:ysFade .7s ease .35s backwards}
.ys-chart.anim .ys-p{animation:ysFade .7s ease .5s backwards}
@keyframes ysDraw{to{stroke-dashoffset:0}}
@keyframes ysFade{from{opacity:0}}
.ys-tip{transition:opacity .12s}
/* ฟอร์ม/แผงข้าง/แจ้งเตือน: ใช้ easing เดียวกัน */
.sheet{transition-timing-function:var(--ease)!important}
.toast{transition-timing-function:var(--ease)}
@media (prefers-reduced-motion:reduce){
  .pg-enter,.pg-enter .list>*,.pg-enter .hk-grid>*,.nv.open .nv-sc>*{animation:none!important}
  .nv-sc>*,.nv-f{opacity:1}
  .ys-chart.anim .ys-ln{animation:none;stroke-dasharray:none}.ys-chart.anim .ys-a,.ys-chart.anim .ys-p{animation:none}
  .hbi i,.nv-p,.nv-bg,.ys-tabs button{transition:none}
}

/* แอนิเมชันต้องไม่ทำให้เนื้อหาหายถ้าแอนิเมชันถูกปิด: สถานะปกติ = มองเห็นครบ · แอนิเมชันเริ่มจากจางแล้วเข้ามา */
.nv-sc>*{opacity:1}
.nv.open .nv-sc>*{animation:nvIn .38s var(--ease) backwards}
.nv-f{opacity:1;transition:none}
.nv.open .nv-f{animation:nvFoot .4s ease .3s backwards}
@keyframes nvFoot{from{opacity:0}}
.ys-chart.anim .ys-ln{stroke-dasharray:none;stroke-dashoffset:0;animation:ysDraw2 .9s var(--ease) .05s backwards}
@keyframes ysDraw2{from{stroke-dasharray:1;stroke-dashoffset:1}to{stroke-dasharray:1;stroke-dashoffset:0}}
.ys-chart.anim .ys-a{animation:ysFade .7s ease .35s backwards}
.ys-chart.anim .ys-p{animation:ysFade .7s ease .5s backwards}

/* หัวหน้าเพจบนมือถือ: ไม่ให้ปุ่มขวาตกลงบรรทัดใหม่ — พื้นที่ชื่อ/ช่องว่างหดได้ ปุ่มไม่หด */
@media (max-width:959px){
  .phead{flex-wrap:nowrap;gap:6px}
  .phead .ph-t,.phead.notitle .ph-t,.phead.has-tiles .ph-t{flex:1 1 0;min-width:0;order:0;margin:0}
  .phead .ph-a{flex:none;order:0;margin-left:auto}
  .phead .me-av,.phead .hb-m,.phead .ibtn.back{flex:none}
}
@media (max-width:359px){.phead{gap:4px}.phead .ph-a{gap:4px}.phead .ibtn,.phead .me-av{width:40px;height:40px}}

/* ปุ่มหลัก (โหมดกลางคืน): ขาว ตัวดำ เสมอ ไม่ว่าอยู่ในการ์ด แผงข้าง หรือป๊อปอัป — กันปุ่มกลายเป็นเทาตัวดำอ่านไม่ออก */
:root[data-theme=dark] .btn.primary,:root[data-theme=dark] .tcard .btn.primary,:root[data-theme=dark] .sheet .btn.primary,:root[data-theme=dark] .modal-card .btn.primary,:root[data-theme=dark] .fab{background:#F1F1F1;color:#0F0F0F}
:root[data-theme=dark] .btn.primary:hover{background:#FFFFFF}
:root[data-theme=dark] .btn.primary svg{color:inherit}
:root[data-theme=dark] .btn.primary.danger-btn,:root[data-theme=dark] .btn.danger-btn{background:#E5484D;color:#fff}
:root[data-theme=dark] .btn.ghost-red{background:transparent;color:var(--danger);box-shadow:inset 0 0 0 1px var(--danger)}
:root[data-theme=dark] .btn[disabled],:root[data-theme=dark] .btn:disabled{opacity:.45}
html:root[data-theme=dark] body .sheet .btn.primary:not(.pri):not(.danger),html:root[data-theme=dark] body .modal-card .btn.primary:not(.pri):not(.danger){background:#F1F1F1;color:#0F0F0F;border-color:#F1F1F1}
html:root[data-theme=dark] body .sheet .btn.primary.danger-btn,html:root[data-theme=dark] body .modal-card .btn.primary.danger-btn{background:#E5484D;color:#fff;border-color:#E5484D}
html:root[data-theme=dark] body .btn.primary.lc2-chat{background:#06c755;border-color:#06c755;color:#fff}

/* เครื่องที่ตั้ง "ลดการเคลื่อนไหว" (เช่น Windows ปิดภาพเคลื่อนไหว): เดิมระบบปิดแอนิเมชันทั้งหมด ทำให้บนคอมไม่เห็นอะไรเลย
   ตอนนี้ยังเล่นแอนิเมชันหลักของเมนู เปลี่ยนหน้า กราฟ และปุ่ม (ไม่มีการเคลื่อนไหวต่อเนื่อง/วนซ้ำ) */
@media (prefers-reduced-motion:reduce){
  :root .nv-p{transition:transform .3s var(--ease),box-shadow .3s!important}
  :root .nv:not(.open) .nv-p{transition:transform .22s var(--ease-in)!important}
  :root .nv-bg{transition:opacity .28s var(--ease)!important}
  :root .hbi i{transition:transform .32s var(--ease),opacity .2s,top .32s var(--ease)!important}
  :root .nv.open .nv-sc>*{animation-name:nvIn!important;animation-duration:.38s!important;animation-timing-function:var(--ease)!important;animation-fill-mode:backwards!important}
  :root .nv.open .nv-f{animation-name:nvFoot!important;animation-duration:.4s!important;animation-fill-mode:backwards!important}
  :root .pg-enter{animation-name:pgIn!important;animation-duration:.34s!important;animation-timing-function:var(--ease)!important;animation-fill-mode:backwards!important}
  :root .pg-enter .list>*,:root .pg-enter .hk-grid>*{animation-name:itemIn!important;animation-duration:.42s!important;animation-timing-function:var(--ease)!important;animation-fill-mode:backwards!important}
  :root .ys-chart.anim .ys-ln{animation-name:ysDraw2!important;animation-duration:.9s!important;animation-timing-function:var(--ease)!important;animation-fill-mode:backwards!important}
  :root .ys-chart.anim .ys-a,:root .ys-chart.anim .ys-p{animation-name:ysFade!important;animation-duration:.7s!important;animation-fill-mode:backwards!important}
  :root .btn,:root .ibtn,:root .rail-hb,:root .tab,:root .tile,:root .ht,:root .ttabs button,:root .tchips button,:root .hk-pipe button,:root .srow,:root .cal-c,:root .nv-i,:root .tcard,:root .trow{transition:background-color .16s,color .16s,box-shadow .2s,transform .14s var(--ease),opacity .16s!important}
  :root .ys-tabs button{transition:background-size .3s var(--ease),background-color .16s!important}
  :root .fab{transition:transform .2s var(--ease),box-shadow .2s!important}
}

/* แท็บประเภท (แจ้งเหตุ / งานบำรุงรักษา / ร้องเรียน ฯลฯ) โหมดสว่าง: ปุ่มเม็ดยาเด่นชัด — ที่เลือก = น้ำเงินเต็ม ตัวขาว */
:root:not([data-theme=dark]) .tchips{border-bottom:0;gap:8px;padding:0;margin:0 0 12px;overflow-x:auto}
:root:not([data-theme=dark]) .tchips button,:root:not([data-theme=dark]) .tchips button:not(.on){flex:0 0 auto;min-height:42px;padding:8px 18px;border-radius:999px;border:0;background:var(--card-2)!important;box-shadow:inset 0 0 0 1px var(--line);color:var(--text);font-size:.9375rem;font-weight:500}
:root:not([data-theme=dark]) .tchips button:hover:not(.on){background:var(--primary-s)!important;color:var(--primary);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary) 40%,transparent)}
:root:not([data-theme=dark]) .tchips button.on,:root:not([data-theme=dark]) .tchips button[aria-selected=true]{background:var(--primary)!important;color:#fff!important;box-shadow:0 3px 10px -3px color-mix(in srgb,var(--primary) 70%,transparent);font-weight:600}
:root:not([data-theme=dark]) .tchips button.on *,:root:not([data-theme=dark]) .tchips button[aria-selected=true] *{color:#fff}
:root:not([data-theme=dark]) .tchips button::after{display:none!important}

/* ปุ่ม/แท็บ/ชิป: สี่เหลี่ยมผืนผ้าขอบมนเล็กน้อย (ไม่ใช่เม็ดยา) ทุกโหมด */
:root .ttabs button,:root .tchips button,:root .tchips button:not(.on),:root .ttabs button:not(.on),
:root .statesel select,:root .sortbtn,:root .hk-pipe button,:root .rfilter select.psel,:root .lt-st,:root .btn.primary.block,:root .btn.block{border-radius:10px}
:root .tn,:root .tchips button .cnt,:root .ttabs button .tn,:root .tchips button b,:root .tchips button .n{border-radius:6px}
:root .tabbar .tab,:root .tab i,:root .tab.on i{border-radius:12px}
.hk-pipe{border-radius:10px}
.fab{border-radius:16px}
@media (min-width:960px){.fab{border-radius:16px}}
:root:not([data-theme=dark]) .tchips button,:root:not([data-theme=dark]) .tchips button:not(.on),:root:not([data-theme=dark]) .ttabs button{border-radius:10px}

/* โหมดกลางคืน: พื้นหลังสว่างขึ้น (เทาเข้ม ไม่ใช่ดำสนิท) */
:root[data-theme=dark]{
  --backdrop:#212121; --bg:#212121; --surface:#212121; --card:#2B2B2B; --card-2:#363636; --line:#414141;
  --text:#F1F1F1; --text-2:#B3B3B3; --text-3:#858585; --text-ph:#9A9A9A;
  --map-bg:#2B2B2B; --map-road:#414141;
}
:root[data-theme=dark] .tabbar,:root[data-theme=dark] .nv-p{background:#212121}
:root[data-theme=dark] select.psel,:root[data-theme=dark] .rfilter select.psel{background-color:#212121}
:root[data-theme=dark] .ttabs button,:root[data-theme=dark] .tchips button,:root[data-theme=dark] .tchips button:not(.on),:root[data-theme=dark] .hk-pipe button:hover{background:rgba(255,255,255,.12)!important}
:root[data-theme=dark] .ttabs button:hover:not(.on),:root[data-theme=dark] .tchips button:hover:not(.on),:root[data-theme=dark] .tab:hover,:root[data-theme=dark] .tabbar .tab.on,:root[data-theme=dark] .tabbar .tab:hover,:root[data-theme=dark] .nv-i:hover,:root[data-theme=dark] .nv-i.on{background:rgba(255,255,255,.16)!important}
:root[data-theme=dark] .ttabs button.on,:root[data-theme=dark] .tchips button.on,:root[data-theme=dark] .tchips button[aria-selected=true]{background:#F1F1F1!important}
:root[data-theme=dark] .mailban,:root[data-theme=dark] .mailban.pushban,html[data-theme=dark] .banwrap .mailban{background-color:#2F2F2F!important}
:root[data-theme=dark] .ys-tb{fill:#363636;stroke:#4A4A4A}
:root[data-theme=dark] .ibtn,:root[data-theme=dark] .btn{background-color:rgba(255,255,255,.12)}
:root[data-theme=dark] .rail-hb:hover{background:rgba(255,255,255,.14)}

/* ปุ่มแท็บบนสุดของแต่ละหน้า: ใหญ่ขึ้น เด่นขึ้น เว้นระยะห่าง */
:root .tchips,:root .rpt-tabs .ttabs{gap:12px;margin:0 0 16px;padding:2px 2px 4px}
:root .tchips button,:root .tchips button:not(.on){min-height:46px;padding:10px 22px;font-size:1rem;gap:8px}
:root .tchips button svg{width:18px;height:18px}
:root[data-theme=dark] .tchips button:not(.on){background:rgba(255,255,255,.14)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.14);color:#F1F1F1}
:root[data-theme=dark] .tchips button.on,:root[data-theme=dark] .tchips button[aria-selected=true]{background:#F1F1F1!important;color:#0F0F0F!important;font-weight:600;box-shadow:0 4px 14px -4px rgba(0,0,0,.6)}
:root[data-theme=dark] .tchips button:hover:not(.on){background:rgba(255,255,255,.22)!important}
:root .rpt-tabs .ttabs button,:root .rpt-tabs .ttabs button.on{min-height:44px;padding:9px 18px}
@media (max-width:599px){:root .tchips{gap:8px}:root .tchips button,:root .tchips button:not(.on){min-height:44px;padding:9px 16px;font-size:.9375rem}}

/* ไอคอนใหญ่ขึ้น หนาขึ้น เด่นขึ้น (ทั้งระบบ) · ไอคอนเมนูที่เลือก = มีพื้นเติมอ่อนๆ */
.tab svg,.tabbar .tab svg{width:28px!important;height:28px!important;stroke-width:2}
.tab.on svg{fill:currentColor;fill-opacity:.16}
@media (max-width:959px){.tabbar .tab{min-height:60px}.tab i{padding:3px 18px}}
.rail-hb .hbi,.hb-m .hbi{width:24px;height:18px}
.hbi i{height:2.5px}.hbi i:nth-child(2){top:7.5px}.hbi i:nth-child(3){top:15px}
.nv.open .hbi i:nth-child(1),.nv.open .hbi i:nth-child(3){top:7.5px}
.nv-i svg{width:26px;height:26px;stroke-width:2}
.nv-i{gap:20px;height:46px}
.ibtn svg{width:26px;height:26px;stroke-width:2}
.ph-a .ibtn,.phead .ibtn{width:46px;height:46px}
.tchips button svg{width:21px!important;height:21px!important;stroke-width:2.2}
.ttabs button svg{width:19px;height:19px;stroke-width:2.2}
.tile i svg{width:32px!important;height:32px!important;stroke-width:1.9}
.tcard .tc-ic{width:38px;height:38px;border-radius:12px}
.tcard .tc-ic svg{width:24px!important;height:24px!important;stroke-width:2}
.srow i svg{width:26px!important;height:26px!important;stroke-width:2}
.fab svg{width:30px;height:30px;stroke-width:2.4}
.btn svg{width:19px;height:19px;stroke-width:2.2}
.btn.sm svg{width:17px;height:17px}
.fold-ic svg{width:22px;height:22px;stroke-width:2.2}
.empty svg{width:42px!important;height:42px!important;stroke-width:1.7}
.ys-tabs svg{stroke-width:2}
.cal-g svg,.cal-c svg{stroke-width:2}

/* ===== แท็บบนสุดของหน้า (แจ้งเหตุ / MA / ร้องเรียน ฯลฯ) — ดีไซน์ใหม่: ปุ่มการ์ดใหญ่ ไอคอนในกล่องสี ตัวเลขเป็นป้าย ===== */
:root .tchips{gap:14px;margin:4px 0 18px;padding:2px 2px 6px}
:root .tchips button,:root .tchips button:not(.on){display:inline-flex;align-items:center;gap:12px;min-height:58px;padding:0 20px 0 10px;border-radius:14px;font-size:1.0625rem;font-weight:600;letter-spacing:.005em;border:0}
:root .tchips button svg,:root .tchips button svg:first-child{flex:none;width:40px!important;height:40px!important;padding:9px;border-radius:11px;stroke-width:2.2;box-sizing:border-box}
:root .tchips button .tn,:root .tchips button .cnt,:root .tchips button b{margin-left:2px;min-width:26px;height:26px;padding:0 8px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-size:.9375rem;font-weight:700}
/* โหมดสว่าง */
:root:not([data-theme=dark]) .tchips button:not(.on){background:#fff!important;color:#1F2933;box-shadow:inset 0 0 0 1.5px #D3DAE6,0 1px 2px rgba(15,35,65,.06)}
:root:not([data-theme=dark]) .tchips button:not(.on) svg{background:#E8EEF8;color:var(--primary)}
:root:not([data-theme=dark]) .tchips button:not(.on) .tn,:root:not([data-theme=dark]) .tchips button:not(.on) b{background:#E8EEF8;color:#1F2933}
:root:not([data-theme=dark]) .tchips button:hover:not(.on){background:#F4F8FF!important;box-shadow:inset 0 0 0 1.5px var(--primary),0 3px 10px -4px rgba(6,95,212,.35)}
:root:not([data-theme=dark]) .tchips button.on,:root:not([data-theme=dark]) .tchips button[aria-selected=true]{background:linear-gradient(135deg,#0B6FE8,#0553B8)!important;color:#fff!important;box-shadow:0 8px 18px -8px rgba(6,95,212,.8)}
:root:not([data-theme=dark]) .tchips button.on svg{background:rgba(255,255,255,.2);color:#fff;fill:none}
:root:not([data-theme=dark]) .tchips button.on .tn,:root:not([data-theme=dark]) .tchips button.on b{background:rgba(255,255,255,.22);color:#fff}
/* โหมดกลางคืน */
:root[data-theme=dark] .tchips button:not(.on){background:#303030!important;color:#F1F1F1;box-shadow:inset 0 0 0 1.5px #4A4A4A}
:root[data-theme=dark] .tchips button:not(.on) svg{background:rgba(255,255,255,.12);color:#F1F1F1}
:root[data-theme=dark] .tchips button:not(.on) .tn,:root[data-theme=dark] .tchips button:not(.on) b{background:rgba(255,255,255,.14);color:#F1F1F1}
:root[data-theme=dark] .tchips button:hover:not(.on){background:#3A3A3A!important;box-shadow:inset 0 0 0 1.5px #8A8A8A}
:root[data-theme=dark] .tchips button.on,:root[data-theme=dark] .tchips button[aria-selected=true]{background:#F1F1F1!important;color:#161616!important;box-shadow:0 8px 20px -8px rgba(0,0,0,.7)}
:root[data-theme=dark] .tchips button.on svg{background:rgba(0,0,0,.12);color:#161616;fill:none}
:root[data-theme=dark] .tchips button.on .tn,:root[data-theme=dark] .tchips button.on b{background:rgba(0,0,0,.14);color:#161616}
:root[data-theme=dark] .tchips button.on *{color:#161616}
@media (max-width:599px){:root .tchips{gap:10px}:root .tchips button,:root .tchips button:not(.on){min-height:54px;padding:0 16px 0 8px;font-size:1rem}:root .tchips button svg{width:36px!important;height:36px!important;padding:8px}}

/* ไอคอนชุดทึบ (svg.fx): ใช้สีตัวอักษร ไม่มีเส้นขอบ ไม่ถูกกฎไอคอนเส้นเดิมทับ */
svg.fx{fill:currentColor!important;fill-opacity:1!important;stroke:none!important}
.tab svg.fx,.tabbar .tab svg.fx{width:26px!important;height:26px!important;opacity:.78}
.tab.on svg.fx{opacity:1}
.ibtn svg.fx{width:24px!important;height:24px!important}
.nv-i svg.fx{width:24px!important;height:24px!important;opacity:.85}
.nv-i.on svg.fx{opacity:1}
.tchips button svg.fx{fill:currentColor!important}
:root:not([data-theme=dark]) .tchips button.on svg.fx,:root[data-theme=dark] .tchips button.on svg.fx{fill:currentColor!important}
.ht svg.fx{width:22px!important;height:22px!important}

/* แท็บบนสุด: ลดพื้นหลังซ้อน — ไอคอนและตัวเลขไม่มีกล่องพื้น เหลือแค่พื้นปุ่มชั้นเดียว */
:root .tchips button svg,:root .tchips button svg.fx,:root .tchips button:not(.on) svg,:root .tchips button.on svg,:root:not([data-theme=dark]) .tchips button:not(.on) svg,:root[data-theme=dark] .tchips button:not(.on) svg,:root:not([data-theme=dark]) .tchips button.on svg,:root[data-theme=dark] .tchips button.on svg{background:none!important;padding:0!important;width:26px!important;height:26px!important;border-radius:0}
:root .tchips button,:root .tchips button:not(.on){gap:10px;padding:0 22px 0 18px;min-height:54px}
:root .tchips button .tn,:root .tchips button .cnt,:root .tchips button b,:root .tchips button:not(.on) .tn,:root .tchips button:not(.on) b,:root .tchips button.on .tn,:root .tchips button.on b,:root:not([data-theme=dark]) .tchips button:not(.on) .tn,:root:not([data-theme=dark]) .tchips button:not(.on) b,:root[data-theme=dark] .tchips button:not(.on) .tn,:root[data-theme=dark] .tchips button:not(.on) b,:root:not([data-theme=dark]) .tchips button.on .tn,:root:not([data-theme=dark]) .tchips button.on b,:root[data-theme=dark] .tchips button.on .tn,:root[data-theme=dark] .tchips button.on b{background:none!important;min-width:0;height:auto;padding:0;margin-left:0;font-size:1rem;font-weight:700;opacity:.85}
@media (max-width:599px){:root .tchips button,:root .tchips button:not(.on){padding:0 16px 0 14px;min-height:50px}:root .tchips button svg{width:24px!important;height:24px!important}}
/* ไอคอนเส้นในแถบเมนู: ขนาดเดียวกับเมนูสามขีด · ที่เลือกมีพื้นเติมอ่อน */
.tabbar .tab svg:not(.fx){width:26px!important;height:26px!important;stroke-width:1.9;opacity:1}

/* แท็บประเภทอยู่ในแถวหัวหน้า (ข้างปุ่มสร้างงาน) */
.phead.has-chips{align-items:center;gap:12px}
.phead.has-chips .ph-t{flex:1 1 0;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding:2px}
.phead.has-chips .ph-t::-webkit-scrollbar{display:none}
.phead.has-chips .tchips{margin:0;padding:0;flex-wrap:nowrap;gap:10px;width:max-content}
.phead.has-chips .tchips button,.phead.has-chips .tchips button:not(.on){min-height:46px;padding:0 18px 0 14px;font-size:1rem;border-radius:12px}
.phead.has-chips .tchips button svg{width:24px!important;height:24px!important}
@media (max-width:959px){
  .phead.has-chips{flex-wrap:wrap}
  .phead.has-chips .ph-t{order:3;flex:0 0 100%;margin-top:8px}
}

/* มือถือ: ไอคอนเล็กลง พื้นหลังซ้อนน้อยลง */
@media (max-width:959px){
  .tabbar .tab svg,.tabbar .tab svg:not(.fx),.tab svg.fx{width:24px!important;height:24px!important}
  .tabbar .tab{min-height:56px}
  .ibtn svg,.ibtn svg.fx{width:22px!important;height:22px!important}
  .phead .ibtn,.ph-a .ibtn,.phead .me-av{width:42px;height:42px}
  .phead .hbi{width:22px;height:16px}
  .phead.has-chips .ph-t{margin-top:6px;padding:0}
  .phead.has-chips .tchips{gap:8px}
  .phead.has-chips .tchips button,.phead.has-chips .tchips button:not(.on),:root[data-theme=dark] .phead.has-chips .tchips button:not(.on),:root:not([data-theme=dark]) .phead.has-chips .tchips button:not(.on){min-height:42px;padding:0 14px 0 12px;gap:8px;font-size:.9375rem;border-radius:10px;box-shadow:none;border:0}
  .phead.has-chips .tchips button svg,.phead.has-chips .tchips button svg.fx{width:20px!important;height:20px!important}
  :root[data-theme=dark] .phead.has-chips .tchips button:not(.on){background:rgba(255,255,255,.12)!important}
  :root:not([data-theme=dark]) .phead.has-chips .tchips button:not(.on){background:var(--card-2)!important}
  :root:not([data-theme=dark]) .phead.has-chips .tchips button.on{background:var(--primary)!important;box-shadow:none}
  .nv-i svg{width:24px;height:24px}
  .tile i svg{width:26px!important;height:26px!important}
  .tcard .tc-ic{width:34px;height:34px}.tcard .tc-ic svg{width:21px!important;height:21px!important}
}

/* หน้าจอมือถือ: ความสูงตามพื้นที่มองเห็นจริง (ไม่ให้แถบเมนูล่างจมใต้ขอบจอ) */
.shell{height:100vh;height:100dvh;height:var(--app-h,100dvh)}
@media (max-width:959px){
  .tabbar{padding-bottom:calc(var(--sab) + 6px)}
  .tabbar .tab{min-height:54px;padding:2px 0 4px}
  .tabbar .tab i{padding:3px 16px}
  .scroll{padding-bottom:calc(96px + var(--sab))}
}
/* พื้นหลังซ้อนน้อยลง: ไอคอนในการ์ดงานไม่มีกล่องรอง · รูปโปรไฟล์ไม่มีวงแหวนซ้อน */
.tcard .tc-ic{background:none!important;box-shadow:none!important}
.tcard .tc-ic svg{opacity:.9}
.me-av,.me-av.on,.me-av:hover{box-shadow:none!important}
.phead .me-av{background:none}
:root[data-theme=dark] .tcard,:root[data-theme=dark] .trow{background:var(--card)}
@media (max-width:959px){
  .tabbar .tab,.tabbar .tab.on,.tabbar .tab:hover,.tabbar .tab:active,:root[data-theme=dark] .tabbar .tab.on,:root[data-theme=dark] .tabbar .tab:hover{background:transparent!important;box-shadow:none}
  .tabbar .tab.on i{border-radius:14px}
  :root[data-theme=dark] .tabbar .tab.on i{background:rgba(255,255,255,.16)!important}
  :root[data-theme=dark] .tabbar .tab.on{color:#F1F1F1}
}

/* ===== หน้าโหลดแบบโครงกระดูก (skeleton) — แสดงทันทีระหว่างรอข้อมูล แล้วถูกแทนที่เมื่อโหลดเสร็จ ===== */
.sk-b{display:block;flex:none;border-radius:10px;background:linear-gradient(90deg,var(--card-2) 20%,color-mix(in srgb,var(--card-2),#fff 16%) 50%,var(--card-2) 80%);background-size:220% 100%;animation:skShimmer 1.5s ease-in-out infinite}
@keyframes skShimmer{0%{background-position:120% 0}100%{background-position:-120% 0}}
.sk{padding-top:calc(env(safe-area-inset-top,0px) + 18px)}
.sk-head{display:flex;align-items:center;gap:8px;margin-bottom:18px}
.sk-sp{flex:1}
.sk-hb,.sk-btn{width:44px;height:44px;border-radius:12px}
.sk-av{width:44px;height:44px;border-radius:50%}
.sk-row{display:flex;gap:10px;margin:0 0 14px}
.sk-chip{width:110px;height:44px;border-radius:12px}.sk-chip.s{width:90px}
.sk-chip2{width:84px;height:34px;border-radius:10px}.sk-chip2.s{width:104px}
.sk-grid{display:grid;grid-template-columns:1fr;gap:12px;margin-top:20px}
.sk-card{display:flex;gap:14px;align-items:flex-start;padding:16px;border-radius:14px;background:var(--card)}
.sk-ic{width:40px;height:40px;border-radius:12px}
.sk-tx{flex:1;display:grid;gap:10px;min-width:0}
.sk-l1{height:16px;width:70%}.sk-l2{height:12px;width:45%}.sk-l3{height:12px;width:30%}
.sk-nav{display:flex;width:100%;justify-content:space-around;align-items:center}
.sk-ni{display:flex;flex-direction:column;align-items:center;gap:8px;padding:6px 0}
.sk-nic{width:26px;height:26px;border-radius:8px}.sk-nl{width:38px;height:9px;border-radius:5px}
.sk-rhb{display:none}
@media (min-width:960px){
  .sk-av{display:none}.sk-hb{display:none}
  .sk-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sk{max-width:1080px;margin:0 auto}
  .sk-nav{flex-direction:column;gap:14px;padding:4px 0}
  .sk-rhb{display:block;width:44px;height:44px;border-radius:50%;margin-bottom:10px}
  .sk-ni{padding:10px 0}
}
@media (prefers-reduced-motion:reduce){:root .sk-b{animation-name:skShimmer!important;animation-duration:1.5s!important;animation-iteration-count:infinite!important;animation-timing-function:ease-in-out!important}}

/* แท็บรอง (กำลังทำ/เสร็จแล้ว, ยังไม่เสร็จ/เสร็จแล้ว ฯลฯ): ใหญ่ขึ้น กดง่าย */
:root .ttabs{gap:10px}
:root .ttabs button,:root .ttabs button:not(.on){min-height:44px;padding:0 20px;font-size:1rem;gap:8px;border-radius:10px}
:root .ttabs button .tn{min-width:24px;height:24px;font-size:.875rem;border-radius:6px}
@media (max-width:599px){:root .ttabs button,:root .ttabs button:not(.on){min-height:42px;padding:0 16px;font-size:.9375rem}}
/* ปุ่มไอคอนมุมขวาบน: ไอคอนเส้น ไม่ทึบ */
.ibtn svg:not(.fx){stroke-width:1.9}

/* งานที่กำลังดำเนินการ = สีเหลือง (จุดสถานะ ป้ายสถานะ ข้อความ) */
:root{--yel:#F2B600;--yel-t:#B07A00;--yel-s:rgba(242,182,0,.16)}
:root[data-theme=dark]{--yel:#F5C542;--yel-t:#F5C542;--yel-s:rgba(245,197,66,.16)}
.d-in_progress,:root[data-theme=dark] .hk-pipe .sdot.d-in_progress,.mdot.ip{background:var(--yel)!important}
.p-in_progress{--dot:var(--yel)}
.pill.p-in_progress{background:var(--yel-s);color:var(--yel-t)}
.st-ip{color:var(--yel-t);font-weight:500}
.tc-ic.st-in_progress{color:var(--yel-t)}
.st-in_progress .st-ic{background:var(--yel-s);color:var(--yel-t)}
.lt-st-b.s-in_progress{color:var(--yel-t);background:var(--yel-s)}

/* หน้าหลัง: แถบสถานะ (รอมอบหมาย / กำลังทำ / ...) เล็กลง */
:root .pg-home .ttabs{gap:8px}
:root .pg-home .ttabs button,:root .pg-home .ttabs button:not(.on){min-height:36px;padding:0 14px;font-size:.875rem;gap:6px;border-radius:9px}
:root .pg-home .ttabs button .tn{min-width:20px;height:20px;font-size:.75rem}

/* ===== แชทส่วนตัว: เต็มจอ + ส่งรูป/เสียง ===== */
.dm-full{max-width:none!important;width:100%}
.dm-full .dm-head,.dm-full .dm-msgs,.dm-full .dm-bar,.dm-full .dm-recbar,.dm-full .dm-err{max-width:none}
@media (min-width:900px){.dm-full{padding:0 32px 20px}.dm-row{max-width:62%}}
.dm-full .dm-msgs{padding:18px 20px;gap:6px}
.dm-bar{align-items:center;gap:6px}
.dm-bar textarea{min-height:46px;border-radius:23px}
.dm-tool{all:unset;box-sizing:border-box;flex:none;width:46px;height:46px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-2);transition:background-color .16s,color .16s,transform .12s}
.dm-tool:hover{background:var(--card-2);color:var(--text)}
.dm-tool:active{transform:scale(.92)}
.dm-tool:focus-visible{outline:2px solid var(--primary);outline-offset:1px}
.dm-b.media{padding:4px;background:transparent!important;box-shadow:none}
.dm-row.me .dm-b.media{background:transparent!important}
.dm-img{display:block;max-width:min(360px,68vw);max-height:420px;width:auto;height:auto;border-radius:16px;cursor:zoom-in;background:var(--card-2)}
.dm-aud{display:block;width:min(280px,66vw);height:44px;border-radius:22px}
.dm-recbar{display:flex;align-items:center;gap:12px;min-height:56px;padding:6px 8px 6px 18px;border-radius:28px;background:var(--card-2)}
.dm-recbar[hidden]{display:none}
.dm-recbar b{font-variant-numeric:tabular-nums;font-size:1.0625rem;font-weight:600}
.dm-recbar small{color:var(--text-2)}
.dm-recdot{width:12px;height:12px;border-radius:50%;background:#E5484D;animation:dmPulse 1.1s ease-in-out infinite}
@keyframes dmPulse{50%{opacity:.25;transform:scale(.8)}}
.dm-bar[hidden]{display:none}
@media (prefers-reduced-motion:reduce){:root .dm-recdot{animation-name:dmPulse!important;animation-duration:1.1s!important;animation-iteration-count:infinite!important}}

/* หน้าหลัก: แถบสถานะ (รอมอบหมาย / กำลังทำ / ...) เป็นแท็บขีดเส้นใต้ ไม่ใช่ปุ่ม · เว้นลงมาจากแถบด้านบน */
:root .pg-home .ttabs{gap:22px;margin:18px 0 12px;padding:0;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
:root .pg-home .ttabs::-webkit-scrollbar{display:none}
:root .pg-home .ttabs button,:root .pg-home .ttabs button:not(.on),:root[data-theme=dark] .pg-home .ttabs button:not(.on),:root:not([data-theme=dark]) .pg-home .ttabs button:not(.on){background:none!important;box-shadow:none!important;border:0;border-radius:0;min-height:44px;padding:8px 2px 10px;margin-bottom:-1px;font-size:.9375rem;font-weight:500;color:var(--text-2);border-bottom:2px solid transparent;gap:7px;white-space:nowrap}
:root .pg-home .ttabs button:hover:not(.on){color:var(--text)!important;background:none!important}
:root .pg-home .ttabs button.on,:root[data-theme=dark] .pg-home .ttabs button.on,:root:not([data-theme=dark]) .pg-home .ttabs button.on{color:var(--text)!important;font-weight:600;border-bottom-color:var(--primary)}
:root[data-theme=dark] .pg-home .ttabs button.on{border-bottom-color:#F1F1F1}
:root .pg-home .ttabs button .tn,:root .pg-home .ttabs button.on .tn{background:none!important;min-width:0;height:auto;padding:0;font-size:.875rem;font-weight:600;color:var(--text-2);opacity:.9}
:root .pg-home .ttabs button.z{opacity:.55}
:root .pg-home .ttabs{gap:16px;flex-wrap:nowrap!important}
:root .pg-home .ttabs button{flex:0 0 auto}
html:root[data-theme=dark] body .pg-home .ttabs button.on,html:root:not([data-theme=dark]) body .pg-home .ttabs button.on,html:root body .pg-home .ttabs button.on *{background:none!important;box-shadow:none!important}
html:root[data-theme=dark] body .pg-home .ttabs button.on,html:root[data-theme=dark] body .pg-home .ttabs button.on *{color:#F1F1F1!important}
html:root:not([data-theme=dark]) body .pg-home .ttabs button.on,html:root:not([data-theme=dark]) body .pg-home .ttabs button.on *{color:var(--text)!important}

/* ===== แท็บสถานะทุกหน้า (ยังไม่เสร็จ/เสร็จแล้ว · ใหม่/กำลังทำ/…): แท็บขีดเส้นใต้ + สีตามแท็บเมื่อเลือก ===== */
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs{--tabc:var(--primary);gap:18px;margin:14px 0 12px;padding:0;border-bottom:1px solid var(--line);flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs::-webkit-scrollbar{display:none}
html:root[data-theme=dark] body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs{--tabc:#F1F1F1}
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button{flex:0 0 auto;background:none!important;box-shadow:none!important;border:0;border-bottom:2px solid transparent;border-radius:0;min-height:46px;padding:8px 2px 10px;margin-bottom:-1px;font-size:1rem;font-weight:500;color:var(--text-2)!important;gap:8px;white-space:nowrap}
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button:hover:not(.on){color:var(--text)!important;border-bottom-color:var(--line)}
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button.on,html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button.on *{color:var(--tabc)!important;background:none!important;box-shadow:none!important}
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button.on{font-weight:600;border-bottom-color:var(--tabc)}
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button .tn{background:none!important;min-width:0;height:auto;padding:0;font-size:.9375rem;font-weight:600;opacity:.85}
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button.z{opacity:.5}
/* สีของแท็บที่เลือก ตามสถานะ */
.ttabs button[data-k=new]{--tabc:#D93A1A}
.ttabs button[data-k=active],.ttabs button[data-k=assigned]{--tabc:#C98F00}
.ttabs button[data-k=todo]{--tabc:#0B63CE}
.ttabs button[data-k=pending]{--tabc:#6B7686}
.ttabs button[data-k=resolved]{--tabc:#E07B00}
.ttabs button[data-k=closed]{--tabc:#1E9E5A}
.ttabs button[data-k=open]{--tabc:#0B63CE}
.ttabs button[data-k=done]{--tabc:#1E9E5A}
:root[data-theme=dark] .ttabs button[data-k=new]{--tabc:#FF7A6B}
:root[data-theme=dark] .ttabs button[data-k=active],:root[data-theme=dark] .ttabs button[data-k=assigned]{--tabc:#F5C542}
:root[data-theme=dark] .ttabs button[data-k=todo],:root[data-theme=dark] .ttabs button[data-k=open]{--tabc:#7DB3FF}
:root[data-theme=dark] .ttabs button[data-k=pending]{--tabc:#B3B3B3}
:root[data-theme=dark] .ttabs button[data-k=resolved]{--tabc:#FFB155}
:root[data-theme=dark] .ttabs button[data-k=closed],:root[data-theme=dark] .ttabs button[data-k=done]{--tabc:#5FD497}
@media (max-width:599px){html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs{gap:16px}html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button{font-size:.9375rem}}
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button.on.z{opacity:1}
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button.z:not(.on){opacity:.55}

/* แท็บสถานะ: ไม่ใช้สีตามสถานะ — โหมดกลางวัน = ฟ้า · โหมดกลางคืน = ขาว */
html:root body .ttabs button[data-k]{--tabc:var(--primary)}
html:root[data-theme=dark] body .ttabs button[data-k]{--tabc:#F1F1F1}
html:root body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button[data-k].on{--tabc:var(--primary)}
html:root[data-theme=dark] body :is(.tbar:not(.rpt-tabs),.pg-home) .ttabs button[data-k].on{--tabc:#F1F1F1}

/* ===== หน้า "คุณ": จัดเรียงใหม่ — การ์ดโปรไฟล์ด้านบนเต็มความกว้าง · ทั่วไป + บัญชี ซ้าย · จัดการ ขวา ===== */
.pg-me .sgroup h4{padding:16px 18px 6px;font-size:.8125rem;font-weight:600;letter-spacing:.04em;color:var(--text-2)}
.pg-me .srow{min-height:60px;padding:10px 18px;gap:14px}
.pg-me .srow>i{flex:none;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:12px;background:var(--card-2);color:var(--text)}
.pg-me .srow>i svg{width:22px;height:22px}
.pg-me .srow>svg{width:18px;height:18px}
.pg-me .srow:not(.static):hover{background:var(--card-2)}
.pg-me .srow:not(.static):hover>i{background:var(--surface)}
.pg-me .sgroup{margin-top:0}
@media (min-width:900px){
  .pg-me{max-width:980px;margin:0 auto}
  .pg-me .me-card{flex-direction:row;align-items:center;text-align:left;gap:18px;padding:22px 26px;margin-bottom:20px;position:relative}
  .pg-me .me-card>.av,.pg-me .me-card>img,.pg-me .me-card>span:first-child{flex:none}
  .pg-me .me-card b{margin:0;font-size:1.375rem;font-weight:600}
  .pg-me .me-card .btn{position:absolute;right:22px;top:50%;transform:translateY(-50%);margin:0}
  .pg-me .me-grid:not(.me-tabbed){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto 1fr;gap:20px;align-items:start}
  .pg-me .me-grid:not(.me-tabbed) .me-col{display:contents}
  .pg-me .me-mgr .g-gen{grid-column:1;grid-row:1}
  .pg-me .me-mgr .g-acct{grid-column:1;grid-row:2}
  .pg-me .me-mgr .g-mgmt{grid-column:2;grid-row:1 / span 2}
  .pg-me .sgroup{max-width:none;margin-left:0;margin-right:0}
}

/* จอกว้างมาก: เนื้อหาเต็มความกว้างจอ (ไม่เหลือที่ว่างขวา) */
@media (min-width:1200px){
  html:root body .shell .page,html:root body .shell .pg-home,html:root body .shell .pg-home:has(.hm-side),html:root body .shell .phead{max-width:none!important;margin-left:0!important;margin-right:0!important}
  html:root body .shell .pg-me{max-width:1100px!important}
}

/* ชิปแท็บ (แจ้งเหตุ / MA / ร้องเรียน ฯลฯ) ทุกหน้า: เล็กลง */
html:root body .tchips{gap:8px}
html:root body .tchips button,html:root body .tchips button:not(.on),html:root body .phead.has-chips .tchips button,html:root body .phead.has-chips .tchips button:not(.on){min-height:38px;padding:0 14px 0 10px;gap:7px;font-size:.875rem;border-radius:10px}
html:root body .tchips button svg,html:root body .tchips button svg.fx,html:root body .phead.has-chips .tchips button svg,html:root body .phead.has-chips .tchips button svg.fx{width:18px!important;height:18px!important;padding:0;background:none!important}
html:root body .tchips button .tn,html:root body .tchips button .cnt,html:root body .tchips button b{min-width:20px;height:20px;padding:0 6px;font-size:.75rem}
@media (max-width:959px){
  html:root body .tchips button,html:root body .tchips button:not(.on),html:root body .phead.has-chips .tchips button,html:root body .phead.has-chips .tchips button:not(.on){min-height:34px;padding:0 11px 0 8px;gap:6px;font-size:.8125rem}
  html:root body .tchips button svg,html:root body .tchips button svg.fx,html:root body .phead.has-chips .tchips button svg,html:root body .phead.has-chips .tchips button svg.fx{width:16px!important;height:16px!important}
}

/* เนื้อหาเต็มความกว้างจอ ทุกหน้า/ทุกบทบาท (คอมพิวเตอร์และแท็บเล็ตแนวนอน) — ไม่จำกัดความกว้างไว้กลางจอ/ชิดซ้าย */
@media (min-width:900px){
  html:root body .pg-me,html:root body .shell .pg-me,html:root body .shell .page.pg-me,html:root body .me-tabbed,html:root body .pg-me .me-grid{max-width:none!important;margin-left:0!important;margin-right:0!important}
  html:root body .shell .page,html:root body .shell .pg-home,html:root body .shell .phead,html:root body .shell .sk{max-width:none!important;margin-left:0!important;margin-right:0!important}
  html:root body .filters,html:root body .profile,html:root body .sgroup,html:root body .about,html:root body .rolegrid{max-width:none}
  html:root body .ai-p,html:root body .lt-strip,html:root body .ls-nav,html:root body .ls-warn,html:root body .ls-list,html:root body .ls-sum,html:root body .ls-co,html:root body .ls-coh,html:root body .ls-head,html:root body .pg-line .ls-k,html:root body .pg-line .ls-row,html:root body .pg-line .ls-coh~.list,html:root body .pg-line .lt-views,html:root body .lr-seg,html:root body .lr-list,html:root body .lg-wrap,html:root body .lg-foot,html:root body .lg-ctl{max-width:none}
}

/* โปรเจกต์: เวลาที่ติ๊กเสร็จใต้ชื่อขั้นตอน · ปุ่มลบขั้นตอนชิดขวา */
.pj-step .pj-step-at{display:inline-flex;align-items:center;gap:4px;width:100%;margin-top:3px;font-size:.75rem;font-weight:500;color:var(--ok);text-decoration:none}
.pj-step-proof .pj-step-del{margin-left:auto;color:var(--text-2)}
.pj-newcust{padding:12px 14px;margin:0 0 12px;background:var(--card-2)}
.pj-newcust .fl:last-child{margin-bottom:0}

/* แดชบอร์ด ภาพรวมแบบอ่านง่าย */
@media (min-width:960px){.so-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}}
.so-list .fold-t{flex-wrap:wrap;row-gap:2px}
.so-sum{font-size:.8125rem;font-weight:400;color:var(--text-2);margin-left:10px}
.so-more{margin:8px 0 0;text-align:right}
@media (max-width:599px){.so-sum{display:block;width:100%;margin:2px 0 0}}

/* ตัวเลือกช่วงเวลาแบบ YouTube Studio: ช่วงวันที่จริงตัวเล็กด้านบน + ชื่อช่วงตัวหนา */
.ys-pick{position:relative;display:inline-flex;flex-direction:column;justify-content:center;min-width:210px;min-height:52px;padding:6px 38px 6px 14px;border:1px solid var(--edge,var(--line));border-radius:12px;background:var(--surface);box-shadow:var(--lift);cursor:pointer}
.ys-pick small{font-size:.75rem;color:var(--text-2);line-height:1.2;pointer-events:none}
.ys-pick select{appearance:none;-webkit-appearance:none;border:0;background:transparent;font:inherit;font-size:1rem;font-weight:600;color:var(--text);padding:0;margin:0;cursor:pointer;outline:none}
.ys-pick select option,.ys-pick select optgroup{color:#111;background:#fff}
.ys-pick::after{content:"";position:absolute;right:16px;top:50%;width:8px;height:8px;border-right:2px solid var(--text-2);border-bottom:2px solid var(--text-2);transform:translateY(-70%) rotate(45deg);pointer-events:none}
.ys-pick:focus-within{outline:2px solid var(--primary);outline-offset:2px}
@media (max-width:599px){.ys-pick{width:100%}}

/* แดชบอร์ด: แท็บไอคอน + ชื่อสั้น · เบี้ยเลี้ยง/OT/ตรวจสอบ อยู่ในเมนู "เพิ่มเติม" */
.rpt-nav{display:flex;align-items:stretch;gap:2px;border-bottom:1px solid var(--line);margin:0 0 14px}
.rpt-nav>button,.rpt-more>summary{display:inline-flex;align-items:center;gap:7px;flex:none;border:0;background:none;padding:10px 14px;margin-bottom:-1px;border-bottom:2px solid transparent;border-radius:8px 8px 0 0;font:inherit;font-size:.875rem;font-weight:500;color:var(--text-2);cursor:pointer;white-space:nowrap;list-style:none;position:relative}
.rpt-more>summary::-webkit-details-marker{display:none}
.rpt-nav>button:hover:not(.on),.rpt-more>summary:hover{color:var(--text);background:var(--card-2)}
.rpt-nav>button.on,.rpt-more.on>summary{color:var(--primary);border-bottom-color:var(--primary);font-weight:600}
.rpt-nav .tn{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--danger);color:#fff;font-size:.6875rem;font-weight:600}
.rpt-more{position:relative;flex:none;margin-left:auto}
.rpt-more-m{position:absolute;right:0;top:calc(100% + 6px);z-index:40;min-width:200px;display:flex;flex-direction:column;gap:2px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.18)}
.rpt-more-m button{display:flex;align-items:center;gap:10px;width:100%;border:0;background:none;padding:10px 12px;border-radius:8px;font:inherit;font-size:.875rem;color:var(--text);cursor:pointer;text-align:left}
.rpt-more-m button:hover{background:var(--card-2)}
.rpt-more-m button.on{background:var(--primary-s);color:var(--primary);font-weight:600}
.rpt-more-m button .tn{margin-left:auto}
:root[data-theme=dark] .rpt-nav>button.on,:root[data-theme=dark] .rpt-more.on>summary{color:#fff;border-bottom-color:#fff}
@media (max-width:759px){
  .rpt-nav{gap:0}
  .rpt-nav>button,.rpt-more>summary{flex:1 1 0;flex-direction:column;gap:3px;padding:8px 2px;font-size:.6875rem;min-width:0}
  .rpt-nav>button span:not(.tn),.rpt-more>summary span:not(.tn){overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .rpt-nav .tn{position:absolute;top:2px;right:calc(50% - 20px);min-width:16px;height:16px;font-size:.625rem}
  .rpt-more{flex:1 1 0;margin-left:0;display:flex}
}

/* ตัวกรองแดชบอร์ด: ปุ่มเม็ดยามีไอคอน ขนาดเท่ากัน */
.rfilter.rf2{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px}
.rf2 .fpill{position:relative;display:inline-flex;align-items:center;flex:0 1 auto;min-width:0}
.rf2 .fpill>svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--text-2);pointer-events:none;z-index:1}
html:root body .rf2 .fpill select.psel{flex:none;min-width:160px;max-width:260px;min-height:40px;margin:0;padding:6px 34px 6px 38px;border-radius:999px;font-size:.875rem;box-shadow:none}
.rf2 .rf-range{font-size:.8125rem;color:var(--text-2);margin-left:4px}
@media (max-width:599px){
  .rf2 .fpill{flex:1 1 100%}
  html:root body .rf2 .fpill select.psel{width:100%;max-width:none}
  .rf2 .rf-range{width:100%;margin:0 0 0 4px}
}

/* ตัวกรองงาน: ปุ่มเดียวแทนปุ่มประเภทงาน (แจ้งเหตุ / MA / ร้องเรียน) · เปิดเป็นแผงเลือกได้หลายอย่าง */
.jf{position:relative;display:inline-block;margin:0 0 10px}
.phead.has-jf .jf{margin:0}
.jf>summary{list-style:none;display:inline-flex;align-items:center;gap:8px;min-height:40px;max-width:320px;padding:6px 34px 6px 14px;border:1px solid var(--edge,var(--line));border-radius:999px;background:var(--surface);font-size:.875rem;font-weight:500;color:var(--text);cursor:pointer;white-space:nowrap;position:relative}
.jf>summary::-webkit-details-marker{display:none}
.jf>summary>svg{flex:none;color:var(--text-2)}
.jf>summary span{overflow:hidden;text-overflow:ellipsis}
.jf>summary::after{content:"";position:absolute;right:15px;top:50%;width:7px;height:7px;border-right:2px solid var(--text-2);border-bottom:2px solid var(--text-2);transform:translateY(-70%) rotate(45deg)}
.jf[open]>summary::after{transform:translateY(-20%) rotate(-135deg)}
.jf>summary:hover{border-color:var(--primary)}
.jf>summary.on{border-color:var(--primary);background:var(--primary-s);color:var(--primary)}
.jf>summary.on>svg{color:var(--primary)}
.jf-n{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--primary);color:#fff;font-size:.6875rem;font-weight:700}
.jf-panel{position:absolute;left:0;top:calc(100% + 6px);z-index:60;width:min(560px,calc(100vw - 32px));max-height:min(70vh,580px);overflow:auto;padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 16px 40px rgba(0,0,0,.2);text-align:left}
.jf-head b{display:block;font-size:1rem;font-weight:600}
.jf-head small{display:block;margin-top:2px;color:var(--text-2);font-size:.75rem}
.jf-g{border:0;margin:14px 0 0;padding:0;min-width:0}
.jf-g legend{padding:0;margin:0 0 6px;font-size:.75rem;font-weight:600;color:var(--text-2)}
.jf-opts{display:flex;flex-wrap:wrap;gap:6px}
.jf-o{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:5px 12px;border:1px solid var(--line);border-radius:999px;background:var(--card);font-size:.8125rem;color:var(--text);cursor:pointer;user-select:none}
.jf-o input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.jf-o svg{color:var(--text-2)}
.jf-o small{padding:0 6px;border-radius:8px;background:var(--card-2);color:var(--text-2);font-size:.6875rem}
.jf-o:hover{border-color:var(--primary)}
.jf-o.on{border-color:var(--primary);background:var(--primary-s);color:var(--primary);font-weight:600}
.jf-o.on svg{color:var(--primary)}
.jf-o:focus-within{outline:2px solid var(--primary);outline-offset:1px}
.jf-foot{display:flex;align-items:center;gap:8px;margin:14px -16px -14px;padding:10px 16px;border-top:1px solid var(--line);background:var(--surface);position:sticky;bottom:-14px}
@media (max-width:599px){.jf>summary{max-width:calc(100vw - 120px)}}

/* ตัวกรองงานในแถบตัวกรองของแดชบอร์ด */
.rf2 .jf{margin:0;flex:0 1 auto}
.rf2 .jf>summary{min-width:160px}
@media (max-width:599px){.rf2 .jf{flex:1 1 100%}.rf2 .jf>summary{display:flex;width:100%;max-width:none}.rf2 .jf-panel{width:100%}}

/* แดชบอร์ด: การ์ดตัวเลขแบบกะทัดรัด (ชื่อ + ตัวเลขแถวเดียว คำอธิบายเล็กบรรทัดล่าง) */
html:root body .so-tiles{gap:8px;margin:0 0 12px}
html:root body .so-tiles .hk{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:0 8px;padding:9px 14px;min-height:0;border:1px solid var(--line);border-left:4px solid var(--primary);border-radius:12px;box-shadow:none}
html:root body .so-tiles .hk.good{border-left-color:var(--ok)}html:root body .so-tiles .hk.warn{border-left-color:var(--gold)}html:root body .so-tiles .hk.bad{border-left-color:var(--danger)}
html:root body .so-tiles .hk-l{flex:1 1 auto;min-width:0;font-size:.8125rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:root body .so-tiles .hk-v{flex:none;font-size:1.375rem;line-height:1.2;margin:0}
html:root body .so-tiles .hk-s{flex:1 1 100%;font-size:.6875rem;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rm-sep{border:0;border-top:1px solid var(--line);margin:4px 2px}

/* แดชบอร์ด › ทิกเก็ต: เลือกวัน + รายการพร้อมวันเวลา */
.dpill{display:inline-flex;align-items:center;gap:4px}
html:root body .rf2 .dpill .fpill input.psel{flex:none;min-width:170px;max-width:200px;min-height:40px;margin:0;padding:6px 12px 6px 38px;border-radius:999px;font-size:.875rem;box-shadow:none}
.dpill.on input.psel{border-color:var(--primary);background:var(--primary-s);color:var(--primary)}
.dp-s{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--text-2);cursor:pointer}
.dp-s:hover{border-color:var(--primary);color:var(--primary)}
.tkd-panel{margin:12px 0}
.tkd-panel .pd-ph{display:flex;align-items:center;gap:8px}
.tkd-t{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:4px;font-size:.75rem;color:var(--text-2)}
.tkd-t span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.tkd .rr-top .pill{font-size:.6875rem}
@media (max-width:599px){.dpill{flex:1 1 100%}.dpill .fpill{flex:1 1 auto}html:root body .rf2 .dpill .fpill input.psel{width:100%;max-width:none}}

/* ===== ตรวจทั้งเว็บ (พ.ย. 2026) ===== */
/* ปุ่มเลือกวันตอนยังไม่เลือก: แสดงข้อความแทน mm/dd/yyyy */
.fpill.dp-empty input.psel{color:transparent}
.fpill.dp-empty input.psel::-webkit-datetime-edit{color:transparent}
.fpill.dp-empty .dp-ph{position:absolute;left:38px;top:50%;transform:translateY(-50%);font-size:.875rem;color:var(--text);pointer-events:none;white-space:nowrap}
/* มือถือ: ตัวกรองแดชบอร์ด 2 คอลัมน์ (เดิมเรียงทีละแถว กินที่ครึ่งจอ) */
@media (max-width:599px){
  html:root body .rf2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  html:root body .rf2 .fpill,html:root body .rf2 .jf,html:root body .rf2 .dpill{flex:none;min-width:0;width:100%}
  html:root body .rf2 .fpill select.psel{min-width:0;width:100%;padding-left:34px;padding-right:26px;font-size:.8125rem}
  html:root body .rf2 .fpill>svg{left:11px}
  html:root body .rf2 .jf>summary{min-width:0;width:100%;padding-left:12px;padding-right:28px;font-size:.8125rem}
  html:root body .rf2 .dpill{grid-column:1/-1}
  html:root body .rf2 .rf-range{grid-column:1/-1;margin:0 0 0 2px}
  html:root body .rf2 .jf-panel{left:0;right:auto;width:calc(100vw - 32px)}
  html:root body .xkpis{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  html:root body .xkpis .kpi{padding:8px 6px}
  html:root body .xkpis .kpi b{font-size:1.25rem}
  html:root body .xkpis .kpi span{font-size:.6875rem}
}
/* คอม: ทางลัดของลูกค้า (แจ้งเหตุ/ติดต่อ/รายงาน/ร้องเรียน) เป็นปุ่มเรียบร้อย ไอคอนกับตัวอักษรขนาดพอดีกัน */
@media (min-width:960px){
  html:root body .tiles.compact{display:flex;flex-wrap:wrap;gap:10px;max-width:none;margin:0 0 16px}
  html:root body .tiles.compact .tile{display:inline-flex;flex-direction:row;align-items:center;gap:10px;width:auto;min-height:0;padding:10px 18px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:none;font-size:.875rem;font-weight:500;color:var(--text)}
  html:root body .tiles.compact .tile i{display:inline-flex;width:auto;height:auto;background:none;margin:0}
  html:root body .tiles.compact .tile i svg{width:20px;height:20px;color:var(--primary)}
  html:root body .tiles.compact .tile:hover{border-color:var(--primary);background:var(--primary-s)}
}
/* มือถือ (ช่าง): ปุ่มหลักมีแถบติดล่างจอแล้ว ไม่ต้องแสดงปุ่มเดียวกันซ้ำในแถวปุ่มด้านบน */
@media (max-width:899px){.sheet-inner:has(.stick-act) .row.sq>.btn.primary{display:none}}

/* เวลาแจ้งบนการ์ดงาน */
html:root body .tc-when{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
html:root body .tc-when svg{opacity:.7}

/* ตัวกรองแดชบอร์ด: ปุ่มเดียว + หน้าต่างการ์ดใหญ่ */
html:root body .rf3{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 14px}
html:root body .rf3-btn{display:flex;align-items:center;gap:10px;flex:0 1 auto;min-width:0;max-width:100%;min-height:48px;padding:8px 16px;border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--text);font:inherit;cursor:pointer;text-align:left}
html:root body .rf3-btn:hover{border-color:var(--accent,var(--ok))}
html:root body .rf3-btn.on{border-color:var(--accent,var(--ok))}
html:root body .rf3-btn>b{font-size:.9375rem;font-weight:600;flex:none}
html:root body .rf3-n{flex:none;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--accent,var(--ok));color:#fff;font-size:.75rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
html:root body .rf3-sum{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
html:root body .rf3-c{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:999px;background:var(--card-2);color:var(--text-2);font-size:.8125rem;white-space:nowrap;max-width:220px;overflow:hidden;text-overflow:ellipsis}
html:root body .rf3-c.on{color:var(--accent,var(--ok));font-weight:600}
html:root body .rf3 .rf-range{font-size:.8125rem;color:var(--text-2)}
@media (min-width:900px){html:root body #modalCard.rfm{width:min(780px,calc(100vw - 48px))}}
html:root body .rfm-s{margin:0 0 18px}
html:root body .rfm-s>h4{margin:0 0 10px;font-size:1rem;font-weight:600}
html:root body .rfm-s>h4 small{font-weight:400;font-size:.8125rem;color:var(--text-2);margin-left:6px}
html:root body .rfm-g{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
html:root body .rfm-t{display:flex;align-items:center;gap:12px;min-height:68px;padding:12px 14px;border:1.5px solid var(--line);border-radius:16px;background:var(--card);color:var(--text);font:inherit;cursor:pointer;text-align:left}
html:root body .rfm-t:hover{border-color:var(--accent,var(--ok))}
html:root body .rfm-t.on{border-color:var(--accent,var(--ok));background:color-mix(in srgb,var(--accent,var(--ok)) 12%,var(--card));box-shadow:inset 0 0 0 1px var(--accent,var(--ok))}
html:root body .rfm-t>svg{flex:none;color:var(--text-2)}
html:root body .rfm-t.on>svg{color:var(--accent,var(--ok))}
html:root body .rfm-t>span{display:flex;flex-direction:column;min-width:0}
html:root body .rfm-t b{font-size:.9375rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:root body .rfm-t small{font-size:.75rem;color:var(--text-2)}
html:root body .rfm-dot{flex:none;width:14px;height:14px;border-radius:50%;background:currentColor}
html:root body .rfm-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:10px}
html:root body .rfm-sel{position:relative;display:flex;align-items:center;gap:8px;min-height:56px;padding:0 14px;border:1.5px solid var(--line);border-radius:16px;background:var(--card)}
html:root body .rfm-sel.on{border-color:var(--accent,var(--ok));box-shadow:inset 0 0 0 1px var(--accent,var(--ok))}
html:root body .rfm-sel>svg{flex:none;color:var(--text-2)}
html:root body .rfm-sel select,html:root body .rfm-sel input{flex:1;min-width:0;min-height:52px;margin:0;border:0;background:transparent;box-shadow:none;font-size:.9375rem;padding:0;color:var(--text)}
html:root body .rfm-sel.big{min-height:60px}
html:root body .rfm-foot{position:sticky;bottom:-1px;background:var(--surface);padding:12px 0 2px;margin:0;border-top:1px solid var(--line)}
@media (max-width:640px){
  html:root body .rfm-g{grid-template-columns:repeat(2,1fr)}
  html:root body .rfm-row{grid-template-columns:1fr}
  html:root body .rf3-btn{width:100%}
}
html:root body .rfm-sel input[type=date]{cursor:pointer}
html:root body .rfm-sel:not(.on) input[type=date]{color:transparent}
html:root body .rfm-sel:not(.on) input[type=date]:focus{color:var(--text)}
html:root body .rfm-ph{position:absolute;left:42px;top:50%;transform:translateY(-50%);pointer-events:none;font-size:.9375rem;color:var(--text)}
html:root body .rfm-sel input[type=date]:focus+.rfm-ph{display:none}
html:root body .rfm-t b{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.25}
html:root body .rfm-dot.prio-urgent{color:#e5484d}html:root body .rfm-dot.prio-high{color:#f5a524}html:root body .rfm-dot.prio-medium{color:#3b82f6}html:root body .rfm-dot.prio-low{color:#9aa4b2}
@media (max-width:640px){
  html:root body .rf3-btn{flex-wrap:wrap;align-items:center}
  html:root body .rf3-sum{flex-basis:100%;justify-content:flex-start}
}

/* ตัวกรองแดชบอร์ด: กระชับ — ปุ่มเล็กแบบชิป ไม่ต้องเลื่อนเยอะ */
html:root body .rfm-s{margin:0 0 12px}
html:root body .rfm-s>h4{margin:0 0 6px;font-size:.875rem}
html:root body .rfm-g{grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:6px}
html:root body .rfm-t{min-height:38px;padding:6px 10px;gap:7px;border-width:1px;border-radius:10px}
html:root body .rfm-t b{font-size:.8125rem;font-weight:500;flex:1;min-width:0;white-space:nowrap;display:block;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:unset}
html:root body .rfm-t small{flex:none;font-size:.75rem;color:var(--text-2);font-variant-numeric:tabular-nums}
html:root body .rfm-t.on small{color:var(--ok)}
html:root body .rfm-t .av,html:root body .rfm-t img{flex:none}
html:root body .rfm-dot{width:10px;height:10px}
html:root body .rfm-row{gap:6px;margin-top:6px}
html:root body .rfm-sel{min-height:40px;padding:0 10px;border-width:1px;border-radius:10px;gap:6px}
html:root body .rfm-sel.big{min-height:40px}
html:root body .rfm-sel select,html:root body .rfm-sel input{min-height:38px;font-size:.875rem}
html:root body .rfm-ph{left:32px;font-size:.875rem}
html:root body .rfm-foot{padding:10px 0 0}
@media (max-width:640px){
  html:root body .rfm-g{grid-template-columns:repeat(3,1fr)}
  html:root body .rfm-row{grid-template-columns:repeat(3,1fr)}
  html:root body .rfm-t{padding:6px 8px}
}
html:root body .rfm-g{display:flex;flex-wrap:wrap;gap:6px}
html:root body .rfm-t{flex:0 0 auto;max-width:100%}
html:root body .rfm-t b{flex:0 1 auto;max-width:240px}
html:root body .rfm-row{grid-template-columns:1fr 1fr 1fr}
@media (max-width:640px){
  html:root body .rfm-g{display:flex}
  html:root body .rfm-row{grid-template-columns:1fr 1fr}
  html:root body .rfm-row>.rfm-sel:last-child{grid-column:1 / -1}
}

/* ตัวกรองแดชบอร์ด: ไม่มีแถบเลื่อน — จอคอมแบ่ง 2 คอลัมน์ · มือถือกระชับให้พอดีจอ */
html:root body #modalCard.rfm{scrollbar-width:none;-ms-overflow-style:none}
html:root body #modalCard.rfm::-webkit-scrollbar{display:none;width:0;height:0}
html:root body .rfm-cols{display:block}
html:root body .rfm .mh{margin-bottom:6px}
@media (min-width:900px){
  html:root body #modalCard.rfm{width:min(1040px,calc(100vw - 48px));max-height:none}
  html:root body .rfm-cols{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}
  html:root body .rfm-cols>.rfm-c+.rfm-c{border-left:1px solid var(--line);padding-left:24px}
}
@media (max-width:640px){
  html:root body #modalCard.rfm{padding-top:14px}
  html:root body .rfm-s{margin:0 0 8px}
  html:root body .rfm-s>h4{margin:0 0 4px;font-size:.8125rem}
  html:root body .rfm-hint{display:none}
  html:root body .rfm-g{gap:5px}
  html:root body .rfm-t{min-height:32px;padding:4px 9px;gap:5px;border-radius:9px}
  html:root body .rfm-t b{font-size:.78rem}
  html:root body .rfm-t svg{width:14px;height:14px}
  html:root body .rfm-row{grid-template-columns:1fr 1fr 1fr;gap:5px;margin-top:5px}
  html:root body .rfm-row>.rfm-sel:last-child{grid-column:auto}
  html:root body .rfm-sel,html:root body .rfm-sel.big{min-height:34px;padding:0 8px}
  html:root body .rfm-sel>svg{display:none}
  html:root body .rfm-sel select,html:root body .rfm-sel input{min-height:32px;font-size:.78rem}
  html:root body .rfm-ph{left:8px;font-size:.78rem}
  html:root body .rfm-foot{padding:8px 0 0}
  html:root body .rfm-foot .btn{min-height:38px}
}

/* ไม่มีแถบเลื่อนทั้งเว็บ (กล่องแนวตั้ง) — ใช้สามเหลี่ยม ▲ ▼ บอกว่ามีข้อมูลด้านบน/ล่างแทน */
html:root body :is(.scroll,.sheet-body,.modal-card,.ag-scroll,.tech-opts,.opts.compact,.paylist-box,.ar-list,.rd-list,.nv-sc,.combo-list,.dm-msgs,.dm-list,.thread,.doc-scroll,.jf-panel,.tabbar){scrollbar-width:none;-ms-overflow-style:none}
html:root body :is(.scroll,.sheet-body,.modal-card,.ag-scroll,.tech-opts,.opts.compact,.paylist-box,.ar-list,.rd-list,.nv-sc,.combo-list,.dm-msgs,.dm-list,.thread,.doc-scroll,.jf-panel,.tabbar)::-webkit-scrollbar{display:none;width:0;height:0}
html:root body .sh-ind{position:fixed;z-index:2147483000;display:none;align-items:center;justify-content:center;width:30px;height:18px;margin:0 0 0 -15px;padding:0;border:0;border-radius:9px;background:color-mix(in srgb,var(--surface) 82%,transparent);box-shadow:0 1px 4px rgba(0,0,0,.18);color:var(--text-2);cursor:pointer;opacity:.9}
html:root body .sh-ind:hover{opacity:1;color:var(--ok)}
html:root body .sh-ind::before{content:'';width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent}
html:root body .sh-ind.up::before{border-bottom:7px solid currentColor}
html:root body .sh-ind.dn::before{border-top:7px solid currentColor}
html:root body .sh-ind.on{display:flex}
@media print{html:root body .sh-ind{display:none!important}}

/* ตัวชี้เลื่อน: สามเหลี่ยมเล็กล้วน ไม่มีพื้นหลัง (แทนแบบเม็ดยาเดิม) */
html:root body .sh-ind{width:0;height:0;margin:0 0 0 -5px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;pointer-events:none;opacity:.5;color:var(--text-2);transform:translateY(-50%);filter:drop-shadow(0 0 1.5px var(--surface))}
html:root body .sh-ind::before{content:none}
html:root body .sh-ind.up{border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:6px solid currentColor}
html:root body .sh-ind.dn{border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid currentColor}
html:root body .sh-ind.on{display:block}

/* หน้าทิกเก็ต: เลือกวันที่จะดู */
html:root body .ldp{display:inline-flex;align-items:center;gap:4px;flex:none}
html:root body .ldp-s{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--text-2);cursor:pointer}
html:root body .ldp-d{position:relative;display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--card);font-size:.8125rem;font-weight:500;cursor:pointer;white-space:nowrap}
html:root body .ldp-d input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer}
html:root body .ldp.on .ldp-d{border-color:var(--ok);color:var(--ok);background:color-mix(in srgb,var(--ok) 10%,var(--card))}
html:root body .ldp-x{height:30px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:var(--ok);font:inherit;font-size:.8125rem;cursor:pointer}
html:root body .tbar:has(.ldp){flex-wrap:wrap;row-gap:8px}
@media (max-width:640px){html:root body .tbar:has(.ldp)>.sp{display:none}html:root body .ldp{flex:1 1 100%;order:2}html:root body .ldp-d{flex:1;justify-content:center}}

/* ตัวกรองแดชบอร์ด: เดือน/ปีเป็นปุ่ม (ไม่ใช้รายการเลื่อนของเบราว์เซอร์) · ช่องเลือกวันเป็นปุ่มที่ซ่อนปฏิทินไว้ใต้ */
html:root body .rfm-t.sm{min-height:32px;padding:4px 11px}
html:root body .rfm-day{position:relative;cursor:pointer}
html:root body .rfm-day input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer}
/* รายการเลือกของเบราว์เซอร์ให้ตามธีม (โหมดมืดเดิมเป็นพื้นขาวตัวจาง) */
html:root body select option,html:root body select optgroup{background:var(--surface);color:var(--text)}

/* ===== layout pass (impeccable · layout) ===== */
/* การ์ดงาน: จุด "ยังไม่ได้อ่าน" ย้ายไปมุมรูปทางซ้าย ไม่ชนป้ายความเร่งด่วนทางขวา · บรรทัดรายละเอียดบรรทัดเดียว = การ์ดสูงเท่ากันทั้งแถว */
html:root body .tcard.tkun::after{top:8px;left:8px;right:auto;width:10px;height:10px;box-shadow:0 0 0 2px var(--card)}
html:root body .tc-t small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* รายการแถว (ต้องดูแลตอนนี้ / งานที่เสร็จ): เลขงานกับเหตุผลอยู่ติดกันทางซ้าย ไม่แยกไปสุดขวา */
html:root body .rr-top{justify-content:flex-start;gap:10px;align-items:baseline}
html:root body .rr-top>span:not(.mono){color:var(--text-2)}
/* หัวข้อพับ/เปิด: ชื่อ+สรุปกินพื้นที่ซ้าย ตัวเลขชิดลูกศรทางขวา (มือถือเดิมตัวเลขลอยกลางแถว) */
html:root body .fold-t{min-width:0}
@media (max-width:599px){html:root body .fold-t{flex:1}html:root body .fold-btn>.sp{display:none}}
/* ปุ่มตัวกรองแดชบอร์ดบนมือถือ: ค่าที่เลือกเรียงบรรทัดเดียว เกินจอจางหาย (เดิมขึ้น 3 บรรทัด) */
@media (max-width:640px){
  html:root body .rf3-sum{flex-wrap:nowrap;overflow:hidden;-webkit-mask-image:linear-gradient(90deg,#000 85%,transparent);mask-image:linear-gradient(90deg,#000 85%,transparent)}
  html:root body .rf3-c{flex:none}
}

/* ===== adapt pass (impeccable · adapt) ===== */
/* แถบแนวนอนที่ปัดได้: ขอบจางด้านที่ยังมีต่อ (แถบเลื่อนซ่อนไว้ทั้งเว็บ จึงต้องมีสัญญาณแทน) */
html:root body [data-ovx="r"]{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent)}
html:root body [data-ovx="l"]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 36px);mask-image:linear-gradient(90deg,transparent,#000 36px)}
html:root body [data-ovx="lr"]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 36px,#000 calc(100% - 36px),transparent);mask-image:linear-gradient(90deg,transparent,#000 36px,#000 calc(100% - 36px),transparent)}
/* ปุ่มเลือกวันหน้าทิกเก็ตบนจอสัมผัส: ขยายให้กดง่าย (เดิม 30px) */
@media (max-width:959px){html:root body .ldp-s{width:40px;height:40px}html:root body .ldp-d,html:root body .ldp-x{height:40px}}

/* ปฏิทินแบบรายการ: วงกลม "วันนี้" ใช้สีปุ่มหลัก (โหมดมืดเดิมพื้นขาวตัวขาว มองไม่เห็นเลข) */
html:root body .ag-d.today .ag-n{background:var(--btn);color:var(--on-btn)}
html:root body .tr-m b>svg{display:inline-block;vertical-align:-2px;margin-right:4px}

/* ===== accessibility pass (frontend-ui-engineering · WCAG 2.1 AA) ===== */
/* แท็บที่เป็น 0: เดิมจางด้วย opacity เหลือคอนทราสต์ 2.6:1 · ใช้สีข้อความรอง (ผ่าน 4.5:1) แทน */
html:root body .ttabs button.z{opacity:1;color:var(--text-2)}
/* ปุ่มอ่อน (soft) ตัวเล็กบนการ์ด: โหมดสว่างคอนทราสต์ 4.3:1 → เข้มขึ้นให้ผ่าน 4.5:1 */
html:root:not([data-theme=dark]) body .btn.soft{color:#0a58b0}
html:root body .tbar.tbar .ttabs button.z:not(.on),html:root body .pg-home.pg-home .ttabs button.z:not(.on),html:root body .tbar.tbar .ttabs button.z{opacity:1;color:var(--text-2)}
/* บรรทัดเล็กใต้ตัวเลขในการ์ดแดชบอร์ด: เดิมจาง (4.3:1) และเล็กถึง 9px บนจอแคบ */
html:root body .hk .hk-s{opacity:1;color:var(--text-2);font-size:max(11px,.75rem)}
/* ป้ายสถานะ "กำลังดำเนินการ" สีเหลือง: โหมดสว่างเดิม 3.7:1 → เข้มขึ้นให้ผ่าน 4.5:1 (สีเดิมยังเป็นโทนเดียวกัน) */
html:root:not([data-theme=dark]) body .pill.p-in_progress{color:#8a5d00}

/* คอนทราสต์รอบ 2 (หน้าที่เพิ่งตรวจ: ใบรายงาน · ปฏิทินรายการ · เบี้ยเลี้ยง/OT · ภารกิจ) — สีโทนเดิมแต่เข้มพอให้ผ่าน 4.5:1 */
html:root body .paper .muted{color:#5b6472}
html:root body .ag-d.past .ag-n,html:root body .ag-d.past .ag-w{opacity:1}
html:root body .ag-d.past .ag-w{color:var(--text-2)}
html:root:not([data-theme=dark]) body .ck-done{color:#13703f}
html:root:not([data-theme=dark]) body .ck-open{color:#0a58b0}
html:root:not([data-theme=dark]) body .ck-late{color:#734d00}
html:root body .paysum span{color:var(--text-2)}

/* โปรเจกต์: หน้ารายละเอียดแบบกระชับ (ขั้นตอนแถวเดียว · ปุ่มไอคอน · แตะเวลาเพื่อแก้) */
html:root body .pj-hero{padding:14px 16px}
html:root body .pj-hero .tk-title{margin:6px 0 0;font-size:1.125rem}
html:root body .pj-hero .pj-bar{height:6px;margin-top:10px}
html:root body .pj-hero .facts.pj-facts{grid-template-columns:auto 1fr;gap:4px 14px;margin-top:12px;padding-top:10px;font-size:.875rem;line-height:1.4;align-items:baseline}
html:root body .pj-hero .facts.pj-facts dt{margin:0;font-size:.8125rem}
html:root body .pj-acts{margin-top:10px;gap:6px}
html:root body .pj-acts .btn{min-height:36px;padding:0 12px}
html:root body .pj-hint{margin:0 0 6px;font-size:.75rem}
html:root body .pj-steps{gap:6px}
html:root body .pj-step{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:6px;padding:6px 6px 6px 10px;border-radius:12px}
html:root body .pj-step-main{grid-column:1;min-height:36px;gap:10px}
html:root body .pj-step-no{width:26px;height:26px;font-size:.75rem}
html:root body .pj-step.done .pj-step-no{background:var(--btn);border-color:var(--btn);color:var(--on-btn)}   /* ธีมมืด --ok เป็นสีขาว → ติ๊กขาวบนขาวมองไม่เห็น */
html:root body .pj-step.done .pj-step-no svg{stroke:currentColor}
html:root body .pj-step-t{font-size:.9375rem}
html:root body .pj-step .pj-step-at{grid-column:1;grid-row:2;justify-self:start;display:inline-flex;align-items:center;gap:4px;width:auto;margin:-4px 0 2px 36px;padding:2px 6px;border:0;border-radius:6px;background:none;font:inherit;font-size:.75rem;font-weight:500;color:var(--ok);text-decoration:none;cursor:default}
html:root body .pj-step button.pj-step-at{cursor:pointer}
html:root body .pj-step button.pj-step-at:hover{background:var(--card)}
html:root body .pj-step button.pj-step-at svg:last-child{opacity:.7}
html:root body .pj-step-act{grid-column:2;grid-row:1 / span 2;display:flex;align-items:center;gap:2px}
html:root body .pj-step-act:empty{display:none}
html:root body .pj-step-act .proof-img{width:36px;height:36px;border-radius:8px;margin-right:4px}
html:root body .pj-ib{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:0;border-radius:10px;background:none;color:var(--text-2);cursor:pointer;flex:none}
html:root body .pj-ib:hover{background:var(--card);color:var(--text)}
html:root body .pj-ib.danger{color:var(--danger)}
html:root body .pj-ib:focus-within,html:root body .pj-ib:focus-visible{outline:2px solid var(--primary);outline-offset:1px}
html:root body .pj-ib .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (pointer:coarse){html:root body .pj-ib{width:40px;height:40px}}

/* โปรเจกต์: สรุปความคืบหน้า + รายงานประจำวัน */
html:root body .pj-sum{margin:8px 0 0;font-size:.875rem;color:var(--text-2)}
html:root body .pj-sum b{color:var(--text);font-weight:600}
html:root body .pj-sum .pj-late{color:var(--danger);font-weight:600}
html:root body .dr-new{margin:0 0 10px}
html:root body .dr-list{display:flex;flex-direction:column;gap:8px}
html:root body .dr-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:8px 8px 12px 14px}
html:root body .dr-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:36px}
html:root body .dr-h b{font-size:.9375rem}
html:root body .dr-h .sp{flex:1}
html:root body .dr-pct{font-size:.75rem;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--card);color:var(--primary)}
html:root body .dr-by{font-size:.8125rem;color:var(--text-2)}
html:root body .dr-b{padding-right:6px}
html:root body .dr-b h4{margin:8px 0 2px;font-size:.75rem;font-weight:600;color:var(--text-2);letter-spacing:.01em}
html:root body .dr-b h4.dr-warn{color:var(--danger)}
html:root body .dr-b p{margin:0;font-size:.9375rem;line-height:1.55;white-space:pre-line;overflow-wrap:anywhere}
html:root body .dr-b .gallery{margin-top:10px}
html:root body .dr-photos{margin:2px 0 8px}
html:root body .dr-photos .thumbs{margin-bottom:6px}
html:root body #modalCard .row.end .sp{flex:1}

/* หน้าเข้าสู่ระบบ: การ์ดกลางจอ · ลืมรหัสผ่านอยู่ข้างหัวช่อง · ปุ่มดูรหัสผ่าน · โลโก้บริษัทบนพื้นขาวเรียบร้อย */
html:root body .join.lg{max-width:420px;display:flex;flex-direction:column;padding:calc(env(safe-area-inset-top,0px) + 20px) 0 24px}
html:root body .lg-card{padding:4px 0}
html:root body .lg-top{display:flex;align-items:center;gap:4px;margin:0 0 28px}
html:root body .lg-top .wm{margin:0;font-size:1.375rem}
html:root body .lg-top .sp{flex:1}
html:root body .join.lg h1{font-size:1.625rem;font-weight:600;letter-spacing:-.01em}
html:root body .lg-sub{margin:4px 0 8px;font-size:.9375rem;color:var(--text-2)}
html:root body .join.lg .fl{margin-top:18px}
html:root body .lg-pwrow{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
html:root body .lg-forgot{border:0;background:none;padding:4px 0;margin:-4px 0;font:inherit;font-size:.8125rem;font-weight:500;color:var(--primary);cursor:pointer;text-decoration:none;min-height:0}
html:root body .lg-forgot:hover{text-decoration:underline;text-underline-offset:3px}
html:root body .lg-forgot:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:4px}
html:root body .lg-pwbox{position:relative;margin-top:6px}
html:root body .lg-pwbox input{width:100%;padding-right:48px}
html:root body .lg-eye{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:40px;height:40px;display:flex;align-items:center;justify-content:center;border:0;border-radius:10px;background:none;color:var(--text-2);cursor:pointer}
html:root body .lg-eye:hover{color:var(--text);background:var(--card)}
html:root body .lg-eye:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
html:root body .join.lg .err:empty{display:none}
html:root body .join.lg .err{margin-top:12px}
html:root body .lg-go{margin-top:24px;min-height:50px;font-size:1rem;font-weight:600}
html:root body .lg-foot{margin-top:40px}
html:root body .lg-foot .foot-logo{opacity:1;background:#fff;padding:5px 9px;border-radius:8px;width:92px;box-sizing:content-box}
:root[data-theme=dark] body .join.lg .fl :is(input,select){border-color:var(--line);background:var(--card)}
html:root body .join.lg input:-webkit-autofill{-webkit-box-shadow:0 0 0 40px var(--surface) inset;-webkit-text-fill-color:var(--text);caret-color:var(--text)}
:root[data-theme=dark] body .join.lg input:-webkit-autofill{-webkit-box-shadow:0 0 0 40px var(--card) inset}
@media (min-width:600px){
  html:root body .join.lg{min-height:calc(100dvh - 40px);justify-content:center}
  html:root body .lg-card{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:28px 32px 32px}
  :root[data-theme=dark] body .lg-card{background:var(--card-2,var(--card))}
  :root[data-theme=dark] body .join.lg .fl :is(input,select){background:var(--card)}
}

/* ===== โปรเจกต์: แผงกว้าง 80% ของจอ (คอมพิวเตอร์) · 2 คอลัมน์ · หัวโปรเจกต์มีไอคอน + ตัวเลขสรุป ===== */
@media (min-width:960px){
  html:root body #sheet[data-t=project]{width:80%;max-width:1800px}   /* % ไม่ใช่ vw: หน้าเว็บย่อ zoom .9 บนจอใหญ่ → vw จะแคบกว่า 80% ของจอจริง */
  html:root body #sheet[data-t=project] .sheet-inner{max-width:none}
}
html:root body .pj-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:0 20px;align-items:start}
@media (min-width:1180px){
  html:root body #sheet[data-t=project] .pj-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}
  html:root body #sheet[data-t=project] .pj-col:last-child .fold:first-child{margin-top:0}
}
html:root body .pjh{padding:16px 18px}
html:root body .pjh-top{display:flex;align-items:flex-start;gap:12px}
html:root body .pjh-ic{flex:none;width:46px;height:46px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--primary) 14%,transparent);color:var(--primary)}
html:root body .pjh-t{flex:1;min-width:0}
html:root body .pjh-tags{display:flex;gap:6px;flex-wrap:wrap;min-height:4px}
html:root body .pjh-tags .tag{display:inline-flex;align-items:center;gap:4px}
html:root body .pjh-late{background:color-mix(in srgb,var(--danger) 14%,transparent);color:var(--danger)}
html:root body .pjh h3{margin:4px 0 0;font-size:1.25rem;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
html:root body .pjh-acts{display:flex;gap:2px;flex:none}
html:root body .pjh-prog{display:flex;align-items:center;gap:12px;margin-top:14px}
html:root body .pjh-prog .pj-bar{flex:1;height:8px;margin:0}
html:root body .pjh-prog b{font-size:1.375rem;font-weight:700;min-width:3.2em;text-align:right;font-variant-numeric:tabular-nums}
html:root body .pjk-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}
html:root body .pjk{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:12px;background:var(--card-2);min-width:0}
html:root body .pjk>i{flex:none;width:32px;height:32px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:var(--surface);color:var(--primary)}
html:root body .pjk.ok>i{color:var(--ok)}
html:root body .pjk.late>i{color:var(--danger)}
html:root body .pjk>div{min-width:0;display:flex;flex-direction:column}
html:root body .pjk small{font-size:.75rem;color:var(--text-2)}
html:root body .pjk b{font-size:1rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .pjk span{font-size:.75rem;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .pjk.late span{color:var(--danger);font-weight:600}
html:root body .pjk.ok span{color:var(--ok)}
html:root body .pjh-info{list-style:none;margin:14px 0 0;padding:12px 0 0;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:8px}
html:root body .pjh-info li{display:grid;grid-template-columns:18px 76px minmax(0,1fr);align-items:baseline;gap:8px;font-size:.875rem}
html:root body .pjh-info li>svg{color:var(--text-2);align-self:center}
html:root body .pjh-info span{color:var(--text-2)}
html:root body .pjh-info b{font-weight:500;overflow-wrap:anywhere}
html:root body .fold-t svg{vertical-align:-3px;margin-right:6px;color:var(--primary)}
@media (max-width:520px){
  html:root body .pjk-row{grid-template-columns:1fr 1fr}
  html:root body .pjk-row .pjk:last-child{grid-column:1 / -1}
}
html:root body .dr-mailed{display:flex;align-items:center;gap:4px;margin:0 0 2px;font-size:.75rem;color:var(--ok);overflow-wrap:anywhere}
/* หน้าต่างส่งอีเมลรายงาน */
html:root body .mh h3 svg{vertical-align:-3px;color:var(--primary)}
html:root body .pm-list{display:flex;flex-direction:column;gap:6px;max-height:240px;overflow:auto}
html:root body .pm-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;cursor:pointer}
html:root body .pm-row:has(input:checked){border-color:var(--primary);background:color-mix(in srgb,var(--primary) 7%,transparent)}
html:root body .pm-row input{width:18px;height:18px;accent-color:var(--primary);flex:none}
html:root body .pm-av{flex:none;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--card-2);color:var(--text-2)}
html:root body .pm-t{display:flex;flex-direction:column;min-width:0}
html:root body .pm-t b{font-size:.875rem;font-weight:600;overflow-wrap:anywhere}
html:root body .pm-t small{font-size:.75rem;color:var(--text-2)}
html:root body .pm-foot{flex-wrap:wrap}

/* ===== โปรเจกต์ v2: การ์ดหัวข้อเดียวกันทุกส่วน · ตัวเลขสรุปเป็นแถบคั่นเส้น (ไม่ใช่กล่องทึบ) · ขั้นตอน/รายงานเป็นรายการคั่นเส้น ===== */
html:root body .pj-grid{gap:16px 20px}
html:root body .pj-col{display:flex;flex-direction:column;gap:16px;min-width:0}
html:root body .pj-col>.card{margin:0}
html:root body .pjh{padding:18px 20px 16px}
html:root body .pjh-ic{width:44px;height:44px;border-radius:12px;background:var(--card-2);color:var(--text-2)}
html:root body .pjh-tags .tag{font-size:.6875rem;padding:2px 8px;line-height:1.5}
html:root body .pjh h3{margin:6px 0 0;font-size:1.25rem}
html:root body .pjh-prog{margin-top:18px;gap:14px}
html:root body .pjh-prog .pj-bar{height:6px}
html:root body .pjh-prog b{font-size:1.125rem;min-width:0}
html:root body .pjk-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin-top:16px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
html:root body .pjk-row .pjk:last-child{grid-column:auto}
html:root body .pjk{background:none;border-radius:0;padding:12px 14px;gap:10px}
html:root body .pjk+.pjk{border-left:1px solid var(--line)}
html:root body .pjk>i{width:auto;height:auto;background:none;color:var(--text-2);margin-top:1px}
html:root body .pjk b{font-size:1.0625rem;margin:1px 0}
html:root body .pjh-info{border-top:0;padding-top:0;margin-top:16px;gap:10px}
@media (max-width:520px){
  html:root body .pjh{padding:16px}
  html:root body .pjk{padding:10px;gap:0}
  html:root body .pjk>i{display:none}
  html:root body .pjk b{font-size:.9375rem}
}
html:root body .pjc{padding:0;overflow:hidden}
html:root body .pjc-h{display:flex;align-items:center;gap:8px;padding:10px 12px 10px 16px;min-height:54px;border-bottom:1px solid var(--line)}
html:root body .pjc-h>svg{color:var(--text-2);flex:none}
html:root body .pjc-h h4{margin:0;font-size:1rem;font-weight:600}
html:root body .pjc-h .sp{flex:1}
html:root body .pjc-n{font-size:.75rem;font-weight:600;padding:1px 8px;border-radius:999px;background:var(--card-2);color:var(--text-2)}
html:root body .pjc-hint{margin-left:auto;font-size:.75rem;color:var(--text-2);padding-right:4px}
html:root body .pjc-h .btn.sm{min-height:34px;padding:0 12px;gap:6px}
html:root body .pjc .pj-steps{gap:0}
html:root body .pjc .pj-step{border:0;border-radius:0;background:none;padding:7px 8px 7px 16px;border-bottom:1px solid var(--line)}
html:root body .pjc .pj-step:hover{background:var(--card-2)}
@media (hover:hover){
  html:root body .pjc .pj-step .pj-ib{opacity:.45}
  html:root body .pjc .pj-step:hover .pj-ib,html:root body .pjc .pj-step .pj-ib:focus-visible,html:root body .pjc .pj-step .pj-ib:focus-within{opacity:1}
}
html:root body .pj-add{display:flex;align-items:center;gap:10px;padding:6px 10px 6px 20px}
html:root body .pj-add>svg{color:var(--text-2);flex:none}
html:root body .pj-add input{flex:1;min-width:0;border:0;background:none;min-height:42px;font:inherit;font-size:.9375rem;color:var(--text);outline:0;padding:0}
html:root body .pj-add:focus-within{background:var(--card-2)}
html:root body .pj-add .btn.sm{min-height:32px;padding:0 14px}
html:root body .pjc-empty{display:flex;align-items:center;gap:10px;margin:0;padding:16px;color:var(--text-2);font-size:.875rem;border-bottom:1px solid var(--line)}
html:root body .pjc-empty.big{flex-direction:column;text-align:center;padding:40px 24px 44px;gap:6px;border:0}
html:root body .pjc-empty.big>svg{margin-bottom:6px;opacity:.7}
html:root body .pjc-empty.big b{color:var(--text);font-size:.9375rem;font-weight:600}
html:root body .pjc-empty.big span{max-width:360px;line-height:1.55;font-size:.8125rem}
html:root body .pjc .dr-list{gap:0}
html:root body .dr-item{padding:10px 12px 14px 16px;border-bottom:1px solid var(--line)}
html:root body .dr-item:last-child{border-bottom:0}
html:root body .pjc>.btn.link{border-top:1px solid var(--line);border-radius:0}
html:root body .dr-item .dr-h{flex-wrap:nowrap;align-items:flex-start}
html:root body .dr-hl{flex:1;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;padding-top:6px}
html:root body .dr-acts{display:flex;flex:none;gap:0}

/* ===== โปรเจกต์ v3: หัวโปรเจกต์กะทัดรัด (ชื่อ · แถบ % · บรรทัดสรุป · บรรทัดข้อมูล) ===== */
html:root body .pjh3{padding:14px 16px}
html:root body .pjh3-top{display:flex;align-items:center;gap:10px}
html:root body .pjh3 .pjh-ic{width:36px;height:36px;border-radius:10px}
html:root body .pjh3 .pjh-t{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 10px}
html:root body .pjh3 h3{margin:0;font-size:1.125rem;font-weight:600;line-height:1.3}
html:root body .pjh3-cat{font-size:.75rem;color:var(--text-2)}
html:root body .pjh3 .pjh-prog{margin-top:12px;gap:10px}
html:root body .pjh3 .pjh-prog .pj-bar{height:6px}
html:root body .pjh3 .pjh-prog b{font-size:.9375rem}
html:root body .pjh3-meta,html:root body .pjh3-info{display:flex;flex-wrap:wrap;gap:4px 18px;margin-top:10px;font-size:.8125rem;color:var(--text-2)}
html:root body .pjh3-meta span,html:root body .pjh3-info span{display:inline-flex;align-items:center;gap:5px;min-width:0}
html:root body .pjh3-meta svg,html:root body .pjh3-info svg{flex:none}
html:root body .pjh3-meta b{color:var(--text);font-weight:600}
html:root body .pjh3-meta .late,html:root body .pjh3-meta .late b{color:var(--danger)}
html:root body .pjh3-meta .ok svg{color:var(--primary)}
html:root body .pjh3-info{padding-top:10px;border-top:1px solid var(--line);color:var(--text)}
html:root body .pjh3-info svg{color:var(--text-2)}
html:root body .pjh3-info .lnk{font-weight:500}

/* ===== โปรเจกต์ v4: มือถือกระชับ (ระยะห่างน้อยลง · แถวเตี้ยลง · ไม่มีคำแนะนำซ้ำ) ===== */
@media (max-width:640px){
  html:root body .pj-col,html:root body .pj-grid{gap:10px}
  html:root body .pjh3{padding:12px 14px}
  html:root body .pjh3 .pjh-ic{width:32px;height:32px}
  html:root body .pjh3 h3{font-size:1rem}
  html:root body .pjh3 .pjh-prog{margin-top:10px}
  html:root body .pjh3-meta,html:root body .pjh3-info{gap:2px 14px;margin-top:8px;font-size:.78rem}
  html:root body .pjh3-info{padding-top:8px}
  html:root body .pjc-h{min-height:44px;padding:6px 8px 6px 14px}
  html:root body .pjc-h h4{font-size:.9375rem}
  html:root body .pjc-hint{display:none}
  html:root body .pjc .pj-step{padding:3px 4px 3px 14px}
  html:root body .pjc .pj-step-main{min-height:34px;gap:8px}
  html:root body .pjc .pj-step-no{width:22px;height:22px;font-size:.6875rem}
  html:root body .pjc .pj-step-t{font-size:.875rem}
  html:root body .pjc .pj-step .pj-step-at{margin:-6px 0 2px 28px;font-size:.6875rem}
  html:root body .pjc .pj-ib{width:34px;height:34px}
  html:root body .pj-add{padding:2px 8px 2px 16px}
  html:root body .pj-add input{min-height:38px;font-size:.875rem}
  html:root body .pjc-empty.big{padding:18px 16px 20px;gap:4px}
  html:root body .pjc-empty.big>svg{display:none}
  html:root body .dr-item{padding:8px 6px 10px 14px}
  html:root body .dr-b p{font-size:.875rem;line-height:1.5}
  html:root body .dr-b h4{margin-top:6px}
}

/* ===== หน้าทิกเก็ต (LINE): ปุ่มมุมมอง/สถานะพอดีจอ · รายการแบ่งตามวัน ===== */
html:root body .lv-s{display:none}
html:root body .ltl{background:var(--card);border-radius:14px;overflow:hidden;border:1px solid var(--line)}
html:root body .ltl-d{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:7px 14px;background:var(--card-2);font-size:.75rem;color:var(--text-2)}
html:root body .ltl-d b{font-size:.8125rem;color:var(--text);font-weight:600}
html:root body .ltr{display:flex;align-items:center;gap:12px;width:100%;padding:10px 14px;border:0;border-top:1px solid var(--line);background:none;text-align:left;font:inherit;color:inherit;cursor:pointer}
html:root body .ltl-d+.ltr{border-top:0}
html:root body .ltr:hover{background:var(--card-2)}
html:root body .ltr:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
html:root body .ltr-av{flex:none;width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--card-2);color:var(--text-2);font-size:.875rem;font-weight:600}
html:root body .ltr-m{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
html:root body .ltr-m b{font-size:.9375rem;font-weight:500;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html:root body .ltr-m small{font-size:.75rem;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .ltr-m em{font-style:normal;color:var(--danger)}
html:root body .ltr-m i{font-style:normal;color:var(--warn)}
html:root body .ltr-r{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:5px}
html:root body .ltr-r .lt-st-b{font-size:.6875rem;padding:4px 8px}
html:root body .ltr-r small{font-size:.75rem;color:var(--text-2);font-variant-numeric:tabular-nums}
@media (max-width:640px){
  html:root body .tchips.lt-views{width:100%;flex:1 1 100%;box-sizing:border-box;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:4px;padding:4px;margin:0 0 10px;background:var(--card);border-radius:12px;overflow:visible}
  html:root body .tchips.lt-views button{justify-content:center;min-height:38px;padding:0 4px;gap:5px;font-size:.8125rem;border:0;background:none;border-radius:9px;white-space:nowrap;box-shadow:none}
  html:root body .tchips.lt-views button svg{width:16px;height:16px}
  html:root body .tchips.lt-views button.on{background:var(--btn);color:var(--on-btn)}
  html:root body .lt-views .lv-f{display:none}
  html:root body .lt-views .lv-s{display:inline}
  html:root body .ltr{padding:9px 12px;gap:10px}
  html:root body .ltr-av{width:30px;height:30px;font-size:.8125rem}
  html:root body .ltr-m b{font-size:.875rem}
}

@media (max-width:640px){
}
@media (max-width:360px){html:root body .tchips.lt-views button{font-size:.75rem}}
/* ทิกเก็ต: แถวเรียบสีเดียว (ไม่มีวงกลมอักษร/ป้ายสี) */
html:root body .ltr{align-items:flex-start;gap:12px;padding:10px 14px}
html:root body .ltr-t{flex:none;font-size:.75rem;color:var(--text-2);font-variant-numeric:tabular-nums;padding-top:2px}
html:root body .ltl,html:root body .ltl-d{background:var(--card)}
html:root body .ltl-d{border-bottom:1px solid var(--line);padding:8px 14px 6px}
html:root body .ltl .ltr+.ltl-d,html:root body .ltl .ltr~.ltl-d{border-top:1px solid var(--line)}
@media (max-width:640px){html:root body .ltr{padding:9px 12px}}
/* ทิกเก็ต: แถบสถานะตัวอักษรเรียบแบบเดิม (.tbar) · มือถือ: 4 แท็บพอดีจอ เว้นระยะเท่ากัน ไม่ตัดขอบตัวอักษร · ตัวเลือกวันอยู่แถวล่าง */
@media (max-width:640px){
  html:root body .tbar.lt-bar .ttabs{flex:1 1 100%;display:flex!important;flex-wrap:nowrap;justify-content:space-between;gap:0;overflow:visible!important;padding:0 6px!important;-webkit-mask-image:none;mask-image:none}
  html:root body .tbar.lt-bar .ttabs button{flex:0 0 auto;min-width:0;padding:8px 4px 10px;font-size:.875rem;gap:5px}
  html:root body .tbar.lt-bar .ttabs button .tn{font-size:.875rem}
}
@media (max-width:359px){html:root body .tbar.lt-bar .ttabs button,html:root body .tbar.lt-bar .ttabs button .tn{font-size:.8125rem}html:root body .tbar.lt-bar .ttabs{padding:0 2px!important}}

/* ประเภทงาน (แจ้งเหตุ / ทิกเก็ต / MA / ร้องเรียน): มีไอคอนทุกขนาดจอ · มือถือ: 4 ช่องเท่ากัน ไอคอนอยู่บนชื่อ ให้พอดีแถวเดียว */
@media (max-width:640px){
  html:root body .tchips[aria-label="ประเภทงาน"]{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:6px;width:100%;box-sizing:border-box;overflow:visible}
  html:root body .tchips[aria-label="ประเภทงาน"] button,html:root body .tchips[aria-label="ประเภทงาน"] button:not(.on){flex-direction:column;justify-content:center;gap:3px;min-width:0;min-height:58px;padding:6px 2px;font-size:.75rem;line-height:1.2;white-space:nowrap;text-align:center}
  html:root body .tchips[aria-label="ประเภทงาน"] button svg,html:root body .tchips[aria-label="ประเภทงาน"] button svg.fx{display:block;width:18px!important;height:18px!important;flex:none;margin:0}
  html:root body .tchips[aria-label="ประเภทงาน"] button b{font-size:.75rem}
}

/* รายการ MA เดือนนี้: ไอคอนเส้นสีเทานำหน้าแต่ละบริษัท (เหมือนการ์ดงาน) */
html:root body .trow>.tr-ic{flex:none;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:var(--card-2);color:var(--text-2)}
@media (max-width:640px){html:root body .trow>.tr-ic{width:30px;height:30px}html:root body .trow>.tr-ic svg{width:17px;height:17px}}

/* แถวงานแบบย่อ + แถวทิกเก็ต: ใช้ไอคอนหมวดแทนจุดสถานะ */
html:root body .ltr>.tr-ic{flex:none;width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:var(--card-2);color:var(--text-2)}
html:root body .trow.tkun>.tr-ic{color:var(--text)}
@media (max-width:640px){html:root body .ltr>.tr-ic{width:30px;height:30px}html:root body .ltr>.tr-ic svg,html:root body .trow>.tr-ic svg{width:16px;height:16px}}

/* ===== ปฏิทิน + รายการงานแบบย่อ: แต่ละสถานะสีต่างกัน (ไม่เปลี่ยนปุ่มแท็บ) =====
   รอทำ = ส้ม · กำลังทำ = น้ำเงิน · พักงาน = เขียวน้ำทะเล · รอเซ็นรับ = ม่วง · เลยกำหนด = แดง · เสร็จแล้ว = เขียว */
:root{--s-open:#d97706;--s-prog:#1570ef;--s-hold:#0e9384;--s-sign:#7a3fd1;--s-late:#d92d20;--s-done:#12805c;--s-new:#d92d20}
:root[data-theme=dark]{--s-open:#f5b94d;--s-prog:#7cb2ff;--s-hold:#4fd1c0;--s-sign:#c3a2ff;--s-late:#ff8a75;--s-done:#5fd39a;--s-new:#ff8a75}
html:root body .cal-c u.k-open{background:var(--s-open);color:var(--s-open)}
html:root body .cal-c u.k-prog{background:var(--s-prog);color:var(--s-prog)}
html:root body .cal-c u.k-hold{background:var(--s-hold);color:var(--s-hold)}
html:root body .cal-c u.k-sign{background:var(--s-sign);color:var(--s-sign)}
html:root body .cal-c u.k-late{background:var(--s-late);color:var(--s-late)}
html:root body .cal-c u.k-done{background:var(--s-done);color:var(--s-done)}
html:root body .cal-c.sel u{background:#fff!important;color:#fff!important}
html:root body :is(.cal-day,.ag-r) .trow:is(.k-open,.k-prog,.k-hold,.k-sign,.k-late,.k-done){box-shadow:none;position:relative}
html:root body :is(.cal-day,.ag-r) .trow:is(.k-open,.k-prog,.k-hold,.k-sign,.k-late,.k-done)::before{content:'';position:absolute;left:0;top:10px;bottom:10px;width:4px;border-radius:0 4px 4px 0;background:var(--kc)}
html:root body :is(.cal-day,.ag-r) .trow.k-open{--kc:var(--s-open)}html:root body :is(.cal-day,.ag-r) .trow.k-prog{--kc:var(--s-prog)}html:root body :is(.cal-day,.ag-r) .trow.k-hold{--kc:var(--s-hold)}
html:root body :is(.cal-day,.ag-r) .trow.k-sign{--kc:var(--s-sign)}html:root body :is(.cal-day,.ag-r) .trow.k-late{--kc:var(--s-late)}html:root body :is(.cal-day,.ag-r) .trow.k-done{--kc:var(--s-done)}
html:root body .ck{display:inline-flex;align-items:center;gap:5px;font-weight:600;border-radius:999px;padding:3px 10px}
html:root body .ck-open{--kc:var(--s-open)}html:root body .ck-prog{--kc:var(--s-prog)}html:root body .ck-hold{--kc:var(--s-hold)}html:root body .ck-sign{--kc:var(--s-sign)}html:root body .ck-late{--kc:var(--s-late)}html:root body .ck-done{--kc:var(--s-done)}
html:root body :is(.cal-day,.ag-r,.cal-leg) .ck:is(.ck-open,.ck-prog,.ck-hold,.ck-sign,.ck-late,.ck-done){color:var(--kc)!important;background:color-mix(in srgb,var(--kc) 14%,transparent)!important;padding:3px 10px}
html:root body .cal-leg{display:flex;flex-wrap:wrap;gap:6px 8px;justify-content:center}
html:root body .cal-leg .ck:is(.ck-open,.ck-prog,.ck-hold,.ck-sign,.ck-late,.ck-done){display:inline-flex;font-weight:600;font-size:.75rem}
html:root body .cal-leg .ck::before{content:'';width:7px;height:7px;border-radius:50%;background:var(--kc);flex:none}
/* รายการงานแบบย่อ (หน้าหลัก/งาน/MA): สถานะเป็นสี · งานที่กำลังทำเด่น: แถบน้ำเงิน + พื้นอ่อน + ไอคอนน้ำเงิน */
html:root body .trow .st{font-weight:600}
html:root body .trow.s-new .st{color:var(--s-new)}html:root body .trow.s-assigned .st{color:var(--s-open)}html:root body .trow.s-in_progress .st{color:var(--s-prog)}
html:root body .trow.s-pending .st{color:var(--s-hold)}html:root body .trow.s-resolved .st{color:var(--s-sign)}html:root body .trow.s-closed .st{color:var(--s-done)}
html:root body .trow.s-in_progress{background:color-mix(in srgb,var(--s-prog) 9%,transparent);box-shadow:inset 4px 0 0 var(--s-prog)}
html:root body .trow.s-in_progress>.tr-ic{background:color-mix(in srgb,var(--s-prog) 18%,transparent);color:var(--s-prog)}
html:root body .trow.s-in_progress .tr-m b{font-weight:600}
html:root body .trow.s-new{box-shadow:inset 4px 0 0 var(--s-new)}
html:root body .trow.s-assigned{box-shadow:inset 4px 0 0 var(--s-open)}
html:root body .trow.s-pending{box-shadow:inset 4px 0 0 var(--s-hold)}
html:root body .trow.s-resolved{box-shadow:inset 4px 0 0 var(--s-sign)}
html:root body .trow.s-closed .tr-m b{font-weight:500}

/* ===== ลดสี: เหลือ 3 สีที่ต้องสังเกต (กำลังทำ น้ำเงิน · เลยกำหนด/ใหม่ แดง · เสร็จ เขียว) ที่เหลือเป็นเทา แยกด้วยรูปทรงเครื่องหมาย ไม่ใช้ป้ายสี ===== */
:root{--s-open:var(--text-2);--s-hold:var(--text-2);--s-sign:var(--text-2);--s-done:#12805c}
:root[data-theme=dark]{--s-open:var(--text-2);--s-hold:var(--text-2);--s-sign:var(--text-2);--s-done:#5fd39a}
/* จุดในปฏิทิน: รอทำ = วงกลมโปร่ง · พักงาน = จุดเทา · รอเซ็นรับ = จุดสี่เหลี่ยมเทา */
html:root body .cal-c u.k-open{background:transparent;box-shadow:inset 0 0 0 1.5px var(--text-2);color:var(--text-2)}
html:root body .cal-c u.k-hold{background:var(--text-2);color:var(--text-2);opacity:.7}
html:root body .cal-c u.k-sign{background:var(--text-2);color:var(--text-2);border-radius:2px}
/* ป้ายสถานะและคำอธิบายสี: ตัวอักษรเรียบ ไม่มีพื้นสี */
html:root body :is(.cal-day,.ag-r,.cal-leg) .ck:is(.ck-open,.ck-prog,.ck-hold,.ck-sign,.ck-late,.ck-done){background:none!important;padding:0;color:var(--text-2)!important;font-weight:500}
html:root body :is(.cal-day,.ag-r) .ck:is(.ck-prog,.ck-late,.ck-done){color:var(--kc)!important;font-weight:600}
html:root body .cal-leg{display:flex;flex-wrap:nowrap;gap:4px 12px;justify-content:center;overflow-x:auto;scrollbar-width:none}
html:root body .cal-leg .ck:is(.ck-open,.ck-prog,.ck-hold,.ck-sign,.ck-late,.ck-done){font-size:.6875rem;white-space:nowrap;gap:4px;color:var(--text-2)!important;font-weight:500}
html:root body .cal-leg .ck::before{width:7px;height:7px;background:var(--kc)}
html:root body .cal-leg .ck-open::before{background:transparent;box-shadow:inset 0 0 0 1.5px var(--text-2)}
html:root body .cal-leg .ck-hold::before{background:var(--text-2);opacity:.7}
html:root body .cal-leg .ck-sign::before{background:var(--text-2);border-radius:2px}
/* แถบข้างรายการนัด: สีเฉพาะ กำลังทำ/เลยกำหนด/เสร็จ · ที่เหลือแถบเทาบาง (พักงาน = เส้นประ) */
html:root body :is(.cal-day,.ag-r) .trow:is(.k-open,.k-hold,.k-sign)::before{background:var(--line);width:3px}
html:root body :is(.cal-day,.ag-r) .trow.k-hold::before{background:repeating-linear-gradient(to bottom,var(--text-2) 0 4px,transparent 4px 8px);opacity:.6}
/* รายการงานแบบย่อ: เน้นเฉพาะ กำลังทำ (น้ำเงิน) และ ใหม่ (แดง) · อื่นๆ ไม่มีแถบ ตัวอักษรสถานะเทา */
html:root body .trow.s-assigned,html:root body .trow.s-pending,html:root body .trow.s-resolved{box-shadow:none}
html:root body .trow.s-assigned .st,html:root body .trow.s-pending .st,html:root body .trow.s-resolved .st{color:var(--text-2);font-weight:500}
html:root body .trow.s-closed .st{color:var(--text-2);font-weight:500}

/* ===== โทนสีเว็บ: ขาว · ฟ้า · ส้ม — กำลังทำ = ฟ้า · รอทำ/ใหม่/เลยกำหนด = ส้ม (รอทำ เป็นวงโปร่ง) · เสร็จ/พักงาน/รอเซ็นรับ = เทา ===== */
:root{--s-open:#f26522;--s-late:#f26522;--s-new:#f26522;--s-done:#98a2b3;--s-prog:#0668d3}
:root[data-theme=dark]{--s-open:#ff8a4c;--s-late:#ff8a4c;--s-new:#ff8a4c;--s-done:#98a2b3;--s-prog:#7cb2ff}
html:root body .cal-c u.k-open{background:transparent;box-shadow:inset 0 0 0 1.5px var(--s-open);color:var(--s-open)}
html:root body .cal-c u.k-late{background:var(--s-late);color:var(--s-late)}
html:root body .cal-c u.k-done{background:var(--s-done);color:var(--s-done)}
html:root body .cal-leg .ck-open::before{background:transparent;box-shadow:inset 0 0 0 1.5px var(--s-open)}
html:root body .cal-leg .ck-late::before{background:var(--s-late)}
html:root body :is(.cal-day,.ag-r) .ck:is(.ck-open,.ck-late){color:var(--kc)!important;font-weight:600}
html:root body :is(.cal-day,.ag-r) .ck.ck-done{color:var(--text-2)!important;font-weight:500}
html:root body :is(.cal-day,.ag-r) .trow.k-open::before{background:var(--s-open);width:3px;opacity:.55}
html:root body :is(.cal-day,.ag-r) .trow.k-done::before{background:var(--line);width:3px}
html:root body .trow.s-assigned .st{color:var(--s-open);font-weight:600}
html:root body .trow.s-new .st{color:var(--s-new)}
html:root body .trow.s-closed .st{color:var(--text-2)}
html:root body .trow.s-assigned{box-shadow:none}

/* รายการงานแบบย่อ: แถบส้มด้านซ้ายสำหรับ มอบหมายแล้ว/ใหม่ (เหมือนแถบฟ้าของงานที่กำลังทำ) */
html:root body .trow.s-assigned,html:root body .trow.s-new{box-shadow:inset 4px 0 0 var(--s-open)}
html:root body .trow.s-assigned{background:color-mix(in srgb,var(--s-open) 7%,transparent)}
html:root body .trow.s-assigned>.tr-ic{background:color-mix(in srgb,var(--s-open) 16%,transparent);color:var(--s-open)}

/* รายการ MA เดือนนี้: โทนเดียวกับหน้าหลัก — กำลังทำ = ฟ้า · ต้องดำเนินการ/ยังไม่มอบหมาย = ส้ม · อื่นๆ เทา */
html:root body .ma-r .ma-flag{color:var(--s-open);font-weight:600}
html:root body .ma-r .mdot{background:var(--s-open)}
html:root body .ma-r .mdot.ip{background:var(--s-prog)!important}
html:root body .ma-r .st-ip{color:var(--s-prog)}
html:root body .ma-r.s-in_progress .tr-m b{font-weight:600}
html:root body .ma-r:not(.s-new):not(.s-assigned):not(.s-in_progress){box-shadow:none}

/* สลับโทน: กำลังทำ = ส้ม (เด่นสุด) · ใหม่/มอบหมายแล้ว/รอทำ = ฟ้า · เลยกำหนด = ส้มวงโปร่ง · เสร็จ = เทา */
:root{--s-prog:#f26522;--s-late:#f26522;--s-open:#0668d3;--s-new:#0668d3}
:root[data-theme=dark]{--s-prog:#ff8a4c;--s-late:#ff8a4c;--s-open:#7cb2ff;--s-new:#7cb2ff}
html:root body .cal-c u.k-late{background:transparent;box-shadow:inset 0 0 0 1.5px var(--s-late);color:var(--s-late)}
html:root body .cal-leg .ck-late::before{background:transparent;box-shadow:inset 0 0 0 1.5px var(--s-late)}
html:root body .cal-c u.k-prog{background:var(--s-prog);color:var(--s-prog)}
html:root body .ma-r .ma-flag{color:var(--s-prog)}
html:root body .ma-r .mdot{background:var(--s-prog)}
html:root body .ma-r .mdot.ip{background:var(--s-prog)!important}
html:root body .trow.s-assigned{background:color-mix(in srgb,var(--s-open) 6%,transparent)}
html:root body .trow.s-assigned>.tr-ic{background:color-mix(in srgb,var(--s-open) 14%,transparent);color:var(--s-open)}

/* งานใหม่ที่ยังไม่เปิดดู: จุดแดงมุมขวาบนของการ์ด/แถว */
html:root body .tcard.tkun::after{top:9px;right:9px;left:auto;width:11px;height:11px;box-shadow:0 0 0 3px color-mix(in srgb,var(--danger,#D93025) 22%,transparent);z-index:2}
html:root body .trow.tkun::after{top:9px;right:9px;left:auto;width:10px;height:10px;box-shadow:0 0 0 3px color-mix(in srgb,var(--danger,#D93025) 22%,transparent);z-index:2}
html:root body .tkun>.tc-h,html:root body .trow.tkun>.tr-m{padding-right:14px}

/* ===== แถวงานแบบย่อ (หน้าหลัง/งาน/MA): ไม่มีพื้นสี · แถบสีบางด้านซ้ายอยู่ในแถว · งานใหม่ที่ยังไม่เปิดดู = จุดแดงขวาบน ===== */
html:root body .trow[class*=" s-"],html:root body .trow.s-new,html:root body .trow.s-assigned,html:root body .trow.s-in_progress,html:root body .trow.s-pending,html:root body .trow.s-resolved,html:root body .trow.s-closed{box-shadow:none!important;background:none!important;position:relative}
html:root body .trow.s-new::before,html:root body .trow.s-assigned::before,html:root body .trow.s-in_progress::before{content:'';position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:0 3px 3px 0;background:var(--s-open)}
html:root body .trow.s-in_progress::before{background:var(--s-prog)}
html:root body .trow.s-assigned>.tr-ic,html:root body .trow.s-in_progress>.tr-ic{background:var(--card-2);color:var(--text-2)}
html:root body .trow.s-in_progress .tr-m b{font-weight:600}
html:root body .ma-r .mdot{display:none}
html:root body .ltr{position:relative}
html:root body .ltr.tkun::after{content:'';position:absolute;top:7px;right:8px;width:10px;height:10px;border-radius:50%;background:var(--danger,#D93025);box-shadow:0 0 0 3px color-mix(in srgb,var(--danger,#D93025) 22%,transparent)}
html:root body .ltr.tkun .ltr-t{padding-top:14px}
html:root body .ltr.tkun .ltr-m b{font-weight:600}

/* การ์ดงาน (มือถือ/จอปกติ): แถบสีบางด้านซ้าย + ป้ายสถานะสีตามชุดเดียวกับรายการแบบย่อ — กำลังทำ = ส้ม · ใหม่/มอบหมายแล้ว = ฟ้า · อื่นๆ เทา */
html:root body .tcard{position:relative}
html:root body .tcard.s-new::before,html:root body .tcard.s-assigned::before,html:root body .tcard.s-in_progress::before{content:'';position:absolute;left:0;top:14px;bottom:14px;width:4px;border-radius:0 4px 4px 0;background:var(--s-open)}
html:root body .tcard.s-in_progress::before{background:var(--s-prog)}
html:root body .tcard.s-new .pill,html:root body .tcard.s-assigned .pill{color:var(--s-open)!important;background:color-mix(in srgb,var(--s-open) 12%,transparent)!important;font-weight:600}
html:root body .tcard.s-in_progress .pill{color:var(--s-prog)!important;background:color-mix(in srgb,var(--s-prog) 14%,transparent)!important;font-weight:600}
html:root body .tcard.s-pending .pill,html:root body .tcard.s-resolved .pill,html:root body .tcard.s-closed .pill{color:var(--text-2)!important;background:var(--card-2)!important}
html:root body .tcard.tkun::after{top:9px;right:9px;left:auto}

/* ขอบการ์ดบางๆ ตามสีสถานะ */
html:root body .tcard.s-new,html:root body .tcard.s-assigned{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--s-open) 60%,transparent)!important}
html:root body .tcard.s-in_progress{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--s-prog) 65%,transparent)!important}
html:root body .tcard.s-pending,html:root body .tcard.s-resolved,html:root body .tcard.s-closed{box-shadow:inset 0 0 0 1.5px var(--line)!important}

/* ขอบสีสถานะทุกการ์ด/แถวงาน (ทุกหน้า ทั้งคอมและมือถือ) · "ยังไม่ตั้งตาราง MA" ไม่ใช้สีส้ม */
html:root body .ma-r .ma-flag{color:var(--text-2);font-weight:500}
html:root body :is(.trow,.ltr):is(.s-new,.s-assigned,.s-in_progress,.s-pending,.s-resolved,.s-closed){margin:6px 8px;width:calc(100% - 16px);border-radius:12px;border-top:0!important;--bc:var(--line)}
html:root body :is(.trow,.ltr).s-new,html:root body :is(.trow,.ltr).s-assigned{--bc:color-mix(in srgb,var(--s-open) 60%,transparent)}
html:root body :is(.trow,.ltr).s-in_progress{--bc:color-mix(in srgb,var(--s-prog) 65%,transparent)}
html:root body :is(.trow,.ltr):is(.s-new,.s-assigned,.s-in_progress,.s-pending,.s-resolved,.s-closed){box-shadow:inset 0 0 0 1.5px var(--bc)!important}
html:root body :is(.trow,.ltr):is(.s-new,.s-assigned,.s-in_progress,.s-pending,.s-resolved,.s-closed)::before{display:none}
html:root body .trow+.trow.s-new,html:root body .trow+.trow.s-assigned,html:root body .trow+.trow.s-in_progress,html:root body .trow+.trow.s-pending,html:root body .trow+.trow.s-resolved,html:root body .trow+.trow.s-closed{border-top:0}
html:root body .ltl-d+.ltr{margin-top:8px}
html:root body .ltr.s-new::after,html:root body .ltr.tkun::after{top:9px;right:12px}
html:root body .trow.tkun::after{right:12px}

/* ปฏิทิน: นัดของวันนี้ = การ์ดสีส้มทั้งใบ */
html:root body .ag-d.today .ag-r .trow{background:color-mix(in srgb,var(--s-prog) 13%,transparent)!important;box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--s-prog) 70%,transparent)!important}
html:root body .ag-d.today .ag-r .trow::before{background:var(--s-prog)!important;opacity:1}
html:root body .ag-d.today .ag-r .trow .tr-m b{font-weight:600}
html:root body .ag-d.today .ag-r .trow .ck{color:var(--s-prog)!important;font-weight:600}

/* ปฏิทิน: นัดของวันนี้ = ทั้งการ์ดเป็นสีของสถานะนั้น (รอทำ ฟ้า · กำลังทำ ส้ม · เลยกำหนด ส้ม · พักงาน/รอเซ็นรับ/เสร็จ เทา) */
html:root body .ag-d.today .ag-r .trow{background:color-mix(in srgb,var(--kc,var(--s-open)) 14%,transparent)!important;box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--kc,var(--s-open)) 70%,transparent)!important}
html:root body .ag-d.today .ag-r .trow::before{background:var(--kc,var(--s-open))!important;opacity:1}
html:root body .ag-d.today .ag-r .trow .ck{color:var(--kc,var(--s-open))!important;font-weight:600}

/* ปฏิทินรายเดือน: วันที่มีหลายงาน = หลายจุด (1 งาน 1 จุด) */
html:root body .cal-c .cal-dots{position:absolute;bottom:3px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:3px;line-height:0}
html:root body .cal-c .cal-dots u{position:static;transform:none;display:block;width:6px;height:6px;min-width:0;padding:0;font-size:0;border-radius:50%}
html:root body .cal-c .cal-dots u.k-ev{background:#D7DCE3}
html:root body .cal-c .cal-dots em{font-style:normal;font-size:.5rem;line-height:1;color:var(--text-2);font-weight:700}
html:root body .cal-c.sel .cal-dots u{background:#fff!important;box-shadow:none!important}
html:root body .cal-c.sel .cal-dots u.k-open,html:root body .cal-c.sel .cal-dots u.k-late{background:transparent!important;box-shadow:inset 0 0 0 1.5px #fff!important}

/* ปุ่มประเภทงานบนมือถือ: ไอคอนอยู่ชิดชื่อ (ไม่เว้นช่องว่างกลางปุ่ม) · ชื่อ MA แบบสั้นให้พอดีช่อง */
html:root body .tl-s{display:none}
@media (max-width:640px){
  html:root body .tchips[aria-label="ประเภทงาน"] button,html:root body .tchips[aria-label="ประเภทงาน"] button:not(.on){min-height:0!important;height:auto;padding:8px 2px 7px!important;gap:3px!important;justify-content:center!important;align-content:center}
  html:root body .tchips[aria-label="ประเภทงาน"] button svg{margin:0!important}
  html:root body .tchips[aria-label="ประเภทงาน"] .tl-f{display:none}
  html:root body .tchips[aria-label="ประเภทงาน"] .tl-s{display:inline}
  html:root body .tchips[aria-label="ประเภทงาน"] .tc-l{display:block;line-height:1.25}
}

/* ปฏิทิน: ไม่มีแถบจุดสี (คำอธิบายสี) · แบบเลื่อนกระชับขึ้น · ตารางเดือน: จุดห่างจากตัวเลข */
html:root body .cal-leg{display:none!important}
html:root body .ag-scroll{margin-top:2px}
html:root body .ag-h{padding:4px 2px;gap:8px;min-height:0}
html:root body .ag-n{width:26px;height:26px;font-size:.8125rem}
html:root body .ag-w{font-size:.8125rem}
html:root body .ag-r{padding:0 0 6px 34px}
html:root body .ag-r .trow{min-height:0!important;padding:5px 10px!important;margin:3px 0 0!important;border-radius:10px;gap:8px}
html:root body .ag-r .trow .tr-m b{font-size:.8125rem!important;line-height:1.3;font-weight:600}
html:root body .ag-r .trow .tr-m small{font-size:.6875rem!important;line-height:1.3;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:root body .ag-r .trow .ck{font-size:.6875rem}
html:root body .ag-r .trow svg{width:14px;height:14px}
html:root body .ag-d.past:not(:has(.trow)){display:none}
html:root body .cal-c{height:46px;max-width:46px;justify-content:flex-start;padding-top:8px}
html:root body .cal-c .cal-dots{bottom:4px}
html:root body .cal-c.today:not(.sel),html:root body .cal-c.sel{border-radius:50%}

/* ปุ่มปฏิทินด้านบน: จุดแดงเมื่อมีงานถึงวันทำที่ยังไม่กดเริ่ม */
html:root body .ibtn.cal-btn{position:relative}
html:root body .ibtn.cal-btn.has-dot::after{content:'';position:absolute;top:7px;right:7px;width:10px;height:10px;border-radius:50%;background:var(--danger,#D93025);box-shadow:0 0 0 2px var(--bg,#fff)}

/* รายการแถวที่มีขอบสี: ไม่ซ้อนกล่องในกล่อง — เอาพื้น/ขอบของการ์ดห่อออก ให้แต่ละแถวเป็นกรอบเดี่ยว เว้นระยะเท่ากัน */
html:root body .card:has(>.trow:is(.s-new,.s-assigned,.s-in_progress,.s-pending,.s-resolved,.s-closed)){background:none!important;border:0!important;box-shadow:none!important;padding:0!important;display:flex;flex-direction:column;gap:8px;overflow:visible}
html:root body .card>.trow:is(.s-new,.s-assigned,.s-in_progress,.s-pending,.s-resolved,.s-closed){margin:0!important;width:100%;background:var(--card)!important}
html:root body .list.dense:has(>.trow){gap:8px}
html:root body .list.dense>.trow:is(.s-new,.s-assigned,.s-in_progress,.s-pending,.s-resolved,.s-closed){margin:0!important;width:100%;background:var(--card)!important}
html:root body .list.dense{background:none!important;box-shadow:none!important;border:0!important;padding:0!important}
html:root body .list.dense>.trow{background:var(--card)}

/* แถวที่มีกรอบสี: เว้นขอบใน ไม่ให้พื้นไอคอนทับเส้นกรอบ */
html:root body :is(.trow,.ltr):is(.s-new,.s-assigned,.s-in_progress,.s-pending,.s-resolved,.s-closed){padding:12px 16px 12px 18px!important;gap:12px}
html:root body :is(.trow,.ltr):is(.s-new,.s-assigned,.s-in_progress,.s-pending,.s-resolved,.s-closed)>.tr-ic{margin-left:0;position:relative;z-index:0}
@media (max-width:640px){html:root body :is(.trow,.ltr):is(.s-new,.s-assigned,.s-in_progress,.s-pending,.s-resolved,.s-closed){padding:10px 12px 10px 14px!important}}

/* กรอบสีของแถวไม่ถูกตัดที่มุม: กล่องรายการต้องไม่ตัดเนื้อหา */
html:root body .list.dense,html:root body .card:has(>.trow),html:root body .ltl{overflow:visible!important;border-radius:0}
html:root body .ltl{overflow:hidden!important;border-radius:14px}
html:root body .list.dense>.trow,html:root body .card>.trow:is(.s-new,.s-assigned,.s-in_progress,.s-pending,.s-resolved,.s-closed){background-clip:padding-box}
html:root body .tcard:is(.s-new,.s-assigned,.s-in_progress)::before{display:none}

/* ปฏิทินแบบเลื่อน: การ์ด รอทำ = ฟ้าเต็มใบ · กำลังทำ = ส้มเต็มใบ (ทุกวัน เหมือนงานวันนี้) */
html:root body .ag-r .trow:is(.k-open,.k-prog){background:color-mix(in srgb,var(--kc) 14%,transparent)!important;box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--kc) 70%,transparent)!important}
html:root body .ag-r .trow:is(.k-open,.k-prog)::before{background:var(--kc)!important;opacity:1;width:4px}
html:root body .ag-r .trow:is(.k-open,.k-prog) .tr-m b{font-weight:600}
html:root body .ag-r .trow:is(.k-open,.k-prog) .ck{color:var(--kc)!important;font-weight:600}

/* รายงานประจำวันโปรเจกต์: ฟอร์มกึ่งอัตโนมัติ (แถวพิมพ์ + ปุ่มประโยคสำเร็จรูป) · แสดงผลเป็นหัวข้อย่อยภาษาอังกฤษ */
html:root body .dr-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:0 0 6px}
html:root body .dr-head b{display:block;font-size:.9375rem}
html:root body .dr-head small{display:block;color:var(--text-2);font-size:.75rem;margin-top:2px}
html:root body .dr-head input[type=date]{width:auto;min-height:38px;flex:none}
html:root body .dr-sec{margin:12px 0 0;padding:12px 12px 10px;border:1px solid var(--line);border-radius:14px}
html:root body .dr-sec h4{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0 0 8px;font-size:.875rem;font-weight:600}
html:root body .dr-sec h4 svg{color:var(--text-2)}
html:root body .dr-sec h4 em{color:var(--danger);font-style:normal}
html:root body .dr-sec h4 small{flex-basis:100%;margin:-2px 0 0 21px;font-size:.6875rem;font-weight:400;color:var(--text-2)}
html:root body .dr-ln{display:flex;align-items:center;gap:4px;margin:0 0 6px}
html:root body .dr-ln input{flex:1;min-width:0;min-height:42px}
html:root body .dr-chips{display:flex;flex-wrap:wrap;gap:6px}
html:root body .dr-chip{min-height:34px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--card-2);color:var(--text);font:inherit;font-size:.8125rem;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
html:root body .dr-chip.on{background:var(--s-open);border-color:var(--s-open);color:#fff;font-weight:600}
html:root body .dr-chip.add{border-style:dashed;color:var(--text-2)}
html:root body .dr-other{margin-top:8px;min-height:40px}
html:root body .dr-ul{margin:2px 0 0;padding-left:18px}
html:root body .dr-ul li{margin:0 0 3px;font-size:.9375rem;line-height:1.45;overflow-wrap:anywhere}
@media (max-width:640px){html:root body .dr-head{flex-direction:column}html:root body .dr-head input[type=date]{width:100%}}

/* หน้า "ฉัน": ยอดรวมเลือกช่วงวันที่ + ประวัติโปรเจกต์ */
html:root body .pr-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
html:root body .pr-chip{min-height:34px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--card-2);color:var(--text);font:inherit;font-size:.8125rem;cursor:pointer}
html:root body .pr-chip.on{background:var(--s-open);border-color:var(--s-open);color:#fff;font-weight:600}
html:root body .pr-dates{display:flex;align-items:flex-end;gap:8px;margin:0 0 12px}
html:root body .pr-dates label{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;font-size:.75rem;color:var(--text-2)}
html:root body .pr-dates input{min-height:42px;width:100%}
html:root body .pr-dates>span{padding-bottom:12px;color:var(--text-2)}
html:root body .prc .paysum{grid-template-columns:repeat(5,minmax(0,1fr))}
html:root body .prc .paysum .pr-tot b{color:var(--s-open)}
@media (max-width:520px){html:root body .prc .paysum{grid-template-columns:repeat(3,minmax(0,1fr))}html:root body .prc .paysum .pr-tot{grid-column:span 3}}
html:root body .ph-p{margin:10px 0 0;padding-top:10px;border-top:1px solid var(--line)}
html:root body .ph-h{display:flex;align-items:center;gap:8px;width:100%;padding:0;border:0;background:none;text-align:left;font:inherit;color:var(--text);cursor:pointer}
html:root body .ph-h b{flex:1;min-width:0;font-size:.9375rem}
html:root body .ph-h small{color:var(--text-2);font-size:.75rem}
html:root body .ph-l{list-style:none;margin:6px 0 0;padding:0}
html:root body .ph-l li{display:flex;gap:10px;padding:4px 0;font-size:.8125rem;line-height:1.4}
html:root body .ph-l li>span:last-child{flex:1;min-width:0;overflow-wrap:anywhere}
html:root body .ph-l svg{vertical-align:-2px;margin-right:4px;color:var(--text-2)}
html:root body .ph-d{flex:none;width:92px;color:var(--text-2);font-size:.75rem}

/* หน้า "ฉัน" v2: ปฏิทินย่อเลือกช่วง + ติ๊กประเภทงาน */
html:root body .rc-sum{display:flex;flex-direction:column;gap:2px;margin:0 0 10px}
html:root body .rc-sum small{font-size:.75rem;color:var(--text-2)}
html:root body .rc-sum b{font-size:1.25rem;font-weight:600}
html:root body .rc{background:var(--card-2);border-radius:14px;padding:8px 8px 6px}
html:root body .rc-h{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
html:root body .rc-h b{font-size:.9375rem}
html:root body .rc-g{display:grid;grid-template-columns:repeat(7,1fr);row-gap:2px;text-align:center}
html:root body .rc-g>span{font-size:.6875rem;color:var(--text-2);padding:2px 0}
html:root body .rc-d{position:relative;height:38px;border:0;background:none;color:var(--text);font:inherit;font-size:.875rem;cursor:pointer;border-radius:0}
html:root body .rc-d:disabled{opacity:.3;cursor:default}
html:root body .rc-d.in{background:color-mix(in srgb,var(--text) 12%,transparent)}
html:root body .rc-d.edge{background:var(--btn);color:var(--on-btn);font-weight:700;border-radius:999px}
html:root body .rc-d.today:not(.edge){box-shadow:inset 0 0 0 1.5px var(--line);border-radius:999px}
html:root body .rc-d.hasw::after{content:'';position:absolute;left:50%;bottom:4px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:var(--s-open)}
html:root body .rc-d.edge.hasw::after{background:var(--on-btn)}
html:root body .rc-f{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 4px 0}
html:root body .rc-f small{font-size:.6875rem;color:var(--text-2)}
html:root body .pt-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0}
html:root body .pt-row small{color:var(--text-2);font-size:.75rem}
html:root body .pt-chk{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px 0 8px;border:1.5px solid var(--line);border-radius:999px;background:none;color:var(--text);font:inherit;font-size:.875rem;cursor:pointer}
html:root body .pt-chk i{width:18px;height:18px;border-radius:6px;border:1.5px solid var(--text-2);display:grid;place-items:center;color:var(--on-btn)}
html:root body .pt-chk.on{border-color:var(--btn);background:color-mix(in srgb,var(--text) 8%,transparent);font-weight:600}
html:root body .pt-chk.on i{background:var(--btn);border-color:var(--btn)}
html:root body .prc .paysum{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:520px){html:root body .prc .paysum{grid-template-columns:repeat(2,minmax(0,1fr))}html:root body .prc .paysum .pr-tot{grid-column:auto}}
html:root body .rc-d{display:block;width:100%;min-width:0;padding:0}

/* หน้า "ฉัน": ปฏิทินย่อ/ขยายได้ */
html:root body .rc-top{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin:0 0 10px}
html:root body .rc-top .rc-sum{margin:0}
html:root body .rc-tg{flex:none;gap:6px}
html:root body .rc-tg svg:last-child{transition:transform .2s}
html:root body .rc-tg[aria-expanded=true] svg:last-child{transform:rotate(180deg)}
html:root body .rc[hidden]{display:none}
html:root body .row.sq>.btn{min-height:44px}

/* ปุ่มติ๊กประเภทงาน (หน้า ฉัน): ไม่ตกบรรทัด — หัวข้ออยู่บน ปุ่ม 3 ช่องเท่ากันเต็มแถว */
html:root body .pt-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
html:root body .pt-row>small{grid-column:1 / -1}
html:root body .pt-chk{justify-content:center;min-width:0;padding:0 8px;white-space:nowrap}
/* ชิปประเภทงานมี 5 ช่องได้ (เซอร์วิส/แจ้งเหตุ/ทิกเก็ต/MA/ร้องเรียน) */
@media (max-width:640px){html:root body .tchips[aria-label="ประเภทงาน"] button{font-size:.6875rem!important;padding-left:1px!important;padding-right:1px!important}html:root body .tchips[aria-label="ประเภทงาน"] .tc-l b{font-size:.6875rem}}
html:root body .ph-h{flex-wrap:wrap;row-gap:2px}
html:root body .ph-h b{flex:1 1 calc(100% - 24px)}
html:root body .ph-h small{flex:1 1 calc(100% - 24px);order:3}

/* ปฏิทิน: งานนัดวันนี้ที่ยังไม่กดรับ = วงส้มโปร่ง · กดรับแล้ว (กำลังทำ) = จุดส้มทึบ (k-prog เดิม) */
html:root body .cal-c u.k-today{background:transparent;box-shadow:inset 0 0 0 1.5px var(--s-prog);color:var(--s-prog)}
html:root body .cal-leg .ck-today::before{background:transparent;box-shadow:inset 0 0 0 1.5px var(--s-prog)}
html:root body .ck-today{--kc:var(--s-prog)}
html:root body :is(.cal-day,.ag-r) .ck.ck-today{color:var(--s-prog)!important;font-weight:600;background:none!important;padding:0}
html:root body .cal-leg .ck.ck-today{display:inline-flex;font-size:.6875rem;white-space:nowrap;gap:4px;color:var(--text-2)!important;font-weight:500}
html:root body :is(.cal-day,.ag-r) .trow.k-today{box-shadow:none;position:relative}
html:root body :is(.cal-day,.ag-r) .trow.k-today::before{content:'';position:absolute;left:0;top:10px;bottom:10px;width:3px;border-radius:0 4px 4px 0;background:var(--s-prog);opacity:.55}
html:root body :is(.cal-day,.ag-r) .ck.ck-today::before{background:transparent;box-shadow:inset 0 0 0 1.5px var(--s-prog)}
html:root body .trow.k-today{--kc:var(--s-prog)}   /* กรอบ/พื้นแถวงานวันนี้ที่ยังไม่กดรับเป็นสีส้ม */
/* รอรับงาน: เฉพาะกรอบส้ม การ์ดพื้นขาว (กำลังทำ ยังเป็นพื้นส้มเหมือนเดิม) */
html:root body :is(.ag-d.today .ag-r,.cal-day) .trow.k-today{background:var(--card)!important;box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--s-prog) 70%,transparent)!important}
/* การ์ดโปรเจกต์: รายชื่อช่างยาวขึ้นบรรทัดใหม่ในการ์ด ไม่ล้นขอบ */
html:root body .tcard .tc-f .tag.pj-who{flex:1 1 100%;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;align-items:flex-start;line-height:1.45}
html:root body .tcard .tc-f .tag.pj-who svg{flex:none;margin-top:2px}
/* หน้า ฉัน (ช่าง): หัวข้อส่วนเงินแบบพับ — ยอดสั้น ๆ ต่อท้ายหัวข้อ */
html:root body .me-fsub{font-weight:500;color:var(--text-2);font-size:.8125rem;margin-left:6px;white-space:nowrap}
html:root body .pg-line>.tk-cat{grid-column:1/-1}   /* แท็บหมวดทิกเก็ตกินเต็มแถว ไม่ดันรายการ/แผงข้างสลับที่ */
/* ปฏิทินมุมมองรายการ: แสดงทุกวัน · วันว่างเป็นแถวบางแถวเดียว (ตัวเลข + วัน + "ว่าง · เพิ่มนัด" ชิดขวา) */
html:root body .ag-d.free{padding-top:0;padding-bottom:0}
html:root body .ag-d.free .ag-h{padding:2px 2px;min-height:0}
html:root body .ag-d.free .ag-n{width:22px;height:22px;font-size:.75rem;font-weight:500;opacity:.75}
html:root body .ag-d.free .ag-w{font-size:.75rem;color:var(--text-2)}
html:root body .ag-d.free.today .ag-n{opacity:1}
html:root body .ag-d.wkend .ag-w{color:var(--text-2)}
html:root body .ag-none{margin-left:auto;font-size:.75rem;color:var(--text-2);background:none;border:0;padding:2px 4px;cursor:pointer;font-family:inherit}
html:root body button.ag-none:hover{color:var(--primary)}
html:root body .ag-h{display:flex;align-items:center}
/* ===== หน้า ฉัน แบบกระชับ: ปุ่มไอคอนตาราง 4 ช่อง (มือถือ) เห็นทุกรายการในจอเดียว ===== */
html:root body .me-card.me-c{padding:10px 12px;margin-bottom:6px}
html:root body .me-card.me-c .avatar,html:root body .me-card.me-c>:first-child{width:48px!important;height:48px!important;font-size:1.0625rem}
html:root body .me-sec{margin:10px 0 0}
html:root body .me-h{margin:0 2px 6px;font-size:.8125rem;font-weight:600;color:var(--text-2)}
html:root body .me-acts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
html:root body .me-act{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:6px;min-height:76px;padding:10px 4px 8px;border:0;border-radius:14px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);color:var(--text);font:inherit;cursor:pointer;text-align:center}
html:root body .me-act:hover{background:var(--card-2)}
html:root body .me-act:active{transform:scale(.97)}
html:root body .me-act>i{position:relative;display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:color-mix(in srgb,var(--primary) 10%,transparent);color:var(--primary)}
html:root body .me-act>i>b{position:absolute;top:-6px;right:-10px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--primary);color:#fff;font-size:.6875rem;font-weight:600;line-height:18px}
html:root body .me-act>span{font-size:.75rem;font-weight:500;line-height:1.25;overflow-wrap:anywhere}
html:root body .me-money .fold{margin:8px 0 0}
html:root body .me-grid.me-flat{margin-top:0}
@media (min-width:600px){html:root body .me-acts{grid-template-columns:repeat(auto-fill,minmax(104px,1fr))}}
/* ส่วนเงินที่พับไว้: รวมเป็นการ์ดเดียว แถวละหัวข้อ มีเส้นคั่น (ไม่เว้นช่องห่าง) */
html:root body .me-money{background:var(--card);border-radius:14px;box-shadow:inset 0 0 0 1px var(--line);padding:0 12px}
html:root body .me-money .fold{margin:0!important;border-bottom:1px solid var(--line)}
html:root body .me-money .fold:last-child{border-bottom:0}
html:root body .me-money .fold-h{padding:0;min-height:0}
html:root body .me-money .fold-btn{padding:12px 0;min-height:0;font-size:.875rem}
html:root body .me-money .fold.open .fold-b{padding-bottom:10px}
/* หน้า ฉัน (ใหม่): ป้ายตัวเลขบนปุ่ม สีคงที่อ่านได้ทั้งโหมดสว่าง/มืด */
html:root body .me-act>i>b{background:#e5484d;color:#fff;box-shadow:0 0 0 2px var(--card)}
/* จัดวาง: มือถือคอลัมน์เดียว · คอม 2 คอลัมน์เท่ากัน ซ้าย = ปุ่มทั้งหมด ขวา = เงิน/จัดการ · กว้างสุด 1200px กึ่งกลาง */
html:root body .pg-me .me-grid.me-flat{display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:none;gap:0 28px;align-items:start}
html:root body .pg-me .me-grid.me-flat .me-col{display:flex!important;flex-direction:column;gap:0;min-width:0}
html:root body .pg-me .me-flat .me-sec:first-child{margin-top:10px}
html:root body .me-money{padding:0 12px 2px}
html:root body .me-money>.me-h{margin:10px 0 2px}
@media (min-width:960px){
  html:root body .pg-me .me-grid.me-flat{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  html:root body .pg-me:has(.me-flat){max-width:1200px!important;margin-left:auto!important;margin-right:auto!important}
  html:root body .me-acts{grid-template-columns:repeat(4,minmax(0,1fr))}
  html:root body .me-act{min-height:88px}
}
html:root body .me-card.me-c{align-content:center;row-gap:2px}
html:root body .me-card.me-c small{line-height:1.35}
/* ===== หน้าโปรเจกต์ (มือถือก่อน): ตัวเลขสรุป 3 ช่อง · แถวบริษัท/สถานที่ (ซ่อนถ้าไม่มี) · ทีมช่างเป็นชิปชื่อ ===== */
html:root body .pj-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
html:root body .pj-st{display:flex;flex-direction:column;gap:2px;padding:10px;border-radius:12px;background:var(--card-2);min-width:0}
html:root body .pj-st small{display:flex;align-items:center;gap:4px;font-size:.6875rem;color:var(--text-2);white-space:nowrap}
html:root body .pj-st b{font-size:1rem;font-weight:600;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .pj-st span{font-size:.75rem;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .pj-st.late b,html:root body .pj-st.late span{color:var(--s-late,#d92d20)}
html:root body .pj-st.ok b{color:var(--ok,#12805c)}
html:root body .pj-rows{display:flex;flex-direction:column;gap:6px;margin-top:12px}
html:root body .pj-row{display:flex;align-items:flex-start;gap:8px;font-size:.875rem;min-width:0}
html:root body .pj-row svg{flex:none;margin-top:2px;color:var(--text-2)}
html:root body .pj-row span{min-width:0;overflow-wrap:anywhere}
html:root body .pj-team{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
html:root body .pj-team>small{display:flex;align-items:center;gap:4px;font-size:.75rem;color:var(--text-2);margin-bottom:8px}
html:root body .pj-chips{display:flex;flex-wrap:wrap;gap:6px}
html:root body .pj-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 10px 4px 4px;border-radius:999px;background:var(--card-2);border:0;color:var(--text);font:inherit;font-size:.8125rem;line-height:1.3}
html:root body button.pj-chip{cursor:pointer}
html:root body .pj-chip i{display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--primary) 16%,transparent);color:var(--primary);font-style:normal;font-size:.75rem;font-weight:600}
html:root body .pj-chip.none{padding:4px 10px;color:var(--text-2)}
html:root body .pj-add{gap:8px}
html:root body .pj-add input{min-width:0;flex:1;min-height:40px}
html:root body .pj-add .btn{min-height:40px;padding:0 16px}
/* สรุปรายเดือน: รายบริษัท/ตาราง + เลือกเดือน อยู่แถวเดียว ชิดกัน */
html:root body .pg-line .tbar.ls-head{display:flex;align-items:center;gap:8px;margin:0 0 8px;padding:0;border:0}
html:root body .pg-line .tbar.ls-head .ttabs{flex:1 1 auto;margin:0!important;gap:14px}
html:root body .pg-line .tbar.ls-head .ttabs button{padding:6px 0 8px!important;font-size:.875rem!important}
html:root body .pg-line .ls-mnav{margin-left:auto}
html:root body .pg-line .ls-mnav b{font-size:.8125rem}
html:root body .pg-line .ls-mnav .ibtn{width:30px;height:30px;min-height:30px}
html:root body .pg-line .empty{padding:28px 0}
html:root body .pg-line .ls-co .trow{min-height:0;padding:10px 12px}
@media (max-width:599px){html:root body .pg-line .tbar.lt-bar .ttabs{margin:0 0 6px!important}}
/* แถบเมนูล่าง (มือถือ) แบบ YouTube: ไอคอนอย่างเดียว ไม่มีตัวหนังสือ (ชื่อเมนูอยู่ใน aria-label/title) · แท็บที่เลือก = ไอคอนมีพื้นเม็ดยา */
@media (max-width:959px){
  html:root body .tabbar .tab>span{display:none!important}
  html:root body .tabbar .tab{min-height:52px!important;padding:6px 0!important;justify-content:center}
  html:root body .tabbar .tab i{padding:5px 18px!important}
}
html:root body .pg-line .tbar.lt-vbar{margin:0 0 4px}
html:root body .pg-line .tbar.lt-vbar .ttabs{margin:6px 0 0!important}

/* ===== ทั้งเว็บ: ไม่ซ้อนกรอบ/พื้นหลังหลายชั้น — กล่องที่ห่อรายการ/การ์ดอีกที ต้องไม่มีกรอบหรือพื้นของตัวเอง ===== */
/* 1) รายการทิกเก็ตแบ่งตามวัน: เลิกกล่องห่อทั้งก้อน หัววันเป็นตัวหนังสือธรรมดา แต่ละแถวเป็นการ์ดของตัวเอง */
html:root body .ltl{background:none!important;border:0!important;border-radius:0!important;overflow:visible!important;box-shadow:none!important;display:flex;flex-direction:column;gap:6px}
html:root body .ltl-d{background:none!important;border:0!important;padding:10px 2px 0!important;margin:0}
html:root body .ltl-d:first-child{padding-top:0!important}
html:root body .ltl .ltr{margin:0!important;width:100%!important;border-top:0!important;background:var(--card)}
html:root body .ltl .ltr:not([class*=" s-"]){box-shadow:inset 0 0 0 1px var(--line)!important;border-radius:12px}
/* 2) การ์ดในการ์ด: การ์ดด้านในไม่มีพื้น/ขอบ (เช่น ยอดเงินในหน้า ฉัน, การ์ดในแผงพับ, การ์ดในหน้าต่าง) */
html:root body :is(.card,.me-money,.fold-b>.card) .card,html:root body .me-money .paycard{background:none!important;box-shadow:none!important;border:0!important;padding-left:0!important;padding-right:0!important}
/* 3) ช่องตัวเลขในการ์ด: ไม่มีพื้นซ้อน ใช้เส้นคั่นแนวตั้งบาง ๆ แทน */
html:root body .card :is(.pj-st,.paysum>div){background:none!important;box-shadow:none!important;border:0!important;border-radius:0!important;padding:4px 10px!important}
html:root body .card .pj-stats>*+*{border-left:1px solid var(--line)!important}
html:root body .card .pj-stats>*:first-child{padding-left:0!important}
html:root body .card .paysum>div{padding:4px 0!important}
html:root body .card .pj-stats{gap:0}

/* ===== การเคลื่อนไหว: นุ่ม สั้น สบายตา (ปิดเองเมื่อเครื่องตั้ง "ลดการเคลื่อนไหว") ===== */
:root{--ease-out:cubic-bezier(.22,1,.36,1)}
/* 1) เอาเมาส์ชี้ปุ่ม = ปุ่มขยายเล็กน้อย (เฉพาะเครื่องที่มีเมาส์ · มือถือไม่มีผล) */
@media (hover:hover) and (pointer:fine){
  html:root body :is(.btn,.ibtn,.tchips button,.me-act,.tile,.fab,.pj-chip,.pj-ib,.ag-none,.cal-c,.me-av,.hd-create,.tab i,.rail-hb){transition:transform .24s var(--ease-out),background-color .2s ease,box-shadow .24s var(--ease-out),color .2s ease,opacity .2s ease}
  html:root body :is(.ibtn,.tchips button,.me-act,.tile,.fab,.pj-chip,.pj-ib,.cal-c,.me-av,.tab i,.rail-hb):not(:disabled):hover{transform:scale(1.06)}
  html:root body .btn:not(:disabled):not(.block):hover{transform:scale(1.04)}
  html:root body .btn.block:not(:disabled):hover{transform:scale(1.015)}
  html:root body .ttabs button{transition:color .2s ease,transform .24s var(--ease-out)}
  html:root body .ttabs button:hover{transform:translateY(-1px)}
  /* การ์ด/แถวรายการ: ยกขึ้นนิด ๆ พร้อมเงานุ่ม แทนการขยาย (ไม่ให้ตัวหนังสือสั่น) */
  html:root body :is(.trow,.ltr,.tcard,.mcard,.srow,.paylist,.pj-step){transition:transform .24s var(--ease-out),box-shadow .24s var(--ease-out),background-color .2s ease}
  html:root body :is(.trow,.ltr,.tcard,.mcard,.srow,.paylist):hover{transform:translateY(-2px)}
  html:root body :is(.ltr,.tcard,.mcard):hover{filter:drop-shadow(0 6px 12px rgba(15,35,65,.10))}
  /* กดค้าง = ยุบลง (ให้ความรู้สึกกดจริง) */
  html:root body :is(.btn,.ibtn,.tchips button,.me-act,.tile,.fab,.pj-chip,.pj-ib,.cal-c):not(:disabled):active{transform:scale(.96);transition-duration:.08s}
}
/* 2) เปลี่ยนแท็บ/หมวดในหน้าเดิม: เนื้อหาเฟดขึ้นมานุ่ม ๆ (หัวหน้าไม่ขยับ) */
.pg-swap>:not(.phead):not(.banrow){animation:swapIn .28s var(--ease-out) both}
.pg-swap .list>*,.pg-swap .ltl>*{animation:swapItem .32s var(--ease-out) both}
.pg-swap .list>:nth-child(2),.pg-swap .ltl>:nth-child(2){animation-delay:30ms}
.pg-swap .list>:nth-child(3),.pg-swap .ltl>:nth-child(3){animation-delay:60ms}
.pg-swap .list>:nth-child(4),.pg-swap .ltl>:nth-child(4){animation-delay:90ms}
.pg-swap .list>:nth-child(n+5),.pg-swap .ltl>:nth-child(n+5){animation-delay:120ms}
@keyframes swapIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes swapItem{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
/* 3) เปลี่ยนหน้า: เฟด + เลื่อนขึ้นสั้นลง นุ่มกว่าเดิม */
.pg-enter{animation:pgIn .32s var(--ease-out) backwards}
@keyframes pgIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.pg-swap>*,.pg-swap .list>*,.pg-swap .ltl>*,.pg-enter{animation:none!important}html:root body *:hover{transform:none!important}}
html:root body .pj-ib:disabled{opacity:.3;cursor:default;transform:none!important}
/* ขั้นตอนโปรเจกต์: ปุ่มย้ายขึ้น/ลง เพิ่มเข้ามา — มือถือปุ่มเล็กลงนิด ให้ชื่อขั้นตอนยังมีที่ */
@media (max-width:600px){html:root body .pj-step-act .pj-ib{width:30px;height:30px;min-width:30px;min-height:30px}html:root body .pj-step-act{gap:0}}
/* ลากย้ายขั้นตอนโปรเจกต์: ที่จับไม่เลื่อนหน้าจอตอนแตะลาก · แถวที่ลากลอยขึ้นมีเงา · แถวอื่นเลื่อนหลบนุ่ม ๆ */
html:root body .pj-grip{cursor:grab;touch-action:none}
html:root body .pj-grip svg circle{fill:currentColor;stroke:none}
html:root body .pj-sorting .pj-step{transition:transform .18s var(--ease-out,ease)}
html:root body .pj-sorting .pj-step.pj-dragging{transition:none;position:relative;z-index:5;background:var(--card)!important;box-shadow:0 10px 24px -8px rgba(15,35,65,.35)!important;border-radius:12px;cursor:grabbing}
html:root body .pj-sorting,html:root body .pj-sorting *{user-select:none;-webkit-user-select:none}
html:root body .pjc .pj-step .pj-ib.pj-grip{opacity:.75}
/* หน้าต่างส่งเมลนัดหมาย: ผู้รับ (ลูกค้า) และสำเนา (ช่าง) */
html:root body .inv-to{display:flex;flex-direction:column;gap:4px;margin:8px 0 2px;font-size:.8125rem}
html:root body .inv-to>div{display:flex;gap:8px;min-width:0}
html:root body .inv-to b{flex:none;width:92px;color:var(--text-2);font-weight:500}
html:root body .inv-to span{min-width:0;overflow-wrap:anywhere}

/* ยอดเงิน: แยก MA / โปรเจกต์ / งานบริการ / OT + ยอดรวม (หน้า ฉัน · หน้าข้อมูลช่าง · สรุปเบี้ยเลี้ยง) */
html:root body .paysum.pay4{grid-template-columns:repeat(4,minmax(0,1fr))}
html:root body .paysum.pay4 b{font-size:1rem}
html:root body .paysum.pay4 span{font-size:.6875rem;line-height:1.25;display:block}
html:root body .paysum .off{opacity:.4}
@media (max-width:420px){html:root body .paysum.pay4{grid-template-columns:repeat(2,minmax(0,1fr))}}
html:root body .pay-tot{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-top:8px;padding:8px 12px;border-radius:12px;background:var(--primary-s)}
html:root body .pay-tot span{font-size:.8125rem;color:var(--text-2)}
html:root body .pay-tot b{font-size:1.25rem;color:var(--primary)}
html:root body .pl-g+.pl-g{margin-top:6px}
html:root body .pl-g>header{display:flex;justify-content:space-between;gap:8px;padding:8px 2px 4px;font-size:.8125rem}
html:root body .pl-g>header span{color:var(--text-2);white-space:nowrap}
html:root body .pl-x{display:flex;align-items:center;gap:2px}
html:root body .pl-x .paylist{flex:1;min-width:0}
html:root body .pay-sign{margin-top:10px;display:flex;flex-direction:column;gap:8px}
html:root body .ps-st{margin:0;display:flex;align-items:flex-start;gap:6px;flex-wrap:wrap;font-size:.8125rem;color:var(--text-2)}
html:root body .ps-st.ok{color:var(--ok)}
html:root body .ps-st .warn{color:var(--warn);font-weight:600}
html:root body .ps-box{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;margin:4px 0 6px}
html:root body .ps-box small{display:block;font-size:.75rem;color:var(--text-2)}
html:root body .ps-box b.hl{background:#FFF3A3;color:#1F2937;padding:0 4px;border-radius:4px}
html:root body .rrow.excl{opacity:.5}
html:root body .rrow.excl b{text-decoration:line-through}
/* รายงาน PDF: ช่วงวันที่และยอดรวมไฮไลต์ · ตารางสรุปแยกประเภท */
.paper .p-period{margin-top:4px;font-size:.8125rem}
.paper mark{background:#FFF3A3;color:#111827;padding:0 4px;border-radius:2px;font-weight:700}
.paper .p-table tr.tot td{background:#F5F7FA;font-weight:700}
.paper .p-table tr.sub td{font-weight:600;background:#FAFBFC}
.paper .p-table td.r{text-align:right}
.paper .p-table small{color:#6B7280}

/* โปรเจกต์: ใครมาทำงานบ้าง · ขั้นตอนที่คนอื่นติ๊ก (ล็อก) · เพิ่มสาขาใหม่ */
html:root body .pv-sum{display:flex;flex-wrap:wrap;gap:4px 12px;padding:10px 16px 4px;font-size:.8125rem;color:var(--text-2)}
html:root body .pv-sum b{color:var(--text);font-weight:600}
html:root body .pv-list{list-style:none;margin:0;padding:4px 16px 10px}
html:root body .pv-list li{display:flex;gap:10px;align-items:flex-start;padding:6px 0;border-top:1px solid var(--line)}
html:root body .pv-list li:first-child{border-top:0}
html:root body .pv-d{flex:none;width:52px;font-size:.8125rem;color:var(--text-2);padding-top:3px}
html:root body .pv-ch{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
html:root body .pv-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 6px 3px 10px;border-radius:999px;background:var(--card-2);font-size:.8125rem}
html:root body .pv-chip small{color:var(--text-2);font-size:.75rem}
html:root body .pv-chip small::before{content:'· '}
html:root body .pv-chip button{display:inline-grid;place-items:center;width:20px;height:20px;border:0;border-radius:50%;background:none;color:var(--text-2);cursor:pointer}
html:root body .pv-chip button:hover{background:var(--line)}
html:root body .pv-in{display:inline-flex;align-items:center;gap:4px;font-size:.8125rem;color:var(--ok)}
html:root body .pj-step.locked .pj-step-main{cursor:default}
html:root body .pj-step.locked input{opacity:.55}
html:root body .pj-step-at svg{vertical-align:-1px;margin-left:3px}
html:root body .pj-newbr{margin:-4px 0 8px}
.paper .p-table.wr-sum{background:#fff;color:#111827}
/* หน้าทิกเก็ต (จอกว้าง): แถบชิป/แท็บย่อยต้องกินเต็มแถว — ไม่งั้นรายการงานถูกดันไปอยู่คอลัมน์แคบด้านขวา */
@media (min-width:960px){.pg-line:has(.hm-side)>:not(.hm-main):not(.hm-side){grid-column:1/-1}.pg-line:has(.hm-side)>.hm-main{grid-column:1}.pg-line:has(.hm-side)>.hm-side{grid-column:2}}
/* สาขา: รายการในหน้าต่าง "สาขา" */
html:root body .br-list{display:flex;flex-direction:column}
html:root body .br-list .trow{display:flex;align-items:center;gap:12px;width:100%;text-align:left}
html:root body .br-list .trow+.trow{border-top:1px solid var(--line)}
html:root body .br-ic{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--primary-s);color:var(--primary)}
/* การ์ด MA: ปุ่มแผนที่เล็กในการ์ด (เฉพาะงานที่ต้องไปวันนี้) */
html:root body .ma-r .ma-map{flex:none;display:inline-flex;align-items:center;gap:4px;margin-left:8px;padding:5px 10px;border-radius:999px;background:var(--primary-s);color:var(--primary);font-size:.75rem;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer}
html:root body .ma-r .ma-map:hover{background:var(--primary);color:var(--on-btn,#fff)}
/* ปุ่มติ๊กทั้งหมด (เช็กลิสต์ MA · เครื่องผู้ใช้) */
html:root body .rd-h{align-items:center;flex-wrap:wrap}
html:root body .rd-h .rd-sum{margin-left:auto}
/* เครื่องมือ: ไฟล์ที่เลือกไว้ (หลายไฟล์) */
html:root body .tool-files{display:flex;flex-direction:column;gap:4px;margin:0 0 8px;max-height:220px;overflow:auto}
html:root body .tool-f{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 10px;border-radius:10px;background:var(--card-2);font-size:.8125rem}
html:root body .tool-f b{flex:1;min-width:0;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:root body .tool-f small{color:var(--text-2)}
html:root body .tool-f button{display:grid;place-items:center;width:24px;height:24px;border:0;border-radius:50%;background:none;color:var(--text-2);cursor:pointer}
/* รูปขนาดใหญ่: ปุ่มอ่านข้อความในรูป (OCR) */
.lightbox .lb-ocr{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);display:inline-flex;align-items:center;gap:6px;padding:10px 16px;border:0;border-radius:999px;background:rgba(255,255,255,.92);color:#111827;font:inherit;font-size:.875rem;font-weight:600;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,.25)}
.lightbox .lb-ocr:hover{background:#fff}
/* อ่านข้อความในรูปแบบ LINE: กรอบไฮไลต์บนคำ · แตะเลือก · แถบคัดลอกด้านล่าง */
.lightbox .lb-ov{position:fixed;z-index:2;cursor:default}
.lightbox .lb-w{position:absolute;border-radius:4px;background:rgba(255,235,59,.28);box-shadow:0 0 0 1px rgba(255,235,59,.7);cursor:pointer;transition:background .12s}
.lightbox .lb-w:hover{background:rgba(255,235,59,.45)}
.lightbox .lb-w.on{background:rgba(6,104,211,.45);box-shadow:0 0 0 2px #0668D3}
.lightbox .lb-bar{position:absolute;z-index:3;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 20px);transform:translateX(-50%);display:flex;gap:8px;padding:6px;border-radius:999px;background:rgba(255,255,255,.95);box-shadow:0 4px 16px rgba(0,0,0,.3)}
.lightbox .lb-bar button{display:inline-flex;align-items:center;gap:6px;padding:9px 14px;border:0;border-radius:999px;background:none;color:#111827;font:inherit;font-size:.875rem;font-weight:600;cursor:pointer;white-space:nowrap}
.lightbox .lb-bar button.pri{background:#0668D3;color:#fff}
/* อีเมลแยกช่องละ 1 อีเมล (บริษัทลูกค้า / พาร์ทเนอร์) */
html:root body .eml-list{display:flex;flex-direction:column;gap:6px;margin-top:4px}
html:root body .eml-row{display:flex;align-items:center;gap:4px}
html:root body .eml-row input{flex:1;min-width:0}
html:root body .eml-add{margin-top:4px;padding-left:0}
/* พื้นที่ไดรฟ์ใกล้เต็ม (ใช้ไป 90% ขึ้นไป) */
html:root body .drv-full{color:var(--danger,#c0392b);font-weight:600}

/* หัวงาน LINE: การ์ดเดียว (lineSummary) */
.lk{padding:14px}
.lk-top{display:flex;align-items:center;gap:6px}
.lk-top .sp{flex:1}
.lk-ago{color:var(--text-3);font-size:.78rem}
.lk .tk-title{margin:8px 0 6px}
.lk-meta{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:.86rem;color:var(--text-2)}
.lk-meta span{display:inline-flex;align-items:center;gap:5px;min-width:0}
.lk-meta svg{flex:none;opacity:.7}
.lk-warn{font-style:normal;font-weight:600;color:var(--danger)}
.lk-ai{margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--card-2);border-left:3px solid var(--primary)}
.lk-ai p{margin:0;font-size:.9rem;line-height:1.55}
.lk-next{display:flex;gap:8px;margin-top:6px;font-size:.84rem;line-height:1.5}
.lk-ai p+.lk-next{padding-top:6px;border-top:1px dashed var(--line)}
.lk-next b{flex:none;color:var(--primary);font-weight:700}
.lk-chips{margin-top:8px}
.lk-who{display:flex;align-items:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.lk-who .lc2-av{width:32px;height:32px;font-size:.85rem}
.lk-who .ibtn.sm{width:34px;height:34px}
.lk-claim,.lk .row.sq{margin-top:12px}
.lk-cust{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;margin:-2px 0;border:1px dashed var(--line);border-radius:8px;background:none;font:inherit;color:var(--text);cursor:pointer}
.lk-cust:hover{border-color:var(--primary);color:var(--primary)}
.lk-cust svg{opacity:.6}
.lk-cust.sm{padding:1px 6px;font-size:inherit;gap:4px}

/* หัวหน้าทีม/แอดมิน: ปุ่มรับงาน + แถวปุ่มจัดการ (มอบหมาย) */
.lk-claim + .row.sq { margin-top: 8px; }

/* ปุ่มไอคอนเอไอข้าง สรุป: ไม่ยืดเต็มช่อง */
.tchips button.tc-ic{flex:0 0 auto;padding:8px 12px}
/* สร้างงาน: สถานที่/ชั้น/ความสำคัญ ทำให้เล็ก (ไม่ได้แก้บ่อย) · ความสำคัญเป็นปุ่มติ๊กเล็กๆ */
.modal-card .fl-sm .fl,.modal-card .fl.fl-sm{font-size:.8125rem!important;color:var(--text-2)}
.modal-card .fl-sm input,.modal-card .fl-sm select{padding:7px 10px;font-size:.875rem!important;border-radius:10px}
.prio-sm{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:6px}
.prio-sm label{display:inline-flex;align-items:center;gap:6px;font-size:.875rem;color:var(--text);cursor:pointer}
.prio-sm input{width:16px;height:16px;margin:0;padding:0;accent-color:var(--primary)}
/* ฟอร์มสร้างงานบนคอม: ใหญ่เกือบเต็มจอ + ระยะห่างกระชับ ให้เห็นครบโดยไม่ต้องเลื่อน */
@media (min-width:960px){
  .modal-card:has(.create-grid){width:min(1240px,calc(100vw - 40px));max-height:calc(100dvh - 20px);padding:18px 30px 0}
  .modal-card:has(.create-grid) .mh{margin-bottom:4px}
  .modal-card:has(.create-grid) .fl{margin-top:8px}
  .modal-card:has(.create-grid) .kindpick span{padding:8px 12px}
  .modal-card:has(.create-grid) .fl input,.modal-card:has(.create-grid) .fl select{padding:9px 12px}
  .modal-card:has(.create-grid) #fDesc{min-height:64px}
  .modal-card:has(.create-grid)>.row.end{margin:10px -30px 0;padding:10px 30px 12px}
}
/* แชทงาน LINE: รูปในฟองแชทขนาดเหมือนแอปแชท (กดดูรูปใหญ่ได้เหมือนเดิม) */
.thread .bubble .gallery{display:flex;flex-wrap:wrap;gap:6px}
.thread .bubble .gallery .gimg{width:auto;height:auto;padding:0;border:0;background:none}
.thread .bubble .gallery img{width:auto;height:auto;max-width:min(240px,100%);max-height:240px;border-radius:12px;object-fit:cover;display:block}
/* งาน LINE (ทีมงาน): แชทกับลูกค้าเป็นส่วนหลักของหน้า — กล่องสูง ตัวหนังสืออ่านง่าย ปุ่มตอบด่วนเหนือช่องพิมพ์ */
.lk-chat .lk-who{margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid var(--line)}
.lk-chat .thread{min-height:220px;max-height:min(62vh,640px);padding:4px 2px 8px}
.lk-chat .bubble{font-size:.9375rem;max-width:80%}
.lk-chat .bubble .meta{font-size:.75rem}
.lk-quick{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 2px}
.lkq{border:1px solid var(--line);background:var(--card);color:var(--text);border-radius:999px;padding:6px 12px;font:inherit;font-size:.8125rem;cursor:pointer}
.lkq:hover{border-color:var(--primary);color:var(--primary)}
.lk-foot:not(:has(.lc2-x,.row)){display:none}
.lk-foot .row.sq{margin-top:10px}
.lk .lk-claim{margin-top:12px}
/* งาน LINE: ปุ่มรับงาน = เครื่องหมายถูกเล็ก ๆ มุมขวาบน */
.lk-claim-ic{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;margin-left:8px;border-radius:50%;border:0;background:var(--primary);color:var(--on-primary,#fff);cursor:pointer;flex:none}
.lk-claim-ic:hover{filter:brightness(1.1)}
/* เอไอวิเคราะห์: หุ่นยนต์เล็ก + ฟองคำพูด (ตัวหนังสือเล็ก ไม่แย่งความเด่นจากแชท) */
.lk-bot{display:flex;align-items:flex-start;gap:8px;margin-top:10px}
.lk-bot-ic{flex:none;width:30px;height:30px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--card-2);color:var(--text-2);border:1px solid var(--line)}
.lk-say{position:relative;background:var(--card-2);border:1px solid var(--line);border-radius:4px 12px 12px 12px;padding:6px 10px;font-size:.8125rem;line-height:1.5;color:var(--text-2);min-width:0}
.lk-say::before{content:'';position:absolute;left:-6px;top:9px;width:10px;height:10px;background:inherit;border-left:1px solid var(--line);border-bottom:1px solid var(--line);transform:rotate(45deg)}
.lk-say p{margin:0}.lk-say p+p{margin-top:3px}
.lk-say .lk-next b{color:var(--text);font-weight:600}
/* แชทเด่นกว่าเดิม: กล่องสูงขึ้น · หัวแชทไม่มีเส้นซ้อน */
.lk-chat .lk-who{border-top:0;margin-top:0;padding-top:0}
.lk-chat .thread{min-height:min(46vh,420px);max-height:min(66vh,720px)}
.lk-chat{border:1px solid var(--line)}
.own-pick{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px}
.own-pick .btn{justify-content:center;gap:8px;padding:16px 12px}
/* เอไอสรุป (ออกแบบใหม่): หุ่นยนต์สีฟ้า + ฟองคำพูดโทนฟ้าอ่อน แยกจากการ์ดชัดเจน · "ควรทำ" เป็นบรรทัดแยกใต้ฟอง */
.lk-bot{gap:10px;margin-top:12px}
.lk-bot-ic{width:28px;height:28px;margin-top:16px;background:var(--primary-s);color:var(--primary);border:0}
.lk-bot-b{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.lk-bot-h{font-size:.6875rem;font-weight:600;letter-spacing:.02em;color:var(--primary);margin-left:2px}
.lk-bot .lk-say{background:var(--primary-s);border:0;border-radius:4px 14px 14px 14px;padding:8px 12px;font-size:.8125rem;line-height:1.55;color:var(--text)}
.lk-bot .lk-say::before{display:none}
.lk-todo{display:flex;align-items:baseline;gap:6px;font-size:.8125rem;color:var(--text-2);padding:0 2px;line-height:1.5}
.lk-todo svg{flex:none;color:var(--primary);align-self:center}
.lk-todo b{color:var(--text);font-weight:600;flex:none}
/* หัวงาน LINE แบบกระชับ: ชื่อเรื่องเล็กลง · บริษัท/ผู้รับ/รีโมท/อุปกรณ์อยู่บรรทัดเดียวกัน · สรุปเอไอ 2 บรรทัด (แตะอ่านต่อ) */
.card.lk:not(.lk-foot){padding:10px 14px 12px}
.lk .tk-title{font-size:1.0625rem;line-height:1.35;margin:4px 0 4px}
.lk-top .pill,.lk-top .prio{font-size:.75rem}
.lk-claim-ic{width:30px;height:30px}
.lk-claim-ic svg{width:17px;height:17px}
.lk-meta{gap:2px 10px;font-size:.8125rem}
.lk-meta .lk-cust{padding:1px 6px}
.lk-chip{color:var(--text-2)}
.lk-chip svg{opacity:.7}
.lk-bot{margin-top:8px;gap:8px;align-items:flex-start}
.lk-bot-ic{width:24px;height:24px;margin-top:2px}
.lk-bot-b{gap:3px}
.lk-bot .lk-say{padding:5px 10px;font-size:.8125rem;line-height:1.5;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;cursor:pointer}
.lk-bot .lk-say.open{display:block}
.lk-todo{font-size:.75rem}
/* หัวกล่องแชท: บรรทัดเดียวเตี้ย ๆ */
.lk-chat{padding-top:10px}
.lk-chat .lk-who{margin:0 0 6px;padding:0 0 8px}
.lk-chat .lk-who .lc2-av{width:28px;height:28px;font-size:.8rem}
.lk-chat .lk-who .lc2-who b{font-size:.9375rem}
.lk-chat .lk-who .lc2-who small{font-size:.75rem}
.lk-chat .lk-who .lc2-chat{padding:5px 10px;font-size:.8125rem;min-height:0}
.lk-chat .lk-who .ibtn.sm{width:30px;height:30px}
.lk-chat .thread{min-height:min(30vh,280px)}
/* หัวงาน LINE: รีโมท/อุปกรณ์ซ้าย · บริษัทและผู้รับงานชิดขวา */
.lk-meta .lk-chip{order:0}
.lk-meta .lk-mr{order:1}
.lk-meta .lk-mr1{margin-left:auto}
/* ===== งาน LINE บนคอม: แผงกว้าง 90% ของจอ · ซ้าย = หัวงาน/การแก้ไข/แท็บ · ขวา = แชท (สูงเต็มแผง ติดอยู่กับที่) ===== */
@media (min-width:960px){
  html:root body #sheet[data-line="1"]{width:90%;max-width:2200px}
  html:root body #sheet[data-line="1"] .sheet-inner{max-width:none}
}
@media (min-width:1100px){
  html:root body #sheet[data-line="1"] .lk-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);grid-template-areas:"a c" "r c";grid-template-rows:auto 1fr;gap:0 18px;align-items:start}
  #sheet[data-line="1"] .lk-a{grid-area:a}
  #sheet[data-line="1"] .lk-r{grid-area:r}
  #sheet[data-line="1"] .lk-c{grid-area:c;position:sticky;top:0}
  #sheet[data-line="1"] .lk-c .lk-chat{margin-top:0;display:flex;flex-direction:column;height:calc(100dvh - 120px)}
  #sheet[data-line="1"] .lk-c .thread{flex:1;min-height:0;max-height:none}
  #sheet[data-line="1"] .lk-a .card.lk{margin-top:0}
}
/* แชทงาน LINE บนคอม: หน้าเว็บย่อ zoom .9 → หน่วย dvh ถูกย่อด้วย ต้องชดเชย (เหมือน .shell) ไม่งั้นกล่องแชทเตี้ยกว่าแผง */
@media (min-width:1100px) and (hover:hover) and (pointer:fine){
  #sheet[data-line="1"] .lk-c .lk-chat{height:calc(111.12dvh - 130px)}
}
#sheet[data-line="1"] .lk-c .composer textarea{min-height:44px}
/* แชทงาน LINE บนคอม: ส่วนพิมพ์ตอบกระชับ (ไม่มีบรรทัดอธิบาย · แท็บ/ปุ่มเล็ก) ให้พื้นที่แชทมากที่สุด */
@media (min-width:1100px){
  #sheet[data-line="1"] .lk-c .lk-chat{padding:10px 14px 12px}
  #sheet[data-line="1"] .lk-c .lk-who{padding-bottom:6px;margin-bottom:4px}
  #sheet[data-line="1"] .lk-c .composer{margin-top:6px;padding-top:8px}
  #sheet[data-line="1"] .lk-c .composer:not(.internal) .vis-hint{display:none}
  #sheet[data-line="1"] .lk-c .seg{margin-bottom:6px;padding:2px;max-width:340px}
  #sheet[data-line="1"] .lk-c .seg button{padding:5px 8px;font-size:.75rem}
  #sheet[data-line="1"] .lk-c .composer textarea{min-height:40px;padding:8px 12px}
  #sheet[data-line="1"] .lk-c .crow{margin-top:6px}
  #sheet[data-line="1"] .lk-c .crow .tool-btn{width:34px;height:34px;min-height:0}
  #sheet[data-line="1"] .lk-c .crow .btn.primary{padding:6px 14px;min-height:0}
  #sheet[data-line="1"] .lk-c .lk-quick{margin:6px 0 0}
  #sheet[data-line="1"] .lk-c .lkq{padding:4px 10px;font-size:.75rem}
}
@media (min-width:1100px) and (hover:hover) and (pointer:fine){
  #sheet[data-line="1"] .lk-c .lk-chat{height:calc(111.12dvh - 112px)}
}
/* งาน LINE บนคอม: แชทเป็นพื้นที่หลักด้านซ้าย (กว้าง · สูงเต็มแผง) · ข้อมูลงานอยู่คอลัมน์ขวาด้านบน */
@media (min-width:1100px){
  html:root body #sheet[data-line="1"] .lk-grid{grid-template-columns:minmax(0,1.75fr) minmax(320px,1fr);grid-template-areas:"c a" "c r"}
}
/* แชทงาน LINE บนคอม: ส่วนพิมพ์เหลือแถวเดียว [ตอบลูกค้า|ภายใน] [ช่องพิมพ์] [ไมค์ กล้อง ไฟล์ ส่ง] — แชทได้พื้นที่เกือบทั้งหมด */
@media (min-width:960px){
  #sheet[data-line="1"] .lk-c .composer{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"seg box crow" "hint hint hint" "th th th";align-items:center;gap:0 8px;margin-top:6px;padding-top:8px}
  #sheet[data-line="1"] .lk-c .composer>.seg{grid-area:seg;margin:0;max-width:none;flex-direction:column;padding:2px;gap:2px}
  #sheet[data-line="1"] .lk-c .composer>.seg button{padding:3px 10px;font-size:.6875rem;white-space:nowrap;justify-content:flex-start}
  #sheet[data-line="1"] .lk-c .composer>.vis-hint{grid-area:hint;margin:4px 2px 0}
  #sheet[data-line="1"] .lk-c .composer>.voicebox{grid-area:box;min-width:0}
  #sheet[data-line="1"] .lk-c .composer textarea{min-height:44px;height:44px;padding:10px 12px;resize:vertical}
  #sheet[data-line="1"] .lk-c .composer>.crow{grid-area:crow;margin:0;gap:4px}
  #sheet[data-line="1"] .lk-c .composer>.crow .sp{display:none}
  #sheet[data-line="1"] .lk-c .composer>:not(.seg,.vis-hint,.voicebox,.crow){grid-area:th}
  #sheet[data-line="1"] .lk-c .lk-quick{margin:6px 0 0;gap:4px}
  #sheet[data-line="1"] .lk-c .lkq{padding:3px 10px;font-size:.75rem}
}
/* เอไอสรุปบนคอม: ลอยอยู่มุมขวาบนของกล่องแชท (ไม่อยู่ในหัวงานแล้ว) · แตะหุ่นยนต์เพื่อย่อเหลือแค่ไอคอน */
.lk-ai-float{display:none}
@media (min-width:1100px){
  #sheet[data-line="1"] .lk-a .lk-bot{display:none}
  #sheet[data-line="1"] .lk-chat{position:relative}
  #sheet[data-line="1"] .lk-ai-float{display:block;position:absolute;top:62px;right:18px;z-index:3;max-width:min(380px,48%);filter:drop-shadow(0 6px 16px rgba(0,0,0,.12))}
  #sheet[data-line="1"] .lk-ai-float .lk-bot{margin:0;flex-direction:row-reverse}
  #sheet[data-line="1"] .lk-ai-float .lk-bot-ic{cursor:pointer;margin-top:0;width:30px;height:30px;background:var(--surface);border:1px solid var(--line)}
  #sheet[data-line="1"] .lk-ai-float .lk-bot-b{align-items:flex-end}
  #sheet[data-line="1"] .lk-ai-float .lk-say{background:var(--surface);border:1px solid color-mix(in srgb,var(--primary) 35%,var(--line));border-radius:14px 4px 14px 14px;-webkit-line-clamp:4}
  #sheet[data-line="1"] .lk-ai-float .lk-todo{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:4px 8px}
  #sheet[data-line="1"] .lk-ai-float.min .lk-bot-b{display:none}
}
/* กล่องแชท: เดิมมีสามเหลี่ยม ▲ จาก CSS ซ้อนกับตัวชี้เลื่อนของสคริปต์ (.sh-ind) → ขึ้น 2 อัน · ใช้ของสคริปต์อย่างเดียว */
html:root body .thread::before{content:none}
/* สร้างงาน: ช่างบันทึกงานบริการเอง — ซ่อนชนิดงานอื่น · เบี้ยเลี้ยง/ผู้รับผิดชอบแสดงเป็นค่าคงที่ */
.kindpick label[hidden],.create-grid .fl[hidden]{display:none}
.fee-fixed{display:flex;flex-direction:column;gap:2px;margin-top:6px;padding:10px 12px;border:1px dashed var(--line);border-radius:12px;background:var(--card)}
.fee-fixed b{font-size:1rem}
.fee-fixed small{color:var(--text-2);font-size:.75rem}
/* เส้นแบ่งใต้แถวแท็บ = สีน้ำเงิน ทุกหน้า ทุกธีม (เจ้าของสั่ง 1 ธ.ค. 2026) — เปลี่ยนแค่สีเส้นที่มีอยู่แล้ว ไม่เพิ่มเส้นที่ธีมเอาออก */
html:root body :is(.tchips,.rpt-tabs .ttabs,.ys-tabs,.pg-home .ttabs,.tbar .ttabs,.rpt-nav){border-bottom-color:#0668D3!important}
html:root[data-theme=dark] body :is(.tchips,.rpt-tabs .ttabs,.ys-tabs,.pg-home .ttabs,.tbar .ttabs,.rpt-nav){border-bottom-color:#3D8BF0!important}   /* ธีมมืด --primary เป็นสีขาว จึงใส่สีน้ำเงินตรง ๆ */
/* ฟอร์ม "บันทึกงาน" ของช่าง: กระชับ เลื่อนน้อย (เจ้าของสั่ง 1 ธ.ค. 2026) — ประเภทเป็นปุ่มเล็ก 4 คอลัมน์ · ช่องห่างกันน้อยลง · เบี้ยเลี้ยง+ผู้รับผิดชอบรวมบรรทัดเดียว */
html:root body .create-grid.cg-tight .fl{margin-top:10px}
html:root body .create-grid.cg-tight .fl :is(input:not([type=checkbox]):not([type=radio]),select){min-height:42px}
html:root body .create-grid.cg-tight .fee-line{margin:10px 0 0;padding:8px 10px;border-radius:10px;background:var(--primary-s);font-size:.8125rem;line-height:1.5}
html:root body .create-grid.cg-tight .fee-line small{color:var(--text-2)}
/* งานช่างในหน้า ฉัน › โปรเจกต์ */
html:root body .tj-sec .tj-h{display:flex;flex-direction:column;align-items:flex-start;gap:2px;cursor:default}
html:root body .tj-sec .tj-h b{display:inline-flex;align-items:center;gap:6px}
html:root body .tj-sec .tj-li{cursor:pointer;border-radius:8px}
html:root body .tj-sec .tj-li:hover{background:var(--primary-s)}
/* ช่อง "ประเภท" ในฟอร์มสร้าง/บันทึกงาน = ปุ่มเม็ดยาเล็ก เรียงต่อกันตามความยาวข้อความ (เจ้าของสั่ง 1 ธ.ค. 2026 — เดิมกล่องใหญ่ 2 คอลัมน์ 4 แถว) */
html:root body #fCatBox .catpick{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
html:root body #fCatBox .catpick label{flex:0 0 auto;display:flex}
html:root body #fCatBox .catpick span{flex:none;flex-direction:row;align-items:center;gap:5px;padding:5px 11px;min-height:34px;font-size:.8125rem;line-height:1.2;border-radius:999px;white-space:nowrap}
html:root body #fCatBox .catpick span svg{width:15px;height:15px;flex:none}
/* หน้าสาขา: ลูกค้าในสาขา */
html:root body .br-ch{display:flex;align-items:center;gap:8px}
html:root body .br-ch small{color:var(--text-2);font-weight:500}
html:root body .br-custs{margin-bottom:12px}
html:root body .brc-opts{max-height:50vh;overflow:auto;margin-top:8px}
html:root body .pjh .pj-stats:has(> :nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}
/* ป้ายชนิดงานในหน้า งานช่าง/บริการ */
html:root body .jk{display:inline-block;padding:0 6px;margin-right:6px;border-radius:6px;font-size:.6875rem;font-weight:600;line-height:1.6;vertical-align:1px}
html:root body .jk-svc{background:var(--primary-s);color:#0668D3}
html:root body .jk-tech{background:#FEF3C7;color:#92400E}
html:root[data-theme=dark] body .jk-svc{background:rgba(61,139,240,.18);color:#8DBBFF}
html:root[data-theme=dark] body .jk-tech{background:rgba(245,158,11,.18);color:#FBBF24}
/* ---------- แดชบอร์ดภาพรวมงาน (หน้าหลัก เฉพาะบัญชีใน DASH_EMAILS) — สีกราฟจากชุดสีที่ผ่านตัวตรวจ (ตาบอดสี/ความต่าง) ทั้งธีมสว่าง/มืด ---------- */
html:root body .dsh{--c1:#2a78d6;--c2:#eb6834;--c3:#1baf7a;--c4:#eda100;display:flex;flex-direction:column;gap:14px;margin-bottom:18px}
html:root[data-theme=dark] body .dsh{--c1:#3987e5;--c2:#d95926;--c3:#199e70;--c4:#c98500}
html:root body .dsh-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
html:root body .dsh-mini{grid-template-columns:repeat(3,minmax(0,1fr))}
html:root body .dsh-kpi{display:flex;align-items:center;gap:12px;text-align:left;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:var(--card);color:var(--text);font:inherit;cursor:pointer;min-width:0}
html:root body .dsh-kpi:hover{border-color:var(--c1)}
html:root body .dsh-ki{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:12px;background:var(--primary-s);color:var(--c1)}
html:root body .dsh-kpi span{display:flex;flex-direction:column;min-width:0}
html:root body .dsh-kpi small{color:var(--text-2);font-size:.8125rem}
html:root body .dsh-kpi b{font-size:1.625rem;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums}
html:root body .dsh-kpi em{font-style:normal;font-size:.75rem;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .dsh-kpi em.hot{color:var(--danger,#d92d20);font-weight:600}
html:root body .dsh-row{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:14px}
html:root body .dsh-card{padding:16px;margin:0;min-width:0}
html:root body .dsh-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:8px}
html:root body .dsh-h h3{margin:0;font-size:1rem}
html:root body .dsh-h small{color:var(--text-2);font-size:.75rem}
html:root body .dsh-leg{display:flex;gap:14px;font-size:.75rem;color:var(--text-2);margin-bottom:4px}
html:root body .dsh-leg span{display:inline-flex;align-items:center;gap:6px}
html:root body .dsh-leg i{width:10px;height:10px;border-radius:3px;display:inline-block}
html:root body .dsh-svg{width:100%;height:auto;display:block}
html:root body .dsh-grid{stroke:var(--line);stroke-width:1}
html:root body .dsh-ax{fill:var(--text-2);font-size:11px}
html:root body .dsh .dsh-s1{fill:var(--c1);background:var(--c1)}
html:root body .dsh .dsh-s2{fill:var(--c2);background:var(--c2)}
html:root body .dsh-hit:hover path{opacity:.8}
html:root body .dsh-dn{display:flex;align-items:center;gap:14px}
html:root body .dsh-donut{width:140px;height:140px;flex:none}
html:root body .dsh-donut .dsh-c1{stroke:var(--c1)} html:root body .dsh-donut .dsh-c2{stroke:var(--c2)} html:root body .dsh-donut .dsh-c3{stroke:var(--c3)} html:root body .dsh-donut .dsh-c4{stroke:var(--c4)}
html:root body .dsh-donut .dsh-empty{stroke:var(--line)}
html:root body .dsh-dn-l{fill:var(--text-2);font-size:11px}
html:root body .dsh-dn-n{fill:var(--text);font-size:22px;font-weight:700}
html:root body .dsh-dl{list-style:none;margin:0;padding:0;flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
html:root body .dsh-dl button{display:grid;grid-template-columns:10px minmax(0,1fr) auto 38px;align-items:center;gap:8px;width:100%;padding:6px 4px;border:0;background:none;font:inherit;color:var(--text);text-align:left;border-radius:8px;cursor:pointer}
html:root body .dsh-dl button:hover{background:var(--primary-s)}
html:root body .dsh-dl i{width:10px;height:10px;border-radius:50%}
html:root body .dsh-dl .dsh-c1{background:var(--c1)} html:root body .dsh-dl .dsh-c2{background:var(--c2)} html:root body .dsh-dl .dsh-c3{background:var(--c3)} html:root body .dsh-dl .dsh-c4{background:var(--c4)}
html:root body .dsh-dl span{font-size:.8125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .dsh-dl small{color:var(--text-2);text-align:right;font-size:.75rem}
html:root body .dsh-tbl{display:flex;flex-direction:column}
html:root body .dsh-tr{display:grid;grid-template-columns:62px minmax(0,1fr) 90px auto 92px;align-items:center;gap:10px;padding:9px 4px;border:0;border-bottom:1px solid var(--line);background:none;font:inherit;color:var(--text);text-align:left;cursor:pointer}
html:root body .dsh-tr:last-child{border-bottom:0}
html:root body .dsh-tr:hover{background:var(--primary-s)}
html:root body .dsh-tr .mono{font-size:.75rem;color:var(--text-2)}
html:root body .dsh-sub{display:flex;flex-direction:column;min-width:0}
html:root body .dsh-sub b{font-size:.875rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .dsh-sub small{font-size:.75rem;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .dsh-who,html:root body .dsh-time{font-size:.75rem;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .dsh-time{text-align:right}
html:root body .dsh-top{list-style:none;margin:0;padding:0}
html:root body .dsh-top button{display:flex;align-items:center;gap:10px;width:100%;padding:7px 4px;border:0;background:none;font:inherit;color:var(--text);text-align:left;border-radius:8px;cursor:pointer}
html:root body .dsh-top button:hover{background:var(--primary-s)}
html:root body .dsh-rk{display:grid;place-items:center;flex:none;width:22px;height:22px;border-radius:50%;background:var(--primary-s);color:var(--c1);font-size:.75rem;font-weight:700}
html:root body .dsh-top .dsh-sub{flex:1}
html:root body .dsh-n{font-size:1.125rem;font-variant-numeric:tabular-nums}
html:root body .dsh-more{margin-top:6px}
@media (max-width:959px){
  html:root body .dsh-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  html:root body .dsh-mini{grid-template-columns:repeat(3,minmax(0,1fr))}
  html:root body .dsh-mini .dsh-ki{display:none}
  html:root body .dsh-row{grid-template-columns:minmax(0,1fr)}
  html:root body .dsh-kpi{padding:12px}
  html:root body .dsh-kpi b{font-size:1.375rem}
  html:root body .dsh-tr{grid-template-columns:minmax(0,1fr) auto;row-gap:2px}
  html:root body .dsh-tr .mono,html:root body .dsh-tr .dsh-who,html:root body .dsh-tr .dsh-time{display:none}
}
html:root body .pg-home > .dsh,html:root body .pg-home > .dsh-more{column-span:all;grid-column:1 / -1}
html:root body .dsh-dl span{white-space:normal;line-height:1.25}

/* งาน MA วันนี้/กำลังทำ: ขอบส้ม · กดเริ่มงานแล้ว = ส้มอ่อนทั้งการ์ด */
html:root body :is(.tcard,.trow).ma-hot{box-shadow:inset 0 0 0 2px var(--s-prog)!important;border-color:var(--s-prog)!important}
html:root body :is(.tcard,.trow).ma-go,html:root body .card>.trow.ma-go,html:root body .list.dense>.trow.ma-go{background:color-mix(in srgb,var(--s-prog) 14%,var(--card))!important}

/* ชิปประเภทงาน: ไม่ให้ชิปสุดท้ายถูกตัดขอบจอ (โดยเฉพาะข้อความอังกฤษที่ยาว) — ขึ้นบรรทัดใหม่แทนการเลื่อนข้าง */
html:root body .tchips.tc-type{display:flex;flex-wrap:wrap;overflow:visible}

/* เบี้ยเลี้ยงรายคนในฟอร์มโปรเจกต์ */
html:root body .tchk .pj-tfee{width:96px;min-height:32px;padding:4px 8px;margin-left:auto;font-size:0.8125rem;text-align:right;flex:none}

/* ฟอร์มสร้างงาน/โปรเจกต์: กว้าง 80% ของจอบนคอม (ไม่ต้องเลื่อนหาข้อมูลมาก) · รายชื่อช่างในโปรเจกต์เปิดไว้เสมอ */
@media (min-width:900px){html:root body .modal-card:has(.create-grid){width:min(80vw,1600px)}}
html:root body #pjTechSel .tech-opts{max-height:max(180px,calc(100dvh - 440px));overflow:auto}

/* ตัวเลือกช่วงเวลาของแดชบอร์ด */
html:root body .dsh-per{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
html:root body .dsh-seg{display:inline-flex;gap:4px;padding:3px;border-radius:12px;background:var(--card-2)}
html:root body .dsh-seg button{border:0;background:transparent;color:var(--text-2);padding:7px 14px;min-height:36px;border-radius:9px;font-size:0.875rem;white-space:nowrap}
html:root body .dsh-seg button.on{background:var(--card);color:var(--text);font-weight:600;box-shadow:0 0 0 1px var(--line)}
html:root body .dsh-rg{display:inline-flex;align-items:center;gap:6px;color:var(--text-2)}
html:root body .dsh-rg input{min-height:36px;padding:4px 10px;font-size:0.875rem}

/* แดชบอร์ดบนคอม: กระชับให้เห็นทั้งหมดในจอเดียว */
@media (min-width:960px){
  html:root body .dsh{gap:10px;margin-bottom:12px}
  html:root body .dsh-kpis,html:root body .dsh-row{gap:10px}
  html:root body .dsh-kpi{padding:8px 14px;gap:10px;border-radius:14px}
  html:root body .dsh-ki{width:36px;height:36px;border-radius:10px}
  html:root body .dsh-kpi b{font-size:1.375rem;line-height:1.1}
  html:root body .dsh-card{padding:12px 14px}
  html:root body .dsh-h{margin-bottom:4px}
  html:root body .dsh-donut{width:120px;height:120px}
  html:root body .dsh-dl button{padding:4px}
  html:root body .dsh-tr{padding:6px 4px}
  html:root body .dsh-top button{padding:5px 4px}
  html:root body .dsh-seg button{min-height:32px;padding:5px 12px}
}

/* แถวล่างของแดชบอร์ด 4 ใบ · ตัวเลขค้างในการ์ดประเภทงาน */
html:root body .dsh-mini{grid-template-columns:repeat(4,minmax(0,1fr))}
html:root body .dsh-kpi b small{font-size:.75rem;font-weight:400;color:var(--text-2)}
@media (max-width:959px){html:root body .dsh-mini{grid-template-columns:repeat(2,minmax(0,1fr))}}
