/* Portal BRAZMIX - tema claro (fundo branco), identidade da marca lida da logo oficial:
   azul #1C61A8 (principal: menu, botoes, rede) e laranja #DA8D45 (destaque: oportunidade, BRAZMIX). */
:root {
  color-scheme: light;
  --bz-azul: #1C61A8; --bz-azul-escuro: #154a82; --bz-laranja: #DA8D45;
  --bg: #ffffff; --surface-1: #ffffff; --surface-2: #f5f7fa; --surface-3: #eef2f7; --line: #e3e8ee;
  --text-primary: #10233a; --text-secondary: #4b5868; --text-muted: #7b8591;
  --accent: #1C61A8; --accent-ink: #1C61A8; --accent-soft: #eaf1fa;
  --laranja: #DA8D45; --laranja-ink: #93551a; --laranja-soft: #fdf3e9;
  --mercado: #aab2bc;
  --seq-0: #f1f5fb; --seq-1: #d5e3f4; --seq-2: #adc8ea; --seq-3: #7ea9dc; --seq-4: #4f87c9;
  --seq-5: #2b6bb5; --seq-6: #1C61A8; --seq-7: #0f3d6e;
  --good: #11804a; --bad: #c2362f; --warn: #b7791f;
  --tag-bg: var(--laranja-soft); --tag-ink: var(--laranja-ink);
  --lateral: 248px;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--text-primary); font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--accent-ink); }
button { font: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, .kpi .v, .acao .tt, .acao .op, .frase-grande b, .marca-sub { font-family: Nunito, "Segoe UI", sans-serif; }

/* ---------------- layout com menu lateral */
.layout { display: flex; min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; width: var(--lateral); flex: 0 0 var(--lateral);
  background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; z-index: 6; }
.marca img { width: 190px; height: auto; display: block; margin: 2px 6px 0; }
.marca-sub { color: var(--bz-laranja); font-weight: 800; font-size: 13px; margin: 6px 8px 18px; padding-bottom: 14px;
  border-bottom: 3px solid var(--bz-laranja); letter-spacing: .3px; }
.menu { display: flex; flex-direction: column; gap: 3px; }
.menu a { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); text-decoration: none;
  padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.menu a .ic { width: 20px; text-align: center; color: var(--text-muted); font-size: 15px; }
.menu a:hover { background: var(--surface-2); color: var(--bz-azul); }
.menu a.ativo { background: var(--accent-soft); color: var(--bz-azul); box-shadow: inset 3px 0 0 var(--bz-azul); }
.menu a.ativo .ic { color: var(--bz-azul); }
.lateral-pe { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; font-size: 12px; color: var(--text-muted); }
.lateral-pe .atual { margin-bottom: 10px; line-height: 1.4; }
.quem { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-secondary); font-weight: 600; }
.quem button { background: #fff; color: var(--bz-azul); border: 1px solid var(--bz-azul); border-radius: 8px; padding: 4px 12px; cursor: pointer; font-weight: 600; }
.quem button:hover { background: var(--bz-azul); color: #fff; }
.abre-menu { position: fixed; top: 10px; left: 10px; z-index: 7; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; padding: 6px 10px; font-size: 18px; color: var(--bz-azul); }
main { flex: 1; min-width: 0; padding: 26px 32px 48px; background: var(--bg); }
.conteudo-max { max-width: 1320px; }

/* ---------------- cabecalho de pagina */
.migalha { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.migalha a { text-decoration: none; } .migalha a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0; font-weight: 800; color: var(--text-primary); }
h2 { font-size: 17px; margin: 0 0 2px; font-weight: 800; }
h3 { font-size: 14px; margin: 0 0 6px; font-weight: 800; }
.sub { color: var(--text-secondary); font-size: 13px; margin-top: 3px; }
.cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.nota { color: var(--text-muted); font-size: 12px; margin-bottom: 10px; }
.bloco { display: grid; gap: 16px; margin-bottom: 16px; }
.duas { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.larga-estreita { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mapa-e-tab { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
@media (max-width: 1100px) { .duas, .tres, .larga-estreita, .mapa-e-tab { grid-template-columns: minmax(0, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0;
  box-shadow: 0 1px 2px rgba(16,35,58,.04); }

/* ---------------- numeros */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(16,35,58,.04); }
.kpi .r { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.kpi .v { font-size: 26px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .n { color: var(--text-muted); font-size: 12px; }
.kpi.destaque { border-color: var(--laranja); box-shadow: inset 4px 0 0 var(--laranja); background: var(--laranja-soft); }
.kpi.destaque .v { color: var(--laranja-ink); }
.kpi a { text-decoration: none; }

/* ---------------- controles */
.ferramentas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
input[type=search], select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text-primary); }
input[type=search] { min-width: 260px; }
select { max-width: 260px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--text-secondary); border-radius: 999px; padding: 6px 13px;
  cursor: pointer; font-size: 13px; text-decoration: none; font-weight: 600; }
.chip:hover { border-color: var(--bz-azul); color: var(--bz-azul); }
.chip[aria-pressed="true"] { background: var(--bz-azul); border-color: var(--bz-azul); color: #fff; }
.abas { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; overflow-x: auto; }
.abas button { border: 0; background: none; padding: 10px 14px; color: var(--text-secondary); cursor: pointer;
  border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; }
.abas button[aria-selected="true"] { color: var(--bz-azul); border-bottom-color: var(--bz-azul); }
.botao { display: inline-block; border: 1px solid var(--bz-azul); background: var(--bz-azul); color: #fff;
  border-radius: 8px; padding: 7px 14px; cursor: pointer; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.botao:hover { background: var(--bz-azul-escuro); }
.botao.leve { background: #fff; color: var(--bz-azul); }
.botao.leve:hover { background: var(--accent-soft); }
.botao.laranja { background: var(--bz-laranja); border-color: var(--bz-laranja); }

/* ---------------- tabelas */
.rolar { overflow: auto; max-height: 600px; }
.tab { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tab th { text-align: left; font-size: 12px; font-weight: 700; color: var(--text-secondary); white-space: nowrap;
  border-bottom: 1px solid var(--line); padding: 8px 9px; position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.tab th.ord { cursor: pointer; user-select: none; } .tab th.ord:hover { color: var(--bz-azul); }
.tab td { padding: 8px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tab .num { text-align: right; white-space: nowrap; }
.tab tbody tr.link { cursor: pointer; }
.tab tbody tr.link:hover { background: var(--accent-soft); }
.nome { font-weight: 650; } .fraco { color: var(--text-muted); font-size: 12px; }
.barra { height: 8px; border-radius: 0 4px 4px 0; background: var(--bz-azul); min-width: 2px; }
.barra.laranja { background: var(--bz-laranja); }
.cbar { width: 120px; }
.vazio { color: var(--text-muted); padding: 18px 0; }

/* ---------------- comparacao rede x mercado */
.comp { display: grid; grid-template-columns: 92px 1fr 64px; gap: 4px 8px; align-items: center; font-size: 12px; }
.comp .t { color: var(--text-secondary); }
.comp .b { height: 10px; border-radius: 0 5px 5px 0; min-width: 2px; }
.comp .b.cli { background: var(--bz-azul); } .comp .b.mer { background: var(--mercado); }
.comp .v { text-align: right; font-variant-numeric: tabular-nums; }
.mini { display: grid; grid-template-columns: 1fr; gap: 3px; min-width: 150px; }
.mini .l { display: flex; align-items: center; gap: 6px; }
.mini .l span.b { height: 7px; border-radius: 0 4px 4px 0; min-width: 2px; }
.mini .l span.cli { background: var(--bz-azul); } .mini .l span.mer { background: var(--mercado); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.legend i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

/* ---------------- cartoes de acao */
.acoes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.acao { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--laranja);
  border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(16,35,58,.04); }
.acao .pos { font-size: 11px; color: var(--laranja-ink); text-transform: uppercase; letter-spacing: .4px; font-weight: 800; }
.acao .tt { font-weight: 800; font-size: 15px; }
.acao .op { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--laranja-ink); }
.acao .frase { color: var(--text-secondary); font-size: 13px; }
.acao .rodape { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.up { color: var(--good); } .down { color: var(--bad); } .mut { color: var(--text-muted); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 4px;
  background: var(--tag-bg); color: var(--tag-ink); margin-left: 6px; white-space: nowrap; vertical-align: 1px; }
.tipo { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tipo.mix { background: var(--accent-soft); color: var(--bz-azul); }
.tipo.conc { background: var(--laranja-soft); color: var(--laranja-ink); }
.tipo.rupt { background: #fdecea; color: var(--bad); }
.tipo.equiv { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.troca { color: var(--text-secondary); font-size: 12px; }
.troca b { color: var(--text-primary); font-weight: 600; }
.sit { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }
.sit i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.frase-grande { font-size: 15px; line-height: 1.6; background: var(--accent-soft); border-left: 4px solid var(--bz-azul);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 18px; }
.frase-grande b { font-weight: 800; }
.lista-simples { list-style: none; margin: 0; padding: 0; }
.lista-simples li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.lista-simples li:last-child { border-bottom: 0; }
.lista-simples a { text-decoration: none; font-weight: 650; }
.funil { display: grid; gap: 8px; }
.funil .f { display: grid; grid-template-columns: 150px 1fr 60px; align-items: center; gap: 8px; font-size: 13px; }
.funil .f .b { height: 16px; border-radius: 0 6px 6px 0; min-width: 2px; }

/* ---------------- mapa */
.mapa { width: 100%; max-width: 360px; margin: 0 auto; }
.mapa svg { width: 100%; height: auto; display: block; }
.mapa .uf rect { stroke: #fff; stroke-width: 2; cursor: pointer; }
.mapa .uf.sel rect { stroke: var(--bz-laranja); stroke-width: 3; }
.mapa .uf text { font-size: 12px; font-weight: 700; pointer-events: none; }
.escala { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); justify-content: center; margin-top: 8px; }
.escala .e { display: flex; } .escala .e span { width: 22px; height: 10px; }

/* ---------------- login */
/* ---------------- tela de entrada (24/11/2026): marca a esquerda, formulario a direita */
.tela-login { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 1fr);
  background: #fff; overflow-y: auto; }
.login-hero { position: relative; overflow: hidden; color: #fff; display: flex; align-items: center;
  background: linear-gradient(150deg, #0f3d6e 0%, #154a82 45%, #1C61A8 100%); }
.hero-fundo { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px 520px at 88% 8%, rgba(218,141,69,.38), transparent 60%),
              radial-gradient(420px 420px at 6% 96%, rgba(255,255,255,.10), transparent 65%); }
.hero-grafico { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34%; pointer-events: none; }
.hero-conteudo { position: relative; padding: 56px clamp(32px, 6vw, 88px); max-width: 640px; }
.hero-marca { font: 700 13px/1 Nunito, "Segoe UI", sans-serif; letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,.75); }
.hero-marca b { color: var(--bz-laranja); font-weight: 800; }
.login-hero h1 { color: #fff; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.04; margin: 18px 0 22px; font-weight: 800; letter-spacing: -1px; }
.hero-linha { width: 72px; height: 5px; border-radius: 3px; background: var(--bz-laranja); }
.login-hero p { font-size: 16px; line-height: 1.55; color: rgba(255,255,255,.82); margin: 0 0 30px; max-width: 470px; }
.hero-lista { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 16px; }
.hero-lista li { display: flex; gap: 14px; align-items: center; }
.hero-lista b { display: block; font-size: 15px; }
.hero-lista span:not(.hero-ic) { font-size: 13px; color: rgba(255,255,255,.72); }
.hero-ic { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); color: var(--bz-laranja); }
.hero-ic svg { width: 22px; height: 22px; }
.hero-pe { font-size: 12px; color: rgba(255,255,255,.6); }
.login-lado { display: grid; place-items: center; padding: 32px 20px; background: var(--surface-2); }
.login { width: min(400px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 34px 32px 26px;
  box-shadow: 0 18px 50px rgba(16,35,58,.10), 0 2px 6px rgba(16,35,58,.04); position: relative; }
.login::before { content: ""; position: absolute; left: 32px; right: 32px; top: -1px; height: 4px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--bz-laranja), #e9a96b); }
.login img { width: 100%; max-width: 210px; height: auto; display: block; margin: 0 0 22px; }
.login h2 { font-size: 24px; margin: 0; font-weight: 800; color: var(--text-primary); }
.login-sub { color: var(--text-muted); margin: 4px 0 18px; font-size: 14px; }
.login label { display: block; font-size: 13px; color: var(--text-secondary); margin-top: 14px; font-weight: 700; }
.campo { position: relative; margin-top: 6px; }
.campo input { width: 100%; font: inherit; font-size: 15px; padding: 12px 44px 12px 42px; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.campo input::placeholder { color: #a7b0bb; }
.campo input:focus { outline: none; border-color: var(--bz-azul); box-shadow: 0 0 0 4px var(--accent-soft); }
.campo-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--text-muted); pointer-events: none; }
.campo-ic svg, .olho svg, .login-pe svg { width: 100%; height: 100%; display: block; }
.campo:focus-within .campo-ic { color: var(--bz-azul); }
.olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; padding: 7px;
  border: 0; background: transparent; color: var(--text-muted); border-radius: 8px; cursor: pointer; }
.olho:hover, .olho[aria-pressed="true"] { color: var(--bz-azul); background: var(--accent-soft); }
.olho:focus-visible { outline: 2px solid var(--bz-azul); outline-offset: 1px; }
.caps { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--warn); }
.lembrar { display: flex !important; align-items: center; gap: 8px; font-weight: 600 !important; color: var(--text-secondary) !important; margin-top: 14px !important; cursor: pointer; }
.lembrar input { width: 16px; height: 16px; accent-color: var(--bz-azul); }
.botao.entrar { width: 100%; margin-top: 20px; padding: 13px; font-size: 15px; font-weight: 700; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  background: linear-gradient(180deg, #2270bd, var(--bz-azul)); box-shadow: 0 6px 16px rgba(28,97,168,.28); transition: transform .1s, box-shadow .15s; }
.botao.entrar svg { width: 18px; height: 18px; transition: transform .15s; }
.botao.entrar:hover svg { transform: translateX(3px); }
.botao.entrar:active { transform: translateY(1px); }
.botao.entrar.carregando { opacity: .8; cursor: progress; }
.botao.entrar.carregando svg { display: none; }
.login .erro { text-align: center; }
.login-pe { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-muted); }
.login-pe svg { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 1px; }
@media (max-width: 860px) {
  .tela-login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-lado { min-height: 100vh; }
}
.erro { color: var(--bad); font-size: 13px; margin-top: 10px; min-height: 18px; }

.tip { position: fixed; pointer-events: none; background: #fff; color: var(--text-primary); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 18px rgba(16,35,58,.12); display: none; z-index: 20; max-width: 280px; }
.carregando { color: var(--text-muted); padding: 60px 0; text-align: center; }

@media (max-width: 900px) {
  .lateral { position: fixed; left: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(0,0,0,.15); }
  .lateral.aberta { transform: none; }
  .abre-menu:not([hidden]) { display: block; }
  main { padding: 56px 16px 32px; }
  .cbar { display: none; } input[type=search] { min-width: 0; width: 100%; }
}
@media (min-width: 901px) { .abre-menu { display: none !important; } }

/* resumo para a visita: imprime so o conteudo */
@media print {
  .lateral, .abre-menu, .migalha, .botao, .tip { display: none !important; }
  main { padding: 0; } .card, .kpi { box-shadow: none; break-inside: avoid; }
  .frase-grande { border-left-color: var(--bz-azul); }
}
a.kpi { display: block; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--bz-azul); }
a.kpi.destaque:hover { border-color: var(--laranja); }

/* ---------------------------------------------------------- segmentos (24/11/2026) */
.segbar { margin: -8px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.segs { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 14px; min-width: 150px;
  font: inherit; color: var(--text-primary); transition: border-color .15s, box-shadow .15s; }
.seg b { font-size: 14px; } .seg span { font-size: 12px; color: var(--text-secondary); }
.seg:hover { border-color: var(--bz-azul); }
.seg.on { border-color: var(--bz-azul); background: var(--accent-soft); box-shadow: inset 0 -3px 0 var(--bz-azul); }
.seg.on b { color: var(--bz-azul); }
.subsegs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tagseg { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--surface-3); color: var(--text-secondary); vertical-align: middle; white-space: nowrap; }

/* tabela em arvore: departamento -> categoria */
.arvore-acoes { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 6px; }
.botao.mini-b { padding: 3px 10px; font-size: 12px; }
.tab.arvore tr.grupo { cursor: pointer; background: var(--surface-2); }
.tab.arvore tr.grupo:hover { background: var(--accent-soft); }
.tab.arvore tr.grupo.aberto { background: var(--accent-soft); }
.tab.arvore tr.grupo td { font-weight: 700; border-bottom: 1px solid var(--line); }
.tab.arvore tr.grupo:focus-visible { outline: 2px solid var(--bz-azul); outline-offset: -2px; }
.tab.arvore .seta { display: inline-block; width: 16px; color: var(--bz-azul); }
.tab.arvore tr.filho td.recuo { padding-left: 34px; }
.tab.arvore tr.filho td { background: #fff; }
@media (max-width: 760px) { .seg { min-width: 0; flex: 1 1 45%; } }
.tagconf { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: #fff4e5; color: #9a5b00; border: 1px solid #f3c98b; vertical-align: middle; white-space: nowrap; }

/* ---------------- navegacao nova (24/11/2026): busca de cliente, situacoes no menu, cartoes de situacao, pedidos */
.lateral { overflow-y: auto; }
.busca-rede { margin: 0 2px 12px; }
.busca-rede input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; background: var(--surface-2); }
.busca-rede input:focus { outline: 2px solid var(--accent-soft); border-color: var(--bz-azul); background: #fff; }
.menu .conta { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.menu a.ativo .conta { color: var(--bz-azul); }
.menu #contaPedidos:not(:empty) { background: var(--bz-laranja); color: #fff; border-radius: 999px; padding: 0 7px; }
.submenu { display: flex; flex-direction: column; gap: 1px; margin: 0 0 6px 22px; padding-left: 8px; border-left: 2px solid var(--line); }
.submenu a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 13px;
  color: var(--text-secondary); text-decoration: none; }
.submenu a i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.submenu a:hover { background: var(--surface-2); color: var(--bz-azul); }
.submenu a.ativo { background: var(--accent-soft); color: var(--bz-azul); font-weight: 700; }
.sits { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; }
.sitcard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.sitcard:hover { border-color: var(--bz-azul); box-shadow: 0 2px 8px rgba(16,35,58,.08); }
.sitcard.on { border-color: var(--bz-azul); box-shadow: inset 0 3px 0 var(--bz-azul); background: var(--accent-soft); }
.sitcard .v { font: 800 24px/1.2 Nunito, "Segoe UI", sans-serif; margin-top: 4px; }
.sitcard .v span { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.sitcard .n { font-size: 13px; color: var(--laranja-ink); font-weight: 700; }
.sitcard .dica { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
td.acoes-col { white-space: nowrap; text-align: right; }
.botao.mini-b + .botao.mini-b { margin-left: 4px; }
/* pedido */
.pedido-cab { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; justify-content: space-between; }
.qtd { width: 76px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; text-align: right; font: inherit; }
.qtd:focus { outline: 2px solid var(--accent-soft); border-color: var(--bz-azul); }
.total-pedido { font: 800 24px Nunito, "Segoe UI", sans-serif; color: var(--laranja-ink); }
.sel-op { width: 16px; height: 16px; accent-color: var(--bz-laranja); }
.barra-acao { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 0; margin-top: 10px;
  display: flex; gap: 10px; align-items: center; justify-content: flex-end; z-index: 3; }
.estado-ped { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-secondary); }
.estado-ped.Rascunho { background: var(--surface-3); }
.estado-ped.Enviado { background: var(--accent-soft); color: var(--bz-azul); }
.estado-ped.Fechado { background: #e5f4e4; color: var(--good); }
.estado-ped.Cancelado { background: #fbebeb; color: var(--bad); }
/* indicadores do consultor */
.meta-barra { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.meta-barra i { display: block; height: 100%; background: var(--bz-azul); border-radius: 999px; }
.meta-barra i.ok { background: var(--good); }
.filtro-topo { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filtro-topo select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; background: #fff; }
.grafico { width: 100%; height: 220px; }
.grafico text { font-size: 11px; fill: var(--text-muted); }
@media print { .barra-acao, .lateral, .abre-menu, .nao-imprime { display: none !important; } }
a.f { text-decoration: none; color: inherit; border-radius: 6px; padding: 4px 6px; grid-template-columns: 150px 50px 1fr !important; }
a.f:hover { background: var(--surface-2); }
a.f .num { text-align: right; }
.perfil-nome { display: block; font-size: 11px; color: var(--bz-laranja); font-weight: 700; }
/* aba Acessos e criar senha (24/11/2026) */
.form-grade { display: grid; gap: 12px 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 8px 0 6px; }
.form-grade label { font-size: 13px; font-weight: 700; color: var(--text-secondary); display: flex; flex-direction: column; gap: 5px; }
.form-grade input, .form-grade select { font: inherit; font-weight: 400; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; }
.form-grade input:focus, .form-grade select:focus { outline: none; border-color: var(--bz-azul); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-grade .lembrar { flex-direction: row; align-items: center; margin-top: 22px !important; }
.link-convite { margin-top: 14px; padding: 14px; border: 1.5px dashed var(--bz-laranja); border-radius: 10px; background: var(--laranja-soft); }
.link-linha { display: flex; gap: 8px; margin: 8px 0 4px; }
.link-linha input { flex: 1; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.lista-check { display: grid; gap: 4px; max-height: 320px; overflow: auto; padding: 4px 2px; }
.lista-check label { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.lista-check label:hover { background: var(--surface-2); }
.lista-check input { accent-color: var(--bz-azul); }
.regras { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; font-size: 13px; color: var(--text-muted); }
.regras li::before { content: "○ "; }
.regras li.ok { color: var(--good); font-weight: 700; }
.regras li.ok::before { content: "✓ "; }
/* mapa do Brasil com a malha do IBGE (24/11/2026) */
.mapa { max-width: 380px; }
.mapa path.uf { stroke: #fff; stroke-width: 1; stroke-linejoin: round; cursor: pointer; transition: opacity .12s; }
.mapa path.uf:hover { opacity: .85; stroke: var(--bz-azul); stroke-width: 1.6; }
.mapa path.uf.sel { stroke: var(--bz-laranja); stroke-width: 2.6; }
.mapa path.uf:focus-visible { outline: none; stroke: var(--bz-azul); stroke-width: 2.4; }
.mapa .uf-rot { font-size: 12px; font-weight: 800; pointer-events: none; }
.mapa .uf-rot.peq { font-size: 10px; fill: var(--text-secondary); }
.mapa .uf-guia { stroke: var(--text-muted); stroke-width: .6; }
/* senha provisoria (24/11/2026) */
.prov-cab { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 10px; }
.prov-dados { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.prov-dados div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.prov-dados span { display: block; font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.prov-senha { font: 800 18px/1.3 ui-monospace, Consolas, monospace; letter-spacing: 1px; color: var(--laranja-ink); }
.link-convite textarea { width: 100%; font: inherit; font-size: 13px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; resize: vertical; }
/* tela Produtos (24/11/2026) */
.filtros-linha { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.filtro { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-secondary); min-width: 150px; }
.filtro.largo { flex: 1 1 260px; }
.filtro input[type=search], .filtro select { font: inherit; font-weight: 400; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; max-width: 240px; }
.filtro.largo input { max-width: none; }
.filtro input:focus, .filtro select:focus { outline: none; border-color: var(--bz-azul); box-shadow: 0 0 0 3px var(--accent-soft); }
.filtro.check { flex-direction: row; align-items: center; gap: 6px; min-width: 0; padding-bottom: 9px; cursor: pointer; }
.filtro.check input { accent-color: var(--bz-azul); width: 16px; height: 16px; }
/* custo e margem da farmacia no pedido (24/11/2026) */
.farm-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 10px 0 6px; }
.farm-resumo div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.farm-resumo span { display: block; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.farm-resumo b { display: block; font: 800 20px/1.3 Nunito, "Segoe UI", sans-serif; }
.farm-resumo small { color: var(--text-muted); font-size: 12px; }

/* ---------------------------------------------------------- compacto (24/11/2026, pedido do Marques: "diminui esses cards") */
.kpis { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); margin-bottom: 14px; }
.kpi { padding: 9px 12px; border-radius: 10px; }
.kpi .r { font-size: 11.5px; }
.kpi .v { font-size: 20px; margin-top: 0; line-height: 1.25; }
.kpi .n { font-size: 11px; line-height: 1.35; }
.acoes { gap: 8px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.acao { padding: 9px 11px; gap: 5px; border-radius: 10px; border-top-width: 2px; }
.acao .pos { font-size: 10px; letter-spacing: .3px; }
.acao .tt { font-size: 13.5px; line-height: 1.25; }
.acao .op { font-size: 17px; }
.acao .op .mut { font-size: 11px !important; }
.acao .frase { font-size: 11.5px; }
.acao .comp { grid-template-columns: auto 1fr 38px; font-size: 11px; gap: 2px 6px; white-space: nowrap; }
.acao .comp .b { height: 7px; }
.acao .rodape .fraco { font-size: 11px; }
.acao .rodape .botao { padding: 4px 10px; font-size: 12px; }
/* barra de foco: uma linha so, botoes baixos */
.segbar { margin: -8px 0 14px; padding-bottom: 10px; }
.segs { align-items: center; gap: 6px; }
.segs-r { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-right: 2px; }
.seg { flex-direction: row; align-items: baseline; gap: 6px; padding: 5px 12px; min-width: 0; border-radius: 999px; }
.seg b { font-size: 13px; } .seg span { font-size: 11px; }
.seg.on { box-shadow: none; }
.subsegs { margin-top: 8px; }
/* aba de argumento (categoria abaixo do mercado) separada do potencial */
.chip.arg { border-style: dashed; }
.chip.arg[aria-pressed="true"] { background: var(--surface-3); border-color: var(--text-secondary); color: var(--text-primary); border-style: solid; }

/* ---------------------------------------------------------- revisao geral (24/11/2026): sugestao de pedido, cadastro, PDF */
.passo { padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.passo:last-of-type { border-bottom: 0; }
.passo > b { display: inline-block; margin-bottom: 8px; color: var(--bz-azul); }
.passo select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; max-width: 100%; }
.atalhos { margin-bottom: 8px; }
.filtros-linha { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filtros-linha label { font-size: 13px; color: var(--text-secondary); display: flex; gap: 6px; align-items: center; }
.cab-aba { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.campo-linha { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; flex-wrap: wrap; }
.campo-linha select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; max-width: 100%; }
.totais { display: flex; justify-content: flex-end; gap: 22px; flex-wrap: wrap; margin: 12px 0 4px; }
.totais div { text-align: right; } .totais span { display: block; font-size: 12px; color: var(--text-secondary); font-weight: 700; }
.totais b { font: 800 18px/1.3 Nunito, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
.totais .geral b { font-size: 24px; color: var(--bz-azul); }
.barra-bloco { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: 13px; }
.foco-t[aria-pressed="false"] { color: var(--bad); border-color: #f0c2c2; background: #fff5f5; }
.barra-acao button:disabled { opacity: .5; cursor: not-allowed; }
/* documento do PDF: so existe no papel */
.doc-pdf { display: none; }
@media print {
  @page { size: A4; margin: 14mm 12mm 16mm; @bottom-right { content: "Página " counter(page) " de " counter(pages); font: 9px "Segoe UI", sans-serif; color: #667; } }
  .rolar { max-height: none !important; overflow: visible !important; }
  .card { break-inside: auto !important; }
  body.imprime-doc .segbar, body.imprime-doc #tela > .conteudo-max > :not(.doc-pdf) { display: none !important; }
  body.imprime-doc .doc-pdf { display: block; color: #111; font: 11px/1.45 "Segoe UI", Arial, sans-serif; }
  body.imprime-doc main, body.imprime-doc #tela, body.imprime-doc .conteudo-max { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .doc-cab { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 3px solid #e8852b; padding-bottom: 10px; margin-bottom: 12px; }
  .doc-cab img { height: 46px; }
  .doc-cab > div { text-align: right; } .doc-cab h1 { font: 800 18px/1.2 Nunito, "Segoe UI", sans-serif; margin: 0 0 4px; color: #1f5fa8; }
  .doc-cli { display: grid; grid-template-columns: 2fr 2fr 1.3fr .6fr; gap: 6px 14px; border: 1px solid #d9dee5; border-radius: 6px; padding: 8px 10px; margin-bottom: 12px; }
  .doc-cli span, .doc-tot span, .doc-obs span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .4px; color: #667; }
  .doc-tab { width: 100%; border-collapse: collapse; }
  .doc-tab thead { display: table-header-group; }          /* cabecalho repete em toda pagina */
  .doc-tab th { background: #eef3f9; color: #1f3a5a; text-align: left; font-size: 10px; padding: 5px 6px; border-bottom: 1px solid #c9d3df; }
  .doc-tab td { padding: 4px 6px; border-bottom: 1px solid #e6e9ee; vertical-align: top; }
  .doc-tab tr { break-inside: avoid; } .doc-tab .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .doc-tot { display: flex; justify-content: flex-end; gap: 26px; margin: 12px 0 8px; break-inside: avoid; }
  .doc-tot div { text-align: right; } .doc-tot b { font-size: 13px; } .doc-tot .geral b { font-size: 16px; color: #1f5fa8; }
  .doc-farm { background: #f3f8ee; border: 1px solid #cfe3bf; border-radius: 6px; padding: 7px 10px; margin: 8px 0; break-inside: avoid; }
  .doc-obs { border: 1px solid #d9dee5; border-radius: 6px; padding: 7px 10px; margin: 8px 0; break-inside: avoid; }
  .doc-pe { margin-top: 14px; padding-top: 8px; border-top: 1px solid #d9dee5; font-size: 9px; color: #667; }
}
/* inicio: meus clientes hoje */
.hoje { margin-bottom: 16px; border-top: 3px solid var(--laranja); }
.hoje-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 10px; }
.hoje-col h3 { margin: 0 0 2px; font: 800 15px/1.3 Nunito, "Segoe UI", sans-serif; }
.hoje-col ul { list-style: none; margin: 8px 0 0; padding: 0; }
.hoje-col li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.hoje-nome { text-decoration: none; color: inherit; min-width: 0; } .hoje-nome b { display: block; font-size: 13px; }
.hoje-nome .fraco { font-size: 11px; } .hoje-nome:hover b { color: var(--bz-azul); }
.hoje-pot { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; } .hoje-pot small { font-weight: 400; color: var(--text-muted); }
.hoje-acao { font-size: 11px; }
.hoje .mais { display: inline-block; margin-top: 6px; font-size: 12px; }
.vazio.mini { padding: 10px 0; font-size: 12px; }
.titulo-venda { margin: 4px 0 8px; }

/* ========================================================== 25/11/2026: densidade, filtros em balao, monitor pequeno */
.segbar { display: none !important; }                    /* o foco virou filtro dentro de cada tela */
/* tabelas: linhas finas */
.tab { font-size: 13px; }
.tab th { padding: 7px 8px; font-size: 11.5px; }
.tab td { padding: 5px 8px; line-height: 1.3; }
.tab td .fraco { font-size: 11px; line-height: 1.3; }
.tab td.nw, .tab th.nw { white-space: nowrap; }
.tab .tipo { font-size: 11px; padding: 1px 7px; white-space: nowrap; }
.botao.mini-b { padding: 2px 9px; font-size: 11.5px; line-height: 1.5; }
td.acoes-col .botao + .botao { margin-left: 4px; }
/* tabela compacta: cliente e produto numa linha so, com reticencias (texto inteiro no "title") */
.compacta .tab td.c-cli { width: 24%; max-width: 0; }
.compacta .tab td.c-oque { width: 46%; max-width: 0; }
.compacta .tab td.c-cli > div, .compacta .tab td.c-oque > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compacta .tab td.arg { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-mini { display: inline-block; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px; background: var(--surface-3); color: var(--text-secondary); }
/* botao Filtros + balao + etiquetas */
.filtros-wrap { position: relative; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filtros-bt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 13px; }
.filtros-bt::before { content: ""; width: 12px; height: 10px; background: linear-gradient(currentColor 0 0) top/100% 2px no-repeat, linear-gradient(currentColor 0 0) center/70% 2px no-repeat, linear-gradient(currentColor 0 0) bottom/40% 2px no-repeat; }
.filtros-bt .badge { background: var(--bz-laranja); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; font-weight: 700; }
.balao { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: min(460px, 86vw); max-height: 70vh; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(16,35,58,.18); padding: 12px 14px; }
.balao-g { padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.balao-g > b { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.balao-g .chips { gap: 6px; } .balao-g .chip { padding: 4px 10px; font-size: 12px; } .balao-g .chip small { opacity: .7; }
.balao-g select { width: 100%; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.balao-pe { display: flex; justify-content: space-between; padding-top: 10px; }
.pilula { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--accent-soft); color: var(--bz-azul); border-radius: 999px; padding: 2px 4px 2px 10px; }
.pilula button { border: 0; background: transparent; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 50%; }
.pilula button:hover { background: #fff; }
.ferramentas input[type=search] { min-width: 220px; }
.cab .filtro-topo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* menu lateral: rolagem vertical fina, sem horizontal */
.lateral { overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c9d1db transparent; }
.lateral::-webkit-scrollbar { width: 6px; } .lateral::-webkit-scrollbar:horizontal { display: none; height: 0; }
.lateral::-webkit-scrollbar-thumb { background: #c9d1db; border-radius: 6px; } .lateral::-webkit-scrollbar-track { background: transparent; }
.busca-rede input { box-sizing: border-box; max-width: 100%; }
.lateral * { min-width: 0; }
/* clientes: cartoes de situacao mais baixos */
.sitcard { padding: 9px 12px; } .sitcard .v { font-size: 20px; } .sitcard .dica { font-size: 11px; }
/* monitor de baixa resolucao (1366x768, 1440x900...) */
@media (max-width: 1500px) {
  :root { --lateral: 210px; }
  main { padding: 16px 20px 32px; }
  body { font-size: 13.5px; }
  h1 { font-size: 22px; } .cab { margin-bottom: 12px; }
  .marca img { width: 160px; }
  .menu a { padding-top: 7px; padding-bottom: 7px; }
  .kpi .v { font-size: 18px; } .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .card { padding: 12px 14px; }
}
@media (max-width: 1280px) {
  .opc { display: none; }                                   /* colunas de apoio somem; o essencial fica */
  .compacta .tab td.c-oque { width: 52%; }
}
@media (max-height: 800px) {
  .menu a { padding-top: 5px; padding-bottom: 5px; } .submenu a { padding-top: 4px; padding-bottom: 4px; }
  .lateral-pe .atual { display: none; }
}
/* produtos (25/11/2026): coluna de familia/categoria numa linha; cabecalho fixo ao rolar em toda tabela */
.compacta .tab td.c-fam { max-width: 0; width: 15%; }
.compacta .tab td.c-fam > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rolar .tab thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2, #f4f6f9); }
/* visao do cliente (25/11/2026) */
.aviso-linha { background: #fff7e8; border: 1px solid #f3d29b; color: #7a4b00; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
#gCli .grafico { max-height: 190px; }
/* estoque por CD (25/11/2026): PR · SC · SP lado a lado */
.est-cd { display: inline-flex; gap: 6px; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; }
.est-cd span { color: var(--text-primary); }
.est-cd span.zero { color: #c0392b; opacity: .75; }
.est-cd span.sel { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.regras-tab input.qtd { width: 110px; text-align: right; }
