/* ============ Visual Editor Layout ============ */
.ve-editor {
  display: flex; flex-direction: column;
  height: calc(100vh - 120px); min-height: 600px;
  background: var(--admin-bg, #f5f7fa);
  border-radius: var(--admin-radius, 8px);
  overflow: hidden; border: 1px solid var(--admin-border);
}
.ve-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--admin-card-bg, #fff);
  border-bottom: 1px solid var(--admin-border); gap: 12px; flex-shrink: 0;
}
.ve-toolbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ve-toolbar__right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ve-toolbar__page-name {
  font-weight: 600; font-size: 14px; color: var(--admin-text);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ve-toolbar__mode { display: flex; gap: 2px; background: var(--admin-bg, #f5f7fa); border-radius: 6px; padding: 2px; }
.ve-toolbar__mode-tab {
  padding: 4px 12px; font-size: 12px; border: none; background: transparent;
  border-radius: 4px; cursor: pointer; color: var(--admin-text-secondary); transition: all .12s;
}
.ve-toolbar__mode-tab.is-active { background: #fff; color: var(--admin-primary, #0078d4); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.ve-toolbar__hint { font-size: 12px; color: var(--admin-text-secondary); display: flex; align-items: center; gap: 4px; }
.ve-toolbar__hint.is-dirty { color: var(--admin-warning, #f59e0b); }
.ve-toolbar__divider { width: 1px; height: 20px; background: var(--admin-border); }

.ve-main { display: flex; flex: 1; overflow: hidden; min-height: 0; }

/* Left: Page Tree */
.ve-left {
  width: 240px; flex-shrink: 0; background: var(--admin-card-bg, #fff);
  border-right: 1px solid var(--admin-border); display: flex; flex-direction: column; overflow: hidden;
}
.ve-left__header { padding: 10px 12px; border-bottom: 1px solid var(--admin-border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.ve-left__title { font-size: 13px; font-weight: 600; color: var(--admin-text); display: flex; align-items: center; gap: 6px; }
.ve-left__new-btn { width: 24px; height: 24px; border: 1px solid var(--admin-border); background: #fff; border-radius: 4px; cursor: pointer; color: var(--admin-primary, #0078d4); display: flex; align-items: center; justify-content: center; }
.ve-left__new-btn:hover { background: var(--admin-primary-bg, rgba(0,120,212,0.06)); }
.ve-left__search { padding: 8px 12px; border-bottom: 1px solid var(--admin-border); flex-shrink: 0; }
.ve-left__search input { width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--admin-border); border-radius: 6px; background: var(--admin-bg, #f5f7fa); font-size: 13px; outline: none; transition: border-color .15s; }
.ve-left__search input:focus { border-color: var(--admin-primary, #0078d4); background: #fff; }
.ve-left__tree { flex: 1; overflow-y: auto; padding: 8px; }
.ve-tree-group { margin-bottom: 4px; }
.ve-tree-group__title { display: flex; align-items: center; padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--admin-text-secondary); text-transform: uppercase; letter-spacing: .5px; cursor: pointer; user-select: none; }
.ve-tree-group__arrow { margin-right: 4px; transition: transform .15s; font-size: 10px; }
.ve-tree-group.is-collapsed .ve-tree-group__arrow { transform: rotate(-90deg); }
.ve-tree-group.is-collapsed .ve-tree-group__children { display: none; }
.ve-tree-item { display: flex; align-items: center; padding: 6px 8px 6px 20px; border-radius: 6px; cursor: pointer; transition: all .12s; font-size: 13px; color: var(--admin-text); gap: 6px; }
.ve-tree-item:hover { background: var(--admin-primary-bg, rgba(0,120,212,0.06)); }
.ve-tree-item.is-active { background: var(--admin-primary-bg, rgba(0,120,212,0.1)); color: var(--admin-primary, #0078d4); font-weight: 500; }
.ve-tree-item__icon { font-size: 14px; color: var(--admin-text-secondary); flex-shrink: 0; }
.ve-tree-item.is-active .ve-tree-item__icon { color: var(--admin-primary, #0078d4); }
.ve-tree-item__label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ve-tree-item__badge { font-size: 11px; padding: 1px 6px; border-radius: 8px; background: var(--admin-bg, #f5f7fa); color: var(--admin-text-secondary); }
.ve-tree-item__badge.has-data { background: #d1fae5; color: #065f46; }
.ve-tree-item__switch { transform: scale(0.8); }
.ve-tree-item__del { width: 20px; height: 20px; display: none; align-items: center; justify-content: center; border: none; background: transparent; color: var(--admin-text-placeholder); cursor: pointer; border-radius: 4px; flex-shrink: 0; font-size: 12px; }
.ve-tree-item:hover .ve-tree-item__del { display: flex; }
.ve-tree-item__del:hover { background: rgba(239,68,68,0.1); color: var(--admin-danger, #ef4444); }
.ve-tree-empty { padding: 24px 16px; text-align: center; color: var(--admin-text-placeholder); font-size: 13px; }
.ve-tree-empty i { font-size: 32px; display: block; margin-bottom: 8px; color: var(--admin-text-placeholder); }

/* Center */
.ve-center { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; background: var(--admin-bg, #f5f7fa); }
.ve-canvas-header { padding: 8px 16px; background: var(--admin-card-bg, #fff); border-bottom: 1px solid var(--admin-border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 8px; }
.ve-canvas-tabs { display: flex; gap: 4px; }
.ve-canvas-tab { padding: 5px 12px; font-size: 12px; border: 1px solid var(--admin-border); border-radius: 16px; cursor: pointer; transition: all .12s; background: var(--admin-bg, #f5f7fa); color: var(--admin-text-secondary); }
.ve-canvas-tab:hover { border-color: var(--admin-primary); color: var(--admin-primary); }
.ve-canvas-tab.is-active { background: var(--admin-primary, #0078d4); color: #fff; border-color: var(--admin-primary); }
.ve-datasource-hint { font-size: 12px; color: var(--admin-warning, #f59e0b); display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.ve-canvas-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ve-center__body { flex: 1; overflow: auto; padding: 20px; display: flex; justify-content: center; align-items: flex-start; }

/* Canvas mode */
.ve-canvas { width: 100%; max-width: 960px; min-height: 400px; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); position: relative; transition: all .15s; }
.ve-canvas.is-drag-over { box-shadow: 0 0 0 2px var(--admin-primary, #0078d4); background: var(--admin-primary-bg, rgba(0,120,212,0.03)); }

/* 拖拽插入指示器：在目标 skeleton 元素的上/下边显示蓝色插入线 */
.ve-skeleton.is-drop-before { box-shadow: 2px 0 0 0 var(--admin-primary, #0078d4), 0 -3px 0 0 var(--admin-primary, #0078d4); }
.ve-skeleton.is-drop-after { box-shadow: 2px 0 0 0 var(--admin-primary, #0078d4), 0 3px 0 0 var(--admin-primary, #0078d4); }
.ve-skeleton.is-dragging { opacity: 0.4; border-style: dashed !important; }
.ve-canvas__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; color: var(--admin-text-placeholder); padding: 40px 20px; text-align: center; }
.ve-canvas__empty i { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.ve-canvas__empty p { font-size: 14px; margin-bottom: 4px; }
.ve-canvas__empty span { font-size: 12px; color: var(--admin-text-placeholder); }
.ve-content-collapse { width: 100%; max-width: 960px; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 12px; overflow: hidden; }
.ve-content-collapse__head { padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--admin-text); }
.ve-content-collapse__head i { transition: transform .15s; }
.ve-content-collapse.is-collapsed .ve-content-collapse__head i { transform: rotate(-90deg); }
.ve-content-collapse__body { padding: 0 14px 14px; display: block; }
.ve-content-collapse.is-collapsed .ve-content-collapse__body { display: none; }

.ve-component { position: relative; padding: 8px 12px; margin: 4px 0; border: 1px solid transparent; border-radius: 6px; background: #fff; cursor: pointer; transition: all .12s; }
.ve-component:hover { border-color: var(--admin-primary-light, #4da3e8); background: var(--admin-primary-bg, rgba(0,120,212,0.02)); }
.ve-component.is-selected { border-color: var(--admin-primary, #0078d4); background: var(--admin-primary-bg, rgba(0,120,212,0.05)); box-shadow: 0 0 0 2px rgba(0,120,212,0.15); }
.ve-component__handle { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); cursor: grab; color: var(--admin-text-placeholder); font-size: 12px; opacity: 0; transition: opacity .12s; }
.ve-component:hover .ve-component__handle, .ve-component.is-selected .ve-component__handle { opacity: 1; }
.ve-component__actions { position: absolute; top: 4px; right: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; background: rgba(255,255,255,0.9); border-radius: 4px; padding: 1px; }
.ve-component:hover .ve-component__actions, .ve-component.is-selected .ve-component__actions { opacity: 1; }
.ve-component__action { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; border-radius: 4px; cursor: pointer; color: var(--admin-text-secondary); transition: all .12s; font-size: 13px; }
.ve-component__action:hover { background: var(--admin-primary-bg, rgba(0,120,212,0.1)); color: var(--admin-primary, #0078d4); }
.ve-component__action.is-danger:hover { background: rgba(239,68,68,0.1); color: var(--admin-danger, #ef4444); }
.ve-component__type-tag { font-size: 10px; color: var(--admin-text-placeholder); padding: 0 4px; }
.ve-component__preview {
  /* 在 .ve-component__preview 作用域内注入前台主题 CSS 变量
     使 preview() 可以直接复用前台 class（card/feature-ico/link-more 等）
     对齐 static/css/style.css :root 变量 */
  --c-primary: #0c4a6e;
  --c-primary-deep: #082f49;
  --c-primary-soft: #e0f2fe;
  --c-primary-soft-2: #bae6fd;
  --c-grad-soft: linear-gradient(135deg, #e0f2fe 0%, #cffafe 100%);
  --c-muted: #64748b;
  --c-text: #0f172a;
  --c-card: #ffffff;
  --c-bg-soft: #f8fafc;
  --fs-sm: 0.85rem;
  --sp-xs: 8px; --sp-md: 16px; --sp-lg: 24px; --sp-xl: 40px;
  --r-md: 12px; --r-lg: 22px; --r-pill: 9999px;
  --sh-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --sh-md: 0 6px 18px rgba(15, 23, 42, 0.08);
  --sh-hover: 0 16px 40px rgba(8, 145, 178, 0.18);
  font-size: 14px; color: var(--c-text); line-height: 1.6;
}
/* === 前台组件样式镜像（作用域限定在 .ve-component__preview 内） === */
.ve-component__preview .card {
  background: var(--c-card); border-radius: var(--r-lg); padding: var(--sp-lg);
  box-shadow: var(--sh-sm); border: 1px solid rgba(15,23,42,0.04);
}
.ve-component__preview .card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); }
.ve-component__preview .feature-card { padding: var(--sp-xl) var(--sp-lg); text-align: left; display: flex; flex-direction: column; }
.ve-component__preview .feature-ico {
  width: 56px; height: 56px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--c-grad-soft); color: var(--c-primary); margin-bottom: var(--sp-md);
  flex-shrink: 0;
}
.ve-component__preview .feature-ico svg { width: 28px; height: 28px; }
.ve-component__preview .feature-card h3 { margin: 0 0 10px; font-size: 1.1rem; font-weight: 700; color: var(--c-text); }
.ve-component__preview .feature-card p { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); line-height: 1.7; }
.ve-component__preview .link-more {
  display: inline-flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 14px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--c-primary);
}
.ve-component__preview .link-more svg { width: 16px; height: 16px; }
.ve-component__preview a.feature-card { text-decoration: none; color: inherit; }
.ve-component__preview .price-amount {
  font-size: 1.5rem; font-weight: 800; color: var(--c-primary); margin: 8px 0;
}
.ve-component__preview .price-features { list-style: none; padding: 0; margin: 16px 0 0; font-size: var(--fs-sm); line-height: 1.8; }
.ve-component__preview .price-features li { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ve-component__preview .price-features .ck {
  display: inline-flex; width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-primary); color: #fff; align-items: center; justify-content: center; flex-shrink: 0;
}
.ve-component__preview .price-features .ck svg { width: 10px; height: 10px; }

/* testimonial (quote) */
.ve-component__preview .testimonials-grid { display: grid; gap: 24px; }
.ve-component__preview .testimonial-card {
  background: var(--c-card); border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--sh-sm); border: 1px solid rgba(15,23,42,0.04);
}
.ve-component__preview .tc-rating { color: #fbbf24; display: flex; gap: 3px; margin-bottom: 14px; }
.ve-component__preview .tc-rating svg { width: 18px; height: 18px; }
.ve-component__preview .tc-comment { color: var(--c-text); line-height: 1.8; margin: 0 0 20px; font-size: 1rem; }
.ve-component__preview .tc-footer { display: flex; align-items: center; gap: 12px; }
.ve-component__preview .tc-avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center; font-weight: 700; color: #fff; flex-shrink: 0;
}
.ve-component__preview .tc-avatar.bg-1 { background: linear-gradient(135deg, #0c4a6e, #0284c7); }
.ve-component__preview .tc-name { font-weight: 600; font-size: 0.95rem; color: var(--c-text); margin: 0; }
.ve-component__preview .tc-role { font-size: 0.8rem; color: var(--c-muted); margin: 2px 0 0; }

/* stat */
.ve-component__preview .stat-band {
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: center;
  padding: 40px 0;
}
.ve-component__preview .stat { text-align: center; min-width: 120px; }
.ve-component__preview .stat-num {
  font-size: 2.4rem; font-weight: 800; color: var(--c-primary); line-height: 1;
}
.ve-component__preview .stat-num span { font-size: 1.2rem; margin-left: 3px; }
.ve-component__preview .stat-label { font-size: var(--fs-sm); color: var(--c-muted); margin-top: 8px; }

/* image + gallery */
.ve-component__preview .card-img {
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-md);
  position: relative; background: var(--c-bg-soft);
}
.ve-component__preview .card-img img { width: 100%; display: block; }
.ve-component__preview .card-img figcaption {
  padding: 16px 20px; font-size: var(--fs-sm); color: var(--c-muted);
  text-align: center; background: var(--c-bg-soft);
}
.ve-component__preview .grid { display: grid; gap: 32px; }
.ve-component__preview .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; }
.ve-component__preview .rich-text { font-size: 0.95rem; color: var(--c-text); line-height: 1.9; }
.ve-component__preview .rich-text h1,
.ve-component__preview .rich-text h2,
.ve-component__preview .rich-text h3 { color: var(--c-text); margin: 1.4em 0 .6em; font-weight: 700; }
.ve-component__preview .rich-text p { margin: 0 0 1em; }
.ve-component__preview .legal-doc { max-width: 720px; margin: 0 auto; }
.ve-component__preview .legal-doc h2 { margin: 0 0 16px; font-size: 1.4rem; }

/* 画布组件容器内，preview 外层包装（模拟前台 section 的 padding / max-width） */
.ve-component__preview-wrap {
  background: #fff; padding: 32px 24px; border-radius: 10px;
}
.ve-component__preview-wrap.section-soft {
  background: #f8fafc;
}
/* 重置 admin 基础 .container 在预览内的约束（避免 max-width/padding 污染前台布局） */
.ve-component__preview-wrap .container {
  max-width: 100% !important; padding: 0 !important; margin: 0 !important;
}
/* 预览视图下组件卡片去除编辑态边距/底色/ hover，贴近前台 */
.ve-component--preview { padding: 0 !important; border: none !important; background: transparent !important; box-shadow: none !important; }
.ve-component--preview:hover { border: none !important; background: transparent !important; }
.ve-component__preview-wrap .sec-head {
  max-width: 720px; margin: 0 auto 40px; text-align: center;
}
.ve-component__preview-wrap .eyebrow {
  display: inline-block; font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--c-primary);
  background: var(--c-primary-soft); padding: 6px 16px; border-radius: var(--r-pill); margin-bottom: var(--sp-md);
}
.ve-component__preview-wrap .sec-title {
  font-size: 2rem; font-weight: 800; color: var(--c-text); margin: 0; line-height: 1.3;
}
.ve-component__preview-wrap .sec-sub { color: var(--c-muted); margin-top: 12px; font-size: 1rem; line-height: 1.8; }
.ve-component__preview-wrap .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ve-component__preview-wrap .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1100px) {
  .ve-component__preview-wrap .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .ve-component__preview-wrap .grid-3, .ve-component__preview-wrap .grid-4 { grid-template-columns: 1fr; }
  .ve-component__preview .grid-2 { grid-template-columns: 1fr; }
}
.ve-component__preview-wrap .grid { display: grid; gap: 24px; }

.ve-component__preview-wrap .sec-head.left { text-align: left; margin-left: 0; margin-right: auto; }
.ve-component__preview-wrap .sec-head.right { text-align: right; margin-left: auto; margin-right: 0; }
.ve-component__preview-wrap .sec-head.size-sm .sec-title { font-size: 1.5rem; }
.ve-component__preview-wrap .sec-head.size-xl .sec-title { font-size: 2.6rem; }

/* CTA 横幅 (cta_banner) */
.ve-component__preview .cta-band {
  position: relative; padding: 56px; color: #fff; overflow: hidden;
  background-size: cover !important; background-position: center !important;
  border-radius: var(--r-lg);
}
.ve-component__preview .cta-band::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
}
.ve-component__preview .cta-tint-blue::before { background: linear-gradient(135deg, rgba(12,74,110,.92), rgba(14,165,233,.75)); }
.ve-component__preview .cta-tint-purple::before { background: linear-gradient(135deg, rgba(107,33,168,.9), rgba(168,85,247,.75)); }
.ve-component__preview .cta-tint-dark::before { background: rgba(15,23,42,.85); }
.ve-component__preview .cta-tint-transparent::before { background: transparent; }
.ve-component__preview .cta-inner { position: relative; z-index: 2; max-width: 720px; }
.ve-component__preview .cta-band .cta-eyebrow { background: rgba(255,255,255,.18); color: #fff; padding: 6px 16px; border-radius: 9999px; margin-bottom: 16px; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; }
.ve-component__preview .cta-band .cta-title { font-size: 2.4rem; font-weight: 800; line-height: 1.2; color: #fff; margin: 0 0 12px; }
.ve-component__preview .cta-band .cta-desc { font-size: 1.05rem; color: rgba(255,255,255,.85); margin: 0 0 28px; line-height: 1.8; }
.ve-component__preview .cta-band .flex { display: flex; }
.ve-component__preview .cta-band .gap-md { gap: 16px; }
.ve-component__preview .cta-band .flex-wrap { flex-wrap: wrap; }
.ve-component__preview .btn { display: inline-flex; align-items: center; gap: 6px; padding: 14px 26px; border-radius: 9999px; text-decoration: none; font-weight: 600; font-size: 14px; transition: all .2s; border: 0; }
.ve-component__preview .btn-lg { padding: 16px 32px; font-size: 15px; }
.ve-component__preview .btn-sm { padding: 10px 20px; font-size: 13px; }
.ve-component__preview .btn-light { background: #fff; color: var(--c-primary); }
.ve-component__preview .btn-primary { background: var(--c-primary); color: #fff; }
.ve-component__preview .btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; }

/* dual_entry 图文大卡 */
.ve-component__preview .dual-entry { display: grid; gap: 24px; }
.ve-component__preview .entry-card {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  min-height: 360px; display: flex; align-items: flex-end; padding: 40px;
  box-shadow: var(--sh-md); color: #fff; text-decoration: none;
}
.ve-component__preview .entry-bg { position: absolute; inset: 0; z-index: 1; background-size: cover !important; background-position: center !important; }
.ve-component__preview .entry-content { position: relative; z-index: 2; max-width: 520px; }
.ve-component__preview .entry-flag { margin-bottom: 18px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.ve-component__preview .entry-flag svg { width: 24px; height: 24px; color: #fff; }
.ve-component__preview .entry-content h3 { font-size: 2rem; margin: 0 0 10px; color: #fff; font-weight: 800; }
.ve-component__preview .entry-content p { margin: 0 0 20px; color: rgba(255,255,255,.85); line-height: 1.8; }
.ve-component__preview .entry-card.overseas { color: #fff; }
.ve-component__preview .entry-card.inbound { color: #fff; }

/* team-card */
.ve-component__preview .team-card { padding: 28px; text-align: center; }
.ve-component__preview .team-avatar {
  width: 104px; height: 104px; border-radius: 50%; margin: 0 auto 20px; overflow: hidden;
  border: 4px solid var(--c-primary-soft); flex-shrink: 0;
}
.ve-component__preview .team-card h3 { font-size: 1.15rem; margin: 0 0 6px; color: var(--c-text); font-weight: 700; }
.ve-component__preview .team-role { color: var(--c-primary); font-weight: 600; font-size: .85rem; margin-bottom: 14px; }
.ve-component__preview .team-bio { color: var(--c-muted); font-size: var(--fs-sm); line-height: 1.75; margin: 0; }

/* article-card / video-card */
.ve-component__preview .article-card { overflow: hidden; padding: 0; border: 1px solid rgba(15,23,42,.04); text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.ve-component__preview .article-card .card-img { box-shadow: none; border-radius: 0; position: relative; }
.ve-component__preview .article-card .card-img img { width: 100%; display: block; object-fit: cover; aspect-ratio: 16/9; }
.ve-component__preview .article-card .card-body { padding: 20px 22px; }
.ve-component__preview .article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; color: var(--c-muted); font-size: .8rem; }
.ve-component__preview .tag { display: inline-block; padding: 3px 10px; border-radius: 9999px; background: var(--c-primary-soft); color: var(--c-primary); font-size: .75rem; font-weight: 600; }
.ve-component__preview .tag-muted { background: var(--c-bg-soft); color: var(--c-muted); }
.ve-component__preview .article-card h3 { font-size: 1rem; margin: 0 0 10px; color: var(--c-text); font-weight: 700; line-height: 1.5; }
.ve-component__preview .article-card p { font-size: .85rem; color: var(--c-muted); line-height: 1.75; margin: 0; }
.ve-component__preview .video-card .card-img { position: relative; }
.ve-component__preview .play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.95);
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.ve-component__preview .play-btn svg { width: 24px; height: 24px; color: var(--c-primary); margin-left: 3px; }
.ve-component__preview .video-duration { position: absolute; right: 12px; bottom: 12px; background: rgba(15,23,42,.75); color: #fff; font-size: .75rem; padding: 4px 10px; border-radius: 6px; }
.ve-component__preview .video-meta { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: .78rem; color: var(--c-muted); }
.ve-component__preview .video-meta svg { width: 14px; height: 14px; }

/* stat-band-hero */
.ve-component__preview .stat-band-hero {
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-md);
  padding: 40px 28px; margin: 0 auto; position: relative; z-index: 10;
}
.ve-component__preview .sbh-item { text-align: center; padding: 12px 4px; }
.ve-component__preview .sbh-num {
  font-size: 2.4rem; font-weight: 800; color: var(--c-primary); line-height: 1.1; margin-bottom: 6px;
}
.ve-component__preview .sbh-label { color: var(--c-muted); font-size: .9rem; }

/* bar_chart */
.ve-component__preview .bar-row { display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; }
.ve-component__preview .bar-label {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: .8rem; color: var(--c-muted); text-align: center; order: 3; margin-top: 10px;
}
.ve-component__preview .bar-label b { color: var(--c-primary); font-size: 1rem; font-weight: 800; }
.ve-component__preview .bar-track {
  width: 100%; height: 260px; background: rgba(14,165,233,.08); border-radius: 8px;
  display: flex; align-items: flex-end; overflow: hidden; order: 2;
}
.ve-component__preview .bar-fill {
  width: 100%; border-radius: 8px 8px 0 0; min-height: 4px;
  transition: height .5s ease;
}

/* flow_cards (process-step) */
.ve-component__preview .process-step { padding: 28px 22px; display: flex; flex-direction: column; align-items: flex-start; position: relative; }
.ve-component__preview .card-ico {
  width: 52px; height: 52px; border-radius: var(--r-md); display: grid; place-items: center;
  margin-bottom: 16px;
}
.ve-component__preview .card-ico svg { width: 26px; height: 26px; }
.ve-component__preview .ps-num {
  font-size: 1.6rem; font-weight: 900; color: rgba(12,74,110,.12); line-height: 1; margin-bottom: 10px;
  font-family: 'Helvetica Neue', sans-serif;
}
.ve-component__preview .process-step h3 { font-size: 1.05rem; margin: 0 0 10px; color: var(--c-text); font-weight: 700; }
.ve-component__preview .process-step p { font-size: .85rem; color: var(--c-muted); line-height: 1.75; margin: 0; }

/* flow_timeline */
.ve-component__preview .flow-timeline { display: flex; flex-direction: column; gap: 28px; position: relative; }
.ve-component__preview .flow-timeline::before {
  content: ''; position: absolute; left: 34px; top: 24px; bottom: 24px; width: 2px;
  background: linear-gradient(180deg, rgba(12,74,110,.25), rgba(14,165,233,.15));
}
.ve-component__preview .flow-timeline-item { display: flex; gap: 24px; align-items: flex-start; position: relative; }
.ve-component__preview .ft-node {
  width: 70px; height: 70px; border-radius: 50%; background: var(--c-grad-soft);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  flex-shrink: 0; border: 2px solid #fff; box-shadow: var(--sh-sm); z-index: 1;
}
.ve-component__preview .ft-num { font-size: .7rem; font-weight: 700; color: var(--c-primary); }
.ve-component__preview .ft-ico { color: var(--c-primary); margin-top: 2px; }
.ve-component__preview .ft-ico svg { width: 22px; height: 22px; }
.ve-component__preview .ft-body { flex: 1; padding-top: 10px; }
.ve-component__preview .ft-body h3 {
  font-size: 1.1rem; margin: 0 0 8px; color: var(--c-text); font-weight: 700;
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
}
.ve-component__preview .flow-timeline-duration {
  font-size: .8rem; color: var(--c-primary); font-weight: 600; background: var(--c-primary-soft);
  padding: 4px 12px; border-radius: 9999px;
}
.ve-component__preview .ft-body p { font-size: .9rem; color: var(--c-muted); line-height: 1.75; margin: 0; }

/* 发展历程 coop-year-block */
.ve-component__preview .coop-year-block { display: grid; grid-template-columns: 180px 1fr; gap: 32px; }
.ve-component__preview .coop-year-item { display: contents; }
.ve-component__preview .coy-year { padding-top: 4px; }
.ve-component__preview .coop-card { padding: 22px 26px; border-radius: var(--r-md); margin-bottom: 20px; }
.ve-component__preview .coop-card h4 { font-size: 1.1rem; margin: 0 0 8px; color: var(--c-text); font-weight: 700; }
.ve-component__preview .coop-card p { margin: 0; font-size: .9rem; }

/* compare-card */
.ve-component__preview .compare-card { border-top: 4px solid var(--c-primary); }
.ve-component__preview .compare-card.compare-teal { border-top-color: var(--c-accent, #0d9488); }
.ve-component__preview .compare-ok { color: var(--c-text); }
.ve-component__preview .compare-no { color: var(--c-muted); }

/* faq_accordion */
.ve-component__preview .service-faq.active .sf-tog.open { transform: rotate(90deg); }
.ve-component__preview .service-faq .hidden { display: none; }

/* logo_wall */
.ve-component__preview .partners { max-width: 960px; margin: 0 auto; }
.ve-component__preview .logo-cell img { max-width: 80%; max-height: 70px; object-fit: contain; filter: grayscale(100%); opacity: .75; }
.ve-component__preview .logo-cell:hover img { filter: grayscale(0); opacity: 1; }
.ve-component__preview .logo-cell { transition: all .2s; cursor: pointer; }
.ve-component__preview .logo-cell:hover { background: #fff; box-shadow: var(--sh-sm); transform: translateY(-2px); }

/* module_nav */
.ve-component__preview .nav-card { text-decoration: none; color: inherit; }
.ve-component__preview .nav-card h4 { color: var(--c-text); }

/* coop-list 合作动态 */
.ve-component__preview .coop-card { background: #fff; border: 1px solid rgba(15,23,42,.04); text-decoration: none; color: inherit; }
.ve-component__preview .coop-card:hover { border-color: rgba(12,74,110,.15); }

/* Document mode */
.ve-document { width: 100%; max-width: 900px; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); overflow: hidden; }
.ve-document__toolbar { border-bottom: 1px solid var(--admin-border); }
.ve-document__content { min-height: 480px; padding: 4px; }
.ve-document__readonly { padding: 40px; text-align: center; color: var(--admin-text-placeholder); font-size: 13px; }

/* Right: Property Panel */
.ve-right { width: 500px; flex-shrink: 0; background: var(--admin-card-bg, #fff); border-left: 1px solid var(--admin-border); display: flex; flex-direction: column; overflow: hidden; }
.ve-right__header { padding: 10px 14px; border-bottom: 1px solid var(--admin-border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.ve-right__title { font-size: 13px; font-weight: 600; color: var(--admin-text); display: flex; align-items: center; gap: 6px; }
.ve-right__body { flex: 1; overflow-y: auto; padding: 12px; }
.ve-right__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; color: var(--admin-text-placeholder); padding: 40px 20px; text-align: center; }
.ve-right__empty i { font-size: 36px; margin-bottom: 10px; opacity: .4; }

/* Component Palette */
.ve-palette { display: flex; flex-direction: column; gap: 8px; }

/* Property Panel（动态创建的属性面板容器，须有显式布局规则避免与组件库堆叠 —— Bug1） */
.ve-prop-panel { display: flex; flex-direction: column; gap: 0; }
.ve-prop-panel:empty { display: none; }
.ve-palette-group { border: 1px solid var(--admin-border); border-radius: 6px; overflow: hidden; }
.ve-palette-group__title { display: flex; align-items: center; padding: 7px 10px; font-size: 12px; font-weight: 600; color: var(--admin-primary); background: var(--admin-bg, #f5f7fa); cursor: pointer; user-select: none; gap: 6px; }
.ve-palette-group__arrow { font-size: 10px; transition: transform .15s; }
.ve-palette-group.is-collapsed .ve-palette-group__arrow { transform: rotate(-90deg); }
.ve-palette-group.is-collapsed .ve-palette-group__items { display: none; }
.ve-palette-group__items { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
.ve-palette-item { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid var(--admin-border); border-radius: 4px; cursor: grab; font-size: 12px; transition: all .12s; background: #fff; user-select: none; }
.ve-palette-item:hover { border-color: var(--admin-primary); background: var(--admin-primary-bg, rgba(0,120,212,0.04)); color: var(--admin-primary); }
.ve-palette-item:active { cursor: grabbing; }
.ve-palette-item i { font-size: 14px; color: var(--admin-primary); }

/* Property form */
.ve-prop-section { margin-bottom: 14px; }
.ve-prop-section__title { font-size: 11px; font-weight: 600; color: var(--admin-primary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--admin-border); display: flex; align-items: center; gap: 4px; }
.ve-prop-field { margin-bottom: 10px; }
.ve-prop-field__label { display: block; font-size: 12px; font-weight: 500; color: var(--admin-text); margin-bottom: 4px; }
.ve-prop-field__label.is-required::after { content: ' *'; color: var(--admin-danger); }
.ve-prop-field__control { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--admin-border); border-radius: 5px; background: #fff; font-size: 13px; outline: none; transition: border-color .15s; box-sizing: border-box; }
.ve-prop-field__control:focus { border-color: var(--admin-primary); }
.ve-prop-field__control.is-textarea { height: auto; min-height: 60px; padding: 8px 10px; resize: vertical; }
.ve-prop-field__hint { font-size: 11px; color: var(--admin-text-placeholder); margin-top: 3px; }
.ve-prop-field__select { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--admin-border); border-radius: 5px; background: #fff; font-size: 13px; outline: none; cursor: pointer; box-sizing: border-box; }
/* ===== 列表编辑器：增强版样式（美化多字段布局，PRD #5） ===== */
.ve-list-editor { border: 1px solid var(--admin-border); border-radius: 8px; padding: 10px; background: #fafbfc; }
.ve-list-editor__item { display: flex; gap: 4px; margin-bottom: 6px; }
.ve-list-editor__item input { flex: 1; height: 28px; padding: 0 8px; border: 1px solid var(--admin-border); border-radius: 4px; font-size: 12px; outline: none; }
.ve-list-editor__item input:focus { border-color: var(--admin-primary); }
.ve-list-editor__del { width: 28px; border: none; background: transparent; color: var(--admin-danger, #ef4444); cursor: pointer; }
.ve-list-editor__add { width: 100%; padding: 8px; border: 1px dashed var(--admin-border); background: #fff; border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--admin-text-secondary); transition: all .15s; font-weight: 500; }
.ve-list-editor__add:hover { border-color: var(--admin-primary); color: var(--admin-primary); background: rgba(12,74,110,.03); }
.ve-list-editor__add i { margin-right: 4px; }

/* 多字段列表项：卡片式，带序号badge、悬浮高亮 */
.ve-list-editor__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
  padding-right: 4px;
}
.ve-list-editor__grid .ve-list-sub--full { grid-column: 1 / -1; }
.ve-list-editor__item--multi {
  padding: 14px 14px 14px 12px;
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 10px;
  margin-bottom: 10px;
  margin-top: 6px;
  position: relative;
  background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
  counter-increment: list-item-step;
}
.ve-list-editor__item--multi:hover {
  border-color: var(--admin-primary, #0c4a6e);
  box-shadow: 0 2px 10px rgba(12,74,110,.08);
  background: #fff;
}
.ve-list-editor__item--multi::before {
  content: counter(list-item-step);
  position: absolute;
  top: -8px;
  left: 14px;
  background: linear-gradient(135deg, var(--admin-primary, #0c4a6e), #0ea5e9);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  line-height: 1.5;
  box-shadow: 0 2px 4px rgba(12,74,110,.15);
  letter-spacing: .5px;
}
.ve-list-editor__item--multi .ve-list-editor__del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: all .15s;
  opacity: .5;
}
.ve-list-editor__item--multi:hover .ve-list-editor__del { opacity: 1; }
.ve-list-editor__item--multi .ve-list-editor__del:hover {
  background: #fef2f2;
  color: #ef4444;
  transform: scale(1.05);
}

/* 子字段包装：label + control 垂直堆叠，label带左侧小标记 */
.ve-list-sub {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ve-list-sub__lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--admin-text-secondary, #64748b);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ve-list-sub__lbl::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: var(--admin-primary, #0c4a6e);
  border-radius: 2px;
  opacity: .4;
  flex-shrink: 0;
}
.ve-list-sub__control {
  width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  box-sizing: border-box;
  color: var(--admin-text, #0f172a);
}
.ve-list-sub__control:hover { border-color: #cbd5e1; }
.ve-list-sub__control:focus {
  border-color: var(--admin-primary, #0c4a6e);
  box-shadow: 0 0 0 3px rgba(12,74,110,.1);
  background: #fff;
}
/* 长字段(textarea/richtext)独占整行，高度合理 */
.ve-list-sub--full .ve-list-sub__control {
  min-height: 80px;
  padding: 8px 10px;
  line-height: 1.55;
  resize: vertical;
}
/* switch 型横向对齐 */
.ve-list-sub--switch {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.ve-list-sub--switch .ve-list-sub__lbl { margin-bottom: 0; }
/* 图片/链接子控件 */
.ve-list-sub__img {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}
.ve-list-sub__img-empty {
  font-size: 11px;
  color: var(--admin-text-placeholder);
  padding: 4px 8px;
  background: #f8fafc;
  border-radius: 4px;
}
.ve-list-sub__link {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
}
.ve-list-sub__link input { flex: 1; }
.ve-list-editor { counter-reset: list-item-step; }

/* Rich Text Field (WangEditor) */
.ve-richtext-field { border: 1px solid var(--admin-border); border-radius: 5px; overflow: hidden; }
.ve-richtext-field__toolbar { border-bottom: 1px solid var(--admin-border); }
.ve-richtext-field__editor { min-height: 200px; }

/* Page Settings Drawer */
.ve-drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .2s; }
.ve-drawer-mask.is-open { opacity: 1; pointer-events: auto; }
.ve-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 90vw; background: #fff; z-index: 1001; transform: translateX(100%); transition: transform .25s; display: flex; flex-direction: column; box-shadow: -4px 0 16px rgba(0,0,0,0.1); }
.ve-drawer.is-open { transform: translateX(0); }
.ve-drawer__header { padding: 14px 18px; border-bottom: 1px solid var(--admin-border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.ve-drawer__title { font-size: 15px; font-weight: 600; color: var(--admin-text); }
.ve-drawer__close { width: 28px; height: 28px; border: none; background: transparent; cursor: pointer; font-size: 18px; color: var(--admin-text-secondary); border-radius: 4px; }
.ve-drawer__close:hover { background: var(--admin-bg); }
.ve-drawer__body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.ve-drawer__footer { padding: 12px 18px; border-top: 1px solid var(--admin-border); display: flex; gap: 8px; flex-shrink: 0; }

/* Drawer Form */
.ve-drawer__section { margin-bottom: 24px; }
.ve-drawer__section:last-child { border-bottom: none; margin-bottom: 0; }
.ve-drawer__section .layui-icon{color: var(--admin-primary)}
.ve-drawer__section--meta { border-bottom: none; }
.ve-drawer__section-head{display: flex;justify-content: space-between;}
.ve-drawer__section-title { font-size: 13px; font-weight: 600; color: var(--admin-text); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.ve-drawer__field { margin-bottom: 10px; }
.ve-drawer__section .ve-drawer__field{ margin-bottom: 16px; }
.ve-drawer__section:last-child .ve-drawer__field:last-child{ margin-bottom: 0; }
.ve-drawer__field--inline { display: flex; align-items: center; gap: 8px; }
.ve-drawer__row { display: flex; gap: 32px; }
.ve-drawer__row .ve-drawer__field { flex: 1; min-width: 0; }
.ve-drawer__label { display: block; font-size: 12px; font-weight: 500; color: var(--admin-text); margin-bottom: 2px; }
.ve-drawer__label.is-required::after { content: ' *'; color: var(--admin-danger, #ef4444); }
.ve-drawer__input, .ve-drawer__select, .ve-drawer__textarea { width: 100%; padding: 7px 10px; border: 1px solid var(--admin-border); border-radius: 5px; background: #fff; font-size: 13px; outline: none; transition: border-color .15s; box-sizing: border-box; font-family: inherit; }
.ve-drawer__input:focus, .ve-drawer__select:focus, .ve-drawer__textarea:focus { border-color: var(--admin-primary, #0078d4); }

/* =================== Canvas: Page Header (title/subtitle/content) =================== */
.ve-page-header {
  padding: 28px 32px 24px;
  border-bottom: 1px dashed #e5e7eb;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  text-align: center;
  position: relative;
}
.ve-page-header::before {
  content: '页面头部';
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 10px;
  color: var(--admin-primary);
  background: var(--admin-primary-bg, rgba(0,120,212,0.08));
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 500;
  letter-spacing: .5px;
}
.ve-page-header__title {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px;
  line-height: 1.35;
}
.ve-page-header__subtitle {
  font-size: 15px;
  color: #0ea5e9;
  font-weight: 500;
  margin: 0 0 12px;
  line-height: 1.5;
}
.ve-page-header__content {
  font-size: 14px;
  color: #475569;
  margin: 0 auto;
  max-width: 640px;
  line-height: 1.75;
  white-space: pre-wrap;
}

/* =================== Canvas: Composite (DataSource Sections) =================== */
.ve-composite {
  position: relative;
  margin: 16px 12px 8px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background:
    repeating-linear-gradient(45deg, #f8fafc 0, #f8fafc 10px, #fff 10px, #fff 20px);
  overflow: hidden;
}
.ve-composite.is-composite-root {
  margin-top: 16px;
}
.ve-composite__tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #0369a1;
  background: #e0f2fe;
  border-bottom: 1px dashed #7dd3fc;
}
.ve-composite__tag i { font-size: 13px; }
.ve-composite__preview {
  padding: 16px;
}
.ve-composite__item {
  margin-bottom: 12px;
}
.ve-composite__item:last-child { margin-bottom: 0; }

.ve-composite__subs-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 14px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.ve-composite__subs-title i { color: var(--admin-primary); }
.ve-composite__subs-hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--admin-text-placeholder);
  font-weight: normal;
}

/* Canvas is-datasource: make inner spacing more intuitive */
.ve-canvas.is-datasource {
  padding-bottom: 20px;
}

/* =================== SEO Section Visibility (联动) =================== */
.ve-seo-section {
  transition: opacity .18s, max-height .25s, margin-bottom .25s, padding-bottom .25s;
  overflow: hidden;
}
.ve-seo-section.is-hidden {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
  pointer-events: none;
}
.ve-seo-section__disabled-hint {
  font-size: 12px;
  color: var(--admin-text-placeholder);
  background: var(--admin-bg, #f5f7fa);
  border-radius: 6px;
  padding: 10px 12px;
  line-height: 1.6;
}
.ve-seo-section__disabled-hint i {
  color: var(--admin-warning, #f59e0b);
  margin-right: 4px;
}

/* =================== 复合组件布局样式 =================== */

/* 复合组件容器 */
.ve-composite-layout {
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 12px 0;
}

/* 头部：标题 + 副标题编辑区 */
.ve-composite-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px dashed #e5e7eb;
}

.ve-composite-header__field {
  margin-bottom: 12px;
}

.ve-composite-header__field:last-child {
  margin-bottom: 0;
}

.ve-composite-header__field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

/* 输入框样式 */
.ve-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
  font-family: inherit;
}

.ve-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ve-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
}

.ve-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ve-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

.ve-select:focus {
  border-color: #3b82f6;
}

/* 主体：子项容器 */
.ve-composite-body {
  position: relative;
}

.ve-composite-body__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.ve-composite-body__title i {
  color: #3b82f6;
}

.ve-composite-body__hint {
  margin-left: auto;
  font-size: 11px;
  font-weight: normal;
  color: #9ca3af;
}

/* 子项网格 */
.ve-sub-items-grid {
  display: grid;
  gap: 16px;
}

/* 子项卡片 */
.ve-sub-item {
  position: relative;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  transition: all .15s;
  cursor: pointer;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.ve-sub-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.ve-sub-item.is-selected {
  border-color: #3b82f6;
  background: #eff6ff;
}

.ve-sub-item__content {
  flex: 1;
  overflow: hidden;
}

.ve-sub-item__content .card,
.ve-sub-item__content .feature-card {
  box-shadow: none;
}

/* 子项操作按钮 */
.ve-sub-item__actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  gap: 4px;
  z-index: 10;
}

.ve-sub-item:hover .ve-sub-item__actions,
.ve-sub-item.is-selected .ve-sub-item__actions {
  display: flex;
}

.ve-sub-item__btn {
  width: 24px;
  height: 24px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #6b7280;
  transition: all .15s;
}

.ve-sub-item__btn:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.ve-sub-item__btn--danger:hover {
  background: #ef4444;
  border-color: #ef4444;
}

/* 子项标签 */
.ve-sub-item__label {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
}

/* 添加按钮 */
.ve-sub-item--add {
  border: 2px dashed #d1d5db;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  min-height: 200px;
}

.ve-sub-item--add:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.ve-add-item-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
  padding: 16px;
}

.ve-add-item-btn:hover {
  color: #3b82f6;
}

.ve-add-item-btn i {
  font-size: 32px;
}

/* =================== 子项编辑器样式 =================== */

.ve-sub-item-editor {
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.ve-sub-item-editor__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid #3b82f6;
  margin-bottom: 20px;
}

.ve-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: all .15s;
}

.ve-back-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.ve-sub-item-editor__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.ve-sub-item-editor__title i {
  color: #3b82f6;
}

.ve-sub-item-editor__id {
  font-size: 12px;
  color: #9ca3af;
  font-weight: normal;
}

.ve-sub-item-editor__body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

@media (max-width: 900px) {
  .ve-sub-item-editor__body {
    grid-template-columns: 1fr;
  }
}

/* 表单区 */
.ve-sub-item-editor__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ve-form-section {
  background: #f9fafb;
  border-radius: 6px;
  padding: 16px;
}

.ve-form-section__title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.ve-field {
  margin-bottom: 12px;
}

.ve-field:last-child {
  margin-bottom: 0;
}

.ve-field__label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.ve-field-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

.ve-image-field {
  border: 2px dashed #d1d5db;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.ve-image-field img {
  max-width: 100%;
  max-height: 120px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.card-img{max-width: 100%;}


.ve-image-field__placeholder {
  color: #9ca3af;
  font-size: 12px;
  margin-bottom: 8px;
}

.ve-image-field__btn {
  padding: 4px 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.ve-image-field__btn:hover {
  background: #f3f4f6;
}

.ve-link-field {
  display: flex;
  gap: 8px;
}

.ve-link-field .ve-input {
  flex: 1;
}

/* 按钮 */
.ve-btn {
  padding: 8px 16px;
  border: 1px solid transparent;
  background: #3b82f6;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ve-btn:hover {
  background: #2563eb;
}

.ve-btn--outline {
  background: #fff;
  border-color: #d1d5db;
  color: #374151;
}

.ve-btn--outline:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.ve-btn--danger {
  background: #fff;
  border-color: #fca5a5;
  color: #dc2626;
}

.ve-btn--danger:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #dc2626;
}

.ve-form-actions {
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

/* 预览区 */
.ve-sub-item-editor__preview {
  position: sticky;
  top: 16px;
  align-self: start;
}

.ve-preview-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
  min-height: 200px;
}

.ve-preview-box .card,
.ve-preview-box .feature-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ve-preview-box .feature-ico {
  background: #eff6ff;
}

/* 图标颜色修正 */
.ve-preview-box .feature-ico svg {
  stroke: #3b82f6;
}
.ve-drawer__select { height: 34px; cursor: pointer; }
.ve-drawer__textarea { min-height: 56px; resize: vertical; }
.ve-drawer__hint { font-size: 11px; color: var(--admin-text-placeholder); margin-top: 3px; }
.ve-drawer__meta-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--admin-text-secondary); padding: 3px 0; }

/* Panel collapse + splitter（#9：左右面板可隐藏 / 右面板可拖宽） */
.ve-toolbar__toggle { padding: 0 8px; }
.ve-left, .ve-right { transition: width .18s ease, border-color .18s; }
.ve-left.is-collapsed { width: 0 !important; border: 0; overflow: hidden; flex: 0 0 0; }
.ve-right.is-collapsed { width: 0 !important; border: 0; overflow: hidden; flex: 0 0 0; }
.ve-splitter {
  width: 6px; flex: 0 0 6px; cursor: col-resize; background: transparent;
  position: relative; transition: background .15s; align-self: stretch;
}
.ve-splitter::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 2px; height: 36px; background: var(--admin-border); border-radius: 2px; transition: background .15s;
}
.ve-splitter:hover::after, .ve-splitter.is-dragging::after { background: var(--admin-primary, #0078d4); }
.ve-splitter.is-dragging { background: rgba(0,120,212,0.06); }
.ve-main.is-resizing { cursor: col-resize; user-select: none; }
.ve-main.is-resizing iframe { pointer-events: none; }

/* Scrollbar */
.ve-left__tree::-webkit-scrollbar, .ve-right__body::-webkit-scrollbar, .ve-center__body::-webkit-scrollbar, .ve-drawer__body::-webkit-scrollbar { width: 6px; }
.ve-left__tree::-webkit-scrollbar-thumb, .ve-right__body::-webkit-scrollbar-thumb, .ve-center__body::-webkit-scrollbar-thumb, .ve-drawer__body::-webkit-scrollbar-thumb { background: var(--admin-border); border-radius: 3px; }

.ve-sort-ghost { opacity: .4; background: var(--admin-primary-bg, rgba(0,120,212,0.08)) !important; border: 2px dashed var(--admin-primary, #0078d4) !important; }
.ve-sort-chosen { cursor: grabbing; }

@media (max-width: 1200px) { .ve-left { width: 200px; } .ve-right { width: 260px; } }
@media (max-width: 900px) { .ve-left { width: 160px; } .ve-right { width: 220px; } .ve-drawer { width: 90vw; } }

/* =================== 骨架布局样式 =================== */

/* 骨架布局容器 */
.ve-skeleton-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* 注入前台主题 CSS 变量，使骨架内 preview() 复用前台 class（sec-head/card/grid 等）
     对齐 .ve-component__preview 作用域变量，骨架布局无 .ve-component__preview 祖先 */
  --c-primary: #0c4a6e;
  --c-primary-deep: #082f49;
  --c-primary-soft: #e0f2fe;
  --c-primary-soft-2: #bae6fd;
  --c-grad-soft: linear-gradient(135deg, #e0f2fe 0%, #cffafe 100%);
  --c-muted: #64748b;
  --c-text: #0f172a;
  --c-card: #ffffff;
  --c-bg-soft: #f8fafc;
  --fs-sm: 0.85rem;
  --sp-xs: 8px; --sp-md: 16px; --sp-lg: 24px; --sp-xl: 40px;
  --r-md: 12px; --r-lg: 22px; --r-pill: 9999px;
  --sh-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --sh-md: 0 6px 18px rgba(15, 23, 42, 0.08);
  --sh-hover: 0 16px 40px rgba(8, 145, 178, 0.18);
  font-size: 14px; color: var(--c-text); line-height: 1.6;
}

/* 骨架通用样式 */
.ve-skeleton {
  position: relative;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  transition: all .15s;
  cursor: pointer;
}

.ve-skeleton:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}

.ve-skeleton.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.2);
}

/* 骨架标签（左上角） */
.ve-skeleton__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.ve-skeleton.is-active .ve-skeleton__tag {
  background: #3b82f6;
  color: #fff;
}

/* 容器骨架 */
.ve-skeleton--container {
  padding: 20px;
}

/* 卡片网格容器 */
.ve-skeleton__container-grid {
  display: grid;
  gap: 16px;
}

/* 复合 band 行骨架（整行渲染 preview，不可拆分 —— Bug2） */
.ve-skeleton--band {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ve-skeleton--band.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
}
.ve-skeleton__band-preview {
  /* band preview 内部已含 container + sec-head + grid，直接铺满 */
  width: 100%;
  overflow: hidden;
}
.ve-skeleton__band-preview .ve-component__preview-wrap {
  margin: 0;
}
.ve-skeleton__band-preview .container {
  max-width: 100%;
  padding: 0;
}

/* 卡片项骨架 */
.ve-skeleton--item {
  padding: 12px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ve-skeleton--item.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
}

/* 卡片项标签 */
.ve-skeleton__item-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 3px;
  width: fit-content;
}

.ve-skeleton--item.is-active .ve-skeleton__item-tag {
  background: #3b82f6;
  color: #fff;
}

/* 卡片项预览 */
.ve-skeleton__item-preview {
  flex: 1;
  overflow: hidden;
}

/* 卡片预览内部样式保持原样 */
.ve-skeleton__item-preview .card,
.ve-skeleton__item-preview .feature-card {
  box-shadow: none;
  margin: 0;
}

/* 空卡片占位 */
.ve-empty-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  color: #9ca3af;
  font-size: 13px;
  border: 2px dashed #d1d5db;
  border-radius: 6px;
}

/* 添加卡片按钮骨架 */
.ve-skeleton--add {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  min-height: 180px;
  background: #f9fafb;
}

.ve-skeleton--add:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.ve-add-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #6b7280;
  font-size: 13px;
  padding: 16px 24px;
  border-radius: 6px;
  transition: all .15s;
}

.ve-add-item-btn:hover {
  color: #3b82f6;
}

.ve-add-item-btn i {
  font-size: 32px;
}

/* 属性面板样式补充 */
.ve-prop-field__readonly {
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 4px;
  font-size: 14px;
  color: #374151;
  min-height: 20px;
}

.ve-prop-field__hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

.ve-prop-field__control--textarea {
  min-height: 80px;
  resize: vertical;
}

/* 骨架选中动画 */
@keyframes skeleton-pulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(59, 130, 246, 0.2); }
  50% { box-shadow: 0 2px 20px rgba(59, 130, 246, 0.35); }
}

.ve-skeleton.is-active {
  animation: skeleton-pulse 2s ease-in-out infinite;
}

/* 画布空状态 */
.ve-canvas__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #9ca3af;
}

.ve-canvas__empty i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #d1d5db;
}

.ve-canvas__empty p {
  font-size: 14px;
  margin: 0;
}
