/* SeqMatrix UI 统一组件 v1.0 - 加载骨架屏 + 空态 + 错误态 + 数据来源标签
 * 引入方式：在 theme.css 后引入 static/ui-unify.css
 * 设计原则：与现有 design token 完全一致（颜色/字体/圆角），不破坏既有页面视觉
 */
/* ========== 骨架屏 ========== */
.sm-skeleton{display:flex;flex-direction:column;gap:8px;padding:16px 0}
.sm-skeleton-card{background:#FFF;border:1px solid var(--border);border-radius:var(--radius-md);padding:20px;display:flex;gap:16px;align-items:center}
.sm-skeleton-card .sk-avatar{width:48px;height:48px;border-radius:50%;background:linear-gradient(90deg,#F1F5F9 25%,#E2E8F0 50%,#F1F5F9 75%);background-size:200% 100%;animation:sm-shimmer 1.4s ease-in-out infinite;flex-shrink:0}
.sm-skeleton-card .sk-lines{flex:1;display:flex;flex-direction:column;gap:6px}
.sm-skeleton-card .sk-line{height:12px;border-radius:4px;background:linear-gradient(90deg,#F1F5F9 25%,#E2E8F0 50%,#F1F5F9 75%);background-size:200% 100%;animation:sm-shimmer 1.4s ease-in-out infinite}
.sm-skeleton-card .sk-line.short{width:40%}
.sm-skeleton-card .sk-line.med{width:70%}
.sm-skeleton-row{display:flex;gap:8px;padding:12px 16px;border-bottom:1px solid var(--border)}
.sm-skeleton-row .sk-cell{flex:1;height:14px;border-radius:4px;background:linear-gradient(90deg,#F1F5F9 25%,#E2E8F0 50%,#F1F5F9 75%);background-size:200% 100%;animation:sm-shimmer 1.4s ease-in-out infinite}
.sm-skeleton-row .sk-cell:last-child{flex:.6}
@keyframes sm-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* ========== 空态 ========== */
.sm-empty{text-align:center;padding:60px 24px;color:var(--text-3);font-size:14px}
.sm-empty .ico{font-size:40px;margin-bottom:12px;opacity:.6}
.sm-empty .ttl{font-size:16px;font-weight:600;color:var(--text-2);margin-bottom:6px}
.sm-empty .desc{font-size:13px;color:var(--text-3);line-height:1.6}
.sm-empty .action{margin-top:16px;display:inline-block;padding:8px 16px;border-radius:8px;background:var(--grad-primary);color:#FFF;font-size:12px;font-weight:600;cursor:pointer;text-decoration:none}

/* ========== 错误态 ========== */
.sm-error{text-align:center;padding:40px 24px;background:rgba(220,38,38,.04);border:1px solid rgba(220,38,38,.15);border-radius:var(--radius-md);color:#DC2626}
.sm-error .ico{font-size:32px;margin-bottom:8px}
.sm-error .ttl{font-size:14px;font-weight:600;margin-bottom:4px}
.sm-error .desc{font-size:12px;color:#7F1D1D;line-height:1.5}
.sm-error .retry{margin-top:12px;display:inline-block;padding:6px 14px;border:1px solid #DC2626;border-radius:6px;background:#FFF;color:#DC2626;font-size:12px;font-weight:600;cursor:pointer;text-decoration:none}

/* ========== 数据来源标签 ========== */
.sm-source-badge{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:12px;background:rgba(30,64,175,.08);color:var(--primary);font-size:11px;font-weight:600}
.sm-source-badge::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--success)}
.sm-source-badge::after{content:"数据源已校验"}

/* ========== 加载占位（与现有 "加载中..." 替换） ========== */
.sm-loading{display:flex;align-items:center;justify-content:center;gap:10px;padding:60px 24px;color:var(--text-3);font-size:13px}
.sm-loading .spinner{width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:sm-spin .8s linear infinite}
@keyframes sm-spin{to{transform:rotate(360deg)}}

/* ========== 数据完整度提示条 ========== */
.sm-data-notice{margin:16px 0;padding:10px 16px;background:linear-gradient(90deg,rgba(30,64,175,.05),rgba(91,33,182,.05));border:1px solid rgba(30,64,175,.1);border-radius:var(--radius-sm);font-size:12px;color:var(--text-2);display:flex;align-items:center;gap:8px}
.sm-data-notice .badge{padding:2px 8px;background:var(--grad-primary);color:#FFF;border-radius:6px;font-size:10px;font-weight:700;letter-spacing:.5px}
