body { font-family: 'Sarabun', system-ui, sans-serif; background: #f4f5f7; font-size: 15px; }
.card { border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.stat .num { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat .lbl { color: #6c757d; font-size: .9rem; }
.table thead th { white-space: nowrap; font-weight: 600; background: #f8f9fa; }
.table td, .table th { vertical-align: middle; }
.num-col { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grid-att td { padding: .25rem .3rem; text-align: center; font-size: .8rem; min-width: 34px; }
.grid-att th.sticky, .grid-att td.sticky { position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; min-width: 180px; }
/* สีสถานะ — ใช้ --bs-table-bg เพื่อไม่ให้สีพื้นของตาราง Bootstrap ทับ (ใช้ได้ทั้งกับ td และ tr) */
.c-present      { --bs-table-bg: #c9ecd6; background-color: #c9ecd6; color: #146c43; }
.c-late         { --bs-table-bg: #ffe69c; background-color: #ffe69c; color: #8a5a00; }
.c-absent       { --bs-table-bg: #f5c2c7; background-color: #f5c2c7; color: #a3001b; }
.c-leave        { --bs-table-bg: #b6effb; background-color: #b6effb; color: #055160; }
.c-holiday_work { --bs-table-bg: #c5d9fc; background-color: #c5d9fc; color: #084298; }
.c-holiday, .c-dayoff { --bs-table-bg: #eef0f2; background-color: #eef0f2; color: #9aa1a8; }
.c-dayoff_q     { --bs-table-bg: #e2d9f3; background-color: #e2d9f3; color: #59359a; }
.c-closed       { --bs-table-bg: #6c757d; background-color: #6c757d; color: #fff; }
.c-pending, .c-future, .c-na { --bs-table-bg: #fff; background-color: #fff; color: #ced4da; }
.grid-att td.c-present, .grid-att td.c-late, .grid-att td.c-absent, .grid-att td.c-leave, .grid-att td.c-holiday_work { font-weight: 700; }
@media print { .c-dayoff_q, .c-closed, .c-present, .c-late, .c-absent, .c-leave, .c-holiday_work, .c-holiday, .c-dayoff, .legend span { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.legend span { display: inline-block; padding: 2px 8px; border-radius: 4px; margin-right: 6px; font-size: .85rem; }
code.key { user-select: all; }
@media print {
  body { background: #fff; font-size: 13px; }
  .card { box-shadow: none; }
  main { padding: 0 !important; }
  .payslip { page-break-after: always; }
}
