/* Layout: barra superior com navegação; cada vista abre com título + período; blocos em grade de 12 colunas, hairlines em vez de sombras. */
:root {
  --bg: #f4f3ee; --surface: #fcfcfa; --surface-2: #f7f6f1; --fg: #15150f; --fg-2: #504f48; --muted: #87857c;
  --line: #e6e4dc; --line-2: #d2cfc5; --accent: #1e6b58; --accent-soft: #dfeee8; --accent-ink: #145141;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4;
  --frio: #2a78d6; --morno: #eda100; --quente: #e34948; --sem_analise: #c3c2b7;
  --good: #0ca30c; --warn: #fab219; --crit: #d03b3b; --good-text: #006300; --warn-text: #8a5b00;
  --shadow: 0 1px 2px rgba(21,21,15,.04), 0 8px 24px -16px rgba(21,21,15,.18);
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "IBM Plex Sans Condensed", var(--font);
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111210; --surface: #191a17; --surface-2: #1f201d; --fg: #f1f0ea; --fg-2: #bfbeb3; --muted: #88867d;
  --line: #292a26; --line-2: #3a3b36; --accent: #4fb897; --accent-soft: #1b352c; --accent-ink: #7dd3b7;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181;
  --frio: #3987e5; --morno: #c98500; --quente: #e66767; --sem_analise: #3a3b36; --good-text: #0ca30c; --warn-text: #fab219;
  --shadow: none; color-scheme: dark } }

* { box-sizing: border-box }
[hidden] { display: none !important }
html, body { margin: 0 }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 13.5px; line-height: 1.45; -webkit-font-smoothing: antialiased }
a { color: var(--accent-ink) }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0 }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 600 }
h1 { font-size: 22px; letter-spacing: -.01em }
h2 { font-size: 14px }
h3 { font-size: 12px; color: var(--fg-2); font-weight: 500 }
.eyebrow { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500 }
.tnum { font-variant-numeric: tabular-nums }
select, input[type="date"], input[type="month"], input[type="number"], input[type="text"], input[type="search"] { font: inherit; font-size: 12.5px; color: var(--fg); background: var(--surface); border: 1px solid var(--line-2); border-radius: 7px; padding: 5px 8px; min-width: 0 }
select { color: var(--fg-2) }
.btn { border: 1px solid var(--line-2); background: var(--surface); border-radius: 7px; padding: 6px 12px; font-weight: 500; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px }
.btn:hover { border-color: var(--muted) }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff }
.btn.small { padding: 3px 8px; font-size: 12px }
.btn.danger { color: var(--crit) }
.btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.muted { color: var(--muted) }
.loading { color: var(--muted); padding: 24px; text-align: center }

.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line) }
.top-in { max-width: none; margin: 0 auto; padding: 0 28px; display: flex; align-items: stretch; gap: 0 18px; min-height: 54px; flex-wrap: wrap }
.top-in > :not(.tabs) { align-self: center }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; margin-right: 6px }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center }
.brand .mark svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round }
.tabs { display: flex; gap: 2px; align-self: stretch; overflow: visible; flex: 0 1 auto }
@media (max-width: 700px) { .tabs { overflow-x: auto; scrollbar-width: none; flex-basis: 100%; order: 10 } .tabs::-webkit-scrollbar { display: none } }
.tab { padding: 0 12px; color: var(--fg-2); font-weight: 500; border-bottom: 2px solid transparent; display: flex; align-items: center; min-height: 54px; white-space: nowrap; line-height: 1 }
.tab:hover { color: var(--fg) }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent) }
.spacer { flex: 1 }
.conn { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--fg-2); white-space: nowrap }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent) }
.conn.bad .dot { background: var(--crit); box-shadow: 0 0 0 3px color-mix(in srgb, var(--crit) 22%, transparent) }
.conn.warn .dot { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent) }

.period { position: relative }
.period > button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 7px; padding: 6px 10px; font-size: 13px; font-weight: 500; white-space: nowrap }
.period > button svg { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 1.8 }
.period > button:hover { border-color: var(--muted) }
.pop { position: absolute; right: 0; top: calc(100% + 6px); width: 300px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 32px -8px rgba(0,0,0,.25); padding: 6px; z-index: 30 }
.pop[hidden] { display: none }
.pop .opt { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 10px; border-radius: 6px; text-align: left; font-size: 13px }
.pop .opt:hover { background: var(--surface-2) }
.pop .opt[aria-checked="true"] { font-weight: 600 }
.pop .opt[aria-checked="true"]::after { content: "✓"; font-weight: 700; color: var(--accent) }
.pop .custom { border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 10px 6px }
.pop .custom .eyebrow { margin-bottom: 8px }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.dates label { display: grid; gap: 3px; font-size: 11px; color: var(--muted) }
.dates input { width: 100% }
.pop .apply { margin-top: 10px; width: 100%; background: var(--accent); color: #fff; border-radius: 7px; padding: 8px; font-weight: 600 }
.err { color: var(--crit); font-size: 12px; margin-top: 6px; min-height: 1em }

main { max-width: none; margin: 0 auto; padding-block: 22px 56px; padding-inline: 28px }
@media (max-width: 600px) { .top-in { padding: 0 16px } main { padding-inline: 16px } }
.view[hidden] { display: none }
.vhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px }
.vhead p { margin: 2px 0 0; color: var(--fg-2) }
.range { font-size: 12.5px; color: var(--muted) }
.range b { color: var(--fg-2); font-weight: 500 }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)) }
.block { grid-column: span 12; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; box-shadow: var(--shadow); position: relative }
.bh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap }
.bh small { font-weight: 400; color: var(--muted); font-size: 12px }
@media (min-width: 780px) and (max-width: 1199px) { .c3, .c4, .c5, .c6, .c7 { grid-column: span 6 } .c8 { grid-column: span 12 } }
@media (min-width: 1200px) { .c3 { grid-column: span 3 } .c4 { grid-column: span 4 } .c5 { grid-column: span 5 } .c6 { grid-column: span 6 } .c7 { grid-column: span 7 } .c8 { grid-column: span 8 } .c12 { grid-column: span 12 } }

.grid.editing .block { outline: 1.5px dashed var(--line-2); outline-offset: 2px; cursor: grab; padding-top: 38px }
.grid.editing .block.dragging { opacity: .45 }
.grid.editing .block.over { outline-color: var(--accent); outline-style: solid }
.edbar { display: none; position: absolute; top: 8px; left: 10px; right: 10px; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted) }
.grid.editing .edbar { display: flex }
.edbar .grip { letter-spacing: -2px; font-size: 14px; color: var(--muted); cursor: grab }
.edbar .name { font-weight: 500; color: var(--fg-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.edbar button { border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 7px; font-size: 11px; background: var(--surface); color: var(--fg-2) }
.edbar button:hover { border-color: var(--muted); color: var(--fg) }
.block.hidden-block { display: none }
.grid.editing .block.hidden-block { display: block; opacity: .5 }
.editnote { font-size: 12.5px; color: var(--fg-2); background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; display: none }
.editing-on .editnote { display: block }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)) }
.tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 10px; min-width: 0; display: grid; gap: 2px }
.tile .lbl { font-size: 12px; color: var(--fg-2) }
.tile .val { font-size: 27px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; font-family: var(--cond) }
.tile .foot { font-size: 12px; color: var(--muted); margin-top: 6px }
#b-tiles { padding: 0; background: none; border: 0; box-shadow: none }
.grid.editing #b-tiles { padding: 38px 10px 10px; background: var(--surface) }

svg.chart { width: 100%; height: auto; display: block; overflow: visible }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted) }
.chart .grid-l { stroke: var(--line); stroke-width: 1 }
.chart .axis { stroke: var(--line-2); stroke-width: 1 }
.chart .lab { fill: var(--fg-2); font-weight: 500 }
.chart rect:hover { opacity: .85 }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--fg-2); margin-top: 8px }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px }
.stack { display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px }
.stack span { display: block; height: 100% }
.hbars { display: grid; gap: 9px }
.hb { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--line) } .hb:first-child { border-top: 0 }
.hb > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.hb .bar { height: 14px; border-radius: 0 4px 4px 0; background: var(--s3); min-width: 2px }
.hb .n { text-align: right; color: var(--fg); font-weight: 600; font-family: var(--cond); font-size: 14px }
.hb .conv { font-size: 11px; color: var(--muted); margin-left: 4px }
@media (max-width: 480px) { .hb { grid-template-columns: 96px 1fr 70px } }

.rows { display: grid }
.row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px }
.row:first-child { border-top: 0 }
.row .d { color: var(--muted); font-size: 12px }
.row .d.hot { color: var(--crit); font-weight: 500 }
.row a { text-decoration: none; color: inherit } .row a:hover { text-decoration: underline }

.twrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px }
table { border-collapse: collapse; width: 100%; font-size: 13px }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: normal; min-width: 0 }
td.nw, td .chip, td .temp { white-space: nowrap }
td.wrap { white-space: normal; max-width: 360px }
tr:last-child td { border-bottom: 0 }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
tr.click { cursor: pointer } tr.click:hover td { background: var(--surface-2) }
td .sub { color: var(--muted); font-size: 12px }
.empty { color: var(--muted); padding: 24px; text-align: center }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-2); font-weight: 500; white-space: nowrap }
.chip.stage { background: var(--surface-2) }
.chip.ok { color: var(--good-text); border-color: color-mix(in srgb, var(--good) 40%, transparent) }
.chip.bad { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, transparent) }
.temp { display: inline-flex; align-items: center; gap: 8px }
.meter { position: relative; height: 5px; border-radius: 3px; background: var(--line); width: 72px; overflow: hidden }
.meter b { position: absolute; inset: 0 auto 0 0; border-radius: 3px }
.temp .sc { font-weight: 600; min-width: 2ch; font-family: var(--cond); font-size: 14px }
.quente .meter b { background: var(--quente) } .morno .meter b { background: var(--morno) } .frio .meter b { background: var(--frio) }
.quente .sc { color: var(--quente) } .morno .sc { color: var(--warn-text) } .frio .sc { color: var(--frio) }
.ok-t { color: var(--good-text) } .warn-t { color: var(--warn-text) } .crit-t { color: var(--crit) }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; background: var(--surface) }
.seg button { padding: 5px 11px; font-size: 12.5px; font-weight: 500; color: var(--fg-2); display: flex; align-items: center; gap: 6px; white-space: nowrap }
.seg button svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8 }
.seg button + button { border-left: 1px solid var(--line-2) }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink) }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.fbar { grid-column: span 12; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px }
.fbar input[type="search"] { flex: 1 1 180px }
.fbar .count { font-size: 12.5px; color: var(--muted); margin-left: auto; white-space: nowrap }
.fbar .clear { font-size: 12px; color: var(--accent-ink); text-decoration: underline }

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; margin: 0 -18px; padding-inline: 18px; scroll-snap-type: x proximity }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 8px; align-content: start; min-height: 220px; scroll-snap-align: start }
.col.over { outline: 2px solid var(--accent); outline-offset: -2px } .kanban .card.dragging { opacity: .4 } .kanban .card { cursor: grab }
.col-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 2px; font-size: 12.5px; font-weight: 600 }
.col-h .cnt { font-weight: 500; color: var(--muted); font-size: 12px }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 10px 9px 12px; position: relative; cursor: pointer; display: grid; gap: 6px; text-align: left; width: 100% }
.card::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--line-2) }
.card.quente::before { background: var(--quente) } .card.morno::before { background: var(--morno) } .card.frio::before { background: var(--frio) }
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow) }
.card .nm { font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline }
.card .int { color: var(--fg-2); font-size: 12.5px }
.card .ft { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); align-items: center }
.card .ft .src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0 }
.card .nx { font-size: 12px; color: var(--fg-2); border-top: 1px solid var(--line); padding-top: 6px; display: flex; gap: 6px; align-items: baseline }
.card .nx::before { content: "→"; color: var(--accent) }
.card .flag { font-size: 11px; color: var(--crit); font-weight: 500 }

.flist { display: grid; gap: 12px }
.funnel-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); display: grid; gap: 8px }
.funnel-card .fh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.funnel-card .fh h3 { font-size: 14px; color: var(--fg); font-weight: 600 }
.funnel-card .fh .tools { margin-left: auto; display: flex; gap: 6px }
.stages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center }
.stages .st { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 8px; font-size: 12.5px }
.stages .arrow { color: var(--muted); font-size: 12px }
.stages .st.won { border-color: color-mix(in srgb, var(--good) 50%, transparent) }
.stages .st.lost { border-color: color-mix(in srgb, var(--crit) 50%, transparent) }
.fedit { display: grid; gap: 10px; border: 1px solid var(--accent); border-radius: 10px; padding: 14px; background: var(--surface) }
.fedit label { display: grid; gap: 4px; font-size: 12px; color: var(--muted) }
.fedit input[type="text"] { width: 100% }
.stage-rows { display: grid; gap: 6px }
.stage-row { display: grid; grid-template-columns: 22px 1fr auto auto auto auto; gap: 6px; align-items: center }
.stage-row .idx { font-size: 11px; color: var(--muted); font-family: var(--mono); text-align: right }
.stage-row select { font-size: 12px; padding: 4px 6px }
.stage-row button { border: 1px solid var(--line-2); border-radius: 5px; width: 26px; height: 26px; font-size: 12px; color: var(--fg-2); background: var(--surface) }
.stage-row button:hover { border-color: var(--muted) }
.fedit .fa { display: flex; gap: 8px; flex-wrap: wrap }
.help { font-size: 12.5px; color: var(--fg-2); line-height: 1.5 }

.ficha-head { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center }
.back { border: 1px solid var(--line-2); border-radius: 7px; padding: 5px 10px; font-size: 12.5px; color: var(--fg-2); background: var(--surface) }
.ficha-head .meta { color: var(--fg-2); font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center }
.gauge { display: flex; align-items: center; gap: 16px }
.gauge .big { font-size: 48px; font-weight: 600; line-height: 1; letter-spacing: -.03em; font-family: var(--cond) }
.gauge .sub { color: var(--muted); font-size: 12px }
.gauge .tname { font-weight: 600; text-transform: capitalize }
.facts { display: grid; gap: 11px; margin-top: 14px }
.fact { display: grid; grid-template-columns: 20px 1fr; gap: 9px; align-items: start }
.fact .ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; margin-top: 1px }
.fact .ic.sim { background: var(--good) } .fact .ic.nao { background: var(--crit) } .fact .ic.desconhecido { background: var(--muted) }
.fact .hd { display: flex; justify-content: space-between; gap: 8px; font-weight: 500 }
.fact .pts { color: var(--muted); font-size: 12px; font-family: var(--mono) }
.fact .q { color: var(--fg-2); font-size: 12.5px; border-left: 2px solid var(--line-2); padding-left: 8px; margin-top: 4px; font-style: italic; line-height: 1.4 }
.fact button { font-size: 11px; color: var(--muted); text-decoration: underline; margin-top: 3px }
.summary { line-height: 1.6; margin: 0 0 12px }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center }
.suggest { border: 1px solid var(--line); border-left: 3px solid var(--s4); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); font-size: 13px }
.suggest .eyebrow { margin-bottom: 3px }
.thread { display: grid; gap: 8px; max-height: 620px; overflow: auto; padding-right: 6px }
.msg { max-width: 82%; padding: 7px 10px; border-radius: 10px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); line-height: 1.45; white-space: pre-wrap; word-break: break-word }
.msg.out { margin-left: auto; background: var(--accent-soft); border-color: transparent }
.msg.bot { opacity: .7 }
.msg.note { border-style: dashed; margin-left: auto; background: var(--surface) }
.msg .t { font-size: 10.5px; color: var(--muted); margin-top: 3px; text-align: right; white-space: nowrap }
.msg .audio { font-family: var(--mono); font-size: 11px; color: var(--muted) }
.msg .sep { font-size: 11px; color: var(--muted); text-align: center; padding: 6px 0 }
.evid { background: color-mix(in srgb, var(--s4) 28%, transparent); border-radius: 2px; padding: 0 1px }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px }
.inline-form input { width: 120px }

.rep-ctl { display: grid; gap: 12px }
.rep-ctl .rowf { display: flex; gap: 8px; flex-wrap: wrap; align-items: end }
.rep-ctl label { display: grid; gap: 4px; font-size: 11.5px; color: var(--muted) }
.cmp-table td.num.pos { color: var(--good-text) } .cmp-table td.num.neg { color: var(--crit) }
.cmp-bars { display: grid; gap: 10px }
.cmp-bar { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; font-size: 12.5px }
.cmp-bar .pair { display: grid; gap: 3px }
.cmp-bar .pair div { height: 10px; border-radius: 0 3px 3px 0; min-width: 2px }
.cmp-bar .pair .a { background: var(--s1) } .cmp-bar .pair .b { background: var(--s2) }
.rep-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) }
.rep-tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2) }
.rep-tile .lbl { font-size: 11.5px; color: var(--muted) }
.tile.click, .rep-tile.click { cursor: pointer; transition: border-color .15s, box-shadow .15s }
.tile.click:hover, .rep-tile.click:hover { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent) }
.tile.click .lbl::after, .rep-tile.click .lbl::after { content: " ↗"; color: var(--accent); opacity: 0; transition: opacity .15s }
.tile.click:hover .lbl::after, .rep-tile.click:hover .lbl::after { opacity: 1 }
.rep-tile .val { font-size: 22px; font-weight: 600; font-family: var(--cond); letter-spacing: -.02em }

.rk-pos { font-family: var(--cond); font-weight: 600; font-size: 15px; color: var(--muted); width: 28px; display: inline-block }
.rk-pos.p1 { color: #b8860b } .rk-pos.p2 { color: #8a8f99 } .rk-pos.p3 { color: #a0522d }
.share { display: inline-flex; align-items: center; gap: 8px; min-width: 160px; white-space: nowrap }
.share .bar { height: 10px; border-radius: 0 3px 3px 0; background: var(--s3); min-width: 2px; flex: none }
.share .v { font-variant-numeric: tabular-nums; font-weight: 500 }
.share .pct { color: var(--muted); font-size: 11.5px }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; font-size: 13px; margin: 0 }
.kv dt { color: var(--muted) } .kv dd { margin: 0 }
.alist { display: grid; gap: 8px }
.alert { display: grid; grid-template-columns: 3px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: var(--surface-2) }
.alert .sev { width: 3px; height: 100%; border-radius: 2px; min-height: 34px }
.alert .sev.crit { background: var(--crit) } .alert .sev.warn { background: var(--warn) } .alert .sev.ok { background: var(--good) }
.alert .ttl { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.alert .desc { color: var(--fg-2); font-size: 12.5px; margin-top: 2px }
.alert .when { color: var(--muted); font-size: 12px; white-space: nowrap }

.drawer-back { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 65 }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 32px -16px rgba(0,0,0,.35); z-index: 66; display: flex; flex-direction: column }
.drawer[hidden], .drawer-back[hidden] { display: none }
.drawer-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line) }
.drawer-h h2 { font-size: 15px }
.drawer-b { overflow: auto; padding: 8px 10px 20px; flex: 1 }
.drow { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 8px; border-radius: 8px; cursor: pointer; border-bottom: 1px solid var(--line) }
.drow:hover { background: var(--surface-2) }
.drow .nm { font-weight: 600 }
.drow .amt { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; white-space: nowrap }
.drow .sub { grid-column: 1 / -1; color: var(--muted); font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap }
.umenu { position: relative }
.umenu > button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 12.5px; font-weight: 500; white-space: nowrap }
.umenu .avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700 }
.umenu-pop { width: 220px } .umenu-pop .opt { text-decoration: none; color: inherit; display: block }
.mt-sched { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); margin-top: 8px; display: grid; gap: 6px; font-size: 13px }
.mt-sched .hd { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center }
.mt-sched .st { display: flex; gap: 6px; flex-wrap: wrap }
.sched-form { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 8px }
.sched-form label { display: grid; gap: 3px; font-size: 11.5px; color: var(--muted) }
.sched-form input, .sched-form select { width: 100% }
.cal { display: grid; grid-template-columns: 52px repeat(6, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 10px; font-size: 11.5px; --slot: 26px }
.cal .hd { background: var(--surface-2); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 6px 8px; font-weight: 600; text-align: center }
.cal .hd.today { color: var(--accent-ink) } .cal .hd:first-child { border-left: 0 }
.cal .times { position: relative; border-right: 1px solid var(--line) }
.cal .times div { height: var(--slot); color: var(--muted); font-size: 10.5px; text-align: right; padding-right: 6px; transform: translateY(-6px) }
.cal .day { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--slot) - 1px), var(--line) calc(var(--slot) - 1px), var(--line) var(--slot)) }
.cal .day.past { background-color: color-mix(in srgb, var(--surface-2) 70%, transparent) }
.cal .slot { position: absolute; left: 0; right: 0; height: var(--slot); cursor: pointer; display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; color: transparent; font-size: 10px }
.cal .slot:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-ink) }
.cal .slot.full { cursor: not-allowed } .cal .slot.full:hover { background: color-mix(in srgb, var(--crit) 10%, transparent); color: var(--crit) }
.cal .ev { position: absolute; border-radius: 5px; padding: 3px 6px; color: #fff; overflow: hidden; font-size: 11px; line-height: 1.25; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.15); border: 1px solid rgba(255,255,255,.35) }
.cal .ev.done { opacity: .55 } .cal .ev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.cal .now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--crit); z-index: 2; pointer-events: none }
@media (max-width: 780px) { .cal { grid-template-columns: 44px repeat(6, minmax(120px, 1fr)); overflow-x: auto } }
.row.task { grid-template-columns: 96px 1fr auto; align-items: center }
.row.task .k { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; color: var(--muted) }
.queue .row.task { grid-template-columns: 8px 96px 1fr auto; } .queue .row.task .u { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); margin-top: 6px } .queue .row.task .u.u1 { background: var(--crit) } .queue .row.task .u.u2 { background: var(--warn) } .queue .row.task .u.u3 { background: var(--s1) }
.queue .row.task .dl { font-size: 11.5px; color: var(--muted); margin-left: 6px; white-space: nowrap } .queue .row.task .dl.late { color: var(--crit); font-weight: 500 }
.goal { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11.5px; color: var(--muted) } .goal .meter { width: 70px; flex: none } .goal.ok { color: var(--good-text) }
#t-goals input { width: 92px; font: inherit; font-size: 12.5px; text-align: right } #t-cpl td.num { font-family: var(--cond) }
.inline-form.lost { gap: 8px } .inline-form.lost select, .inline-form.lost input[type=text] { width: auto; min-width: 160px } .inline-form.lost label { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--fg-2) }
.note-form { grid-column: 1 / -1; display: grid; gap: 6px; margin: 0 0 12px } .note-form textarea { font: inherit; font-size: 13px; min-height: 60px; resize: vertical; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: var(--bg); color: inherit }
.notes { display: grid; gap: 6px; margin-bottom: 14px } .note { border-left: 3px solid var(--s4); background: var(--surface-2); border-radius: 6px; padding: 7px 10px; font-size: 12.5px; white-space: pre-wrap } .note .by { color: var(--muted); font-size: 11px; margin-top: 3px }
.kanban .card .age { color: var(--muted) } .kanban .card .age.slow { color: var(--warn-text); font-weight: 500 }
/* Hoje: para chamar agora */
.hot-block { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface)) }
.hot-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) }
.hot-card { border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 10px; padding: 12px 14px; background: var(--surface); display: grid; gap: 6px; min-width: 0 }
.hot-card.g-venda_sugerida { border-left-color: var(--good) } .hot-card.g-fechamento { border-left-color: var(--s5) } .hot-card.g-pos_reuniao { border-left-color: var(--s1) } .hot-card.g-quente { border-left-color: var(--quente) } .hot-card.g-morno { border-left-color: var(--morno) }
.hot-card .hc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px } .hot-card .grp { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--fg-2) }
.hot-card .hc-name { font-weight: 600; font-size: 15px; letter-spacing: -.01em } .hot-card .hc-name a { color: inherit; text-decoration: none } .hot-card .hc-name a:hover { text-decoration: underline }
.hot-card .hc-meta { font-size: 12px; color: var(--muted) }
.hot-card .hc-why { font-size: 12.5px; color: var(--fg-2); border-left: 2px solid var(--line-2); padding-left: 8px; font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.hot-card .hc-next { font-size: 12.5px; color: var(--accent-ink) } .hot-card .hc-next::before { content: "→ " }
.hot-card .hc-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px }
.hot-card .wait { color: var(--crit); font-weight: 500 }
#ct-details summary { cursor: pointer; list-style: none } #ct-details summary::-webkit-details-marker { display: none }
/* Leads: chips de atalho */
.chips-bar { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: -4px }
.chips-bar button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 500; color: var(--fg-2) }
.chips-bar button:hover { border-color: var(--muted) } .chips-bar button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff }
.chips-bar .more { margin-left: auto; border-style: dashed; color: var(--muted) }
#fbar.collapsed > :not(#f-q):not(#f-clear):not(#f-count) { display: none }
#t-leads tr.quente td:first-child { box-shadow: inset 3px 0 var(--quente) } #t-leads tr.morno td:first-child { box-shadow: inset 3px 0 var(--morno) }
.row.task .k.responder { color: var(--crit) } .row.task .k.follow_up { color: var(--warn-text) } .row.task .k.proximo_passo { color: var(--accent-ink) }
.row.task .act { display: flex; gap: 6px }
.contract { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: var(--surface-2); display: grid; gap: 8px }
.contract.done { opacity: .7 }
.contract .hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.contract .hd .nm { font-weight: 600 } .contract .hd .meta { color: var(--muted); font-size: 12px }
.contract .prog { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-2) }
.contract .prog .meter { width: 90px }
.contract .hd .tools { margin-left: auto; display: flex; gap: 6px; align-items: center }
.contract .docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 16px }
.contract .docs label { display: flex; gap: 8px; align-items: center; font-size: 12.5px; cursor: pointer }
.contract .docs label.ok { color: var(--muted); text-decoration: line-through }
.contract .docs label small { color: var(--muted); font-size: 11px }
/* relatório (modal) */
.lcard-in.rep { width: min(960px, 100%) } .rep-sec { margin: 0 0 22px } .rep-sec h3 { margin: 0 0 8px; font-size: 14px } .rep-sec .def { color: var(--muted); font-size: 11.5px }
.rep-table td.pos { color: var(--good-text) } .rep-table td.neg { color: var(--crit) } .rep-table tr.tot td { font-weight: 600; border-top: 2px solid var(--line-2) }
@media print { body > *:not(#rep) { display: none !important } #rep { position: static; padding: 0; display: block } .lcard-in.rep { max-height: none; box-shadow: none; border: 0; width: 100% } .lc-body { overflow: visible } .lc-actions { display: none } body { background: #fff } }
/* card do lead (modal por cima da lista) */
.lcard-back { position: fixed; inset: 0; background: rgba(21,21,15,.38); z-index: 60; backdrop-filter: blur(2px) }
.lcard { position: fixed; inset: 0; z-index: 61; display: flex; align-items: flex-start; justify-content: center; padding: 28px 16px; pointer-events: none }
.lcard-in { pointer-events: auto; width: min(1180px, 100%); max-height: calc(100vh - 56px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); display: flex; flex-direction: column; overflow: hidden }
body.lcard-open { overflow: hidden }
.lc-head { padding: 18px 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; align-items: start }
.lc-title { min-width: 0 } .lc-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap } .lc-name h2 { font-size: 20px; letter-spacing: -.01em }
.lc-head .meta { color: var(--fg-2); font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px }
.lc-head .chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; align-items: center } .lc-head .chips select { font-size: 12px; border: 0; background: transparent; padding: 0; color: inherit }
.lc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end }
.btn.big { padding: 9px 16px; font-size: 13.5px; gap: 8px } .btn.big svg { width: 15px; height: 15px }
.btn.icon { padding: 6px 9px; font-size: 13px; color: var(--muted) }
.lc-head #sale-form { grid-column: 1 / -1; margin: 0 0 12px }
.lc-tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; flex: none }
.lc-tabs button { padding: 10px 12px; font-size: 12.5px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap } .lc-tabs button b { font-weight: 600; color: var(--accent-ink); margin-left: 3px }
.lc-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent) }
.lc-body { overflow: auto; padding: 18px 22px 24px; flex: 1 }
.lc-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px } @media (max-width: 860px) { .lc-cols { grid-template-columns: 1fr } .lc-head { grid-template-columns: 1fr } }
.thread.tall { max-height: calc(100vh - 290px) }
.tasks { display: grid; gap: 4px } .tasks.mini .trow { grid-template-columns: auto 1fr auto; } .tasks.mini .who, .tasks.mini .x { display: none }
.trow { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 10px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 13px }
.trow.done .tt { text-decoration: line-through; color: var(--muted) }
.trow .who { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-2) } .trow .av { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 9.5px; font-weight: 600; display: grid; place-items: center }
.trow .due { font-size: 11.5px; color: var(--muted); white-space: nowrap } .trow .due.late { color: var(--crit); font-weight: 500 } .trow .due.today { color: var(--warn-text); font-weight: 500 }
.trow .x { color: var(--muted); font-size: 11px } .trow .x:hover { color: var(--crit) }
.task-new { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; margin-bottom: 10px } .task-new input, .task-new select { font: inherit; font-size: 12.5px } @media (max-width: 700px) { .task-new { grid-template-columns: 1fr 1fr } .task-new input[type=text] { grid-column: 1 / -1 } }
.tasks-done { margin-top: 10px } .tasks-done summary { cursor: pointer; color: var(--muted); font-size: 12.5px; margin-bottom: 6px }
.lf { display: grid; gap: 10px } .lf-hd { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px }
.lf-link { display: flex; gap: 6px; flex-wrap: wrap } .lf-link input { flex: 1; min-width: 180px; font: inherit; font-size: 12px; font-family: var(--mono); color: var(--fg-2) }
.lf-data { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 12.5px; gap: 4px 14px }
.lf-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px } .lf-new { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted) }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 80; max-width: calc(100vw - 32px); text-align: center }
.toast.show { opacity: 1 }
@media (prefers-reduced-motion: reduce) { .toast { transition: none } }

/* Tabelas largas: lista de leads e custo por lead cabem na largura sem rolagem em 1366px */
#t-leads td, #t-leads th { padding-left: 8px; padding-right: 8px }
#t-leads td:first-child { white-space: normal; min-width: 150px; max-width: 220px }
#t-leads td.wrap { max-width: 260px }
#t-cpl th, #t-cpl td { padding-left: 8px; padding-right: 8px }

/* Kanban: cards compactos e alinhados com dados reais */
.kanban { grid-auto-columns: minmax(270px, 1fr) }
.card .nm > span:first-child { min-width: 0; overflow-wrap: anywhere; line-height: 1.3 }
.card .nm .temp, .card .nm .muted { flex: none }
.card .ft > span:last-child { white-space: nowrap; flex: none }
.card .nx > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0 }
.card .nx::before { flex: none }
.col { min-width: 0 } .col > .card { min-width: 0; max-width: 100%; overflow: hidden; box-sizing: border-box } .card > * { min-width: 0 }

/* Lista de leads: cor da linha por situação (tons bem claros) */
:root { --tone-green: color-mix(in srgb, var(--good) 7%, var(--surface)); --tone-blue: color-mix(in srgb, var(--s1) 6%, var(--surface)); --tone-yellow: color-mix(in srgb, var(--s4) 10%, var(--surface)); --tone-red: color-mix(in srgb, var(--crit) 6%, var(--surface)); --tone-gray: color-mix(in srgb, var(--muted) 5%, var(--surface)) }
#t-leads tr.tone-green td { background: var(--tone-green) } #t-leads tr.tone-blue td { background: var(--tone-blue) } #t-leads tr.tone-yellow td { background: var(--tone-yellow) } #t-leads tr.tone-red td { background: var(--tone-red) } #t-leads tr.tone-gray td { background: var(--tone-gray) }
#t-leads tr.click:hover td { filter: brightness(.97) }
.tone-legend { margin: 0 0 10px; font-size: 11.5px } .tone-legend i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line-2); display: inline-block; vertical-align: -3px; margin-right: 5px }
.tone-legend i.tone-green { background: var(--tone-green) } .tone-legend i.tone-blue { background: var(--tone-blue) } .tone-legend i.tone-yellow { background: var(--tone-yellow) } .tone-legend i.tone-red { background: var(--tone-red) } .tone-legend i.tone-gray { background: var(--tone-gray) }
#t-leads th[data-col="next"] { width: 28% }

/* Lista de leads como planilha */
#t-leads th { position: relative; user-select: none } #t-leads th .th-in { display: inline-flex; align-items: center; gap: 2px; max-width: 100% }
#t-leads th .th-sort { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis } #t-leads th .th-sort:hover { color: var(--fg) }
#t-leads th .sortind { font-style: normal; font-size: 9px; margin-left: 4px; color: var(--accent) }
#t-leads th .fbtn { color: var(--line-2); font-size: 12px; padding: 0 3px; line-height: 1 } #t-leads th:hover .fbtn, #t-leads th.filtered .fbtn { color: var(--accent) } #t-leads th.filtered .th-sort { color: var(--accent-ink) }
#t-leads th .rz { position: absolute; right: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize } #t-leads th .rz:hover { background: color-mix(in srgb, var(--accent) 25%, transparent) }
#t-leads th.th-cols { width: 28px; text-align: right }
.colpop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; width: 250px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow), 0 12px 32px -12px rgba(0,0,0,.35); padding: 10px; font-size: 12.5px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--fg); text-align: left; cursor: default }
.colpop.right { left: auto; right: 0 }
.colpop .cp-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px } .colpop .cp-h button { font-size: 11.5px; text-decoration: underline }
.colpop .cp-sort { display: flex; gap: 4px; margin-bottom: 6px } .colpop .cp-sort button { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 4px; font-size: 11.5px; background: var(--surface-2) } .colpop .cp-sort button:hover { border-color: var(--muted) }
.colpop .cp-q { width: 100%; font: inherit; font-size: 12.5px; margin-bottom: 6px }
.colpop .cp-all { border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 4px }
.colpop .cp-list { max-height: 220px; overflow: auto; display: grid; gap: 2px } .colpop label { display: flex; gap: 6px; align-items: center; cursor: pointer; padding: 2px 2px; border-radius: 4px } .colpop label:hover { background: var(--surface-2) } .colpop label .muted { margin-left: auto; font-size: 11px }
.colpop .cp-f { margin-top: 8px; display: flex; justify-content: flex-end }

/* Assinatura eletrônica */
.sigrow { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface-2); margin-bottom: 6px; display: grid; gap: 4px; font-size: 12.5px }
.sigrow .hd { display: flex; gap: 8px; align-items: center; flex-wrap: wrap } .sigrow .sg { display: flex; gap: 12px; flex-wrap: wrap; color: var(--fg-2) } .sigrow .sg .ok-t { color: var(--good-text) } .sigrow .act { display: flex; gap: 6px; flex-wrap: wrap }
.sig-send { border-top: 1px dashed var(--line-2); padding-top: 10px; margin-top: 8px }
.row.task .k.assinatura { color: var(--s5) }

.crit-t { color: var(--crit); font-weight: 500 }

/* ---------- card do lead (redesenho): topo com régua de etapas, menu de ações, ficha lateral, contrato em passos ---------- */
.lc-head { display: block; padding: 14px 22px 0 }
.lc-top { display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; align-items: start; padding-bottom: 12px }
.lc-name h2 { margin: 0 }
.stepper { display: flex; gap: 3px; margin: 10px 0 8px; align-items: center; overflow-x: auto; scrollbar-width: none; padding-bottom: 1px }
.stepper .step { flex: 1 1 0; min-width: 72px; font-size: 11px; font-weight: 500; padding: 5px 8px 5px 15px; background: var(--surface-2); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%, 9px 50%); border: 0; border-radius: 0; cursor: pointer }
.stepper .step:first-child { clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); border-radius: 5px 0 0 5px; padding-left: 8px }
.stepper .step:last-child:not(.step-badge) { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 9px 50%); border-radius: 0 5px 5px 0 }
.stepper .step:hover { background: var(--line) ; color: var(--fg) }
.stepper .step.done { background: var(--accent-soft); color: var(--accent-ink) }
.stepper .step.cur { background: var(--accent); color: #fff; font-weight: 600 }
.stepper .step.cur:hover { background: var(--accent-ink); color: #fff }
.stepper .step-badge { flex: none; margin-left: 6px }
.lc-meta { display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--fg-2) }
.lc-meta .ph { font-family: var(--mono); font-size: 12px }
.lc-meta label { display: inline-flex; gap: 5px; align-items: center; color: var(--muted); cursor: pointer }
.lc-meta select { font-size: 12.5px; border: 0; background: transparent; padding: 0 14px 0 0; color: var(--fg); font-weight: 500; cursor: pointer; max-width: 170px }
.lc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end }
.dd-wrap { position: relative }
.dd-wrap .caret { font-size: 10px; margin-left: 2px; color: var(--muted) }
.dd { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; box-shadow: 0 12px 32px -12px rgba(0,0,0,.35); min-width: 210px; z-index: 5; display: grid; padding: 4px }
.dd button { text-align: left; padding: 7px 10px; font-size: 12.5px; border-radius: 6px; color: var(--fg); white-space: nowrap }
.dd button:hover { background: var(--surface-2) }
.dd button.danger { color: var(--crit) }
.lc-panel { border-top: 1px solid var(--line); background: var(--surface-2); padding: 10px 22px 12px; margin: 0 -22px }
.lc-panel .note-form { margin: 0 } .lc-panel .inline-form, .lc-panel #sale-form { margin: 0 } .lc-panel .eyebrow { margin-right: 4px }
.lc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 26px; align-items: start }
.lc-main { min-width: 0 }
.lc-side { border-left: 1px solid var(--line); padding-left: 20px; font-size: 12.5px; position: sticky; top: 0 }
.lc-side .eyebrow { margin-bottom: 8px }
.lc-side .kv { grid-template-columns: 80px minmax(0, 1fr); gap: 7px 10px; font-size: 12.5px }
.lc-side .kv dd { min-width: 0; overflow-wrap: anywhere }
.lc-side .sub, .kv .sub { color: var(--muted); font-size: 11.5px }
.lc-side .mini-acts { display: flex; gap: 10px; margin-top: 1px }
.lc-side .stages .st { font-size: 11px; padding: 1px 6px }
.lnk { font-size: 11.5px; color: var(--muted); text-decoration: underline; cursor: pointer; background: none; border: 0; padding: 0; font-family: inherit } .lnk:hover { color: var(--fg) }
.sec { margin-bottom: 22px } .sec:last-child { margin-bottom: 0 }
.sec .bh { margin-bottom: 10px } .sec .bh .tools { margin-left: auto }
.kv-2 { grid-template-columns: max-content 1fr }
.facts-d { margin-top: 12px } .facts-d summary { cursor: pointer; font-size: 12.5px; color: var(--muted) } .facts-d .facts { margin-top: 10px }
.lf-det summary { cursor: pointer; font-size: 12.5px; color: var(--muted) } .lf-det .lf-data { margin-top: 8px }
.evlist .row { grid-template-columns: 96px 1fr; font-size: 12.5px }
.csteps { display: grid; gap: 8px }
.cstep { border: 1px solid var(--line); border-radius: 10px; background: var(--surface) }
.cstep.cur { border-color: color-mix(in srgb, var(--accent) 45%, transparent) }
.cstep > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer } .cstep > summary::-webkit-details-marker { display: none }
.cstep .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); flex: none }
.cstep.done .n { background: var(--good); border-color: var(--good); color: #fff }
.cstep.cur .n { background: var(--accent); border-color: var(--accent); color: #fff }
.cstep .tt { font-weight: 600; font-size: 13.5px } .cstep.done .tt { color: var(--fg-2) }
.cstep .sub { color: var(--muted); font-size: 12px; margin-left: auto; text-align: right }
.cstep .bd { padding: 2px 14px 14px; border-top: 1px solid var(--line) }
.cstep .bd .sched-form { margin-top: 10px }
.lc-tabs button { display: inline-flex; align-items: center; gap: 6px }
.lc-tabs button svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
@media (max-width: 900px) { .lc-grid { grid-template-columns: 1fr } .lc-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; position: static } .lc-top { grid-template-columns: 1fr } .lc-actions { justify-content: flex-start } .stepper .step { min-width: 60px } }
#doc-form label label, .sig-send label { white-space: nowrap }
.stepper .step { min-width: 0 }
@media (max-width: 600px) { .stepper .step:not(.cur) { flex: 0 0 26px; min-width: 26px; font-size: 0; height: 23px } .stepper .step.cur { flex: 1 } }

/* agenda: evento curto numa linha só (nome · closer · tipo), sem cortar o nome no meio */
.cal .ev { display: flex; flex-direction: column; justify-content: center; padding: 2px 6px }
.cal .ev .m { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9 }
.cal .ev.short { flex-direction: row; align-items: center; gap: 4px; white-space: nowrap }
.cal .ev.short b { display: inline; flex: 0 1 auto; min-width: 0 }
.cal .ev.short .m { flex: 1 1 auto; min-width: 0 }
.cal .ev.short .m::before { content: '· ' }
.cal .ev.short b { flex: 0 1 auto } .cal .ev.short .m { flex: 0 1000 auto } /* corta primeiro o closer/tipo; o nome do lead por último */

/* popover da reunião na agenda */
.evpop { position: fixed; z-index: 70; width: 340px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.35); padding: 12px 14px; font-size: 12.5px; display: grid; gap: 6px }
.evpop .ep-h { display: flex; align-items: center; gap: 8px } .evpop .ep-h b { font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .evpop .ep-h .dot { width: 10px; height: 10px; border-radius: 50%; flex: none }
.evpop .ep-l { color: var(--fg-2) } .evpop .ep-a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px } .evpop .ep-f { margin-top: 4px }
.evpop .ep-f input, .evpop .ep-f select { width: 100% }

/* ---------- chat da equipe + assistente ---------- */
.tab .badge { background: var(--crit); color: #fff; font-size: 10.5px; border-radius: 999px; padding: 1px 6px; margin-left: 6px; font-weight: 600 }
.chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; height: calc(100vh - 190px); min-height: 440px }
.ch-side { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: auto; display: flex; flex-direction: column; box-shadow: var(--shadow) }
.ch-new { padding: 12px; border-bottom: 1px solid var(--line); display: grid; gap: 8px } .ch-new input[type=text], .ch-new select { width: 100% } .ch-new .nb-list { display: grid; gap: 4px; max-height: 200px; overflow: auto; font-size: 13px } .ch-new .nb-list label { display: flex; gap: 6px; align-items: center } .ch-new .fa { display: flex; gap: 6px }
.ch-room { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); width: 100% }
.ch-room:hover { background: var(--surface-2) } .ch-room.on { background: var(--accent-soft) }
.ch-room .ic { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 600; font-size: 12px; color: var(--fg-2) } .ch-room.ai .ic { background: var(--accent); color: #fff; font-size: 15px } .ch-room.geral .ic { font-size: 16px }
.ch-room .tx { min-width: 0; display: grid } .ch-room .tx b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .ch-room .tx small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.ch-room .n { background: var(--crit); color: #fff; font-size: 10.5px; border-radius: 999px; padding: 1px 6px; font-weight: 600 }
.ch-main { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-height: 0; box-shadow: var(--shadow) }
.ch-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; flex-wrap: wrap } .ch-head b { font-size: 14px }
.ch-msgs { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px }
.cm { max-width: 78%; align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 8px 12px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere }
.cm.me { align-self: flex-end; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 12px 12px 4px 12px }
.cm.ai { max-width: 88%; border-left: 3px solid var(--accent) } .cm.think .bd { color: var(--muted); font-style: italic }
.cm .who { font-size: 11px; color: var(--muted); margin-bottom: 2px; font-weight: 500 } .cm .who span { font-weight: 400 } .cm .bd .mention { color: var(--accent-ink) }
.ch-comp { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: flex-end } .ch-comp textarea { flex: 1; resize: none; font: inherit; font-size: 13.5px; min-height: 40px; max-height: 160px }
/* ---------- manuais ---------- */
.manuals { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start }
.mn-list { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow) }
.mn-item { display: grid; gap: 2px; padding: 10px 14px; text-align: left; width: 100%; border-bottom: 1px solid var(--line) } .mn-item:hover { background: var(--surface-2) } .mn-item.on { background: var(--accent-soft) }
.mn-item b { font-size: 13px } .mn-item small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.mn-page { min-height: 300px; grid-column: auto } .mn-page textarea { width: 100%; font: inherit; font-size: 13px; font-family: var(--mono); line-height: 1.5 }
.md { font-size: 14px; line-height: 1.65; max-width: 860px } .md h2 { font-size: 18px; margin: 18px 0 8px } .md h3 { font-size: 15px; margin: 16px 0 6px } .md h4 { font-size: 12px; margin: 12px 0 4px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted) }
.md p { margin: 0 0 10px } .md ul, .md ol { margin: 0 0 10px; padding-left: 22px } .md li { margin: 2px 0 } .md code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px } .md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0 }
.md table.mdt { border-collapse: collapse; margin: 6px 0 12px; font-size: 13px } .md table.mdt td { border: 1px solid var(--line); padding: 5px 10px } .md table.mdt tr:first-child td { font-weight: 600; background: var(--surface-2) }
.cm .md { font-size: 13.5px; max-width: none } .cm .md p { margin: 0 0 6px } .cm .md p:last-child, .cm .md ul:last-child { margin-bottom: 0 } .cm .md h2, .cm .md h3 { font-size: 14px; margin: 8px 0 4px }
@media (max-width: 860px) { .chat, .manuals { grid-template-columns: 1fr } .chat { height: auto } .ch-side { max-height: 220px } .ch-msgs { min-height: 320px } }

/* chat no topo à direita + painel lateral */
.chat-btn { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; margin-right: 10px }
.chat-btn svg { width: 17px; height: 17px; stroke: var(--fg-2); fill: none; stroke-width: 1.8; stroke-linejoin: round } .chat-btn:hover { border-color: var(--muted) } .chat-btn.has svg { stroke: var(--accent-ink) }
.chat-btn .badge { position: absolute; top: -5px; right: -6px; background: var(--crit); color: #fff; font-size: 10px; border-radius: 999px; padding: 1px 5px; font-weight: 600; line-height: 1.3; margin: 0; border: 2px solid var(--surface) }
.chat-back { position: fixed; inset: 0; background: rgba(21,21,15,.25); z-index: 64 } .chat-back[hidden] { display: none }
.chat-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(1040px, 100vw); background: var(--bg); border-left: 1px solid var(--line); box-shadow: -16px 0 40px -20px rgba(0,0,0,.4); z-index: 65; display: flex; flex-direction: column; padding: 14px 16px 16px } .chat-panel[hidden] { display: none }
.chat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px } .chat-top h2 { font-size: 18px; margin: 0 } .chat-top p { margin: 2px 0 0; font-size: 12.5px } .chat-top .actions { display: flex; gap: 6px; align-items: center }
.chat-panel .chat { height: auto; flex: 1; min-height: 0 }
.ch-head .ch-del { margin-left: auto; color: var(--muted) } .ch-head .ch-del:hover { color: var(--crit) }
@media (max-width: 860px) { .chat-panel .chat { display: grid; grid-template-rows: 180px minmax(0, 1fr) } .chat-panel .ch-side { max-height: none } }

/* arquivos da conversa */
.lf-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px }
.lf-list { display: grid; gap: 6px }
.lf-row { display: grid; grid-template-columns: auto 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer }
.lf-row:hover { border-color: var(--line-2) } .lf-row.saved { background: var(--surface-2) }
.lf-row .th { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line) } .lf-row .th.ic { display: grid; place-items: center; font-size: 20px }
.lf-row .nm { min-width: 0; display: grid } .lf-row .nm a { font-size: 13px; font-weight: 500; color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .lf-row .nm a:hover { text-decoration: underline } .lf-row .nm small { color: var(--muted); font-size: 11.5px }
.lf-row .st { font-size: 12px } .lf-row .st .chip { text-decoration: none }

/* painel lateral em colunas + termômetro em barrinhas */
.drawer { width: min(720px, 100vw) }
.dlist { width: 100%; border-collapse: collapse; font-size: 12.5px }
.dlist th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 4px 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap }
.dlist td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle }
.dlist tr.dl-row { cursor: pointer } .dlist tr.dl-row:hover td { background: var(--surface-2) }
.dlist td.nm { font-weight: 600; max-width: 180px } .dlist td.sm { color: var(--fg-2); font-size: 12px } .dlist td.nw { white-space: nowrap }
.tbar { display: inline-flex; gap: 2px; vertical-align: middle } .tbar i { display: block; width: 7px; height: 12px; border-radius: 2px; background: var(--line) }
.tbar.quente i.on { background: var(--quente) } .tbar.morno i.on { background: var(--morno) } .tbar.frio i.on { background: var(--frio) }
@media (max-width: 760px) { .dlist th:nth-child(3), .dlist td:nth-child(3), .dlist th:nth-child(4), .dlist td:nth-child(4) { display: none } }
.dlist tr.dl-grp td { padding: 12px 6px 4px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; border-bottom: 0; background: transparent }

.dlist th[data-col] { cursor: pointer; user-select: none } .dlist th[data-col]:hover { color: var(--fg) } .dlist th.sorted, .dlist th.filtered { color: var(--accent-ink) } .dlist th .ci { font-size: 10px }
.colpop.dl { width: 260px } .colpop.dl .cp-sort button.on { background: var(--accent-soft); border-color: var(--accent) } .colpop.dl .cp-list label small { margin-left: auto }
