*{
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    box-sizing: border-box;
}

.container{
    justify-content: center;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    width: 100%;
} 

.main-wrapper {
    width: 100%;
    max-width: 1200px;
}

.tabela {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}

th{
    background-color: rgb(241, 241, 241);
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
}

/* Hide cursor and arrow for Action column */
th:last-child {
    cursor: default;
    padding-right: 10px;
}

th:last-child::after {
    content: none;
}

th:hover {
    background-color: rgb(231, 231, 231);
}

th:last-child:hover {
    background-color: rgb(241, 241, 241);
}

/* Default arrow (only shown when column is not being sorted) */
th:not([data-sort])::after {
    content: '↕';
    position: absolute;
    right: 5px;
    color: #666;
    font-size: 12px;
}

/* Sort direction arrows */
th[data-sort="asc"]::after {
    content: '↑';
    position: absolute;
    right: 5px;
    color: #666;
    font-size: 12px;
}

th[data-sort="desc"]::after {
    content: '↓';
    position: absolute;
    right: 5px;
    color: #666;
    font-size: 12px;
}
td, th {
    border: 1px solid #dddddd;
    text-align: left;
    padding: 10px;
  }
.forme{
    margin: 10px 0px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.expence, .amount, .category, .date {
    padding: 7px;
    flex: 1;
    min-width: 150px;
}
.add-expence{
    padding: 10px;
    background-color: green;
    color: white;
    border: 0;
    border-radius: 5px;
    width: 100%;
    margin-top: 10px;
}
.filter-total{
    position: relative;
    right: auto;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.total{
    font-weight: bolder;
}
table{
    border-collapse: collapse;
    min-width: 770px;
    width: 100%;
}
.pretraga{
    margin-bottom: 10px;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
    border: 2px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    background-image: url('searchicon.png');
    background-position: 10px 10px; 
    background-repeat: no-repeat;
    padding: 12px 20px 12px 40px;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px;
}

.pagination button {
    padding: 8px 16px;
    border: none;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination button:hover:not([disabled]) {
    background-color: #45a049;
}

.pagination button[disabled] {
    background-color: #cccccc;
    cursor: not-allowed;
}

.pagination span {
    font-size: 14px;
    color: #666;
}

@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .forme {
        flex-direction: column;
    }

    .expence, .amount, .category, .date {
        width: 100%;
    }

    .filter-total {
        align-items: flex-start;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination button {
        padding: 6px 12px;
        font-size: 14px;
    }
}