/* Franchise Groups and Payers Grid Styles */
.expandable-payers-table {
    border-collapse: separate;
    border-spacing: 0;
}

.expandable-payers-table .payer-row {
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
}

.expand-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.expand-btn:hover {
    background-color: #e9ecef;
    color: #495057;
}

.expanded-content {
    animation: expandRow 0.3s ease-out;
}

@keyframes expandRow {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Franchise Account Details Table */
.user-details-table {
    font-size: 0.875rem;
    margin-bottom: 0;
}

.user-details-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-top: none;
    padding: 8px;
}

.user-details-table td {
    padding: 12px 8px;
    vertical-align: middle;
}

/* Franchise Account Row States */
.user-row-overdue {
    background-color: #fff5f5 !important;
    border-left: 3px solid #dc3545;
}

.user-row-due-soon {
    background-color: #fffbf0 !important;
    border-left: 3px solid #ffc107;
}

/* Account Display */
.user-name-primary {
    font-weight: 600;
    color: #212529;
    font-size: 0.9rem;
}

.user-business-name {
    color: #6c757d;
    font-style: italic;
}

/* Status Badges */
.billing-cycle-badge {
    font-size: 0.75rem;
    font-weight: 500;
}

.payment-status-badge {
    font-size: 0.7rem;
}

.status-overdue {
    color: #dc3545;
    font-weight: 600;
}

/* Summary Footer */
.user-summary-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    border: 1px solid #dee2e6;
}

.summary-metric {
    text-align: center;
    padding: 8px;
    border-right: 1px solid #dee2e6;
}

.summary-metric:last-child {
    border-right: none;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    font-weight: 600;
}

/* Loading States */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6c757d;
}

/* Filter Controls */
.filter-controls {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px 16px;
}

.filter-controls .form-check-label {
    font-size: 0.875rem;
    margin-left: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-details-table {
        font-size: 0.8rem;
    }
    
    .summary-value {
        font-size: 1.1rem;
    }
    
    .summary-label {
        font-size: 0.7rem;
    }
}