:root {
  --bg: #eef0ee;
  --side: #ffffff;
  --panel: #f6f7f6;
  --card: #ffffff;
  --ink: #101913;
  --ink-2: #33403a;
  --muted: #7b877f;
  --line: #e4e9e5;
  --line-2: #d3dbd5;
  --green: #2b8a58;
  --green-dark: #1b5c3b;
  --green-deep: #0f3b26;
  --green-light: #8fd3b0;
  --green-soft: #e6f2ea;
  --red: #c94f4f;
  --red-soft: #fbecec;
  --amber: #b8891c;
  --amber-soft: #faf3e0;
  --blue: #3b6fb6;
  --blue-soft: #e8eef8;
  --shadow: 0 1px 2px rgba(16, 25, 19, .03), 0 8px 24px rgba(16, 25, 19, .04);
  --map-vazio: #e6ebe7; --map0: #d9ebe0; --map1: #bfe3cf; --map2: #8fd3b0; --map3: #3fb377; --map4: #1b5c3b; /* mapa do Brasil (aba Regiões) */
  --r-xl: 24px;
  --r-lg: 20px;
  --r-md: 14px;
}
[data-theme="dark"] {
  --bg: #0c110e;
  --map-vazio: #1c2620; --map0: #21372b; --map1: #244a35; --map2: #2e7a52; --map3: #3fb377; --map4: #9fe3bd;
  --side: #131a15;
  --panel: #0f1511;
  --card: #171f1a;
  --ink: #eef2ef;
  --ink-2: #c7d0ca;
  --muted: #8a978f;
  --line: #222b25;
  --line-2: #2f3a33;
  --green: #35b96d;
  --green-dark: #2a8f57;
  --green-deep: #1b5c3b;
  --green-light: #5fc48f;
  --green-soft: #1a2d22;
  --red: #e06b6b;
  --red-soft: #2f1c1c;
  --amber: #d4a63a;
  --amber-soft: #2e2716;
  --blue: #6f9be0;
  --blue-soft: #1a2333;
  --shadow: none;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light dark; }
body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
b { font-weight: 700; }

/* ---- estrutura ---- */
.app { display: flex; min-height: 100vh; }
/* Sidebar sempre fixa e inteira na tela: tamanhos em função da altura da janela (sem rolagem própria; só o conteúdo rola) */
.sidebar {
  width: 250px; flex-shrink: 0; background: var(--side); padding: clamp(14px, 2.6vh, 28px) 18px clamp(10px, 2vh, 22px);
  display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow: hidden; box-sizing: border-box;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 0 10px clamp(8px, 2.2vh, 30px); }
.logo-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); display: inline-flex; align-items: center; justify-content: center; }
.logo-text { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.menu-label { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); padding: clamp(4px, 1vh, 14px) 12px clamp(2px, .6vh, 8px); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; height: clamp(30px, 4.2vh, 44px); padding: 0 12px; box-sizing: border-box; border-radius: 12px; cursor: pointer;
  font-size: clamp(13px, 1.55vh, 15px); font-weight: 600; color: var(--ink-2); background: none; border: none; text-align: left; width: 100%; position: relative;
}
.nav-item svg { color: var(--muted); }
.nav-item:hover { background: var(--panel); color: var(--ink); }
.nav-item.active { color: var(--ink); font-weight: 800; }
.nav-item.active svg { color: var(--green-dark); }
.nav-item.active::before { content: ""; position: absolute; left: -18px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--green-dark); }
.side-card { margin-top: auto; background: linear-gradient(160deg, var(--green-dark), var(--green-deep)); color: #fff; border-radius: var(--r-lg); padding: clamp(10px, 1.7vh, 18px) 16px; flex-shrink: 0; }
.side-card .sc-title { font-size: clamp(13px, 1.5vh, 15px); font-weight: 800; }
.side-card .sc-text { font-size: clamp(11.5px, 1.3vh, 13px); margin-top: 4px; opacity: .95; }
.side-card .sc-sub { font-size: 11.5px; opacity: .65; margin-top: 8px; }

.main { flex: 1; min-width: 0; padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 16px; }
.topbar { background: var(--side); border-radius: var(--r-xl); padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar .filters { flex: 1; min-width: 0; }
.account { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding-left: 16px; border-left: 1px solid var(--line); position: relative; cursor: pointer; border-radius: 14px; }
.account:hover .acc-name { color: var(--green-dark); }
.acc-chev { color: var(--muted); transition: transform .2s; }
.account.open .acc-chev { transform: rotate(180deg); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 12px); min-width: 240px; background: var(--card); border-radius: 16px; box-shadow: 0 18px 44px -14px rgba(16, 25, 19, .35), 0 2px 8px rgba(16, 25, 19, .06); padding: 8px; z-index: 55; cursor: default; }
.profile-menu .pm-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.profile-menu .pm-name { font-size: 14px; font-weight: 800; }
.profile-menu .pm-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.profile-menu .pm-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: none; background: none; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: left; }
.profile-menu .pm-item:hover { background: var(--green-soft); color: var(--green-dark); }
.profile-menu .pm-item svg { color: var(--muted); }
.profile-menu .pm-item.pm-sair { border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 10px 10px; }
.profile-menu .pm-item.pm-sair:hover { background: var(--red-soft); color: var(--red); } .profile-menu .pm-item.pm-sair:hover svg { color: var(--red); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--green-dark); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.acc-name { font-size: 14px; font-weight: 700; }
.acc-sub { font-size: 12px; color: var(--muted); }

.panel { background: var(--panel); border-radius: var(--r-xl); padding: 28px; flex: 1; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.panel-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -.6px; line-height: 1.1; }
.panel-head .sub { font-size: 15px; color: var(--muted); margin-top: 6px; }
.panel-head .actions { display: flex; gap: 10px; align-items: center; }

/* ---- botões e pílulas ---- */
.btn {
  border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 10px 18px; font-size: 13.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { border-color: var(--green-dark); }
.btn.primary { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn.primary:hover { background: var(--green-deep); }
.btn.outline { border-color: var(--green-dark); color: var(--green-dark); background: transparent; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: wait; }

.filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.filters .sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; }
/* filtros do topo: rótulo + controle com ícone, borda e seta */
.fgrp { display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
.fgrp .f-lbl { font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); padding-left: 6px; }
.fgrp .f-ctl { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 14px; background: var(--card); border: 1.5px solid var(--line-2); border-radius: 999px; color: var(--green-dark); transition: border-color .15s, box-shadow .15s; }
/* ícone e seta são só decoração: ficam acima do select e não roubam o clique */
.fgrp .f-ctl > svg { position: relative; z-index: 2; pointer-events: none; flex-shrink: 0; }
.fgrp .f-ctl > svg:last-child { color: var(--muted); margin-left: -4px; }
/* o select fica no fluxo (a pílula acompanha o texto), mas a área clicável cobre o ícone, a seta e as bordas:
   o padding estica a caixa e a margem negativa devolve o espaço, então o texto não sai do lugar */
.fgrp .f-ctl select { appearance: none; -webkit-appearance: none; background: transparent; border: none; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; outline: none; max-width: 300px;
  height: 42px; padding: 0 34px 0 42px; margin: 0 -34px 0 -42px; }
.fgrp .f-ctl select option { color: var(--ink); background: var(--card); font-weight: 600; }
.fgrp:hover .f-ctl { border-color: var(--green-dark); }
.fgrp .f-ctl:focus-within { border-color: var(--green-dark); box-shadow: 0 0 0 3px var(--green-soft); }
.fgrp.primary .f-ctl { background: var(--green-dark); border-color: var(--green-dark); color: #fff; box-shadow: 0 6px 16px -6px rgba(27, 92, 59, .6); }
.fgrp.primary .f-ctl select, .fgrp.primary .f-ctl > svg:last-child { color: #fff; }
.fgrp.primary .f-ctl select option { color: var(--ink); }
.fgrp.primary:hover .f-ctl { background: var(--green-deep); border-color: var(--green-deep); }
.fgrp.off { opacity: .45; cursor: not-allowed; }
.fgrp.off .f-ctl select { cursor: not-allowed; }
.fgrp .f-ctl.custom-range { gap: 6px; padding: 0 14px; font-size: 13px; color: var(--muted); }
.dd { position: relative; }
.dd-btn { font: inherit; cursor: pointer; }
.dd-btn .dd-txt { font-size: 14px; font-weight: 700; color: var(--ink); padding: 0 2px; }
.dd-btn:disabled { cursor: not-allowed; }
.dd.open .f-ctl { border-color: var(--green-dark); box-shadow: 0 0 0 3px var(--green-soft); }
.dd-av { width: 30px; height: 30px; font-size: 10px; flex-shrink: 0; }
.dd-av.sm { width: 26px; height: 26px; margin-left: -4px; font-size: 9px; }
.dd-av.all { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 270px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 44px -14px rgba(16, 25, 19, .35), 0 2px 8px rgba(16, 25, 19, .06); padding: 6px; z-index: 70; max-height: 380px; overflow-y: auto; }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: none; background: none; border-radius: 10px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: left; }
.dd-item:hover { background: var(--green-soft); color: var(--green-dark); }
.dd-item.on { color: var(--green-dark); font-weight: 800; }
.dd-item > svg:last-child { margin-left: auto; color: var(--green-dark); }
.dd-grp { font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.fgrp .f-ctl.custom-range input { border: none; background: transparent; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink); outline: none; cursor: pointer; }
.fgrp .f-ctl.custom-range .f-sep { font-weight: 600; }
.pill {
  background: var(--panel); border: 1px solid transparent; color: var(--ink-2);
  border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.pill:hover { background: var(--green-soft); color: var(--green-dark); }
.pill.active { background: var(--green-dark); color: #fff; }
.custom-range { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); background: var(--panel); border-radius: 999px; padding: 5px 14px; }
.custom-range.active { box-shadow: 0 0 0 1.5px var(--green-dark) inset; color: var(--ink); }
.custom-range input { border: none; background: transparent; font-size: 12.5px; outline: none; padding: 3px 0; cursor: pointer; font-weight: 600; }
.select { background: var(--panel); border: 1px solid transparent; border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; outline: none; }
.select:focus { border-color: var(--green-dark); }
.select.strong { background: var(--green-dark); color: #fff; }

/* ---- blocos ---- */
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--card); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h2 { font-size: 17px; font-weight: 800; margin-bottom: 2px; letter-spacing: -.2px; }
.card .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.card h3 { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 16px 0 8px; }
.hint { font-size: 12px; color: var(--muted); }

.kpi { background: var(--card); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.kpi .kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi .kpi-title { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.kpi .kpi-arrow { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0; }
.kpi .v { font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.05; white-space: nowrap; overflow: hidden; max-width: 100%; }
.kpi .kpi-foot { margin-top: auto; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi .delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--green-soft); color: var(--green-dark); }
.kpi .delta.down { background: var(--red-soft); color: var(--red); }
.kpi .delta.flat { background: var(--line); color: var(--muted); }
.kpi.green .v { color: var(--green-dark); }
.kpi.red .v { color: var(--red); }
.kpi.amber .v { color: var(--amber); }
.kpi.hero { background: linear-gradient(150deg, #1f6b45 0%, var(--green-deep) 100%); color: #fff; }
/* cards coloridos da aba Vendedores (tons suaves que funcionam nos dois temas) */
.kpi.soft-green { background: color-mix(in srgb, var(--green) 16%, var(--card)); } .kpi.soft-green .v { color: var(--green-dark); }
.kpi.soft-mint { background: color-mix(in srgb, #1f9aa0 14%, var(--card)); } .kpi.soft-mint .v { color: #17767b; }
.kpi.soft-blue { background: color-mix(in srgb, var(--blue) 14%, var(--card)); } .kpi.soft-blue .v { color: var(--blue); }
.kpi.soft-purple { background: color-mix(in srgb, #8b5cf6 14%, var(--card)); } .kpi.soft-purple .v { color: #6d3fe0; }
.kpi.soft-amber { background: color-mix(in srgb, var(--amber) 16%, var(--card)); } .kpi.soft-amber .v { color: var(--amber); }
.kpi.soft-red { background: color-mix(in srgb, var(--red) 13%, var(--card)); } .kpi.soft-red .v { color: var(--red); }
.kpi .kpi-sub { font-size: 12.5px; }
.kpi .kpi-bar { display: block; width: 100%; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.kpi .kpi-bar i { display: block; height: 100%; background: #fff; border-radius: 999px; }
.grid.kpis.vend-kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.vend-kpis .kpi { padding: 16px 14px; min-height: 132px; gap: 8px; }
.vend-kpis .kpi .v { font-size: 26px; letter-spacing: -.6px; }
.vend-kpis .kpi .kpi-title { font-size: 12.5px; }
.vend-kpis .kpi .kpi-arrow { width: 24px; height: 24px; }
.vend-kpis .kpi .kpi-foot { font-size: 11.5px; }
@media (max-width: 1150px) { .grid.kpis.vend-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* aba Qualificação */
.grid.kpis.qual-kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.av-stack { display: inline-flex; } .av-stack .vend-av.sm { width: 46px; height: 46px; font-size: 14px; margin-right: -12px; box-shadow: 0 0 0 3px var(--card); }
.av-stack .vend-av.pend { filter: grayscale(.55); opacity: .75; } /* ainda sem usuário no RD */
.rdlink-name { color: inherit; text-decoration: none; } .rdlink-name:hover { color: var(--green-dark); text-decoration: underline; }
.qual-kpis .kpi { padding: 16px 14px; min-height: 132px; gap: 8px; } .qual-kpis .kpi .v { font-size: 26px; } .qual-kpis .kpi .kpi-title { font-size: 12.5px; } .qual-kpis .kpi .kpi-arrow { width: 24px; height: 24px; } .qual-kpis .kpi .kpi-foot { font-size: 11.5px; }
@media (max-width: 1150px) { .grid.kpis.qual-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.vchip.off { opacity: .55; cursor: default; } .vchip.off small { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-left: 2px; }
/* seção "Carteira em aberto" dentro do Funil */
.sec-head { margin: 28px 0 14px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.sec-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.sec-head .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.grid.kpis.cart-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.kpis.cart-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* aba Funil: os 5 cards sempre na mesma linha */
.grid.kpis.funil-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.funil-kpis .kpi { padding: 18px 16px; min-height: 136px; }
.funil-kpis .kpi .v { font-size: 28px; }
@media (max-width: 640px) { .grid.kpis.funil-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.kpis.vend-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* tabelas que cabem no quadro (sem rolagem lateral) */
table.tbl.fit { width: 100%; table-layout: fixed; }
table.tbl.fit th, table.tbl.fit td { white-space: normal; overflow-wrap: anywhere; font-size: 12px; padding: 7px 6px; line-height: 1.25; }
table.tbl.fit td.name { font-size: 12.5px; }
.split { display: grid; grid-template-columns: minmax(240px, 2fr) 3fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
table.tbl td.wrap { white-space: normal; max-width: 220px; line-height: 1.3; }
/* cruzamento motivo × etapa (aba Perdas): cabeçalho em duas linhas e células compactas, sem rolagem lateral */
table.tbl.mtx th { white-space: normal; line-height: 1.25; vertical-align: bottom; hyphens: auto; }
table.tbl.mtx td { font-size: 12.5px; padding: 8px 6px; }
table.tbl.mtx td.name { font-size: 12.5px; }
table.tbl.mtx .hint { font-size: 10.5px; }
.kpi.hero .kpi-title, .kpi.hero .v, .kpi.hero .kpi-foot { color: #fff; }
.kpi.hero .kpi-arrow { border-color: #fff; color: var(--green-deep); background: #fff; }
.kpi.hero .delta { background: rgba(255,255,255,.18); color: #fff; }
.kpi.hero .delta.down { background: rgba(255,255,255,.18); color: #ffd6d6; }
.up { color: var(--green-dark); } .down { color: var(--red); } .flat { color: var(--muted); }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: var(--green-dark); }
.badge.mat { background: var(--amber-soft); color: var(--amber); }
.badge.bad { background: var(--red-soft); color: var(--red); }
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.gray { background: var(--line); color: var(--muted); }

.note { margin-top: 16px; padding: 12px 16px; background: var(--green-soft); border-radius: var(--r-md); font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.empty { padding: 30px; text-align: center; color: var(--muted); font-size: 13px; }
.loading, .error { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 14px; }
.error { color: var(--red); }

/* ---- tabelas ---- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; white-space: nowrap; }
/* Todas as tabelas com conteúdo centralizado (pedido do Kaue, 15/09/2026) — inclui a primeira coluna e as marcadas com .l */
table.tbl th { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-2); font-weight: 700; }
table.tbl td { text-align: center; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl th.l, table.tbl td.l, table.tbl th:first-child, table.tbl td:first-child { text-align: center; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr.total td { font-weight: 700; border-top: 1px solid var(--line-2); background: var(--panel); }
table.tbl tr.clickable { cursor: pointer; }
table.tbl tr.clickable:hover td { background: var(--green-soft); }
table.tbl tr.selected td { background: var(--green-soft); }
/* Linhas flutuantes em TODAS as tabelas (estilo 1 escolhido pelo Kaue em 16/09) — exceto Ranking (layout próprio) e Configurações (campos) */
table.tbl:not(.rk):not(.cfg-table) { border-collapse: separate; border-spacing: 0 6px; margin-top: -6px; }
table.tbl:not(.rk):not(.cfg-table) th { border-bottom: none; padding: 6px 10px 0; }
table.tbl:not(.rk):not(.cfg-table) td { border-bottom: none; background: var(--panel); transition: background .15s; }
table.tbl:not(.rk):not(.cfg-table) tr:not(.ph) td:first-child { border-radius: 12px 0 0 12px; }
table.tbl:not(.rk):not(.cfg-table) tr:not(.ph) td:last-child { border-radius: 0 12px 12px 0; }
table.tbl:not(.rk):not(.cfg-table) tr:not(.ph):hover td { background: var(--green-soft); }
table.tbl:not(.rk):not(.cfg-table) tr.ph td { background: transparent; }
table.tbl:not(.rk):not(.cfg-table) tr.total td { background: transparent; border-top: 1px solid var(--line-2); border-radius: 0; }
table.tbl:not(.rk):not(.cfg-table) tr.total:hover td { background: transparent; }
table.tbl:not(.rk):not(.cfg-table) tr.selected td { background: var(--green-soft); }
table.tbl:not(.rk):not(.cfg-table) tr.selected td:first-child { box-shadow: inset 4px 0 0 var(--green-dark); }
/* faixas de margem: < 30% vermelho · 30–35% verde · > 35% azul */
.mct { font-weight: 800; } .mct.low { color: var(--red); } .mct.ok { color: var(--green-dark); } .mct.high { color: var(--blue); }
.mcp.high { background: var(--blue-soft); color: var(--blue); }
.kpi.mc-low .v { color: var(--red) !important; } .kpi.mc-ok .v { color: var(--green-dark) !important; } .kpi.mc-high .v { color: var(--blue) !important; }
.vend-meta .vm-s.low { background: rgba(201, 79, 79, .55); } .vend-meta .vm-s.high { background: rgba(59, 111, 182, .65); }
table.tbl .pos { font-weight: 800; color: var(--muted); width: 30px; }
table.tbl .conv { font-weight: 700; color: var(--green-dark); }
table.tbl .score { font-weight: 800; font-size: 15px; }
table.tbl .muted { color: var(--muted); }
table.tbl .name { font-weight: 700; }
table.tbl .pctbar { display: inline-block; height: 6px; border-radius: 3px; background: var(--green); vertical-align: middle; margin-left: 8px; }

/* ---- barras horizontais ---- */
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-weight: 600; }
.hbar .track { height: 10px; background: var(--panel); border-radius: 999px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--green); border-radius: 999px; }
.hbar .fill.red { background: var(--red); }
.hbar .fill.amber { background: var(--amber); }
.hbar .fill.blue { background: var(--blue); }
.hbar .val { font-weight: 700; white-space: nowrap; min-width: 60px; text-align: right; }
.hbar .val small { color: var(--muted); font-weight: 500; }

/* ---- funil ---- */
.funcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
.funcard { background: var(--card); border-radius: var(--r-lg); padding: 16px 18px; cursor: pointer; box-shadow: var(--shadow); border: 1.5px solid transparent; }
.funcard:hover { border-color: var(--green-light); }
.funcard.active { border-color: var(--green-dark); }
.funcard .fname { font-size: 12px; font-weight: 800; letter-spacing: .4px; margin-bottom: 8px; }
.funcard .frate { font-size: 26px; font-weight: 800; color: var(--green-dark); letter-spacing: -.8px; }
.funcard .fdetail { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stage-row { display: flex; align-items: center; gap: 12px; }
.stage-label { width: 210px; flex-shrink: 0; font-size: 12.5px; font-weight: 700; text-align: right; }
.stage-label .stuck { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.bar-track { flex: 1; }
.bar { height: 30px; background: linear-gradient(90deg, var(--green-dark), var(--green)); border-radius: 999px; min-width: 52px; display: flex; align-items: center; padding: 0 12px; color: #fff; font-size: 13px; font-weight: 800; }
.bar.won { background: linear-gradient(90deg, var(--green-deep), var(--green-dark)); }
.stage-pcts { width: 140px; flex-shrink: 0; font-size: 12px; color: var(--muted); }
.stage-pcts b { color: var(--ink); }
.conv-arrow { margin: 3px 0 3px 222px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.conv-arrow .pct { font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); }
.conv-arrow .pct.low { background: var(--red-soft); color: var(--red); }
.conv-arrow .pct.mid { background: var(--amber-soft); color: var(--amber); }
.matline { margin: -8px 0 14px; }
.breakdown { margin: -4px 0 18px; font-size: 13px; color: var(--muted); }
.breakdown b { color: var(--ink); }

/* ---- gráfico SVG ---- */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-size: 11px; fill: var(--muted); font-weight: 600; }
.chart .bar-r { fill: var(--green-dark); }
.chart .bar-r:nth-of-type(even) { fill: var(--green); }
.chart .bar-hatch { fill: url(#hatch); }
.chart .bar-r.bar-red { fill: var(--red); }
.chart .bar-r.bar-blue { fill: var(--blue); }
/* barras com degradê e topo arredondado + linha suave */
.chart.bl { overflow: visible; }
.chart.bl .grid { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 6; stroke-linecap: round; }
.chart.bl .base { stroke: var(--line-2); stroke-width: 1.2; }
.chart.bl .bar-r { transition: opacity .15s; }
.chart.bl .bar-r:hover { opacity: .8; }
.chart.bl .bar-now { fill-opacity: .45; stroke-width: 1.4; stroke-dasharray: 4 3; }
.chart.bl .bar-zero { fill: var(--line-2); }
.chart.bl text.now { fill: var(--green-dark); font-weight: 800; }
.chart.bl .line { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart.bl .line.meta { stroke: var(--green); stroke-dasharray: 6 5; }
.chart.bl .dot { fill: var(--ink); stroke: var(--card); stroke-width: 2; }
.chart.bl .dot.meta { fill: var(--green); }
/* colunas em HTML (pipeline por etapa) */
.colchart { display: flex; gap: 18px; align-items: stretch; height: 320px; padding: 10px 8px 0; }
.colchart .col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.colchart .col-n { font-weight: 800; font-size: 18px; color: var(--ink); }
.colchart .col-track { flex: 1; width: 100%; max-width: 96px; display: flex; align-items: flex-end; margin: 6px 0 10px; }
.colchart .col-bar { width: 100%; border-radius: 12px 12px 6px 6px; transition: height .3s; }
.colchart .col-l { font-size: 12.5px; font-weight: 700; color: var(--ink-2); line-height: 1.25; overflow-wrap: break-word; hyphens: auto; min-height: 32px; }
.colchart .col-s { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .3px; }
.colchart .col-v { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-top: 3px; }
.card.pipe { min-height: 470px; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.chart .dot { fill: var(--ink); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 600; }
/* gráfico de linhas múltiplas (leads por fonte) */
.ml-wrap { position: relative; background: var(--panel); border-radius: 18px; padding: 14px 10px 6px; }
.chart.ml { overflow: visible; }
.chart.ml .grid { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 6; stroke-linecap: round; opacity: .9; }
.chart.ml .base { stroke: var(--line-2); stroke-width: 1.2; }
.chart.ml text.now { fill: var(--green-dark); font-weight: 800; }
.chart.ml .ml-now { fill: var(--green-soft); opacity: .55; }
.chart.ml .ml-band { fill: var(--card); opacity: .9; }
.chart.ml .ml-area { transition: opacity .2s; }
.chart.ml .ml-line { fill: none; stroke-width: 2.8; stroke-linejoin: round; stroke-linecap: round; transition: opacity .2s, stroke-width .2s; }
.chart.ml .ml-dot { stroke: var(--card); stroke-width: 2; transition: opacity .2s; }
.chart.ml .ml-dot.on { stroke-width: 2.5; filter: drop-shadow(0 2px 4px rgba(16, 25, 19, .25)); }
.chart.ml.focus [data-s]:not(.hl) { opacity: .1; }
.chart.ml.focus .ml-line.hl { stroke-width: 4; }
@media (max-width: 700px) { .ml-wrap { overflow-x: auto; } .chart.ml { min-width: 640px; } } /* celular: o gráfico rola de lado em vez de encolher */
.ml-tip { position: fixed; top: 0; left: 0; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px -10px rgba(16, 25, 19, .32), 0 2px 6px rgba(16, 25, 19, .06); padding: 10px 12px; font-size: 12.5px; min-width: 200px; max-width: 320px; z-index: 60; }
.ml-tip .t-head { display: flex; justify-content: space-between; gap: 14px; font-weight: 800; font-size: 13px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.ml-tip .t-total { color: var(--green-dark); }
.ml-tip .t-row { display: flex; align-items: center; gap: 8px; padding: 2.5px 0; color: var(--ink-2); font-weight: 600; }
.ml-tip .t-row i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ml-tip .t-row b { margin-left: auto; font-weight: 800; color: var(--ink); }
.legend.lg-chips { flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lg-chip { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: border-color .15s, opacity .15s; }
.lg-chip:hover { border-color: var(--green-dark); }
.lg-chip i { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.lg-chip b { color: var(--muted); font-weight: 700; }
.lg-chip.off { opacity: .4; text-decoration: line-through; }
.lg-chip.reset { border-color: var(--green-dark); color: var(--green-dark); }
.fontes-tab { margin-top: 14px; }
.fontes-tab summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--green-dark); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.fontes-tab summary::before { content: '▸'; font-size: 12px; transition: transform .15s; }
.fontes-tab[open] summary::before { transform: rotate(90deg); }
.fontes-tab summary::-webkit-details-marker { display: none; }
.fontes-tab .table-wrap { margin-top: 10px; }
table.tbl.mini th, table.tbl.mini td { font-size: 12px; padding: 7px 8px; }
table.tbl.mini td.muted { color: var(--line-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* ---- pódio ---- */
/* ===== Ranking de Vendas — réplica da "Foto modelo" (1672×941; sidebar 205, conteúdo 1467). 1u = 1px na referência ===== */
/* escala: cabe na largura E na altura da janela (referência 1467×941 de conteúdo), sem rolagem */
body.rk-mode { --u: clamp(.5px, min(calc((100vw - 250px) / 1467), calc(100vh / 941)), 1.25px); } /* sidebar mantém os 250px das outras abas */
.rk2-scene, .rk2-scene button, .rk2-scene input, .rk2-scene select { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } /* mesma fonte da Foto modelo (só no conteúdo; a sidebar é igual às outras abas) */
body.rk-mode .topbar, body.rk-mode .panel-head { display: none; }
body.rk-mode .main { padding: 0; gap: 0; }
body.rk-mode .panel { background: none; padding: 0; border-radius: 0; }
.rk2-scene { position: relative; min-height: calc(941 * var(--u)); padding: 0; background-color: #e6e1d8; background-position: right top; background-size: calc(100% + 250px) auto; background-repeat: no-repeat; }
.rk2-scene.nobg { background-image: linear-gradient(112deg, #f5f9f6 0%, #eaf3ed 34%, #e8eff5 68%, #dde8f1 100%); }
.rk2-hero { position: relative; height: calc(520 * var(--u)); }
.rk2-hero > * { position: absolute; }
.rk2-title { left: calc(45 * var(--u)); top: calc(50 * var(--u)); }
.rk2-title .eyebrow { font-size: calc(13 * var(--u)); font-weight: 700; letter-spacing: calc(5 * var(--u)); text-transform: uppercase; color: #3f4a44; }
.rk2-title h1 { font-size: calc(48 * var(--u)); font-weight: 800; letter-spacing: calc(-1.4 * var(--u)); line-height: 1.05; margin: calc(4 * var(--u)) 0 calc(7 * var(--u)); color: #101913; white-space: nowrap; }
.rk2-title p { font-size: calc(20 * var(--u)); color: #5c7f6b; line-height: 1.25; }
.rk2-period { left: calc(795 * var(--u)); top: calc(70 * var(--u)); width: calc(240 * var(--u)); height: calc(46 * var(--u)); display: inline-flex; align-items: center; gap: calc(12 * var(--u)); padding: 0 calc(16 * var(--u)) 0 calc(20 * var(--u)); background: #fff; border-radius: calc(12 * var(--u)); box-shadow: 0 10px 30px -14px rgba(16, 40, 28, .4); color: #101913; box-sizing: border-box; overflow: hidden; }
.rk2-period svg { width: calc(22 * var(--u)); height: calc(22 * var(--u)); flex-shrink: 0; }
.rk2-period select { flex: 1; min-width: 0; width: 100%; appearance: none; -webkit-appearance: none; background: none; border: none; font: inherit; font-size: calc(15 * var(--u)); font-weight: 600; color: #101913; outline: none; cursor: pointer; text-overflow: ellipsis; }
.rk2-period select:disabled { color: #101913; opacity: 1; cursor: default; -webkit-text-fill-color: #101913; }
.rk2-period.locked { cursor: default; }
.rk2-leader { left: calc(45 * var(--u)); top: calc(220 * var(--u)); z-index: 3; }
.rk2-leader .lbl { color: #2a9152; font-size: calc(18 * var(--u)); font-weight: 600; line-height: 1.2; }
.rk2-leader .nm { font-size: calc(28 * var(--u)); font-weight: 800; letter-spacing: calc(-.5 * var(--u)); line-height: 1.15; color: #101913; white-space: nowrap; margin-top: calc(6 * var(--u)); }
.rk2-leader .ct { font-size: calc(20 * var(--u)); color: #3f4a44; margin-top: calc(2 * var(--u)); line-height: 1.2; }
.rk2-leader .quote { font-size: calc(19 * var(--u)); color: #5f6b64; margin-top: calc(18 * var(--u)); line-height: 1.3; }
.rk2-leader .stats { position: absolute; left: calc(-17 * var(--u)); top: calc(182 * var(--u)); width: calc(276 * var(--u)); height: calc(70 * var(--u)); display: grid; grid-template-columns: 41% 33% 26%; align-items: center; background: rgba(255, 255, 255, .92); border-radius: calc(12 * var(--u)); box-shadow: 0 12px 30px -16px rgba(16, 40, 28, .4); }
.rk2-leader .stats > div, .rk2-card .stats > div { height: calc(46 * var(--u)); display: flex; flex-direction: column; justify-content: center; }
.rk2-leader .stats .c1, .rk2-card .stats .c1 { padding-left: calc(14 * var(--u)); }
.rk2-leader .stats .c2, .rk2-leader .stats .c3, .rk2-card .stats .c2, .rk2-card .stats .c3 { text-align: center; border-left: 1px solid #e4e9e5; }
.rk2-leader .stats b, .rk2-card .stats b { display: block; font-size: calc(19 * var(--u)); font-weight: 800; letter-spacing: calc(-.3 * var(--u)); white-space: nowrap; color: #101913; line-height: 1.2; }
.rk2-leader .stats span, .rk2-card .stats span { display: block; font-size: calc(13 * var(--u)); color: #6b776f; margin-top: calc(2 * var(--u)); white-space: nowrap; line-height: 1.2; }
/* Moldura do 1º lugar = "Círculo Foto 2.png" do Kaue (louros de ouro, 1254px), sem os fundos: circulo-foto-2-alpha.png é o original com o
   branco externo e o disco cinza interno convertidos em transparência (sem reamostrar). Geometria medida: miolo centro (621,648) r=336;
   conteúdo x 37-1223, y 18-1238 ("1º" no topo, estrelas embaixo). Escala .285 → 357.4u; miolo em (480,325)u; foto 188u. */
.rk2-ring-wrap { left: calc(303 * var(--u)); top: calc(140.3 * var(--u)); width: calc(357.4 * var(--u)); height: calc(357.4 * var(--u)); z-index: 1; }
.rk2-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.rk2-photo { position: absolute; left: calc(177 * var(--u)); top: calc(184.7 * var(--u)); width: calc(188 * var(--u)); height: calc(188 * var(--u)); transform: translate(-50%, -50%); border-radius: 50%; }
.rk2-cards { left: calc(660 * var(--u)); top: calc(155 * var(--u)); display: flex; flex-direction: column; gap: calc(20 * var(--u)); }
.rk2-card { position: relative; width: calc(480 * var(--u)); height: calc(140 * var(--u)); background: rgba(255, 255, 255, .97); border-radius: calc(16 * var(--u)); box-shadow: 0 18px 40px -20px rgba(16, 40, 28, .4); }
.rk2-card.vazio { background: rgba(255, 255, 255, .5); box-shadow: none; }
.rk2-card .num { position: absolute; left: calc(25 * var(--u)); top: calc(17 * var(--u)); font-size: calc(44 * var(--u)); font-weight: 800; letter-spacing: calc(-1.5 * var(--u)); line-height: 1; }
.rk2-card.p2 .num { color: #3f4a44; } .rk2-card.p3 .num { color: #b5601a; }
.rk2-card .rk2-av.md { position: absolute; left: calc(85 * var(--u)); top: calc(2 * var(--u)); }
.rk2-card .who { position: absolute; left: calc(185 * var(--u)); top: calc(15 * var(--u)); right: calc(16 * var(--u)); }
.rk2-card .nm { font-size: calc(20 * var(--u)); font-weight: 800; letter-spacing: calc(-.3 * var(--u)); color: #101913; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.rk2-card .ct { font-size: calc(17 * var(--u)); color: #5f6b64; margin-top: calc(3 * var(--u)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.rk2-card .stats { position: absolute; left: calc(80 * var(--u)); top: calc(81 * var(--u)); right: 0; display: grid; grid-template-columns: calc(123 * var(--u)) calc(137 * var(--u)) 1fr; }
.rk2-card .stats .c1 { padding-left: 0; }
.rk2-card .stats .c3 { padding-right: calc(10 * var(--u)); }
.rk2-card .stats .c3 .pill { display: inline-block; min-width: calc(72 * var(--u)); box-sizing: border-box; height: calc(30 * var(--u)); line-height: calc(30 * var(--u)); background: #e3f3e9; color: #1b5c3b; font-size: calc(18 * var(--u)); padding: 0 calc(12 * var(--u)); border-radius: calc(10 * var(--u)); }
/* avatares: mesma medida em cada grupo (anel 250u, cards 76u, tabela 36u); com foto em public/img/vendedores */
.rk2-av { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(160deg, var(--green-dark), var(--green-deep)); color: #fff; font-weight: 800; overflow: hidden; flex-shrink: 0; }
.rk2-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.rk2-av.big { width: 100%; height: 100%; font-size: calc(66 * var(--u)); letter-spacing: calc(-2 * var(--u)); }
.rk2-av.md { width: calc(76 * var(--u)); height: calc(76 * var(--u)); font-size: calc(22 * var(--u)); }
.rk2-av.sm { width: calc(36 * var(--u)); height: calc(36 * var(--u)); font-size: calc(12 * var(--u)); }
/* Ranking completo: card 1425×385 em (225,515) na referência */
.rk2-table { position: relative; z-index: 2; margin: calc(-5 * var(--u)) calc(22 * var(--u)) 0 calc(20 * var(--u)); min-height: calc(385 * var(--u)); box-sizing: border-box; background: rgba(255, 255, 255, .96); border-radius: calc(20 * var(--u)); padding: calc(23 * var(--u)) calc(25 * var(--u)) calc(12 * var(--u)); box-shadow: 0 24px 60px -26px rgba(16, 40, 28, .45); }
.rk2-table .head { position: relative; height: calc(62 * var(--u)); }
.rk2-table .head h2 { font-size: calc(24 * var(--u)); font-weight: 800; letter-spacing: calc(-.5 * var(--u)); color: #101913; line-height: 1.2; }
.rk2-table .head .sub { font-size: calc(15 * var(--u)); color: #6b776f; margin-top: calc(6 * var(--u)); }
.rk2-tools { position: absolute; right: calc(3 * var(--u)); top: calc(3 * var(--u)); display: flex; align-items: center; gap: calc(10 * var(--u)); }
.rk2-test { border: 1px solid #cfe6d8; background: #eef8f2; color: #1f7a4b; font: inherit; font-size: calc(12.5 * var(--u)); font-weight: 700; padding: 0 calc(12 * var(--u)); height: calc(40 * var(--u)); border-radius: calc(10 * var(--u)); cursor: pointer; white-space: nowrap; }
.rk2-test:hover { background: #e0f3e8; }
.rk2-search { position: static; display: flex; align-items: center; gap: calc(12 * var(--u)); border: 1px solid #dfe5e1; border-radius: calc(10 * var(--u)); padding: 0 calc(14 * var(--u)); height: calc(40 * var(--u)); width: calc(282 * var(--u)); background: #fff; color: #7b877f; box-sizing: border-box; }
.rk2-search svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
.rk2-search input { border: none; background: none; font: inherit; font-size: calc(14 * var(--u)); outline: none; width: 100%; color: #101913; }
.rk2-table .table-wrap { margin-top: calc(10 * var(--u)); }
table.tbl.rk { table-layout: fixed; width: 100%; font-size: calc(15 * var(--u)); color: #101913; }
table.tbl.rk col.w-pos { width: calc(80 * var(--u)); } table.tbl.rk col.w-vend { width: calc(174 * var(--u)); } table.tbl.rk col.w-cart { width: calc(128 * var(--u)); } table.tbl.rk col.w-valor { width: calc(110 * var(--u)); } table.tbl.rk col.w-n { width: calc(81 * var(--u)); } table.tbl.rk col.w-marg { width: calc(120 * var(--u)); } table.tbl.rk col.w-meta { width: calc(115 * var(--u)); } table.tbl.rk col.w-ating { width: calc(183 * var(--u)); } table.tbl.rk col.w-ticket { width: calc(100 * var(--u)); } table.tbl.rk col.w-score { width: calc(130 * var(--u)); }
table.tbl.rk th:nth-child(10), table.tbl.rk td:nth-child(10), table.tbl.rk th:nth-child(11), table.tbl.rk td:nth-child(11) { text-align: center; }
table.tbl.rk th:nth-child(11), table.tbl.rk td:nth-child(11) { padding-right: calc(30 * var(--u)); }
table.tbl.rk th, table.tbl.rk td, table.tbl.rk td.wrap { text-align: left; }
table.tbl.rk th { font-size: calc(11.5 * var(--u)); letter-spacing: calc(.5 * var(--u)); color: #6b776f; padding: 0 calc(10 * var(--u)) 0 0; height: calc(34 * var(--u)); border-bottom: 1px solid #e4e9e5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.tbl.rk th:first-child { padding-left: calc(8 * var(--u)); }
table.tbl.rk td:first-child { padding-left: calc(4 * var(--u)); overflow: visible; }
table.tbl.rk td { padding: 0 calc(8 * var(--u)) 0 0; height: calc(45.5 * var(--u)); border-bottom: 1px solid #edf1ee; box-sizing: border-box; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.tbl.rk tr:last-child td { border-bottom: none; }
table.tbl.rk td.wrap { font-size: calc(12 * var(--u)); color: #6b776f; white-space: nowrap; line-height: 1.15; }
table.tbl.rk td.strong { font-weight: 600; }
table.tbl.rk td.muted { color: #6b776f; }
.rk2-pos { display: inline-flex; align-items: center; justify-content: center; width: calc(32 * var(--u)); height: calc(32 * var(--u)); border-radius: calc(8 * var(--u)); font-weight: 800; font-size: calc(15 * var(--u)); color: #101913; }
.rk2-posw { display: inline-flex; align-items: center; gap: calc(6 * var(--u)); }
/* setas de tendência (posição de hoje × ontem): selos coloridos, bem visíveis */
.trend { display: inline-flex; align-items: center; justify-content: center; width: calc(22 * var(--u)); height: calc(22 * var(--u)); border-radius: 50%; flex-shrink: 0; }
.trend svg { width: calc(14 * var(--u)); height: calc(14 * var(--u)); }
.trend.up { background: #1f9d5a; color: #fff; box-shadow: 0 3px 8px rgba(31, 157, 90, .45); animation: trend-pop .6s ease-out; }
.trend.down { background: #e0483a; color: #fff; box-shadow: 0 3px 8px rgba(224, 72, 58, .45); animation: trend-pop .6s ease-out; }
.trend.same { background: #e6ebe8; color: #8a978f; }
@keyframes trend-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.rk2-pos.p1 { background: #f6d34a; color: #3b2f00; } .rk2-pos.p2 { background: #e6e9ec; color: #333; } .rk2-pos.p3 { background: #f7d3b3; color: #b5601a; }
.rk-who { display: inline-flex; align-items: center; gap: calc(8 * var(--u)); font-weight: 600; font-size: calc(12 * var(--u)); letter-spacing: calc(-.2 * var(--u)); white-space: nowrap; max-width: 100%; }
.rk-who > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.ating { display: inline-block; width: calc(130 * var(--u)); }
.ating b { display: block; font-size: calc(14 * var(--u)); color: #1f7a4b; font-weight: 700; line-height: 1.2; }
.ating-bar { height: calc(8 * var(--u)); width: calc(130 * var(--u)); border-radius: calc(4 * var(--u)); background: #e4e9e5; margin-top: calc(4 * var(--u)); overflow: hidden; }
.ating-bar i { display: block; height: 100%; border-radius: calc(4 * var(--u)); background: linear-gradient(90deg, #6ccf96, #1f7a4b); }
.score-pill { display: inline-block; width: calc(88 * var(--u)); height: calc(30 * var(--u)); line-height: calc(30 * var(--u)); text-align: center; border-radius: calc(10 * var(--u)); font-weight: 700; font-size: calc(15 * var(--u)); background: #eceff1; color: #101913; box-sizing: border-box; }
.score-pill.top { background: #e3f3e9; color: #1b5c3b; }
.seq-pill { display: inline-block; width: calc(100 * var(--u)); height: calc(30 * var(--u)); line-height: calc(30 * var(--u)); text-align: center; border-radius: calc(10 * var(--u)); font-weight: 600; font-size: calc(14 * var(--u)); background: #e3f3e9; color: #1b5c3b; box-sizing: border-box; }
.seq-pill.off { background: #eceff1; color: #7b877f; }
.rk2-comp { margin-top: calc(6 * var(--u)); border-top: 1px solid #edf1ee; padding-top: calc(6 * var(--u)); }
.rk2-comp summary { cursor: pointer; font-size: calc(12 * var(--u)); font-weight: 700; color: var(--green-dark); }
.rk2-comp table.tbl.rk { table-layout: auto; }
.rk2-comp .score-pill { width: auto; padding: 0 12px; }
/* rodapé da sidebar: slogan */
.side-slogan { margin-top: auto; display: flex; flex-direction: column; padding: 0 10px clamp(8px, 1.5vh, 16px); font-size: clamp(9.5px, 1.15vh, 11px); font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: #3f4a44; line-height: 1.6; flex-shrink: 0; }
.side-slogan svg { color: var(--green); width: 26px; height: 26px; }
.side-slogan .ul { display: block; width: 34px; height: 3px; background: var(--green); margin-top: clamp(4px, .8vh, 8px); border-radius: 2px; }
@media (max-height: 760px) { .side-card .sc-sub { display: none; } }
@media (max-height: 660px) { .side-slogan { display: none; } }
.side-card { margin-top: 0; }
[data-theme="dark"] .rk2-scene.nobg { background-image: linear-gradient(112deg, #16231b 0%, #132019 40%, #101a21 100%); }
[data-theme="dark"] .rk2-table { background: rgba(23, 31, 26, .95); }
[data-theme="dark"] .rk2-table .head h2, [data-theme="dark"] table.tbl.rk, [data-theme="dark"] .rk2-pos { color: var(--ink); }
[data-theme="dark"] table.tbl.rk td { border-color: var(--line); }
.select:disabled { opacity: .45; cursor: not-allowed; }

/* ---- formulários ---- */
.form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.field input, .field select { background: var(--panel); border: 1.5px solid transparent; border-radius: 12px; padding: 9px 12px; font-size: 13px; color: var(--ink); outline: none; min-width: 160px; font-weight: 600; }
.field input:focus, .field select:focus { border-color: var(--green-dark); }
.field input.num { min-width: 80px; width: 90px; }
.cfg-table input[type="number"] { width: 70px; background: var(--panel); border: 1.5px solid transparent; border-radius: 8px; padding: 5px 6px; text-align: right; font-weight: 600; }
.cfg-table select { background: var(--panel); border: 1.5px solid transparent; border-radius: 8px; padding: 5px 6px; font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--panel); border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; color: var(--muted); font-weight: 600; }
.chip.on { background: var(--red-soft); color: var(--red); }

/* ---- premiação ---- */
.coins { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 8px; }
.coin { background: var(--panel); border-radius: var(--r-md); padding: 16px; }
.coin .n { font-size: 30px; font-weight: 800; color: var(--green-dark); letter-spacing: -1px; }
.coin .n small { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.coin .nm { font-size: 12.5px; font-weight: 700; margin-top: 2px; }
.achv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.achv:last-child { border-bottom: none; }
.achv .t { font-weight: 700; font-size: 13px; }
.achv .e { font-size: 12px; color: var(--muted); }
.modal-bg { position: fixed; inset: 0; background: rgba(10, 16, 12, .55); display: flex; align-items: center; justify-content: center; z-index: 50; backdrop-filter: blur(3px); }
.modal { background: var(--card); border-radius: var(--r-xl); padding: 26px; width: min(560px, 94vw); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h2 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.modal .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.wheel-wrap { position: relative; width: 320px; height: 320px; margin: 10px auto; }
.wheel { width: 100%; height: 100%; transition: transform 5.2s cubic-bezier(.12,.75,.16,1); transform-origin: 50% 50%; }
.pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--ink); z-index: 2; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.wheel-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: var(--card); border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; }
.result { text-align: center; padding: 14px; border-radius: var(--r-md); background: var(--green-soft); margin-top: 8px; }
.result .r1 { font-size: 12px; color: var(--muted); }
.result .r2 { font-size: 20px; font-weight: 800; color: var(--green-dark); }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px; }
  .logo { padding: 0 10px 0 0; }
  .menu-label, .side-card { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-item { padding: 8px 10px; font-size: 13px; }
  .nav-item.active::before { display: none; }
  .nav-item.active { background: var(--green-soft); }
  .main { padding: 12px; }
  .panel { padding: 18px; }
  .panel-head h1 { font-size: 24px; }
  .stage-label { width: 110px; font-size: 11px; }
  .conv-arrow { margin-left: 122px; }
  .stage-pcts { width: 90px; font-size: 11px; }
  .grid.two { grid-template-columns: 1fr; }
}

/* ---- tabela do plano de mix: cabe sem rolagem, colunas em blocos ---- */
table.tbl.mix { font-size: 12.5px; table-layout: auto; }
table.tbl.mix th { white-space: normal; line-height: 1.15; padding: 7px 8px; vertical-align: bottom; font-size: 10.5px; }
table.tbl.mix td { padding: 10px 8px; }
table.tbl.mix td .hint { font-size: 10px; line-height: 1.2; }
table.tbl.mix tr.grp th { text-align: center; font-size: 10px; letter-spacing: .7px; color: var(--ink-2); background: var(--panel); border-bottom: none; padding: 5px 8px; border-radius: 8px 8px 0 0; }
table.tbl.mix tr.grp th.l { background: none; }
table.tbl.mix th.gs, table.tbl.mix td.gs { border-left: 2px solid var(--line-2); }
table.tbl.mix tr.grp th.gs { border-left: 3px solid var(--card); }
table.tbl.mix th, table.tbl.mix td, table.tbl.mix th.l, table.tbl.mix td.l { text-align: center; }
table.tbl.mix td.l.name { white-space: nowrap; }

/* ---- meta ---- */
.progress { position: relative; height: 16px; background: var(--line); border-radius: 999px; margin: 8px 0 6px; }
.progress .fill { height: 100%; border-radius: 999px; background: var(--green-dark); }
.progress .fill.behind { background: var(--amber); }
.progress .marker { position: absolute; top: -5px; width: 3px; height: 26px; background: var(--ink); border-radius: 2px; transform: translateX(-50%); }
.progress-legend { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.meta-in { width: 110px; background: var(--panel); border: 1.5px solid transparent; border-radius: 8px; padding: 5px 8px; text-align: right; font-weight: 700; font-size: 13px; color: var(--ink); }
.meta-in:focus { border-color: var(--green-dark); outline: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.chips.filters-q .chip.on { background: var(--green-soft); color: var(--green-dark); }
.issue { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.issue:last-child { border-bottom: none; }
.issue a { color: var(--ink); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.issue a:hover { color: var(--green-dark); text-decoration: underline; }
.issue .e { font-size: 12px; color: var(--muted); }
.issue .tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* ---- login ---- */
.login-bg { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 60; }
.login { background: var(--card); border-radius: var(--r-xl); padding: 34px 36px; width: min(380px, 92vw); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.login .logo { padding: 0 0 8px; }
.login h2 { font-size: 20px; font-weight: 800; }
.login .sub { font-size: 13px; color: var(--muted); margin-top: -8px; margin-bottom: 4px; }
.login .field input { min-width: 0; width: 100%; }
.login .btn { justify-content: center; margin-top: 6px; }

/* Configurações em abas + logotipo da empresa */
.cfg-tabs { margin-bottom: 16px; }
.cfg-tabs .chip { font-size: 13px; padding: 8px 16px; border: none; font-family: inherit; }
section[data-cfg][hidden] { display: none !important; }
.cfg-save { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.logo-img { display: block; height: 40px; max-width: 190px; object-fit: contain; }
.login .logo-img { height: 48px; max-width: 280px; margin: 0 auto 6px; }
.logo-preview { display: inline-flex; align-items: center; justify-content: center; min-width: 200px; min-height: 64px; padding: 14px 18px; border-radius: 12px; background: var(--panel); border: 1px dashed var(--line-2); }
.logo-preview img { max-height: 80px; max-width: 320px; object-fit: contain; }

.cfg-tabs .chip.on { background: var(--green-soft); color: var(--green-dark); }

.cfg-meses .chip { border: none; font-family: inherit; }
.cfg-meses .chip.filled { color: var(--green-dark); }
.cfg-meses .chip.on { background: var(--green-soft); color: var(--green-dark); }

/* Ultrapassagem no Ranking Completo: linha de quem subiu passa por cima, com destaque verde e rastro de velocidade */
#rk-table tr.rk-over { position: relative; z-index: 3; }
#rk-table tr.rk-passed { position: relative; z-index: 1; }
#rk-table tr.rk-over td { background: linear-gradient(90deg, rgba(47, 208, 127, .38), rgba(47, 208, 127, .08) 60%, transparent); box-shadow: 0 8px 22px -10px rgba(31, 122, 75, .55); animation: rk-over-glow 1.6s ease-out; }
#rk-table tr.rk-passed td { background: rgba(224, 72, 58, .07); }
#rk-table tr.rk-over td:first-child { overflow: visible; }
#rk-table tr.rk-over .rk2-posw::after { content: ''; position: absolute; right: 100%; top: 50%; width: calc(34 * var(--u)); height: calc(14 * var(--u)); margin-right: calc(4 * var(--u)); transform: translateY(-50%); background: repeating-linear-gradient(180deg, #2fd07f 0 2px, transparent 2px 5px); opacity: 0; animation: rk-speed 1.4s ease-out; border-radius: 2px; }
#rk-table tr.rk-over .rk2-posw { position: relative; }
@keyframes rk-over-glow { 0% { filter: brightness(1.15); } 100% { filter: brightness(1); } }
@keyframes rk-speed { 0% { opacity: 0; transform: translate(6px, -50%) scaleX(.4); } 25% { opacity: .9; transform: translate(0, -50%) scaleX(1.1); } 100% { opacity: 0; transform: translate(-14px, -50%) scaleX(1.4); } }

/* chegada (opção 7): preenchimento verde sólido que varre a linha da esquerda para a direita, cobrindo tudo; mensagem em branco por cima */
.rk-fill { position: absolute; z-index: 5; background: #1f9d5a; transform-origin: left center; pointer-events: none; }
.rk-msg { position: absolute; z-index: 6; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: calc(20 * var(--u)); letter-spacing: calc(.3 * var(--u)); text-shadow: 0 2px 8px rgba(0, 0, 0, .25); pointer-events: none; }
.rk-msg .rk-ico { display: inline-block; margin-right: calc(10 * var(--u)); font-size: calc(24 * var(--u)); line-height: 1; text-shadow: none; animation: rk-rocket 1.1s ease-in-out infinite; }
@keyframes rk-rocket { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(3px, -5px) rotate(-6deg); } }

/* aba Vendedores: seletor, cabeçalho, rosca e insights */
.vchips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.vchip { display: inline-flex; align-items: center; gap: 9px; border: 1.5px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 4px 14px 4px 4px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background .15s; }
.vchip:hover { border-color: var(--green-dark); }
.vchip.on { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.vchip-av { width: 32px; height: 32px; font-size: 11px; }
.vend-av { width: 64px; height: 64px; font-size: 20px; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--green-light); }
.vend-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.vend-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; line-height: 1.1; }
.vend-head .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.vend-metas { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.vend-meta { display: flex; align-items: center; gap: 12px; background: var(--green-dark); color: #fff; border-radius: 18px; padding: 12px 20px; box-shadow: 0 8px 20px -8px rgba(27, 92, 59, .6); }
.vend-meta.margem { background: var(--green-deep); }
.vend-meta .vm-s { display: inline-block; margin-left: 10px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .18); vertical-align: middle; }
.vend-meta .vm-s.bad { background: rgba(201, 79, 79, .55); }
.vend-meta .vm-l { font-size: 12px; opacity: .85; font-weight: 600; }
.vend-meta .vm-v { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut svg { width: 190px; height: 190px; flex-shrink: 0; }
.donut .donut-arc { fill: none; stroke-width: 15; }
.donut .donut-v { font-size: 10px; font-weight: 800; fill: var(--ink); }
.donut .donut-l { font-size: 6px; font-weight: 600; fill: var(--muted); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.dl-row { display: grid; grid-template-columns: 11px 1fr auto; column-gap: 9px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dl-row i { width: 11px; height: 11px; border-radius: 50%; }
.dl-row b { font-weight: 800; color: var(--ink); }
.dl-row .dl-name, .dl-row .dl-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dl-row .dl-val { grid-column: 2 / 4; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.etapa-seg { margin-bottom: 14px; } .etapa-seg .seg-btn { padding: 8px 16px; font-size: 13px; }
.tbar { display: block; height: 10px; border-radius: 999px; background: var(--panel); overflow: hidden; }
.tbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-light), var(--green-dark)); }
.rdlink { color: var(--muted); display: inline-flex; }
.rdlink:hover { color: var(--green-dark); }
.legend span { display: inline-flex; align-items: center; }
.insights { display: flex; gap: 16px; align-items: flex-start; background: var(--green-soft); border: 1.5px solid color-mix(in srgb, var(--green) 35%, transparent); border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 16px; color: var(--green-dark); }
.insights .ins-t { font-weight: 800; font-size: 16px; margin-bottom: 4px; color: var(--ink); }
.insights ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.65; }
.vend-cmp { margin-bottom: 16px; }
/* painel dedo-duro */
.card.dedo { border-left: 5px solid var(--amber); }
.card.dedo h2 { display: flex; align-items: center; gap: 8px; }
.card.dedo h2 svg { color: var(--amber); }
.dedo-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dedo-chips .chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.dedo-chips .chip b { color: var(--muted); }
.dedo-chips .chip:hover { border-color: var(--amber); }
.dedo-chips .chip.on { background: var(--amber); border-color: var(--amber); color: #fff; }
.dedo-chips .chip.on b { color: rgba(255, 255, 255, .85); }
.card.dedo .tags { display: inline-flex; flex-wrap: nowrap; gap: 4px; }
/* quadros de tamanho fixo na aba Vendedores */
.vend-seg { margin: 2px 0 16px; }
.seg-btn .seg-n { margin-left: 2px; background: rgba(0, 0, 0, .08); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; }
.seg-btn.on .seg-n { background: rgba(255, 255, 255, .22); }
.card.fx { display: flex; flex-direction: column; }
.card.fx .pager { margin-top: auto; padding-top: 12px; }
.card.fx .pager .hint { min-width: 110px; text-align: center; }
table.tbl.fit.fx tr { height: 40px; } /* toda linha com a mesma altura (com ou sem badge/botão), inclusive as vazias */
table.tbl.fit.fx .btn.sm { padding: 4px 10px; font-size: 11.5px; line-height: 1.2; }
table.tbl.fit.fx .badge { padding: 2px 8px; }
.grid.three .card.fx { height: 412px; overflow: hidden; } /* gráficos da Visão geral: altura fixa, independente de legenda e títulos */
.grid.three .card.fx .note { margin-top: auto; padding: 10px 12px; font-size: 11.5px; line-height: 1.4; } /* a explicação fica encostada no rodapé, sem ser cortada */
.grid.three .card.fx .donut-box { margin-bottom: 8px; }
.grid.three .card.fx .sub { min-height: 32px; }
table.tbl.fit.fx td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.tbl.fit.fx tr.ph td { border-bottom-color: transparent; color: var(--muted); text-align: center; font-style: italic; }
.hbar.ph { visibility: hidden; }
/* listas com visual de linhas arredondadas */
table.tbl.lista { border-collapse: separate; border-spacing: 0 6px; margin-top: -6px; }
table.tbl.lista th { border-bottom: none; font-size: 10.5px; letter-spacing: .8px; padding: 6px 10px 0; }
table.tbl.lista td { border-bottom: none; background: var(--panel); padding: 0 10px; transition: background .15s; }
table.tbl.lista tr:not(.ph) td:first-child { border-radius: 12px 0 0 12px; }
table.tbl.lista tr:not(.ph) td:last-child { border-radius: 0 12px 12px 0; }
table.tbl.lista tr:not(.ph):hover td { background: var(--green-soft); }
table.tbl.lista tr.ph td { background: transparent; }
table.tbl.lista tr.selected td { background: var(--green-soft); }
table.tbl.lista tr.selected td:first-child { box-shadow: inset 4px 0 0 var(--green-dark); }
table.tbl.fit th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.tbl.lista tr.total td { background: transparent; border-top: 1px solid var(--line-2); }
table.tbl.lista td.name { font-weight: 700; }
.ftag { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 13%, var(--card)); color: var(--c); white-space: nowrap; overflow: hidden; }
.ftag i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.ftag em { font-style: normal; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.ftag em::before { content: '·'; margin: 0 5px 0 -1px; color: var(--muted); }
.vcell { position: relative; display: inline-block; min-width: 96px; padding: 3px 8px; border-radius: 8px; overflow: hidden; }
.vcell i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--green) 18%, transparent); border-radius: 8px; }
.vcell b { position: relative; font-weight: 800; }
.st { display: inline-block; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.st.won { background: var(--green-soft); color: var(--green-dark); }
.st.lost { background: var(--red-soft); color: var(--red); }
.st.open { background: var(--amber-soft); color: var(--amber); }
.mcp { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); }
.mcp.low { background: var(--red-soft); color: var(--red); }
.mot { display: inline-block; max-width: 100%; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-2); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.mot.ctrl { border-color: transparent; background: var(--red-soft); color: var(--red); }
.dcell { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ink-2); }
.dcell svg { color: var(--muted); }
.pessoa { display: inline-flex; align-items: center; gap: 10px; }
.tbl-av { width: 30px; height: 30px; font-size: 10px; }
.dedo-chips { height: 80px; overflow: hidden; align-content: flex-start; }
.donut-box { flex: 1; display: flex; align-items: center; }

/* seletor de contagem da aba Funil: quadro com botões segmentados */
.funil-modo { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); border-left: 5px solid var(--green-dark); padding: 18px 22px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.funil-modo .fm-head { display: flex; align-items: center; gap: 12px; color: var(--green-dark); }
.funil-modo .fm-title { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.funil-modo .fm-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.note.nota-lead { background: var(--blue-soft); color: var(--ink-2); border-left: 4px solid var(--blue); }
/* nota solta entre quadros (não dentro de um card): mesmo respiro e cantos dos cards */
.note.solta { margin: 0 0 16px; padding: 16px 20px; border-radius: var(--r-lg); }
.funil-modo .fm-hint { font-size: 13px; color: var(--ink-2); background: var(--green-soft); border-radius: 12px; padding: 10px 14px; max-width: 760px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; background: var(--panel); border: 1.5px solid var(--line-2); border-radius: 999px; align-self: flex-start; }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; border: none; background: transparent; border-radius: 999px; padding: 11px 20px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.seg-btn:hover { background: var(--green-soft); color: var(--green-dark); }
.seg-btn.on { background: var(--green-dark); color: #fff; box-shadow: 0 6px 16px -6px rgba(27, 92, 59, .6); }
.seg-btn.on:hover { background: var(--green-dark); color: #fff; }
@media (max-width: 900px) { .seg { border-radius: 20px; } .seg-btn { border-radius: 14px; width: 100%; justify-content: center; } }


/* ---- comemoração de 1º lugar em tela cheia (camada fixa; não altera o layout da aba Ranking) ---- */
.rk1-cel { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; cursor: pointer; }
/* véu parelho: sem vinheta forte nas bordas, senão os cantos ficam manchados sob os raios */
.rk1-veu { position: absolute; inset: 0; background: rgba(9, 26, 17, .93); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
/* Raios: o elemento ocupa exatamente a tela e quem gira é o ÂNGULO do degradê cônico, não o elemento.
   Antes era um quadrado gigante girando — o navegador não consegue rasterizar uma camada desse tamanho
   e cortava nas bordas. Assim não existe borda de elemento: o degradê é pintado em cada pixel da tela. */
@property --rk1-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
/* o ciclo precisa dividir 360 em partes exatas (aqui 24 x 15deg), senão o último raio fica cortado
   e encosta no primeiro; amarelo e verde ocupam metade do ciclo cada um */
.rk1-raios { position: absolute; inset: 0; background: repeating-conic-gradient(from var(--rk1-ang) at 50% 46%, rgba(233, 185, 73, .17) 0deg 7.5deg, transparent 7.5deg 15deg); animation: rk1-girar 26s linear infinite; }
@keyframes rk1-girar { to { --rk1-ang: 360deg; } }
.rk1-brilho { position: absolute; left: 50%; top: 46%; width: 90vmin; height: 90vmin; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(143, 211, 176, .40) 0%, rgba(143, 211, 176, .12) 34%, transparent 66%); filter: blur(18px); }
.rk1-miolo { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; text-align: center; }
.rk1-moldura { position: relative; width: min(42vh, 340px); height: min(42vh, 340px); }
.rk1-aro { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.rk1-foto { position: absolute; left: 49.5%; top: 51.7%; width: 52.6%; height: 52.6%; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; background: var(--green-deep); }
.rk1-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rk1-foto.rk1-ini { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3.4vh; font-weight: 800; }
.rk1-pos { font-size: clamp(34px, 7vh, 64px); font-weight: 900; letter-spacing: -2px; color: #e9b949; text-shadow: 0 4px 18px rgba(0, 0, 0, .5); margin-top: -6px; }
.rk1-nome { font-size: clamp(22px, 4.4vh, 40px); font-weight: 800; color: #fff; letter-spacing: -.8px; line-height: 1.1; }
.rk1-cart { font-size: clamp(12px, 1.9vh, 16px); font-weight: 700; color: var(--green-light); letter-spacing: 1.4px; text-transform: uppercase; margin-top: 4px; }
.rk1-msg { margin-top: 16px; display: inline-flex; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; border-radius: 999px; padding: 12px 26px; font-size: clamp(14px, 2.3vh, 20px); font-weight: 800; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .7); }
.rk1-ico { font-size: 1.25em; }
.rk1-confete { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }

/* aba Regiões */
.grid.kpis.reg-kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.reg-kpis .kpi { padding: 16px 14px; min-height: 132px; gap: 8px; } .reg-kpis .kpi .v { font-size: 24px; letter-spacing: -.6px; } .reg-kpis .kpi .kpi-title { font-size: 12.5px; } .reg-kpis .kpi .kpi-arrow { width: 24px; height: 24px; } .reg-kpis .kpi .kpi-foot { font-size: 11.5px; }
@media (max-width: 1150px) { .grid.kpis.reg-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.reg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.reg-head .reg-sel { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -.2px; }
.reg-head .reg-sel svg { color: var(--green-dark); } .reg-head .reg-sel small { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.grid.reg-main { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); align-items: start; }
@media (max-width: 1000px) { .grid.reg-main { grid-template-columns: 1fr; } }
.mapa-wrap { position: relative; }
.mapa { width: 100%; height: auto; display: block; max-height: 600px; }
.mapa .uf { fill: var(--map0); stroke: var(--card); stroke-width: 1.4; stroke-linejoin: round; cursor: pointer; transition: filter .15s, fill .2s; }
.mapa .uf.n1 { fill: var(--map1); } .mapa .uf.n2 { fill: var(--map2); } .mapa .uf.n3 { fill: var(--map3); } .mapa .uf.n4 { fill: var(--map4); }
.mapa .uf.vazio { fill: var(--map-vazio); }
.mapa .uf:hover { filter: brightness(1.08) saturate(1.1); }
.mapa .uf.sel { filter: none; }
.mapa .uf-outline { fill: none; stroke: var(--amber); stroke-width: 3.5; stroke-linejoin: round; pointer-events: none; }
.mapa .uf-lbl { font-size: 12px; font-weight: 800; fill: var(--ink-2); pointer-events: none; text-anchor: middle; dominant-baseline: central; letter-spacing: .3px; }
.mapa .uf-lbl.sm { font-size: 9.5px; } .mapa .uf-lbl.out { text-anchor: start; font-size: 10px; fill: var(--muted); }
.mapa .uf-lbl.n3, .mapa .uf-lbl.n4 { fill: #fff; }
[data-theme="dark"] .mapa .uf-lbl.n4 { fill: var(--green-deep); } [data-theme="dark"] .mapa .uf-lbl.vazio { fill: #6e7d73; }
.mapa .uf-leader { stroke: var(--muted); stroke-width: 1; fill: none; pointer-events: none; }
.map-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.map-legend .sw { display: inline-flex; gap: 3px; } .map-legend .sw i, .map-legend .sw1 { width: 24px; height: 12px; border-radius: 4px; display: inline-block; vertical-align: -2px; }
.map-legend .l0 { background: var(--map0); } .map-legend .l1 { background: var(--map1); } .map-legend .l2 { background: var(--map2); } .map-legend .l3 { background: var(--map3); } .map-legend .l4 { background: var(--map4); }
.map-legend .vazio { background: var(--map-vazio); } .map-legend .selo { background: var(--map2); box-shadow: inset 0 0 0 2px var(--amber); } .map-legend .sep { opacity: .5; }
.reg-tip .t-row { justify-content: space-between; } .reg-tip .t-row small { color: var(--muted); font-weight: 500; margin-left: auto; } .reg-tip .t-row b { margin-left: 8px; } .reg-tip .t-row.hint { color: var(--muted); font-weight: 500; margin-top: 4px; }
.terr-box { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 10px; }
.terr-box .t { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--green-dark); margin-bottom: 4px; }
.terr-box .v { font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; } .terr-box .v small { font-size: 13px; font-weight: 600; letter-spacing: 0; }
.terr-box .s { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.top-reg { display: flex; flex-direction: column; gap: 4px; }
.top-reg .tr-row { display: grid; grid-template-columns: 18px 30px 1fr auto; align-items: center; gap: 10px; padding: 3px 8px; border-radius: 8px; cursor: pointer; font-size: 12.5px; transition: background .15s; }
.top-reg .tr-row:hover { background: var(--panel); } .top-reg .tr-row.sel { background: var(--green-soft); box-shadow: inset 3px 0 0 var(--green-dark); }
.top-reg .tr-n { color: var(--muted); font-weight: 700; font-size: 12px; } .top-reg .tr-uf { font-weight: 800; }
.top-reg .tr-bar { height: 10px; background: var(--panel); border-radius: 999px; overflow: hidden; } .top-reg .tr-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-light), var(--green)); }
.top-reg .tr-val { font-weight: 800; white-space: nowrap; text-align: right; line-height: 1.15; } .top-reg .tr-val small { font-weight: 600; color: var(--muted); font-size: 11px; }
.btn.sm.wide { display: block; width: 100%; margin-top: 8px; }
.top-reg .tr-row.zero .tr-uf, .top-reg .tr-row.zero .tr-val { color: var(--muted); } /* estado com negociação mas ainda sem venda */
.pct-pill { display: inline-block; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 11.5px; }
.pct-pill.low { background: var(--red-soft); color: var(--red); } .pct-pill.mid { background: var(--amber-soft); color: var(--amber); }
table.tbl tr.semuf td { color: var(--muted); } table.tbl tr.semuf td b { color: var(--ink-2); }
.reg-det h3 { margin-top: 4px; }

/* aba Minha Performance — cockpit individual do vendedor */
.mp-ola { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.mp-ola .mp-av { width: 54px; height: 54px; font-size: 17px; }
.mp-ola .mp-oi { font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1.15; }
.mp-ola .mp-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.mp-ola > div:nth-child(2) { min-width: 0; }
.mp-status { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 12px; border-radius: 999px; margin-left: 6px; }
.mp-status.bom { background: var(--green-soft); color: var(--green-dark); }
.mp-status.atencao { background: var(--amber-soft); color: var(--amber); }
.mp-status.acao { background: var(--red-soft); color: var(--red); }
.mp-status.neutro { background: var(--panel); color: var(--muted); }
.grid.kpis.mp-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } /* a meta fica só na pílula do cabeçalho */
.mp-kpis .kpi .v { font-size: 30px; }
@media (max-width: 1150px) { .grid.kpis.mp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card.mp-meta .mp-bar { position: relative; height: 22px; border-radius: 999px; background: var(--panel); overflow: hidden; margin: 6px 0 8px; }
.card.mp-meta .mp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-light), var(--green)); transition: width .4s ease; }
.card.mp-meta .mp-fill.acao { background: linear-gradient(90deg, #f0a3a3, var(--red)); }
.card.mp-meta .mp-fill.atencao { background: linear-gradient(90deg, #f3d08a, var(--amber)); }
.card.mp-meta .mp-marca { position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--ink); border-radius: 2px; opacity: .55; }
.mp-bar-legenda { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.mp-bar-legenda b { color: var(--ink); }
.mp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 26px; }
@media (max-width: 800px) { .mp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mp-li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mp-li b { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
.mp-li b.bom { color: var(--green-dark); } .mp-li b.acao { color: var(--red); }
.grid.mp-2 { grid-template-columns: minmax(0, 1.35fr) minmax(330px, 1fr); align-items: start; }
@media (max-width: 1050px) { .grid.mp-2 { grid-template-columns: 1fr; } }
.grid.kpis.mp-pipe { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.mp-pipe .kpi { padding: 16px 14px; min-height: 124px; } .mp-pipe .kpi .v { font-size: 24px; } .mp-pipe .kpi .kpi-title { font-size: 12.5px; } .mp-pipe .kpi .kpi-arrow { width: 24px; height: 24px; } .mp-pipe .kpi .kpi-foot { font-size: 11.5px; }
@media (max-width: 1150px) { .grid.kpis.mp-pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi.mp-cob.bom .v { color: var(--green-dark); } .kpi.mp-cob.atencao .v { color: var(--amber); } .kpi.mp-cob.acao .v { color: var(--red); }
.mp-funil { display: flex; align-items: stretch; gap: 8px; }
.mp-fase { flex: 1; background: var(--panel); border-radius: var(--r-md); padding: 14px 16px; }
.mp-fase-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mp-fase-l { font-size: 12px; font-weight: 700; color: var(--muted); } .mp-fase-q { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.mp-fase-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 10px 0 8px; }
.mp-fase-bar i { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.mp-fase:last-of-type .mp-fase-bar i { background: var(--green-dark); }
.mp-fase-v { font-size: 13px; font-weight: 800; }
.mp-seta { align-self: center; color: var(--line-2); font-size: 16px; }
@media (max-width: 900px) { .mp-funil { flex-wrap: wrap; } .mp-seta { display: none; } .mp-fase { flex: 1 1 45%; } }
.mp-efs, .mp-evs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .mp-efs, .mp-evs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mp-ef, .mp-ev { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); }
.mp-ef-t, .mp-ev-t { font-size: 12px; font-weight: 700; color: var(--muted); }
.mp-ef-v, .mp-ev-v { font-size: 26px; font-weight: 800; letter-spacing: -.7px; margin: 6px 0 4px; }
.mp-ef-x, .mp-ev-x { font-size: 11.5px; color: var(--muted); }
.kpi-help { display: block; width: 100%; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(123, 135, 127, .22); font-size: 11px; font-weight: 500; line-height: 1.4; color: var(--muted); }
.kpi.hero .kpi-help { border-top-color: rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .8); }
.mp-kpis .kpi, .mp-pipe .kpi { min-height: 188px; }
.mp-ef-h { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.4; color: var(--muted); }
/* lista de oportunidades: nada cortado — texto quebra e a linha cresce */
table.tbl.fit.fx.mp-prio-tbl tr { height: auto; }
table.tbl.fit.fx.mp-prio-tbl th { white-space: normal; overflow-wrap: normal; }
table.tbl.fit.fx.mp-prio-tbl td { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; padding: 9px 10px; line-height: 1.35; }
.mp-prio-tbl .ftag { max-width: none; white-space: normal; height: auto; padding: 4px 9px; }
.mp-prio-tbl .ftag em { max-width: none; overflow: visible; text-overflow: clip; white-space: normal; }
.mp-prio-tbl td small { display: block; white-space: normal; }
/* grade em vez de flex: o filtro fica preso no canto superior direito e o texto quebra a linha quando precisa */
.mp-evo-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px 16px; }
.evo-seg { padding: 4px; margin-bottom: 14px; } .evo-seg .seg-btn { padding: 7px 14px; font-size: 12.5px; }
.mp-var { font-weight: 800; } .mp-var.up { color: var(--green-dark); } .mp-var.down { color: var(--red); } .mp-var.flat { color: var(--muted); }
.card.mp-acoes { border-left: 5px solid var(--green); }
.mp-alertas { display: flex; flex-direction: column; gap: 8px; }
.mp-alerta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 16px; border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: var(--r-md); background: var(--card); font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: background .15s, transform .12s; }
.mp-alerta:hover:not(:disabled) { background: var(--panel); transform: translateX(2px); }
.mp-alerta:disabled { cursor: default; opacity: .8; }
.mp-alerta.alto { border-left-color: var(--red); } .mp-alerta.medio { border-left-color: var(--amber); } .mp-alerta.bom { border-left-color: var(--green); }
.mp-alerta.on { background: var(--green-soft); border-color: var(--green-light); }
.mp-alerta .mp-ic { font-size: 16px; line-height: 1; } .mp-alerta .mp-tx { flex: 1; } .mp-alerta .mp-vl { font-weight: 800; color: var(--ink); white-space: nowrap; }

/* Configurações › Usuários: escolha das abas liberadas para um gestor */
.abas-picker { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r-md); }
.abas-picker .ap-t { font-size: 12px; font-weight: 800; color: var(--green-dark); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }
.abas-picker .ap-g { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 7px 0; border-top: 1px solid var(--line); }
.abas-picker .ap-g:first-of-type { border-top: none; }
.abas-picker .ap-gl { font-size: 11.5px; font-weight: 700; color: var(--muted); min-width: 118px; }
.abas-picker .ap-i { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.abas-picker .ap-i.off { cursor: default; color: var(--muted); }
.abas-picker .ap-i sup { color: var(--green-dark); font-weight: 800; }
table.tbl sup { font-size: 10px; }
.modal .abas-picker { margin-top: 4px; }
.abas-picker .hint { margin-top: 10px; display: block; }

/* hierarquia em Configurações › Usuários */
.abas-picker.hier { margin-top: 12px; }
.abas-picker.hier .field { margin: 10px 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.abas-picker.hier select[multiple] { height: auto; min-height: 118px; }
.abas-picker.hier .ap-g { border-top: 1px solid var(--line); }

/* tabela de usuários: cabe inteira na largura da página */
table.tbl.tbl-users td, table.tbl.tbl-users th { font-size: 12px; padding: 9px 8px; vertical-align: top; }
table.tbl.tbl-users td.name b { font-size: 12.5px; }
table.tbl.tbl-users td.perfil { white-space: nowrap; font-size: 11.5px; font-weight: 700; }
table.tbl.tbl-users th { white-space: nowrap; overflow: visible; }
table.tbl.tbl-users td { overflow-wrap: break-word; word-break: normal; hyphens: none; }
table.tbl.tbl-users .hint { font-size: 11px; line-height: 1.3; }
table.tbl.tbl-users td.name .hint { word-break: break-all; } /* só o e-mail pode quebrar no meio */
table.tbl.tbl-users td.acoes { white-space: normal; text-align: right; }
table.tbl.tbl-users td.acoes .btn.sm { padding: 4px 9px; font-size: 11px; margin: 0 0 4px 4px; }
.aba-tag { display: inline-block; background: var(--panel); border-radius: 6px; padding: 1px 6px; margin: 0 3px 3px 0; font-size: 11px; font-weight: 600; color: var(--ink-2); }

/* aba Premiação: regras, roleta e tabela de troca */
.prem-passos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .prem-passos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prem-passos .pp { display: flex; gap: 10px; padding: 14px 16px; background: var(--panel); border-radius: var(--r-md); font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.prem-passos .pp b { display: block; color: var(--ink); font-size: 13.5px; margin-bottom: 3px; }
.prem-passos .pp-n { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--green-dark); color: #fff; font-weight: 800; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
.roleta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 700px) { .roleta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.roleta-grid .rl { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: 12px; font-weight: 700; color: var(--ink-2); min-height: 56px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.roleta-grid .rl.moeda { border-color: var(--green-light); background: var(--green-soft); color: var(--green-dark); }
.roleta-grid .rl.consolacao, .roleta-grid .rl.again { background: var(--panel); color: var(--muted); font-style: italic; }
.roleta-grid .rl-m { font-size: 11px; font-weight: 800; opacity: .8; }
.moeda-n { display: inline-block; min-width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; background: var(--green-dark); color: #fff; font-size: 12.5px; margin-right: 4px; }
table.tbl.conq-tbl td { font-size: 12.5px; padding: 8px 10px; }

/* conquistas por carteira: um card por carteira, cada conquista clicável para pedir */
.conq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .conq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .conq-grid { grid-template-columns: 1fr; } }
.conq-card { border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--r-md); padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 6px; }
.conq-card .cq-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.conq-card .cq-nome { font-size: 13px; font-weight: 800; color: var(--c); letter-spacing: .2px; }
.conq-card .cq-n { font-size: 11px; color: var(--muted); font-weight: 600; }
.cq-item { display: grid; grid-template-columns: 20px 1fr auto; align-items: start; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border: none; border-radius: 10px; background: var(--panel); font: inherit; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); cursor: pointer; transition: background .15s, transform .12s; }
.cq-item:hover { background: var(--green-soft); transform: translateX(2px); }
.cq-item .cq-ic { font-size: 12px; line-height: 1.35; }
.cq-item .cq-tp { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding-top: 1px; }
.cq-item.premio .cq-tp { color: var(--blue); }
.cq-item.moeda .cq-tp { color: var(--green-dark); }
.conq-legenda { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }

/* Clube de Benefícios: pacotes de troca das Moedas Verdes */
.clube-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1250px) { .clube-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .clube-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .clube-grid { grid-template-columns: 1fr; } }
.clube-card { border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.clube-card .cb-head { display: flex; flex-direction: column; margin-bottom: 2px; }
.clube-card .cb-nome { font-size: 13px; font-weight: 800; color: var(--c); }
.clube-card .cb-tema { font-size: 11px; color: var(--muted); font-weight: 600; }
.clube-card .cb-item { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.clube-card .moeda-n { min-width: 28px; }

.estoque-aviso { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 11px 14px; border-radius: var(--r-md); background: var(--amber-soft); color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }
.estoque-aviso svg { color: var(--amber); flex-shrink: 0; margin-top: 1px; }

.coin.zero { opacity: .62; }

/* aviso fixo: pedidos de conquista esperando o líder — fica em qualquer aba até ele liberar ou recusar */
.aviso-pedidos { position: fixed; right: 22px; bottom: 22px; z-index: 70; }
.aviso-pedidos .ap-btn { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border: none; border-radius: 999px; cursor: pointer; font: inherit; text-align: left;
  background: linear-gradient(135deg, #f0a32a, #d97706); color: #fff; box-shadow: 0 14px 34px -10px rgba(217, 119, 6, .75), 0 2px 8px rgba(16, 25, 19, .18); animation: apPulse 2.4s ease-in-out infinite; }
.aviso-pedidos .ap-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.aviso-pedidos .ap-ico { font-size: 20px; line-height: 1; }
.aviso-pedidos .ap-tx { display: flex; flex-direction: column; line-height: 1.25; }
.aviso-pedidos .ap-tx b { font-size: 13.5px; }
.aviso-pedidos .ap-tx small { font-size: 11.5px; opacity: .92; }
.aviso-pedidos .ap-n { min-width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
@keyframes apPulse { 0%, 100% { box-shadow: 0 14px 34px -10px rgba(217, 119, 6, .75), 0 0 0 0 rgba(240, 163, 42, .55); } 50% { box-shadow: 0 14px 34px -10px rgba(217, 119, 6, .75), 0 0 0 12px rgba(240, 163, 42, 0); } }
@media (max-width: 600px) { .aviso-pedidos { right: 12px; bottom: 12px; } .aviso-pedidos .ap-tx small { display: none; } }
.nav-item .nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--amber); color: #fff; font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* ganhar e perder moedas (critérios do RH) */
.ganhos-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1250px) { .ganhos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .ganhos-grid { grid-template-columns: 1fr; } }
.gh-tema { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 8px 0 2px; }
.gh-fonte { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.clube-card.perda .moeda-n.perde { background: var(--red); }
.clube-card.perda .cb-item { grid-template-columns: 34px 1fr; }
.clube-card.perda .cb-item.tudo { grid-template-columns: 1fr; gap: 3px; } /* "perde tudo" ocupa a linha inteira, sem cobrir o texto */
.clube-card .cb-badge { display: inline-flex; justify-content: flex-start; }
.perde-tudo { display: inline-block; padding: 2px 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.perdas-card { border-left: 5px solid var(--red); }

.saldo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1000px) { .saldo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.saldo-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: var(--panel); border-radius: var(--r-md); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.saldo-item input { width: 72px; text-align: center; }

.giro-seg { margin-bottom: 12px; } .giro-seg .seg-btn { padding: 8px 14px; font-size: 12.5px; }

/* como perder moedas: agrupado pelo desconto, em blocos curtos */
.perde-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1250px) { .perde-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .perde-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .perde-grid { grid-template-columns: 1fr; } }
.perde-card { border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: var(--r-md); padding: 12px 14px; }
.perde-card.tudo { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.perde-card .pd-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.perde-card .pd-n { min-width: 34px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 800; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
.perde-card .pd-head b { display: block; font-size: 12.5px; color: var(--ink); line-height: 1.2; }
.perde-card .pd-head small { font-size: 10.5px; color: var(--muted); }
.perde-card .pd-q { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); }
.perde-card .pd-lista { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.perde-card .pd-lista li { position: relative; padding-left: 12px; font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.perde-card .pd-lista li::before { content: ''; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); opacity: .55; }
.cb-item.compacto { align-items: center; }

.giro-previa { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; padding: 11px 14px; border-radius: var(--r-md); background: var(--green-soft); color: var(--green-dark); font-size: 13px; font-weight: 700; }
.giro-previa .gp-ic { font-size: 15px; }

.seg-btn.alerta { color: var(--amber); } .seg-btn.alerta .seg-n { background: var(--amber); color: #fff; }

/* cabeçalho com filtro: o texto ocupa o espaço que sobra e o filtro fica sempre no mesmo canto */
.mp-evo-head > div:first-child { min-width: 0; }
.mp-evo-head .seg { justify-self: end; margin: 0; }
.mp-evo-head .seg-btn { white-space: nowrap; }
@media (max-width: 1000px) { .mp-evo-head { grid-template-columns: 1fr; } .mp-evo-head .seg { justify-self: start; } }

/* filtro do quadro de ações: compacto para caber ao lado do título, sempre no mesmo canto */
.mp-evo-head .seg { padding: 4px; gap: 4px; }
.mp-evo-head .seg-btn { padding: 7px 12px; font-size: 12px; }
.mp-evo-head .seg-btn .seg-n { padding: 1px 6px; font-size: 11px; }
@media (max-width: 1250px) { .mp-evo-head .seg-btn { padding: 6px 10px; font-size: 11.5px; } }
