:root { --bg: #f6f8fa; --fg: #1f2328; --muted: #6b7280; --border: #d9dee5; --brand: #0b7d7c; --brand-2: #0ea5a4; } * { box-sizing: border-box; } body { width: 336px; margin: 0; padding: 10px 10px 12px; background: var(--bg); color: var(--fg); font: 13px/1.5 "Microsoft YaHei", "Segoe UI", system-ui, sans-serif; } header { display: flex; align-items: center; gap: 8px; padding: 2px 2px 10px; } .logo { width: 24px; height: 24px; flex: none; } .title { flex: 1 1 auto; min-width: 0; } h1 { margin: 0; font-size: 13px; font-weight: 600; } .muted { color: var(--muted); } #host { margin: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; } .card .row { display: flex; align-items: center; gap: 6px; font-size: 12px; } .card .row.head { justify-content: space-between; color: var(--muted); } .card .row.head b { color: var(--fg); font-size: 13px; } .card .row + .row { margin-top: 4px; } .badge { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 11px; line-height: 18px; } .badge.ok { background: #e6f7f6; color: var(--brand); } .badge.warn { background: #fff4e5; color: #b45309; } .badge.off { background: #eef0f3; color: var(--muted); } .list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 190px; overflow-y: auto; } .list li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 5px; cursor: pointer; } .list li:hover { background: #eef6f6; } .list li .code { font-family: Consolas, "Courier New", monospace; font-size: 12px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .list li .rule { color: var(--muted); font-size: 10px; flex: none; } .empty { margin: 6px 0 0; font-size: 12px; } .actions { display: flex; gap: 8px; } button { flex: 1 1 0; padding: 7px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--fg); font-size: 12px; cursor: pointer; } button:hover { border-color: var(--brand-2); color: var(--brand); } button.primary { background: var(--brand); border-color: var(--brand); color: #fff; } button.primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; } /* 开关 */ .sw { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; } .sw input { position: absolute; opacity: 0; width: 0; height: 0; } .sw span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .15s ease; } .sw span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .15s ease; } .sw input:checked + span { background: var(--brand-2); } .sw input:checked + span::after { transform: translateX(16px); } .sw input:focus-visible + span { box-shadow: 0 0 0 2px rgba(14,165,164,.4); }