:root{--health-surface:#f6f8fc;--health-border:#e0e7f1;--health-text:#172741;--health-muted:#526781;--health-green:#137d5b;--health-green-bg:#e3f3eb;--health-yellow:#98640c;--health-yellow-bg:#fff1d4;--health-red:#bb344a;--health-red-bg:#fce7eb;--health-orange:#a75511;--health-orange-bg:#fff0df;--health-gray:#67768b;--health-gray-bg:#e9edf3}
[data-theme=dark]{--health-surface:#142037;--health-border:#34445e;--health-text:#edf3ff;--health-muted:#b0c1d9;--health-green:#6ee0b2;--health-green-bg:#173c34;--health-yellow:#f7d67b;--health-yellow-bg:#3b321c;--health-red:#ff9eac;--health-red-bg:#442737;--health-orange:#ffbd80;--health-orange-bg:#45301f;--health-gray:#b6c4d7;--health-gray-bg:#26344c}
.health-demo-note{display:flex;gap:16px;align-items:center;justify-content:space-between;border:1px solid var(--health-border);background:var(--health-surface);color:var(--health-text);border-radius:16px;padding:16px 20px;margin:0 0 24px}.health-demo-note p{margin:4px 0 0;color:var(--health-muted);font-size:13px;line-height:1.6}.health-demo-note strong{font-size:14px}.health-demo-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.health-demo-actions a,.health-demo-actions button,.health-text-button{font:inherit;border:0;color:var(--health-text);background:none;text-decoration:none;cursor:pointer}.health-demo-actions a,.health-demo-actions button{border:1px solid var(--health-border);border-radius:9px;padding:8px 12px;font-size:13px;white-space:nowrap}.health-demo-actions a:hover,.health-demo-actions button:hover{background:var(--health-gray-bg)}
.model-health{border:1px solid var(--health-border);background:var(--health-surface);padding:15px;border-radius:12px;color:var(--health-text);margin:14px 0}.health-widget-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.health-text-button{font-size:12px;color:var(--health-muted);padding:5px 0}.health-text-button:hover{text-decoration:underline}.health-badge{display:inline-flex;align-items:center;gap:6px;border-radius:7px;padding:5px 8px;font-size:12px;line-height:1.2;font-weight:650;white-space:nowrap}.health-badge i{width:6px;height:6px;border-radius:50%;background:currentColor}.health-healthy{color:var(--health-green);background:var(--health-green-bg)}.health-degraded{color:var(--health-yellow);background:var(--health-yellow-bg)}.health-down{color:var(--health-red);background:var(--health-red-bg)}.health-limited{color:var(--health-orange);background:var(--health-orange-bg)}.health-unknown,.health-insufficient,.health-disabled{color:var(--health-gray);background:var(--health-gray-bg)}
.health-widget-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:15px 0 17px}.health-widget-stats span,.health-detail-metrics span{font-size:11px;color:var(--health-muted);display:block;line-height:1.6}.health-widget-stats strong{display:block;font-size:18px;margin-top:3px;line-height:1.35}.health-widget-stats small{display:block;font-weight:400;font-size:10px;color:var(--health-muted);margin-top:4px}.health-history{display:grid;grid-template-columns:repeat(48,minmax(0,1fr));gap:3px;isolation:isolate}.health-segment{position:relative;height:19px;border-radius:2px;cursor:help;outline-offset:2px}.health-segment.health-healthy{background:var(--health-green)}.health-segment.health-degraded{background:var(--health-yellow)}.health-segment.health-down{background:var(--health-red)}.health-segment.health-limited{background:var(--health-orange)}.health-segment.health-unknown{background:var(--health-border)}.health-tooltip{display:none;position:absolute;bottom:26px;left:50%;transform:translateX(-50%);padding:8px 10px;background:var(--health-text);color:var(--health-surface);border-radius:6px;font-size:11px;line-height:1.6;white-space:nowrap;z-index:10;box-shadow:0 4px 20px #0002}.health-segment:nth-child(-n+10) .health-tooltip{left:0;transform:none}.health-segment:nth-child(n+39) .health-tooltip{left:auto;right:0;transform:none}.health-segment:hover .health-tooltip,.health-segment:focus .health-tooltip{display:block}.health-history-caption{display:flex;justify-content:space-between;color:var(--health-muted);font-size:10px;margin-top:8px;gap:10px}
.health-detail{color:var(--health-text);min-width:0}.health-detail-title{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.health-detail-title code{overflow-wrap:anywhere;font-size:13px}.health-muted{color:var(--health-muted)!important;font-size:13px;line-height:1.7;margin:12px 0}.health-detail h3{font-size:14px;margin:24px 0 12px}.health-detail-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:22px 0}.health-detail-metrics>div{background:var(--health-surface);border:1px solid var(--health-border);border-radius:10px;padding:14px}.health-detail-metrics strong{display:block;font-size:20px;margin-top:6px}.health-breakdown{display:flex;flex-wrap:wrap;gap:8px}.health-breakdown span{background:var(--health-surface);border:1px solid var(--health-border);border-radius:8px;padding:8px 12px;font-size:12px}.health-breakdown b{margin-left:10px}.health-samples>div{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:12px;border-bottom:1px solid var(--health-border);padding:11px 0;font-size:12px;line-height:1.5}.health-samples time,.health-samples span{color:var(--health-muted)}
.health-admin-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:20px 0}.health-admin-summary>button{text-align:left;border:1px solid var(--health-border);border-radius:12px;background:var(--health-surface);padding:16px;cursor:pointer;color:var(--health-text)}.health-admin-summary>button.active{outline:2px solid #3866ee;outline-offset:1px}.health-admin-summary strong{display:block;font-size:28px;margin-top:10px}.health-admin-summary small{color:var(--health-muted)}.health-admin-table{min-width:1080px}.health-admin-table .health-history{width:190px;gap:2px}.health-admin-table .health-segment{height:22px}.health-admin-table th,.health-admin-table td{vertical-align:middle!important}.health-admin-table code{font-size:12px;overflow-wrap:anywhere}.health-admin-table td:first-child{max-width:290px}.health-admin-table td:first-child strong{display:block}.health-admin-table .health-cell{white-space:nowrap;color:var(--health-text)}.health-rule-note{font-size:13px;color:var(--health-muted);line-height:1.8}.health-demo-simulation{padding:16px;border:1px solid var(--health-border);background:var(--health-surface);border-radius:12px;margin:16px 0}.health-demo-simulation strong{display:block;margin-bottom:10px}.health-demo-simulation>div{display:flex;gap:8px;flex-wrap:wrap}.health-demo-simulation button{font:inherit;font-size:12px;padding:8px 10px;border:1px solid var(--health-border);border-radius:7px;background:transparent;color:var(--health-text);cursor:pointer}.health-demo-simulation button:hover{background:var(--health-gray-bg)}.health-demo-simulation button:disabled{opacity:.5;cursor:wait}.health-admin-filter{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:18px}.health-admin-filter .field{flex:1;min-width:160px}.health-admin-filter .field:first-child{flex:2}.health-admin-status{font-size:12px;color:var(--health-muted)}.health-legend{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.health-legend .health-badge{font-weight:400}
.health-admin-summary{grid-template-columns:repeat(6,minmax(0,1fr))}.health-admin-table th:last-child,.health-admin-table td:last-child{position:sticky;right:0;background:var(--surface);box-shadow:-5px 0 8px #0000000a;z-index:1}.health-admin-table th:last-child{background:var(--inset)}
dialog#modal:has(.health-detail),dialog:has(.health-detail){width:min(780px,calc(100vw - 32px));max-width:none;max-height:90vh}.health-detail-metrics strong{overflow-wrap:anywhere}
@media(max-width:700px){.health-demo-note{align-items:flex-start;flex-direction:column;padding:14px;gap:10px}.health-admin-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.health-admin-summary>button{padding:12px}.health-admin-summary strong{font-size:24px}.health-detail-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.health-samples>div{grid-template-columns:1fr 1fr}.health-samples time{grid-column:1/-1}.health-history{gap:2px}.health-widget-stats{gap:6px}.health-widget-stats strong{font-size:17px}.health-tooltip{font-size:10px}.health-detail-title code{width:100%}.health-admin-filter .field{min-width:130px}}
