
.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-table {
    width: 100%;
    /* table-layout: fixed; */
    border-collapse: collapse;
    font-size: 13px;
    background-color: rgb(255, 255, 255);
}

.erp-table thead {
    position: sticky;
    top: 0;
    z-index: 99;
}
.erp-table thead::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* height: 1px; */
    border-top: 1px solid var(--erp-table-border);
    background: #ddd;
}
.erp-table thead th {
    padding: 10px 5px;
    font-size: 13px;
    text-align: center;
    vertical-align: middle; /* căn giữa dọc */
    background-color: var(--erp-table-bg-th);
    z-index: 99;
    cursor: pointer;
    border: 1px solid var(--erp-table-border);
    border-top: none;
    /* box-shadow: 0 -1px 0 var(--erp-table-border); */
    /* box-shadow: 
        0 -1px 0 var(--erp-table-border),
        0 2px 4px rgba(0,0,0,0.05); */
    height: 50px;
}

.erp-table td {
    padding: 10px;
    border: 1px solid var(--erp-table-border);
    vertical-align: middle; /* căn giữa dọc */
}

.erp-table tbody tr {
    height: 40px;
}

.erp-table td {
    padding: 8px 10px;
    box-sizing: border-box;
}

/* nội dung text */

.erp-cell {
    display: block;
    max-height: 2.4em; /* ~2 dòng */
    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-inner-user {
    position: relative;
   
}

.erp-table-inner-user tr {
    display: table;
    width: 100%;
    table-layout: fixed;
} */

.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-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-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 {
    display: flex;
    align-items: center;
} */

.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-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;
}
