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

:root {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #f5f6fa;
  --line: #e9e9f0;
  --text: #1b1c26;
  --muted: #90939f;
  --mint: #5a4be0;
  --mint-dim: #efedfe;
  --amber: #f0a93c;
  --amber-text: #b5822a;
  --radius: 10px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  line-height: 1.5;
}

button, a, input, textarea, select, [role="button"], .card, .notif-bell, .hamburger-btn {
  -webkit-tap-highlight-color: transparent;
}

button:focus, a:focus, input:focus, textarea:focus, select:focus, [role="button"]:focus {
  outline: none;
}
button:focus-visible, a:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.mono { font-family: 'JetBrains Mono', monospace; }

a { color: inherit; text-decoration: none; }

/* ---------- Scrollbar modern & animasi ---------- */
/* Samar & tipis pas diam, membesar + warna tema begitu di-hover atau lagi
   discroll (class .is-scrolling ditoggle otomatis oleh js/scrollbar.js).
   Firefox dapet transisi warna versi sederhana lewat scrollbar-color;
   Chrome/Edge/Safari (WebKit/Blink) dapet transisi penuh (warna+ukuran)
   lewat ::-webkit-scrollbar-*. Track selalu transparan biar nggak nambah
   "kotak" visual di tema manapun. */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(144, 147, 159, .35) transparent;
  transition: scrollbar-color .35s ease;
}
html.is-scrolling, .is-scrolling {
  scrollbar-color: rgba(90, 75, 224, .65) transparent;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: rgba(144, 147, 159, .28);
  border-radius: 20px;
  border: 3px solid transparent;
  background-clip: content-box;
  transition: background-color .3s ease, border-width .25s ease;
}
/* Hover manual di atas scrollbar-nya sendiri */
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(90, 75, 224, .55);
  border-width: 2px; /* thumb kelihatan lebih "gemuk" pas aktif */
}
::-webkit-scrollbar-thumb:active {
  background-color: rgba(90, 75, 224, .8);
}
/* Lagi discroll (belum tentu kursor di atas scrollbar) — dipicu js/scrollbar.js */
.is-scrolling::-webkit-scrollbar-thumb {
  background-color: rgba(90, 75, 224, .55);
  border-width: 2px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.nav .brand {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.nav .brand span { color: var(--mint); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--mint); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--mint); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  padding: 88px 24px 64px;
  align-items: center;
}
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  color: var(--mint);
  font-size: 13px;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.hero h1 {
  font-size: 52px;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 800;
}
.hero h1 em { color: var(--mint); font-style: normal; }
.hero p.lead { color: var(--muted); font-size: 17px; max-width: 480px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; }

/* Terminal / phone mockup — signature element */
.terminal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(20,20,43,.25);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.terminal-bar .chip { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.terminal-bar .label { margin-left: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.terminal-body { padding: 22px; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; }
.msg { margin-bottom: 16px; }
.msg .who { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.msg .bubble { display: inline-block; padding: 10px 13px; border-radius: 8px; white-space: pre-wrap; }
.msg.user .bubble { background: var(--mint-dim); color: var(--mint); }
.msg.bot .bubble { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.caret { display: inline-block; width: 7px; height: 14px; background: var(--mint); vertical-align: middle; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Section shared ---------- */
section { padding: 72px 24px; border-top: 1px solid var(--line); }
.section-head { max-width: 620px; margin-bottom: 40px; }
.section-head .tag { font-family: 'JetBrains Mono', monospace; color: var(--mint); font-size: 12px; letter-spacing: .08em; }
.section-head h2 { font-size: 32px; margin: 10px 0 12px; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); font-size: 15.5px; }

/* Command reference list — used instead of generic numbered steps */
.cmd-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cmd-row { background: var(--surface); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.cmd-row .cmd { font-family: 'JetBrains Mono', monospace; color: var(--mint); font-weight: 700; white-space: nowrap; font-size: 14px; }
.cmd-row .desc { color: var(--muted); font-size: 13.5px; }
.cmd-row .desc b { color: var(--text); font-weight: 700; }

/* Steps (how it works) — kept as ordered flow since onboarding IS sequential */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.step .n { font-family: 'JetBrains Mono', monospace; color: var(--mint); font-size: 13px; margin-bottom: 10px; }
.step h3 { margin: 0 0 8px; font-size: 17px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 30px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--mint); position: relative; }
.plan.featured::before {
  content: 'PALING DIPILIH';
  position: absolute; top: -11px; right: 24px;
  background: var(--mint); color: #fff; font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 20px; letter-spacing: .04em;
}
.plan h3 { font-size: 15px; color: var(--muted); font-weight: 700; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.plan .price { font-family: 'JetBrains Mono', monospace; font-size: 34px; font-weight: 800; margin-bottom: 4px; }
.plan .price span { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; flex: 1; }
.plan li { color: var(--muted); font-size: 14px; padding: 7px 0; border-top: 1px solid var(--line); }
.plan li:first-child { border-top: none; }
.plan li b { color: var(--text); }

footer { padding: 40px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero h1 { font-size: 38px; }
  .cmd-list, .steps, .plans { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #b9b0f8 0%, #cec6fb 42%, #ece8fd 100%);
}
.auth-shell::before,
.auth-shell::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  filter: blur(2px);
  pointer-events: none;
}
.auth-shell::before {
  width: 420px; height: 420px;
  top: -140px; left: -160px;
}
.auth-shell::after {
  width: 300px; height: 300px;
  bottom: -120px; left: -80px;
  background: rgba(255,255,255,.28);
}
.auth-dots {
  position: absolute;
  top: 18%;
  right: 4%;
  width: 160px;
  height: 220px;
  background-image: radial-gradient(rgba(255,255,255,.55) 1.6px, transparent 1.6px);
  background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 45%, transparent 80%);
  pointer-events: none;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 24px;
  padding: 40px 36px;
  position: relative;
  z-index: 1;
  box-shadow: 0 30px 60px -20px rgba(60,45,150,.35);
}
.auth-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--mint-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--mint);
  margin-bottom: 20px;
}
.auth-card h1 { font-size: 26px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.01em; }
.auth-card p.sub { color: var(--muted); font-size: 14.5px; margin: 0 0 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text); margin-bottom: 7px; font-weight: 700; }
.field input, .field select {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 14.5px; font-family: 'Manrope', sans-serif;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(90,75,224,.14); }
.field-icon { position: relative; }
.field-icon svg.field-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mint); pointer-events: none; }
.field-icon input { padding-left: 42px; }
.field-icon .pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 4px; cursor: pointer; color: var(--muted); display: flex;
}
.field-icon .pw-toggle:hover { color: var(--mint); }
.field-icon input[type="password"], .field-icon input[data-pw] { padding-right: 42px; }
.form-msg { font-size: 13px; padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; display: none; }
.form-msg.error { display: block; background: rgba(211,58,58,.08); color: #d13a3a; border: 1px solid rgba(211,58,58,.25); }
.form-msg.ok { display: block; background: rgba(90,75,224,.08); color: var(--mint); border: 1px solid rgba(90,75,224,.25); }
.form-msg.form-msg-icon { display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; }
.form-msg.form-msg-icon svg { flex-shrink: 0; margin-top: 2px; }

/* ---------- Select dengan icon di dalam (mis. Pilih bot) ---------- */
.select-wrap { position: relative; }
.select-wrap select {
  width: 100%; padding: 12px 38px 12px 46px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 14px; font-family: 'Manrope', sans-serif;
  font-weight: 600; appearance: none; -webkit-appearance: none; cursor: pointer;
}
.select-wrap select:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(90,75,224,.14); }
.select-wrap .select-ic {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 9px; background: var(--mint-dim); color: var(--mint);
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.select-wrap .select-chevron { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: flex; }

/* ---------- File picker custom (mis. upload creds.json) ---------- */
.file-picker {
  display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 8px 14px 8px 8px; background: var(--surface);
}
.file-picker-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; background: var(--mint-dim); color: var(--mint);
  font-weight: 700; font-size: 13px; padding: 9px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap;
  transition: opacity .12s ease;
}
.file-picker-btn:hover { opacity: .82; }
.file-picker-name { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-picker-name.has-file { color: var(--text); font-weight: 700; }
.file-picker input[type="file"] { display: none; }

/* ---------- Dot status kecil (mis. daftar sesi bot) ---------- */
.dot-sm { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.switch-line { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--muted); }
.switch-line a { color: var(--mint); font-weight: 700; }

.btn-gradient {
  background: linear-gradient(135deg, #6a5cf0 0%, #7c3aed 100%);
  color: #fff;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 15px;
  justify-content: space-between;
}
.btn-gradient:hover { opacity: .93; }
.btn-gradient svg { flex-shrink: 0; }

/* ---------- Login sekali klik (OAuth) ---------- */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-github { background: #24292e; color: #fff; border-radius: 12px; padding: 13px 18px; }
.btn-github:hover { opacity: .88; }
.btn-github svg { flex-shrink: 0; }

/* ---------- Dashboard ---------- */
.dash-shell { min-height: 100vh; }
.dash-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.dash-body { max-width: 960px; margin: 0 auto; padding: 36px 24px; }

.hamburger-btn {
  width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: background .18s ease, border-color .18s ease;
}
.hamburger-btn span {
  width: 18px; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform .22s ease, opacity .18s ease;
}
.hamburger-btn:hover { border-color: var(--mint); background: rgba(90,75,224,.06); }
.sidebar-open .hamburger-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar-open .hamburger-btn span:nth-child(2) { opacity: 0; }
.sidebar-open .hamburger-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
  /* Overlay tidak boleh ikut discroll/digeser lewat sentuhan — dia cuma
     backdrop diam, bukan area konten. */
  overscroll-behavior: none;
  touch-action: none;
}
.sidebar-open .sidebar-overlay { opacity: 1; visibility: visible; }

.sidebar-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 270px; z-index: 61;
  background: var(--surface); border-right: 1px solid var(--line);
  transform: translateX(-100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; padding: 22px 14px;
  overflow-y: auto;
  /* Scroll cuma boleh terjadi di isi drawer sendiri; begitu mentok
     atas/bawah, jangan diteruskan ke halaman/body di baliknya. */
  overscroll-behavior: contain;
}
.sidebar-open .sidebar-drawer { transform: translateX(0); }
.sidebar-brand { font-size: 19px; padding: 6px 10px 22px; }
.sidebar-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted);
  text-transform: uppercase; padding: 14px 10px 6px;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--text); text-decoration: none; margin-bottom: 2px;
  transition: background .15s ease, color .15s ease;
}
.sidebar-nav a:hover { background: var(--mint-dim); color: var(--mint); }
.sidebar-nav a.active { background: rgba(90,75,224,.12); color: var(--mint); }
.sidebar-nav a .ic { width: 18px; text-align: center; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.ic { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }

/* Item sidebar yang collapsible (mis. "Panel Developer" -> submenu).
   Tombolnya sengaja dibikin setara persis sama <a> menu biasa (padding,
   ukuran font, dst) supaya nyambung visual, cuma bedanya <button>, bukan
   link, karena klik di sini nutup/buka submenu, bukan pindah halaman. */
.sidebar-group-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 10px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--text); background: none; border: none; cursor: pointer;
  font-family: inherit; text-align: left; margin-bottom: 2px;
  transition: background .15s ease, color .15s ease;
}
.sidebar-group-toggle:hover { background: var(--mint-dim); color: var(--mint); }
.sidebar-group-toggle.has-active { color: var(--mint); }
.sidebar-group-chevron { margin-left: auto; transition: transform .15s ease; color: var(--muted); }
.sidebar-group-toggle.is-open .sidebar-group-chevron { transform: rotate(180deg); }

.sidebar-submenu { padding-left: 14px; margin-bottom: 2px; }
.sidebar-submenu a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 18px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); text-decoration: none; margin-bottom: 1px;
  border-left: 2px solid var(--line);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sidebar-submenu a:hover { background: var(--mint-dim); color: var(--mint); border-left-color: var(--mint); }
.sidebar-submenu a.active { background: rgba(90,75,224,.12); color: var(--mint); border-left-color: var(--mint); }

.grid-2 { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}
/* Grid item punya min-width:auto secara default, jadi track ikut melebar
   ngejar konten paling lebar di dalamnya (mis. baris header terminal log
   yang nowrap) — akibatnya seluruh halaman overflow horizontal di mobile.
   min-width:0 di sini matiin itu, biar anak-anaknya (flex row, teks, dst)
   yang nyusut/wrap/ellipsis seperti seharusnya, bukan grid-nya yang melebar. */
.grid-2 > div { min-width: 0; }

/* ---------- Layar lebar (desktop / "Mode Desktop" browser mobile) ----------
   Di bawah 900px sidebar tetap drawer overlay (mobile). Di atas itu, sidebar
   nempel permanen di kiri — nggak perlu tombol hamburger & nggak nutupin
   konten lagi. */
@media (min-width: 900px) {
  .hamburger-btn { display: none; }
  .sidebar-overlay { display: none !important; }
  .sidebar-drawer {
    transform: none !important;
    box-shadow: none;
  }
  .dash-top, .dash-body { margin-left: 270px; }
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card h2 { font-size: 16px; margin: 0 0 4px; }
.card p.hint { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
/* Centang biru "Verified" — badge kecil nempel di sebelah nama user, dikasih
   Developer lewat panel /dev. Lihat js/avatar.js (renderVerifiedBadge). */
.name-with-badge { display: inline-flex; align-items: center; gap: 4px; }
.verified-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border-radius: 50%; background: #1d9bf0;
  box-shadow: 0 0 0 1px rgba(29,155,240,.25);
}
/* Badge "Developer" — cuma dipakai akun yang terdaftar di DEVELOPER_EMAILS.
   Lihat js/avatar.js (renderDeveloperBadge). Warna beda dari Verified (biru)
   biar nggak ketuker: gradient ungu ke pink, khas warna brand panel Developer. */
.developer-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border-radius: 50%; background: linear-gradient(135deg, #5a4be0, #c23b6b);
  box-shadow: 0 0 0 1px rgba(90,75,224,.25);
}
.plan-badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
  background: var(--mint-dim); color: var(--mint); text-transform: uppercase;
}
.bot-item {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px 14px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px;
  background: var(--surface-2);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.bot-item:hover {
  border-color: var(--mint);
  box-shadow: 0 4px 14px rgba(90,75,224,.10);
  transform: translateY(-1px);
}
.bot-item > *:first-child { min-width: 0; flex: 1 1 200px; }
.bot-item > *:last-child { flex-shrink: 0; }
.bot-item-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bot-item-avatar {
  position: relative;
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #6a5cf0 0%, var(--mint) 65%, #4a3dd0 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(90,75,224,.30), 0 0 0 1px rgba(90,75,224,.12), inset 0 1px 0 rgba(255,255,255,.18);
}
.bot-item-avatar-badge {
  position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--muted); border: 2px solid var(--surface-2);
}
.status-badge-connected { background: #22c55e; box-shadow: 0 0 5px rgba(34,197,94,.7); }
.status-badge-pending, .status-badge-qr, .status-badge-pairing { background: var(--amber); }
.status-badge-disconnected { background: var(--muted); }
.bot-item-text { min-width: 0; }
.bot-item .name { font-weight: 700; font-size: 14px; overflow-wrap: break-word; }
.bot-item .meta { color: var(--muted); font-size: 12.5px; font-family: 'JetBrains Mono', monospace; margin-top: 2px; overflow-wrap: break-word; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 4px 10px 4px 8px;
  border-radius: 12px; font-weight: 700; letter-spacing: .2px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-pending, .status-qr, .status-pairing { background: rgba(240,169,60,.14); color: var(--amber-text); }
.status-connected { background: rgba(34,197,94,.14); color: #1a9a52; }
.status-connected .status-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.status-disconnected { background: rgba(211,58,58,.1); color: #d13a3a; }
.bot-item-runtime { color: #1a9a52; font-weight: 600; }
.bot-item-delete { transition: background .15s ease, color .15s ease; }
.bot-item-delete:hover { background: rgba(211,58,58,.1); color: #d13a3a; }
/* Bot kamu — kartu overview di dashboard */
.bk-card { position: relative; overflow: hidden; background: linear-gradient(180deg, #f7f5ff 0%, var(--surface) 60%); }
.bk-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; position: relative; padding-right: 0; }
.bk-head-icon {
  width: 50px; height: 50px; border-radius: 15px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--mint-dim); color: var(--mint);
}
.bk-head-icon svg { width: 24px; height: 24px; }
.bk-head-text { min-width: 0; flex: 1 1 auto; padding-right: 90px; }
.bk-head-text h2 { margin: 0 0 5px; font-size: 17px; }
.bk-head-text p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.bk-head-text a { color: var(--mint); font-weight: 700; }
.bk-graphic { position: absolute; right: -4px; top: -4px; width: 90px; height: 82px; display: none; }
@media (min-width: 560px) { .bk-graphic { display: block; } }
.bk-graphic-doc {
  position: absolute; right: 16px; top: 2px; width: 62px; height: 74px;
  background: linear-gradient(145deg, #8f83f6 0%, var(--mint) 60%, #4a3dd0 100%);
  border-radius: 13px; transform: rotate(9deg); padding: 11px 9px;
  box-shadow: 0 10px 22px rgba(90,75,224,.28);
}
.bk-graphic-doc .bk-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.65); display: inline-block; margin-right: 3px; }
.bk-graphic-doc .bk-ln { height: 4px; border-radius: 2px; background: rgba(255,255,255,.5); margin-top: 9px; }
.bk-graphic-doc .bk-ln.short { width: 55%; }
.bk-graphic-badge {
  position: absolute; right: 4px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(145deg, var(--mint), #4a3dd0); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(90,75,224,.4), 0 0 0 4px var(--surface);
}
.bk-graphic-badge svg { width: 15px; height: 15px; }
.bk-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(20,20,45,.03);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.bk-item:hover { border-color: var(--mint); box-shadow: 0 4px 14px rgba(90,75,224,.10); transform: translateY(-1px); }
.bk-avatar {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff; font-family: 'Manrope', sans-serif;
  background: linear-gradient(145deg, #8f83f6 0%, var(--mint) 60%, #4a3dd0 100%);
  box-shadow: 0 3px 8px rgba(90,75,224,.30), inset 0 1px 0 rgba(255,255,255,.2);
}
.bk-info { flex: 1 1 auto; min-width: 0; }
.bk-info .bk-name { font-weight: 800; font-size: 15px; overflow-wrap: break-word; }
.bk-info .bk-phone { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 12.5px; margin-top: 2px; overflow-wrap: break-word; }
.bk-info .status-pill { margin-top: 7px; }
.bk-divider { width: 1px; height: 36px; background: var(--line); flex-shrink: 0; }
.bk-side {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--surface-2); color: var(--mint);
  display: flex; align-items: center; justify-content: center;
}
.bk-side svg { width: 19px; height: 19px; }
.bk-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.bk-feature { display: flex; gap: 10px; align-items: flex-start; }
.bk-feature .bk-f-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--mint-dim); color: var(--mint);
  display: flex; align-items: center; justify-content: center;
}
.bk-feature .bk-f-icon svg { width: 17px; height: 17px; }
.bk-feature b { display: block; font-size: 13px; margin-bottom: 2px; }
.bk-feature span { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
@media (max-width: 640px) { .bk-features { grid-template-columns: 1fr; } .bk-head-text { padding-right: 0; } }
.qr-box { text-align: center; }
.qr-box img { width: 100%; max-width: 240px; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 10px; }
.empty { color: var(--muted); font-size: 13.5px; text-align: center; padding: 30px 0; }
.grp-avatar-fallback {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--mint); color: #fff; font-weight: 700; font-size: 15px;
  font-family: 'Manrope', sans-serif;
}

/* ---------- Terminal log (header + console) ---------- */
.terminal {
  background: #0b1220; border: 1px solid #1c2436; border-radius: 10px;
  overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: #111a2c; border-bottom: 1px solid #1c2436;
}
.terminal-dots { display: flex; gap: 6px; flex-shrink: 0; }
.terminal-dots .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.terminal-dots .dot-red { background: #ff5f56; }
.terminal-dots .dot-yellow { background: #ffbd2e; }
.terminal-dots .dot-green { background: #27c93f; }
.terminal-title {
  color: #7a8296; font-size: 12.5px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.terminal-status {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #8a92a6;
}
.terminal-status .status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #5b6478; flex-shrink: 0;
}
.terminal-status.is-connected .status-dot { background: #27c93f; box-shadow: 0 0 6px rgba(39,201,63,.7); }
.terminal-status.is-connected .status-text { color: #27c93f; }
.terminal-status.is-connecting .status-dot { background: var(--amber); }
.terminal-status.is-connecting .status-text { color: var(--amber); }
.terminal-status.is-error .status-dot { background: #ff5f56; }
.terminal-status.is-error .status-text { color: #ff8b8b; }
.terminal-clear {
  flex-shrink: 0; background: transparent; color: #8a92a6; border: 1px solid #2a3348;
  border-radius: 6px; padding: 4px 10px; font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; cursor: pointer; transition: background .15s, color .15s;
}
.terminal-clear:hover { background: #1c2436; color: #dfe3ee; }

.log-console {
  background: #08120d; padding: 12px 14px; height: 220px; overflow-y: auto;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.7;
}
.log-line { display: flex; gap: 8px; white-space: pre-wrap; word-break: break-word; padding: 2px 0; }
.log-line .prompt { color: #27c93f; flex-shrink: 0; user-select: none; text-shadow: 0 0 8px rgba(39,201,63,.5); }
.log-line .t { color: #4a5578; flex-shrink: 0; }
.log-line.log-idle .msg { color: #6b7590; }
.log-line.log-error .msg { color: #ff6b6b; text-shadow: 0 0 10px rgba(255,107,107,.35); }
.log-line.log-warn .msg { color: #ffc857; text-shadow: 0 0 10px rgba(255,200,87,.3); }
.log-line.log-info .msg { color: #7ee0c3; }
.log-line .msg b { color: #a6b1ff; font-weight: 700; }

.terminal-input-row {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: #0b1220; border-top: 1px solid #1c2436;
}
.terminal-input-row .terminal-prompt { color: #27c93f; font-family: 'JetBrains Mono', monospace; font-size: 13px; flex-shrink: 0; }
.terminal-input-row input {
  flex: 1; background: transparent; border: none; outline: none; color: #dfe3ee;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; padding: 6px 0;
}
.terminal-input-row input::placeholder { color: #4a5578; }
.terminal-input-row button {
  flex-shrink: 0; background: var(--mint); color: #fff; border: none; border-radius: 6px;
  padding: 7px 16px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: opacity .15s;
}
.terminal-input-row button:hover { opacity: .88; }
.terminal-input-row button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Kode premium hasil generate ---------- */
.code-reveal {
  margin-top: 14px; border: 1px dashed rgba(90,75,224,.35); border-radius: 12px;
  background: linear-gradient(180deg, rgba(90,75,224,.06), rgba(90,75,224,.02));
  padding: 14px;
}
.code-reveal-list { display: flex; flex-direction: column; gap: 8px; }
.code-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px;
}
.code-chip .code-text {
  font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 700;
  letter-spacing: .03em; color: var(--mint);
}
.code-chip .copy-btn {
  flex-shrink: 0; display: flex; align-items: center; gap: 6px;
  background: var(--mint-dim); color: var(--mint); border: none; border-radius: 7px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  font-family: 'Manrope', sans-serif; transition: background .15s, transform .1s;
}
.code-chip .copy-btn:hover { background: rgba(90,75,224,.18); }
.code-chip .copy-btn:active { transform: scale(.96); }
.code-chip .copy-btn.copied { background: var(--mint); color: #fff; }
.code-chip .copy-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.code-reveal-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.code-reveal-hint p { margin: 0; }
.copy-all-btn {
  flex-shrink: 0; background: transparent; color: var(--mint); border: 1px solid rgba(90,75,224,.35);
  border-radius: 7px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  font-family: 'Manrope', sans-serif; white-space: nowrap;
}
.copy-all-btn:hover { background: var(--mint-dim); }

/* ---------- Halaman Maintenance ---------- */
.maintenance-card { text-align: center; }
.maintenance-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--mint-dim); color: var(--mint);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.maintenance-icon svg { width: 26px; height: 26px; }
.maintenance-card h1 { margin-bottom: 8px; }
.maintenance-card .sub { margin-bottom: 26px; }

/* ---------- Halaman 404 ---------- */
.notfound-code {
  font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 44px;
  letter-spacing: 2px; color: var(--mint); line-height: 1; margin-bottom: 10px;
}
.notfound-card h1 { font-size: 19px; }
.notfound-actions { display: flex; flex-direction: column; gap: 10px; }

/* Banner persisten yang cuma dilihat developer/admin saat maintenance aktif
   di halaman mana pun (bukan di halaman maintenance itu sendiri), supaya
   nggak lupa mode ini masih nyala. */
.maintenance-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff4d9; color: #8a6100; border-bottom: 1px solid #f0d78c;
  padding: 9px 16px; font-size: 13px; font-weight: 600; text-align: center;
}
.maintenance-banner .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #d19a00; flex-shrink: 0; }

/* Indikator + tombol toggle di panel Developer */
.maintenance-status-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.maintenance-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
}
.maintenance-badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.maintenance-badge.is-on { background: rgba(211,58,58,.1); color: #d13a3a; }
.maintenance-badge.is-on .dot { background: #d13a3a; box-shadow: 0 0 6px rgba(211,58,58,.6); }
.maintenance-badge.is-off { background: rgba(90,75,224,.08); color: var(--mint); }
.maintenance-badge.is-off .dot { background: var(--mint); }
.maintenance-actions { display: flex; gap: 10px; }

/* ---------- Broadcast progress ---------- */
.broadcast-progress { margin-top: 14px; }
.broadcast-progress-bar {
  width: 100%; height: 8px; border-radius: 999px; background: var(--surface-2);
  overflow: hidden; border: 1px solid var(--line);
}
.broadcast-progress-fill {
  height: 100%; width: 0%; background: var(--mint); border-radius: 999px;
  transition: width .3s ease;
}

/* ---------- Lonceng notifikasi (pengumuman dev panel) ---------- */
.notif-wrap { position: relative; }
.notif-bell {
  position: relative; background: transparent; border: none; cursor: pointer;
  color: var(--text); padding: 8px; display: flex; align-items: center; border-radius: 10px;
  transition: background .15s ease;
}
.notif-bell:hover { background: var(--surface-2); }
.notif-badge {
  position: absolute; top: 2px; right: 2px; background: #ff5f56; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 5px;
  border-radius: 999px; min-width: 15px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.notif-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); width: 328px; max-width: 86vw;
  max-height: 400px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 16px 40px rgba(30,25,70,.14), 0 2px 8px rgba(30,25,70,.06);
  z-index: 50; padding: 8px;
}
.notif-dropdown-title {
  font-weight: 700; font-size: 14px; padding: 10px 12px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; border-radius: 10px; font-size: 13px; transition: background .15s ease;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item::before {
  content: ''; flex-shrink: 0; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%;
  background: var(--mint);
}
.notif-item .notif-msg { color: var(--text); white-space: pre-wrap; line-height: 1.5; }
.notif-item .notif-time { color: var(--muted); font-size: 11.5px; margin-top: 5px; }
.notif-dropdown .empty { padding: 24px 12px; text-align: center; color: var(--muted); font-size: 13px; }

/* Di layar sempit, kunci dropdown ke viewport supaya tidak overflow ke kiri layar */
@media (max-width: 560px) {
  .notif-dropdown {
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
}

/* ---------- Modal custom (pengganti window.confirm/alert bawaan browser) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  background: var(--surface); border-radius: 12px; padding: 20px; max-width: 360px; width: 100%;
  box-shadow: 0 20px 48px rgba(0,0,0,.25);
}
.modal-msg { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--text); white-space: pre-wrap; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.modal-actions .btn { padding: 8px 16px; font-size: 13.5px; }
.tag-premium {
  display: inline-flex; align-items: center; font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  background: rgba(240,169,60,.16); color: var(--amber-text); text-transform: uppercase; letter-spacing: .04em;
}
.locked-box {
  text-align: center; padding: 28px 16px; border: 1px dashed var(--line); border-radius: 8px;
}
.locked-box .locked-icon { font-size: 26px; margin-bottom: 8px; }
.locked-box .locked-icon svg { width: 30px; height: 30px; color: var(--muted); }
.locked-box p { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.plan-feature-list { list-style: none; padding: 0; margin: 0 0 18px; }
.plan-feature-list li {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted);
  padding: 6px 0; border-top: 1px solid var(--line);
}
.plan-feature-list li:first-child { border-top: none; }
.plan-feature-list li.locked { color: var(--muted); opacity: .6; }
.plan-feature-list li .ic { flex-shrink: 0; }

/* ---------- Plan kamu — hero header ---------- */
.plan-hero { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.plan-hero-badge {
  position: relative; flex-shrink: 0; width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #f1ecff 0%, var(--mint-dim) 55%, #e3ddfd 100%);
  display: flex; align-items: center; justify-content: center; color: var(--mint);
  box-shadow: inset 0 0 0 1px rgba(90,75,224,.10);
}
.plan-hero-badge .spark { position: absolute; color: var(--mint); opacity: .85; }
.plan-hero-badge .spark-1 { top: -5px; right: -3px; }
.plan-hero-badge .spark-2 { bottom: -1px; left: -7px; width: 10px; height: 10px; }
.plan-hero-badge .spark-2 svg { width: 10px; height: 10px; }
.plan-hero-text { padding-top: 2px; }
.plan-hero-text h2 { margin: 0 0 7px; font-size: 19px; }
.plan-hero-text p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.plan-hero-text p + p { margin-top: 2px; }

/* ---------- Plan kamu — daftar fitur dalam box ---------- */
.plan-feature-box { border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin-bottom: 22px; }
.plan-feature-box .plan-feature-list { margin: 0; }
.plan-feature-box .plan-feature-list li { gap: 14px; font-size: 14.5px; color: var(--text); padding: 15px 0; }
.plan-feature-box .plan-feature-list li.locked { color: var(--muted); }
.plan-feature-box .plan-feature-list .feat-ic {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--mint-dim); color: var(--mint);
  display: flex; align-items: center; justify-content: center;
}
.plan-feature-box .plan-feature-list li.locked .feat-ic { background: var(--surface-2); color: var(--muted); }

/* ---------- Plan kamu — kode aktivasi & tombol ---------- */
.plan-code-box {
  display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 16px; margin-bottom: 12px; background: var(--surface-2);
}
.plan-code-box svg { flex-shrink: 0; color: var(--mint); }
.plan-code-box input {
  flex: 1; min-width: 0; border: none; background: transparent; padding: 0; font-size: 13px;
  font-family: 'JetBrains Mono', monospace; color: var(--text); text-transform: uppercase; letter-spacing: .03em;
}
.plan-code-box input:focus { outline: none; }
.plan-code-box input::placeholder { color: var(--muted); }
.plan-info-box {
  display: flex; align-items: flex-start; gap: 12px; background: var(--mint-dim); border-radius: 12px;
  padding: 14px 16px; margin-top: 14px; font-size: 13.5px; color: var(--text); line-height: 1.55;
}
.plan-info-box .plan-info-ic {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.plan-info-box b { color: var(--mint); }

.bot-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stats-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.stats-card-head-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bot-status-avatar {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, rgba(120,107,240,.22), rgba(90,75,224,.12) 70%);
  color: var(--mint);
}
.bot-status-sparkle { color: var(--mint); opacity: .55; flex-shrink: 0; margin-top: 2px; }
.bst-pill {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.bst-pill-green { background: rgba(34,197,94,.14); color: #1a9a52; }
.bst-pill-gray { background: var(--surface-2); color: var(--muted); }
.bst-pill-mint { background: rgba(90,75,224,.12); color: var(--mint); }
.bst-pill-amber { background: rgba(240,169,60,.16); color: var(--amber-text); }
.bot-stat-tile {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; gap: 10px; min-width: 0;
}
.bot-stat-tile .bst-label { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.bot-stat-tile .bst-value { font-size: 17px; font-weight: 800; line-height: 1.15; overflow-wrap: break-word; }
.bot-stat-tile > div:first-child { min-width: 0; flex: 1; }
.bot-stat-tile .bst-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
@media (max-width: 420px) {
  .bot-stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bot-stat-tile { padding: 12px; gap: 6px; }
  .bot-stat-tile .bst-value { font-size: 14px; }
  .bot-stat-tile .bst-icon { width: 30px; height: 30px; }
  .bot-stat-tile .bst-icon svg { width: 14px; height: 14px; }
  .bst-pill { font-size: 10px; padding: 3px 8px; margin-top: 6px; }
}

.bot-ctrl-buttons { display: flex; gap: 10px; margin-top: 16px; }
.bot-ctrl-buttons button { flex: 1; justify-content: center; white-space: nowrap; padding: 10px 8px; }
@media (max-width: 420px) {
  .bot-ctrl-buttons { gap: 6px; }
  .bot-ctrl-buttons button { font-size: 12.5px; padding: 9px 4px; gap: 5px; }
  .bot-ctrl-buttons button svg { width: 14px; height: 14px; }
}
.btn-warn { background: var(--amber); color: #241a00; }
.btn-warn:hover { opacity: .9; }
.btn-danger { background: #ff6b6b; color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Editor menu (.menu template) ---------- */
.var-chip {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  padding: 1px 6px; border-radius: 5px;
}
.var-chip.var-known { background: rgba(90,75,224,.14); color: var(--mint); }
.var-chip.var-unknown { background: rgba(211,58,58,.12); color: #d13a3a; text-decoration: underline wavy #d13a3a; }

.menu-editor-box {
  position: relative; width: 100%; height: 320px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  overflow: hidden;
}
.menu-editor-layer {
  position: absolute; inset: 0; margin: 0; padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 13.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; overflow: auto;
  box-sizing: border-box; border: none;
}
#menuHighlight { color: var(--text); pointer-events: none; }
#menuHighlight .var-known { background: rgba(90,75,224,.16); color: var(--mint); border-radius: 4px; }
#menuHighlight .var-unknown { background: rgba(211,58,58,.1); color: #d13a3a; text-decoration: underline wavy #d13a3a; border-radius: 4px; }
/* Waktu textarea kosong, #menuHighlight menampilkan pratinjau DEFAULT_MENU_TEMPLATE
   (lihat js/menu.js syncHighlight()) — diredupkan biar kelihatan itu cuma contoh,
   bukan teks yang beneran tersimpan. */
#menuHighlight.is-placeholder { opacity: .48; font-style: italic; }
.menu-editor-input {
  resize: none; background: transparent; color: transparent; caret-color: var(--text);
}
.menu-editor-input:focus { outline: none; }

.var-list { display: flex; flex-wrap: wrap; gap: 8px; }
.var-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px; cursor: pointer;
  padding: 6px 10px; border-radius: 20px; border: 1px solid var(--line);
  background: rgba(90,75,224,.08); color: var(--mint); transition: background .15s ease;
}
.var-badge:hover { background: rgba(90,75,224,.18); }

/* Kartu 1 command di List Command (js/menu.js renderMenuItems()). Tiap command
   punya 4 field (Kategori/header, Judul/title, Command/id, Deskripsi/description)
   — sebelumnya cuma title & id yang bisa diedit di dashboard, jadi kategori &
   deskripsi selalu jatuh ke default generik di plugins/menu.js. Sekarang semua
   field itu dibungkus per kartu (bukan 1 baris flex panjang) biar nggak ada lagi
   masalah elemen kepotong/meluber di layar sempit — grid yang nentuin susunan
   kolom, bukan flex-shrink yang gampang meleset di HP. */
.menu-item-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--bg);
}
.menu-item-card-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.menu-item-index { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.menu-item-remove {
  padding: 6px 12px; font-size: 13px; border: 1px solid #d13a3a; color: #d13a3a;
}
.menu-item-grid {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
.menu-item-field { display: flex; flex-direction: column; gap: 5px; }
.menu-item-field span { font-size: 12px; color: var(--muted); }
.menu-item-field input {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-family: 'Manrope', sans-serif; font-size: 14px;
}
@media (min-width: 480px) {
  /* Di layar yang cukup lebar: Kategori/Judul/Command sebaris (3 kolom), Deskripsi
     lebar penuh di bawahnya. */
  .menu-item-grid { grid-template-columns: 1fr 1fr 1fr; }
  .menu-item-field-wide { grid-column: 1 / -1; }
}

.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; text-align: center;
}
.stat-box .stat-n { font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 800; color: var(--mint); }
.stat-box .stat-l { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Chat bubble (dipakai suspend-chat & dev-suspend-chat) ---- */
.chat-box {
  background: #e9ebf3; border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto; scroll-behavior: smooth;
}
.chat-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 10px; }
.chat-row { display: flex; margin: 5px 0; }
.chat-row.chat-out { justify-content: flex-end; }
.chat-row.chat-in { justify-content: flex-start; }
.chat-bubble {
  display: inline-block; max-width: 100%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: break-word; text-align: left; box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.chat-out .chat-bubble { background: #ded9fb; color: #362f7a; border-bottom-right-radius: 4px; }
.chat-in .chat-bubble { background: #ffffff; color: var(--text); border-bottom-left-radius: 4px; }
.chat-time {
  display: block; margin-top: 4px; font-size: 10.5px; opacity: .65; text-align: right;
}
.chat-out .chat-time { color: #362f7a; }
.chat-in .chat-time { color: var(--muted); }
.chat-day-sep {
  text-align: center; font-size: 11.5px; color: var(--muted); margin: 10px 0 4px;
}
.chat-input-row { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.chat-input-row textarea {
  flex: 1; padding: 10px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font-size: 13.5px; font-family: inherit;
  resize: none; max-height: 100px;
}
.chat-send-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--mint);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0; transition: opacity .15s ease;
}
.chat-send-btn:disabled { opacity: .5; cursor: default; }
.chat-send-btn svg { width: 18px; height: 18px; }

/* ---- Avatar (dipakai Chat Global & pengaturan Profil) ---- */
.avatar-img { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; }
.avatar-fallback {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; flex-shrink: 0; font-family: 'Manrope', sans-serif; letter-spacing: .02em;
}

/* ---- Chat Global (banyak pengirim, beda dari suspend-chat yang cuma 1 lawan bicara) ---- */
.gchat-row { display: flex; gap: 8px; margin: 10px 0; align-items: flex-start; }
.gchat-row.gchat-out { flex-direction: row-reverse; }
.gchat-col { flex: 1 1 0%; max-width: 76%; min-width: 0; }
.gchat-name { font-size: 11.5px; font-weight: 700; color: var(--muted); margin: 0 4px 3px; }
.gchat-out .gchat-name { text-align: right; }

/* ---- Upload foto profil (halaman Profil) ---- */
.avatar-upload-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
#avatarPreview { position: relative; border-radius: 50%; }
.avatar-upload-actions { display: flex; flex-direction: column; gap: 8px; }
.avatar-upload-actions .btn { padding: 8px 16px; font-size: 12.5px; }

/* ---- Halaman Profil — hero header, card title row, info callout ---- */
.profile-intro { position: relative; padding-right: 108px; }
.profile-intro h1 { position: relative; display: inline-block; margin: 0 0 12px; }
.profile-intro h1::after {
  content: ''; position: absolute; left: 2px; bottom: -8px; width: 46px; height: 4px;
  border-radius: 3px; background: var(--mint);
}
.profile-hero-icon {
  position: absolute; top: 2px; right: 0; width: 88px; height: 88px; border-radius: 22px;
  background: linear-gradient(150deg, #ffffff 0%, #f2effc 100%);
  box-shadow: 0 10px 26px rgba(90,75,224,.16), 0 0 0 1px rgba(90,75,224,.06);
  display: flex; align-items: center; justify-content: center;
}
.profile-hero-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(150deg,#6a5cf0,#5a4be0); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(90,75,224,.3);
}
.profile-hero-avatar svg { width: 26px; height: 26px; }
.profile-hero-icon .gear-badge {
  position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(145deg,#ffffff,#f2effc); color: var(--mint); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(90,75,224,.22), 0 0 0 3px var(--surface);
}
.profile-hero-icon .gear-badge svg { width: 13px; height: 13px; }
.profile-hero-spark { position: absolute; color: var(--mint); opacity: .8; }
.profile-hero-spark.s1 { top: -12px; left: -16px; }
@media (max-width: 420px) {
  .profile-intro { padding-right: 84px; }
  .profile-hero-icon { width: 68px; height: 68px; border-radius: 18px; }
  .profile-hero-avatar { width: 40px; height: 40px; }
  .profile-hero-avatar svg { width: 20px; height: 20px; }
  .profile-hero-icon .gear-badge { width: 27px; height: 27px; }
  .profile-hero-icon .gear-badge svg { width: 13px; height: 13px; }
}

.card-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-title-row .card-title-ic {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--mint-dim); color: var(--mint);
  display: flex; align-items: center; justify-content: center;
}
.card-title-row h2 { margin: 0; font-size: 16px; }

#avatarPreview .avatar-img, #avatarPreview .avatar-fallback { box-shadow: 0 0 0 4px var(--mint-dim); }
.avatar-edit-badge {
  position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--mint); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(90,75,224,.4), 0 0 0 3px var(--surface);
}
.btn-outline-danger { background: transparent; color: #d13a3a; border-color: rgba(211,58,58,.3); }
.btn-outline-danger:hover { border-color: #d13a3a; background: rgba(211,58,58,.06); }

.info-callout {
  display: flex; align-items: flex-start; gap: 12px; background: var(--mint-dim); border-radius: 12px;
  padding: 14px 16px; font-size: 13.5px; color: var(--text); line-height: 1.55;
}
.info-callout .info-callout-ic {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.info-callout b { color: var(--mint); }

.info-plain {
  display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); line-height: 1.55;
}
.info-plain .info-plain-ic {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #c026d3); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.info-plain .info-plain-ic svg { width: 13px; height: 13px; }
.info-plain b { color: inherit; font-weight: inherit; }

.profile-meta-line { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.profile-meta-line b { color: var(--mint); }
.profile-meta-line .sep { margin: 0 6px; opacity: .5; }

/* ---- Spinner & animasi loading (dipakai upload foto chat & avatar) ---- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite; flex-shrink: 0;
}
.spinner.spinner-dark { border-color: rgba(90,75,224,.2); border-top-color: var(--mint); }

.upload-overlay {
  position: absolute; inset: 0; border-radius: inherit;
  background: rgba(20,20,30,.45); display: flex; align-items: center; justify-content: center;
  animation: fadeIn .15s ease;
}

/* Preview strip: muncul di atas input pas user pilih gambar buat dikirim */
.chat-attach-preview {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 16px 8px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
}
.chat-attach-preview .thumb-wrap { position: relative; width: 46px; height: 46px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--line); }
.chat-attach-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-attach-preview .attach-info { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); }
.chat-attach-preview .attach-info .name { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.chat-attach-remove {
  border: none; background: none; color: var(--muted); cursor: pointer; padding: 6px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0;
}
.chat-attach-remove:hover { background: var(--line); color: var(--text); }
.chat-attach-remove:disabled { opacity: .4; cursor: default; }

.chat-attach-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0; transition: background .15s ease, color .15s ease;
}
.chat-attach-btn:hover { background: var(--mint-dim); color: var(--mint); }
.chat-attach-btn:disabled { opacity: .5; cursor: default; }
.chat-attach-btn svg { width: 19px; height: 19px; }

/* Bubble berisi gambar: hilangkan padding di sekeliling foto, sisain buat caption/waktu.
   white-space:normal override wajib ada — kalau tidak, whitespace/baris-baru di antara
   <div> gambar & caption pada HTML yang di-generate JS ikut kehitung sebagai baris kosong
   (efek dari white-space:pre-wrap di .chat-bubble) dan bikin bubble jadi lebih tinggi dari
   yang seharusnya. */
.chat-bubble.has-image { padding: 4px; white-space: normal; }
.chat-bubble.has-image .bubble-caption { padding: 5px 9px 2px; white-space: pre-wrap; overflow-wrap: break-word; }
.chat-img-wrap {
  position: relative; border-radius: 10px; overflow: hidden; max-width: 240px;
  background: linear-gradient(90deg, #e4e5ee 25%, #edeef5 37%, #e4e5ee 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite;
}
.chat-img-wrap:not(.loaded) { min-width: 180px; min-height: 130px; }
.chat-img-wrap img {
  display: block; width: 100%; max-height: 320px; object-fit: cover;
  opacity: 0; transition: opacity .25s ease;
}
.chat-img-wrap img.loaded { opacity: 1; }
.chat-img-wrap.loaded { animation: none; background: none; }
.chat-bubble.has-image .chat-time { padding: 0 5px 4px; }

/* ---------- Leaderboard ---------- */
.lb-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.lb-search-wrap { position: relative; flex: 1 1 220px; max-width: 320px; }
.lb-search-wrap .ic,
.lb-search-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; line-height: 0; color: var(--muted); pointer-events: none;
}
.lb-search-wrap input {
  width: 100%; padding: 10px 14px 10px 36px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 13.5px; font-family: 'Manrope', sans-serif;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lb-search-wrap input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(90,75,224,.12); }
.lb-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lb-filters {
  display: inline-flex; gap: 4px; background: var(--surface-2); padding: 4px;
  border-radius: 10px; border: 1px solid var(--line);
}
.lb-filter-btn {
  border: none; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 700;
  padding: 7px 14px; border-radius: 7px; cursor: pointer; font-family: 'Manrope', sans-serif;
  transition: background .15s ease, color .15s ease;
}
.lb-filter-btn:hover { color: var(--text); }
.lb-filter-btn.active { background: var(--surface); color: var(--mint); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.lb-refresh-btn { padding: 9px 14px; font-size: 12.5px; }
.lb-refresh-btn svg { transition: transform .5s ease; }
.lb-refresh-btn.is-loading svg { animation: spin .7s linear infinite; }

/* Top 3 podium */
.lb-top3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; align-items: end; }
.lb-top-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 14px; text-align: center; position: relative; min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}
.lb-top-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(20,20,43,.28); }
.lb-top-card.rank-1 { order: 2; margin-top: -14px; padding-top: 26px; border-color: rgba(240,169,60,.4); background: linear-gradient(180deg, rgba(240,169,60,.08), var(--surface) 65%); }
.lb-top-card.rank-2 { order: 1; }
.lb-top-card.rank-3 { order: 3; }
.lb-top-medal {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 13px; margin: 0 auto 10px;
}
.lb-top-card.rank-1 .lb-top-medal { background: rgba(240,169,60,.18); color: var(--amber-text); width: 34px; height: 34px; font-size: 14px; }
.lb-top-card.rank-2 .lb-top-medal { background: rgba(144,147,159,.18); color: #6d707c; }
.lb-top-card.rank-3 .lb-top-medal { background: rgba(193,110,54,.16); color: #b56a35; }
.lb-top-avatar { display: flex; justify-content: center; margin: 0 auto 10px; }
.lb-top-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-top-cmd { font-family: 'JetBrains Mono', monospace; color: var(--mint); font-size: 21px; font-weight: 800; margin: 8px 0 1px; }
.lb-top-label { font-size: 11px; color: var(--muted); margin-bottom: 8px; }

/* Table */
.lb-table-wrap { overflow-x: auto; }
.lb-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lb-table th {
  text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; padding: 4px 12px 12px; font-weight: 700; white-space: nowrap;
}
.lb-table td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.lb-table tbody tr { transition: background .15s ease; }
.lb-table tbody tr:hover { background: var(--surface-2); }
.lb-table tbody tr.lb-row-me { background: var(--mint-dim); }
.lb-table tbody tr.lb-row-me:hover { background: var(--mint-dim); }
.lb-rank-cell { font-family: 'JetBrains Mono', monospace; font-weight: 800; width: 40px; }
.lb-rank-cell.top1 { color: var(--amber-text); }
.lb-rank-cell.top2 { color: #6d707c; }
.lb-rank-cell.top3 { color: #b56a35; }
.lb-user-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.lb-user-name { font-weight: 700; }
.lb-you-tag {
  font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; margin-left: 6px;
  background: rgba(90,75,224,.16); color: var(--mint); font-family: 'JetBrains Mono', monospace; text-transform: uppercase;
}
.lb-cmd-cell { font-family: 'JetBrains Mono', monospace; font-weight: 700; }

/* Skeleton loading */
.lb-skel-bar {
  height: 13px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite;
}
.lb-skel-bar.w-70 { width: 70%; }
.lb-skel-bar.w-40 { width: 40%; }
.lb-skel-circle {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite;
}
.lb-skel-top { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 14px; text-align: center; }

@media (max-width: 720px) {
  .lb-top3 { grid-template-columns: 1fr; align-items: stretch; }
  .lb-top-card.rank-1, .lb-top-card.rank-2, .lb-top-card.rank-3 { order: 0; margin-top: 0; padding-top: 20px; }
}

@media (max-width: 640px) {
  .lb-table thead { display: none; }
  .lb-table, .lb-table tbody, .lb-table tr, .lb-table td { display: block; width: 100%; }
  .lb-table tbody tr {
    border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 4px 12px;
  }
  .lb-table td {
    border-top: none; padding: 7px 0; display: flex; align-items: center;
    justify-content: space-between; gap: 10px;
  }
  .lb-table td::before {
    content: attr(data-label); font-size: 11px; color: var(--muted); font-weight: 700;
    text-transform: uppercase; letter-spacing: .03em; flex-shrink: 0;
  }
  .lb-table td.lb-user-td { justify-content: flex-start; }
  .lb-table td.lb-user-td::before { display: none; }
}

/* ---- Kelola bot (panel developer) — header, ringkasan slot, kartu bot ---- */
.kb-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.kb-header-left { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.kb-header-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(150deg, #8f83f6 0%, var(--mint) 62%, #4a3dd0 100%);
  box-shadow: 0 6px 16px rgba(90,75,224,.30), inset 0 1px 0 rgba(255,255,255,.18);
}
.kb-header-text h2 { margin: 0 0 4px; font-size: 18px; }
.kb-header-text p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.kb-add-btn { flex-shrink: 0; white-space: nowrap; }
.kb-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.btn-outline-danger.kb-delete-all-btn { background: #fff; }

.kb-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px;
}
@media (max-width: 720px) { .kb-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.kb-stat-card {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.kb-stat-value { font-size: 21px; font-weight: 800; line-height: 1.15; }
.kb-stat-label { font-size: 13.5px; font-weight: 600; color: var(--text); margin-top: 1px; }
.kb-stat-desc { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.kb-stat-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}
.kb-stat-icon svg { width: 18px; height: 18px; }

.kb-bot-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(20,20,45,.03);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.kb-bot-card:hover { border-color: var(--mint); box-shadow: 0 4px 14px rgba(90,75,224,.10); transform: translateY(-1px); }
.kb-bot-avatar {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; font-family: 'Manrope', sans-serif;
}
.kb-bot-info { flex: 1 1 260px; min-width: 0; }
.kb-bot-name { font-weight: 800; font-size: 15px; overflow-wrap: break-word; }
.kb-bot-name .owner { color: var(--muted); font-weight: 500; }
.kb-bot-meta { color: var(--muted); font-size: 12.5px; font-family: 'JetBrains Mono', monospace; margin-top: 3px; overflow-wrap: break-word; }
.kb-bot-created { color: var(--muted); font-size: 12px; margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.kb-bot-created svg { width: 12px; height: 12px; opacity: .8; }
.kb-bot-status { margin-top: 8px; }
.kb-bot-actions { flex-shrink: 0; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.kb-bot-actions .btn { padding: 8px 16px; font-size: 13px; }
.btn-outline-mint { background: transparent; color: var(--mint); border: 1px solid var(--mint); }
.btn-outline-mint:hover { background: var(--mint-dim); }

.kb-info-callout { margin-top: 6px; }

.kb-search-wrap {
  position: relative; display: flex; align-items: center;
  margin-bottom: 14px;
}
.kb-search-ic {
  position: absolute; left: 14px; color: var(--muted); display: flex; pointer-events: none;
}
.kb-search-input {
  width: 100%; padding: 11px 40px 11px 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-family: 'Manrope', sans-serif; font-size: 13.5px; outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.kb-search-input:focus { border-color: var(--mint); background: var(--surface); }
.kb-search-input::placeholder { color: var(--muted); }
.kb-search-clear {
  position: absolute; right: 10px; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: var(--line); color: var(--muted); font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.kb-search-clear:hover { background: var(--mint); color: #fff; }
.kb-search-info { font-size: 12.5px; color: var(--muted); margin: -4px 0 14px 2px; }

/* ---- Kelola bot: HP kecil (tanpa mode desktop) — cegah label kepotong & kegedean ---- */
@media (max-width: 480px) {
  .dash-body { padding: 18px 14px; }
  .card { padding: 16px; }

  .kb-header { gap: 12px; margin-bottom: 16px; }
  .kb-header-icon { width: 42px; height: 42px; border-radius: 12px; }
  .kb-header-icon svg { width: 20px; height: 20px; }
  .kb-header-text h2 { font-size: 16.5px; }
  .kb-header-text p { font-size: 12px; line-height: 1.45; }
  .kb-header-actions { width: 100%; flex-direction: column; }
  .kb-add-btn { width: 100%; justify-content: center; }
  .kb-delete-all-btn { width: 100%; justify-content: center; }

  .kb-stats-grid { gap: 8px; margin-bottom: 16px; }
  .kb-stat-card {
    flex-direction: column; align-items: flex-start; padding: 12px; gap: 6px;
  }
  .kb-stat-card > div:first-child { order: 2; width: 100%; }
  .kb-stat-icon { order: 1; width: 28px; height: 28px; border-radius: 8px; }
  .kb-stat-icon svg { width: 15px; height: 15px; }
  .kb-stat-value { font-size: 17px; }
  .kb-stat-label { font-size: 12px; white-space: nowrap; }
  .kb-stat-desc { font-size: 10.5px; margin-top: 3px; }

  .kb-bot-card { flex-direction: row; flex-wrap: wrap; align-items: flex-start; padding: 14px; gap: 10px 12px; }
  .kb-bot-avatar { width: 38px; height: 38px; font-size: 14px; flex: none; }
  .kb-bot-info { flex: 1 1 180px; min-width: 0; }
  .kb-bot-name { font-size: 14px; }
  .kb-bot-actions { flex: 1 0 100%; width: 100%; margin-left: 0; }
  .kb-bot-actions .btn { flex: 1; justify-content: center; padding: 9px 10px; }
}
