body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 将 antd message 移到右上角 */
.ant-message {
  left: unset !important;
  right: 16px !important;
  transform: none !important;
  text-align: right;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* ── Login Page Animations ── */
@keyframes viq-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-12px) rotate(1deg); }
  66% { transform: translateY(-6px) rotate(-1deg); }
}

@keyframes viq-pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes viq-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes viq-rotate-reverse {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes viq-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes viq-flow-dot {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

@keyframes viq-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* 蓝色 glow 脉冲（新色系） */
@keyframes viq-glow-pulse-blue {
  0%, 100% { box-shadow: 0 0 20px rgba(41, 121, 255, 0.5); }
  50% { box-shadow: 0 0 40px rgba(41, 121, 255, 0.9), 0 0 60px rgba(41, 121, 255, 0.4); }
}

/* 旧版青色 glow（保留兼容） */
@keyframes viq-glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 201, 212, 0.4); }
  50% { box-shadow: 0 0 40px rgba(0, 201, 212, 0.8), 0 0 60px rgba(0, 201, 212, 0.3); }
}

@keyframes viq-particle {
  0% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* 解析面板逐行扫描 */
@keyframes viq-row-scan {
  0%   { opacity: 0; transform: translateX(-10px); }
  7%   { opacity: 1; transform: translateX(0); }
  70%  { opacity: 1; transform: translateX(0); }
  77%  { opacity: 0; transform: translateX(6px); }
  100% { opacity: 0; transform: translateX(-10px); }
}

/* 解析头部文字呼吸 */
@keyframes viq-parse-breath {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

@keyframes viq-flow-lr {
  0%   { transform: translateX(-145px); opacity: 0; }
  12%  { opacity: 0.9; }
  88%  { opacity: 0.9; }
  100% { transform: translateX(145px); opacity: 0; }
}

@keyframes viq-open-dot {
  0%, 100% { r: 4; opacity: 0.8; }
  50% { r: 6; opacity: 1; }
}

/* SOP 节点点击 → 工具栏按钮脉冲闪烁（3次后自动停） */
@keyframes viq-sop-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22, 119, 255, 0.75); background: rgba(22, 119, 255, 0.12); }
  50%  { box-shadow: 0 0 0 7px rgba(22, 119, 255, 0); background: rgba(22, 119, 255, 0.05); }
  100% { box-shadow: 0 0 0 0 rgba(22, 119, 255, 0); background: transparent; }
}
.viq-sop-highlight {
  animation: viq-sop-pulse 0.55s ease 3;
  border-radius: 6px;
}

/* ══ 全局表格统一风格 ═════════════════════════════════════════════════════════

   设计语言：
   - 表头：蓝灰底 #f0f4f8，字号 12px 加粗
   - 奇数行：纯白 #ffffff
   - 偶数行：极浅灰 #f7f9fc（斑马纹，细微不抢眼）
   - hover：主色浅蓝 #ebf3ff，奇偶统一
   - 特殊行（待处理/警告）：暖橙底，左侧 3px 色条标识

══════════════════════════════════════════════════════════════════════════ */

/* 表头 */
.ant-table-thead > tr > th,
.ant-table-thead > tr > td {
  background: #f0f4f8 !important;
  color: #4a5568 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* 偶数行斑马纹 */
.ant-table-tbody > tr.ant-table-row:nth-child(even) > td {
  background: #f7f9fc;
}

/* 行 hover（奇偶统一，覆盖默认） */
.ant-table-tbody > tr.ant-table-row:hover > td,
.ant-table-tbody > tr.ant-table-row:hover > td.ant-table-cell-row-hover {
  background: #ebf3ff !important;
}

/* 待处理 / 警告行（用 .viq-row-warning 替代滥用 ant-table-row-selected） */
.ant-table-tbody > tr.viq-row-warning > td {
  background: #fff8f0 !important;
}
.ant-table-tbody > tr.viq-row-warning > td:first-child {
  box-shadow: inset 3px 0 0 #fa8c16;
}
.ant-table-tbody > tr.viq-row-warning:hover > td {
  background: #fff0dc !important;
}

/* 激活/成功行（绿色调） */
.ant-table-tbody > tr.viq-row-active > td {
  background: #f0fdf4 !important;
}
.ant-table-tbody > tr.viq-row-active > td:first-child {
  box-shadow: inset 3px 0 0 #52c41a;
}
.ant-table-tbody > tr.viq-row-active:hover > td {
  background: #dcfce7 !important;
}

/* ── 全局按钮 hover 统一 ───────────────────────────────────────────────── */
/* default 按钮 hover → 主色边框+文字 */
.ant-btn-default:not(:disabled):hover {
  color: #1677ff !important;
  border-color: #1677ff !important;
}

/* AutoComplete 下拉选项 */
.viq-autocomplete-dropdown .ant-select-item {
  color: #1B3A6B;
}
.viq-autocomplete-dropdown .ant-select-item-option-active {
  background: rgba(41,121,255,0.08);
}

#root {
  width: 100%;
  min-height: 100vh;
}

.custom-tree .ant-tree-treenode {
  padding-left: 0 !important;
}

.custom-tree .ant-tree-switcher {
  margin-left: 0 !important;
}

.custom-tree .ant-tree-indent {
  margin-left: -8px !important;
}

.custom-tree .ant-tree-switcher-line-icon {
  color: #8c8c8c !important;
}

.custom-tree .ant-tree-switcher-line {
  border-color: #8c8c8c !important;
}

.custom-tree .ant-tree-indent-unit::before {
  border-color: #8c8c8c !important;
}
