/* Marktech Leads: ajustes locais sobre o kit do design system (marktech/bundle.css).
   Só tokens --mk-*; nenhuma cor solta. Classes locais usam o prefixo mkl-. */

/* O atributo hidden precisa esconder blocos do kit que definem display */
[hidden] { display: none !important; }
[v-cloak] { display: none !important; }

/* Grupo do menu lateral como <button> (o kit só estiliza <a>) */
:where(button.mk-side__item) { width: calc(100% - 24px); border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; }
.mk-topbar__client .mk-i { width: 11px; height: 11px; color: var(--mk-muted); }
.mk-tabletools { margin-bottom: 12px; }
@media (min-width: 992px) {
  .mk-shell { align-items: start; }
  .mk-shell > .mk-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}

/* Logo + nome do app no menu */
.mkl-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.mkl-brand img { height: 22px; width: auto; filter: brightness(0) invert(1); }
.mkl-brand span { font-size: 14px; font-weight: 700; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .18); line-height: 22px; }
.mkl-entry-brand { display: inline-flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.mkl-entry-brand img { height: 32px; width: auto; }
.mkl-entry-brand span { font-size: 18px; font-weight: 700; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .24); line-height: 32px; }

/* Seletor de conta (topo) */
.mk-topbar { position: relative; }
.mkl-accounts { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); z-index: 1060; width: min(360px, calc(100vw - 32px));
  background: var(--mk-white); border: 1px solid var(--mk-line); border-radius: var(--mk-radius-md); box-shadow: var(--mk-shadow-pop); padding: 8px; }
.mkl-accounts .mk-input { width: 100%; margin-bottom: 6px; }
.mkl-accounts .mk-menu { max-height: 320px; overflow-y: auto; border: 0; box-shadow: none; padding: 0; margin: 0; }
.mkl-accounts__foot { border-top: 1px solid var(--mk-line-soft); margin-top: 6px; padding: 8px 6px 2px; display: flex; justify-content: space-between; gap: 8px; }
.mkl-user { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.mkl-user__name { font-size: 12.5px; color: var(--mk-muted); text-align: right; line-height: 1.25; }
.mkl-user__name strong { display: block; color: var(--mk-ink); font-weight: 600; font-size: 13px; }
@media (max-width: 767px) { .mkl-user__name { display: none; } }

/* Troca de tela (navegação parcial): conteúdo anterior a 45% enquanto a próxima carrega */
#mk-screen.is-navigating { opacity: .45; pointer-events: none; transition: opacity var(--mk-fast) var(--mk-ease); }

/* Linha de ferramentas no cabeçalho de cartão */
.mkl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mkl-tools--end { justify-content: flex-end; margin-left: auto; }
.mkl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mkl-grow { flex: 1 1 auto; min-width: 0; }
.mkl-soft { background: var(--mk-soft); border-radius: var(--mk-radius-block); padding: 16px 18px; }
.mkl-muted { color: var(--mk-muted); }
.mkl-faint { color: var(--mk-faint); }
.mkl-small { font-size: 12.5px; }
.mkl-num { font-variant-numeric: tabular-nums; }
.mkl-nowrap { white-space: nowrap; }
.mkl-wrap-text { white-space: normal; }
.mkl-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; display: inline-block; vertical-align: bottom; }
.mkl-good { color: var(--mk-good); }
.mkl-bad { color: var(--mk-bad); }
.mkl-warn { color: var(--mk-warn); }
.mkl-gap-16 { display: flex; flex-direction: column; gap: 16px; }
.mkl-gap-20 { display: flex; flex-direction: column; gap: 20px; }
.mkl-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--mk-soft); border-radius: var(--mk-radius-control); padding: 12px 14px; color: var(--mk-ink); white-space: pre-wrap; word-break: break-all; margin: 0; border: 1px solid var(--mk-line-soft); }
.mkl-kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--mk-soft); border-radius: 6px; padding: 1px 6px; color: var(--mk-ink); }
a.mkl-plain { color: inherit; text-decoration: none; }
a.mkl-plain:hover { text-decoration: underline; }
.mk-table td.mkl-left, .mk-table th.mkl-left { text-align: left; }
.mk-table tr.mkl-click { cursor: pointer; }
.mk-table td.mkl-check, .mk-table th.mkl-check { width: 36px; text-align: center; padding-left: 4px; padding-right: 4px; }
.mkl-check-input { width: 16px; height: 16px; accent-color: var(--mk-navy); cursor: pointer; margin: 0; vertical-align: middle; }

/* Layout de duas colunas (perfil do lead, construtor) */
.mkl-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.mkl-split--left { grid-template-columns: 360px minmax(0, 1fr); }
@container (max-width: 880px) { .mkl-split, .mkl-split--left { grid-template-columns: minmax(0, 1fr); } }

/* Listas de definição (dados do lead) */
.mkl-dl { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13px; }
.mkl-dl dt { color: var(--mk-muted); font-weight: 600; font-size: 12px; padding-top: 1px; }
.mkl-dl dd { margin: 0; color: var(--mk-ink); overflow-wrap: anywhere; }

/* Linha do tempo */
.mkl-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.mkl-timeline::before { content: ""; position: absolute; left: 16px; top: 6px; bottom: 6px; width: 1px; background: var(--mk-line); }
.mkl-tl { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 0 0 18px; }
.mkl-tl__icon { width: 34px; height: 34px; border-radius: var(--mk-radius-control); background: var(--mk-white); border: 1px solid var(--mk-line); display: grid; place-items: center; color: var(--mk-navy); position: relative; z-index: 1; }
.mkl-tl__icon .mk-i { width: 14px; height: 14px; }
.mkl-tl__icon--accent { background: var(--mk-navy); border-color: var(--mk-navy); color: var(--mk-yellow); }
.mkl-tl__head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.mkl-tl__title { font-weight: 700; color: var(--mk-ink); font-size: 13px; }
.mkl-tl__when { font-size: 12px; color: var(--mk-muted); }
.mkl-tl__body { margin-top: 6px; font-size: 13px; color: var(--mk-body); }
.mkl-tl__box { margin-top: 8px; background: var(--mk-soft); border-radius: var(--mk-radius-block); padding: 12px 14px; }
.mkl-tl__pages { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.mkl-tl__pages li { display: flex; gap: 8px; min-width: 0; }
.mkl-tl__pages time { color: var(--mk-muted); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.mkl-tl__pages span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Funil (kanban) */
.mkl-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.mkl-col { background: var(--mk-soft); border-radius: var(--mk-radius-block); padding: 12px; min-height: 200px; display: flex; flex-direction: column; gap: 10px; transition: background var(--mk-fast) var(--mk-ease); }
.mkl-col.is-over { background: var(--mk-yellow-soft); outline: 2px dashed var(--mk-yellow-dark); outline-offset: -2px; }
.mkl-col__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 4px; }
.mkl-col__title { font-size: 14px; font-weight: 700; color: var(--mk-ink); margin: 0; }
.mkl-col__meta { font-size: 12px; color: var(--mk-muted); font-variant-numeric: tabular-nums; text-align: right; }
.mkl-col__list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 290px); overflow-y: auto; min-height: 60px; padding: 2px; }
.mkl-card { background: var(--mk-white); border: 1px solid var(--mk-line); border-radius: var(--mk-radius-md); padding: 12px 14px; cursor: grab; box-shadow: var(--mk-shadow-sm); transition: transform var(--mk-fast) var(--mk-ease), box-shadow var(--mk-fast) var(--mk-ease); }
.mkl-card:hover { transform: translateY(-1px); box-shadow: var(--mk-shadow-card); }
.mkl-card.is-dragging { opacity: .5; }
.mkl-card__name { font-weight: 700; color: var(--mk-ink); font-size: 13.5px; margin: 0 0 2px; overflow-wrap: anywhere; }
.mkl-card__sub { font-size: 12px; color: var(--mk-muted); margin: 0; overflow-wrap: anywhere; }
.mkl-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--mk-muted); }
.mkl-card__value { font-weight: 700; color: var(--mk-ink); font-variant-numeric: tabular-nums; }
.mkl-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--mk-navy); color: var(--mk-yellow); font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; flex: 0 0 auto; }
.mkl-avatar--lg { width: 44px; height: 44px; font-size: 15px; border-radius: var(--mk-radius-md); }

/* Etapas do funil (etiquetas) */
.mkl-stage { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; border-radius: var(--mk-radius-pill); padding: 3px 9px; background: var(--mk-line-soft); color: var(--mk-body); white-space: nowrap; line-height: 1.2; }
.mkl-stage::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mk-faint); }
.mkl-stage--lead::before { background: var(--mk-series-3); }
.mkl-stage--oportunidade::before { background: var(--mk-series-2); }
.mkl-stage--negociacao::before { background: var(--mk-series-4); }
.mkl-stage--fechado::before { background: var(--mk-series-1); }
.mkl-stage--ganho { background: var(--mk-good-bg); color: var(--mk-good); }
.mkl-stage--ganho::before { background: var(--mk-good); }
.mkl-stage--perdido { background: var(--mk-bad-bg); color: var(--mk-bad); }
.mkl-stage--perdido::before { background: var(--mk-bad); }

/* Barra de ações em massa */
.mkl-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; background: var(--mk-navy); color: #fff; border-radius: var(--mk-radius-md); padding: 8px 10px 8px 16px; margin-bottom: 12px; }
.mkl-bulk strong { font-weight: 700; margin-right: auto; }
.mkl-bulk .mk-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.mkl-bulk .mk-btn--ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .6); }

/* Pílulas de tag removíveis e entrada de tags */
.mkl-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mkl-tagx { display: inline-flex; align-items: center; gap: 4px; }
.mkl-tagx button { border: 0; background: transparent; padding: 0; margin: 0 -2px 0 0; cursor: pointer; color: var(--mk-muted); display: inline-grid; place-items: center; }
.mkl-tagx button .mk-i { width: 9px; height: 9px; }
.mkl-tagx button:hover { color: var(--mk-ink); }
.mkl-suggest { position: relative; }
.mkl-suggest .mk-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; max-height: 240px; overflow-y: auto; }

/* Popover genérico ancorado */
.mkl-pop { position: absolute; z-index: 40; background: var(--mk-white); border: 1px solid var(--mk-line); border-radius: var(--mk-radius-md); box-shadow: var(--mk-shadow-pop); padding: 6px; min-width: 200px; }
.mkl-anchor { position: relative; display: inline-flex; }

/* Toasts */
.mkl-toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.mkl-toasts .mk-toast { position: static; transform: none; pointer-events: auto; }

/* Drop de arquivo */
.mk-dropzone { cursor: pointer; }

/* Gráfico: contêiner responsivo */
.mkl-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.mkl-chart .mk-chart__plot { position: relative; }
.mkl-chart text { font-size: 11px; fill: var(--mk-muted); font-variant-numeric: tabular-nums; }
.mkl-chart text.mk-chart__endlabel { font-size: 12px; font-weight: 700; fill: var(--mk-ink); }

/* Funil horizontal (relatório) */
.mkl-funnel { display: flex; flex-direction: column; gap: 10px; }
.mkl-funnel__row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px; gap: 14px; align-items: center; }
.mkl-funnel__label { font-weight: 600; color: var(--mk-ink); font-size: 13px; }
.mkl-funnel__track { height: 30px; background: var(--mk-soft); border-radius: 8px; overflow: hidden; }
.mkl-funnel__bar { height: 100%; background: var(--mk-navy); border-radius: 8px; min-width: 2px; transition: width .5s var(--mk-ease); }
.mkl-funnel__value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--mk-ink); }
.mkl-funnel__value small { display: block; font-weight: 500; color: var(--mk-muted); font-size: 11.5px; }
.mkl-funnel__rate { grid-column: 2; font-size: 12px; color: var(--mk-muted); margin: -4px 0 0; }
@media (max-width: 640px) { .mkl-funnel__row { grid-template-columns: 100px minmax(0, 1fr) 80px; gap: 8px; } }

/* Grade de duas colunas simples */
.mkl-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@container (max-width: 760px) { .mkl-grid2 { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  .mkl-card, .mkl-funnel__bar, #mk-screen.is-navigating { transition: none; }
}

/* Tabela com coluna de seleção: a coluna do nome continua à esquerda e presa */
.mk-table td.mkl-left .mk-cell-name { justify-content: flex-start; text-align: left; }
.mk-table th.mkl-left .mk-th { justify-content: flex-start; }
@media (min-width: 768px) {
  .mk-table .mkl-check + th.mkl-left, .mk-table .mkl-check + td.mkl-left { position: sticky; left: 36px; z-index: 1; background: inherit; }
}
