/* tool-eco.css — 工具生态页面样式（8个页面 + 公共组件） */

/* ====== 公共组件 ====== */
.eco-skeleton { background: linear-gradient(90deg, #F5F5F5 25%, #E0E0E0 50%, #F5F5F5 75%); background-size: 200% 100%; animation: eco-shimmer 1.5s infinite; border-radius: 4px; }
@keyframes eco-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.eco-empty { text-align: center; padding: 48px 20px; color: #9E9E9E; }
.eco-empty__icon { font-size: 48px; margin-bottom: 12px; }
.eco-empty__text { font-size: 14px; margin-bottom: 16px; }
.eco-error { text-align: center; padding: 40px 20px; color: #F44336; }
.eco-error__retry { margin-top: 12px; padding: 6px 20px; border: 1px solid #F44336; border-radius: 4px; background: #fff; color: #F44336; cursor: pointer; font-size: 13px; }
.eco-error__retry:hover { background: #F44336; color: #fff; }
.eco-badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; color: #fff; }
.eco-badge--success { background: #4CAF50; }
.eco-badge--error { background: #F44336; }
.eco-badge--warning { background: #FF9800; }
.eco-badge--info { background: #2196F3; }
.eco-pagination { display: flex; justify-content: center; gap: 8px; padding: 16px; }
.eco-pagination button { padding: 6px 16px; border: 1px solid #E0E0E0; border-radius: 4px; background: #fff; cursor: pointer; font-size: 13px; color: #555; }
.eco-pagination button:hover { background: #F5F5F5; }
.eco-pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
.eco-tab { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid #E0E0E0; }
.eco-tab__item { padding: 8px 20px; border: none; background: transparent; cursor: pointer; font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 150ms; }
.eco-tab__item:hover { color: #333; }
.eco-tab__item--active { color: #F5A623; border-bottom-color: #F5A623; font-weight: 600; }
.eco-card { padding: 16px; background: #fff; border: 1px solid #E0E0E0; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 12px; }
.eco-btn { padding: 6px 16px; border: 1px solid #d0d0d0; border-radius: 4px; background: #fff; cursor: pointer; font-size: 13px; color: #555; transition: all 100ms; }
.eco-btn:hover { background: #f0f0f0; }
.eco-btn--primary { background: #F5A623; border-color: #F5A623; color: #fff; }
.eco-btn--primary:hover { background: #D48806; }
.eco-btn--danger { background: #F44336; border-color: #F44336; color: #fff; }
.eco-btn--danger:hover { background: #E53935; }
.eco-form-group { margin-bottom: 16px; }
.eco-form-label { display: block; font-size: 13px; color: #333; margin-bottom: 4px; font-weight: 600; }
.eco-form-input, .eco-form-select, .eco-form-textarea { width: 100%; padding: 8px 12px; border: 1px solid #d0d0d0; border-radius: 4px; font-size: 13px; box-sizing: border-box; }
.eco-form-error { color: #F44336; font-size: 12px; margin-top: 4px; }
.eco-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.eco-modal { background: #fff; border-radius: 8px; padding: 24px; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; }
.eco-modal__title { font-size: 16px; font-weight: 600; margin: 0 0 16px; color: #333; }
.eco-modal__close { float: right; cursor: pointer; font-size: 20px; color: #999; border: none; background: none; }

/* ====== 工具详情页 ====== */
.tool-detail__header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.tool-detail__icon { width: 64px; height: 64px; border-radius: 8px; background: #F5F5F5; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.tool-detail__name { font-size: 20px; font-weight: 600; color: #333; }
.tool-detail__desc { font-size: 13px; color: #666; margin-top: 4px; }
.tool-detail__meta { display: flex; gap: 16px; font-size: 12px; color: #888; margin-top: 8px; }
.tool-detail__badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 500; margin-left: 8px; vertical-align: middle; }
.tool-detail__badge--verified { background: #e6f7ec; color: #0b8a3e; border: 1px solid #b7e3c8; }
.tool-detail__badge--unverified { background: #f6f8fa; color: #8a9099; border: 1px solid #e0e2e6; }
.tool-detail__section { margin-bottom: 24px; }
.tool-detail__section-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 12px; border-bottom: 1px solid #E0E0E0; padding-bottom: 8px; }
.tool-detail__params { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tool-detail__param { padding: 10px; background: #FAFAFA; border-radius: 6px; }
.tool-detail__param-name { font-weight: 600; font-size: 13px; color: #333; }
.tool-detail__param-desc { font-size: 12px; color: #666; margin-top: 4px; }
.tool-detail__review { padding: 12px; border-bottom: 1px solid #E0E0E0; }
.tool-detail__review-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tool-detail__review-author { font-weight: 600; font-size: 13px; }
.tool-detail__review-rating { color: #F5A623; }
.tool-detail__review-text { font-size: 13px; color: #555; }
.tool-detail__actions { display: flex; gap: 8px; margin-top: 20px; }

/* ====== 工具配置页 ====== */
.tool-config__header { margin-bottom: 20px; }
.tool-config__title { font-size: 18px; font-weight: 600; color: #333; }
.tool-config__form { max-width: 600px; }
.tool-config-param { margin-bottom: 16px; }
.tool-config-param__label { display: block; font-size: 13px; color: #333; margin-bottom: 4px; font-weight: 600; }
.tool-config-param__desc { font-size: 12px; color: #888; margin-bottom: 4px; }
.tool-config-param__required { color: #F44336; }
.tool-config__repo-list { margin: 16px 0; }
.tool-config__repo-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 4px 0; border: 1px solid #E0E0E0; border-radius: 6px; transition: background 150ms; }
.tool-config__repo-row:hover { background: #F5F5F5; }
.tool-config__repo-row--selected { border-left: 3px solid #4CAF50; }
.tool-config__auth-mode { margin: 16px 0; }
.tool-config__actions { display: flex; gap: 8px; margin-top: 24px; }

/* ====== 需求市场页 ====== */
.demand-mkt__toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.demand-mkt__filter { display: flex; gap: 4px; }
.demand-mkt__filter-btn { padding: 4px 12px; border: 1px solid #E0E0E0; border-radius: 4px; background: #fff; cursor: pointer; font-size: 12px; color: #666; }
.demand-mkt__filter-btn--active { background: #F5A623; border-color: #F5A623; color: #fff; }
.demand-mkt__search { flex: 1; min-width: 200px; padding: 6px 12px; border: 1px solid #d0d0d0; border-radius: 4px; font-size: 13px; }
.demand-mkt__card { padding: 16px; background: #fff; border: 1px solid #E0E0E0; border-radius: 8px; margin-bottom: 12px; cursor: pointer; transition: box-shadow 150ms; }
.demand-mkt__card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.demand-mkt__card-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 8px; }
.demand-mkt__card-desc { font-size: 13px; color: #666; margin-bottom: 8px; }
.demand-mkt__card-meta { display: flex; gap: 16px; font-size: 12px; color: #888; }
.demand-mkt__card-budget { color: #F5A623; font-weight: 600; }

/* ====== 需求详情页 ====== */
.demand-detail__header { margin-bottom: 20px; }
.demand-detail__title { font-size: 20px; font-weight: 600; color: #333; }
.demand-detail__info { display: flex; gap: 20px; font-size: 13px; color: #666; margin-top: 8px; }
.demand-detail__budget { color: #F5A623; font-weight: 600; font-size: 16px; }
.demand-detail__section { margin: 20px 0; }
.demand-detail__section-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; border-bottom: 1px solid #E0E0E0; padding-bottom: 8px; }
.demand-detail__supporters { display: flex; flex-wrap: wrap; gap: 8px; }
.demand-detail__supporter { padding: 4px 10px; background: #F5F5F5; border-radius: 12px; font-size: 12px; color: #555; }
.demand-detail-timeline { position: relative; padding-left: 24px; }
.demand-detail-timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: #E0E0E0; }
.demand-detail-timeline__item { position: relative; margin-bottom: 16px; }
.demand-detail-timeline__item::before { content: ''; position: absolute; left: -20px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #F5A623; border: 2px solid #fff; }
.demand-detail-timeline__time { font-size: 12px; color: #888; }
.demand-detail-timeline__text { font-size: 13px; color: #333; margin-top: 4px; }
.demand-detail__actions { display: flex; gap: 8px; margin-top: 20px; }

/* ====== 我的工具页 ====== */
.my-tools__tabs { margin-bottom: 20px; }
.my-tools__card { padding: 16px; background: #fff; border: 1px solid #E0E0E0; border-radius: 8px; margin-bottom: 12px; display: flex; align-items: center; gap: 16px; }
.my-tools__card-icon { width: 48px; height: 48px; border-radius: 8px; background: #F5F5F5; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.my-tools__card-info { flex: 1; }
.my-tools__card-name { font-size: 14px; font-weight: 600; color: #333; }
.my-tools__card-desc { font-size: 12px; color: #888; margin-top: 4px; }
.my-tools__card-actions { display: flex; gap: 4px; }
.my-tools__card-action { padding: 3px 10px; border: 1px solid #d0d0d0; border-radius: 4px; background: #fff; cursor: pointer; font-size: 12px; color: #555; }
.my-tools__card-action:hover { background: #f0f0f0; }

/* ====== 开发者入口页 ====== */
.developer__earnings { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.developer__earning-card { padding: 16px; background: #fff; border: 1px solid #E0E0E0; border-radius: 8px; text-align: center; }
.developer__earning-label { font-size: 12px; color: #888; margin-bottom: 8px; }
.developer__earning-value { font-size: 24px; font-weight: 600; color: #F5A623; }
.developer__tool-list { margin-bottom: 24px; }
.developer__tool-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid #E0E0E0; }
.developer__tool-name { flex: 1; font-size: 14px; font-weight: 600; }
.developer__tool-stats { display: flex; gap: 16px; font-size: 12px; color: #888; }
.developer__oauth-list { margin-bottom: 24px; }
.developer__oauth-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid #E0E0E0; }
.developer__apikey-list { margin-top: 12px; }
.developer__apikey-row { display: flex; align-items: center; gap: 8px; padding: 8px; background: #FAFAFA; border-radius: 4px; margin: 4px 0; font-size: 12px; }
.developer__apikey-value { flex: 1; font-family: monospace; color: #555; }

/* ====== 工具执行报告页 ====== */
.tool-runs__header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.tool-runs__status { font-size: 14px; }
.tool-runs__section { margin-bottom: 20px; }
.tool-runs__section-title { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 12px; }
.tool-runs__params { padding: 12px; background: #FAFAFA; border-radius: 6px; font-size: 13px; }
.tool-runs__output { padding: 12px; background: #FAFAFA; border-radius: 6px; font-size: 13px; max-height: 400px; overflow-y: auto; }
.tool-runs-terminal { background: #1E1E1E; color: #D4D4D4; padding: 16px; border-radius: 6px; font-family: 'Consolas', 'Monaco', monospace; font-size: 13px; max-height: 500px; overflow-y: auto; white-space: pre-wrap; line-height: 1.6; }
.tool-runs-terminal__line { margin: 0; }
.tool-runs-terminal__line--error { color: #F44336; }
.tool-runs-terminal__line--warn { color: #FF9800; }
.tool-runs-terminal__line--info { color: #2196F3; }
.tool-runs__actions { display: flex; gap: 8px; margin-top: 20px; }
.tool-runs__polling { font-size: 12px; color: #FF9800; }

/* ====== 工具权限管理页 ====== */
.tool-perm__header { margin-bottom: 20px; }
.tool-perm__title { font-size: 18px; font-weight: 600; color: #333; }
.tool-perm__dimension-tabs { margin-bottom: 16px; }
.tool-perm__matrix-table { width: 100%; border-collapse: collapse; border: 1px solid #E0E0E0; }
.tool-perm__matrix-table th, .tool-perm__matrix-table td { padding: 8px 12px; border: 1px solid #E0E0E0; font-size: 12px; text-align: center; }
.tool-perm__matrix-table th { background: #FAFAFA; font-weight: 600; }
.tool-perm__cell--granted { background: #4CAF50; color: #fff; cursor: pointer; }
.tool-perm__cell--not-granted { background: #F5F5F5; color: #9E9E9E; cursor: pointer; }
.tool-perm__cell--cascade-revoked { background: #F44336; color: #fff; }

/* ====== 响应式 ====== */
@media (max-width: 768px) {
  .tool-detail__params { grid-template-columns: 1fr; }
  .developer__earnings { grid-template-columns: 1fr; }
  .demand-mkt__toolbar { flex-direction: column; align-items: stretch; }
  .my-tools__card { flex-direction: column; align-items: flex-start; }
  .tool-perm__matrix-table { font-size: 11px; }
  .tool-perm__matrix-table th, .tool-perm__matrix-table td { padding: 4px 6px; }
}