/*
 * Identidade visual da plataforma (OncoSeek + OncoNavi).
 *
 * Tokens e componentes do protótipo da versão 7. Toda tela que estende
 * base.html usa só o que está aqui: cor nova entra como token, não como hex
 * solto na tela.
 */

/* ---------- tokens ---------- */
:root {
  --ink: #171b38; --ink-2: #4a5170; --ink-3: #8b90a8;
  --line: #e3e2ea; --line-2: #f0eff4;
  --bg: #f5f4f7; --card: #ffffff; --soft: #fbfbfd; --track: #f1f2f7;
  --blue: #006bf6; --blue-d: #0050c8; --blue-bg: #eef4ff; --blue-l: #a9cbfc;
  --navy: #112956; --navy-bg: #dde5f5;
  --purple: #6100c5; --purple-2: #7515ff; --purple-bg: #f0e8ff;
  --red: #fc3b58; --red-d: #c4002e; --red-bg: #fff0f2; --red-line: #ffd3da;
  --green: #0e7e3e; --green-bg: #e3f5ea;
  --amber: #a35a00; --amber-bg: #fff3dc;
  --on-dark: #ffffff; --on-dark-2: rgba(255,255,255,.72); --on-dark-3: rgba(255,255,255,.55);
  --dark-line: rgba(255,255,255,.14); --dark-fill: rgba(255,255,255,.07);
  --on-dark-blue: #8fbaff; --on-dark-purple: #c9a8ff; --on-dark-red: #ff8094;
  --f-display: 'Funnel Display', 'Funnel Sans', Arial, sans-serif;
  --f-body: 'Funnel Sans', Arial, Helvetica, sans-serif;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
/* `hidden` sempre esconde, mesmo em componente que define display. */
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.ico { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- header ---------- */
.ahead {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  min-height: 66px; padding: 10px 32px;
  background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.08); color: #fff;
}
.ahead .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.ahead .brand img { height: 26px; width: auto; }
.ahead .vsep { width: 1px; height: 22px; background: rgba(255,255,255,.16); }
.ahead .prod { font-family: var(--f-display); font-weight: 600; font-size: 17px; white-space: nowrap; }
.ahead .prod span { color: rgba(255,255,255,.4); font-weight: 400; }
.ahead .sp { flex: 1; }
.anav { display: flex; gap: 2px; margin-left: 6px; flex-wrap: wrap; }
.anav a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 10px; border-radius: 9px;
  font-size: 14px; color: var(--on-dark-2); text-decoration: none;
}
.anav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.anav a.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }

/* seletores do topo (cliente e linha de cuidado) e menu da conta */
.ctxs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dd { position: relative; }
.ctx {
  display: inline-flex; align-items: center; gap: 8px; max-width: 280px;
  padding: 6px 12px; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid var(--dark-line); color: #fff; font-size: 12.5px;
}
.ctx:hover { background: rgba(255,255,255,.12); }
.ctx em { font-style: normal; color: var(--on-dark-3); white-space: nowrap; }
.ctx .val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ctx .chev { width: 14px; height: 14px; flex-shrink: 0; }
.ddm {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 260px; max-width: min(340px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 36px rgba(23,27,56,.22);
}
.ddm[hidden] { display: none; }
.ddm a, .ddm button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left;
  font-size: 13.5px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere;
}
.ddm a:hover, .ddm button:hover { background: var(--track); }
.ddm a.on { background: var(--blue-bg); color: var(--blue-d); font-weight: 600; }
.ddm small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.ddm .hd { padding: 6px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ddm .ft { margin-top: 4px; padding: 8px 10px 4px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
.ddm .who { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); font-weight: 600; overflow-wrap: anywhere; }
.ddm .who small { margin-top: 1px; }
.ddm form { margin: 0; }
.ddm .danger:hover { background: var(--red-bg); color: var(--red-d); }
.lic {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; background: var(--track); color: var(--ink-2);
}
.lic img { width: 22px; height: 22px; }
.lic svg { width: 18px; height: 18px; }
.ctx .lic { width: 20px; height: 20px; border-radius: 6px; background: #fff; }
.ctx .lic img { width: 16px; height: 16px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff; font-size: 12.5px; font-weight: 600; text-transform: uppercase;
}

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; gap: 22px; padding: 26px 32px 28px; background: var(--ink); color: #fff; }
.hero .top { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.hero .tt { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: min(280px, 100%); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-3); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: #fff; }
.hero h1 { font-family: var(--f-display); font-weight: 600; font-size: 32px; letter-spacing: -.02em; line-height: 1.1; }
.hero p { margin: 0; max-width: 72ch; font-size: 14px; line-height: 1.5; color: var(--on-dark-2); }
.hero .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.hero .eyebrow:empty, .hero p:empty, .hero .acts:empty { display: none; }
.lbadge {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-bottom: 4px;
  padding: 3px 12px 3px 3px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid var(--dark-line); color: #fff;
}
.lbadge .lic { width: 24px; height: 24px; border-radius: 50%; background: #fff; }
.lbadge .lic img { width: 18px; height: 18px; }
.hbtn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff;
  font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.hbtn:hover { background: rgba(255,255,255,.12); color: #fff; }
.hbtn.solid { background: #fff; border-color: #fff; color: var(--ink); }
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; align-self: flex-start; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.06); }
.subtabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9px;
  font-size: 13.5px; color: var(--on-dark-2); text-decoration: none;
}
.subtabs a:hover { background: rgba(255,255,255,.08); color: #fff; }
.subtabs a.on { background: #fff; color: var(--ink); font-weight: 600; }
.subtabs .ct { padding: 1px 6px; border-radius: 10px; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.14); }
.subtabs a.on .ct { background: var(--track); }

/* ---------- corpo e cartões ---------- */
.body { display: flex; flex-direction: column; gap: 18px; padding: 26px 32px 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.card.pad { padding: 22px 24px; }
.chead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.chead h2 { font-family: var(--f-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.chead .s { font-size: 12.5px; color: var(--ink-3); }
.chead .sp { flex: 1; }
.h2 { font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.grid2, .grid3 { display: grid; gap: 18px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 24px; text-align: center; color: var(--ink-2); }
.empty b { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.empty p { margin: 0; max-width: 52ch; }

/* ---------- botões e pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px;
  border-radius: 9px; border: 1px solid #cfd3e2; background: #fff; color: var(--ink);
  font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #f6f6f9; color: var(--ink); }
.btn.pri { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.pri:hover { background: var(--blue-d); border-color: var(--blue-d); }
.btn.pur { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn:disabled, .btn.dis { background: #eef0f6; border-color: #eef0f6; color: #a3a8bd; cursor: not-allowed; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
.btn.block { width: 100%; }
.link { padding: 0; border: 0; background: none; color: var(--blue); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.p-red { background: var(--red-bg); color: var(--red-d); }
.p-blue { background: var(--blue-bg); color: var(--blue-d); }
.p-pur { background: var(--purple-bg); color: var(--purple); }
.p-green { background: var(--green-bg); color: var(--green); }
.p-amber { background: var(--amber-bg); color: var(--amber); }
.p-grey { background: var(--track); color: var(--ink-2); }
.p-navy { background: var(--navy-bg); color: var(--navy); }

/* ---------- tabelas: rolam dentro do cartão, nunca na página ---------- */
.tw { overflow-x: auto; }
.tw table { width: 100%; min-width: 760px; border-collapse: collapse; }
.tw th {
  padding: 10px 16px; text-align: left; white-space: nowrap; background: var(--soft); border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3);
}
/* Célula mostra texto de fora (código de contrato, observação): valor longo sem
   espaço quebra em vez de alargar a coluna. */
.tw td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; vertical-align: middle; overflow-wrap: anywhere; }
.tw tr:last-child td { border-bottom: 0; }
.tw tbody tr:hover td { background: #fafbfe; }
.tw td .nm { font-weight: 600; }
.tw td .sub { margin-top: 1px; font-size: 12px; color: var(--ink-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.pager {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 18px;
  border-top: 1px solid var(--line-2); background: var(--soft); border-radius: 0 0 16px 16px;
  font-size: 12.5px; color: var(--ink-3);
}
.pager .sp { flex: 1; }
.pager a, .pager span.pg {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink-2); text-decoration: none;
}
/* span.pg.on: sem o span, ".pager span.pg" ganha na especificidade e a página atual some. */
.pager span.pg.on, .pager .on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pager span.pg.dis { color: var(--ink-3); background: var(--soft); }

/* ---------- filtros e campos ---------- */
.filters { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 16px 22px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.inp {
  width: 100%; height: 38px; min-width: 0; padding: 0 12px;
  border: 1px solid #cfd3e2; border-radius: 9px; background: #fff; font-size: 13.5px;
}
.inp:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-bg); }
.inp:disabled { background: var(--track); color: #a3a8bd; cursor: not-allowed; }
textarea.inp { height: auto; padding: 10px 12px; resize: vertical; }
.inp-wrap { position: relative; }
.inp-wrap .inp { padding-right: 42px; }
.inp-wrap .eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 7px; background: none; color: var(--ink-3); cursor: pointer;
}
.inp-wrap .eye:hover { background: var(--track); color: var(--ink); }
.inp-wrap .eye svg { width: 18px; height: 18px; }
.inp-wrap .eye .off, .inp-wrap .eye.shown .on { display: none; }
.inp-wrap .eye.shown .off { display: block; }
.ferr, .errorlist { margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--red-d); }
.seg { display: inline-flex; gap: 2px; flex-wrap: wrap; align-self: flex-start; padding: 3px; border-radius: 10px; background: var(--track); }
.seg a, .seg button { padding: 7px 12px; border: 0; border-radius: 8px; background: none; font-size: 13px; color: var(--ink-2); text-decoration: none; cursor: pointer; white-space: nowrap; }
.seg .on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(23,27,56,.1); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid #dcdbe5; border-radius: 8px; background: #fff; font-size: 12.5px; color: var(--ink-2); text-decoration: none; cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip b { font-weight: 700; opacity: .7; }

/* ---------- avisos, modal de confirmação e toasts ---------- */
.note { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.note.err { background: var(--red-bg); color: var(--red-d); }
.note.ok { background: var(--green-bg); color: var(--green); }
.note.info { background: var(--blue-bg); color: var(--blue-d); }
.note.warn { background: var(--amber-bg); color: var(--amber); }
.note[hidden] { display: none; }
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(23,27,56,.38); }
.modal-box {
  position: fixed; left: 50%; top: 50%; z-index: 81; transform: translate(-50%, -50%);
  width: min(480px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 14px; padding: 22px;
  background: #fff; border-radius: 16px; box-shadow: 0 24px 48px rgba(23,27,56,.24);
}
.modal-box b { font-family: var(--f-display); font-size: 18px; }
.modal-box p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.modal-box .acts { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.toasts {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); z-index: 100;
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 32px);
  transform: translateX(-50%); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px; max-width: 100%; padding: 12px 14px 12px 18px; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 12px 28px rgba(23,27,56,.24);
  pointer-events: auto; transition: opacity .25s, transform .25s;
}
.toast.err { background: var(--red-d); }
.toast.ok { background: var(--green); }
.toast.hide { opacity: 0; transform: translateY(12px); }
.toast button { width: 26px; height: 26px; border: 0; border-radius: 6px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; flex-shrink: 0; }

/* ---------- formulário em pilha e listas de dicas ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tips { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.tips li { display: flex; gap: 10px; }
.tips li::before { content: ""; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.tips b { color: var(--ink); }

/* ---------- envio de arquivo: um cartão por base ---------- */
.tile {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px;
  border: 1.5px dashed #cfd3e2; border-radius: 12px; background: var(--soft);
}
.tile.req { border-color: #b8d3ff; background: #f7faff; }
.tile.done { border-style: solid; border-color: #bfe6cf; background: #f3fbf6; }
.tile .h { display: flex; align-items: center; gap: 10px; }
.tile .h b { flex: 1; font-family: var(--f-display); font-weight: 600; font-size: 15px; }
.tile .ti { width: 20px; height: 20px; flex-shrink: 0; color: var(--blue); }
.tile.done .ti { color: var(--green); }
.tile p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.tile .fmt { font-size: 12px; color: var(--ink-3); }
.file-row { position: relative; display: flex; flex-direction: column; gap: 6px; }
.tile .file-row { margin-top: auto; }
/* O input de verdade fica invisível; o rótulo "Selecionar arquivo" abre o seletor. */
.file-row input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-row .pick { cursor: pointer; }
.file-row .pick[hidden], .file-row .fileok[hidden] { display: none; }
.fileok {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 13px;
}
.fileok b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileok .link { font-size: 13px; }
.fileok .reset-file { color: var(--red-d); }
.fileok .reset-file:disabled { opacity: .5; cursor: not-allowed; }
.prow { display: flex; align-items: flex-end; gap: 16px 28px; flex-wrap: wrap; }
.prow .product { flex: 0 1 460px; }
.summary { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: flex-end; }
.summary .sitem { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.summary .sitem > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.summary .sitem > b { display: flex; align-items: center; min-height: 24px; font-size: 14px; font-weight: 600; }
.summary small { flex-basis: 100%; }
.send-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.send-row .note { flex: 1 1 320px; }
.note.quiet { padding: 0; background: none; color: var(--ink-2); }
.note.quiet svg { color: var(--ink-3); }
.rules { font-size: 13px; color: var(--ink-2); }
.rules summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.rules .tips { margin-top: 10px; }
.hint { position: relative; display: inline-flex; color: var(--blue); cursor: help; }
.hint svg { width: 16px; height: 16px; }
.hint .hint-text {
  position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 20; width: 240px; transform: translateX(-50%);
  padding: 8px 10px; border-radius: 8px; background: var(--ink); color: #fff;
  font-family: var(--f-body); font-size: 12.5px; font-weight: 400; line-height: 1.4;
  display: none; pointer-events: none;
}
/* display e não visibility: escondido, o balão não pode alargar a página em 390px. */
.hint:hover .hint-text, .hint:focus .hint-text { display: block; }
.progress { display: flex; height: 10px; overflow: hidden; border-radius: 5px; background: var(--track); }
.progress-bar { height: 100%; background: var(--blue); color: transparent; font-size: 0; transition: width .2s ease-in-out; }
.progress-bar.bg-danger { background: var(--red); }
.note .close { margin-left: auto; padding: 0 4px; border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; }

/* ---------- componentes JS do Bootstrap 4 ----------
   O base.html carrega só o JS do Bootstrap (modal, collapse, tooltip, dropdown). Sem
   este bloco, um modal fechado aparece aberto no fim da página, inclusive
   formulários com dado pessoal. Só o que esses componentes precisam.
   Sai junto com o JS do Bootstrap no base.html, não com o layout antigo. */
.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 1050; display: none; overflow-x: hidden; overflow-y: auto; outline: 0; }
.modal-open .modal { overflow-x: hidden; overflow-y: auto; }
.modal-dialog { position: relative; width: auto; max-width: 520px; margin: 48px auto; padding: 0 16px; pointer-events: none; }
.modal-dialog.modal-lg { max-width: 820px; }
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 96px); }
.modal-dialog-scrollable .modal-content { max-height: calc(100vh - 96px); overflow: hidden; }
.modal-dialog-scrollable .modal-body { overflow-y: auto; }
.modal.fade .modal-dialog { transform: translateY(-16px); transition: transform .2s ease-out; }
.modal.show .modal-dialog { transform: none; }
.modal-content {
  position: relative; display: flex; flex-direction: column; width: 100%; pointer-events: auto;
  background: #fff; border-radius: 16px; box-shadow: 0 24px 48px rgba(23,27,56,.24); outline: 0;
}
.modal-header { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-title { margin: 0; flex: 1; font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.modal-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line-2); }
.modal-backdrop { position: fixed; inset: 0; z-index: 1040; background: var(--ink); }
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.show { opacity: .38; }
.fade { transition: opacity .15s linear; }
.fade:not(.show) { opacity: 0; }
.modal-header .close {
  width: 32px; height: 32px; flex-shrink: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer;
}
.modal-header .close:hover { background: var(--track); }
.collapse:not(.show) { display: none; }
.dropdown, .dropleft { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; z-index: 1000; display: none; min-width: 180px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(23,27,56,.14);
}
.dropdown-menu.show { display: block; }
.dropdown-menu-right { right: 0; left: auto; }
.dropdown-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px;
  background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer;
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--track); }
.dropdown-item.text-danger { color: var(--red-d); }
.dropdown-divider { height: 0; margin: 6px 0; border-top: 1px solid var(--line-2); }
.collapsing { height: 0; overflow: hidden; transition: height .2s ease; }
.tooltip { position: absolute; z-index: 1070; display: block; max-width: 240px; font-size: 12.5px; line-height: 1.4; word-wrap: break-word; opacity: 0; }
.tooltip.show { opacity: 1; }
.tooltip .arrow { display: none; }
.tooltip-inner { padding: 8px 10px; border-radius: 8px; background: var(--ink); color: #fff; text-align: left; }
.invalid-feedback { display: none; font-size: 12.5px; color: var(--red-d); }
.is-invalid ~ .invalid-feedback { display: block; }
.inp.is-invalid { border-color: var(--red); }
/* Toast fica acima de modal aberto. */
.toasts { z-index: 1080; }

/* ---------- tela de paciente: duas colunas e dados ---------- */
.pgrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: 18px; align-items: start; }
.pcol { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pkv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pkv > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 22px; border-bottom: 1px solid var(--line-2); }
.pkv > div > span { font-size: 12px; color: var(--ink-3); }
.pkv > div > b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pkv .full { grid-column: 1 / -1; }
.kvg { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; }
.kvg > span:nth-child(odd) { color: var(--ink-3); }
.kvg > span:nth-child(even) { font-weight: 600; overflow-wrap: anywhere; }
.hrow { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.hrow:first-of-type { border-top: 0; }
.wsbox { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--blue-bg); border: 1px solid var(--blue-l); }
.wsbox b { font-family: var(--f-display); font-weight: 600; font-size: 16px; }
.wsbox p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.jsteps { display: flex; align-items: center; flex-wrap: wrap; row-gap: 10px; }
.js { flex: 1 1 150px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; color: var(--ink-3); }
.js small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.js .d { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--track); color: #fff; }
.js .d svg { width: 14px; height: 14px; }
.js.done { background: var(--blue-bg); border-color: var(--blue-l); color: var(--blue-d); }
.js.done .d { background: var(--blue); }
.js.cur { border: 1.5px solid var(--blue); color: var(--ink); }
.js.cur .d { background: #fff; border: 2px solid var(--blue); }
.js.cur .d::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.js.danger { background: var(--red-bg); border-color: var(--red-line); color: var(--red-d); }
.js.danger .d { background: var(--red); }
.jc { flex: 0 0 16px; height: 2px; background: var(--line); }
.jc.on { background: var(--blue); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .v { font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.1; }
.stat .l { font-size: 12px; color: var(--ink-3); }
/* números no hero escuro (conversa) */
.hstats { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.hstats .stat .v { color: #fff; font-size: 26px; }
.hstats .stat .l { color: var(--on-dark-2); }
.hstats .stat .h { font-size: 12px; color: var(--on-dark-3); }

/* ---------- conversa WhatsApp ---------- */
:root { --thread-bg: #f1eff7; --bub-out: #e4eeff; --bub-btn-line: #d2e2ff; }
.thread { display: flex; flex-direction: column; gap: 8px; padding: 18px 22px; background: var(--thread-bg); max-height: 620px; overflow: auto; border-radius: 0 0 16px 16px; }
.bub {
  max-width: min(80%, 560px); padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45;
  overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(23,27,56,.06);
}
.bub.o { align-self: flex-end; background: var(--bub-out); border-bottom-right-radius: 3px; }
.bub.i { align-self: flex-start; background: #fff; border-bottom-left-radius: 3px; }
.bub.ignored { opacity: .6; }
.bub .tpl { display: block; margin-bottom: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: var(--ink-3); }
.bub .txt { white-space: pre-wrap; }
.bub .meta { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: flex-end; margin-top: 4px; font-size: 11px; color: var(--ink-3); }
.bub .meta .rd { color: var(--blue); }
.bub .meta .bad { color: var(--red-d); }
.daysep { align-self: center; margin: 6px 0; padding: 3px 10px; border-radius: 10px; background: #fff; font-size: 11.5px; color: var(--ink-3); }

/* ---------- telas de acesso (login, senha, convite) ---------- */
.auth {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: 40px 16px; background: var(--ink);
  background-image: radial-gradient(circle at 15% 0%, rgba(0,107,246,.28), transparent 45%), radial-gradient(circle at 100% 100%, rgba(117,21,255,.22), transparent 45%);
}
.auth .brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.auth .brand img { height: 30px; width: auto; }
.auth .brand .vsep { width: 1px; height: 24px; background: rgba(255,255,255,.2); }
.auth .brand .prod { font-family: var(--f-display); font-weight: 600; font-size: 18px; white-space: nowrap; }
.auth .brand .prod span { color: rgba(255,255,255,.45); font-weight: 400; }
.auth-card {
  width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; padding: 32px 28px;
  background: #fff; border-radius: 16px; box-shadow: 0 24px 48px rgba(0,0,0,.28);
}
.auth-card .auth-ic { align-self: center; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--blue-bg); color: var(--blue); }
.auth-card .auth-ic svg { width: 22px; height: 22px; }
.auth-card h1 { margin-top: -6px; text-align: center; font-family: var(--f-display); font-weight: 600; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.auth-help { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.auth-rules { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 12px 14px; list-style: none; border-radius: 10px; background: var(--soft); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); }
.auth-rules li { display: flex; gap: 8px; }
.auth-rules li::before { content: ""; width: 5px; height: 5px; margin-top: 7px; border-radius: 50%; background: var(--ink-3); flex-shrink: 0; }
.auth-swap { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line-2); font-size: 13.5px; }
.auth-swap dt { color: var(--ink-3); }
.auth-swap dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.auth-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 13.5px; }
.auth-links a { color: var(--blue); font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.otp-inp { height: 52px; text-align: center; font-size: 24px; letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.lang-switcher { position: fixed; top: 12px; right: 12px; z-index: 50; display: flex; gap: 6px; }
.lang-switcher button { padding: 4px 10px; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; font-size: 12px; cursor: pointer; }
.ahead .lang-switcher { position: static; }

/* ---------- visão geral: KPIs do hero, anel, card de jornada ---------- */
.hbtn.static { cursor: default; }
.hbtn.static:hover { background: rgba(255,255,255,.06); }
.kpis { display: flex; flex-wrap: wrap; row-gap: 18px; }
.kpi { display: flex; flex: 1 1 220px; flex-direction: column; gap: 5px; padding: 0 22px; border-left: 1px solid var(--dark-line); }
.kpi:first-child { padding-left: 0; border-left: 0; }
.kpi .l { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--on-dark-2); }
.kpi .v { font-family: var(--f-display); font-weight: 600; font-size: 40px; line-height: 1; letter-spacing: -.03em; }
.kpi .v small { margin-left: 6px; font-family: var(--f-body); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--on-dark-2); }
.kpi .h { font-size: 12.5px; line-height: 1.4; color: var(--on-dark-3); }
.kpi.kx { flex: 1 1 270px; flex-direction: row; align-items: center; gap: 18px; }
/* Número na cor da etapa (--kc) e indicador que é link (monitoramento): o rótulo acende no hover; o ativo ganha um traço na cor dele. */
.kpi { --kc: var(--on-dark); min-width: 0; color: var(--on-dark); text-decoration: none; }
.kpi .v { color: var(--kc); }
.kpi.k-blue { --kc: var(--on-dark-blue); }
.kpi.k-purple { --kc: var(--on-dark-purple); }
.kpi.k-red { --kc: var(--on-dark-red); }
a.kpi:hover .l, a.kpi.on .l { color: var(--on-dark); }
/* Ícone do rótulo, na cor do número do indicador. */
.kpi .l .li { display: inline-flex; flex-shrink: 0; width: 18px; height: 18px; color: var(--kc); }
a.kpi:hover .h { text-decoration: underline; }
a.kpi.on .v { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.kx .kb { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
/* Anel: --p (0–100) é o preenchimento e --c a cor. */
.ring {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 92px; height: 92px; flex-shrink: 0; border-radius: 50%;
  background: conic-gradient(var(--c, var(--blue)) calc(var(--p, 0) * 1%), rgba(255,255,255,.12) 0);
}
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--ink); }
.ring b { position: relative; font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
/* Barras era × hoje do atraso: a de hoje tem a largura relativa à de era. */
.cmp { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; }
.cmp div { display: grid; grid-template-columns: 76px auto; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; color: var(--on-dark-3); }
.cmp i { display: block; height: 9px; border-radius: 5px; background: rgba(255,255,255,.28); }
.cmp i.now { background: #7fe0a8; }
.cmp span.now { font-weight: 700; color: var(--on-dark); }
/* Os cards lado a lado dividem as linhas (rótulo, título, gráfico, pé): títulos de alturas diferentes não desalinham os gráficos. */
.ecard { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 16px; padding: 24px 24px 20px; }
.ecard .ttl { font-family: var(--f-display); font-weight: 600; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.ecard .ttl .sub { display: block; margin-top: 4px; font-family: var(--f-body); font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.ecard .foot { padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
/* Card que abre o detalhe: o card inteiro é o link. */
a.ecard { color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
a.ecard:hover { border-color: var(--blue); box-shadow: 0 12px 28px rgba(23,27,56,.08); }
.ecard .foot .more { margin-left: auto; color: var(--blue); font-weight: 600; white-space: nowrap; }
a.ecard .foot { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.mini { display: flex; gap: 8px; height: 140px; min-width: 0; margin: 0; padding: 0; list-style: none; }
/* A barra cresce na linha flexível; número e rótulo ficam fora dela e nunca são cortados. */
.mini li { display: grid; flex: 1; grid-template-rows: minmax(0, 1fr) auto auto; row-gap: 4px; min-width: 0; }
.mini .b { align-self: end; height: var(--h, 100%); margin-bottom: 2px; border-radius: 6px 6px 2px 2px; }
.mini .b.tri { background: var(--blue); }
.mini .b.pri { background: var(--red); }
.mini .b.nav { background: var(--purple-2); }
.mini .b.case { background: var(--purple); }
.mini .b.navb { display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.mini .navb i { display: block; min-height: 3px; }
.mini .navb .oth { background: var(--blue); }
.mini .navb .pri { background: var(--red); }
.mini .b.none { visibility: hidden; }
.mini .n { font-size: 15px; font-weight: 700; line-height: 22px; }
.mini .c { overflow: hidden; font-size: 11.5px; line-height: 16px; color: var(--ink-3); text-overflow: ellipsis; white-space: nowrap; }
/* Card de navegação: mesmas linhas do mini-funil, para a barra terminar na base das barras dele e a legenda ocupar o lugar de número e rótulo. */
.situations { display: grid; grid-template-rows: minmax(0, 1fr) 22px 16px; row-gap: 4px; height: 140px; }
.sbar { display: flex; align-self: end; gap: 3px; height: 18px; margin-bottom: 2px; overflow: hidden; border-radius: 7px; }
.sbar span { min-width: 4px; }
.s-progress { background: var(--blue-l); }
.s-outcome { background: var(--purple-2); }
.s-loss { background: var(--red); }
.slegend { display: flex; flex-wrap: wrap; grid-row: 2 / 4; align-self: start; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink-2); }
.slegend li { display: inline-flex; align-items: center; gap: 6px; }
.slegend i { width: 9px; height: 9px; border-radius: 2px; }
/* Card de navegação de cliente sem OncoNavi: convite para contratar e uma barra ilustrativa apagada. */
.locked { display: flex; flex-direction: column; grid-row: 2 / 4; gap: 14px; }
.lockbox { display: flex; flex: 1; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid #e2d2fb; border-radius: 12px; background: var(--purple-bg); }
.lockbox .ttl { color: var(--purple); }
.lockbox p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.lockic { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--purple); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: 24px; }
.ghost { display: flex; flex-direction: column; gap: 10px; }
/* A .sbar do card com dados se alinha ao fim da linha do grid; aqui ela ocupa a largura toda. */
.ghost .sbar { align-self: stretch; }
.ghost .sbar span:nth-child(1) { background: #c3c7d6; }
.ghost .sbar span:nth-child(2) { background: #d6d9e4; }
.ghost .sbar span:nth-child(3) { background: #e6e8ef; }
.ghost p { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.ecard .foot.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.overview-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 40px 32px; }
.overview-empty .lic { width: 44px; height: 44px; border-radius: 12px; background: var(--red-bg); }
.overview-empty p { margin: 0; max-width: 62ch; line-height: 1.5; color: var(--ink-2); }

/* ---------- visão geral: jornada do Grupo Prioritário ---------- */
/* Triagem à esquerda, a seta com quem entra no meio, o grupo à direita; em telas estreitas os blocos empilham e a seta some. */
.jgrid { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: start; }
.jgrid .mid { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 104px; font-size: 11px; font-weight: 700; line-height: 1.3; text-align: center; color: var(--ink-3); }
.jgrid .mid .arr { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; }
.jgrid .mid .arr svg { width: 18px; height: 18px; }
.flowhead { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid currentColor; }
.flowhead b { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.flowhead span { font-size: 12.5px; color: var(--ink-3); }
.flowhead.f-blue { color: var(--blue); }
.flowhead.f-purple { color: var(--purple); }
.flowhead.f-grey { color: var(--ink-3); border-bottom-style: dashed; }
/* --n: quantas etapas o bloco tem. */
.steps { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 14px; }
/* --sc e --sb: cor da etapa e do fundo do ícone. */
.st { --sc: var(--blue); --sb: var(--blue-bg); display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.st.t-red { --sc: var(--red); --sb: var(--red-bg); }
.st.t-purple { --sc: var(--purple); --sb: var(--purple-bg); }
/* Dado reportado pelo cliente, sem OncoNavi: etapa em cinza. */
.st.t-grey { --sc: #b8bccd; --sb: #f1f2f6; }
.st.t-grey .ic { color: var(--ink-3); }
.st .ic { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--sb); color: var(--sc); }
.st .ic svg { width: 22px; height: 22px; }
.st .t { min-height: 36px; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--ink-2); }
.st .v { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.st .v b { font-family: var(--f-display); font-weight: 600; font-size: 28px; line-height: 1; letter-spacing: -.02em; }
.st.big .v b { font-size: 32px; color: var(--sc); }
.st .v small { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.st .bar { display: flex; gap: 2px; height: 8px; overflow: hidden; border-radius: 4px; background: var(--track); }
.st .bar > div { height: 100%; border-radius: 4px; background: var(--sc); }
.st .bar.split { background: none; }
.st .bar .pri { background: var(--red); }
.st .bar .oth { background: var(--blue-l); }
.st .d { font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.c-red { color: var(--red-d); }
.c-blue { color: var(--blue-d); }
.c-purple { color: var(--purple); }
/* Ícones do sprite (overview_icon): ocupam a caixa de quem os contém. */
svg.oi { display: block; width: 100%; height: 100%; }
/* Ícone num quadrado colorido: --s é o lado; o ícone ocupa 62% dele. */
.hic { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: var(--s, 40px); height: var(--s, 40px); border-radius: 11px; }
.hic svg.oi { width: 62%; height: 62%; }
.hic.h-red { background: var(--red-bg); color: var(--red); }
.hic.h-purple { background: var(--purple-bg); color: var(--purple); }
.hic.h-purple2 { background: var(--purple-bg); color: var(--purple-2); }
.hic.h-blue { background: var(--blue-bg); color: var(--blue); }
.hic.h-navy { background: var(--navy); color: #fff; }
.chd { display: flex; align-items: center; gap: 12px; }
.kcirc { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 92px; height: 92px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }
.kcirc svg.oi { width: 44px; height: 44px; }
.outcome { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; padding: 16px 20px; border-radius: 14px; background: var(--purple-bg); }
.outcome .rate { font-family: var(--f-display); font-weight: 600; font-size: 28px; color: var(--purple); }
.outcome .muted { font-size: 13.5px; color: var(--ink-2); }
.outcome .link { margin-left: auto; }
.outcome.o-grey { background: #f1f2f6; }
.outcome.o-grey .rate { color: var(--ink); }
.outcome .ok { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px; background: var(--ink-3); color: #fff; }
.outcome .ok svg { width: 22px; height: 22px; }
.outside { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.outside .oh { display: flex; flex: 0 0 220px; flex-direction: column; gap: 5px; }
.outside .oh b { font-family: var(--f-display); font-size: 18px; }
.outside .oh .muted, .outside .oc .muted { font-size: 12.5px; }
.outside .oc { display: flex; flex: 1 1 200px; flex-direction: column; gap: 5px; padding-left: 22px; border-left: 1px solid var(--line); }
.outside .oc .t { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.outside .oc b { font-family: var(--f-display); font-size: 28px; }
.outside .oc small { font-weight: 700; color: var(--ink-2); }
.outside .oc .muted b { font-family: inherit; font-size: inherit; font-weight: 700; }
.outside .note { flex: 1 1 320px; }
.insight { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 18px 22px; border-radius: 16px; background: var(--ink); color: #fff; }
.insight b { font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.insight span { font-size: 13.5px; color: var(--on-dark-2); }
.insight .ib { display: flex; flex-direction: column; gap: 3px; }
.insight .ring { width: 64px; height: 64px; }
.insight .ring::before { inset: 7px; }
.insight .ring b { font-size: 15px; }

/* ---------- visão geral: resumo da navegação ---------- */
/* Abas à esquerda e seletor de período à direita, na mesma linha. */
.tabrow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.seg.dark { background: rgba(255,255,255,.06); }
.seg.dark a { color: var(--on-dark-2); }
.seg.dark a.on { background: #fff; color: var(--ink); }
.now-panel { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: var(--dark-fill); }
.now-panel .nh { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; }
.now-panel .nh > b { font-size: 14px; }
.now-panel .slegend { color: var(--on-dark-2); }
.now-panel .slegend b { color: #fff; }
.now-panel .sbar { align-self: stretch; height: 14px; margin: 0; }
.fhead { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.fhead .h2 { font-size: 18px; }
.fhead .muted { font-size: 12.5px; }
.fhead .legend { margin: 0 0 0 auto; padding: 0; list-style: none; }
.fhead .legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .k-key { background: var(--navy); }
.legend .k-mid { background: var(--blue); }
.fgroups { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; padding-bottom: 8px; }
.fgroups div { padding-bottom: 8px; border-bottom: 1px solid #cfd3e2; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.funnel { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: end; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fcol { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 12px; border: 1.5px solid transparent; border-radius: 14px; }
.fcol .ft { min-height: 34px; font-size: 13px; font-weight: 700; line-height: 1.3; }
.fcol .fv { font-family: var(--f-display); font-weight: 600; font-size: 26px; line-height: 1; }
.fcol .fp { font-size: 12px; color: var(--ink-3); }
.fcol .fb { display: flex; align-items: flex-end; height: 110px; }
.fcol .fb div { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--blue); }
.fcol.key { border-color: var(--navy); background: var(--navy-bg); }
.fcol.key .fb div { background: var(--navy); }
/* --bc: cor das barras da lista. */
.blist { --bc: var(--blue-l); display: flex; flex-direction: column; gap: 10px; }
.blist.b-loss { --bc: var(--red); }
.blist.b-outcome { --bc: var(--purple-2); }
.blist > div:first-child b { font-family: var(--f-display); font-size: 16px; }
.blist > div:first-child .muted { font-size: 12.5px; }
.blist .brow { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.blist .bt { display: flex; align-items: center; gap: 12px; }
.blist .bt > div { flex: 1; min-width: 0; }
.blist .nm { font-weight: 600; }
.blist .bt .muted { font-size: 12px; }
.blist .bt b { font-family: var(--f-display); font-size: 20px; }
.blist .bar { height: 6px; overflow: hidden; border-radius: 3px; background: var(--track); }
.blist .bar div { height: 100%; border-radius: 3px; background: var(--bc); }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jgrid { grid-template-columns: 1fr; row-gap: 24px; }
  .jgrid .mid { display: none; }
  .funnel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fgroups { display: none; }
  .pgrid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .kcirc { width: 76px; height: 76px; }
  .ahead, .hero, .body { padding-left: 16px; padding-right: 16px; }
  .ahead .vsep, .ahead .prod { display: none; }
  .anav { order: 3; width: 100%; margin-left: 0; }
  .anav a { padding: 8px; }
  .ctxs { order: 2; width: 100%; }
  .ctxs .dd:not(.avatar-dd) { flex: 1 1 auto; min-width: 0; }
  .ctx { width: 100%; max-width: none; }
  .ctx .chev { margin-left: auto; }
  .ddm { right: auto; left: 0; }
  .avatar-dd .ddm { left: auto; right: 0; }
  .hero h1 { font-size: 26px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .kpi, .kpi.kx { flex-basis: 100%; padding-left: 0; border-left: 0; }
  .ring { width: 76px; height: 76px; }
  .ring b { font-size: 17px; }
  .mini .n { font-size: 13px; }
  .outside .oc { padding-left: 0; border-left: 0; }
  .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-empty { padding: 28px 20px; }
  .auth-card { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
