:root {
    --pf-v5-global--FontFamily--text: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --pf-v5-global--FontFamily--heading: var(--pf-v5-global--FontFamily--text);
    --pf-v5-global--Color--100: #213b46;
    --pf-v5-global--Color--200: #657782;
    --pf-v5-global--primary-color--100: #80612e;
    --pf-v5-global--primary-color--200: #60471f;
    --pf-v5-global--link--Color: #80612e;
    --pf-v5-global--link--Color--hover: #60471f;
    --pf-v5-global--active-color--100: #ac874a;
    --pf-v5-global--BackgroundColor--200: #f4f5f3;
}
body { background: #f4f5f3; }
.pf-v5-c-page { background: #f4f5f3; }
.pf-v5-c-page__header, .pf-v5-c-masthead {
    background: linear-gradient(110deg, #102b36, #214754);
    border-bottom: 0;
    box-shadow: 0 4px 20px #102b3614;
    min-height: 88px;
}
.pf-v5-c-brand { width: 226px; height: 48px; max-width: 100%; }
.pf-v5-c-page__header-brand-link { padding-block: 10px; }
.pf-v5-c-page__sidebar {
    background: #fff;
    border-right: 1px solid #e2e6e5;
    box-shadow: none;
    padding-top: 24px;
}
.pf-v5-c-nav { --pf-v5-c-nav__link--Color: #344e59; --pf-v5-c-nav__link--m-current--Color: #614a24; }
.pf-v5-c-nav__link {
    margin: 4px 14px;
    padding: 13px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}
.pf-v5-c-nav__link.pf-m-current { background: #214754; color: #fff; font-weight: 650; }
.pf-v5-c-nav__item { border: 0; }
.pf-v5-c-nav .pf-v5-c-nav__item.pf-m-expandable::before { border: 0; }
.pf-v5-c-nav__item::before, .pf-v5-c-nav__item::after,
.pf-v5-c-nav__link::before, .pf-v5-c-nav__link::after { border: 0; }
.pf-v5-c-nav__link:is(:hover, :focus-visible) { background: #214754; color: #fff; }
.pf-v5-c-page__main { padding: 32px; gap: 20px; }
.pf-v5-c-page__main-section {
    background: #fff;
    border: 1px solid #e2e6e5;
    border-radius: 18px;
    box-shadow: 0 4px 20px #18364204;
    padding: 28px 32px;
}
.pf-v5-c-title { color: #173845; font-weight: 650; letter-spacing: -.025em; }
.pf-v5-c-title.pf-m-2xl { font-size: 28px; }
.pf-v5-c-content p { color: #657782; }
.pf-v5-c-form-control { border-radius: 8px; background: #fafbf9; --pf-v5-c-form-control--after--BorderBottomColor: #c7d2d3; }
.pf-v5-c-button { border-radius: 8px; }
.pf-v5-c-button.pf-m-primary { background: #80612e; color: #fff; padding-inline: 24px; }
.pf-v5-c-button.pf-m-primary:hover { background: #60471f; }
.pf-v5-c-button.pf-m-secondary { color: #70552a; --pf-v5-c-button--after--BorderColor: #b99559; }
.pf-v5-c-card, .pf-v5-c-data-list { border-radius: 12px; overflow: hidden; }
.keycloak__loading-container { background: #f4f5f3; color: #173845; }
.pf-v5-c-masthead__brand img { width: 226px; height: 48px; max-width: 100%; }
.pf-v5-c-masthead .pf-v5-c-toolbar { background: transparent; }
.pf-v5-c-masthead .pf-v5-c-menu-toggle { color: #f2f5f4; background: transparent; }
.pf-v5-c-masthead .pf-v5-c-menu-toggle::before { border-color: #ffffff30; }
@media (max-width: 767px) {
    .pf-v5-c-page__main { padding: 16px; gap: 16px; }
    .pf-v5-c-page__main-section { padding: 22px 18px; border-radius: 14px; }
    .pf-v5-c-page__main-section .pf-v5-c-title { font-size: 24px; }
    .pf-v5-c-masthead { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 8px; padding: 12px 16px; min-height: 76px; }
    .pf-v5-c-masthead__toggle { grid-column: 1; grid-row: 1; margin: 0; }
    .pf-v5-c-masthead__brand { grid-column: 2; grid-row: 1; }
    .pf-v5-c-masthead__brand img { width: 180px; height: 40px; }
    .pf-v5-c-masthead__content { grid-column: 3; grid-row: 1; margin: 0; }
    .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 { width: 40px; min-width: 0; padding: 0; }
    .pf-v5-c-masthead .pf-v5-c-toolbar__content-section { gap: 0; }
    .pf-v5-c-masthead .pf-v5-c-toolbar__item { margin: 0; }
    .pf-v5-c-masthead .pf-v5-c-toolbar__item.pf-m-overflow-menu { display: none; }
    .pf-v5-c-masthead .pf-v5-c-menu-toggle.pf-m-plain, .pf-v5-c-masthead__toggle .pf-v5-c-button { width: 40px; padding-inline: 8px; }
}

.pf-v5-c-masthead .pf-v5-c-toolbar__item.pf-m-overflow-menu { display: none; }
.pf-v5-c-masthead [data-testid="options-toggle"], .pf-v5-c-masthead [data-testid="options-kebab-toggle"] { display: flex; align-items: center; gap: 10px; }
.levels-profile-avatar { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.levels-photo-error { color: #f0d39f; font-size: 12px; }
#levels-photo-field .pf-v5-c-form__group-label { font-weight: 600; }

/* Remove decorative separators in the sidebar for every item state */
.pf-v5-c-page__sidebar .pf-v5-c-nav__item::before,
.pf-v5-c-page__sidebar .pf-v5-c-nav__item::after,
.pf-v5-c-page__sidebar .pf-v5-c-nav__link::before,
.pf-v5-c-page__sidebar .pf-v5-c-nav__link::after { content: none; border: 0; }
.pf-v5-c-page__sidebar .pf-v5-c-nav .pf-v5-c-nav__link:is(:hover, :focus-visible),
.pf-v5-c-page__sidebar .pf-v5-c-nav .pf-v5-c-nav__link.pf-m-current:is(:hover, :focus-visible) { color: #fff; background: #214754; }
/* Keep the profile trigger borderless without removing its keyboard focus outline */
.pf-v5-c-masthead [data-testid="options-toggle"],
.pf-v5-c-masthead [data-testid="options-kebab-toggle"],
.pf-v5-c-masthead [data-testid="options-toggle"]::before,
.pf-v5-c-masthead [data-testid="options-toggle"]::after,
.pf-v5-c-masthead [data-testid="options-kebab-toggle"]::before,
.pf-v5-c-masthead [data-testid="options-kebab-toggle"]::after { border: 0; box-shadow: none; }

.pf-v5-c-page__sidebar .pf-v5-c-nav .pf-v5-c-nav__link.pf-m-current,
.pf-v5-c-page__sidebar .pf-v5-c-nav .pf-v5-c-nav__item.pf-m-current:not(.pf-m-expanded) > .pf-v5-c-nav__link { background: #214754; color: #fff; }

.pf-v5-c-masthead [data-testid="options-toggle"] .pf-v5-c-menu-toggle__controls { display: none; }

#levels-locale-menu { position: relative; margin-inline-end: 16px; color: #fff; }
#levels-locale-menu summary { cursor: pointer; list-style: none; padding: 8px; font-weight: 600; }
#levels-locale-menu summary::-webkit-details-marker { display: none; }
#levels-locale-menu > button { position: absolute; top: 100%; right: 0; z-index: 100; width: 180px; padding: 14px; border: 1px solid #e2e6e5; border-radius: 10px; background: #fff; color: #173845; cursor: pointer; }
#levels-locale-field:popover-open { display: grid; gap: 16px; margin: auto; padding: 28px; width: min(420px, calc(100vw - 32px)); border: 1px solid #e2e6e5; border-radius: 16px; background: #fff; color: #173845; }
#levels-locale-field::backdrop { background: #102e3666; }
#levels-locale-field p { font-size: 14px; }

/* PatternFly form layout must not override the closed native popover state */
#levels-locale-field:not(:popover-open) { display: none !important; }
#levels-locale-menu:not([open]) > button { display: none; }

#levels-locale-field:popover-open > p { grid-column: 1 / -1; margin: 0; }
#levels-locale-field:popover-open > button { grid-column: 1 / -1; justify-self: end; width: auto; }

/* The first Keycloak locale option is the empty placeholder */
#levels-locale-field [role="listbox"] > li:first-child { display: none; }

#levels-photo-field { grid-template-columns: 1fr; }
#levels-photo-field .pf-v5-c-form__group-control { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.levels-photo-preview { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; }

#levels-photo-field .pf-v5-c-form__group-control { grid-column: 1 / -1; justify-self: start; margin-inline: 0; }

.levels-photo-edit { position: relative; display: block; width: 128px; height: 128px; border-radius: 50%; overflow: hidden; }
.levels-photo-edit .levels-photo-preview { display: block; }
.levels-photo-pencil { position: absolute; inset: 0; display: grid; place-items: center; background: #102e3680; color: #fff; opacity: 0; transition: opacity .15s; pointer-events: none; }
.levels-photo-pencil svg { width: 28px; height: 28px; }
.levels-photo-edit:is(:hover, :focus-visible) .levels-photo-pencil { opacity: 1; }
.levels-photo-edit:focus-visible { outline: 3px solid #b99559; outline-offset: 4px; }

.levels-single-profile-section > :last-child { display: none; }
.levels-single-profile-section > :first-child { grid-column: 1 / -1; }
.levels-single-profile-section section h1[id] { display: none; }

/* Credential categories are page sections with a built-in zero-padding utility */
.pf-v5-c-page__main-section:has(> h2[id$="-categ-title"]) {
    padding: 24px !important;
    margin-block-end: 20px;
}
.pf-v5-c-page__main-section:has(> h2[id$="-categ-title"]) > .pf-v5-c-data-list:last-child { margin-bottom: 0; }
@media (max-width: 767px) {
    .pf-v5-c-page__main-section:has(> h2[id$="-categ-title"]) { padding: 20px 16px !important; }
}

.levels-app-name { display: flex; align-items: center; gap: 10px; }
.levels-app-icon { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }

.levels-client-detail { display: none !important; }
.levels-edit-app-icon { font-size: 12px; margin-inline-start: 8px; }
