:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --surface-3: #edf3f6;
  --ink: #18262e;
  --muted: #60717b;
  --line: #d9e2e7;
  --primary: #1f4e78;
  --primary-soft: #deebf5;
  --good: #25704d;
  --good-soft: #dcefe3;
  --warn: #8a641b;
  --warn-soft: #f7edd3;
  --bad: #a83f43;
  --bad-soft: #f6dddd;
  --shadow: 0 16px 44px rgba(20, 49, 68, 0.09);
  --font: "Hiragino Sans GB", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 var(--font);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 15% 0%, #dceaf4 0, transparent 30rem),
    var(--bg);
}
.login-card {
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.admin-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-size: 23px;
  font-weight: 700;
}
.login-card h1 { margin: 18px 0 6px; font-size: 25px; }
.login-card > p { margin: 0 0 22px; color: var(--muted); }
.login-card form { display: grid; gap: 14px; }
.login-card label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.login-card input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}
.login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,78,120,.12); }
.login-card button {
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-weight: 700;
}
.back-link { display: inline-block; margin-top: 18px; font-size: 13px; }
.alert {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--bad-soft);
  color: var(--bad);
}
.alert.ok { background: var(--good-soft); color: var(--good); }
.alert.error { background: var(--bad-soft); color: var(--bad); }

.admin-header {
  min-height: 66px;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-header > div { display: flex; align-items: baseline; gap: 10px; }
.admin-header strong { font-size: 16px; }
.admin-header span { color: var(--muted); font-size: 12px; }
.admin-header nav { display: flex; align-items: center; gap: 14px; }
.admin-header form { margin: 0; }
.admin-header nav button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 6px 10px;
}

.admin-main { max-width: 1440px; margin: 0 auto; padding: 24px; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.summary-grid article,
.profile-stats article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.summary-grid span,
.profile-stats span { color: var(--muted); font-size: 11px; }
.summary-grid strong,
.profile-stats strong { display: block; margin-top: 4px; font-size: 24px; }

.panel {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 16px; }
.panel h1, .panel h2 { margin: 0; font-size: 20px; }
.panel p { margin: 4px 0 0; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  padding: 0 10px;
}
.filters button {
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: var(--primary);
  color: white;
  padding: 0 14px;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 950px; }
th {
  background: var(--primary);
  color: white;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:nth-child(even) { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); font-size: 10px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.user-link { font-weight: 700; }
.question-cell { min-width: 320px; }
.empty { color: var(--muted); text-align: center; padding: 28px; }

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.status.good { background: var(--good-soft); color: var(--good); }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.status.bad { background: var(--bad-soft); color: var(--bad); }
.status.neutral { background: var(--surface-3); color: var(--muted); }
.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.profile-head p { margin: 0; color: var(--muted); font-size: 11px; }
.profile-head h1 { margin: 3px 0 4px; font-size: 28px; }
.profile-head span { color: var(--muted); font-size: 12px; }
.profile-stats { display: grid; grid-template-columns: repeat(5, 100px); gap: 9px; }
.profile-stats article { padding: 11px 12px; box-shadow: none; }
.profile-stats strong { font-size: 19px; }

@media (max-width: 1100px) {
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 680px) {
  .admin-header { padding: 10px 14px; align-items: flex-start; flex-direction: column; }
  .admin-header nav { width: 100%; flex-wrap: wrap; gap: 10px; }
  .admin-main { padding: 14px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 16px; }
  .panel-head { flex-direction: column; }
  .filters { width: 100%; }
  .filters input { flex: 1; min-width: 130px; }
  .profile-stats { width: 100%; grid-template-columns: repeat(2, 1fr); }
}
