/* ============================================================
   KingBot Design System v2 — Ultra-premium dark SaaS
   Font: Inter | Accent: #ff2244 | BG: #080810
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080810;
  --bg-1: #0d0d1a;
  --bg-2: #111122;
  --bg-card: rgba(16, 16, 36, 0.72);
  --border: rgba(255, 255, 255, 0.07);
  --border-h: rgba(255, 34, 68, 0.35);
  --accent: #ff2244;
  --accent-d: #cc1a35;
  --accent-g: linear-gradient(135deg, #ff2244 0%, #cc1a35 100%);
  --green: #23d160;
  --amber: #ffb830;
  --text: #f0f0ff;
  --text-2: rgba(240, 240, 255, 0.65);
  --text-m: rgba(240, 240, 255, 0.38);
  --sidebar-w: 200px;
  --nav-h: 56px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
  --glow: 0 0 20px rgba(255, 34, 68, 0.15);
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Subtle grid bg */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 34, 68, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 34, 68, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

body>* {
  position: relative;
  z-index: 1;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 34, 68, 0.25);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 34, 68, 0.5);
}

/* ── Navbar ───────────────────────────────────────────────── */
.kb-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(8, 8, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  justify-content: space-between;
  z-index: 1000;
}

.kb-nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.kb-nav-brand img,
.kb-nav-brand .brand-icon {
  width: 28px;
  height: 28px;
}

.kb-nav-brand span {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.kb-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile navbar adjustments */
@media (max-width: 768px) {
  .kb-nav {
    padding: 0 12px;
  }
  
  .kb-nav-brand span span {
    display: none;
  }
  
  .kb-nav-right {
    gap: 8px;
  }
  
  .kb-nav-right .user-chip {
    display: none;
  }
  
  .kb-nav-right .btn-ghost {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* ── Badges & Pills ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-upgrade {
  background: linear-gradient(135deg, #ffb830, #ff8c00);
  color: #1a0a00;
}

.badge-admin {
  background: rgba(255, 184, 48, 0.12);
  border: 1px solid rgba(255, 184, 48, 0.25);
  color: var(--amber);
}

.badge-running {
  background: rgba(35, 209, 96, 0.12);
  border: 1px solid rgba(35, 209, 96, 0.25);
  color: var(--green);
}

.badge-stopped {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-m);
}

.badge-running::before,
.badge-stopped::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-running::before {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.badge-stopped::before {
  background: var(--text-m);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-g);
  color: #fff;
  box-shadow: 0 3px 12px rgba(255, 34, 68, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(255, 34, 68, 0.5);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: rgba(255, 34, 68, 0.1);
  color: var(--accent);
  border: 1px solid rgba(255, 34, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(255, 34, 68, 0.2);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* ── Card / Panel ─────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.11);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  color: var(--accent);
  font-size: 14px;
}

/* ── Stat Cards ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  backdrop-filter: blur(16px);
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--border-h);
  box-shadow: var(--glow);
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-m);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-label i {
  font-size: 11px;
  color: var(--accent);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}

/* ── Form Elements ────────────────────────────────────────── */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: rgba(255, 34, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 34, 68, 0.08);
}

.form-control option {
  background: var(--bg-2);
  color: var(--text-primary);
}

/* Alias classes for form elements */
.form-select,
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-select:focus,
.form-input:focus {
  border-color: rgba(255, 34, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 34, 68, 0.08);
}

.form-select option {
  background: var(--bg-2);
  color: var(--text-primary);
}

/* Form group spacing */
.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* Modal improvements */
.modal .card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.modal .card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal .card-title i {
  color: var(--accent);
}

.btn-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all var(--transition);
}

.btn-close:hover {
  background: rgba(255, 34, 68, 0.1);
  border-color: rgba(255, 34, 68, 0.3);
  color: var(--accent);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* ── Toggle ───────────────────────────────────────────────── */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle {
  position: relative;
  width: 36px;
  height: 20px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}

.toggle input:checked+.toggle-slider {
  background: var(--accent);
}

.toggle input:checked+.toggle-slider::before {
  transform: translateX(16px);
  background: #fff;
}

/* ── Table ────────────────────────────────────────────────── */
.kb-table {
  width: 100%;
  border-collapse: collapse;
}

.kb-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-m);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

.kb-table td {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.kb-table tr:last-child td {
  border-bottom: none;
}

.kb-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-m);
  font-size: 13px;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.kb-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

.kb-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: rgba(8, 8, 20, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.kb-sidebar-header {
  padding: 16px 14px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-m);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 14px;
  transition: color var(--transition);
}

.sidebar-back:hover {
  color: var(--text-2);
}

.sidebar-bot-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-bot-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 34, 68, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.sidebar-bot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.sidebar-bot-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.sidebar-bot-status {
  font-size: 11px;
  color: var(--text-m);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Sidebar Nav ──────────────────────────────────────────── */
.kb-nav-list {
  list-style: none;
  padding: 10px 8px;
  flex: 1;
}

.kb-nav-list li {
  margin-bottom: 2px;
}

.kb-nav-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  justify-content: space-between;
}

.kb-nav-list a > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.kb-nav-list a i {
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-m);
  transition: color var(--transition);
  flex-shrink: 0;
}

.kb-nav-list a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.kb-nav-list a:hover i {
  color: var(--text-2);
}

.kb-nav-list a.active {
  background: rgba(255, 34, 68, 0.12);
  color: #ff4466;
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}

.kb-nav-list a.active i {
  color: var(--accent);
}

/* Premium Locked Items */
.kb-nav-list li.premium-locked a {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.kb-nav-list li.premium-locked a:hover {
  background: transparent;
}

/* ── Main content ─────────────────────────────────────────── */
.kb-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 24px;
  min-width: 0;
}

.kb-content {
  max-width: 1600px;
  margin: 0 auto;
}

/* ── Server/Bot Header ────────────────────────────────────── */
.kb-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  backdrop-filter: blur(16px);
}

.kb-page-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 34, 68, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}

.kb-page-header-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.kb-page-header-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.kb-page-header-sub {
  font-size: 12px;
  color: var(--text-m);
  margin-top: 2px;
}

/* ── User chip ────────────────────────────────────────────── */
.user-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px 4px 5px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-g);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Bot cards (dashboard) ────────────────────────────────── */
.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.bot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(16px);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.bot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 34, 68, 0.25), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.bot-card:hover {
  border-color: var(--border-h);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.bot-card:hover::before {
  opacity: 1;
}

.bot-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.bot-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(88, 101, 242, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  overflow: hidden;
  flex-shrink: 0;
}

.bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bot-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.bot-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bot-stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.bot-stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-m);
}

.bot-stat-item i {
  font-size: 11px;
  color: var(--accent);
}

.bot-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bot-actions .btn {
  flex: 1;
}

/* ── Servers grid ─────────────────────────────────────────── */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.server-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  transition: all var(--transition);
}

.server-card:hover {
  border-color: var(--border-h);
  box-shadow: var(--glow);
  transform: translateX(2px);
}

.server-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 34, 68, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}

.server-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.server-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.server-members {
  font-size: 12px;
  color: var(--text-m);
  margin-top: 1px;
}

.server-arrow {
  margin-left: auto;
  color: var(--text-m);
  transition: transform var(--transition), color var(--transition);
}

.server-card:hover .server-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

/* ── Section heading ──────────────────────────────────────── */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-m);
}

/* ── Mobile Sidebar Toggle ────────────────────────────────── */
.sidebar-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--border);
  cursor: pointer;
  color: var(--text);
  font-size: 20px;
  padding: 10px 14px;
  border-radius: 10px;
  position: relative;
  z-index: 1000;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 34, 68, 0.3);
}

.sidebar-toggle:hover,
.sidebar-toggle:active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: scale(1.05);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: var(--nav-h, 56px);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  cursor: pointer;
}

.sidebar-overlay.active {
  display: block;
}

/* Sidebar harus di atas overlay */
.kb-sidebar {
  z-index: 100 !important;
}

.kb-sidebar.open {
  z-index: 100 !important;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .kb-sidebar {
    transform: translateX(-240px);
    width: 240px !important;
    min-width: 240px !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    top: 0;
    padding-top: var(--nav-h);
  }

  .kb-sidebar.open {
    transform: translateX(0);
  }

  .kb-main {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bots-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .kb-main {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-value {
    font-size: 22px;
  }

  .kb-page-header {
    padding: 14px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .bots-grid {
    gap: 12px;
  }

  .bot-actions {
    gap: 6px;
  }

  .servers-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeSlideIn 0.4s var(--transition) forwards;
}

/* ── Utility ──────────────────────────────────────────────── */
.grid {
  display: grid;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-5 {
  margin-top: 20px;
}

.mb-4 {
  margin-bottom: 16px;
}

.text-muted {
  color: var(--text-m);
}

.text-accent {
  color: var(--accent);
}

.w-full {
  width: 100%;
}