/* === 04-cards.css (原 user.css L863-L970,Section 5 卡片 agent-card / conv-card / kb-card) === */

/* ========================================
   5. 卡片（.agent-card, .conv-card, .kb-card）
   ======================================== */
.agent-grid { display: flex; flex-direction: column; gap: 10px; }
.agent-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-surface); border: 1px solid var(--border-glass);
  border-radius: 16px; padding: 14px 16px;
  transition: transform .15s, background .15s;
  min-width: 0; overflow: hidden; cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.agent-card:active { transform: scale(.97); background: var(--bg-hover); }
.agent-card .agent-avatar {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: var(--text-on-color);
}
.agent-card .agent-info { flex: 1; min-width: 0; }
.agent-card .agent-name { font-size: 16px; font-weight: 600; color: var(--text-main); }
.agent-card .agent-desc {
  font-size: 13px; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agent-actions { display: flex; gap: 4px; flex-shrink: 0; }
.agent-actions .icon-btn { width: 34px; height: 34px; }
.agent-actions .icon-btn svg { width: 18px; height: 18px; }

.section-header {
  font-size: 22px; font-weight: 700; margin-bottom: 12px;
  background: var(--gradient-shimmer);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.mobile-search {
  margin-bottom: 16px;
}
.mobile-search input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-surface); border: 1px solid var(--border-glass);
  border-radius: 12px; color: var(--text-main); font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.mobile-search input::placeholder { color: var(--text-dim); }
.mobile-search input:focus { border-color: var(--brand-primary); }

/* 知识库卡片 */
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-surface); border: 1px solid var(--border-glass);
  border-radius: 14px; padding: 14px 16px; cursor: pointer;
  transition: transform .15s, background .15s;
  -webkit-user-select: none; user-select: none;
}
.kb-card:active { transform: scale(.97); background: var(--bg-hover); }
.kb-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--info-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-secondary); font-size: 18px;
}
.kb-info { flex: 1; min-width: 0; }
.kb-name { font-size: 15px; font-weight: 600; color: var(--text-main); }
.kb-desc { font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.kb-actions { flex-shrink: 0; }
.kb-actions .icon-btn { width: 32px; height: 32px; }
.kb-actions .icon-btn svg { width: 16px; height: 16px; }

/* 知识库文件列表 — P258 加查看/下载按钮后重排版 */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--bg-surface);
  border: 1px solid var(--border-glass); border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
}
.file-item:hover { border-color: var(--border-light); background: var(--bg-card); }
.file-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  background: var(--bg-glass); border-radius: 8px;
}
.file-icon svg { width: 18px; height: 18px; }
.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-size: 14px; color: var(--text-main);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 2px;
}
.file-size { font-size: 12px; color: var(--text-tertiary); }
.file-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.file-act {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid transparent; background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.file-act svg { width: 16px; height: 16px; }
.file-act:hover { background: var(--bg-glass); color: var(--text-main); }
.file-view:hover { color: var(--brand-primary); }
.file-download:hover { color: var(--brand-primary); }
.file-del { color: var(--text-tertiary); }
.file-del:hover { background: rgba(220, 80, 80, 0.1); color: #e66; }

