:root {
  --primary:#1B4332; --accent:#40916C; --highlight:#D4A017;
  --bg:#F4F7F6; --card:#FFFFFF; --border:#E5E7EB; --text:#1A1A2E; --muted:#6B7280;
  --metric-bg:#E8F4F1;
}
* { box-sizing:border-box; }
body { margin:0; font-family:-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--text); }
.wrap { max-width:1180px; margin:0 auto; padding:24px; }
.header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.header h1 { font-size:22px; font-weight:700; margin:0; }
.header img { height:42px; }
.controls { display:flex; gap:8px; align-items:center; }
.controls input,.controls select { padding:7px 10px; border:1px solid var(--border);
  border-radius:8px; font-size:13px; background:#fff; }
.btn { background:var(--primary); color:#fff; border:none; padding:8px 14px;
  border-radius:8px; font-size:13px; cursor:pointer; text-decoration:none; }
.metrics { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:14px; margin-bottom:22px; }
.metric { background:var(--metric-bg); border:1px solid var(--border); border-radius:12px;
  padding:16px; text-align:left; }
.metric .label { font-size:12px; color:var(--muted); margin-bottom:6px; }
.metric .value { font-size:28px; font-weight:700; color:var(--primary); }
.card { background:var(--card); border:1px solid var(--border); border-radius:12px;
  padding:18px; margin-bottom:22px; }
.card h2 { font-size:14px; font-weight:700; margin:0 0 12px; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th { text-align:right; color:var(--muted); font-weight:600; padding:10px 12px;
  border-bottom:2px solid var(--border); }
th:first-child,td:first-child { text-align:left; }
td { text-align:right; padding:10px 12px; border-bottom:1px solid var(--border); }
tr:nth-child(even) td { background:#FAFBFB; }
.login-box { max-width:340px; margin:120px auto; background:#fff; padding:32px;
  border:1px solid var(--border); border-radius:14px; }
.login-box input { width:100%; padding:10px; margin-bottom:12px; border:1px solid var(--border);
  border-radius:8px; }
.error { color:#B91C1C; font-size:13px; margin-bottom:10px; }
.flash { padding:10px 14px; border-radius:8px; margin-bottom:14px; font-size:13px; }
.flash.success { background:#DCFCE7; color:#166534; }
.flash.error { background:#FEE2E2; color:#991B1B; }
canvas { max-height:320px; }

/* Performance table: show ~15 rows, then scroll. Header stays put. */
.table-scroll { max-height:620px; overflow-y:auto; }
.table-scroll thead th { position:sticky; top:0; background:var(--card); z-index:1; }

/* Multi-select pharmacy filter for charts */
.ph-filter { position:relative; }
.ph-filter summary { list-style:none; cursor:pointer; }
.ph-filter summary::-webkit-details-marker { display:none; }
.ph-filter-menu { position:absolute; right:0; z-index:5; margin-top:6px; min-width:240px;
  max-height:320px; overflow-y:auto; background:#fff; border:1px solid var(--border);
  border-radius:10px; padding:10px 12px; box-shadow:0 6px 24px rgba(0,0,0,.12); }
.ph-filter-menu label { display:block; font-size:13px; padding:4px 0; cursor:pointer; }
.ph-filter-menu input { margin-right:6px; }
.tabs { display:flex; gap:4px; border-bottom:2px solid #E5E7EB; margin-bottom:16px; }
.tabs .tab { padding:10px 20px; text-decoration:none; color:var(--muted);
  font-weight:600; border-bottom:3px solid transparent; margin-bottom:-2px; }
.tabs .tab.active { color:#1B4332; border-bottom-color:#D4A017; }
.tabs .tab:hover { color:#1B4332; }
