:root {
  --red: #0f63c9;
  --red-dark: #093f84;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --bg: #f6f7fb;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f3f5fa 0%, #f6f7fb 220px, #f6f7fb 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1280px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto;
}

.topline {
  background: var(--red-dark);
  color: #fff;
  font-size: 13px;
}

.topline .wrap {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topline-links {
  display: flex;
  gap: 18px;
}

.topline-links a {
  opacity: 0.92;
}

.topline-links a:hover {
  opacity: 1;
}

.main-nav {
  background: #fff;
  border-bottom: 1px solid #f1f3f8;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 30;
}

.nav-wrap {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo img {
  height: 52px;
  display: block;
}

.desktop-nav {
  display: flex;
  margin-left: auto;
  gap: 24px;
  font-size: 15px;
  font-weight: 500;
}

.desktop-nav a {
  position: relative;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.desktop-nav a::after {
  content: none;
}

.desktop-nav a:hover {
  background: #eaf3ff;
  color: var(--red);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 22px;
  width: 44px;
  height: 40px;
}

.mobile-nav {
  display: none;
}

.content {
  padding: 26px 0 120px;
}

.hero {
  background: linear-gradient(130deg, #ffffff 0%, #eef6ff 100%);
  border: 1px solid #d6e8ff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
}

.hero p {
  margin: 10px 0 0;
}

#batch-info {
  color: var(--red);
  font-weight: 600;
}

.hero-tip {
  color: var(--muted);
  font-size: 14px;
}

.product-center .product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.product-center .product-head p {
  margin: 6px 0 0;
  color: #4b5563;
}

.product-link {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #bfd8fb;
  display: inline-flex;
  align-items: center;
  color: #0b4f9c;
  font-weight: 600;
  background: #eef6ff;
  white-space: nowrap;
}

.product-toggle {
  display: none;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #bfd8fb;
  background: #edf5ff;
  color: #0b4f9c;
  font-size: 13px;
  font-weight: 600;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.product-card {
  display: block;
  border: 1px solid #ebeff5;
  border-radius: 10px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  transition: 0.2s ease;
}

.product-card strong {
  display: block;
  color: #111827;
  font-size: 16px;
  margin-bottom: 6px;
}

.product-card span {
  font-size: 13px;
  color: #6b7280;
}

.product-card:hover {
  border-color: #9cc2f3;
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.08);
}

.panel {
  background: var(--paper);
  border: 1px solid #eef1f6;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
  max-width: 100%;
  overflow-x: clip;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
  border-left: 4px solid var(--red);
  padding-left: 10px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.tab-btn {
  height: 38px;
  padding: 0 16px;
  border: 1px solid #c7d8f0;
  border-radius: 8px;
  background: #f3f8ff;
  color: #17457f;
  font-size: 14px;
  font-weight: 600;
}

.tab-btn.active {
  border-color: #2c79d8;
  background: linear-gradient(135deg, #2f82e5 0%, #1662be 100%);
  color: #fff;
}

.hidden {
  display: none !important;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}

.field input,
.field select,
.range-box input,
.result-head select {
  width: 100%;
  height: 40px;
  border: 1px solid #d6dbe5;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  background: #fff;
}

.field input:focus,
.range-box input:focus,
.result-head select:focus {
  outline: none;
  border-color: #4c9bff;
  box-shadow: 0 0 0 3px rgba(201, 31, 47, 0.12);
}

.range-box {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.range-box span {
  color: var(--muted);
  font-size: 13px;
}

.actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.btn {
  height: 40px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid #d6dbe5;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}

.btn.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn:hover {
  border-color: #b8bfcd;
}

.btn.primary:hover {
  background: #0b4f9c;
  border-color: #0b4f9c;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.result-head label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

#result-count {
  margin: 0;
  color: var(--red);
  font-weight: 600;
}

.table-shell {
  overflow: auto;
  border: 1px solid #e7ebf3;
  border-radius: 10px;
}

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

thead {
  background: #edf5ff;
}

th,
td {
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  padding: 11px 10px;
  font-size: 13px;
  vertical-align: top;
}

th {
  color: #12407a;
}

tbody tr:hover {
  background: #f4f9ff;
}

.model-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid #c2daf8;
  background: linear-gradient(135deg, #f6fbff 0%, #eaf4ff 100%);
  color: #0b4f9c;
  font-weight: 600;
  letter-spacing: 0.1px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.model-link:hover {
  transform: translateY(-1px);
  border-color: #7fb0f0;
  background: linear-gradient(135deg, #eef7ff 0%, #dcecff 100%);
  box-shadow: 0 8px 18px rgba(20, 80, 150, 0.15);
}

.model-link.revoked {
  border-color: #efb0b7;
  background: linear-gradient(135deg, #fff4f5 0%, #ffe9ec 100%);
  color: #c21d32;
}

.model-revoked-text {
  color: #c21d32;
  font-weight: 700;
}

.revoke-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ffeff2;
  border: 1px solid #f4c2c9;
  color: #b7142a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.batch-publish {
  color: #0b4f9c;
  font-weight: 700;
}

.batch-revoke {
  color: #b7142a;
  font-weight: 700;
}

.state {
  text-align: center;
  color: var(--muted);
  padding: 26px 12px;
}

.state.error {
  color: #b91c1c;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.pagination button {
  border: 1px solid #d6dbe5;
  background: #fff;
  border-radius: 8px;
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  cursor: pointer;
}

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

.pagination button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  color: var(--muted);
  font-size: 13px;
  margin-left: 8px;
}

.notes p {
  margin: 0 0 6px;
  line-height: 1.6;
}

.notes .warn {
  color: #0b4f9c;
  margin-bottom: 0;
}

.site-footer {
  background:
    radial-gradient(1200px 300px at 20% -20%, rgba(64, 138, 235, 0.28), transparent),
    linear-gradient(160deg, #0a1f3f 0%, #0f2950 58%, #102f5f 100%);
  color: #d9dfeb;
  padding-top: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 18px;
}

.footer-grid h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.3px;
}

.footer-grid p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.7;
}

.qr-tip {
  color: #c8d2e2;
  margin-top: 10px;
}

.footer-qr {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #fff;
}

.footer-grid a:hover {
  color: #fff;
}

.copyright {
  margin-top: 12px;
  border-top: 1px solid rgba(217, 223, 235, 0.18);
  padding: 10px 12px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
  font-size: 13px;
  color: #b5c2d8;
  line-height: 1.8;
}

.copyright a {
  color: #b5c1d4;
}

.copyright a:hover {
  color: #ffffff;
}

.mobile-quickbar {
  display: none;
}

.loading-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.35);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.loading-mask.show {
  display: flex;
}

.loading-card {
  width: min(380px, 100%);
  background: #fff;
  border-radius: 12px;
  border: 1px solid #c8dcf8;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.22);
  padding: 18px;
}

.loading-title {
  margin: 0 0 8px;
  font-size: 16px;
  color: #0b4f9c;
  font-weight: 600;
}

.loading-sub {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
}

#loading-countdown {
  color: var(--red);
  font-weight: 700;
}

.wechat-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 20, 42, 0.42);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wechat-modal.show {
  display: flex;
}

.wechat-card {
  width: min(360px, 100%);
  border-radius: 16px;
  border: 1px solid #c4d9f7;
  background: linear-gradient(165deg, #ffffff 0%, #f1f7ff 100%);
  box-shadow: 0 18px 42px rgba(10, 40, 86, 0.24);
  padding: 18px;
}

.wechat-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0b4f9c;
}

.wechat-code {
  margin: 10px 0 8px;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #9fc1ee;
  background: #eaf4ff;
  color: #093f84;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

.wechat-desc {
  margin: 0;
  color: #3f526f;
  line-height: 1.7;
  font-size: 14px;
}

.wechat-btn {
  margin-top: 14px;
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #2b7fdf 0%, #0b4f9c 100%);
  font-size: 15px;
  font-weight: 600;
}

@media (max-width: 1080px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desktop-nav {
    gap: 16px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .product-center {
    display: none;
  }

  .topline {
    display: none;
  }

  .main-nav {
    position: static;
  }

  .nav-wrap {
    min-height: 64px;
  }

  .logo img {
    height: 34px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav {
    display: block;
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid #f1f3f8;
    transition: max-height 0.3s ease;
    background: #fff;
  }

  .mobile-nav.open {
    max-height: 240px;
  }

  .mobile-nav a {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f8;
    font-size: 14px;
  }

  .mobile-nav a:last-child {
    border-bottom: none;
  }

  .wrap {
    width: calc(100% - 20px);
  }

  .content {
    padding: 12px 0 24px;
  }

  .hero {
    padding: 16px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .panel {
    padding: 12px;
  }

  .panel h2 {
    font-size: 18px;
  }

  .tabs {
    gap: 8px;
    margin-bottom: 10px;
  }

  .tab-btn {
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .product-center .product-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .product-link {
    display: none;
  }

  .product-grid {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }

  .product-grid.open {
    max-height: 900px;
    margin-top: 8px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .actions {
    position: sticky;
    bottom: 92px;
    background: #fff;
    padding-top: 8px;
    z-index: 10;
  }

  .actions .btn {
    flex: 1;
  }

  .result-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
  }

  #result-count {
    font-size: clamp(14px, 4vw, 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .result-head label {
    font-size: 12px;
    gap: 4px;
  }

  .result-head select {
    width: 68px;
    height: 36px;
    padding: 0 6px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .footer-grid section {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(181, 205, 240, 0.2);
    border-radius: 12px;
    padding: 14px;
  }

  .site-footer {
    padding-top: 16px;
    padding-bottom: 100px;
  }

  .footer-links {
    display: none;
  }

  .footer-wechat {
    display: none;
  }

  .footer-qr {
    display: none;
  }

  .qr-tip {
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 0;
  }

  .mobile-quickbar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: 68px;
    background: rgba(9, 28, 58, 0.94);
    border: 1px solid rgba(118, 164, 232, 0.22);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(2, 12, 28, 0.42);
    backdrop-filter: blur(8px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 60;
  }

  .mobile-quickbar a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    color: #b9cbee;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2px;
    border-radius: 12px;
    margin: 6px 4px;
    transition: all 0.2s ease;
  }

  .mobile-quickbar svg {
    width: 21px;
    height: 21px;
    color: #8ebaff;
    stroke: currentColor;
  }

  .mobile-quickbar a:active {
    background: rgba(54, 118, 212, 0.2);
    color: #eaf2ff;
  }

  .mobile-quickbar a:active svg {
    color: #d8e7ff;
  }

  .copyright {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 8px;
    padding-bottom: 10px;
    font-size: 12px;
    line-height: 1.5;
  }

  .copyright a,
  .copyright span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
