:root {
  --bg: #0b0e14;
  --bg-soft: #111621;
  --card: #151b26;
  --line: #222b3a;
  --txt: #e8edf5;
  --dim: #7c8798;
  --accent: #4f8cff;
  --accent2: #7c5cff;
  --ok: #34d399;
  --bad: #f87171;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(79,140,255,.16), transparent 60%),
    radial-gradient(900px 520px at 88% 0%, rgba(124,92,255,.14), transparent 58%),
    var(--bg);
  color: var(--txt);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 22px 64px; }

/* 顶栏 */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 54px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff;
  box-shadow: 0 6px 20px rgba(79,140,255,.35);
}
.brand b { font-size: 16px; letter-spacing: .2px; }
.brand span { display: block; font-size: 11.5px; color: var(--dim); margin-top: 1px; letter-spacing: 2px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.pill {
  font-size: 12px; color: var(--dim); border: 1px solid var(--line);
  padding: 7px 13px; border-radius: 999px; background: rgba(255,255,255,.02);
}
.pill.ok { color: var(--ok); border-color: rgba(52,211,153,.35); }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; padding: 8px 15px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: #1a2130; color: var(--txt);
  transition: .16s;
}
.btn:hover { background: #212a3c; transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 0; color: #fff; font-weight: 600;
  box-shadow: 0 8px 22px rgba(79,140,255,.28);
}

/* 标题 */
.hero { margin-bottom: 30px; }
.hero h1 { font-size: 30px; margin: 0 0 10px; letter-spacing: -.5px; font-weight: 650; }
.hero p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.7; }

/* 卡组 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border: 1px solid var(--line); border-radius: 16px; padding: 20px 18px 16px;
  transition: .2s;
}
.card:hover { border-color: #33405a; transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.34); }
.card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: .2s;
}
.card:hover::after { opacity: .8; }
.icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: #1b2534; border: 1px solid var(--line); margin-bottom: 14px;
  font-size: 20px;
}
.card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.card p { margin: 0 0 16px; font-size: 12.5px; color: var(--dim); line-height: 1.65; min-height: 34px; }
.card .foot { display: flex; align-items: center; justify-content: space-between; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.off { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.state { font-size: 11.5px; color: var(--dim); display: flex; align-items: center; }

.note {
  margin-top: 26px; font-size: 12px; color: var(--dim);
  border: 1px dashed var(--line); border-radius: 12px; padding: 12px 15px; line-height: 1.7;
}

/* 登录页 */
.auth { max-width: 380px; margin: 8vh auto 0; }
.auth .box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 30px 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,.42);
}
.auth h2 { margin: 0 0 6px; font-size: 20px; }
.auth .sub { color: var(--dim); font-size: 12.5px; margin-bottom: 22px; }
label { display: block; font-size: 12px; color: var(--dim); margin: 14px 0 7px; }
input[type=text], input[type=password] {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: #0d121b; color: var(--txt);
  font-size: 14px; outline: none; transition: .15s;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,140,255,.15); }
.auth .btn.primary { width: 100%; justify-content: center; margin-top: 20px; padding: 11px; font-size: 14px; }
.err {
  background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.35);
  color: #fca5a5; font-size: 12.5px; padding: 9px 12px; border-radius: 9px; margin-bottom: 14px;
}

/* 管理页 */
.panel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 22px; }
@media (max-width: 760px) { .panel-grid { grid-template-columns: 1fr; } }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.mini h4 { margin: 0 0 6px; font-size: 14px; }
.mini p { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.65; }
.tag {
  display: inline-block; font-size: 10.5px; padding: 3px 8px; border-radius: 6px;
  background: rgba(79,140,255,.14); color: #9dc0ff; margin-bottom: 10px;
}
footer { margin-top: 52px; text-align: center; font-size: 11.5px; color: #4d5666; }
