/* การ์ดสถิติกดกรองได้ (.stats > .stat) เหนือตาราง — คู่กับ lib/stat_cards.php; สีตัวเลข/ป้ายของแต่ละการ์ด (.stat.xxx .value/.dot) กำหนดที่หน้า */
.stats { display: flex; gap: 12px; margin-bottom: var(--gap-section); flex-wrap: wrap; }
.stat {
    display: block; color: inherit; text-decoration: none; flex: 1 1 150px; background: var(--card-bg); border: 1px solid var(--border);
    border-radius: var(--radius-box); padding: 14px 16px; cursor: pointer; user-select: none;
}
.stat.active { border-color: var(--accent); }
.stats.filtered .stat:not(.active) { opacity: .55; }
.stat .label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.stat .value { font-size: 24px; font-weight: 700; }
.stat .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: currentColor; }
/* มือถือ (≤768px): กริด 2 คอลัมน์ แถวเตี้ย ป้ายซ้าย/ตัวเลขขวา (เดิมการ์ดละ ~80px) — ข้อความรองในป้ายใส่ <span class="label-sub"> ซ่อนบนมือถือ */
@media (max-width: 768px) {
    .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 9px 12px; }
    .stat .label { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stat .value { font-size: 20px; line-height: 1.2; }
    .stat .label-sub { display: none; }
}
