:root{
    --m-main-color: #16ad9a;
    --m-primary-color: #5c4fc7;
}
body,
body[data-topbar-color="light"] .navbar-custom .topnav-menu .nav-link,
.dropdown-item,
.btn-outline-secondary{
    color: var(--bs-dark);
}
.dropdown-item{
    padding: .375rem .75rem;
}
img{
    max-width: 100%;
}
.flex-1 {
    flex: 1;
}
.cursor-pointer{
    cursor: pointer;
}
.card{
    margin-bottom: 15px;
}
#card-list {
    flex: 1;
    margin-bottom: 0;
}
.report-table .table-responsive {
    max-height: calc(100vh - 110px);
}

#card-list .card-table {
    position: relative;
    overflow: auto;
    flex: 1;
}
#card-list .card-table .table-responsive{
    max-height: 100%;
}

.table{
    color: var(--bs-dark);
}
.table.dataTable{
    margin-bottom: 0 !important;
}
.table thead th{
    background-color: #f3f7f9;
}
.table thead {
    position: sticky;
    top: 0;
    z-index: 2; /* Đặt z-index để header luôn ở trên tbody */
    background-color: #f3f7f9; /* Thêm màu nền cho toàn bộ thead để tránh bị trong suốt */
}
.table tr>th.sorting{
    cursor: pointer;
    position: relative;
}
.table tr>th.sorting.sorting_asc, .table tr>th.sorting.sorting_desc{
    color: var(--bs-blue);
}
.table tr>th.sorting.sorting_asc::before, .table tr>th.sorting.sorting_desc::after{
    opacity: 1;
    color: blue;
}
.table tr>th.sorting::before, .table tr>th.sorting::after {
    position: absolute;
    opacity: 0.3;
    transition: 0.15s all;
    bottom: 50%;
    transform: translateY(50%);
}
table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting{
    padding-left: .5rem;
}
.table tr>th.checkbox,
.table tr>td.checkbox {
    width: 30px;
    padding-right: 0;
}
.table tr>th.tool,
.table tr>td.tool {
    width: 1%;
    white-space: nowrap;
}
.table tr>td.tool>*{
    display: inline-block;
    vertical-align: middle;
}
.table tr>td.tool .form-switch {
    padding-left: 28px;
    margin-right: 5px;
    min-height: unset;
}

.table tr>td.tool .form-switch .form-check-input {
    margin-left: -28px;
    margin-top: 0;
}
.table-hover>tbody>tr:hover{
    --bs-table-accent-bg: #f3f7f990;
    color: var(--bs-dark);
}
.table .left-sticky {
    position: sticky;
    left: 0;
    background-color: #f3f7f9;
    z-index: 20;
}


.card-filter {
    padding: 5px 10px;
    border-bottom: 1px solid #EEE;
}

.card-body .card-filter {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    margin-top: -5px;
}

.card-filter>.row>* {
    margin: 5px 0;
}

.card-filter .form-group {
    margin-bottom: 0;
}

.card-filter .form-group .form-label {
    margin-bottom: 1px;
}

.card-pagination {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: #dee2e6 thin solid;
}

.card-pagination .info {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    padding: 0.9rem 1rem 0.8rem;
    margin: 0;
    border-bottom: 1px solid #EEE;
    font-weight: 600;
    font-size: 18px;
    color: #323a46;
}
.card-body {
    padding: 1rem;
}

.close-jq-toast-single {
    top: 0;
    right: 0;
    font-size: 16px;
    height: 20px;
    width: 20px;
    line-height: 20px;
    background: none;
}

/* Form */
.form-label,
.form-check-input{
    cursor: pointer;
}
.form-group {
    margin-bottom: 15px;
}

.form-label {
    margin-bottom: 5px;
}

.btn{
    padding: .25rem .9rem;
}

.form-control {
    color: var(--bs-text-color);
    background-color: transparent;
    padding: .25rem .9rem;
}
.form-control[has_value] {
    color: red !important;
}
.select2.form-control[has_value] + span .select2-selection__rendered{
    color: red !important;
}

.form-control.form-control-sm {
    line-height: 1.2;
}

.form-control.disabled,
.form-control:disabled,
.form-control:not(.flatpickr-input)[readonly] {
    background-color: #f5f5f5;
}
.form-control.flatpickr-input:not(.disabled) {
    background-color: none;
}

.form-control.datepicker {
    padding: 0.45rem 0.9rem !important;
}

.form-select {
    background-position: right 8px center;
    padding-right: 28px;
}

.form-help-text {
    font-size: 13px;
    padding: 1px 0 0;
}
.input-error .input>*, .input-error .input-group>*,
.input-error .selectize-input,
.input-error .form-check-input,
.input-error .multiselect.form-control,
.input-error .select2-container .select2-selection{
    border-color: #f1556c !important;
}
.input-error .error {
    color: #f1556c;
    font-size: 13px;
    margin: 1px 0 0;
}
.select2-container{width: 100% !important;}

.jq-toast-wrap{
    width: 300px;
}
/* Modal */
.modal .modal-header {
    border-bottom: 1px solid #EEE;
    padding-top: 10px;
    padding-bottom: 10px;
}

.modal .modal-footer {
    border-top: 1px solid #EEE;
    padding-top: 10px;
    padding-bottom: 10px;
}

.modal.show~.modal.show {
    z-index: 1061;
}

.modal-backdrop.fade.show~.modal-backdrop.fade.show {
    z-index: 1060;
}

.modal.show~.modal.show~.modal.show {
    z-index: 1071;
}

.modal-backdrop.fade.show~.modal-backdrop.fade.show~.modal-backdrop.fade.show {
    z-index: 1070;
}

.modal.show~.modal.show~.modal.show~.modal.show {
    z-index: 1081;
}

.modal-backdrop.fade.show~.modal-backdrop.fade.show~.modal-backdrop.fade.show~.modal-backdrop.fade.show {
    z-index: 1080;
}

.modal .modal-content {
    overflow: hidden;
}

.modal .modal-content>.btn-close {
    position: absolute;
    right: 15px;
    top: 17px;
    z-index: 2;
}

/* width - height */
.wc-20 {
    width: 20px;
}

.wc-30 {
    width: 30px;
}

.wc-40 {
    width: 40px;
}

.wc-50 {
    width: 50px;
}

.wc-80 {
    width: 80px;
}

.wc-100 {
    width: 100px;
}

.wc-120 {
    width: 120px;
}

.wc-150 {
    width: 150px;
}

.wc-200 {
    width: 200px;
}


#modal-call-view.modal-form .modal-body {
    background-color: var(--bs-body-bg);
}

#modal-call-view .page-title-box {
    margin-left: -1rem;
    margin-right: -1rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
    padding: 1rem 1rem 0.7rem;
    background-color: #fff;
    border-bottom: 1px solid #EEE;
}

#modal-call-view .page-title-box .page-title {
    line-height: unset;
    padding-right: 30px;
}

.bg-gray,
.bg-hover-gray:hover {
    background-color: #f5f5f5;
}
/* Login */
.bg-pattern {
    background-image: url("../images/bg-pattern-2.png");
    background-size: cover;
}
body.authentication-bg-pattern {
    background-image: url("../images/bg-pattern.png");
    background-size: cover;
    background-color: #6658dd;
    background-position: center;
}

.navbar-custom .app-search{
    margin-right: 15px;
}
.navbar-custom .topnav-menu>li.active>.nav-link{
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}
.navbar-custom .dropdown-item.active, .navbar-custom .dropdown-item:active{
    color: var(--m-main-color);
}
.navbar-custom .dropdown-item>span{display: inline-block; margin: 0 5px;}

.conversation-list{
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}
.conversation-item{
    margin-bottom: 10px;
}
.page-message-item+.page-message-item .conversation-name,
.customer-message-item+.customer-message-item .conversation-name{
    display: none;
}
.conversation-item .conversation-info{
    max-width: 80%;
    display: flex;
    flex-flow: column;
}
.conversation-item.flex-row-reverse .conversation-info{
    align-items: flex-end;
}
.conversation-item .msg-info{
    padding: 10px 15px;
    background-color: rgba(var(--bs-info-rgb), 0.1);
    border: rgba(var(--bs-info-rgb), 0.5) thin solid;
    border-radius: 10px;
    position: relative;
}
.conversation-item.flex-row-reverse .msg-info{
    background-color: rgba(var(--bs-warning-rgb), 0.1);
    border: rgba(var(--bs-warning-rgb), 0.5) thin solid;
}
.conversation-item .conversation-info .conversation-name{
    font-weight: bold;
}
.conversation-item.flex-row-reverse .conversation-info .conversation-name{
    float: right;
}
.conversation-item .conversation-info .conversation-content{
    font-weight: 500;
}
.conversation-item .conversation-info .conversation-time{
    font-size: 0.9em;
    font-style: italic;
    opacity: 0.65;
    margin-top: 2px;
}
.conversation-item.flex-row-reverse .conversation-info .conversation-time{
    float: right;
}
.conversation-item .attachment-thumbnail {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin: 3px;
}



#sidebar-menu ul li a {
    display: block;
    padding: 5px 12px;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
}

#sidebar-menu ul li a:hover {
    color: var(--m-primary-color);
    background-color: #f5f5f5;
}

#sidebar-menu .menuitem-active>a {
    background-color: #f0eefc;
    color: var(--m-primary-color);
}

.copyable{
    cursor: pointer;
}

#left-content-area {
    background-color: #fff;
}

.widget-loader .card-body{
    min-height: 350px;
}

#brand-topbar ul.dropdown-menu{
    left: auto !important;
    right: 0 !important;
    width: 230px;
}
#brand-topbar ul.dropdown-menu label{
    margin-bottom: 0;
    flex: 1;
    margin-left: 5px;
}
#brand-topbar .brand-select-all{
    border-top: 1px solid #e9f0f4;
}
@media screen and (min-width: 550px) {
    .table tr>th.index,
    .table tr>td.index {
        width: 40px;
    }
}
@media screen and (min-width: 992px) {
    .navbar-custom .dropdown:hover>.dropdown-menu {
        display: block;
    }
    .report-page{
        display: flex;
    }
    #left-content-area {
        padding: 12px;
        width: 270px;
        height: calc(100vh - 50px);
        overflow-y: auto;
    }

    #right-content-area{
        height: calc(100vh - 50px);
        overflow-y: auto;
    }
    #card-list{
        height: calc(100vh - 110px);
    }
}
@media screen and (max-width: 992px) {
    .logo-box{
        height: 50px;
    }
    .logo-box .logo{
        line-height: 50px;
    }
    body{
        padding-bottom: 15px;
    }
    .content-page{padding: 0}
    .card-pagination{
        flex-direction: column;
    }
    .card-pagination .info{margin-top: 10px;}

    .conversation-item .conversation-info{
        max-width: 95%;
    }

    .main-menu{
        position: fixed;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: -99;
        background-color: rgba(0,0,0,0.7);
        overflow: hidden;
        transition: all 0.3s;
        opacity: 0;
        visibility: hidden;
    }
    .main-menu.show{
        z-index: 99;
        opacity: 1;
        visibility: visible;
    }
    .main-menu>ul{
        background-color: #fff;
        width: 250px;
        max-width: 90%;
        height: 100%;
        padding-bottom: 10px;
    }
    .main-menu .topnav-menu{
        transform: translateX(-100%);
        transition: all 0.3s;
    }
    .main-menu.show .topnav-menu{
        transform: translateX(0);
    }
    .navbar-custom .main-menu .topnav-menu > li{
        display: block;
        float: none;
        position: relative;
    }
    .navbar-custom .main-menu  .topnav-menu .nav-link{
        color: #333;
        text-align: left;
        line-height: 40px;
        padding-right: 40px;
    }
    .navbar-custom .main-menu .topnav-menu > li.active>a{
        background-color: #f0eefc;
        color: var(--m-primary-color);
    }
    .navbar-custom .main-menu li a>i{
        display: inline-block;
        width: 18px;
        margin-right: 5px;
    }
    .main-menu li.dropdown>a>i.mdi{
        position: absolute;
        right: 0;
        margin: 0;
        width: 35px;
        text-align: center;
        font-size: 18px;
        transition: all 0.3s;
    }
    .navbar-custom .main-menu .dropdown .dropdown-menu{
        position: static !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
        display: none;
    }
    .navbar-custom .main-menu .topnav-menu > li.show>.dropdown-menu{
        display: block;
    }
    .navbar-custom .main-menu .topnav-menu > li.show>a>i.mdi{
        transform: rotate(180deg);
    }
}

@media screen and (max-width: 550px) {
    .pagination-rounded .page-link{
        margin: 0 2px;
    }
}

