/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    background: #FCFBF9;
}

/* Loading */
#loading {
    width: 2rem;
    height: 2rem;
    border: 5px solid #f3f3f3;
    border-top: 6px solid #9c41f2;
    border-radius: 100%;
    margin: auto;
    visibility: hidden;
    animation: spin 1s infinite linear;
}

#loading.display {
    visibility: visible;
}

/* Login */
#loginContent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#loginForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #00b268;
}

#loginForm h2 {
    text-align: center;
    width: 100%;

}

#loginForm input {
    margin-bottom: 15px;
    align-items: center;
}

#loginForm button {
    margin-top: 10px;
    align-self: center;
}

/* Header */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    background: #00AE66;
    width: 100%;
    border-radius: 0;
    height: 60px;
    font-size: 32px;
}

.body {
    background: #FCFBF9;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 5px;
}


.formAndButtonContainer {
    display: flex;
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
}

/* Create and Filter */

.createAndFilter {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 50%;
}

#transactionForm button {
    font-size: 1.2em;
    padding: 5px 5px;
    cursor: pointer;
}

#transactionFilter button {
    font-size: 1.2em;
    padding: 5px 5px;
    cursor: pointer;
}

/* logOutAndRefresh */
.logOutAndRefresh {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 50%;
    align-items: center;
    justify-content: center;
}

/* Refresh */
#logout button {
    font-size: 1.2em;
    padding: 5px 5px;
    cursor: pointer;
}

/* Refresh */
#refresh button {
    font-size: 1.2em;
    padding: 5px 5px;
    cursor: pointer;
}

/* Table */
table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    width: 100%;
}

th {
    cursor: pointer;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    border-bottom: none;
    box-shadow: 0 2px 0 0 #000;
}

thead tr:first-child th {
    border-top: 1px solid #000;
}

#tableLoader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #666;
}

#transactionTable {
    position: relative;
}

/* Sort indicators */
th.sort-asc::after {
    content: ' ↑';
}

th.sort-desc::after {
    content: ' ↓';
}

td {
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

table,
th,
td {
    border: 1px solid;
}

th,
td {
    border: 1px solid #000;
    border-top: none; 
}


.negative-amount {
    color: red;
    border: none;
}

.highlight-row {
    background-color: #ffe066;
    transition: background-color 0.5s;
}