/* ============================================================
   assets/css/assistant-cards.css —— 结果卡 / 表格 / 右栏详情
   ------------------------------------------------------------
   与 assistant.css 分开的理由和 JS 一样：这一份只跟**卡片协议**走。
   服务端新增一种卡，改动只应该落在 server/assistant/cards.js 与这里，
   而不是散进布局文件里（布局一改就要重新看一遍整页）。

   颜色仍取 style.css 的设计令牌：卡片是页面的一部分，不是另一套主题。
   ============================================================ */

/* ---------- 卡片 ---------- */
.ast-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.ast-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ast-card__title {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--navy);
}

.ast-card__note { font-size: var(--fs-xs); color: var(--muted); }

.ast-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
}

.ast-kpi__cell {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.ast-kpi__cell b {
  display: block;
  font-size: var(--fs-4xl);
  line-height: 1.15;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.ast-kpi__cell b i {
  font-style: normal;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-left: 3px;
}

.ast-kpi__cell span {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.5;
}

.ast-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
}

.ast-table th,
.ast-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.ast-table th {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 600;
  background: var(--bg-soft);
}

.ast-table tbody tr { cursor: pointer; }
.ast-table tbody tr:hover td { background: var(--gold-095); }
.ast-table tbody tr[aria-current="true"] td { background: var(--gold-095b); }

.ast-card--action { border-color: var(--gold-085); background: var(--gold-100); }
.ast-card--done { border-color: var(--green-085); background: var(--green-100); }
.ast-card--error { border-color: var(--red-085); background: var(--red-100); }

.ast-card__body {
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.ast-card__acts {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.ast-card__audit {
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- 右栏详情 ---------- */
.ast__detail {
  border-left: 1px solid var(--line);
  background: #fff;
  overflow-y: auto;
  padding: 14px;
  min-height: 0;
}

.ast__detail h3 {
  margin: 0 0 4px;
  font-size: var(--fs-lg);
  color: var(--navy);
  word-break: break-all;
}

.ast__muted {
  margin: 0 0 10px;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.7;
}

.ast__detail p.ast__muted {
  margin: 0 0 12px;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.7;
}

.ast__dl { margin: 0 0 14px; }

.ast__dl div {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: var(--fs-base);
}

.ast__dl dt {
  flex: none;
  width: 74px;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.ast__dl dd { margin: 0; flex: 1; word-break: break-all; }

.ast-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.ast-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--muted);
}
