/* HC Portal look for the Keycloak v3 account console (PatternFly v5). Palette 'nabati-merah'. */
:root {
  --hcp-red: #EB1C27;
  --hcp-red-dark: #c11621;
  --pf-v5-global--primary-color--100: var(--hcp-red-dark);
  --pf-v5-global--primary-color--200: var(--hcp-red);
  --pf-v5-global--link--Color: var(--hcp-red-dark);
  --pf-v5-global--link--Color--hover: #b71c1c;
}

/* Masthead: white bar with the Nabati logo, like the HC Portal toolbar. */
.pf-v5-c-masthead {
  --pf-v5-c-masthead--BackgroundColor: #fff;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.pf-v5-c-masthead .pf-v5-c-toolbar {
  --pf-v5-c-toolbar--BackgroundColor: transparent;
  background-color: transparent;
}
.pf-v5-c-masthead__brand img,
.pf-v5-c-masthead .pf-v5-c-brand {
  height: 30px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
/* Sidebar toggle: always visible, dark slate on the white bar. The icon is an SVG filled with
   currentColor; some browsers/OS color schemes resolved it to white (invisible), so pin both. */
.pf-v5-c-masthead__toggle { display: flex !important; align-items: center; }
.pf-v5-c-masthead__toggle .pf-v5-c-button,
.pf-v5-c-masthead__toggle .pf-v5-c-button:hover,
.pf-v5-c-masthead__toggle .pf-v5-c-button:focus {
  --pf-v5-c-button--m-plain--Color: #334155;
  --pf-v5-c-button--m-plain--hover--Color: #b71c1c;
  color: #334155 !important;
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  transition: background-color .2s ease, color .2s ease;
}
.pf-v5-c-masthead__toggle .pf-v5-c-button:hover { background: #f1f5f9; color: #b71c1c !important; }
.pf-v5-c-masthead__toggle .pf-v5-c-button svg,
.pf-v5-c-masthead__toggle .pf-v5-c-button svg path { fill: currentColor !important; color: inherit !important; }

/* Thinner bar: 52 px instead of ~70 px. */
.pf-v5-c-masthead {
  --pf-v5-c-masthead--PaddingTop: 0;
  --pf-v5-c-masthead--PaddingBottom: 0;
  --pf-v5-c-masthead--RowGap: 0;
  min-height: 52px;
  padding-top: 0;
  padding-bottom: 0;
}
.pf-v5-c-masthead .pf-v5-c-toolbar {
  --pf-v5-c-toolbar--PaddingTop: 0;
  --pf-v5-c-toolbar--PaddingBottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  min-height: 52px;
}
.pf-v5-c-masthead .pf-v5-c-toolbar__content { min-height: 52px; }
.pf-v5-c-masthead {
  --pf-v5-c-masthead__content--MinHeight: 52px;
  --pf-v5-c-masthead__main--MinHeight: 52px;
}
.pf-v5-c-masthead__content,
.pf-v5-c-masthead__main { min-height: 52px; }
.pf-v5-c-masthead .pf-v5-c-avatar { width: 32px; height: 32px; }
.pf-v5-c-masthead .pf-v5-c-menu-toggle {
  --pf-v5-c-menu-toggle--BackgroundColor: #f1f5f9;
  --pf-v5-c-menu-toggle--Color: rgba(0, 0, 0, .87);
  background-color: #f1f5f9;
  color: rgba(0, 0, 0, .87);
  border-radius: 20px;
}
.pf-v5-c-masthead .pf-v5-c-menu-toggle::before,
.pf-v5-c-masthead .pf-v5-c-menu-toggle::after { border-color: transparent !important; border-width: 0 !important; }
.pf-v5-c-masthead .pf-v5-c-menu-toggle { padding: 6px 14px; min-height: 36px; }

/* Primary actions: red pills. */
.pf-v5-c-button.pf-m-primary {
  --pf-v5-c-button--m-primary--BackgroundColor: var(--hcp-red);
  --pf-v5-c-button--m-primary--hover--BackgroundColor: var(--hcp-red-dark);
  --pf-v5-c-button--m-primary--active--BackgroundColor: var(--hcp-red-dark);
  --pf-v5-c-button--m-primary--focus--BackgroundColor: var(--hcp-red-dark);
  border-radius: 20px;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 500;
}

/* Side nav & jump links: red markers on the slate background. */
.pf-v5-c-page__sidebar { --pf-v5-c-page__sidebar--BackgroundColor: #f1f5f9; }
.pf-v5-c-nav__link.pf-m-current::after,
.pf-v5-c-nav__link.pf-m-current:hover::after {
  --pf-v5-c-nav__link--m-current--after--BorderColor: var(--hcp-red);
  border-color: var(--hcp-red);
}
.pf-v5-c-jump-links__item.pf-m-current {
  --pf-v5-c-jump-links__link--before--BorderColor: var(--hcp-red);
}

/* PatternFly's sidebar nav is dark-themed (white text); on the light slate sidebar use dark text,
   white for the current item with a red marker. */
.pf-v5-c-page__sidebar .pf-v5-c-nav {
  --pf-v5-c-nav__link--Color: rgba(0, 0, 0, .87);
  --pf-v5-c-nav__link--hover--Color: rgba(0, 0, 0, .87);
  --pf-v5-c-nav__link--focus--Color: rgba(0, 0, 0, .87);
  --pf-v5-c-nav__link--active--Color: rgba(0, 0, 0, .87);
  --pf-v5-c-nav__link--BackgroundColor: transparent;
  --pf-v5-c-nav__link--hover--BackgroundColor: #e2e8f0;
  --pf-v5-c-nav__link--focus--BackgroundColor: #e2e8f0;
  --pf-v5-c-nav__link--active--BackgroundColor: #e2e8f0;
  --pf-v5-c-nav__link--m-current--Color: #b71c1c;
  --pf-v5-c-nav__link--m-current--BackgroundColor: #fff;
  --pf-v5-c-nav__link--m-current--hover--BackgroundColor: #fff;
  --pf-v5-c-nav__item--before--BorderColor: #e2e8f0;
  --pf-v5-c-nav__toggle--Color: rgba(0, 0, 0, .54);
  --pf-v5-c-nav__link-toggle--Color: rgba(0, 0, 0, .54);
}
.pf-v5-c-page__sidebar .pf-v5-c-nav__link { color: rgba(0, 0, 0, .87); }
.pf-v5-c-page__sidebar .pf-v5-c-nav__link.pf-m-current { color: #b71c1c; background-color: #fff; font-weight: 600; }
.pf-v5-c-page__sidebar .pf-v5-c-nav__link:hover:not(.pf-m-current) { background-color: #e2e8f0; }

/* Content links (e.g. "Account Console" in Applications) in HC Portal red instead of PatternFly blue. */
.pf-v5-c-page__main a:not(.pf-v5-c-button):not(.pf-v5-c-nav__link),
.pf-v5-c-page__main a:not(.pf-v5-c-button):not(.pf-v5-c-nav__link) svg { color: var(--hcp-red-dark); }
.pf-v5-c-page__main a:not(.pf-v5-c-button):not(.pf-v5-c-nav__link):hover { color: #b71c1c; }

/* Sidebar edge: soft divider + faint shadow so the slate panel separates from the white content. */
.pf-v5-c-page__sidebar {
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 8px rgba(15, 23, 42, .05);
  z-index: 1;
}
/* Item separators: light slate instead of PatternFly's dark-theme grey. */
.pf-v5-c-page__sidebar .pf-v5-c-nav {
  --pf-v5-c-nav__link--before--BorderColor: #e2e8f0;
  --pf-v5-c-nav__item--before--BorderColor: #e2e8f0;
}
.pf-v5-c-page__sidebar .pf-v5-c-nav__link::before,
.pf-v5-c-page__sidebar .pf-v5-c-nav__item::before { border-color: #e2e8f0 !important; }

/* Link-style buttons (e.g. "Account Console" in Applications): HC Portal red. */
.pf-v5-c-button.pf-m-link {
  --pf-v5-c-button--m-link--Color: var(--hcp-red-dark);
  --pf-v5-c-button--m-link--hover--Color: #b71c1c;
  --pf-v5-c-button--m-link--focus--Color: #b71c1c;
  --pf-v5-c-button--m-link--active--Color: #b71c1c;
  --pf-v5-c-button__icon--m-end--MarginLeft: 6px;
}

/* Outline (secondary) buttons, e.g. "End application session": red outline pill. */
.pf-v5-c-button.pf-m-secondary {
  --pf-v5-c-button--m-secondary--Color: var(--hcp-red-dark);
  --pf-v5-c-button--m-secondary--hover--Color: #b71c1c;
  --pf-v5-c-button--m-secondary--focus--Color: #b71c1c;
  --pf-v5-c-button--m-secondary--active--Color: #b71c1c;
  --pf-v5-c-button--m-secondary--after--BorderColor: var(--hcp-red);
  --pf-v5-c-button--m-secondary--hover--after--BorderColor: var(--hcp-red-dark);
  --pf-v5-c-button--m-secondary--focus--after--BorderColor: var(--hcp-red-dark);
  --pf-v5-c-button--m-secondary--active--after--BorderColor: var(--hcp-red-dark);
  --pf-v5-c-button--m-secondary--hover--BackgroundColor: #fdecea;
  border-radius: 20px;
}
.pf-v5-c-button.pf-m-secondary::after { border-radius: 20px; }
