/* Sidebar icon-only drawer mode for mobile */
@media (max-width: 767.98px) {
    #sidebar {
        position: fixed;
        top: 56px;
        left: -48px; /* Hide off-canvas by default */
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        height: calc(100vh - 56px);
        box-shadow: 2px 0 8px rgba(0,0,0,0.12);
        transition: left 0.3s;
        z-index: 2000;
    }
    #sidebar.active {
        left: 0;
    }
    #sidebar .sidebar-header h5 {
        font-size: 1.1rem;
    }
    #sidebar .sidebar-header .sidebar-title-text {
        display: none;
    }
    #sidebar ul li a, #sidebar ul li button {
        justify-content: center;
        padding: 0.5rem 0.1rem;
    }
    #sidebar ul li a span, #sidebar ul li button span {
        display: none;
    }
    #content {
        margin-left: 0 !important;
    }
    #sidebarToggle {
        display: block;
        position: absolute;
        left: 12px;
        top: 10px;
        z-index: 2100;
    }
    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        width: 100vw;
        height: calc(100vh - 56px);
        background: rgba(0,0,0,0.2);
        z-index: 1999;
    }
    #sidebar.active ~ #sidebar-overlay {
        display: block;
    }
}
body {
    background: #f8f9fa;
}
#sidebar {
    background: linear-gradient(180deg, #0cb7d6 0%, #007bff 100%);
    color: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,0.08);
}
#sidebar .sidebar-header {
    background: rgba(255,255,255,0.08);
    border-bottom: 1px solid #e3e3e3;
    color: #fff;
}
#sidebar ul.components {
    margin-top: 1rem;
}
#sidebar ul li {
    margin-bottom: 0.5rem;
}
#sidebar ul li a, #sidebar ul li button {
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background 0.2s, color 0.2s;
    font-size: 1rem;
    width: 100%;
    text-align: left;
}
#sidebar ul li a:hover, #sidebar ul li button:hover, #sidebar ul li a.active {
    background: rgba(255,255,255,0.15);
    color: #ffe082;
    text-decoration: none;
}
#sidebar ul li .fa {
    margin-right: 0.75rem;
    font-size: 1.1em;
}
#sidebar .sidebar-header h5 {
    font-weight: bold;
    letter-spacing: 1px;
}
#content {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 2rem 4.5rem;
    margin-top: 1.5rem;
    min-height: 80vh;
}
.custom-footer {
    margin-left: 170px; /* Match #content margin-left on desktop */
    transition: margin-left 0.3s;
}
body.no-sidebar .custom-footer {
    margin-left: 0; /* remove gap if no sidebar */
}


@media (max-width: 767.98px) {
    .custom-footer {
        margin-left: 0 !important;
    }
}

/* change tooltip background & text */
.tooltip .tooltip-inner {
    background-color: #007bff; /* blue background */
    color: #fff; /* white text */
    font-size: 0.9rem; /* smaller font if you like */
    padding: 6px 10px;
    border-radius: 4px;
}

/* change the tooltip arrow */
.tooltip.bs-tooltip-right .arrow::before {
    border-right-color: #007bff !important;
}

.tooltip.bs-tooltip-left .arrow::before {
    border-left-color: #007bff !important;
}

.tooltip.bs-tooltip-top .arrow::before {
    border-top-color: #007bff !important;
}

.tooltip.bs-tooltip-bottom .arrow::before {
    border-bottom-color: #007bff !important;
}
