
/* ============ 标签设计师 ============ */
#view-label-templates.lt-designer-active .lt-list { display: none; }

.lt-designer {
  margin-top: 18px;
  border: 1px solid #e3eee8;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.lt-designer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: linear-gradient(135deg, #0f5a3d, #3cb371);
  color: #fff;
  gap: 12px;
  flex-wrap: wrap;
}
.lt-designer-left, .lt-designer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lt-name-input input {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  min-width: 200px;
}
.lt-name-input input::placeholder { color: rgba(255,255,255,0.65); }
.lt-name-input input:disabled { opacity: .7; cursor: not-allowed; }
.lt-badge-builtin {
  background: rgba(255,255,255,0.2);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}
.lt-designer-right button {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
  background: transparent;
}
.lt-designer-right button.submit-btn {
  background: #fff;
  color: #0f5a3d;
  border-color: #fff;
}

.lt-designer-body {
  display: flex;
  min-height: 420px;
}
.lt-canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(45deg, #f3f7f5 25%, transparent 25%),
    linear-gradient(-45deg, #f3f7f5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f7f5 75%),
    linear-gradient(-45deg, transparent 75%, #f3f7f5 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  padding: 30px;
  overflow: auto;
}
.lt-canvas {
  position: relative;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  border: 2px dashed #e8c866;
  flex-shrink: 0;
  cursor: crosshair;
}

.lt-el {
  position: absolute;
  cursor: move;
  user-select: none;
  padding: 2px 4px;
  border: 1.5px dashed transparent;
  border-radius: 4px;
  transition: border-color .1s;
  white-space: nowrap;
  font-family: Consolas, Monaco, monospace;
}
.lt-el:hover {
  border-color: rgba(23, 122, 83, 0.35);
  background: rgba(23, 122, 83, 0.05);
}
.lt-el-active {
  border-color: #177a53 !important;
  background: rgba(23, 122, 83, 0.1) !important;
  box-shadow: 0 0 0 2px rgba(23, 122, 83, 0.2);
}
.lt-el-owner { color: #0f5a3d; font-weight: 700; font-size: 15px; }
.lt-el-cat { color: #177a53; font-weight: 600; font-size: 12px; }
.lt-el-barcode {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}
.lt-barcode-bars {
  height: 32px;
  background-image:
    repeating-linear-gradient(90deg,
      #000 0, #000 2px, transparent 2px, transparent 4px,
      #000 5px, #000 6px, transparent 6px, transparent 8px,
      #000 9px, #000 10px, transparent 10px, transparent 12px,
      #000 13px, #000 14px, transparent 14px, transparent 16px);
  background-repeat: repeat-x;
  background-size: 16px 32px;
}
.lt-barcode-num { font-size: 10px; font-family: Consolas, monospace; color: #333; letter-spacing: .5px; }
.lt-el-short { color: #222; font-size: 11px; }

.lt-prop-panel {
  width: 280px;
  background: #f8fbf9;
  border-left: 1px solid #e3eee8;
  padding: 16px;
  overflow-y: auto;
  flex-shrink: 0;
}
.lt-prop-section { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px dashed #d3e2db; }
.lt-prop-section:last-child { border-bottom: none; }
.lt-prop-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f5a3d;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.lt-prop-sub { font-size: 11px; color: #8aa69a; margin-top: 4px; }
.lt-prop-panel select {
  width: 100%; padding: 8px 10px; border: 1px solid #d3e2db; border-radius: 6px;
  font-size: 13px; background: #fff; color: #16302a;
}
.lt-prop-panel input[type=number] {
  width: 100%; padding: 8px 10px; border: 1px solid #d3e2db; border-radius: 6px;
  font-size: 13px; background: #fff; color: #16302a; box-sizing: border-box;
}
.lt-prop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lt-prop-row { display: flex; flex-direction: column; gap: 4px; }
.lt-prop-row label { font-size: 11px; color: #6b847b; }
.lt-prop-row input { padding: 6px 8px; border: 1px solid #d3e2db; border-radius: 5px; font-size: 12px; }

.lt-field-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 13px; color: #16302a; cursor: pointer;
}
.lt-field-toggle input { accent-color: #177a53; }
.lt-hint {
  font-size: 12px; color: #7c9188; padding: 8px;
  background: #eef5f1; border-radius: 6px; line-height: 1.6;
}

.lt-designer-status {
  padding: 10px 20px; background: #fffaf0; border-top: 1px solid #e8c866;
  font-size: 12px; color: #7a5a00;
}

@media (max-width: 900px) {
  .lt-designer-body { flex-direction: column; }
  .lt-prop-panel { width: 100%; border-left: none; border-top: 1px solid #e3eee8; }
}
