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

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #1e293b;
  background: #f1f5f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 2rem;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

h1 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.last-updated {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
}

.refresh-error {
  font-size: 0.72rem;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* ── Main ── */
main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.no-data {
  color: #64748b;
  text-align: center;
  padding: 3rem 1rem;
}

/* ── Table ── */
.table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

thead th {
  background: #1e293b;
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.1s;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

tbody tr:hover {
  background: #f0f9ff;
}

td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

td.detail {
  color: #64748b;
  font-size: 0.8rem;
}

/* ── Status badges ── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

.badge-healthy            { background: #16a34a; }
.badge-restarted          { background: #d97706; }
.badge-manual_intervention { background: #dc2626; }
.badge-unknown            { background: #6b7280; }

/* ── Footer ── */
footer {
  background: #0f172a;
  color: #475569;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
}

footer a {
  color: #64748b;
  text-decoration: none;
}

footer a:hover {
  color: #94a3b8;
}
