

/* Offcanvas compatibility for Bootstrap 3 */
.offcanvas {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    visibility: hidden;
    background-color: #fff;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    outline: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.offcanvas.show {
    visibility: visible;
    transform: translateX(0);
}

.offcanvas.offcanvas-start {
    left: 0;
    width: 400px;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
}

/* Offcanvas header */
.offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px;
    border-bottom: 1px solid #dee2e6;
}

.offcanvas-title {
    margin-bottom: 0;
    line-height: 1.5;
}

/* Offcanvas body */
.offcanvas-body {
    height: 90%;
    flex: 1 1 auto;
    padding: 16px;
    overflow-y: auto;
}

/* Button close compatibility */
.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 4px 4px;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 4px;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 0.75;
}

/* Background utilities */
.background-solde {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
}

/* Badge compatibility */
.offcanvas-body  .badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius:4px;
}

.badge-primary {
    background-color: #0d6efd;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}






/* Dropdown compatibility */
.dropdown-item-text {
    padding: 4px 16px;
    color: #6c757d;
}


/* Button styling */
.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: #fff;
}

/* FontAwesome spinning icon compatibility */
.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Ensure proper stacking context */
.offcanvas {
    position: fixed;
    z-index: 1050;
}

/* Flex column for navigation */
.nav.flex-column {
    flex-direction: column;
}

/* Override any conflicting Bootstrap 3 styles */
.offcanvas .nav-link {
    border-radius: 4px;
    margin-bottom: 16px;
}

.offcanvas .nav-link:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.offcanvas .nav-link.active {
    background-color: #007bff;
    color: #fff;
}