/* 后台 · 海报设计器 */

/* ---------- 顶部「表格 / 海报」切换 ---------- */
.kindbar {
  flex: none; height: 46px; display: flex; align-items: center; gap: 8px;
  padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line);
}
.kb {
  height: 30px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line);
  background: #fafbfc; cursor: pointer; font-size: 13px; color: var(--ink2);
}
.kb:hover { border-color: #b8bfcc; }
.kb.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.kb-tip { margin-left: 10px; font-size: 12px; color: var(--ink3); }

/* ---------- 三栏 ---------- */
.psplit {
  flex: 1; min-height: 0; display: flex; gap: 14px;
  padding: 14px 18px 18px;
}
.pside {
  width: 320px; flex: none; overflow: auto; padding: 14px 14px 20px;
}
.pstage {
  flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
}
.pprops {
  width: 286px; flex: none; overflow: auto; padding: 14px 14px 20px;
}
.row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.block-sel { width: 100%; margin-bottom: 10px; }

/* ---------- 画布 ---------- */
.pstage-bar {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.pstage-wrap {
  flex: 1; min-height: 0; display: grid; place-items: center;
  background:
    linear-gradient(45deg, #f6f7f9 25%, transparent 25%) 0 0/18px 18px,
    linear-gradient(-45deg, #f6f7f9 25%, transparent 25%) 0 9px/18px 18px,
    #fcfcfd;
  overflow: hidden; padding: 18px;
}
.pstage-wrap canvas { display: block; box-shadow: 0 8px 30px rgba(20, 30, 60, .14); }
.pstage-tip {
  flex: none; padding: 7px 12px; font-size: 11px; color: var(--ink3);
  border-top: 1px solid var(--line);
}

/* ---------- 元素列表 ---------- */
.ps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ps-item {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 9px; cursor: pointer;
  border: 1px solid transparent; border-radius: 8px; background: #fafbfc;
}
.ps-item:hover { background: #f4f6fa; }
.ps-item.on { background: var(--brand-soft); border-color: #c9d8ff; }
.ps-item b { font-size: 12px; font-weight: 600; flex: none; }
.ps-item span {
  font-size: 11px; color: var(--ink3); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 占位符 ---------- */
.ps-ph { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-phb {
  height: 26px; padding: 0 9px; font-size: 11px; border-radius: 7px;
  border: 1px solid #d9e2f7; background: #f4f8ff; color: #2b5cff; cursor: pointer;
}
.ps-phb:hover { background: #e8f0ff; }

/* ---------- 属性面板 ---------- */
.pp-empty { font-size: 12px; color: var(--ink3); line-height: 1.7; }
.pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 10px; }
.pp-grid label { font-size: 11px; }
.pp-grid input, .pp-grid select { height: 28px; font-size: 12px; }
.pp-full { grid-column: 1 / -1; }
.pp-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pp-row .btn.on { background: var(--brand-soft); border-color: #c9d8ff; color: var(--brand); font-weight: 600; }
#psProps textarea {
  width: 100%; margin-top: 5px; padding: 7px 9px; font: inherit; font-size: 12px;
  border: 1px solid #dcdfe6; border-radius: 8px; resize: vertical; outline: none;
}
#psProps textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43, 92, 255, .1); }
#psProps label { margin-bottom: 0; }
#psProps .hint { margin-top: 10px; }

/* ---------- 预览弹层 ---------- */
.modal-card.pvcard { width: 640px; max-height: 92vh; }
.pspv-box {
  margin-top: 10px; display: grid; place-items: center; overflow: auto;
  background: #f4f5f7; border-radius: 10px; padding: 12px;
}
.pspv-box img { max-width: 100%; max-height: 74vh; height: auto; box-shadow: 0 8px 30px rgba(20, 30, 60, .16); }
#psPvMeta { margin-bottom: 4px; }

@media (max-width: 1280px) {
  .pside { width: 280px; }
  .pprops { width: 250px; }
}

.side-empty { font-size: 12px; color: var(--ink3); line-height: 1.7; padding: 8px 2px; }
