/* 4prax admin console theme
 *
 * Layered over Keycloak's keycloak.v2 admin theme (React + PatternFly 5). The
 * app is not touched; everything here goes through PatternFly's CSS custom
 * properties (--pf-v5-global--*, --pf-v5-c-<component>--*), so a Keycloak
 * upgrade that keeps PatternFly 5 keeps this theme working. Palette: the login
 * theme (login/resources/css/login.css) and the 4prax app's design tokens.
 *
 * CASCADE NOTES
 *  - index.ftl loads this file AFTER PatternFly, so equal-specificity rules win.
 *  - PatternFly's dark scheme is written as `:where(.pf-v5-theme-dark) ...`,
 *    i.e. with ZERO specificity. Any colour we set on a plain selector would
 *    therefore also override the dark scheme. Colours are scoped:
 *      light  -> :root:not(.pf-v5-theme-dark) ...
 *      dark   -> :root.pf-v5-theme-dark ...   (the class is set on <html> by
 *                the parent theme from prefers-color-scheme, see darkMode in
 *                keycloak.v2/admin/theme.properties)
 *    Scheme-independent rules (type, shape, spacing) use plain selectors.
 *  - Component scopes (masthead, nav, form-control, ...) re-derive their
 *    colours from --pf-v5-global--*--light-*/--dark-* variants, so those
 *    variants are set too, not just the plain ones.
 */

/* ---------------------------------------------------------------- *
 * Fonts: Inter, self-hosted (same files as the login theme; the ConfigMap
 * projects them to resources/fonts/). Never load from Google Fonts, see the
 * note at the top of login.css.
 * ---------------------------------------------------------------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-v20-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-v20-latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-v20-latin-700.woff2') format('woff2');
}

/* ================================================================ *
 * SCHEME-INDEPENDENT: type and shape
 * ================================================================ */
:root {
    --pf-v5-global--FontFamily--text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --pf-v5-global--FontFamily--heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --pf-v5-global--FontFamily--monospace: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
    /* PatternFly's 3px everywhere -> the 4px of the login inputs / app tokens. */
    --pf-v5-global--BorderRadius--sm: 4px;
}

/* Headings: PatternFly renders titles at weight 400 with Red Hat Display,
 * which is a medium cut. Inter 400 looks thin in that role; use 600. */
.pf-v5-c-title {
    --pf-v5-c-title--m-4xl--FontWeight: 600;
    --pf-v5-c-title--m-3xl--FontWeight: 600;
    --pf-v5-c-title--m-2xl--FontWeight: 600;
    --pf-v5-c-title--m-xl--FontWeight: 600;
    --pf-v5-c-title--m-lg--FontWeight: 600;
    --pf-v5-c-title--m-md--FontWeight: 600;
    letter-spacing: -0.01em;
}

/* Masthead logo: the wordmark is 208x38; PatternFly's 35px is a bit much. */
img.keycloak__pageheader_brand {
    height: 28px;
}

/* Buttons: pills, like the login page. Control (input add-ons), plain (icon)
 * and link buttons keep their shape; link buttons would otherwise shift text
 * alignment in toolbars. */
.pf-v5-c-button.pf-m-primary,
.pf-v5-c-button.pf-m-secondary,
.pf-v5-c-button.pf-m-tertiary,
.pf-v5-c-button.pf-m-danger,
.pf-v5-c-button.pf-m-warning,
.pf-v5-c-menu-toggle.pf-m-primary,
.pf-v5-c-menu-toggle.pf-m-secondary {
    --pf-v5-c-button--BorderRadius: 9999px;
    --pf-v5-c-button--after--BorderRadius: 9999px;
    --pf-v5-c-menu-toggle--BorderRadius: 9999px;
    --pf-v5-c-button--PaddingLeft: 1.125rem;
    --pf-v5-c-button--PaddingRight: 1.125rem;
    --pf-v5-c-button--FontWeight: 500;
}

/* Nav items as pills (the app's sidebar), no left indicator bar. The current
 * item is marked by the tinted background + colour set per scheme below. */
.pf-v5-c-nav__link,
.pf-v5-c-nav__link:hover,
.pf-v5-c-nav__link:focus,
.pf-v5-c-nav__link:active {
    --pf-v5-c-nav__link--PaddingTop: 0.625rem;
    --pf-v5-c-nav__link--PaddingBottom: 0.625rem;
    --pf-v5-c-nav__link--PaddingLeft: 0.875rem;
    --pf-v5-c-nav__link--PaddingRight: 0.875rem;
    --pf-v5-c-nav__link--FontSize: 0.9375rem;
    /* PatternFly sizes the link to the full item width (and repeats that for
     * hover/focus/active, hence the state selectors above), so margins alone
     * would push it past the sidebar edge. */
    width: calc(100% - 1rem);
    margin-inline: 0.5rem;
    border-radius: 9999px;
}
.pf-v5-c-nav__link::after {
    display: none;
}
/* Section titles stand on their own: no rule under the title, and the divider
 * under the realm selector keeps its spacing but draws no line. */
.pf-v5-c-nav {
    --pf-v5-c-nav__section-title--BorderBottomWidth: 0;
    --pf-v5-c-nav--c-divider--BackgroundColor: transparent;
}
.pf-v5-c-nav__item.pf-m-current > .pf-v5-c-nav__link,
.pf-v5-c-nav__link.pf-m-current {
    font-weight: 500;
}
.pf-v5-c-nav__item + .pf-v5-c-nav__item {
    margin-top: 0.25rem;
}
/* Section headings as in the app's sidebar: title case, small, muted, and
 * the text aligned with the link text in the pills below. */
.pf-v5-c-nav__section-title {
    margin-inline: 0.5rem;
    padding-inline: 0.875rem;
    padding-bottom: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

/* Inputs: a full 1px border with 4px corners (login form fields) instead of
 * PatternFly's bottom-line-only look. ::before carries the border, ::after
 * (the underline) is switched off except for the error state, which keeps
 * PatternFly's red line because .pf-m-error sets the --after variable with
 * higher specificity than this rule. */
.pf-v5-c-form-control {
    --pf-v5-c-form-control--before--BorderBottomWidth: var(--pf-v5-global--BorderWidth--sm);
    --pf-v5-c-form-control--after--BorderBottomColor: transparent;
    --pf-v5-c-form-control--hover--after--BorderBottomColor: transparent;
    --pf-v5-c-form-control--focus--after--BorderBottomColor: transparent;
    --pf-v5-c-form-control--m-expanded--after--BorderBottomColor: transparent;
    border-radius: 4px;
}
.pf-v5-c-form-control::before,
.pf-v5-c-form-control::after {
    border-radius: 4px;
}
.pf-v5-c-form-control:focus-within {
    box-shadow: 0 0 0 3px var(--kc-focus-ring);
}

/* Dropdown / select toggles get the same box as inputs. */
.pf-v5-c-menu-toggle:not(.pf-m-plain):not(.pf-m-primary):not(.pf-m-secondary):not(.pf-m-split-button) {
    --pf-v5-c-menu-toggle--BorderRadius: 4px;
    --pf-v5-c-menu-toggle--before--BorderBottomWidth: var(--pf-v5-global--BorderWidth--sm);
    --pf-v5-c-menu-toggle--after--BorderBottomColor: transparent;
}
.pf-v5-c-menu-toggle:not(.pf-m-plain)::before,
.pf-v5-c-menu-toggle:not(.pf-m-plain)::after {
    border-radius: 4px;
}

/* Surfaces */
.pf-v5-c-card {
    border-radius: 12px;
}
.pf-v5-c-modal-box {
    border-radius: 12px;
}
.pf-v5-c-menu,
.pf-v5-c-popover__content,
.pf-v5-c-alert,
.pf-v5-c-tooltip__content {
    border-radius: 8px;
}
.pf-v5-c-tabs__link {
    font-weight: 500;
}
.pf-v5-c-masthead .pf-v5-c-menu.pf-m-plain {
    box-shadow: var(--pf-v5-global--BoxShadow--md);
    border: 1px solid var(--pf-v5-global--BorderColor--100);
}

/* Forms: a wider label column so long attribute names ("profile.attributes…")
 * don't run into the input, breaking anywhere as a last resort; stacked
 * multi-value inputs (redirect URIs, user attributes) get a gap. */
.pf-v5-c-form {
    --pf-v5-c-form--m-horizontal__group-label--md--GridColumnWidth: 12rem;
}
.pf-v5-c-form__label {
    overflow-wrap: anywhere;
}
.pf-v5-c-form__group-control .pf-v5-c-input-group + .pf-v5-c-input-group {
    margin-top: 0.5rem;
}

/* Save / Revert bar. Keycloak pins the form's action group to the bottom
 * (FixedButtonsGroup, class *buttonGroup* from a CSS module, hashed per build)
 * as a 100vw-wide fixed box starting at the form's left edge, so it runs off
 * screen to the right and the buttons sit in the form's control column at the
 * far left. Pin it to both viewport edges instead: the sidebar stacks above
 * it (z-index 200) and covers the part underneath, so the visible bar runs
 * from the sidebar to the right edge and widens when the sidebar collapses.
 * Buttons go to the right; a plain top line separates the bar. */
.pf-v5-c-form__group.pf-m-action[class*="buttonGroup"] {
    left: 0;
    right: 0;
    width: auto;
    margin-left: 0;
    padding: 0.75rem 1.5rem;
    z-index: 10;
}
.pf-v5-c-form.pf-m-horizontal .pf-v5-c-form__group.pf-m-action .pf-v5-c-form__group-control {
    grid-column: 1 / -1;
}
.pf-v5-c-form__group.pf-m-action .pf-v5-c-form__actions {
    justify-content: flex-end;
}
/* Room under the last field so the fixed bar never covers it. */
.pf-v5-c-form:has(> .pf-v5-c-form__group.pf-m-action[class*="buttonGroup"]) {
    padding-bottom: 4rem;
}

/* ================================================================ *
 * LIGHT SCHEME
 * Palette: login.css (buttons #0074B2, links #0066cc, text #1F2937/#667085,
 * input borders #d1d5db, alerts) + app tokens (page #f8f9fa, strokes).
 * ================================================================ */
:root:not(.pf-v5-theme-dark) {
    --kc-focus-ring: rgba(0, 102, 204, 0.12);

    --pf-v5-global--primary-color--100: #0074B2;
    --pf-v5-global--primary-color--200: #005E92;
    --pf-v5-global--primary-color--dark-100: #0074B2;
    --pf-v5-global--primary-color--light-100: #50A2D9;
    --pf-v5-global--active-color--100: #0074B2;
    --pf-v5-global--active-color--300: #0074B2;
    --pf-v5-global--active-color--400: #50A2D9;
    --pf-v5-global--link--Color: #0066CC;
    --pf-v5-global--link--Color--hover: #0052A3;
    --pf-v5-global--link--Color--dark: #0066CC;
    --pf-v5-global--link--Color--dark--hover: #0052A3;
    --pf-v5-global--link--Color--light: #93C5FD;

    --pf-v5-global--BackgroundColor--100: #FFFFFF;
    --pf-v5-global--BackgroundColor--150: #F7F9FB;
    --pf-v5-global--BackgroundColor--200: #EEF2F6;
    --pf-v5-global--BackgroundColor--light-100: #FFFFFF;
    --pf-v5-global--BackgroundColor--light-200: #F7F9FB;
    --pf-v5-global--BackgroundColor--light-300: #F3F6F9;
    --pf-v5-global--BackgroundColor--dark-100: #0F172A;
    --pf-v5-global--BackgroundColor--dark-200: #1E293B;
    --pf-v5-global--BackgroundColor--dark-300: #111A2E;
    --pf-v5-global--BackgroundColor--dark-400: #1D3354;

    --pf-v5-global--Color--100: #1F2937;
    --pf-v5-global--Color--200: #667085;
    --pf-v5-global--Color--dark-100: #1F2937;
    --pf-v5-global--Color--dark-200: #667085;
    --pf-v5-global--Color--light-100: #FFFFFF;
    --pf-v5-global--Color--light-200: #CBD5E1;

    --pf-v5-global--BorderColor--100: #E3E8EE;
    --pf-v5-global--BorderColor--200: #C4CDD8;
    --pf-v5-global--BorderColor--300: #D1D5DB;
    --pf-v5-global--BorderColor--dark-100: #E3E8EE;
    --pf-v5-global--BorderColor--light-100: #D1D5DB;

    --pf-v5-global--success-color--100: #067647;
    --pf-v5-global--danger-color--100: #B91C1C;
    --pf-v5-global--danger-color--200: #991B1B;
    --pf-v5-global--warning-color--100: #B54708;
    --pf-v5-global--info-color--100: #0074B2;

    --pf-v5-global--disabled-color--100: #98A2B3;
    --pf-v5-global--disabled-color--200: #D1D5DB;
    --pf-v5-global--disabled-color--300: #F3F4F6;

    --pf-v5-global--icon--Color--light: #667085;
    --pf-v5-global--icon--Color--dark: #1F2937;
    --pf-v5-global--icon--Color--light--dark: #667085;
    --pf-v5-global--icon--Color--dark--dark: #1F2937;
    --pf-v5-global--icon--Color--light--light: #CBD5E1;
    --pf-v5-global--icon--Color--dark--light: #FFFFFF;

    /* App card shadow: a hairline ring plus a soft drop. */
    --pf-v5-global--BoxShadow--sm: 0 1px 2px -1px rgba(0, 0, 0, 0.05), 0 0 3px 1px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(0, 0, 0, 0.06);
    --pf-v5-global--BoxShadow--md: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
    --pf-v5-global--BoxShadow--lg: 0 12px 32px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

/* Masthead: white bar with a hairline, dark text (PatternFly's is black with
 * light text, so the scope's colour variables are flipped here too). */
:root:not(.pf-v5-theme-dark) .pf-v5-c-masthead,
:root:not(.pf-v5-theme-dark) .pf-v5-c-page__header {
    --pf-v5-c-masthead--BackgroundColor: #FFFFFF;
    --pf-v5-c-masthead--item-border-color--base: #E3E8EE;
    --pf-v5-c-page__header--BackgroundColor: #FFFFFF;
    --pf-v5-global--Color--100: #1F2937;
    --pf-v5-global--Color--200: #667085;
    --pf-v5-global--BackgroundColor--100: #FFFFFF;
    --pf-v5-global--BorderColor--100: #E3E8EE;
    --pf-v5-global--primary-color--100: #0074B2;
    --pf-v5-global--link--Color: #0066CC;
    --pf-v5-global--link--Color--hover: #0052A3;
    --pf-v5-global--icon--Color--light: #667085;
    --pf-v5-global--icon--Color--dark: #1F2937;
    /* The dark-bar variants PatternFly derives state colours from, flipped
     * for a light bar: text variants to dark text, background variants to
     * light tints. Covers hover/focus/active/expanded of nav links, plain
     * buttons (hamburger, kebabs), toggles and dividers in one go. */
    --pf-v5-global--Color--light-100: #1F2937;
    --pf-v5-global--Color--light-200: #667085;
    --pf-v5-global--Color--dark-100: #1F2937;
    --pf-v5-global--Color--dark-200: #667085;
    --pf-v5-global--BackgroundColor--dark-100: #FFFFFF;
    --pf-v5-global--BackgroundColor--dark-200: rgba(0, 37, 73, 0.05);
    --pf-v5-global--BackgroundColor--dark-300: #F8FAFC;
    --pf-v5-global--BackgroundColor--dark-400: rgba(0, 116, 178, 0.1);
    --pf-v5-global--BorderColor--light-100: #E3E8EE;
    --pf-v5-global--BorderColor--dark-100: #E3E8EE;
    --pf-v5-global--primary-color--light-100: #0074B2;
    --pf-v5-global--link--Color--light: #0066CC;
    --pf-v5-global--active-color--300: #0074B2;
    --pf-v5-global--active-color--400: #0074B2;
    --pf-v5-global--icon--Color--light--light: #667085;
    --pf-v5-global--icon--Color--dark--light: #1F2937;
    --pf-v5-global--icon--Color--light--dark: #667085;
    --pf-v5-global--icon--Color--dark--dark: #1F2937;
    color: #1F2937;
    border-bottom: 1px solid #E3E8EE;
}

/* Sidebar: the app's light rail. PatternFly re-declares the global colour
 * variables inside the sidebar scope for its dark rail (light text, so the
 * realm selector would be white on white); flip them here like the masthead. */
:root:not(.pf-v5-theme-dark) .pf-v5-c-page__sidebar {
    --pf-v5-c-page__sidebar--BackgroundColor: #F8FAFC;
    --pf-v5-global--Color--100: #1F2937;
    --pf-v5-global--Color--200: #667085;
    --pf-v5-global--BackgroundColor--100: #FFFFFF;
    --pf-v5-global--BorderColor--100: #E3E8EE;
    --pf-v5-global--primary-color--100: #0074B2;
    --pf-v5-global--link--Color: #0066CC;
    --pf-v5-global--link--Color--hover: #0052A3;
    --pf-v5-global--icon--Color--light: #667085;
    --pf-v5-global--icon--Color--dark: #1F2937;
    /* The dark-bar variants PatternFly derives state colours from, flipped
     * for a light bar: text variants to dark text, background variants to
     * light tints. Covers hover/focus/active/expanded of nav links, plain
     * buttons (hamburger, kebabs), toggles and dividers in one go. */
    --pf-v5-global--Color--light-100: #1F2937;
    --pf-v5-global--Color--light-200: #667085;
    --pf-v5-global--Color--dark-100: #1F2937;
    --pf-v5-global--Color--dark-200: #667085;
    --pf-v5-global--BackgroundColor--dark-100: #FFFFFF;
    --pf-v5-global--BackgroundColor--dark-200: rgba(0, 37, 73, 0.05);
    --pf-v5-global--BackgroundColor--dark-300: #F8FAFC;
    --pf-v5-global--BackgroundColor--dark-400: rgba(0, 116, 178, 0.1);
    --pf-v5-global--BorderColor--light-100: #E3E8EE;
    --pf-v5-global--BorderColor--dark-100: #E3E8EE;
    --pf-v5-global--primary-color--light-100: #0074B2;
    --pf-v5-global--link--Color--light: #0066CC;
    --pf-v5-global--active-color--300: #0074B2;
    --pf-v5-global--active-color--400: #0074B2;
    --pf-v5-global--icon--Color--light--light: #667085;
    --pf-v5-global--icon--Color--dark--light: #1F2937;
    --pf-v5-global--icon--Color--light--dark: #667085;
    --pf-v5-global--icon--Color--dark--dark: #1F2937;
    color: #1F2937;
    border-inline-end: 1px solid #E3E8EE;
}
:root:not(.pf-v5-theme-dark) .pf-v5-c-nav {
    --pf-v5-c-nav__link--Color: #1F2937;
    --pf-v5-c-nav__link--hover--Color: #1F2937;
    --pf-v5-c-nav__link--focus--Color: #1F2937;
    --pf-v5-c-nav__link--active--Color: #1F2937;
    --pf-v5-c-nav__link--hover--BackgroundColor: rgba(0, 37, 73, 0.05);
    --pf-v5-c-nav__link--focus--BackgroundColor: rgba(0, 37, 73, 0.05);
    --pf-v5-c-nav__link--active--BackgroundColor: rgba(0, 37, 73, 0.08);
    --pf-v5-c-nav__link--m-current--Color: #0074B2;
    --pf-v5-c-nav__link--m-current--BackgroundColor: rgba(0, 116, 178, 0.1);
    --pf-v5-c-nav__item--m-current--not--m-expanded__link--BackgroundColor: rgba(0, 116, 178, 0.1);
    --pf-v5-c-nav__section-title--Color: #8A94A6;
    --pf-v5-c-nav__item--before--BorderColor: #E3E8EE;
    --pf-v5-c-nav__link--before--BorderColor: #E3E8EE;
    --pf-v5-c-nav__toggle--Color: #667085;
}

/* Inputs and toggles: #d1d5db border, blue on focus (login form fields). */
:root:not(.pf-v5-theme-dark) .pf-v5-c-form-control {
    --pf-v5-c-form-control--BackgroundColor: #FFFFFF;
    --pf-v5-c-form-control--before--BorderTopColor: #D1D5DB;
    --pf-v5-c-form-control--before--BorderRightColor: #D1D5DB;
    --pf-v5-c-form-control--before--BorderBottomColor: #D1D5DB;
    --pf-v5-c-form-control--before--BorderLeftColor: #D1D5DB;
}
:root:not(.pf-v5-theme-dark) .pf-v5-c-form-control:focus-within {
    --pf-v5-c-form-control--before--BorderTopColor: #0066CC;
    --pf-v5-c-form-control--before--BorderRightColor: #0066CC;
    --pf-v5-c-form-control--before--BorderBottomColor: #0066CC;
    --pf-v5-c-form-control--before--BorderLeftColor: #0066CC;
}
:root:not(.pf-v5-theme-dark) .pf-v5-c-menu-toggle:not(.pf-m-plain):not(.pf-m-primary):not(.pf-m-secondary) {
    --pf-v5-c-menu-toggle--BackgroundColor: #FFFFFF;
    --pf-v5-c-menu-toggle--before--BorderTopColor: #D1D5DB;
    --pf-v5-c-menu-toggle--before--BorderRightColor: #D1D5DB;
    --pf-v5-c-menu-toggle--before--BorderBottomColor: #D1D5DB;
    --pf-v5-c-menu-toggle--before--BorderLeftColor: #D1D5DB;
}
/* The user menu in the masthead is text only, no box. The :not() chain is
 * repeated so this outranks the general toggle rule above. */
:root:not(.pf-v5-theme-dark) .pf-v5-c-masthead .pf-v5-c-menu-toggle:not(.pf-m-plain):not(.pf-m-primary):not(.pf-m-secondary) {
    --pf-v5-c-menu-toggle--BackgroundColor: transparent;
    --pf-v5-c-menu-toggle--before--BorderTopColor: transparent;
    --pf-v5-c-menu-toggle--before--BorderRightColor: transparent;
    --pf-v5-c-menu-toggle--before--BorderBottomColor: transparent;
    --pf-v5-c-menu-toggle--before--BorderLeftColor: transparent;
    --pf-v5-c-menu-toggle--after--BorderBottomColor: transparent;
    --pf-v5-c-menu-toggle--hover--after--BorderBottomColor: transparent;
    --pf-v5-c-menu-toggle--m-expanded--after--BorderBottomColor: transparent;
}
:root:not(.pf-v5-theme-dark) .pf-v5-c-button {
    --pf-v5-c-button--m-secondary--hover--BackgroundColor: rgba(0, 116, 178, 0.06);
    --pf-v5-c-button--m-tertiary--hover--BackgroundColor: rgba(0, 37, 73, 0.05);
}
:root:not(.pf-v5-theme-dark) .pf-v5-c-check__input,
:root:not(.pf-v5-theme-dark) .pf-v5-c-radio__input {
    accent-color: #0074B2;
}

/* ================================================================ *
 * DARK SCHEME
 * Palette: the login page's dark block (page #0F172A, surface #1E293B,
 * borders #334155, text #F3F4F6/#9CA3AF/#CBD5E1, accent #3B82F6, links
 * #93C5FD). Surfaces sit lighter than the page, inputs darker than their
 * surface. Must stay the last section of this file.
 * ================================================================ */
:root.pf-v5-theme-dark {
    --kc-focus-ring: rgba(59, 130, 246, 0.25);

    --pf-v5-global--primary-color--100: #3B82F6;
    --pf-v5-global--primary-color--200: #2563EB;
    --pf-v5-global--primary-color--dark-100: #3B82F6;
    --pf-v5-global--primary-color--light-100: #93C5FD;
    --pf-v5-global--active-color--100: #60A5FA;
    --pf-v5-global--active-color--300: #60A5FA;
    --pf-v5-global--active-color--400: #93C5FD;
    --pf-v5-global--link--Color: #93C5FD;
    --pf-v5-global--link--Color--hover: #BFDBFE;
    --pf-v5-global--link--Color--dark: #93C5FD;
    --pf-v5-global--link--Color--dark--hover: #BFDBFE;
    --pf-v5-global--link--Color--light: #93C5FD;

    --pf-v5-global--BackgroundColor--100: #1E293B;
    --pf-v5-global--BackgroundColor--150: #1A2538;
    --pf-v5-global--BackgroundColor--200: #172033;
    --pf-v5-global--BackgroundColor--300: #243248;
    --pf-v5-global--BackgroundColor--400: #0F172A;
    --pf-v5-global--BackgroundColor--light-100: #1E293B;
    --pf-v5-global--BackgroundColor--light-200: #172033;
    --pf-v5-global--BackgroundColor--light-300: #0F172A;
    --pf-v5-global--BackgroundColor--dark-100: #0F172A;
    --pf-v5-global--BackgroundColor--dark-200: #243248;
    --pf-v5-global--BackgroundColor--dark-300: #0B1324;
    --pf-v5-global--BackgroundColor--dark-400: #1D3354;

    --pf-v5-global--Color--100: #F3F4F6;
    --pf-v5-global--Color--200: #9CA3AF;
    --pf-v5-global--Color--dark-100: #F3F4F6;
    --pf-v5-global--Color--dark-200: #9CA3AF;
    --pf-v5-global--Color--light-100: #F3F4F6;
    --pf-v5-global--Color--light-200: #CBD5E1;

    --pf-v5-global--BorderColor--100: #334155;
    --pf-v5-global--BorderColor--200: #475569;
    --pf-v5-global--BorderColor--300: #3B4A61;
    --pf-v5-global--BorderColor--400: #475569;
    --pf-v5-global--BorderColor--dark-100: #334155;
    --pf-v5-global--BorderColor--light-100: #475569;

    --pf-v5-global--success-color--100: #6EE7B7;
    --pf-v5-global--danger-color--100: #FCA5A5;
    --pf-v5-global--danger-color--200: #F87171;
    --pf-v5-global--warning-color--100: #FCD34D;
    --pf-v5-global--info-color--100: #93C5FD;

    --pf-v5-global--icon--Color--light: #9CA3AF;
    --pf-v5-global--icon--Color--dark: #F3F4F6;
    --pf-v5-global--icon--Color--light--dark: #9CA3AF;
    --pf-v5-global--icon--Color--dark--dark: #F3F4F6;
    --pf-v5-global--icon--Color--light--light: #9CA3AF;
    --pf-v5-global--icon--Color--dark--light: #F3F4F6;
}

:root.pf-v5-theme-dark .pf-v5-c-masthead,
:root.pf-v5-theme-dark .pf-v5-c-page__header {
    --pf-v5-c-masthead--BackgroundColor: #0F172A;
    --pf-v5-c-masthead--c-toolbar--BackgroundColor: #0F172A;
    --pf-v5-c-masthead--item-border-color--base: #1E293B;
    --pf-v5-c-page__header--BackgroundColor: #0F172A;
    --pf-v5-global--BackgroundColor--100: #0F172A;
    border-bottom: 1px solid #1E293B;
}
/* PatternFly's dark scheme paints the toolbar inside the masthead near-black. */
:root.pf-v5-theme-dark .pf-v5-c-masthead .pf-v5-c-toolbar {
    --pf-v5-c-toolbar--BackgroundColor: #0F172A;
    background-color: #0F172A;
}

:root.pf-v5-theme-dark .pf-v5-c-page__sidebar {
    --pf-v5-c-page__sidebar--BackgroundColor: #0B1324;
    color: #CBD5E1;
    border-inline-end: 1px solid #1E293B;
}
:root.pf-v5-theme-dark .pf-v5-c-nav {
    --pf-v5-c-nav__link--Color: #CBD5E1;
    --pf-v5-c-nav__link--hover--Color: #F3F4F6;
    --pf-v5-c-nav__link--focus--Color: #F3F4F6;
    --pf-v5-c-nav__link--active--Color: #F3F4F6;
    --pf-v5-c-nav__link--hover--BackgroundColor: #1E293B;
    --pf-v5-c-nav__link--focus--BackgroundColor: #1E293B;
    --pf-v5-c-nav__link--active--BackgroundColor: #243248;
    --pf-v5-c-nav__link--m-current--Color: #93C5FD;
    --pf-v5-c-nav__link--m-current--BackgroundColor: #1D3354;
    --pf-v5-c-nav__item--m-current--not--m-expanded__link--BackgroundColor: #1D3354;
    --pf-v5-c-nav__section-title--Color: #64748B;
    --pf-v5-c-nav__item--before--BorderColor: #1E293B;
    --pf-v5-c-nav__link--before--BorderColor: #1E293B;
    --pf-v5-c-nav__toggle--Color: #9CA3AF;
}

:root.pf-v5-theme-dark .pf-v5-c-form-control {
    --pf-v5-c-form-control--BackgroundColor: #0F172A;
    --pf-v5-c-form-control--before--BorderTopColor: #334155;
    --pf-v5-c-form-control--before--BorderRightColor: #334155;
    --pf-v5-c-form-control--before--BorderBottomColor: #334155;
    --pf-v5-c-form-control--before--BorderLeftColor: #334155;
    --pf-v5-c-form-control--after--BorderBottomColor: transparent;
    --pf-v5-c-form-control--hover--after--BorderBottomColor: transparent;
    --pf-v5-c-form-control--focus--after--BorderBottomColor: transparent;
    --pf-v5-c-form-control--m-expanded--after--BorderBottomColor: transparent;
}
:root.pf-v5-theme-dark .pf-v5-c-form-control:focus-within {
    --pf-v5-c-form-control--before--BorderTopColor: #3B82F6;
    --pf-v5-c-form-control--before--BorderRightColor: #3B82F6;
    --pf-v5-c-form-control--before--BorderBottomColor: #3B82F6;
    --pf-v5-c-form-control--before--BorderLeftColor: #3B82F6;
}
:root.pf-v5-theme-dark .pf-v5-c-form-control::placeholder,
:root.pf-v5-theme-dark .pf-v5-c-form-control input::placeholder,
:root.pf-v5-theme-dark .pf-v5-c-form-control textarea::placeholder {
    color: #64748B;
}
:root.pf-v5-theme-dark .pf-v5-c-menu-toggle:not(.pf-m-plain):not(.pf-m-primary):not(.pf-m-secondary) {
    --pf-v5-c-menu-toggle--BackgroundColor: #0F172A;
    --pf-v5-c-menu-toggle--hover--BackgroundColor: #0F172A;
    --pf-v5-c-menu-toggle--active--BackgroundColor: #0F172A;
    --pf-v5-c-menu-toggle--focus--BackgroundColor: #0F172A;
    --pf-v5-c-menu-toggle--m-expanded--BackgroundColor: #0F172A;
    --pf-v5-c-menu-toggle--before--BorderTopColor: #334155;
    --pf-v5-c-menu-toggle--before--BorderRightColor: #334155;
    --pf-v5-c-menu-toggle--before--BorderBottomColor: #334155;
    --pf-v5-c-menu-toggle--before--BorderLeftColor: #334155;
    --pf-v5-c-menu-toggle--after--BorderBottomColor: transparent;
}
:root.pf-v5-theme-dark .pf-v5-c-masthead .pf-v5-c-menu-toggle:not(.pf-m-plain):not(.pf-m-primary):not(.pf-m-secondary) {
    --pf-v5-c-menu-toggle--BackgroundColor: transparent;
    --pf-v5-c-menu-toggle--hover--BackgroundColor: transparent;
    --pf-v5-c-menu-toggle--active--BackgroundColor: transparent;
    --pf-v5-c-menu-toggle--focus--BackgroundColor: transparent;
    --pf-v5-c-menu-toggle--m-expanded--BackgroundColor: transparent;
    --pf-v5-c-menu-toggle--before--BorderTopColor: transparent;
    --pf-v5-c-menu-toggle--before--BorderRightColor: transparent;
    --pf-v5-c-menu-toggle--before--BorderBottomColor: transparent;
    --pf-v5-c-menu-toggle--before--BorderLeftColor: transparent;
    --pf-v5-c-menu-toggle--after--BorderBottomColor: transparent;
    --pf-v5-c-menu-toggle--hover--after--BorderBottomColor: transparent;
    --pf-v5-c-menu-toggle--m-expanded--after--BorderBottomColor: transparent;
}

/* PatternFly's dark primary button is light blue with dark text; keep the
 * login's filled blue with white text instead. */
:root.pf-v5-theme-dark .pf-v5-c-button {
    --pf-v5-c-button--m-primary--BackgroundColor: #3B82F6;
    --pf-v5-c-button--m-primary--Color: #FFFFFF;
    --pf-v5-c-button--m-primary--hover--BackgroundColor: #2563EB;
    --pf-v5-c-button--m-primary--hover--Color: #FFFFFF;
    --pf-v5-c-button--m-primary--focus--BackgroundColor: #2563EB;
    --pf-v5-c-button--m-primary--active--BackgroundColor: #2563EB;
    --pf-v5-c-button--m-secondary--hover--BackgroundColor: rgba(59, 130, 246, 0.12);
    --pf-v5-c-button--m-tertiary--Color: #F3F4F6;
    --pf-v5-c-button--m-tertiary--hover--Color: #F3F4F6;
    --pf-v5-c-button--m-tertiary--after--BorderColor: #475569;
    --pf-v5-c-button--m-tertiary--hover--after--BorderColor: #64748B;
    --pf-v5-c-button--m-tertiary--hover--BackgroundColor: rgba(255, 255, 255, 0.04);
    --pf-v5-c-button--m-danger--BackgroundColor: #B91C1C;
    --pf-v5-c-button--m-danger--hover--BackgroundColor: #991B1B;
    --pf-v5-c-button--m-danger--focus--BackgroundColor: #991B1B;
    --pf-v5-c-button--m-danger--active--BackgroundColor: #991B1B;
}
:root.pf-v5-theme-dark .pf-v5-c-card {
    box-shadow: 0 0 0 1px #334155;
}
:root.pf-v5-theme-dark .pf-v5-c-form__group.pf-m-action[class*="buttonGroup"] {
    border-top-color: #334155;
}
:root.pf-v5-theme-dark .pf-v5-c-check__input,
:root.pf-v5-theme-dark .pf-v5-c-radio__input {
    accent-color: #3B82F6;
}
