/* Scoped producer UX: no public checkout, PDV or global component changes. */
#area_graficos .modal-legal-content {max-width:1000px !important;width:calc(100% - 24px);}
#area_graficos .fila-superior-graficos {align-items:flex-start;}
#area_graficos .box-pizza {flex:0 0 240px;max-width:100%;align-self:flex-start;}
#area_graficos .box-legenda {flex:1;min-width:0;}
#area_graficos .lista-legenda {height:284px;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:0 6px 0 0;margin:0;display:flex;flex-direction:column;gap:10px;}
#area_graficos .item-legenda {box-sizing:border-box;height:88px;min-height:88px;padding:12px;flex-shrink:0;}
#area_graficos .nome-legenda {overflow-wrap:anywhere;}
#area_graficos .insights-cards {display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;}
#sales_insights article {background:white;border:1px solid #dfe7e2;border-radius:9px;padding:14px;display:flex;flex-direction:column;gap:8px;min-width:0;}
#sales_insights article span,#sales_insights article small,.insights-note {color:#617169;font-size:12px;line-height:1.5;}
#sales_insights article strong {font-size:19px;color:#234c35;overflow-wrap:anywhere;}
#sales_insights h4 {font-size:16px;color:#294a36;margin:20px 0 12px;}
#sales_insights label {font-size:13px;color:#42574a;display:block;}
#sales_insights select,#sales_insights input {margin:6px 0 12px;max-width:100%;}
.insights-filtros,#insights_custom:not([hidden]) {display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;}
.insights-section {margin-top:20px;border-top:1px solid #dfe7e2;padding-top:6px;}
.insights-chart {height:260px;position:relative;}
.insights-table {max-height:300px;overflow:auto;background:white;border:1px solid #dfe7e2;border-radius:8px;}
.insights-table table {width:100%;border-collapse:collapse;font-size:13px;}
.insights-table th,.insights-table td {padding:12px;text-align:left;border-bottom:1px solid #edf0ee;}
.insights-table th {position:sticky;top:0;background:#edf4ef;}
.insights-funnel {padding-left:24px;font-size:13px;line-height:1.8;color:#42574a;}
#area_lista_compradores .modal-legal-content {max-width:850px !important;}
#area_lista_compradores .modal-legal-body {min-height:0;}
#area_lista_compradores #participantes_resultados {font-size:12px;color:#617169;margin:8px 0;}
#ul_compradores {height:400px !important;max-height:50vh !important;flex:none;overscroll-behavior:contain;overflow-anchor:none;}
#ul_compradores > .participante-linha {box-sizing:border-box;height:88px;min-height:88px;flex-direction:row;align-items:center !important;}
#ul_compradores > .participante-linha > div:first-child {min-width:0;}
#ul_compradores > .participante-linha > div:last-child {margin-left:auto;}
#ul_compradores > .participantes-espaco {padding:0 !important;border:0 !important;display:block !important;min-height:0;}
#ul_compradores > .participantes-vazio {font-size:13px;padding:20px;}
#btn_lista_participantes {background:#f0f4f8;color:#29445a;border:1px solid #d6dfe7;border-radius:6px;font-weight:600;}
#tela_estatisticas .stats-configuracoes {margin:0 12px;min-height:40px;width:auto;}
#modal_gerenciar_promo .promo-abrir {background:#eee8f7;color:#654296;border:1px solid #d8cbe9;border-radius:6px;padding:8px 10px;font-weight:600;flex-shrink:0;}
@media(max-width:700px){
 #area_graficos .fila-superior-graficos {flex-direction:column;align-items:stretch;}
 #area_graficos .box-pizza {flex:auto;width:100%;display:flex;flex-direction:column;align-items:center;}
 #area_graficos .box-legenda {width:100%;}
 #area_graficos .modal-legal-body {padding:16px !important;}
 #tela_estatisticas .stats-configuracoes {font-size:12px;margin:0 6px;padding:6px;}
}
@media(max-width:600px){
 #ul_compradores > .participante-linha {height:136px;min-height:136px;flex-direction:column;gap:8px !important;}
 #ul_compradores > .participante-linha > div:first-child {width:100%;min-height:54px;}
 #ul_compradores > .participante-linha > div:first-child > div:last-child > span,#ul_compradores > .participante-linha > div:first-child > div:last-child > small {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden !important;line-height:1.3;}
 #ul_compradores > .participante-linha > div:last-child {width:100%;}
 #modal_gerenciar_promo .promo-abrir {font-size:12px;padding:8px 6px;}
 .insights-cards {grid-template-columns:1fr !important;}
}

/* Allow the added settings action to wrap without clipping the visibility toggle. */
#tela_estatisticas .stats-cabecalho-acoes {flex-wrap:wrap;gap:12px;}
#tela_estatisticas .stats-cabecalho-acoes > * {max-width:100%;box-sizing:border-box;}
#tela_estatisticas .stats-cabecalho-acoes .toggle-stats-wrapper {margin-left:auto;}
@media(max-width:600px){
 #tela_estatisticas .stats-cabecalho-acoes {justify-content:flex-start !important;}
 #tela_estatisticas .stats-cabecalho-acoes .btn-voltar-stats {flex:1 1 135px;}
 #tela_estatisticas .stats-cabecalho-acoes .stats-configuracoes {flex:0 1 auto;margin:0;}
 #tela_estatisticas .stats-cabecalho-acoes .toggle-stats-wrapper {flex:1 0 100%;align-items:flex-start !important;margin-left:0;}
}

/* Own events list: bounded vertical scroll; the partner section remains in normal flow. */
#div_eventos {max-height:660px;overflow-y:auto;overscroll-behavior:contain;padding-right:6px;scrollbar-gutter:stable;}
#tela_estatisticas .painel-link-evento .stats-configuracoes {margin:0;min-height:40px;background:#eef3f6;color:#29445a;border:1px solid #d6dfe7;border-radius:6px;padding:8px 14px;}
#tela_estatisticas #btn_lista_participantes,#tela_estatisticas #btn_validar_codigo {height:44px !important;min-height:44px !important;box-sizing:border-box;min-width:110px !important;padding:8px 14px !important;font-size:14px;line-height:20px;}
.participantes-toolbar label {display:flex;gap:12px;align-items:center;font-size:13px;}
.participantes-toolbar select {width:auto;margin:0;}
.participantes-resumo {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px;}
.participantes-resumo > div {padding:12px;background:#f1f6f3;border:1px solid #dde7e0;border-radius:8px;}
.participantes-resumo span {display:block;font-size:12px;color:#52685a;}
.participantes-resumo strong {display:block;font-size:21px;margin-top:6px;color:#234c35;overflow-wrap:anywhere;}
.sales-funnel {list-style:none;padding:0;display:grid;gap:12px;margin:16px 0;}
.sales-funnel li {display:flex;gap:14px;padding:16px;border:1px solid #d7e4da;border-radius:8px;background:linear-gradient(110deg,#eef5f0,white);}
.sales-funnel li:nth-child(2) {margin-left:20px;}
.sales-funnel li:nth-child(3) {margin-left:40px;}
.funnel-step {display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:#2a7749;color:white;border-radius:50%;flex:none;font-size:15px;font-weight:bold;}
.sales-funnel h5 {font-size:14px;margin:0 0 8px;color:#294a36;}
.sales-funnel strong {font-size:21px;color:#234c35;}
.sales-funnel p {font-size:12px;color:#607067;line-height:1.5;margin:8px 0 0;}
.funnel-rates {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.funnel-rates p {padding:12px;background:white;border:1px solid #dfe7e2;border-radius:8px;margin:0;}
.funnel-rates b,.funnel-rates strong,.funnel-rates small {display:block;line-height:1.5;margin:4px 0;font-size:12px;overflow-wrap:anywhere;}
.funnel-rates strong {font-size:16px;color:#234c35;}
@media(max-width:600px){#div_eventos {max-height:430px;} .participantes-resumo {gap:6px;} .participantes-resumo>div {padding:9px;} .participantes-resumo strong {font-size:18px;} .funnel-rates {grid-template-columns:1fr;} .sales-funnel li:nth-child(2) {margin-left:10px;} .sales-funnel li:nth-child(3) {margin-left:20px;}}

.participantes-progresso {height:14px;margin-top:14px;overflow:hidden;border-radius:999px;background:#e4e9e6;}
.participantes-progresso span {display:block;height:100%;background:#2c8750;border-radius:999px;transition:width .2s;}
.participantes-progresso[data-completo="false"] {background:repeating-linear-gradient(45deg,#e5e9e7,#e5e9e7 6px,#f4f6f5 6px,#f4f6f5 12px);}

/* The new summary stays visible; only the participant list consumes remaining space. */
#area_lista_compradores .modal-legal-content {height:min(780px,90dvh);max-height:90dvh;padding:0;}
#area_lista_compradores .modal-legal-body {display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden;}
#area_lista_compradores .modal-legal-body > :not(#ul_compradores) {flex:0 0 auto;}
#area_lista_compradores .participantes-progresso {flex:0 0 14px;min-height:14px;height:14px;}
#area_lista_compradores #ul_compradores {flex:1 1 160px !important;min-height:120px;height:auto !important;max-height:none !important;overflow-y:auto;}
