@font-face { font-family: 'Archivo'; src: url('/fonts/archivo-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/fonts/archivo-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/fonts/archivo-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/fonts/archivo-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Archivo Narrow'; src: url('/fonts/archivo-narrow-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo Narrow'; src: url('/fonts/archivo-narrow-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

/* Paleta: papel de carta náutica, tinta azul-petróleo, laranja de sinal só para o que pede ação, violeta só para a IA. */
:root {
  --canvas: #E9EEF3; --paper: #F8FAFC; --paper-2: #F1F5F9; --ink: #0F2436; --ink-2: #1B3A52; --mid: #4B5D6F; --soft: #7A8B9C;
  --hair: #CCD6E0; --hair-2: #DFE6ED;
  --signal: #C2410C; --signal-soft: #FBE7DC; --signal-ink: #8A2E08;
  --ok: #1D6B4F; --ok-soft: #DDEFE7;
  --ai: #5B4BC4; --ai-soft: #ECEAFB;
  --warn: #946200; --warn-soft: #F8EDD3;
  --r-lg: 14px; --r-md: 10px; --r-sm: 7px;
  --rail: 68px; --top: 58px; --gap: 12px;
  --shadow: 0 1px 0 rgba(15, 36, 54, 0.04), 0 8px 24px -16px rgba(15, 36, 54, 0.28);
  --narrow: 'Archivo Narrow', 'Archivo', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--canvas); color: var(--ink); font-family: 'Archivo', system-ui, sans-serif; font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.muted { color: var(--mid); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -0.01em; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; }
.right { text-align: right; }
.pad { padding: 16px; }
.error { color: var(--signal); font-size: 13px; min-height: 1em; }
.error:empty { display: none; }
.pre { white-space: pre-wrap; }

/* ícones Lucide */
.ic { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ic svg { width: 100%; height: 100%; stroke-width: 1.75; }
.ic.lg { width: 34px; height: 34px; }

/* rolagem fina, sempre dentro do painel */
.panel-body, .auth-main, .rail { scrollbar-width: thin; scrollbar-color: var(--hair) transparent; }
.panel-body::-webkit-scrollbar { width: 8px; height: 8px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--hair); border-radius: 8px; border: 2px solid var(--paper); }

/* ================================================================ moldura */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); height: 100dvh; }
.rail { background: var(--ink); color: #C9D6E2; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; overflow-y: auto; overflow-x: visible; z-index: 20; }
.rail-brand { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px; border-radius: 12px; color: #fff; }
.rail-brand .mark .m-globe, .rail-brand .mark .m-grid { stroke: #8FA6BB; }
.rail-brand .mark .m-wing { fill: #F08A4B; }
.rail-group { display: flex; flex-direction: column; gap: 4px; }
.rail-item { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; color: inherit; text-decoration: none; transition: background 0.15s, color 0.15s; }
.rail-item .ic { width: 20px; height: 20px; }
.rail-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.rail-item[aria-current='page'] { background: #fff; color: var(--ink); }
.rail-item[aria-current='page']::before { content: ''; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: #F08A4B; }
.rail-label { position: absolute; left: 54px; top: 50%; transform: translate(-4px, -50%); white-space: nowrap; background: var(--ink); color: #fff; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 500; pointer-events: none; opacity: 0; transition: opacity 0.12s, transform 0.12s; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.rail-item:hover .rail-label, .rail-item:focus-visible .rail-label { opacity: 1; transform: translate(0, -50%); }
.badge { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #3C5A73; color: #fff; font-size: 10.5px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--ink); }
.badge.hot { background: var(--signal); }
.rail-item[aria-current='page'] .badge { border-color: #fff; }

.stage { display: grid; grid-template-rows: var(--top) minmax(0, 1fr); min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--hair); background: rgba(248, 250, 252, 0.7); backdrop-filter: blur(8px); }
.view-title { font-family: var(--narrow); font-weight: 600; font-size: 21px; letter-spacing: -0.005em; }
.client-pick { display: inline-flex; align-items: center; gap: 8px; padding: 0 4px 0 10px; height: 36px; border: 1px solid var(--hair); border-radius: 10px; background: var(--paper); color: var(--mid); }
.client-sel { border: 0; background: transparent; height: 34px; padding-right: 6px; font-weight: 500; color: var(--ink); cursor: pointer; }
.client-sel:focus-visible { outline: none; }
.client-pick:focus-within { outline: 2px solid var(--ink); outline-offset: 1px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--mid); }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--soft); }
.live.on { color: var(--ok); }
.live.on .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(29, 107, 79, 0.5); animation: beat 2.2s infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(29, 107, 79, 0.45); } 70% { box-shadow: 0 0 0 7px rgba(29, 107, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(29, 107, 79, 0); } }
.clock { color: var(--mid); min-width: 92px; }
.lang, .seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--hair-2); gap: 2px; }
.lang button, .seg button { height: 28px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--mid); }
.lang button[aria-pressed='true'], .seg button[aria-pressed='true'] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 36, 54, 0.12); }
.me { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; padding: 3px 10px 3px 3px; border-radius: 22px; }
.me:hover { background: var(--hair-2); }
.me-name { font-weight: 500; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }

.view { padding: var(--gap); min-height: 0; overflow: hidden; display: grid; }
.view > * { min-height: 0; }

/* ================================================================ painéis */
.panel { background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; box-shadow: var(--shadow); }
.panel.full { height: 100%; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; min-height: 50px; border-bottom: 1px solid var(--hair-2); flex: none; }
.panel-head h2 { font-family: var(--narrow); font-size: 16px; font-weight: 600; }
.panel-tools { padding: 10px 16px; border-bottom: 1px solid var(--hair-2); flex: none; }
.panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px 16px; overscroll-behavior: contain; }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(380px, 1fr); gap: var(--gap); height: 100%; min-height: 0; }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split > .panel { height: 100%; }
.sec { display: flex; align-items: center; gap: 8px; font-family: var(--narrow); font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 18px 0 9px; }
.sec:first-child { margin-top: 0; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--signal); color: #fff; font-size: 11px; font-weight: 600; font-family: 'Archivo', sans-serif; }
.count.quiet { background: var(--hair); color: var(--ink); }
.lead { color: var(--mid); max-width: 64ch; margin-bottom: 14px; }
.note { display: flex; gap: 8px; align-items: flex-start; color: var(--mid); font-size: 12.5px; padding: 10px 12px; border-radius: var(--r-md); background: var(--paper-2); margin-top: 14px; }
.empty { color: var(--mid); font-size: 13px; padding: 6px 0; }
td.empty { text-align: center; padding: 26px; }
.empty-state { height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--soft); text-align: center; padding: 24px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row + .row { margin-top: 8px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 4px; }
.blk { padding: 14px 0; border-top: 1px solid var(--hair-2); }
.blk:first-child { border-top: 0; padding-top: 0; }
.blk h3 { font-family: var(--narrow); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.blk h3 + * { margin-top: 0; }
.blk > h3:not(:first-child) { margin-top: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 32px; }

/* ================================================================ controles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px; border: 1px solid transparent; white-space: nowrap; text-decoration: none; transition: background 0.12s, border-color 0.12s, transform 0.06s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--ink-2); }
.btn.ghost { background: var(--paper); border-color: var(--hair); color: var(--ink); }
.btn.ghost:hover:not(:disabled) { border-color: var(--soft); }
.btn.danger { background: var(--signal); color: #fff; }
.btn.danger:hover:not(:disabled) { background: var(--signal-ink); }
.btn.link { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; padding: 0 6px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn.xs .ic { width: 14px; height: 14px; }
.btn.wide { width: 100%; height: 44px; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.7s linear infinite; }
.btn.ghost.busy::after { border-color: var(--hair); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(248, 250, 252, 0.92); border: 1px solid var(--hair); color: var(--ink); box-shadow: var(--shadow); }
.icon-btn:hover { border-color: var(--soft); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 9px; background: #fff; transition: border-color 0.12s, box-shadow 0.12s; }
textarea { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.45; }
.row input:not([type=checkbox]) { flex: 1 1 120px; width: auto; height: 32px; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 36, 54, 0.1); }
input::placeholder, textarea::placeholder { color: var(--soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.hint { color: var(--mid); font-size: 12.5px; }
.pw { position: relative; }
.pw input { padding-right: 44px; }
.eye { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; color: var(--mid); }
.eye:hover { background: var(--paper-2); color: var(--ink); }
.eye[aria-pressed='true'] { color: var(--ink); }
input.code { font-family: var(--mono); font-size: 22px; letter-spacing: 0.42em; text-align: center; height: 52px; padding-left: 0.42em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: start; }
.form-grid > .switch { align-self: center; }
.form-grid .span { grid-column: 1 / -1; }
.switch { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; }
.switch input { appearance: none; width: 36px !important; height: 20px !important; border-radius: 10px; background: var(--hair); position: relative; cursor: pointer; transition: background 0.15s; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.15s; }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(16px); }
.radios { display: flex; flex-direction: column; gap: 6px; }
.radio { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--hair); border-radius: 9px; cursor: pointer; font-size: 13px; }
.radio:has(input:checked) { border-color: var(--ink); background: var(--paper-2); }
.days { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { height: 30px; padding: 0 11px; display: grid; place-items: center; border-radius: 15px; border: 1px solid var(--hair); font-size: 12.5px; text-transform: capitalize; }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
details > summary { cursor: pointer; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 7px; list-style: none; padding: 6px 0; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ''; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; margin-right: 3px; }
details[open] > summary::before { transform: rotate(45deg); }

/* tabelas */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th { position: sticky; top: -14px; z-index: 1; background: var(--paper); text-align: left; font-weight: 600; font-size: 11.5px; color: var(--mid); padding: 8px 10px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--hair-2); vertical-align: middle; }
.tbl tbody tr { cursor: default; }
.tbl tbody tr[class] { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--paper-2); }
.tbl tr.hot td:first-child { box-shadow: inset 3px 0 0 var(--signal); }
.tbl tr.sel td { background: #E7EDF3; }
.tbl td.title { min-width: 220px; }
.row-btn { text-align: left; font-weight: 600; display: block; }
.row-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.meta { display: flex; align-items: center; gap: 6px; color: var(--mid); font-size: 12px; margin-top: 1px; }
.detail-json { font-family: var(--mono); color: var(--mid); word-break: break-word; max-width: 520px; }
.sc { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 7px; font-weight: 700; font-size: 12.5px; background: var(--hair-2); font-variant-numeric: tabular-nums; }
.sc.mid { background: var(--warn-soft); color: var(--warn); }
.sc.hi { background: var(--signal); color: #fff; }
.ai-dot { color: var(--ai); display: inline-flex; }
.ai-dot .ic { width: 14px; height: 14px; }

/* etiquetas */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--hair-2); color: var(--ink-2); white-space: nowrap; }
.st-open { background: var(--signal-soft); color: var(--signal-ink); }
.st-contained { background: #DDE7F0; color: var(--ink); }
.st-closed { background: var(--paper-2); color: var(--soft); }
.ast-pending { background: var(--warn-soft); color: var(--warn); }
.ast-executed, .ast-approved { background: var(--ok-soft); color: var(--ok); }
.ast-rejected, .ast-refused, .ast-failed { background: var(--signal-soft); color: var(--signal-ink); }
.ast-reverted, .ast-expired { background: var(--paper-2); color: var(--mid); }
.ts-scheduled { background: #DDE7F0; }
.ts-running { background: var(--warn-soft); color: var(--warn); }
.ts-done { background: var(--ok-soft); color: var(--ok); }
.tm-active, .ip-approved { background: var(--ok-soft); color: var(--ok); }
.tm-invited, .ip-pending { background: var(--warn-soft); color: var(--warn); }
.tm-disabled, .ip-rejected, .ip-revoked { background: var(--paper-2); color: var(--soft); }
.tag.test { background: #E4ECF5; color: var(--ink-2); border: 1px dashed var(--soft); }
.cls { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12.5px; }
.lvl { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11.5px; font-weight: 700; flex: none; }
.lvl.l1 { background: var(--hair-2); }
.lvl.l2 { background: #DDE7F0; }
.lvl.l3 { background: var(--signal-soft); color: var(--signal-ink); }
.lvl.l4 { background: var(--signal); color: #fff; }
.sev { display: inline-flex; height: 20px; padding: 0 7px; align-items: center; border-radius: 5px; font-size: 11px; font-weight: 700; background: var(--hair-2); }
.sev.high { background: var(--signal); color: #fff; }
.sev.medium { background: var(--warn-soft); color: var(--warn); }
.okline, .warnline { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.okline { color: var(--ok); }
.warnline { color: var(--warn); }

/* cartões */
.cards { display: flex; flex-direction: column; gap: 8px; }
.card { border: 1px solid var(--hair); border-radius: var(--r-md); padding: 11px 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.card.quiet { background: var(--paper-2); }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .reason { font-size: 12.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.kpi { border: 1px solid var(--hair-2); border-radius: var(--r-md); padding: 11px 12px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-family: var(--narrow); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi span { color: var(--mid); font-size: 12px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--mid); }
.kv dd { margin: 0; word-break: break-word; }
.factors li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--hair-2); font-size: 13px; }
.factors li:last-child { border-bottom: 0; }
.factors b { color: var(--signal); font-variant-numeric: tabular-nums; }
.timeline { position: relative; padding-left: 16px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--hair); }
.timeline li { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 5px 0; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: -15px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--mid); }
.timeline time { color: var(--mid); font-family: var(--mono); font-size: 12px; }
.mini-list { display: flex; flex-direction: column; gap: 6px; }
.mini-list li { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 9px; background: var(--paper-2); font-size: 13px; }
.ips { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.ips li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed var(--hair-2); font-size: 13px; }

/* ================================================================ monitor */
.monitor { display: grid; height: 100%; min-height: 0; gap: var(--gap);
  grid-template-columns: 248px minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr) minmax(170px, 31%);
  grid-template-areas: 'clients globe side' 'triage triage side'; }
.m-clients { grid-area: clients; }
.m-globe { grid-area: globe; position: relative; background: radial-gradient(120% 90% at 50% 45%, #FDFEFF 0%, #EEF3F7 55%, #E2E9F0 100%); }
.m-side { grid-area: side; }
.m-triage { grid-area: triage; }
.m-clients .panel-body { padding: 8px; }
.clients { display: flex; flex-direction: column; gap: 2px; }
.client { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: 'dot name count' '. state state'; column-gap: 10px; row-gap: 1px; align-items: center; padding: 10px 11px; border-radius: 10px; text-align: left; transition: background 0.12s; }
.client:hover { background: var(--paper-2); }
.client[aria-pressed='true'] { background: var(--ink); color: #fff; }
.client[aria-pressed='true'] .cstate, .client[aria-pressed='true'] .cname small { color: #A9BCD0; }
.client .dot { grid-area: dot; width: 8px; height: 8px; border-radius: 50%; background: var(--soft); }
.client .dot.ok { background: var(--ok); }
.client .dot.warm { background: #E08A3A; }
.client .dot.hot { background: var(--signal); box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.2); animation: hotbeat 1.4s infinite; }
@keyframes hotbeat { 50% { box-shadow: 0 0 0 6px rgba(194, 65, 12, 0); } }
.cname { grid-area: name; font-weight: 600; display: flex; flex-direction: column; min-width: 0; }
.cname small { font-weight: 400; color: var(--mid); font-size: 11.5px; }
.client .count { grid-area: count; }
.cstate { grid-area: state; font-size: 12px; color: var(--mid); }
.cstate.hot { color: var(--signal); font-weight: 600; }
.client[aria-pressed='true'] .cstate.hot { color: #FFB68A; }
.globe { position: absolute; inset: 0; cursor: grab; }
.globe:active { cursor: grabbing; }
.g-stats { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.g-stats span { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 11px; border-radius: 10px; background: rgba(248, 250, 252, 0.88); border: 1px solid var(--hair-2); font-size: 12px; color: var(--mid); backdrop-filter: blur(6px); }
.g-stats b { font-family: var(--narrow); font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.g-ctl { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.g-foot { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--mid); pointer-events: none; }
.g-foot .sim { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; background: rgba(248, 250, 252, 0.9); border: 1px dashed var(--soft); }
.g-foot .sim .ic { width: 14px; height: 14px; }
.gl-anchor { position: relative; width: 0; height: 0; display: block; }
.gl { position: absolute; left: 0; top: 0; font-size: 11px; font-weight: 600; white-space: nowrap; transition: opacity 0.2s; }
.gl-client { transform: translate(-50%, calc(-100% - 8px)); padding: 3px 8px; border-radius: 6px; background: var(--ink); color: #fff; box-shadow: 0 4px 12px rgba(15, 36, 54, 0.3); pointer-events: none; }
.gl-client.left { transform: translate(calc(-100% - 6px), -50%); }
.gl-client.right { transform: translate(6px, -50%); }
.gl-src { transform: translate(-50%, calc(-100% - 8px)); padding: 3px 8px; border-radius: 6px; background: var(--signal); color: #fff; border: 0; cursor: pointer; box-shadow: 0 4px 12px rgba(194, 65, 12, 0.35); }
.gl-src.contained { background: var(--paper); color: var(--ink); border: 1px solid var(--ink); box-shadow: none; }
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--hair-2); border-radius: 9px; }
.tabs button { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--mid); }
.tabs button[aria-selected='true'] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 36, 54, 0.12); }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; }
.legend li > span { display: flex; flex-direction: column; }
.legend small { color: var(--mid); font-size: 12px; }

/* ================================================================ alertas */
.detail { background: var(--paper); }
.detail-head { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--hair-2); flex: none; }
.detail-head h2 { font-family: var(--narrow); font-size: 19px; font-weight: 600; line-height: 1.2; }
.detail-head .row { margin-top: 7px; }
.ring { flex: none; }
.ring-bg { stroke: var(--hair-2); }
.ring-hot { stroke: var(--signal); }
.ring-warm { stroke: #E08A3A; }
.ring-cool { stroke: var(--ink-2); }
.ring-txt { font-family: var(--narrow); font-weight: 600; fill: var(--ink); }
.search-wrap { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--hair); border-radius: 9px; background: #fff; color: var(--mid); }
.search-wrap input { border: 0 !important; height: 32px !important; padding: 0 !important; box-shadow: none !important; }
.search-wrap:focus-within { border-color: var(--ink); }
.acts { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.act { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--hair-2); border-radius: 9px; background: #fff; }
.act .lbl { display: flex; flex-direction: column; font-size: 13px; }
.act .lbl span { color: var(--mid); font-size: 12px; }

/* cartão da IA */
.ai-card { border-radius: 12px; padding: 14px; margin-bottom: 14px; background: linear-gradient(180deg, var(--ai-soft), #fff 70%); border: 1px solid #D6D1F5; display: flex; flex-direction: column; gap: 10px; }
.ai-card.pending { background: var(--paper-2); border-style: dashed; border-color: var(--hair); }
.ai-head { display: flex; align-items: center; gap: 8px; color: var(--ai); }
.ai-head h3 { font-family: var(--narrow); font-size: 14px; font-weight: 600; color: var(--ink); }
.ai-verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.verdict { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--ai); color: #fff; }
.v-true_positive .verdict, .verdict.v-true_positive { background: var(--signal); }
.v-likely_true_positive .verdict, .verdict.v-likely_true_positive { background: #D9621F; }
.v-uncertain .verdict, .verdict.v-uncertain { background: var(--ai); }
.v-likely_false_positive .verdict, .verdict.v-likely_false_positive { background: var(--ok); }
.ai-summary { font-size: 14px; line-height: 1.5; }
.ai-recs h4, .ai-next h4, .report h4 { font-size: 12.5px; font-weight: 600; color: var(--mid); margin: 4px 0 7px; }
.rec { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 4px 9px; align-items: center; padding: 8px 0; border-top: 1px dashed #DDD8F6; font-size: 13px; }
.rec .rec-reason { grid-column: 1 / -1; color: var(--mid); font-size: 12.5px; }
.ai-next ul { list-style: disc; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.ai-hero { display: flex; gap: 16px; align-items: center; padding: 6px 0 16px; }
.ai-hero h3 { font-family: var(--narrow); font-size: 20px; font-weight: 600; }
.pulse { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--paper-2); color: var(--soft); flex: none; }
.pulse .ic { width: 26px; height: 26px; }
.pulse.on { background: var(--ai); color: #fff; box-shadow: 0 0 0 0 rgba(91, 75, 196, 0.4); animation: aibeat 2.6s infinite; }
@keyframes aibeat { 70% { box-shadow: 0 0 0 12px rgba(91, 75, 196, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 75, 196, 0); } }
.feed-item { display: flex; flex-direction: column; gap: 5px; padding: 12px; border: 1px solid var(--hair-2); border-radius: var(--r-md); text-decoration: none; background: #fff; margin-bottom: 8px; transition: border-color 0.12s; }
.feed-item:hover { border-color: var(--soft); }
.feed-item p { font-size: 13px; color: var(--ink-2); }
.feed-top { display: flex; align-items: center; gap: 8px; }

/* testes */
.prog { border: 1px solid var(--hair); border-radius: 12px; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.prog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prog-head h3 { font-family: var(--narrow); font-size: 16px; font-weight: 600; }
.roe { border: 1px solid var(--warn-soft); background: #FFFBF1; border-radius: 10px; padding: 6px 12px 12px; }
.roe p { font-size: 12.5px; color: var(--ink-2); white-space: pre-wrap; margin: 4px 0 10px; max-height: 220px; overflow: auto; }
.notice { border-top: 1px dashed var(--hair); padding-top: 6px; }
.notice > :not(summary) { margin-top: 6px; font-size: 13px; }
.cycle { border: 1px solid var(--hair-2); border-radius: 10px; background: #fff; margin-bottom: 8px; overflow: hidden; }
.cycle.open { border-color: var(--soft); }
.cycle-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; text-align: left; font-size: 13px; }
.cycle-head:hover { background: var(--paper-2); }
.report { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.report-score { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; }
.report-score b { font-family: var(--narrow); font-size: 40px; font-weight: 600; line-height: 1; }
.report-score span { color: var(--mid); }
.report-score small { color: var(--mid); margin-left: auto; }
.drill li, .findings li { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--hair-2); font-size: 13px; }
.drill li > span:last-child { display: flex; flex-direction: column; }
.drill small { color: var(--mid); }
.drill li.ok .ic { color: var(--ok); }
.drill li.bad .ic { color: var(--signal); }
.findings li > span:nth-child(2) { flex: 1; }
.kev li { padding: 10px 0; border-bottom: 1px solid var(--hair-2); display: flex; flex-direction: column; gap: 2px; font-size: 13px; }

/* equipe e conta */
.user { border: 1px solid var(--hair-2); border-radius: 12px; padding: 12px 14px; background: #fff; margin-bottom: 10px; }
.user-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-head .grow { display: flex; flex-direction: column; min-width: 0; }
.user-facts { display: flex; gap: 16px; margin: 9px 0 2px; color: var(--mid); font-size: 12.5px; }
.user-facts span { display: inline-flex; align-items: center; gap: 5px; }
.user-facts .ic { width: 15px; height: 15px; }
.invite-link { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--ok-soft); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.invite-link code { font-family: var(--mono); font-size: 12px; word-break: break-all; background: #fff; padding: 8px; border-radius: 7px; }
.me-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; }
.me-head h3 { font-family: var(--narrow); font-size: 20px; font-weight: 600; }

/* ================================================================ entrada */
.auth { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(320px, 42%) minmax(0, 1fr); background: var(--paper); }
.auth-brand { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 44px 48px; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.auth-logo { display: flex; align-items: center; gap: 12px; font-family: var(--narrow); font-size: 24px; font-weight: 600; letter-spacing: 0.01em; }
.auth-logo .m-globe, .auth-logo .m-grid { stroke: #8FA6BB; }
.auth-logo .m-wing { fill: #F08A4B; }
.mark .m-globe, .mark .m-grid { stroke: currentColor; }
.mark .m-wing { fill: var(--signal); }
.auth-tag { font-family: var(--narrow); font-size: clamp(30px, 3.4vw, 46px); font-weight: 600; line-height: 1.06; max-width: 13ch; letter-spacing: -0.01em; position: relative; z-index: 1; }
.auth-orbit { position: absolute; right: -28%; top: 50%; width: 125%; aspect-ratio: 1; transform: translateY(-50%); z-index: -1; }
.auth-orbit span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(169, 188, 208, 0.22); }
.auth-orbit span:nth-child(2) { inset: 13%; border-style: dashed; border-color: rgba(169, 188, 208, 0.18); animation: orbit 90s linear infinite; }
.auth-orbit span:nth-child(3) { inset: 28%; border-color: rgba(240, 138, 75, 0.35); animation: orbit 60s linear infinite reverse; }
.auth-orbit span:nth-child(2)::after, .auth-orbit span:nth-child(3)::after { content: ''; position: absolute; top: 50%; left: -4px; width: 8px; height: 8px; border-radius: 50%; background: #F08A4B; box-shadow: 0 0 0 6px rgba(240, 138, 75, 0.15); }
.auth-orbit span:nth-child(2)::after { background: #A9BCD0; box-shadow: 0 0 0 6px rgba(169, 188, 208, 0.12); }
@keyframes orbit { to { transform: rotate(360deg); } }
.auth-main { display: flex; flex-direction: column; overflow-y: auto; padding: 24px 32px; }
.auth-top { display: flex; justify-content: flex-end; }
.auth-card { width: 100%; max-width: 440px; margin: auto; padding: 32px 0; }
.auth-card h1 { font-family: var(--narrow); font-size: 30px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.auth-card h2.sub { font-size: 15px; font-weight: 600; }
.auth-card .lead { margin: 0; }
.steps { display: flex; gap: 6px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--hair-2); transition: background 0.3s; }
.steps span.done { background: var(--ink); }
.steps span.on { background: linear-gradient(90deg, var(--ink) 50%, var(--hair-2) 50%); background-size: 200% 100%; animation: fill 0.5s ease-out forwards; }
@keyframes fill { from { background-position: 100% 0; } to { background-position: 0 0; } }
.eyebrow-step { color: var(--mid); font-size: 12.5px; margin-bottom: -8px; }
.nav-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--soft); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--hair); }
.totp-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.qr-box { display: flex; flex-direction: column; gap: 10px; }
.qr-box svg { width: 200px; height: 200px; border-radius: 12px; border: 1px solid var(--hair); background: #fff; padding: 8px; }
.secret { display: flex; flex-direction: column; gap: 3px; }
.secret code { font-family: var(--mono); font-size: 12px; word-break: break-all; background: var(--paper-2); padding: 6px 8px; border-radius: 6px; user-select: all; }

/* aviso flutuante */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: 0 14px 40px -12px rgba(15, 36, 54, 0.55); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 100; max-width: min(560px, calc(100vw - 32px)); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--signal-ink); }

/* ================================================================ telas menores */
@media (max-width: 1360px) {
  .monitor { grid-template-columns: 220px minmax(0, 1fr) 300px; }
}
@media (max-width: 1100px) {
  .monitor { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto minmax(0, 1fr) minmax(160px, 30%); grid-template-areas: 'clients clients' 'globe side' 'triage side'; }
  .m-clients .panel-body { overflow-x: auto; overflow-y: hidden; }
  .clients { flex-direction: row; }
  .client { min-width: 180px; }
  .split, .split.even { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .clock, .me-name { display: none; }
}
@media (max-width: 760px) {
  html, body { overflow: auto; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 60px; height: 100dvh; }
  .rail { order: 2; flex-direction: row; justify-content: space-around; padding: 0 6px; overflow-x: auto; overflow-y: hidden; }
  .rail-group { flex-direction: row; }
  .rail-brand, .rail > .grow { display: none; }
  .rail-label { display: none; }
  .rail-item[aria-current='page']::before { display: none; }
  .top { gap: 8px; padding: 0 10px; }
  .view-title { font-size: 17px; }
  .live span:last-child, .client-pick .ic { display: none; }
  .monitor { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 52vh auto auto; grid-template-areas: 'clients' 'globe' 'side' 'triage'; height: auto; }
  .view { display: block; overflow: auto; }
  .monitor .panel { max-height: 70vh; }
  .m-side, .m-triage { min-height: 280px; }
  .client { min-width: 200px; }
  .split, .split.even { height: auto; grid-template-rows: none; }
  .split > .panel { height: auto; max-height: 80vh; }
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); position: static; min-height: 100dvh; }
  .auth-brand { padding: 22px 24px; min-height: 160px; }
  .auth-tag { font-size: 24px; margin-top: 16px; }
  .totp-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================================================================ clientes */
.cl-list { display: flex; flex-direction: column; gap: 8px; }
.cl-item { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--hair-2); border-radius: 12px; background: #fff; transition: border-color 0.12s; }
.cl-item:hover { border-color: var(--soft); }
.cl-item[aria-pressed='true'] { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.cl-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cl-top b { font-size: 14.5px; }
.cl-meta { display: flex; align-items: center; gap: 6px; color: var(--mid); font-size: 12.5px; }
.cl-meta .ic { width: 14px; height: 14px; }
.cl-prog { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.cl-prog small { color: var(--mid); font-size: 12px; white-space: nowrap; }
.bar { flex: 1; height: 5px; border-radius: 3px; background: var(--hair-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.cl-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag.cl-standby { background: var(--paper-2); color: var(--soft); }
.tag.cl-connecting { background: var(--warn-soft); color: var(--warn); }
.tag.cl-live { background: var(--ok-soft); color: var(--ok); }
.tag.cl-live .cl-dot { animation: beat 2.2s infinite; }
.cl-seg button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; }
.cl-seg button .ic { width: 15px; height: 15px; }
.cl-seg button[aria-pressed='true']:nth-child(1) { color: var(--mid); }
.cl-seg button[aria-pressed='true']:nth-child(2) { color: var(--warn); }
.cl-seg button[aria-pressed='true']:nth-child(3) { color: var(--ok); }
.cl-help { margin: 8px 0 4px; max-width: 60ch; }
.cl-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: #fff; flex: none; }
.checklist { display: flex; flex-direction: column; }
.checklist li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px dashed var(--hair-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist li > .ic { color: var(--soft); margin-top: 1px; }
.checklist li.done > .ic { color: var(--ok); }
.checklist li.done .ck-txt b { color: var(--mid); font-weight: 500; }
.ck-txt { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.ck-txt small { color: var(--mid); font-size: 12px; }
.tag.req { background: var(--signal-soft); color: var(--signal-ink); }
.checklist li.done .tag.req { background: var(--hair-2); color: var(--mid); }
.coords[hidden] { display: none; }
.client.standby { opacity: 0.55; }
.client .dot.off { background: var(--hair); }

/* ================================================================ análises e relatórios */
.tabbed { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; height: 100%; min-height: 0; }
.tab-content { min-height: 0; display: grid; }
.tab-content > * { min-height: 0; }
.view-tabs { justify-self: start; }
.view-tabs a { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--mid); text-decoration: none; }
.view-tabs a .ic { width: 15px; height: 15px; }
.view-tabs a[aria-selected='true'] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 36, 54, 0.12); }
.rp-split { grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1.3fr); }
.rp-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.rp-filters .span2 { grid-column: 1 / -1; }
.rp-filters input, .rp-filters select { height: 36px; font-size: 13px; }
.rp-listhead { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.rp-listhead .sec { margin: 0; }
.rp-listhead select { width: auto; height: 32px; font-size: 12.5px; }
.rp-row td { cursor: pointer; }
.tag.rk-daily { background: #DDE7F0; }
.tag.rk-custom { background: var(--ai-soft); color: var(--ai); }
.rp-viewer .rp-toolbar { flex-wrap: wrap; gap: 6px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rp-paper { background: var(--paper-2); }
.rp-doc { max-width: 860px; margin: 0 auto; background: #fff; border: 1px solid var(--hair-2); border-radius: 12px; padding: 32px 36px; display: flex; flex-direction: column; gap: 22px; }
.rp-head h1 { font-family: var(--narrow); font-size: 26px; font-weight: 600; line-height: 1.15; margin: 8px 0 6px; }
.rp-brand { display: inline-flex; align-items: center; gap: 7px; color: var(--mid); font-size: 12.5px; font-weight: 600; }
.rp-brand .ic { width: 16px; height: 16px; color: var(--signal); }
.rp-lead { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 16px 18px; border-radius: 12px; background: var(--paper-2); border-left: 4px solid var(--soft); }
.rp-lead.risk-low { border-left-color: var(--ok); }
.rp-lead.risk-moderate { border-left-color: #E0A53A; }
.rp-lead.risk-elevated, .rp-lead.risk-high { border-left-color: var(--signal); }
.rp-lead.risk-critical { border-left-color: var(--signal-ink); background: var(--signal-soft); }
.rp-risk { display: flex; flex-direction: column; gap: 2px; }
.rp-risk span { color: var(--mid); font-size: 12px; }
.rp-risk b { font-family: var(--narrow); font-size: 22px; font-weight: 600; }
.rp-headline { font-weight: 600; font-size: 15.5px; margin-bottom: 6px; }
.rp-sec h2 { font-family: var(--narrow); font-size: 16px; font-weight: 600; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--hair-2); }
.rp-sec p { line-height: 1.55; max-width: 72ch; }
.rp-list { padding-left: 20px; list-style: decimal; display: flex; flex-direction: column; gap: 10px; }
.rp-list li p { color: var(--ink-2); font-size: 13.5px; margin-top: 3px; }
.rp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rp-bars { display: flex; flex-direction: column; gap: 6px; }
.rp-bars li { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto; gap: 8px; align-items: center; font-size: 12.5px; }
.rp-bk { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-bv { height: 6px; border-radius: 3px; background: var(--hair-2); overflow: hidden; }
.rp-bv span { display: block; height: 100%; background: var(--ink-2); }
.rp-bn { font-variant-numeric: tabular-nums; color: var(--mid); min-width: 32px; text-align: right; }
.rp-watch { list-style: disc; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.rp-doc .tbl th { position: static; }
.ai-block h4, .ai-fix h4 { font-size: 12.5px; font-weight: 600; color: var(--mid); margin: 4px 0 4px; }
.ai-block p { font-size: 13.5px; line-height: 1.5; }
.ai-fix ol { padding-left: 18px; list-style: decimal; display: flex; flex-direction: column; gap: 8px; }
.ai-fix li p { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.fix-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag.pri-now { background: var(--signal); color: #fff; }
.tag.pri-this_week { background: var(--warn-soft); color: var(--warn); }
.tag.pri-this_month { background: #DDE7F0; }
.ai-mem { display: flex; align-items: center; gap: 6px; }
.ai-mem .ic { width: 14px; height: 14px; }
.ai-fb { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px dashed #DDD8F6; }
.ai-fb .row input { flex: 1 1 160px; }
@media print {
  @page { margin: 14mm; }
  html, body { overflow: visible !important; height: auto !important; background: #fff !important; }
  .rail, .top, .tabbed > .view-tabs, .rp-split > .panel:first-child, .rp-toolbar, #toast { display: none !important; }
  .app, .stage, .view, .tabbed, .tab-content, .rp-split, .rp-viewer, .rp-paper { display: block !important; height: auto !important; overflow: visible !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: #fff !important; }
  .rp-doc { border: 0; padding: 0; max-width: none; }
  .rp-sec, .rp-lead, .tbl tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
@media (max-width: 1100px) { .rp-grid { grid-template-columns: minmax(0, 1fr); } .rp-split { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================ Prospecção (growth) */
.gr { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: var(--gap); }
.gr-head { flex: none; display: flex; flex-direction: column; gap: 12px; }
.gr-headrow { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.gr-headrow h2 { display: flex; align-items: center; gap: 9px; font-family: var(--narrow); font-size: 20px; font-weight: 600; }
.gr-sub { color: var(--mid); font-size: 12.5px; max-width: 72ch; margin-top: 4px; }
.gr-kpis { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.gr-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 14px 8px 12px; background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-md); min-width: 84px; position: relative; }
.gr-kpi svg { position: absolute; top: 8px; right: 8px; width: 15px; height: 15px; color: var(--soft); }
.gr-kpi b { font-size: 20px; font-family: var(--narrow); line-height: 1.1; }
.gr-kpi span { font-size: 11px; color: var(--mid); }
.gr-tabs { display: inline-flex; gap: 3px; padding: 3px; background: var(--hair-2); border-radius: 10px; align-self: flex-start; }
.gr-tab { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 8px; background: transparent; border: 0; color: var(--ink-2); font-weight: 500; font-size: 13px; cursor: pointer; }
.gr-tab svg { width: 16px; height: 16px; }
.gr-tab.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 36, 54, 0.12); }
.gr-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; }
.gr-body::-webkit-scrollbar { width: 8px; } .gr-body::-webkit-scrollbar-thumb { background: var(--hair); border-radius: 8px; }

/* filtros + ações */
.gr-filters { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 12px 14px; background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-md); }
.gr-fgroup { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; flex: 1 1 auto; }
.gr-fgroup > svg { width: 18px; height: 18px; color: var(--soft); margin-bottom: 9px; }
.gr-filters .field { min-width: 120px; gap: 3px; }
.gr-filters .field.grow { flex: 1 1 160px; }
.gr-factions { display: flex; gap: 8px; }
.gr-consent { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ok); background: var(--ok-soft); border-radius: var(--r-sm); padding: 8px 12px; }
.gr-consent svg { width: 16px; height: 16px; flex: none; }
.gr-listhead { display: flex; align-items: center; padding: 2px 2px 0; }

/* tabela de leads */
.gr-tbl { background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-md); overflow: hidden; }
.gr-tbl th { top: 0; }
.gr-row .title b { display: block; font-size: 13.5px; }
.gr-row .title .meta { font-size: 11.5px; color: var(--soft); }
.gr-row td:last-child { color: var(--soft); width: 24px; }

/* nota de banda */
.gr-band { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--narrow); font-weight: 700; font-size: 17px; }
.gr-band small { font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; }
.gb-strong { color: var(--ok); } .gb-moderate { color: var(--warn); }
.gb-weak { color: var(--signal); } .gb-critical { color: #B91C1C; }
.gb-unknown { color: var(--soft); }

/* situação do lead */
.gr-st { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--hair-2); color: var(--ink-2); }
.gs-new { background: #E4ECF5; color: var(--ink-2); } .gs-scanned { background: #E0E9F3; color: var(--ink); }
.gs-contacted { background: var(--ai-soft); color: var(--ai); } .gs-replied { background: #E7F0FA; color: var(--ink-2); }
.gs-trial { background: var(--warn-soft); color: var(--warn); } .gs-won { background: var(--ok-soft); color: var(--ok); }
.gs-lost, .gs-dismissed { background: var(--hair); color: var(--mid); }

/* lead aberto */
.gr-lead { display: flex; flex-direction: column; gap: 10px; }
.gr-lead-head { display: flex; align-items: center; gap: 10px; }
.gr-stsel { width: auto; height: 34px; }
.gr-lead-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: var(--gap); align-items: start; }
.gr-report, .gr-side { padding: 16px 18px; }
.gr-id h2 { font-family: var(--narrow); font-size: 20px; font-weight: 600; }
.gr-id-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 5px; font-size: 12.5px; }
.gr-id-meta a, .gr-id-meta .muted { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.gr-id-meta a:hover { text-decoration: underline; }
.gr-id-meta svg, .gr-fix svg, .gr-ai-offer svg { width: 14px; height: 14px; flex: none; }

/* nota em anel */
.gr-score { display: flex; align-items: center; gap: 18px; padding: 14px 0 4px; }
.prot-ring { flex: none; }
.prot-ring .pr-bg { stroke: var(--hair-2); }
.pr-strong .pr-fg { stroke: var(--ok); } .pr-moderate .pr-fg { stroke: var(--warn); }
.pr-weak .pr-fg { stroke: var(--signal); } .pr-critical .pr-fg { stroke: #B91C1C; } .pr-unknown .pr-fg { stroke: var(--hair); }
.pr-num { font-family: var(--narrow); font-weight: 700; fill: var(--ink); }
.pr-den { fill: var(--soft); font-weight: 600; }
.gr-score-side { display: flex; flex-direction: column; gap: 4px; }
.gr-score-side .gr-band { font-size: 20px; }

/* categorias (barras) */
.gr-cats { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.gr-cats li { display: grid; grid-template-columns: 150px 1fr 34px; align-items: center; gap: 10px; }
.gr-ck { font-size: 12px; color: var(--ink-2); }
.gr-cbar { height: 8px; border-radius: 5px; background: var(--hair-2); overflow: hidden; }
.gr-cbar span { display: block; height: 100%; border-radius: 5px; }
.gr-cbar.ok span { background: var(--ok); } .gr-cbar.warn span { background: var(--warn); } .gr-cbar.bad span { background: var(--signal); }
.gr-cv { text-align: right; color: var(--mid); }

/* achados */
.gr-finds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gr-find { border: 1px solid var(--hair-2); border-left: 3px solid var(--hair); border-radius: var(--r-sm); padding: 9px 12px; }
.gr-find.sev-high { border-left-color: #B91C1C; } .gr-find.sev-medium { border-left-color: var(--warn); } .gr-find.sev-low { border-left-color: var(--soft); }
.gr-find-top { display: flex; align-items: center; gap: 8px; }
.gr-find-top b { font-size: 13px; }
.gr-find p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.gr-find .gr-fix { display: flex; gap: 6px; color: var(--mid); margin-top: 5px; }
.gr-sev { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.s-high { background: #FBE2E2; color: #B91C1C; } .s-medium { background: var(--warn-soft); color: var(--warn); } .s-low { background: var(--hair-2); color: var(--mid); }

/* IA */
.gr-ai h3 { display: flex; align-items: center; gap: 8px; }
.gr-ai-head { font-weight: 600; font-size: 13.5px; }
.gr-ai p { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.gr-ai-hl { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gr-ai-hl li { background: var(--paper-2); border-radius: var(--r-sm); padding: 8px 11px; }
.gr-ai-hl b { display: block; font-size: 12.5px; }
.gr-ai-hl span { font-size: 12px; color: var(--ink-2); }
.gr-ai-offer { display: flex; gap: 6px; color: var(--ai); margin-top: 10px; }

/* abordagem */
.gr-chrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.gr-drafts { display: flex; flex-direction: column; gap: 10px; }
.gr-draft { border: 1px solid var(--hair-2); border-radius: var(--r-sm); padding: 10px 12px; }
.gr-draft-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.gr-os { height: 19px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; font-weight: 700; }
.os-draft { background: var(--hair-2); color: var(--mid); } .os-sent { background: var(--ai-soft); color: var(--ai); } .os-replied { background: var(--ok-soft); color: var(--ok); }
.gr-dsub { font-size: 12.5px; margin-bottom: 5px; }
.gr-dbody { font-family: inherit; font-size: 12.5px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; background: var(--paper-2); border-radius: var(--r-sm); padding: 9px 11px; margin: 0 0 8px; max-height: 240px; overflow: auto; }

/* nichos */
.gr-niches { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.gr-niche { background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-md); padding: 14px; cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s; display: flex; flex-direction: column; gap: 6px; }
.gr-niche:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.gr-niche-top { display: flex; align-items: center; gap: 8px; font-family: var(--narrow); font-size: 15px; }
.gr-niche-top svg { width: 17px; height: 17px; color: var(--mid); }
.gr-niche-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.gr-niche-foot .gr-band { font-size: 14px; }

/* autoavaliação */
.gr-self { padding: 18px 20px; }
.gr-self-row { display: flex; gap: 10px; margin: 12px 0; }
.gr-self-row input { flex: 1 1 auto; }
.gr-self-row .btn { flex: none; }
.gr-self-out { display: flex; flex-direction: column; gap: 12px; }

/* modal */
.gr-modal { position: fixed; inset: 0; z-index: 60; background: rgba(15, 36, 54, 0.35); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(2px); }
.gr-modal-box { width: min(560px, 100%); max-height: 86vh; overflow: auto; background: var(--paper); border-radius: var(--r-lg); box-shadow: 0 24px 60px -20px rgba(15, 36, 54, 0.5); padding: 18px 20px; }
.gr-modal-head { display: flex; align-items: center; margin-bottom: 14px; }
.gr-modal-head h3 { font-family: var(--narrow); font-size: 17px; font-weight: 600; flex: 1 1 auto; }
.gr-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.gr-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gr-form .span2 { grid-column: 1 / -1; }
.gr-form textarea { height: auto; padding: 10px 12px; resize: vertical; }

@media (max-width: 1000px) { .gr-lead-grid { grid-template-columns: minmax(0, 1fr); } .gr-form { grid-template-columns: 1fr; } .gr-kpis { width: 100%; margin-left: 0; } }

/* ======================================================== Kestrel Diligence */
.rail-sep { width: 28px; height: 1px; background: rgba(201, 214, 226, 0.25); margin: 6px 0; }
.dd-card { background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.dd-card h3 { display: flex; align-items: center; gap: 8px; font-family: var(--narrow); font-size: 15px; font-weight: 600; margin: 0; }
.dd-card h3 svg, .dd-card summary svg { width: 17px; height: 17px; color: var(--mid); }
.dd-card summary { display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.dd-card summary::-webkit-details-marker { display: none; }
.dd-card[open] summary { margin-bottom: 4px; }
.dd-off { background: var(--paper-2); border-style: dashed; }
.dd-form { display: flex; flex-direction: column; gap: 10px; max-width: 980px; }
.dd-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.dd-grid .span2 { grid-column: span 2; }
@media (max-width: 900px) { .dd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dd-grid textarea, .dd-mrz { width: 100%; font-size: 12.5px; letter-spacing: 0.04em; resize: vertical; }
.seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--hair-2); border-radius: 10px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; font-size: 13px; color: var(--mid); cursor: pointer; }
.seg button svg { width: 16px; height: 16px; }
.dd-meter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 14px; background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-md); }
.dd-step { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--paper-2); color: var(--soft); border: 1px solid var(--hair-2); }
.dd-step.past { color: var(--ink-2); background: #E4ECF5; }
.dd-step.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.dd-step.off { border-style: dashed; }
.dd-id { font-size: 13px; }
.id-name_only { color: var(--signal); } .id-tax_id, .id-probable { color: var(--warn); } .id-registry, .id-document, .id-confirmed { color: var(--ok); }
.dd-ack { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--ink-2); padding: 0 2px; }
.dd-ack input { margin-top: 2px; }
.dd-v { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 7px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.v-proceed { background: var(--ok-soft); color: var(--ok); } .v-conditions { background: var(--warn-soft); color: var(--warn); } .v-decline { background: var(--signal-soft); color: var(--signal-ink); }
.dd-st.st-running, .dd-st.st-queued { background: #E4ECF5; } .dd-st.st-review { background: var(--ai-soft); color: var(--ai); } .dd-st.st-done { background: var(--ok-soft); color: var(--ok); } .dd-st.st-error { background: var(--signal-soft); color: var(--signal-ink); }
.dd-casehead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dd-casehead h2 { font-family: var(--narrow); font-size: 20px; font-weight: 600; }
.dd-cover { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1000px) { .dd-cover { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dd-cv { background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; justify-content: center; }
.dd-cv .dd-v { height: 34px; font-size: 16px; padding: 0 14px; }
.dd-pendnote { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ai); }
.dd-pendnote svg { width: 15px; height: 15px; }
.dd-ai { border-color: #D5D0F5; }
.dd-ai ul { margin: 4px 0 0 18px; padding: 0; font-size: 13px; }
.dd-gaps { margin: 0 0 0 18px; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.dd-group h4 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mid); margin: 8px 0 6px; }
.dd-finds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dd-find { border: 1px solid var(--hair-2); border-radius: var(--r-sm); padding: 9px 11px; background: #fff; display: flex; flex-direction: column; gap: 4px; }
.dd-find.pend { border-color: #C9C2F2; box-shadow: inset 3px 0 0 var(--ai); }
.dd-find.dis { opacity: 0.55; }
.dd-find-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dd-find-top b { font-size: 13px; }
.dd-find-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dd-acts { display: flex; gap: 6px; }
.dd-sev { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.s-critical { background: #B91C1C; color: #fff; } .s-high { background: var(--signal-soft); color: var(--signal-ink); } .s-medium { background: var(--warn-soft); color: var(--warn); } .s-low { background: #E4ECF5; color: var(--ink-2); } .s-info { background: var(--paper-2); color: var(--mid); }
.dd-cur { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--hair-2); }
.dd-cur.c-C2 { background: var(--ai-soft); color: var(--ai); border-color: transparent; } .dd-cur.c-C3 { background: var(--ink); color: #fff; border-color: transparent; }
.dd-rv { font-size: 10.5px; color: var(--soft); } .dd-rv.rv-pending { color: var(--ai); font-weight: 700; } .dd-rv.rv-confirmed { color: var(--ok); font-weight: 600; }
.dd-ai-note { display: flex; gap: 6px; font-size: 12px; color: var(--ai); }
.dd-ai-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.cov-hit { background: var(--warn-soft); color: var(--warn); } .cov-clear { background: var(--ok-soft); color: var(--ok); } .cov-error { background: var(--signal-soft); color: var(--signal-ink); }
.cov-needs_key, .cov-contract, .cov-not_applicable { background: var(--paper-2); color: var(--soft); }
.src-ready { background: var(--ok-soft); color: var(--ok); } .src-needs_key { background: var(--warn-soft); color: var(--warn); } .src-contract { background: var(--paper-2); color: var(--mid); } .src-bad_key, .cov-bad_key { background: var(--crit-soft, #fde8e8); color: var(--crit, #b91c1c); }
.dd-keychk { display: block; margin-top: 3px; font-size: 11.5px; color: var(--mid); } .dd-keychk.ok { color: var(--ok); } .dd-keychk.bad { color: var(--crit, #b91c1c); font-weight: 600; }
.dd-key { width: 220px; height: 28px; font-size: 12px; }
.dd-keyfrom { display: block; margin-top: 3px; font-size: 11.5px; color: var(--accent, #c2410c); font-weight: 500; }
.dd-url { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-pre { max-height: 280px; overflow: auto; font-size: 11px; background: var(--paper-2); padding: 10px; border-radius: var(--r-sm); white-space: pre-wrap; word-break: break-all; margin: 0; }
.dd-cp-on { border-color: #C9C2F2; box-shadow: inset 3px 0 0 var(--ai); }
.dd-link { background: var(--paper-2); padding: 6px 10px; border-radius: var(--r-sm); word-break: break-all; }
.ses-ok { background: var(--ok-soft); color: var(--ok); } .ses-bad { background: var(--signal-soft); color: var(--signal-ink); } .ses-wait { background: var(--ai-soft); color: var(--ai); }
.dd-key2 { margin-top: 6px; }
label.dd-row { cursor: pointer; }

/* Prospecção ativa: busca, régua, disparos, textos e planos */
.gr-sec { display: flex; align-items: center; gap: 8px; font-family: var(--narrow); font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.gr-srch { padding: 16px 18px; }
.gr-srch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gr-srch-grid .span2 { grid-column: span 2; }
.gr-srch-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.chk input { width: 16px; height: 16px; accent-color: var(--ink-2); }
.gr-rs { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--hair-2); color: var(--mid); }
.gr-rs.rs-done { background: var(--ok-soft); color: var(--ok); }
.gr-rs.rs-failed { background: var(--signal-soft); color: var(--signal-ink); }
.gr-rs.rs-searching, .gr-rs.rs-scanning { background: var(--ai-soft); color: var(--ai); }
.gr-rs .ico, .gr-rs svg { width: 13px; height: 13px; }
.spin, .spin svg { animation: grspin 1.2s linear infinite; }
@keyframes grspin { to { transform: rotate(360deg); } }
.gr-listhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 6px; }
.gr-ruler { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-md); }
.gr-ruler input[type=range] { width: 160px; accent-color: var(--signal); }
.gr-ruler input[type=range]:disabled { opacity: .4; }
.gr-ruler-v { font-size: 13px; min-width: 56px; }
.gr-segs { display: inline-flex; background: var(--hair-2); border-radius: 8px; padding: 2px; }
.gr-seg { border: 0; background: transparent; font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 6px; cursor: pointer; color: var(--mid); }
.gr-seg.on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(15,36,54,.12); }
.gr-bulk { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 8px; border: 1px dashed var(--hair); border-radius: var(--r-md); background: var(--paper-2); }
.gr-bulk.on { border-style: solid; border-color: var(--ink-2); background: var(--paper); }
.gr-bulk .count { font-weight: 600; font-size: 13px; }
.gr-tbl .gr-ck { width: 34px; }
.gr-tbl tr.sel td { background: var(--ai-soft); }
.gr-cts { display: inline-flex; gap: 6px; }
.gr-cts > span { color: var(--hair); display: inline-flex; }
.gr-cts > span.on { color: var(--ink-2); }
.gr-cts .ic { color: inherit; }
.gr-cts svg { width: 16px; height: 16px; }
.gr-chip { display: inline-flex; align-items: center; gap: 6px; }
.linklike { border: 0; background: none; color: var(--signal); cursor: pointer; font: inherit; font-size: 12px; padding: 0; text-decoration: underline; }
.gr-chks { display: flex; gap: 16px; flex-wrap: wrap; }
.gr-chks.col { flex-direction: column; gap: 8px; }
.gr-msg { border: 1px solid var(--hair-2); border-radius: var(--r-sm); padding: 10px 12px; background: var(--paper); }
.gr-msg.ms-queued { border-left: 3px solid var(--warn); }
.gr-msg.ms-sent, .gr-msg.ms-replied { border-left: 3px solid var(--ok); }
.gr-msg.ms-simulated { border-left: 3px solid var(--ai); }
.gr-msg.ms-skipped, .gr-msg.ms-failed { opacity: .72; }
.gr-msg .row { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gr-msg-lead { text-decoration: none; color: var(--ink); }
.gr-os.os-simulated { background: var(--ai-soft); color: var(--ai); }
.gr-os.os-queued { background: var(--warn-soft); color: var(--warn); }
.gr-os.os-skipped, .gr-os.os-failed { background: var(--hair-2); color: var(--mid); }
.gr-mode { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; }
.gr-mode svg { width: 13px; height: 13px; }
.gr-mode.md-sim { background: var(--ai-soft); color: var(--ai); }
.gr-mode.md-live { background: var(--ok-soft); color: var(--ok); }
.gr-camp-title { font-family: var(--narrow); font-size: 19px; margin: 0 6px 0 10px; }
.gr-camp-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--gap); margin: var(--gap) 0; }
.gr-mini td, .gr-mini th { padding: 6px 8px; font-size: 12.5px; }
.gr-kv { list-style: none; margin: 0; padding: 0; }
.gr-kv li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--hair-2); font-size: 13px; }
.gr-kv li:first-child { border-top: 0; }
.gr-msghead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gr-msghead select { width: auto; }
.gr-ct { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.gr-ct li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.gr-ct li svg { width: 16px; height: 16px; color: var(--mid); }
.gr-ct li .muted.small:first-of-type { min-width: 70px; }
.gr-planmini { border: 1px solid var(--hair-2); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 8px; }
.gr-planmini b { font-size: 15px; margin-right: 8px; }
.gr-planmini ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.gr-pb-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.gr-pb-col { display: grid; gap: var(--gap); }
.gr-pb { padding: 16px 18px; }
.gr-pb textarea { width: 100%; padding: 10px 12px; resize: vertical; font: inherit; font-size: 13.5px; line-height: 1.5; border: 1px solid var(--hair); border-radius: var(--r-sm); background: #fff; }
.gr-pb h4 { font-size: 13px; margin: 14px 0 6px; display: flex; align-items: center; gap: 6px; }
.gr-pb .field { margin-bottom: 8px; }
.gr-vars { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 0 0 8px; }
.gr-vars code { font-size: 11.5px; background: var(--hair-2); padding: 1px 6px; border-radius: 5px; }
.gr-objs { display: grid; gap: 8px; }
.gr-obj { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: start; }
.gr-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 10px; }
.gr-plan { border: 1px solid var(--hair); border-radius: var(--r-md); padding: 12px; background: var(--paper); }
.gr-plan-row { display: grid; grid-template-columns: 1fr 70px 70px; gap: 8px; }
.gr-preview { min-height: 140px; white-space: pre-wrap; }
.gr-pb-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: 10px 0; background: linear-gradient(transparent, var(--canvas) 40%); }
@media (max-width: 1000px) { .gr-srch-grid, .gr-pb-grid, .gr-camp-grid { grid-template-columns: 1fr; } .gr-srch-grid .span2 { grid-column: auto; } }

.gr-pb .row select { width: auto; flex: 1 1 auto; }
/* ============================================================ jornada do convite */
.auth-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); }
.auth-icon svg { width: 24px; height: 24px; }
.auth-icon.ok { background: var(--ok-soft); color: var(--ok); }
.need-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.need-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 13.5px; color: var(--ink-2); }
.need-list svg { width: 18px; height: 18px; color: var(--mid); margin-top: 1px; }
.why-box { background: var(--paper-2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.why-box b { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.why-box b svg { width: 16px; height: 16px; }
.why-box p { font-size: 13px; color: var(--mid); margin: 0; }
.where-box { border: 1px solid var(--hair); border-radius: 10px; padding: 12px 14px; }
.where-box b { font-size: 13.5px; }
.where-box p { font-size: 13px; color: var(--mid); margin: 3px 0 0; }
.where-box code { font-family: var(--mono); color: var(--ink); font-weight: 600; }
.choice { display: flex; flex-direction: column; gap: 8px; }
.choice-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--hair); background: var(--paper); color: var(--ink-2); font: inherit; font-size: 13.5px; cursor: pointer; }
.choice-opt svg { width: 18px; height: 18px; flex: none; }
.choice-opt.on { border-color: var(--ink); background: var(--paper-2); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ink); }
.choice-opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.invite-msg { font-family: inherit; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; background: #fff; border-radius: 7px; padding: 10px 11px; margin: 0; max-height: 220px; overflow: auto; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
label.check input { width: 16px; height: 16px; }
