/* 画册明信片 · 参考图工作台 样式（复用 app.css 主题变量） */

.photo-body { background: linear-gradient(180deg, var(--navy-darker) 0%, var(--black) 100%); min-height: 100vh; }

.photo-header { gap: 16px; }
.photo-actions { display: flex; gap: 8px; align-items: center; }
.photo-actions .btn { text-decoration: none; display: inline-flex; align-items: center; }

.photo-main {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 32px 40px;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
}

.photo-panel { padding: 4px 0 12px; max-height: calc(100vh - 130px); overflow-y: auto; }
.psec { padding: 18px 20px; border-bottom: 1px solid var(--glass-border); }
.psec:last-child { border-bottom: 0; }
.psec-title { font-size: 12px; letter-spacing: 1px; color: var(--ink-3); margin-bottom: 12px; }

/* 上传槽 */
.drop-slot {
  display: block;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  overflow: hidden;
}
.drop-slot:hover, .drop-slot.dragover { border-color: var(--blue-accent); background: rgba(59,125,216,0.08); }
.slot-inner { display: flex; align-items: center; gap: 12px; padding: 10px; }
.slot-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--glass-border); }
.slot-hint { display: flex; flex-direction: column; gap: 2px; }
.slot-name { font-size: 13px; color: var(--ink); }
.slot-desc { font-size: 11px; color: var(--ink-3); }
.drop-slot.filled .slot-desc { color: var(--blue-accent); }

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

/* 表单 */
.field { margin-top: 12px; }
.field.row { display: flex; align-items: center; gap: 10px; }
.field-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.field.row .field-label { margin-bottom: 0; }
input[type="range"] { width: 100%; accent-color: var(--blue-accent); }
input[type="color"] { width: 34px; height: 26px; padding: 0; border: 1px solid var(--glass-border); border-radius: 6px; background: transparent; }

.text-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
}
.text-input:focus { border-color: var(--blue-accent); }
.serif-input { font-family: "Didot", "Georgia", "Songti SC", serif; letter-spacing: 1px; }
.sel {
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  font-size: 13px;
}

/* 分段选择 */
.seg-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-chip {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-2);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
}
.seg-chip.active { background: linear-gradient(180deg, var(--navy-light), var(--navy)); color: #fff; border-color: rgba(59,125,216,0.5); }

.prompt-box {
  width: 100%;
  height: 132px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--glass-border);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  font-family: var(--font-sans);
}

/* 预览舞台 */
.photo-stage-wrap {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stage-bar { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.stage { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
#card-canvas {
  max-width: 100%;
  max-height: calc(100vh - 240px);
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.95);
  background: #111;
}
.stage-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }

@media (max-width: 1000px) {
  .photo-main { grid-template-columns: 1fr; padding: 16px; }
  .photo-panel { max-height: none; }
  #card-canvas { max-height: 70vh; }
}

/* ============ 批量明信片 ============ */
.batch-main {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 32px 40px;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
}
.batch-side { max-height: calc(100vh - 130px); overflow-y: auto; }
.batch-list-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.batch-bar { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--ink-3); }
.batch-list { display: flex; flex-direction: column; gap: 12px; }
.batch-empty {
  padding: 60px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
  border: 1px dashed var(--glass-border);
  border-radius: var(--r-lg);
}
.batch-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 34px;
  gap: 14px;
  padding: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  backdrop-filter: var(--glass-blur);
}
.row-thumb { position: relative; }
.row-thumb canvas { width: 100%; height: auto; border-radius: 4px; display: block; }
.row-badge {
  position: absolute; left: 6px; bottom: 6px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px;
  background: rgba(0,0,0,0.55);
}
.row-badge.ok { color: #8fe3a8; }
.row-badge.warn { color: #ffc46b; }
.row-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.row-file { font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-ink { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-del {
  align-self: start;
  width: 28px; height: 28px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-3);
  border: 1px solid var(--glass-border);
}
.row-del:hover { color: #fff; border-color: rgba(255,120,120,0.5); }
.pair-note { margin-top: 10px; font-size: 11px; color: var(--ink-3); line-height: 1.7; }

@media (max-width: 1000px) {
  .batch-main { grid-template-columns: 1fr; padding: 16px; }
  .batch-side { max-height: none; }
}

/* 导入按钮 */
.slot-btn { margin-left: auto; flex: none; white-space: nowrap; }
.slot-inner { align-items: center; }
.bulk-link { margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.bulk-link a { color: var(--blue-accent); text-decoration: none; }

/* 导入按钮 */
.slot-btn { margin-left: auto; flex: none; white-space: nowrap; }
.slot-inner { align-items: center; }
.bulk-link { margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.bulk-link a { color: var(--blue-accent); text-decoration: none; }

/* 文件输入：透明覆盖整个槽，点哪都能选 */
.drop-slot { position: relative; }
.file-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* 文件输入：透明覆盖整个槽，点哪都能选 */
.drop-slot { position: relative; }
.file-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
