/* ═══════════════════════════════════════════════
   Assets 资产 v1
   ═══════════════════════════════════════════════ */

.at-module {
  padding: 28px 32px 64px;
  max-width: 860px;
  margin: 0 auto;
  font-family: -apple-system, 'SF Pro Text', 'PingFang SC', sans-serif;
}

/* ── Header ── */
.at-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
}
.at-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text, #0f172a);
  margin: 0 0 3px;
  letter-spacing: -0.02em;
}
.at-subtitle {
  font-size: 11px;
  color: var(--color-text-muted, #94a3b8);
  margin: 0;
}
.at-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.at-analyzer-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.at-auto-badge {
  padding: 2px 8px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.at-last-run {
  color: var(--color-text-muted, #94a3b8);
  font-size: 11px;
  white-space: nowrap;
}

.at-run-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  height: 30px;
  background: var(--color-primary, #0ea5e9);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.at-run-btn:hover    { opacity: 0.88; }
.at-run-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.at-icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-background, #fff);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary, #64748b);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}
.at-icon-btn:hover { background: var(--color-surface, #f8fafc); color: var(--color-text, #0f172a); }

.at-spin { display: inline-block; animation: at-spin 0.8s linear infinite; }
@keyframes at-spin { to { transform: rotate(360deg); } }

/* ── Tabs ── */
.at-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  margin-bottom: 16px;
  gap: 0;
}
.at-tab {
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary, #64748b);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  white-space: nowrap;
}
.at-tab:hover { color: var(--color-text, #0f172a); }
.at-tab-active {
  color: var(--color-primary, #0ea5e9);
  border-bottom-color: var(--color-primary, #0ea5e9);
  font-weight: 600;
}
.at-badge {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  background: var(--color-primary, #0ea5e9);
  color: #fff;
  border-radius: 8px;
}
.at-badge:empty { display: none; }

/* ── Body states ── */
.at-loading, .at-error {
  text-align: center;
  padding: 48px 24px;
  font-size: 13px;
  color: var(--color-text-muted, #94a3b8);
}
.at-error { color: #ef4444; }
.at-muted { color: var(--color-text-muted, #94a3b8); font-size: 11px; }

/* ── Filter bar ── */
.at-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.at-cat-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.at-pill {
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text-secondary, #64748b);
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.at-pill:hover { border-color: #cbd5e1; color: var(--color-text, #0f172a); }
.at-pill.active {
  background: var(--color-primary, #0ea5e9);
  color: #fff;
  border-color: var(--color-primary, #0ea5e9);
}
.at-pill sup {
  font-size: 9px;
  margin-left: 2px;
  opacity: 0.8;
}
.at-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text-secondary, #64748b);
  background: none;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}
.at-toggle-btn:hover { background: var(--color-surface, #f8fafc); color: var(--color-text, #0f172a); }

/* ── Empty card ── */
.at-empty-card {
  background: var(--color-surface, #f8fafc);
  border: 1px dashed var(--color-border, #e2e8f0);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
}
.at-empty-icon { font-size: 28px; margin-bottom: 10px; }
.at-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text, #0f172a);
  margin-bottom: 6px;
}
.at-empty-desc {
  font-size: 12px;
  color: var(--color-text-secondary, #64748b);
  line-height: 1.6;
}

/* ── Insight cards ── */
.at-insights {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.at-insight {
  background: var(--color-background, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-left: 3px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  padding: 14px 16px 10px;
  transition: box-shadow 0.15s;
}
.at-insight:hover { box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.at-insight-dim { opacity: 0.5; }

.at-insight-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.at-cat-tag {
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--cat-color, #64748b);
  border-radius: 100px;
  letter-spacing: 0.02em;
}
.at-conf {
  font-size: 11px;
  color: var(--color-text-secondary, #64748b);
  font-variant-numeric: tabular-nums;
}
.at-meta-pill {
  font-size: 10px;
  padding: 2px 7px;
  background: var(--color-surface-2, #f1f5f9);
  border-radius: 100px;
  color: var(--color-text-secondary, #64748b);
}
.at-exp-warn { background: #fef9c3; color: #854d0e; }

.at-status-pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 100px;
}
.at-status-draft    { background: #f1f5f9; color: #475569; }
.at-status-approved { background: #dcfce7; color: #166534; }
.at-status-rejected { background: #fee2e2; color: #991b1b; }
.at-status-archived { background: #f1f5f9; color: #94a3b8; }

.at-insight-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text, #0f172a);
  margin: 0 0 5px;
  line-height: 1.4;
}
.at-insight-desc {
  font-size: 13px;
  color: var(--color-text, #0f172a);
  line-height: 1.55;
  margin: 0 0 8px;
}
.at-scope {
  font-size: 11px;
  color: var(--color-text-secondary, #64748b);
  margin-bottom: 8px;
}

/* Stats chips */
.at-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.at-stats > div {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border-light, #f1f5f9);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
}
.at-stats dt {
  color: var(--color-text-secondary, #64748b);
  font-size: 10px;
}
.at-stats dd {
  margin: 0;
  font-weight: 700;
  color: var(--color-text, #0f172a);
  font-variant-numeric: tabular-nums;
}

.at-evidence {
  font-size: 11px;
  color: var(--color-text-muted, #94a3b8);
  margin-bottom: 6px;
}

.at-samples {
  font-size: 11px;
  color: var(--color-text-secondary, #64748b);
  margin: 4px 0 8px;
}
.at-samples summary { cursor: pointer; user-select: none; }
.at-samples ul { list-style: disc; margin: 6px 0 0 20px; padding: 0; }
.at-samples li { margin-bottom: 3px; color: var(--color-text, #0f172a); }

/* Card footer */
.at-insight-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border-light, #f1f5f9);
  padding-top: 8px;
  margin-top: 6px;
  gap: 8px;
  flex-wrap: wrap;
}
.at-insight-actions {
  display: inline-flex;
  gap: 4px;
}
.at-act-btn {
  padding: 3px 10px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  color: var(--color-text-secondary, #64748b);
  background: none;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.at-act-btn:hover { background: var(--color-surface, #f8fafc); color: var(--color-text, #0f172a); }
.at-act-approve { color: #16a34a; border-color: #bbf7d0; }
.at-act-approve:hover { background: #f0fdf4; }
.at-act-reject  { color: #dc2626; border-color: #fecaca; }
.at-act-reject:hover  { background: #fef2f2; }

/* ── Templates ── */
.at-templates {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.at-tpl {
  background: var(--color-background, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  padding: 12px 14px;
}
.at-tpl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
