:root {
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --bg: #f5f6fb;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar .inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 24px; height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
}
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a {
  padding: 6px 14px; border-radius: 8px; color: var(--muted); font-size: 14.5px; font-weight: 500;
}
.topbar nav a:hover { background: #f1f5f9; text-decoration: none; color: var(--text); }
.topbar nav a.on { background: #eef2ff; color: var(--brand); }
.topbar .me { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.wrap.narrow { max-width: 460px; padding-top: 48px; }

h1.page-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.page-sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; margin-bottom: 18px;
}
.card h2 { font-size: 16px; margin-bottom: 14px; }

.grid { display: grid; gap: 14px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .grid.c3, .grid.c2 { grid-template-columns: 1fr; } }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px;
  font-size: 15px; background: #fff; color: var(--text); outline: none;
  transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 9px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; background: #eef2ff; color: var(--brand);
  transition: filter .15s; text-decoration: none;
}
.btn:hover { filter: brightness(.96); text-decoration: none; }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  box-shadow: 0 4px 14px rgba(79,70,229,.28);
}
.btn.danger { background: #fef2f2; color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.msg { padding: 10px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 14px; display: none; }
.msg.err { background: #fef2f2; color: var(--bad); border: 1px solid #fecaca; display: block; }
.msg.ok { background: #ecfdf5; color: var(--ok); border: 1px solid #a7f3d0; display: block; }

/* 表格 */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl code { background: #f1f5f9; padding: 2px 6px; border-radius: 5px; font-size: 12.5px; word-break: break-all; }
.tbl .ops { white-space: nowrap; }
.tbl .ops a, .tbl .ops button { margin-right: 6px; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.ok { background: #ecfdf5; color: var(--ok); }
.tag.off { background: #f1f5f9; color: var(--muted); }
.tag.warn { background: #fffbeb; color: var(--warn); }
.tag.bad { background: #fef2f2; color: var(--bad); }

/* 平台卡片 */
.app-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  transition: box-shadow .15s, transform .15s;
}
.app-card:hover { box-shadow: 0 6px 18px rgba(30,41,59,.08); transform: translateY(-1px); text-decoration: none; }
.app-card .ico {
  width: 44px; height: 44px; border-radius: 11px; flex: none; font-size: 22px;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  display: flex; align-items: center; justify-content: center;
}
.app-card .ico img { width: 100%; height: 100%; border-radius: 11px; object-fit: cover; }
.app-card .nm { font-weight: 700; font-size: 15.5px; }
.app-card .ds { color: var(--muted); font-size: 13px; }

/* 统计 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
}
.stat .v { font-size: 24px; font-weight: 800; color: var(--brand); }
.stat .k { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a {
  padding: 9px 16px; border-radius: 9px 9px 0 0; color: var(--muted); font-weight: 500; font-size: 14.5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 700; }

pre.code {
  background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 14px 16px;
  font-size: 13px; overflow-x: auto; line-height: 1.7; font-family: "SFMono-Regular", Consolas, Menlo, monospace;
}
pre.code .c { color: #64748b; }
kbd.k {
  background: #f1f5f9; border: 1px solid #cbd5e1; border-bottom-width: 2px;
  padding: 1px 7px; border-radius: 6px; font-size: 12.5px; font-family: monospace;
}

.footer { text-align: center; color: #94a3b8; font-size: 13px; padding: 26px 0 34px; }
.footer a { color: #94a3b8; }

/* 首页 hero */
.hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #a855f7 100%);
  border-radius: 18px; color: #fff; padding: 46px 38px; margin-bottom: 26px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 280px; height: 280px;
  background: rgba(255,255,255,.12); border-radius: 50%;
}
.hero::before {
  content: ""; position: absolute; right: 60px; bottom: -110px; width: 220px; height: 220px;
  background: rgba(255,255,255,.08); border-radius: 50%;
}
.hero h1 { font-size: 30px; font-weight: 800; letter-spacing: 1px; }
.hero p { opacity: .92; margin-top: 10px; font-size: 15.5px; max-width: 640px; }
.hero .acts { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero .acts .btn { background: #fff; color: var(--brand); }
.hero .acts .btn.ghost { background: rgba(255,255,255,.16); color: #fff; }

.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .feat { grid-template-columns: 1fr; } }
.feat .f { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.feat .f b { display: block; margin-bottom: 6px; font-size: 15px; }
.feat .f span { color: var(--muted); font-size: 13.5px; }

.alert-banner {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px;
}
