/* NFC Menu 51 — cabeçalho consistente e aba ativa inconfundível. */
/* A origem do problema era a cascata de nfc-clean-37 / nfc-ajustes-36,
   que colocava !important em todos os botões, até no selecionado. */
html body:not(.public-menu-mode) #main-app-header {
  background:#101e30!important;
  color:#f4f7fc!important;
  border-bottom-color:#30465e!important;
}
html body #main-app-header .nfc-brand-lockup,
html body #main-app-header .nfc-brand-wordmark { background:transparent!important; }
html body #main-app-header .nfc-brand-wordmark > span:first-child {
  color:#f5f7fb!important;-webkit-text-fill-color:#f5f7fb!important;
}
html body #main-app-header .nfc-brand-wordmark > span:first-child > span,
html body.nfc-manager-preview-dark:not(.public-menu-mode) #main-app-header .nfc-brand-wordmark > span:first-child > span {
  color:#f6a72e!important;-webkit-text-fill-color:#f6a72e!important;
}
html body #main-app-header #nav-brand-title {color:#b8c8db!important;-webkit-text-fill-color:#b8c8db!important;}
html body #main-app-header :is(#admin-role-switcher,#gerente-role-switcher) {
  background:#203750!important;border-color:#49617b!important;
}
html body #main-app-header :is(#admin-role-switcher,#gerente-role-switcher) > button {
  background:transparent!important;border:1px solid transparent!important;
  color:#dce7f4!important;-webkit-text-fill-color:#dce7f4!important;
  box-shadow:none!important;filter:none!important;opacity:1!important;
}
/* Seleção por estado DOM — funciona também no primeiro carregamento, antes dos eventos JS. */
html body:has(#view-admin:not(.hidden)) #main-app-header #admin-role-switcher > #btn-mode-admin,
html body:has(#view-gerente:not(.hidden)) #main-app-header #admin-role-switcher > #btn-mode-manager,
html body:has(#view-client:not(.hidden)) #main-app-header #admin-role-switcher > #btn-mode-client,
html body:has(#view-gerente:not(.hidden)) #main-app-header #gerente-role-switcher > button[data-switch-view="gerente"],
html body:has(#view-client:not(.hidden)) #main-app-header #gerente-role-switcher > button[data-switch-view="client"] {
  background:#ef9e1c!important;border:1px solid #f8be65!important;
  color:#13283f!important;-webkit-text-fill-color:#13283f!important;
  box-shadow:0 4px 10px rgba(4,15,31,.22)!important;
  font-weight:900!important;
}
html body #main-app-header :is(#admin-role-switcher,#gerente-role-switcher) > button:focus-visible {
  outline:3px solid #ffd28b!important;outline-offset:2px!important;
}
/* Sem uma etiqueta solta indicando Gerente · ... */
#main-app-header #nfc45-page-label,.nfc45-page-label{display:none!important}
/* Administração embebida: a altura é ajustada ao conteúdo, sem o fundo branco residual. */
#view-admin .nfc14-module{min-height:0!important;padding-bottom:14px!important;}
#view-admin .nfc14-module iframe {
  display:block;width:100%;height:300px;min-height:0!important;
  background:transparent!important;border:0!important;
  overflow:hidden;
}
@media(max-width:690px){
  #view-admin .nfc14-module iframe {min-height:0!important;height:300px;}
  html body #main-app-header :is(#admin-role-switcher,#gerente-role-switcher) >button {min-height:43px!important;}
}

/* Garantir identidade laranja também no tema de pré-visualização do gerente. */
html body.nfc-manager-preview-dark:not(.public-menu-mode) #main-app-header .nfc-brand-wordmark > span:first-child > span:first-child {
  color:#f6a72e!important;-webkit-text-fill-color:#f6a72e!important;
}
/* Cardápio não deve ter destaque próprio quando não for a vista atual. */
html body #main-app-header #admin-role-switcher > #btn-mode-client:not(.nfc47-active-view),
html body #main-app-header #gerente-role-switcher > button[data-switch-view="client"]:not(.nfc47-active-view) {
  background:transparent!important;border-color:transparent!important;
  color:#dce7f4!important;-webkit-text-fill-color:#dce7f4!important;
  box-shadow:none!important;
}
