/* Dashboard de Performance e Dashboard Personalizado (25/11/2026). Classes d6-*, por cima das d4-* (dash4.css).
   Cartões brancos com a borda do painel; o ícone da plataforma ao lado de todo número que vem dela. */
.d6 { --d6-cab: #F6F8FB; }
.d6-tit { margin: 0; font-size: 16px; font-weight: 750; color: var(--d4-ink); letter-spacing: -.01em; }
.d6-sec { margin: 0 0 16px; }

/* ícones das plataformas */
.d6-ico { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; vertical-align: -5px; }
.d6-ico svg { width: 100%; height: 100%; display: block; }
.d6-icos { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.d6-icos:empty { display: none; }
.d6-logo { display: inline-flex !important; align-items: center; gap: 6px; font-size: 13px !important; font-weight: 700; color: var(--d4-ink) !important; }
.d6-logo .d6-ico { width: 22px; height: 22px; }
.d4-cab h3 .d6-icos { margin-right: 7px; vertical-align: -4px; }

/* ------------------------------------------------------------ os 6 cards escolhíveis */
.d6-cards { margin: 0 0 18px; }
.d6-cards-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; margin: 0 0 10px; }
.d6-cards-topo > span { font-size: 12.5px; color: var(--d4-muted); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.d6-cards-topo .link-btn { font-size: 12.5px; }
.d6-cards-grade { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.d6-card { gap: 6px; }
.d6-card-cab { display: flex; align-items: center; gap: 6px; min-width: 0; }
.d6-card-cab .d6-ico { width: 18px; height: 18px; }
.d6-card-sel { position: relative; flex: 1 1 auto; min-width: 0; display: block; }
.d6-card-sel select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 30px; margin: 0; padding: 4px 22px 4px 6px; border: 1px solid transparent;
  border-radius: 8px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 7px center;
  font: inherit; font-size: 13px; font-weight: 650; color: var(--d4-ink2); line-height: 1.25; cursor: pointer; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; margin-left: -6px; }
.d6-card-sel select:hover { border-color: var(--d4-borda); background-color: #F7F9FC; }
.d6-card-sel select:focus-visible { outline: 2px solid var(--azul, #0A5BF0); outline-offset: 0; }

/* ------------------------------------------------------------ funis Meta | Google em duas colunas */
.d6-funis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 18px; align-items: start; }
.d6-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--d4-cor) 4%, #F9FAFC); border: 1px solid color-mix(in srgb, var(--d4-cor) 16%, var(--d4-borda)); }
.d6-col-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 4px 0; }
.d6-col-topo .d6-ico { width: 26px; height: 26px; }
.d6-col-topo h2, .d6-bloco-topo h2 { flex: 0 1 auto; width: auto; text-align: left; }
.d6-col-topo > span:not(.d6-ico) { margin-left: auto; font-size: 13px; color: var(--d4-ink2); font-weight: 600; }
.d6-col-corpo { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.d6-funis-um { grid-template-columns: minmax(0, 1fr); }
.d6-funis-um .d6-col-corpo { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; }
.d6-funis-um .d6-caixa-funil { order: -1; }
.d6-cab-funil { align-items: center; }
.d6-limpar { max-width: min(100%, 300px); }

/* tabelas d6: 5 linhas à vista (o JS mede), cabeçalho preso */
.d6-rola { max-height: 300px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--d4-borda); border-radius: 10px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch; background: var(--bg, #fff); }
.d6-rola-ad { max-height: 520px; }
.d6-tab { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; margin: 0; }
.d6-tab thead th { position: sticky; top: 0; z-index: 2; background: var(--d6-cab); font-size: 12.5px; font-weight: 650; color: var(--d4-ink2);
  padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--d4-borda); white-space: nowrap; cursor: pointer; user-select: none; }
.d6-tab thead th.dir { text-align: right; }
.d6-tab tbody td { padding: 8px 10px; border-bottom: 1px solid #EEF1F5; vertical-align: middle; color: var(--d4-ink); }
.d6-tab tbody tr:last-child td { border-bottom: 0; }
.d6-tab td.dir { text-align: right; white-space: nowrap; }
.d6-tab td.dir small { display: block; font-size: 11.5px; color: var(--d4-muted); font-weight: 500; }
.d6-tab td small { color: var(--d4-muted); font-size: 12px; }
.d6-sel tbody tr { cursor: pointer; }
.d6-sel tbody tr:hover td { background-color: #F7F9FC; }
.d6-sel tbody tr:focus-visible { outline: 2px solid var(--m-azul, #1D4ED8); outline-offset: -2px; }
.d6-sel tbody tr.sel td { background: color-mix(in srgb, var(--m-azul, #1D4ED8) 9%, #fff); }
.d6-sel tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--m-azul, #1D4ED8); }
.d6-sel { table-layout: fixed; }
.d6-sel thead th:first-child { width: auto; }
.d6-sel thead th:not(:first-child) { width: 76px; }
.d6-sel thead th { white-space: normal; overflow-wrap: normal; hyphens: auto; line-height: 1.2; vertical-align: bottom; }
.d6-tab-camp thead th:nth-child(2), .d6-tab-conj thead th:nth-child(2) { width: 92px; }
.d6-tab-ad thead th:not(:first-child) { width: 100px; }
.d6-nome { min-width: 0; }
.d6-nome b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.d6-nome b .d6-ico { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.d6-nome small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d6-parte { min-width: 64px; }
.d6-parte i { display: block; height: 4px; margin-top: 4px; border-radius: 999px; background: #EEF1F6; overflow: hidden; }
.d6-parte i b { display: block; height: 100%; border-radius: 999px; background: var(--d4-cor, var(--m-azul, #1D4ED8)); }
.d6-mini { display: block; height: 4px; margin-top: 4px; border-radius: 999px; background: #EEF1F6; overflow: hidden; min-width: 50px; }
.d6-mini b { display: block; height: 100%; border-radius: 999px; background: #1FA855; }
.d6-pos { color: #146C2E; font-weight: 650; } .d6-neg { color: #B42318; font-weight: 650; }

/* anúncios: imagem grande ao lado do nome */
.d6-nome-img { white-space: nowrap; }
.d6-img { position: relative; display: inline-block; width: 96px; height: 96px; margin-right: 12px; border-radius: 10px; overflow: hidden;
  background: #F1F3F7; vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .06); }
.d6-img > span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 700; color: #98A2B3; }
.d6-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d6-nome-txt { display: inline-flex; flex-direction: column; gap: 3px; width: calc(100% - 110px); vertical-align: middle; min-width: 0; }
.d6-tab-ad .d6-nome b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; }

/* tabela por dia (grupos, loja, resultados) */
.d6-dias { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.d6-dias.d6-dois { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.d6-dia td:first-child { white-space: nowrap; }
.d6-desemp .d4-grade { align-items: start; }
.d6-rodape { text-align: center; }

/* ------------------------------------------------------------ Personalizado */
.d6-pers-topo { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 14px; }
.d6-pers-topo > span { font-size: 13px; color: var(--d4-muted); }
.d6-ancoras { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.d6-ancoras a { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--d4-borda);
  background: var(--bg, #fff); font-size: 13.5px; font-weight: 650; color: var(--d4-ink); text-decoration: none; }
.d6-ancoras a:hover { background: #F7F9FC; }
.d6-bloco { margin: 0 0 22px; padding: 16px; border-radius: 16px; scroll-margin-top: 80px;
  background: color-mix(in srgb, var(--d4-cor) 4%, #F9FAFC); border: 1px solid color-mix(in srgb, var(--d4-cor) 16%, var(--d4-borda)); }
.d6-bloco-topo { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; }
.d6-bloco-topo .d6-ico { width: 28px; height: 28px; }
.d6-faixa { margin: 0 0 14px; }
.d6-bloco .d4-grade { margin-top: 0; }
.d6-bloco .d6-dia { margin-top: 0; }
.d6-pipe { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.d6-pipe li { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto 52px; align-items: center; gap: 10px; font-size: 13.5px; }
.d6-pipe-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--d4-ink); font-weight: 600; }
.d6-pipe-barra { height: 14px; border-radius: 5px; background: #EEF1F6; overflow: hidden; }
.d6-pipe-barra i { display: block; height: 100%; border-radius: 5px; background: var(--d4-cor, #1A7F4B); }
.d6-pipe small { color: var(--d4-muted); font-size: 12px; text-align: right; }

/* ------------------------------------------------------------ larguras */
@container (max-width: 1100px) {
  .d6-cards-grade { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (max-width: 1000px) {
  .d6-sel thead th:not(:first-child) { width: 66px; }
}
@container (max-width: 720px) {
  .d6-funis { grid-template-columns: minmax(0, 1fr); }
  .d6-funis-um .d6-col-corpo { grid-template-columns: minmax(0, 1fr); }
  .d6-dias.d6-dois { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 620px) {
  .d6-cards-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .d6-col, .d6-bloco { padding: 10px; border-radius: 14px; }
  .d6-tab { font-size: 13px; }
  .d6-tab thead th, .d6-tab tbody td { padding: 7px 7px; }
  .d6-img { width: 64px; height: 64px; margin-right: 8px; }
  .d6-nome-txt { width: calc(100% - 74px); }
  .d6-sel thead th:not(:first-child) { width: 62px; }
  .d6-tab-ad th:nth-child(4), .d6-tab-ad td:nth-child(4), .d6-tab-camp th:nth-child(4), .d6-tab-camp td:nth-child(4),
  .d6-tab-conj th:nth-child(4), .d6-tab-conj td:nth-child(4) { display: none; }
  .d6-tab-ad thead th:not(:first-child), .d6-tab-camp thead th:nth-child(2), .d6-tab-conj thead th:nth-child(2) { width: 74px; }
  .d6-tab-camp thead th:nth-child(3), .d6-tab-conj thead th:nth-child(3) { width: 62px; }
  .d6-sel thead th { font-size: 11.5px; padding-left: 5px; padding-right: 5px; }
  .d6-tab-ad .d6-nome b .d6-ico { display: none; }
  .d6-pipe li { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) auto; }
  .d6-pipe small { display: none; }
  .d6-col-topo > span:not(.d6-ico) { margin-left: 0; flex-basis: 100%; }
}
@media print {
  .d6-rola { max-height: none !important; overflow: visible; }
  .d6-card-sel select { background-image: none; }
  .d6-ancoras, .d6-rodape { display: none; }
}
