/* 智汇YCS S4 · 全站公共样式（骨架屏/表格十字固定/徽标） */

/* 骨架屏 */
@keyframes sk { 0%,100%{opacity:.55} 50%{opacity:1} }
.sk { animation: sk 1.4s ease-in-out infinite; background:#e2e8f0; border-radius:6px; }

/* 数字等宽（金额/单价列必用） */
.num { font-variant-numeric: tabular-nums; }

/* 表格十字固定（首行吸顶 + 首列吸左）：
   - Safari/iOS 下 border-collapse 会让 sticky 失效 → 必须 border-separate
   - 容器必须自身可纵向滚动（max-h + overflow-auto），否则 sticky top 形同虚设
   - 层级：角格 z-30 > 表头 z-20 > 首列 z-10 */
.tbl-wrap { max-height: 70vh; overflow: auto; -webkit-overflow-scrolling: touch; }
table.tbl { border-collapse: separate; border-spacing: 0; min-width: 760px; width: 100%; font-size: 13px; }
table.tbl th, table.tbl td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; white-space: nowrap; }
table.tbl thead th { position: sticky; top: 0; z-index: 20; background: #f8fafc; font-weight: 600; color:#475569; }
table.tbl td:first-child, table.tbl th:first-child { position: sticky; left: 0; z-index: 10; background: #fff; box-shadow: 2px 0 6px rgba(15,23,42,.06); }
table.tbl thead th:first-child { z-index: 30; background: #f8fafc; }
table.tbl tbody tr:hover td { background: #f1f5f9; }
table.tbl tbody tr:hover td:first-child { background: #f1f5f9; }

/* 明细首列（供应商）强调 */
table.tbl td:first-child { font-weight: 500; }

/* 徽标 */
.badge { display:inline-flex; align-items:center; gap:6px; border-radius:9999px; padding:4px 10px; font-size:12px; font-weight:500; }
.badge-ok { border:1px solid #a7f3d0; background:#ecfdf5; color:#047857; }
.badge-bad { border:1px solid #fecaca; background:#fef2f2; color:#b91c1c; animation: sk 1.4s ease-in-out infinite; }
.dot { width:6px; height:6px; border-radius:9999px; }

/* 三态占位 */
.state-box { padding:48px 16px; text-align:center; color:#64748b; font-size:14px; }
.state-box .err { color:#b91c1c; }
.spinner { width:28px; height:28px; margin:0 auto 12px; border:3px solid #e2e8f0; border-top-color:#6366f1; border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* 操作按钮（实心，看得见点得到） */
.btn-act { display:inline-block; background:#4f46e5; color:#fff; border-radius:8px; padding:6px 14px; font-size:13px; font-weight:600; border:none; }
.btn-act:active { opacity:.85; }
.btn-act:disabled { opacity:.5; }
