:root {
    --primary-green: #78e671;
    --primary-green-dark: #198754;
    --primary-green-text: #2e3238;
    --primary-green-border: #198754;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", "Segoe UI", sans-serif;
}

html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
}

body {
    background-color: #fcfcfc;
    color: #2e3238;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/Company.png'); 
    background-repeat: no-repeat;
    background-position: center;
    background-size: 25%;
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

.dataTables_wrapper, 
table.dataTable {
    width: 100% !important;
}

.dataTables_scrollHead,
.dataTables_scrollHeadInner,
.dataTables_scrollHeadInner table {
    width: 100% !important;
}

/* --- MOBILE SIDEBAR BACKDROP --- */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    transition: opacity 0.3s ease;
}

.camera-box video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.log-box, .camera-box {
    background: rgba(255, 255, 255, 0.9) !important; 
    border-radius: 15px;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 15px !important;
}

.icon-box {
    width: 50px; 
    height: 50px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
    border-radius: 15px;
    background-color: #fff;
    color: #6c757d;
    transition: all 0.3s ease;
}

.icon-box i {
    font-size: 2.2rem !important;
}

.icon-box.active {
    border-color: var(--primary-green-dark);
    background-color: #e8f5e9;
    color: var(--primary-green-dark);
    box-shadow: 0 4px 10px rgba(25, 135, 84, 0.15);
}

.workplace-option span {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 4px !important;
}

.timeClicks {
    margin-top: 3px !important;
    margin-bottom: 0 !important;
}

.timeClicks button {
    min-width: 100px;
    max-width: 130px;
    font-weight: 600;
    padding: 6px 12px;
    margin: 0 5px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.login-btn {
    background: white;
    color: #000;
    border: 1px solid #dee2e6;
    font-size: 12px;
    padding: 6px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 3px !important;
}

.login-btn:hover {
    background: var(--primary-green-dark);
    color: #fff;
    transform: scale(1.03);
}

.time-display h2 {
    font-size: 32px;
    margin-bottom: 0;
    font-weight: 700;
}

#logTable {
    font-size: 14px;
}

#fieldLogTable {
    font-size: 14px;
}

#detectedEmployee {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

#resetEmployee:hover:not([disabled]) {
    background-color: #f1f5f9 !important;
    transform: rotate(45deg);
}

#resetEmployee[disabled] i {
    color: #cbd5e1 !important;
}

#logTable th, 
#logTable td {
    white-space: nowrap;
}

/* --- HEADER --- */
header {
    background: linear-gradient(90deg, var(--primary-green-dark), var(--primary-green)) !important;
    color: var(--primary-green-text);
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    z-index: 1030;
}

header h1 {
    color: #E5F7E5;
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

/* --- SIDEBAR & MAIN CONTENT STRUCTURE --- */
.sidebar {
    width: 250px;
    background: #ffffff;
    position: fixed;
    top: 70px;
    left: 0;
    height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    padding: 20px 10px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.3s ease-in-out;
    z-index: 1050;
    overflow-y: auto;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 4px 10px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: var(--transition);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-green), #28a745) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 15px rgba(25, 135, 84, 0.25);
}

.sidebar .nav-link:hover:not(.active) {
    background-color: var(--primary-green-light);
    color: var(--primary-green);
    transform: translateX(5px);
}

.main-content {
    margin-left: 250px;
    margin-top: 70px;
    padding: 20px;
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    transform: translateX(-250px);
}

.main-content.expanded {
    margin-left: 0 !important;
}

#page-content {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
    width: 100%;
    margin-top: 40px;
    padding-bottom: 5px;
}

#companyCalendar {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}

.fc,
.fc-scrollgrid,
.fc-scrollgrid-table,
.fc-col-header,
.fc-daygrid-body,
.fc-daygrid-body table,
.fc-scrollgrid-sync-table {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.fc table {
    table-layout: fixed !important;
    border-collapse: collapse !important;
}

.fc-col-header-cell,
.fc-daygrid-day {
    width: 14.285% !important;
}

.fc .fc-daygrid-day-frame {
    min-height: 80px;
}

.fc .fc-button-primary {
    background: linear-gradient(135deg, #198754, #146c43) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(25, 135, 84, 0.2) !important;
    text-transform: capitalize;
    font-weight: 600;
}

.fc .fc-button-primary:hover {
    background: linear-gradient(135deg, #146c43, #0f5132) !important;
    transform: translateY(-1px);
}

.fc-event {
    white-space: normal !important;
    align-items: flex-start !important;
    padding: 4px !important;
    line-height: 1.2 !important;
    min-height: 30px;
}

.fc-event-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    font-size: 0.7rem !important;
    text-align: center;
    width: 100%;
}

.fc-event.holiday-regular { background-color: var(--primary-green-dark) !important; border-color: var(--primary-green-dark) !important; color: #ffffff !important; }
.fc-event.holiday-special { background-color: #ffc107 !important; border-color: #ffc107 !important; color: #000000 !important; }
.fc-event.leave-approved { background-color: #add8e6 !important; border-color: #add8e6 !important; color: #004085 !important; }
.fc-event.event-birthday { background-color: var(--primary-green) !important; border-color: var(--primary-green) !important; color: #ffffff !important; }

.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 10px; }

/* MY PROFILE */
.profile-card {
    background: #ffffff;
    border: 1px solid rgba(125, 231, 125, 0.25);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(25, 135, 84, 0.35);
}

.profile-card .card-header {
    background: linear-gradient(90deg, var(--primary-green), var(--primary-green-dark));
    color: var(--primary-green-text);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
}

.profile-card .card-body {
    font-size: 15px;
    color: #333;
    padding: 15px;
}

.profile-card .row {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.profile-card .row:last-child {
    border-bottom: none;
}

@media (max-width: 992px) {
    .sidebar { 
        top: 60px; 
        height: calc(100vh - 60px); 
        transform: translateX(-100%); 
    }
    
    .sidebar.show { 
        transform: translateX(0); 
    }
    
    .main-content { 
        margin-left: 0 !important; 
        padding: 15px; 
    }
    
    header { 
        height: 60px; 
        padding: 0 15px; 
    }
    
    header h1 { 
        font-size: 0.9rem; 
    }
    
    #currentTime { 
        font-size: 1.1rem !important; 
    }
    
    .fc-event-title { 
        -webkit-line-clamp: 3; 
    }

    .main-component.container {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        padding-top: 0 !important;
    }

    .main-component .row {
        flex-direction: column;
        align-items: center;
        margin-top: 0 !important;
    }

    .col-lg-4, .col-lg-8 {
        width: 100%;
    }

    .logo-top {
        margin-top: 0.5rem !important;
        margin-bottom: 0.25rem !important;
    }

    .logo-top .logo-img {
        max-width: 70%;
        max-height: 65px; 
    }

    .camera-box {
        padding: 0.75rem !important;
    }

    .camera-box video {
        height: 220px !important;
        object-fit: cover;
    }

    .mt-3.w-100 {
        margin-top: 0.5rem !important;
    }

    #workplaceSelection p {
        margin-bottom: 0.25rem !important;
    }

    .icon-box {
        width: 50px;
        height: 50px; 
    }

    .icon-box i {
        font-size: 1.3rem !important;
    }
    
    .workplace-option span {
        margin-top: 0.25rem !important;
    }

    .timeClicks {
        margin-top: 0.5rem !important;
    }

    .timeClicks button {
        flex: 1;
        min-width: 110px;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        font-size: 0.9rem;
    }

    .login-btn {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        font-size: 0.9rem;
    }

    #detectedEmployee {
        font-size: 0.85rem;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .input-group .btn {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    body::before {
        background-size: 70%;
    }

    .custom-modalIndex {
        width: 90% !important;
    }

    .profile-card .card-body {
        font-size: 14.5px;
    }

    .profile-card .card-header {
        font-size: 15px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .main-content .row.justify-content-center {
        width: 100%;
        justify-content: center !important;
    }

    .main-content .col-md-11.text-center {
        width: 100%;
        max-width: 400px;
        display: flex;
        justify-content: center;
    }

    #pictureImage {
        width: 150px;
        height: 150px;
        max-width: 100%;
        margin-left: 25px;
        display: block;
    }

    .container, .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .col-11.mx-auto {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .profile-card .row {
        display: flex;
        flex-direction: column;
        text-align: left !important;
        align-items: flex-start !important;
        padding-left: 15px;
    }
}

/* LEAVES, OVERTIME, CANTEEN, CASHADVANCE, PAYSLIPS, AUDIT TRAIL, CHANGE SHIFTS, LIST VIEW, PAYROLL, ALLOWANCE */
#inAndOutModal .modal-dialog {
    max-width: 500px;
    margin: 1rem auto;
    z-index: 1050;
}

#inAndOutModal .modal-content {
    border-radius: 12px;
}

body.modal-open {
    overflow-y: hidden;
}

#filterDepartment,
#filterEmployee,
#filterLeaveDepartment,
#filterLeaveEmployee,
#filterOvertimeDepartment,
#filterOvertimeEmployee,
#filterBluebookDepartment,
#filterBluebookEmployee,
#filterCanteenDepartment,
#filterCanteenEmployee,
#filterCavDepartment,
#filterCavEmployee,
#filterChangeshiftDepartment,
#filterChangeshiftEmployee,
#filterExtensionDepartment,
#filterExtensionEmployee,
#filterCavaDepartment,
#filterCavaEmployee {
    min-width: 150px;
}

#filterPayrollType,
#filterPayrollCutoff,
#filterPayrollStatus,
#filterPayrollEmployee,
#columnToggleDropdown,
#filterAllowanceEmployee,
#filterAllowanceType,
#filterAllowanceStatus,
#filterAllowanceCutoff {
    min-width: 150px;
}

#filterFrom,
#filterTo,
#filterLeaveFrom,
#filterLeaveTo,
#filterOvertimeFrom,
#filterOvertimeTo,
#filterBluebookFrom,
#filterBluebookTo,
#filterCanteenFrom,
#filterCanteenTo,
#filterCavFrom,
#filterCavTo,
#filterChangeshiftFrom,
#filterChangeshiftTo,
#filterExtensionFrom,
#filterExtensionTo,
#filterCavaFrom,
#filterCavaTo {
    min-width: 150px;
}

#employeeSearchInput {
    width: 100%;
}

#locationModal .modal-dialog {
    max-width: 90%;
}

#locationModal .modal-body {
    height: 80vh;
}

#locationMap {
    width: 100%;
    height: 700px !important;
}

#sitelocationModal .modal-dialog {
    max-width: 90%;
}

#sitelocationModal .modal-body {
    height: 80vh;
}

#sitelocationMap {
    width: 100%;
    height: 700px !important;
}

.nowrap-column {
    white-space: nowrap;
}

.adjustment-group-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #f8f9fa;
}

.adjustment-group-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    box-shadow: 2px 0 0 #dee2e6;
}

.adjustment-group-table tbody tr.table-secondary td:first-child {
    background: #d3d4d5;
}

.adjustment-group-table tbody tr.table-success td:first-child {
    background: #d1e7dd;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
    height: auto !important;
    min-height: 38px !important;
    padding: 2px 5px !important;
}

.select2-selection__choice {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    color: #212529 !important;
    margin-top: 4px !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select2-container {
    display: block !important;
}

.select2-dropdown {
    z-index: 9999 !important;
}

@media (max-width: 992px) {
    .nowrap-column {
        white-space: nowrap;
    }

    .modal-backdrop.show {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .nowrap-column {
        white-space: nowrap;
    }

    .modal-backdrop.show {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .nowrap-column {
        white-space: nowrap;
    }

    .modal-backdrop.show {
        display: none !important;
    }

    .select2-container--bootstrap-5 .select2-selection--multiple {
        font-size: 0.85rem;
    }

    .select2-selection__choice {
        font-size: 11px;
        padding: 1px 4px !important;
    }

    .select2-search__field {
        font-size: 0.85rem !important;
        width: 100% !important;
    }
}

/* TEAMS */
.custom-modal {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.teams-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.teams-header h4 {
    margin-bottom: 0;
    flex-shrink: 0;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filters-container select,
.filters-container input,
.filters-container button {
    min-width: 150px;
    font-size: 0.95rem;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 200px;
}

#employeeSearchInput {
    width: 100%;
    min-width: 300px; 
    padding: 8px 15px;
    padding-right: 35px;
    border-radius: 10px;
    border: 1px solid #198754;
}

.filters-container .col-md-5 {
    flex: 1;
    max-width: 600px;
}

#employeeSearchInput:focus {
    border-color: #146c43;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.15);
}

#employeeSearchInput::placeholder {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

.clear-search-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #90a4ae;
    font-size: 1rem;
    display: none;
    z-index: 2;
}

.clear-search-icon:hover {
    color: var(--primary-green-border);
}

.employee-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 24px;
    margin-top: 24px;
    padding: 0 20px;
}

.employee-card.system-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--primary-green);
    border-radius: 18px;
    width: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    cursor: pointer;
}

.employee-card.system-card:hover {
    box-shadow: 0 8px 32px var(--primary-green-border);
    transform: translateY(-4px) scale(1.02);
}

.emp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.emp-card-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

.emp-name {
    font-weight: 700;
    font-size: 1.2em;
    color: var(--primary-green-dark);
    margin-bottom: 4px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.emp-position {
    font-size: 0.95em;
    color: #607d8b;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.emp-card-photo {
    display: none;
}

hr {
    border: none;
    border-top: 1px solid #e3f2fd;
    margin: 12px 0 10px 0;
}

.emp-row-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.emp-label {
    font-weight: 600;
    color: var(--primary-green-dark);
    white-space: nowrap;
    margin-right: 10px;
}

.emp-value {
    color: #37474f;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.emp-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.emp-menu-toggle {
    font-size: 18px;
    color: var(--primary-green-border);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.emp-menu-toggle:hover {
    background-color: rgba(25, 135, 84, 0.1);
}

.dropdown-menu {
    font-size: 0.9rem;
    min-width: 180px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(25, 135, 84, 0.35);
    border: 1px solid #e3f2fd;
}

#deptDropdown::after {
    margin-left: auto;
}

#deptDropdown:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

.is-resigned, .is-retired, .is-terminated, .is-end-contract {
    opacity: 0.8;
}

.employee-card.system-card.is-resigned {
    border: 1px solid #dc3545;
    border-left: 5px solid #dc3545;
}

.is-resigned .emp-name {
    color: #bd2130;
}

.employee-card.system-card.is-retired {
    border: 1px solid #0dcaf0;
    border-left: 5px solid #0dcaf0;
}

.is-retired .emp-name {
    color: #0aa2c0;
}

.employee-card.system-card.is-terminated {
    border: 1px solid #212529;
    border-left: 5px solid #212529;
}

.is-terminated .emp-name {
    color: #212529;
}

.employee-card.system-card.is-awol {
    border: 1px solid #ff7f07;
    border-left: 5px solid #ff7f07;
}

.is-awol .emp-name {
    color: #ff7f07;
}

.employee-card.system-card.is-end-contract {
    border: 1px solid #ffc107;
    border-left: 5px solid #ffc107;
}

.is-end-contract .emp-name {
    color: #997404;
}

.employee-card.system-card.is-resigned:hover {
    box-shadow: 0 8px 32px rgba(220, 53, 69, 0.35);
}

.employee-card.system-card.is-retired:hover {
    box-shadow: 0 8px 32px rgba(13, 202, 240, 0.35);
}

.employee-card.system-card.is-terminated:hover {
    box-shadow: 0 8px 32px rgba(33, 37, 41, 0.35);
}

.employee-card.system-card.is-end-contract:hover {
    box-shadow: 0 8px 32px rgba(255, 193, 7, 0.35);
}

.employee-card.system-card.is-awol:hover {
    box-shadow: 0 8px 32px rgba(255, 127, 7, 0.35);
}

@media (max-width: 992px) {
    .employee-card.system-card {
        width: calc(33.33% - 24px);
    }
}

@media (max-width: 768px) {
    .teams-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px !important; 
        padding: 8px 16px;
    }

    .filters-container {
        flex-direction: column;
        align-items: stretch;
        gap: 6px !important; 
        width: 100%;
        margin-top: 0;
    }

    .filters-container .row > div {
        width: 100% !important;
    }

    #employeeSearchInput {
        min-width: 100% !important;
        width: 100%;
    }

    .filters-container .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 2px !important;
    }

    .filters-container .position-relative {
        width: 100% !important;
        max-width: none !important;
    }

    .custom-modal, .modal-lg {
        max-width: 95% !important;
        margin: 1.75rem auto;
    }

    .col-md-6 {
        border-right: none !important;
        border-bottom: 1px solid #ddd;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    #deptDropdown {
        width: 100% !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-menu {
        width: 100% !important;
    }

    .dept-checkbox {
        width: 1.2em;
        height: 1.2em;
    }
}

@media (max-width: 576px) {
    .modal-dialog-centered {
        display: flex;
        align-items: center;
        min-height: calc(100% - 1rem);
        margin: 0.5rem auto;
    }

    .teams-header {
        padding: 5px 12px;
    }

    .employee-card.system-card {
        width: 100%;
        max-width: 100%;
        padding: 15px;
    }

    .emp-name {
        font-size: 1.1em;
    }

    .modal-body input, 
    .modal-body select, 
    .modal-body textarea {
        font-size: 16px !important; 
    }
}

select.form-select:hover,
select.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(120, 230, 113, 0.25);
}

select.form-select option:hover {
    background-color: var(--primary-green);
    color: #fff;
}

select.form-select:focus {
    outline: none;
}

input[type="date"]:hover,
input[type="time"]:hover,
input[type="date"]:focus,
input[type="time"]:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(120, 230, 113, 0.25);
    outline: none;
}

input[type="date"],
input[type="time"] {
    accent-color: var(--primary-green);
}

.dropdown-menu.p-3 {
    max-height: 300px;
    overflow-y: auto; 
    width: 250px; 
    z-index: 1050; 
    position: absolute; 
}

.dataTables_filter {
    display: none;
}

.dropdown-menu.p-3 label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    width: 100%;
}

.DTFC_LeftWrapper, 
.DTFC_LeftBodyWrapper,
.DTFC_LeftHeadWrapper {
    pointer-events: none !important;
}

.DTFC_LeftWrapper td, 
.DTFC_LeftWrapper th,
.DTFC_LeftWrapper button,
.DTFC_LeftWrapper span.badge {
    pointer-events: auto !important;
}

.dataTables_scrollBody {
    -webkit-overflow-scrolling: touch !important;
    overflow-x: auto !important;
}

.dropdown-menu.p-3 input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.form-select, .btn {
    height: 38px;
}

.maintenance {
    text-align: center;
    color: #333;
    margin-top: 15%;
}

.gear {
    font-size: 60px;
    color: var(--primary-green-border);
    animation: spin 2s linear infinite;
    display: inline-block;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.custom-underline-input {
    border: none !important;
    border-bottom: 1px solid #000 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 5px !important;
    width: 150px;
    color: #000 !important; 
    text-align: center;
    font-size: 20px;
}

.custom-underline-inputoffset {
    border: none !important;
    border-bottom: 1px solid #000 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 5px !important;
    width: 250px;
    color: #000 !important; 
    text-align: center;
    font-size: 20px;
}

.custom-underline-inputpayroll {
    border: none !important;
    border-bottom: 1px solid #000 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 2px !important;
    width: 150px;
    color: #000 !important; 
    text-align: center;
    font-size: 18px;
}

/* PAYROLL */
.edit-payroll-cell:empty:before {
    content: "0.00";
    color: #adb5bd;
    font-style: italic;
    cursor: text;
}

.edit-payroll-cell {
    min-width: 40px;
    padding: 2px 5px;
    border-radius: 4px;
    transition: all 0.2s;
    outline: none;
}

.edit-payroll-cell:focus {
    background-color: var(--primary-green);
    box-shadow: 0 0 0 2px var(--primary-green);
    color: #000;
}

.text-end {
    text-align: right;
}

#bankPayrollTable,
#cashPayrollTable,
#chequePayrollTable,
#consolidatedPayrollSummaryTable,
#projectBasedPayrollTable {
    width: max-content !important;
    min-width: 100% !important;
}

#bankPayrollTable th, #bankPayrollTable td,
#cashPayrollTable th, #cashPayrollTable td,
#chequePayrollTable th, #chequePayrollTable td,
#consolidatedPayrollSummaryTable th, #consolidatedPayrollSummaryTable td,
#projectBasedPayrollTable th, #projectBasedPayrollTable td {
    white-space: nowrap !important;
    width: auto !important;
}

#bankPayrollTable_wrapper .dataTables_scrollHeadInner,
#cashPayrollTable_wrapper .dataTables_scrollHeadInner,
#chequePayrollTable_wrapper .dataTables_scrollHeadInner,
#consolidatedPayrollSummaryTable_wrapper .dataTables_scrollHeadInner,
#projectBasedPayrollTable_wrapper .dataTables_scrollHeadInner,
#bankPayrollTable_wrapper .dataTables_scrollBody,
#cashPayrollTable_wrapper .dataTables_scrollBody,
#chequePayrollTable_wrapper .dataTables_scrollBody,
#consolidatedPayrollSummaryTable_wrapper .dataTables_scrollBody,
#projectBasedPayrollTable_wrapper .dataTables_scrollBody {
    width: 100% !important;
}

#bankPayrollTable_wrapper .dataTables_scrollHeadInner table,
#cashPayrollTable_wrapper .dataTables_scrollHeadInner table,
#chequePayrollTable_wrapper .dataTables_scrollHeadInner table,
#consolidatedPayrollSummaryTable_wrapper .dataTables_scrollHeadInner table,
#projectBasedPayrollTable_wrapper .dataTables_scrollHeadInner table,
#bankPayrollTable_wrapper .dataTables_scrollBody table,
#cashPayrollTable_wrapper .dataTables_scrollBody table,
#chequePayrollTable_wrapper .dataTables_scrollBody table,
#consolidatedPayrollSummaryTable_wrapper .dataTables_scrollBody table,
#projectBasedPayrollTable_wrapper .dataTables_scrollBody table {
    width: max-content !important;
    min-width: 100% !important;
}

.payroll-table-container table.dataTable {
    width: max-content !important;
    min-width: 100% !important;
}

.payroll-table-container table.dataTable th,
.payroll-table-container table.dataTable td {
    white-space: nowrap !important;
    width: auto !important;
}

.payroll-table-container .dataTables_scrollHeadInner,
.payroll-table-container .dataTables_scrollBody {
    width: 100% !important;
}

.payroll-table-container .dataTables_scrollHeadInner table,
.payroll-table-container .dataTables_scrollBody table {
    width: max-content !important;
    min-width: 100% !important;
}

@media (max-width: 768px) {
    .payroll-table .d-flex.justify-content-between {
        flex-direction: column;
        align-items: center !important;
        gap: 15px;
        text-align: center;
    }

    .payroll-table .d-flex.align-items-center.gap-2 {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .payroll-table .btn {
        flex: 1 1 auto;
        font-size: 13px;
        padding: 8px;
    }

    .payroll-table .bg-light.p-2 {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 15px !important;
    }

    .payroll-table .bg-light .d-flex {
        width: 100%;
        justify-content: space-between;
    }

    .payroll-table .form-select {
        width: 65% !important;
    }

    .table-responsive {
        border: 0;
        margin-bottom: 0;
    }
}

.edit-adjustment-cell {
    display: block;
    width: 100%;
    min-width: 72px;
    padding: 2px 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: text;
    text-align: left;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.edit-adjustment-cell:hover {
    background-color: #eaf8ee;
    border-color: #63be7b;
}

.edit-adjustment-cell:focus {
    background-color: #e3f6e8;
    border-color: #2f9e44;
    box-shadow: 0 0 0 2px rgba(47, 158, 68, 0.18);
    outline: none;
}