
/* período personalizado: só pelo pop-up (os campos antigos ficam escondidos; o código ainda lê os valores deles) */
#rsCustom, #cmCustom, #crCustom, #fiCustom, .pn3-cvcustom { display: none !important; }
.dp-ov { z-index: 1400; }
.dp-box { max-width: 420px; width: calc(100vw - 32px); }
.dp-sub { margin: 0 0 4px; font-size: 13px; opacity: .8; }
.dp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.dp-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--nx-muted-hi, #cbd2d9); }
.dp-row input { min-height: 44px; box-sizing: border-box; border-radius: var(--nx-r-ctl, 14px); padding: 0 12px; border: 1px solid var(--nx-glass-bd, rgba(255,255,255,.14)); background: transparent; color: var(--nx-text, #fff); font: inherit; color-scheme: dark light; }
.dp-err { min-height: 18px; margin-top: 10px; font-size: 12px; color: var(--nx-no, #F87171); }
@media (max-width: 480px) { .dp-row { grid-template-columns: 1fr; } }

/* o "i" sempre do lado OPOSTO do texto, com espaço entre os dois */
.x7-thw { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
th.r .x7-thw { flex-direction: row-reverse; }
.cr-lab { justify-content: space-between; gap: 12px; }
.cr-dm small { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rsdd-lab { justify-content: space-between; gap: 12px; }

/* Criativos: Lucro e ROAS verdes (positivo), vermelhos (negativo) e brancos (zero); nome e número juntos, como no Resumo */
#page-criativos .cr-cg .pos small, #page-criativos .cr-cg .pos b, #page-criativos .cr-dm.pos small, #page-criativos .cr-dm.pos b, #page-criativos td.pos { color: var(--nx-ok, #4ADE80) !important; }
#page-criativos .cr-cg .neg small, #page-criativos .cr-cg .neg b, #page-criativos .cr-dm.neg small, #page-criativos .cr-dm.neg b, #page-criativos td.neg { color: var(--nx-no, #F87171) !important; }

/* ícone de bump, upsell e downsell maior */
.nc-role { width: 22px; height: 22px; margin-right: 8px; vertical-align: -5px; }
.nc-role svg { width: 22px; height: 22px; }

/* Resumo: Vendas por Pagamento e Taxa de Aprovação maiores (ícone, texto, número e bolinhas) */
#page-resumo .rs-leg { font-size: 16px; gap: 14px; }
#page-resumo .rs-leg li { grid-template-columns: 16px 1fr minmax(130px, 1.3fr) 150px; column-gap: 10px; }
#page-resumo .rs-leg i { width: 14px; height: 14px; }
#page-resumo .rs-leg .rs-lm { gap: 8px; }
#page-resumo .rs-leg .rs-lm svg, #page-resumo .rs-arow svg:not(.rs-rg) { width: 1.35em; height: 1.35em; }
#page-resumo .rs-appr { gap: 18px; }
#page-resumo .rs-arow { font-size: 16px; grid-template-columns: minmax(0, 1fr) 40px 96px; }
#page-resumo .rs-arow .rs-rg { width: 40px; height: 40px; }
#page-resumo .rs-arow b { font-size: 17px; }

/* Lucro e Escala, Lucro diário: Data e Gasto ficam fixos ao rolar para o lado (como as colunas congeladas da planilha) */
.es-dtbl th:nth-child(1), .es-dtbl td:nth-child(1) { position: sticky; left: 0; z-index: 3; background: var(--nx-solid-bg, #161718); min-width: 112px; width: 112px; }
.es-dtbl th:nth-child(2), .es-dtbl td:nth-child(2) { position: sticky; left: 112px; z-index: 3; background: var(--nx-solid-bg, #161718); box-shadow: 1px 0 0 var(--nx-glass-bd, rgba(255,255,255,.14)); }

/* Integrações: todo pop-up cabe na tela; só o miolo rola e os botões do rodapé ficam sempre à vista */
#igOv { align-items: center; padding: 12px; }
#igOv .pg-modal { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
#igOv .mx-ft, #igOv .pg-acts { position: sticky; bottom: 0; z-index: 5; margin-top: 12px; padding: 12px 0 4px; background: linear-gradient(var(--nx-card-strong-bg), var(--nx-card-strong-bg)), var(--nx-bg); box-shadow: 0 -10px 12px -10px rgba(0,0,0,.45); }
@media (max-width: 700px) { #igOv { padding: 8px; } #igOv .pg-modal { max-height: calc(100dvh - 16px); } }

/* Carteira: taxas e prazos */
.x7-fg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.x7-fc h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; opacity: .8; }
.x7-fr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--nx-glass-bd, rgba(255,255,255,.1)); font-size: 14px; }
.x7-fr:last-child { border-bottom: 0; }
.x7-fr small { display: block; font-size: 11px; opacity: .65; margin-top: 2px; }
.x7-fr b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .x7-fg { grid-template-columns: minmax(0, 1fr); } }

/* Vendas por Pagamento: a legenda fica SEMPRE ao lado da rosca; rosca, textos e bolinhas encolhem junto com o card */
#page-resumo .rs-donut { flex-wrap: nowrap; gap: clamp(8px, 4cqw, 22px); container-type: inline-size; width: 100%; min-width: 0; }
#page-resumo .rs-donut .rs-chartbox.rs-cb-d, #page-resumo .rl-el.rl-fixed .rs-donut .rs-chartbox.rs-cb-d { flex: 0 1 42%; width: 42%; max-width: 190px; min-width: 56px; height: auto; aspect-ratio: 1; }
#page-resumo .rs-donut .rs-dc b { font-size: clamp(13px, 12cqw, 26px); } #page-resumo .rs-donut .rs-dc small { font-size: clamp(8px, 4cqw, 12px); }
#page-resumo .rs-donut .rs-leg { flex: 1 1 0; min-width: 0; font-size: clamp(10px, 4.6cqw, 16px); gap: clamp(5px, 2.6cqw, 14px); }
#page-resumo .rs-donut .rs-leg li { grid-template-columns: .9em minmax(0, 1fr) 6.6em; column-gap: clamp(4px, 2cqw, 10px); }
#page-resumo .rs-donut .rs-leg i { width: .9em; height: .9em; } #page-resumo .rs-donut .rs-leg .rs-lm { gap: .4em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-resumo .rs-donut .rs-leg span { white-space: nowrap; }
#page-resumo .rs-donut .rs-leg .rs-lm { justify-content: flex-start; text-align: left; } #page-resumo .rs-donut .rs-leg span { justify-self: end; }
/* legenda: bolinha | ícone + nome (coluna reta, no meio) | valor à direita */
#page-resumo .rs-donut .rs-leg .rs-lm { grid-column: 2; justify-self: center; width: 8.5em; max-width: 100%; box-sizing: border-box; justify-content: flex-start; }
#page-resumo .rs-donut .rs-leg .rs-lm svg { flex: 0 0 auto; } #page-resumo .rs-donut .rs-leg span { grid-column: 3; }
#page-resumo .rs-donut .rs-leg span { text-align: right; }
#page-resumo .rs-donut .rs-leg .rs-lm { justify-self: start; width: auto; max-width: none; margin-left: clamp(0px, 7cqw, 40px); overflow: visible; } #page-resumo .rs-donut .rs-leg li { grid-template-columns: .9em minmax(0, 1fr) 5.8em; }
