/**
 * Стили подсистемы бизнес-планирования и циклического аудита (FEAT-007).
 */

.bp-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bp-header-card {
  background: var(--panel-bg);
  border: var(--panel-border);
  backdrop-filter: var(--panel-blur);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bp-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.bp-badge-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bp-iter-badge {
  background: linear-gradient(135deg, rgba(0, 119, 255, 0.25), rgba(99, 102, 241, 0.3));
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.4);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.bp-status-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 10px;
}

.bp-status-in_review {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.bp-status-approved {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.bp-status-max_iterations_reached {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-iterate-plan {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-iterate-plan:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

.btn-iterate-plan:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Шкала фаз запуска (Roadmap Tracker) */
.bp-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .bp-roadmap-grid {
    grid-template-columns: 1fr;
  }
}

.bp-phase-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.bp-phase-card.active {
  border-color: rgba(0, 119, 255, 0.4);
  background: rgba(0, 119, 255, 0.05);
}

.bp-phase-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.bp-phase-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Блок журнала открытых вопросов */
.bp-questions-section {
  background: var(--panel-bg);
  border: var(--panel-border);
  backdrop-filter: var(--panel-blur);
  border-radius: 16px;
  padding: 24px;
}

.bp-questions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.bp-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bp-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bp-filter-btn.active, .bp-filter-btn:hover {
  background: rgba(0, 119, 255, 0.2);
  border-color: rgba(0, 119, 255, 0.4);
  color: #93c5fd;
}

.bp-questions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bp-question-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px 20px;
  transition: all 0.2s ease;
}

.bp-question-card.status-open {
  border-left: 4px solid #f59e0b;
}

.bp-question-card.status-resolved {
  border-left: 4px solid #10b981;
}

.bp-q-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.bp-q-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bp-sev-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.bp-sev-critical {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.bp-sev-major {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.bp-sev-minor {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.bp-q-author {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

.bp-q-text {
  font-size: 13.5px;
  color: #f1f5f9;
  line-height: 1.5;
  margin-bottom: 10px;
}

.bp-q-resolution {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #a7f3d0;
  line-height: 1.45;
}
