/* Global fix to remove top padding from all page containers */

/* Force override all container-p-y padding with maximum specificity */
html body .container-p-y,
html body div.container-p-y,
html body .layout-wrapper .container-p-y,
html body .layout-page .container-p-y,
html body .content-wrapper .container-p-y {
    padding-top: 0 !important;
}

/* Target specific container combinations used throughout the app */
.container-xxl.container-p-y,
.container-xl.container-p-y,
.container-lg.container-p-y,
.container-md.container-p-y,
.container-sm.container-p-y,
.container.container-p-y {
    padding-top: 0 !important;
}

/* Target containers with flex-grow-1 */
.container-xxl.flex-grow-1.container-p-y,
.container-xl.flex-grow-1.container-p-y,
.container-lg.flex-grow-1.container-p-y,
.container-md.flex-grow-1.container-p-y,
.container-sm.flex-grow-1.container-p-y,
.container.flex-grow-1.container-p-y {
    padding-top: 0 !important;
}

/* Target containers within layout-page */
.layout-page .container-p-y {
    padding-top: 0 !important;
}

/* Target containers within content-wrapper */
.content-wrapper .container-p-y {
    padding-top: 0 !important;
}

/* Override the vendor CSS rule that adds padding-top */
.container-p-y:not([class^=pt-]):not([class*=" pt-"]) {
    padding-top: 0 !important;
}

/* Keep minimal bottom padding for all containers */
.container-p-y {
    padding-bottom: 1rem !important;
}

/* Ensure first headings in containers have appropriate spacing */
.container-p-y > h1:first-child,
.container-p-y > h2:first-child,
.container-p-y > h3:first-child,
.container-p-y > h4:first-child,
.container-p-y > h5:first-child,
.container-p-y > h6:first-child {
    margin-top: 0.5rem !important;
}