:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dbe3ef;
  --text: #162033;
  --muted: #64748b;
  --primary: #2563eb;
  --green: #0f766e;
  --orange: #b45309;
  --red: #c2410c;
  --shadow: 0 12px 32px rgba(22, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.page {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 26px 0 36px;
}

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

.eyebrow,
.subtitle,
.panel p {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 17px;
}

.subtitle {
  margin-top: 8px;
  font-size: 14px;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.refresh-btn svg {
  width: 18px;
  height: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 16px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel p {
  margin-top: 4px;
  font-size: 13px;
}

.table-title {
  align-items: center;
}

.result-count {
  color: var(--muted);
  font-size: 13px;
}

.filters {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.filters label span {
  display: block;
  margin-bottom: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.filters input,
.filters select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #475569;
  background: var(--surface-soft);
  font-weight: 800;
}

tbody tr:hover {
  background: #f8fafc;
}

.empty-row {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.gray {
  color: #475569;
  background: #e2e8f0;
}

.blue {
  color: #1d4ed8;
  background: #dbeafe;
}

.orange {
  color: var(--orange);
  background: #ffedd5;
}

.green {
  color: var(--green);
  background: #ccfbf1;
}

.red {
  color: var(--red);
  background: #ffedd5;
}

.progress {
  width: 116px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.progress small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.pagination button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.pagination button.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page {
    width: min(100vw - 24px, 1440px);
    padding-top: 16px;
  }

  .topbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .refresh-btn {
    width: 100%;
  }

  .stats-grid,
  .filters {
    grid-template-columns: 1fr;
  }
}
