* { box-sizing: border-box; }
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e3e6ea;
  --text: #1f2329;
  --muted: #8a9099;
  --accent: #2563eb;
  --accent-soft: #e8f0fe;
  --danger: #d92d20;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* 登录 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
}
.login-card h1 { font-size: 20px; margin: 0 0 6px; font-weight: 600; }
.login-card .sub { margin: 0 0 24px; color: var(--muted); }
.login-card label { display: block; margin: 16px 0 6px; font-size: 13px; }
.login-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}
.login-card button {
  width: 100%;
  margin-top: 16px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  font-size: 14px;
}
.login-card button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.login-card button:disabled { opacity: .5; cursor: not-allowed; }
.field-error { color: var(--danger); font-size: 12px; min-height: 16px; margin-top: 4px; }
.login-card .hint { margin-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* 顶栏 */
.topbar {
  height: 60px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-size: 16px; font-weight: 600; }
.tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.topright { display: flex; align-items: center; gap: 14px; }
.topright button {
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.banner {
  margin: 16px 24px 0;
  padding: 12px 16px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #874d00;
  border-radius: 8px;
}
.banner code { background: #fff1cc; padding: 1px 5px; border-radius: 4px; }

.content { padding: 24px; max-width: 1280px; margin: 0 auto; }

/* 统计卡 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 600; margin-top: 8px; }

/* 面板 */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 15px; margin: 0; font-weight: 600; }
.filters { display: flex; gap: 10px; }
.filters select, .filters input {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th { color: var(--muted); font-weight: 500; font-size: 12px; background: #fafbfc; }
th.num, td.num { text-align: right; }
td.title-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
td a { color: var(--accent); text-decoration: none; }
.empty { text-align: center; color: var(--muted); padding: 28px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 20px;
}
.pager button {
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

@media (max-width: 640px) {
  .topright #who { display: none; }
  .content { padding: 16px; }
}
