/* ============ DESIGN TOKENS ============ */
:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F4F4F5;
  --text: #0A0A0A;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --primary: #0070F3;
  --primary-hover: #0060DF;
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06);
}
.dark {
  --bg: #000000;
  --surface: #0A0A0A;
  --surface-2: #171717;
  --text: #FAFAFA;
  --text-muted: #888888;
  --border: #262626;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.6);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-feature-settings: "cv02","cv03","cv04","cv11";
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
code, pre { font-family: 'Geist Mono', monospace; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ============ LAYOUT ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

/* ============ TYPOGRAPHY ============ */
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 600; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.mono { font-family: 'Geist Mono', monospace; }

/* ============ BUTTON ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s, opacity .15s, border-color .15s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--error); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }

/* ============ INPUT ============ */
.input {
  width: 100%; height: 38px; padding: 0 12px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,112,243,.12); }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; }
.label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }

/* ============ CARD ============ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.card-hover { transition: border-color .15s, transform .15s; }
.card-hover:hover { border-color: var(--primary); }

/* ============ BADGE ============ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--text-muted);
}
.badge-success { background: rgba(16,185,129,.12); color: var(--success); }
.badge-error { background: rgba(239,68,68,.12); color: var(--error); }
.badge-warning { background: rgba(245,158,11,.12); color: var(--warning); }
.badge-primary { background: rgba(0,112,243,.12); color: var(--primary); }

/* ============ SIDEBAR / HEADER ============ */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; padding: 16px 12px;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 8px; font-weight: 700; font-size: 16px; }
.sidebar-brand img { height: 24px; width: auto; }
.sidebar-section { display: flex; flex-direction: column; gap: 2px; }
.sidebar-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 0 10px; margin-bottom: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius);
  font-size: 14px; color: var(--text-muted);
  transition: background .12s, color .12s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--surface-2); color: var(--text); font-weight: 500; }
.header {
  height: 56px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 0; z-index: 10;
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 24px; flex: 1; }

/* ============ MOBILE ============ */
.mobile-toggle { display: none; }
@media (max-width: 768px) {
  .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-toggle { display: inline-flex; }
  .content { padding: 16px; }
}

/* ============ ANIMATION ============ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn .2s ease; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.loading { animation: pulse 1.5s infinite; }

/* Tambahan Layout Dashboard */
.sidebar-overlay { display: none; }
@media (max-width: 768px) {
  .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; backdrop-filter: blur(2px); }
}

.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border);
}

.loading { color: var(--text-muted); font-size: 14px; padding: 20px 0; }

.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* ============================================================
   LANDING PAGE
   ============================================================ */
.lb-root {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
.lb-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== BUTTONS ===== */
.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.lb-btn-primary { background: var(--primary); color: #fff; }
.lb-btn-primary:hover { background: var(--primary-hover); }
.lb-btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.lb-btn-secondary:hover { background: var(--surface-2); }
.lb-btn-ghost { background: transparent; color: var(--text-muted); }
.lb-btn-ghost:hover { color: var(--text); }
.lb-btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.25); }
.lb-btn-ghost-dark:hover { background: rgba(255,255,255,0.08); }
.lb-btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }

/* ===== BANNER ===== */
.lb-banner {
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
}
.lb-banner-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lb-banner-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  display: inline-block;
  flex-shrink: 0;
}
.lb-banner-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--bg);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity .15s;
}
.lb-banner-link:hover { opacity: 1; }
.lb-banner-close {
  background: transparent;
  border: none;
  color: var(--bg);
  cursor: pointer;
  opacity: 0.6;
  padding: 4px;
  display: flex;
}
.lb-banner-close:hover { opacity: 1; }

/* ===== HEADER ===== */
.lb-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background .2s, border-color .2s;
}
.lb-header-scrolled {
  background: var(--surface);
  border-bottom-color: var(--border);
  backdrop-filter: blur(8px);
}
.lb-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.lb-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}
.lb-logo img { height: 24px; width: auto; }
.lb-logo-dot { color: var(--primary); }

.lb-nav {
  display: flex;
  gap: 4px;
  margin-left: 16px;
}
.lb-nav a {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s, background .15s;
}
.lb-nav a:hover { color: var(--text); background: var(--surface-2); }

.lb-header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.lb-hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  color: var(--text);
  margin-left: auto;
  cursor: pointer;
}

.lb-mobile-menu {
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lb-mobile-menu a {
  padding: 12px;
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
}
.lb-mobile-menu a:hover { background: var(--surface-2); }
.lb-mobile-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ===== HERO ===== */
.lb-hero {
  padding: 60px 0 80px;
  border-bottom: 1px solid var(--border);
}
.lb-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.lb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.lb-eyebrow-light { color: rgba(255,255,255,0.6); }
.lb-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  animation: lb-pulse 2s infinite;
}
@keyframes lb-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.lb-hero-title {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.lb-hero-title em {
  font-style: normal;
  color: var(--primary);
}
.lb-hero-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 520px;
}
.lb-hero-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.lb-hero-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.lb-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.lb-hero-meta svg { color: var(--success); }

/* HERO PREVIEW */
.lb-hero-preview-wrap {
  position: relative;
}
.lb-hero-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
  position: relative;
}
.lb-preview-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  z-index: 2;
}
.lb-preview-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lb-preview-model {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--surface-2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.lb-preview-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
}
.lb-preview-tabs {
  display: flex;
  gap: 2px;
}
.lb-preview-tabs span {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: default;
}
.lb-preview-tabs span.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
}
.lb-preview-body {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 220px;
}
.lb-preview-msg-user {
  align-self: flex-end;
  max-width: 75%;
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.lb-preview-msg-ai {
  align-self: flex-start;
  max-width: 85%;
}
.lb-preview-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.lb-preview-response {
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}
.lb-preview-input {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== TRUST ===== */
.lb-trust {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.lb-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.lb-trust-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.lb-trust-icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.lb-trust-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.lb-trust-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== SECTIONS ===== */
.lb-section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}
.lb-section-alt {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.lb-section-head {
  margin-bottom: 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.lb-center { text-align: center; justify-content: center; }
.lb-center .lb-title { max-width: 640px; margin: 0 auto; }
.lb-center .lb-lead { margin: 16px auto 0; }
.lb-title {
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.lb-title-light { color: #fff; }
.lb-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
}
.lb-lead-light { color: rgba(255,255,255,0.65); }

/* ===== MODELS ===== */
.lb-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.lb-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.lb-filter:hover { color: var(--text); border-color: var(--text-muted); }
.lb-filter.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.lb-filter-count {
  font-size: 11px;
  padding: 1px 6px;
  background: var(--surface-2);
  border-radius: 999px;
  color: var(--text-muted);
}
.lb-filter.active .lb-filter-count { background: rgba(255,255,255,0.15); color: var(--bg); }

.lb-models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.lb-model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.lb-model-card:hover { border-color: var(--text-muted); transform: translateY(-2px); }
.lb-model-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.lb-model-type {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
}
.lb-type-chat { background: rgba(0,112,243,0.1); color: var(--primary); }
.lb-type-image { background: rgba(16,185,129,0.1); color: var(--success); }
.lb-type-video { background: rgba(245,158,11,0.1); color: var(--warning); }
.lb-model-provider {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}
.lb-model-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.lb-model-id {
  display: inline-block;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.lb-model-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.lb-model-cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.lb-model-cost svg { color: var(--primary); }
.lb-model-try {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}
.lb-model-try:hover { text-decoration: underline; }
.lb-loading, .lb-empty {
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.lb-models-foot {
  margin-top: 32px;
  text-align: center;
}

/* ===== FEATURES ===== */
.lb-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.lb-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.lb-feature-lg {
  grid-column: span 2;
}
.lb-feature-wide {
  grid-column: span 2;
}
.lb-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.lb-feature h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.lb-feature p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.lb-feature-visual {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.lb-mini-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lb-mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

/* ===== STEPS ===== */
.lb-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.lb-step {
  padding-top: 20px;
  border-top: 2px solid var(--border);
}
.lb-step-num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 500;
}
.lb-step h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.lb-step p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ===== DEVELOPER ===== */
.lb-dev-section {
  background: #0A0A0A;
  color: #FAFAFA;
  padding: 96px 0;
}
.lb-dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.lb-dev-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lb-dev-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
.lb-dev-list svg { color: var(--success); flex-shrink: 0; }
.lb-dev-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.lb-dev-code {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lb-code-block {
  background: #111;
  border: 1px solid #262626;
  border-radius: var(--radius);
  overflow: hidden;
}
.lb-code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #262626;
  font-size: 11px;
}
.lb-code-tabs span {
  padding: 3px 8px;
  border-radius: 4px;
  color: rgba(255,255,255,0.5);
}
.lb-code-tabs span.active {
  background: #262626;
  color: #fff;
}
.lb-code-label {
  color: rgba(255,255,255,0.5);
  font-family: 'Geist Mono', monospace;
}
.lb-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 1px solid #262626;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all .15s;
}
.lb-code-copy:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.lb-code-body {
  margin: 0;
  padding: 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #e5e5e5;
  overflow-x: auto;
  white-space: pre;
}

/* ===== PRICING ===== */
.lb-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.lb-pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.lb-pricing-card-alt {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.lb-pricing-card-alt .lb-pricing-badge { background: rgba(255,255,255,0.15); color: #fff; }
.lb-pricing-card-alt .lb-pricing-sub { color: rgba(255,255,255,0.6); }
.lb-pricing-card-alt .lb-pricing-list li { color: rgba(255,255,255,0.8); }
.lb-pricing-card-alt .lb-pricing-list svg { color: var(--success); }
.lb-pricing-card-alt .lb-btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.lb-pricing-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.lb-pricing-head h3 { font-size: 15px; font-weight: 600; }
.lb-pricing-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  background: var(--surface-2);
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 600;
}
.lb-pricing-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.lb-pricing-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.lb-pricing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lb-pricing-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.lb-pricing-list svg { color: var(--primary); flex-shrink: 0; }
.lb-pricing-note {
  margin-top: 24px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--text-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* ===== FAQ ===== */
.lb-faq {
  max-width: 720px;
  margin: 0 auto;
}
.lb-faq-item {
  border-bottom: 1px solid var(--border);
}
.lb-faq-q {
  width: 100%;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  gap: 16px;
}
.lb-faq-q:hover { color: var(--primary); }
.lb-faq-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform .2s;
}
.lb-faq-item.open .lb-faq-icon { transform: rotate(45deg); color: var(--primary); }
.lb-faq-a {
  padding: 0 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ===== FINAL CTA ===== */
.lb-final-cta {
  background: #0A0A0A;
  color: #fff;
  padding: 96px 0;
  text-align: center;
}
.lb-final-inner { max-width: 640px; margin: 0 auto; }
.lb-final-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.1;
}
.lb-final-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 32px;
}
.lb-final-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.lb-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}
.lb-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.lb-footer-brand p {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 300px;
}
.lb-footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.lb-footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  padding: 5px 0;
  opacity: 0.75;
  transition: opacity .15s;
}
.lb-footer-col a:hover { opacity: 1; }
.lb-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}
.lb-footer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lb-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .lb-nav, .lb-header-actions { display: none; }
  .lb-hamburger { display: inline-flex; }
  .lb-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .lb-hero { padding: 40px 0 60px; }
  .lb-trust-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-models-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-features { grid-template-columns: 1fr 1fr; }
  .lb-feature-lg, .lb-feature-wide { grid-column: span 2; }
  .lb-steps { grid-template-columns: repeat(2, 1fr); }
  .lb-dev-grid { grid-template-columns: 1fr; gap: 40px; }
  .lb-pricing-grid { grid-template-columns: 1fr; }
  .lb-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .lb-section, .lb-dev-section, .lb-final-cta { padding: 64px 0; }
}

@media (max-width: 600px) {
  .lb-container, .lb-header-inner, .lb-banner-inner { padding: 0 16px; }
  .lb-banner-inner { padding: 10px 16px; }
  .lb-hero-title { font-size: 36px; }
  .lb-hero-sub { font-size: 15px; }
  .lb-trust-grid { grid-template-columns: 1fr; gap: 16px; }
  .lb-models-grid { grid-template-columns: 1fr; }
  .lb-features { grid-template-columns: 1fr; }
  .lb-feature-lg, .lb-feature-wide { grid-column: span 1; }
  .lb-steps { grid-template-columns: 1fr; }
  .lb-footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .lb-section-head { margin-bottom: 32px; }
  .lb-pricing-card { padding: 20px; }
  .lb-code-body { font-size: 11px; padding: 12px; }
  .lb-filters { gap: 6px; }
  .lb-filter { height: 30px; padding: 0 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-pulse { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
/* ============================================================
   LANDING — Tambahan revisi (tools, balance, comparison, pricing)
   ============================================================ */

/* ==== TOOLS GRID ==== */
.lb-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.lb-tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s, transform .15s;
}
.lb-tool-card:hover { border-color: var(--text-muted); transform: translateY(-2px); }
.lb-tool-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lb-tool-cat {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted);
}
.lb-tool-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.lb-tool-desc { font-size: 12px; line-height: 1.5; color: var(--text-muted); flex: 1; }
.lb-tool-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 1px solid var(--border);
  margin-top: 4px;
}
.lb-tool-cost {
  font-size: 11px; display: inline-flex; align-items: center; gap: 3px;
  color: var(--text-muted); font-weight: 500;
}
.lb-tool-cost svg { color: var(--primary); }
.lb-tool-link {
  font-size: 11px; color: var(--primary); font-weight: 500;
  display: inline-flex; align-items: center; gap: 2px;
}

/* ==== UNIVERSAL BALANCE ==== */
.lb-balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.lb-balance-visual { display: flex; flex-direction: column; gap: 16px; }
.lb-wallet {
  background: linear-gradient(135deg, #0A0A0A, #1a1a1a);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid #262626;
}
.lb-wallet-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,0.6);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.lb-wallet-amount { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.lb-wallet-sub { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.lb-wallet-flows {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.lb-flow {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px; color: var(--text-muted);
}
.lb-flow svg { color: var(--primary); }
.lb-balance-list {
  list-style: none; padding: 0; margin: 20px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.lb-balance-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 14px; line-height: 1.5; color: var(--text-muted);
}
.lb-balance-list svg { color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* ==== COMPARISON ==== */
.lb-compare {
  max-width: 900px; margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.lb-compare-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.5fr;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: center;
}
.lb-compare-row:last-child { border-bottom: none; }
.lb-compare-head {
  background: var(--surface-2);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.lb-compare-vyra { color: var(--primary); font-weight: 500; }
.lb-compare-row > div:first-child { color: var(--text-muted); }
.lb-compare-note {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 16px 20px;
  background: var(--surface-2);
  font-size: 12px; color: var(--text-muted); line-height: 1.6;
  border-top: 1px solid var(--border);
}

/* ==== PRICING PACKAGES ==== */
.lb-pkg-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.lb-pkg-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color .15s;
}
.lb-pkg-card:hover { border-color: var(--text-muted); }
.lb-pkg-best {
  border-color: var(--primary);
  border-width: 2px;
  padding: 19px;
}
.lb-pkg-badge {
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.lb-pkg-name {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.lb-pkg-price {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.lb-pkg-credits { display: flex; gap: 6px; align-items: baseline; margin-bottom: 4px; flex-wrap: wrap; }
.lb-pkg-main { font-size: 15px; font-weight: 600; }
.lb-pkg-bonus {
  font-size: 11px; font-weight: 600;
  background: rgba(16,185,129,0.12);
  color: var(--success);
  padding: 2px 6px;
  border-radius: 999px;
}
.lb-pkg-total { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.lb-pkg-per {
  font-size: 11px; color: var(--text-muted);
  padding: 6px 0;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 1024px) {
  .lb-pkg-grid { grid-template-columns: repeat(3, 1fr); }
  .lb-tools-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .lb-balance-grid { grid-template-columns: 1fr; gap: 40px; }
  .lb-tools-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-compare-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .lb-compare-row > div:first-child { font-weight: 600; color: var(--text); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
}
@media (max-width: 640px) {
  .lb-pkg-grid { grid-template-columns: 1fr 1fr; }
  .lb-tools-grid { grid-template-columns: 1fr; }
  .lb-wallet-flows { grid-template-columns: 1fr; }
}
/* ============================================================
   DASHBOARD REDESIGN
   ============================================================ */

/* ===== SHELL SIDEBAR ===== */
.sidebar {
  width: 248px;
  padding: 16px 12px;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; font-weight: 700; font-size: 15px;
  color: var(--text); text-decoration: none;
  margin-bottom: 8px;
}
.sidebar-brand img { height: 22px; width: auto; }
.sidebar-nav { display: flex; flex-direction: column; gap: 20px; }
.sidebar-section { display: flex; flex-direction: column; gap: 1px; }
.sidebar-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 4px 10px; margin-bottom: 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: 13.5px; color: var(--text-muted);
  text-decoration: none;
  transition: background .12s, color .12s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--surface-2); color: var(--text); font-weight: 500; }

/* ===== HEADER ===== */
.header {
  height: 60px;
  padding: 0 20px;
  gap: 16px;
}
.header-left, .header-right, .header-center { display: flex; align-items: center; gap: 8px; }
.header-center { flex: 1; justify-content: center; }
.header-left { gap: 12px; min-width: 0; }

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  min-width: 0; overflow: hidden;
}
.breadcrumb-root { color: var(--text-muted); }
.breadcrumb-current { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb-sep { color: var(--text-muted); opacity: 0.6; flex-shrink: 0; }

.search-trigger {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 13px; color: var(--text-muted);
  cursor: pointer;
  max-width: 380px; width: 100%;
  transition: border-color .15s;
}
.search-trigger:hover { border-color: var(--text-muted); }
.search-trigger span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger kbd {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  padding: 2px 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-muted);
}

.header-balance {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0,112,243,0.1); color: var(--primary);
  padding: 5px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  font-family: 'Geist Mono', monospace;
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-muted); cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.active { background: var(--surface-2); border-color: var(--border); color: var(--text); }

.user-btn { background: none; padding: 0; cursor: pointer; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--border);
}

.user-menu-wrap { position: relative; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 240px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden; z-index: 100;
}
.user-menu-head { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.user-menu-name { font-size: 13px; font-weight: 600; }
.user-menu-email { font-size: 11px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.user-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  font-size: 13px; color: var(--text); text-decoration: none;
  background: transparent; border: none; width: 100%; text-align: left;
  cursor: pointer; transition: background .12s;
}
.user-menu-item:hover { background: var(--surface-2); }
.user-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ===== CONTENT ===== */
.content { padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.page-subtitle { font-size: 13.5px; color: var(--text-muted); }
.page-actions { display: flex; gap: 8px; }

/* ===== STAT CARD ===== */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color .15s, transform .15s;
}
.stat-card:hover { border-color: var(--text-muted); }
.stat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-icon { width: 30px; height: 30px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2px; font-family: 'Geist Mono', monospace; }
.stat-sub { font-size: 12px; color: var(--text-muted); }

/* ===== DASHBOARD ===== */
.dash { display: flex; flex-direction: column; gap: 16px; }

.dash-welcome {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; flex-wrap: wrap;
  padding: 4px 0 8px;
}
.dash-greet { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.dash-welcome-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.dash-welcome-sub { font-size: 14px; color: var(--text-muted); }
.dash-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500; color: var(--text);
  text-decoration: none; transition: border-color .12s, background .12s;
}
.quick-btn:hover { border-color: var(--primary); background: var(--surface-2); }

.dash-balance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== PANEL HEAD ===== */
.panel-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 16px;
}
.panel-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.panel-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.panel-link {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; color: var(--primary); text-decoration: none; font-weight: 500;
}
.panel-link:hover { text-decoration: underline; }

/* ===== PERIOD PILLS ===== */
.period-pills { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--radius); }
.period-pill {
  padding: 4px 10px; font-size: 11px; font-weight: 500;
  background: transparent; border: none; border-radius: calc(var(--radius) - 3px);
  color: var(--text-muted); cursor: pointer;
  transition: background .12s, color .12s;
}
.period-pill:hover { color: var(--text); }
.period-pill.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ===== CHART ===== */
.chart-stat-row { margin-bottom: 16px; }
.chart-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.chart-stat-value { font-size: 22px; font-weight: 700; font-family: 'Geist Mono', monospace; letter-spacing: -0.02em; }
.chart-stat-sub { font-size: 11px; color: var(--text-muted); }
.chart { width: 100%; overflow: hidden; }
.chart-bars {
  display: flex; align-items: flex-end; gap: 2px;
  padding-top: 8px;
  border-bottom: 1px solid var(--border);
}
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; height: 100%; }
.chart-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; padding: 0 2px; }
.chart-bar {
  width: 100%; min-height: 2px;
  border-radius: 2px 2px 0 0;
  transition: height .3s ease;
}
.chart-bar-value {
  font-size: 9px; color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
  height: 14px; padding-top: 3px;
  opacity: 0;
  transition: opacity .15s;
}
.chart-col:hover .chart-bar-value { opacity: 1; }
.chart-bar-label {
  font-size: 9px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
  padding: 4px 2px 0;
}
.chart-empty { padding: 32px; text-align: center; color: var(--text-muted); font-size: 13px; background: var(--surface-2); border-radius: var(--radius); }

/* ===== CATEGORY LIST ===== */
.cat-list { display: flex; flex-direction: column; gap: 14px; }
.cat-row { display: flex; flex-direction: column; gap: 6px; }
.cat-row-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.cat-row-label { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.cat-dot { width: 8px; height: 8px; border-radius: 2px; }
.cat-row-value { font-family: 'Geist Mono', monospace; font-size: 12px; }
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; transition: width .4s ease; border-radius: 3px; }

/* ===== INSIGHTS ===== */
.insights { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.insight-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
}
.insight-icon {
  width: 30px; height: 30px; border-radius: var(--radius);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  color: var(--primary); flex-shrink: 0;
}
.insight-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.insight-value { font-size: 14px; font-weight: 600; }

/* ===== ACTIVITY ===== */
.activity-list { display: flex; flex-direction: column; }
.activity-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.activity-row:last-child { border-bottom: none; }
.activity-kind {
  width: 28px; height: 28px; border-radius: var(--radius);
  background: var(--surface-2); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.activity-main { flex: 1; min-width: 0; }
.activity-title { font-size: 13px; font-weight: 500; text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.activity-amount { font-family: 'Geist Mono', monospace; font-size: 13px; font-weight: 600; text-align: right; flex-shrink: 0; }
.amount-pos { color: var(--success); }
.amount-neg { color: var(--text); }
.amount-neutral { color: var(--text-muted); }
.activity-status { flex-shrink: 0; }

/* ===== MINI TOOLS ===== */
.mini-tools { display: flex; flex-direction: column; gap: 4px; }
.mini-tool {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: background .12s;
}
.mini-tool:hover { background: var(--surface-2); }
.mini-tool-icon {
  width: 32px; height: 32px; border-radius: var(--radius);
  background: var(--surface-2); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mini-tool-body { flex: 1; min-width: 0; }
.mini-tool-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-tool-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.mini-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.mini-dot.live { background: var(--success); }
.mini-dot.soon { background: var(--text-muted); }

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 20px; text-align: center;
}
.empty-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.empty-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.empty-desc { font-size: 13px; color: var(--text-muted); max-width: 400px; line-height: 1.5; margin-bottom: 16px; }
.empty-action { display: flex; gap: 8px; }

/* ===== SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--border) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.5s infinite;
}
@keyframes skeleton-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== FILTERS ===== */
.filter-row { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 400px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-input { padding-left: 36px; }
.view-toggle { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--radius); }

.filter-groups { display: flex; flex-direction: column; gap: 12px; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  padding: 5px 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  cursor: pointer;
  transition: all .12s;
}
.filter-chip:hover { color: var(--text); border-color: var(--text-muted); }
.filter-chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ===== TOOLS PAGE ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.tool-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, transform .15s;
}
.tool-tile:hover { border-color: var(--text-muted); transform: translateY(-2px); }
.tool-tile-top { display: flex; justify-content: space-between; align-items: center; }
.tool-tile-icon {
  width: 32px; height: 32px; border-radius: var(--radius);
  background: var(--surface-2); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.tool-tile-name { font-size: 14px; font-weight: 600; }
.tool-tile-desc { font-size: 12px; line-height: 1.5; color: var(--text-muted); flex: 1; min-height: 36px; }
.tool-tile-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 11px;
}
.tool-tile-cat { color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.tool-tile-cost { display: inline-flex; align-items: center; gap: 3px; color: var(--primary); font-weight: 600; font-family: 'Geist Mono', monospace; }

.tools-list { display: flex; flex-direction: column; }
.tool-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.tool-row:hover { background: var(--surface-2); }
.tool-row:last-child { border-bottom: none; }
.tool-row-body { flex: 1; min-width: 0; }
.tool-row-name { font-size: 13px; font-weight: 500; }
.tool-row-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-row-cat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; flex-shrink: 0; }

/* ===== TRANSACTIONS ===== */
.trx-list { display: flex; flex-direction: column; }
.trx-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.trx-row:last-child { border-bottom: none; }
.trx-icon {
  width: 32px; height: 32px; border-radius: var(--radius);
  background: var(--surface-2); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trx-main { flex: 1; min-width: 0; }
.trx-title { font-size: 13px; font-weight: 500; text-transform: capitalize; }
.trx-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.trx-amount { font-family: 'Geist Mono', monospace; font-size: 13px; font-weight: 600; flex-shrink: 0; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--radius); margin-bottom: 16px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: transparent; border: none;
  border-radius: calc(var(--radius) - 3px);
  font-size: 12.5px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
  transition: all .12s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-count { font-size: 10px; padding: 1px 6px; background: var(--surface-2); border-radius: 999px; }
.tab.active .tab-count { background: var(--border); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .dash-balance-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { width: 260px; }
  .dash-two-col { grid-template-columns: 1fr; }
  .header-center { display: none; }
  .breadcrumb-root { display: none; }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .page-title { font-size: 20px; }
  .dash-welcome-title { font-size: 22px; }
  .dash-balance-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-value { font-size: 20px; }
  .stat-card { padding: 14px; }
  .insights { grid-template-columns: 1fr; }
  .header-balance { display: none; }
  .header { padding: 0 12px; }
  .tools-grid { grid-template-columns: 1fr; }
  .activity-status { display: none; }
  .chart-bar-value { display: none; }
  .chart-bar-label { font-size: 8px; }
  .user-menu { width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .chart-bar, .progress-fill, .tool-tile { transition-duration: 0.01ms !important; }
  .skeleton { animation: none; }
}
/* ===== NOTIF BADGE ===== */
.notif-dot {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--error); color: #fff;
  font-size: 9px; font-weight: 700;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}

/* ===== NOTIF LIST ===== */
.notif-list { display: flex; flex-direction: column; }
.notif-row { border-bottom: 1px solid var(--border); position: relative; }
.notif-row:last-child { border-bottom: none; }
.notif-row.unread { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.notif-inner {
  display: flex; gap: 12px; padding: 14px 16px;
  color: inherit; text-decoration: none;
  transition: background .12s;
}
.notif-inner:hover { background: var(--surface-2); }
.notif-icon {
  width: 36px; height: 36px; border-radius: var(--radius);
  background: var(--surface-2); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 500; }
.notif-msg { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-badge {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
}

/* ===== PKG GRID (dashboard) ===== */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.pkg-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.pkg-best { border-color: var(--primary); border-width: 2px; padding: 19px; }
.pkg-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; text-transform: uppercase;
  letter-spacing: 0.05em; white-space: nowrap;
}
.pkg-name { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 10px; }
.pkg-price { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.pkg-credits { display: flex; gap: 6px; align-items: baseline; margin-bottom: 4px; flex-wrap: wrap; }
.pkg-main { font-size: 15px; font-weight: 600; }
.pkg-bonus { font-size: 11px; font-weight: 600; background: rgba(16,185,129,0.12); color: var(--success); padding: 2px 6px; border-radius: 999px; }
.pkg-total { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.pkg-per { font-size: 11px; color: var(--text-muted); padding: 6px 0; border-top: 1px dashed var(--border); margin-top: 8px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .15s ease;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 440px;
  max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow-md);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-summary {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; background: var(--surface-2);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.modal-summary > div { display: flex; justify-content: space-between; align-items: center; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

/* ===== CREATIONS ===== */
.creations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.creation-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.creation-card:hover { border-color: var(--text-muted); transform: translateY(-2px); }
.creation-thumb {
  height: 120px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.creation-body { padding: 12px 14px; }
.creation-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.creation-type { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
.creation-prompt { font-size: 12px; line-height: 1.4; margin-bottom: 8px; min-height: 32px; }
.creation-meta { font-size: 10px; color: var(--text-muted); display: flex; gap: 4px; margin-bottom: 4px; }
.creation-time { font-size: 10px; color: var(--text-muted); }
/* ===== FEATURE BUILDER ADMIN ===== */
.feat-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.feat-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.feat-stat span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.feat-stat strong { font-size: 18px; font-family: 'Geist Mono', monospace; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-error { color: var(--error) !important; }

.feat-table { display: flex; flex-direction: column; }
.feat-row { display: grid; grid-template-columns: 2fr 1fr 1.2fr 0.8fr 1fr 1.4fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.feat-row:last-child { border-bottom: none; }
.feat-head { background: var(--surface-2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; }
.feat-name { font-weight: 500; font-size: 13px; }
.feat-id { font-size: 10px; color: var(--text-muted); }
.feat-actions { display: flex; gap: 4px; }
@media (max-width: 900px) {
  .feat-row { grid-template-columns: 1fr; gap: 4px; padding: 12px; }
  .feat-head { display: none; }
  .feat-actions { justify-content: flex-end; margin-top: 8px; }
}

.modal-lg { max-width: 720px; }
.modal-tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.modal-tab { padding: 10px 14px; font-size: 12.5px; font-weight: 500; background: transparent; border: none; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.modal-tab:hover { color: var(--text); }
.modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ===== TOOL DETAIL ===== */
.tool-detail { max-width: 1000px; margin: 0 auto; }
.tool-breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.tool-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.tool-breadcrumb a:hover { color: var(--primary); }
.tool-hero { display: flex; gap: 20px; margin-bottom: 24px; align-items: flex-start; }
.tool-hero > div { flex: 1; }
.tool-detail-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.tool-detail-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.tool-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tool-cover { width: 200px; height: 140px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.tool-run-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .tool-run-grid { grid-template-columns: 1fr; } .tool-hero { flex-direction: column; } .tool-cover { width: 100%; } }

/* ===== BEFORE/AFTER SLIDER ===== */
.ba-wrap { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); user-select: none; touch-action: none; margin-bottom: 12px; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-overlay { position: absolute; inset: 0; overflow: hidden; }
.ba-before { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.ba-handle { position: absolute; top: 0; bottom: 0; transform: translateX(-50%); pointer-events: none; }
.ba-line { width: 2px; height: 100%; background: #fff; box-shadow: 0 0 8px rgba(0,0,0,0.5); }
.ba-grip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.3); color: #000; }
.ba-label { position: absolute; top: 12px; font-size: 11px; font-weight: 600; padding: 4px 8px; background: rgba(0,0,0,0.7); color: #fff; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.ba-label-before { left: 12px; }
.ba-label-after { right: 12px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }
/* ===== CATEGORY TREE (Admin) ===== */
.cat-tree {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cat-tree-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cat-tree-item.expanded { border-color: var(--text-muted); }
.cat-tree-head {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 10px;
  text-align: left;
  color: inherit;
  font-family: inherit;
}
.cat-tree-head:hover { background: var(--surface-2); }
.cat-chevron {
  color: var(--text-muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.cat-tree-item.expanded .cat-chevron {
  transform: rotate(90deg);
  color: var(--primary);
}
.cat-tree-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.cat-tree-title { font-weight: 600; font-size: 14px; }
.cat-tree-id {
  font-size: 11px;
  color: var(--text-muted);
}
.cat-tree-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.cat-tree-count {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
}

.cat-tree-body {
  padding: 12px 14px 14px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  animation: catOpen .2s ease;
}
.cat-tree-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.cat-tree-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.cat-sub-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.cat-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 12.5px;
}
.cat-sub-row svg { color: var(--text-muted); flex-shrink: 0; }
.cat-sub-name { flex: 1; font-weight: 500; }
.cat-sub-count {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
}
.cat-sub-actions {
  display: flex;
  gap: 2px;
}

.cat-add-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all .12s;
  width: 100%;
  justify-content: center;
  margin-bottom: 12px;
}
.cat-add-sub:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,112,243,0.04);
}

.cat-tree-footer {
  display: flex;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .cat-tree-badges .cat-tree-count { display: none; }
  .cat-tree-id { display: none; }
}
/* ==========================================
   FIX ACCORDION KATALOG (LACI)
   ========================================== */
.cat-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .15s;
}
.cat-item:hover { border-color: var(--text-muted); }
.cat-item.open { border-color: var(--text-muted); }

.cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 12px;
  color: inherit;
  font-family: inherit;
}
.cat-head:hover { background: var(--surface-2); }

.cat-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.cat-chevron {
  color: var(--text-muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.cat-item.open .cat-chevron { transform: rotate(90deg); color: var(--primary); }

.cat-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cat-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-head-right { flex-shrink: 0; }
.cat-count {
  font-size: 11px;
  color: var(--text-muted);
  padding: 3px 9px;
  background: var(--surface-2);
  border-radius: 999px;
  font-family: 'Geist Mono', monospace;
}

.cat-body {
  padding: 0 8px 8px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.cat-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.subcat-group { padding-top: 8px; }
.subcat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.tool-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tool-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
  border: 1px solid transparent;
}
.tool-row:hover {
  background: var(--surface);
  border-color: var(--border);
}
.tool-row-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-row-body { flex: 1; min-width: 0; }
.tool-row-name {
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tool-row-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tool-cost-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Geist Mono', monospace;
  color: var(--primary);
  background: rgba(0,112,243,0.08);
  padding: 3px 8px;
  border-radius: 999px;
}
/* ===== WHATSAPP CHAT UI ===== */
.wa-wrapper {
    display: flex;
    height: calc(100vh - 120px);
    background: #efeae2;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: 16px;
}
.dark .wa-wrapper { background: #0b141a; }

/* Sidebar (Laci) */
.wa-sidebar { width: 280px; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; flex-shrink: 0; }
.wa-sidebar-header { padding: 16px; font-weight: 700; border-bottom: 1px solid var(--border); color: var(--text); font-size: 18px; }
.wa-char-list { flex: 1; overflow-y: auto; }
.wa-char-item { display: flex; padding: 12px 16px; gap: 12px; cursor: pointer; border-bottom: 1px solid var(--border); transition: 0.2s; }
.wa-char-item:hover, .wa-char-item.active { background: var(--surface-2); }
.wa-char-item img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.wa-char-name { font-weight: 600; color: var(--text); font-size: 15px; }
.wa-char-preview { font-size: 13px; color: var(--text-muted); }

/* Area Chat */
.wa-main { flex: 1; display: flex; flex-direction: column; position: relative; }
.wa-topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); z-index: 10; }
.wa-top-user { display: flex; align-items: center; gap: 12px; }
.wa-top-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.wa-top-name { font-weight: 600; font-size: 15px; color: var(--text); }
.wa-top-status { font-size: 12px; color: var(--success); }

/* Toggle Audio/Chat */
.wa-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.wa-toggle-track { width: 44px; height: 24px; background: var(--border); border-radius: 12px; position: relative; transition: 0.3s; }
.wa-toggle-thumb { width: 20px; height: 20px; background: #fff; border-radius: 50%; position: absolute; top: 2px; transition: 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.wa-toggle-thumb.left { left: 2px; background: var(--primary); }
.wa-toggle-thumb.right { left: 22px; background: var(--success); }
.wa-toggle-labels { display: flex; flex-direction: column; font-size: 10px; font-weight: 700; color: var(--text-muted); }
.wa-toggle-labels span.active { color: var(--primary); }

/* Pesan */
.wa-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.wa-bubble { max-width: 75%; padding: 8px 12px; border-radius: 8px; position: relative; font-size: 14px; line-height: 1.4; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0,0,0,0.1); }
.wa-in { align-self: flex-start; background: var(--surface); color: var(--text); border-top-left-radius: 0; }
.wa-out { align-self: flex-end; background: #d9fdd3; color: #111; border-top-right-radius: 0; }
.dark .wa-out { background: #005c4b; color: #e9edef; }
.dark .wa-in { background: #202c33; }

/* Audio Player */
.wa-audio-bubble { display: flex; flex-direction: column; gap: 6px; min-width: 250px; }
.wa-audio-bubble audio { width: 100%; height: 36px; border-radius: 4px; outline: none; }
.wa-audio-text { font-size: 12px; opacity: 0.7; font-style: italic; margin-top: 4px; padding: 0 4px; }

/* Animasi Mengetik */
.wa-typing { display: flex; gap: 4px; padding: 12px 16px; align-items: center; width: fit-content; }
.wa-typing span { width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; animation: typing 1.4s infinite ease-in-out both; }
.wa-typing span:nth-child(1) { animation-delay: -0.32s; }
.wa-typing span:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

/* Input Bawah */
.wa-input-area { display: flex; padding: 12px; background: var(--surface); gap: 8px; align-items: center; }
.wa-input-area input { flex: 1; padding: 12px 16px; border-radius: 24px; border: 1px solid var(--border); background: var(--bg); color: var(--text); outline: none; font-size: 14px; }
.wa-input-area button { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.wa-input-area button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Responsif Layar HP */
@media (max-width: 800px) {
    .wa-wrapper { flex-direction: column; height: calc(100vh - 140px); }
    .wa-sidebar { width: 100%; height: 76px; border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; align-items: center; }
    .wa-sidebar-header { display: none; }
    .wa-char-list { display: flex; width: 100%; }
    .wa-char-item { border-bottom: none; border-right: 1px solid var(--border); width: 100%; padding: 10px; }
    .wa-char-info { display: flex; flex-direction: column; justify-content: center; }
}

/* ===== WHATSAPP VOICE NOTE UI ===== */
.wa-vn {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    max-width: 260px;
    padding: 2px 0;
}
.wa-vn-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: 0.2s;
}
.wa-vn-btn:active { transform: scale(0.95); }
.wa-vn-track {
    flex: 1;
    height: 20px;
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.dark .wa-vn-track { background: rgba(255,255,255,0.2); }
.wa-vn-progress {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    pointer-events: none;
}
.wa-vn-thumb {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.wa-vn-time {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 32px;
    text-align: right;
    font-weight: 500;
}
/* Sembunyikan audio bawaan browser */
.wa-vn audio { display: none; }

/* ===== NAXACHAT UI (DARK THEME) ===== */
.naxa-app {
    display: flex; flex-direction: column;
    height: calc(100vh - 120px);
    background: #0d1117; /* Warna background gelap */
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid #30363d;
    max-width: 600px; margin: 0 auto;
}
.naxa-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px; background: #161b22; border-bottom: 1px solid #30363d;
}
.naxa-clear-btn, .naxa-back-btn {
    background: none; border: none; color: #8b949e; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 8px; border-radius: 50%; transition: 0.2s;
}
.naxa-clear-btn:hover, .naxa-back-btn:hover { background: #30363d; color: #fff; }
.naxa-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.naxa-avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.naxa-avatar-xs { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin-top: auto; }

/* Daftar Kontak */
.naxa-contact-list { flex: 1; overflow-y: auto; }
.naxa-contact-item {
    display: flex; align-items: center; gap: 16px; padding: 16px;
    cursor: pointer; border-bottom: 1px solid #21262d; transition: 0.2s;
}
.naxa-contact-item:hover { background: #161b22; }
.naxa-contact-name { font-weight: 600; color: #fff; font-size: 16px; margin-bottom: 4px; }
.naxa-contact-msg { font-size: 13px; color: #8b949e; }

/* Ruang Chat */
.naxa-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.naxa-msg-row { display: flex; gap: 8px; max-width: 85%; }
.naxa-in { align-self: flex-start; }
.naxa-out { align-self: flex-end; justify-content: flex-end; }
.naxa-bubble { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; color: #e6edf3; }
.naxa-bubble-in { background: #21262d; border-bottom-left-radius: 4px; }
.naxa-bubble-out { background: #2f81f7; color: #fff; border-bottom-right-radius: 4px; }

/* Audio Player (Naxa Style) */
.naxa-vn-wrap { width: 220px; }
.naxa-vn { display: flex; align-items: center; gap: 12px; }
.naxa-vn-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: #fff; color: #000; border: none;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer;
}
.naxa-vn-main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.naxa-waveform { display: flex; align-items: center; gap: 2px; height: 24px; cursor: pointer; }
.naxa-bar {
    flex: 1; background: #484f58; border-radius: 2px; transition: 0.1s;
}
.naxa-bar.filled { background: #fff; }
.naxa-vn-times { display: flex; justify-content: space-between; font-size: 10px; color: #8b949e; margin-top: 4px; }

/* Toggle Audio/Chat */
.naxa-mode-toggle {
    display: flex; background: #21262d; border-radius: 20px; padding: 4px; cursor: pointer;
}
.naxa-mode-toggle span {
    padding: 6px 12px; font-size: 12px; font-weight: 600; color: #8b949e; border-radius: 16px; transition: 0.2s;
}
.naxa-mode-toggle span.active { background: #2f81f7; color: #fff; }

/* Input Bawah */
.naxa-input-area { display: flex; padding: 12px; background: #161b22; border-top: 1px solid #30363d; gap: 8px; }
.naxa-input-area input {
    flex: 1; padding: 12px 16px; border-radius: 24px; border: 1px solid #30363d;
    background: #0d1117; color: #fff; outline: none; font-size: 14px;
}
.naxa-input-area button {
    width: 44px; height: 44px; border-radius: 50%; background: #2f81f7; color: #fff;
    border: none; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.naxa-input-area button:disabled { opacity: 0.5; }

/* ===== BUBBLE NOTE (TOAST) ===== */
.naxa-toast {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.9); /* Warna merah untuk notifikasi kredit terpotong */
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: toastFadeInOut 2.5s forwards;
    pointer-events: none;
}

@keyframes toastFadeInOut {
    0% { opacity: 0; transform: translate(-50%, -10px); }
    10% { opacity: 1; transform: translate(-50%, 0); }
    90% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* ===== IMAGE STUDIO LOADING ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== IMAGE STUDIO RESPONSIVE GRID ===== */
.image-studio-grid {
    display: grid;
    grid-template-columns: 1fr 350px; /* PC: Kiri luas, Kanan 350px */
    gap: 24px;
    align-items: start;
}

@media (max-width: 850px) {
    .image-studio-grid {
        grid-template-columns: 1fr; /* HP: Jadi 1 kolom atas-bawah */
    }
}

/* ===== FIX TOAST & SKELETON IMAGE STUDIO ===== */
.vyra-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--error);
    color: white;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Perbaiki tinggi skeleton agar tidak memanjang di HP */
.skeleton-img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1; /* Kotak sempurna */
    max-height: 400px; /* Batas tinggi maksimal */
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 12px;
    border: 1px solid var(--border);
}


/* Jika layar HP (di bawah 768px), paksa jadi 1 kolom atas-bawah */
@media (max-width: 768px) {
    .audio-form-grid {
        grid-template-columns: 1fr; 
    }
}

/* Paksa dropdown select agar lebarnya pas dan teksnya tidak keluar batas */
select.input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 14px;
}

/* ===== FIX AUDIO STUDIO DROPDOWN ===== */
.audio-form-grid {
    display: grid;
    grid-template-columns: 1fr; /* HP: Selalu 1 kolom ke bawah */
    gap: 16px;
    margin-bottom: 20px;
    width: 100%;
}

/* KUNCI RAHASIA: Mencegah kotak membesar melebihi layar HP */
.audio-form-grid > div {
    min-width: 0; 
    width: 100%;
}

/* Di layar PC (di atas 768px), baru jadikan 2 kolom */
@media (min-width: 768px) {
    .audio-form-grid {
        grid-template-columns: 1fr 1fr; 
    }
}

/* Paksa select 100% lebar container */
select.input {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 14px;
    text-overflow: ellipsis;
}
