/* ═══════════════════════════════════════════════
   TradeHub Marketplace — Desktop App CSS
   Dark premium trading platform
═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg:        #0a0c10;
  --bg2:       #0f1117;
  --bg3:       #141720;
  --bg4:       #1c2033;
  --bg5:       #232847;
  --brand:     #7c3aed;
  --brand-l:   #9c6fff;
  --brand-d:   #5b21b6;
  --green:     #10b981;
  --green-l:   #34d399;
  --red:       #ef4444;
  --orange:    #f59e0b;
  --blue:      #3b82f6;
  --cyan:      #06b6d4;
  --pink:      #ec4899;
  --yellow:    #fbbf24;
  --txt:       #e8eaf0;
  --txt2:      #9198a8;
  --txt3:      #525d72;
  --border:    rgba(255,255,255,.07);
  --border2:   rgba(255,255,255,.12);
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow:    0 4px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.6);
  --sidebar-w: 230px;
  --topbar-h:  58px;
  --font:      'Plus Jakarta Sans', -apple-system, sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --trans:     .18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 10px; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); border: none; }
input, select, textarea { font-family: var(--font); outline: none; }

/* ─── LAYOUT ────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  z-index: 100;
  transition: width var(--trans);
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .sidebar-search input,
.sidebar.collapsed .sidebar-search kbd,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-invite-card { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.logo-mark {
  width: 34px; height: 34px;
  background: var(--brand);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: #fff;
  flex-shrink: 0;
}
.logo-text { font-size: 15px; font-weight: 700; white-space: nowrap; }
.logo-text span { color: var(--brand-l); }

.sidebar-search {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  flex-shrink: 0;
}
.sidebar-search i { color: var(--txt3); font-size: 12px; }
.sidebar-search input {
  background: none; border: none; color: var(--txt);
  font-size: 12px; flex: 1; min-width: 0;
}
.sidebar-search input::placeholder { color: var(--txt3); }
.sidebar-search kbd {
  background: var(--bg4); border: 1px solid var(--border2);
  color: var(--txt3); font-size: 10px; padding: 2px 5px; border-radius: 4px;
  flex-shrink: 0;
}

.sidebar-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--txt3); padding: 10px 16px 4px;
}
.sidebar-nav { padding: 0 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--txt2);
  transition: var(--trans); cursor: pointer; margin-bottom: 1px;
  border-left: 2px solid transparent;
}
.nav-item i { width: 16px; text-align: center; font-size: 13px; }
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--txt); }
.nav-item.active {
  background: rgba(124,58,237,.12);
  color: #fff;
  border-left-color: var(--brand-l);
}
.nav-badge {
  margin-left: auto; background: var(--green);
  color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 20px;
}

.sidebar-invite-card {
  margin: 10px 10px 12px;
  background: linear-gradient(135deg, rgba(124,58,237,.2), rgba(60,30,120,.3));
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 12px; padding: 12px; position: relative;
  flex-shrink: 0;
}
.sidebar-invite-close {
  position: absolute; top: 6px; right: 8px;
  background: none; color: var(--txt3); font-size: 14px;
}
.invite-icon { font-size: 26px; margin-bottom: 4px; }
.invite-title { font-size: 13px; font-weight: 700; }
.invite-sub { font-size: 11px; color: var(--txt2); margin: 2px 0 8px; }
.invite-btn {
  display: block; text-align: center;
  background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 700; padding: 7px;
  border-radius: 7px; transition: var(--trans);
}
.invite-btn:hover { background: var(--brand-l); }

/* ─── TOPBAR ─────────────────────────────────────── */
.topbar {
  position: fixed; top: 0;
  left: var(--sidebar-w); right: 0;
  height: var(--topbar-h);
  background: rgba(10,12,16,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  z-index: 99;
  transition: left var(--trans);
}
.sidebar.collapsed ~ .main-wrap .topbar,
.sidebar.collapsed ~ #topbar { left: 64px; }
.sidebar-toggle {
  background: none; color: var(--txt2);
  padding: 6px; font-size: 15px;
  transition: var(--trans);
}
.sidebar-toggle:hover { color: var(--txt); }
.topbar-center { flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.topbar-notif {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; font-size: 14px;
  color: var(--txt2); transition: var(--trans);
}
.topbar-notif:hover { color: var(--txt); background: var(--bg4); }
.notif-dot {
  position: absolute; top: -3px; right: -3px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  border-radius: 50%; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.topbar-wallet {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 12px;
  font-size: 13px; font-weight: 700; color: var(--green);
  font-family: var(--mono);
}
.topbar-wallet i { color: var(--txt2); font-size: 13px; }
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 9px; padding: 5px 12px 5px 5px;
  cursor: pointer; transition: var(--trans); position: relative;
}
.topbar-user:hover { background: var(--bg4); }
.topbar-avatar {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-l));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.topbar-user-name { font-size: 12px; font-weight: 700; line-height: 1.2; }
.topbar-user-role { font-size: 10px; color: var(--txt3); }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; padding: 6px; min-width: 190px;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: var(--trans); z-index: 200;
}
.user-dropdown.open { opacity: 1; pointer-events: all; transform: none; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; color: var(--txt2); transition: var(--trans);
}
.user-dropdown a:hover { background: var(--bg4); color: var(--txt); }
.user-dropdown a i { width: 14px; text-align: center; }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* ─── MAIN WRAP ──────────────────────────────────── */
.main-wrap {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
  transition: margin-left var(--trans);
}
.sidebar.collapsed ~ .main-wrap { margin-left: 64px; }
.page-content { padding: 24px 24px 40px; max-width: 1440px; }

/* ─── PAGE HEADER ────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.page-header-left { display: flex; align-items: center; gap: 14px; }
.page-header-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.page-title { font-size: 24px; font-weight: 800; line-height: 1.2; }
.page-sub { font-size: 13px; color: var(--txt2); margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 10px; }

/* ─── STATS ROW ──────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stats-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stats-row.cols-5 { grid-template-columns: repeat(5, 1fr); }
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.stat-label { font-size: 11px; font-weight: 600; color: var(--txt3); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 800; font-family: var(--mono); line-height: 1; }
.stat-change { font-size: 11px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ─── CARDS / PANELS ─────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 700; }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); }

/* ─── GRID LAYOUTS ───────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.content-cols { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.content-cols.narrow-right { grid-template-columns: 1fr 300px; }

/* ─── PRODUCT CARDS ──────────────────────────────── */
.product-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--trans); cursor: pointer;
}
.product-card:hover { border-color: var(--brand-l); transform: translateY(-2px); box-shadow: var(--shadow); }
.product-card-img {
  width: 100%; height: 160px; object-fit: cover;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 16px; }
.product-card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card-sub { font-size: 11px; color: var(--txt2); margin-bottom: 10px; }
.product-card-stats { display: flex; gap: 12px; margin-bottom: 12px; }
.pcs { font-size: 11px; color: var(--txt2); }
.pcs strong { color: var(--txt); display: block; font-size: 13px; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.product-price.green { color: var(--green); }
.product-price.brand { color: var(--brand-l); }

/* ─── TRADER / MENTOR CARDS ──────────────────────── */
.trader-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  transition: var(--trans);
}
.trader-card:hover { border-color: var(--green); }
.trader-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.trader-avatar {
  width: 52px; height: 52px; border-radius: 14px;
  overflow: hidden; flex-shrink: 0;
  background: var(--bg4);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.trader-avatar img { width: 100%; height: 100%; object-fit: cover; }
.trader-name { font-size: 15px; font-weight: 700; }
.trader-spec { font-size: 11px; color: var(--txt2); margin-top: 2px; }
.trader-verified { color: var(--blue); font-size: 12px; margin-left: 4px; }
.rank-badge {
  margin-left: auto; background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 2px 8px;
  font-size: 10px; font-weight: 700; color: var(--txt2);
}
.rank-badge.live { background: rgba(16,185,129,.15); color: var(--green); border-color: rgba(16,185,129,.3); }

.sparkline { width: 100%; height: 36px; margin: 8px 0; }
.trader-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tm { text-align: center; background: var(--bg3); border-radius: 8px; padding: 8px; }
.tm-val { font-size: 14px; font-weight: 700; font-family: var(--mono); }
.tm-lbl { font-size: 9px; color: var(--txt3); margin-top: 2px; }

/* ─── POOL CARDS ─────────────────────────────────── */
.pool-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  transition: var(--trans); position: relative;
}
.pool-card:hover { border-color: var(--brand-l); }
.pool-card.top-pick { border-color: rgba(251,191,36,.3); background: linear-gradient(160deg, rgba(251,191,36,.04), var(--bg2)); }
.pool-top-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(251,191,36,.15); color: var(--yellow);
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
}
.pool-icon { font-size: 36px; margin: 8px 0 12px; text-align: center; }
.pool-name { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.pool-members { font-size: 11px; color: var(--txt2); margin-bottom: 10px; }
.pool-return { font-size: 28px; font-weight: 800; font-family: var(--mono); color: var(--green); }
.pool-meta { display: flex; justify-content: space-between; margin: 10px 0 14px; }
.pool-meta-item { font-size: 11px; color: var(--txt2); }
.pool-meta-item strong { display: block; font-size: 13px; color: var(--txt); }

/* ─── TABLE ──────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 10px 14px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--txt3);
  text-transform: uppercase; letter-spacing: .04em;
  background: var(--bg3); border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
.data-table tr:hover td { background: rgba(255,255,255,.02); }
.data-table tr:last-child td { border-bottom: none; }

/* ─── BADGES ─────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 700;
}
.badge-green  { background: rgba(16,185,129,.15); color: var(--green); }
.badge-red    { background: rgba(239,68,68,.15);  color: var(--red); }
.badge-brand  { background: rgba(124,58,237,.15); color: var(--brand-l); }
.badge-orange { background: rgba(245,158,11,.15); color: var(--orange); }
.badge-blue   { background: rgba(59,130,246,.15); color: var(--blue); }
.badge-grey   { background: rgba(255,255,255,.08); color: var(--txt2); }
.badge-cyan   { background: rgba(6,182,212,.15);  color: var(--cyan); }

/* ─── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: 9px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--trans); border: none; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-l); }
.btn-green  { background: var(--green); color: #fff; }
.btn-green:hover { filter: brightness(1.1); }
.btn-outline { background: transparent; border: 1px solid var(--border2); color: var(--txt2); }
.btn-outline:hover { border-color: var(--brand-l); color: var(--txt); }
.btn-ghost  { background: transparent; color: var(--txt2); }
.btn-ghost:hover { background: var(--bg3); color: var(--txt); }
.btn-sm     { padding: 6px 12px; font-size: 12px; }
.btn-lg     { padding: 13px 28px; font-size: 15px; }
.btn-full   { width: 100%; }

/* ─── FILTERS / TABS ─────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.filter-tab {
  padding: 7px 14px; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--txt2); transition: var(--trans);
}
.filter-tab.active, .filter-tab:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.filter-tab-outline.active { background: transparent; border-color: var(--brand-l); color: var(--brand-l); }
.page-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.page-tab {
  padding: 12px 18px; font-size: 13px; font-weight: 600;
  color: var(--txt2); cursor: pointer; border-bottom: 2px solid transparent;
  transition: var(--trans);
}
.page-tab.active { color: var(--brand-l); border-bottom-color: var(--brand-l); }

/* ─── FORMS ──────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--txt2); margin-bottom: 6px; letter-spacing: .02em; }
.form-control {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--border2); border-radius: 9px;
  color: var(--txt); font-size: 14px; padding: 11px 14px;
  transition: var(--trans);
}
.form-control:focus { border-color: var(--brand-l); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.form-control::placeholder { color: var(--txt3); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239198a8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-check { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.form-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.form-error { color: var(--red); font-size: 11px; margin-top: 4px; }
.form-hint  { color: var(--txt3); font-size: 11px; margin-top: 4px; }
.input-group { display: flex; gap: 0; }
.input-group .form-control { border-radius: 9px 0 0 9px; }
.input-group .btn { border-radius: 0 9px 9px 0; }
.input-prefix {
  background: var(--bg4); border: 1px solid var(--border2); border-right: none;
  border-radius: 9px 0 0 9px; padding: 0 12px;
  display: flex; align-items: center; font-size: 12px; color: var(--txt3); white-space: nowrap;
}
.input-prefix ~ .form-control { border-radius: 0 9px 9px 0; }

/* ─── AUTH PAGES ─────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 30% 20%, rgba(124,58,237,.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(16,185,129,.08) 0%, transparent 60%),
              var(--bg);
  padding: 20px;
}
.auth-card {
  width: 100%; max-width: 460px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; justify-content: center; }
.auth-title { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--txt2); text-align: center; margin-bottom: 28px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 11px; color: var(--txt3); }
.auth-footer { text-align: center; font-size: 13px; color: var(--txt2); margin-top: 20px; }
.auth-footer a { color: var(--brand-l); font-weight: 600; }
.alert {
  padding: 12px 16px; border-radius: 9px; margin-bottom: 16px;
  font-size: 13px; display: flex; align-items: flex-start; gap: 10px;
}
.alert-error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }

/* ─── AI STUDIO ──────────────────────────────────── */
.studio-hero {
  background: linear-gradient(135deg, rgba(124,58,237,.2) 0%, rgba(60,30,120,.3) 100%);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: var(--radius-xl); padding: 32px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.studio-hero-text h2 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.studio-hero-text h2 span { color: var(--brand-l); }
.studio-hero-text p { color: var(--txt2); font-size: 14px; max-width: 480px; }
.studio-stats { display: flex; gap: 32px; margin-top: 20px; }
.studio-stat-val { font-size: 22px; font-weight: 800; font-family: var(--mono); }
.studio-stat-lbl { font-size: 11px; color: var(--txt2); }
.studio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.studio-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  transition: var(--trans); cursor: pointer;
}
.studio-card:hover { border-color: var(--brand-l); transform: translateY(-2px); }
.studio-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 12px;
}
.studio-card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.studio-card-desc { font-size: 12px; color: var(--txt2); line-height: 1.5; margin-bottom: 14px; }

/* AI Bot Builder Chat */
.bot-builder {
  display: grid; grid-template-columns: 1fr 380px; gap: 20px; height: calc(100vh - 160px);
}
.chat-panel {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); display: flex; flex-direction: column;
}
.chat-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.ai-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-l)); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 10px; max-width: 85%; }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.msg.ai .msg-avatar { background: linear-gradient(135deg, var(--brand), var(--brand-l)); }
.msg.user .msg-avatar { background: var(--bg4); }
.msg-bubble {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px; font-size: 13px; line-height: 1.6;
}
.msg.user .msg-bubble { background: rgba(124,58,237,.2); border-color: rgba(124,58,237,.3); }
.chat-input-area { padding: 16px 20px; border-top: 1px solid var(--border); }
.chat-input-wrap {
  display: flex; gap: 8px; align-items: flex-end;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; padding: 10px 12px;
}
.chat-input-wrap textarea {
  flex: 1; background: none; border: none; color: var(--txt);
  font-size: 13px; resize: none; max-height: 100px; min-height: 20px;
  line-height: 1.5;
}
.chat-input-wrap textarea::placeholder { color: var(--txt3); }
.chat-send-btn {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: var(--trans);
}
.chat-send-btn:hover { background: var(--brand-l); }
.chat-send-btn:disabled { background: var(--bg4); cursor: not-allowed; }
.bot-preview-panel {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); display: flex; flex-direction: column;
  overflow: hidden;
}
.bot-preview-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.bot-config-form { flex: 1; overflow-y: auto; padding: 20px; }
.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-l); animation: bounce .8s infinite; }
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,80%,100% { transform: scale(0); } 40% { transform: scale(1); } }

/* ─── LIVE ACTIVITY PANEL ────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 12px; }
.activity-item { display: flex; align-items: flex-start; gap: 10px; }
.activity-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.activity-body { flex: 1; }
.activity-title { font-size: 13px; font-weight: 600; }
.activity-sub { font-size: 11px; color: var(--txt2); }
.activity-time { font-size: 10px; color: var(--txt3); margin-left: auto; white-space: nowrap; }

/* ─── MISC ────────────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 16px; font-weight: 700; }
.view-all { font-size: 12px; color: var(--brand-l); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.view-all:hover { text-decoration: underline; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--txt3); }
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }
.loading-spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--bg4); border-top-color: var(--brand-l);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.verified-tag { color: var(--blue); font-size: 12px; }
.stars { color: var(--yellow); font-size: 12px; }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .content-cols { grid-template-columns: 1fr; }
  .bot-builder { grid-template-columns: 1fr; height: auto; }
}
@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .studio-cards { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  :root { --sidebar-w: 64px; }
  .logo-text, .sidebar-search input, .sidebar-search kbd,
  .sidebar-section-label, .nav-badge, .sidebar-invite-card { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .studio-cards { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
}
