/* ═══════════════════════════════════════════════════════════
   SVAZER BOT GATEWAY — SAAS DASHBOARD v7
   Dark neutral + lime SaaS design tokens.
   Vanilla CSS — no build step, no framework.
   ═══════════════════════════════════════════════════════════ */

 :root {
  --bg: #0A0A0A; --surface: #141416; --surface-2: #1C1C1E;
  --ink: #FFFFFF; --ink-2: #9E9E9E; --ink-3: #7C7C7C;
  --line: #232326; --line-strong: #2E2E33;
  --forest: #84E82A; --forest-deep: #0A0A0A; --green: #84E82A; --mint: #A6FF4D; --lime: #84E82A;
  --cream: #1C1C1E; --danger: #F87171; --warn: #FBBF24;
  --accent: var(--forest); --accent-hover: #72D11D; --accent-soft: rgba(132,232,42,.12);
  --text: var(--ink); --text2: var(--ink-2); --text3: var(--ink-3); --card: var(--surface);
  --border: var(--line); --border2: var(--line-strong);
  --bg-page: var(--bg); --bg2: var(--surface-2); --surface2: var(--surface-2); --card-solid: var(--surface); --card2: var(--surface-2);
  --border-strong: var(--line-strong); --border-glow: rgba(132,232,42,.2); --border-faint: var(--line); --border-subtle: var(--line);
  --text-primary: var(--ink); --text-muted: var(--ink-2); --text-dim: var(--ink-3); --text-dimmer: var(--ink-3);
  --success: var(--forest); --info: var(--forest); --wa: var(--forest); --amber: var(--warn); --red: var(--danger); --cyan: var(--forest); --violet: var(--forest); --magenta: var(--forest);
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px; --r: var(--radius); --rl: var(--radius-lg);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --font: 'Geist', system-ui, sans-serif; --mono: 'Geist Mono', 'JetBrains Mono', monospace;
  --accent-rgb: 132,232,42; --succ-bg: rgba(132,232,42,.12); --warn-bg: rgba(251,191,36,.08); --danger-bg: rgba(248,113,113,.08);
  --grad-main: linear-gradient(120deg, #84E82A, #0A0A0A); --grad-btn: var(--forest); --grad-soft: rgba(132,232,42,.08);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.08); --shadow-md: 0 10px 30px rgba(0,0,0,.1); --shadow-lg: 0 24px 60px rgba(0,0,0,.14); --glow-accent: 0 0 24px rgba(132,232,42,.18);
}
/* QR pairing: hanya tampil saat bot punya QR aktif. */
.pairing-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }
.pairing-qr-img { width: 168px; height: 168px; border-radius: 10px; background: #fff; padding: 6px; image-rendering: pixelated; }
.pairing-qr-hint { font-size: 11.5px; color: var(--text3); text-align: center; }
/* Tema terang: override token :root saja, dipilih lewat tombol di topbar (UI.initTheme). */
html[data-theme="light"] {
  --bg: #F4F5F2; --surface: #FFFFFF; --surface-2: #EFF1EC;
  --ink: #14160F; --ink-2: #545B4D; --ink-3: #767D70;
  --line: #E1E4DB; --line-strong: #C9CEC0;
  --forest: #4E9E12; --accent-hover: #3F820C; --accent-soft: rgba(78,158,18,.12);
  --mint: #2F6E06; --lime: #4E9E12;
  --cream: #EFF1EC; --danger: #C93A3A; --warn: #A66A00;
  --border-glow: rgba(78,158,18,.35); --accent-rgb: 78,158,18;
  --succ-bg: rgba(78,158,18,.12); --warn-bg: rgba(166,106,0,.1); --danger-bg: rgba(201,58,58,.1);
  --grad-soft: rgba(78,158,18,.08); --glow-accent: 0 0 24px rgba(78,158,18,.15);
  --shadow-sm: 0 1px 2px rgba(20,22,15,.06); --shadow-md: 0 10px 30px rgba(20,22,15,.08); --shadow-lg: 0 24px 60px rgba(20,22,15,.12);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.profile-link { color: var(--text2); text-decoration: none; }
.sidebar-link-danger { color: var(--danger) !important; margin-top: auto; }
.app-content > #profileContent { width: 100%; max-width: 1200px; margin: 0 auto; }
.profile-lead { color: var(--text3); margin: 5px 0 24px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.profile-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rl); padding: 22px; box-shadow: var(--shadow-sm); }
.profile-card h2 { display: flex; align-items: center; gap: 9px; font-size: 17px; margin-bottom: 16px; }
.profile-card h2 i { flex: none; width: 18px; text-align: center; font-size: 14px; color: var(--forest); }
.account-rows { display: grid; }
.account-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding: 10px 0; }
.account-row:first-child { padding-top: 0; }
.account-row:last-child { border-bottom: 0; padding-bottom: 0; }
.account-row dt { color: var(--text3); font-size: 13px; }
.account-row dd { text-align: right; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.profile-card form { display: grid; gap: 12px; }
.profile-card label { display: grid; gap: 6px; color: var(--ink-2); }
.profile-card input { width: 100%; min-width: 0; background: var(--cream); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--ink); padding: 11px; font: inherit; min-height: 44px; }
.form-status { margin-top: 10px; color: var(--text2); }
.form-status.error { color: var(--red); }
.form-status.success { color: var(--green); }
.profile-bot-list { list-style: none; display: grid; gap: 10px; margin-bottom: 16px; }
.profile-bot { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.profile-bot-identity { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-family: var(--mono); }
.profile-bot .status-pill { flex: none; }
/* Aksi massal bot: checkbox seleksi + toolbar melayang. */
.bot-select {
  width: 20px; height: 20px; flex: none; margin: 0; align-self: center;
  accent-color: var(--forest); cursor: pointer; border-radius: 6px;
}
/* Checkbox di dalam form: kotak + label sejajar, bukan kolom label di atas. */
.field-check {
  display: flex; align-items: center; gap: 10px;
  font: 13px var(--font); color: var(--text); cursor: pointer;
  min-height: 44px; padding: 0 2px;
}
.field-check input { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; accent-color: var(--forest); cursor: pointer; }
.bulk-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 12px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--border-glow); background: var(--accent-soft);
}
.bulk-count { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-actions .btn-secondary { min-height: 40px; padding: 0 14px; }
@media (max-width: 600px) {
  .bulk-toolbar { flex-direction: column; align-items: stretch; }
  .bulk-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
/* Heatmap uptime bot: 30 kotak harian dengan intensitas = persentase uptime. */
.bot-heatmap { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 10px; }
.heatmap-cell {
  width: 11px; height: 11px; border-radius: 3px;
  background-color: rgba(132, 232, 42, calc(var(--heat, 0) * 0.85));
  box-shadow: inset 0 0 0 1px var(--line);
}
.heatmap-empty { font-size: 11.5px; color: var(--text3); }
/* Notifikasi in-app: lonceng di topbar + panel daftar outbox gateway. */
.notify-wrap { position: relative; display: flex; }
.notify-badge {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--red, #F87171); color: #fff; font: 700 10px/1 var(--mono);
}
.notify-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 900;
  width: min(340px, calc(100vw - 24px)); max-height: min(70vh, 420px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 8px;
}
.notify-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; font-size: 13px; }
.notify-close { border: 0; background: transparent; color: var(--text3); font-size: 18px; line-height: 1; cursor: pointer; min-width: 32px; min-height: 32px; border-radius: 8px; }
.notify-close:hover { color: var(--text); background: var(--surface-2); }
.notify-list { list-style: none; display: grid; gap: 2px; margin: 0; padding: 0; }
.notify-item { display: flex; gap: 9px; padding: 9px 8px; border-radius: 10px; align-items: flex-start; }
.notify-item.unread { background: var(--accent-soft); }
.notify-item > i { margin-top: 2px; color: var(--text2); flex-shrink: 0; }
.notify-body { min-width: 0; }
.notify-text { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.notify-time { color: var(--text3); font-size: 11px; }
.notify-empty { padding: 14px 8px; color: var(--text2); font-size: 12.5px; text-align: center; }
@media (max-width: 600px) {
  .notify-panel { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; }
}
/* Sesi login: baris info + tombol cabut */
.session-list { margin-bottom: 12px; }
.session-row { align-items: center; }
.session-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.session-info strong { font-size: 13px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.session-info small { font-size: 11.5px; color: var(--text2); }
.session-row .btn-sm { flex: none; min-height: 36px; padding: 0 12px; }
@media (max-width: 480px) {
  .session-row { flex-wrap: wrap; }
  .session-row .btn-sm { width: 100%; }
}
.status-pill { color: var(--forest); background: rgba(132,232,42,.12); border: 1px solid rgba(132,232,42,.3); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.profile-link { color: var(--accent); }
.profile-card .btn-primary { display: inline-flex; width: fit-content; min-height: 44px; align-items: center; padding: 10px 16px; text-decoration: none; border: 0; cursor: pointer; }
.profile-grid { min-width: 0; }
.profile-card { min-width: 0; overflow-wrap: anywhere; transition: border-color .18s ease, box-shadow .18s ease; }
.profile-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }

/* ── Profil: ringkasan akun di atas grid ── */
.profile-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-bottom: 16px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--rl);
  box-shadow: var(--shadow-sm);
}
.profile-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 140% at 100% 0%, rgba(132,232,42,.10), transparent 60%);
}
.profile-hero-avatar {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: var(--forest-deep);
  background: linear-gradient(135deg, var(--mint), var(--forest));
  box-shadow: 0 0 0 1px rgba(132,232,42,.5), 0 6px 18px rgba(132,232,42,.18);
}
.profile-hero-main { flex: 1 1 220px; min-width: 0; }
.profile-hero-main h2 { font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.profile-hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; color: var(--ink-2); font-size: 13px; }
.profile-hero-dot { color: var(--ink-3); }
.profile-hero-stat {
  flex: none; text-align: center; padding: 8px 18px;
  border-radius: var(--r); background: var(--accent-soft);
  border: 1px solid rgba(132,232,42,.24);
}
.profile-hero-stat strong { display: block; font-size: 22px; line-height: 1.1; color: var(--forest); }
.profile-hero-stat span { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.profile-hint-details { margin-top: 10px; }
.profile-hint-details summary {
  display: inline-flex; align-items: center; gap: 7px;
  list-style: none; cursor: pointer; font-size: 12.5px; color: var(--ink-2);
  border-radius: 4px;
}
.profile-hint-details summary::-webkit-details-marker { display: none; }
.profile-hint-details summary::before {
  content: '\f054'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 9px;
  transition: transform .2s ease;
}
.profile-hint-details[open] summary::before { transform: rotate(90deg); }
.profile-hint-details summary:hover { color: var(--ink); }
.profile-hint-details summary:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.profile-hint-details p { margin-top: 8px; }
@media (max-width: 620px) {
  .profile-hero { align-items: flex-start; }
  /* stat turun ke baris sendiri di layar sempit; rapatkan ke kanan biar tidak menggantung di kiri */
  .profile-hero-stat { margin-left: auto; }
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ═══════════════════════════════════════════
   SCROLL REVEAL (progressive enhancement: hanya aktif bila html.reveal-ready)
   ═══════════════════════════════════════════ */
/* Reveal aktif hanya setelah UI.initReveal menandai html.reveal-ready dan
   memasang observer, jadi tanpa JS/observer isi tetap terlihat. */
html.reveal-ready [data-reveal],
html.reveal-ready [data-stagger] > *,
html.reveal-ready .bot-card,
html.reveal-ready .plugin-card,
html.reveal-ready .stat-card,
html.reveal-ready .settings-section,
html.reveal-ready .flow-card,
html.reveal-ready .activity-panel,
html.reveal-ready .analytics-chart-panel,
html.reveal-ready .analytics-kpi-grid > *,
html.reveal-ready .analytics-detail-grid > *,
html.reveal-ready .preset-section,
html.reveal-ready .plugin-toolbar,
html.reveal-ready .profile-card {
  opacity: 0; translate: 0 22px;
  transition: opacity .55s cubic-bezier(.16,1,.3,1), translate .55s cubic-bezier(.16,1,.3,1);
}
html.reveal-ready [data-reveal="fade-up"] { translate: 0 26px; }
html.reveal-ready [data-reveal="fade-left"] { translate: -28px 0; }
html.reveal-ready [data-reveal="fade-right"] { translate: 28px 0; }
html.reveal-ready [data-reveal].revealed,
html.reveal-ready [data-stagger].revealed > *,
html.reveal-ready .revealed { opacity: 1; translate: 0 0; }
html.reveal-ready [data-stagger].revealed > *:nth-child(1) { transition-delay: .05s; }
html.reveal-ready [data-stagger].revealed > *:nth-child(2) { transition-delay: .12s; }
html.reveal-ready [data-stagger].revealed > *:nth-child(3) { transition-delay: .19s; }
html.reveal-ready [data-stagger].revealed > *:nth-child(4) { transition-delay: .26s; }
html.reveal-ready [data-stagger].revealed > *:nth-child(5) { transition-delay: .33s; }
html.reveal-ready [data-stagger].revealed > *:nth-child(6) { transition-delay: .4s; }
html.reveal-ready [data-stagger].revealed > *:nth-child(7) { transition-delay: .47s; }

/* ═══════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════ */
.toast-container {
  position: fixed; top: 14px; right: 14px; z-index: 1200;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; width: min(360px, calc(100vw - 28px));
}
.toast-container > * { pointer-events: auto; }
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 12px 11px 14px; border-radius: var(--r);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-left: 3px solid var(--text3);
  box-shadow: var(--shadow-lg);
  font-size: 12.5px; font-weight: 600; line-height: 1.45;
  animation: toastIn .3s cubic-bezier(.16,1,.3,1);
}
.toast.leaving { animation: toastOut .22s ease forwards; }
.toast > i:first-child { margin-top: 1px; font-size: 15px; flex-shrink: 0; }
.toast-message { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-message .toast-icon { margin-right: 6px; font-size: 14px; }
.toast-close {
  flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; margin: -4px -4px -4px 2px;
  padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text3);
  font-size: 12px; cursor: pointer;
}
.toast-close:hover { color: var(--text); background: var(--surface-2); }
.toast.success { border-left-color: var(--green); }
.toast.success > i:first-child { color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.error > i:first-child { color: var(--red); }
.toast.info { border-left-color: var(--cyan); }
.toast.info > i:first-child { color: var(--cyan); }
.toast.warn { border-left-color: var(--amber); }
.toast.warn > i:first-child { color: var(--amber); }
@keyframes toastIn { from { opacity: 0; transform: translateX(50px) scale(.96); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(.96); } }
/* Mobile: toast masuk dari bawah sebagai sheet penuh lebar, tidak menutupi topbar. */
@media (max-width: 600px) {
  .toast-container {
    top: auto; bottom: 0; right: 0; left: 0; width: 100%;
    /* Di atas tab bar bawah, bukan menumpuk di atasnya. */
    padding: 0 max(12px, env(safe-area-inset-right)) calc(72px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    flex-direction: column-reverse;
  }
  .toast { border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
  .toast, .toast.leaving { animation-name: toastUpIn; }
  .toast.leaving { animation-name: toastUpOut; }
}
@keyframes toastUpIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastUpOut { to { opacity: 0; transform: translateY(16px) scale(.98); } }

/* ═══════════════════════════════════════════
   NOTIFICATION PANEL
   ═══════════════════════════════════════════ */
.notif-panel {
  position: fixed; top: 14px; right: 14px; z-index: 1190;
  display: flex; flex-direction: column; gap: 8px;
  max-width: calc(100vw - 28px);
  pointer-events: none;
}
.notif-panel > * { pointer-events: auto; }
.notif-item {
  position: relative;
  display: flex; align-items: flex-start;
  padding: 11px 14px; border-radius: var(--r);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-left: 3px solid var(--text3);
  box-shadow: var(--shadow-md);
  font-size: 12px; min-width: 230px;
  animation: notifUp .3s cubic-bezier(.16,1,.3,1);
}
.notif-item.success { border-left-color: var(--green); }
.notif-item.error { border-left-color: var(--red); }
.notif-item.info { border-left-color: var(--cyan); }
.notif-item.warning { border-left-color: var(--amber); }
.notif-item .nf-i { font-size: 13px; width: 22px; text-align: center; margin-right: 8px; flex-shrink: 0; }
.notif-item.success .nf-i { color: var(--green); }
.notif-item.error .nf-i { color: var(--red); }
.notif-item.info .nf-i { color: var(--cyan); }
.notif-item.warning .nf-i { color: var(--amber); }
.notif-item .nf-t { font-weight: 700; font-size: 12px; margin-bottom: 1px; }
.notif-item .nf-d { font-size: 11px; color: var(--text2); }
.notif-item .nf-time { font-size: 10px; color: var(--text3); margin-top: 2px; }
.notif-item .nf-x { position: absolute; top: 5px; right: 8px; cursor: pointer; color: var(--text3); font-size: 16px; line-height: 1; }
@keyframes notifUp { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ═══════════════════════════════════════════
   BURGER + SIDEBAR
   ═══════════════════════════════════════════ */
.burger {
  display: flex; flex-direction: column; gap: 4px;
  width: 32px; height: 32px; padding: 8px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer;
  align-items: center; justify-content: center;
}
.burger span { display: block; width: 14px; height: 2px; background: var(--text3); border-radius: 2px; transition: all .25s; }
.burger:hover span { background: var(--text); }
.burger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); background: var(--accent); }
.burger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background: var(--accent); }

.sidebar-overlay {
  position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
}
.sidebar-overlay.hidden { display: none; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 160;
  width: 280px; max-width: 82vw;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.sidebar.hidden { transform: translateX(-100%); display: flex; }
.sidebar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
}
.sidebar-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.sidebar-logo {
  width: 36px; height: 36px; border-radius: 9px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-logo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-title { font-size: 14px; font-weight: 800; flex: 1; letter-spacing: -.2px; }
.sidebar-close {
  width: 28px; height: 28px; border: none; background: transparent;
  color: var(--text3); font-size: 22px; cursor: pointer; line-height: 1;
  transition: color .2s;
}
.sidebar-close:hover { color: var(--text); transform: scale(1.1); }
.sidebar-body { flex: 1; overflow-y: auto; padding: 10px 0; }
.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 12px 20px; border-top: 1px solid var(--border); color: var(--text3); font: 600 11px var(--mono); }
.sidebar-version { color: var(--forest); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  margin: 0 10px 8px; padding: 10px;
  border-radius: 10px;
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.sidebar-user:hover, .sidebar-user:focus-visible { background: var(--accent-soft); }
.sidebar-user[aria-current="page"] { background: var(--cream); color: var(--forest); }
.sidebar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--accent); overflow: hidden;
}
.sidebar-avatar i { font-size: 15px; color: var(--accent); }
.sidebar-name { font-size: 13px; font-weight: 700; }
.sidebar-status { font-size: 11px; color: var(--text3); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px; }
.sidebar-section-label {
  display: block;
  padding: 16px 12px 6px;
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text3);
  user-select: none;
  pointer-events: none;
}
.sidebar-section-label:first-child,
.sidebar-nav > .sidebar-section-label:first-of-type {
  padding-top: 8px;
}
.sidebar-section-label.hidden,
.sidebar-section-label[hidden],
.sidebar-section-label:has(+ #adminLink.hidden),
.sidebar-section-label:has(+ #adminLink[hidden]) {
  display: none !important;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  background: transparent; border: 0;
  color: var(--text2); text-decoration: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s; position: relative;
}
.sidebar-link::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 2px; height: 0;
  background: var(--accent); border-radius: 2px; transform: translateY(-50%);
  transition: height .2s;
}
.sidebar-link:hover { background: var(--accent-soft); color: var(--text); }
.sidebar-link:hover::before { height: 60%; }
.sidebar-link i { width: 16px; text-align: center; font-size: 13px; color: var(--text3); transition: color .2s; }
.sidebar-link:hover i { color: var(--accent); }

/* Shell panel bersama dashboard, profil, dan admin. */
.app-shell { min-height: 100dvh; background: var(--bg); color: var(--ink); }
.app-sidebar { width: 260px; max-width: 82vw; background: var(--surface); border-right: 1px solid var(--line); }
.app-main { min-width: 0; min-height: 100dvh; margin-left: 260px; }
.app-topbar { position: sticky; top: 0; z-index: 100; height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: rgba(10,10,10,.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
html[data-theme="light"] .app-topbar { background: rgba(255,255,255,.92); }
/* Label kartu statistik boleh turun baris alih-alih terpotong dengan elipsis. */
.stat-card-label, .kpi-label { white-space: normal; overflow-wrap: anywhere; }

.topbar-title { font-size: 16px; font-weight: 700; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.app-content.main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 32px 60px; }
.sidebar-close { min-width: 44px; min-height: 44px; }
.burger, .nav-btn { width: 44px; height: 44px; }
.sidebar-link { min-height: 44px; }
.sidebar-nav { min-height: calc(100% - 80px); }
.sidebar-nav > .sidebar-link:last-child { margin-top: auto !important; }
.sidebar-overlay { display: none; }
@media (min-width: 1024px) {
  .app-sidebar { transform: none !important; box-shadow: none; }
  .app-sidebar .sidebar-close { display: none; }
  .app-topbar > .burger { display: none; }
  .sidebar-overlay { display: none !important; }
}
@media (max-width: 1023px) {
  .app-main { margin-left: 0; }
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.open, .app-sidebar.open.hidden { transform: translateX(0); }
  .app-sidebar.open { transform: translateX(0); }
  .sidebar-overlay:not(.hidden) { display: block; }
  .app-content.main { padding: 22px 18px 48px; }
  .app-topbar { padding: 0 14px; }
}

/* ── Shell mobile: tampilan aplikasi Android, bukan situs desktop yang menyusut ──
   Tab bar bawah jadi navigasi utama; konten diberi ruang setinggi tab + safe-area. */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  background: rgba(14,14,15,.97); border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
html[data-theme="light"] .tabbar { background: rgba(255,255,255,.97); }
.tabbar-link {
  flex: 1 1 0; min-width: 0; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text3); text-decoration: none; border-radius: 12px;
  font: 600 10.5px/1.1 var(--font, system-ui); letter-spacing: .01em;
}
.tabbar-link i { font-size: 18px; line-height: 1; }
.tabbar-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tabbar-link[aria-current="page"] { color: var(--forest); }
.tabbar-link[aria-current="page"] i { transform: translateY(-1px); }
.tabbar-link:active { background: var(--accent-soft); }

@media (max-width: 1023px) {
  .tabbar { display: flex; align-items: stretch; }
  /* Sidebar hanya berisi item sekunder; navigasi utama sudah di tab bar. */
  .app-content.main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (min-width: 1024px) {
  .tabbar { display: none !important; }
}

@media (max-width: 640px) {
  /* Topbar tipis: judul + aksi, tanpa deretan ikon kecil yang berdesakan. */
  .app-topbar { height: 56px; gap: 10px; padding: 0 12px; }
  .topbar-title { font-size: 15px; }
  .topbar-actions { gap: 6px; }
  .app-content.main { padding: 16px 12px calc(92px + env(safe-area-inset-bottom)); }
  /* Tabel admin jadi daftar kartu: tidak ada lagi geser ke samping. */
  .admin-table-wrap[data-cards] { overflow: visible; }
  .admin-table-wrap[data-cards] .admin-table,
  .admin-table-wrap[data-cards] .admin-table tbody,
  .admin-table-wrap[data-cards] .admin-table tr,
  .admin-table-wrap[data-cards] .admin-table td { display: block; width: auto; min-width: 0; }
  .admin-table-wrap[data-cards] .admin-table { border-collapse: separate; border-spacing: 0; background: transparent; }
  .admin-table-wrap[data-cards] .admin-table thead { display: none; }
  .admin-table-wrap[data-cards] .admin-table tr {
    margin-bottom: 10px; padding: 4px 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  }
  .admin-table-wrap[data-cards] .admin-table td {
    display: grid; grid-template-columns: minmax(84px, 34%) 1fr; gap: 10px; align-items: center;
    padding: 9px 0; border: 0; border-bottom: 1px solid var(--line);
    white-space: normal; overflow-wrap: anywhere; text-align: right;
  }
  .admin-table-wrap[data-cards] .admin-table td::before {
    content: attr(data-label); text-align: left;
    font: 600 10.5px var(--font-mono, var(--mono)); letter-spacing: .08em; text-transform: uppercase;
    color: var(--text3);
  }
  .admin-table-wrap[data-cards] .admin-table tr > td:last-child { border-bottom: 0; }
  .admin-table-wrap[data-cards] .admin-table td.admin-actions { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .admin-table-wrap[data-cards] .admin-table td.admin-actions::before { margin-bottom: 4px; }
  .admin-table-wrap[data-cards] .admin-table td.admin-actions .ibtn { width: 100%; min-height: 44px; justify-content: center; }
  .admin-table-wrap[data-cards] .admin-actions-inner { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; min-width: 0; }
  .admin-table-wrap[data-cards] .admin-table td.admin-actions .ibtn { white-space: normal; flex-shrink: 1; min-width: 0; }
  .admin-table-wrap[data-cards] .admin-table td:empty { display: none; }
}

.stat-card { border-radius: 16px; }
.srv-info { color: var(--ink-2); }
.srv-url { color: var(--ink-2); }
@media (max-width: 380px) {
  .app-content.main { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 520px) {
  .topbar-title { font-size: 14px; }
  .app-topbar { gap: 10px; }
  .topbar-actions { gap: 6px; }
}

/* ═══════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5,5,5,.72);
  backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--border-faint);
  transition: box-shadow .25s, background .25s;
}
.nav.scrolled {
  background: rgba(5,5,5,.85);
  border-bottom-color: var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.nav-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 54px;
}
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-logo {
  width: 30px; height: 30px; border-radius: 8px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.nav-logo:hover { transform: scale(1.06); }
.nav-logo img { width: 100%; height: 100%; object-fit: cover; }
.nav-title { font-size: 14px; font-weight: 800; letter-spacing: -.2px; }
.nav-title span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 7px; }

.status {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 30px;
  font-size: 11px; font-weight: 600; color: var(--text3);
  border: 1px solid var(--border);
  font-family: var(--mono);
  transition: all .25s;
}
.status.online {
  color: var(--green);
  border-color: rgba(52,211,153,.25);
  background: var(--succ-bg);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); flex-shrink: 0; transition: all .25s; }
.status-dot.active {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52,211,153,.4);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,.35); }
  50% { box-shadow: 0 0 0 4px rgba(52,211,153,0); }
}

.nav-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text3); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  transition: all .15s;
}
.nav-btn:hover { background: var(--accent-soft); border-color: var(--border-glow); color: var(--accent); transform: scale(1.05); }
.nav-btn:active { transform: scale(.93); }
.nav-btn.spin { animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════
   MAIN + HERO
   ═══════════════════════════════════════════ */
.main { max-width: 900px; margin: 0 auto; padding: 48px 20px 60px; }

.header { margin-bottom: 36px; position: relative; padding: 12px 0 4px; }
.header-title {
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 800; letter-spacing: -.04em; line-height: .98;
  margin-bottom: 18px; color: var(--text-primary);
}
.header-title .hl { color: var(--accent); }
.header-desc {
  font-size: 15px; color: var(--text3); max-width: 460px; line-height: 1.7;
  border-left: 2px solid var(--text3);
  padding-left: 14px; font-weight: 300;
}
.header-cta { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 30px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 11px; color: var(--text3); font-weight: 500;
  font-family: var(--mono);
  transition: all .2s;
}
.tag i { font-size: 10px; color: var(--accent); }
.tag:nth-child(2) i { color: var(--violet); }
.tag:nth-child(3) i { color: var(--green); }
.tag:nth-child(4) i { color: var(--magenta); }
.tag:hover { border-color: var(--border2); color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ═══════════════════════════════════════════
   BUTTONS (terminal style)
   ═══════════════════════════════════════════ */
.btn-docs {
  position: relative; overflow: hidden;
  padding: 12px 22px;
  color: var(--text-primary);
  border: 1px solid var(--border2);
  background: var(--accent);
  font-family: var(--mono);
  font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .3s ease;
}
.btn-docs::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: translateX(-100%);
  transition: transform .5s ease;
}
.btn-docs:hover::before { transform: translateX(100%); }
.btn-docs:hover {
  border-color: rgba(132,232,42,.45);
  color: var(--forest-deep) !important;
  background: var(--accent);
}
.btn-docs:active { transform: scale(.98); }
.btn-docs .btn-arrow { color: #000; font-weight: 700; }
.btn-outline {
  position: relative; overflow: hidden;
  padding: 12px 22px;
  color: var(--text-primary);
  border: 1px solid var(--border);
  background: transparent;
  font-family: var(--mono);
  font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .25s ease;
}
.btn-outline:hover { border-color: var(--border2); color: var(--text); }
.btn-outline:active { transform: scale(.98); }
.btn-outline .btn-arrow { color: var(--accent); font-weight: 700; }

/* ═══════════════════════════════════════════
   DASHBOARD ENTRANCE (sekali muat, keyframe self-terminating)
   ═══════════════════════════════════════════ */
@keyframes dashIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.dashboard-intro, .dashboard-hero, .dashboard-grid, .analytics-hub {
  animation: dashIn .45s cubic-bezier(.22,1,.36,1) backwards;
}
.dashboard-intro { animation-delay: .02s; }
.dashboard-hero { animation-delay: .08s; }
.dashboard-grid { animation-delay: .14s; }
.analytics-hub { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  /* reset animation-name agar tidak ada delay tersembunyi (rule global hanya memangkas duration) */
  .dashboard-intro, .dashboard-hero, .dashboard-grid, .analytics-hub { animation: none; }
}

/* ═══════════════════════════════════════════
   STATS ROW & CARDS
   ═══════════════════════════════════════════ */
.stats-row, .dash-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3, 12px);
  margin-bottom: var(--space-5, 20px);
}
.stat-card, .dash-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  padding: 14px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  min-width: 0;
}
.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r, 8px);
  background: var(--cream);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.stat-icon.stat-icon-success {
  background: rgba(46, 125, 83, 0.12);
  color: var(--green);
  border-color: rgba(46, 125, 83, 0.25);
}
.stat-icon.stat-icon-warning {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.25);
}
.stat-icon.stat-icon-accent {
  background: rgba(14, 23, 19, 0.08);
  color: var(--ink);
  border-color: var(--line);
}
.stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.stat-card::before, .dash-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s;
}
.stat-card:hover, .dash-stat:hover {
  border-color: var(--border2, #2A384C);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,.25));
}
.stat-card:hover::before, .dash-stat:hover::before {
  opacity: 1;
}
.stat-label, .dash-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, var(--text3));
  text-transform: uppercase;
  letter-spacing: .08em;
  font-family: var(--font-mono, var(--mono));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value, .dash-stat-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono, var(--mono));
  color: var(--text-primary);
  letter-spacing: -.5px;
  line-height: 1.2;
}
.stat-value[data-status="online"] {
  color: var(--success, var(--green));
}
.stat-value[data-status="offline"] {
  color: var(--danger, var(--red));
}
.stat-value[data-status="pending"] { color: var(--ink-2); }

@media (max-width: 768px) {
  .stats-row, .dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
/* ═══════════════════════════════════════════
   SRV INFO + TIPS + BANNER
   ═══════════════════════════════════════════ */
.srv-info {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 14px;
  font-family: var(--mono);
  margin-bottom: 12px;
}
.srv-info.online { color: var(--green); border-color: rgba(52,211,153,.25); background: var(--succ-bg); }
.srv-info i { font-size: 7px !important; flex-shrink: 0; }
.srv-url { margin-left: auto; font-size: 9px; color: var(--text3); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tips-card {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--warn-bg); border: 1px solid rgba(255,176,58,.18);
  border-radius: var(--r); padding: 11px 14px;
  font-size: 12px; color: #ffd9a0; line-height: 1.5;
  margin-bottom: 12px;
  transition: all .2s;
}
.tips-card:hover { border-color: rgba(255,176,58,.32); transform: translateY(-1px); }
.tips-card i { color: var(--amber); font-size: 15px; flex-shrink: 0; animation: tipBounce 3s ease-in-out infinite; }
@keyframes tipBounce { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

.banner {
  display: flex; align-items: center; gap: 9px;
  background: var(--danger-bg); border: 1px solid rgba(255,92,92,.22);
  border-radius: var(--r); padding: 11px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--red);
  margin-bottom: 14px;
  animation: bannerPulse 2.5s ease-in-out infinite;
}
.banner.hidden { display: none; }
.banner i { font-size: 14px; flex-shrink: 0; }
@keyframes bannerPulse { 0%, 100% { border-color: rgba(255,92,92,.22); } 50% { border-color: rgba(255,92,92,.4); } }
.banner-btn {
  margin-left: auto; border: 1px solid rgba(255,92,92,.4); cursor: pointer;
  background: transparent; color: var(--red);
  font-family: var(--mono);
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 14px;
  transition: all .15s; flex-shrink: 0;
}
.banner-btn:hover { background: var(--red); color: var(--forest-deep); transform: scale(1.03); }
.banner-btn:active { transform: scale(.97); }

.disconnect-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--danger-bg);
  border: 1px solid rgba(180,66,58,.28);
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--danger);
  margin-bottom: 14px;
  box-sizing: border-box;
  max-width: 100%;
}
.disconnect-banner.hidden { display: none !important; }
.disconnect-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 200px;
  min-width: 0;
  word-break: break-word;
}
.disconnect-banner-content i {
  color: var(--danger);
  font-size: 15px;
  flex-shrink: 0;
}
.disconnect-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.disconnect-banner-actions .btn {
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: var(--rs);
  cursor: pointer;
  font-weight: 600;
  transition: all .15s;
}
.disconnect-banner-actions .btn-reconnect {
  background: var(--danger);
  color: var(--forest-deep);
  border: 1px solid var(--danger);
}
.disconnect-banner-actions .btn-reconnect:hover {
  filter: brightness(1.1);
}
.disconnect-banner-actions .btn-repair {
  background: var(--surface);
  color: var(--danger);
  border: 1px solid var(--danger);
}
.disconnect-banner-actions .btn-repair:hover {
  background: var(--danger-bg);
}
.bot-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--danger-bg);
  border: 1px solid rgba(180,66,58,.25);
  border-radius: var(--rs);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--danger);
  margin-top: 10px;
  box-sizing: border-box;
  max-width: 100%;
  word-break: break-word;
}
.bot-warning i {
  flex-shrink: 0;
  color: var(--danger);
}

/* ═══════════════════════════════════════════
   DEPLOY CARD
   ═══════════════════════════════════════════ */
.deploy-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--rl); margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.deploy-card.hidden { display: none; }
.deploy-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.deploy-head { display: flex; align-items: center; gap: 14px; padding: 20px 20px 0; }
.deploy-head h2 { font-size: 20px; line-height: 1.2; margin: 0; min-width: 0; }
.deploy-card-inner { padding: 16px 20px 20px; display: flex; gap: 14px; align-items: flex-start; }
.deploy-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: var(--cream); color: var(--forest);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  transition: transform .2s;
}
.deploy-card:hover .deploy-icon { transform: scale(1.04); }
.deploy-body { flex: 1; min-width: 0; }
.deploy-body .label { margin-bottom: 8px; }
.deploy-body .input-group { margin-bottom: 12px; }

@media (max-width: 520px) {
  .deploy-head { padding: 16px 16px 0; }
  .deploy-card-inner {
    padding: 16px;
    gap: 12px;
  }
}

.label { display: block; font-size: 11px; font-weight: 600; color: var(--text3); margin-bottom: 6px; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.input-group {
  display: flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--cream); overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-prefix {
  padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--ink);
  height: 44px; display: flex; align-items: center;
  border-right: 1px solid var(--line); background: var(--surface);
  font-family: var(--mono);
}
.input-group input {
  flex: 1; height: 44px; padding: 0 12px; border: none; outline: none;
  background: transparent; color: var(--text);
  font-size: 14px; font-family: var(--mono);
}
.input-group input::placeholder { color: var(--text3); font-weight: 400; }
.input-group input::-webkit-outer-spin-button,
.input-group input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hint { font-size: 11px; color: var(--ink-2); line-height: 1.55; margin-top: 8px; }

/* ═══════════════════════════════════════════
   PRIMARY / SECONDARY BUTTONS
   ═══════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 20px;
  border: 1px solid rgba(132,232,42,.5); border-radius: var(--r);
  background: var(--grad-btn); color: var(--forest-deep);
  font-size: 13px; font-weight: 700; font-family: var(--font); cursor: pointer;
  position: relative; overflow: hidden;
  transition: all .2s;
  box-shadow: 0 2px 12px rgba(132,232,42,.25);
}
.btn-primary::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition: left .5s;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(132,232,42,.35); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary:disabled::before { display: none; }
.btn-lg { height: 46px; font-size: 14px; font-weight: 700; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--border2); border-radius: var(--r);
  background: var(--surface); color: var(--text2);
  font-size: 13px; font-weight: 600; font-family: var(--font); cursor: pointer;
  transition: all .15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-secondary:active { transform: translateY(0) scale(.98); }
.btn-secondary:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; justify-content: center; }
.btn-ghost {
  width: 100%; height: 34px; border: none; background: transparent;
  color: var(--text3); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: color .2s; font-family: var(--font);
}
.btn-ghost:hover { color: var(--text2); }

/* ═══════════════════════════════════════════
   SECTION LABEL + BOT LIST
   ═══════════════════════════════════════════ */
.sect-label {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 12px;
  color: var(--text3);
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .2em;
}
.sect-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.bot-list { display: flex; flex-direction: column; gap: 12px; }
.skeleton-row { min-height: 82px; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.skeleton-line { display: block; height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, #263244 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skeletonShimmer 1.4s ease-in-out infinite; }
.skeleton-title { width: 28%; height: 18px; }
.skeleton-status { width: 18%; }
.skeleton-meta { width: 24%; }
@keyframes skeletonShimmer { to { background-position: -200% 0; } }
.bot-phone { overflow-wrap: anywhere; font-family: var(--mono); }
.bot-uptime { color: var(--text-muted); font-size: 12px; }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border: 1px solid var(--border); border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; color: var(--text-muted); background: var(--surface-2); }
.pill-connected { color: var(--success); background: var(--succ-bg); border-color: rgba(34,197,94,.28); }
.pill-starting, .pill-queued { color: var(--info); background: rgba(56,189,248,.1); border-color: rgba(56,189,248,.28); }
.pill-waiting_pairing { color: #c4b5fd; background: rgba(167,139,250,.1); border-color: rgba(167,139,250,.28); }
.pill-pairing_code { color: var(--info); background: rgba(56,189,248,.1); border-color: rgba(56,189,248,.28); }
.pill-reconnecting { color: var(--warn); background: var(--warn-bg); border-color: rgba(245,158,11,.28); }
.pill-stopped { color: var(--text-muted); background: var(--surface-2); }
.pill-failed, .pill-banned_whatsapp, .pill-logged_out, .pill-banned { color: var(--danger); background: var(--danger-bg); border-color: rgba(239,68,68,.28); }
.pairing { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); box-sizing: border-box; width: 100%; }
.pairing.pairing-code { border-color: rgba(132,232,42,.25); background: rgba(132,232,42,.04); }
.pairing.pairing-pending { border-style: dashed; }
.pairing-main { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-width: 0; }
.pairing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pair-code, .pair-coding { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: .14em; color: var(--text); line-height: 1.2; user-select: all; }
.countdown, .pair-countdown { font-family: var(--mono); font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.pairing-empty { font-size: 13px; color: var(--text-muted); }
.pairing button { min-height: 44px; height: auto; padding: 8px 16px; font-size: 13px; font-weight: 600; }
.pairing .btn-primary { box-shadow: 0 2px 10px rgba(132,232,42,.2); }
.pairing.expired .pair-code, .pairing.expired .pair-copy { display: none; }
@media (max-width: 600px) {
  .pairing { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .pairing-main { justify-content: space-between; width: 100%; }
  .pairing-actions { width: 100%; }
  .pairing-actions button { flex: 1; min-width: 0; justify-content: center; }
  .pairing.pairing-pending { flex-direction: column; align-items: stretch; text-align: center; }
  .pairing.pairing-pending .pairing-empty { text-align: center; }
  .pairing.pairing-pending button { width: 100%; justify-content: center; }
}
.bc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rl); overflow: hidden;
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, border-color .3s, box-shadow .3s;
}
.bc.v { opacity: 1; transform: translateY(0); }
.bc.rm { opacity: 0; transform: translateY(-12px); transition: all .25s; }
.bc.s-c { border-color: rgba(52,211,153,.32); box-shadow: 0 0 0 3px rgba(52,211,153,.05); }
.bc.s-c::before { content: ''; display: block; height: 2px; background: var(--green); }
.bc.s-p { border-color: rgba(167,139,250,.32); }
.bc.s-p::before { content: ''; display: block; height: 2px; background: var(--violet); animation: pairGlow 1.5s ease-in-out infinite; }
@keyframes pairGlow { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
.bc.s-s { border-color: var(--border); opacity: .55; }
.bc.s-f { border-color: rgba(255,92,92,.3); }
.bc.s-f::before { content: ''; display: block; height: 2px; background: var(--red); }

.bc:hover { border-color: var(--border2); box-shadow: var(--shadow-md); }
.bc-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 15px; }
.bc-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.bc-av {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: rgba(37,211,102,.1); color: var(--wa);
  border: 1px solid rgba(52,211,153,.22);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  transition: all .25s;
}
.bc.s-c .bc-av { border-color: rgba(52,211,153,.3); color: var(--green); }
.bc.s-p .bc-av { border-color: rgba(167,139,250,.3); color: var(--violet); }
.bc-ph { font-size: 14px; font-weight: 700; font-family: var(--mono); letter-spacing: .02em; }
.bc-st { font-size: 11px; font-weight: 500; color: var(--text3); margin-top: 2px; font-family: var(--mono); transition: color .3s; }
.bc-st.s-c { color: var(--green); }
.bc-st.s-p { color: var(--violet); }
.bc-st.s-st { color: var(--amber); }
.bc-st.s-sp { color: var(--red); }

.bc-acts { display: flex; gap: 6px; }
.bc-acts.hidden { display: none; }
.act-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text3); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  transition: all .15s;
}
.act-btn:hover { background: var(--accent-soft); border-color: var(--border-glow); color: var(--accent); transform: scale(1.07); }
.act-btn:active { transform: scale(.92); }
.act-btn.sp:hover { background: var(--danger-bg); color: var(--red); border-color: rgba(255,92,92,.3); }
.act-btn.rc:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--border-glow); }

/* ═══════════════════════════════════════════
   PAIRING SECTION
   ═══════════════════════════════════════════ */
.pair { padding: 18px; text-align: center; border-top: 1px solid var(--border); }
.pair.hidden { display: none; }
.pair-badge-r { margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 9px; }
.pair-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: 30px;
  background: rgba(167,139,250,.1); border: 1px solid rgba(167,139,250,.25);
  font-family: var(--mono);
  font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--violet);
  animation: pairBadgePulse 2s ease-in-out infinite;
}
@keyframes pairBadgePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(167,139,250,.2); } 50% { box-shadow: 0 0 0 7px rgba(167,139,250,0); } }
.bd-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); animation: dotPulse 1.5s ease-in-out infinite; }
@keyframes dotPulse { 0%, 100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.5); opacity: 1; } }
.pair-att {
  font-size: 11px; font-weight: 600; color: var(--amber);
  background: var(--warn-bg); border: 1px solid rgba(255,176,58,.2);
  padding: 3px 10px; border-radius: 30px;
  font-family: var(--mono);
}
.pair-att.hidden { display: none; }
.pair-c-w { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 14px; }
.pair-c {
  font-family: var(--mono); font-size: 26px; font-weight: 700;
  letter-spacing: 6px; color: var(--text);
  background: var(--bg2); border: 1px dashed var(--border2);
  padding: 10px 18px; border-radius: var(--r);
}
.copy-btn {
  width: 38px; height: 38px; border-radius: var(--r);
  border: 1px solid var(--border2); background: var(--surface);
  color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  transition: all .15s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: scale(1.05); }
.copy-btn:active { transform: scale(.9); }
.pair-steps {
  list-style: none; display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 14px; max-width: 340px; margin-left: auto; margin-right: auto;
  text-align: left;
}
.pair-steps li { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text2); }
.pair-steps li b { color: var(--text); font-weight: 600; }
.sn {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  font-size: 10px; font-weight: 700; font-family: var(--mono);
  display: flex; align-items: center; justify-content: center;
}
.pair-t { width: 100%; height: 4px; background: var(--surface2); border-radius: 10px; overflow: hidden; }
.pair-tb {
  width: 100%; height: 100%; border-radius: 10px;
  background: var(--grad-btn);
  animation: sh 90s linear forwards, gradientShift 3s ease-in-out infinite;
  background-size: 200% 100%;
}
@keyframes sh { from { width: 100%; } to { width: 0%; } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

/* ═══════════════════════════════════════════
   CONNECTED
   ═══════════════════════════════════════════ */
.conn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-top: 1px solid var(--border);
  background: var(--succ-bg);
}
.conn.hidden { display: none; }
.conn-info { display: flex; align-items: center; gap: 9px; }
.conn-i { font-size: 16px; color: var(--green); animation: connPulse 2s ease-in-out infinite; }
@keyframes connPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.conn-info span { font-size: 12px; font-weight: 600; color: var(--green); font-family: var(--mono); }
.ut-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  background: var(--bg2); border: 1px solid var(--border);
  font-size: 10px; font-weight: 600; font-family: var(--mono); color: var(--text2);
}

/* ═══════════════════════════════════════════
   FAIL STATE
   ═══════════════════════════════════════════ */
.fail { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--border); }
.fail.hidden { display: none; }
.fail-i { flex-shrink: 0; color: var(--red); font-size: 18px; }
.fail-t { flex: 1; min-width: 130px; }
.fail-t strong { display: block; font-size: 12px; font-weight: 700; color: var(--red); margin-bottom: 1px; font-family: var(--mono); }
.fail-t span { font-size: 11px; color: var(--text2); line-height: 1.55; }
.fail-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border: 1px solid rgba(132,232,42,.5);
  border-radius: 8px;
  background: transparent; color: var(--accent);
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
}
.fail-btn:hover { background: var(--accent); color: var(--forest-deep); transform: translateY(-1px); }
.fail-btn:active { transform: translateY(0) scale(.98); }

/* ═══════════════════════════════════════════
   BOT LOG (terminal)
   ═══════════════════════════════════════════ */
.bc-log { border-top: 1px solid var(--border); background: var(--surface2); }
.bc-log.hidden { display: none; }
.log-h { padding: 9px 14px; display: flex; justify-content: space-between; align-items: center; }
.log-t { font-size: 10px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.log-t i { color: var(--accent); margin-right: 3px; }
.log-ctrl { display: flex; align-items: center; gap: 6px; }
.log-btn {
  width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text3); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 9px;
  transition: all .2s;
}
.log-btn:hover { background: var(--danger-bg); color: var(--red); border-color: rgba(255,92,92,.25); }
.sd { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); transition: all .3s; }
.sd.act { background: var(--green); animation: pulse 2s ease-in-out infinite; }
.log-c {
  max-height: 130px; overflow-y: auto; padding: 8px 14px;
  background: #0d0d0d; color: #9ca3af;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.65;
}
.log-l { padding: 1px 0 1px 7px; border-left: 2px solid transparent; margin-bottom: 1px; word-break: break-word; transition: background .2s; }
.log-l:hover { background: rgba(255,255,255,.03); }
.log-l.err { color: var(--red); border-left-color: var(--red); background: rgba(255,92,92,.05); }
.log-c::-webkit-scrollbar { width: 3px; }
.log-c::-webkit-scrollbar-track { background: transparent; }
.log-c::-webkit-scrollbar-thumb { background: #262626; border-radius: 10px; }

/* ═══════════════════════════════════════════
   BOT STATS
   ═══════════════════════════════════════════ */
.bc-stats {
  display: flex; gap: 14px; padding: 9px 16px;
  border-top: 1px solid var(--border);
}
.bc-stat { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--text3); font-family: var(--mono); }
.bc-stat i { color: var(--accent); font-size: 10px; }
.bc-stat .sv { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */
.empty { text-align: center; padding: 44px 20px; }
.empty.hidden { display: none; }
.empty-icon {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 14px;
  background: var(--accent-soft); border: 1px solid var(--border-glow);
  color: var(--accent); font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  animation: emptyFloat 3s ease-in-out infinite;
}
@keyframes emptyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.empty h3 { font-size: 16px; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.empty p { font-size: 12px; color: var(--text3); }
.empty-cta { min-height: 44px; margin-top: 16px; }
@media (prefers-reduced-motion: reduce) {
  .skeleton-line { animation: none; background: var(--surface-2); }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal], html.js [data-reveal], html.js [data-stagger] > * { opacity: 1 !important; transform: none !important; filter: none !important; }
}

.step {
  display: flex; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all .2s;
}
.step:hover { border-color: var(--border2); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.step .step-num {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: var(--accent); color: #000;
  font-size: 12px; font-weight: 700; font-family: var(--mono);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.step:hover .step-num { transform: scale(1.1) rotate(6deg); }
.step-body h3 { font-size: 12.5px; font-weight: 700; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
.step-body h3 i { color: var(--accent); font-size: 12px; }
.step-body p { font-size: 11.5px; color: var(--text2); line-height: 1.6; }
.step-body b { color: var(--text); font-weight: 600; }
.step-body code {
  font-family: var(--mono); font-size: 10.5px;
  background: var(--bg2); border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 4px; color: var(--accent);
}
.guide-notes { display: flex; flex-direction: column; gap: 8px; }
.note {
  display: flex; gap: 10px; padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); font-size: 11.5px; color: var(--text2); line-height: 1.55;
  transition: all .2s;
}
.note:hover { border-color: var(--border2); transform: translateX(4px); }
.note i { color: var(--accent); font-size: 14px; margin-top: 1px; flex-shrink: 0; }
.note b { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  text-align: center; padding: 40px 0 8px; font-size: 11px; color: var(--text3);
  position: relative;
}
.divider-line {
  width: 40px; height: 1px; margin: 0 auto 20px;
  background: rgba(132,232,42,.4);
}
.footer strong {
  font-weight: 800; color: var(--text-primary);
}
.footer-links { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.footer-mono {
  margin-top: 18px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text3); opacity: .6;
}

/* Landing page */
.landing-page { overflow-x: clip; }
.landing-page .nav-inner { max-width: 1120px; height: 68px; }
.brand-link { text-decoration: none; color: inherit; }
.landing-nav { display: flex; align-items: center; gap: 24px; }
.landing-nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text2); text-decoration: none; font-weight: 600; font-size: 13px; transition: color .2s; }
.landing-nav a:hover { color: var(--text); }
.landing-nav .nav-cta { padding: 0 16px; border-radius: var(--r); color: var(--forest-deep); background: var(--accent); }
.landing-nav .nav-cta i { margin-left: 9px; }
.landing-page .burger { display: none; }
.landing-main { width: min(100% - 40px, 1080px); margin: 0 auto; padding-top: 78px; }
.landing-hero { padding: 24px 0 70px; margin-bottom: 10px; }
.landing-hero .header-title { max-width: 820px; font-size: clamp(2.8rem, 8vw, 5.8rem); line-height: 1.03; }
.landing-hero .header-desc { max-width: 590px; font-size: 17px; }
.landing-hero .btn-docs, .landing-hero .btn-outline { min-height: 48px; align-items: center; text-decoration: none; border-radius: 9px; font-family: var(--font); font-size: 13px; letter-spacing: 0; text-transform: none; }
.landing-hero .btn-docs { color: white; }
.landing-hero .btn-docs i, .landing-hero .btn-outline i { color: inherit; }
.landing-section { scroll-margin-top: 88px; margin: 34px 0 84px; }
.landing-section > .section-head p { color: var(--text2); margin: 8px auto 0; max-width: 540px; }
.section-kicker { display: block; color: var(--accent); font: 600 11px var(--mono); letter-spacing: .16em; margin-bottom: 10px; }
.feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.feature-card { min-width: 0; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--rl); }
.feature-card h3 { font-size: 15px; margin-bottom: 7px; }
.feature-card p { color: var(--text2); line-height: 1.65; }
.landing-page .step { min-width: 0; }

@media (max-width: 700px) {
  .landing-page .nav-inner { padding: 0 18px; }
  .landing-page .burger { display: flex; flex-shrink: 0; }
  .landing-nav { display: none; position: absolute; top: 68px; left: 12px; right: 12px; padding: 10px; flex-direction: column; align-items: stretch; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); }
  .landing-nav.open { display: flex; }
  .landing-nav a { padding: 0 12px; }
  .landing-nav .nav-cta { justify-content: center; margin-top: 5px; }
  .landing-main { width: min(100% - 36px, 1080px); padding-top: 48px; }
  .landing-hero { padding-bottom: 48px; }
  .landing-hero .header-title { font-size: clamp(2.5rem, 12vw, 4rem); }
  .landing-hero .header-desc { font-size: 15px; }
  .landing-section { margin-bottom: 62px; }
  .feature-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ═══════════════════════════════════════════
   SECTIONS (FAQ / ABOUT / PRIVACY)
   ═══════════════════════════════════════════ */
.section { margin-top: 32px; }
.section.hidden { display: none; }
.section-head { text-align: center; margin-bottom: 20px; }
.section-head h2 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800; letter-spacing: -.03em;
}

.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
  transition: border-color .2s; background: var(--surface);
}
.faq-item:hover { border-color: var(--border2); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.privacy-list { display: flex; flex-direction: column; gap: 8px; }
.privacy-item {
  display: flex; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); transition: all .2s;
}
.privacy-item:hover { border-color: var(--border2); transform: translateX(4px); }
.privacy-item > i { font-size: 16px; color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.privacy-item h3 { font-size: 12.5px; font-weight: 700; margin-bottom: 3px; }
.privacy-item p { font-size: 11.5px; color: var(--text2); line-height: 1.6; }

/* ═══════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,36,20,.72); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity .18s ease;
}
.modal-copy { color: var(--text2); line-height: 1.6; overflow-wrap: anywhere; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
/* Aksi form yang panjang (pengaturan bot) menempel di bawah modal agar Simpan selalu terlihat. */
.form-grid > .modal-actions {
  position: sticky; bottom: -20px; z-index: 2;
  margin: 8px -20px -20px; padding: 12px 20px;
  background: var(--surface); border-top: 1px solid var(--line);
  border-radius: 0 0 18px 18px;
}
/* actions langsung di kartu (mis. confirmAction) belum punya padding; tanpa ini tombol & ring fokusnya menempel/terpotong tepi modal */
.modal-card > .modal-actions { padding: 0 20px 20px; }
.modal-actions button { min-height: 44px; }
.modal-actions .danger-action { background: var(--red); color: var(--forest-deep); border: 0; border-radius: var(--r); padding: 0 16px; font-weight: 700; cursor: pointer; }
.modal-actions .danger-action:disabled { opacity: .6; cursor: wait; }
.modal-overlay.hidden { display: none; }
/* Fokus programatik pada modal tidak boleh memunculkan outline besar di sekitar kartu. */
.modal-card:focus { outline: none; }
.modal-card:focus-visible { outline: 2px solid var(--border-glow); outline-offset: 2px; }
.modal-card {
  width: 100%; max-width: 480px; max-height: calc(100vh - 40px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; overflow-x: hidden; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transition: opacity .18s ease, transform .26s cubic-bezier(.22,1,.36,1);
}
.modal-card::before { content: none; }
@starting-style {
  .modal-overlay { opacity: 0; }
  .modal-card { opacity: 0; transform: scale(.95) translateY(12px); }
}
@keyframes modalIn { from { opacity: 0; transform: scale(.95) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-head-text {
  min-width: 0;
  flex: 1;
}
.modal-head h2 { font-size: 16px; font-weight: 800; margin-bottom: 3px; }
.modal-head p { font-size: 11.5px; color: var(--text2); }
.modal-close-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--bg2, #f3f4f6);
  color: var(--text, #1f2937);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all .15s ease;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}
.modal-close-btn:hover,
.modal-close-btn:focus-visible {
  background: var(--line-strong, #e2e8f0);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.35);
  outline: none;
}
.modal-body { padding: 18px 20px; }
.cfg-err {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--r);
  background: var(--danger-bg); border: 1px solid rgba(255,92,92,.2);
  font-size: 11.5px; font-weight: 600; color: var(--red); margin-bottom: 12px;
}
.cfg-err.hidden { display: none; }
.cfg-field { margin-bottom: 14px; }
.cfg-input input {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg2); color: var(--text);
  font-size: 13px; font-family: var(--font); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.cfg-input input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cfg-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.cfg-actions .btn-secondary { flex: 1; }
.cfg-actions .btn-primary { flex: 1; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* Dashboard gateway */
.auth-modal { z-index: 1300; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tab { flex: 1; }
.auth-tab.active { border-color: var(--accent); color: var(--accent); }
.auth-form, .form-grid { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; color: var(--text3); font-size: 11.5px; font-family: var(--font); }
.field input { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: var(--r); padding: 8px 10px; background: var(--bg2); color: var(--text); font: 13px var(--font); }
/* Jaga warna teks form tetap terbaca saat tema terang aktif. */
html[data-theme="light"] .field input, html[data-theme="light"] .admin-filter, html[data-theme="light"] .admin-toolbar input, html[data-theme="light"] .admin-toolbar select { color: var(--ink); }
.bot-page-intro { margin-bottom: 18px; }
.bot-page-summary { display: flex; align-items: center; gap: 16px; max-width: 1200px; margin: 0 auto 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(135deg, var(--cream), var(--surface)); }
.bot-summary-icon { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: var(--forest); color: var(--forest-deep); font-size: 19px; }
.bot-page-summary h2, .bot-section-head h2 { color: var(--ink); font-size: 18px; }
.bot-page-summary p:last-child { margin-top: 4px; color: var(--ink-2); font-size: 13px; }
.bot-section { max-width: 1200px; margin: 0 auto 28px; }
.bot-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-note { color: var(--ink-3); font: 11px var(--mono); }
.bot-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.settings-section-head { margin-bottom: 4px; }
.settings-lead { margin: 0 0 20px; }
.settings-subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.settings-subhead h3 { color: var(--ink); font-size: 14px; }
.settings-subhead .fa-shield-halved { color: var(--forest); font-size: 18px; }
.acl-loading { padding: 18px; text-align: center; }
.settings-actions { margin-top: 20px; }
.settings-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 620px) {
  .bot-page-summary { align-items: flex-start; margin-bottom: 22px; padding: 16px; }
  .bot-section-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .section-note { font-size: 10px; }
  .settings-subhead { align-items: flex-start; }
}

.bot-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bot-identity, .bot-actions { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.bot-phone { color: var(--ink); font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.bot-actions .btn-secondary { min-height: 36px; height: auto; padding: 7px 11px; font-size: 12px; }
.bot-act { border-color: var(--line); border-radius: 999px; color: var(--ink-2); }
.bot-act i, .pairing-actions i { font-size: 12px; }
.bot-act.danger, .danger-action { color: var(--danger); }
.bot-act.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 600 11px var(--font); white-space: nowrap; }
.badge-connected { color: var(--forest); background: var(--cream); border-color: rgba(132,232,42,.3); }
.badge-starting, .badge-pairing_code, .badge-waiting_pairing, .badge-queued, .badge-reconnecting { color: var(--warn); background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.35); }
.badge-stopped { color: var(--ink-2); }
.badge-failed, .badge-banned_whatsapp, .badge-logged_out, .badge-banned { color: var(--danger); background: var(--danger-bg); border-color: rgba(248,113,113,.3); }
.bot-uptime { margin-top: 10px; color: var(--ink-2); font: 12px var(--mono); }
.pairing { border-color: rgba(132,232,42,.25); border-radius: 12px; background: rgba(132,232,42,.08); }
.pairing.pairing-code { border-color: rgba(132,232,42,.25); background: rgba(132,232,42,.08); }
.pairing-code, .pair-code { color: var(--forest); font-family: var(--mono); }
.pairing .btn-primary { border-color: var(--forest); background: var(--forest); box-shadow: none; }
.pairing .btn-primary:hover { background: var(--accent-hover); }
.pairing .btn-secondary { border-color: var(--line-strong); color: var(--ink); }
.log-console { max-height: 55vh; overflow: auto; padding: 14px; border-radius: 10px; background: var(--forest-deep); color: var(--mint); font: 12px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-table { width: 100%; min-width: 640px; border-collapse: collapse; color: var(--ink); background: var(--surface); }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--line); padding: 11px 12px; text-align: left; white-space: nowrap; word-break: keep-all; overflow-wrap: normal; vertical-align: middle; }
.admin-table th { position: sticky; top: 0; z-index: 1; background: var(--cream); color: var(--ink); font-weight: 600; }
.admin-table tbody tr:hover { background: var(--surface-3, var(--surface-2)); }
.admin-section { margin-bottom: 22px; }
.admin-section-head { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.admin-section-head h2 { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 18px; margin: 4px 0 2px; font-weight: 700; flex-wrap: wrap; }
.admin-section-head .badge { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.admin-section-sub { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.4; }
/* Filter tabel admin: input pencarian di atas tabel bot/user. */
.admin-filter {
  width: 100%; margin-bottom: 12px; min-height: 42px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); font-size: 13px;
}
.admin-filter:focus-visible { outline: 2px solid var(--border-glow); outline-offset: 1px; }
.admin-table td.admin-actions { display: table-cell; white-space: nowrap; min-width: max-content; }
.admin-actions-inner { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
.admin-table td.admin-actions .ibtn { min-height: 32px; padding: 4px 10px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.moderation-form { display: grid; gap: 14px; width: 100%; min-width: 0; }
.moderation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; width: 100%; min-width: 0; }
.moderation-grid label { display: grid; gap: 6px; min-width: 0; color: var(--ink-2); font-size: 12px; font-weight: 500; }
.moderation-grid input, .moderation-grid select { width: 100%; min-width: 0; min-height: 42px; background: var(--cream); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--ink); padding: 10px 12px; font: inherit; }
.moderation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.table-wrap, .admin-table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
.table-wrap { overflow-x: auto; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.admin-toolbar label { display: grid; gap: 6px; color: var(--text2); }
.admin-toolbar input, .admin-toolbar select { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--r); color: var(--text); padding: 9px; font: inherit; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-actions button { white-space: nowrap; }
.hidden { display: none !important; }
.field-hint { font-size: 12px; color: var(--ink-2); }
.settings-card .field-hint { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.danger-action { color: var(--red); }
.admin-actions .ibtn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.admin-actions .ibtn i { font-size: 12px; }
.admin-actions .ibtn:hover:not(:disabled) { border-color: var(--forest); }
.admin-actions .ibtn:disabled { opacity: .55; cursor: wait; }
.admin-actions .ibtn.danger, .admin-toolbar .ibtn.danger { color: var(--danger); border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.12); }
.admin-actions .ibtn.ok, .admin-toolbar .ibtn.ok { color: var(--forest); border-color: rgba(132,232,42,.3); background: var(--surface); }
.admin-actions .ibtn.accent { color: var(--forest); border-color: rgba(132,232,42,.3); background: rgba(132,232,42,.12); }
.admin-toolbar .ibtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.admin-toolbar .ibtn:hover:not(:disabled) { border-color: var(--forest); }
.admin-toolbar .ibtn:disabled { opacity: .55; cursor: wait; }
.ban-reason { display: block; margin-top: 3px; max-width: 220px; color: var(--ink-2); font-size: 12px; overflow-wrap: anywhere; }
.badge-active { color: var(--forest); background: rgba(132,232,42,.12); }
.badge-allowed { color: var(--info); background: rgba(56,189,248,.12); }
.badge-blocked { color: var(--text3); background: var(--surface2); }
.modal-reason { display: grid; gap: 6px; margin-top: 14px; color: var(--text2); font-size: 12px; }
.modal-reason input { width: 100%; background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--r); color: var(--text); padding: 10px; font: inherit; }
.modal-reason input:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; border-color: var(--forest); }
/* Modal konfirmasi: ringkas, tombol jelas, tidak perlu scroll di layar kecil. */
.modal-confirm { max-width: 420px; }
.modal-confirm .modal-body { padding-top: 16px; }
.modal-confirm .modal-copy { margin: 0; font-size: 13.5px; }
.modal-confirm .modal-actions .danger-action,
.modal-confirm .modal-actions .btn-primary,
.modal-confirm .modal-actions .btn-secondary { min-height: 46px; padding: 0 18px; }
@media (prefers-reduced-motion: reduce) { .admin-actions .ibtn, .admin-toolbar .ibtn { transition: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 auto 24px; max-width: 1200px; }
.page-title { color: var(--ink); font-size: clamp(26px, 3vw, 34px); line-height: 1.15; }
.page-lead { color: var(--ink-2); margin-top: 8px; }
/* Salam kontekstual dashboard: ringkasan status armada dalam satu baris. */
.page-greeting { margin-top: 6px; color: var(--ink-2); font-size: 13px; }
.page-greeting.attention { color: var(--warn); }
.admin-section { margin: 0 0 16px; }
.admin-section > h2 { color: var(--ink); }
.admin-toolbar label { color: var(--ink-2); }
.admin-toolbar input, .admin-toolbar select { min-width: 0; min-height: 44px; background: var(--cream); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--ink); padding: 9px 11px; font: inherit; }
.badge-banned { color: var(--danger); background: rgba(248,113,113,.12); }
@media (max-width: 600px) { .page-head { margin-bottom: 18px; } .profile-card { padding: 18px; } .admin-toolbar { align-items: stretch; } .admin-actions { display: flex; flex-wrap: wrap; gap: 8px; } .admin-actions .ibtn, .admin-toolbar .ibtn { min-height: 44px; } .admin-table td.admin-actions { display: flex; flex-wrap: nowrap; gap: 6px; } }
@media (max-width: 620px) {
  .pairing-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .modal-overlay { padding: 12px; }
  .modal-body, .modal-head { padding-left: 16px; padding-right: 16px; }
  .form-grid > .modal-actions { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .pairing-code, .pairing-pending { align-items: stretch; }
}

/* Modal di HP: dialog di tengah layar, bukan bottom sheet. */
@media (max-width: 620px) {
  .modal-overlay { padding: 12px; }
  .modal-card {
    width: 100%; max-width: none;
    max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
    border-radius: 18px;
    padding-bottom: env(safe-area-inset-bottom);
    overscroll-behavior: contain;
    animation: modalIn .2s cubic-bezier(.22,1,.36,1);
  }
  .modal-confirm .modal-actions { flex-direction: column-reverse; }
  .modal-confirm .modal-actions button { width: 100%; }
  .modal-reason input { font-size: 16px; min-height: 46px; }
}

@media (max-width: 420px) {
  .nav-title { display: none; }
  .status { padding: 4px 9px; }
  .header-cta { flex-direction: column; }
  .header-cta .btn-docs, .header-cta .btn-outline { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal], html.js [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
  [data-stagger] > *, html.js [data-stagger] > * { opacity: 1 !important; transform: none !important; }
}

/* Fondasi visual landing plain */
.eyebrow,.section-kicker { color: var(--ink-2); font: 600 11px var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.btn-primary,.btn-outline,.btn-ghost,.btn-invert { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 20px; border-radius:999px; font:600 14px var(--font); text-decoration:none; cursor:pointer; transition:background .2s,color .2s,border-color .2s; }
.btn-primary { background:var(--forest); color:var(--forest-deep); border:1px solid var(--forest); }
.btn-primary:hover { background:var(--accent-hover); }
.btn-outline { color:var(--ink); border:1px solid var(--line-strong); background:transparent; }
.btn-ghost { color:var(--ink-2); border:1px solid transparent; background:transparent; }
.btn-ghost:hover { background:var(--surface-2); }
.btn-invert { color:var(--forest); border:1px solid rgba(132,232,42,.3); background:var(--surface); }
.icon { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8; }
.icon-tile { display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--cream);color:var(--forest); }
input,select,textarea { border-radius:10px; }
select, textarea { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn-refresh { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); border-radius: 10px; cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.btn-refresh:hover { color: var(--forest); border-color: var(--forest); }
/* Target sentuh 44px di layar sentuh; desktop tetap ringkas. */
@media (pointer: coarse) {
  .btn-refresh, .notify-close, .toast-close { width: 44px; height: 44px; }
  /* Tombol Reconnect di banner putus: target sentuh tetap 44px, tidak mengecil jadi 26px. */
  .disconnect-banner-actions .btn-reconnect { min-height: 44px; padding: 0 16px; }
  .btn-preset, .acl-select { min-height: 44px; }
  /* Baris form panjang tetap memakai 16px agar iOS tidak zoom otomatis saat fokus. */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; }
  /* Checkbox rentang sentuh: label/wrapper yang diperbesar, bukan kotaknya. */
  .bot-select, .field-check input { position: relative; }
  .bot-select::after, .field-check input::after { content: ''; position: absolute; inset: -12px; }
  /* Setelan Thumbnail & deskripsi: satu kolom, kontrol selebar kartu. */
  .field-check { width: 100%; }
  .field-check input { margin-right: 0; }
  /* Tabel admin di HP: kolom sempit tetap terbaca tanpa kehilangan sticky header. */
  .admin-table { min-width: 560px; }
  .admin-table th, .admin-table td { padding: 10px 10px; }
  .admin-table td.admin-actions { flex-wrap: wrap; }
  .bot-select { width: 24px; height: 24px; }
}
:where(button,a,input,select,textarea,[tabindex]):focus-visible { outline:3px solid var(--mint);outline-offset:3px; }
.announce { background:var(--forest-deep);color:var(--cream);text-align:center;padding:9px 16px;font-size:12px; }
.landing-page { background:var(--bg);color:var(--ink); }
.landing-page .nav { background:rgba(20,20,22,.94);border-bottom:1px solid var(--line); }
.landing-page .nav-inner { max-width:1200px;height:72px; }
.landing-page .nav-title { color:var(--ink); }
.landing-nav { display:flex;align-items:center;gap:24px; }
.landing-nav a { color:var(--ink-2);text-decoration:none;font-size:13px; }
.landing-nav .nav-cta { color:var(--forest-deep);font-weight:700; }
.landing-nav .nav-cta:hover { color:var(--forest-deep); }
.landing-page .burger { display:none; }
.landing-main { max-width:1200px;margin:auto;padding:0 24px; }
.hero,.landing-hero { display:grid;grid-template-columns:1.05fr .95fr;align-items:center;gap:56px;min-height:610px;padding:72px 0; }
.hero-copy { max-width:590px; }
.hero h1 { max-width:660px;font-size:clamp(42px,6vw,72px);line-height:1.02;letter-spacing:-.055em;color:var(--ink);margin:20px 0; }
.hero-copy p { color:var(--ink-2);font-size:17px;max-width:500px; }
.hero-visual { min-height:400px;display:grid;place-items:center; }
.hero-diagram { width:min(100%,460px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,var(--cream) 0 28%,transparent 29%),repeating-radial-gradient(circle,transparent 0 56px,var(--line) 57px 58px);display:grid;place-items:center;color:var(--forest); }
.hero-diagram svg { width:70%;height:70%; }
.hero-cta { display:flex;gap:12px;flex-wrap:wrap;margin:28px 0 16px; }
.hero-micro { color:var(--ink-3)!important;font-size:13px!important; }
.logo-cloud { padding:34px 0 58px;border-top:1px solid var(--line); }
.logo-row { display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin-top:22px; }
.logo-item { color:var(--ink-2);font-weight:650;font-size:15px; }
.showcase,.product-showcase { padding:76px 0 100px; }
.section-head { max-width:650px;margin:0 auto 36px;text-align:center; }
.section-title { font-size:clamp(30px,4vw,48px);letter-spacing:-.04em;margin:12px 0;color:var(--ink); }
.section-desc { color:var(--ink-2); }
.product-window { max-width:950px;margin:auto;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:var(--shadow-lg); }
.product-window img { max-width:100%; }
.mock-dashboard { display:grid;grid-template-columns:170px minmax(0,1fr);gap:20px;margin-top:20px; }
.mock-sidebar { display:flex;flex-direction:column;gap:16px;padding:18px 14px;border:1px solid var(--line);border-radius:12px;color:var(--ink-2);font-size:13px; }
.mock-sidebar strong { color:var(--forest);font-size:15px;margin-bottom:8px; }
.mock-content { min-width:0; }
.mock-bot-card { display:grid;grid-template-columns:1fr auto;gap:16px;margin-top:16px;padding:18px;border:1px solid var(--line);border-radius:12px; }
.mock-bot-card > div:first-child { display:flex;flex-direction:column;gap:5px; }
.mock-bot-card > div:first-child span,.mock-pairing > span { color:var(--ink-3);font-size:12px; }
.mock-chips { display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap; }
.mock-chip { padding:5px 9px;border-radius:999px;background:var(--cream);color:var(--forest);font-size:11px;font-weight:600;white-space:nowrap; }
.mock-pairing { grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:12px;border-top:1px solid var(--line); }
.mock-pairing code { color:var(--ink);font-family:var(--mono);font-size:16px;font-weight:700;letter-spacing:.12em; }
@media(max-width:768px) { .landing-page .burger { display:flex; } .landing-nav { display:none;position:absolute;top:72px;left:0;right:0;padding:18px 24px;background:var(--surface);border-bottom:1px solid var(--line);flex-direction:column;align-items:stretch; } .landing-nav.open { display:flex; } .hero,.landing-hero { grid-template-columns:1fr;gap:20px;min-height:0;padding:56px 0; } .hero-visual { min-height:280px; } .landing-main { padding:0 20px; } .logo-row { justify-content:center; } .mock-dashboard { grid-template-columns:1fr;gap:14px; } .mock-sidebar { flex-direction:row;flex-wrap:wrap;gap:12px;align-items:center; } .mock-sidebar strong { width:100%;margin:0; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

/* Landing tengah dan bawah */
.landing-section { scroll-margin-top: 100px; margin: 0 0 88px; }
.landing-section > .section-head p { max-width: 560px; margin: 10px auto 0; }
.feature-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.feature-card { min-width:0; padding:24px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.feature-icon { display:grid; place-items:center; width:42px; height:42px; margin-bottom:18px; border-radius:12px; background:var(--cream); color:var(--forest); }
.feature-tag { display:block; margin-bottom:8px; color:var(--ink-3); font:600 10px var(--mono); letter-spacing:.13em; }
.feature-card h3,.step-body h3,.privacy-item h3,.about-item h3 { margin:0 0 7px; color:var(--ink); font-size:15px; }
.feature-card p,.step-body p,.privacy-item p,.about-item p { margin:0; color:var(--ink-2); font-size:13px; line-height:1.65; }
.steps { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); }
.step { display:flex; gap:18px; padding:24px; background:var(--surface); }
.step-num,.privacy-num { color:var(--forest); font:600 12px var(--mono); }
.step-body { min-width:0; }
.guide-notes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:20px; border-top:1px solid var(--line); }
.note { padding:14px 12px; color:var(--ink-2); font-size:12px; line-height:1.6; border-bottom:1px solid var(--line); }
.note b { color:var(--ink); }
.pairing-showcase { display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:48px; padding:56px; margin:0 0 80px; border:1px solid var(--line); border-radius:20px; background:var(--surface); }
.pairing-mock { display:grid; gap:18px; padding:30px; border-radius:14px; background:var(--cream); text-align:center; }
.pairing-mock code { color:var(--forest-deep); font:700 clamp(24px,4vw,40px) var(--mono); letter-spacing:.12em; overflow-wrap:anywhere; }
.pairing-mock small { color:var(--ink-2); }
.stats-band,.cta-band { background:var(--forest-deep); color:var(--ink); }
.stats-band { margin:0 0 80px; padding:48px 24px; }
.stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.stat-block { display:grid; gap:6px; padding:12px 24px; border-right:1px solid rgba(243,251,233,.22); }
.stat-block:last-child { border:0; }
.stat-block strong { font-size:clamp(26px,4vw,42px); letter-spacing:-.04em; }
.stat-block span { color:#D5E4D4; font:11px var(--mono); }
.privacy-list { border-top:1px solid var(--line); }
.privacy-item { display:grid; grid-template-columns:54px minmax(0,1fr); gap:16px; padding:20px 8px; border-bottom:1px solid var(--line); }
.about-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border-top:1px solid var(--line); border-left:1px solid var(--line); }
.about-item { padding:22px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.about-item h3 { font-size:14px; }
.about-item p { font-size:12px; }
.faq-list { display:grid; gap:0; border-top:1px solid var(--line); }
.faq-item { padding:20px 4px; border:0; border-bottom:1px solid var(--line); background:transparent; }
.faq-item summary { cursor:pointer; color:var(--ink); font-weight:600; list-style:none; }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item summary::after { content:'+'; float:right; color:var(--forest); font:20px var(--mono); }
.faq-item[open] summary::after { content:'−'; }
.faq-item p { max-width:760px; margin:12px 30px 0 0; color:var(--ink-2); font-size:13px; line-height:1.7; }
.cta-band { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:40px; margin:0 0 56px; border-radius:18px; }
.cta-band .section-kicker { color:#D5E4D4; }
.cta-band h2 { margin:8px 0 0; font-size:clamp(22px,3vw,34px); }
.cta-band > div:last-child { display:flex; gap:10px; flex-wrap:wrap; }
.cta-band .btn-ghost { color:var(--ink); }
.site-footer { padding:0 0 26px; color:var(--ink-2); }
.footer-grid { display:grid; grid-template-columns:1.5fr repeat(3,1fr); gap:24px; padding-bottom:30px; }
.footer-col { display:flex; flex-direction:column; align-items:flex-start; gap:10px; font-size:13px; }
.footer-col h3 { margin:0; color:var(--ink); font-size:12px; }
.footer-col p { max-width:220px; margin:0; }
.footer-col a { color:var(--ink-2); text-decoration:none; }
.footer-bottom { padding-top:18px; border-top:1px solid var(--line); color:var(--ink-3); font:11px var(--mono); }
@media(max-width:700px) { .landing-section { margin-bottom:64px; } .feature-grid,.steps,.about-grid,.pairing-showcase,.guide-notes { grid-template-columns:1fr; } .pairing-showcase { padding:28px 20px; gap:24px; } .stats-band { margin-left:-20px; margin-right:-20px; padding:32px 20px; } .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .stat-block:nth-child(2) { border-right:0; } .stat-block { border-bottom:1px solid rgba(243,251,233,.22); } .cta-band { align-items:flex-start; flex-direction:column; padding:28px 22px; } .footer-grid { grid-template-columns:1fr; gap:22px; } }
@media(min-width:1200px) { .stats-band { margin-left:calc((1200px - 100vw)/2); margin-right:calc((1200px - 100vw)/2); padding-left:calc((100vw - 1200px)/2); padding-right:calc((100vw - 1200px)/2); } }
@media(max-width:380px) { .landing-main { padding-left:16px; padding-right:16px; } .stats-band { margin-left:-16px; margin-right:-16px; padding-left:16px; padding-right:16px; } .stat-block { padding:12px 10px; } }

/* ═══════════════════════════════════════════
   PLUGIN CATALOG (/plugins.html)
   ═══════════════════════════════════════════ */
.plugin-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; flex-wrap:wrap; }
.plugin-bot-select-wrap { display:flex; align-items:center; gap:10px; font-weight:500; }
.plugin-select { background:var(--cream); border:1px solid var(--line-strong); border-radius:var(--r); color:var(--ink); padding:8px 14px; font:inherit; min-height:40px; cursor:pointer; }
.plugin-select:focus { outline:2px solid var(--forest); outline-offset:1px; }

.preset-section { display:flex; align-items:center; gap:12px; margin-bottom:20px; flex-wrap:wrap; }
.preset-label { font-size:13px; font-weight:600; color:var(--ink-2); }
.preset-row { display:flex; gap:8px; flex-wrap:wrap; }
.btn-preset { background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:var(--r); padding:7px 14px; font:inherit; font-size:13px; font-weight:500; cursor:pointer; transition:all .15s ease; min-height:36px; }
.btn-preset:hover { border-color:var(--forest); color:var(--forest); background:var(--cream); }
.btn-preset.active { background:var(--forest); color:var(--forest-deep); border-color:var(--forest); }

.plugin-filters { display:flex; gap:12px; margin-bottom:24px; flex-wrap:wrap; }
.search-wrap { position:relative; flex:1; min-width:240px; }
.search-icon { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--ink-2); pointer-events:none; }
.plugin-search { width:100%; background:var(--cream); border:1px solid var(--line-strong); border-radius:var(--r); color:var(--ink); padding:10px 14px 10px 38px; font:inherit; min-height:42px; }
.plugin-search:focus { outline:2px solid var(--forest); outline-offset:1px; }

.plugin-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:16px; margin-bottom:40px; }
.plugin-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--rl); padding:18px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; justify-content:space-between; gap:14px; min-width:0; }
.plugin-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.plugin-meta { min-width:0; flex:1; }
.plugin-name { font-size:15px; font-weight:600; color:var(--ink); margin-bottom:2px; overflow-wrap:anywhere; }
.plugin-file { font:12px var(--mono); color:var(--ink-2); margin-bottom:6px; }
.plugin-desc { font-size:13px; color:var(--ink-2); line-height:1.45; overflow-wrap:anywhere; }
.plugin-card-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; padding-top:10px; border-top:1px solid var(--line); }
.plugin-badges { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.plugin-badge { display:inline-flex; align-items:center; padding:3px 8px; border-radius:999px; font-size:11px; font-weight:600; background:var(--cream); color:var(--forest); border:1px solid rgba(132,232,42,.3); text-transform:capitalize; }
.plugin-badge.badge-owner { background:rgba(248,113,113,.12); color:var(--danger); border-color:rgba(248,113,113,.3); }
.plugin-badge.badge-always-blocked { background:var(--surface-2); color:var(--ink-2); border-color:var(--line); }

.plugin-toggle-label { position:relative; display:inline-flex; align-items:center; cursor:pointer; user-select:none; gap:8px; }
.plugin-toggle-label input[type="checkbox"] { position:absolute; opacity:0; width:0; height:0; }
.toggle-switch { width:40px; height:22px; background:var(--line-strong); border-radius:999px; transition:background .2s ease; position:relative; flex-shrink:0; }
.toggle-switch::after { content:''; position:absolute; top:2px; left:2px; width:18px; height:18px; background:var(--forest-deep); border-radius:50%; transition:transform .2s ease; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.plugin-toggle-label input[type="checkbox"]:checked + .toggle-switch { background:var(--forest); }
.plugin-toggle-label input[type="checkbox"]:checked + .toggle-switch::after { transform:translateX(18px); }
.plugin-toggle-label input[type="checkbox"]:disabled + .toggle-switch { opacity:0.5; cursor:not-allowed; }
.toggle-status-text { font-size:12px; font-weight:500; color:var(--ink-2); }

@media(max-width:520px) {
  .plugin-toolbar, .plugin-filters { flex-direction:column; align-items:stretch; }
  .search-wrap { width:100%; }
}
@media(max-width:390px) {
  .plugin-grid { grid-template-columns:1fr; }
}

/* Halaman Bot Saya (/bots.html) */
.bot-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.bot-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.bot-pairing-history { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.bot-pairing-history h4 { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.bot-pairing-history h4 i { font-size: 12px; color: var(--ink-2); }
.bot-history-empty { font-size: 12px; color: var(--ink-2); margin: 0; }
.bot-history-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.bot-history-item { font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: var(--surface-2); border-radius: var(--r); }
.bot-history-status { font-weight: 500; color: var(--ink); }
.bot-history-time { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.bot-empty-state { padding: 32px 16px; text-align: center; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }

/* Pengaturan Bot & ACL Table (/bots.html) */
.settings-card { margin-top: 24px; }
#settingsForm { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.settings-card h2 { font-size: 17px; margin-bottom: 8px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.settings-grid label { display: grid; gap: 6px; color: var(--ink-2); }
.settings-grid input, .persona-label textarea { width: 100%; max-width: 100%; min-width: 0; background: var(--cream); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--ink); padding: 10px 12px; font: inherit; min-height: 42px; }
.persona-label { display: grid; gap: 6px; margin-bottom: 16px; color: var(--ink-2); }
.persona-label textarea { resize: vertical; min-height: 80px; }
.settings-card .field-hint { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.checkbox-label { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; min-width: 0; margin: 16px 0; cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.checkbox-label input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; accent-color: var(--forest); cursor: pointer; }
.setting-toggle-card { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 18px 0; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--cream); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.setting-toggle-card:hover { border-color: var(--forest); }
/* .profile-card label memakai display:grid; kembalikan layout kartu toggle agar checkbox sejajar judul. */
.profile-card label.setting-toggle-card { display: flex; align-items: center; gap: 12px; }
.setting-toggle-card input[type="checkbox"] { flex: 0 0 20px; width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--forest); cursor: pointer; }
.setting-toggle-info { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.setting-toggle-title { color: var(--ink); font-size: 14px; font-weight: 600; }
.settings-acl-section { margin-top: 24px; margin-bottom: 20px; }
.settings-acl-section h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }

.acl-table { width: 100%; min-width: 460px; border-collapse: collapse; color: var(--ink); background: var(--surface); }
.acl-table th, .acl-table td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; font-size: 13px; }
.acl-table th { background: var(--cream); color: var(--ink); font-weight: 600; }
.acl-table tbody tr:hover { background: var(--surface-2); }
.acl-file { display: block; max-width: 100%; font: 11px var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }
.acl-select { background: var(--cream); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--ink); padding: 6px 10px; font: inherit; font-size: 13px; }
.acl-select:disabled { opacity: 0.7; cursor: not-allowed; background: var(--surface-2); }

@media(max-width:520px) {
  .settings-grid { grid-template-columns: 1fr; }
}
@media(max-width:390px) {
  .settings-grid { grid-template-columns: 1fr; }
  .acl-table { min-width: 420px; }
}

@media (max-width: 700px) {
  #settingsForm input,
  #settingsForm textarea,
  #settingsForm select {
    width: 100%;
    max-width: 100%;
  }
  #settingsForm .settings-grid,
  #settingsForm .form-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }
  #settingsForm .settings-grid > *,
  #settingsForm .form-grid > * {
    min-width: 0;
  }
  #settingsForm label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  #settingsForm label:has(input[type="checkbox"]) input {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    min-height: 0;
    margin-top: 2px;
    padding: 0;
  }
  #settingsForm label:has(input[type="checkbox"]) > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  #settingsForm .table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Dashboard Insights & Aktivitas */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: var(--space-5, 24px);
}
.grid-primary, .grid-secondary {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.deploy-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius, 12px);
  padding: 20px;
  margin-bottom: 20px;
}
.deploy-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.deploy-head .deploy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  font-size: 18px;
  flex-shrink: 0;
}
.deploy-head h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.deploy-desc {
  color: var(--ink-2);
  font-size: 13px;
  margin: 0 0 14px;
  line-height: 1.5;
}
.deploy-form .input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--r, 8px);
  overflow: hidden;
  background: var(--cream);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.deploy-form .input-group:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(34, 76, 56, 0.12);
}
.deploy-form .input-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--ink-2);
  font-size: 14px;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  flex-shrink: 0;
}
.deploy-form input[type="tel"] {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-mono, var(--mono));
  color: var(--ink);
  outline: none;
}
.deploy-form .btn-primary {
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
/* Aksi tema/refresh tetap di topbar semua ukuran layar; teks jumlah bot
   disembunyikan supaya 3 tombol + judul muat di layar 360px. */
@media (max-width: 640px) {
  .topbar-actions #navBotCount { display: none; }
}
.section-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.bot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.bot-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius, 12px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bot-card:hover {
  border-color: var(--line-strong, #c8d1ca);
  box-shadow: 0 4px 12px rgba(14, 23, 19, 0.05);
}
.bot-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.bot-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg2, #f3f4f6);
  border: 1.5px solid var(--line, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.bot-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bot-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2, #6b7280);
  background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(16,185,129,0.05));
  font-family: var(--font-mono, monospace);
}
.bot-meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bot-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, #111827);
  line-height: 1.2;
}
.bot-identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.bot-phone {
  font-family: var(--font-mono, var(--mono));
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2, #4b5563);
}

/* Settings Thumbnail Preview */
.setting-thumb-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}
.setting-thumb-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #374151);
}
.setting-thumb-preview-wrap {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--bg2, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.setting-thumb-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.setting-thumb-preview-fallback {
  font-size: 10.5px;
  color: var(--text2, #9ca3af);
  text-align: center;
  padding: 4px;
}

/* Active Flow Bot Target */
.flow-bot-target {
  font-size: 14px;
  font-weight: 600;
  color: var(--emerald, #84E82A);
  margin-left: 6px;
}
.bot-uptime {
  margin: 0;
  font-size: 12px;
  font-family: var(--font-mono, var(--mono));
  color: var(--ink-2);
}
.bot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bot-act {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
}
.stats-row.stat-detail, .stat-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3, 12px);
  margin-bottom: var(--space-5, 20px);
}
.stat-detail .stat-value {
  font-size: clamp(16px, 2.2vw, 22px);
  overflow-wrap: anywhere;
}
.activity-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius, 14px);
  padding: 18px 20px;
  margin-bottom: var(--space-5, 20px);
  box-shadow: 0 4px 18px -4px rgba(15, 23, 20, 0.05);
  display: flex;
  flex-direction: column;
}
.activity-panel .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.panel-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-head-left h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}
.panel-badge {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono, var(--mono));
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono, var(--mono));
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: all .2s ease;
}
.live-pill.connected {
  background: rgba(132, 232, 42, 0.12);
  color: #84E82A;
  border: 1px solid rgba(132, 232, 42, 0.28);
}
.live-pill.disconnected {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.25);
}
.live-pill .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.live-pill.connected .pulse-dot {
  box-shadow: 0 0 0 0 rgba(132, 232, 42, 0.7);
  animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(132, 232, 42, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(132, 232, 42, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(132, 232, 42, 0); }
}
.panel-icon-btn {
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--ink-2);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s ease;
  min-width: 34px;
  min-height: 34px;
}
.panel-icon-btn:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  transform: rotate(30deg);
}
.panel-icon-btn:active {
  transform: rotate(180deg);
}

/* ACTIVITY TOOLBAR & CHIPS */
.activity-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.activity-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.act-chip {
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .15s ease;
  min-height: 32px;
}
.act-chip:hover {
  border-color: var(--border);
  color: var(--ink);
}
.act-chip.active {
  background: var(--forest);
  color: var(--forest-deep);
  border-color: var(--forest);
}
.act-chip i { font-size: 11px; }

.activity-search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.activity-search-box .search-icon {
  position: absolute;
  left: 11px;
  font-size: 12px;
  color: var(--ink-2);
  pointer-events: none;
}
.activity-search-input {
  width: 100%;
  padding: 7px 30px 7px 32px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.activity-search-input:focus {
  border-color: var(--forest);
  background: var(--surface);
}
.search-clear-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--ink-2);
  cursor: pointer;
  padding: 4px;
  font-size: 11px;
}

/* TIMELINE CONTAINER & SCROLL */
.activity-panel-body {
  max-height: 480px;
  overflow-y: auto;
  padding: 2px 2px 8px;
  position: relative;
  overscroll-behavior: contain;
}
.activity-list,
.activity-timeline-container {
  display: flex;
  flex-direction: column;
}
.activity-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 26px;
  margin-top: 6px;
}
.activity-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 12px;
  left: 10px;
  width: 2px;
  background: var(--line);
  border-radius: 1px;
}

/* DATE DIVIDERS */
.timeline-date-sep {
  position: relative;
  margin: 14px 0 8px -26px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.timeline-date-sep:first-child {
  margin-top: 2px;
}
.timeline-date-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--forest);
  background: rgba(46, 125, 83, 0.08);
  border: 1px solid rgba(46, 125, 83, 0.2);
  padding: 2px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.timeline-date-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* TIMELINE ITEM */
.activity-row,
.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 9px;
  background: var(--cream);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .16s ease;
}
.timeline-item:hover {
  background: var(--surface);
  border-color: rgba(46, 125, 83, 0.3);
  box-shadow: 0 3px 10px rgba(0,0,0,0.03);
  transform: translateX(2px);
}
.timeline-item.item-new-entry {
  animation: slideInActivity .35s cubic-bezier(.16,1,.3,1);
}
@keyframes slideInActivity {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* NODE STATUS ON VERTICAL LINE */
.timeline-node {
  position: absolute;
  left: -22px;
  top: 14px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  z-index: 2;
  box-shadow: 0 0 0 3px var(--surface);
}
.timeline-node.success {
  background: #84E82A;
  color: var(--forest-deep);
  border: 1px solid #84E82A;
}
.timeline-node.failed {
  background: var(--danger);
  color: var(--forest-deep);
  border: 1px solid var(--danger);
}
.timeline-node.unknown {
  background: var(--line-strong);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

/* ITEM PRIMARY ROW */
.timeline-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.timeline-cmd-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.cmd-chip {
  font-family: var(--font-mono, var(--mono));
  font-weight: 700;
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(30, 41, 59, 0.06);
  color: var(--ink);
  border: 1px solid rgba(30, 41, 59, 0.1);
}
.cat-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 6px;
  border-radius: 4px;
}
.cat-tools { background: rgba(132, 232, 42, 0.12); color: #84E82A; border: 1px solid rgba(132, 232, 42, 0.25); }
.cat-main { background: rgba(99, 102, 241, 0.12); color: #A5B4FC; border: 1px solid rgba(99, 102, 241, 0.25); }
.cat-media { background: rgba(245, 158, 11, 0.12); color: #FCD34D; border: 1px solid rgba(245, 158, 11, 0.25); }
.cat-ai { background: rgba(168, 85, 247, 0.12); color: #D8B4FE; border: 1px solid rgba(168, 85, 247, 0.25); }
.cat-admin { background: rgba(244, 63, 94, 0.12); color: #FDA4AF; border: 1px solid rgba(244, 63, 94, 0.25); }
.cat-general { background: rgba(100, 116, 139, 0.12); color: #CBD5E1; border: 1px solid rgba(100, 116, 139, 0.25); }

.timeline-time-meta {
  font-family: var(--font-mono, var(--mono));
  font-size: 11px;
  color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ITEM SECONDARY ROW */
.timeline-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-secondary span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.timeline-secondary .secondary-sep {
  color: var(--line);
  font-size: 10px;
}
.timeline-snippet {
  font-style: italic;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

/* ERROR PREVIEW IN TIMELINE */
.timeline-error-preview {
  margin-top: 4px;
  padding: 5px 8px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  font-size: 11px;
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.timeline-error-preview code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono, var(--mono));
}

/* SKELETON LOADING TIMELINE */
.skeleton-timeline-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 9px;
  background: var(--cream);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.skeleton-timeline-item::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}
.skeleton-box {
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
  height: 12px;
}

/* EMPTY & ERROR STATES */
.activity-empty, .activity-error {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.activity-empty i, .activity-error i {
  font-size: 26px;
  opacity: 0.6;
}
.activity-error {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.04);
  border: 1px dashed rgba(239, 68, 68, 0.3);
  border-radius: 8px;
}
.activity-error .btn-retry {
  margin-top: 6px;
  padding: 5px 12px;
  font-size: 12px;
}

/* FOOTER NOTE & MODAL DETAIL */
.activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
}
.activity-footer-text {
  font-size: 11.5px;
}
.activity-all-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--forest);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.activity-all-btn:hover {
  text-decoration: underline;
}

.activity-detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.code-box-preview {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-mono, var(--mono));
  font-size: 12px;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 160px;
  overflow-y: auto;
}
.code-box-preview.error-box {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.25);
  color: #b91c1c;
}

/* MOBILE 390px RESPONSIVE RULES */
@media (max-width: 640px) {
  .activity-panel {
    padding: 14px 12px;
    margin-bottom: 24px;
  }
  .activity-panel-body {
    max-height: 420px;
  }
  .timeline-item {
    padding: 10px;
    min-height: 44px;
  }
  .act-chip {
    min-height: 38px;
    padding: 6px 14px;
    font-size: 13px;
  }
  .activity-search-input {
    min-height: 40px;
    font-size: 13px;
  }
  .activity-detail-meta-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .timeline-primary {
    flex-wrap: wrap;
    gap: 4px;
  }
  .timeline-time-meta {
    font-size: 10px;
  }
}

@media (max-width: 960px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
@media (max-width: 768px) {
  .stats-row, .dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-row.stat-detail, .stat-detail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}
@media (max-width: 520px) {
  .stats-row, .dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .stats-row.stat-detail, .stat-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .stats-row.stat-detail .stat-card:last-child {
    grid-column: span 2;
  }
  .stat-card, .dash-stat {
    padding: 10px 12px;
    gap: 8px;
  }
  .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .stat-value, .dash-stat-value {
    font-size: 18px;
  }
  .stat-label, .dash-stat-label {
    font-size: 10px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
  .deploy-card {
    padding: 16px;
  }
  .deploy-form .input-group {
    flex-direction: column;
  }
  .deploy-form .input-prefix {
    display: none;
  }
  .deploy-form .btn-primary {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }
}

/* ═══════════════════════════════════════════
   ANALYTICS HUB (#analytics) - High-End SaaS Telemetry Platform
   ═══════════════════════════════════════════ */
.analytics-hub {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

/* Header Strip with Controls */
.analytics-header-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.analytics-title-meta {
  display: flex;
  flex-direction: column;
}
.analytics-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 11px var(--mono);
  color: var(--forest);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.analytics-main-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.analytics-main-desc {
  color: var(--ink-2);
  font-size: 13.5px;
  margin: 0;
  line-height: 1.5;
}
.analytics-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.analytics-scope-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(132, 232, 42, 0.08);
  border: 1px solid rgba(132, 232, 42, 0.18);
  color: var(--forest);
  font: 700 11px var(--mono);
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(26, 211, 121, 0.5);
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(26, 211, 121, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(26, 211, 121, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 211, 121, 0); }
}
.analytics-time-pills {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 999px;
  gap: 2px;
}
.time-pill {
  border: none;
  background: transparent;
  padding: 4px 12px;
  border-radius: 999px;
  font: 600 11.5px var(--sans);
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s ease;
}
.time-pill.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(37, 45, 42, 0.06);
}

/* 1. Top Row: 4 Metric Cards Strip */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.kpi-metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(37, 45, 42, 0.03);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.kpi-metric-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 14px rgba(37, 45, 42, 0.05);
  transform: translateY(-2px);
}
.kpi-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.kpi-tag {
  font: 700 10px var(--mono);
  color: var(--ink-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kpi-trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 700 10.5px var(--mono);
  padding: 2px 7px;
  border-radius: 999px;
}
.kpi-trend-pill.up {
  background: rgba(132, 232, 42, 0.12);
  color: #84E82A;
}
.kpi-trend-pill.success {
  background: rgba(132, 232, 42, 0.1);
  color: var(--forest);
}
.kpi-trend-pill.neutral {
  background: var(--surface-2);
  color: var(--ink-2);
}
.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.kpi-number {
  font: 700 28px var(--mono);
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.kpi-unit {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}
.kpi-footer-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-2);
  margin-top: auto;
}
.kpi-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.kpi-status-dot.green { background: #84E82A; }

/* 2. Middle Section: Hero Area Chart Curve */
.analytics-chart-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px 18px;
  margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(37, 45, 42, 0.03);
}
.chart-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.chart-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}
.chart-panel-desc {
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 0;
}
.chart-legend-row {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.legend-dot.dot-emerald { background: #84E82A; }
.legend-dot.dot-gray { background: #94A3B8; }

.svg-area-chart-container {
  position: relative;
  width: 100%;
}
.analytics-area-svg {
  width: 100%;
  height: 180px;
  display: block;
  overflow: visible;
}
.chart-dot {
  fill: #0A0A0A;
  stroke: #84E82A;
  stroke-width: 2.5;
  cursor: pointer;
  transition: r .2s ease, stroke-width .2s ease;
}
.chart-dot:hover {
  r: 6;
  stroke-width: 3;
  fill: #84E82A;
}
.chart-x-axis {
  display: flex;
  justify-content: space-between;
  padding: 8px 4px 0;
  border-top: 1px solid var(--line);
  font: 10px var(--mono);
  color: var(--ink-2);
  margin-top: 4px;
}
.chart-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-2);
}
.footer-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
}
.footer-summary {
  font-family: var(--mono);
  color: var(--forest);
  font-weight: 600;
}

/* 3. Bottom Grid: 2 Comprehensive Columns */
.analytics-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.analytics-sub-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(37, 45, 42, 0.03);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.analytics-sub-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 14px rgba(37, 45, 42, 0.05);
}
.sub-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.sub-card-tag {
  font: 700 10px var(--mono);
  color: var(--ink-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sub-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 2px 0 0;
  letter-spacing: -0.01em;
}
.sub-card-desc {
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 0 0 16px;
  line-height: 1.4;
}

/* Leaderboard Table */
.leaderboard-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.leaderboard-header-row {
  display: grid;
  grid-template-columns: 44px 1fr 100px 75px;
  align-items: center;
  padding: 4px 8px;
  font: 700 10px var(--mono);
  color: var(--ink-3);
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
}
.leaderboard-rows-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.leaderboard-row {
  display: grid;
  grid-template-columns: 44px 1fr 100px 75px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background .15s ease;
}
.leaderboard-row:hover {
  background: var(--surface-2);
}
.lb-rank {
  font: 700 11px var(--mono);
  color: var(--ink-2);
}
.lb-rank.rank-1 { color: #FBBF24; }
.lb-rank.rank-2 { color: #94A3B8; }
.lb-rank.rank-3 { color: #FCA5A5; }
.lb-cmd-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lb-code {
  font: 700 12px var(--mono);
  color: var(--forest);
  background: rgba(132, 232, 42, 0.08);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
.lb-track {
  flex: 1;
  height: 5px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  max-width: 110px;
}
.lb-fill {
  height: 100%;
  background: linear-gradient(90deg, #84E82A, #58B00E);
  border-radius: 999px;
  transition: width .3s ease;
}
.lb-cat-badge {
  font: 600 10.5px var(--mono);
  color: var(--ink-2);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}
.lb-vol-group {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  font-family: var(--mono);
}
.lb-val {
  font-size: 12px;
  color: var(--ink);
}
.lb-share {
  font-size: 10.5px;
  color: var(--ink-2);
}

/* Health & Engine Diagnostic */
.health-overview-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.health-donut-slot {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}
.health-donut-svg {
  width: 88px;
  height: 88px;
}
.donut-val {
  transition: stroke-dashoffset .5s ease, stroke .3s ease;
}
.donut-inner-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.donut-pct-text {
  font: 700 18px var(--mono);
  color: var(--ink);
  line-height: 1;
}
.donut-sub-label {
  font: 700 9.5px var(--mono);
  color: var(--ink-2);
  letter-spacing: 0.05em;
  margin-top: 3px;
}
.health-metrics-summary {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.health-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.h-metric-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
}
.h-metric-val {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}
.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.dot-green { background: #84E82A; }
.dot-red { background: var(--danger); }
.dot-gray { background: #94A3B8; }
.dot-emerald { background: var(--forest); }

/* Engine Architecture Checklist */
.engine-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}
.chk-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chk-left strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}
.chk-left span {
  display: block;
  font-size: 11px;
  color: var(--ink-2);
}
.chk-icon {
  font-size: 14px;
  color: var(--forest);
  width: 18px;
  text-align: center;
}
.chk-status {
  font: 700 11px var(--mono);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chk-status.normal {
  color: #84E82A;
}

@media (max-width: 1024px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .analytics-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .analytics-kpi-grid {
    grid-template-columns: 1fr;
  }
  .analytics-header-strip {
    flex-direction: column;
    align-items: flex-start;
  }
  .leaderboard-header-row,
  .leaderboard-row {
    grid-template-columns: 36px 1fr 65px;
  }
  .lb-cat-badge {
    display: none;
  }
}

/* ═══════════════════════════════════════════
   CHATBOT FLOW STUDIO IN-CARD DRAWER (#flows) - Visual Auto-Responder & DeepSeek AI
   ═══════════════════════════════════════════ */
.bot-flow-drawer {
  margin-top: 14px;
  padding: 16px;
  background: var(--bg2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalIn .2s cubic-bezier(.16,1,.3,1);
}
.bot-flow-drawer.hidden {
  display: none !important;
}
.bot-act.active {
  background: var(--forest, #84E82A) !important;
  color: var(--forest-deep) !important;
  border-color: var(--forest, #84E82A) !important;
}
.bot-flow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.bot-flow-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.bot-flow-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--forest, #84E82A);
  margin: 0;
  font-family: var(--font-mono, monospace);
  line-height: 1.3;
}
.bot-flow-desc {
  color: var(--ink-2);
  font-size: 12px;
  margin: 0;
  line-height: 1.4;
}
.bot-flow-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.bot-flow-close-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.flows-hub {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.flows-header-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.flows-title-meta {
  display: flex;
  flex-direction: column;
}
.flows-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 11px var(--mono);
  color: var(--forest);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.flows-main-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.flows-main-desc {
  color: var(--ink-2);
  font-size: 13.5px;
  margin: 0;
  line-height: 1.5;
}

/* DeepSeek Smart AI Fallback Card */
.flows-ai-settings-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(37, 45, 42, 0.03);
}
.ai-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ai-badge-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.flow-badge-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 11px var(--mono);
  color: #A5B4FC;
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.ai-model-tag {
  font: 600 11px var(--mono);
  color: var(--ink-2);
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 6px;
}
.ai-card-desc {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
  margin: 10px 0 14px;
}
.ai-card-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

/* Switch Toggle UI */
.toggle-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.toggle-switch-wrap input[type="checkbox"] {
  display: none;
}
.toggle-slider {
  width: 42px;
  height: 24px;
  background: var(--line-strong);
  border-radius: 24px;
  position: relative;
  transition: background .2s ease;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--forest-deep);
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch-wrap input:checked + .toggle-slider {
  background: var(--forest);
}
.toggle-switch-wrap input:checked + .toggle-slider::after {
  transform: translateX(18px);
}
.toggle-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

/* Flow Cards Grid */
.flows-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.flows-list-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.flows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

/* Flow Card Item */
.flow-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(37, 45, 42, 0.03);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.flow-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px rgba(37, 45, 42, 0.05);
}
.flow-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.flow-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
.flow-trigger-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 11.5px var(--mono);
  color: var(--forest);
  background: rgba(132, 232, 42, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(132, 232, 42, 0.15);
}
.flow-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.flow-scope-badge {
  font: 600 10.5px var(--mono);
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.flow-card-steps-preview {
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--surface-2);
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flow-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

/* Empty State */
.flow-empty-state {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 44px 20px;
  text-align: center;
  color: var(--ink-2);
}
.flow-empty-state .empty-icon {
  font-size: 36px;
  color: var(--forest);
  margin-bottom: 12px;
}
.flow-empty-state h4 {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 6px;
}
.flow-empty-state p {
  font-size: 13px;
  max-width: 440px;
  margin: 0 auto;
}

/* Visual Step Timeline Inside Modal */
.flow-timeline-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.timeline-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.flow-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  padding-left: 20px;
}
.flow-timeline::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 6px;
  width: 2px;
  background: var(--line-strong);
}
.flow-step-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.flow-step-number {
  position: absolute;
  left: -28px;
  top: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--forest-deep);
  font: 700 11px var(--mono);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px var(--surface);
}
.step-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.step-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.step-card-remove {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
}
.step-fields-grid {
  display: grid;
  grid-template-columns: 1fr 140px 140px;
  gap: 10px;
}
@media (max-width: 640px) {
  .step-fields-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════
   HERO: RENDER 3D (pengganti glyph crosshair)
   ═══════════════════════════════════════════ */
.hero-diagram.hero-render { position: relative; display: grid; place-items: center; width: min(100%, 460px); aspect-ratio: auto; background: none; border-radius: 0; }
.hero-render::before { content: ''; position: absolute; inset: 4% 0; border-radius: 50%; background: radial-gradient(circle at 50% 50%, rgba(154,246,187,.34), rgba(154,246,187,0) 68%); z-index: 0; }
.hero-render img { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .hero-diagram.hero-render { width: min(100%, 330px); } }



@media (max-width: 640px) {
  #parallax-stage { overflow: hidden; max-width: 100%; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { margin-bottom: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
  .admin-table td { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-faint); text-align: right; }
  .admin-table td:last-child { border-bottom: none; }
  .admin-table td::before { content: attr(data-label); font-weight: 600; color: var(--text-muted); text-align: left; margin-right: 12px; }
}
/* Link di dalam konten panel mengikuti warna aksen, bukan biru bawaan browser. */
.modal-body a, .app-content a:not(.btn):not(.sidebar-link):not(.tabbar-link) { color: var(--forest); text-decoration: underline; text-underline-offset: 2px; }

/* ── Kartu bot versi HP ────────────────────────────────────────────────
   Ditulis paling akhir agar menang dari `.bot-actions { display:flex }` di atas.
   Checkbox di header kartu, aksi 2 kolom — tidak perlu geser/scroll samping. */
@media (max-width: 640px) {
  .bot-card { padding: 14px; gap: 10px; scroll-margin-top: 68px; }
  /* Baris 1: checkbox + identitas bot. Baris 2: aksi selebar kartu. */
  .bot-card-head { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
  .bot-card-head .bot-identity { flex: 1 1 auto; min-width: 0; }
  .bot-card-head .bot-identity .badge { flex: none; }
  .bot-card-head .bot-actions { flex: 1 0 100%; }
  .bot-actions {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%; gap: 8px; margin-top: 2px;
  }
  .bot-actions .bot-act {
    width: 100%; min-height: 44px; justify-content: center;
    border-radius: 12px; font-size: 12.5px;
  }
  .bot-select {
    width: 22px; height: 22px; min-width: 22px; flex: none;
    appearance: none; -webkit-appearance: none;
    border: 2px solid var(--line-strong); border-radius: 7px;
    background: var(--surface-2); position: relative;
    transition: background .15s ease, border-color .15s ease;
  }
  .bot-select:checked { background: var(--forest); border-color: var(--forest); }
  .bot-select:checked::after {
    content: ''; position: absolute; left: 6px; top: 3px;
    width: 5px; height: 10px;
    border: solid var(--forest-deep, #0b0b0b); border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
}

/* ── Animasi panel (HP dulu) ──────────────────────────────────────────
   Hanya transform/opacity supaya tetap mulus di HP, dan seluruh gerakan
   dimatikan saat pengguna memilih reduced motion. */

/* Perpindahan halaman (Chrome/Android modern): fade halus, bukan kedip. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: pageOut .16s ease both; }
::view-transition-new(root) { animation: pageIn .24s cubic-bezier(.22,1,.36,1) both; }
@keyframes pageOut { to { opacity: 0; } }
@keyframes pageIn { from { opacity: 0; transform: scale(.995); } }

/* Ketuk: tombol dan tab sedikit mengecil, ikon tab ikut memantul. */
:where(button:not(:disabled), .btn-primary, .btn-outline, .btn-ghost, .btn-invert, .ibtn, .tabbar-link):active { transform: scale(.96); }
.tabbar-link { position: relative; isolation: isolate; }
.tabbar-link i { transition: transform .2s cubic-bezier(.22,1,.36,1); }
.tabbar-link:active i { transform: scale(.86); }
/* Pil latar tab aktif, muncul dengan skala. */
.tabbar-link::before {
  content: ''; position: absolute; inset: 5px 10px; z-index: -1;
  border-radius: 12px; background: var(--accent-soft);
  opacity: 0; transform: scale(.8);
  transition: opacity .18s ease, transform .22s cubic-bezier(.22,1,.36,1);
}
.tabbar-link[aria-current="page"]::before { opacity: 1; transform: none; }

/* Tab bar masuk dari bawah sekali saat halaman dibuka. */
@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) {
  .tabbar { animation: tabbarUp .32s cubic-bezier(.22,1,.36,1) both; }
}
@keyframes tabbarUp { from { transform: translateY(100%); opacity: .6; } }

/* Garis kemajuan scroll di paling atas. */
body::before {
  content: ''; position: fixed; inset: 0 0 auto; height: 3px; z-index: 90;
  background: linear-gradient(90deg, var(--forest), var(--mint));
  transform: scaleX(0); transform-origin: 0 50%;
  border-radius: 0 3px 3px 0; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    body::before { animation: scrollGrow linear both; animation-timeline: scroll(root block); }
  }
}
@keyframes scrollGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@keyframes riseIn {
  from { opacity: .55; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}

/* Checkbox bot: centang memantul kecil saat dipilih. */
.bot-select:checked::after { animation: checkPop .18s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes checkPop {
  from { transform: rotate(45deg) scale(.3); opacity: 0; }
  to { transform: rotate(45deg) scale(1); opacity: 1; }
}

/* Scroll halaman mulus untuk tautan jangkar (landing & panel). */
html { scroll-behavior: smooth; }

/* Topbar turun dan judul halaman naik saat halaman dibuka. */
@media (prefers-reduced-motion: no-preference) {
  .app-topbar { animation: topbarIn .34s cubic-bezier(.22,1,.36,1) both; }
  .page-head, .bot-page-intro, .profile-hero { animation: riseIn .42s cubic-bezier(.22,1,.36,1) both; }
}
@keyframes topbarIn { from { transform: translateY(-100%); opacity: .4; } }

/* Drawer sidebar HP: item masuk berurutan saat dibuka. */
@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) {
  .sidebar.open .sidebar-link { animation: slideInNav .26s cubic-bezier(.22,1,.36,1) both; }
  .sidebar.open .sidebar-link:nth-child(2) { animation-delay: .03s; }
  .sidebar.open .sidebar-link:nth-child(3) { animation-delay: .06s; }
  .sidebar.open .sidebar-link:nth-child(4) { animation-delay: .09s; }
  .sidebar.open .sidebar-link:nth-child(5) { animation-delay: .12s; }
  .sidebar.open .sidebar-link:nth-child(6) { animation-delay: .15s; }
  .sidebar.open .sidebar-link:nth-child(7) { animation-delay: .18s; }
}
@keyframes slideInNav { from { opacity: 0; translate: -14px 0; } }

/* Baris tabel admin masuk saat dirender/difilter. */
@media (prefers-reduced-motion: no-preference) {
  .admin-table tbody tr { animation: rowIn .24s cubic-bezier(.22,1,.36,1) both; }
  .admin-table tbody tr:nth-child(2) { animation-delay: .03s; }
  .admin-table tbody tr:nth-child(3) { animation-delay: .06s; }
  .admin-table tbody tr:nth-child(4) { animation-delay: .09s; }
  .admin-table tbody tr:nth-child(5) { animation-delay: .12s; }
  .admin-table tbody tr:nth-child(6) { animation-delay: .15s; }
}
@keyframes rowIn { from { opacity: 0; translate: 0 6px; } }

/* Ketuk ikon topbar (lonceng, menu) dan naikkan kartu saat hover di desktop. */
.nav-btn i { transition: transform .18s cubic-bezier(.22,1,.36,1); }
.nav-btn:active { transform: scale(.9); }
.nav-btn:active i { transform: rotate(-12deg) scale(.9); }
@media (hover: hover) {
  .plugin-card, .profile-card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
  .plugin-card:hover, .profile-card:hover { transform: translateY(-2px); }
}

/* Kolom form: fokus berubah halus, bukan melompat. */
input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--forest); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tabbar, .bot-card, .plugin-card, .stat-card, .admin-section, .profile-card, .flow-card, .settings-section,
  body::before, .bot-select:checked::after, .app-topbar, .page-head, .bot-page-intro, .profile-hero,
  .bot-section, .profile-grid > *, .plugin-toolbar, .preset-section, .activity-panel, .analytics-chart-panel,
  .analytics-kpi-grid > *, .analytics-detail-grid > *, section#fitur, section#cara-pakai, section#faq, section#status,
  .sidebar.open .sidebar-link, .admin-table tbody tr { animation: none !important; }
  .nav-btn, .nav-btn i, .plugin-card, .profile-card, input, select, textarea { transition: none !important; }
  html.reveal-ready [data-reveal], html.reveal-ready [data-stagger] > *, html.reveal-ready .bot-card,
  html.reveal-ready .plugin-card, html.reveal-ready .stat-card, html.reveal-ready .settings-section,
  html.reveal-ready .flow-card, html.reveal-ready .activity-panel, html.reveal-ready .analytics-chart-panel,
  html.reveal-ready .analytics-kpi-grid > *, html.reveal-ready .analytics-detail-grid > *,
  html.reveal-ready .preset-section, html.reveal-ready .plugin-toolbar, html.reveal-ready .profile-card {
    opacity: 1 !important; translate: none !important; transition: none !important;
  }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
