* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-hover: #22263a;
  --border: #2a2e3f;
  --primary: #6c5ce7;
  --primary-glow: rgba(108, 92, 231, 0.25);
  --success: #00d2a0;
  --warning: #ffc107;
  --danger: #ff4757;
  --text: #e4e6f0;
  --text-muted: #8b8fa3;
  --text-dim: #5a5e72;
  --radius: 12px;
  --chat-user: #6c5ce7;
  --chat-bot: #2a2e3f;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.dashboard {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.logo {
  font-size: 28px;
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}
.header h1 { font-size: 22px; font-weight: 600; }
.subtitle { font-size: 14px; color: var(--text-muted); font-weight: 300; }
.header-right { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: background 0.3s;
}
.status-dot.online { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.offline { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

/* Rows */
.row { display: flex; gap: 16px; margin-bottom: 16px; }
.top-row .card { flex: 1; }
.center-row { flex-direction: column; }
.bottom-row .column { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.footer-row .card { flex: 1; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--primary); }
.card h2 { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.card-body { display: flex; flex-direction: column; gap: 10px; }

/* Stats */
.stat { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.stat:last-child { border-bottom: none; }
.label { font-size: 13px; color: var(--text-muted); }
.value { font-size: 13px; font-weight: 500; color: var(--text); }
.value.online { color: var(--success); }

/* Skill/Habilidade items */
.skill-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--bg); border-radius: 8px; }
.skill-name { font-size: 13px; font-weight: 500; }
.skill-desc { font-size: 12px; color: var(--text-muted); }
.skill-status { font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 500; }
.skill-status.disponivel { background: rgba(0,210,160,0.15); color: var(--success); }
.skill-status.indisponivel { background: rgba(255,71,87,0.15); color: var(--danger); }

/* API items */
.api-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--bg); border-radius: 8px; }
.api-name { font-size: 13px; font-weight: 500; }
.api-status { font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 500; }
.api-status.ativo { background: rgba(0,210,160,0.15); color: var(--success); }
.api-status.fallback { background: rgba(255,193,7,0.15); color: var(--warning); }
.api-limit { font-size: 11px; color: var(--text-dim); }

/* Perfil items */
.perfil-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: var(--bg); border-radius: 8px; font-size: 12px; }
.perfil-key { color: var(--text-muted); }
.perfil-val { color: var(--primary); font-weight: 500; }
.perfil-conf { color: var(--text-dim); font-size: 11px; }

/* Chat */
.chat-card { display: flex; flex-direction: column; }
.chat-messages {
  flex: 1;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 12px;
}
.chat-msg {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  max-width: 80%;
  line-height: 1.5;
  word-wrap: break-word;
}
.chat-msg.user {
  background: var(--chat-user);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg.bot {
  background: var(--chat-bot);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-input-wrap { display: flex; gap: 8px; }
.chat-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
}
.chat-input-wrap input:focus { border-color: var(--primary); }
.chat-input-wrap button {
  padding: 10px 20px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-input-wrap button:hover { opacity: 0.85; }
.chat-input-wrap button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Empty states */
.empty { color: var(--text-dim); font-size: 12px; font-style: italic; text-align: center; padding: 12px; }

/* Responsive */
@media (max-width: 768px) {
  .row { flex-direction: column; }
  .chat-messages { max-height: 200px; }
}
