* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #111827;
  color: #f3f4f6;
}
header {
  background: #0b1220;
  border-bottom: 1px solid #1f2937;
  padding: 18px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}
nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-links a {
  color: #e5e7eb;
  text-decoration: none;
  padding: 10px 14px;
  background: #1f2937;
  border-radius: 8px;
  font-size: 14px;
}
.nav-links a:hover { background: #374151; }
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}
h1, h2, h3 { margin-top: 0; }
.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.grid {
  display: grid;
  gap: 18px;
}
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
form.inline, .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #d1d5db;
}
input, select, textarea, button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #0f172a;
  color: #f9fafb;
  font-size: 14px;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.field {
  min-width: 120px;
  flex: 1;
}
.field.small { max-width: 120px; }
.field.medium { max-width: 180px; }
button, .btn {
  cursor: pointer;
  background: #2563eb;
  border: none;
  color: white;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
button:hover, .btn:hover { background: #1d4ed8; }
.btn-secondary { background: #374151; }
.btn-secondary:hover { background: #4b5563; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
th, td {
  border-bottom: 1px solid #1f2937;
  padding: 10px 8px;
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}
th {
  background: #0b1220;
  position: sticky;
  top: 73px;
  z-index: 5;
}
.table-wrap { overflow-x: auto; }
.muted {
  color: #9ca3af;
  font-size: 13px;
}
.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #1f2937;
}
.flash {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  background: #14532d;
  color: #dcfce7;
  border: 1px solid #166534;
}
.endpoints code {
  display: block;
  margin: 6px 0;
  padding: 10px 12px;
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-all;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.kpi {
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 16px;
}
.kpi strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.header-actions {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cell-sm { min-width: 70px; }
.cell-md { min-width: 110px; }
.cell-lg { min-width: 160px; }
.cell-status { min-width: 130px; }
@media (max-width: 700px) {
  .container { padding: 16px; }
  th { top: 113px; }
}