/* ========================================================
   标签管理系统 · 正式生产版样式表 (Light Theme / 白底自然质感)
   严格使用系统字体，杜绝任何外部 CDN 或字体阻塞，保证内网毫秒级加载
   ======================================================== */

:root {
  /* 基础主色板（白底自然色系） */
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-alt: #f8faf8;
  --surface-sub: #eef2ec;
  --border: #d9e0d7;
  --border-light: #e5ece3;

  /* 文字颜色 */
  --text-main: #1c2420;
  --text-sub: #4c5a52;
  --text-muted: #728177;
  --text-link: #177245;

  /* 品牌与重音 */
  --accent: #177245;          /* 农资科技绿 */
  --accent-hover: #105934;
  --accent-light: #e6f4ea;
  --accent-border: #9cd5b2;

  /* 状态颜色 */
  --circ-green: #15803d;      /* 当前流通版 */
  --circ-bg: #dcfce7;
  --circ-border: #86efac;

  --pub-amber: #b45309;       /* 已发布待启用 */
  --pub-bg: #fef3c7;
  --pub-border: #fcd34d;

  --draft-blue: #1d5fae;      /* 在制草稿 */
  --draft-bg: #e0f2fe;
  --draft-border: #93c5fd;

  --hist-gray: #475569;       /* 历史补录 */
  --hist-bg: #f1f5f9;
  --hist-border: #cbd5e1;

  --danger-red: #dc2626;      /* 批注圈选红 */
  --danger-bg: #fee2e2;

  /* 阴影与圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(28, 36, 32, 0.05);
  --shadow-md: 0 4px 12px rgba(28, 36, 32, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(28, 36, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 布局约束容器（企业级全屏流式工作台，彻底根除死板局促空白） */
.wrap {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 28px;
  box-sizing: border-box;
}

/* ================= 顶部导航 Header ================= */
.app-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 用户信息卡片 */
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex: none;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
}

.role-chip {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-weight: 500;
}

.user-perm-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* ================= 主导航选项卡 Tabs ================= */
.main-tabs {
  display: flex;
  gap: 8px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  background: var(--surface-alt);
  color: var(--accent);
  border-color: var(--accent-border);
}

.tab-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(23, 114, 69, 0.25);
}

.tab-icon {
  font-size: 15px;
}

.badge-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  color: inherit;
}

.tab-btn.active .badge-count {
  background: #ffffff;
  color: var(--accent);
}

/* ================= 容器与面板 Panel ================= */
.main-content {
  padding-top: 18px;
  padding-bottom: 60px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* 通用白底卡片 Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.card-head-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.card-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text-main);
}

.card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ================= 仓储人员新版本待办提醒横幅 ================= */
.warehouse-alert-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.16);
  animation: bannerPulse 2s ease-in-out infinite alternate;
}

@keyframes bannerPulse {
  0% { box-shadow: 0 3px 10px rgba(245, 158, 11, 0.16); border-color: #f59e0b; }
  100% { box-shadow: 0 4px 18px rgba(245, 158, 11, 0.32); border-color: #d97706; }
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-icon {
  font-size: 22px;
  line-height: 1;
}

.banner-text {
  font-size: 13.5px;
  color: #78350f;
  line-height: 1.45;
}

.btn-warehouse-fill {
  background: #d97706;
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
  transition: all 0.16s ease;
}

.btn-warehouse-fill:hover {
  background: #b45309;
  transform: translateY(-1px);
}

/* ================= 产品与规格选择 Selector (规整一体化重构) ================= */
.selector-card {
  padding: 18px 22px;
  background: #ffffff;
}

.selector-header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}

.btn-outline-spec {
  background: #f0fdf4;
  color: #059669;
  border: 1.5px solid #a7f3d0;
  font-weight: 700;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-outline-spec:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

/* ================= 产品与标签选择区层级重构 (严格对齐用户手绘截图1) ================= */

/* 第一层：大类横向导航条 */
.category-nav-bar {
  margin: 14px 0 16px 0;
  padding-bottom: 14px;
  border-bottom: 1.5px solid #f1f5f9;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.category-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.category-pill:hover {
  border-color: #3b82f6;
  color: #1d4ed8;
  background: #eff6ff;
  transform: translateY(-1px);
}

.category-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
}

/* 第二层与第三层：层级容器 (左侧产品纵列，右侧规格展开与流通看板) */
.product-spec-hierarchy-container {
  display: flex;
  gap: 18px;
  align-items: stretch;
  min-height: 240px;
  width: 100%;
}

/* 左侧产品简称纵向清单 */
.product-vertical-column {
  width: 260px;
  min-width: 230px;
  max-width: 280px;
  flex-shrink: 0;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f1f5f9;
  border-bottom: 1.5px solid #e2e8f0;
}

.column-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 0.3px;
}

.column-count {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 12px;
}

.product-vertical-list {
  flex: 1;
  overflow-y: auto;
  max-height: 290px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-vertical-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.product-vertical-item:hover {
  background: #e2e8f0;
}

.product-vertical-item.active {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
}

.prod-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.prod-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.product-vertical-item.active .prod-item-dot {
  background: #2563eb;
}

.prod-item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-vertical-item.active .prod-item-name {
  color: #1d4ed8;
}

.prod-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.prod-spec-count {
  font-size: 11px;
  color: #64748b;
  background: #ffffff;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.product-vertical-item.active .prod-spec-count {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1e40af;
  font-weight: 600;
}

/* 右侧规格展开与流通状态区 */
.spec-detail-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.selected-product-banner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e2e8f0;
}

.prod-banner-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.selected-product-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.selected-product-cat {
  font-size: 11.5px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
}

.prod-banner-sub {
  font-size: 12.5px;
  color: #64748b;
}

.spec-selection-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.spec-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.spec-section-hint {
  font-size: 12px;
  color: #94a3b8;
}

.spec-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spec-pills-row .pill-btn {
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spec-pills-row .pill-btn:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.spec-pills-row .pill-btn.active {
  background: #1e40af;
  color: #ffffff;
  border-color: #1e40af;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
  font-weight: 700;
}

.spec-desc-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid #3b82f6;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
}

/* 当前流通正品标签横贯看板 */
.current-circ-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: 8px;
  padding: 10px 16px;
  gap: 16px;
  margin-top: 2px;
}

.circ-badge-col {
  display: flex;
  align-items: center;
}

.circ-badge {
  background: #059669;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.circ-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.circ-info-title {
  font-size: 13px;
  color: #065f46;
}

.circ-ver-text {
  font-size: 15px;
  font-weight: 800;
  color: #047857;
  font-family: var(--font-mono);
  margin-left: 4px;
}

.circ-info-meta {
  font-size: 12px;
  color: #059669;
}

.circ-status-col {
  display: flex;
  align-items: center;
}

.circ-status-tag {
  background: #ffffff;
  border: 1px solid #6ee7b7;
  color: #047857;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

@media (max-width: 900px) {
  .product-spec-hierarchy-container {
    flex-direction: column;
  }
  .product-vertical-column {
    width: 100%;
    max-width: 100%;
  }
  .product-vertical-list {
    max-height: 180px;
  }
  .current-circ-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.selector-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
}

.selector-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.product-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 320px;
  max-width: 440px;
  flex: 1;
}

.product-search-box .search-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  color: #94a3b8;
  pointer-events: none;
}

.product-search-box .search-input {
  width: 100%;
  padding: 8px 32px 8px 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.product-search-box .search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  outline: none;
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  padding: 2px;
}

.clear-search-btn:hover {
  color: var(--danger-red);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
  z-index: 100;
  max-height: 250px;
  overflow-y: auto;
}

.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f0fdf4;
}

.search-result-item b {
  color: var(--primary);
}

.search-result-badge {
  font-size: 11px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.field-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.step-num-badge {
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cascade-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #10b981;
  padding: 24px 8px 0;
  user-select: none;
}

.field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-sub);
}

.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(23, 114, 69, 0.2);
}

.current-circ-box {
  background: var(--circ-bg);
  border: 1px solid var(--circ-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  justify-self: end;
  min-width: 200px;
}

@media (max-width: 960px) {
  .current-circ-box {
    justify-self: stretch;
  }
}

.circ-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--circ-green);
  text-transform: uppercase;
}

.circ-value {
  font-size: 18px;
  font-weight: 900;
  color: var(--circ-green);
  line-height: 1.2;
}

.circ-meta {
  font-size: 11px;
  color: #166534;
  margin-top: 2px;
}

.spec-desc-bar {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* ================= 时间线画廊 Timeline Gallery ================= */
.timeline-card {
  padding: 18px 20px 14px;
}

.timeline-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot-circ { background: var(--circ-green); }
.dot-published { background: var(--pub-amber); }
.dot-draft { background: var(--draft-blue); }
.dot-history { background: var(--hist-gray); }

.timeline-gallery-scroll {
  overflow-x: auto;
  padding: 10px 2px 14px;
  margin-top: 4px;
  -webkit-overflow-scrolling: touch;
}

.timeline-gallery {
  display: flex;
  gap: 16px;
  min-width: min-content;
}

/* 单个版本卡片 (Version Card) */
.ver-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  width: 250px;
  flex: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.ver-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ver-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light), var(--shadow-md);
}

/* 卡片顶部缩略图 */
.ver-card-thumb-wrap {
  width: 100%;
  height: 120px;
  background: #f1f4f1;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ver-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.ver-card:hover .ver-card-thumb-wrap img {
  transform: scale(1.03);
}

.ver-card-status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.badge-circ { background: var(--circ-bg); color: var(--circ-green); border: 1px solid var(--circ-border); }
.badge-pub { background: var(--pub-bg); color: var(--pub-amber); border: 1px solid var(--pub-border); }
.badge-draft { background: var(--draft-bg); color: var(--draft-blue); border: 1px solid var(--draft-border); }
.badge-hist { background: var(--hist-bg); color: var(--hist-gray); border: 1px solid var(--hist-border); }

/* 卡片内容区 */
.ver-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ver-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.ver-card-number {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-main);
}

.ver-card.active .ver-card-number {
  color: var(--accent);
}

.ver-card-printno {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

.ver-card-dates {
  font-size: 12px;
  color: var(--text-sub);
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface-alt);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.timeline-note-bar {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ================= 标签详情与画布工作台 ================= */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
  transition: grid-template-columns 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 默认收起批注侧边栏，独占全宽完整呈现大图 */
.workspace-grid .anno-sidebar {
  display: none;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

/* 激活批注模式：平滑展开双栏工作台 */
.workspace-grid.mode-annotation {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.workspace-grid.mode-annotation .anno-sidebar {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateX(0);
  animation: sidebarSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sidebarSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 1080px) {
  .workspace-grid.mode-annotation {
    grid-template-columns: minmax(0, 1fr);
  }
}

.canvas-card {
  padding: 16px 20px 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

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

.canvas-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.canvas-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

/* 分面标签页按钮 */
.face-tabs-group {
  display: flex;
  gap: 6px;
}

.face-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
}

.face-btn:hover {
  border-color: var(--accent);
}

.face-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 画布工具栏 */
.canvas-toolbar {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.tool-left, .tool-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
}

/* 核心交互工具箱 (Segmented Tools: 漫游、框选、圈选、点位) */
.canvas-tool-group {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.btn-tool {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
  user-select: none;
}

.btn-tool kbd {
  font-size: 9.5px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 1px 4px;
  color: #64748b;
  font-family: inherit;
  font-weight: 700;
}

.btn-tool:hover {
  background: #f8fafc;
  color: var(--primary);
  border-color: #e2e8f0;
}

.btn-tool.active {
  background: #ecfdf5;
  color: #065f46;
  border-color: #10b981;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.15);
}

.btn-tool.active kbd {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}

/* 粗细与标记调节滑块群组 */
.slider-control-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.slider-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}

.slider-input {
  width: 75px;
  height: 4px;
  accent-color: var(--danger-red);
  cursor: pointer;
}

.slider-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--danger-red);
  min-width: 38px;
  text-align: right;
  font-family: monospace;
}

.selected-anno-tip {
  font-size: 11px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.canvas-notice-clean {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12.5px;
  color: var(--accent-hover);
  margin-bottom: 10px;
}

/* 画布视口核心区域 (Viewport & Stage) */
.viewport-stage-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 580px;
  max-height: 75vh;
  min-height: 480px;
  background: #fbfdfb;
  background-image: 
    linear-gradient(45deg, #f2f5f2 25%, transparent 25%), 
    linear-gradient(-45deg, #f2f5f2 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #f2f5f2 75%), 
    linear-gradient(-45deg, transparent 75%, #f2f5f2 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.viewport-stage-container.tool-pan {
  cursor: grab !important;
}

.viewport-stage-container.panning,
.viewport-stage-container.tool-pan.panning {
  cursor: grabbing !important;
}

.viewport-stage-container.space-panning {
  cursor: grab !important;
}

.viewport-stage-container.space-panning.panning {
  cursor: grabbing !important;
}

.viewport-stage-container.drawing {
  cursor: crosshair !important;
}

/* 画布自定义横纵滚动条 (Photoshop/CAD级无级视口滑块) */
.canvas-scrollbar {
  position: absolute;
  background: rgba(241, 245, 249, 0.88);
  backdrop-filter: blur(4px);
  z-index: 25;
  user-select: none;
  touch-action: none;
  transition: background 0.2s ease;
}

.canvas-scrollbar:hover {
  background: rgba(226, 232, 240, 0.95);
}

/* 纵向滚动条 (右侧滑块) */
.canvas-scrollbar-v {
  top: 0;
  right: 0;
  width: 14px;
  bottom: 14px;
  border-left: 1px solid rgba(203, 213, 225, 0.8);
  cursor: pointer;
}

/* 横向滚动条 (底部滑块) */
.canvas-scrollbar-h {
  left: 0;
  bottom: 0;
  height: 14px;
  right: 14px;
  border-top: 1px solid rgba(203, 213, 225, 0.8);
  cursor: pointer;
}

/* 滚动条交汇角落块 */
.canvas-scrollbar-corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  background: #cbd5e1;
  border-left: 1px solid rgba(148, 163, 184, 0.5);
  border-top: 1px solid rgba(148, 163, 184, 0.5);
  z-index: 26;
}

/* 滚动条滑块滑块 (Thumb) */
.canvas-scrollbar-thumb {
  position: absolute;
  background: #94a3b8;
  border-radius: 6px;
  cursor: grab;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.canvas-scrollbar-v .canvas-scrollbar-thumb {
  left: 2px;
  width: 10px;
  top: 0;
  min-height: 28px;
}

.canvas-scrollbar-h .canvas-scrollbar-thumb {
  top: 2px;
  height: 10px;
  left: 0;
  min-width: 28px;
}

.canvas-scrollbar-thumb:hover {
  background: #64748b;
}

.canvas-scrollbar-thumb.active {
  background: var(--primary) !important;
  cursor: grabbing !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6) !important;
}

.viewport-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  will-change: transform;
}

#labelStageImage {
  display: block;
  max-width: none;
  height: auto;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-radius: 2px;
}

/* 批注叠加图层 */
.annotation-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 批注标记点 (Point Pin) */
.anno-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--danger-red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
  transition: transform 0.1s ease;
}

.anno-pin:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

.anno-pin.active {
  background: #f59e0b;
  outline: 3px solid #fef08a;
  z-index: 20;
}

/* 批注圈选图形 (Shape) */
.anno-shape {
  position: absolute;
  border: 2.5px solid var(--danger-red);
  background: rgba(220, 38, 38, 0.08);
  pointer-events: auto;
  cursor: pointer;
  z-index: 5;
}

.anno-shape.circle {
  border-radius: 50%;
}

.anno-shape.rect {
  border-radius: 4px;
}

.anno-shape .shape-num {
  position: absolute;
  top: -12px;
  left: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger-red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.anno-shape.active {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
  z-index: 15;
}

.anno-shape.active .shape-num {
  background: #f59e0b;
}

/* 左侧单点定位标记闪烁 (Pin Flash) */
@keyframes pinFlashAnim {
  0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  20% { transform: translate(-50%, -50%) scale(1.5); box-shadow: 0 0 25px 8px #f59e0b; }
  40% { transform: translate(-50%, -50%) scale(1.15); box-shadow: 0 0 10px 4px #fbbf24; }
  60% { transform: translate(-50%, -50%) scale(1.55); box-shadow: 0 0 35px 12px #eab308; }
  80% { transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 15px 6px #f59e0b; }
  100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.anno-pin.flashing {
  animation: pinFlashAnim 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
  z-index: 100 !important;
}

/* 左侧框选/圈选标记闪烁 (Shape Flash) */
@keyframes shapeFlashAnim {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); border-color: var(--danger-red); }
  20% { box-shadow: 0 0 0 16px rgba(245, 158, 11, 0.85), 0 0 30px rgba(234, 179, 8, 0.7); border-color: #f59e0b; }
  40% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.4); border-color: #f59e0b; }
  60% { box-shadow: 0 0 0 20px rgba(245, 158, 11, 0.9), 0 0 45px rgba(234, 179, 8, 0.85); border-color: #fbbf24; }
  80% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.5); border-color: #f59e0b; }
  100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35); border-color: #f59e0b; }
}

.anno-shape.flashing {
  animation: shapeFlashAnim 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
  z-index: 100 !important;
}

.anno-shape.flashing .shape-num,
.anno-shape.flashing .anno-shape-badge {
  animation: pinFlashAnim 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

/* 实时拖拽预览框 */
.anno-shape.live-preview {
  border-style: dashed;
  opacity: 0.9;
  pointer-events: none;
}

/* 全屏模式下的顶部浮动 HUD 工具栏 (HUD Floating Toolbar) */
.fullscreen-hud-toolbar {
  display: none;
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 40px;
  padding: 6px 16px;
  box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.25);
  z-index: 1000;
  color: #fff;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: auto;
  max-width: 96vw;
  user-select: none;
  animation: hudSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hudSlideDown {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

:fullscreen .fullscreen-hud-toolbar,
:-webkit-full-screen .fullscreen-hud-toolbar,
.viewport-stage-container:fullscreen .fullscreen-hud-toolbar,
.viewport-stage-container:-webkit-full-screen .fullscreen-hud-toolbar,
.viewport-stage-container.is-fullscreen .fullscreen-hud-toolbar {
  display: flex !important;
}

.viewport-stage-container:fullscreen,
.viewport-stage-container:-webkit-full-screen,
.viewport-stage-container.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  z-index: 99999 !important;
  background: #0f172a !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.hud-left, .hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.hud-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  white-space: nowrap;
}

.hud-tool-group {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.btn-hud {
  background: transparent;
  border: 1px solid transparent;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn-hud kbd {
  font-size: 9px;
  background: rgba(255, 255, 255, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
  color: #cbd5e1;
}

.btn-hud:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-hud.active {
  background: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.btn-hud.active kbd {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}

.btn-hud-sm {
  padding: 3px 8px;
}

.btn-hud-exit {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.btn-hud-exit:hover {
  background: rgba(239, 68, 68, 0.7);
  color: #fff;
}

.hud-slider-group {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 16px;
}

.hud-lbl {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}

.hud-val {
  font-size: 11px;
  color: #34d399;
  font-weight: 700;
  font-family: monospace;
  min-width: 34px;
  text-align: right;
}

.hud-slider-input {
  width: 65px;
  height: 4px;
  accent-color: #10b981;
  cursor: pointer;
}

.hud-zoom-val {
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
  min-width: 40px;
  text-align: center;
}

/* 底部元数据栏 */
.canvas-bottom-meta {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.meta-row-info {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-sub);
  flex-wrap: wrap;
}

.canvas-action-bar {
  display: flex;
  gap: 10px;
}

/* 版本文件清单区 */
.version-files-block {
  margin-top: 18px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

.sub-block-title {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text-main);
}

.files-table-wrap {
  overflow-x: auto;
}

/* ================= 右侧批注列表 Sidebar ================= */
.anno-sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.anno-count-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 999px;
}

.sidebar-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.anno-scroll-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  margin-bottom: 16px;
}

/* 批注条目卡片 */
.anno-item-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.anno-item-card:hover {
  border-color: var(--accent);
  background: #ffffff;
}

.anno-item-card.active {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

/* 右侧列表卡片纯边框呼吸发光动效 (Card Glow Flash，文字绝对不晃动，消除眩晕感) */
@keyframes cardGlowFlash {
  0% { background: #ffffff; border-color: var(--border); box-shadow: none; }
  20% { background: #fffbeb; border-color: #f59e0b; box-shadow: 0 0 18px rgba(245, 158, 11, 0.65); }
  40% { background: #ffffff; border-color: #fbbf24; box-shadow: 0 0 8px rgba(245, 158, 11, 0.35); }
  60% { background: #fffbeb; border-color: #d97706; box-shadow: 0 0 24px rgba(245, 158, 11, 0.75); }
  80% { background: #ffffff; border-color: #f59e0b; box-shadow: 0 0 12px rgba(245, 158, 11, 0.45); }
  100% { background: #fffbeb; border-color: #f59e0b; }
}

.anno-item-card.flashing {
  animation: cardGlowFlash 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

.anno-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 4px;
}

.anno-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-del-draft {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-del-draft:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
}

.anno-item-num {
  font-weight: 800;
  color: var(--danger-red);
}

.anno-item-card.active .anno-item-num {
  color: #d97706;
}

.anno-item-author {
  color: var(--text-muted);
}

.anno-item-body {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.45;
}

.new-anno-box {
  background: var(--surface-sub);
  border: 1.5px dashed var(--accent-border);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: all 0.25s ease;
}

/* 圈选或点位后平滑渐入高亮 */
.new-anno-box.highlight-active {
  border-color: #10b981;
  border-style: solid;
  background: #f0fdf4;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

.box-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.box-head-row h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
}

.draft-tip {
  font-size: 11px;
  color: var(--draft-blue);
  background: var(--draft-bg);
  padding: 1px 6px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* 渐入提示文字动效 */
.draft-tip.fade-in-text {
  animation: draftTipPulse 0.4s ease-out forwards;
}

@keyframes draftTipPulse {
  0% {
    opacity: 0;
    transform: translateY(4px);
    background: #d1fae5;
    color: #065f46;
  }
  60% {
    opacity: 1;
    background: #a7f3d0;
    color: #047857;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    background: #ecfdf5;
    color: #059669;
  }
}

/* ================= 栅格、表单与通用组件 ================= */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 12px;
}

.form-control {
  width: 100%;
  font: inherit;
  font-size: 13.5px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-select {
  width: 100%;
  font: inherit;
  font-size: 13.5px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
}

.form-select-sm {
  padding: 4px 8px;
  font-size: 12.5px;
}

/* 按钮规范 */
.btn {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface-sub);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-sub);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--surface-sub);
  color: var(--text-main);
}

.btn-accent {
  background: #d97706;
  color: #fff;
  border-color: #d97706;
}

.btn-accent:hover {
  background: #b45309;
}

.btn-success {
  background: var(--circ-green);
  color: #fff;
  border-color: var(--circ-green);
}

.btn-group-end {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* 拖拽粘贴上传区域 (Dropzone) */
.drop-paste-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background: var(--surface-alt);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.drop-paste-zone:hover, .drop-paste-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.drop-zone-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.drop-zone-text {
  font-size: 13px;
}

.preview-thumb-box {
  position: relative;
  margin-top: 8px;
  display: inline-block;
}

.preview-thumb-box img {
  max-width: 160px;
  max-height: 100px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
}

.btn-remove-thumb {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--danger-red);
  color: #fff;
  border: none;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 必清清单卡口样式 */
.clearance-box {
  background: var(--pub-bg);
  border: 1px solid var(--pub-border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.clearance-summary {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 10px;
}

.clearance-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.clearance-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clearance-pos {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.clearance-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* 数据表格通用样式 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th, .data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-sub);
  color: var(--text-sub);
  font-weight: 700;
  font-size: 12.5px;
}

.data-table tr:hover td {
  background: var(--surface-alt);
}

/* 权限矩阵表格特化 */
.perm-matrix-table td {
  text-align: center;
}

.perm-matrix-table th {
  text-align: center;
}

.perm-matrix-table td:first-child, .perm-matrix-table th:first-child {
  text-align: left;
}

/* 开关组件 Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .2s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* 登录模态框 Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 36, 32, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface-alt);
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.modal-body {
  padding: 20px 24px;
}

.login-quick-hint {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.6;
}

.login-quick-hint code {
  background: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--accent);
}

.login-error-msg {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--danger-bg);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  color: var(--danger-red);
  font-size: 12.5px;
  font-weight: 600;
}

.modal-footer {
  padding: 14px 24px 20px;
}

/* 全局轻提示 Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: var(--text-main);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 历史补录网格 */
.evidence-grid-6 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  background: var(--surface-sub);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-top: 12px;
}

.static-pill-display {
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  color: var(--text-main);
}

/* ================= 肥料产品一级分类胶囊 ================= */
.category-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.category-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}

.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-pill {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.category-pill.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(23, 114, 69, 0.2);
}

/* 产品药丸旁未处理建议红点角标 */
.pill-btn .product-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  margin-left: 6px;
  line-height: 1;
}

/* ================= 贯穿式时间轴 (Timeline Axis) ================= */
.timeline-axis-container {
  position: relative;
  overflow-x: auto;
  padding: 24px 12px 18px;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
}

.timeline-axis-line {
  position: absolute;
  top: 156px;
  left: 20px;
  right: 20px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  z-index: 1;
}

.timeline-nodes-track {
  display: flex;
  gap: 28px;
  position: relative;
  z-index: 2;
  min-width: min-content;
  padding-bottom: 8px;
}

.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease;
}

.timeline-node:hover {
  transform: translateY(-3px);
}

.timeline-node-card {
  width: 240px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.timeline-node.active .timeline-node-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 多面规范并排拼贴缩略图 */
.stitched-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #f1f5f9;
  height: 110px;
  padding: 4px;
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}

.stitched-thumb img {
  height: 100%;
  max-width: 50%;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
}

.stitched-thumb.single-face img {
  max-width: 100%;
}

.timeline-node-info {
  padding: 10px 12px;
  font-size: 12px;
}

.timeline-node-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.timeline-node-ver {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.timeline-node-date {
  color: var(--text-muted);
  font-size: 11px;
}

.timeline-node-sub {
  color: var(--text-sub);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 时间线中轴连接圆点 */
.timeline-node-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 3.5px solid #94a3b8;
  margin-top: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.timeline-node.active .timeline-node-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.3);
}

.timeline-node-dot.dot-circ { border-color: var(--circ-green); }
.timeline-node.active .timeline-node-dot.dot-circ { background: var(--circ-green); }
.timeline-node-dot.dot-published { border-color: var(--pub-amber); }
.timeline-node-dot.dot-draft { border-color: var(--draft-blue); }
.timeline-node-dot.dot-history { border-color: var(--hist-gray); }

/* ================= 8 点锚点控制手柄 (Resize Handles) ================= */
.resize-handle {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border: 1.5px solid #dc2626;
  border-radius: 1px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  z-index: 25;
  box-sizing: border-box;
}

.anno-shape.active .resize-handle {
  border-color: #d97706;
}

.handle-nw { top: -5px; left: -5px; cursor: nwse-resize; }
.handle-n  { top: -5px; left: calc(50% - 4.5px); cursor: ns-resize; }
.handle-ne { top: -5px; right: -5px; cursor: nesw-resize; }
.handle-e  { top: calc(50% - 4.5px); right: -5px; cursor: ew-resize; }
.handle-se { bottom: -5px; right: -5px; cursor: nwse-resize; }
.handle-s  { bottom: -5px; left: calc(50% - 4.5px); cursor: ns-resize; }
.handle-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.handle-w  { top: calc(50% - 4.5px); left: -5px; cursor: ew-resize; }

/* 标记上方浮动快捷操作栏与删除小叉 */
.anno-floating-bar {
  position: absolute;
  top: -28px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 30;
}

.anno-floating-delete {
  width: 22px;
  height: 22px;
  background: #ef4444;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}

.anno-floating-delete:hover {
  background: #b91c1c;
  transform: scale(1.15);
}

/* ================= 画笔与标记所见即所得光标指示圈 ================= */
.brush-cursor-indicator {
  position: absolute;
  border: 1.5px solid rgba(220, 38, 38, 0.85);
  background: rgba(220, 38, 38, 0.12);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1000;
  box-sizing: border-box;
  transition: width 0.05s ease, height 0.05s ease;
}

/* ================= 操作日志筛选栏与确认弹窗 ================= */
.log-filter-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.log-filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.log-filter-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}

.modal-dialog-sm {
  max-width: 420px;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border-color: #b91c1c;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #991b1b;
}

/* 标签建议关联产品多选 */
.suggest-product-checkboxes {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 6px 0;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

/* ================= 纵向修订稿下挂分支 (Vertical Revision Branch) ================= */
.btn-vertical-toggle {
  width: 100%;
  padding: 6px 10px;
  background: #f8fafc;
  border: none;
  border-top: 1px dashed #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-vertical-toggle:hover {
  background: #e0f2fe;
  color: #0369a1;
}

.timeline-vertical-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 8px;
  position: relative;
  z-index: 5;
  animation: verticalBranchFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes verticalBranchFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vertical-branch-trunk {
  width: 2px;
  height: 14px;
  background: #0284c7;
  margin-bottom: 6px;
  position: relative;
}

.vertical-branch-trunk::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -3px;
  width: 8px;
  height: 8px;
  border-left: 2px solid #0284c7;
  border-bottom: 2px solid #0284c7;
  transform: rotate(-45deg);
}

.vertical-branch-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 236px;
}

.ver-subcard {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.08);
  position: relative;
  text-align: left;
}

.ver-subcard:hover {
  border-color: #0284c7;
  background: #e0f2fe;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.15);
}

.ver-subcard.active {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25), 0 3px 8px rgba(0, 0, 0, 0.1);
}

.subcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.subcard-ver {
  font-size: 13px;
  font-weight: 800;
  color: #0369a1;
}

.ver-subcard.active .subcard-ver {
  color: #0284c7;
}

.subcard-meta {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 3px;
}

.subcard-note {
  font-size: 11.5px;
  color: #334155;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= 微信图片编辑风格标注手感 ================= */
.viewer-container.drawing:not(.pan-tool-active):not(.space-panning) .stage-viewport,
.viewer-container.drawing:not(.pan-tool-active):not(.space-panning) .annotation-overlay,
.viewer-container.drawing:not(.pan-tool-active):not(.space-panning) .stage-image {
  cursor: crosshair !important;
}

/* 正在拖拽预览的形状：严禁接收鼠标事件以防拖拽向上或向左卡顿 */
.anno-shape.live-preview {
  pointer-events: none !important;
  user-select: none !important;
  transition: none !important;
  animation: none !important;
  z-index: 1000 !important;
}

/* 移动与缩放过程取消 transition，确保 60fps 丝滑无延迟 */
.anno-shape.is-dragging,
.anno-shape.is-resizing,
.anno-pin.is-dragging {
  transition: none !important;
  animation: none !important;
  user-select: none !important;
}

/* 微信风格快捷粗细胶囊按钮 */
.quick-thickness-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f1f5f9;
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-left: 6px;
}

.btn-thickness-pill {
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-thickness-pill:hover {
  background: #ffffff;
  color: #0f172a;
}

.btn-thickness-pill.active {
  background: #ffffff;
  color: #dc2626;
  border-color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* 静默编辑模式：选中标记仅显示8个手柄与边框，绝不跳动晃动眩晕 */
.anno-shape.active {
  border-color: #dc2626;
  box-shadow: 0 0 0 1.5px rgba(220, 38, 38, 0.45);
}

.anno-pin.active {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.35);
}

/* 账号状态徽标 */
.badge-user-active {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-user-pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-user-disabled {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ================= 批注草稿与确认发布状态 ================= */
.anno-badge-draft {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-block;
  margin-left: 6px;
}

.anno-card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}

.btn-confirm-publish-card {
  background: #10b981;
  color: #ffffff;
  border: 1px solid #059669;
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
  transition: all 0.15s ease;
}

.btn-confirm-publish-card:hover {
  background: #059669;
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.3);
}

/* ================= 跨规格批注同步样式 ================= */
.anno-item-card.synced-pending {
  border: 2px dashed #ef4444 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15) !important;
}

.anno-item-card.synced-pending:hover {
  border-color: #dc2626 !important;
  background: #fee2e2 !important;
}

.anno-badge-sync-pending {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 700;
}

.anno-badge-synced {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 700;
}

.anno-sync-tag {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #fde68a;
  font-weight: 600;
}

.btn-anno-sync {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 2px 7px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-anno-sync:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.btn-place-sync-marker {
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-place-sync-marker:hover {
  background: #b91c1c;
}

/* ================= 纵向修订版本详情呈现面板与箭头动态跟随 ================= */
.vertical-branch-content-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.ver-subcard.active {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25), 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* 蓝色指示箭头动态跟随：直接绑定在当前选中的小版本卡片右侧，无论选第几个都 100% 垂直居中对齐 */
.ver-subcard.active::after {
  content: "➔";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: #0284c7;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  z-index: 10;
  text-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
}

.vertical-branch-detail-panel {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: revDetailFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition: margin-top 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes revDetailFadeIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.detail-panel-arrow {
  color: #0284c7;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  margin-top: 14px;
  user-select: none;
  display: none; /* 已由 ::after 更加精准自适应接管，隐藏死板定位 */
}

.rev-detail-card {
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 8px;
  padding: 12px 14px;
  width: 440px;
  max-width: 520px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
  text-align: left;
  transition: transform 0.2s ease, margin-top 0.2s ease;
}

/* ================= 主工作台画布原图超清画质保证与聚焦缩放交互 ================= */
#labelStageImage {
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: smooth;
  max-width: none;
  display: block;
}

/* 画布聚焦与非聚焦状态 (点击激活滚轮缩放，点击外部恢复页面滚动) */
.viewport-stage-container {
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1.5px solid #cbd5e1;
}

.viewport-stage-container.canvas-focused {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.25), 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

.canvas-focus-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid #cbd5e1;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.viewport-stage-container.canvas-focused .canvas-focus-badge {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.22);
}

.canvas-notice-clean {
  transition: all 0.2s ease;
}

/* ================= 时间轴节点 3 行完整元数据展示 ================= */
.timeline-node-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  text-align: left;
}

.timeline-node-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.timeline-node-ver {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.timeline-node-date,
.timeline-node-enable {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-node-date b,
.timeline-node-enable b {
  color: #64748b;
  font-weight: 600;
  margin-right: 2px;
}

.pending-enable-txt {
  color: #d97706;
  font-weight: 700;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #fde68a;
  font-size: 11px;
}

.btn-quick-enable {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quick-enable:hover {
  background: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
}

/* ================= 产品规格管理与全流程跟踪系统 ================= */
.spec-mgmt-card {
  padding: 22px;
  background: #ffffff;
}

.spec-mgmt-header-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spec-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.spec-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.spec-filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-filter-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.spec-count-tag {
  font-size: 12px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 10px;
  border-radius: 20px;
}

.spec-table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.spec-mgmt-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.spec-mgmt-data-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid #cbd5e1;
  white-space: nowrap;
}

.spec-mgmt-data-table td {
  padding: 12px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  vertical-align: middle;
}

.spec-mgmt-data-table tr:hover {
  background: #f8fafc;
}

/* 全流程生命周期确认记录链条样式 */
.lifecycle-chain {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lifecycle-node {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  line-height: 1.35;
}

.lifecycle-step-chip {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.step-chip-design {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.step-chip-review {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.step-chip-publish {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.step-chip-enable {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.step-chip-pending {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.lifecycle-user {
  font-weight: 700;
  color: #1e293b;
}

.lifecycle-time {
  color: #64748b;
}

.spec-mgmt-footer-note {
  margin-top: 14px;
  padding: 8px 12px;
  background: #f8fafc;
  border-left: 3px solid #059669;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  color: #475569;
}

.rev-detail-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0f2fe;
}

.rev-detail-badge {
  background: #0284c7;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.rev-detail-ver {
  font-size: 14px;
  font-weight: 800;
  color: #0369a1;
}

.rev-detail-author {
  font-size: 11px;
  color: #64748b;
  margin-left: auto;
}

.rev-detail-summary-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: #0369a1;
  line-height: 1.5;
}

.rev-section-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

.rev-summary-text {
  color: #0f172a;
}

.rev-numbered-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: #334155;
  line-height: 1.6;
}

.rev-numbered-list li {
  margin-bottom: 3px;
}

.rev-numbered-list li::marker {
  color: #0284c7;
  font-weight: 700;
}

/* ================= 全员公开定稿说明栏 (截图5) ================= */
.timeline-public-notes-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #10b981;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 10px;
  width: 100%;
  text-align: left;
}

.pub-notes-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
}

.pub-badge {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.pub-summary {
  font-size: 12.5px;
  color: #334155;
  margin-bottom: 6px;
}

.pub-numbered-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}

/* ================= 首页全生命周期流转与确认链 ================= */
.version-chain-block {
  margin-top: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.chain-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.chain-sync-tip {
  font-size: 11.5px;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.chain-steps-track {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.chain-step-card {
  flex: 1;
  min-width: 170px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.chain-step-card.is-pending {
  border-color: #fca5a5;
  background: #fff5f5;
}

.chain-step-card.is-done {
  border-left: 3px solid #10b981;
}

.chain-step-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.chain-step-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.chain-step-role {
  font-size: 11px;
  color: #64748b;
}

.chain-step-person {
  font-size: 12px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 2px;
}

.chain-step-card.is-pending .chain-step-person {
  color: #dc2626;
}

.chain-step-time {
  font-size: 10.5px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.chain-step-note {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
  background: #f1f5f9;
  padding: 4px 6px;
  border-radius: 4px;
}

.chain-step-card.is-pending .chain-step-note {
  background: #fee2e2;
  color: #991b1b;
}

/* ================= 标签建议版本档案库 (Archive Gallery & Cards) ================= */
.sugg-archive-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.sugg-archive-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sugg-archive-card:hover {
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.sugg-archive-card.active {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2), 0 4px 14px rgba(2, 132, 199, 0.15);
}

.sugg-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.sugg-card-pname {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.sugg-card-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  white-space: nowrap;
}

.sugg-card-badge.has-pending {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
  animation: pulseBadge 2s infinite ease-in-out;
}

.sugg-card-badge.zero-pending {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.sugg-card-spec {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
  margin-bottom: 4px;
}

.sugg-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}

.sugg-card-ver {
  font-weight: 700;
  color: #0284c7;
}

/* 激活的标签建议横幅 */
.sugg-active-header-banner {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0284c7;
  border-radius: 8px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sugg-active-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sugg-active-badge {
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 4px;
}

.pending-chip {
  font-size: 11.5px;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #fde68a;
}

/* ================= 移动端与全分辨率企业级自适应响应式 ================= */
@media (max-width: 1080px) {
  .wrap {
    padding: 0 16px;
  }
  .selector-main-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .sugg-active-header-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 10px;
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  .main-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 6px;
  }
  .grid-2col {
    grid-template-columns: 1fr;
  }
  .sugg-archive-gallery {
    grid-template-columns: 1fr;
  }
  .spec-mgmt-card {
    padding: 12px;
  }
  .spec-table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .spec-toolbar-left {
    flex-direction: column;
    align-items: stretch;
  }
}


