body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;margin:0;background:#f6f7fb;color:#111}
.wrap{max-width:1200px;margin:24px auto;padding:0 12px}
h1{font-size:20px;margin:0 0 12px}
.bar{display:flex;gap:10px;align-items:center;margin:10px 0 14px}
button{background:#111;color:#fff;border:0;border-radius:10px;padding:10px 14px;cursor:pointer}
button:hover{opacity:.9}
.link{color:#0a58ca;text-decoration:none}
.link:hover{text-decoration:underline}
#error{background:#ffe0e0;border:1px solid #ffb3b3;border-radius:10px;padding:10px 12px;margin:10px 0}
.table-wrap{overflow:auto;background:#fff;border-radius:12px;border:1px solid #e6e7ee}
table{width:100%;border-collapse:collapse;min-width:1100px}
th,td{padding:10px 10px;border-bottom:1px solid #eee;vertical-align:top;font-size:13px}
th{background:#fafbff;text-align:left;position:sticky;top:0;z-index:2}
th.sortable{cursor:pointer}
td.num, th.num{text-align:right;white-space:nowrap}
tfoot td{background:#fafbff;font-weight:700}
.tfoot-label{text-align:right}
.small{font-size:12px;color:#555;margin-top:10px}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}

.filters{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0 14px;}
.filter{display:flex;flex-direction:column;gap:6px;}
#sdStatusFilter{min-width:260px;min-height:90px;}

.totals{margin-top:12px;font-weight:600;}
.totals span{margin-right:18px;}


/* Accordion by city */
.city-acc{margin-top:14px}
.city-acc details{border:1px solid #e6e6e6;border-radius:10px;margin:10px 0;background:#fff}
.city-acc summary{cursor:pointer;padding:12px 14px;font-weight:700;list-style:none;display:flex;justify-content:space-between;gap:10px}
.city-acc summary::-webkit-details-marker{display:none}
.city-acc .meta{font-weight:500;color:#444}
.city-acc .inside{padding:0 14px 14px 14px}
.city-acc table.tbl{margin-top:10px}


/* Critical highlight for Reason column */
.reason-badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:700;vertical-align:middle}
.reason-critical{background:#ffe1e1;color:#8b0000}
.reason-warn{background:#fff3cd;color:#7a5d00}
.reason-note{margin-left:8px;font-size:12px;color:#444;opacity:.9}


.btn-mini{padding:6px 10px;border:1px solid #cfcfcf;border-radius:8px;background:#fff;cursor:pointer;font-size:12px;white-space:nowrap;}
.btn-mini:disabled{opacity:.6;cursor:not-allowed;}

.btn-warn{background:#f5d0d0;border-color:#e6a5a5;}
.btn-warn:hover{background:#f1bebe;}
