body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background: #f4f6f8;
  color: #1a1a1a;
}

header {
  background: #1f2937;
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header nav a {
  color: #dbeafe;
  margin-left: 1rem;
  text-decoration: none;
}

main {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

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

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

th, td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.btn {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary {
  background: #6b7280;
}

.btn-danger {
  background: #dc2626;
}

.status-online {
  color: #15803d;
  font-weight: 600;
}

.status-offline {
  color: #b91c1c;
  font-weight: 600;
}

form label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

form input, form select, form textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.45rem;
}

.error {
  color: #b91c1c;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat {
  background: #eff6ff;
  border-radius: 8px;
  padding: 1rem;
}

.stat strong {
  display: block;
  font-size: 1.5rem;
}

.stat-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.stat-alert strong {
  color: #b91c1c;
}

pre {
  background: #111827;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
}

.flash {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.muted {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.installer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.installer-form select,
.installer-form input[type="password"] {
  display: block;
  width: 100%;
  max-width: 28rem;
  margin-bottom: 0.75rem;
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
}

.toast {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  animation: toast-in 0.2s ease-out;
}

.toast-hide {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s, transform 0.3s;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
