
.erp-table-wrap {
    position: relative;
}

/* vùng scroll */
.erp-table-scroll {
    height: calc(100vh - 110px - 3.5rem);
    max-height: calc(100vh - 110px - 3.5rem); /* tùy anh */
    overflow-y: auto;
    overflow-x: hidden;
}

.erp-table-card-scroll {
    height: calc(100vh - 100px - 6.5rem);
    max-height: calc(100vh - 100px - 6.5rem); /* tùy anh */
    overflow-y: auto;
    overflow-x: hidden;
}

.erp-table-thongbao-scroll {
    height: calc(200px);
    max-height: calc(200px); /* tùy anh */
    overflow-y: auto;
    overflow-x: hidden;
}

.erp-table-scroll::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 51px;   /* 👈 chính là cái anh cần */
    margin-bottom: 5px; /* optional cho đẹp */
}

.erp-table-card-scroll::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 51px;   /* 👈 chính là cái anh cần */
    margin-bottom: 5px; /* optional cho đẹp */
}

.erp-col-hidden {
    display: none !important;
}

.erp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    background-color: rgb(255, 255, 255);
}

.erp-table thead th {
    position: sticky;
    top: 0;
    z-index: 99;
    background: var(--erp-table-bg-th);
    border-top: 1px solid var(--erp-table-border);
    border-right: 1px solid var(--erp-table-border);
    border-bottom: 1px solid var(--erp-table-border);
    height: 50px;
    padding: 8px 4px;
    font-size: 13px;
}

.erp-table thead th:first-child {
    border-left: 1px solid var(--erp-table-border);
}

.erp-table td {
    padding: 6px 3px;
    border-right: 1px solid var(--erp-table-border);
    border-bottom: 1px solid var(--erp-table-border);
    vertical-align: middle; /* căn giữa dọc */
}
.erp-table td:first-child {
    border-left: 1px solid var(--erp-table-border);
}
.erp-table tbody tr {
    height: 40px;
}

.erp-table td {
    padding: 6px 3px;
    box-sizing: border-box;
}

/* table th 2 dòng*/

.erp-table-2 {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    background-color: rgb(255, 255, 255);
}

.erp-table-2 thead th {
    position: sticky;
    top: 0;
    z-index: 99;
    background: var(--erp-table-bg-th);
    border-top: 1px solid var(--erp-table-border);
    border-right: 1px solid var(--erp-table-border);
    height: 30px;
    padding: 4px;
    font-size: 13px;
}

.erp-table-2 thead th:first-child {
    border-left: 1px solid var(--erp-table-border);
}

/* Dòng header thứ nhất */
.erp-table-2 thead tr:first-child th {
    position: sticky;
    top: 0;
    z-index: 99;
}

/* Dòng header thứ hai */
.erp-table-2 thead tr:nth-child(2) th {
    position: sticky;
    top: 30px;
    /* bằng chiều cao dòng đầu */
    z-index: 98;
}

.border-left-none {
    border-left: none !important;
}

.erp-table-2 td {
    padding: 6px 4px;
    border-right: 1px solid var(--erp-table-border);
    border-bottom: 1px solid var(--erp-table-border);
    vertical-align: middle;
    /* căn giữa dọc */
}

.erp-table-2 tbody tr:first-child td {
    border-top: 1px solid var(--erp-table-border);
}

.erp-table-2 td:first-child {
    border-left: 1px solid var(--erp-table-border);
    
}

.erp-table-2 tbody tr {
    height: 40px;
}


/* nội dung text */

.erp-cell {
    display: block;
    /* max-height: 2.4em; 
    line-height: 1.2em; */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* spacer phải "tàng hình" hoàn toàn */
.spacer-top td,
.spacer-bottom td {
    padding: 0 !important;
    border: 1px solid var(--erp-table-border) !important;
    height: 0 !important;
}

/* div bên trong mới là thứ giữ chiều cao */
.spacer-top div,
.spacer-bottom div {
    width: 100%;
}

.erp-table tbody tr:hover {
    background: #f5f7fa;
}

.erp-table-toolbar-1 {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    justify-content: space-around;
    height: 60px;
    margin-bottom: 0.5rem;
}

.erp-table-toolbar-1-left {
    display: grid;
    grid-template-columns: 50px 1fr;
    align-items: center;
    justify-content: center;
    height: 60px;
    margin-bottom: 0.5rem;
}

.erp-table-toolbar-2-left {
    display: grid;
    grid-template-columns: 250px 1fr;
    align-items: center;
    justify-content: center;
    height: 60px;
    margin-bottom: 0.5rem;
}

.erp-table-toolbar-2-left-90 {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
    justify-content: center;
    height: 60px;
    margin-bottom: 0.5rem;
}

.erp-table-toolbar-2-right {
    display: grid;
    grid-template-columns: 1fr 250px ;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    margin-bottom: 0.5rem;
}

.erp-table-toolbar-3 {
    display: grid; 
    grid-template-columns: 250px 1fr 250px; 
    align-items: center;
    justify-content: space-around;
    height: 60px;
    margin-bottom: 0.5rem;
}


.erp-table-toolbar-1-left >div:nth-child(2) {
    flex: 1;
    text-align: left;
}

.erp-table-toolbar-3 > div:first-child {
    flex: 1;
}

.erp-table-toolbar-3 > div:nth-child(2) {
    flex: 1;
    text-align: center;
}

.erp-table-toolbar-3 > div:last-child {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.erp-table-toolbar-2-left > div:first-child {
    flex: 1;
}

.erp-table-toolbar-2-left > div:nth-child(2) {
    flex: 1;
    text-align: center;
}

.erp-table-search {
    width: 235px;
    padding: 6px 10px;
    border: 1px solid var(--erp-table-border);
    border-radius: 6px;
    margin-right: 5px;
}

.erp-table-pagination {
    padding: 10px;
    text-align: right;
}
    
.erp-page {
    display: inline-block;
    padding: 5px 10px;
    margin-left: 5px;
    border: 1px solid #ddd;
    cursor: pointer;
}

.erp-page.active {
    background: #007bff;
    color: #fff;
}

.erp-row-focus {
    background: #fff3cd !important;
    transition: all 0.3s;
}


.erp-table-span-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
   

}

.erp-table-span-3 > span:first-child {
    flex: 1;
    text-align: left;
}

.erp-table-span-3 > span:nth-child(2) {
    flex: 1;
    text-align: left;
}

.erp-table-span-3 > span:last-child {
    flex: 1;
    text-align: left;
    /* display: flex;
    justify-content: flex-end; */
}

.erp-table-span-2 {
    display: grid;
    grid-template-columns: 1fr 100px;
    /* align-items: center;
    justify-content: space-around; */

}

.erp-table-span-2>span:first-child {
    flex: 1;
    text-align: left;
    text-overflow: ellipsis;
}

.erp-table-span-2>span:last-child {
    flex: 1;
    text-align: right;
    /* display: flex;
    justify-content: flex-end; */
}