/* ============================================================
   Alterdata Account Theme — PatternFly v5 light mode
   ============================================================ */

:root {
  --ad-navy:       #1a3a5c;
  --ad-blue:       #2456a4;
  --ad-blue-light: #3568bc;
  --ad-accent:     #4a90d9;
}

/* ============================================================
   FORÇAR LIGHT MODE quando pf-v5-theme-dark for injetado
   ============================================================ */

html.pf-v5-theme-dark .pf-v5-c-page,
html.pf-v5-theme-dark .pf-v5-c-page__main,
html.pf-v5-theme-dark .pf-v5-c-page__main-section,
html.pf-v5-theme-dark .pf-v5-c-page__main-breadcrumb,
html.pf-v5-theme-dark .pf-v5-c-card,
html.pf-v5-theme-dark .pf-v5-c-table,
html.pf-v5-theme-dark .pf-v5-c-toolbar,
html.pf-v5-theme-dark .pf-v5-c-toolbar__content,
html.pf-v5-theme-dark .pf-v5-c-menu,
html.pf-v5-theme-dark .pf-v5-c-dropdown__menu,
html.pf-v5-theme-dark .pf-v5-c-form-control,
html.pf-v5-theme-dark .pf-v5-c-select__menu,
html.pf-v5-theme-dark .pf-v5-c-pagination {
  background-color: #e8ebf0 !important;
  color: #151515 !important;
}

html.pf-v5-theme-dark .pf-v5-c-table thead tr th,
html.pf-v5-theme-dark .pf-v5-c-table tbody tr td,
html.pf-v5-theme-dark .pf-v5-c-form__label-text,
html.pf-v5-theme-dark .pf-v5-c-title,
html.pf-v5-theme-dark .pf-v5-c-content,
html.pf-v5-theme-dark .pf-v5-c-menu__item,
html.pf-v5-theme-dark .pf-v5-c-dropdown__menu-item,
html.pf-v5-theme-dark input,
html.pf-v5-theme-dark select,
html.pf-v5-theme-dark textarea {
  background-color: #e8ebf0 !important;
  color: #151515 !important;
}

html.pf-v5-theme-dark .pf-v5-c-tabs__link {
  background-color: #dde1e8 !important;
  color: #151515 !important;
}

html.pf-v5-theme-dark .pf-v5-c-tabs__item.pf-m-current .pf-v5-c-tabs__link {
  background-color: #e8ebf0 !important;
  color: #151515 !important;
}

html.pf-v5-theme-dark .pf-v5-c-page__main .pf-v5-c-menu-toggle,
html.pf-v5-theme-dark .pf-v5-c-page__main .pf-v5-c-menu-toggle__text,
html.pf-v5-theme-dark .pf-v5-c-page__main .pf-v5-c-menu-toggle__icon,
html.pf-v5-theme-dark .pf-v5-c-page__main .pf-v5-c-menu-toggle__controls {
  color: #151515 !important;
}

/* botão link/inline no conteúdo — texto azul visível, sem fundo */
html.pf-v5-theme-dark .pf-v5-c-button.pf-m-link,
html.pf-v5-theme-dark a.pf-v5-c-button.pf-m-link {
  color: var(--ad-blue) !important;
  background-color: transparent !important;
}

/* botão link no masthead — texto branco */
html.pf-v5-theme-dark .pf-v5-c-masthead .pf-v5-c-button.pf-m-link,
html.pf-v5-theme-dark .pf-v5-c-masthead a.pf-v5-c-button.pf-m-link,
.pf-v5-c-masthead .pf-v5-c-button.pf-m-link,
.pf-v5-c-masthead a.pf-v5-c-button.pf-m-link {
  color: rgba(255,255,255,0.9) !important;
  background-color: transparent !important;
}

.pf-v5-c-masthead .pf-v5-c-button.pf-m-link:hover,
.pf-v5-c-masthead a.pf-v5-c-button.pf-m-link:hover {
  color: #ffffff !important;
  background-color: rgba(255,255,255,0.1) !important;
  text-decoration: underline;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */

.keycloak__loading-container {
  background: linear-gradient(150deg, #0d2240 0%, #1a3a5c 40%, #2456a4 100%) !important;
  color: #ffffff !important;
}

.pf-c-spinner {
  --pf-c-spinner--Color: #4a90d9 !important;
}

/* ============================================================
   MASTHEAD
   ============================================================ */

.pf-v5-c-masthead,
.pf-m-display-inline {
  background-color: var(--ad-navy) !important;
  background-image: none !important;
  border-top: none !important;
  border-bottom: 2px solid var(--ad-accent) !important;
  box-shadow: 0 1px 6px rgba(0,0,0,0.3) !important;
}

.pf-v5-c-masthead .pf-v5-c-toolbar,
.pf-v5-c-masthead .pf-v5-c-toolbar__content,
.pf-v5-c-masthead .pf-v5-c-toolbar__content-section {
  background-color: transparent !important;
  color: #ffffff !important;
}

.pf-v5-c-masthead .pf-v5-c-button {
  color: rgba(255,255,255,0.9) !important;
}

.pf-v5-c-masthead .pf-v5-c-button:hover {
  background-color: rgba(255,255,255,0.1) !important;
}

.pf-v5-c-masthead .pf-v5-c-brand {
  max-height: 30px;
  filter: brightness(0) invert(1);
}

.pf-v5-c-masthead .pf-v5-c-menu-toggle {
  background-color: transparent !important;
  color: #ffffff !important;
}

.pf-v5-c-masthead .pf-v5-c-menu-toggle:before,
.pf-v5-c-masthead .pf-v5-c-menu-toggle:after {
  content: none !important;
}

.pf-v5-c-masthead .pf-v5-c-menu-toggle:hover,
.pf-v5-c-masthead .pf-v5-c-menu-toggle.pf-m-expanded {
  background-color: rgba(255,255,255,0.1) !important;
  border-radius: 4px;
}

.pf-v5-c-masthead .pf-v5-c-menu-toggle__text {
  color: #ffffff !important;
  font-weight: 500;
}

.pf-v5-c-masthead .pf-v5-c-menu-toggle__icon,
.pf-v5-c-masthead .pf-v5-c-menu-toggle__controls {
  color: rgba(255,255,255,0.75) !important;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.pf-v5-c-page__sidebar,
.pf-v5-c-page__sidebar-body {
  background-color: var(--ad-navy) !important;
  background-image: none !important;
  border-right: none !important;
  box-shadow: 1px 0 4px rgba(0,0,0,0.2) !important;
}

.pf-v5-c-nav__link {
  color: rgba(255,255,255,0.8) !important;
  background-color: transparent !important;
  font-size: 0.875rem;
}

.pf-v5-c-nav__link:hover {
  background-color: rgba(255,255,255,0.08) !important;
  color: #ffffff !important;
}

.pf-v5-c-nav__link.pf-m-current {
  background-color: rgba(0,0,0,0.3) !important;
  color: #ffffff !important;
  border-inline-start: 3px solid var(--ad-accent) !important;
  font-weight: 600;
}

/* ============================================================
   BOTÕES
   ============================================================ */

.pf-v5-c-button.pf-m-primary {
  background-color: var(--ad-blue) !important;
  border-color: var(--ad-blue) !important;
  color: #ffffff !important;
}

.pf-v5-c-button.pf-m-primary:hover {
  background-color: var(--ad-blue-light) !important;
  border-color: var(--ad-blue-light) !important;
}

.pf-v5-c-button.pf-m-primary:active,
.pf-v5-c-button.pf-m-primary:focus {
  background-color: var(--ad-navy) !important;
  border-color: var(--ad-navy) !important;
}

.pf-v5-c-button.pf-m-link {
  color: var(--ad-blue) !important;
}

.pf-v5-c-button.pf-m-link:hover {
  color: var(--ad-navy) !important;
}

/* ============================================================
   TABS
   ============================================================ */

.pf-v5-c-tabs__link.pf-m-current {
  color: var(--ad-blue) !important;
}

.pf-v5-c-tabs__link.pf-m-current::before {
  border-color: var(--ad-blue) !important;
}

/* ============================================================
   HOVER tabela
   ============================================================ */

.pf-v5-c-table tbody > tr:hover > * {
  background-color: #dde3ec !important;
}

/* ============================================================
   USUÁRIO LOGADO
   ============================================================ */

#loggedInUser {
  display: none;
}
