* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  background: #f5f6f8;
  color: #1a1a1a;
}

nav {
  background: #1a1a1a;
  color: #fff;
  padding: 12px 24px;
  display: flex;
  gap: 24px;
  align-items: center;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover { color: #4a9eff; }

nav .brand { font-weight: 700; margin-right: auto; }

main {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 24px;
}

h1 { margin-top: 0; }

.card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

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

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

th { background: #fafafa; font-weight: 600; font-size: 13px; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: #eee; }
th .sort-arrow { display: inline-block; width: 10px; color: #999; margin-left: 4px; }
th.sort-asc .sort-arrow::after { content: "▲"; color: #1a1a1a; }
th.sort-desc .sort-arrow::after { content: "▼"; color: #1a1a1a; }

label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; }

input, select, button {
  font: inherit;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #d0d0d0;
}

input, select { width: 100%; }

button {
  background: #1a1a1a;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
}

button:hover { background: #333; }

button.danger { background: #c33; }
button.secondary { background: #666; }

.row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }

.muted { color: #888; font-size: 13px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}
.badge.ok { background: #d4f5dc; color: #1a6f30; }
.badge.off { background: #eee; color: #666; }

tr.row-green { background: #e8f5ec; }
tr.row-yellow { background: #fff7d6; }
tr.row-red { background: #fdecec; }
tr.row-green:hover { background: #d4ecd8; }
tr.row-yellow:hover { background: #fcecae; }
tr.row-red:hover { background: #fad8d8; }
