body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at -5% -10%, rgba(37, 99, 235, 0.25), transparent 45%),
    radial-gradient(1200px 700px at 105% -10%, rgba(99, 102, 241, 0.18), transparent 42%),
    #0b1220;
  color: #e5e7eb;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px;
}

.card {
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  color: #f8fafc;
}

.hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.eyebrow {
  margin: 0 0 8px;
  color: #93c5fd;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 980px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

@media (min-width: 980px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi {
  margin-bottom: 0;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kpi-label {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.kpi-value {
  margin: 4px 0 0;
  font-size: 27px;
  line-height: 1.1;
  color: #f8fafc;
  font-weight: 700;
}

.meter {
  margin-top: 10px;
}

.meter-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  transition: width .4s ease;
}

.meter-fill.alt {
  background: linear-gradient(90deg, #22c55e, #14b8a6);
}

.meter-text {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-weight: 600;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.admin-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.22);
}

button {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 11px;
  padding: 10px 13px;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

button:active {
  transform: translateY(1px);
}

button.danger {
  background: linear-gradient(180deg, #ef4444, #dc2626);
}

.install-btn {
  margin-top: 10px;
}

pre {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.45;
  color: #dbeafe;
}

.control-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.55);
  color: #dbeafe;
  font-size: 13px;
}

.control-status.ok {
  border-color: rgba(16, 185, 129, 0.45);
  color: #bbf7d0;
}

.control-status.err {
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}

.log-box {
  font-size: 11px;
  max-height: 290px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  white-space: nowrap;
}

.data-table th {
  color: #bfdbfe;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.badge.ok {
  color: #065f46;
  background: #a7f3d0;
}

.badge.off {
  color: #7f1d1d;
  background: #fecaca;
}

h2 {
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: 20px;
}

@media (max-width: 640px) {
  .hero {
    align-items: flex-start;
  }
  .brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .kpi-value {
    font-size: 23px;
  }
  .data-table th,
  .data-table td {
    padding: 9px 10px;
    font-size: 12px;
  }
  .log-box {
    max-height: 220px;
  }
}

