:root {
    --keycloak-bg-logo-url: url('../img/bgimage.jpg');
    --keycloak-logo-url: url('../img/logo.png');
    --keycloak-logo-height: 63px;
    --keycloak-logo-width: 300px;
    --pf-v5-global--danger-color--100: #c9190b;
    --pf-v5-global--success-color--100: #3e8635;
    --pf-v5-global--active-color--100: #0066cc;
    --pf-v5-global--primary-color--100: #0066cc;
    --pf-v5-global--link--Color: #0066cc;
    --pf-v5-global--link--Color--hover: #004080;
    --pf-v5-global--BackgroundColor--light-100: #ffffff;
    --pf-v5-global--BackgroundColor--dark-300: #212427;
    --pf-v5-global--BackgroundColor--dark-100: #17376e;
    --pf-v5-global--Color--100: #151515;
    --pf-v5-global--Color--light-100: #ffffff;
    --pf-v5-global--Color--dark-100: #151515;
}

/* 1. PERMANENT SIDEBAR & NAV CLEANUP */
.pf-v5-c-page__sidebar { display: none !important; }
.pf-v5-c-page__header-tools-item .pf-v5-c-button.pf-m-plain[aria-label="Global navigation"],
.pf-v5-c-page__header-brand-toggle { display: none !important; }
.pf-v5-c-page__main { margin-left: 0 !important; --pf-v5-c-page__main--md--PaddingLeft: 0; }
.pf-v5-c-breadcrumb { display: none !important; }

/* 2. PORTAL MODE */
body.mode-portal .pf-v5-c-page__main-section > *:not(#custom-portal-wrapper) { display: none !important; }
.portal-main-title { font-size: 2.25rem !important; font-weight: 700 !important; color: #151515 !important; margin-bottom: 8px !important; text-align: center; }

/* 3. SETTINGS MODE (Centering forms) */
body:not(.mode-portal) .pf-v5-c-page__main-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    max-width: 1000px;
    margin: 40px auto !important;
    background: #ffffff;
    padding: 40px !important;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    gap: 15px !important;
}

/* 4. RADIUS BUTTON COMPATIBILITY */
#radius-password-wrapper {
    display: block !important;
    width: 100% !important;
    flex: none !important; /* Prevents it from disappearing in flex layout */
}

/* 5. BACK BUTTON */
#portal-back-btn {
    display: inline-block !important;
    margin-top: 20px !important;
    padding: 10px 20px !important;
    background: #f0f0f0 !important;
    color: #151515 !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    border: 1px solid #d2d2d2 !important;
}

#portal-back-btn:hover { background: #e0e0e0 !important; }

/* 6. GLOBAL APPEARANCE */
body { background-color: #f5f5f5 !important; }
