* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0c10;
  --panel: #13161c;
  --panel-2: #181c23;
  --line: #242a33;
  --text: #e6e9ef;
  --muted: #8b93a1;
  --accent: #4d8dff;
  --ok: #2ecc8f;
  --warn: #f5a524;
  --bad: #f05252;
}
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px; line-height: 1.6; padding: 26px 20px 60px;
}
.wrap { max-width: 1180px; margin: 0 auto; }
header { display: flex; align-items: center; justify-content: space-between;
         margin-bottom: 22px; flex-wrap: wrap; gap: 14px; }
h1 { font-size: 19px; font-weight: 600; letter-spacing: .3px; }
h1 span { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 10px; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.card .k { font-size: 12px; color: var(--muted); margin-bottom: 8px;
           display: flex; justify-content: space-between; }
.card .v { font-size: 26px; font-weight: 600; letter-spacing: -.5px; line-height: 1.1; }
.card .v small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.card .sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.bar { height: 5px; background: #22272f; border-radius: 3px; overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; border-radius: 3px; transition: width .5s; }
.bar i.g { background: var(--ok); }
.bar i.y { background: var(--warn); }
.bar i.r { background: var(--bad); }

.row2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; margin-bottom: 30px; }
.health-item { display: flex; align-items: center; justify-content: space-between;
               padding: 10px 0; border-bottom: 1px solid #1b2027; font-size: 13px; }
.health-item:last-child { border-bottom: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.dot.idle { background: var(--muted); }
.netline { display: flex; gap: 30px; margin-top: 10px; }
.netline div { flex: 1; }
.netline em { font-style: normal; font-size: 11px; color: var(--muted);
              display: block; margin-bottom: 4px; }
.netline b { font-size: 20px; font-weight: 600; }

.sect-title { display: flex; align-items: center; justify-content: space-between;
              margin: 0 0 14px; padding-top: 4px; }
.sect-title h2 { font-size: 15px; font-weight: 600; }
.sect-title .line { flex: 1; height: 1px; background: var(--line); margin: 0 18px; }

.cards3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.cards3 .card { padding: 16px 20px; }
.cards3 .v { font-size: 24px; }

table { width: 100%; border-collapse: collapse; background: var(--panel);
        border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted);
     padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
td { padding: 14px 16px; border-bottom: 1px solid #1b2027; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #161a21; }
.name { font-weight: 500; }
.sub { color: var(--muted); font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; }
.badge.on { background: rgba(46,204,143,.12); color: var(--ok); }
.badge.off { background: rgba(139,147,161,.12); color: var(--muted); }
.badge.warn { background: rgba(245,165,36,.12); color: var(--warn); }
.days.ok { color: var(--ok); }
.days.warn { color: var(--warn); }
.days.bad { color: var(--bad); font-weight: 500; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }

button {
  font-family: inherit; font-size: 13px; cursor: pointer; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 8px 16px; transition: .15s;
}
button:hover { border-color: #3a4250; background: #1e232b; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
button.primary:hover { background: #3d7df0; }
button.danger { color: var(--bad); border-color: #3a2226; }
button.danger:hover { background: #2a1618; border-color: var(--bad); }
button.mini { padding: 4px 10px; font-size: 12px; }

.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: none;
  align-items: center; justify-content: center; padding: 20px; z-index: 50;
  backdrop-filter: blur(3px); }
.modal-mask.show { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
         width: 100%; max-width: 620px; max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 16px; font-weight: 600; padding: 20px 24px;
            border-bottom: 1px solid var(--line); }
.body { padding: 20px 24px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.full { grid-column: 1 / -1; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
input, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line);
  color: var(--text); border-radius: 8px; padding: 9px 12px;
  font-family: inherit; font-size: 13px; }
input:focus { outline: none; border-color: var(--accent); }
input::placeholder { color: #4d5563; }
.hint { font-size: 11.5px; color: #646c7a; margin-top: 4px; }
.foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px;
        border-top: 1px solid var(--line); }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 11px 22px; border-radius: 10px; font-size: 13px; opacity: 0;
  pointer-events: none; transition: .25s; max-width: 80vw; text-align: center; }
.toast.show { opacity: 1; }
.sect { grid-column: 1/-1; font-size: 12px; color: var(--accent); font-weight: 500; }
.qr-box { background: #fff; border-radius: 12px; padding: 18px;
          display: flex; justify-content: center; }
.qr-box img { width: 264px; height: 264px; display: block; }
.link-box { background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
            padding: 10px 12px; margin-top: 14px; word-break: break-all; text-align: left; }
.link-box code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
                 color: var(--text); }

@media (max-width: 900px) {
  .cards, .cards3 { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
}
