
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f4f6f8;
  color: #1f2937;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}
.wrap {
  max-width: 1180px;
  margin: 24px auto;
  padding: 0 16px;
}
.wrap.wide { max-width: 1600px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
h1 { margin: 0; font-size: 26px; }
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}
input, select, textarea {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}
textarea { width: 100%; resize: vertical; }
.full { width: 100%; margin-top: 8px; }
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.btn {
  border: 0;
  border-radius: 6px;
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
  background: #2563eb;
  color: white;
  font-size: 14px;
}
.btn.secondary { background: #475569; }
.btn.danger { background: #b91c1c; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
}
.stats > div {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
}
pre {
  height: 320px;
  overflow: auto;
  background: #0f172a;
  color: #d1fae5;
  padding: 12px;
  border-radius: 8px;
  white-space: pre-wrap;
  font-family: Consolas, monospace;
  font-size: 13px;
}
.tablewrap {
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1400px;
  font-size: 13px;
}
th, td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
}
tr:hover td { background: #f8fafc; }
a { color: #2563eb; }
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
