/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f4f7fc;
  padding: 20px;
  color: #1e293b;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 24px;
}

/* Header */
header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
header h1 { font-size: 1.8rem; font-weight: 600; }
header h1 i { color: #2563eb; margin-right: 12px; }
#updateDate { background: #e2e8f0; padding: 6px 16px; border-radius: 30px; font-size: 0.9rem; }

/* Tabs - responsive wrap */
.tab-nav {
  display: flex; flex-wrap: wrap;
  gap: 8px; border-bottom: 2px solid #e2e8f0;
  margin-bottom: 28px; padding-bottom: 4px;
}
.tab-btn {
  background: none; border: none;
  padding: 12px 20px; font-size: 1rem; font-weight: 500;
  color: #64748b; cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
}
.tab-btn i { margin-right: 8px; }
.tab-btn:hover { background: #f1f5f9; color: #0f172a; }
.tab-btn.active {
  color: #2563eb;
  background: #eff6ff;
  border-bottom: 3px solid #2563eb;
}

/* Panels */
.panel { display: none; animation: fade 0.25s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0.4; } to { opacity: 1; } }

/* --- ROADMAP (Timeline Infographic) --- */
.timeline-header {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Q1, Q2, Q3 */
  text-align: center;
  font-weight: 600; color: #475569;
  border-bottom: 2px solid #cbd5e1;
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.roadmap-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-row {
  display: grid;
  grid-template-columns: 180px 1fr; /* Name column + Bar column */
  align-items: center;
  gap: 16px;
}
.project-name {
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Matches Q1/Q2/Q3 */
  position: relative;
  height: 32px;
  background: #f1f5f9;
  border-radius: 30px;
  overflow: visible;
}
.project-bar {
  height: 100%;
  border-radius: 30px;
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  position: relative;
  grid-column: span 1; /* Will be overridden by inline style from JS */
}
.status-Completed { background: #22c55e; }
.status-InProgress { background: #3b82f6; }
.status-AtRisk { background: #eab308; color: #1e293b; }
.status-NotStarted { background: #94a3b8; }

/* Responsive: Stack on mobile */
@media (max-width: 640px) {
  .project-row { grid-template-columns: 1fr; gap: 4px; }
  .project-name { font-size: 0.9rem; }
  .timeline-header { font-size: 0.8rem; }
  .tab-btn { flex: 1 1 40%; text-align: center; padding: 10px 8px; font-size: 0.85rem; }
}

/* --- Tables (Costs & Cases) --- */
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th { text-align: left; padding: 12px 8px; background: #f8fafc; border-bottom: 2px solid #e2e8f0; }
td { padding: 12px 8px; border-bottom: 1px solid #e2e8f0; }
tr:hover { background: #f8fafc; }
.badge { 
  background: #dbeafe; color: #1d4ed8;
  padding: 4px 12px; border-radius: 30px; font-size: 0.8rem;
  display: inline-block;
}
.badge-approved { background: #dcfce7; color: #15803d; }
.badge-pending { background: #fef9c3; color: #854d0e; }

/* --- KPIs --- */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}
.chart-card { background: #f8fafc; padding: 20px; border-radius: 16px; }
.kpi-summary { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.kpi-item { display: flex; justify-content: space-between; border-bottom: 1px dashed #e2e8f0; padding: 10px 0; }
@media (max-width: 700px) {
  .kpi-grid { grid-template-columns: 1fr; }
}
