/* ==========================================================================
   Mockups de interface — CEO ON LINE™
   Depende de bnp.css (tokens + .bnp-glass/.bnp-borda-luz). Carregar DEPOIS
   de bnp.css e site.css. Nenhuma cor nova: só var(--bnp-*).
   Os quatro blocos (.mk-painel, .mk-mapa, .mk-showroom, .mk-alertas) são
   decorativos — o miolo leva aria-hidden="true", o contêiner .mk leva
   role="img" + aria-label no HTML.
   ========================================================================== */

.mk {
  padding: 22px;
  margin-bottom: 28px;
}
.mk:last-child { margin-bottom: 0; }

.mk-titulo-peca {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}
.mk-titulo-peca .bnp-label { margin: 0; }

@media (min-width: 640px) {
  .mk { padding: 28px 32px; }
}

/* --------------------------------------------------------------------------
   Elementos comuns
   -------------------------------------------------------------------------- */

.mk-icon { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Ponto "ao vivo" — reaproveitado nos quatro mockups */
.mk-dot-live {
  position: relative;
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bnp-success);
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .mk-dot-live { animation: mk-pulso 2s ease-in-out infinite; }
}

@keyframes mk-pulso { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes mk-anel   { 0% { transform: scale(0.6); opacity: 0.65; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes mk-encher { from { width: 0; } }

/* ==========================================================================
   A. Painel executivo
   ========================================================================== */

.mk-painel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--bnp-border-neutral);
}

.mk-empresa { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; min-width: 0; }
.mk-empresa-logo {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bnp-grad-brand);
  font-family: var(--bnp-font-mono); font-size: 10px; font-weight: 700; color: var(--bnp-inverse);
}
.mk-empresa-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mk-top-acoes { display: flex; align-items: center; gap: 14px; flex: none; }
.mk-sino { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--bnp-border-neutral); color: var(--bnp-muted); }
.mk-sino-contador {
  position: absolute; top: -3px; right: -3px;
  min-width: 15px; height: 15px; padding: 0 3px;
  display: grid; place-items: center;
  background: var(--bnp-orange-cta); color: var(--bnp-inverse);
  font-family: var(--bnp-font-mono); font-size: 9px; font-weight: 700;
  border-radius: 100px; border: 2px solid var(--bnp-card);
}
.mk-avatar-mini {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bnp-elevated); border: 1px solid var(--bnp-border-neutral);
  font-family: var(--bnp-font-mono); font-size: 10px; font-weight: 700; color: var(--bnp-text);
}

.mk-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 560px) { .mk-kpis { grid-template-columns: 1fr; } }

.mk-kpi {
  background: var(--bnp-card);
  border: 1px solid var(--bnp-border-neutral);
  border-radius: var(--bnp-r-small);
  padding: 16px;
  min-width: 0;
}
.mk-kpi-rotulo { font-size: 11px; color: var(--bnp-muted); margin-bottom: 8px; }
.mk-kpi-valor {
  font-family: var(--bnp-font-head);
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: break-word;
}
.mk-kpi-delta {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px;
  font-family: var(--bnp-font-mono); font-size: 12px; font-weight: 600;
  color: var(--bnp-success);
}
.mk-kpi-delta .mk-icon { width: 13px; height: 13px; }
.mk-kpi-sub { margin-top: 10px; font-size: 12px; color: var(--bnp-faint); }

.mk-progress {
  position: relative;
  margin-top: 12px;
  height: 6px;
  border-radius: 100px;
  background: var(--bnp-border-neutral);
  overflow: hidden;
}
.mk-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--bnp-grad-brand);
}
@media (prefers-reduced-motion: no-preference) {
  .mk-progress-fill { animation: mk-encher 1.1s ease-out both; }
}

.mk-chart-bloco { margin-bottom: 22px; }
.mk-chart-rotulo { font-size: 12px; color: var(--bnp-muted); margin-bottom: 14px; }

.mk-bars {
  display: flex;
  align-items: flex-end;
  gap: clamp(4px, 1.4vw, 8px);
  height: 120px;
  padding: 0 2px;
}
.mk-bar {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 3px 3px 0 0;
  background: rgba(221, 83, 8, 0.38);
}
.mk-bar.is-destaque { background: var(--bnp-grad-brand); box-shadow: 0 0 16px rgba(221, 83, 8, 0.45); }
@media (prefers-reduced-motion: no-preference) {
  .mk-bar { animation: mk-crescer 0.7s cubic-bezier(.22,1,.36,1) both; }
}
@keyframes mk-crescer { from { transform: scaleY(0); transform-origin: bottom; } }

.mk-sync {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--bnp-font-mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--bnp-faint);
}

/* ==========================================================================
   B. Mapa de clientes
   ========================================================================== */

.mk-mapa-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.mk-filtro {
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  color: var(--bnp-muted);
  padding: 6px 14px;
  border: 1px solid var(--bnp-border-neutral);
  border-radius: var(--bnp-r-badge);
}
.mk-filtro:first-child { color: var(--bnp-orange-cta); border-color: var(--bnp-border); }

.mk-mapa-area {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 340 / 400;
  margin-inline: auto;
}
.mk-brasil { position: absolute; inset: 0; width: 100%; height: 100%; }
.mk-brasil path { fill: rgba(240, 238, 233, 0.03); stroke: var(--bnp-border-neutral); stroke-width: 1.5; stroke-linejoin: round; }

.mk-ponto {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--bnp-faint);
}
.mk-ponto.is-ativo { background: var(--bnp-orange-cta); box-shadow: 0 0 8px rgba(232, 105, 27, 0.7); }
.mk-ponto.is-inativo { background: var(--bnp-faint); opacity: 0.55; }
.mk-ponto.is-novo { background: var(--bnp-orange-hi); }
.mk-ponto.is-novo::after {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 50%;
  border: 1.5px solid var(--bnp-orange-hi);
}
@media (prefers-reduced-motion: no-preference) {
  .mk-ponto.is-novo::after { animation: mk-anel 1.8s ease-out infinite; }
}

.mk-legenda { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 20px; }
.mk-legenda-item { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--bnp-muted); }
.mk-legenda-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mk-legenda-dot.is-ativo { background: var(--bnp-orange-cta); }
.mk-legenda-dot.is-inativo { background: var(--bnp-faint); opacity: 0.55; }
.mk-legenda-dot.is-novo { background: var(--bnp-orange-hi); }

/* ==========================================================================
   C. Showroom virtual
   ========================================================================== */

.mk-showroom-top { font-size: 12px; color: var(--bnp-muted); margin-bottom: 18px; }
.mk-showroom-top strong { color: var(--bnp-text); font-weight: 600; }

.mk-produtos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
@media (min-width: 460px) { .mk-produtos { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px) { .mk-produtos { grid-template-columns: repeat(4, 1fr); } }

.mk-produto {
  background: var(--bnp-card);
  border: 1px solid var(--bnp-border-neutral);
  border-radius: var(--bnp-r-small);
  padding: 10px;
  min-width: 0;
}
.mk-foto {
  aspect-ratio: 1 / 1;
  border-radius: 5px;
  margin-bottom: 12px;
}
.mk-foto-1 { background: linear-gradient(150deg, rgba(221,83,8,0.30), rgba(27,27,41,0.9) 70%); }
.mk-foto-2 { background: linear-gradient(150deg, rgba(245,152,58,0.24), rgba(27,27,41,0.9) 70%); }
.mk-foto-3 { background: linear-gradient(150deg, rgba(240,238,233,0.10), rgba(27,27,41,0.9) 70%); }
.mk-foto-4 { background: linear-gradient(150deg, rgba(221,83,8,0.18), rgba(245,152,58,0.10), rgba(27,27,41,0.9) 75%); }

.mk-produto-nome { font-size: 13px; font-weight: 600; overflow-wrap: break-word; }
.mk-produto-ref { font-family: var(--bnp-font-mono); font-size: 10px; color: var(--bnp-faint); margin-top: 3px; }
.mk-produto-preco { font-family: var(--bnp-font-head); font-size: 16px; font-weight: 700; color: var(--bnp-orange-cta); margin-top: 8px; }

.mk-grade { display: flex; gap: 5px; margin-top: 10px; flex-wrap: nowrap; }
.mk-tam {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 5px 0;
  font-family: var(--bnp-font-mono); font-size: 10px; font-weight: 600;
  color: var(--bnp-muted);
  border: 1px solid var(--bnp-border-neutral);
  border-radius: 4px;
}
.mk-tam.is-selecionado { color: var(--bnp-inverse); background: var(--bnp-orange-cta); border-color: var(--bnp-orange-cta); }

.mk-showroom-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--bnp-border-neutral);
}
.mk-showroom-footer .bnp-mono { font-size: 13px; color: var(--bnp-muted); }
.mk-btn-fechar {
  font-size: 13px; font-weight: 600;
  color: var(--bnp-inverse);
  background: var(--bnp-orange-cta);
  padding: 11px 22px;
  border-radius: var(--bnp-r-button);
}

/* ==========================================================================
   D. Central de notificações
   ========================================================================== */

.mk-alertas-top {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 6px;
  border-bottom: 1px solid var(--bnp-border-neutral);
}
.mk-alertas-titulo { font-family: var(--bnp-font-head); font-size: 18px; font-weight: 600; }
.mk-selo-vivo {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--bnp-font-mono); font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--bnp-success);
}

.mk-lista-alertas { display: flex; flex-direction: column; }

.mk-alerta {
  display: flex; align-items: flex-start; gap: 14px;
  padding-block: 15px;
  border-bottom: 1px solid var(--bnp-border-neutral);
}
.mk-alerta:last-child { border-bottom: 0; }

.mk-alerta-ico {
  flex: none;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bnp-elevated);
  border: 1px solid var(--bnp-border-neutral);
  font-family: var(--bnp-font-mono); font-size: 12px; font-weight: 700;
  color: var(--bnp-muted);
}
.mk-alerta.is-critico .mk-alerta-ico { color: var(--bnp-error); border-color: var(--bnp-error); background: rgba(229, 72, 77, 0.10); }
.mk-alerta.is-critico { border-left: 2px solid var(--bnp-error); margin-left: -1px; padding-left: 13px; }
.mk-alerta.is-sucesso .mk-alerta-ico { color: var(--bnp-success); border-color: var(--bnp-success); background: rgba(61, 220, 132, 0.10); }

.mk-alerta-corpo { min-width: 0; }
.mk-alerta-titulo { font-size: 14px; font-weight: 600; overflow-wrap: break-word; }
.mk-alerta-meta { font-size: 12px; color: var(--bnp-faint); margin-top: 3px; }

/* --- Mapa: contorno geográfico real e pontos nas coordenadas das capitais --- */
.mk-brasil { width: 100%; height: auto; max-height: 340px; display: block; margin-inline: auto; }
.mk-contorno {
  fill: rgba(240,238,233,0.025);
  stroke: var(--bnp-border-neutral);
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.mk-pt { transition: r .3s ease; }
.mk-pt.is-ativo   { fill: var(--bnp-orange-cta); }
.mk-pt.is-inativo { fill: var(--bnp-faint); }
.mk-pt.is-novo    { fill: var(--bnp-orange-hi); }

@media (prefers-reduced-motion: no-preference) {
  .mk-pt.is-novo {
    animation: mk-lead 2.4s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
  }
  @keyframes mk-lead {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
  }
}

/* Valor de indicador não quebra linha — número partido em dois parece defeito */
.mk-kpi-valor, .mk-kpi-delta { white-space: nowrap; }
.mk-kpi-valor { font-size: clamp(20px, 2.1vw, 28px); }
