/* Element UI 补充样式 + 标签预览 */

html, body { margin: 0; padding: 0; background: #f0f2f5; }

.page-container { min-height: 100vh; max-width: 1280px; margin: 0 auto; }

.page-header {
  background: #fff;
  border-bottom: 1px solid #ebeef5;
  padding: 16px 20px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title { margin: 0; font-size: 20px; font-weight: 600; color: #303133; }
.page-subtitle { margin: 4px 0 0; font-size: 13px; color: #909399; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.page-main { padding: 16px 20px 24px; }

.inner-card { margin-bottom: 0; }
.inner-card + .inner-card { margin-top: 16px; }

.form-tip { font-size: 12px; color: #909399; margin-top: 4px; line-height: 1.4; }

.btn-group { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }

/* 预览 */
.preview-card .el-card__body { text-align: center; }

.preview-center {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}

.preview-frame {
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-label {
  border: 2px solid #303133;
  border-radius: 4px;
  padding: 6px 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.preview-label-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transform-origin: center center;
}

.preview-field {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-barcode {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.preview-barcode svg { max-width: 100%; shape-rendering: crispEdges; }

.preview-label-raster {
  padding: 0;
  align-items: stretch;
}

.preview-raster-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  image-rendering: pixelated;
}

.barcode-text {
  font-size: 8px;
  font-family: monospace;
  margin-top: 2px;
}

.preview-meta {
  margin: 12px 0 0;
  font-size: 12px;
  color: #909399;
}

.designer-preview-title {
  font-size: 14px;
  font-weight: 600;
  color: #606266;
  margin-bottom: 12px;
  text-align: center;
}

/* 模板卡片 */
.toolbar { margin-bottom: 16px; display: flex; gap: 8px; }

.template-card { margin-bottom: 16px; }
.template-card.active { border-color: #409EFF; }

.template-name { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.template-desc { font-size: 13px; color: #909399; margin-bottom: 10px; min-height: 36px; }
.template-meta { margin-bottom: 12px; }
.template-meta .el-tag + .el-tag { margin-left: 6px; }
.template-btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* 日志 */
.log-card { margin-top: 16px; }

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.log-empty {
  text-align: center;
  color: #909399;
  padding: 24px;
  font-size: 14px;
}

.code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 16px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 12px 0;
}

/* Element UI 微调 */
.el-tabs--border-card { box-shadow: none; border: 1px solid #ebeef5; }
.el-card__header { padding: 12px 16px; font-weight: 600; }
.el-timeline { padding-left: 4px; max-height: 240px; overflow-y: auto; }

@media (max-width: 768px) {
  .page-main { padding: 12px; }
  .header-inner { flex-direction: column; align-items: flex-start; }
}
