:root {
  --bg: #303744;
  --panel: #121923;
  --panel-2: #1a2230;
  --line: #2a3445;
  --text: #f2f5f7;
  --muted: #9aa4b2;
  --red: #ff4d4f;
  --yellow: #ffb020;
  --green: #22c55e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side {
  background: #101722;
  border-right: 1px solid #1e2838;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}
.logo { font-size: 34px; margin-bottom: 20px; }
.side nav { display: grid; gap: 10px; }
.nav-link {
  color: var(--muted);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}
.nav-link.active, .nav-link:hover { background: #1b2534; color: #fff; }
.side-footer { margin-top: auto; color: var(--muted); }
.main { padding: 24px; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 16px; }
.topbar h1 { margin: 0; font-size: 2rem; }
.topbar p { margin: 5px 0 0; color: var(--muted); }
.search { background: #1b2534; border: 1px solid var(--line); color: #c7ced8; padding: 10px 14px; border-radius: 999px; }
.banner {
  background: rgba(255, 77, 79, .14);
  border: 1px solid rgba(255, 77, 79, .45);
  color: #ffd0d1;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.hidden { display: none; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid.one-col { grid-template-columns: 1fr; }
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.card h2, .card h3 { margin: 0 0 12px; }
.kpi strong { font-size: 2rem; display: block; margin-bottom: 4px; }
.kpi span { color: var(--muted); font-size: .9rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.pill {
  font-size: .72rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #d2dae3;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(34,197,94,.16);
}
ul { margin: 0; padding-left: 18px; }
li { margin: 8px 0; color: #dce2e9; line-height: 1.35; }
.span-2 { grid-column: span 2; }
.ok { color: #8bf5b1; }
.warn { color: #ffd37a; }
.bad { color: #ff9ea0; }

.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.agent-card .agent-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.agent-role {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
}
.agent-card ul { padding-left: 16px; }
.agent-card li { font-size: 14px; }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .kpis, .grid, .agent-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
