/*
 * Bug root-cause cards (Dashboard tab), Insights tab, Dependencies tab, and Forecast tab.
 */
/* Bug RCA Section */
.rca-section { background: var(--bg-2); border-radius: 6px; padding: 16px; box-shadow: var(--shadow); margin-top: 16px; }
.rca-section h3 { font-size: 13px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.rca-section h3 i { color: var(--ey-yellow); }
.rca-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rca-item { padding: 12px; background: var(--bg-3); border-radius: 6px; text-align: center; cursor: pointer; transition: transform 0.15s; border-left: 3px solid var(--border); }
.rca-item:hover { transform: translateY(-2px); }
.rca-item.req { border-color: var(--ey-purple); }
.rca-item.design { border-color: var(--ey-blue); }
.rca-item.code { border-color: var(--ey-orange); }
.rca-item.test { border-color: var(--ey-teal); }
.rca-item.env { border-color: var(--ey-gray); }
.rca-item h5 { font-size: 10px; color: var(--text-2); text-transform: uppercase; margin-bottom: 4px; }
.rca-item .val { font-size: 1.3rem; font-weight: 700; }
.rca-item .pct { font-size: 11px; color: var(--text-3); }

/* Insights Enterprise */
.insights-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; padding: 12px; background: var(--bg-2); border-radius: 6px; box-shadow: var(--shadow); }
.role-filter, .risk-filter { display: flex; gap: 4px; }
.role-filter button, .risk-filter button { padding: 6px 14px; border: 2px solid var(--border); background: var(--bg-3); border-radius: 20px; font-size: 11px; font-weight: 600; cursor: pointer; color: var(--text-1); display: flex; align-items: center; gap: 6px; }
.role-filter button:hover, .role-filter button.active, .risk-filter button:hover, .risk-filter button.active { background: var(--ey-yellow); border-color: var(--ey-yellow); color: var(--ey-black); }
.role-filter button i, .risk-filter button i { font-size: 10px; }

/* Dependencies */
.dep-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dep-card { background: var(--bg-2); border-radius: 6px; padding: 14px; box-shadow: var(--shadow); border-left: 3px solid var(--ey-yellow); }
.dep-card h5 { font-size: 10px; color: var(--text-2); text-transform: uppercase; margin-bottom: 4px; }
.dep-card .val { font-size: 1.5rem; font-weight: 700; }
.dep-card .sub { font-size: 11px; color: var(--text-3); }
.dep-grid { background: var(--bg-2); border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; }
.dep-grid-head { padding: 10px 14px; background: var(--bg-3); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.dep-grid-head i { color: var(--ey-yellow); }
.dep-grid-body { overflow: auto; max-height: 480px; }
.dep-table { width: 100%; border-collapse: collapse; }
.dep-table th, .dep-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); font-size: 12px; vertical-align: top; }
.dep-table th { background: var(--ey-black); color: var(--ey-yellow); font-size: 10px; text-transform: uppercase; position: sticky; top: 0; z-index: 1; }
.dep-rel { font-weight: 700; font-size: 10px; text-transform: uppercase; padding: 2px 8px; border-radius: 12px; display: inline-block; }
.dep-rel.predecessor { background: #fce8e8; color: var(--ey-red); }
.dep-rel.successor { background: #e8f4fc; color: var(--ey-blue); }

.insight { background: var(--bg-2); border-radius: 6px; padding: 16px; box-shadow: var(--shadow); border-left: 4px solid var(--ey-yellow); margin-bottom: 12px; }
.insight.high { border-color: var(--ey-red); }
.insight.med { border-color: var(--ey-orange); }
.insight.low { border-color: var(--ey-green); }
.insight-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.insight-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.insight-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.insight-badge { padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.insight-badge.high { background: #fce8e8; color: var(--ey-red); }
.insight-badge.med { background: #fff3e6; color: #b35900; }
.insight-badge.low { background: #e6f4ea; color: var(--ey-green); }
.insight-badge.role { background: var(--ey-yellow-light); color: var(--ey-black); }
.insight-badge.confidence { background: var(--bg-3); color: var(--text-2); }
.insight-section { margin-bottom: 12px; }
.insight-section h5 { font-size: 10px; font-weight: 700; color: var(--text-2); text-transform: uppercase; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.insight-section h5 i { color: var(--ey-yellow); font-size: 10px; }
.insight-body { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.insight-metric { background: var(--ey-yellow-light); padding: 1px 6px; border-radius: 3px; font-weight: 700; color: var(--ey-black); }
.insight-actions ul { margin-left: 16px; font-size: 12px; color: var(--text-2); }
.insight-actions li { margin-bottom: 4px; }
.insight-data { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.insight-data-item { font-size: 11px; color: var(--text-2); }
.insight-data-item strong { color: var(--text-1); }

/* Forecast */
.forecast-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.fc-card { background: var(--bg-2); border-radius: 6px; padding: 20px; text-align: center; box-shadow: var(--shadow); border-top: 3px solid var(--ey-yellow); }
.fc-card .icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--ey-yellow); color: var(--ey-black); }
.fc-card h4 { font-size: 11px; color: var(--text-2); text-transform: uppercase; margin-bottom: 4px; }
.fc-card .big { font-size: 2rem; font-weight: 700; }
.fc-card .note { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.progress-box { background: var(--bg-2); border-radius: 6px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 20px; }
.progress-box h4 { font-size: 13px; margin-bottom: 10px; }
.progress-track { height: 24px; background: var(--bg-3); border-radius: 12px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.progress-fill.ok { background: linear-gradient(90deg, var(--ey-yellow), var(--ey-yellow-dark)); color: var(--ey-black); }
.progress-fill.risk { background: linear-gradient(90deg, var(--ey-orange), #ff8c00); color: white; }
.progress-fill.bad { background: linear-gradient(90deg, var(--ey-red), #e74c3c); color: white; }
