:root {
  --bg: #0f1419;
  --panel: #171e26;
  --line: #2a3542;
  --text: #e8eef5;
  --muted: #8b9bb0;
  --accent: #3d9cf0;
  --danger: #e35d6a;
  --ok: #3ecf8e;
  --warn: #e6b35c;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(900px 500px at 10% -10%, #1b2a3d 0%, transparent 55%),
    radial-gradient(700px 400px at 100% 0%, #1a2430 0%, transparent 50%),
    var(--bg);
  color: var(--text);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.meta { display: flex; gap: 10px; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #222b36;
  color: var(--muted);
  font-size: 13px;
}
.pill.online { color: var(--ok); background: rgba(62, 207, 142, 0.12); }
.pill.offline { color: var(--warn); background: rgba(230, 179, 92, 0.12); }

main {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  padding: 16px;
  min-height: calc(100vh - 70px);
}

.panel {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  backdrop-filter: blur(8px);
}
.panel h1, .panel h2 { margin: 0 0 8px; font-size: 18px; }
.hint { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.card {
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: #121820;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.card:hover { border-color: #3a4a5d; }
.card.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card .title { font-weight: 600; margin-bottom: 4px; }
.card .info { color: var(--muted); font-size: 12px; line-height: 1.5; }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--warn);
}
.dot.on { background: var(--ok); }

.detail .empty {
  min-height: 420px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.hidden { display: none !important; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.sub { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #2a3544;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.accent { background: var(--accent); color: #041018; }
button.danger { background: var(--danger); color: #fff; }

.shot-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0c1015;
  min-height: 280px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.shot-wrap img {
  max-width: 100%;
  max-height: 58vh;
  display: none;
}
.shot-wrap img.show { display: block; }
.shot-meta {
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(0,0,0,.45);
  padding: 4px 8px;
  border-radius: 8px;
}

.log {
  margin-top: 12px;
  background: #0c1015;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 140px;
  overflow: auto;
  color: #9fb2c7;
  font-size: 12px;
}

.watch-box {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #121820;
}
.watch-box h3 {
  margin: 0 0 6px;
  font-size: 15px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 12px 0;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.form-grid label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}
.form-grid input[type="text"],
.form-grid input[type="number"] {
  border: 1px solid var(--line);
  background: #0c1015;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
