.ag-theme-alpine {
    --ag-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ag-font-size: 13px;
    --ag-header-background-color: #f8f9fa;
    --ag-odd-row-background-color: #ffffff;
    --ag-row-hover-color: #eef6ff;
}

.filters-card {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
}

.view-toggle .btn {
    min-width: 130px;
}

.view-toggle .btn.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    border-color: transparent;
}

.view-toggle .btn.btn-primary:hover,
.view-toggle .btn.btn-primary:focus {
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.view-toggle .btn.btn-outline-primary {
    color: #5668de;
    border-color: #667eea;
    background: #ffffff;
}

.view-toggle .btn.btn-outline-primary:hover,
.view-toggle .btn.btn-outline-primary:focus {
    color: #4252c5;
    border-color: #5668de;
    background: rgba(102, 126, 234, 0.08);
}

@media (max-width: 768px) {
    #transactionsGrid,
    #budgetGrid {
        height: 500px !important;
    }
}

.ag-cell.flagged-cell {
    background-color: #fff3cd;
    border-left: 3px solid #ffc107;
}

.ag-select-cell-editor {
    max-width: 220px;
}

.ag-cell.editable-cell {
    background: #ffffff !important;
    border: 1px dashed var(--gray-400) !important;
    border-radius: 4px;
}

.ag-cell.editable-cell:hover {
    border-color: var(--primary-color) !important;
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.15);
}

.budget-spreadsheet-grid .ag-cell.budget-level-section .ag-group-value {
    padding-left: 0 !important;
    margin-left: -0.95rem;
}

.budget-spreadsheet-grid .ag-cell.budget-level-group .ag-group-value {
    padding-left: 0.3rem;
}

.budget-spreadsheet-grid .ag-cell.budget-level-category .ag-group-value {
    padding-left: 0.8rem;
}

.budget-spreadsheet-grid .ag-cell.budget-level-section .ag-group-indent {
    width: 0 !important;
    min-width: 0 !important;
}

.budget-spreadsheet-grid .budget-section-icon {
    display: inline-flex;
    width: 12px;
    margin-right: 0.25rem;
    align-items: center;
    justify-content: center;
}

.budget-spreadsheet-grid .budget-row-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    margin-right: 0.3rem;
}

.budget-spreadsheet-grid .ag-cell.budget-level-section .ag-group-expanded,
.budget-spreadsheet-grid .ag-cell.budget-level-section .ag-group-contracted {
    margin-left: -0.35rem;
}

.ag-row .ag-cell.row-section {
    background: #f8f9fc;
}
