
/* Billing and Financial Management Styles */

.billing-tabs {
    display: flex;
    border-bottom: 2px solid var(--tertiary-dark);
    margin-bottom: 20px;
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: var(--tertiary-light);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--tertiary-light);
}

.billing-tab-content {
    display: none;
}

.billing-tab-content.active {
    display: block;
}

.billing-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.billing-metric {
    background: var(--tertiary-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--tertiary-dark);
}

.billing-metric h4 {
    color: var(--primary);
    margin: 0 0 10px 0;
    font-size: 1em;
}

.metric-value {
    font-size: 1.8em;
    font-weight: bold;
    margin: 0;
    color: var(--secondary);
}

.expense-item, .payment-item {
    background: var(--tertiary-light);
    border: 1px solid var(--tertiary-dark);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.expense-header, .payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.expense-header h4, .payment-header h4 {
    margin: 0;
    color: var(--primary);
}

.expense-amount, .payment-amount {
    font-weight: bold;
    font-size: 1.2em;
    color: var(--secondary);
}

.expense-details, .payment-details {
    margin: 10px 0;
    color: var(--text-muted);
}

.expense-details p, .payment-details p {
    margin: 5px 0;
}

.expense-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-received { background: #cce5ff; color: #004085; }

.budget-category {
    background: var(--tertiary-light);
    border: 1px solid var(--tertiary-dark);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.budget-header h4 {
    margin: 0;
    color: var(--primary);
}

.budget-utilization {
    font-weight: bold;
    color: var(--secondary);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--tertiary-dark);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.budget-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: var(--text-muted);
}

.expenses-toolbar, .payments-toolbar, .budget-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875em;
}

@media (max-width: 768px) {
    .billing-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .expense-header, .payment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .expense-actions {
        flex-wrap: wrap;
    }
    
    .billing-tabs {
        overflow-x: auto;
    }
    
    .expenses-toolbar, .payments-toolbar, .budget-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}
