:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1a1f2e;
  --muted: #5c6578;
  --border: #d8dee9;
  --brand: #1f4b99;
  --ok: #1f7a4c;
  --warn: #9a6700;
  --offline: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.nav a {
  margin-left: 1rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0 0 0.25rem;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.link-list {
  margin: 0;
  padding-left: 1.25rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: lowercase;
}

.badge-ok,
.badge-online {
  background: #dff5ea;
  color: var(--ok);
}

.badge-warn {
  background: #fff4d6;
  color: var(--warn);
}

.badge-offline {
  background: #eceff4;
  color: var(--offline);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

code {
  font-size: 0.9em;
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.button {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

.hint,
.empty-state {
  color: var(--muted);
}

.form {
  display: grid;
  gap: 1rem;
  max-width: 32rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.form input {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.flash-success {
  background: #dff5ea;
  color: var(--ok);
}

.flash-error {
  background: #fde8e8;
  color: #b42318;
}

.badge-error {
  background: #fde8e8;
  color: #b42318;
}

.badge-unknown {
  background: #eceff4;
  color: var(--muted);
}
