/* CRM v2 · telas do Front B (02 §6.1). Só classes com prefixo: .hoje-* (dashboard/Hoje), .rel-*, .hub-*, .dsp-*,
   .jb-* (jornadas/construtor), .tpl-*, .ag-*, .cop-*. Tokens em styles.css; componentes comuns em v2.css. */

/* ——— dashboard / Hoje ——— */
.hoje-head { align-items: flex-end; }
.hoje-subline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; }
.hoje-today { display: inline-block; }
.hoje-today::first-letter { text-transform: uppercase; }
.hoje-stamp { color: var(--faint); font-size: var(--fs-sm); }
.hoje-refresh { width: 28px; height: 28px; }
.hoje-refresh[aria-busy="true"] .icon { animation: hoje-spin 0.9s linear infinite; }
@keyframes hoje-spin { to { transform: rotate(360deg); } }
.hoje-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.hoje-periodbox { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.hoje-periods { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.hoje-periods .chip { padding: 0.35rem 0.7rem; font-size: var(--fs-sm); min-height: 32px; }
.hoje-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.hoje-custom[hidden] { display: none; }
.hoje-custom input { height: 32px; font-size: var(--fs-sm); }
.hoje-cmp-l { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-sm); color: var(--muted); }
.hoje-cmp { height: 32px; font-size: var(--fs-sm); max-width: 220px; }
.hoje-top { display: grid; gap: 0.5rem; margin-bottom: 0.75rem; }
.hoje-top .v2-banner, .hoje-top .v2-error { margin: 0; }
.hoje-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.75rem; }
.hoje-card { grid-column: span var(--span, 3); display: flex; flex-direction: column; gap: 0.25rem; }
.hoje-card[hidden] { display: none; }
.hoje-card > h2 { margin-bottom: 0.35rem; }
.hoje-kpi-v { font-family: var(--font); font-size: var(--fs-kpi); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.hoje-kpi-v:hover { text-decoration: underline; text-underline-offset: 3px; }
.hoje-kpi-l { font-size: var(--fs-sm); color: var(--muted); }
.hoje-kpi-l a { color: var(--muted); }
.hoje-delta { color: var(--muted); }
.hoje-delta[data-dir="up"][data-good="up"], .hoje-delta[data-dir="down"][data-good="down"] { color: var(--ok); }
.hoje-delta[data-dir="down"][data-good="up"], .hoje-delta[data-dir="up"][data-good="down"] { color: var(--danger); }
.hoje-ai { color: var(--accent-ink); }
.hoje-slot { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font-size: var(--fs-md); }
.hoje-slot a { color: var(--accent-ink); }
.hoje-chart { display: block; width: 100%; height: auto; max-height: 260px; }
.hoje-chart-x { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.hoje-chart a:hover rect:not([fill="transparent"]) { opacity: 0.8; }
.hoje-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; list-style: none; margin-top: 0.4rem; font-size: var(--fs-sm); color: var(--muted); }
.hoje-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.35rem; vertical-align: -1px; }
.hoje-numbers { margin-top: 0.4rem; font-size: var(--fs-sm); }
.hoje-numbers summary { cursor: pointer; color: var(--muted); width: max-content; border-radius: 6px; }
.hoje-numbers table { margin-top: 0.5rem; }
.hoje-numbers th[scope="row"] { font-weight: 500; color: var(--ink); text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); }
.hoje-numbers th[scope="row"] a, .rel-table a, .hub-page .v2-table a { color: var(--ink); }
.hoje-act { display: grid; gap: 0.35rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: var(--fs-md); }
.hoje-act:last-child { border-bottom: 0; }
.hoje-act-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.hoje-act-n { font-size: var(--fs-h2); font-weight: 650; color: var(--ink); text-decoration: none; }
.hoje-act-n:hover { text-decoration: underline; }
.hoje-act p { font-size: var(--fs-sm); }
.hoje-src { list-style: none; display: grid; gap: 0.4rem; }
.hoje-src li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(40px, 1fr) auto auto; gap: 0.6rem; align-items: center; font-size: var(--fs-sm); }
.hoje-src li > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.hoje-src-bar { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.hoje-src-bar i { display: block; height: 100%; background: var(--info); }
.hoje-camps { display: grid; gap: 0.4rem; }
.hoje-camp-list { list-style: none; display: grid; }
.hoje-camp-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 0.75rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.hoje-camp-list li:last-child { border-bottom: 0; }
.hoje-camp-list a { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.hoje-camp-list a:hover { text-decoration: underline; }

/* ——— relatórios ——— */
.rel-body { display: grid; gap: 0.75rem; }
.rel-body > .v2-banner { margin: 0; }
.rel-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
@media (min-width: 1101px) { .rel-kpis:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.rel-kpi { display: flex; flex-direction: column; gap: 0.25rem; }
.rel-kpi .hoje-kpi-v { font-size: 1.45rem; }
.rel-funnel ul, .rel-hist { list-style: none; display: grid; gap: 0.5rem; }
.rel-funnel li, .rel-hist li { display: grid; grid-template-columns: 140px minmax(40px, 1fr) 70px 60px 110px; gap: 0.6rem; align-items: center; font-size: var(--fs-md); }
.rel-hist li { grid-template-columns: 120px minmax(40px, 1fr) 50px; }
.rel-bar { height: 14px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.rel-bar i { display: block; height: 100%; background: var(--brand); }
.rel-hist .rel-bar i { background: var(--info); }
.rel-loss { color: var(--warn); font-size: var(--fs-sm); }
.rel-table th[scope="row"], .hoje-numbers th[scope="row"], .cop-nums th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); }
.rel-table th[scope="row"] { text-align: left; font-weight: 500; color: var(--ink); padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rel-table td { white-space: nowrap; }
.rel-table tfoot th, .rel-table tfoot td { font-weight: 650; color: var(--ink); border-top: 1px solid var(--line-strong); }
.rel-heat { background: rgba(255, 15, 69, calc(var(--heat, 0) * 0.28)); }
.rel-partial { color: var(--warn); cursor: help; }
.rel-foot { margin-top: 0.5rem; font-size: var(--fs-sm); }
.rel-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0.75rem; }
.rel-how summary { cursor: pointer; font-weight: 600; }
.rel-how p { margin-top: 0.5rem; font-size: var(--fs-md); color: var(--muted); }

/* ——— templates ——— */
.tpl-filters { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.tpl-frow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; }
.tpl-frow .chip { padding: 0.35rem 0.7rem; font-size: var(--fs-sm); min-height: 32px; }
.tpl-inline { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; }
.tpl-inline select { height: 32px; font-size: var(--fs-sm); }
.tpl-inline input[type="checkbox"], .tpl-card-top input { width: 16px; height: 16px; accent-color: var(--brand); }
.tpl-groups { display: grid; gap: 1.25rem; }
.tpl-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.6rem; }
.tpl-group-head h2 { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-right: auto; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.tpl-card { display: flex; flex-direction: column; gap: 0.5rem; }
.tpl-card.sel { border-color: var(--brand); }
.tpl-card-top { display: flex; align-items: center; gap: 0.5rem; }
.tpl-name { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 650; font-size: var(--fs-md); text-align: left; cursor: pointer; text-decoration: none; overflow-wrap: anywhere; }
.tpl-name:hover { text-decoration: underline; }
.tpl-body { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tpl-meta { font-size: var(--fs-sm); color: var(--muted); }
.tpl-meta .ok-text, .tpl-checks .ok { color: var(--ok); }
.tpl-meta .bad-text, .bad-text { color: var(--danger); }
.tpl-meta .warn-text, .warn-text { color: var(--warn); }
.tpl-acts { display: flex; align-items: center; gap: 0.4rem; margin-top: auto; }
.tpl-acts .v2-menu-wrap { margin-left: auto; }
.tpl-bulk { justify-content: flex-end; }
.tpl-drawer { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1rem; align-items: start; }
.tpl-form .field { margin: 0; }
.tpl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.tpl-rule { font-size: var(--fs-xs); margin-top: 0.25rem; }
.tpl-findings { margin: 0.4rem 0 0 1.1rem; font-size: var(--fs-sm); color: var(--muted); }
.tpl-used { font-size: var(--fs-sm); color: var(--muted); }
.tpl-used a { color: var(--ink); }
.tpl-side { position: sticky; top: 0; display: grid; gap: 0.6rem; justify-items: center; }
.tpl-who { display: grid; gap: 0.25rem; width: 100%; }
.tpl-who select { height: 32px; }
.tpl-ai-out { display: grid; gap: 0.5rem; }
.tpl-var { padding: 0.6rem; border: 1px solid rgba(139, 43, 232, 0.4); border-radius: 8px; background: var(--accent-bg); display: grid; gap: 0.35rem; font-size: var(--fs-sm); }

/* ——— campanhas (índice) ——— */
.cmp-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.cmp-page .ix-bar > button[aria-controls^="ixPanel"] { display: none; }
.cmp-del.warn { color: var(--warn); }
.cmp-del.bad { color: var(--danger); }
.cmp-foot { margin-top: 0.5rem; color: var(--faint); font-size: var(--fs-sm); }

/* ——— hub da campanha ——— */
.hub-page .rec-hl a.hub-v, .jb-detail .rec-hl a.hub-v { color: var(--ink); text-decoration: none; }
.hub-page .rec-hl a.hub-v:hover, .jb-detail .rec-hl a.hub-v:hover { text-decoration: underline; }
.hub-page .rec-hl [data-tone="bad"] a.hub-v { color: var(--danger); }
.hub-page .rec-hl [data-tone="warn"] a.hub-v { color: var(--warn); }
.hub-tab { display: grid; gap: 0.75rem; }
.hub-funnel { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; counter-reset: none; }
.hub-funnel li { display: grid; gap: 0.25rem; padding: 0.6rem 0.75rem; border-radius: 8px; background: var(--surface); }
.hub-funnel li + li { position: relative; }
.hub-funnel .num { font-size: var(--fs-h2); font-weight: 650; color: var(--ink); }
.hub-funnel a.num { text-decoration: none; }
.hub-funnel a.num:hover { text-decoration: underline; }
.hub-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; margin-bottom: 0.5rem; }
.hub-dl dt { color: var(--faint); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.hub-dl dd { margin-top: 0.2rem; font-size: var(--fs-md); color: var(--ink); overflow-wrap: anywhere; }
.hub-dl dd a { color: var(--ink); }
.hub-msg-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; align-items: start; }
.hub-msg-side { display: grid; gap: 0.6rem; justify-items: start; }
.hub-text { padding: 0.6rem 0.75rem; border-radius: 8px; background: var(--surface); font-size: var(--fs-md); overflow-wrap: anywhere; width: 100%; }
.hub-reasons { list-style: none; display: grid; gap: 0.25rem; max-width: 360px; }
.hub-reasons li { display: flex; justify-content: space-between; font-size: var(--fs-md); }
.hub-cost { font-size: var(--fs-h2); margin-bottom: 0.75rem; }
.hub-ai { border-color: rgba(139, 43, 232, 0.45); margin-bottom: 1rem; }
.hub-ai ul { margin-left: 1.1rem; display: grid; gap: 0.3rem; }

/* ——— novo disparo ——— */
.dsp-split { grid-template-columns: minmax(0, 1fr) 320px; }
.dsp-main { display: grid; gap: 0.75rem; min-width: 0; }
.dsp-sec > h2 { justify-content: flex-start; }
.dsp-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); color: var(--ink); font-size: var(--fs-xs); }
.dsp-opt { display: grid; gap: 0.4rem; flex: 1; min-width: 0; }
.dsp-opt select, .dsp-opt textarea { width: 100%; max-width: 100%; }
.dsp-countrow { font-size: var(--fs-md); color: var(--muted); min-height: 1.4em; }
.dsp-count b { color: var(--ink); font-size: var(--fs-h2); }
.dsp-skel { display: inline-block; width: 80px; height: 1em; vertical-align: middle; }
.dsp-note { font-size: var(--fs-sm); }
.dsp-track { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; font-size: var(--fs-md); cursor: pointer; }
.dsp-track input { width: 16px; height: 16px; accent-color: var(--brand); }
.dsp-track:has(input:disabled) { opacity: 0.7; cursor: default; }
.dsp-tplrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 0.75rem; }
.dsp-tplrow .field { margin: 0; flex: 1 1 240px; }
.dsp-tplrow select { width: 100%; }
.dsp-msg { display: grid; gap: 0.75rem; }
.dsp-msg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 1rem; align-items: start; }
.dsp-msg-l { display: grid; gap: 0.4rem; min-width: 0; }
.dsp-msg-l textarea { width: 100%; }
.dsp-when { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: var(--fs-md); }
.dsp-when label { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.dsp-when input[type="datetime-local"] { height: 34px; }
.dsp-send { display: grid; gap: 0.6rem; }
.dsp-send .field { margin: 0; }
.dsp-summary { display: grid; gap: 0.75rem; }
.dsp-dl { display: grid; gap: 0.45rem; }
.dsp-dl > div { display: flex; justify-content: space-between; gap: 0.75rem; font-size: var(--fs-md); }
.dsp-dl dt { color: var(--muted); }
.dsp-dl dd { text-align: right; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.dsp-dl .ok-text { color: var(--ok); }
.dsp-go { width: 100%; min-height: 44px; }
.dsp-why { font-size: var(--fs-sm); color: var(--warn); }
.dsp-final { padding: 0.6rem 0.75rem; border-left: 3px solid var(--line-strong); background: var(--surface); border-radius: 6px; color: var(--ink); overflow-wrap: anywhere; }

/* ——— jornadas ——— */
.jb-table .jb-subrow td { height: auto; padding-top: 0; padding-bottom: 0.6rem; white-space: normal; font-size: var(--fs-sm); }
.jb-table .jb-subrow td > * + * { margin-left: 0.75rem; }
.jb-table tbody tr.jb-subrow { cursor: default; }
.jb-table tbody tr:has(+ .jb-subrow) td { border-bottom: 0; }
.ok-text { color: var(--ok); }
.jb-valid { margin-bottom: 1rem; border-color: rgba(253, 186, 116, 0.4); }
.jb-check { list-style: none; display: grid; gap: 0.45rem; }
.jb-check li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; font-size: var(--fs-md); }
.jb-check li.ok > :first-child { color: var(--ok); }
.jb-check li.bad > :first-child { color: var(--danger); }
.jb-check small { display: block; color: var(--faint); font-size: var(--fs-sm); }
.jb-fix { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.jb-tab { display: grid; gap: 0.75rem; }
.jb-hist { list-style: none; display: grid; gap: 0.35rem; font-size: var(--fs-md); }
.jb-hist time { color: var(--muted); font-variant-numeric: tabular-nums; }
.jb-approve { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.6rem; border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.jb-approve input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; }
.jb-canvas { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; max-width: 620px; margin: 0 auto; }
.jb-canvas-box, .jb-preview { min-width: 0; }
.jb-node .jb-inline select, .jb-tplrow select { min-width: 0; max-width: 100%; }
.jb-node { width: 100%; display: grid; gap: 0.4rem; padding: 0.8rem 0.9rem; border: 1px solid var(--line-strong); border-left: 3px solid var(--c, var(--line-strong)); border-radius: 10px; background: var(--card); }
.jb-node[data-kind="trigger"] { --c: var(--brand); }
.jb-node[data-kind="wait"] { --c: var(--muted); background: var(--surface); }
.jb-node[data-kind="sms"] { --c: var(--info); }
.jb-node[data-kind="end"] { --c: var(--ok); font-size: var(--fs-md); color: var(--muted); }
.jb-node.bad { border-color: var(--danger); }
.jb-node-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.75rem; }
.jb-kind { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.jb-inline { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; }
.jb-inline select { max-width: 100%; height: 34px; font-size: var(--fs-sm); }
.jb-tplrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.jb-tplrow .jb-inline { flex: 1 1 260px; }
.jb-tplrow select { flex: 1; min-width: 0; }
.jb-wait { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; font-size: var(--fs-sm); }
.jb-wait input { width: 72px; height: 34px; }
.jb-wait select { height: 34px; font-size: var(--fs-sm); }
.jb-desc, .jb-excerpt { font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
.jb-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jb-metrics { font-size: var(--fs-sm); color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.jb-node > *, .jb-node-head > *, .jb-tplrow > * { min-width: 0; max-width: 100%; }
.jb-msg { font-size: var(--fs-sm); }
.jb-tools { display: inline-flex; flex-wrap: wrap; gap: 0.15rem; margin-left: auto; }
.jb-node { min-width: 0; }
.jb-conn { width: 2px; height: 22px; background: var(--line-strong); position: relative; list-style: none; display: grid; place-items: center; }
.jb-conn:has(.jb-plus) { height: 40px; }
.jb-plus { position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.jb-plus:hover { border-color: var(--brand); color: var(--brand-ink); }
.jb-preview { margin-top: 0.25rem; }
.jb-split { grid-template-columns: minmax(0, 1fr) 320px; }
.jb-side { display: grid; gap: 0.75rem; }
.jb-rules { display: grid; gap: 0.6rem; }
.jb-rules h2, .jb-vh { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); display: flex; justify-content: space-between; }
.jb-rule { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem; font-size: var(--fs-md); border: 0; padding: 0; margin: 0; }
.jb-rule input[type="number"] { width: 72px; height: 32px; }
.jb-rule select { height: 32px; }
.jb-rule legend { float: left; margin-right: auto; }
.jb-rule label { display: inline-flex; align-items: center; gap: 0.25rem; cursor: pointer; }
.jb-namefield { max-width: 620px; margin: 0 0 1rem; }
.jb-name { width: 100%; }
.jb-dirty { color: var(--warn); font-size: var(--fs-sm); }
.jb-note { font-size: var(--fs-sm); }

/* ——— agentes ——— */
.ag-budget { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-bottom: 0.75rem; font-size: var(--fs-sm); color: var(--muted); }
.ag-budget progress { width: 200px; accent-color: var(--accent); }
.ag-page > .v2-banner { margin-bottom: 0.75rem; }
.ag-body { display: grid; gap: 1rem; }
.ag-split { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 1rem; align-items: start; }
.ag-queue { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.ag-queue:focus-visible { box-shadow: var(--focus); }
.ag-qhead { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
.ag-queue ul { list-style: none; }
.ag-queue li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0.4rem; align-items: start; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); }
.ag-queue li.on { background: var(--surface); box-shadow: inset 2px 0 0 var(--accent); }
.ag-queue li input { width: 16px; height: 16px; margin-top: 0.15rem; accent-color: var(--brand); }
.ag-queue li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.5rem; color: var(--ink); text-decoration: none; font-size: var(--fs-md); }
.ag-qagent { color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.ag-qtitle { grid-column: 1; overflow-wrap: anywhere; }
.ag-queue time { grid-row: 1; grid-column: 2; color: var(--faint); font-size: var(--fs-sm); }
.ag-keys { padding: 0.5rem 0.75rem; font-size: var(--fs-xs); }
.ag-detail { display: grid; gap: 0.6rem; }
.ag-dtitle { font-size: var(--fs-h2); text-transform: none; letter-spacing: 0; color: var(--ink); margin: 0; }
.ag-effect { padding: 0.6rem 0.75rem; border-radius: 8px; background: var(--accent-bg); font-size: var(--fs-md); }
.ag-dact { justify-content: flex-end; }
.ag-reason { display: flex; align-items: center; gap: 0.35rem; color: var(--ink); cursor: pointer; }
.ag-group { display: grid; gap: 0.5rem; }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.ag-card { display: flex; flex-direction: column; gap: 0.45rem; }
.ag-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.ag-card h3 { font-size: var(--fs-lg); font-weight: 650; }
.ag-trig, .ag-last { font-size: var(--fs-sm); }
.ag-mission { font-size: var(--fs-md); color: var(--muted); }
.ag-metrics { display: flex; gap: 1.25rem; margin-top: auto; }
.ag-metrics dt { color: var(--faint); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.ag-metrics dd { font-size: var(--fs-h2); font-weight: 650; }
.ag-table td { white-space: normal; }
.ag-open { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ag-open:hover { text-decoration: underline; }
.ag-json { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); background: var(--bg); padding: 0.6rem; border-radius: 6px; max-height: 360px; overflow: auto; }
.v2-card > h2 .btn.text { text-transform: none; letter-spacing: 0; }
/* Tickets da plataforma (#/tickets) */
.tk-list { display: grid; gap: 0.75rem; margin-top: 1rem; }
.tk-msg { margin-top: 0.5rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-sm); background: var(--surface); padding: 0.6rem 0.75rem; border-radius: 6px; }

/* Atendimento da Tokyo IA (#/atendimento) */
.at-page > .v2-banner { margin: 0; }
.at-page { display: grid; gap: 0.75rem; }
.at-table .at-txt { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-timeline { display: grid; gap: 0.75rem; }
.at-step { display: grid; gap: 0.4rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 8px; }
.at-step-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: var(--fs-sm); color: var(--muted); }
.at-msg { display: grid; gap: 0.15rem; max-width: 85%; padding: 0.45rem 0.65rem; border-radius: 12px; font-size: var(--fs-md); overflow-wrap: anywhere; white-space: pre-wrap; }
.at-msg.jogador { justify-self: start; background: var(--surface); border-radius: 12px 12px 12px 4px; }
.at-msg.ia { justify-self: end; background: var(--accent-bg); border-radius: 12px 12px 4px 12px; }
.at-motivo { font-size: var(--fs-sm); color: var(--muted); }

/* ——— copiloto ——— */
.cop-panel { position: fixed; top: var(--topbar-h); right: 0; bottom: 0; z-index: var(--z-drawer); width: min(380px, 100vw); display: flex; flex-direction: column; background: var(--card); border-left: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: v2-drawer-in 200ms var(--ease); }
.cop-panel[hidden] { display: none; }
.cop-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.cop-head h2 { font-size: var(--fs-h2); color: var(--accent-ink); margin-right: auto; }
.cop-context { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.5rem; padding: 0.5rem 1rem; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.cop-context b { color: var(--ink); font-weight: 600; }
.cop-body { flex: 1; overflow-y: auto; padding: 0.75rem 1rem; display: grid; gap: 0.75rem; align-content: start; }
.cop-off { padding: 0.6rem 0.75rem; border-radius: 8px; background: var(--warn-bg); border: 1px solid rgba(253, 186, 116, 0.35); font-size: var(--fs-sm); display: grid; gap: 0.25rem; }
.cop-suggest ul { list-style: none; display: grid; gap: 0.15rem; margin-top: 0.35rem; }
.cop-sg { display: block; width: 100%; padding: 0.45rem 0.5rem; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: var(--fs-md); text-align: left; text-decoration: none; cursor: pointer; }
.cop-sg:hover { background: var(--surface); }
.cop-sg.off { color: var(--muted); cursor: default; }
.cop-sg small { display: block; color: var(--faint); font-size: var(--fs-xs); }
.cop-log { display: grid; gap: 0.6rem; }
.cop-q { justify-self: end; max-width: 85%; padding: 0.45rem 0.65rem; border-radius: 12px 12px 4px 12px; background: var(--surface); font-size: var(--fs-md); overflow-wrap: anywhere; }
.cop-a { display: grid; gap: 0.4rem; font-size: var(--fs-md); padding: 0.6rem; border: 1px solid var(--line); border-radius: 8px; }
.cop-nums th[scope="row"] { text-align: left; font-weight: 500; color: var(--ink); padding: 0.35rem 0.5rem; }
.cop-caveat { color: var(--warn); font-size: var(--fs-sm); }
.cop-queries pre { white-space: pre-wrap; font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
.cop-fb { display: flex; align-items: center; gap: 0.25rem; font-size: var(--fs-sm); color: var(--muted); }
.cop-err { color: var(--danger); }
.cop-wait { color: var(--muted); font-size: var(--fs-sm); }
.cop-form { padding: 0.75rem 1rem; border-top: 1px solid var(--line); display: grid; gap: 0.35rem; }
.cop-row { display: flex; gap: 0.4rem; align-items: flex-end; }
.cop-row textarea { flex: 1; min-height: 44px; resize: vertical; font-size: var(--fs-md); }
.cop-row .btn { min-width: 44px; min-height: 44px; }
.cop-note { font-size: var(--fs-xs); color: var(--faint); }
.cop-kbd kbd { font-size: var(--fs-xs); }

/* ——— responsivo ——— */
@media (max-width: 1100px) {
  .hoje-card[data-card="serie"], .hoje-card[data-card="acao"], .hoje-card[data-card="origem"], .hoje-card[data-card="camps"] { grid-column: span 12; }
  .hoje-card[data-kind="kpi"] { grid-column: span 6; }
  .rel-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rel-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .ag-split { grid-template-columns: minmax(0, 1fr); }
  .dsp-msg-grid { grid-template-columns: minmax(0, 1fr); }
  .hub-msg-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .tpl-drawer { grid-template-columns: minmax(0, 1fr); }
  .tpl-side { position: static; }
  .dsp-split, .jb-split { grid-template-columns: minmax(0, 1fr); }
  .hub-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .hoje-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .hoje-grid > .hoje-card[data-card] { grid-column: span 2; }
  .hoje-grid > .hoje-card:is([data-card="cad"], [data-card="ftd"], [data-card="taxa"], [data-card="vol"]) { grid-column: span 1; }
  .hoje-card[data-card="cad"] { order: 1; } .hoje-card[data-card="ftd"] { order: 2; } .hoje-card[data-card="taxa"] { order: 3; } .hoje-card[data-card="vol"] { order: 4; }
  .hoje-card[data-card="acao"] { order: 5; } .hoje-card[data-card="serie"] { order: 6; } .hoje-card { order: 7; }
  .hoje-card[data-card="agentes"] { order: 0; }
  .hoje-kpi-v { font-size: 1.4rem; }
  .hoje-card { padding: 0.75rem; }
  .hoje-head .hoje-controls { width: 100%; }
  .hoje-cmp-l span { display: none; }
  .hoje-src li { grid-template-columns: minmax(0, 1fr) 40px auto auto; }
  .hoje-camp-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .hoje-camp-list li > :nth-child(3), .hoje-camp-list li > :nth-child(4) { display: none; }
  .rel-funnel li { grid-template-columns: 90px minmax(30px, 1fr) 48px 48px; }
  .rel-funnel li > :last-child { display: none; }
  .rel-kpi .hoje-kpi-v { font-size: 1.15rem; }
  .tpl-two { grid-template-columns: 1fr; }
  .tpl-grid { grid-template-columns: minmax(0, 1fr); }
  .cop-panel { top: 0; width: 100vw; z-index: var(--z-dialog); }
}
@media (prefers-reduced-motion: reduce) {
  .hoje-refresh[aria-busy="true"] .icon, .cop-panel { animation: none; }
}
