body {
  background: radial-gradient(circle at top left, #f4f8ff, #edf2fb 45%, #e7ecf4);
}

main.container {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

header h1 {
  letter-spacing: 0.03em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

.status-healthy {
  background-color: #e6f7ec;
  color: #137333;
}

.status-degraded,
.status-partial {
  background-color: #fff4e5;
  color: #b06a00;
}

.status-unknown {
  background-color: #f0f4f9;
  color: #3c4043;
}

.status-down {
  background-color: #fde7e9;
  color: #a50e0e;
}

.kpi-grid article,
.servers-grid article,
.node-card {
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.kpi-grid article h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5f6368;
}

.kpi-grid article p {
  font-size: 1.4rem;
  font-weight: 650;
}

.server-card {
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.server-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
}

.server-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5f6368;
}

.servers-grid article {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.top-endpoints {
  padding: 0.75rem 0;
  margin: 0.5rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.top-endpoints .no-endpoints {
  margin: 0;
  font-size: 0.85rem;
  color: #9aa0a6;
  font-style: italic;
}

.endpoint-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.85rem;
}

.endpoint-item:not(:last-child) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.endpoint-name {
  flex: 1;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  color: #3c4043;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0.5rem;
}

.endpoint-count {
  font-weight: 600;
  color: #1a73e8;
  font-size: 0.9rem;
  white-space: nowrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.node-card pre {
  max-height: 260px;
  overflow: auto;
  font-size: 0.8rem;
}

.charts-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.charts-subtitle {
  margin-bottom: 0;
  font-size: 0.85rem;
  color: #5f6368;
}

.charts-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.tabs-nav {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  margin-bottom: 1.5rem;
}

.tab-button {
  border-radius: 999px;
  border: none;
  background: transparent;
  padding: 0.45rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: #5f6368;
}

.tab-button.active {
  background: #111827;
  color: #ffffff;
}

#charts-container,
#daily-charts-container,
#global-charts-container {
  margin-top: 1.25rem;
}

#charts-container canvas,
#daily-charts-container canvas,
#global-charts-container canvas,
#endpoint-charts-container canvas {
  width: 100%;
  max-height: 320px;
}

#endpoints-container {
  margin-top: 1.5rem;
}

#endpoints-container table {
  width: 100%;
}

#endpoints-container code {
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
}

#endpoints-container button.small {
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

.log-row-error td {
  background-color: #fde7e9;
}
