:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --blue: #1f3864;
  --blue2: #2e6da4;
  --light: #eaf2fb;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #b45309;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--blue2); text-decoration: none; }
h1, h2, h3 { margin: 0 0 12px; color: var(--blue); font-weight: 700; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }
.topbar {
  background: linear-gradient(90deg, #1f3864, #2e6da4);
  color: #fff;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.topbar h1 { color: #fff; font-size: 20px; margin: 0; }
.topbar .sub { opacity: .85; font-size: 13px; margin-left: 10px; }
.topbar .right { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.topbar a, .topbar button.link { color: #dbeafe; }
.wrap { max-width: 1180px; margin: 24px auto; padding: 0 18px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
  margin-bottom: 18px;
}
.grid2 { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--blue2); }
textarea { min-height: 72px; resize: vertical; }
button, .btn {
  display: inline-block; border: 0; border-radius: 8px; padding: 9px 16px;
  font-size: 14px; cursor: pointer; background: var(--blue2); color: #fff;
  font-family: inherit;
}
button:hover, .btn:hover { filter: brightness(1.06); }
button:disabled { background: #cbd5e1; color: #64748b; cursor: not-allowed; }
button.ghost { background: #eef2f7; color: var(--blue); }
button.danger { background: var(--red); }
button.green { background: var(--green); }
button.small { padding: 5px 10px; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.big { font-size: 26px; font-weight: 700; color: var(--blue); }
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px;
  background: var(--light); color: var(--blue);
}
.pill.green { background: #dcfce7; color: #166534; }
.pill.red { background: #fee2e2; color: #991b1b; }
.pill.amber { background: #fef3c7; color: #92400e; }
.code {
  font-size: 42px; letter-spacing: 8px; font-weight: 800; color: var(--blue);
  font-family: Consolas, "Courier New", monospace;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: #f8fafc; }
tr:hover td { background: #fbfdff; }
.list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.list-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-bottom: 1px solid var(--line); cursor: pointer; background: #fff;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: #f8fbff; }
.list-item.active { background: var(--light); }
.list-item .name { font-weight: 600; }
.toast {
  position: fixed; right: 20px; bottom: 20px; background: #111827; color: #fff;
  padding: 10px 16px; border-radius: 8px; font-size: 14px; opacity: 0;
  transform: translateY(8px); transition: all .2s; pointer-events: none; z-index: 99;
}
.toast.show { opacity: 1; transform: none; }
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 500px at 20% 0%, #e8f1fb, #f4f7fb 60%);
  padding: 30px 16px;
}
.hero .box { width: 100%; max-width: 980px; }
.hero-title { text-align: center; margin-bottom: 26px; }
.hero-title h1 { font-size: 30px; }
.hero-title p { color: var(--muted); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .choice { grid-template-columns: 1fr; } }
.big-input { font-size: 20px; letter-spacing: 6px; text-align: center; text-transform: uppercase; }
.center { text-align: center; }
.hint { background: #f8fafc; border-left: 4px solid var(--blue2); padding: 10px 12px; border-radius: 6px; font-size: 13px; color: #334155; }
.ok { color: var(--green); font-weight: 700; }
.bad { color: var(--red); font-weight: 700; }
.signal { font-size: 22px; font-weight: 800; padding: 14px; border-radius: 10px; text-align: center; margin: 10px 0; }
.signal.red { background: #fee2e2; color: #991b1b; }
.signal.blue { background: #dbeafe; color: #1e40af; }
.actions { display: flex; gap: 12px; margin-top: 14px; }
.actions button { flex: 1; padding: 14px; font-size: 16px; }
.stat { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 700; color: var(--blue); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #eef2ff; color: #3730a3; font-size: 12px; }
.chart { width: 100%; height: 180px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.footer { text-align: center; color: #94a3b8; font-size: 12px; padding: 16px; }
