/**
 * Vue 挂载前隐藏根节点，避免 iframe 内未编译模板（{{ tt(...) }}）闪现。
 */
[v-cloak] {
  display: none !important;
}

/**
 * 策略工作台 · 统一空状态（首次进入 / 无配置 / 筛选无结果）
 * 各 * _unified.html 引入；依赖页面 :root 的 --text-main、--text-note、--border-color、--primary-blue / --primary
 *
 * 视觉：偏柔和的中性深色底 + 低饱和点缀，避免与高亮 KPI/工具条抢对比。
 */

.cw-wb-empty {
  --cw-empty-line: var(--border-color, #2d3748);
  --cw-empty-note: var(--text-note, #94a3b8);
  --cw-empty-main: var(--text-main, #e2e8f0);
  --cw-empty-tint: color-mix(in srgb, var(--primary-blue, var(--primary, #38bdf8)) 18%, transparent);
  box-sizing: border-box;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px 28px;
  margin-top: 4px;
  border: 1px dashed color-mix(in srgb, var(--cw-empty-line) 70%, rgba(148, 163, 184, 0.45));
  border-radius: 16px;
  background: linear-gradient(
    165deg,
    rgba(15, 23, 42, 0.55),
    rgba(15, 23, 42, 0.38) 45%,
    color-mix(in srgb, var(--cw-empty-tint) 12%, rgba(15, 23, 42, 0.42))
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.cw-wb-empty__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.55), rgba(15, 23, 42, 0.35));
  color: rgba(148, 163, 184, 0.88);
}

.cw-wb-empty__visual svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  opacity: 0.92;
}

.cw-wb-empty__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: color-mix(in srgb, var(--cw-empty-main) 88%, #cbd5e1);
  max-width: 420px;
  letter-spacing: 0.01em;
}

.cw-wb-empty__desc {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.7;
  color: color-mix(in srgb, var(--cw-empty-note) 92%, #64748b);
  max-width: 480px;
}

.cw-wb-empty__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* 与执行条主按钮同语义，略降饱和以免在空状态区内过于抢眼 */
.cw-wb-empty .wb-exec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  box-sizing: border-box;
  white-space: nowrap;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.cw-wb-empty .wb-exec-btn--primary {
  --wb-p: var(--primary-blue, var(--primary, #38bdf8));
  --wb-p2: var(--wb-exec-primary-end, var(--primary-blue, var(--primary, #0ea5e9)));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--wb-p) 14%, rgba(15, 23, 42, 0.94)),
    color-mix(in srgb, var(--wb-p2) 10%, rgba(15, 23, 42, 0.96))
  );
  border-color: color-mix(in srgb, var(--wb-p) 26%, rgba(148, 163, 184, 0.25));
  color: color-mix(in srgb, var(--wb-p) 22%, #e2e8f0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.cw-wb-empty a.wb-exec-btn--primary:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--wb-p, var(--primary-blue, #38bdf8)) 38%, rgba(148, 163, 184, 0.3));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--wb-p, var(--primary-blue, #38bdf8)) 22%, rgba(15, 23, 42, 0.9)),
    color-mix(in srgb, var(--wb-p2, var(--wb-p, #0ea5e9)) 16%, rgba(15, 23, 42, 0.92))
  );
  color: #f1f5f9;
}

.cw-wb-empty__btn-ghost {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.35);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.cw-wb-empty__btn-ghost:hover {
  border-color: color-mix(in srgb, var(--primary-blue, var(--primary, #38bdf8)) 35%, rgba(148, 163, 184, 0.4));
  color: color-mix(in srgb, var(--primary-blue, var(--primary, #7dd3fc)) 55%, #e2e8f0);
  background: rgba(15, 23, 42, 0.5);
}

button.cw-wb-empty__btn-ghost {
  cursor: pointer;
  font-family: inherit;
}

/* 表内整行包裹时：去掉额外上 margin，略减 min-height */
td .cw-wb-empty,
.cw-wb-empty--in-table {
  margin-top: 0;
  min-height: 180px;
}
