/* ============================================================
   时易发卡网 · 前台样式
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ink: #0d1b2c;
  --ink-soft: #35485f;
  --muted: #6d7f94;
  --line: #e4eaf1;
  --line-strong: #d3dce7;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --brand: #11395f;
  --brand-2: #0a2742;
  --accent: #1d64c4;
  --accent-soft: #eef4fd;
  --gold: #b08a4a;
  --ok: #0f7b5f;
  --ok-soft: #e8f6f1;
  --warn: #a9640d;
  --warn-soft: #fdf3e4;
  --danger: #b93b34;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(13, 27, 44, 0.06);
  --shadow-md: 0 2px 4px rgba(13, 27, 44, 0.04), 0 12px 32px -18px rgba(13, 27, 44, 0.28);
  --shadow-lg: 0 24px 60px -24px rgba(9, 22, 38, 0.4);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, "Courier New", monospace;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(29, 100, 196, 0.16);
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  z-index: 200;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ------------------------------- 顶部条 ------------------------------- */

.topbar {
  background: var(--brand-2);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 36px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
  flex: none;
}

.topbar-left .label {
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.topbar-left .sep {
  opacity: 0.35;
}

.topbar-notice {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 46vw;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}

.topbar-right a:hover {
  color: #fff;
}

/* ------------------------------- 头部 ------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  background: linear-gradient(145deg, #16456f 0%, #0a2440 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 14px -8px rgba(11, 42, 74, 0.9);
  font-family: "Songti SC", "STSong", "SimSun", serif;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 17px;
  letter-spacing: 0.04em;
  font-weight: 650;
}

.brand-text small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a,
.nav button {
  position: relative;
  padding: 8px 14px;
  border: 0;
  background: none;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 14.5px;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav a:hover,
.nav button:hover {
  color: var(--brand);
  background: #f2f5f9;
}

.nav a.active {
  color: var(--brand);
  font-weight: 600;
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--brand));
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  content: "";
  display: block;
  width: 16px;
  height: 1.6px;
  background: var(--ink-soft);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease;
}

.menu-btn span::before {
  position: absolute;
  top: -5px;
}

.menu-btn span::after {
  position: absolute;
  top: 5px;
}

/* ------------------------------- 按钮 ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    color 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #17518a 0%, #0d3459 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 10px 20px -12px rgba(13, 52, 89, 0.9);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #1a5c9c 0%, #10406c 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 14px 26px -14px rgba(13, 52, 89, 0.95);
}

.btn-outline {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn-outline:hover {
  border-color: #b9c6d6;
  color: var(--brand);
  background: #fbfcfe;
}

.btn-light {
  background: #fff;
  color: var(--brand);
  box-shadow: var(--shadow-md);
}

.btn-light:hover {
  background: #f7fafd;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13.5px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ------------------------------- 区块 ------------------------------- */

.section {
  padding: 46px 0 8px;
  scroll-margin-top: 90px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), var(--brand));
}

.section-desc {
  color: var(--muted);
  font-size: 13.5px;
  margin-left: 14px;
  font-weight: 400;
}

/* 筛选 */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13.5px;
  transition: all 0.16s ease;
}

.chip:hover {
  border-color: #b9c6d6;
  color: var(--brand);
}

.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 16px -12px rgba(17, 57, 95, 0.9);
}

.search-input {
  height: 36px;
  width: 190px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-input:focus {
  border-color: #9db6d2;
  box-shadow: 0 0 0 3px rgba(29, 100, 196, 0.1);
}

/* ------------------------------- 商品 ------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 18px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), #5f93c9 60%, transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.product:hover {
  transform: translateY(-3px);
  border-color: #cfdcea;
  box-shadow: var(--shadow-md);
}

.product:hover::before {
  opacity: 1;
}

.product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-cat {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.product h3 {
  font-size: 16.5px;
  font-weight: 620;
  letter-spacing: 0.02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  flex: none;
}

.badge-ok {
  color: var(--ok);
  background: var(--ok-soft);
}

.badge-warn {
  color: var(--warn);
  background: var(--warn-soft);
}

.badge-muted {
  color: var(--muted);
  background: #f1f4f8;
}

.product-sub {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.product-desc {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.product-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.product-foot > div:first-child {
  min-width: 0;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: var(--brand);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.price .cur {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.75;
}

.price .num {
  font-size: 25px;
  letter-spacing: -0.01em;
  line-height: 1;
}

.price .unit {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
}

.stock-line {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fbfcfe;
  padding: 54px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.empty strong {
  display: block;
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 6px;
}

/* ------------------------------- 公告 ------------------------------- */

.notice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.notice summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 14.5px;
  transition: background 0.16s ease;
}

.notice summary::-webkit-details-marker {
  display: none;
}

.notice summary:hover {
  background: #fafcfe;
}

.notice-tag {
  flex: none;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.notice-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-date {
  flex: none;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.notice summary .chev {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.notice[open] summary .chev {
  transform: rotate(180deg);
}

.notice-body {
  padding: 0 20px 20px;
  font-size: 13.8px;
  color: var(--ink-soft);
  white-space: pre-wrap;
  line-height: 1.8;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* ------------------------------- 查询订单 ------------------------------- */

.query-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px;
}

.query-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.query-form input {
  flex: 1 1 260px;
  height: 46px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #fcfdfe;
  outline: none;
  font-size: 14.5px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.query-form input:focus {
  border-color: #9db6d2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 100, 196, 0.1);
}

.query-form .btn {
  height: 46px;
  min-width: 120px;
}

.query-hint {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.query-results {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  animation: rise 0.28s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 20px;
  background: linear-gradient(180deg, #fbfdff, #f6f9fc);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.order-no {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.order-no b {
  color: var(--ink);
}

.order-body {
  padding: 18px 20px;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 22px;
}

.kv .k {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.kv .v {
  font-size: 14px;
  font-weight: 550;
  word-break: break-all;
}

.kv .v.money {
  color: var(--brand);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.secret-block {
  margin-top: 18px;
  border: 1px solid #dfe8f2;
  background: #f8fbff;
  border-radius: 11px;
  padding: 14px 16px;
}

.secret-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

.secret-list {
  display: grid;
  gap: 8px;
}

.secret-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
}

.secret-row code {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brand);
  word-break: break-all;
}

.icon-btn {
  flex: none;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 7px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}

.icon-btn:hover {
  border-color: #a9bdd4;
  color: var(--brand);
}

.order-tip {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* ------------------------------- 页脚 ------------------------------- */

.site-footer {
  margin-top: 64px;
  background: #0b2036;
  color: rgba(215, 230, 245, 0.62);
  font-size: 13px;
}

.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 0 30px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
}

.footer-brand .brand-mark {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.footer-brand-text b {
  display: block;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.footer-brand-text span {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: rgba(215, 230, 245, 0.45);
  text-transform: uppercase;
}

.footer-note {
  flex: 1 1 260px;
  max-width: 380px;
  font-size: 12.5px;
  line-height: 1.85;
  color: rgba(215, 230, 245, 0.5);
}

.footer-links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.footer-bottom a {
  color: rgba(215, 230, 245, 0.55);
}

.footer-bottom a:hover {
  color: #fff;
}

/* ------------------------------- 弹窗 ------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 21, 35, 0.5);
  backdrop-filter: blur(3px);
  animation: fade 0.2s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-card.wide {
  max-width: 620px;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.modal-head p {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.modal-close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.modal-close:hover {
  color: var(--ink);
  background: #f5f7fa;
}

.modal-body {
  padding: 20px 22px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
  flex-wrap: wrap;
}

.field {
  margin-bottom: 16px;
}

.field:last-child {
  margin-bottom: 0;
}

.field > label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 7px;
  font-weight: 550;
}

.field .req {
  color: var(--danger);
  margin-left: 2px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="password"],
.field textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fcfdfe;
  outline: none;
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field textarea {
  height: auto;
  min-height: 88px;
  padding: 11px 14px;
  resize: vertical;
  line-height: 1.7;
}

.field input:focus,
.field textarea:focus {
  border-color: #9db6d2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 100, 196, 0.1);
}

.field .hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.qty button {
  width: 42px;
  height: 44px;
  border: 0;
  background: #fff;
  color: var(--ink-soft);
  font-size: 17px;
  transition: background 0.15s ease;
}

.qty button:hover {
  background: #f2f6fa;
}

.qty input {
  width: 64px;
  height: 44px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.channel-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.channel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13.5px;
  transition: all 0.16s ease;
}

.channel input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.channel .dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.6px solid #c3cfdd;
  flex: none;
  position: relative;
  transition: all 0.16s ease;
}

.channel input:checked ~ .dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: inset 0 0 0 3px #fff;
}

.channel:has(input:checked) {
  border-color: var(--brand);
  background: #f6faff;
  box-shadow: 0 0 0 3px rgba(17, 57, 95, 0.07);
}

.channel .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.total-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.total-line strong {
  font-size: 22px;
  color: var(--brand);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.form-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fdecea;
  border: 1px solid #f6cfcb;
  color: var(--danger);
  font-size: 13px;
}

.form-error[hidden] {
  display: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
}

.status-pending {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-paid {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-partial {
  background: #fdecea;
  color: var(--danger);
}

.status-closed {
  background: #f1f4f8;
  color: var(--muted);
}

/* ------------------------------- 提示 ------------------------------- */

.toast-wrap {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: grid;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.toast {
  padding: 11px 18px;
  border-radius: 10px;
  background: #0d2c4a;
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 16px 34px -18px rgba(9, 22, 38, 0.8);
  animation: toastIn 0.22s ease;
}

.toast.err {
  background: #a32f28;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, #eef2f7 30%, #f7f9fc 50%, #eef2f7 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
  min-height: 176px;
}

@keyframes shimmer {
  from {
    background-position: 140% 0;
  }
  to {
    background-position: -40% 0;
  }
}

/* ------------------------------- 响应式 ------------------------------- */

@media (max-width: 820px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 10px 16px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -22px rgba(13, 27, 44, 0.4);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav a,
  .nav button {
    padding: 12px 14px;
    text-align: left;
    border-radius: 8px;
  }

  .nav a.active::after {
    display: none;
  }

  .header-inner {
    position: relative;
    height: 62px;
    gap: 14px;
  }

  .menu-btn {
    display: inline-flex;
    margin-left: auto;
  }

  .header-cta .btn {
    display: none;
  }

  .topbar-notice {
    max-width: 40vw;
  }

  .topbar-right .hide-sm {
    display: none;
  }

  .section {
    padding-top: 38px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .toolbar {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

  .footer-main {
    padding: 32px 0 22px;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }

  .brand-text small {
    display: none;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .notice-grid {
    grid-template-columns: 1fr;
  }

  .query-panel {
    padding: 18px;
  }

  .query-form .btn {
    width: 100%;
  }

  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-card {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
  }

  .modal-foot {
    position: sticky;
    bottom: 0;
  }

  .channel-list {
    grid-template-columns: 1fr 1fr;
  }

  .footer-links {
    gap: 18px;
  }

  .topbar-inner {
    font-size: 12px;
  }

  .topbar-notice {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
