:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  --border: #1e1e2e;
  --text: #e0e0e8;
  --text-dim: #7a7a8e;
  --accent: #6c5ce7;
  --accent-hover: #7e70f0;
  --accent-glow: rgba(108, 92, 231, 0.15);
  --success: #00cec9;
  --danger: #ff4757;
  --danger-hover: #ff6b7a;
  --radius: 10px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* NAV */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 12px; align-items: center; }
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 14px;
}
.nav-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--text-dim);
  color: var(--text);
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* HERO */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 640px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  color: var(--text-dim);
  font-size: 17px;
  margin-bottom: 32px;
  max-width: 480px;
}

/* FEATURES */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 0 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.feature-card p {
  color: var(--text-dim);
  font-size: 13px;
}

/* LOGIN SECTION */
.login-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 80px;
  gap: 16px;
}
.login-section p {
  color: var(--text-dim);
  font-size: 14px;
}

/* DASHBOARD */
.dashboard {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
}
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.dashboard-header h2 {
  font-size: 22px;
  font-weight: 700;
}

/* STATS ROW */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-card .label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-card .value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 4px;
}

/* BOT LIST */
.bot-list { display: flex; flex-direction: column; gap: 10px; }
.bot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}
.bot-card:hover { background: var(--bg-card-hover); }
.bot-info { display: flex; flex-direction: column; gap: 2px; }
.bot-name { font-weight: 600; font-size: 15px; }
.bot-username {
  color: var(--accent);
  font-size: 13px;
}
.bot-status {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bot-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.dot-online { background: var(--success); }
.dot-offline { background: var(--danger); }
.bot-actions { display: flex; gap: 8px; }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.empty-state p { font-size: 15px; margin-bottom: 20px; }

/* LOADING SPINNER */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 14px;
  z-index: 999;
  animation: slideUp 0.3s;
  max-width: 320px;
}
.toast.error { border-color: var(--danger); }
.toast.success { border-color: var(--success); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 400px;
  width: 90%;
}
.modal h3 { margin-bottom: 12px; }
.modal p { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* FOOTER */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-dim);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .dashboard-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .bot-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .bot-actions { width: 100%; }
  .bot-actions .btn { flex: 1; justify-content: center; }
}
