:root {
  --bg: #0f1419; --panel: #161d24; --line: #26313b; --text: #e6edf3; --muted: #8b98a5;
  --green: #22c55e; --red: #ef4444; --amber: #f59e0b; --bluegray: #64748b; --gray: #4b5563; --blue: #3b82f6;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
header { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 16px; }
.strip { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; }
.me { color: var(--muted); font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); display: inline-block; }
.s-healthy .dot, .s-running .dot, .s-online .dot, .s-active .dot { background: var(--green); }
.s-failing .dot, .s-offline .dot { background: var(--red); }
.s-stalled .dot, .s-not_loaded .dot, .s-late .dot { background: var(--amber); }
.s-gated .dot { background: var(--bluegray); }
.s-retired .dot, .s-off .dot, .s-expired .dot, .s-revoked .dot { background: var(--gray); }
.banner { padding: 8px 18px; background: #1e293b; border-bottom: 1px solid var(--line); color: #cbd5e1; }
.banner.risk { background: #3a2a0a; color: #fcd34d; }
nav { display: flex; gap: 4px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
nav button { background: none; border: 1px solid transparent; color: var(--muted); padding: 6px 12px; border-radius: 6px; cursor: pointer; }
nav button.active { color: var(--text); border-color: var(--line); background: var(--panel); }
main { padding: 14px 18px; }
.hidden { display: none !important; }
.filters { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
input, select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
button { background: var(--blue); color: white; border: 0; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.danger { background: var(--red); }
button:disabled { opacity: .4; cursor: not-allowed; }
table.jobs { width: 100%; border-collapse: collapse; }
table.jobs th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); }
table.jobs td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.job { cursor: pointer; }
tr.job:hover { background: #121a21; }
tr.detail td { background: var(--panel); }
.name { font-weight: 600; }
.sub { color: var(--muted); font-size: 12px; }
.crit { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #1f2937; color: var(--muted); margin-left: 6px; }
.crit.p0 { background: #3b1414; color: #fca5a5; }
.managed { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #1e3a5f; color: #93c5fd; }
.switch { position: relative; width: 38px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--gray); border-radius: 22px; transition: .15s; cursor: pointer; }
.slider:before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: .15s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(16px); }
.switch input:disabled + .slider { opacity: .35; cursor: not-allowed; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 15px; }
.card label { display: block; margin: 6px 0; }
.card label.inline { display: flex; gap: 6px; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 10px; font-size: 13px; }
.kv div:nth-child(odd) { color: var(--muted); }
.muted { color: var(--muted); }
pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; white-space: pre-wrap; font-size: 12px; }
code { background: #0b1016; padding: 1px 5px; border-radius: 4px; word-break: break-all; }
ul.rules { margin: 4px 0 0 18px; padding: 0; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; max-width: 520px; }
dialog::backdrop { background: rgba(0,0,0,.6); }
menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; }
.toast { position: fixed; bottom: 18px; right: 18px; background: var(--panel); border: 1px solid var(--line); padding: 10px 14px; border-radius: 8px; max-width: 420px; }
.secret-once { background: #0b2a17; border: 1px solid #14532d; padding: 10px; border-radius: 8px; margin-top: 10px; }
table.mini { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
table.mini td, table.mini th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
