/* nsbase
   Identidade nstech: preto, laranja de sinal, família Barlow.
   Texto em Barlow, títulos e números em Barlow Semi Condensed.
   Superfícies claras e frias; a cor forte fica para o que pede ação. */

:root {
  --black: #040405;
  --ink: #15161A;
  --ink-2: #4A4D55;
  --ink-3: #8A8E97;
  --canvas: #F3F4F6;
  --surface: #FFFFFF;
  --sunken: #F7F8F9;
  --line: #E3E5E9;
  --line-2: #EEEFF2;
  --orange: #FF3D03;
  --orange-ink: #C42E00;
  --orange-soft: #FFF1EB;
  --ok: #1F9D55;
  --ok-soft: #E7F6EC;
  --warn: #D98E04;
  --warn-soft: #FFF5DD;
  --bad: #D33A3A;
  --bad-soft: #FCECEC;
  --blue: #2E64C8;
  --focus: #FF3D03;
  --r-lg: 12px;
  --r-md: 8px;
  --r-sm: 6px;
  --shadow-float: 0 1px 2px rgba(4, 4, 5, .06), 0 18px 40px -12px rgba(4, 4, 5, .28);
  --cond: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--canvas);
  color: var(--ink-2);
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.side {
  background: var(--black); color: #fff;
  padding: 24px 12px 18px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: baseline; padding: 2px 12px 28px; text-decoration: none; }
.wordmark { font-family: var(--cond); font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.wordmark .ns { color: var(--orange); }
.wordmark .base { color: #fff; }
.brand .wordmark { font-size: 28px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: var(--r-md);
  text-decoration: none; color: #A9ACB3; font-weight: 500; font-size: 15px;
  position: relative;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); }
.nav .count { font-size: 12px; font-weight: 600; color: #8D9098; min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.nav a[aria-current="page"] .count { color: #fff; background: var(--orange); }
.side .foot { margin-top: auto; padding: 14px 12px 0; font-size: 13px; color: #6F737B; border-top: 1px solid #1A1B1F; }
.side .foot .email { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .foot button { background: none; border: 0; padding: 0; margin-top: 4px; color: #A9ACB3; cursor: pointer; }
.side .foot button:hover { color: #fff; text-decoration: underline; }

main { padding: 34px clamp(16px, 3.2vw, 44px) 80px; min-width: 0; max-width: 1480px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
h1 {
  font-family: var(--cond); font-size: 34px; line-height: 1.08; font-weight: 600; letter-spacing: -.012em;
  color: var(--ink); margin: 0;
}
h1 .health { width: 11px; height: 11px; vertical-align: .2em; margin-right: 12px; }
h2 { font-family: var(--cond); font-size: 19px; font-weight: 600; letter-spacing: -.005em; margin: 0 0 12px; color: var(--ink); }
.sub { color: var(--ink-3); margin: 6px 0 0; max-width: 70ch; font-size: 15px; }
.crumb { margin: 0 0 6px; font-size: 14px; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--ink-3); }
.late { color: var(--bad); font-weight: 600; }
.gapcount { color: var(--orange-ink); font-weight: 700; }

/* ---------- controls ---------- */
.btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 15px; border-radius: var(--r-md); cursor: pointer; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; text-decoration: none;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { border-color: #C9CCD3; background: var(--sunken); }
.btn.primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn.primary:hover { background: var(--orange-ink); border-color: var(--orange-ink); }
.btn.dark { background: var(--black); color: #fff; border-color: var(--black); }
.btn.ghost { background: none; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { color: var(--ink); background: var(--sunken); }
.btn.danger { color: var(--bad); }
.btn.sm, .btn.small { padding: 5px 11px; font-size: 13px; border-radius: var(--r-sm); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.input, select.input, textarea.input {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md);
  padding: 9px 11px; font-size: 14.5px; color: var(--ink); min-width: 0; font-weight: 400;
  transition: border-color .12s, box-shadow .12s;
}
select.input { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A8E97' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input:hover { border-color: #CDD0D6; }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(4, 4, 5, .06); }
.input:focus-visible { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 61, 3, .16); }
textarea.input { resize: vertical; min-height: 76px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .input { min-width: 150px; font-size: 14px; }
.filters .search { flex: 1 1 260px; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); padding: 0 6px; }
label.check input { accent-color: var(--orange); width: 16px; height: 16px; }

/* ---------- indicadores ---------- */
.pulse {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  margin-bottom: 24px; overflow: hidden;
}
.pulse > div { padding: 16px 20px 15px; border-left: 1px solid var(--line-2); min-width: 0; }
.pulse > div:first-child { border-left: 0; }
.pulse strong {
  display: block; font-family: var(--cond); font-weight: 600; letter-spacing: -.01em;
  font-size: clamp(22px, 1.9vw, 32px); line-height: 1.1; color: var(--ink); white-space: nowrap;
}
.pulse span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.pulse .gapn strong { color: var(--orange); }
.pulse .warn strong { color: var(--bad); }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 13px; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: var(--sunken); }
tbody tr.link:hover td.name { color: var(--orange-ink); }
td.name { font-weight: 600; color: var(--ink); }
td.name .rs { font-weight: 400; font-size: 12.5px; color: var(--ink-3); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.num, th.num { text-align: right; }
table.accounts thead th { position: sticky; top: 0; z-index: 1; }
table.accounts tr.group th { background: var(--sunken); color: var(--ink); font-family: var(--cond); font-size: 16px; font-weight: 600; padding: 14px 14px 9px; border-bottom: 1px solid var(--line); }
table.accounts tr.group th span { color: var(--ink-3); font-family: "Barlow", sans-serif; font-size: 13px; font-weight: 500; margin-left: 6px; }

/* ---------- marcadores ---------- */
.health { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 9px; vertical-align: 2px; background: #D4D6DB; }
.health.verde { background: var(--ok); }
.health.amarelo { background: var(--warn); }
.health.vermelho { background: var(--bad); }
.tag { display: inline-block; font-size: 12.5px; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); margin: 1px 3px 1px 0; white-space: nowrap; }
.tag.owned { background: var(--ink); color: #fff; }
.porte { border: 1px dashed #C9CCD3; background: none; color: var(--ink-3); font-size: 12.5px; font-weight: 600; padding: 2px 10px; cursor: pointer; border-radius: 999px; white-space: nowrap; }
.porte:hover { border-color: var(--ink); color: var(--ink); }
.porte.p-enterprise { background: var(--ink); border: 1px solid var(--ink); color: #fff; }
.porte.p-middle { background: var(--orange-soft); border: 1px solid #FFC7B0; color: var(--orange-ink); }
.porte.sug { border-style: dashed; opacity: .78; }
.cnota { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.porte.p-low { background: var(--line-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.mini-porte { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--line-2); border-radius: 4px; padding: 0 5px; }
.warnflag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--orange-ink); background: var(--orange-soft); padding: 0 7px; border-radius: 999px; }
.classif { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 0 7px; margin-left: 5px; line-height: 18px; vertical-align: 2px; border-radius: 5px; background: var(--line-2); color: var(--ink-2); }
h1 .classif { font-family: "Barlow", sans-serif; font-size: 14px; line-height: 24px; padding: 0 10px; vertical-align: .32em; border-radius: 6px; }
.classif.c-a, .classif.c-aaa { background: var(--ok-soft); color: #17733F; }
.classif.c-b { background: #EEF8F1; color: #2B8A4E; }
.classif.c-c { background: var(--warn-soft); color: #8F5D00; }
.classif.c-d { background: #FFEAD6; color: #9C4A00; }
.classif.c-e { background: var(--bad-soft); color: #A92828; }
.classif.c-churn { background: var(--bad); color: #fff; }
.classif.c-pr { background: var(--orange-soft); color: var(--orange-ink); }
.newlogo { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 0 7px; line-height: 18px; margin-left: 5px; vertical-align: 1px; border: 1px solid #FFC7B0; color: var(--orange-ink); border-radius: 999px; }
.fc { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fc::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.fc-committed::before { background: var(--ok); }
.fc-likely::before { background: var(--warn); }
.fc-upside::before { background: #B8BBC2; }
.otipo { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.otipo.ot-new_business { color: var(--orange-ink); }
.otipo.ot-cross_sell { color: var(--blue); }
.otipo.ot-upsell { color: var(--ok); }
.perfil { display: inline-block; font-size: 12px; font-weight: 600; padding: 0 8px; border-radius: 999px; line-height: 19px; }
.perfil.pf-promotor { background: var(--ok-soft); color: #17733F; }
.perfil.pf-neutro { background: var(--line-2); color: var(--ink-2); }
.perfil.pf-detrator { background: var(--bad-soft); color: #A92828; }

/* ---------- matriz ---------- */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i.cell { width: 22px; min-width: 0; height: 16px; padding: 0; cursor: default; font-size: 0; }

.cell {
  width: 100%; min-width: 50px; height: 34px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-3);
  font-size: 12.5px; font-weight: 600; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: border-color .12s, background-color .12s, box-shadow .12s;
}
.cell:not([class*=" "]):hover, .cell.vazio:hover { border-color: #C9CCD3; background: var(--sunken); }
.cell:not([class*=" "]):hover::after, .cell.vazio:hover::after { content: "+"; font-size: 15px; font-weight: 500; color: var(--ink-3); }
.cell.contratado { background: var(--ink); border-color: var(--ink); color: #fff; }
.cell.contratado::before { content: ""; width: 9px; height: 5px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-1px); }
.cell.implantacao { background: var(--surface); border: 1.5px solid var(--ink); color: var(--ink); }
.cell.implantacao::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: conic-gradient(var(--ink) 0 50%, transparent 50% 100%); border: 1.5px solid var(--ink); box-sizing: border-box; }
.cell.aberto { background: var(--orange-soft); border: 1.5px dashed var(--orange); color: var(--orange-ink); }
.cell.em_conversa { background: var(--orange); border-color: var(--orange); color: #fff; }
.cell.concorrente { background: var(--bad-soft); border-color: #F0B8B8; color: #A92828; }
.cell.perdido { background: var(--surface); border-color: var(--line); color: var(--ink-3); text-decoration: line-through; font-weight: 500; }
.cell.nao_se_aplica { background: transparent; border-color: transparent; color: #B8BBC2; font-weight: 500; }
.cell:is(.contratado, .em_conversa):hover { filter: brightness(1.12); }
.cell:is(.implantacao, .aberto, .concorrente, .perdido, .nao_se_aplica):hover { box-shadow: 0 0 0 3px rgba(4, 4, 5, .06); }

.matrix-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); max-height: calc(100vh - 280px); min-height: 320px; }
.matrix { border-collapse: separate; border-spacing: 5px 4px; font-size: 14px; table-layout: fixed; }
.matrix th, .matrix td { border: 0; padding: 0; }
.matrix .cell { width: 100%; min-width: 0; height: 32px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.matrix thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; text-align: center; color: var(--ink-3); font-weight: 500; font-size: 12.5px; padding: 2px 4px; }
.matrix thead tr.prod th { font-family: var(--cond); color: var(--ink); font-size: 15px; font-weight: 600; padding: 14px 4px 10px; border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrix td.acc, .matrix th.acc { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.matrix thead th.acc { z-index: 3; }
.matrix td.acc { padding: 0 14px 0 12px; white-space: nowrap; font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.matrix td.acc a { text-decoration: none; }
.matrix td.acc a:hover { color: var(--orange-ink); }
.matrix tbody tr:hover td.acc { background: var(--sunken); }
.matrix tfoot { position: sticky; bottom: 0; z-index: 2; }
.matrix tfoot td { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 10px 12px; vertical-align: top; }
.matrix tfoot td.acc { padding-left: 12px; }
.pen-l { font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.25; }
.pen-l small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.pen { display: grid; gap: 5px; }
.pen .pn { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--cond); }
.pen .pn b { font-size: 15px; font-weight: 600; color: var(--ink); }
.pen .pn span { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.pen .pbar { display: flex; height: 4px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.pen .pbar .own { background: var(--ink); }
.pen .pbar .gap { background: #FFB28F; }
.pen .psub { font-size: 11.5px; color: var(--orange-ink); font-weight: 500; line-height: 1; }

/* menu rápido da célula */
.cellmenu { position: fixed; z-index: 45; width: 248px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-float); padding: 8px; }
.cellmenu .ttl { padding: 6px 8px 8px; font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.cellmenu .ttl b { display: block; color: var(--ink); font-size: 14px; }
.cellmenu button.opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; font-size: 14px; color: var(--ink); text-align: left; }
.cellmenu button.opt:hover, .cellmenu button.opt:focus-visible { background: var(--sunken); outline: none; }
.cellmenu button.opt .cell { width: 26px; min-width: 26px; height: 18px; padding: 0; font-size: 0; pointer-events: none; }
.cellmenu button.opt[aria-checked="true"] { font-weight: 600; }
.cellmenu button.opt[aria-checked="true"]::after { content: ""; margin-left: auto; width: 8px; height: 4px; border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg); }
.cellmenu .sep { height: 1px; background: var(--line-2); margin: 6px 0; }
.cellmenu .foot { display: flex; gap: 6px; }
.cellmenu .foot .btn { flex: 1; }

/* ---------- conta ---------- */
.acc-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14.5px; color: var(--ink-3); margin-top: 10px; }
.acc-meta b { color: var(--ink); font-weight: 600; }
.acc-meta a { color: var(--orange-ink); font-weight: 600; text-decoration: none; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 20px; }
.panel .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel .row h2 { margin: 0; }
.coreops-strip { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 20px; overflow: hidden; }
.coreops-strip > div { padding: 13px 18px; border-left: 1px solid var(--line-2); min-width: 0; }
.coreops-strip > div:first-child { border-left: 0; }
.coreops-strip span { display: block; font-size: 12.5px; color: var(--ink-3); }
.coreops-strip b { font-size: 15.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.coreops-strip b.ok { color: var(--ok); }
.coreops-strip b.rev { color: var(--orange-ink); }
.coreops-strip .det { display: inline; font-size: 12.5px; font-weight: 600; color: var(--bad); margin-left: 4px; }
.prod-name { font-family: var(--cond); font-weight: 600; font-size: 15.5px; color: var(--ink); margin-bottom: 8px; }
.ws-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px 24px; }
.ws-prod { min-width: 0; }
.ws-strip { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ws-strip .item { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-3); }
.ws-strip .item .cell { height: 34px; justify-content: flex-start; padding: 0 11px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; color: var(--ink); }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--ink-3); font-size: 13px; padding-top: 1px; }
.timeline .k { font-size: 12.5px; color: var(--orange-ink); font-weight: 600; }
.timeline li.interno { color: var(--ink-3); font-size: 13.5px; }
.timeline li.interno .k { color: var(--ink-3); }
.timeline details.raw { margin-top: 6px; }
.timeline details.raw summary { font-size: 12.5px; color: var(--ink-3); cursor: pointer; }
.timeline details.raw pre { white-space: pre-wrap; font: inherit; font-size: 13px; color: var(--ink-2); background: var(--sunken); border-radius: var(--r-md); padding: 10px 12px; margin: 6px 0 0; max-height: 280px; overflow: auto; }
.note-form { display: grid; gap: 8px; margin-bottom: 16px; padding: 12px; background: var(--sunken); border-radius: var(--r-md); }
.note-form .line { display: flex; gap: 8px; flex-wrap: wrap; }
.note-form .line .input { flex: 1 1 120px; }
.note-form .line.next { padding-top: 8px; border-top: 1px dashed var(--line); }
.note-form .line.next .input[name=next] { flex: 3 1 220px; }
.opp-mini { display: flex; justify-content: space-between; gap: 8px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; cursor: pointer; color: var(--ink); }
.opp-mini:first-of-type { border-top: 0; }
.opp-mini:hover b { color: var(--orange-ink); }
.contact { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; cursor: pointer; color: var(--ink); }
.contact:first-of-type { border-top: 0; }
.contact:hover b { color: var(--orange-ink); }
.contact > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.contact .cmeta { text-align: right; font-size: 12.5px; white-space: nowrap; }

/* ---------- oportunidades ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px 10px; font-size: 15px; font-weight: 600; color: var(--ink-3); cursor: pointer; margin-bottom: -1px; }
.tab span { font-weight: 600; font-size: 12px; margin-left: 6px; color: var(--ink-3); background: var(--line-2); border-radius: 999px; padding: 1px 7px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--orange); }
.tab.on span { background: var(--ink); color: #fff; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(212px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #ECEDF0; border-radius: var(--r-lg); padding: 12px 10px 10px; min-height: 280px; }
.col.drop { outline: 2px dashed var(--orange); outline-offset: -3px; }
.col h3 { font-family: var(--cond); font-size: 16px; font-weight: 600; margin: 0 4px 2px; display: flex; justify-content: space-between; align-items: baseline; color: var(--ink); }
.col h3 small { font-family: "Barlow", sans-serif; color: var(--ink-3); font-weight: 600; font-size: 12.5px; }
.col .sum { font-size: 13px; color: var(--ink-2); font-weight: 600; margin: 0 4px 10px; }
.col p.hint { font-size: 12.5px; color: var(--ink-3); margin: 0 4px 12px; }
.col[data-stage="ganho"] { background: #E6F2EA; }
.col[data-stage="perdido"], .col[data-stage="descartada"] { background: #F0F0F2; }
.card { background: var(--surface); border: 1px solid transparent; border-radius: var(--r-md); padding: 11px 12px; margin-bottom: 8px; cursor: grab; font-size: 14px; box-shadow: 0 1px 2px rgba(4, 4, 5, .06); transition: border-color .12s; }
.card:hover { border-color: #C9CCD3; }
.card .t { font-weight: 600; line-height: 1.3; color: var(--ink); }
.card .v { font-family: var(--cond); color: var(--ink); font-weight: 600; font-size: 16px; margin-top: 4px; }
.card .a { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.card .n { margin-top: 8px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 8px; }

/* ---------- semanal ---------- */
.weekly { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.weekly .panel { margin: 0; }
.weekly ul { margin: 0; padding-left: 18px; color: var(--ink); }
.weekly li { margin: 6px 0; }
.weekly li::marker { color: var(--orange); }
.weekly li a { text-decoration: none; }
.weekly li a:hover { color: var(--orange-ink); }
.weekly .empty { color: var(--ink-3); font-size: 14.5px; margin: 0; }
.weekly .panel .sec { margin: 14px 0 4px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.weekly .panel .sec:first-of-type, .weekly .panel h2 + .sec { margin-top: 0; }
.weekly .panel .sec.late { color: var(--bad); }
.week-nav { display: flex; align-items: center; gap: 6px; }
.week-nav span { font-weight: 600; min-width: 186px; text-align: center; color: var(--ink); }

/* ---------- meu dia ---------- */
.quick { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 22px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.quick .input { font-size: 16px; padding: 11px 13px; border-color: transparent; background: var(--sunken); }
.quick .input:focus { background: var(--surface); }
.quick .btn { padding: 0 20px; }
.quick .preview { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; color: var(--ink-3); min-height: 20px; padding: 0 4px 2px; }
.quick .preview b { color: var(--ink); font-weight: 600; }
.quick .preview .warn { color: var(--orange-ink); }
.quick .preview .imp { color: var(--orange-ink); font-weight: 700; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel .sec { margin: 18px 0 4px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.panel .sec span { color: var(--ink-3); font-weight: 600; font-size: 12px; background: var(--line-2); border-radius: 999px; padding: 0 7px; }
.panel .sec.late { color: var(--bad); }
.panel .sec.late span { background: var(--bad-soft); color: var(--bad); }
.panel .row + .sec { margin-top: 0; }
ul.acts { list-style: none; margin: 0; padding: 0; }
li.act { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line-2); }
li.act:first-child { border-top: 0; }
li.act .tick { width: 18px; height: 18px; margin-top: 2px; border: 1.5px solid #B8BBC2; border-radius: 50%; background: none; cursor: pointer; padding: 0; transition: border-color .12s, background-color .12s; }
li.act .tick:hover { border-color: var(--ok); background: var(--ok-soft); }
li.act.concluida .tick { background: var(--ok); border-color: var(--ok); cursor: default; }
li.act.concluida .t { text-decoration: line-through; color: var(--ink-3); }
li.act .body { cursor: pointer; min-width: 0; }
li.act .body:hover .t { color: var(--orange-ink); }
li.act .t { font-size: 14.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
li.act .star { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; margin-right: 7px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; border-radius: 4px; vertical-align: 1px; }
li.act .m { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
li.act .m a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
li.act .m a:hover { color: var(--orange-ink); }
li.act .due { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; padding-top: 2px; }
ul.rules { list-style: none; margin: 0; padding: 0; }
ul.rules li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; }
ul.rules li:first-child { border-top: 0; }
ul.rules li > div:first-child { min-width: 0; }
ul.rules a { color: var(--ink); text-decoration: none; }
ul.rules a:hover b { color: var(--orange-ink); }
ul.rules .why { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
ul.rules .r { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 13px; }
.rule-tag { font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--line-2); padding: 1px 8px; border-radius: 999px; }
.hint-line { font-size: 13px; color: var(--ink-3); margin: -6px 0 10px; }
.more { margin: 8px 0 0; font-size: 13px; }
.more a { color: var(--orange-ink); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: #E7E8EB; border-radius: var(--r-md); }
.seg button { border: 0; background: none; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; border-radius: var(--r-sm); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(4, 4, 5, .12); }

/* ---------- ajustes ---------- */
.prod-block { border-top: 1px solid var(--line-2); padding: 14px 0; }
.prod-block:first-of-type { border-top: 0; padding-top: 0; }
.prod-block b { color: var(--ink); }
.prod-block .mods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 11px; font-size: 13.5px; color: var(--ink); }
.chip button { border: 0; background: none; cursor: pointer; color: var(--ink-3); padding: 0 6px; }
.chip button:hover { color: var(--orange-ink); }

/* ---------- vazio ---------- */
.empty-state { background: var(--surface); border: 1px dashed #C9CCD3; border-radius: var(--r-lg); padding: 44px 24px; text-align: center; }
.empty-state h2 { font-size: 22px; }
.empty-state p { color: var(--ink-3); max-width: 54ch; margin: 0 auto 18px; }

/* ---------- modal e aviso ---------- */
.overlay { position: fixed; inset: 0; background: rgba(4, 4, 5, .42); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 16px; z-index: 40; }
.modal { background: var(--surface); width: min(600px, 100%); max-height: 90vh; overflow: auto; border-radius: 14px; box-shadow: var(--shadow-float); }
.modal header { padding: 22px 24px 0; }
.modal header h2 { margin: 0; font-size: 22px; }
.modal form { padding: 18px 24px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal .full { grid-column: 1 / -1; }
.modal footer { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.modal footer .r { display: flex; gap: 8px; margin-left: auto; }
.status-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.status-pick label { display: flex; align-items: center; cursor: pointer; }
.status-pick input { position: absolute; opacity: 0; }
.status-pick .cell { height: 36px; justify-content: flex-start; padding: 0 12px; font-size: 13.5px; }
.status-pick input:checked + .cell { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.status-pick input:focus-visible + .cell { outline: 2px solid var(--focus); outline-offset: 2px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px); background: var(--black); color: #fff; padding: 10px 18px; font-size: 14.5px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 50; box-shadow: var(--shadow-float); }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--surface); }
.auth .art { background: var(--black); color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .art .net { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth .art > * { position: relative; }
.auth .art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 55%; background: linear-gradient(to top, var(--black) 35%, rgba(4, 4, 5, 0)); }
.auth .art > div { z-index: 1; }
.auth .art .wordmark { font-size: 34px; }
.auth .art h2 { font-family: var(--cond); font-size: clamp(36px, 4.2vw, 60px); font-weight: 600; letter-spacing: -.02em; line-height: 1.02; margin: 0 0 18px; color: #fff; max-width: 14ch; }
.auth .art p { max-width: 40ch; color: #9EA2AA; font-size: 16px; margin: 0; }
.auth form { align-self: center; justify-self: center; width: min(360px, 88%); display: grid; gap: 16px; }
.auth form h1 { font-size: 32px; }
.auth .err { color: var(--bad); font-size: 14px; min-height: 1.2em; margin: 0; }
.auth .swap { background: none; border: 0; color: var(--ink-3); text-decoration: underline; cursor: pointer; padding: 0; font-size: 14px; justify-self: start; }
.auth .swap:hover { color: var(--ink); }
.auth .btn.primary { padding: 12px; }
.setup { max-width: 640px; margin: 10vh auto; padding: 0 16px; }
.setup code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .coreops-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1000px) {
  .grid2, .weekly, .today-grid { grid-template-columns: 1fr; }
  .pulse { grid-template-columns: repeat(2, 1fr); }
  .pulse > div:nth-child(odd) { border-left: 0; }
  .pulse > div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 10; height: auto; flex-direction: row; align-items: center; padding: 10px 8px; overflow-x: auto; }
  .brand { padding: 0 12px 0 6px; }
  .brand .wordmark { font-size: 22px; }
  .nav { flex-direction: row; }
  .nav a { padding: 6px 10px; white-space: nowrap; }
  .nav a[aria-current="page"]::before { display: none; }
  .nav .count, .side .foot { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth .art { padding: 28px 20px; min-height: 280px; gap: 28px; }
  .modal form { grid-template-columns: 1fr; }
  .coreops-strip { grid-template-columns: repeat(2, 1fr); }
  .coreops-strip > div { border-left: 0; border-top: 1px solid var(--line-2); }
  .quick { grid-template-columns: 1fr; }
  .quick .btn { padding: 10px; }
  h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.legend i.cell.nao_se_aplica, .cellmenu .cell.nao_se_aplica { border: 1px dashed #D4D6DB; }

/* filtros de seleção múltipla */
.msel { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md); padding: 8px 32px 8px 12px; font-size: 14px; color: var(--ink); cursor: pointer; white-space: nowrap; max-width: 260px; position: relative; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A8E97' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.msel:hover { border-color: #CDD0D6; }
.msel .l { color: var(--ink-3); }
.msel b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.msel.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.msel.on b { color: var(--ink); }
.filters .input.group { min-width: 0; }
.mspop { position: fixed; z-index: 45; width: 264px; max-height: min(420px, 70vh); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-float); padding: 8px; }
.mspop .input { margin-bottom: 6px; font-size: 14px; padding: 7px 10px; }
.mspop .list { overflow: auto; }
.mspop .opt { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-sm); font-size: 14px; color: var(--ink); cursor: pointer; }
.mspop .opt:hover { background: var(--sunken); }
.mspop .opt input { accent-color: var(--orange); width: 16px; height: 16px; margin: 0; }
.mspop .opt.all { border-bottom: 1px solid var(--line-2); border-radius: var(--r-sm) var(--r-sm) 0 0; margin-bottom: 4px; padding-bottom: 8px; font-weight: 600; }

/* Meu dia: produtos, negócios a fechar */
.prodbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 24px; }
.prodbar .lbl { font-size: 13px; color: var(--ink-3); margin-right: 4px; }
.prodbar a { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.prodbar a b { font-family: var(--cond); font-size: 16px; color: var(--ink); }
.prodbar a:hover { border-color: var(--ink); }
.prodbar .tot { font-size: 13px; color: var(--ink-3); margin-left: 4px; }
.panel .sec em { margin-left: auto; font-style: normal; font-weight: 600; color: var(--ink); font-size: 13px; }
ul.deals { list-style: none; margin: 0; padding: 0; }
li.deal { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
li.deal:first-child { border-top: 0; }
li.deal:hover b { color: var(--orange-ink); }
li.deal .when { font-family: var(--cond); font-weight: 600; font-size: 15px; color: var(--ink); padding-top: 1px; }
li.deal .when.late { color: var(--bad); }
li.deal b { font-weight: 600; color: var(--ink); font-size: 14.5px; }
li.deal .m { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
li.deal .val { font-family: var(--cond); font-weight: 600; font-size: 16px; color: var(--ink); white-space: nowrap; }
details.more-acts { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 10px; }
details.more-acts summary { cursor: pointer; font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.today-grid.lower { margin-top: 0; }

/* metas */
.goals { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; position: relative; }
.goal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px 14px; }
.goal .gh { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: var(--ink-3); }
.goal .gh b { font-family: var(--cond); font-size: 18px; color: var(--ink); }
.goal .gv { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 12px; }
.goal .gv strong { font-family: var(--cond); font-weight: 600; font-size: 30px; color: var(--ink); line-height: 1.1; }
.goal .gv span { color: var(--ink-3); font-size: 14px; }
.goal .bar { position: relative; height: 10px; background: var(--line-2); border-radius: 999px; margin: 0 0 22px; }
.goal .bar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; }
.goal .bar i.done { background: var(--orange); z-index: 1; }
.goal .bar i.commit { background: repeating-linear-gradient(135deg, #FFC7B0 0 4px, var(--orange-soft) 4px 8px); border-radius: 0 999px 999px 0; }
.goal .bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); font-style: normal; z-index: 2; }
.goal .bar em.m150 { left: calc(100% - 2px) !important; background: var(--ink-3); }
.goal .bar em span { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.goal .bar em.m150 span { left: auto; right: 0; transform: none; color: var(--ink-3); }
.goal .gf { font-size: 13.5px; color: var(--ink-2); }
.goal .gf b { color: var(--ink); }
.goal .gp { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.goals .edit-goals { position: absolute; right: 0; top: -40px; }
/* ranking */
.panel.rank { margin-bottom: 20px; }
ol.ranklist { list-style: none; margin: 0; padding: 0; }
ol.ranklist li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 0; border-top: 1px solid var(--line-2); }
ol.ranklist li:first-child { border-top: 0; }
ol.ranklist .pos { font-family: var(--cond); font-weight: 600; font-size: 18px; color: var(--ink-3); line-height: 1.3; }
ol.ranklist .who a { color: var(--ink); text-decoration: none; }
ol.ranklist .who a:hover b { color: var(--orange-ink); }
ol.ranklist .who .muted { font-size: 12.5px; margin-left: 6px; }
ol.ranklist .why { font-size: 13px; color: var(--ink-2); margin-top: 3px; padding-left: 10px; border-left: 2px dashed #D4D6DB; }
ol.ranklist .r { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; }
/* frescor dos dados */
.prodbar .fresh, .fresh-inline { font-size: 12.5px; color: var(--ink-3); background: var(--line-2); padding: 2px 9px; border-radius: 999px; margin-left: auto; }
.fresh-inline { margin-left: 0; margin-right: 6px; }
.prodbar .fresh.old, .fresh-inline.old { background: var(--warn-soft); color: #8F5D00; }
/* diff de importação */
.diff { max-height: 52vh; overflow: auto; padding-right: 6px; }
.diff .sec { margin: 14px 0 4px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.diff .sec span { font-size: 12px; background: var(--line-2); border-radius: 999px; padding: 0 7px; }
.diff .sec.late { color: var(--bad); }
ul.difflist { margin: 0 0 6px; padding-left: 18px; font-size: 14px; color: var(--ink); }
ul.difflist li { margin: 3px 0; }
@media (max-width: 900px) { .goals { grid-template-columns: 1fr; } .goals .edit-goals { position: static; justify-self: start; } }
.linkbtn { border: 0; background: none; padding: 0 0 0 6px; color: var(--ink-3); font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--orange-ink); }
li.act .m .internal { font-weight: 600; color: var(--ink-2); background: var(--line-2); border-radius: 999px; padding: 0 7px; }
.sorter { display: inline-flex; gap: 4px; align-items: center; }
.sorter .btn { padding: 8px 12px; font-size: 13px; border-radius: var(--r-md); }

.legend .mcount { margin-left: auto; font-size: 14px; color: var(--ink-2); }
.legend .mcount b { font-family: var(--cond); font-size: 18px; color: var(--ink); }
