/* ตรวจสอบเวลา · สรุปรายคน (29/9/2569) — ใช้สี/ตัวแปรของหน้า time-daily-review.html (--navy --ok --bad --warn …) */
body:not(.ps-person) [data-ps-only]{display:none!important}
body.ps-person [data-daily-only]{display:none!important}

.ps-switch{display:inline-flex;margin:0 0 14px;border:1px solid #cbd5e1;border-radius:10px;overflow:hidden;background:#fff}
.ps-switch button{height:40px;padding:0 20px;border:0;background:#fff;color:#334155;font-weight:600;font-size:14px}
.ps-switch button+button{border-left:1px solid #cbd5e1}
.ps-switch button:hover{background:#f8fafc}
.ps-switch button[aria-pressed="true"]{background:var(--navy);color:#fff}
.ps-switch button:focus-visible,.ps-sort:focus-visible,.ps-who:focus-visible{outline:3px solid #2563eb;outline-offset:-3px}

.ps-view{margin-top:16px}
.ps-progress{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 12px;padding:10px 14px;border:1px solid #b2ddff;border-radius:12px;background:#eff5ff;color:#175cd3;font-size:13px}
.ps-progress[hidden]{display:none!important}
.ps-bar{flex:1 1 220px;height:8px;border-radius:999px;background:#d1e0ff;overflow:hidden}
.ps-bar i{display:block;width:0;height:100%;background:#175cd3;transition:width .3s}
.ps-stale{margin:0 0 12px;padding:9px 13px;border:1px solid var(--warnline);border-left:4px solid var(--warn);border-radius:10px;background:var(--warnbg);color:var(--warn);font-size:13px;font-weight:600}
.ps-banner{margin:0 0 12px;padding:9px 13px;border:1px solid var(--line);border-left:4px solid #94a3b8;border-radius:10px;background:var(--soft);color:#475569;font-size:12px}
.ps-banner p{margin:2px 0}
.stat.info strong{color:#175cd3}

.ps-wrap{max-height:calc(100vh - 250px)}
table.ps-table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px}
.ps-table thead th{position:sticky;z-index:3;padding:0 8px;border-bottom:1px solid #33405c;background:var(--navy2);color:#fff;font-weight:600;text-align:center;white-space:nowrap}
.ps-table thead tr.ps-g th{top:0;height:30px;color:#c7d2e5;font-size:11px;letter-spacing:.02em}
.ps-table thead tr.ps-h th{top:30px;height:40px;font-size:12px}
.ps-table thead tr.ps-g th.empcol,.ps-table thead tr.ps-g th.ps-statuscol{height:70px}
.ps-table thead th.empcol{left:0;z-index:5;min-width:240px;width:240px;text-align:left}
.ps-table thead th.empcol small{display:block;margin-top:1px;color:#9fb0cc;font-size:10px;font-weight:400}
.ps-table thead th.ps-statuscol{min-width:160px}
.ps-table thead th.g-pay,.ps-table thead th.g-ot{background:#22324d}
.ps-table thead th.g-min{background:#2a2f45}
.ps-sort{padding:4px 2px;border:0;background:none;color:inherit;font:inherit;font-weight:600;cursor:pointer}
.ps-sort:hover,.ps-sort.on{text-decoration:underline;text-underline-offset:3px}

.ps-table tbody th.empcol{position:sticky;left:0;z-index:2;padding:0;border-right:1px solid var(--line);border-bottom:1px solid #eef2f6;background:#fff;font-weight:400;text-align:left}
.ps-who{display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.ps-who .who strong{display:block;font-size:13px;line-height:1.25}
.ps-who .who small{display:block;color:var(--muted);font-size:11px}
.ps-caret{flex:0 0 12px;color:#94a3b8;font-size:12px}
.ps-table td{padding:8px;border-right:1px solid #f1f5f9;border-bottom:1px solid #eef2f6;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.ps-table td.zero{color:#cbd5e1}
.ps-table td.ok{color:var(--ok);font-weight:600}
.ps-table td.bad{color:var(--bad);font-weight:700}
.ps-table td.warn{color:var(--warn);font-weight:600}
.ps-table td.muted{color:#64748b;font-weight:600}
.ps-table td.leave{color:#6d28d9;font-weight:600}
.ps-table td.strong{background:#fbfcfe;color:var(--ink);font-weight:700}
.ps-table tbody tr.ps-row:hover th,.ps-table tbody tr.ps-row:hover td,.ps-table tbody tr.ps-row.open th,.ps-table tbody tr.ps-row.open td{background:#f8fafc}
.ps-table td.ps-status{text-align:left}
.ps-status small{display:block;margin-top:2px;color:var(--muted);font-size:11px}
.ps-pill{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.ps-pill.ok{background:var(--okbg);color:var(--ok)}
.ps-pill.bad{background:var(--badbg);color:var(--bad)}
.ps-pill.muted{background:#f1f5f9;color:#475569}
.ps-pill.info{background:#eff5ff;color:#175cd3}
.ps-table tfoot th,.ps-table tfoot td{position:sticky;bottom:0;z-index:2;border-top:2px solid #cbd5e1;background:#f1f5f9;font-weight:700}
.ps-table tfoot th.empcol{left:0;z-index:4;padding:9px 10px;text-align:left}
.ps-table tfoot td.ps-status{font-size:12px;white-space:normal}

.ps-detail-row td{padding:0;background:#fbfcfe;text-align:left;white-space:normal}
.ps-detail{position:sticky;left:0;box-sizing:border-box;max-width:min(1100px,calc(100vw - 60px));padding:12px 16px 14px 40px;font-size:13px;line-height:1.6}
.ps-d{margin:0 0 6px;color:#334155}
.ps-d b{margin-right:6px}
.ps-d small{color:var(--muted)}
.ps-d ul{margin:2px 0 0;padding-left:20px}
.ps-d.bad b{color:var(--bad)}
.ps-d.warn b{color:var(--warn)}
.ps-d.muted b{color:#475569}
.ps-d.info b{color:#175cd3}
.ps-d.leave b{color:#6d28d9}
.ps-d.ok b{color:var(--ok)}
.ps-actions{margin-top:10px}
.ps-dot{display:inline-block;width:9px;height:9px;margin-right:5px;border-radius:50%;vertical-align:middle}
.ps-dot.ok{background:var(--ok)}
.ps-dot.bad{background:var(--bad)}
.ps-dot.muted{background:#94a3b8}
.ps-dot.info{background:#175cd3}

/* 30/9/2569 รอบ 3: ตาราง "Matrix รหัส" แยกเป็นหน้า time-code-matrix.html (รหัสมาตรฐาน 14 รหัสของเจ้าของ) · หน้าตรวจสอบเวลามีปุ่มไปหน้านั้น */
a.btn{display:inline-flex;align-items:center;text-decoration:none}
.ps-link{background:#eef2f8;border-color:#94a3b8;color:var(--navy)}
.stat.night strong{color:#5925dc}
table.ps-mx{width:auto;min-width:100%}
.ps-mx thead tr.ps-g th.g-days{border-left:1px solid #33405c}
.ps-mx thead tr.ps-h th.d{min-width:32px;width:32px;padding:0 1px;line-height:1.15}
.ps-mx thead tr.ps-h th.d b{display:block;font-size:12px}
.ps-mx thead tr.ps-h th.d small{display:block;color:#9fb0cc;font-size:10px;font-weight:400}
.ps-mx thead tr.ps-h th.d.today{background:#2d3a57}
.ps-mx thead tr.ps-h th.s{min-width:48px;white-space:normal;line-height:1.2}
.ps-mx td.c{min-width:32px;width:32px;padding:7px 1px;border-right:1px solid #fff;text-align:center;font-size:11px;font-weight:700;letter-spacing:-.02em;cursor:default}
.ps-mx td.c.w{box-shadow:inset 0 -3px 0 #f79009}
.ps-mx tbody tr.ps-row:hover td.c{filter:brightness(.97)}
.ps-mx th.tdp,.ps-mx td.tdp{position:sticky;right:0;box-shadow:-1px 0 0 #cbd5e1}
.ps-mx thead th.tdp{z-index:4;min-width:78px;background:#22324d}
.ps-mx tbody td.tdp{z-index:1;background:#f6fef9;color:var(--ok)}
.ps-mx tfoot td.tdp{z-index:3}
.ps-table td.night{color:#5925dc;font-weight:600}
/* สีรหัส: ในตารางต้องชนะพื้นของแถวที่ชี้/เปิดอยู่ (ความเจาะจง 0,4,3 > 0,3,3) */
.k-work,.ps-mx tbody tr.ps-row td.c.k-work{background:#ecfdf3;color:#067647}
.k-night,.ps-mx tbody tr.ps-row td.c.k-night{background:#f4f3ff;color:#5925dc}
.k-rt,.ps-mx tbody tr.ps-row td.c.k-rt{background:#e0f2fe;color:#026aa2}
.k-pw,.ps-mx tbody tr.ps-row td.c.k-pw{background:#ccfbef;color:#0e7c66}
.k-na,.ps-mx tbody tr.ps-row td.c.k-na{background:#fffaeb;color:#b54708}
.k-off,.ps-mx tbody tr.ps-row td.c.k-off{background:#f1f5f9;color:#475569}
.k-rd,.ps-mx tbody tr.ps-row td.c.k-rd{background:#fdf2fa;color:#c11574}
.k-leave,.k-half,.ps-mx tbody tr.ps-row td.c.k-leave,.ps-mx tbody tr.ps-row td.c.k-half{background:#eff8ff;color:#175cd3}
.k-unpaid,.ps-mx tbody tr.ps-row td.c.k-unpaid{background:#fef3f2;color:#b42318}
.k-x,.ps-mx tbody tr.ps-row td.c.k-x{background:#fee4e2;color:#b42318}
.k-wait,.ps-mx tbody tr.ps-row td.c.k-wait{background:#fff;color:#175cd3}
.k-out,.ps-mx tbody tr.ps-row td.c.k-out{background:#f8fafc;color:#98a2b3;font-weight:400!important}
.k-later{background:#fff;color:#98a2b3;border:1px dashed #cbd5e1}
.ps-code-legend{gap:10px 14px}
.ps-code-legend .k{display:inline-block;min-width:30px;margin-right:5px;padding:1px 5px;border-radius:5px;font-size:11px;font-weight:700;text-align:center}

@media(max-width:820px){
  .ps-switch{display:flex}
  .ps-switch button{flex:1}
  .ps-table thead th.empcol,.ps-table tbody th.empcol{min-width:168px;width:168px}
  .ps-detail{padding-left:16px}
  /* Matrix รหัสบนมือถือ: ชื่อแคบลง · Total Day Payment ไม่ติดขวา — เห็นช่องรายวันมากขึ้น (ผลตรวจรอบ 3 ข้อ 10) */
  .ps-mx thead th.empcol,.ps-mx tbody th.empcol{min-width:132px;width:132px;max-width:132px;white-space:normal}
  .ps-mx .ps-who{gap:4px;padding:6px}
  .ps-mx .ps-who .who{min-width:0;overflow-wrap:anywhere}
  .ps-mx th.tdp,.ps-mx td.tdp{position:static;box-shadow:none}
}
