/* ===== 蓝夹缬验印页 ===== */
/* 以 "印章落款" 为意象：紧凑、庄重、蓝白分明 */

.container { max-width: 1080px; margin: 0 auto; }
main.container { padding: 22px 28px 28px; }

/* ===== 验印展板 ===== */
.verify-board {
  position: relative;
  padding: 28px;
  border-radius: 24px;
  background:
    radial-gradient(900px 520px at 18% 10%, rgba(31, 67, 116, 0.14), transparent 58%),
    radial-gradient(900px 520px at 86% 14%, rgba(119, 64, 26, 0.10), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.80));
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.verify-board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 26px 26px, rgba(31, 67, 116, 0.22) 0 1px, transparent 1px),
    radial-gradient(circle at 26px 26px, rgba(119, 64, 26, 0.08) 0 2px, transparent 2px),
    linear-gradient(90deg, rgba(31, 67, 116, 0.12) 0 14px, transparent 14px calc(100% - 14px), rgba(31, 67, 116, 0.12) calc(100% - 14px) 100%),
    linear-gradient(0deg, rgba(31, 67, 116, 0.10) 0 14px, transparent 14px calc(100% - 14px), rgba(31, 67, 116, 0.10) calc(100% - 14px) 100%);
  opacity: 0.72;
}

.verify-board::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 18px;
  pointer-events: none;
  border: 1px dashed rgba(31, 67, 116, 0.22);
  opacity: 0.9;
}

.verify-board > * { position: relative; z-index: 1; }

/* ===== 头部：精简 ===== */
.board-header {
  text-align: center;
  padding: 0 10px 22px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: rgba(31, 67, 116, 0.82);
}

.board-header h1 {
  margin: 10px 0 0;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.subtitle {
  margin: 8px auto 0;
  max-width: 600px;
  color: var(--text-soft);
  line-height: 1.8;
  font-size: 14px;
}

/* ===== 双栏布局：上传 + 预览 ===== */
.verify-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* ===== 面板通用 ===== */
.verify-panel {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(31, 67, 116, 0.14);
  box-shadow: var(--shadow-md);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.verify-panel::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(31, 67, 116, 0.16);
  pointer-events: none;
  opacity: 0.8;
}

.verify-panel > * { position: relative; z-index: 1; }

.card-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 900;
  color: var(--ink-2);
  letter-spacing: 0.06em;
}

/* ===== 上传区域：大 + 醒目 ===== */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: 2px dashed rgba(31, 67, 116, 0.24);
  border-radius: 16px;
  background: rgba(248, 246, 242, 0.50);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-zone:hover {
  border-color: var(--ink-4);
  background: rgba(248, 246, 242, 0.70);
}

.upload-zone-icon { margin-bottom: 12px; opacity: 0.8; }

.upload-zone-text {
  color: var(--ink-2);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

.upload-zone-hint {
  color: var(--text-muted);
  font-size: 13px;
}

.input-hidden { display: none; }

/* 文件信息 */
.file-info {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(244, 240, 230, 0.60);
  font-size: 13px;
  display: flex;
  gap: 6px;
}

.file-label { color: var(--text-muted); }
.file-name { color: var(--ink-2); font-weight: 700; word-break: break-all; }

/* ===== 按钮组 ===== */
.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  appearance: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.06em;
  transition: transform 0.12s ease, filter 0.12s ease, background-color 0.18s ease, border-color 0.18s ease;
  border: none;
  flex: 1;
  text-align: center;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  border: 1px solid rgba(12, 30, 58, 0.22);
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(7, 21, 49, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-icon { font-size: 14px; opacity: 0.8; }

.btn-ghost {
  border: 1px solid rgba(31, 67, 116, 0.20);
  background: rgba(255, 255, 255, 0.70);
  color: var(--ink-2);
}

.btn-ghost:hover { background: rgba(31, 67, 116, 0.06); }

/* ===== 提示 ===== */
.board-tip {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(244, 240, 230, 0.50);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.tip-icon { flex-shrink: 0; opacity: 0.6; }

/* ===== 预览面板 ===== */
.preview-panel { display: flex; flex-direction: column; }

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

.verify-stamp {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 67, 116, 0.16);
  background: linear-gradient(180deg, rgba(244, 240, 230, 0.90), rgba(244, 240, 230, 0.76));
  color: rgba(31, 67, 116, 0.92);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.10em;
  white-space: nowrap;
}

.preview-frame {
  flex: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(31, 67, 116, 0.16);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.94), transparent 60%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(238, 244, 251, 0.92));
  min-height: 280px;
  display: grid;
  place-items: center;
}

.preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 无 src 时隐藏 img，避免浏览器显示裂图图标 */
.preview-image[src=""],
.preview-image:not([src]) {
  display: none;
}

/* 预览占位 */
.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
}

.preview-placeholder[hidden] { display: none; }

.preview-placeholder-text {
  color: #8aa3c4;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ===== 结果面板：横向布局 ===== */
.result-panel {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(31, 67, 116, 0.14);
  box-shadow: var(--shadow-md);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.result-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18px 18px, rgba(31, 67, 116, 0.16) 0 10px, transparent 10px),
    radial-gradient(circle at calc(100% - 18px) 18px, rgba(31, 67, 116, 0.10) 0 10px, transparent 10px),
    radial-gradient(circle at 18px calc(100% - 18px), rgba(31, 67, 116, 0.10) 0 10px, transparent 10px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), rgba(31, 67, 116, 0.16) 0 10px, transparent 10px);
  opacity: 0.50;
}

.result-panel > * { position: relative; z-index: 1; }

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

.result-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(31, 67, 116, 0.18);
  background: linear-gradient(180deg, rgba(244, 240, 230, 0.92), rgba(244, 240, 230, 0.78));
  color: rgba(31, 67, 116, 0.92);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.08);
}

.result-pill.ok { background: rgba(220, 252, 231, 0.90); color: #15803d; border-color: rgba(22, 163, 74, 0.24); }
.result-pill.fail { background: rgba(254, 226, 226, 0.92); color: #b91c1c; border-color: rgba(185, 28, 28, 0.28); }

/* 结果列表：横向排列 */
.result-body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

.result-field {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(31, 67, 116, 0.10);
  background: rgba(248, 246, 242, 0.60);
}

.result-field:last-child { grid-column: 1 / -1; }

.result-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-bottom: 6px;
}

.result-value {
  display: block;
  font-size: 14px;
  color: var(--text-main);
  word-break: break-all;
}

.result-value.error { color: #dc2626; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.result-error { margin-top: 6px; }

/* ===== 图库选择器 ===== */
.library-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.library-picker-modal[hidden] { display: none !important; }

.library-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 15, 32, 0.62);
  backdrop-filter: blur(6px);
}

.library-picker-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(86vh, 860px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(248, 250, 255, 0.98);
  border: 1px solid rgba(24, 49, 87, 0.12);
  box-shadow: var(--shadow-lg);
}

.library-picker-head, .library-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.library-picker-head h3 { margin: 0; font-size: 18px; color: var(--text-main); }
.library-picker-status { color: var(--text-muted); font-size: 13px; }

.library-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: 56vh;
  overflow: auto;
}

.library-picker-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid rgba(20, 35, 61, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px;
  cursor: pointer;
  font: inherit;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.library-picker-card:hover, .library-picker-card.is-selected {
  transform: translateY(-2px);
  border-color: rgba(31, 67, 116, 0.38);
  box-shadow: 0 10px 20px rgba(20, 35, 61, 0.12);
}

.library-picker-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(226, 234, 246, 0.9);
}

.library-picker-card-name {
  margin-top: 6px;
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  .verify-board { padding: 20px; }
  .verify-layout { grid-template-columns: 1fr; }
  .board-header h1 { font-size: 28px; }
  .result-body { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .btn-group { flex-direction: column; }
}
