/* ─────────────────────────────────────────────────────────
   Yuka CRM — Demo Mini-App UI
   ───────────────────────────────────────────────────────── */

/* ====== HERO PRODUCT PREVIEW ====== */
.hero-preview {
  position: relative;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  aspect-ratio: 5/4;
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
  transition: transform 0.6s ease;
}
.hero-preview:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(1.5deg); }

.hero-preview .titlebar {
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  gap: 14px;
}
.hero-preview .traffic {
  display: flex;
  gap: 6px;
}
.hero-preview .traffic span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: oklch(0.85 0.005 260);
}
[data-theme="dark"] .hero-preview .traffic span { background: oklch(0.4 0.012 260); }
.hero-preview .url {
  flex: 1;
  height: 22px;
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
}
.hero-preview .url::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  margin-right: 8px;
}

.hero-preview-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: calc(100% - 38px);
}
.hero-sidebar {
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.hero-sidebar .org {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.hero-sidebar .org-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-fg);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 11px;
  font-family: var(--font-serif);
  font-style: italic;
}
.hero-sidebar .org-name { font-weight: 500; color: var(--ink); }
.hero-sidebar .org-meta { font-size: 10px; color: var(--muted); font-family: var(--font-mono); }
.hero-sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s ease;
}
.hero-sidebar .nav-item:hover { background: var(--surface); }
.hero-sidebar .nav-item.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  border: 1px solid var(--border);
}
.hero-sidebar .nav-item .ic {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--border-strong);
}
.hero-sidebar .nav-item.active .ic { background: var(--accent); }

.hero-sidebar .credit-chip {
  margin-top: auto;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 11px;
}
.hero-sidebar .credit-chip .label { color: var(--muted); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.hero-sidebar .credit-chip .value { font-weight: 600; color: var(--accent-ink); margin-top: 4px; }
.hero-sidebar .credit-chip .bar {
  height: 4px;
  background: var(--bg);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}
.hero-sidebar .credit-chip .bar > div {
  height: 100%;
  background: var(--accent);
  width: 64%;
  border-radius: 4px;
}

.hero-main {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.hero-main h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.hero-main .tabs {
  display: flex;
  gap: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-main .tab {
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.hero-main .tab.active { background: var(--surface-2); color: var(--ink); }

/* Kanban mini */
.kanban-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.kanban-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}
.kanban-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  padding: 2px 4px;
}
.kanban-col-head .count {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--muted);
}
.kanban-col-head .pip {
  width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; display: inline-block; vertical-align: middle;
}
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: grab;
  box-shadow: 0 1px 2px oklch(0.18 0.012 260 / 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.kanban-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.kanban-card.dragging {
  transform: rotate(-2deg) scale(1.04);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.kanban-card .name { font-weight: 500; color: var(--ink); font-size: 12px; }
.kanban-card .meta { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.kanban-card .ch {
  width: 14px; height: 14px; border-radius: 4px; display: grid; place-items: center;
  color: white; font-size: 8px; font-weight: 700;
}
.ch.wa { background: var(--whatsapp); }
.ch.ig { background: var(--instagram); }
.ch.tg { background: var(--telegram); }
.ch.fb { background: var(--facebook); }
.ch.vk { background: var(--vk); }
.ch.web { background: oklch(0.5 0.01 260); }

/* ====== KANBAN DEMO (full feature) ====== */
.demo-kanban .demo-frame { padding: 0; }
.demo-kanban .kanban-board {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 16px;
  overflow: hidden;
}
.demo-kanban .col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.demo-kanban .col-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink); padding: 4px 4px 8px; border-bottom: 1px solid var(--border);
}
.demo-kanban .col-head .pip { width: 8px; height: 8px; border-radius: 50%; }
.demo-kanban .col-head span { display: flex; align-items: center; gap: 6px; }
.demo-kanban .col-head .count { background: var(--surface); padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.demo-kanban .lead-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.demo-kanban .lead-card .name { font-weight: 600; color: var(--ink); font-size: 13px; }
.demo-kanban .lead-card .biz { font-size: 11px; color: var(--muted); }
.demo-kanban .lead-card .row { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.demo-kanban .lead-card .ch {
  width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center;
  color: white; font-size: 9px; font-weight: 700;
}
.demo-kanban .lead-card .value {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--accent-ink);
  margin-left: auto;
}
.demo-kanban .lead-card.flying {
  position: absolute;
  z-index: 10;
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  transform: rotate(-3deg) scale(1.05);
}
.demo-kanban .ghost-slot {
  border: 1.5px dashed var(--accent);
  background: oklch(from var(--accent) l c h / 0.06);
  border-radius: 10px;
  height: 64px;
  animation: ghostPulse 1.4s ease-in-out infinite;
}
@keyframes ghostPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* ====== AVCI / MAP DEMO ====== */
.demo-avci .demo-frame { padding: 0; display: grid; grid-template-columns: 280px 1fr; }
.demo-avci .avci-panel {
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.demo-avci .search-row {
  display: flex;
  gap: 6px;
}
.demo-avci .search-input {
  flex: 1;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  padding: 0 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-family: var(--font-sans);
}
.demo-avci .search-input.typing::after {
  content: "▍";
  margin-left: 1px;
  animation: caret 0.8s steps(2) infinite;
  color: var(--accent);
}
@keyframes caret { 50% { opacity: 0; } }
.demo-avci .search-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.demo-avci .search-btn.searching {
  background: oklch(from var(--accent) calc(l - 0.05) c h);
}
.demo-avci .search-btn .spinner {
  width: 12px;
  height: 12px;
  border: 2px solid oklch(1 0 0 / 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.demo-avci .credit-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-family: var(--font-mono);
  padding: 8px 10px; background: var(--accent-soft); border-radius: 8px;
  color: var(--accent-ink);
}
.demo-avci .results-list {
  display: flex; flex-direction: column; gap: 8px;
  overflow: hidden;
  flex: 1;
}
.demo-avci .result-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.2s ease;
}
.demo-avci .result-item.appear { animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: none; }
}
.demo-avci .result-item .name { font-weight: 600; color: var(--ink); }
.demo-avci .result-item .addr { font-size: 11px; color: var(--muted); }
.demo-avci .result-item .meta { display: flex; gap: 8px; font-size: 10px; color: var(--muted); margin-top: 2px; }
.demo-avci .result-item .meta .star { color: var(--amber); }

.demo-avci .map {
  position: relative;
  background:
    radial-gradient(circle at 30% 40%, oklch(from var(--accent) l c h / 0.04), transparent 50%),
    radial-gradient(circle at 70% 60%, oklch(from var(--sky) l c h / 0.05), transparent 50%),
    var(--surface-2);
  overflow: hidden;
}
.demo-avci .map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(oklch(from var(--ink) l c h / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, oklch(from var(--ink) l c h / 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.demo-avci .map-roads {
  position: absolute; inset: 0;
  pointer-events: none;
}
.demo-avci .map-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -100%);
  z-index: 2;
}
.demo-avci .map-pin .body {
  width: 24px; height: 24px;
  background: var(--accent);
  border: 2px solid var(--surface);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 8px oklch(0.62 0.16 150 / 0.4);
  display: grid;
  place-items: center;
}
.demo-avci .map-pin .body::after {
  content: "";
  width: 8px; height: 8px;
  background: white;
  border-radius: 50%;
  transform: rotate(45deg);
}
.demo-avci .map-pin.appear { animation: pinDrop 0.6s cubic-bezier(0.5, 1.6, 0.5, 1) backwards; }
@keyframes pinDrop {
  from { transform: translate(-50%, -200%) scale(0); opacity: 0; }
  to { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}
.demo-avci .map-pulse {
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  animation: pulse-ring 2s ease-out infinite;
  z-index: 1;
}
@keyframes pulse-ring {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

/* ====== CHAT DEMO ====== */
.demo-chat .demo-frame { display: grid; grid-template-columns: 240px 1fr; padding: 0; }
.demo-chat .chat-list {
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
.demo-chat .chat-list-head {
  padding: 4px 8px 12px;
  font-size: 11px; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
}
.demo-chat .chat-list-head .badge {
  background: var(--accent); color: var(--accent-fg); padding: 1px 6px; border-radius: 999px; font-size: 10px;
}
.demo-chat .chat-row {
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.demo-chat .chat-row:hover { background: var(--surface-2); }
.demo-chat .chat-row.active { background: var(--surface-2); }
.demo-chat .chat-row .av {
  width: 30px; height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 600;
  font-size: 11px;
  position: relative;
}
.demo-chat .chat-row .av .ch {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 14px; height: 14px;
  border-radius: 4px;
  display: grid; place-items: center;
  color: white; font-size: 8px;
  border: 2px solid var(--surface);
}
.demo-chat .chat-row .meta {
  flex: 1;
  min-width: 0;
}
.demo-chat .chat-row .name {
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 500; color: var(--ink);
}
.demo-chat .chat-row .name .time { font-size: 10px; color: var(--muted); font-family: var(--font-mono); font-weight: 400; }
.demo-chat .chat-row .preview { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.demo-chat .chat-row .unread {
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
}

.demo-chat .chat-thread {
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  min-height: 0;
}
.demo-chat .thread-header {
  height: 50px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-chat .thread-header .av {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--whatsapp);
  color: white;
  font-weight: 600;
  font-size: 12px;
}
.demo-chat .thread-header .info { flex: 1; }
.demo-chat .thread-header .info .name { font-size: 13px; font-weight: 500; color: var(--ink); }
.demo-chat .thread-header .info .status { font-size: 11px; color: var(--accent-ink); display: flex; align-items: center; gap: 4px; }
.demo-chat .thread-header .info .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.demo-chat .messages {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.demo-chat .msg {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.4;
  animation: msgIn 0.4s ease backwards;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.demo-chat .msg.them {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.demo-chat .msg.you {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-fg);
  border-bottom-right-radius: 4px;
}
.demo-chat .msg .time { font-size: 9px; opacity: 0.7; margin-top: 4px; font-family: var(--font-mono); }
.demo-chat .msg .voice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.demo-chat .msg .voice .play {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.25);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.demo-chat .msg .voice .play::after {
  content: "";
  width: 0; height: 0;
  border-left: 7px solid white;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: 2px;
}
.demo-chat .msg .voice .wave {
  display: flex;
  gap: 2px;
  align-items: center;
}
.demo-chat .msg .voice .wave span {
  width: 2px;
  background: oklch(1 0 0 / 0.7);
  border-radius: 1px;
  animation: wave 1.2s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}
.demo-chat .transcript-card {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11px;
  margin-top: 6px;
  align-self: flex-end;
  max-width: 75%;
  box-shadow: 0 4px 12px -4px oklch(0.62 0.16 150 / 0.3);
  animation: cardSlide 0.5s ease backwards;
}
@keyframes cardSlide {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.demo-chat .transcript-card .label {
  font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-ink); display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.demo-chat .transcript-card .label::before {
  content: ""; width: 8px; height: 8px; background: var(--accent); border-radius: 2px;
}
.demo-chat .transcript-card .tr-text { color: var(--ink); }
.demo-chat .transcript-card .tr-tr { color: var(--muted); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); }
.demo-chat .transcript-card .tr-tr::before {
  content: "TR → EN  ";
  color: var(--accent-ink); font-family: var(--font-mono); font-size: 9px; font-weight: 600;
}

.demo-chat .composer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo-chat .composer .input {
  flex: 1;
  height: 36px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0 14px;
  font-size: 12px;
  display: flex;
  align-items: center;
  color: var(--muted);
}

/* ====== BROADCAST DEMO ====== */
.demo-broadcast .demo-frame { padding: 20px; gap: 16px; }
.demo-broadcast .broadcast-head {
  display: flex; justify-content: space-between; align-items: center;
}
.demo-broadcast .broadcast-head h4 { font-size: 16px; font-weight: 600; margin: 0; color: var(--ink); }
.demo-broadcast .broadcast-head .pill {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}
.demo-broadcast .broadcast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.demo-broadcast .compose-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.demo-broadcast .compose-card .label {
  font-size: 10px; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted);
}
.demo-broadcast .audience {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  font-size: 12px; color: var(--ink);
}
.demo-broadcast .audience .count { margin-left: auto; font-family: var(--font-mono); font-weight: 600; color: var(--accent-ink); }
.demo-broadcast .msg-textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--ink);
  min-height: 80px;
  font-family: var(--font-sans);
  white-space: pre-wrap;
  line-height: 1.5;
  position: relative;
}
.demo-broadcast .msg-textarea .var {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 0 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.demo-broadcast .msg-textarea .typing-caret {
  display: inline-block;
  width: 1px;
  background: var(--accent);
  animation: caret 0.8s steps(2) infinite;
}

.demo-broadcast .stats-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.demo-broadcast .stats-card .progress-row {
  display: grid; grid-template-columns: 70px 1fr 50px;
  gap: 10px; align-items: center;
  font-size: 11px;
}
.demo-broadcast .stats-card .progress-row .ch-label {
  display: flex; align-items: center; gap: 6px; color: var(--ink);
}
.demo-broadcast .stats-card .bar {
  height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden;
  border: 1px solid var(--border);
}
.demo-broadcast .stats-card .bar > div {
  height: 100%; background: var(--accent); border-radius: 4px;
  transition: width 0.6s ease;
}
.demo-broadcast .stats-card .num {
  text-align: right; font-family: var(--font-mono); color: var(--ink);
}
.demo-broadcast .stats-card .totals {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.demo-broadcast .stats-card .totals .stat {
  text-align: center;
}
.demo-broadcast .stats-card .totals .stat .v {
  font-size: 18px; font-weight: 600; color: var(--ink); font-family: var(--font-mono);
}
.demo-broadcast .stats-card .totals .stat .l {
  font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px;
}

/* ====== VOICE DEMO ====== */
.demo-voice .demo-frame { padding: 28px; gap: 20px; align-items: center; justify-content: center; }
.demo-voice .voice-stage {
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.demo-voice .recorder {
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.demo-voice .recorder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 50%, oklch(from var(--accent) l c h / 0.08), transparent 70%);
}
.demo-voice .recorder .play {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
  color: var(--accent-fg);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.demo-voice .recorder .play::after {
  content: "";
  width: 0; height: 0;
  border-left: 11px solid currentColor;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 3px;
}
.demo-voice .waveform {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 36px;
  position: relative;
  z-index: 1;
}
.demo-voice .waveform span {
  flex: 1;
  background: var(--accent);
  border-radius: 1.5px;
  opacity: 0.4;
  transition: opacity 0.25s ease, height 0.25s ease;
  min-width: 2px;
}
.demo-voice .waveform span.played { opacity: 1; }
.demo-voice .recorder .time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  position: relative; z-index: 1;
}

.demo-voice .pipeline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.demo-voice .pipeline .step {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: all 0.4s ease;
}
.demo-voice .pipeline .step.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: scale(1.04);
}
.demo-voice .pipeline .step.done {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--ink);
}
.demo-voice .pipeline .arrow {
  width: 16px;
  color: var(--muted-2);
  font-size: 14px;
}

.demo-voice .transcript-out {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  font-size: 14px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}
.demo-voice .transcript-out .lang-badge {
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.demo-voice .transcript-out .lang-badge .flag {
  width: 16px; height: 12px;
  border-radius: 2px;
  background: var(--accent);
}
.demo-voice .transcript-out .text {
  color: var(--ink);
  line-height: 1.5;
  min-height: 22px;
}
.demo-voice .transcript-out .typing::after {
  content: "▍";
  color: var(--accent);
  animation: caret 0.8s steps(2) infinite;
}
.demo-voice .transcript-out .divider {
  height: 1px; background: var(--border); margin: 4px 0;
}
.demo-voice .transcript-out .tr-en {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  min-height: 20px;
}

/* ====== TEAM DEMO ====== */
.demo-team .demo-frame { padding: 20px; }
.demo-team .team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}
.demo-team .role-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.demo-team .role-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink); padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.demo-team .role-head .crown {
  width: 14px; height: 14px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 9px; font-weight: 700;
}
.demo-team .member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.5, 1.6, 0.5, 1), border-color 0.3s ease;
}
.demo-team .member.promoting { animation: promote 0.8s ease; }
@keyframes promote {
  0% { transform: scale(1); }
  40% { transform: scale(1.06) translateY(-4px); }
  60% { transform: scale(1.06) translateY(-4px); border-color: var(--accent); }
  100% { transform: scale(1); }
}
.demo-team .member .av {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.demo-team .member .info { flex: 1; min-width: 0; }
.demo-team .member .name { font-size: 12px; font-weight: 500; color: var(--ink); }
.demo-team .member .stat { font-size: 10px; color: var(--muted); font-family: var(--font-mono); }
.demo-team .member .perms {
  display: flex; gap: 3px;
}
.demo-team .member .perms .p {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.demo-team .member .perms .p.off { background: var(--border-strong); }
.demo-team .add-btn {
  margin-top: auto;
  padding: 8px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 8px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ====== INTEGRATION DEMO ====== */
.demo-integrations .demo-frame { padding: 24px; align-items: center; justify-content: center; }
.demo-integrations .hub {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.demo-integrations .core {
  width: 100px; height: 100px;
  background: linear-gradient(135deg, var(--accent), oklch(from var(--accent) calc(l + 0.08) c calc(h - 30)));
  border-radius: 28px;
  display: grid; place-items: center;
  color: var(--accent-fg);
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: 36px;
  z-index: 4;
  box-shadow: 0 12px 40px -8px oklch(0.62 0.16 150 / 0.5);
  position: relative;
}
.demo-integrations .core::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 36px;
  border: 1px dashed oklch(from var(--accent) l c h / 0.4);
  animation: spin 30s linear infinite;
}
.demo-integrations .channel-pin {
  position: absolute;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
  z-index: 3;
}
.demo-integrations .channel-pin .ic {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
}
.demo-integrations .channel-pin .ic.wa { background: var(--whatsapp); }
.demo-integrations .channel-pin .ic.ig { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.demo-integrations .channel-pin .ic.fb { background: var(--facebook); }
.demo-integrations .channel-pin .ic.tg { background: var(--telegram); }
.demo-integrations .channel-pin .ic.vk { background: var(--vk); }
.demo-integrations .channel-pin .ic.web { background: linear-gradient(135deg, oklch(0.5 0.01 260), oklch(0.3 0.01 260)); }

.demo-integrations .channel-pin .label {
  position: absolute;
  bottom: -22px;
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.demo-integrations .pulse-line {
  position: absolute;
  top: 50%; left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent, oklch(from var(--accent) l c h / 0.4), transparent);
  transform-origin: top center;
  z-index: 1;
}
.demo-integrations .pulse-line::after {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--accent);
  animation: travelDown 2.4s ease-in-out infinite;
}
@keyframes travelDown {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
