@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700&display=swap");

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --sidebar: #0c1220;
  --sidebar-2: #0c1220;
  --sidebar-fg: #94a3b8;
  --sidebar-muted: #475569;
  --sidebar-active: #1e3a5f;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #0ea5e9;
  --accent-2: #0284c7;
  --accent-soft: #f0f9ff;
  --wa: #25d366;
  --shadow: none;
  font-family: Inter, "Segoe UI", sans-serif;
}

body { background: var(--bg); }
h1, h2, .brand-name, .stat-value { font-family: Outfit, Inter, sans-serif; letter-spacing: -0.4px; }

.sidebar {
  width: 228px;
  background: #0c1220;
  border-right: 1px solid #1a2540;
}
.rq-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
  border-bottom: 1px solid #1a2540;
  color: #f1f5f9;
  text-decoration: none;
}
.rq-brand-pill {
  display: flex;
  align-items: center;
  width: 100%;
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  box-sizing: border-box;
}
.rq-brand-logo {
  display: block;
  height: 32px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}
.rq-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: grid;
  place-items: center;
}
.rq-mark span { color: #fff; font-weight: 700; font-size: 14px; }
.rq-brand strong { font-family: Outfit, Inter, sans-serif; font-size: 17px; font-weight: 700; }
.rq-brand strong em { color: #0ea5e9; font-style: normal; }

#nav { padding: 16px 12px; gap: 0; overflow: auto; }
.nav-label {
  margin: 14px 8px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
}
#nav a[hidden],
.sidebar-foot > a[hidden],
#nav .nav-label[hidden] {
  display: none !important;
}
#nav a, .sidebar-foot > a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 2px;
  font-size: 13.5px;
  font-weight: 400;
}
#nav a span, .sidebar-foot > a span { flex: 1; }
#nav a:hover, #nav a.active, .sidebar-foot > a:hover, .sidebar-foot > a.active {
  background: #1e3a5f;
  color: #e2f0ff;
  font-weight: 600;
}
#nav a.active .nav-ico { color: #0ea5e9; }
#nav a[data-wa].active .nav-ico { color: #25d366; }
.nav-ico { width: 16px; height: 16px; flex-shrink: 0; }
.nav-badge {
  flex: 0 0 auto;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.rq-user { position: relative; }
.rq-chevron { width: 14px; height: 14px; color: #64748b; flex-shrink: 0; }
.rq-avatar { background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; }

.dq-page { max-width: 1100px; margin: 0 auto; }
.dq-hello h1, .dq-head h1 { margin: 0; font-family: Outfit, Inter, sans-serif; font-size: 24px; font-weight: 700; letter-spacing: -0.5px; color: #0f172a; }
.dq-hello p, .dq-head p { margin: 2px 0 0; color: #64748b; font-size: 13px; }
.dq-hello { margin-bottom: 24px; }
.dq-hello h1 { font-size: 26px; }
.dq-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.dq-trend { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 99px; }
.dq-trend.up { background: #f0fdf4; color: #16a34a; }
.dq-trend.down { background: #fef2f2; color: #dc2626; }
.dq-wa-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.dq-wa-meta b { color: #16a34a; font-size: 12px; }
.dq-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; }
.dq-stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dq-stat-top span { font-size: 12px; font-weight: 500; color: #64748b; }
.dq-stat strong { display: block; font-family: Outfit, Inter, sans-serif; font-size: 28px; font-weight: 700; letter-spacing: -1px; }
.dq-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dq-stack { display: flex; flex-direction: column; gap: 20px; }
.dq-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; }
.dq-card-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #f1f5f9; }
.dq-card-h h2 { margin: 0; font-size: 14px; font-weight: 600; color: #0f172a; font-family: Inter, sans-serif; letter-spacing: 0; }
.dq-card-b { padding: 8px 20px 12px; }
.dq-card table { width: 100%; border-collapse: collapse; }
.dq-card th { text-align: left; font-size: 11px; font-weight: 600; color: #94a3b8; padding: 8px 0; text-transform: uppercase; letter-spacing: 0.05em; }
.dq-card td { padding: 10px 0; font-size: 13px; border-top: 1px solid #f8fafc; color: #64748b; }
.dq-card td:first-child { font-weight: 500; color: #1e293b; }
.dq-link { font-size: 11px; font-weight: 500; cursor: pointer; }
.dq-link.mail { color: #6366f1; }
.dq-link.wa { color: #25d366; }
.dq-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #f1f5f9; color: #64748b; }
.dq-badge.sent, .dq-badge.approved, .dq-badge.subscribed { background: #f0fdf4; color: #16a34a; }
.dq-badge.scheduled { background: #fff7ed; color: #ea580c; }
.dq-badge.active, .dq-badge.sending, .dq-badge.pending { background: #eff6ff; color: #2563eb; }
.dq-badge.bounced, .dq-badge.rejected, .dq-badge.failed, .dq-badge.complained { background: #fef2f2; color: #dc2626; }
.dq-badge.unsubscribed, .dq-badge.draft, .dq-badge.paused { background: #f1f5f9; color: #64748b; }
.dq-wa-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f8fafc; }
.dq-wa-row p { margin: 0; font-size: 13px; font-weight: 500; color: #1e293b; }
.dq-wa-row small { color: #94a3b8; font-size: 11px; }
.dq-activity { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f8fafc; }
.dq-activity i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; flex-shrink: 0; }
.dq-activity p { margin: 0; font-size: 12px; color: #374151; line-height: 1.4; }
.dq-activity small { color: #9ca3af; font-size: 11px; }

.dq-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dq-head-actions { display: flex; gap: 8px; }
.btn-outline { border: 1px solid #e2e8f0; background: #fff; color: #374151; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-sky { background: #0ea5e9; color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-wa { background: #25d366; color: #fff; border: 0; border-radius: 8px; padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer; }

.dq-table { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.dq-search { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }
.dq-search input, .dq-search select { border: 0; outline: none; background: transparent; font-size: 13px; color: #374151; }
.dq-search input { flex: 1; }
.dq-search select { color: #64748b; font-size: 12px; }
.dq-table table { width: 100%; border-collapse: collapse; }
.dq-table th { text-align: left; font-size: 11px; font-weight: 600; color: #94a3b8; padding: 10px 16px; text-transform: uppercase; letter-spacing: 0.05em; background: #f8fafc; }
.dq-table td { padding: 12px 16px; border-top: 1px solid #f1f5f9; font-size: 13px; color: #64748b; vertical-align: middle; }
.dq-person { display: flex; align-items: center; gap: 10px; }
.dq-avatar { width: 32px; height: 32px; border-radius: 50%; background: #eff6ff; color: #2563eb; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.dq-person strong { font-size: 13px; font-weight: 500; color: #1e293b; }
.dq-phone { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; }
.dq-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.dq-tag { background: #eff6ff; color: #2563eb; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 99px; }
.dq-row-actions { display: flex; gap: 8px; opacity: 0; }
tr:hover .dq-row-actions { opacity: 1; }
.dq-row-actions button { border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.dq-row-actions .edit { border: 1px solid #e2e8f0; background: #fff; color: #374151; }
.dq-row-actions .del { border: 1px solid #fecaca; background: #fff5f5; color: #dc2626; }

.dq-cards { display: flex; flex-direction: column; gap: 12px; }
.dq-camp { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px 24px; color: inherit; text-decoration: none; }
.dq-camp:hover { box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06); }
.dq-camp h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: #0f172a; display: flex; align-items: center; gap: 10px; }
.dq-camp .meta { margin: 0; font-size: 12px; color: #94a3b8; }
.dq-camp-main { flex: 1; min-width: 0; }
.dq-metrics { display: grid; grid-template-columns: repeat(4, 72px); gap: 16px; }
.dq-metrics strong { display: block; text-align: center; font-family: Outfit, Inter, sans-serif; font-size: 18px; letter-spacing: -0.5px; }
.dq-metrics span { display: block; text-align: center; font-size: 11px; color: #94a3b8; }
.dq-wa-mark { width: 40px; height: 40px; border-radius: 10px; background: #f0fdf4; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.dq-chev { color: #cbd5e1; flex-shrink: 0; }

.split-on { padding: 0 !important; overflow: hidden; display: flex; flex-direction: column; }
.tpl-split { display: flex; height: 100%; min-height: calc(100vh - 52px); }
.tpl-list { width: 260px; border-right: 1px solid #e2e8f0; background: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.tpl-list.wa { width: 248px; }
.tpl-list header { padding: 16px 14px; border-bottom: 1px solid #f1f5f9; }
.tpl-list h2 { margin: 0 0 10px; font-family: Outfit, Inter, sans-serif; font-size: 15px; }
.tpl-list header button, .tpl-list header a.btn-sky, .tpl-list header a.btn-wa { display: block; width: 100%; text-align: center; text-decoration: none; }
.tpl-list nav { flex: 1; overflow: auto; padding: 8px; }
.tpl-item { width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; border: 0; margin-bottom: 2px; cursor: pointer; background: transparent; }
.tpl-item.on { background: #eff6ff; }
.tpl-item.on strong { color: #0ea5e9; }
.tpl-item.wa.on { background: #f0fdf4; }
.tpl-item.wa.on strong { color: #16a34a; }
.tpl-item strong { display: block; font-size: 13px; color: #1e293b; margin-bottom: 2px; }
.tpl-item small { font-size: 11px; color: #94a3b8; }
.tpl-preview { flex: 1; display: flex; flex-direction: column; background: #f1f5f9; min-width: 0; }
.tpl-preview header { padding: 12px 20px; background: #fff; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tpl-preview h3 { margin: 0 0 2px; font-family: Outfit, Inter, sans-serif; font-size: 16px; }
.tpl-preview header p { margin: 0; font-size: 12px; color: #64748b; }
.tpl-stage { flex: 1; overflow: auto; display: flex; justify-content: center; padding: 24px; }
.tpl-frame { width: 600px; background: #e5e7eb; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.tpl-frame.mobile { width: 375px; }
.tpl-chrome { background: #374151; padding: 10px 16px; display: flex; align-items: center; gap: 6px; }
.tpl-chrome i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.tpl-chrome span { flex: 1; margin-left: 8px; background: #4b5563; border-radius: 4px; height: 20px; color: #9ca3af; font-size: 10px; display: flex; align-items: center; padding-left: 8px; }
.tpl-frame iframe { width: 100%; height: 520px; border: 0; background: #f3f4f6; }
.tpl-empty { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; color: #94a3b8; }
.tpl-tools { display: flex; gap: 8px; align-items: center; }
.seg { display: flex; background: #f1f5f9; border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: transparent; border-radius: 6px; padding: 5px 12px; font-size: 12px; color: #94a3b8; cursor: pointer; }
.seg button.on { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

@media (max-width: 1100px) {
  .dq-stats, .dq-cols, .dq-metrics { grid-template-columns: 1fr 1fr; }
}
.sidebar-foot {
  border-top: 1px solid #1a2540;
  padding: 12px;
}
.sidebar-foot a {
  display: flex;
  align-items: center;
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.sidebar-foot a.active, .sidebar-foot a:hover { background: #1e3a5f; color: #e2f0ff; font-weight: 600; }
.rq-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}
.rq-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #1e3a5f;
  color: #e2f0ff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.rq-user strong, .rq-user span { display: block; }
.rq-user strong { color: #e2e8f0; font-size: 12px; font-weight: 600; }
.rq-user span { color: #64748b; font-size: 11px; }
#nav a[data-route="settings"] { margin-bottom: 8px; }

.topbar {
  height: 52px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.rq-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rq-crumb-root, .rq-crumb-sep { font-size: 11px; color: #94a3b8; }
.rq-crumb-sep { color: #cbd5e1; }
#page-title { font-family: Inter, sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.rq-top-actions { display: flex; align-items: center; gap: 8px; }
.rq-chip {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
}
.rq-quick {
  background: #0ea5e9;
  color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
}
#top-actions { display: flex; gap: 8px; align-items: center; }
#top-actions:empty { display: none; }

.content { padding: 24px; flex: 1; min-height: 0; overflow: auto; }
.content.flow-on { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.content.builder-on { padding: 16px 16px 48px; overflow: auto; display: block; }
.builder-workspace { overflow: visible; }
.tpl-frame { overflow: visible; }
.tpl-frame iframe { height: auto; min-height: 640px; }
.card { border-radius: 12px; box-shadow: none; }
.btn { background: #0ea5e9; border-radius: 8px; }
.btn.secondary, .btn.ghost { background: #f1f5f9; color: #374151; }
.btn.wa { background: #25d366; color: #fff; }
.btn.danger { background: #dc2626; }

.rq-hello { margin: 0 0 18px; }
.rq-hello h2 { margin: 0; font-size: 26px; }
.rq-hello p { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.rq-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rq-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 20px; }
.rq-stat span { display: block; font-size: 12px; color: #64748b; margin-bottom: 8px; }
.rq-stat strong { font-family: Outfit, Inter, sans-serif; font-size: 28px; letter-spacing: -0.8px; }
.rq-split { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 16px; margin-top: 16px; }
.rq-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 20px; }
.rq-panel h3 { margin: 0 0 12px; font-size: 15px; color: #0f172a; font-family: Outfit, Inter, sans-serif; }
.rq-panel table { width: 100%; border-collapse: collapse; }
.rq-panel td, .rq-panel th { text-align: left; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.rq-bar { height: 6px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.rq-bar i { display: block; height: 100%; background: #25d366; }
.rq-activity { list-style: none; margin: 0; padding: 0; }
.rq-activity li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f8fafc; font-size: 13px; }
.rq-pill { font-size: 10px; font-weight: 700; border-radius: 4px; padding: 2px 6px; background: #f1f5f9; color: #64748b; }
.rq-pill.ok { background: #f0fdf4; color: #16a34a; }

.rq-flow-page { max-width: 920px; margin: 0 auto; }
.rq-flow-head, .rq-flow-head-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rq-flow-head { margin-bottom: 24px; }
.rq-flow-head h2 { margin: 0; font-size: 24px; }
.rq-flow-head p { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.rq-flow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rq-flow-card { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 22px; cursor: pointer; }
.rq-flow-card:hover { border-color: #25d366; box-shadow: 0 4px 20px rgba(37, 211, 102, 0.1); }
.rq-flow-card-top, .rq-flow-card-foot { display: flex; align-items: center; justify-content: space-between; }
.rq-flow-icon { font-size: 18px; }
.rq-flow-card h3 { margin: 12px 0 4px; font-size: 16px; }
.rq-flow-card p { margin: 0; color: #64748b; font-size: 13px; min-height: 36px; }
.rq-flow-card-foot { margin-top: 14px; color: #94a3b8; font-size: 12px; }
.rq-flow-card-foot button { border: 0; background: transparent; color: #dc2626; cursor: pointer; }
.rq-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); display: grid; place-items: center; z-index: 30; }
.rq-modal[hidden] { display: none; }
.rq-modal-card { width: min(440px, calc(100% - 32px)); background: #fff; border-radius: 14px; padding: 20px; display: grid; gap: 12px; }
.rq-modal-card label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: #64748b; }
.rq-modal-card input, .rq-modal-card textarea, .rq-modal-card select { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; font: inherit; color: #0f172a; }

.sf-editor { display: flex; height: 100%; min-height: 0; background: #f8fafc; }
.sf-screens, .sf-comps { background: #fff; border-right: 1px solid #e2e8f0; display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.sf-screens { width: 200px; padding: 12px; }
.sf-comps { width: 280px; padding: 12px; }
.sf-back { font-size: 12px; color: #64748b; margin-bottom: 10px; }
.sf-name { margin: 0 0 6px; font-weight: 700; }
.sf-kicker { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; margin: 12px 0 6px; }
.sf-screen, .sf-node { width: 100%; display: flex; align-items: center; gap: 8px; border: 1.5px solid transparent; background: transparent; border-radius: 8px; padding: 8px; cursor: pointer; text-align: left; }
.sf-screen.on, .sf-node.on { background: #f0fdf4; border-color: #25d366; }
.sf-screen span, .sf-node span { width: 22px; height: 22px; border-radius: 6px; background: #f1f5f9; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.sf-screen.on span, .sf-node.on span { background: #25d366; color: #fff; }
.sf-screen em, .sf-node em { font-style: normal; font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-add { width: 100%; margin-top: 8px; background: #f8fafc; border: 1.5px dashed #cbd5e1; border-radius: 8px; padding: 8px; color: #64748b; cursor: pointer; }
.sf-title, .sf-comp input, .sf-comp textarea { width: 100%; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 12px; }
.sf-title { border: 0; font-weight: 700; font-size: 13px; padding-left: 0; }
.sf-comp { border: 1.5px solid #e2e8f0; border-radius: 10px; margin-bottom: 6px; overflow: hidden; }
.sf-comp.on { border-color: #25d366; }
.sf-comp-head { display: flex; justify-content: space-between; padding: 8px 10px; background: #f8fafc; font-size: 11px; font-weight: 700; }
.sf-comp.on .sf-comp-head { background: #f0fdf4; }
.sf-comp-head button, .sf-opt button { background: #fee2e2; border: 0; color: #dc2626; border-radius: 4px; cursor: pointer; }
.sf-comp-body { padding: 10px; display: grid; gap: 6px; }
.sf-opt { display: flex; gap: 4px; }
.sf-palette { margin-top: 10px; }
.sf-palette p { margin: 0 0 6px; font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.sf-palette div { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.sf-palette button { border: 1.5px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 8px; text-align: left; font-size: 11px; cursor: pointer; }
.sf-preview { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sf-preview header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.sf-preview header span, .sf-node small, .sf-done { color: #94a3b8; font-size: 11px; }
.sf-preview-actions { display: flex; gap: 6px; align-items: center; }
.sf-preview-actions button { width: 28px; height: 28px; border-radius: 7px; border: 1.5px solid #e2e8f0; background: #fff; cursor: pointer; }
.sf-preview-actions button.on { border-color: #25d366; background: #f0fdf4; color: #25d366; }
.sf-preview-actions .btn { width: auto; height: auto; }
.sf-stage { flex: 1; overflow: auto; display: flex; gap: 28px; justify-content: center; padding: 28px 24px; }
.sf-diagram { min-width: 180px; }
.sf-node { background: #fff; border-color: #e2e8f0; margin-bottom: 0; flex-wrap: wrap; }
.sf-node small { width: 100%; padding-left: 30px; }
.sf-arrow, .sf-done { text-align: center; color: #94a3b8; font-size: 12px; padding: 4px 0; }

.wa-phone { width: 300px; background: #111827; border-radius: 28px; padding: 10px 10px 14px; color: #111827; flex-shrink: 0; }
.wa-phone-bar { display: flex; justify-content: center; gap: 4px; height: 14px; }
.wa-phone-bar span { width: 46px; height: 5px; border-radius: 4px; background: #374151; }
.wa-phone-head { background: #075e54; color: #fff; border-radius: 16px 16px 0 0; padding: 8px 12px; display: flex; gap: 8px; align-items: center; }
.wa-phone-head button { background: none; border: 0; color: #fff; cursor: pointer; }
.wa-phone-head strong, .wa-phone-head small { display: block; }
.wa-phone-head strong { font-size: 11px; }
.wa-phone-head small { font-size: 9px; color: #b2dfdb; }
.wa-avatar { width: 28px; height: 28px; border-radius: 50%; background: #25d366; display: grid; place-items: center; font-size: 12px; }
.wa-phone-body { background: #fff; min-height: 360px; max-height: 420px; overflow: auto; padding: 16px 14px; }
.wa-phone-body h2 { margin: 0 0 10px; font-size: 20px; }
.wa-phone-body h3 { margin: 4px 0 8px; font-size: 15px; }
.wa-phone-body p { font-size: 13px; line-height: 1.6; color: #374151; }
.wa-phone-body .cap { font-size: 10px; color: #9ca3af; }
.wa-phone-body label { display: block; margin-bottom: 16px; font-size: 11px; font-weight: 600; color: #6b7280; }
.wa-phone-body label.filled { color: #25d366; }
.wa-phone-body input, .wa-phone-body textarea { width: 100%; border: 0; border-bottom: 2px solid #e5e7eb; padding: 6px 0; font: inherit; font-size: 13px; background: transparent; }
.wa-phone-body label.filled input, .wa-phone-body label.filled textarea { border-bottom-color: #25d366; }
.wa-choice button, .wa-drop > button, .wa-drop div button { width: 100%; text-align: left; border: 1.5px solid #e5e7eb; background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; }
.wa-choice button.on { border-color: #25d366; background: #f0fdf4; color: #166534; }
.wa-image { height: 100px; border-radius: 10px; background: linear-gradient(135deg, #f0fdf4, #d1fae5); display: grid; place-items: center; margin-bottom: 14px; color: #166534; }
.wa-phone-foot { background: #fff; border-radius: 0 0 18px 18px; padding: 8px 14px 14px; }
.wa-phone-foot button { width: 100%; background: #25d366; color: #fff; border: 0; border-radius: 10px; padding: 13px 0; font-weight: 700; cursor: pointer; }
.wa-phone-foot small { display: block; text-align: center; color: #94a3b8; font-size: 9px; margin-top: 6px; }

@media (max-width: 1100px) {
  .rq-stats, .rq-split, .rq-flow-grid { grid-template-columns: 1fr; }
  .sf-screens { display: none; }
}

.hq-inbox { display: flex; height: calc(100vh - 52px); min-height: 0; background: #fff; }
.hq-inbox-list { width: 280px; border-right: 1px solid #e2e8f0; display: flex; flex-direction: column; flex-shrink: 0; background: #fff; }
.hq-inbox-head { padding: 14px 14px 0; border-bottom: 1px solid #f1f5f9; }
.hq-inbox-head h2 { margin: 0 0 10px; font-family: Outfit, Inter, sans-serif; font-size: 15px; }
.hq-inbox-head .seg { display: flex; margin-bottom: 10px; background: #f1f5f9; border-radius: 8px; padding: 2px; }
.hq-inbox-head .seg a { flex: 1; text-align: center; text-decoration: none; padding: 5px 4px; border-radius: 6px; font-size: 11px; color: #94a3b8; }
.hq-inbox-head .seg a.on { background: #fff; color: #0f172a; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.hq-inbox-scroll { flex: 1; overflow: auto; }
.hq-conv { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #f8fafc; text-decoration: none; color: inherit; }
.hq-conv.on { background: #f0fdf4; }
.hq-av { width: 38px; height: 38px; border-radius: 50%; background: #e2e8f0; color: #64748b; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.hq-av.on { background: #25d366; color: #fff; }
.hq-av.lg { width: 56px; height: 56px; margin: 0 auto 8px; background: #f0fdf4; color: #25d366; font-size: 18px; }
.hq-conv-main { flex: 1; min-width: 0; }
.hq-conv-top, .hq-conv-bot { display: flex; justify-content: space-between; gap: 8px; }
.hq-conv-top strong { font-size: 13px; font-weight: 500; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-conv-top strong.hot { font-weight: 700; }
.hq-conv-top span, .hq-conv small { font-size: 10px; color: #94a3b8; }
.hq-conv-bot em { font-style: normal; font-size: 12px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.hq-conv-bot b { width: 18px; height: 18px; border-radius: 50%; background: #25d366; color: #fff; font-size: 10px; display: grid; place-items: center; flex-shrink: 0; }
.hq-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f0f2f5; }
.hq-chat > header { background: #075e54; color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.hq-chat-who { flex: 1; min-width: 0; }
.hq-chat-who strong, .hq-chat-who span { display: block; }
.hq-chat-who strong { font-size: 14px; }
.hq-chat-who span { font-size: 11px; color: #b2dfdb; }
.hq-chat > header select,
.hq-chat > header select option { background: #fff; color: #0f172a; }
.hq-chat > header select { border: 0; border-radius: 6px; padding: 5px 8px; max-width: 180px; }
.hq-chat > header button { background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 6px; padding: 5px 10px; font-size: 11px; font-weight: 600; cursor: pointer; }
.hq-chat > header #end-chat { background: #25d366; }
.hq-bubbles { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.hq-load-earlier {
  align-self: center;
  margin: 4px 0 12px;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #fff;
  color: #075e54;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  cursor: pointer;
}
.hq-load-earlier:hover { background: #f0faf7; }
.hq-load-earlier:disabled { opacity: 0.7; cursor: wait; }
.hq-bubble { max-width: 360px; padding: 8px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.hq-bubble p { margin: 0; font-size: 13px; color: #1a1a1a; line-height: 1.5; white-space: pre-wrap; }
.hq-bubble small { display: block; text-align: right; font-size: 10px; color: #64748b; margin-top: 4px; white-space: nowrap; }
.hq-bubble.out { align-self: flex-end; background: #dcf8c6; border-radius: 12px 12px 2px 12px; }
.hq-bubble.in { align-self: flex-start; background: #fff; border-radius: 12px 12px 12px 2px; }
.hq-composer { background: #f0f2f5; padding: 10px 16px; border-top: 1px solid #e2e8f0; }
.hq-replies { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 8px; max-height: 220px; overflow: auto; }
.hq-replies button, .hq-reply-card { display: block; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid #f8fafc; padding: 10px 12px; cursor: pointer; }
.hq-replies strong, .hq-reply-card strong { display: block; font-size: 12px; color: #374151; }
.hq-replies span, .hq-reply-card span { display: block; font-size: 12px; color: #94a3b8; }
.hq-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.hq-compose-row > button, .hq-send { border: 0; width: 40px; height: 40px; cursor: pointer; background: #f1f5f9; color: #64748b; border-radius: 8px; }
.hq-send { border-radius: 50%; background: #25d366; color: #fff; }
.hq-compose-row textarea { width: 100%; border: 1px solid #e2e8f0; border-radius: 20px; padding: 9px 16px; font: inherit; font-size: 13px; resize: none; }
.slash-wrap { flex: 1; position: relative; }
.hq-info { width: 300px; border-left: 1px solid #e2e8f0; background: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.hq-maid-profile { margin-bottom: 4px; }
.hq-maid-name { margin: 6px 0 0; font-size: 11px; }
.hq-maid-form { display: grid; gap: 8px; margin-bottom: 8px; }
.hq-maid-form label { display: grid; gap: 4px; font-size: 11px; color: #64748b; }
.hq-maid-form input, .hq-maid-form select, .hq-maid-form textarea {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 9px; font-size: 12px; color: #0f172a; background: #fff;
}
.hq-maid-form button {
  border: 0; border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 600; cursor: pointer;
  background: #0f172a; color: #fff;
}
.hq-maid-form button:disabled { opacity: .6; cursor: wait; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 8px; }
.perm-grid label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.hq-neg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 8px 0 12px; }
.hq-neg-grid label { display: grid; gap: 4px; font-size: 12px; color: #64748b; }
.hq-neg-grid input { width: 100%; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 9px; font-size: 12px; }
.hq-info-tabs { display: flex; border-bottom: 1px solid #f1f5f9; }
.hq-info-tabs button { flex: 1; border: 0; background: transparent; padding: 12px 4px; font-size: 12px; color: #94a3b8; cursor: pointer; border-bottom: 2px solid transparent; }
.hq-info-tabs button.on { color: #0f172a; font-weight: 700; border-bottom-color: #25d366; }
.hq-info-body { flex: 1; overflow: auto; padding: 16px; }
.hq-info-hero { text-align: center; margin-bottom: 16px; }
.hq-info-hero strong, .hq-info-hero span { display: block; }
.hq-info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f8fafc; font-size: 12px; }
.hq-info-row span { color: #94a3b8; }
.hq-kicker { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 8px; }
.hq-agents { display: flex; flex-wrap: wrap; gap: 6px; }
.hq-agent { border: 1px solid #e2e8f0; background: #fff; border-radius: 99px; padding: 5px 10px; font-size: 11px; cursor: pointer; }
.hq-agent.on { border-color: #25d366; background: #f0fdf4; color: #16a34a; }
.hq-note { background: #fffbeb; border: 1px solid #fef08a; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; color: #713f12; }
.hq-note span { display: block; font-size: 10px; color: #92400e; margin-bottom: 4px; }
#chat-note textarea { width: 100%; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; font: inherit; }
#chat-note button { margin-top: 6px; width: 100%; background: #f59e0b; color: #fff; border: 0; border-radius: 8px; padding: 8px; font-weight: 600; cursor: pointer; }
.hq-reply-card { border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 8px; }
.hq-reply-card em { display: block; font-style: normal; font-size: 10px; color: #25d366; font-weight: 600; margin-top: 6px; }
.hq-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #94a3b8; background: #f8fafc; }
.hq-empty div { font-size: 48px; }
.hq-empty strong { font-size: 15px; color: #64748b; }
