/* ============ Ghost Talk — tema ============ */
:root {
  --bg: #03060A;
  --nav: #070C13;
  --panel: #0B111A;
  --panel-2: #111A26;
  --panel-3: #172233;
  --line: #1B2738;
  --line-2: #24344A;
  --text: #F4F7F8;
  --text-2: #B6C2CF;
  --muted: #7C8A9A;
  --brand: #0A44C2;
  --brand-2: #2F6BF5;
  --brand-3: #00309A;
  --brand-soft: rgba(47, 107, 245, .14);
  --ok: #22C55E;
  --warn: #F59E0B;
  --danger: #EF4444;
  --bubble-in: #111A26;
  --bubble-me: #0A44C2;
  --radius: 14px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Chakra Petch', 'Inter', sans-serif;
  --nav-w: 264px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 var(--font); overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-2); }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============ carregamento ============ */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 100; transition: opacity .3s; }
.boot.out { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .gt-loader__ring, .gt-loader__ring circle, .gt-loader__name { animation: none !important; }
}

/* ============ layout ============ */
.app { display: flex; height: 100dvh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ============ menu lateral ============ */
.nav {
  width: var(--nav-w); flex: none; background: var(--nav); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px; padding-top: max(18px, env(safe-area-inset-top));
  transition: width .2s ease;
}
.nav-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 18px; }
.brand { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.brand-full { display: block; }
.brand-logo { display: block; height: 44px; width: auto; aspect-ratio: 640 / 174; }
.brand-mini { display: none; }
.brand-mark { display: block; width: 38px; height: auto; aspect-ratio: 500 / 545; }
.gt-loader--sm { transform: scale(.62); }
.view-loading { flex: 1; display: grid; place-items: center; min-height: 260px; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 11px 14px; border-radius: 12px;
  background: none; border: 0; color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; text-align: left;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--panel-3); color: var(--text); }
.nav-item.active svg.i { color: var(--brand-2); }
.nav-label { white-space: nowrap; }
.nav-pill { margin-left: auto; font-size: 11px; color: var(--muted); }
.nav-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.profile { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 10px 8px; border-radius: 12px; text-align: left; color: var(--text); }
.profile:hover { background: var(--panel-2); }
.profile-name { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.profile-av { position: relative; width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(160deg, var(--brand-2), var(--brand-3)); }
.profile-av .dot { position: absolute; right: -1px; top: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--nav); background: var(--muted); }
.profile-av .dot.on { background: var(--ok); }
.nav-backdrop { display: none; }

.app.nav-mini { --nav-w: 76px; }
.app.nav-mini .nav-label, .app.nav-mini .brand-full, .app.nav-mini .nav-pill { display: none; }
.app.nav-mini .brand-mini { display: block; }
.app.nav-mini .nav-top { flex-direction: column; gap: 12px; }
.app.nav-mini .nav-collapse svg { transform: rotate(180deg); }
.app.nav-mini .nav-item, .app.nav-mini .profile { justify-content: center; padding-left: 0; padding-right: 0; }

/* ============ elementos comuns ============ */
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: none; color: var(--text-2); flex: none; position: relative; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.on { color: var(--brand-2); background: var(--brand-soft); }
.icon-btn .badge-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap;
}
.btn:hover { border-color: var(--brand-2); }
.btn.primary { background: var(--brand); border-color: transparent; color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: none; }
.btn.danger { color: #FCA5A5; border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.round-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--panel-3); color: var(--text-2); display: grid; place-items: center; }
.round-btn:hover { background: var(--brand); color: #fff; }

.input, .select, .textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; outline: none; color: var(--text);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { resize: vertical; min-height: 84px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.empty-state { margin: auto; text-align: center; color: var(--muted); padding: 40px 20px; max-width: 380px; }
.empty-state img { width: 76px; opacity: .9; margin-bottom: 14px; }
.empty-state h3 { color: var(--text); margin: 0 0 6px; font-family: var(--font-brand); font-size: 20px; }

.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--brand-soft); }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--c, var(--brand-2)); background: color-mix(in srgb, var(--c, var(--brand-2)) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--brand-2)) 40%, transparent); }
.chip.outline { background: none; color: var(--text-2); border-color: var(--line-2); }
.chip.sel { box-shadow: 0 0 0 2px var(--c, var(--brand-2)); }
.chip button { background: none; border: 0; padding: 0; color: inherit; display: grid; }
.color-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; background: var(--c); }
.swatch.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }

.av { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 17px; color: #fff; background: var(--c, var(--panel-3)); overflow: visible; }
.av > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av.sm { width: 36px; height: 36px; font-size: 13px; }
.av.xs { width: 26px; height: 26px; font-size: 11px; }
.av.lg { width: 76px; height: 76px; font-size: 26px; }
.av .wa { position: absolute; left: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: #4C3A99; display: grid; place-items: center; border: 2px solid var(--panel); }
.av .wa svg { width: 13px; height: 13px; stroke: #fff; }
.op { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #DCE7FF; background: #1F4F7A; flex: none; }
.count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #1D5B3B; color: #B8F5CF; flex: none; }

.spinner { width: 30px; height: 30px; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--brand-2); border-radius: 50%; animation: spin 1s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* cabecalho das telas */
.vh { display: flex; align-items: center; gap: 12px; padding: 22px 26px 18px; padding-top: max(22px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); flex: none; }
.vh h1 { margin: 0; font-family: var(--font-brand); font-size: 26px; font-weight: 700; letter-spacing: -.01em; flex: 1; }
.vh .hamb { display: none; }
.vbody { flex: 1; min-height: 0; overflow: auto; padding: 22px 26px 40px; }

/* banner de conexao */
.conn-banner { display: flex; align-items: center; gap: 10px; padding: 10px 18px; font-size: 13px; font-weight: 600; background: #3A2D12; color: #FCD58A; border-bottom: 1px solid #5A4416; }
.conn-banner .spinner { width: 16px; height: 16px; border-width: 2px; margin: 0; }

/* ============ Conversas ============ */
.conv-layout { display: flex; flex: 1; min-height: 0; }
.conv-side { width: 440px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--panel); min-height: 0; }
.conv-side .vh { border-bottom: 1px solid var(--line); }
.conv-tools { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.conv-search { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 0 6px; }
.conv-search input { flex: 1; background: none; border: 0; outline: none; font-size: 15px; color: var(--text); min-width: 0; }
.seg { display: flex; margin: 14px 16px; padding: 4px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.seg button { flex: 1; border: 0; background: none; color: var(--text-2); font-weight: 600; font-size: 14px; padding: 9px 6px; border-radius: 999px; display: inline-flex; gap: 8px; justify-content: center; align-items: center; }
.seg button.active { background: var(--brand); color: #fff; }
.seg button small { font-size: 11px; font-weight: 700; opacity: .9; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }

.conv-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.conv:hover { background: var(--panel-2); }
.conv.active { background: var(--panel-3); }
.conv-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.conv-name { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.conv-last b { color: var(--text-2); font-weight: 500; }
.conv-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; min-height: 24px; align-items: center; }
.conv-tags .tag-empty { color: var(--muted); opacity: .6; }
.conv-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.conv-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.conv-time.fresh { color: var(--ok); }
.conv-right .row { gap: 6px; }

/* chat */
.chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); position: relative; container-type: inline-size; container-name: chat; }
/* o cabecalho se adapta a largura real do chat (muda quando o painel de detalhes abre) */
@container chat (max-width: 640px) { .chat-actions .select { display: none; } }
@container chat (max-width: 540px) { .chat-actions .hide-sm { display: none; } }
@container chat (max-width: 360px) { .chat-title small { display: none; } }
.chat-bg { position: absolute; inset: 0; pointer-events: none; opacity: .035; background-image: url('/brand/mascote.svg'); background-size: 90px; background-repeat: repeat; filter: grayscale(1); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--panel); position: relative; z-index: 1; }
.chat-head .back { display: none; }
.chat-title { flex: 1; min-width: 64px; }
.chat-actions { flex-shrink: 0; }
.chat-title strong { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-missing .link-btn { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-style: normal; }
.media-missing .link-btn svg { width: 14px; height: 14px; }
.chat-actions { display: flex; gap: 6px; align-items: center; }
.chat-actions .select { width: auto; height: 34px; padding-top: 0; padding-bottom: 0; font-size: 12px; font-weight: 600; }
.messages { flex: 1; overflow-y: auto; padding: 18px 6%; display: flex; flex-direction: column; gap: 4px; position: relative; z-index: 1; }
.day-sep { align-self: center; margin: 14px 0 8px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--panel-2); padding: 4px 12px; border-radius: 999px; }
.msg { max-width: min(560px, 76%); padding: 7px 10px 6px; border-radius: 14px; font-size: 14.5px; line-height: 1.42; position: relative; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.in { align-self: flex-start; background: var(--bubble-in); border-top-left-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--bubble-me); border-top-right-radius: 4px; }
.msg + .msg.in, .msg + .msg.me { margin-top: 2px; }
.msg .author { display: block; font-size: 12px; font-weight: 700; color: var(--brand-2); margin-bottom: 2px; }
.msg .txt { white-space: pre-wrap; }
.msg .txt a { color: #9CC0FF; }
.msg.me .txt a { color: #D6E4FF; }
.msg .meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: rgba(244,247,248,.6); margin-top: 2px; float: right; margin-left: 10px; position: relative; top: 4px; }
.msg .meta svg { width: 16px; height: 16px; stroke-width: 2; }
.msg .meta .read { color: #7DD3FC; }
.msg::after { content: ''; display: block; clear: both; }
.msg img.media, .msg video.media { display: block; max-width: 100%; width: 320px; max-height: 380px; object-fit: cover; border-radius: 10px; margin-bottom: 4px; cursor: zoom-in; background: var(--panel-3); }
.msg img.sticker { width: 150px; height: 150px; object-fit: contain; background: none; cursor: default; }
.msg audio { display: block; width: 280px; max-width: 100%; height: 40px; margin: 2px 0; }
.doc { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: rgba(0,0,0,.22); color: inherit; text-decoration: none; margin-bottom: 4px; min-width: 220px; }
.doc span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.media-missing { font-style: italic; color: var(--text-2); }
.msg.note { align-self: center; background: #3A2F0E; color: #FDE68A; border: 1px dashed #7C5E12; max-width: 80%; border-radius: 10px; }

.composer { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 6px; padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: none; max-height: 140px; min-height: 42px; border: 1px solid var(--line-2); border-radius: 22px; padding: 10px 16px; background: var(--panel-2); outline: none; line-height: 1.4; }
.composer textarea:focus { border-color: var(--brand-2); }
.send-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.send-btn:hover { background: var(--brand-2); }
.send-btn.rec { background: var(--danger); }
.rec-bar { flex: 1; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 16px; border-radius: 22px; background: var(--panel-2); color: #FCA5A5; font-weight: 600; }
.rec-bar .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.pop { position: absolute; z-index: 30; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.5); padding: 6px; }
.pop.qr-pop { bottom: calc(100% + 6px); left: 14px; right: 14px; max-height: 260px; overflow: auto; }
.pop-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.pop-item:hover, .pop-item.active { background: var(--panel-3); }
.pop-item b { color: var(--brand-2); margin-right: 8px; }
.pop-item small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emoji-pop { bottom: calc(100% + 6px); left: 14px; width: 300px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-pop button { background: none; border: 0; font-size: 22px; padding: 4px; border-radius: 8px; }
.emoji-pop button:hover { background: var(--panel-3); }
.menu-pop { min-width: 220px; }

/* painel de detalhes */
.details { width: 340px; flex: none; border-left: 1px solid var(--line); background: var(--panel); overflow-y: auto; display: flex; flex-direction: column; }
.details-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.details-sec { padding: 16px; border-bottom: 1px solid var(--line); }
.details-sec h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.details-profile { text-align: center; padding: 22px 16px; border-bottom: 1px solid var(--line); }
.details-profile .av { margin: 0 auto 10px; }
.details-profile h3 { margin: 0; font-size: 18px; }
.note-item { background: #2A230C; border: 1px solid #4A3D12; border-radius: 10px; padding: 10px; margin-bottom: 8px; font-size: 13px; }
.note-item header { display: flex; justify-content: space-between; color: #E5C46B; font-size: 11px; margin-bottom: 4px; }
.note-item p { margin: 0; white-space: pre-wrap; color: #FDE68A; }
.note-item button { background: none; border: 0; color: #B9974A; padding: 0; }

/* ============ tabelas / cartoes ============ */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 18px; }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card .sub { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: var(--panel-2); }
.table .actions { text-align: right; white-space: nowrap; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 18px; max-width: 920px; }

/* ============ Boards ============ */
.board { display: flex; gap: 14px; padding: 20px 26px 30px; overflow-x: auto; flex: 1; min-height: 0; align-items: flex-start; }
.col { width: 300px; flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: 100%; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--line); }
.col-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-head .n { font-size: 12px; color: var(--muted); background: var(--panel-2); padding: 1px 8px; border-radius: 999px; }
.col-total { padding: 6px 14px 0; font-size: 12px; color: var(--muted); }
.col-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 80px; flex: 1; }
.col-cards.over { background: var(--brand-soft); border-radius: 0 0 var(--radius) var(--radius); }
.kcard { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; cursor: grab; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .4; }
.kcard .row { gap: 10px; }
.kcard strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard small { color: var(--muted); }
.kcard .last { color: var(--muted); font-size: 12px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard .val { margin-top: 8px; font-weight: 700; color: var(--ok); font-size: 13px; }
.drop-mark { height: 3px; border-radius: 3px; background: var(--brand-2); }
.col-add { margin: 0 10px 10px; }
.col-new { width: 280px; flex: none; }

/* ============ Relatorios ============ */
.rep-sub { color: var(--text-2); margin: 0 0 16px; }
.rep-head { margin-bottom: 18px; background: var(--panel); }
.rep-head.pinned { position: sticky; top: -22px; z-index: 6; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.rep-tabs { display: flex; align-items: center; gap: 4px; padding: 6px 12px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.rep-tab { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--text-2); font-weight: 600; font-size: 15px; padding: 14px 12px 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
.rep-tab svg.i { width: 18px; height: 18px; }
.rep-tab:hover { color: var(--text); }
.rep-tab.active { color: var(--brand-2); border-bottom-color: var(--brand-2); }
.rep-more { margin-left: auto; }
.rep-filters { display: grid; gap: 16px; padding: 16px 18px 4px; grid-template-columns: 1fr 1.6fr 1.4fr; }
.rep-filters.cols-chatbots { grid-template-columns: 1fr 1fr; }
.rep-filters.cols-mensagens { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.rep-filters .field > span { font-size: 13px; color: var(--text-2); }
.range-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.range-btn svg.i { width: 16px; height: 16px; color: var(--muted); flex: none; }
.range-pop { width: 380px; max-width: calc(100vw - 20px); }
.rp { padding: 6px; }
.rp-seg { margin: 0 0 8px; }
.pills { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 16px; max-width: 100%; overflow-x: auto; }
.pills button { background: none; border: 0; color: var(--text-2); font-weight: 600; padding: 8px 14px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.pills button svg.i { width: 15px; height: 15px; }
.pills button.active { background: var(--brand); color: #fff; }
.pills + .pills { margin-left: 8px; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi-grid.four { grid-template-columns: repeat(4, 1fr); }
.kpi-card { padding: 20px 22px; }
.kpi-card h4, .chart-card h4, .table-card h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.kpi-card h4 svg.i, .chart-card h4 svg.i { width: 18px; height: 18px; color: var(--text-2); }
.kpi-card p, .chart-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.kpi-val { margin-top: 14px; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-val .accent { color: var(--brand-2); }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.chart-card { padding: 18px 20px; min-width: 0; }
.chart-card.full { grid-column: 1 / -1; }
.cc-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.cc-head .see-all { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; white-space: nowrap; }
.cc-head .see-all svg.i { width: 14px; height: 14px; }
.cc-body { position: relative; min-height: 120px; }
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .axis text.lbl { fill: var(--text-2); font-size: 12px; }
.chart .axis text.val { fill: var(--text); font-size: 12px; font-weight: 600; }
.chart .axis tspan.sub { fill: var(--muted); }
.chart .bar { transition: opacity .12s; }
.chart .bar.hl, .chart .bar:hover { opacity: .78; }
.chart .dot.hl { r: 6; }
.chart-empty { display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.chart-empty svg.i { width: 28px; height: 28px; opacity: .6; }
.tip .v { display: inline; margin: 0; color: var(--text); }
.donut { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: center; }
.donut-total { fill: var(--text); font-size: 22px; font-weight: 700; }
.donut-sub { fill: var(--muted); font-size: 11px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.donut-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-size: 13px; color: var(--text-2); }
.donut-row i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.donut-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.donut-row small { color: var(--muted); min-width: 30px; text-align: right; }
.day-nav { display: flex; align-items: center; gap: 6px; }
.day-nav .select { width: auto; height: 36px; padding-top: 0; padding-bottom: 0; }
svg.i.flip { transform: rotate(180deg); }
.table-card { padding: 18px 20px; margin-bottom: 16px; }
.table-search { max-width: 280px; border: 1px solid var(--line-2); border-radius: 10px; height: 40px; padding: 0 12px; margin-bottom: 8px; }
.table-wrap { overflow-x: auto; }
.table-wrap .table td, .table-wrap .table th { white-space: nowrap; }
.help-q { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--brand-2); background: none; color: var(--brand-2); font-size: 11px; font-weight: 700; line-height: 1; padding: 0; margin-left: 4px; vertical-align: 1px; }
.notice { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; color: var(--text-2); background: var(--brand-soft); border-color: rgba(47,107,245,.35); }
.notice svg.i { color: var(--brand-2); }
.link-btn { background: none; border: 0; color: var(--brand-2); font-weight: 600; padding: 0; font-size: 13px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.tip { position: absolute; pointer-events: none; z-index: 5; background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 12px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.tip b { display: block; margin-bottom: 4px; }
.tip span { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.tip i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
@media (max-width: 1100px) {
  .kpi-grid, .kpi-grid.four { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .rep-filters, .rep-filters.cols-mensagens { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .kpi-grid, .kpi-grid.four { grid-template-columns: 1fr; }
  .rep-filters, .rep-filters.cols-chatbots, .rep-filters.cols-mensagens { grid-template-columns: 1fr; }
  .rep-head.pinned { top: -16px; }
}

/* ============ modal / toast ============ */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(3,6,10,.72); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; }
.modal { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.lightbox { max-width: 92vw; max-height: 88dvh; border-radius: 12px; }
.toast-root { position: fixed; z-index: 80; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--panel-3); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.5); font-weight: 600; font-size: 13px; animation: tin .2s ease; }
.toast.err { border-color: rgba(239,68,68,.5); color: #FCA5A5; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ============ QR ============ */
.qr-overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 30%, rgba(10,68,194,.25), transparent 60%), rgba(3,6,10,.94); }
.qr-card { width: min(400px, 100%); text-align: center; background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; padding: 28px; }
.qr-logo { display: flex; justify-content: center; margin-bottom: 10px; }
.qr-logo-svg { height: 58px; width: auto; aspect-ratio: 640 / 174; }
.empty-logo { height: 72px; width: auto; aspect-ratio: 640 / 174; margin: 0 auto 14px; display: block; }
.empty-mascot { width: 76px; height: auto; aspect-ratio: 500 / 545; margin: 0 auto 14px; display: block; }
.qr-card h2 { font-family: var(--font-brand); margin: 4px 0 8px; }
.qr-card p { color: var(--text-2); font-size: 14px; }
.qr-box { width: 240px; height: 240px; margin: 18px auto 12px; background: #fff; border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.qr-box img { width: 100%; height: 100%; }
.qr-box .spinner { border-color: rgba(0,0,0,.1); border-top-color: var(--brand); }
.warn { color: #FCD58A; font-size: 12px; }

/* ============ responsivo ============ */
@media (max-width: 1400px) {
  .conv-side { width: 380px; }
}
/* telas medias: menu recolhe sozinho para sobrar espaco para o chat */
@media (max-width: 1180px) and (min-width: 861px) {
  .app { --nav-w: 76px; }
  .nav-label, .brand-full, .nav-pill, .nav-collapse { display: none; }
  .brand-mini { display: block; }
  .nav-top { justify-content: center; }
  .nav-item, .profile { justify-content: center; padding-left: 0; padding-right: 0; }
  .conv-side { width: 340px; }
}
@media (max-width: 1180px) {
  .details { position: absolute; right: 0; top: 0; bottom: 0; z-index: 20; box-shadow: -20px 0 40px rgba(0,0,0,.5); }
  .conv-side { width: 380px; }
}
@media (max-width: 860px) {
  .nav { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; transform: translateX(-100%); transition: transform .22s ease; --nav-w: 280px; width: 280px; }
  .app.nav-open .nav { transform: none; }
  .app.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.55); }
  .nav-collapse { display: none; }
  .app.nav-mini .nav-label { display: inline; }
  .app.nav-mini .brand-full { display: block; }
  .app.nav-mini .brand-mini { display: none; }
  .vh { padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); }
  .vh h1 { font-size: 22px; }
  .vh .hamb { display: inline-grid; margin-left: -8px; }
  .vbody { padding: 16px 16px 40px; }
  .conv-side { width: 100%; border-right: 0; }
  .chat { position: fixed; inset: 0; z-index: 30; transform: translateX(100%); transition: transform .22s ease; }
  .conv-layout.chat-open .chat { transform: none; }
  .chat-head .back { display: inline-grid; margin-left: -8px; }
  .chat-head { padding: 10px 10px; padding-top: max(10px, env(safe-area-inset-top)); gap: 8px; }
  .chat-actions .hide-sm { display: none; }
  .messages { padding: 14px 10px; }
  .msg { max-width: 86%; }
  .details { position: fixed; inset: 0; width: 100%; z-index: 40; }
  .board { padding: 14px 16px 24px; }
  .col { width: 82vw; }
  .table .hide-sm { display: none; }
}

/* ============ Chatbots: lista ============ */
.cb-card { padding: 16px 18px; }
.cb-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cb-toolbar .btn svg.i { width: 16px; height: 16px; }
.cb-name { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; text-decoration: none; }
.cb-name:hover { color: var(--brand-2); }
.cb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.cb-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.cb-ch { width: 26px; height: 26px; border-radius: 50%; background: #4C3A99; display: inline-grid; place-items: center; }
.cb-ch svg.i { width: 15px; height: 15px; color: #fff; }
.cb-table td .icon-btn { display: inline-grid; text-decoration: none; }
.cb-setting { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 4px 2px; border-top: 1px solid var(--line); margin-top: 8px; color: var(--text-2); font-size: 13px; }
.card-choice { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; align-items: flex-start !important; cursor: pointer; }
.card-choice:has(input:checked) { border-color: var(--brand-2); background: var(--brand-soft); }

/* ============ Chatbots: editor ============ */
.fe { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.fe-top { display: flex; align-items: center; gap: 10px; padding: 14px 20px 10px; padding-top: max(14px, env(safe-area-inset-top)); }
.fe-top .hamb { display: none; }
.fe-crumb { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--muted); min-width: 0; }
.fe-crumb a { color: var(--text-2); text-decoration: none; }
.fe-crumb a:hover { color: var(--brand-2); }
.fe-crumb b { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 20px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fe-tools, .fe-meta { display: flex; align-items: center; gap: 6px; }
.fe-add { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(10,68,194,.45); }
.fe-add:hover { background: var(--brand-2); }
.fe-tools .icon-btn { border: 1px solid var(--line-2); border-radius: 50%; width: 40px; height: 40px; }
.fe-tools .icon-btn:disabled { opacity: .35; cursor: default; }
#feSave.on { color: #fff; background: var(--brand); border-color: transparent; }
.fe-dirty { font-size: 12px; color: var(--muted); margin-left: 6px; }
.fe-name { display: flex; align-items: center; gap: 2px; font-weight: 700; font-size: 16px; margin-right: 6px; max-width: 320px; }
.fe-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe-active { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.fe-active span.on { color: var(--ok); }
.fe-active .switch { transform: scale(.85); }
.fe-canvas { position: relative; flex: 1; min-height: 0; overflow: hidden; outline: none; cursor: grab; touch-action: none;
  background-color: #070B11; background-image: radial-gradient(circle, #1E2A3B 1.2px, transparent 1.3px); }
.fe-canvas.panning { cursor: grabbing; }
.fe-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.fe-edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.fe-edges .edge { fill: none; stroke: #5B7FC9; stroke-width: 2.2; }
.fe-edges .edge.sel { stroke: var(--brand-2); stroke-width: 3; }
.fe-edges .edge.temp { stroke: var(--brand-2); stroke-dasharray: 6 5; }
.fe-edges .edge-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.fe-edges .edge-del { pointer-events: all; cursor: pointer; }
.fe-edges .edge-del circle { fill: var(--danger); stroke: var(--bg); stroke-width: 2; }
.fe-edges .edge-del path { stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.fe-zoom { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.fe-zoom span { min-width: 46px; text-align: center; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.fe-hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; font-size: 13px; color: var(--text-2); pointer-events: none; }

.fnode { position: absolute; width: 300px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.45); cursor: default; }
.fnode::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 14px 14px 0 0; background: var(--c); }
.fnode.sel { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(47,107,245,.45), 0 10px 28px rgba(0,0,0,.45); }
.fn-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 12px 34px 10px 14px; cursor: grab; border-bottom: 1px solid var(--line); }
.fn-head:active { cursor: grabbing; }
.fn-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); flex: none; }
.fn-ic svg.i { width: 15px; height: 15px; }
.fn-title { font-weight: 700; font-size: 13.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-menu { position: absolute; right: 22px; top: 9px; width: 26px; height: 26px; border: 0; background: none; color: var(--muted); border-radius: 6px; display: grid; place-items: center; }
.fn-menu:hover { background: var(--panel-3); color: var(--text); }
.fn-menu svg.i { width: 16px; height: 16px; }
.fn-body { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.fn-body:empty { display: none; }
.fn-outs { border-top: 1px solid var(--line); padding: 6px 0; }
.fn-out { position: relative; display: flex; justify-content: flex-end; align-items: center; padding: 5px 22px 5px 14px; font-size: 12px; color: var(--text-2); text-align: right; }
.fn-out span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.port { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 2.5px solid var(--brand-2); z-index: 2; }
.port.in { left: -8px; top: 50%; transform: translateY(-50%); border-color: #5B7FC9; }
.port.out { right: -8px; top: 50%; transform: translateY(-50%); cursor: crosshair; background: var(--brand-2); }
.port.out:hover { box-shadow: 0 0 0 5px rgba(47,107,245,.3); }
.fn-head .port.out { right: -8px; }
.fn-sticky { background: #3A3110; border-color: #6B5A16; }
.fn-sticky .fn-head { border-color: #6B5A16; }
.fn-sticky textarea { background: #2C2509; border-color: #5A4B12; color: #FDE68A; }

.ff { display: flex; flex-direction: column; gap: 4px; }
.ff > span { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.ff .input, .ff .select, .ff .textarea { padding: 8px 10px; font-size: 13px; border-radius: 8px; }
.ff .textarea { min-height: 70px; }
.ff-row { display: flex; gap: 8px; }
.ff-row > * { flex: 1; min-width: 0; }
.ff-inline { align-items: flex-end; }
.ff-inline .icon-btn { flex: none; width: 34px; height: 34px; }
.ff-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.ff-check input { accent-color: var(--brand-2); width: 15px; height: 15px; }
.ff-info { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.ff-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ff-chips .chip { height: 24px; cursor: pointer; }
.ff-vars { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -2px; }
.ff-vars button { border: 1px dashed var(--line-2); background: none; color: var(--brand-2); border-radius: 6px; font-size: 10.5px; padding: 2px 5px; }
.ff-vars button:hover { background: var(--brand-soft); }
.ff-opt { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.ff-opt b { width: 18px; text-align: center; font-size: 12px; color: var(--muted); }
.ff-opt .input { flex: 1; padding: 7px 9px; font-size: 13px; }
.ff-opt .icon-btn { width: 28px; height: 28px; }
.ff-opt .icon-btn svg.i, .ff-group-h svg.i { width: 14px; height: 14px; }
.ff-group { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ff-group-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--text-2); }
.ff-group-h button { background: none; border: 0; color: var(--muted); padding: 0; display: grid; }
.ff-rule { display: flex; flex-direction: column; gap: 6px; }
.ff-media { display: flex; align-items: flex-start; gap: 6px; }
.ff-media img { width: 100%; max-height: 170px; object-fit: cover; border-radius: 10px; }
.ff-media .doc { flex: 1; margin: 0; background: var(--panel-2); }
.fn-body .btn.sm svg.i { width: 14px; height: 14px; }

.fe-palette { position: absolute; left: 16px; top: 12px; bottom: 76px; width: 400px; max-width: calc(100% - 32px); z-index: 10; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.6); cursor: default; }
.fp-head { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; }
.fp-search { flex: 1; border: 1px solid var(--brand-2); border-radius: 10px; height: 38px; padding: 0 10px; }
.fp-search input { font-size: 14px; }
.fp-list { overflow-y: auto; padding: 4px 12px 16px; }
.fp-cat { display: flex; align-items: center; gap: 8px; margin: 14px 2px 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fp-cat svg.i { width: 16px; height: 16px; }
.fp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fp-item { position: relative; text-align: left; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.fp-item:hover:not(:disabled) { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, var(--panel-2)); }
.fp-item b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.fp-item b svg.i { width: 15px; height: 15px; color: var(--c); flex: none; }
.fp-item small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.fp-item.soon { opacity: .5; cursor: not-allowed; }
.fp-item em { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--brand-2); }

/* ============ Chat: chatbot em execucao ============ */
.bot-banner { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: rgba(14,165,160,.12); border-top: 1px solid rgba(14,165,160,.35); color: #99F6E4; font-size: 13px; }
.bot-banner svg.i { width: 18px; height: 18px; flex: none; }
.bot-banner .grow b { color: #CCFBF1; }
.bot-banner .btn { height: 30px; }

@media (max-width: 860px) {
  .fe-top .hamb { display: inline-grid; margin-left: -8px; }
  .fe-bar { padding: 6px 12px 10px; }
  .fe-name { max-width: 160px; }
  .fe-dirty { display: none; }
  .fe-palette { left: 8px; right: 8px; width: auto; }
  .fp-grid { grid-template-columns: 1fr; }
}

.stars { color: #2DD4BF; letter-spacing: 1px; }
.stars i { font-style: normal; color: var(--line-2); }
.ff-vars button { border: 1px dashed var(--line-2); background: none; color: var(--brand-2); border-radius: 6px; font-size: 11.5px; padding: 3px 8px; font-weight: 600; }
.ff-adv summary { cursor: pointer; font-size: 12px; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.ff-adv summary::before { content: '⚙'; font-size: 11px; }
.ff-adv[open] summary { margin-bottom: 6px; color: var(--text-2); }
.var-pop { max-height: 320px; overflow: auto; }

.ff-warn { margin: 0; padding: 7px 9px; border-radius: 8px; background: rgba(217,119,6,.14); border: 1px solid rgba(217,119,6,.4); color: #FCD58A; font-size: 12px; font-weight: 600; }

.qr-account { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
