/* Transaction table styles */
.transactions-table {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideIn 0.7s ease forwards;
    opacity: 0;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.collapse-icon {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-left: 10px;
    user-select: none;
}

.collapse-icon.collapsed {
    transform: rotate(-90deg);
}

.table-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.control-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
}

.control-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.transaction-count {
    padding: 8px 16px;
    background: #f0f2ff;
    border-radius: 8px;
    font-size: 0.9em;
    color: #667eea;
    font-weight: 600;
}

.table-wrapper {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.table-wrapper.collapsed {
    max-height: 0;
    overflow: hidden;
    border: none;
}

.sortable-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.sortable-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.sortable-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background 0.3s ease;
}

.sortable-table th.sortable:hover {
    background: linear-gradient(135deg, #7a8eea 0%, #8a5ba2 100%);
}

.sortable-table th.sortable:active {
    transform: scale(0.98);
}

.sort-arrow {
    margin-right: 5px;
    opacity: 0.5;
    font-size: 0.9em;
    display: inline-block;
    transition: all 0.3s ease;
    min-width: 15px;
    text-align: center;
}

.sortable-table th.sorted-asc .sort-arrow,
.sortable-table th.sorted-desc .sort-arrow {
    opacity: 1;
    color: white;
    font-weight: bold;
    transform: scale(1.2);
}

.checkbox-column {
    width: 50px;
    text-align: center;
}

.transaction-row {
    transition: all 0.3s ease;
}

.transaction-row:hover {
    background: #f9fafb;
}

.transaction-row.excluded {
    opacity: 0.4;
    text-decoration: line-through;
    background: #f5f5f5;
}

.transaction-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.transaction-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
}

.type-income {
    background: #d1fae5;
    color: #065f46;
}

.type-expense {
    background: #fee2e2;
    color: #991b1b;
}

.transaction-amount {
    font-weight: 600;
    font-size: 1.05em;
}

.amount-positive {
    color: #10b981;
}

.amount-negative {
    color: #ef4444;
}

.hidden-row {
    display: none !important;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1em;
}

.no-results::before {
    content: "🔍";
    display: block;
    font-size: 3em;
    margin-bottom: 10px;
    opacity: 0.5;
}
