/* =============================================================
   Base
   ============================================================= */
html, body {
  background-color: #fff;
  color: #000;
}

body {
  font-family: monospace;
  padding: 20px 40px;
  margin: 0;
}

/* =============================================================
   Typography
   ============================================================= */
h2, h3, p {
  text-align: center;
}

a {
  color: #008;
  text-decoration: none;
}

pre {
  display: inline;
}

pre code {
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* =============================================================
   Tables
   ============================================================= */
table {
  margin: 0 auto;
  width: 80%;
}

th, td {
  border-right: 1px solid darkgrey;
  border-bottom: 1px solid darkgrey;
  text-align: left;
  padding: 4px 8px;
}

th:last-child, td:last-child {
  border-right: none;
}

/* =============================================================
   Status indicators
   ============================================================= */
.checkmark { color: green; }
.xmark, .error, .exception { color: red; }
.warning { color: orange; }

/* =============================================================
   Tooltip (error log column)
   ============================================================= */
.tooltip .tooltiptext {
  visibility: hidden;
  width: 80%;
  min-height: 90px;
  border: 2px solid #0000a3;
  text-align: center;
  border-radius: 6px;
  padding: 20px;
  position: fixed;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s;
  cursor: pointer;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

td[data-title]::after {
  content: attr(data-title);
  position: absolute;
  background: #333;
  color: #fff;
  padding: 5px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.5s;
}

td[data-title]:hover::after {
  opacity: 1;
}

/* =============================================================
   KPI Dashboard
   ============================================================= */
tr.kpi-healthy td  { background-color: #e6f9e6; }
tr.kpi-degraded td { background-color: #fff8e1; }
tr.kpi-failing td  { background-color: #fdecea; }
tr.kpi-failing td, tr.kpi-degraded td { cursor: pointer; }

.badge-green  { display: inline-block; background-color: #4caf50; color: #fff; padding: 4px 12px; border-radius: 4px; font-weight: bold; }
.badge-yellow { display: inline-block; background-color: #ff9800; color: #fff; padding: 4px 12px; border-radius: 4px; font-weight: bold; }
.badge-red    { display: inline-block; background-color: #f44336; color: #fff; padding: 4px 12px; border-radius: 4px; font-weight: bold; }

a.active { font-weight: bold; text-decoration: underline; }

.sys-metric { font-weight: bold; }
