*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a2e;
  background: #f8f9fa;
  line-height: 1.6;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1.5rem 2rem;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
}

/* Project nav */
.project-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-nav a {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  color: #555;
  text-decoration: none;
  background: #f0f0f0;
  transition: background 0.15s, color 0.15s;
}

.project-nav a:hover { background: #e0e0e0; color: #1a1a2e; }
.project-nav a.active { background: #1a1a2e; color: #fff; }

/* Status nav pill */
.nav-status {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  color: #fff;
  text-decoration: none;
  background: #5b8def;
  transition: background 0.15s;
}
.nav-status:hover { background: #4a7ad6; }

/* Project status indicator dot */
.status-indicator { color: #30a46c; text-decoration: none; font-size: 0.75rem; margin-left: 0.5rem; vertical-align: middle; }
.status-indicator:hover { color: #27ae60; }

/* Content area */
.content {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  color: #888;
  padding: 3rem 0;
  font-size: 1.125rem;
}

/* Project group */
.project-group { margin-bottom: 2rem; }

.project-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e0e0e0;
}

/* Report card grid */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.report-card {
  display: block;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.report-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: #ccc;
}

.report-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.375rem;
}

.report-desc {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.report-date {
  font-size: 0.75rem;
  color: #999;
}

/* Report viewer page */
.report-page { background: #fff; }

.report-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 2rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.back-link {
  font-size: 0.875rem;
  color: #555;
  text-decoration: none;
  white-space: nowrap;
}

.back-link:hover { color: #1a1a2e; }

.report-header-project {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

/* 404 page */
body:not(.report-page) .back-link {
  display: inline-block;
  margin-top: 1rem;
  color: #555;
  text-decoration: none;
}

body:not(.report-page) .back-link:hover { color: #1a1a2e; }

/* Status dashboard */
.status-nav { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.75rem; }
.status-nav .nav-pill { padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.status-nav .nav-pill:first-child { background: #f0f0f0; color: #555; }
.status-nav .nav-pill:first-child:hover { background: #e0e0e0; color: #1a1a2e; }
.nav-pill-ok { background: #d4edda; color: #155724; }
.nav-pill-issue { background: #f8d7da; color: #721c24; }
.nav-pill-pending { background: #d1ecf1; color: #0c5460; }

/* Status cards (expandable) */
.status-card { background: #fff; border-radius: 10px; margin-bottom: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); overflow: hidden; }
.status-card[open] { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.status-card-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.5rem; cursor: pointer;
  list-style: none; user-select: none;
}
.status-card-header::-webkit-details-marker { display: none; }

.status-card-project { font-weight: 600; font-size: 1rem; color: #1a1a2e; min-width: 140px; }

.status-card-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; flex: 1; }
.badge { padding: 0.2em 0.6em; border-radius: 12px; font-size: 0.78rem; font-weight: 600; line-height: 1.5; }
.badge-ok { background: #d4edda; color: #155724; }
.badge-issue { background: #f8d7da; color: #721c24; }
.badge-pending { background: #d1ecf1; color: #0c5460; }

.status-card-link { font-size: 0.85rem; color: #5b8def; text-decoration: none; white-space: nowrap; font-weight: 500; }
.status-card-link:hover { text-decoration: underline; }

/* Body inside expanded card — respects status/ page styling */
.status-card-body { padding: 0 1.5rem 1rem; border-top: 1px solid #eee; }
.status-card-body .card { box-shadow: none; border: 1px solid #eee; margin-bottom: 0; }
