/* YNAB-inspired budget table styling */
#budgetTable {
    font-size: 0.9rem;
}

#budgetTable thead th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 0.75rem 0.5rem;
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6;
}

#budgetTable tbody tr {
    border-bottom: 1px solid #e9ecef;
}

#budgetTable tbody tr:hover {
    background-color: #f8f9fa;
}

#budgetTable tbody td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

/* Budget cell click-to-edit styling */
.budget-cell {
    cursor: pointer;
    position: relative;
    min-width: 120px;
}

.budget-cell:hover .budget-display {
    background-color: #e7f3ff;
    border-radius: 4px;
}

.budget-display {
    padding: 4px 8px;
    transition: background-color 0.2s;
}

.budget-amount {
    font-weight: 600;
    color: #495057;
}

.budget-input {
    width: 100%;
    border: 2px solid #0d6efd;
    border-radius: 4px;
    font-weight: 600;
    padding: 4px 8px;
}

.budget-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Available amount color coding */
.available-amount {
    font-weight: 700;
}

/* Spent amount */
.spent-amount {
    color: #6c757d;
}

/* Action buttons */
.btn-link {
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}

.btn-link:hover {
    background-color: rgba(0,0,0,0.05);
    border-radius: 4px;
}

.card {
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Category Group Styles */
.budget-groups {
    border: none;
}

.budget-group {
    border-bottom: 1px solid #dee2e6;
}

.budget-group:last-child {
    border-bottom: none;
}

.group-header {
    transition: background-color 0.2s;
}

.group-header:hover {
    background-color: #e9ecef !important;
}

.group-header .fa-chevron-down {
    transition: transform 0.3s;
}

.group-header[aria-expanded="false"] .fa-chevron-down {
    transform: rotate(-90deg);
}

.budget-group-table tbody tr {
    border-bottom: 1px solid #f8f9fa;
}

.budget-group-table tbody tr:last-child {
    border-bottom: none;
}

.budget-group-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Clean table borders */
.table > :not(caption) > * > * {
    border-bottom-width: 1px;
    box-shadow: none;
}
