.month-selector {
    position: relative;
    display: inline-block;
    background: #fff;
    border-radius: 8px;
    padding: 10px 35px 10px 15px;
    cursor: pointer;
    color: #1D2B6C;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: 0.2s;
}

.month-selector:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.month-selector .dropdown-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    transition: transform 0.2s;
}

.month-selector.active .dropdown-icon {
    transform: translateY(-50%) rotate(180deg);
}

.picker-popup {
    display: none;
    position: absolute;
    top: 55px;
    left: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    z-index: 100;
    width: 260px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.picker-popup.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.picker-header button {
    background: #e0e7ff;
    border: none;
    border-radius: 5px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    color: #1D2B6C;
    transition: background 0.2s;
}

.picker-header button:hover {
    background: #c7d2fe;
}

.picker-header span {
    font-weight: 700;
    color: #1D2B6C;
    font-size: 16px;
    cursor: pointer;
}

.months, .years {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.month, .year-option {
    text-align: center;
    padding: 8px 0;
    border-radius: 6px;
    background-color: #f5f7ff;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s all;
}

.month:hover, .year-option:hover {
    background-color: #dbe3ff;
    transform: scale(1.05);
}

.month.active, .year-option.active {
    background-color: #1D2B6C;
    color: white;
    font-weight: bold;
}

.month.disabled, .year-option.disabled {
    background-color: #e0e0e0;
    color: #888;
    cursor: not-allowed;
}

.years {
    display: none;
    max-height: 150px;
    overflow-y: auto;
    margin-top: 10px;
}


/**/
.header-menu-payroll {
    padding: 5px 20px;
    color: #D9D9D9;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: none;
}


.header-menu-payroll.active {
    color: #FFFFFF;
    font-weight: bold;
}


.month-selector {
    position: relative;
    display: inline-block;
}

.month-selector select {
    padding: 6px 30px 6px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    appearance: none;
    background-color: #fff;
    color: #14226B;
    cursor: pointer;
}

.month-selector .dropdown-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    pointer-events: none;
}


.content-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 16px;
}

.icon-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.icon-box.active {
    background-color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;

}

.icon-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}


.icon-box img {
    width: 28px;
    height: 28px;
}


.payroll-summary {
    display: flex;
    flex-wrap: wrap;

    justify-content: center;
    gap: 20px;
    align-items: stretch;
    padding: 20px;
    border-radius: 12px;

}

.summary-card {
    flex: 1 1 220px;
    background-color: #FFFFFF;
    border-radius: 16px;
    padding: 16px 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 320px;
    min-width: 180px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.summary-card img {
    width: 40px;
    height: 40px;
}

.summary-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;


}

.summary-text div {
    white-space: nowrap;
}

.summary-title {
    font-size: 16px;
    color: #14226B;
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #14226B;
    margin-top: 4px;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.summary-card.debt {
    background-color: #FFEFF1;
}

/*table*/
.content-body {
    padding: 20px;
}

.payroll-body {
    display: flex;
    flex-direction: row;
    gap: 10px;
}


.payroll-table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.payroll-table {
    width: 100%;
    border-collapse: collapse;
    color: #1e2a78;
}

.payroll-table th,
.payroll-table td {
    padding: 16px 16px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.payroll-table tbody tr {
    border-top: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.payroll-table tbody tr:hover {
    background: #f2f8ff;
}

.payroll__employee {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payroll__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-text {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffd6a5;
    color: #1e2a78;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payroll__name {
    color: #1A237E;
    font-weight: 600;
    font-size: 16px;
}

.payroll__position {
    color: #6C7EE1;
    font-size: 16px;
}

.payroll__department {
    color: #cc580e;
    font-size: 14px;
}

.payroll__value, .payroll__role, .payroll__ratio, .payroll__task_name {
    font-weight: 600;
    font-size: 16px;

}

.payroll__assignment-code {
    color: #1A237E;
    font-size: 16px;
    font-weight: 600;
}

.payroll__assignment-name {
    color: #BC74E7;
    font-size: 14px;
}

.payroll__amount,
.payroll__salary_value {
    color: #1A237E;
    font-weight: bold;
    font-size: 16px;
}

.payroll__salary_text {
    color: #6C7EE1;
    font-size: 14px;
}

.payroll__note {
    color: #6C7EE1;
    font-size: 14px;
}


.payroll__status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-align: center;
    min-width: 120px;
}

/* Màu từng trạng thái */
.status-pending {
    background-color: #ff7f0e; /* cam */
}

.status-approved {
    background-color: #3cdfff; /* xanh ngọc */
}

.status-paid {
    background-color: #32a852; /* xanh lá */
}

.status-unknown {
    background-color: #9e9e9e; /* xám */
}


.bar-wrapper {
    position: relative;
    width: 100%;
    height: 1rem;
    background: #eaeaea;
    overflow: hidden;
}

.bar {
    position: absolute;
    top: 0;
    bottom: 0;
    transition: width 0.3s;
    cursor: pointer;
}

.bar-waiting {
    background-color: #FD7215;
}

.bar-approved {
    background-color: #27DBE1;
}

.bar-paid {
    background-color: #42A207;
}

.bar-rejected {
    background-color: #ff0000;

}

.bar-debt {
    background-color: #FFEFF1;
}

/* Nợ */

.tooltip-box {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    display: none;
    z-index: 1000;
    pointer-events: none;
}


.tef-table-payroll-button {
    background: none;
    border: none;
}

.tef-table-payroll-button-all {
    background: none;
    border: none;
    border-radius: 8px;
    padding: 5px 15px;
}

.tef-table-payroll-button-all span, i {
    color: #FFFFFF;
}

.btn-tbl-action-approve-all,
.btn-tbl-action-lock{
    background-color: #27DBE1;
}

.btn-tbl-action-cancel-all,
.btn-tbl-action-unlock {
    background-color: #C60B0B;
}

.btn-tbl-action-pay-all {
    background-color: #42A207;
}


.btn-tbl-action-lock.disabled,
.btn-tbl-action-unlock.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}


.payroll__section-header {
    background-color: #fdf3f3;
}

.row-previous-debt {
    background-color: #fff7f7;
}

.chart-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.chart-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    flex: 1 1 380px;
    max-width: 420px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.chart-container {
    width: 100%;
    margin-top: 10px;
}

.chart-card-title {
    font-size: 17px;
    color: #1A237E;
    font-weight: bold;
}

.btn-export {
    background: linear-gradient(
            to right,
            #6C7EE1 20%,
            #27DBE1 80%
    );

    padding: 8px 14px;
    border-radius: 6px;
    color: #FFFFFF;
    border: none;
}

.payroll__task_name div,
.payroll__assignment-name, .payroll__assignment div {
    display: block;
    max-width: 180px;
    min-width: 140px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


.payroll-table-container {
    position: relative;
    height: calc(100vh - 60px - 3rem - 2.5rem - 0.5rem);
    display: flex;
    flex-direction: column;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    background-color: #fff;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.table-responsive {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-width: thin;
}

.payroll-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    white-space: nowrap;
}

.tef-pagination-wrapper {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #dee2e6;
    padding: .75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
}

.tef-pagination-wrapper-left span {
    color: #555;
    font-size: 0.875rem;
}

.tef-pagination-wrapper-right {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.column-filter {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
    font-family: Arial, sans-serif;
}

.column-filter button#btn-column-filter {
    color: #1A237E;
    background:none;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-arrow {
    transition: transform 0.3s;
}

.column-filter button#btn-column-filter.active .dropdown-arrow {
    transform: rotate(180deg);
}

#column-filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 220px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 0.3rem;
}

#column-filter-dropdown.d-none {
    display: none;
}

.column-filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    cursor: pointer;
    font-size: 14px;
}

.column-filter label:hover {
    background-color: #f1f1f1;
    border-radius: 3px;
}

.column-toggle {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.icon {
    fill: #3F51B5;
}

.th-filter-btn {
    border: none;
    background: transparent;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: 0.2s;
    color: #6c757d;
    height: 20px;
    line-height: 1;
}

.th-filter-btn.filter-active {
    color: #0d6efd;
    background-color: #e7f1ff;
}

.th-filter-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #000;
}

.th-filter-btn i {
    font-size: 12px;
}

.th-dropdown-menu {
    position: absolute;
    z-index: 9999;
    min-width: 180px;
    background: #fff;
    border-radius: 8px;
    padding: 8px 0;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-dropdown-menu {
    width: 210px !important;
    margin-top: 20px !important;
}

.filter-dropdown-menu .dropdown-item {
    border-radius: 4px;
}

.filter-dropdown-menu .dropdown-item:hover {
    background-color: #f1f3f5;
}

.filter-dropdown-menu .dropdown-title {
    padding-left: 4px;
}

.filter-dropdown-menu .input-group-text {
    border-right: 0;
}

.filter-dropdown-menu .form-control {
    border-left: 0;
}

.custom-select2-dropdown {
    position: fixed !important; /* kéo dropdown ra khỏi flow container overflow */
    z-index: 1050 !important;
    max-height: 300px;
    overflow-y: auto;
}



@media (min-width: 1500px) {
    .payroll-table-container {
        width: 75%;
    }

    .chart-wrapper {
        width: 25%;
    }
}

@media (max-width: 1500px) {
    .payroll-body {
        flex-direction: column-reverse;
    }

    .payroll-table-container {
        width: 100%;
    }

    .chart-wrapper {
        width: 100%;
    }
}