* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: #0f172a; color: #e2e8f0; }
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: #111827; padding: 24px 18px; border-right: 1px solid #1f2937; }
.brand { font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.sidebar nav { display: flex; flex-direction: column; gap: 10px; }
.sidebar a { color: #cbd5e1; text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.sidebar a:hover { background: #1e293b; }
.main { padding: 24px; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.header h1 { margin: 0 0 6px; font-size: 28px; }
.header p { margin: 0; color: #94a3b8; }
.refresh-meta { margin-top: 8px; color: #93c5fd; font-size: 13px; }
.auto-refresh-toggle { color: #cbd5e1; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
button { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; border: 0; border-radius: 12px; padding: 10px 14px; cursor: pointer; box-shadow: 0 8px 24px rgba(37,99,235,0.18); }
button:hover { transform: translateY(-1px); }
.section { margin-bottom: 28px; }
.section h2 { margin-bottom: 14px; }
.cards, .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { background: linear-gradient(180deg, #111827, #0b1220); border: 1px solid #1f2937; border-radius: 18px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.18); }
.card .label { color: #94a3b8; font-size: 13px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.card .value { font-size: 24px; font-weight: 700; }
.card .meta { margin-top: 8px; color: #cbd5e1; font-size: 14px; }
.agent-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; background: #1e293b; color: #93c5fd; margin-right: 6px; margin-bottom: 6px; }
.badge.status-canonical { background:#052e16; color:#86efac; }
.badge.status-experimental, .badge.status-draft, .badge.status-transitional { background:#3f2a08; color:#fdba74; }
.badge.status-broken-config, .badge.status-side-product, .badge.status-spec-only { background:#3b0820; color:#fda4af; }
.list { display: grid; gap: 10px; }
.list-item { background: linear-gradient(180deg, #111827, #0b1220); border: 1px solid #1f2937; border-radius: 14px; padding: 14px; box-shadow: 0 10px 24px rgba(0,0,0,0.14); }
.list-item.level-warning { border-color:#7c2d12; background: linear-gradient(180deg, #1f120d, #140d0b); }
.list-item.level-info { border-color:#1d4ed8; background: linear-gradient(180deg, #0d1628, #0a1120); }
.topology-legend { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.topology-board { display:grid; gap:16px; }
.topology-column { background:#111827; border:1px solid #1f2937; border-radius:16px; padding:16px; }
.topology-column h3 { margin:0 0 12px; font-size:16px; color:#93c5fd; }
.topology-node { background:#0f172a; border:1px solid #334155; border-radius:14px; padding:12px; margin-bottom:10px; }
.topology-node .title { font-weight:700; margin-bottom:6px; }
.topology-node .meta { color:#cbd5e1; font-size:13px; }
.topology-link { color:#94a3b8; font-size:13px; margin-top:8px; }
.legend-chip { padding:6px 10px; border-radius:999px; font-size:12px; border:1px solid #334155; background:#111827; color:#cbd5e1; }
.topology-column:nth-child(1) h3 { color:#fda4af; }
.topology-column:nth-child(2) h3 { color:#93c5fd; }
.topology-column:nth-child(3) h3 { color:#86efac; }
.topology-column:nth-child(4) h3 { color:#fdba74; }
@media (min-width: 980px) {
  .topology-board { grid-template-columns: 1fr 1fr 1fr 1fr; align-items:start; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid #1f2937; position: sticky; top: 0; z-index: 20; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar a { background:#0f172a; }
  .main { padding: 16px; }
  .header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .header h1 { font-size: 24px; }
  .cards, .grid { grid-template-columns: 1fr; }
  .topology-board { grid-template-columns: 1fr; }
  button { width: auto; }
}
