body {
  margin: 0;
  font-family: "Microsoft YaHei", SimSun, sans-serif;
  font-size: 14px;
  color: #333;
  background: #eef1f4;
  line-height: 1.5;
}
* { box-sizing: border-box; }
a { color: #1a5276; }
a:hover { color: #0b3a58; }
img { max-width: 100%; display: block; }
h1 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.topbar, .adminbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  min-height: 48px;
  background: #2f4050;
  color: #fff;
}
.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.brand { color: #fff; text-decoration: none; font-size: 16px; font-weight: 700; white-space: nowrap; }
.top-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.search { display: flex; align-items: center; width: 240px; max-width: 100%; }
.search input, .field input, .field textarea, .field select {
  width: 100%;
  height: 28px;
  border: 1px solid #c5ced6;
  background: #fff;
  padding: 2px 8px;
  font: inherit;
  color: #333;
}
.field textarea { height: auto; }
.search input { border-right: 0; }
.search button, button, .btn {
  height: 28px;
  border: 1px solid #243240;
  background: #3d5163;
  color: #fff;
  padding: 0 12px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 26px;
}
.search button { white-space: nowrap; }
button.ghost, .ghost { background: #fff; color: #333; border: 1px solid #c5ced6; }
.nav { display: flex; gap: 22px; align-items: center; justify-content: center; white-space: nowrap; }
.nav a, .nav-user a, .adminbar a { color: #fff; text-decoration: none; }
.nav a:hover, .nav-user a:hover { color: #d6e4f0; }
.nav-user { display: flex; gap: 14px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.nav-user form, .nav form, .side form { margin: 0; }
.nav button, .nav-user button { background: transparent; border: 0; color: #fff; height: auto; padding: 0; line-height: inherit; }
.wrap { width: 980px; max-width: calc(100% - 24px); margin: 12px auto 24px; }
.box, .panel, .card, .hero-card {
  background: #fff;
  border: 1px solid #d5dbe3;
  margin-bottom: 12px;
}
.box-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  background: #f7f9fb;
  border-bottom: 1px solid #d5dbe3;
  font-weight: 700;
}
.box-hd a { font-weight: 400; font-size: 12px; }
.cat-line { padding: 8px 12px; border-bottom: 1px solid #e6ebf0; }
.cat-line span { color: #666; margin-right: 8px; }
.cat-line a { margin-right: 14px; text-decoration: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 12px; }
.home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { margin: 0; }
.card a { display: block; color: inherit; text-decoration: none; }
.card:hover { border-color: #2f4050; }
.cover { width: 100%; height: 120px; object-fit: cover; background: #d9dee3; border-bottom: 1px solid #e6ebf0; }
.detail .cover { height: auto; max-height: 360px; border: 1px solid #d5dbe3; }
.card-body, .panel, .hero-card { padding: 8px 10px 10px; }
.card-title { display: block; font-size: 13px; font-weight: 400; }
.card-meta { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; }
.muted { color: #666; }
.price { color: #c00; white-space: nowrap; text-align: right; }
.filters { margin: 0 0 12px; padding: 8px 10px; background: #fff; border: 1px solid #d5dbe3; }
.filters a { display: inline-block; margin: 2px 6px 2px 0; padding: 2px 8px; text-decoration: none; border: 1px solid #d5dbe3; background: #fff; color: #333; }
.filters a.on { background: #2f4050; border-color: #2f4050; color: #fff; }
.detail { display: grid; grid-template-columns: 1fr 240px; gap: 12px; align-items: start; }
.side { position: sticky; top: 60px; }
.side .btn, .side button { width: 100%; text-align: center; margin-top: 8px; }
.cats { margin-top: 8px; }
.cats a, .chip { display: inline-block; margin: 0 6px 6px 0; padding: 1px 6px; border: 1px solid #d5dbe3; text-decoration: none; color: #333; font-size: 12px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid #e6ebf0; text-align: left; padding: 8px 12px; }
.alert { padding: 8px 10px; margin-bottom: 12px; border: 1px solid #d5dbe3; background: #fff; }
.alert.ok { border-color: #b7d7c3; background: #f3faf6; color: #1a7f37; }
.alert.err { border-color: #e7b3b3; background: #fff6f6; color: #c00; }
.field { margin-bottom: 10px; }
.field label, .auth label { display: block; margin-bottom: 4px; }
.auth { width: 420px; max-width: 100%; margin: 12px auto; padding: 16px; background: #fff; border: 1px solid #d5dbe3; }
.auth h1 { margin-top: 0; }
.pager { margin-top: 12px; }
.pager a { margin-right: 10px; }
.row { display: flex; gap: 8px; align-items: center; }
.site-foot { border-top: 1px solid #d5dbe3; color: #666; font-size: 12px; background: #fff; }
.site-foot .inner { width: 980px; max-width: calc(100% - 24px); margin: 0 auto; padding: 12px 0; }
.checks { list-style: none; margin: 0 0 12px; padding: 0; }
.checks li { padding: 6px 0; border-bottom: 1px solid #e6ebf0; }
.checks li.ok { color: #1a7f37; }
.checks li.bad { color: #c00; }
button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 900px) {
  .topbar { display: flex; flex-wrap: wrap; justify-content: center; height: auto; padding: 8px; }
  .top-left, .nav, .nav-user { width: 100%; justify-content: center; }
  .search { width: 100%; }
  .home-grid, .detail { grid-template-columns: 1fr 1fr; }
  .side { position: static; }
}
