/* Dashboards (organisation home and platform console). Uses the colours and type already set in site.css. */
.dash-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.dash-head h1 { font-size: 22px; font-weight: 800; }
.dash-head .muted { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
a.tile:hover { border-color: var(--primary); color: var(--ink); }
.tile-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.tile-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 13px; color: var(--muted); }
.tile-flag { border-left: 4px solid var(--amber); }
.tile-bad { border-left: 4px solid #D2493B; }
.tile-good { border-left: 4px solid var(--primary); }

.dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head a { font-size: 13px; font-weight: 700; }

/* Billed against collected: one pair of bars per month. */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding: 8px 4px 0; border-bottom: 1px solid var(--border); }
.chart-month { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.chart-pair { display: flex; align-items: flex-end; gap: 4px; width: 100%; flex: 1; justify-content: center; }
.bar { width: 42%; max-width: 30px; min-height: 2px; border-radius: 5px 5px 0 0; }
.bar-billed { background: #B7D4CC; }
.bar-collected { background: var(--primary); }
.chart-labels { display: flex; gap: 14px; padding: 6px 4px 0; }
.chart-labels span { flex: 1 1 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-top: 1px solid #E5EAE8; font-size: 14px; }
.rows li:first-child { border-top: 0; }
.rows .who { font-weight: 700; min-width: 0; }
.rows .who small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.rows .amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.rows .amt small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.rows-empty { color: var(--muted); font-size: 14px; padding: 6px 0; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--ok-bg); color: var(--ok-fg); }
.pill-warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill-bad { background: var(--bad-bg); color: var(--bad-fg); }

.meters { display: flex; flex-direction: column; gap: 14px; }
.meter-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; }
.meter-top span:first-child { font-weight: 700; }
.meter { height: 8px; border-radius: 99px; background: #E5EAE8; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.meter.meter-high > i { background: var(--amber); }
.meter.meter-full > i { background: #D2493B; }

.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; background: var(--warn-bg); color: var(--warn-fg); border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.banner a { font-weight: 700; color: inherit; }

@media (max-width: 640px) { .dash-cols { grid-template-columns: 1fr; } .tile-value { font-size: 24px; } }
