/* ============================================================
   编辑器 / 二级页面样式（**这个文件现在不含任何字体**）

   ⚠️ 2026-09-19 方案A：站点已彻底移除自托管网络字体。
   原因（实测）：首页首访 520.6 KB 里，字体占 322.9 KB = 62%，
   而真正用到它的只有首页 hero 大标题（思源宋体 Bold 的 c1/c2/c3 三片）。
   删掉后首屏约 198 KB（−62%），而且不用再维护"改文案要重新生成子集"。

   删除的东西：本文件原来的 `@import './fonts-shards.css'`、frontend/src/fonts-shards.css、
   frontend/public 下的 fonts 目录（36 个 woff2 ≈3.8 MB）。备份在仓库外：
     C:\Users\Administrator\Desktop\2026-09\fonts-backup-20260919\（含恢复步骤）
   重新引入前请先读那份 README，并跑 scripts/verify-font-policy.py（会红）。

   下面这些样式与字体无关：提醒弹窗、商品预览、回收站、交付页、订单交付信息、签到分页等。
   ============================================================ */

/* ============================================================
   编辑器工具栏：字体 / 字号 / 颜色
   ============================================================ */
.ge-tool-sep {
  width: 1px;
  align-self: stretch;
  margin: 2px 3px;
  background: var(--line, #dde5df);
}

.ge-tool-select,
.ge-tool-color {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 2px;
  white-space: nowrap;
}
.ge-tool-select > span,
.ge-tool-color > span {
  color: var(--muted, #66736d);
  font-size: 12px;
}
.ge-tool-select select {
  height: 28px;
  padding: 0 4px;
  border: 1px solid var(--line, #dde5df);
  border-radius: 6px;
  background: #fff;
  color: var(--ink, #101d18);
  font-size: 12px;
}
.ge-tool-color input[type='color'] {
  width: 34px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--line, #dde5df);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.ge-toolbar button.ge-tool-plain {
  font-weight: 700;
  color: #b63838;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-underline-offset: 2px;
}

/* ============================================================
   屏幕正中的提醒弹窗
   编辑器是全屏的，底部的 .error 小字经常被忽略，
   重要拦截改用这个弹窗，任何屏幕尺寸都居中显示。
   ============================================================ */
.modal.alert-modal {
  /* 手机端全局把 .modal 设成了 place-items:end center（贴底弹出），
     这里必须显式覆盖回正中，否则提醒会被塞到屏幕底部。 */
  place-items: center center;
  align-items: center;
  justify-items: center;
  padding: 20px;
  z-index: 60;
}
.alert-modal .panel.alert-panel {
  width: min(430px, calc(100vw - 32px));
  margin: 0;
  padding: 24px 24px 18px;
  border-top: 4px solid var(--gold, #c89b4b);
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 24px 60px rgba(5, 20, 14, 0.32);
  /* 只做淡入：居中弹窗加了位移/缩放动画，观感上会"没对准中心" */
  animation: alert-fade 0.16s ease-out;
}
.alert-modal .panel.alert-panel.tone-warn {
  border-top-color: #d98324;
}
.alert-modal .panel.alert-panel.tone-danger {
  border-top-color: var(--danger, #b63838);
}
.alert-title {
  margin: 0 0 10px;
  font-size: 19px;
  color: var(--ink, #101d18);
}
.alert-message {
  margin: 0 0 20px;
  color: #4b555c;
  font-size: 15px;
  line-height: 1.75;
}
.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.alert-actions .btn {
  min-height: 40px;
}
@keyframes alert-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================================
   商品预览：直接复用前台商品详情页的样式，按当前编辑内容渲染
   ============================================================ */
.modal.preview-modal {
  place-items: center center;
  align-items: center;
  justify-items: center;
  padding: 16px;
  z-index: 55;
}
.preview-modal .panel.product-preview-panel {
  width: min(1180px, 100%);
  height: min(92dvh, 100%);
  padding: 0;
  border-top: 0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper, #f5f7f3);
}
.preview-head {
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line, #dde5df);
}
.preview-head h2 {
  margin: 0 0 4px;
  font-size: 17px;
}
.preview-head .muted {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
}
.preview-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}
.preview-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper, #f5f7f3);
}
.preview-stage .product-detail-page {
  padding-bottom: 24px;
}

/* ============================================================
   后台「用户签到信息」分页
   ============================================================ */
.checkin-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 30px 16px;
  border-top: 1px solid #edf0f2;
}
.checkin-pager > span {
  color: #a0a7ac;
  font-size: 12px;
}
.checkin-pager > div {
  display: flex;
  gap: 10px;
  align-items: center;
}
.checkin-pager strong {
  color: #4b555c;
  font-size: 12.5px;
  font-weight: 600;
}
/* ============================================================
   交付页与订单列表：链接 / 提取码 + 一键复制
   用户反馈"要一个个手抄"，所以链接和提取码都直接列出来并配复制按钮。
   ============================================================ */
.delivery-code-panel {
  text-align: left;
}
.delivery-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px dashed var(--line, #dde5df);
}
.delivery-row:last-child {
  border-bottom: 0;
}
.delivery-label {
  flex: 0 0 auto;
  color: var(--muted, #66736d);
  font-size: 13px;
}
.delivery-value {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.delivery-link {
  overflow: hidden;
  color: var(--green, #155e46);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.delivery-code {
  color: var(--ink, #101d18);
  font-size: 20px;
  letter-spacing: 0.08em;
}
.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* 订单卡片里的交付信息 */
.order-delivery {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f8f6;
}
.order-delivery-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}
.order-delivery-row > span:first-child {
  flex: 0 0 44px;
  color: var(--muted, #66736d);
  font-size: 12.5px;
}
.order-delivery-link {
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--green, #155e46);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-delivery-code {
  flex: 1 1 auto;
  color: var(--ink, #101d18);
  font-size: 14px;
  letter-spacing: 0.08em;
}
.order-delivery-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line, #dde5df);
}
.copy-btn {
  white-space: nowrap;
}

@media (max-width: 650px) {
  .delivery-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .delivery-value {
    justify-content: space-between;
  }
}

html[data-theme='dark'] .order-delivery {
  background: #1b211e;
}
html[data-theme='dark'] .delivery-code,
html[data-theme='dark'] .order-delivery-code {
  color: #e8efeb;
}
html[data-theme='dark'] .delivery-link,
html[data-theme='dark'] .order-delivery-link {
  color: #7fd3ae;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) .order-delivery {
    background: #1b211e;
  }
  html:not([data-theme='light']) .delivery-code,
  html:not([data-theme='light']) .order-delivery-code {
    color: #e8efeb;
  }
  html:not([data-theme='light']) .delivery-link,
  html:not([data-theme='light']) .order-delivery-link {
    color: #7fd3ae;
  }
}

/* ============================================================
   交付设置说明（交付方式已固定为自动发货，不再有单选按钮）
   ============================================================ */
.ge-delivery-note {
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #eef4f0;
  color: #3c4a44;
  font-size: 12.5px;
  line-height: 1.65;
}
.ge-delivery-note b {
  color: var(--green, #155e46);
}

/* ============================================================
   商品回收站 / 批量删除
   ============================================================ */
.section-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.goods-admin-table .goods-check {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.modal.trash-modal {
  place-items: center center;
  align-items: center;
  justify-items: center;
  padding: 16px;
  z-index: 55;
}
.trash-modal .panel.trash-panel {
  width: min(1120px, 100%);
  max-height: 92dvh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 0;
  border-radius: 14px;
}
.trash-head {
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line, #dde5df);
}
.trash-head h2 {
  margin: 0 0 4px;
  font-size: 19px;
}
.trash-head .muted {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
}
.trash-toolbar {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #f6f7f7;
  border-bottom: 1px solid var(--line, #dde5df);
}
.trash-retention {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted, #66736d);
}
.trash-retention input {
  width: 82px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line, #dde5df);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #101d18);
}
.trash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.trash-modal #trashBody {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 24px 22px;
}
.trash-summary {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #eef4f0;
  color: #3c4a44;
  font-size: 13px;
  line-height: 1.7;
}
.trash-summary b {
  color: var(--green, #155e46);
}
.trash-table td {
  vertical-align: middle;
}
.trash-empty {
  padding: 46px 0;
  text-align: center;
  line-height: 2;
}

@media (max-width: 800px) {
  .trash-head {
    flex-direction: column;
    padding: 14px 16px 12px;
  }
  .trash-toolbar {
    padding: 10px 16px;
  }
  .trash-toolbar .trash-actions {
    width: 100%;
  }
  .trash-toolbar .trash-actions .btn {
    flex: 1 1 auto;
  }
  .trash-modal #trashBody {
    padding: 12px 16px 18px;
  }
  .section-head-actions {
    width: 100%;
  }
  .section-head-actions .btn {
    flex: 1 1 auto;
  }
}

/* 面板整体控制在 5 条的高度左右，翻页按钮始终可见 */
.order-activity-panel {
  display: flex;
  flex-direction: column;
}
.order-activity-panel .order-activity-list {
  flex: 1 1 auto;
  padding-top: 10px;
  padding-bottom: 10px;
}
.order-activity-panel .order-activity-item {
  padding: 12px 0;
}

@media (max-width: 720px) {
  .preview-head {
    flex-direction: column;
    padding: 12px 14px;
  }
  .preview-head-actions {
    width: 100%;
  }
  .preview-head-actions .btn {
    flex: 1 1 auto;
  }
  .checkin-pager {
    padding: 10px 16px 14px;
  }
}

/* ============================================================
   深色模式
   ============================================================ */
html[data-theme='dark'] .ge-tool-select select,
html[data-theme='dark'] .ge-tool-color input[type='color'] {
  background: #1b211e;
  border-color: #33403a;
  color: #e8efeb;
}
html[data-theme='dark'] .preview-head {
  background: #151b18;
  border-bottom-color: #2b3531;
}
html[data-theme='dark'] .preview-head h2 {
  color: #e8efeb;
}
html[data-theme='dark'] .alert-modal .panel.alert-panel {
  background: #151b18;
}
html[data-theme='dark'] .alert-title {
  color: #e8efeb;
}
html[data-theme='dark'] .alert-message {
  color: #b9c6c0;
}
html[data-theme='dark'] .checkin-pager {
  border-top-color: #2b3531;
}
/* 签到翻页那行的文字原来只有浅色值（#a0a7ac / #4b555c），深色下几乎看不见 ——
   深色模式审计（build/admin-dark-audit.mjs）报出来的最后 1 处。 */
html[data-theme='dark'] .checkin-pager > span { color: #8fa0b0 }
html[data-theme='dark'] .checkin-pager strong { color: #c3d0dc }
html[data-theme='dark'] .trash-toolbar {
  background: #1b211e;
  border-bottom-color: #2b3531;
}
html[data-theme='dark'] .trash-head {
  border-bottom-color: #2b3531;
}
html[data-theme='dark'] .trash-retention input {
  background: #121815;
  border-color: #33403a;
  color: #e8efeb;
}
html[data-theme='dark'] .trash-summary {
  background: #1b2621;
  color: #b9c6c0;
}
html[data-theme='dark'] .trash-summary b {
  color: #7fd3ae;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) .ge-tool-select select,
  html:not([data-theme='light']) .ge-tool-color input[type='color'] {
    background: #1b211e;
    border-color: #33403a;
    color: #e8efeb;
  }
  html:not([data-theme='light']) .preview-head {
    background: #151b18;
    border-bottom-color: #2b3531;
  }
  html:not([data-theme='light']) .preview-head h2 {
    color: #e8efeb;
  }
  html:not([data-theme='light']) .alert-modal .panel.alert-panel {
    background: #151b18;
  }
  html:not([data-theme='light']) .alert-title {
    color: #e8efeb;
  }
  html:not([data-theme='light']) .alert-message {
    color: #b9c6c0;
  }
  html:not([data-theme='light']) .checkin-pager {
    border-top-color: #2b3531;
  }
  html:not([data-theme='light']) .checkin-pager > span { color: #8fa0b0 }
  html:not([data-theme='light']) .checkin-pager strong { color: #c3d0dc }
  html:not([data-theme='light']) .trash-toolbar {
    background: #1b211e;
    border-bottom-color: #2b3531;
  }
  html:not([data-theme='light']) .trash-head {
    border-bottom-color: #2b3531;
  }
  html:not([data-theme='light']) .trash-retention input {
    background: #121815;
    border-color: #33403a;
    color: #e8efeb;
  }
  html:not([data-theme='light']) .trash-summary {
    background: #1b2621;
    color: #b9c6c0;
  }
  html:not([data-theme='light']) .trash-summary b {
    color: #7fd3ae;
  }
}

/* 订单卡片里的交付块（2026-09-26 站长：不折叠了，但按钮要小、间距要紧、整体简洁） */
.order-delivery {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--surface-sunken, var(--surface-4));
}
.order-delivery-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12.5px; }
.order-delivery-row > span:first-child { flex: 0 0 auto; min-width: 42px; color: var(--text-subtle); font-size: 12px; }
.order-delivery-link { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-delivery-code { margin-right: auto; }
/* 交付块里的按钮统一缩小：默认「复制」，一键复制也是 btn small */
.order-delivery .btn {
  min-height: 0;
  padding: 3px 9px;
  font-size: 12px;
  line-height: 1.35;
  border-radius: 6px;
}
.order-delivery-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border-soft); }
.order-delivery-foot .muted { font-size: 12px; }
