* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f6fb;
  color: #111827;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #0f172a;
  color: #ffffff;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.brand h1 {
  font-size: 18px;
  margin: 0;
}

.brand p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 13px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}

.main {
  flex: 1;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar h2 {
  margin: 0 0 6px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  background: #2563eb;
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}

.btn:hover {
  background: #1d4ed8;
}

.muted {
  color: #6b7280;
}

.small {
  font-size: 12px;
}

section {
  margin-bottom: 28px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h3,
.section-head h4 {
  margin: 0;
}

.inline {
  margin-bottom: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.stat-card,
.card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.stat-card {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
}

.stat-card strong {
  font-size: 28px;
  line-height: 1.1;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.status-ok {
  background: #dcfce7;
  color: #166534;
}

.status-bad {
  background: #fee2e2;
  color: #991b1b;
}

.status-neutral {
  background: #e5e7eb;
  color: #374151;
}

.search {
  width: 260px;
  max-width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
}

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

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

thead th {
  text-align: left;
  font-size: 13px;
  color: #6b7280;
  padding: 12px 10px;
  border-bottom: 1px solid #e5e7eb;
}

tbody td {
  padding: 14px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  font-size: 14px;
}

tbody tr:hover {
  background: #f8fafc;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.chip.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.chip.green {
  background: #dcfce7;
  color: #166534;
}

.chip.red {
  background: #fee2e2;
  color: #991b1b;
}

.chip.gray {
  background: #e5e7eb;
  color: #374151;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
}

.list-block {
  display: grid;
  gap: 10px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.progress {
  width: 100%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.subtext {
  color: #6b7280;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-grid,
  .health-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .main {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
