/* Стили проводника и интерактивного просмотрщика артефактов (FEAT-017) */
.artifacts-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface-card, #141c2e); border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px; padding: 14px 18px; margin-bottom: 20px;
}
.artifacts-search-wrap { flex: 1 1 260px; }
.artifacts-search-input {
  width: 100%; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px; padding: 8px 14px; color: var(--text-primary, #f8fafc); font-size: 13px; outline: none;
}
.artifacts-search-input:focus { border-color: var(--accent-blue, #0077ff); }
.artifacts-filters-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.artifacts-select {
  background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px; padding: 7px 12px; color: var(--text-primary, #f8fafc); font-size: 12px; outline: none; cursor: pointer;
}
.artifacts-stats-pill {
  font-size: 12px; color: var(--text-secondary, #94a3b8); background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; padding: 6px 12px;
}
.pill-divider { margin: 0 6px; opacity: 0.5; }
.artifacts-categories-stream { display: flex; flex-direction: column; gap: 16px; }
.artifact-category-section {
  background: var(--surface-card, #141c2e); border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px; overflow: hidden;
}
.artifact-category-header {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02); border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.category-meta-left { display: flex; align-items: center; gap: 8px; }
.category-title { font-weight: 600; font-size: 14px; }
.category-agent-badge {
  font-size: 11px; background: rgba(0, 119, 255, 0.15); color: #93c5fd; padding: 2px 8px; border-radius: 6px;
}
.category-count-badge { font-size: 11px; color: var(--text-muted, #64748b); }
.artifact-items-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.artifact-items-table th {
  text-align: left; padding: 10px 18px; font-size: 11px; text-transform: uppercase;
  color: var(--text-muted, #64748b); border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.artifact-items-table td { padding: 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); vertical-align: middle; }
.file-name-cell { display: flex; align-items: center; gap: 10px; }
.file-info-group { display: flex; flex-direction: column; }
.file-display-name { font-weight: 500; color: #f1f5f9; }
.file-relative-path { font-size: 11px; color: #64748b; font-family: monospace; }
.file-status-tag { font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }
.status-archive { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.status-draft { background: rgba(234, 179, 8, 0.15); color: #fde047; }
.badge-type-tag { font-size: 11px; font-weight: 600; color: #38bdf8; }
.file-actions-cell { text-align: right; white-space: nowrap; }
.btn-action-view {
  background: rgba(0, 119, 255, 0.15); border: 1px solid rgba(0, 119, 255, 0.3); color: #93c5fd;
  border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; margin-right: 6px; transition: all 0.2s;
}
.btn-action-view:hover { background: rgba(0, 119, 255, 0.3); }
.btn-action-download {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: #cbd5e1;
  border-radius: 6px; padding: 5px 8px; font-size: 12px; text-decoration: none; display: inline-block;
}

/* Интерактивные теги в Chain of Thought */
.artifact-tag-badge {
  background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); color: #38bdf8;
  border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer; display: inline-flex;
  align-items: center; gap: 4px; margin: 2px 4px 2px 0; transition: all 0.2s;
}
.artifact-tag-badge:hover { background: rgba(56, 189, 248, 0.22); transform: translateY(-1px); }

/* Модальное окно */
.artifact-modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 10, 20, 0.82); backdrop-filter: blur(6px);
  z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.artifact-modal-dialog {
  background: #0f172a; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px;
  width: 100%; max-width: 1050px; height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); overflow: hidden;
}
.artifact-modal-header {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 20px;
  background: #131d35; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.artifact-modal-meta-left { display: flex; align-items: center; gap: 12px; }
.modal-type-icon { font-size: 24px; }
.artifact-modal-title { margin: 0; font-size: 15px; font-weight: 600; color: #fff; }
.artifact-modal-path { font-size: 11px; color: #64748b; font-family: monospace; display: block; }
.artifact-modal-badges { display: flex; gap: 6px; }
.modal-badge-agent { font-size: 11px; background: rgba(0, 119, 255, 0.2); color: #93c5fd; padding: 2px 7px; border-radius: 6px; }
.modal-badge-meta { font-size: 11px; background: rgba(255, 255, 255, 0.06); color: #94a3b8; padding: 2px 7px; border-radius: 6px; }
.artifact-modal-actions-right { display: flex; align-items: center; gap: 10px; }
.artifact-view-toggles { display: flex; background: rgba(0, 0, 0, 0.3); border-radius: 8px; padding: 2px; }
.btn-toggle-view { background: transparent; border: none; color: #94a3b8; padding: 4px 10px; font-size: 12px; border-radius: 6px; cursor: pointer; }
.btn-toggle-view.active { background: #0077ff; color: #fff; }
.btn-modal-download { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); color: #fff; text-decoration: none; padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn-modal-close { background: transparent; border: none; color: #94a3b8; font-size: 20px; cursor: pointer; padding: 4px 8px; }
.artifact-modal-body { flex: 1; overflow-y: auto; padding: 20px; position: relative; }
.artifact-view-pane { height: 100%; }
.artifact-iframe { width: 100%; height: 100%; border: none; border-radius: 8px; background: #fff; }
.artifact-modal-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 12px; color: #94a3b8; }
.spinner-artifact { width: 32px; height: 32px; border: 3px solid rgba(0, 119, 255, 0.2); border-top-color: #0077ff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
