/* ==========================================================================
   河北电信资费查询 · 极简数据风
   1. 设计令牌    2. 基础      3. 顶栏      4. 统计条   5. 工具条
   6. 分类 / 筛选 7. 数据表    8. 详情弹窗  9. 状态件   10. 响应式
   ========================================================================== */

/* ---------------------------------------------------------------- 1. 令牌 */
:root {
  color-scheme: light;

  --bg: #e8f1fb;            /* 页面底色 · 浅蓝 */
  --surface: #ffffff;       /* 面板 / 控件 */
  --surface-2: #f4f8fe;     /* 面板内次级区 */
  --bg-hover: #eef5fd;      /* 悬停 */
  --bg-blur: rgba(255, 255, 255, .84);

  --border: #d6e3f2;
  --border-2: #b9cde6;

  --text: #16233a;
  --text-2: #56698a;
  --text-3: #63779a;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #e3edfd;
  --accent-text: #1a56d6;

  --green: #0f7a44;
  --green-soft: #e2f6ea;
  --amber: #a8600a;
  --amber-soft: #fdf1dd;
  --violet: #6231c9;
  --violet-soft: #efeafd;
  --red: #b91c1c;
  --red-soft: #fdeeee;
  --warn-border: #eccfa1;

  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 10px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --shadow-pop: 0 12px 32px -8px rgba(22, 35, 58, .18), 0 2px 6px -2px rgba(22, 35, 58, .08);
  --maxw: 1240px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #080e1b;            /* 页面底色 · 深蓝黑 */
  --surface: #0f1729;
  --surface-2: #141e33;
  --bg-hover: #17223a;
  --bg-blur: rgba(15, 23, 41, .86);

  --border: #1f2c45;
  --border-2: #2e3f5e;

  --text: #eef3fb;
  --text-2: #9fb0cb;
  --text-3: #7b8db3;

  --accent: #4b8dfa;
  --accent-hover: #7caeff;
  --accent-soft: #14243f;
  --accent-text: #82b1ff;

  --green: #4ade80;
  --green-soft: #0c2317;
  --amber: #fbbf24;
  --amber-soft: #291d06;
  --violet: #a78bfa;
  --violet-soft: #1c1533;
  --red: #f87171;
  --red-soft: #291010;
  --warn-border: #4a3a12;

  --shadow-pop: 0 12px 32px -8px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .5);
}

/* ---------------------------------------------------------------- 2. 基础 */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd, dt, figure { margin: 0; }
button, input, select { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.ta-r { text-align: right; }

/* 数字统一等宽，便于列对齐 */
.stat strong,
.cell-price,
.cell-date,
.code-text,
.count,
.status {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- 3. 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-blur);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(12px);
}

.topbar-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  background: var(--accent);
}

.brand-mark svg { width: 17px; height: 17px; }

.brand-copy { display: grid; min-width: 0; }
.brand-copy strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.1px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-copy small { color: var(--text-3); font-size: 11px; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 360px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  background: var(--surface-2);
  font-size: 12px;
}

.status > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
}

.status.error i { background: var(--red); }

.icon-btn {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  background: var(--surface-2);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}

.icon-btn:hover { color: var(--text); background: var(--bg-hover); border-color: var(--border-2); }
.icon-btn svg { width: 15px; height: 15px; }

.ico { display: none; }
[data-theme-mode="auto"] .ico-auto { display: block; }
[data-theme-mode="light"] .ico-light { display: block; }
[data-theme-mode="dark"] .ico-dark { display: block; }

/* ------------------------------------------------------------- 4. 统计条 */
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.5fr);
  margin: 20px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.stat {
  min-width: 0;
  padding: 13px 16px;
  border-left: 1px solid var(--border);
}

.stat:first-child { border-left: 0; }

.stat strong {
  display: block;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.4px;
  line-height: 1.3;
}

.stat span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-meta strong { font-family: var(--font); font-size: 13px; font-weight: 600; }

/* 指标数字按语义着色，和表格里的渠道标签同色系 */
.stats > .stat:nth-child(1) strong { color: var(--text); }
.stats > .stat:nth-child(2) strong { color: var(--accent); }
.stats > .stat:nth-child(3) strong { color: var(--green); }
.stats > .stat:nth-child(4) strong { color: var(--violet); }
.stats > .stat:nth-child(5) strong { color: var(--amber); }

/* 零值不抢注意力，退回中性灰 */
.stats > .stat.is-zero strong { color: var(--text-3); }

/* ------------------------------------------------------------- 5. 工具条 */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.toolbar > .field { margin-left: auto; }

.search {
  position: relative;
  flex: 1 1 320px;
  max-width: 560px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .12s, box-shadow .12s;
}

.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search > svg { width: 15px; height: 15px; flex: none; color: var(--text-3); }

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.search kbd {
  flex: none;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  background: var(--surface-2);
  font: 500 10px var(--font);
}

.field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.field > span {
  color: var(--text-3);
  font-size: 12px;
  white-space: nowrap;
}

.field-grow { flex: 1; min-width: 0; }


.field select {
  height: 34px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9ba4' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 13px;
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  transition: border-color .12s, box-shadow .12s;
}

.field select:hover { border-color: var(--border-2); }
.field select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}

.btn:hover { color: var(--text); background: var(--bg-hover); border-color: var(--border-2); }

.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--bg-hover); border-color: transparent; }

.affix-input {
  display: inline-flex;
  align-items: center;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .12s, box-shadow .12s;
}

.affix-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.affix-input b { padding: 0 8px; color: var(--text-3); font-weight: 500; font-size: 12px; }
.affix-input i { padding: 0 9px 0 4px; color: var(--text-3); font-style: normal; font-size: 12px; }

.affix-input input {
  width: 62px;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.affix-input input::placeholder { color: var(--text-3); }
.affix-input input::-webkit-outer-spin-button,
.affix-input input::-webkit-inner-spin-button { margin: 0; appearance: none; }

/* ------------------------------------------------------- 6. 分类 / 筛选 */
.cats { margin-top: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  background: var(--surface);
  font-size: 12px;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}

.chip:hover { color: var(--text); background: var(--bg-hover); border-color: var(--border-2); }

.chip b {
  color: var(--text-3);
  font: 500 11px var(--mono);
  font-variant-numeric: tabular-nums;
}

.chip.active {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.chip.active b { color: var(--accent-text); opacity: .75; }

.chip-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--chip-color, var(--text-3));
}

.chip-toggle {
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  background: var(--surface);
  font-size: 12px;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}

.chip-toggle:hover { color: var(--text); background: var(--bg-hover); border-color: var(--border-2); }


.chip-toggle.active {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent-soft);
}


.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.filters-end {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.count {
  color: var(--text-2);
  font: 500 12px var(--mono);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  background: var(--accent-soft);
  font-size: 11px;
}

/* -------------------------------------------------------------- 7. 数据表 */
.table {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.table-head,
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 116px 148px 96px;
  align-items: center;
  gap: 16px;
}

.table-head {
  position: sticky;
  top: 56px;
  z-index: 10;
  height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: var(--text-3);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
}

.row {
  position: relative;
  min-height: 46px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .1s;
}

.table-body > .row:first-child { border-radius: 0; }

.table-body > .row:last-child {
  border-bottom: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.row:hover { background: var(--bg-hover); }
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.cell { min-width: 0; }

.cell-name {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--cat-color, var(--text-3));
}

.cell-name-text { min-width: 0; display: grid; gap: 1px; }

.row-title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  overflow: hidden;
  color: var(--text-3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-new {
  flex: none;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 600;
}

.cell-code {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.code-text {
  overflow: hidden;
  color: var(--text-2);
  font: 400 12px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  background: transparent;
  opacity: 0;
  cursor: pointer;
  transition: opacity .12s, color .12s, background .12s;
}

.row:hover .copy-btn,
.row:focus-within .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--accent-text); background: var(--accent-soft); }
.copy-btn svg { width: 13px; height: 13px; }

.cell-price { font: 500 13px var(--mono); }
.cell-price.muted { color: var(--text-3); font-weight: 400; }

.cell-channel { display: flex; flex-wrap: wrap; gap: 4px; }

.tag {
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  white-space: nowrap;
}

.tag.online { color: var(--green); background: var(--green-soft); }
.tag.offline { color: var(--violet); background: var(--violet-soft); }
.tag.change { color: var(--amber); background: var(--amber-soft); }
.tag.muted { color: var(--text-3); background: var(--bg-hover); }

.cell-date { color: var(--text-2); font: 400 12px var(--mono); }

/* ------------------------------------------------------------ 8. 详情弹窗 */
.dialog {
  width: min(880px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}

.dialog::backdrop { background: rgba(9, 9, 11, .48); backdrop-filter: blur(2px); }

.dialog-shell {
  position: relative;
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: var(--surface);
}

#detailContent { padding: 22px 24px 24px; }

.detail-hero {
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.detail-category-row { display: flex; flex-wrap: wrap; gap: 6px; }

.detail-category-row span {
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  background: var(--bg-hover);
  font-size: 11px;
}

.detail-hero h2 {
  padding-right: 40px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.3px;
  line-height: 1.35;
}

.detail-code-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.detail-code-wrap > span { color: var(--text-3); font-size: 11px; }

.detail-code-wrap code {
  overflow: hidden;
  color: var(--text);
  font: 500 12px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-code-wrap button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  background: var(--surface);
  font-size: 11px;
  cursor: pointer;
}

.detail-code-wrap button:hover { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); }
.detail-code-wrap button:disabled { opacity: .4; cursor: default; }
.detail-code-wrap button:hover:disabled { color: var(--text-2); border-color: var(--border); background: var(--surface); }
.detail-code-wrap button svg { width: 12px; height: 12px; }

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-summary-grid > div { padding: 10px 12px; background: var(--surface-2); }
.detail-summary-grid small { display: block; color: var(--text-3); font-size: 11px; }
.detail-summary-grid strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-statuses { display: flex; flex-wrap: wrap; gap: 6px; }

.detail-statuses .status-tag {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
}

.status-tag.online { color: var(--green); background: var(--green-soft); }
.status-tag.offline { color: var(--violet); background: var(--violet-soft); }
.status-tag.change { color: var(--amber); background: var(--amber-soft); }

.detail-sections { display: grid; gap: 20px; margin-top: 20px; }

.detail-section > h3 {
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-field {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 12px;
  background: var(--surface);
}

.detail-field.wide { grid-column: 1 / -1; }

/* 字段数为奇数时让最后一格通栏，避免右侧留下空白格 */
.detail-field:last-child:nth-child(odd) { grid-column: 1 / -1; }

.detail-field dt { color: var(--text-3); font-size: 12px; }

.detail-field dd {
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.detail-loading {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 56px 0;
  color: var(--text-3);
  font-size: 12px;
}

.detail-loading span {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- 9. 状态件 */
.today-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.today-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
}

.today-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.today-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.today-chip {
  max-width: 260px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  background: var(--surface);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color .12s, border-color .12s;
}

.today-chip:hover { color: var(--accent-text); border-color: var(--accent); }

.skeleton-row {
  height: 46px;
  margin: 0 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, transparent, var(--bg-hover) 40%, transparent 80%);
  background-size: 240px 100%;
  background-repeat: no-repeat;
  animation: shimmer 1.15s linear infinite;
}

@keyframes shimmer {
  from { background-position: -240px 0; }
  to { background-position: calc(100% + 240px) 0; }
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 56px 24px;
  text-align: center;
}

.empty-state strong { font-size: 13px; font-weight: 600; }
.empty-state span { color: var(--text-3); font-size: 12px; }

.retry-btn {
  margin-top: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  background: var(--surface);
  font-size: 12px;
  cursor: pointer;
}

.retry-btn:hover { color: var(--text); background: var(--bg-hover); border-color: var(--border-2); }

.load-more-btn {
  display: block;
  width: calc(100% - 28px);
  height: 36px;
  margin: 12px 14px;
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  color: var(--text-2);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  transition: color .12s, border-color .12s, background .12s;
}

.load-more-btn:hover { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); }

.site-footer {
  margin-top: 32px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--border);
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  color: var(--text-3);
  font-size: 11px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ 10. 响应式 */
@media (max-width: 1080px) {
  .table-head,
  .row { grid-template-columns: minmax(0, 1fr) 130px 104px 128px; }

  .table-head > :nth-child(5),
  .row > .cell-date { display: none; }

  .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stat-meta { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); }
}

@media (max-width: 860px) {
  .shell { padding: 0 16px; }

  .brand-copy small { display: none; }
  .status { max-width: 200px; }

  .filters { gap: 10px 14px; }
  .filters-end { margin-left: 0; width: 100%; justify-content: space-between; }

  .table-head,
  .row { grid-template-columns: minmax(0, 1fr) 104px 96px; gap: 12px; }

  .table-head > :nth-child(2),
  .row > .cell-code { display: none; }

  .detail-fields { grid-template-columns: 1fr; }
  .detail-field,
  .detail-field.wide { grid-column: 1; grid-template-columns: 88px minmax(0, 1fr); }

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

@media (max-width: 620px) {
  .brand-mark { width: 26px; height: 26px; }
  .brand-mark svg { width: 15px; height: 15px; }
  .status { max-width: 130px; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-top: 1px solid var(--border); }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(5) { grid-column: 1 / -1; }
  .stat-meta { grid-column: 1 / -1; }

  .toolbar { flex-wrap: wrap; }
  .search { flex: 1 1 100%; }
  .toolbar .field { flex: 1; }
  .toolbar .field select { width: 100%; }

  .filters { padding: 12px; }
  .filters .field { width: 100%; justify-content: space-between; }
  .field-grow { flex-wrap: wrap; }
  .chips-sm { flex: 1; justify-content: flex-end; }

  .table-head { display: none; }

  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 11px 12px;
  }

  .cell-name { grid-column: 1 / -1; }
  .cell-price { text-align: left; }
  .cell-channel { justify-content: flex-end; }
  .cell-date { display: none; }

  .load-more-btn { width: calc(100% - 24px); margin: 12px; }
  #detailContent { padding: 18px 16px 20px; }
  .dialog { width: calc(100vw - 16px); max-height: 92vh; }
}
