/* AI 应用广场 — 对齐 ai-edu.huayuntiantu.com/aiPlatform（零代码空间） */
.agent-market-page {
  --am-purple: #e63323;
  --am-purple-light: #fde8e6;
  --am-border: #e8ecf3;
  color: #1e293b;
}

.am-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 20px;
  background: linear-gradient(105deg, #c0271b 0%, #e63323 52%, #f2796b 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(192,39,27, 0.2);
}

.am-hero-title {
  font-size: 20px;
  font-weight: 700;
}

.am-hero-sub {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.am-hero-link {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.16s ease;
}

.am-hero-link:hover {
  background: rgba(255, 255, 255, 0.24);
}

.am-create-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .am-create-row {
    grid-template-columns: 1fr;
  }
}

.am-create-card {
  display: block;
  width: 100%;
  padding: 20px 22px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.am-create-card:hover {
  transform: translateY(-2px);
}

.am-create-card.is-primary {
  border: 0;
  background: linear-gradient(135deg, #e63323, #c0271b);
  color: #fff;
  box-shadow: 0 10px 24px rgba(192,39,27, 0.28);
}

.am-create-card.is-secondary {
  border: 1px solid var(--am-border);
  background: #fff;
  color: #0f172a;
}

.am-create-card.is-secondary:hover {
  border-color: #f5c6c0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.am-create-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.am-create-desc {
  font-size: 13px;
  line-height: 1.5;
}

.am-create-card.is-primary .am-create-desc {
  color: rgba(255, 255, 255, 0.88);
}

.am-create-card.is-secondary .am-create-desc {
  color: #64748b;
}

.am-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

@media (max-width: 960px) {
  .am-panels {
    grid-template-columns: 1fr;
  }
}

.am-panel {
  border: 1px solid var(--am-border);
  border-radius: 14px;
  background: #fff;
  padding: 18px;
  min-height: 320px;
}

.am-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.am-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.am-panel-meta {
  font-size: 12px;
  color: #94a3b8;
}

.am-kb-add {
  padding: 4px 10px;
  border: 1px dashed #f5c6c0;
  border-radius: 8px;
  background: #faf5ff;
  color: var(--am-purple);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.am-kb-add:hover {
  border-color: var(--am-purple);
  background: var(--am-purple-light);
}

.am-app-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.am-app-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.am-app-card:hover {
  border-color: #f5c6c0;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.am-app-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.am-app-body {
  flex: 1;
  min-width: 0;
}

.am-app-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.am-app-info {
  margin-top: 3px;
  font-size: 12px;
  color: #94a3b8;
}

.am-app-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.am-app-badge.is-published {
  background: #fef3f2;
  color: #9e1f15;
}

.am-app-badge.is-draft {
  background: #fde8e6;
  color: #c0271b;
}

.am-kb-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.am-kb-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.am-kb-card:hover {
  border-color: #f5c6c0;
  background: #fff;
}

.am-kb-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f2796b, #c0271b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.am-kb-icon svg {
  width: 20px;
  height: 20px;
}

.am-kb-body {
  flex: 1;
  min-width: 0;
}

.am-kb-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.am-kb-info {
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.am-empty {
  padding: 36px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  border: 1px dashed var(--am-border);
  border-radius: 12px;
  background: #f8fafc;
}

.am-empty.hidden {
  display: none;
}

.am-app-grid.hidden,
.am-kb-list.hidden {
  display: none;
}
