/* Dashboard-specific styles (extends audit.css) */
.dash-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  color: white;
  border-radius: 20px;
  padding: 48px 40px;
  margin-bottom: 28px;
  box-shadow: 0 16px 48px rgba(15,23,42,0.25);
}
.dash-hero h1 {
  margin: 0 0 8px;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.dash-hero .lede {
  font-size: 17px;
  opacity: 0.85;
  max-width: 760px;
  margin: 0 0 24px;
  line-height: 1.6;
}
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.dash-stats .stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
}
.dash-stats .stat .n {
  font-size: 28px;
  font-weight: 700;
  display: block;
  line-height: 1.1;
}
.dash-stats .stat .l {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-top: 4px;
}
.dash-stats .stat.danger .n { color: #fca5a5; }
.dash-stats .stat.warn .n { color: #fed7aa; }
.dash-stats .stat.ok .n { color: #86efac; }

.fire {
  background: linear-gradient(135deg, #fee2e2 0%, #fef3c7 100%);
  border: 1px solid #fca5a5;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.fire::before {
  content: '🔥';
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 120px;
  opacity: 0.08;
}
.fire h2 { color: #991b1b; margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.fire .sub { color: #7f1d1d; font-size: 14px; margin: 0 0 16px; }
.fire ol { margin: 0; padding-left: 22px; }
.fire ol li { margin-bottom: 10px; font-size: 14px; line-height: 1.55; }
.fire strong { color: #991b1b; }
.fire code { background: #fef2f2; padding: 1px 6px; border-radius: 4px; font-size: 13px; color: #be123c; }

.group-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--muted);
  margin: 32px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.group-title .count { color: var(--text); font-weight: 600; font-size: 12px; background: #f3f4f6; padding: 2px 10px; border-radius: 99px; }

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.repo-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
}
.repo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
  border-color: #cbd5e1;
}
.repo-card.critical { border-top: 4px solid var(--p0); }
.repo-card.high { border-top: 4px solid var(--p1); }
.repo-card.warning, .repo-card.medium { border-top: 4px solid var(--p2); }
.repo-card.ok, .repo-card.low { border-top: 4px solid var(--p3); }
.repo-card .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}
.repo-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.repo-card .stack {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 12px;
}
.repo-card .desc {
  font-size: 13px;
  color: #374151;
  margin: 0 0 14px;
  line-height: 1.55;
  flex: 1;
}
.repo-card .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.repo-card .meta-row span { display: inline-flex; gap: 4px; align-items: center; }
.repo-card .meta-row strong { color: #374151; font-weight: 600; }
.repo-card .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}
.repo-card .badge {
  font-size: 10px;
  padding: 2px 7px;
}
.repo-card .risks {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 12px;
  line-height: 1.5;
}
.repo-card .risks .risk-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.repo-card .risks ul { margin: 0; padding-left: 16px; }
.repo-card .risks li { color: #4b5563; margin-bottom: 3px; }
.repo-card .finding-counts {
  position: absolute;
  top: 22px;
  right: 22px;
  display: flex;
  gap: 4px;
}
.fc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: white;
  min-width: 22px;
  text-align: center;
}
.fc-badge.p0 { background: var(--p0); }
.fc-badge.p1 { background: var(--p1); }
.fc-badge.p2 { background: var(--p2); }
.fc-badge.p3 { background: var(--p3); }
.fc-badge.empty { background: #e5e7eb; color: #6b7280; }

.arch {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}
.arch .repo-name { color: #93c5fd; font-weight: 600; }
.arch .legacy { color: #fca5a5; opacity: 0.7; }
.arch .integration { color: #fcd34d; }
.arch .comment { color: #64748b; font-style: italic; }
.arch .arrow { color: #94a3b8; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.summary-grid .item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.summary-grid .item h4 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.summary-grid .item ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; color: #374151; }
.summary-grid .item li { margin-bottom: 3px; }

.tech-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-pills .tp {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.tech-pills .tp .n { background: white; color: var(--accent); border-radius: 99px; padding: 0 6px; font-size: 11px; font-weight: 700; }

.controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.controls button {
  background: white;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  color: #374151;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.15s;
}
.controls button:hover { border-color: var(--accent); color: var(--accent); }
.controls button.active { background: var(--accent); border-color: var(--accent); color: white; }

#search {
  flex: 1;
  min-width: 220px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
}
#search:focus { outline: none; border-color: var(--accent); }
.hidden { display: none !important; }
