html, body {
    background-image: none !important;
    font-size: 12px;
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

@media screen and (max-width: 767.98px) {
    html, body {
        font-size: 14px;
    }
}

a {
    text-decoration: none;
}

.flex, .d-flex {
    display: flex;
}

.flex > * {
    flex: 1;
}

@media (min-width: 768px) {
    .mw-md-768px {
        max-width: 768px !important;
    }

    .mw-md-992px {
        max-width: 992px !important;
    }
}

@media (min-width: 992px) {
    .w-lg-150px {
        width: 150px !important;
    }

    .w-lg-200px {
        width: 200px !important;
    }

    .w-lg-300px {
        width: 300px !important;
    }
}

header#header {
    padding: 1em;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    background-color: white;
    flex-shrink: 0;
    z-index: 1;
}

header div#button-group {

}

div.admin-super {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

div.admin-layout {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    width: 100%;
}

aside.admin-sidebar {
    background-color: #fff; /* Bootstrap dark background */
    color: #555;
    flex-shrink: 0; /* Prevents the sidebar from squishing */
    transition: all 0.3s ease-in-out; /* Smooth sliding animation */
    overflow-y: auto;
    display: flex;
    flex-direction: row;
}

.admin-sidebar.collapsed {
    margin-left: -330px;
}

aside.admin-sidebar nav#sidebar-modules {
    width: 80px;
    background-color: #f5f5f0;
    border-right: 1px solid rgba(31, 30, 29, 0.15);
    color: rgb(43 43 43);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10px;
    gap: 10px;
}

div#bottombar-modules {
    position: fixed;
    bottom: 0;
    height: 70px;
    background-color: #f5f5f0;
    z-index: 99;
    width: 100dvw;
    overflow-x: scroll;
    padding: 5px;
}

div#bottombar-modules nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    width: max-content;
}

div#bottombar-modules nav a {
    flex-shrink: 0;
    flex-grow: 0;
}

a.sidebar-module {
    width: 60px;
    height: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: #3d3d3d;
}

.sidebar-module:hover {
    background-color: #ffffff;
}

.sidebar-module.active {
    /*background-color: #ffffff;*/
    border-radius: 10px;
    color: #0a53be;
}

.sidebar-module i {
    display: block;
    font-size: 1.5rem;
}

.sidebar-module div {
    font-size: 0.9rem;
}

aside.admin-sidebar nav#sidebar-actions {
    background-color: #FCFCF8;
    padding-top: 20px;
    width: 250px;
    border-right: 1px solid rgba(31, 30, 29, 0.15);
}

/* 3. Main Content Base Styles */
main.admin-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    transition: all 0.3s ease-in-out;
}

main div#content {
    padding: 1em;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
}

@media (max-width: 767.98px) { /* Bootstrap 'md' breakpoint */

    aside.admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1045; /* Sits above Bootstrap navbars/modals */

        /* Start off-screen on mobile */
        transform: translateX(-100%);
        margin-left: 0 !important; /* Override the desktop negative margin */
    }

    /* Mobile Expanded State */
    /* Adding this class via JS will slide the sidebar in over the content */
    .admin-sidebar.show-mobile {
        transform: translateX(0);
        box-shadow: 0 0 15px rgba(0,0,0,0.5); /* Helps it pop against the content */
    }
}

/* MENU LATERAL */

.admin-sidebar ul {
    list-style: none;
    padding: 0 10px;
    margin: 0;
}

.admin-sidebar li.section {
    padding: 8px 22px;
    font-size: 0.8em;
    text-transform: uppercase;
}

/* 2. Style the main anchor links */
.admin-sidebar li a {
    display: flex;           /* Flexbox makes aligning the icon and text easy */
    align-items: center;     /* Vertically centers the icon and text */
    padding: 8px 5px;
    text-decoration: none;
    color: #555;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 10px;
    flex-grow: 0;
}

.admin-sidebar li.active a {
    background-color: rgb(214, 228, 246);
    color: rgb(50, 102, 173);
    font-weight: 600;
}

/* Hover state for links */
.admin-sidebar li:not(.active) a:hover {
    color: #444;
    background-color: rgba(20, 20, 20, 0.1);
}

/* 3. Handle the FontAwesome icons */
.admin-sidebar li a i {
    width: 30px;             /* Fixed width ensures text aligns perfectly across all items */
    text-align: center;
    flex-grow: 0;
}

.admin-sidebar li a span {
    width: 180px;
    padding-left: 5px;
    flex-grow: 0;
}

/* 4. Submenu Base Styles */
.admin-sidebar li > ul {
    display: none;           /* Hide submenus by default */
    background-color: #212529; /* Slightly darker than the #343a40 sidebar background */
}

/* Indent submenu links slightly so hierarchy is obvious */
.admin-sidebar li > ul li a {
}

/* 5. The Toggle Classes (Toggled via JS) */
/* When the JS adds 'submenu-open' to the LI, display the UL */
.admin-sidebar li.submenu-open > ul {
    display: block;
}

/* 6. Optional UX: Add a dynamic dropdown chevron */
.admin-sidebar li.has-submenu > a::after {
    content: '\25BC';        /* Unicode for a downward triangle */
    font-size: 0.6em;
    margin-left: auto;       /* Flexbox magic: pushes the arrow to the far right edge */
    transition: transform 0.3s ease;
}

/* Flip the arrow when the menu is open */
.admin-sidebar li.submenu-open > a::after {
    transform: rotate(180deg);
}

/* FIM MENU LATERAL */

/* MENU ENTITY */

@media (min-width: 768px) {
    nav.admin-entity-sidebar {
        /*border-right: 1px solid var(--bs-border-color);*/
        border-bottom: none;
        overflow-x: hidden;
    }

    nav.admin-entity-sidebar ul.nav {
        border-bottom: none;
    }
}
@media (max-width: 767px) {
    nav.admin-entity-sidebar {
        border-bottom: 1px solid var(--bs-border-color);
        border-right: none;
    }

    nav.admin-entity-sidebar ul.nav a.nav-link {
        height: 100%;
    }

    .overflow-sm-auto {
        overflow-x: auto !important;
        overflow-y: auto !important;
    }
}

nav.admin-entity-sidebar {
    background-color: #FFFFFF;
}

.profile {
    background: linear-gradient(to left, #336181, #013a6b);
    color: rgb(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-bottom: 2px solid #ccc;
}

.profile-text-holder {
}

.profile-image-holder {
    background-color: white;
    padding: 2px;
    border: 1px solid #666;
}

.profile-image-holder img {
    height: 80px;
    width: 60px;
    object-fit: cover;
}
