/* Browsers add a default margins/paddings - we dont want that by default */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #edebeb;
    font-family: 'Arial', sans-serif;
    line-height: 1.5;
    font-size: 14px;
}

.app {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 24px;
    /* on Less/Sass we would have extracted those colours as variables */
    border-bottom: 2px solid rgba(9, 142, 137, 0.49);
}

.account-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card {
    margin: 60px auto;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.login-card {
    max-width: 400px;
}

.login-card h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.field {
    margin-bottom: 10px;
}

.field label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color .2s;
}

.field input:focus {
    outline: none;
    /* on Less/Sass we would have extracted those colours as variables */
    border-color: #098e89;
    box-shadow: 0 0 0 3px rgba(9, 142, 137, 0.15);
}

.btn {
    /* on Less/Sass we would have extracted those colours as variables */
    background-color: #098e89;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn:hover {
    /* on Less/Sass we would have extracted those colours variations as variables */
    background-color: #0a7875;
}

#signInBtn {
    display: block;
    margin-left: auto;
}

.field .field-error {
    color: red;
    margin-top: 5px;
}

.error-message {
    color: red;
}

.field input.input-error {
    border: 1px solid red;
}

.loader {
    text-align: center;
    margin: 100px 0;
    font-size: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.table-header-actions select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-top: 20px;
}

table th {
    background-color: #e1e1e1;
    padding: 20px 10px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 1;
}

th[data-sort] {
    cursor: pointer;
    user-select: none;
}

th[data-sort]:hover {
    background-color: #d4d4d4;
}

.sort-arrow {
    font-size: 10px;
    margin-left: 4px;
}

.column-search,
.column-filter,
.column-date-filter {
    width: 100%;
    margin-top: 6px;
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-weight: normal;
}

table tr td {
    padding: 10px;
    text-align: left;
    word-break: break-word;
}

.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success {
    background-color: #4caf50;
    color: #fff;
}

.badge-danger {
    background-color: #f4c4c0;
}

table tr:nth-child(even):not(.virtual-spacer) {
    background-color: #f2f2f2;
}

#transactionCount {
    font-weight: normal;
    color: #888;
}

#paginationControls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

#paginationCrtPage {
    padding: 10px;
    font-weight: 500;
}

/* Fixed-height scrollable table — keeps headers sticky and pagination in place */
#transactionsTableWrapper {
    max-height: 600px;
    overflow-y: auto;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    /* over all other content */
    z-index: 100;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 440px;
    /* over the overlay */
    z-index: 101;
}

.modal h2 {
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #565e64;
}

.toast {
    position: fixed;
    top: 20px;
    right: 50px;
    padding: 15px 20px;
    border-radius: 4px;
    background-color: #4caf50;
    color: #fff;
    z-index: 200;
    display: none;
}

/* Initial state */
#transactionTable, #signOutBtn, #loginContent {
    display: none;
}


