:root {
  --bg: #eef2f4; --card: #fff; --text: #333; --muted: #6a737f; --line: #dfe3e8;
  --primary: #2fc6f6; --primary-d: #11a9d9; --danger: #e5484d; --success: #3bc8a0; --warn-bg: #fff4d6; --warn: #8a5a00;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
h1 { font-size: 20px; margin: 0; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 10px; font-weight: 600; }
.top { background: var(--card); border-bottom: 1px solid var(--line); padding: 14px 16px 0; position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.pill { padding: 3px 10px; border-radius: 99px; font-size: 12px; background: #e8ecef; color: var(--muted); }
.pill.on { background: #dff7ee; color: #16795a; }
.pill.off { background: #fde8e8; color: #b42318; }
.banner { margin-top: 10px; padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.banner-warn { background: var(--warn-bg); color: var(--warn); }
.tabs { display: flex; gap: 4px; margin-top: 10px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 12px; font: inherit; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--primary); font-weight: 600; }
main { padding: 16px; max-width: 1100px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card.fatal { border-left: 4px solid var(--danger); }
.muted { color: var(--muted); margin: 0 0 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.row.right { justify-content: flex-end; }
.grow { flex: 1; margin: 0; }
.lbl { display: block; margin: 12px 0 4px; color: var(--muted); font-size: 13px; }
.check { display: flex; gap: 6px; align-items: center; margin: 10px 0; cursor: pointer; }
input, select { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-width: 0; }
input[type=number] { width: 110px; }
#notifySearch, #accessSearch { width: 280px; max-width: 100%; }
.btn { font: inherit; border: 0; border-radius: 6px; padding: 8px 14px; background: var(--primary); color: #fff; cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--primary-d); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-outline:hover { background: #f5f7f8; }
.btn-danger { background: var(--danger); font-size: 15px; padding: 10px 18px; }
.btn-danger:hover { background: #c9373c; }
.btn-danger-outline { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
.btn-success { background: var(--success); }
.btn-success:hover { background: #2aa985; }
.btn-link { background: none; border: 0; color: #1a73e8; cursor: pointer; padding: 0; font: inherit; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.chip { background: #e9f7fd; border: 1px solid #bfe9f9; border-radius: 99px; padding: 3px 6px 3px 10px; display: inline-flex; gap: 6px; align-items: center; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; }
.results { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; max-width: 420px; }
.results button { text-align: left; background: #f7f9fa; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; cursor: pointer; font: inherit; }
.results button:hover { background: #eef6fb; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.tbl select, .tbl input { width: 100%; min-width: 160px; }
.tbl tr.err td { background: #fff5f5; }
.tbl tr.warn td { background: #fffaf0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list li .grow { flex: 1; }
.tag { font-size: 12px; background: #e8ecef; border-radius: 4px; padding: 1px 6px; color: var(--muted); }
.job { margin-top: 10px; padding: 10px; background: #f5f7f8; border-radius: 6px; }
.msg-ok { color: #16795a; } .msg-err { color: #b42318; } .msg-warn { color: var(--warn); }
ul.msgs { margin: 8px 0 0; padding-left: 18px; }
code, .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: #f1f3f5; padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: var(--radius); padding: 18px; max-width: 460px; width: 100%; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 30; max-width: calc(100% - 32px); }
.toast.err { background: var(--danger); }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  main { padding: 12px; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
}
