:root {
  --primary: #2b6de8;
  --primary-dark: #1f55c0;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1a1a2e;
  --muted: #8a8fa3;
  --border: #e5e8ef;
  --danger: #e5484d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

.panel { background: var(--card); border-radius: 16px; padding: 32px 24px; box-shadow: 0 4px 24px rgba(0,0,0,0.05); }

.hidden { display: none; }

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

input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s;
}
input:focus { border-color: var(--primary); }

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: opacity .15s, background .15s;
}
button:active { opacity: .8; }

.primary {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  background: var(--primary);
  color: #fff;
}
.primary:hover { background: var(--primary-dark); }

.ghost {
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.ghost:hover { color: var(--text); }

.msg { margin-top: 12px; font-size: 14px; min-height: 20px; }
.msg.error { color: var(--danger); }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

.searchbar { display: flex; gap: 10px; }
.searchbar input { flex: 1; }
.searchbar .primary { width: auto; margin-top: 0; padding: 0 24px; }

.hint { color: var(--muted); font-size: 12px; margin: 10px 0 20px; line-height: 1.6; }

.result { display: flex; flex-direction: column; gap: 20px; }

.group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.group-head {
  padding: 14px 16px;
  background: #f0f4ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.group-head .name { font-weight: 700; font-size: 15px; }
.group-head .meta { color: var(--muted); font-size: 12px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: #fafbfd; font-weight: 600; color: var(--muted); position: sticky; top: 0; }
tr:last-child td { border-bottom: none; }

.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 14px; }
.loading { text-align: center; color: var(--muted); padding: 30px; font-size: 14px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f0ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

/* 移动端 */
@media (max-width: 600px) {
  .wrap { padding: 12px 10px 40px; }
  .panel { padding: 24px 16px; }
  h1 { font-size: 19px; }
  .searchbar { flex-direction: column; }
  .searchbar .primary { width: 100%; padding: 13px; }
  table { font-size: 12px; }
  th, td { padding: 8px 10px; }
}
