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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f23;
  color: #e0e0e0;
  min-height: 100vh;
}

a { color: #0ea5e9; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Navbar */
.navbar {
  background: #1a1a2e;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 56px;
  border-bottom: 1px solid #2d2d44;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand a { font-weight: 700; font-size: 1.1rem; color: #00d4ff; text-decoration: none; margin-right: 2rem; }
.nav-links { display: flex; gap: 0.25rem; flex: 1; }
.nav-links a { padding: 0.5rem 0.75rem; border-radius: 6px; color: #a0a0b8; font-size: 0.85rem; text-decoration: none; transition: all 0.15s; }
.nav-links a:hover { background: #2d2d44; color: #fff; text-decoration: none; }
.nav-links a.active { background: #0ea5e9; color: #fff; }
.nav-user { display: flex; align-items: center; gap: 0.75rem; color: #a0a0b8; font-size: 0.85rem; }

/* Container */
.container { max-width: 1400px; margin: 0 auto; padding: 1.5rem; }

/* Cards */
.card { background: #1a1a2e; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; border: 1px solid #2d2d44; }
.card h2 { margin-bottom: 1rem; font-size: 1.1rem; color: #00d4ff; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: #1a1a2e; border-radius: 12px; padding: 1.25rem; text-align: center; border: 1px solid #2d2d44; }
.stat-value { font-size: 2rem; font-weight: 700; color: #00d4ff; }
.stat-label { font-size: 0.8rem; color: #a0a0b8; margin-top: 0.25rem; }

/* Bot cards */
.bot-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.bot-card { background: #16213e; border-radius: 10px; padding: 1rem; border: 1px solid #2d2d44; }
.bot-name { font-weight: 600; font-size: 1rem; }
.bot-username { color: #a0a0b8; font-size: 0.85rem; }
.bot-status { margin-top: 0.5rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: #1a1a2e; border-radius: 12px; overflow: hidden; border: 1px solid #2d2d44; }
thead th { background: #16213e; padding: 0.75rem; text-align: left; font-size: 0.8rem; text-transform: uppercase; color: #a0a0b8; border-bottom: 1px solid #2d2d44; }
tbody td { padding: 0.6rem 0.75rem; border-bottom: 1px solid #1e1e36; font-size: 0.85rem; }
tbody tr:hover { background: #16213e; }
tbody tr:last-child td { border-bottom: none; }

/* Badges */
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; }
.badge-green { background: #065f4633; color: #34d399; }
.badge-red { background: #7f1d1d33; color: #f87171; }
.badge-yellow { background: #78350f33; color: #fbbf24; }
.badge-blue { background: #1e3a5f33; color: #60a5fa; }
.badge-purple { background: #4c1d9533; color: #a78bfa; }
.badge-gray { background: #37415133; color: #9ca3af; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-size: 0.85rem; color: #a0a0b8; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.6rem; background: #16213e; border: 1px solid #333; border-radius: 8px; color: #fff; font-size: 0.9rem;
}
.form-group textarea { font-family: inherit; }
.form-inline { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.form-inline input, .form-inline select { width: auto; min-width: 150px; padding: 0.5rem; background: #16213e; border: 1px solid #333; border-radius: 8px; color: #fff; font-size: 0.85rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: auto; }

/* Buttons */
.btn { padding: 0.6rem 1.2rem; border: none; border-radius: 8px; cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: all 0.15s; }
.btn-primary { background: #0ea5e9; color: #fff; }
.btn-primary:hover { background: #0284c7; }
.btn-sm { padding: 0.25rem 0.6rem; border: none; border-radius: 6px; cursor: pointer; font-size: 0.75rem; background: #2d2d44; color: #e0e0e0; transition: all 0.15s; }
.btn-sm:hover { background: #3d3d5c; }
.btn-success { background: #065f46; color: #34d399; }
.btn-warning { background: #78350f; color: #fbbf24; }
.btn-danger { background: #7f1d1d; color: #f87171; }

/* Alerts */
.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: #065f4633; color: #34d399; border: 1px solid #065f46; }
.alert-error { background: #7f1d1d33; color: #f87171; border: 1px solid #7f1d1d; }
.alert-info { background: #1e3a5f33; color: #60a5fa; border: 1px solid #1e3a5f; }

/* Pagination */
.pagination { display: flex; gap: 0.25rem; margin-top: 1rem; justify-content: center; }
.pagination a { padding: 0.4rem 0.75rem; background: #1a1a2e; border-radius: 6px; color: #a0a0b8; font-size: 0.85rem; text-decoration: none; }
.pagination a.active { background: #0ea5e9; color: #fff; }
.pagination a:hover { background: #2d2d44; text-decoration: none; }

/* Filters */
.filters { margin-bottom: 1rem; }

/* Helpers */
.muted { color: #666; font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.text-truncate { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-danger { color: #f87171; }
.actions { white-space: nowrap; }
.section { margin-bottom: 2rem; }
.section h2 { margin-bottom: 1rem; font-size: 1.1rem; color: #00d4ff; }
code { background: #16213e; padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.8rem; }
pre { background: #16213e; padding: 1rem; border-radius: 8px; overflow-x: auto; }
pre code { background: none; padding: 0; font-size: 0.85rem; }
.api-key-display { cursor: pointer; font-size: 0.7rem; word-break: break-all; }
.api-key-display:hover { background: #0ea5e933; }

h1 { margin-bottom: 1.5rem; font-size: 1.5rem; }

@media (max-width: 768px) {
  .nav-links { overflow-x: auto; }
  .form-inline { flex-direction: column; }
  .form-inline input, .form-inline select { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
