/* Estrutura (padrão do projeto original): BuddyPanel em coluna à esquerda, de ponta a ponta; cabeçalho de 76 px ao lado dela; conteúdo e rodapé na sequência. */
body.admin-bar { --pd-top: 32px; }
@media (max-width: 782px) { body.admin-bar { --pd-top: 46px; } }

/* Cabeçalho */
.pd-header {
	position: fixed; top: var(--pd-top); left: 0; right: 0; z-index: 100;
	display: flex; align-items: center; gap: 12px;
	height: var(--pd-header-h); padding: 0 30px;
	background: var(--pd-surface); box-shadow: var(--pd-shadow-header);
	transition: left .2s ease;
}
body.pd-has-panel .pd-header { left: var(--pd-panel-w-closed); }
html.pd-panel-open body.pd-has-panel .pd-header { left: var(--pd-panel-w); }
.pd-brand { display: flex; align-items: center; flex: 0 0 auto; margin-right: auto; }
.pd-brand img, .pd-brand .custom-logo { display: block; max-height: 44px; width: auto; }
.pd-brand__text { font-family: var(--pd-font-display); font-size: 30px; color: var(--pd-heading); font-weight: 500; }
.pd-header__actions { display: flex; align-items: center; gap: 6px; }
.pd-header__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--pd-muted-link); cursor: pointer; }
.pd-header__btn:hover { background: var(--pd-nav-hover); color: var(--pd-text); }
.pd-header__badge { position: absolute; top: -2px; right: -4px; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pd-accent-bg); color: #fff; font-size: 10.5px; font-weight: 600; line-height: 18px; text-align: center; }
.pd-header__sep { width: 1px; height: 24px; margin: 0 6px; background: var(--pd-border); }
.pd-user-menu { position: relative; }
.pd-user { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--pd-heading); font: inherit; font-size: 15px; cursor: pointer; }
.pd-user:hover { color: var(--pd-accent-text); }
.pd-user__chev { display: flex; color: var(--pd-muted-link); }
.pd-user__avatar { border-radius: 50%; display: block; }
/* Menu da conta, nas medidas do portal anterior (medidas ao vivo a 1440 px): painel de 187 px, linhas de 37 px, texto de 13 px, ícones de 18 px */
.pd-user-menu__list { position: absolute; right: -22px; top: calc(100% + 5px); z-index: 60; width: 187px; margin: 0; padding: 10px 0; background: var(--pd-surface); border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .06); }
.pd-user-menu__list::before { content: ""; position: absolute; top: -7px; left: 108px; width: 14px; height: 14px; background: var(--pd-surface); transform: rotate(45deg); box-shadow: -2px -2px 3px rgba(0, 0, 0, .04); }
.pd-user-menu__head { display: flex; align-items: center; gap: 10px; margin: 0; padding: 15px; color: var(--pd-heading); }
.pd-user-menu__avatar { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.pd-user-menu__who { display: flex; flex-direction: column; min-width: 0; }
.pd-user-menu__who strong { margin-bottom: 2px; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--pd-heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-user-menu__who span { font-size: 13px; line-height: 1.2; color: var(--pd-muted-text); }
.pd-user-menu__items { margin: 0; padding: 0; list-style: none; }
.pd-user-menu__items > li { position: relative; margin: 0; }
.pd-user-menu__items a { display: flex; align-items: center; gap: 5px; margin: 0; padding: 10px 15px; color: var(--pd-text); font-size: 13px; line-height: 14.95px; }
.pd-user-menu__items a svg { flex: 0 0 18px; width: 18px; height: 18px; color: #8C8F94; }
.pd-user-menu__items a:hover, .pd-user-menu__head:hover { background: var(--pd-nav-hover); color: var(--pd-accent-text); }
.pd-user-menu__items a:hover svg { color: var(--pd-accent-text); }
.pd-user-menu__badge { margin-left: auto; padding: 1px 7px; border-radius: 10px; background: var(--pd-accent-bg); color: #fff; font-size: 10px; font-style: normal; font-weight: 600; line-height: 15px; }

/* Submenus (ao passar o mouse ou focar), abrindo ao lado */
.pd-user-menu__sub { display: none; position: absolute; right: calc(100% + 4px); top: -10px; z-index: 61; min-width: 190px; margin: 0; padding: 10px 0; list-style: none; background: var(--pd-surface); border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .06); }
.pd-user-menu__items li.has-sub:hover > .pd-user-menu__sub, .pd-user-menu__items li.has-sub:focus-within > .pd-user-menu__sub { display: block; }
.pd-user-menu__sub a { display: block; margin: 0; padding: 10px 15px; color: var(--pd-text); font-size: 13px; }
@media (max-width: 900px) { .pd-user-menu__sub { display: none !important; } }

.pd-panel-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--pd-muted-link); cursor: pointer; }
.pd-panel-toggle:hover { background: var(--pd-nav-hover); color: var(--pd-text); }
.pd-panel-toggle--mobile { display: none; }
/* Busca: ícone na barra; ao abrir, o campo cobre o cabeçalho */
.pd-search { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 0 30px; background: var(--pd-surface); }
.pd-search[hidden] { display: none; }
.pd-search__icon { display: flex; color: var(--pd-muted); }
.pd-search input { flex: 1 1 auto; height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 18px; color: var(--pd-text); }
.pd-search input:focus { outline: none; box-shadow: none; }

/* BuddyPanel */
.pd-panel {
	position: fixed; left: 0; top: var(--pd-top); bottom: 0; z-index: 110;
	width: var(--pd-panel-w-closed);
	background: var(--pd-surface); box-shadow: var(--pd-shadow-panel);
	overflow-x: hidden; overflow-y: auto;
	transition: width .2s ease;
}
html.pd-panel-open .pd-panel { width: var(--pd-panel-w); }
.pd-panel__top { display: flex; align-items: center; height: var(--pd-header-h); padding: 0 16px; }
.pd-panel__list { list-style: none; margin: 0; padding: 4px 0 24px; }
.pd-panel__item a {
	display: flex; align-items: center; gap: 14px;
	height: 52px; padding: 0 24px; margin: 0;
	color: var(--pd-text); white-space: nowrap; font-size: 14px;
}
.pd-panel__icon { display: flex; flex: 0 0 24px; justify-content: center; color: var(--pd-muted-link); }
.pd-panel__icon i { font-size: 20px; line-height: 1; } /* menu-icons do antigo: bb-icons, 20 px */
.pd-panel__label { flex: 1 1 auto; opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility 0s linear .15s; pointer-events: none; }
html.pd-panel-open .pd-panel__label { opacity: 1; visibility: visible; transition-delay: 0s; pointer-events: auto; }
.pd-panel__badge {
	position: absolute; margin-left: 28px; margin-top: -22px;
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--pd-accent-bg); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}
html.pd-panel-open .pd-panel__badge { position: static; margin: 0; background: var(--pd-soft); color: var(--pd-text); font-size: 12px; min-width: 24px; height: 24px; line-height: 24px; border-radius: 12px; }
.pd-panel__item a:hover { background: var(--pd-nav-hover); color: var(--pd-text); }
.pd-panel__item a:hover .pd-panel__icon { color: var(--pd-nav-active); }
.pd-panel__item.is-active a { background: var(--pd-nav-active); color: #fff; }
.pd-panel__item.is-active .pd-panel__icon { color: #fff; }
.pd-panel__item--news .pd-panel__icon { color: #0284C7; }
.pd-panel__item--news .pd-panel__label { font-weight: 700; color: #1E293B; }
.pd-panel__item--campaign .pd-panel__icon { color: var(--pd-accent-text); }
.pd-panel__item--campaign .pd-panel__label { font-weight: 700; color: var(--pd-accent-text); }
.pd-panel__item.is-active .pd-panel__label { color: #fff; }

/* Conteúdo */
.pd-shell { min-height: 100vh; padding-top: var(--pd-header-h); display: flex; flex-direction: column; }
body.pd-has-panel .pd-shell { margin-left: var(--pd-panel-w-closed); transition: margin-left .2s ease; }
html.pd-panel-open body.pd-has-panel .pd-shell { margin-left: var(--pd-panel-w); }
.pd-main { flex: 1 0 auto; padding: 30px 40px 35px; }
.pd-container { max-width: 1000px; margin: 0 auto; }
.pd-container--wide { max-width: 1400px; }
.pd-container.pd-container--bp { max-width: 1180px; }
.pd-page-title { margin-bottom: 24px; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

/* Rodapé */
.pd-footer { flex-shrink: 0; background: var(--pd-surface); color: #5A5A5A; font-size: 13px; }
.pd-footer__inner { padding: 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.pd-footer__left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.pd-footer__copy { margin: 0; }
.pd-footer__menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.pd-footer__menu a { color: #5A5A5A; }
.pd-footer__menu a:hover { color: var(--pd-accent-text); }
.pd-social { margin: 0; padding: 0; list-style: none; display: flex; gap: 8px; }
.pd-social a { display: flex; align-items: center; justify-content: center; width: 32px; height: 36px; color: #5A5A5A; }
.pd-social a:hover { color: var(--pd-accent-text); }

/* Celular (até 799 px, como no portal anterior): a BuddyPanel vira gaveta em tela cheia e o botão sobe para o cabeçalho */
@media (max-width: 799px) {
	.pd-header, body.pd-has-panel .pd-header, html.pd-panel-open body.pd-has-panel .pd-header { left: 0; padding: 0 12px; gap: 8px; }
	.pd-panel-toggle--mobile { display: inline-flex; }
	.pd-panel__top { display: none; }
	.pd-search { padding: 0 12px; }
	.pd-user__name, .pd-user__chev { display: none; }
	.pd-header__sep { display: none; }
	.pd-header__actions .pd-btn { white-space: nowrap; padding: 0 14px; min-height: 38px; font-size: 14px; }
	.pd-brand { margin-right: auto; }
	.pd-panel { top: var(--pd-top); bottom: 0; width: 100%; z-index: 1000; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
	.pd-header__btn--msgs, .pd-user-menu { display: none; }
	body.pd-panel-mobile-open .pd-panel { transform: none; visibility: visible; transition-delay: 0s; }
	.pd-panel__label { opacity: 1; visibility: inherit; pointer-events: auto; }
	body.pd-has-panel .pd-shell, html.pd-panel-open body.pd-has-panel .pd-shell { margin-left: 0; }
	.pd-main { padding: 20px 20px 36px; }
	.pd-footer__inner { padding: 20px 14px; }
}


/* Cabeçalho: conteúdo num contêiner centralizado de ~1308 px (avatar a 96 px da borda em 1440 px, 336 px em 1920 px), como no portal anterior */
@media (min-width: 1100px) { .pd-header { padding-left: max(40px, calc(50% - 624px)); padding-right: max(40px, calc(50% - 624px)); } }

/* Barra de administração: item do Promoter (o CSS do plugin só carrega no painel); medidas do portal anterior */
#wpadminbar #wp-admin-bar-promoter-admin-bar > a.ab-item { display: flex; align-items: center; padding: 0 8px 0 7px; }
#wpadminbar .promoter-admin-bar__icon { display: block; width: 20px; height: 20px; margin: 0 5px 0 0; }
#wpadminbar .promoter-admin-bar__icon svg { display: inline; width: 20px; height: 19px; margin-top: 2px; }
#wpadminbar .promoter-admin-bar__text { display: block; }

/* Atalho "DA Summit VIP": pílula azul-marinho com borda azul, sombra, ícone branco vazado e texto branco (portal anterior) */
.pd-panel__item--campaign { position: relative; z-index: 1; height: 39px; min-height: 39px; padding: 0; }
.pd-panel__item--campaign > a { display: flex; align-items: center; gap: 14px; box-sizing: border-box; height: 39px; min-height: 39px; margin: 6px 10px; padding: 8px 12px; border: 1px solid #6EC1E4; border-radius: 8px; background-image: linear-gradient(135deg, #151D42 0%, #1E293B 100%); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); color: #fff; font-size: 13.5px; font-weight: 700; line-height: 13.5px; }
.pd-panel__item--campaign + .pd-panel__item { position: relative; z-index: 2; background: var(--pd-surface); }
.pd-panel__item--campaign > a:hover { color: #fff; background-image: linear-gradient(135deg, #1B2557 0%, #243349 100%); }
.pd-panel__item--campaign .pd-panel__icon { position: relative; flex: 0 0 28px; width: 28px; height: 28px; color: #fff; }
.pd-panel__item--campaign .pd-panel__icon svg { display: none; }
.pd-panel__item--campaign .pd-panel__icon::before { content: ""; position: absolute; inset: 0; border-radius: 8px; background: #fff; }
.pd-panel__item--campaign .pd-panel__icon::after { content: ""; position: absolute; left: 8px; top: 8px; width: 12px; height: 12px; border-radius: 4px; background: #1B2350; }
.pd-panel__item--campaign .pd-panel__label { color: #fff; font-size: 13.5px; font-weight: 700; }

/* Tablet e celular: sem rolagem lateral da página (faixas de abas e carrosséis rolam dentro do próprio bloco) */
html, body { overflow-x: clip; }

/* Gaveta do celular: bloco do usuário (avatar, nome, "My Account") e botão fechar; no desktop o bloco não existe */
.pd-panel__user { display: none; }
@media (max-width: 799px) {
	.pd-panel__user { display: flex; align-items: center; gap: 10px; height: 80px; padding: 0 20px; box-sizing: border-box; }
	.pd-panel__user-avatar img { display: block; width: 50px; height: 50px; border-radius: 50%; }
	.pd-panel__user-text { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
	.pd-panel__user-name { color: #856357; font-size: 16px; font-weight: 500; text-decoration: none; }
	.pd-panel__user-account { color: #A3A5A9; font-size: 13px; text-decoration: none; }
	.pd-panel__close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: #A3A5A9; cursor: pointer; }
}

/* Gaveta do celular: sombra sob o bloco do usuário, linhas de 50 px e item ativo sem fundo (texto escuro e ícone com contorno azul), como no portal anterior */
@media (max-width: 799px) {
	.pd-panel__user { position: relative; z-index: 1; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .06); }
	.pd-panel__item:not(.pd-panel__item--campaign) { height: 50px; min-height: 50px; }
	.pd-panel__item.is-active > a, .pd-panel__item.is-active > a:hover { background: transparent; color: #1E293B; font-weight: 500; }
	.pd-panel__item.is-active .pd-panel__label { color: #1E293B; font-weight: 500; }
	.pd-panel__item.is-active .pd-panel__icon { color: #0284C7; border: 1.5px solid #0284C7; border-radius: 4px; box-sizing: border-box; }
	.pd-panel__list { padding-top: 20px; }
	.pd-panel__item--campaign { display: flex; align-items: center; height: 50px; min-height: 50px; }
	.pd-panel__item--campaign > a { flex: 1 1 auto; height: 40px; min-height: 40px; margin: 0 10px 0 30px; }
}

/* Celular: a faixa de campanha encosta no cabeçalho (o antigo não tem respiro acima dela) */
@media (max-width: 799px) { .pd-main > .pdux-campaign:first-child { margin-top: -20px; } }
