/* Copiloto de Vendas ao Vivo — estilos do app (sobre o design system /_jev/jev.css) */
.cop { padding-top: 14px; }
.hero h1 { font-size: clamp(26px, 3vw, 38px); margin: 0 0 4px; }
.hero p { color: var(--text-muted); font-size: 15px; max-width: 980px; margin: 0; }
.hero p b { color: var(--text); }
.grow { flex: 1; }
.dim { color: var(--text-dim); }

/* ---------- controles ---------- */
.controls { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--border); background: rgba(255,255,255,.025); }
.ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctl-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.scen { display: flex; gap: 6px; flex-wrap: wrap; }
.scen button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text); font: 700 13px/1.2 var(--font); cursor: pointer; white-space: nowrap; }
.scen button small { font-weight: 600; color: var(--text-muted); }
.scen button small::before { content: "· "; }
.scen button:hover { border-color: var(--border-hover); }
.scen button[aria-checked="true"] { border-color: rgba(167,139,250,.8); background: rgba(167,139,250,.16); }
.scen button[aria-checked="true"] small { color: #ddd6fe; }
#sim { min-width: 190px; }
#sim.running { background: linear-gradient(135deg, #34d399, #22d3ee); box-shadow: 0 8px 26px rgba(34,211,238,.25); }
#mic[aria-pressed="true"] { border-color: rgba(248,113,113,.7); background: rgba(248,113,113,.14); color: #fecaca; }
#mic[aria-pressed="true"]::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #f87171; box-shadow: 0 0 10px #f87171; animation: jevpulse 1s ease-in-out infinite; }
#mic.unsupported { opacity: .6; }
.segctl { display: inline-flex; gap: 3px; padding: 3px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--border-strong); }
.segctl button { border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); font: 700 13px var(--font); cursor: pointer; min-height: 32px; padding: 0 10px; white-space: nowrap; }
.segctl button[aria-checked="true"] { background: rgba(167,139,250,.2); color: var(--text); box-shadow: inset 0 0 0 1px rgba(167,139,250,.5); }

/* ---------- área principal ---------- */
.main { margin-top: 12px; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.28fr); gap: 14px; }
.call, .radar { min-width: 0; border-radius: 20px; border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); }
.call { display: flex; flex-direction: column; height: max(500px, calc(100vh - var(--main-top, 262px) - 14px)); overflow: hidden; }
.call-hd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); min-width: 0; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 800 13px var(--font); color: #0a0a0f; background: var(--ac, #9ca3af); }
.who-t { display: flex; flex-direction: column; min-width: 0; }
.who-t b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-t span { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.rec.on { color: #fecaca; border-color: rgba(248,113,113,.45); }
.rec.on i { background: #f87171; box-shadow: 0 0 10px #f87171; animation: jevpulse 1s ease-in-out infinite; }

.transcript { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.t-empty { margin: auto; max-width: 400px; text-align: center; color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.t-empty b { color: var(--text-muted); }
.t-empty .big { font-size: 40px; margin-bottom: 6px; }
.b { max-width: 88%; display: flex; flex-direction: column; gap: 4px; animation: bin .25s ease; }
@keyframes bin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.b .who { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.b .txt { padding: 9px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; word-break: break-word; }
.b.cliente { align-self: flex-start; }
.b.cliente .txt { background: rgba(255,255,255,.07); border: 1px solid var(--border-strong); border-top-left-radius: 4px; }
.b.vendedor { align-self: flex-end; align-items: flex-end; }
.b.vendedor .txt { background: rgba(167,139,250,.14); border: 1px solid rgba(167,139,250,.32); border-top-right-radius: 4px; color: #e9e5ff; }
.b.live .txt::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -2px; background: #22d3ee; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.b .tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 20px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font: 700 11px/1.6 var(--font); padding: 0 7px; border-radius: 7px; background: rgba(255,255,255,.06); color: var(--text-muted); white-space: nowrap; animation: tagin .25s ease; }
@keyframes tagin { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.tag i { font-style: normal; font-family: var(--mono); opacity: .85; }
.tag.obj { color: #fff; background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); }
.tag.ok { color: #6ee7b7; background: rgba(16,185,129,.12); }
.tag.buy { color: #bbf7d0; background: rgba(16,185,129,.22); }
.tag.lat { color: #a5f3fc; background: rgba(34,211,238,.1); font-family: var(--mono); }
.tag.prov { color: #fde68a; background: rgba(234,179,8,.12); }
.typer { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.typer .jev-input { min-height: 42px; }

/* ---------- radar ---------- */
.radar { display: flex; flex-direction: column; gap: 10px; padding: 12px; height: max(500px, calc(100vh - var(--main-top, 262px) - 14px)); overflow: hidden; }
.radar-hd { display: flex; align-items: center; gap: 10px; }
.radar-hd h3 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.rnote { font-size: 12px; color: var(--text-dim); }
.rnote b { color: #a5f3fc; font-family: var(--mono); }
.tiles { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; }
.tile { min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border); }
.tile-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.t-gauge #gauge { max-width: 190px; margin: 6px auto 0; }
.t-gauge .jev-gauge .gv { font-size: 26px; }
.stepper { position: relative; display: flex; flex-direction: column; gap: 3px; }
.stepper::before { content: ""; position: absolute; left: 6px; top: 9px; bottom: 9px; width: 2px; background: rgba(255,255,255,.1); }
.stepper .fillbar { position: absolute; left: 6px; top: 9px; width: 2px; height: 0; background: var(--jev-grad); transition: height .5s cubic-bezier(.2,.8,.2,1); }
.st { position: relative; display: flex; align-items: center; gap: 10px; min-height: 19px; }
.st i { flex: none; width: 14px; height: 14px; border-radius: 50%; background: #1b1f2b; border: 2px solid rgba(255,255,255,.22); transition: all .3s; z-index: 1; }
.st span { font-size: 12.5px; color: var(--text-dim); line-height: 1.2; }
.st b { margin-left: auto; font: 700 11.5px var(--mono); color: #a5f3fc; }
.st.seen i { background: #a78bfa; border-color: #a78bfa; }
.st.seen span { color: var(--text-muted); }
.st.now i { background: #22d3ee; border-color: #a5f3fc; box-shadow: 0 0 0 4px rgba(34,211,238,.18), 0 0 14px #22d3ee; }
.st.now span { color: var(--text); font-weight: 800; }
.sgl { display: grid; grid-template-columns: minmax(0, 1fr) 70px 42px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); margin-top: 9px; }
.sgl .trk { height: 7px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.sgl .trk i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
#b-sinal { background: linear-gradient(90deg, #34d399, #22d3ee); }
#b-risco { background: linear-gradient(90deg, #fb923c, #f87171); }
.sgl b { text-align: right; color: var(--text); font-size: 12.5px; }
.sgl.obj { grid-template-columns: auto minmax(0, 1fr); margin-top: 2px; }
.ob-now { justify-self: end; max-width: 100%; font: 800 12px/1.6 var(--font); padding: 0 8px; border-radius: 7px; color: var(--text-muted); background: rgba(255,255,255,.06); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-now.on { color: #fff; background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); }
.ob-now.none { color: #6ee7b7; background: rgba(16,185,129,.12); }
.sent { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.sent i { height: 7px; border-radius: 2px; background: rgba(255,255,255,.08); transition: background .3s; }

.chart-tile { padding-bottom: 6px; }
.lg { margin-left: auto; display: inline-flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 11.5px; color: var(--text-dim); }
.lg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: -4px; }
.l-ch { background: #34d399; } .l-se { background: #22d3ee; } .l-ob { width: 8px !important; height: 8px !important; border-radius: 50% !important; background: #f87171; }
#chart { display: block; width: 100%; height: 118px; overflow: visible; }
#chart text, #s-chart text { font-family: var(--font); }

.feed-tile { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.feed { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; overscroll-behavior: contain; }
.feed-empty { margin: auto; text-align: center; color: var(--text-dim); font-size: 13.5px; max-width: 460px; line-height: 1.55; }
.card { position: relative; flex: none; padding: 11px 13px 11px 15px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 13%, transparent), rgba(255,255,255,.02) 60%); overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.card.new { animation: cardin .55s cubic-bezier(.2,.8,.2,1); }
@keyframes cardin { 0% { opacity: 0; transform: translateX(26px) scale(.97); box-shadow: 0 0 0 1px var(--c), 0 0 40px color-mix(in srgb, var(--c) 55%, transparent); } 60% { opacity: 1; transform: none; } 100% { box-shadow: none; } }
.card.pulse { animation: cardpulse .7s ease; }
@keyframes cardpulse { 0% { box-shadow: 0 0 0 1px var(--c), 0 0 26px color-mix(in srgb, var(--c) 45%, transparent); } 100% { box-shadow: none; } }
.c-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-trig { font: 900 11.5px/1.3 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--c); }
.c-trig i { font-style: normal; font-family: var(--mono); opacity: .85; }
.c-fast { margin-left: auto; font: 800 11px var(--font); padding: 2px 8px; border-radius: 999px; color: #0a0a0f; background: linear-gradient(135deg, #fde047, #fb923c); white-space: nowrap; }
.c-lat { margin-left: auto; font: 700 11px var(--mono); color: #a5f3fc; white-space: nowrap; }
.c-title { margin-top: 5px; font-size: 16px; font-weight: 800; }
.c-say { margin-top: 5px; font-size: 14px; line-height: 1.5; color: #e2e3ea; }
.c-say b { color: var(--c); font-weight: 800; }
.c-tip { margin-top: 5px; font-size: 12px; color: var(--text-muted); }
.c-meta { margin-top: 6px; font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow { flex: none; display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 11px; background: rgba(255,255,255,.03); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); min-width: 0; animation: bin .3s ease; }
.frow b { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.frow { cursor: pointer; }
.frow:hover { border-color: var(--border-strong); }
.frow-say { flex: none; margin: -4px 0 0; padding: 8px 12px; border-radius: 0 0 11px 11px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-top: 0; font-size: 13px; }
.frow .rp { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); white-space: nowrap; }

/* ---------- resumo ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px; background: rgba(5,6,10,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: min(1000px, 100%); max-height: calc(100vh - 44px); display: flex; flex-direction: column; border-radius: 20px; background: #0f1119; border: 1px solid var(--border-strong); box-shadow: 0 40px 120px rgba(0,0,0,.6); overflow: hidden; animation: rise .22s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.s-hd, .s-ft { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; }
.s-hd { border-bottom: 1px solid var(--border); }
.s-hd h3 { margin: 0; font-size: 18px; }
.s-ft { border-top: 1px solid var(--border); font-size: 12.5px; }
.s-body { padding: 16px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.s-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.s-kpi { padding: 10px 12px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border); min-width: 0; }
.s-kpi .k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.s-kpi .v { font: 800 20px/1.3 var(--mono); margin-top: 2px; white-space: nowrap; }
.s-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.s-blk { padding: 12px 14px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border); min-width: 0; }
.s-blk h4 { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.ob-row { display: grid; grid-template-columns: minmax(0, 1fr) 1fr 28px; gap: 10px; align-items: center; font-size: 13px; margin-top: 7px; }
.ob-row .trk { height: 9px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.ob-row .trk i { display: block; height: 100%; border-radius: 999px; background: var(--c); }
.ob-row b { font-family: var(--mono); text-align: right; }
.quote { padding: 10px 12px; border-radius: 12px; background: rgba(248,113,113,.07); border: 1px solid rgba(248,113,113,.3); font-size: 14px; line-height: 1.5; }
.quote-meta { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }
.quote-meta b { color: var(--text); }
.s-evo { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13.5px; color: var(--text-muted); margin-bottom: 8px; }
.s-evo b { color: var(--text); font-family: var(--mono); }
.s-evo .up { color: #6ee7b7; } .s-evo .down { color: #fca5a5; }
#s-chart { display: block; width: 100%; height: 140px; overflow: visible; }

/* ---------- responsivo ---------- */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .t-sig { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .main { grid-template-columns: 1fr; }
  .call { height: 62vh; min-height: 420px; }
  .radar { height: auto; overflow: visible; }
  .feed-tile { min-height: 360px; }
}
@media (max-width: 640px) {
  .hero p { font-size: 14px; }
  .controls { padding: 10px; gap: 10px; }
  .scen-wrap { width: 100%; }
  .scen { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; max-width: 100%; }
  #sim { min-width: 0; flex: 1; }
  .tiles { grid-template-columns: 1fr; }
  .t-gauge #gauge { margin: 0 auto; }
  .s-kpis { grid-template-columns: 1fr 1fr; }
  .s-grid { grid-template-columns: 1fr; }
  .modal { padding: 0; place-items: stretch; }
  .sheet { max-height: 100vh; height: 100%; border-radius: 0; }
  .b { max-width: 94%; }
}
