/* =========================================================================
   EMC (emc-defense) — admin console branding
   Layers on the keycloak.v3 admin app (PatternFly v5 React SPA).

   Palette: Magenta #7B1541 · Mahogany #31111C · Dusty Rose #A56875 · Snow #F1F1F1

   Revision notes:
     1. White app shell — sidebar + content white, dark readable nav text, magenta
        accent on the current item (fixes the hidden menu items).
     2. Single consistent magenta masthead. Keycloak's own admin CSS forces the
        masthead dark with equal specificity and loads after the theme, so these
        rules win on HIGHER specificity (html body .pf-v5-c-page ...) and also
        override the --pf-v5-c-masthead--BackgroundColor token + catch the header
        by position (.pf-v5-c-page > header).
   ========================================================================= */

:root,html{
  --pf-v5-global--primary-color--100:#7B1541;
  --pf-v5-global--primary-color--200:#570e2d;
  --pf-v5-global--link--Color:#7B1541;
  --pf-v5-global--link--Color--hover:#570e2d;
  --pf-v5-global--active-color--100:#7B1541;
  --pf-v5-global--active-color--200:#570e2d;

  --pf-v5-c-button--m-primary--BackgroundColor:#7B1541;
  --pf-v5-c-button--m-primary--hover--BackgroundColor:#6a1238;
  --pf-v5-c-button--m-primary--active--BackgroundColor:#570e2d;

  /* Light sidebar tokens */
  --pf-v5-c-page__sidebar--BackgroundColor:#ffffff;
  --pf-v5-c-nav--BackgroundColor:#ffffff;
  --pf-v5-c-nav__link--Color:#31111C;
  --pf-v5-c-nav__link--m-current--Color:#7B1541;
  --pf-v5-c-nav__link--focus--BackgroundColor:#f6eef1;
  --pf-v5-c-nav__link--hover--BackgroundColor:#f6eef1;

  color-scheme:light;
}

/* =============================== HEADER ================================ */
/* High-specificity (html body …) so it beats Keycloak's own dark-masthead
   rule, which has equal single-class specificity but loads later. We set the
   background directly AND the token the component reads, and also target the
   header by position in case its class name differs. */
html body .pf-v5-c-page .pf-v5-c-masthead,
html body .pf-v5-c-masthead,
html body header.pf-v5-c-masthead,
html body .pf-v5-c-page > header,
html body .pf-v5-c-page__header{
  background:#7B1541 !important;
  background-color:#7B1541 !important;
  --pf-v5-c-masthead--BackgroundColor:#7B1541 !important;
  border-bottom:none !important;
  box-shadow:0 1px 0 rgba(0,0,0,.08) !important;
}

/* All masthead content stays white on the magenta bar. */
html body .pf-v5-c-masthead,
html body .pf-v5-c-masthead a,
html body .pf-v5-c-masthead__main,
html body .pf-v5-c-masthead__content,
html body .pf-v5-c-masthead .pf-v5-c-button,
html body .pf-v5-c-masthead .pf-v5-c-dropdown__toggle,
html body .pf-v5-c-masthead .pf-v5-c-dropdown__toggle-text,
html body .pf-v5-c-page__header-tools,
html body .pf-v5-c-page__header-tools a,
html body .pf-v5-c-page__header-tools .pf-v5-c-button,
html body .pf-v5-c-page > header a,
html body .pf-v5-c-page > header .pf-v5-c-button{
  color:#ffffff !important;
}
html body .pf-v5-c-masthead svg,
html body .pf-v5-c-page > header svg{fill:#ffffff !important;}

/* EMC logo in the masthead (white lockup on magenta). */
html body .pf-v5-c-masthead__brand img,
html body .pf-v5-c-brand,
html body img.pf-v5-c-brand,
html body #masthead-logo{
  content:url('../img/emc-lockup-white.svg') !important;
  max-height:34px !important;width:auto !important;
}

/* =============================== CANVAS =============================== */
body,.pf-v5-c-page,.pf-v5-c-page__main,main.pf-v5-c-page__main{
  background:#F1F1F1 !important;color:#31111C !important;
}

/* =============================== SIDEBAR ============================== */
.pf-v5-c-page__sidebar,.pf-v5-c-page__sidebar.pf-m-dark,
.pf-v5-c-page__sidebar .pf-v5-c-page__sidebar-body,.pf-v5-c-nav,.pf-v5-c-nav.pf-m-dark{
  background:#ffffff !important;
}
.pf-v5-c-page__sidebar{border-right:1px solid #e4dee0 !important;}

.pf-v5-c-nav__link{color:#31111C !important;font-weight:500;border-left:3px solid transparent;}
.pf-v5-c-nav__link:hover{background:#f6eef1 !important;color:#7B1541 !important;}
.pf-v5-c-nav__link.pf-m-current,
.pf-v5-c-nav__item.pf-m-current>.pf-v5-c-nav__link{
  color:#7B1541 !important;background:#f6eef1 !important;font-weight:700 !important;
  border-left:3px solid #7B1541 !important;
}
.pf-v5-c-nav__link.pf-m-current::before,.pf-v5-c-nav__link.pf-m-current::after{
  border-color:#7B1541 !important;background:#7B1541 !important;
}
.pf-v5-c-nav__section-title,.pf-v5-c-nav__subnav .pf-v5-c-nav__section-title{
  color:#7a6670 !important;font-weight:700;letter-spacing:.02em;
}

/* ============================== CONTENT ============================== */
.pf-v5-c-page__main a,.pf-v5-c-page__main-section a{color:#7B1541 !important;}
.pf-v5-c-page__main a:hover{color:#570e2d !important;}

.pf-v5-c-tabs__item.pf-m-current .pf-v5-c-tabs__link::after,
.pf-v5-c-tabs__link:hover::after{background:#7B1541 !important;}
.pf-v5-c-tabs__item.pf-m-current .pf-v5-c-tabs__link{color:#7B1541 !important;}

.pf-v5-c-card,.pf-v5-c-panel{background:#ffffff !important;}

.pf-v5-c-button.pf-m-primary{background:#7B1541 !important;border-color:#7B1541 !important;color:#fff !important;}
.pf-v5-c-button.pf-m-primary:hover{background:#6a1238 !important;}
.pf-v5-c-switch__input:checked~.pf-v5-c-switch__toggle{background:#7B1541 !important;}
