/* ------------------------------------------------------------------
   公章管理页（/settings/）· 局部样式
   ------------------------------------------------------------------
   复用 public/settlement/style.css 与 interface.css（同一套设计变量、顶栏、
   .surface / .section-heading / .seal-toggle 等），这里只补本页专有的部分：
   素材预览、上传按钮、盖章效果缩略图。
   ------------------------------------------------------------------ */

.settings-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1180px;
}

.settings-surface { padding: 22px 24px 24px; }

.settings-status {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent-soft, #eaf3ff);
  color: var(--accent-dark, #0a4fa3);
  font-size: 12.5px;
  line-height: 1.6;
  min-height: 18px;
}
.settings-status:empty { display: none; }
.settings-status.is-error { background: #fdecec; color: #c0392b; }

/* ---------------------------- 素材行 ---------------------------- */
.asset-row {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.asset-preview {
  flex: 0 0 auto;
  width: 260px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px dashed var(--line-strong, #d3d3da);
  border-radius: 12px;
  background: var(--bg, #f5f5f7);
  overflow: hidden;
}
.asset-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.asset-preview.is-seal { width: 150px; height: 150px; background: #fff; }

.logo-placeholder {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #c9c9d2;                 /* 与单据页眉的文字占位同一个浅灰 */
  user-select: none;
}
.seal-placeholder {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #e0b4b4;
  user-select: none;
}

.asset-meta { flex: 1 1 320px; min-width: 280px; }
.asset-meta p { font-size: 13px; line-height: 1.7; color: var(--muted, #6b6b73); margin: 0 0 6px; }
.asset-hint { font-size: 12px; color: var(--muted-light, #96969e); line-height: 1.7; }

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

.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--line, #e6e6ea);
  background: #fff;
  font-size: 13px;
  color: var(--ink, #1d1d1f);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.upload-button:hover { border-color: var(--line-strong, #d3d3da); background: var(--bg, #f5f5f7); }
.upload-button.is-disabled { opacity: .5; cursor: not-allowed; }

.text-button.danger { color: #c0392b; }
.text-button.danger:hover { border-color: #f0c4c0; }

/* 白底红字的强烈提示（契约 §B 明文要求） */
.seal-warning {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-left: 3px solid #c0392b;
  border-radius: 8px;
  background: #fdecec;
  color: #9c2f22;
  font-size: 12.5px;
  line-height: 1.7;
}
.seal-warning strong { color: #c0392b; }

.seal-options {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line, #e6e6ea);
}

/* ---------------------------- 试试盖章效果 ---------------------------- */
.seal-preview-block { margin-top: 20px; }
.seal-preview-head h3 { font-size: 15px; margin: 0 0 6px; }
.seal-preview-head p { font-size: 12.5px; color: var(--muted, #6b6b73); margin: 0 0 12px; }

.seal-preview-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted, #6b6b73); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; background: #c9c9d2; display: inline-block; }
.legend-dot.is-cover { background: #c0392b; }
.legend-dot.is-final { background: #d9584a; }
.legend-dot.is-seam { background: #b03a2e; border-radius: 1px; }

.seal-preview-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px;
  border: 1px solid var(--line, #e6e6ea);
  border-radius: 12px;
  background: #ededf1;
}
.seal-preview-stage { display: flex; gap: 16px; align-items: flex-start; }
/* 缩略图外框：宽高由 settings.js 按缩放比写入，内部 .doc-page 用 transform 缩放 */
.seal-preview-frame { flex: 0 0 auto; overflow: hidden; background: #fff; box-shadow: 0 2px 10px #00000026; }
.seal-preview-frame > .doc-page { margin: 0; box-shadow: none; }

@media (max-width: 860px) {
  .asset-preview { width: 100%; height: 130px; }
  .asset-preview.is-seal { width: 150px; height: 150px; }
  .settings-surface { padding: 18px 16px 20px; }
}
