/* PBIS dashboard (ย้ายมาจาก bma2569/pbis/public/assets/app.css) — ทุก selector อยู่ใต้ .pbis เพื่อไม่ให้กระทบธีมหลักของ monitor2 */
.pbis{font-family:'Sarabun','Segoe UI',Tahoma,sans-serif;color:var(--ink);line-height:1.5}
.pbis h2,.pbis h3{margin:0;font-weight:700}
.pbis{
  --green-dk:#0b3d2e; --green:#0f5c3f; --green-lt:#e6f0ea;
  --gold:#c9a227; --gold-lt:#f4e9c9; --cream:#faf7ee;
  --ink:#1c2521; --ink-soft:#5c6b63; --line:#d9d2bd; --white:#ffffff;
  --red:#a13a2e; --shadow:0 2px 10px rgba(11,61,46,.08);
}
.pbis .eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;letter-spacing:.06em;color:var(--gold-lt);background:rgba(255,255,255,.08);padding:4px 12px;border-radius:100px;margin-bottom:12px;border:1px solid rgba(201,162,39,.35)}
.pbis .eyebrow .dot{width:6px;height:6px;border-radius:50%;background:var(--gold)}
.pbis .kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin-bottom:22px}
.pbis .kpi-card{background:var(--white);border-radius:14px;padding:16px 18px;box-shadow:var(--shadow);border-top:3px solid var(--gold);min-height:72px}
.pbis .kpi-card.skeleton{background:linear-gradient(90deg,#fff,#f3efe0,#fff);background-size:200% 100%;animation:shine 1.2s infinite}
@keyframes shine{0%{background-position:200% 0}100%{background-position:-200% 0}}
.pbis .kpi-card .label{font-size:12.5px;color:var(--ink-soft);font-weight:600;letter-spacing:.02em}
.pbis .kpi-card .value{font-size:22px;font-weight:700;color:var(--green-dk);margin-top:6px;font-variant-numeric:tabular-nums}
.pbis .kpi-card .foot{font-size:12px;color:var(--ink-soft);margin-top:4px}
.pbis .panel{background:var(--white);border-radius:16px;padding:18px 20px;box-shadow:var(--shadow);margin-bottom:18px}
.pbis .panel h2{font-size:16.5px;color:var(--green-dk);margin-bottom:14px;display:flex;align-items:center;gap:8px}
.pbis .panel h2::before{content:"";width:5px;height:16px;background:var(--gold);border-radius:3px;display:inline-block}
.pbis .grid-2{display:grid;grid-template-columns:1.3fr 1fr;gap:18px}
@media (max-width:900px){
  .pbis .grid-2{grid-template-columns:1fr}
}
.pbis .chart-wrap{position:relative;height:300px}
.pbis .chart-wrap.tall{height:380px}
.pbis .crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:16px;font-size:14px}
.pbis .crumbs .seg{background:var(--green-lt);color:var(--green-dk);padding:6px 12px;border-radius:100px;cursor:pointer;font-weight:600;border:1px solid transparent}
.pbis .crumbs .seg:hover{border-color:var(--gold)}
.pbis .crumbs .seg.current{background:var(--green-dk);color:var(--white)}
.pbis .crumbs .sep{color:var(--ink-soft)}
.pbis .tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.pbis .tile{background:var(--cream);border:1px solid var(--line);border-radius:12px;padding:14px 16px;cursor:pointer;transition:.15s}
.pbis .tile:hover{border-color:var(--gold);box-shadow:var(--shadow);transform:translateY(-1px)}
.pbis .tile .t-name{font-weight:700;color:var(--ink);font-size:14.5px;margin-bottom:8px;min-height:38px}
.pbis .tile .t-row{display:flex;justify-content:space-between;font-size:12.5px;color:var(--ink-soft);padding:2px 0}
.pbis .tile .t-row b{color:var(--green-dk);font-variant-numeric:tabular-nums}
.pbis .tile .t-bar{height:6px;background:var(--line);border-radius:4px;margin-top:8px;overflow:hidden}
.pbis .tile .t-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--gold),var(--green))}
.pbis .table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px}
.pbis table{width:100%;border-collapse:collapse;font-size:13.5px;min-width:720px}
.pbis thead th{background:var(--green-lt);color:var(--green-dk);text-align:right;padding:10px 12px;font-weight:700;white-space:nowrap;position:sticky;top:0}
.pbis thead th:first-child,.pbis thead th:nth-child(2),.pbis thead th:nth-child(3){text-align:right}
.pbis tbody td{padding:9px 12px;border-top:1px solid var(--line);vertical-align:top}
.pbis tbody tr:hover{background:var(--cream)}
.pbis .badge{display:inline-block;padding:2px 9px;border-radius:100px;font-size:11.5px;font-weight:700}
.pbis .badge.done{background:#e2f2e6;color:#1c6b3a}
.pbis .badge.progress{background:var(--gold-lt);color:#8a6d0c}
.pbis .num{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.pbis .filter-bar{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px}
.pbis .filter-bar input[type=text]{flex:1;min-width:220px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;font-family:inherit;font-size:14px;background:var(--white)}
.pbis .filter-bar select{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--white);font-family:inherit;font-size:13.5px;color:var(--ink);max-width:220px}
.pbis .filter-bar button.clear{padding:10px 16px;border-radius:10px;border:1px solid var(--line);background:var(--white);cursor:pointer;font-family:inherit;font-size:13.5px;color:var(--ink-soft)}
.pbis .filter-bar button.clear:hover{border-color:var(--red);color:var(--red)}
.pbis .pagination{display:flex;align-items:center;justify-content:space-between;margin-top:12px;font-size:13px;color:var(--ink-soft)}
.pbis .pagination .pg-btns{display:flex;gap:6px}
.pbis .pagination button{border:1px solid var(--line);background:var(--white);border-radius:8px;padding:6px 12px;cursor:pointer;font-family:inherit}
.pbis .pagination button:disabled{opacity:.4;cursor:default}
.pbis .pagination button:not(:disabled):hover{border-color:var(--gold)}
.pbis .note{font-size:12.5px;color:var(--ink-soft);background:var(--green-lt);border-radius:10px;padding:10px 14px;margin-bottom:16px}
.pbis .note b{color:var(--green-dk)}
.pbis .empty{padding:40px 10px;text-align:center;color:var(--ink-soft)}
.pbis #leafletMap{border-radius:16px}
.pbis .leaflet-popup-content-wrapper{border-radius:10px}
.pbis .leaflet-popup-content{font-family:'Sarabun','Segoe UI',Tahoma,sans-serif;margin:12px 14px}
