/* cfpid 后台样式：浅色、紧凑、表格友好 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2430;
  background: #f5f7fb;
}
a { color: #2563eb; text-decoration: none; }

.topbar {
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 20px;
  background: #fff; border-bottom: 1px solid #e6e9f0;
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.tag {
  display: inline-block; margin-left: 6px; padding: 1px 8px;
  font-size: 12px; font-weight: 500; color: #2563eb;
  background: #eef3ff; border-radius: 999px; vertical-align: 2px;
}
.spacer { flex: 1; }

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

.card {
  background: #fff; border: 1px solid #e6e9f0; border-radius: 12px;
  padding: 18px 20px; margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(20, 30, 50, .03);
}
.card h2 { margin: 4px 0 16px; font-size: 20px; }
.card h3 { margin: 0 0 14px; font-size: 15px; }

.login { max-width: 380px; margin: 8vh auto 0; }

.field { margin-bottom: 12px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: #5b6478; }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 180px; }
.w160 { width: 160px; }
.w120 { width: 120px; }

input {
  width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid #d8dde8; border-radius: 8px;
  font: inherit; color: inherit; background: #fff; outline: none;
}
input:focus { border-color: #7aa2ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

.btn {
  height: 36px; padding: 0 14px; border: 1px solid #d8dde8; border-radius: 8px;
  background: #fff; color: #1f2430; font: inherit; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: #f2f5fb; }
.btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn.primary:hover { background: #1d54cf; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; margin-top: 6px; }
.btn.danger { color: #c62828; border-color: #f0c9c9; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }

.msg { min-height: 20px; margin-top: 10px; font-size: 13px; }
.msg.good { color: #157347; }
.msg.bad { color: #c62828; }
.muted { color: #7a8397; font-size: 13px; }
.hint { margin: 8px 0 12px; padding: 10px 12px; background: #f7f9fd; border: 1px dashed #dde3ef; border-radius: 8px; color: #5b6478; font-size: 13px; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  height: 34px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: #5b6478; font: inherit; cursor: pointer;
}
.tab:hover { background: #eef2fa; }
.tab.active { background: #fff; border-color: #e6e9f0; color: #2563eb; font-weight: 600; box-shadow: 0 1px 2px rgba(20, 30, 50, .04); }

.tabpane { display: none; }
.tabpane.active { display: block; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid #e6e9f0; border-radius: 12px; padding: 14px 16px; }
.stat .k { font-size: 12px; color: #7a8397; }
.stat .v { margin-top: 4px; font-size: 22px; font-weight: 700; letter-spacing: .3px; }

.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid #eef1f7; text-align: left; white-space: nowrap; }
.tbl th { color: #6b7488; font-weight: 600; background: #fafbfe; }
.tbl tbody tr:hover { background: #fafcff; }
.tbl td.oid { max-width: 220px; overflow: hidden; text-overflow: ellipsis; color: #6b7488; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.tbl td.ops { display: flex; gap: 6px; flex-wrap: wrap; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; }
.pill.ok { color: #157347; background: #e7f6ec; }
.pill.warn { color: #a16207; background: #fdf3dc; }
.pill.bad { color: #c62828; background: #fdeaea; }

.pager { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

@media (max-width: 640px) {
  .wrap { margin-top: 14px; }
  .card { padding: 14px; }
  .tbl th, .tbl td { padding: 8px 6px; }
}
