.page-loader {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    background-color: rgba(0,0,0,.99);
}

.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    border: 2px solid #066894;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.loader::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 4px;
    top: 4px;
    border: 2px solid #FFF;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#wrapper #content-wrapper {
    background-color: #e8edf5;
}

.sdb-color {
    background-color: #071133;
}

.navcmcolor { 
    background-color: #0d1b3e; border-left: 1px solid rgba(255,255,255,.05);
}

/* Button actions */

.buttonCreate {
    background-color: #071133;
    color: #fff;
    border: none;
    position: fixed;
    bottom: 80px;
    right: 0;
    padding: 15px 20px;
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    z-index: 1000;
    transition: all ease .4s;
}

.buttonCreate:hover {
    background-color: #055a7d;
    padding: 15px 35px;
}

.buttonCreate:active {
    background-color: #054a6d;
}

.buttonCreate i {
    color: #fff;
}

@media (max-width: 500px) {
    .buttonCreate {
        display: none;
    }
    
}

/* Chat */

.chat-layout {
        display: flex;
        height: 80vh;
        background: #f0f2f5;
        border-radius: 10px;
        overflow: hidden;
    }

    .conversations-list {
        width: 30%;
        border-right: 1px solid #ddd;
        overflow-y: auto;
        background-color: #fff;
    }

    .conversation-item {
        padding: 15px;
        border-bottom: 1px solid #eee;
        cursor: pointer;
        transition: background 0.2s;
    }

    .conversation-item.active {
        background-color: #e9ecef;
    }

    .conversation-item:hover {
        background-color: #f8f9fa;
    }

    .chat-view {
        flex: 1;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    #chat-container {
        flex: 1;
        padding: 20px;
    }

    #chat-loading {
        padding: 2rem;
        text-align: center;
        color: #aaa;
    }

    #chat-box {
        height: 70vh;
        overflow-y: auto;
        background-color: #e5ddd5;
        padding: 20px;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
    }

    #messages {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .message {
        display: inline-block;
        max-width: 75%;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 14px;
        word-break: break-word;
        box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    }

    .sent {
        align-self: flex-end;
        background-color: #dcf8c6;
        border-radius: 8px 8px 0 8px;
    }

    .received {
        align-self: flex-start;
        background-color: #fff;
        border-radius: 8px 8px 8px 0;
    }

    .message .time {
        font-size: 11px;
        color: #999;
        text-align: right;
        margin-top: 5px;
    }

    .message img,
    .message video,
    .message audio {
        margin-top: 8px;
        border-radius: 6px;
        max-width: 100%;
    }

    .message a {
        display: inline-block;
        margin-top: 8px;
        color: #0d6efd;
        text-decoration: none;
    }

    .message a:hover {
        text-decoration: underline;
    }

    .time {
        font-size: 11px;
        color: #888;
        text-align: right;
        margin-top: 6px;
    }

    .card.metric-card {
        border: none;
        border-radius: 1rem;
        background: #fff;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
        transition: all 0.2s ease-in-out;
    }

    .card.metric-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }

    .metric-label {
        font-size: 0.75rem;
        text-transform: uppercase;
        font-weight: 600;
        color: #6c757d;
    }

    .metric-value {
        font-size: 1.8rem;
        font-weight: bold;
        color: #343a40;
    }

    .metric-icon i {
        font-size: 2.2rem;
    }

    .table thead th {
        background-color: #f8f9fa;
        font-weight: 600;
    }

    .table td, .table th {
        vertical-align: middle;
    }

    .profileInfo {
        margin-top: -70px;
        margin-left: 25px;
        display: flex;
        flex-flow: row wrap;
        align-items: center;
    }

    .badge-balance {
        font-size: 1rem;
        padding: 10px 20px;
        border-radius: 8px;
        margin-right: 10px;
    }

    .modal-title strong {
        font-weight: bold;
    }

    .card .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .card .card-header .btn {
        margin: 0 5px;
    }

    .nav-tabs .nav-link.active {
        background-color: #f8f9fa;
        border-color: #dee2e6 #dee2e6 #fff;
        font-weight: bold;
    }

    .list-group-item {
        background-color: #fff;
        border: 1px solid #f1f1f1;
    }

    .table th, .table td {
        vertical-align: middle !important;
    }