[hidden] { display: none !important; }
:root {
  --bg: #f4f3ef; --panel: #ffffff; --panel-2: #faf9f6; --ink: #1b1c1e; --ink-2: #3d4046; --muted: #6b6f76; --line: #e3e1da;
  --brand: #0f766e; --brand-ink: #ffffff; --brand-soft: #e1f2ee; --brand-line: #9fd6cb;
  --alta: #b42318; --alta-bg: #fde8e6; --media: #9a5a06; --media-bg: #fdf0da; --baixa: #4b5563; --baixa-bg: #eceef1;
  --ok: #167a3e; --ok-bg: #e2f4e8; --danger: #b42318;
  --wa: #1d9a50;
  --radius: 12px; --side: 236px;
  --shadow: 0 1px 2px rgba(20,20,20,.04), 0 4px 16px rgba(20,20,20,.04);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315; --panel: #1b1d20; --panel-2: #202327; --ink: #ececec; --ink-2: #c9ccd1; --muted: #9aa0a6; --line: #2d3035;
    --brand: #2dd4bf; --brand-ink: #052b26; --brand-soft: #12332f; --brand-line: #1f5a52;
    --alta: #ff8a80; --alta-bg: #3b1a18; --media: #f5b453; --media-bg: #382a12; --baixa: #b3b8bf; --baixa-bg: #2a2d31;
    --ok: #4ade80; --ok-bg: #12301f; --danger: #ff8a80; --wa: #25c264;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); display: flex; min-height: 100vh; font-size: 14px; line-height: 1.45; }
a { color: var(--brand); }
h1 { font-size: 24px; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 15px; margin: 0 0 12px; }
.h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
code { background: var(--panel-2); border: 1px solid var(--line); padding: 0 5px; border-radius: 5px; font-size: 12.5px; }
.muted { color: var(--muted); font-weight: normal; }
.sub { margin: 4px 0 0; color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > input { flex: 1; min-width: 220px; }

/* ---------- lateral ---------- */
.side { width: var(--side); background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 5; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 22px; }
.brand b { display: block; font-size: 15px; } .brand small { color: var(--muted); font-size: 12px; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); }
nav button .ic { width: 18px; text-align: center; color: var(--muted); }
nav button em { margin-left: auto; font-style: normal; font-size: 12px; background: var(--alta-bg); color: var(--alta); border-radius: 999px; padding: 0 7px; font-weight: 600; }
nav button em:empty { display: none; }
nav button:hover { background: var(--panel-2); color: var(--ink); }
nav button.on { background: var(--brand-soft); color: var(--ink); font-weight: 600; }
nav button.on .ic { color: var(--brand); }
nav button:focus-visible { outline: 2px solid var(--brand); }
.side-job { margin: 16px 6px 0; padding: 10px; border-radius: 10px; background: var(--brand-soft); font-size: 12px; cursor: pointer; }
.side-job .progress { margin: 6px 0 0; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 0 8px; line-height: 1.6; }
.meter { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 2px 0 7px; }
.meter > div { height: 100%; background: var(--brand); border-radius: 3px; }
.meter.warn > div { background: var(--media); } .meter.full > div { background: var(--alta); }

main { margin-left: var(--side); flex: 1; padding: 28px 34px 80px; max-width: 1280px; min-width: 0; }
.view { display: none; } .view.on { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h2 { margin: 0; }
.card-h a { font-size: 13px; text-decoration: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid2 > .card { margin-bottom: 0; }
.grid2.tight { gap: 20px; margin: 0; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi > span { color: var(--muted); font-size: 12px; display: block; }
.kpi b { display: block; font-size: 28px; font-variant-numeric: tabular-nums; margin-top: 2px; letter-spacing: -0.02em; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi.click { cursor: pointer; } .kpi.click:hover { border-color: var(--brand-line); }

/* setup */
.setup { background: linear-gradient(135deg, var(--brand-soft), var(--panel)); border: 1px solid var(--brand-line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.setup h2 { margin-bottom: 4px; }
.setup p { margin: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.step:hover { border-color: var(--brand-line); }
.step b { display: flex; gap: 8px; align-items: center; }
.step .ck { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: inline-grid; place-items: center; font-size: 12px; flex: none; }
.step.done .ck { background: var(--ok); border-color: var(--ok); color: #fff; }
.step p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

/* funil e listas */
.funil-row { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 10px; margin: 6px 0; cursor: pointer; border-radius: 6px; }
.funil-row:hover span { color: var(--brand); }
.bar { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; height: 20px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 0 4px 4px 0; min-width: 3px; }
.funil-row b { text-align: right; font-variant-numeric: tabular-nums; }
.mini-list { display: flex; flex-direction: column; }
.mini-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); align-items: center; }
.mini-item.click { cursor: pointer; } .mini-item.click:hover b { color: var(--brand); }
.mini-item:last-child { border: 0; }
.mini-item small { color: var(--muted); }
.mini-item .r { text-align: right; flex: none; }
.mini-list.small .mini-item { padding: 6px 2px; font-size: 13px; }
.ev-erro { color: var(--danger); }

/* leads */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.tabs button:hover { border-color: var(--brand-line); }
.tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs button i { font-style: normal; color: var(--muted); margin-left: 5px; font-variant-numeric: tabular-nums; }
.tabs button.on i { color: inherit; opacity: .7; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.filters input[type=search] { flex: 1 1 260px; }
.filters select { max-width: 190px; }
.chk { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); font-weight: normal; margin: 0; white-space: nowrap; cursor: pointer; }
.chk input { width: auto; margin: 0; min-height: 0; }
.bulk { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 10px; margin-bottom: 12px; flex-wrap: wrap; }

.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.w-chk { width: 36px; } .w-ic { width: 60px; }
td input[type=checkbox], th input[type=checkbox] { min-height: 0; }
tbody tr { cursor: pointer; } tbody tr:hover { background: var(--panel-2); }
tbody tr.sel { background: var(--brand-soft); }
tbody tr:last-child td { border-bottom: 0; }
td .nome { font-weight: 600; } td small { color: var(--muted); display: block; margin-top: 2px; }
td.ics { white-space: nowrap; color: var(--muted); font-size: 13px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.p-alta { background: var(--alta-bg); color: var(--alta); }
.p-média { background: var(--media-bg); color: var(--media); }
.p-baixa { background: var(--baixa-bg); color: var(--baixa); }
.p-ok { background: var(--ok-bg); color: var(--ok); }
.p-status { background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); font-weight: 500; }
.p-tag { background: var(--brand-soft); color: var(--ink-2); font-weight: 500; }
.score { font-variant-numeric: tabular-nums; font-weight: 700; margin-right: 4px; }

/* forms */
label { display: block; margin: 0 0 12px; font-weight: 600; font-size: 13px; }
label.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: normal; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 36px; }
label > input, label > select, label > textarea { display: block; width: 100%; margin-top: 5px; font-weight: normal; }
label.inline > input { display: inline-block; width: auto; margin: 0; }
textarea { width: 100%; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }

.btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; min-height: 36px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--brand-line); filter: none; }
.btn.link { background: none; color: var(--brand); padding: 6px 8px; }
.btn.danger { color: var(--danger); }
.btn.wa { background: var(--wa); color: #fff; }
.btn.big { padding: 11px 22px; font-size: 14px; }
.btn.sm { padding: 6px 11px; min-height: 30px; font-size: 12.5px; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn.busy::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chips button { all: unset; cursor: pointer; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; background: var(--panel); }
.chips button:hover { border-color: var(--brand-line); }
.chips button.on { background: var(--brand-soft); border-color: var(--brand); font-weight: 600; }
#sExtras { width: 100%; }
.scan-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.seg button { all: unset; cursor: pointer; padding: 7px 14px; border-radius: 7px; font-size: 13px; }
.seg button.on { background: var(--ink); color: var(--bg); font-weight: 600; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.progress > div { height: 100%; width: 0; background: var(--brand); transition: width .3s; }
.progress.indet > div { width: 30%; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { from { margin-left: -30%; } to { margin-left: 100%; } }
pre#jobLog { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 320px; overflow: auto; font-size: 12px; margin: 0 0 10px; white-space: pre-wrap; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; margin: 0; }
.switch input { display: none; }
.switch span { width: 36px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: .2s; flex: none; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { left: 18px; }

/* config */
.conn { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: var(--panel-2); }
.conn-h { display: flex; justify-content: space-between; align-items: center; }
.conn p { margin: 6px 0 10px; }
.ajuda { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px; margin-bottom: 10px; }
.ajuda li { margin: 6px 0; }
.preview-msg pre { white-space: pre-wrap; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-family: inherit; margin: 6px 0 0; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); text-align: right; }

/* drawer */
.drawer-bg, .modal-bg { position: fixed; inset: 0; background: rgba(10,12,14,.35); z-index: 10; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--panel); z-index: 11; overflow-y: auto; border-left: 1px solid var(--line); animation: slide .18s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: .5; } to { transform: none; opacity: 1; } }
.d-top { position: sticky; top: 0; background: var(--panel); z-index: 2; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.d-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.d-head h2 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.d-nav { display: flex; gap: 2px; flex: none; }
.icon-btn { all: unset; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); font-size: 17px; }
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }
.d-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.d-body { padding: 4px 22px 40px; }
.d-sec { margin-top: 22px; }
.d-sec > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.info { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; margin: 0; }
.info dt { color: var(--muted); } .info dd { margin: 0; word-break: break-word; }
.motivos { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); }
.motivos li { margin: 2px 0; }
.box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.box p { margin: 0 0 8px; } .box p:last-child { margin: 0; }
.box ul { margin: 4px 0 8px; padding-left: 18px; }
.warn-box { background: var(--media-bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 13px; }
.fontes { font-size: 12px; color: var(--muted); margin-top: 8px; }
.fontes a { color: var(--muted); }
.gmaps { font-family: Roboto, Arial, sans-serif; font-size: 12px; color: var(--muted); }
.gmaps a { color: var(--muted); }
.msg-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.msg-tabs button { all: unset; cursor: pointer; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; color: var(--muted); border: 1px solid transparent; }
.msg-tabs button.on { background: var(--panel-2); color: var(--ink); font-weight: 600; border-color: var(--line); }
.count { font-size: 12px; color: var(--muted); text-align: right; margin-top: 4px; }
.reply-opt { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; background: var(--panel); }
.reply-opt p { margin: 0 0 8px; white-space: pre-wrap; }
.hist { font-size: 12.5px; color: var(--muted); }
.hist div { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.audit { display: flex; gap: 14px; align-items: flex-start; }
.audit-score { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; border-radius: 10px; padding: 6px 0; line-height: 1.1; }
.audit-score small { display: block; font-size: 11px; font-weight: 500; }
.audit ul { margin: 0; padding-left: 18px; }

/* modal */
.modal-bg { display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal { background: var(--panel); border-radius: 14px; padding: 22px; width: min(520px, 100%); max-height: 90vh; overflow: auto; border: 1px solid var(--line); }
.modal h2 { font-size: 17px; }
.modal .row.end { justify-content: flex-end; margin-top: 16px; }

/* insights */
.ins-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.ins-kpis .kpi b { font-size: 22px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 52px; gap: 10px; align-items: center; margin: 4px 0; font-size: 13px; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.hbar .track { height: 14px; }
.hbar .fill { height: 100%; background: var(--brand); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar:hover .fill { filter: brightness(1.15); }
.conv { font-size: 12px; color: var(--muted); margin: -1px 0 3px; padding-left: 160px; }
.vbars { display: flex; align-items: flex-end; gap: 2px; height: 150px; border-bottom: 1px solid var(--line); }
.vbars .vb { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.vbars .vb > div { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 1px; }
.vbars .vb:hover > div { filter: brightness(1.2); }
.vaxis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.tbl { width: 100%; font-size: 13px; }
.tbl th { background: none; padding: 6px 8px; }
.tbl td { padding: 6px 8px; font-variant-numeric: tabular-nums; }
.tbl tbody tr { cursor: default; } .tbl tbody tr:hover { background: var(--panel-2); }
.cell-bar { display: flex; align-items: center; gap: 8px; }
.cell-bar span { display: inline-block; height: 8px; background: var(--brand); border-radius: 0 3px 3px 0; min-width: 2px; }
.tooltip { position: fixed; z-index: 30; background: var(--ink); color: var(--bg); font-size: 12px; padding: 6px 9px; border-radius: 6px; pointer-events: none; white-space: nowrap; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 10px; z-index: 40; max-width: min(560px, 92%); box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.toast.erro { background: var(--danger); color: #fff; }

@media (max-width: 1100px) {
  .ins-kpis { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  body { flex-direction: column; }
  .side { position: static; width: 100%; flex-direction: row; align-items: center; padding: 8px 12px; overflow-x: auto; gap: 8px; }
  .brand { padding: 0; } .brand small { display: none; }
  nav { flex-direction: row; } nav button { padding: 8px; white-space: nowrap; }
  .side-foot, .side-job { display: none; }
  main { margin: 0; padding: 18px 16px 70px; }
  .kpis { grid-template-columns: 1fr 1fr; } .grid2 { grid-template-columns: 1fr; }
  .ins-kpis { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .conv { padding-left: 0; }
}

/* ================= v3 ================= */
:root { --serie-rec: #0b8f80; --serie-desp: #c2410c; }
@media (prefers-color-scheme: dark) { :root { --serie-rec: #14a394; --serie-desp: #ea580c; } }
nav button em.em-ok { background: var(--ok-bg); color: var(--ok); }
.seg button em { font-style: normal; background: var(--alta-bg); color: var(--alta); border-radius: 999px; padding: 0 6px; margin-left: 4px; font-size: 11px; }
.seg button em:empty { display: none; }
.side-bell { all: unset; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin: 14px 6px 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; }
.side-bell:hover { border-color: var(--brand-line); }
.side-bell em { font-style: normal; background: var(--alta); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 600; }
.side-bell em:empty { display: none; }
.side-wa { margin: 10px 8px 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.dot-st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); vertical-align: middle; }
.dot-st.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); } .dot-st.warn { background: var(--media); } .dot-st.off { background: var(--alta); }

/* notificações */
.notif-panel { position: fixed; left: var(--side); top: 0; bottom: 0; width: min(420px, 100%); background: var(--panel); border-right: 1px solid var(--line); z-index: 15; overflow-y: auto; box-shadow: 8px 0 30px rgba(0,0,0,.08); animation: fade .15s; }
.notif-h { position: sticky; top: 0; background: var(--panel); display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 10px; border-bottom: 1px solid var(--line); }
.notif-resumo { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.notif-resumo summary { cursor: pointer; font-weight: 600; }
.notif-resumo pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.notif { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif:hover { background: var(--panel-2); }
.notif.nova { background: var(--brand-soft); }
.notif .ni { font-size: 18px; line-height: 1.2; }
.notif p { margin: 2px 0; color: var(--ink-2); font-size: 13px; }
.notif small { color: var(--muted); font-size: 12px; }

/* login */
.login { position: fixed; inset: 0; background: var(--bg); z-index: 50; display: grid; place-items: center; padding: 16px; }
.login-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 30px; width: min(360px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: center; align-items: center; }
.login-box h2 { margin: 6px 0 0; font-size: 20px; } .login-box p { margin: 0; }
.login-box input { width: 100%; } .login-box .btn { width: 100%; }

/* conversas */
.chat-wrap { display: grid; grid-template-columns: 330px 1fr; height: calc(100vh - 150px); min-height: 480px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list-h { padding: 10px; border-bottom: 1px solid var(--line); }
.chat-list-h input { width: 100%; margin-bottom: 8px; }
.tabs.mini { margin: 0; gap: 4px; } .tabs.mini button { padding: 3px 9px; font-size: 12px; }
#cvLista { overflow-y: auto; flex: 1; }
.cv-item { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cv-item:hover { background: var(--panel-2); } .cv-item.on { background: var(--brand-soft); }
.cv-av { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; }
.cv-txt { min-width: 0; flex: 1; }
.cv-l1, .cv-l2 { display: flex; justify-content: space-between; gap: 6px; }
.cv-l1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cv-l1 small { color: var(--muted); flex: none; font-size: 11px; }
.cv-l2 span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-l2 em { font-style: normal; background: var(--wa); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 700; flex: none; }
.cv-l3 { margin-top: 3px; } .cv-l3 .pill { font-size: 11px; padding: 1px 6px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-h select { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 18px; background: var(--panel-2); }
.dia { text-align: center; margin: 10px 0; font-size: 12px; color: var(--muted); }
.msg { display: flex; margin: 4px 0; } .msg.eu { justify-content: flex-end; }
.bolha { max-width: min(560px, 78%); padding: 7px 10px 5px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); white-space: normal; word-wrap: break-word; line-height: 1.4; }
.msg.eu .bolha { background: #d9fdd3; border-color: #c4ebbd; color: #111; }
@media (prefers-color-scheme: dark) { .msg.eu .bolha { background: #144d37; border-color: #1d6247; color: #e9edef; } }
.msg.fila .bolha { opacity: .65; border-style: dashed; }
.meta { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 2px; }
.msg.eu .meta { color: #557; } @media (prefers-color-scheme: dark) { .msg.eu .meta { color: #9fc5b4; } }
.meta .lido { color: #34b7f1; }
.sugestao { border-top: 1px solid var(--line); padding: 10px 14px; background: var(--brand-soft); display: flex; flex-direction: column; gap: 6px; }
.sug-opt { all: unset; cursor: pointer; background: var(--panel); border: 1px solid var(--brand-line); border-radius: 8px; padding: 8px 10px; font-size: 13px; white-space: pre-wrap; }
.sug-opt:hover { border-color: var(--brand); }
.composer { border-top: 1px solid var(--line); padding: 10px 14px; }
.composer select { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.composer-row { flex-wrap: nowrap; align-items: flex-end; }
.composer-row textarea { flex: 1; min-height: 44px; max-height: 160px; }
.qr-box { display: flex; justify-content: center; padding: 14px; background: #fff; border-radius: 12px; border: 1px solid var(--line); width: fit-content; margin: 8px auto; }
.qr-box svg { width: 260px; height: 260px; display: block; }
.passos li, .regras li { margin: 6px 0; } .regras { padding-left: 0; list-style: none; }
.fila-item { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fila-item textarea { width: 100%; margin-top: 6px; font-size: 13px; }
.fila-txt { white-space: pre-wrap; margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }

/* financeiro */
.qr-pix { display: flex; justify-content: center; } .qr-pix img { width: 220px; height: 220px; image-rendering: pixelated; border-radius: 8px; background: #fff; padding: 6px; }
.legenda { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-rec { background: var(--serie-rec); } .lg-desp { background: var(--serie-desp); }
.fin-bars { display: flex; gap: 6px; height: 200px; align-items: flex-end; border-bottom: 1px solid var(--line); padding-top: 6px; }
.fb { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.fb-par { display: flex; gap: 2px; align-items: flex-end; height: calc(100% - 18px); width: 100%; justify-content: center; }
.fb-r, .fb-d { width: 42%; max-width: 22px; border-radius: 4px 4px 0 0; min-height: 0; }
.fb-r { background: var(--serie-rec); } .fb-d { background: var(--serie-desp); }
.fb:hover .fb-r, .fb:hover .fb-d { filter: brightness(1.15); }
.fb small { font-size: 10.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.fill-d { background: var(--serie-desp) !important; }

/* mensagens */
.mod-grid { align-items: start; }
.sel-item { background: var(--brand-soft); border-radius: 6px; }
.chips.vars button { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
details.opcional summary { cursor: pointer; }

@media (max-width: 860px) {
  .chat-wrap { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-main { min-height: 480px; }
  .notif-panel { left: 0; }
  .side-bell, .side-wa { display: none; }
}
.alert { padding: 11px 14px; border-radius: 10px; background: var(--media-bg); border: 1px solid var(--line); margin-bottom: 12px; }
.hbar.money { grid-template-columns: minmax(90px, 150px) 1fr 110px; }

/* ================= Monitor ================= */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin-left: auto; }
.live-dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); animation: pulso 2s infinite; }
@keyframes pulso { 50% { box-shadow: 0 0 0 6px transparent; } }
.ao-vivo { font-size: 12px; font-weight: 600; color: var(--ok); vertical-align: middle; margin-left: 8px; background: var(--ok-bg); padding: 2px 8px; border-radius: 999px; }
.ao-vivo.off { color: var(--media); background: var(--media-bg); }
.mn-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.mn-cards .kpi b { font-size: 18px; } .kpi-sm { font-size: 12px; font-weight: 500; color: var(--muted); }
.ok-t { color: var(--ok); }
.agora { display: flex; gap: 14px; align-items: center; }
.agora-ic { font-size: 26px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--brand-soft); border-radius: 12px; flex: none; }
.feed { max-height: 560px; overflow-y: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; }
.fe { display: grid; grid-template-columns: 70px 24px 1fr; gap: 6px; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: start; }
.fe[data-lead], .fe[data-conv] { cursor: pointer; } .fe[data-lead]:hover, .fe[data-conv]:hover { background: var(--panel-2); }
.fe:last-child { border-bottom: 0; }
.fe-h { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; padding-top: 1px; }
.fe-t small { display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 6px; }
.fe.ok .fe-t { color: var(--ok); } .fe.erro { background: var(--alta-bg); } .fe.erro .fe-t { color: var(--alta); } .fe.aviso .fe-t { color: var(--media); }
.fe.nova { animation: chega 1.2s ease; }
@keyframes chega { from { background: var(--brand-soft); } to { background: transparent; } }
.tbl td small { display: block; color: var(--muted); font-size: 11.5px; }
@media (max-width: 1200px) { .mn-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .mn-cards { grid-template-columns: 1fr 1fr; } }

/* Liga/Desliga */
.side-bot { margin: 12px 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.side-bot.off { border-color: var(--alta); background: var(--alta-bg); }
.side-bot.off #botTxt { color: var(--alta); }
.liga-grid { display: grid; gap: 14px; }
.liga-item p { margin: 6px 0 0; font-size: 13px; }
.btn.btn-desligar { background: var(--alta); border-color: var(--alta); color: #fff; }
.bot-off-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: 12px; border: 1px solid var(--alta); background: var(--alta-bg); }
.desligado-tela { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--bg, #fff); padding: 24px; text-align: center; }
.desligado-tela div { max-width: 460px; }
@media (max-width: 860px) { .side-bot { margin: 0 8px; } }

/* ================= Vendas: termômetro, prioridades, ficha, planos ================= */
:root { --quente: #c2410c; --quente-bg: #fff1e8; --morno: #a16207; --morno-bg: #fdf6dd; --frio: #2563eb; --frio-bg: #e8f0fe; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --quente: #fb923c; --quente-bg: #3a2216; --morno: #facc15; --morno-bg: #332b10; --frio: #60a5fa; --frio-bg: #162540; } }
:root[data-theme="dark"] { --quente: #fb923c; --quente-bg: #3a2216; --morno: #facc15; --morno-bg: #332b10; --frio: #60a5fa; --frio-bg: #162540; }
.tm { border-top: 1px solid var(--line); background: var(--panel-2); }
.tm.compacto { max-height: 42vh; overflow-y: auto; }
.tm-h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; border-left: 4px solid var(--line); }
.tm-quente .tm-h { border-left-color: var(--quente); background: var(--quente-bg); }
.tm-morno .tm-h { border-left-color: var(--morno); background: var(--morno-bg); }
.tm-frio .tm-h { border-left-color: var(--frio); background: var(--frio-bg); }
.tm-nivel { font-weight: 700; font-size: 15px; display: flex; flex-direction: column; line-height: 1.15; }
.tm-nivel small { font-weight: 500; font-size: 12px; color: var(--muted); }
.tm-medidas { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.tm-medidas > span { display: inline-flex; align-items: center; gap: 6px; }
.tm-medidas.mini { margin: 6px 0; }
.tm-bar { display: inline-block; width: 70px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; vertical-align: middle; }
.tm-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.tm-bar.c i { background: var(--ink-2); }
.tm-reanalisar { margin-left: auto; }
.tm-corpo { padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.tm-corpo p { margin: 0; }
.tm-motivo { color: var(--ink-2); }
.tm-obj { color: var(--danger); }
.tm-resps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 4px; }
.tm-resp.sug-opt { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; font-size: 13px; white-space: normal; }
.tm-resp.sug-opt:hover { border-color: var(--brand); }
.tm-resp small { font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 11px; color: var(--brand); }
.tm-resp p { white-space: pre-wrap; flex: 1; }
.tm-resp .row { gap: 8px; font-size: 11px; }
.prio-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.prio-topo p { margin: 0; }
.prio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; margin-bottom: 16px; }
.prio-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); border-top: 4px solid var(--line); min-width: 0; }
.prio-quente { border-top-color: var(--quente); } .prio-morno { border-top-color: var(--morno); } .prio-frio { border-top-color: var(--frio); }
.prio-h { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 4px 4px 10px; }
.prio-h b { font-size: 15px; } .prio-h span { font-weight: 700; color: var(--muted); } .prio-h small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.prio-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; background: var(--panel-2); }
.prio-card.aberto { border-color: var(--brand); background: var(--panel); }
.prio-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prio-sub { font-size: 12px; margin-top: 2px; }
.prio-ult { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); font-style: italic; overflow-wrap: anywhere; }
.prio-passo { margin: 4px 0 0; font-size: 12px; }
.prio-acoes { margin-top: 8px; gap: 6px; }
.prio-det .tm { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; overflow: hidden; }
.prio-det .tm-resps { grid-template-columns: 1fr; }
.empty.sm { padding: 18px 8px; font-size: 13px; }
.playbook summary { cursor: pointer; }
.pb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; font-size: 13px; }
.pb-grid h3 { margin: 0 0 4px; font-size: 14px; } .pb-grid ul { padding-left: 18px; margin: 6px 0 0; } .pb-grid li { margin-bottom: 4px; }
.tm-pill-quente { background: var(--quente-bg); color: var(--quente); } .tm-pill-morno { background: var(--morno-bg); color: var(--morno); } .tm-pill-frio { background: var(--frio-bg); color: var(--frio); }
.ficha p { margin: 0 0 6px; } .ficha ol, .ficha ul { margin: 4px 0 8px; padding-left: 20px; }
.ficha .dores li { margin-bottom: 6px; }
.pre-wa { white-space: pre-wrap; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12px; max-height: 320px; overflow: auto; margin: 8px 0; font-family: ui-monospace, Menlo, Consolas, monospace; }
.planos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 12px; }
.plano { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 8px; }
.plano.destaque { border: 2px solid var(--brand); background: var(--brand-soft); }
.plano .pl-nome { font-weight: 700; font-size: 15px; }
.plano.novo { all: unset; cursor: pointer; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; min-height: 120px; color: var(--muted); font-weight: 600; }
.plano.novo:hover { border-color: var(--brand); color: var(--brand); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0 12px; }
.grupo-op { all: unset; cursor: pointer; display: block; padding: 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
.grupo-op:hover { border-color: var(--brand); }
@media (max-width: 1100px) { .prio-grid, .pb-grid { grid-template-columns: 1fr; } }
.tm-print { width: 100%; max-height: 220px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); }
.modal .tm-print { max-height: 320px; margin-bottom: 8px; }
.tm-doc { font-size: 12px; font-weight: 600; background: var(--brand-soft); border-radius: 6px; padding: 4px 8px; align-self: flex-start; }
.ab-var { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; font-size: 13px; } .ab-var > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; } .ab-var b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); margin-right: 6px; } @media (max-width: 860px) { .ab-var { grid-template-columns: 1fr; } }
/* Projetos */
.pj-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pj-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); min-width: 0; }
.pj-h { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 2px 4px 10px; }
.pj-h span { font-weight: 700; color: var(--muted); } .pj-h small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.pj-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; background: var(--panel-2); }
.pj-card.atrasado { border-color: var(--danger); }
.pj-sub { font-size: 12px; margin: 2px 0 6px; }
.pj-prog { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; } .pj-prog i { display: block; height: 100%; background: var(--brand); }
.pj-pos { font-size: 11.5px; margin-top: 6px; color: var(--ink-2); }
.pj-acoes { margin-top: 8px; gap: 6px; }
.pj-check { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 6px 0 10px; font-size: 13px; }
@media (max-width: 1100px) { .pj-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .pj-grid, .pj-check { grid-template-columns: 1fr; } }
/* Saúde do número */
.saude { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; border: 1px solid var(--line); }
.saude-bom { background: var(--ok-bg); } .saude-aquecendo { background: var(--morno-bg); } .saude-atencao { background: var(--quente-bg); } .saude-risco { background: var(--alta-bg); }
.saude span { font-size: 13px; color: var(--ink-2); }
.saude-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.saude-kpis > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; }
.saude-kpis b { font-size: 18px; } .saude-kpis small { font-size: 11px; color: var(--muted); }
@media (max-width: 860px) { .saude-kpis { grid-template-columns: 1fr 1fr; } }
.sv-tbl input:not([type=checkbox]), .sv-tbl textarea { width: 100%; min-width: 90px; } .sv-tbl td { vertical-align: top; } .sv-tbl textarea { min-width: 220px; font-size: 12px; }
/* App no celular */
body.offline::before { content: "Sem conexão com o PC — tentando de novo…"; position: fixed; top: 0; left: 0; right: 0; z-index: 9998; background: var(--alta); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 6px; }
@media (display-mode: standalone) { body { padding-top: env(safe-area-inset-top); } }
/* ===== Celular / app: menu embaixo, estilo aplicativo ===== */
@media (max-width: 860px) {
  .side { position: fixed; inset: auto 0 0 0; width: 100%; height: auto; flex-direction: row; align-items: stretch; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; gap: 0; z-index: 50; box-shadow: 0 -4px 14px rgba(0,0,0,.06); scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .brand, .side-bot, .side-wa, .side-foot, .side-job { display: none !important; }
  nav { flex-direction: row; gap: 0; }
  nav button, .side-bell { flex-direction: column; align-items: center; justify-content: center; font-size: 10.5px; line-height: 1.1; padding: 6px 6px; min-width: 66px; gap: 3px; position: relative; border-radius: 10px; margin: 0; white-space: nowrap; }
  nav button .ic { font-size: 18px; margin: 0; width: auto; }
  nav button em, .side-bell em { position: absolute; top: 2px; right: 8px; font-size: 10px; }
  nav button .live-dot { position: absolute; top: 6px; right: 14px; margin: 0; }
  .side-bell { display: flex !important; border: 0; background: none; }
  .side-bell span { font-size: 10.5px; }
  main { margin: 0; padding: 14px 14px calc(86px + env(safe-area-inset-bottom)); }
  header.top { flex-direction: column; align-items: stretch; gap: 10px; }
  header.top .actions { flex-wrap: wrap; }
  .chat-wrap { grid-template-columns: minmax(0, 1fr); }
  .chat-list, .chat-main { min-width: 0; }
  .seg { overflow-x: auto; }
  .notif-panel { bottom: calc(70px + env(safe-area-inset-bottom)); top: auto; max-height: 70vh; }
  .modal { width: calc(100vw - 24px); max-height: calc(100vh - 40px); overflow-y: auto; }
  .tbl, table { font-size: 12.5px; }
  .sticky-save { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

.pl-grupo { margin-bottom: 14px; }
.pl-grupo h3 { margin: 4px 0 2px; font-size: 15px; }
.pl-grupo > p { margin: 0 0 8px; font-size: 13px; }
.warn-txt { color: var(--warn, #d97706); font-weight: 600; }
.btn-reportar { margin: 6px 12px 0; padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(239,68,68,.45); background: rgba(239,68,68,.10); color: #ef4444; font-weight: 700; font-size: 13px; cursor: pointer; text-align: left; }
.btn-reportar:hover { background: rgba(239,68,68,.18); }
.btn.alerta { background: #dc2626; color: #fff; border-color: #dc2626; }
.bot-off-banner.pausa { border-color: #dc2626; background: rgba(220,38,38,.10); }
@media (max-width: 860px) { .side .btn-reportar { display: none; } }
.oferta-box { border: 1px dashed var(--brand); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; background: var(--brand-soft); }
.rapida-box { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--brand); background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 4px; }
.rapida-box > div { flex: 1 1 320px; }

/* ---------- Nichos (v3.8) ---------- */
.nz-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin-bottom: 12px; }
.nz-meta label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.nz-meta input { width: 110px; }
.nz-kpis { grid-template-columns: repeat(4, 1fr); }
.nz-pn { margin: 4px 0 8px; font-size: 13px; }
.nz-avisos { margin: 6px 0 12px; padding-left: 18px; color: var(--media); font-size: 13px; }
.nz-avisos li { margin: 3px 0; }
.nz-toggles { margin-top: 10px; gap: 6px 18px; font-size: 13px; }
.nz-nota { font-size: 12.5px; margin: 12px 0 0; }
.nz-ig { margin-top: 12px; }
.nz-ig summary { cursor: pointer; padding: 6px 0; }
.nz-igl { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.nz-igl > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nz-chip { background: var(--brand-soft); color: var(--ink); margin: 2px 0; }
.nz-prox { font-size: 12.5px; margin: 10px 0 0; }
.nz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.nz-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel-2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nz-card.prio { border-color: var(--brand-line); background: var(--brand-soft); }
.nz-card.off { opacity: .5; }
.nz-top { display: flex; gap: 10px; align-items: flex-start; }
.nz-pos { font-weight: 700; color: var(--muted); min-width: 18px; }
.nz-tit { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nz-st { color: var(--media); font-size: 12px; white-space: nowrap; }
.nz-prod { margin: 0; font-size: 13px; }
.nz-dor { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.nz-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.nz-nums b { color: var(--ink); }
.nz-fun { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; text-align: center; border-top: 1px solid var(--line); padding-top: 6px; }
.nz-fun span { display: flex; flex-direction: column; } .nz-fun small { font-size: 10.5px; color: var(--muted); }
.nz-acts { margin-top: 2px; gap: 6px; }
.nz-pr { padding: 4px 6px; min-height: 30px; font-size: 12.5px; }
.nz-ficha-sec { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.nz-ficha-sec p { margin: 4px 0; } .nz-ficha-sec ul { margin: 4px 0; padding-left: 18px; }
.nz-cuidado { color: var(--media); }
.nz-res { font-size: 14px; }
.nz-rot { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: var(--panel-2); }
.nz-rot p { margin: 4px 0; } .nz-rot ol { margin: 4px 0; padding-left: 20px; }
.nz-s-ideia { background: var(--media-bg); color: var(--media); } .nz-s-gravado { background: var(--brand-soft); color: var(--brand); } .nz-s-postado { background: var(--ok-bg); color: var(--ok); }
.nz-funil { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 10px 0 14px; }
.nz-funil div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.nz-funil small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 860px) {
  .nz-kpis { grid-template-columns: 1fr 1fr; }
  .nz-funil { grid-template-columns: 1fr 1fr; }
  .nz-grid { grid-template-columns: 1fr; }
  .nz-fun { grid-template-columns: repeat(3, 1fr); }
}
.nz-toggles .chk, #nzCaca .chk { white-space: normal; max-width: 100%; }

/* ---------- Painel da caça (v3.9.1) ---------- */
.nz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.nz-side { position: sticky; top: 16px; }
.nz-side .card { margin-bottom: 0; }
.nz-live { color: var(--ok); font-size: 12.5px; font-weight: 600; }
.nz-now { margin: -4px 0 10px; font-size: 12.5px; color: var(--ink-2); }
.nz-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.nz-big div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; display: flex; flex-direction: column; }
.nz-big b { font-size: 20px; } .nz-big small { font-size: 11px; color: var(--muted); }
.nz-sec { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.nz-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: var(--ink-2); }
.nz-fbar { display: grid; grid-template-columns: 104px 1fr 34px; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.nz-fl { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nz-ft { height: 10px; background: var(--line); border-radius: 4px; overflow: hidden; }
.nz-ft i { display: block; height: 100%; background: var(--brand); border-radius: 0 4px 4px 0; }
.nz-fbar b { text-align: right; color: var(--ink); }
.nz-spark { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; height: 90px; align-items: end; }
.nz-spark div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.nz-spark i { display: block; width: 70%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.nz-spark small { font-size: 10.5px; color: var(--muted); }
@media (max-width: 1100px) {
  .nz-layout { grid-template-columns: 1fr; }
  .nz-side { position: static; order: -1; margin-bottom: 16px; }
}
.nz-reg { margin: 6px 0 12px; font-size: 13px; }
.nz-reg ol { margin: 8px 0 6px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; counter-reset: r; }
.nz-reg li { display: grid; grid-template-columns: 1fr 70px 26px; align-items: center; gap: 8px; counter-increment: r; }
.nz-reg li span::before { content: counter(r) ". "; color: var(--muted); }
.nz-reg li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nz-reg li i { display: block; height: 8px; background: var(--brand); border-radius: 0 4px 4px 0; }
.nz-reg li b { text-align: right; }
.nz-stat { display: grid; gap: 5px; font-size: 13px; margin: -2px 0 12px; }
.nz-stat div { display: flex; align-items: center; gap: 8px; }
.nz-stat i { width: 9px; height: 9px; border-radius: 50%; background: var(--baixa); flex: none; }
.nz-stat i.ok { background: var(--ok); } .nz-stat i.bad { background: var(--alta); } .nz-stat i.off { background: var(--line); border: 1px solid var(--muted); }
.nz-stat i.pulse { animation: nzpulse 1.2s ease-in-out infinite; }
@keyframes nzpulse { 50% { opacity: .35; } }
.nz-prox2 { font-size: 12px; padding-left: 17px; }

/* ---------- Menu: abas extras guardadas em "Mais" ---------- */
#nav .nav-extra { display: none; }
#nav.mais-on .nav-extra { display: flex; }
#nav.mais-on #navMais { color: var(--brand); }

/* ---------- Produção ---------- */
.pd-resumo { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: 4px 0 14px; }
.pd-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; min-width: 96px; box-shadow: var(--shadow); }
.pd-kpi b { display: block; font-size: 24px; line-height: 1.1; }
.pd-kpi small { color: var(--muted); }
.pd-kpi.urg { border-color: var(--alta); background: var(--alta-bg); }
.pd-kpi.urg b { color: var(--alta); }
.pd-kpi.ok b { color: var(--ok); }
.pd-dica { flex: 1 1 260px; margin: 0; align-self: center; }
.pd-filtros { display: inline-flex; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.pd-filtros button { all: unset; cursor: pointer; padding: 6px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; }
.pd-filtros button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pd-card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--brand-line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pd-card.pr-urgente { border-left-color: var(--alta); }
.pd-card.pr-alta { border-left-color: var(--media); }
.pd-card.pr-entregue { border-left-color: var(--ok); }
.pd-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pd-tag { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: var(--media-bg); color: var(--media); }
.pr-urgente .pd-tag { background: var(--alta-bg); color: var(--alta); }
.pr-entregue .pd-tag { background: var(--ok-bg); color: var(--ok); }
.pd-cod { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .08em; border: 1px dashed var(--line); border-radius: 6px; padding: 1px 7px; }
.pd-card h3 { margin: 2px 0 0; font-size: 16px; overflow-wrap: anywhere; }
.pd-sub, .pd-meta, .pd-tipo, .pd-dor, .pd-ok { margin: 0; }
.pd-meta { font-size: 12.5px; }
.pd-cli { margin: 2px 0; padding: 6px 10px; border-left: 3px solid var(--line); background: var(--panel-2); border-radius: 0 8px 8px 0; color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.pd-passo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; margin-top: 6px; }
.pd-passo span { width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 12px; }
.pd-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-btns .btn { text-decoration: none; }
.pd-entregar { display: flex; gap: 8px; }
.pd-entregar input { flex: 1; min-width: 0; }
.pd-up { align-self: flex-start; cursor: pointer; }
@media (max-width: 860px) { .pd-grid { grid-template-columns: 1fr; } }
.pd-testes { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.pd-testes b { margin-right: 4px; }
.pd-t { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.pd-t.st-ativo { background: var(--brand-soft); border-color: var(--brand-line); }
.pd-t.st-convertido { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pd-t.st-encerrado, .pd-t.st-cobranca { background: var(--alta-bg); color: var(--alta); border-color: transparent; }
.pd-preco { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink-2); }
.pd-off { margin: 0; color: var(--alta); font-weight: 600; font-size: 13px; }
