:root {
  --navy:#17365d;
  --blue:#1f4e78;
  --page:#f4f7fa;
  --panel:#fff;
  --text:#17202a;
  --muted:#667085;
  --line:#e5e7eb;
  --green-bg:#eaf7ed;
  --green:#267a3f;
  --blue-bg:#e8f1fb;
  --blue-live:#1769aa;
  --purple-bg:#f1eafe;
  --purple:#6f42c1;
  --red-bg:#fdecec;
  --red:#b42318;
  --gray-bg:#f0f1f3;
  --amber-bg:#fff4d6;
  --amber:#946200;
}

* { box-sizing:border-box; }

body {
  margin:0;
  font-family:Inter,Aptos,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--page);
  color:var(--text);
}

.page {
  width:min(1800px,calc(100% - 40px));
  margin:28px auto 60px;
}

.hero {
  background:linear-gradient(135deg,var(--navy),var(--blue));
  color:#fff;
  padding:28px 30px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  box-shadow:0 10px 28px rgba(23,54,93,.16);
}

.eyebrow {
  font-size:12px;
  font-weight:700;
  letter-spacing:.14em;
  margin:0 0 8px;
  opacity:.75;
}

h1 { margin:0; font-size:clamp(26px,3vw,38px); }
.subtitle { margin:8px 0 0; opacity:.85; }

.hero-actions {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.button {
  border:0;
  border-radius:9px;
  padding:11px 15px;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
  font-size:14px;
}

.button.primary { background:#fff; color:var(--navy); }
.button.secondary {
  background:rgba(255,255,255,.14);
  color:#fff;
  border:1px solid rgba(255,255,255,.28);
}

.status-strip {
  margin:16px 0;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
}

.status-strip>div {
  padding:15px 18px;
  border-right:1px solid var(--line);
}

.status-strip>div:last-child { border-right:0; }

.label,.small {
  display:block;
  color:var(--muted);
  font-size:12px;
}

.status-strip strong {
  display:block;
  margin:4px 0 2px;
}

.cards {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-bottom:16px;
}

.card {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:18px;
}

.card span { color:var(--muted); font-size:13px; }
.card strong {
  display:block;
  font-size:28px;
  margin-top:7px;
  color:var(--navy);
}

.toolbar {
  display:flex;
  gap:12px;
  margin:16px 0;
}

.toolbar input,.toolbar select {
  border:1px solid #d0d5dd;
  background:#fff;
  border-radius:9px;
  padding:11px 12px;
  font-size:14px;
}

.toolbar input { flex:1; }

.table-wrap {
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:auto;
  box-shadow:0 4px 16px rgba(16,24,40,.04);
}

table {
  width:100%;
  border-collapse:collapse;
  min-width:1500px;
}

thead th {
  background:var(--navy);
  color:#fff;
  text-align:left;
  padding:13px 14px;
  font-size:13px;
  position:sticky;
  top:0;
  z-index:1;
}

tbody td {
  padding:13px 14px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
  font-size:13px;
}

tbody tr:hover { background:#f8fafc; }
.project { font-weight:750; }
.muted { color:var(--muted); }

.pipeline-grid,
.status-grid,
.site-grid {
  display:grid;
  gap:5px;
}

.pipeline-line,
.status-line,
.site-line {
  min-height:26px;
  display:flex;
  align-items:center;
}

.badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:6px 9px;
  font-size:12px;
  font-weight:750;
  white-space:nowrap;
}

.badge::before {
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:currentColor;
}

.badge.active,.badge.ok {
  background:var(--green-bg);
  color:var(--green);
}

.badge.running {
  background:var(--blue-bg);
  color:var(--blue-live);
}

.badge.queue {
  background:var(--amber-bg);
  color:var(--amber);
}

.badge.failed,.badge.inactive {
  background:var(--red-bg);
  color:var(--red);
}

.badge.low,.badge.no_activity,.badge.cancelled {
  background:var(--gray-bg);
  color:#59636e;
}

.loading {
  text-align:center;
  color:var(--muted);
  padding:30px;
}

.error {
  margin-top:12px;
  padding:12px;
  border-radius:8px;
  background:var(--red-bg);
  color:var(--red);
}

.hidden { display:none; }

@media (max-width:900px) {
  .hero { align-items:flex-start; flex-direction:column; }
  .cards { grid-template-columns:repeat(2,1fr); }
  .status-strip { grid-template-columns:1fr; }
  .status-strip>div {
    border-right:0;
    border-bottom:1px solid var(--line);
  }
}
